인용 블록 색상과 라이브 설정 패널 정리

This commit is contained in:
2026-06-04 10:28:43 +09:00
parent 2cb1ff4651
commit b38fc9f154
15 changed files with 222 additions and 221 deletions

View File

@@ -1,5 +1,5 @@
import { isImageUrl, parseImageMarkdownLine } from './markdown-image.js'
import { CALLOUT_BACKGROUND_OPTIONS, parseCalloutOptions } from './markdown-callout.js'
import { CALLOUT_BACKGROUND_OPTIONS, QUOTE_BACKGROUND_OPTIONS, parseCalloutOptions } from './markdown-callout.js'
import { parseCodeFenceLine } from './markdown-code-block.js'
import { parseToggleOpenerLine } from './markdown-toggle.js'
@@ -114,7 +114,7 @@ const parseQuoteOptionsLine = (value) => {
const [key, rawOptionValue] = token.split('=')
const optionValue = String(rawOptionValue || '').trim()
if (key?.toLowerCase() === 'bg' && CALLOUT_BACKGROUND_OPTIONS.includes(optionValue)) {
if (key?.toLowerCase() === 'bg' && QUOTE_BACKGROUND_OPTIONS.includes(optionValue)) {
quoteBackground = optionValue
}
})
@@ -151,7 +151,7 @@ const resolveQuoteBlock = (lines, currentLine) => {
kind: 'quote',
startLine,
endLine,
quoteBackground: quoteOptions?.quoteBackground || 'pink',
quoteBackground: quoteOptions?.quoteBackground || 'gray',
hasQuoteOptions: Boolean(quoteOptions)
}
}

View File

@@ -1,6 +1,29 @@
/** @type {string[]} */
export const CALLOUT_BACKGROUND_OPTIONS = ['gray', 'blue', 'green', 'yellow', 'red', 'purple', 'pink']
/** @type {string[]} */
export const QUOTE_BACKGROUND_OPTIONS = ['gray', 'blue', 'green', 'yellow', 'red', 'purple']
/** @type {Record<string, string>} */
export const QUOTE_BACKGROUND_LABELS = {
gray: '회색',
blue: '파랑',
green: '초록',
yellow: '노랑',
red: '빨강',
purple: '보라'
}
/** @type {Record<string, string>} */
export const QUOTE_BACKGROUND_SWATCHES = {
gray: 'color-mix(in srgb, #050505 10%, #ffffff)',
blue: 'color-mix(in srgb, #0055ff 10%, #ffffff)',
green: 'color-mix(in srgb, #16ae68 10%, #ffffff)',
yellow: 'color-mix(in srgb, #ffff00 10%, #ffffff)',
red: 'color-mix(in srgb, #ff0000 10%, #ffffff)',
purple: 'color-mix(in srgb, #8800ff 10%, #ffffff)'
}
/** @type {string[]} */
export const CALLOUT_EMOJI_OPTIONS = ['💡', '⚠️', '❗', '✅', '📌', '🔥', '💬']