@quirekit/ui 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/README.zh-CN.md +1 -0
- package/dist/{chat-BAee3Pg0.mjs → chat-BSVF78Hu.mjs} +91 -76
- package/dist/chat-BSVF78Hu.mjs.map +1 -0
- package/dist/chat.d.mts +2 -2
- package/dist/chat.mjs +1 -1
- package/dist/{code-block-D1kd-gAB.mjs → code-block-pXaSN9eY.mjs} +2 -2
- package/dist/{code-block-D1kd-gAB.mjs.map → code-block-pXaSN9eY.mjs.map} +1 -1
- package/dist/{html-sandbox-BYIni0q6.mjs → html-sandbox-CMsenGYi.mjs} +2 -2
- package/dist/{html-sandbox-BYIni0q6.mjs.map → html-sandbox-CMsenGYi.mjs.map} +1 -1
- package/dist/html-sandbox.mjs +1 -1
- package/dist/{index-Su5SBM61.d.mts → index-Bf9CudSF.d.mts} +20 -3
- package/dist/index-Bf9CudSF.d.mts.map +1 -0
- package/dist/{index-OJPxl6Iz.d.mts → index-DZc5z5s2.d.mts} +2 -2
- package/dist/{index-OJPxl6Iz.d.mts.map → index-DZc5z5s2.d.mts.map} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +17 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{model-CeJjdZm_.mjs → model-D4-FbKXY.mjs} +2 -2
- package/dist/{model-CeJjdZm_.mjs.map → model-D4-FbKXY.mjs.map} +1 -1
- package/dist/{resolve-CGFbhFiM.mjs → resolve-BwTfY4PS.mjs} +2 -2
- package/dist/{resolve-CGFbhFiM.mjs.map → resolve-BwTfY4PS.mjs.map} +1 -1
- package/dist/style.css +13 -0
- package/dist/vue.d.mts +643 -580
- package/dist/vue.d.mts.map +1 -1
- package/dist/vue.mjs +1164 -1026
- package/dist/vue.mjs.map +1 -1
- package/package.json +6 -3
- package/src/components/accordion/index.ts +2 -1
- package/src/components/accordion/types.ts +3 -0
- package/src/components/segmented/create.ts +1 -1
- package/src/components/segmented/index.ts +1 -0
- package/src/components/segmented/types.ts +4 -1
- package/src/components/select/types.ts +2 -0
- package/src/components/toolbar/types.ts +2 -0
- package/src/drag-cursor/hold.test.ts +13 -0
- package/src/drag-cursor/hold.ts +12 -0
- package/src/drag-cursor/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/vue/accordion/accordion.vue +7 -3
- package/src/vue/block-handle/block-handle.test.ts +30 -0
- package/src/vue/block-handle/block-handle.vue +27 -0
- package/src/vue/block-handle/index.ts +3 -0
- package/src/vue/block-handle/presentation.ts +23 -0
- package/src/vue/block-handle/types.ts +14 -0
- package/src/vue/code-block/theme-surface.vue +4 -1
- package/src/vue/comment/action.vue +33 -0
- package/src/vue/comment/comment.test.ts +5 -0
- package/src/vue/comment/index.ts +1 -0
- package/src/vue/comment/message.vue +18 -7
- package/src/vue/comment/thread.vue +24 -10
- package/src/vue/file-upload/file-upload.vue +1 -1
- package/src/vue/image-preview/theme-surface.vue +4 -1
- package/src/vue/index.ts +1 -0
- package/src/vue/kbd/labels.ts +9 -0
- package/src/vue/prose/mapping/native.ts +1 -1
- package/src/vue/prose/mapping/rich.ts +2 -1
- package/src/vue/schema-form/controls/registry.ts +1 -1
- package/src/vue/schema-form/tree.ts +1 -1
- package/src/vue/segmented/segmented.vue +5 -0
- package/src/vue/select/select.vue +2 -0
- package/src/vue/select/shortcut.test.ts +18 -0
- package/src/vue/shared/task/trigger.vue +1 -1
- package/src/vue/tags-input/tags-input.vue +1 -1
- package/src/vue/theme-provider/portal.vue +4 -1
- package/src/vue/theme-provider/surface.vue +4 -1
- package/src/vue/toolbar/items/control.vue +1 -0
- package/src/vue/toolbar/presentation/tooltip.vue +3 -1
- package/src/vue/toolbar/toolbar-action.vue +4 -1
- package/src/vue/toolbar/toolbar-disclosure.vue +4 -1
- package/src/vue/toolbar/toolbar-selector.vue +4 -1
- package/src/vue/toolbar/toolbar-toggle.vue +4 -1
- package/src/vue/tooltip/content.vue +6 -1
- package/src/vue/tooltip/shortcut.test.ts +27 -0
- package/dist/chat-BAee3Pg0.mjs.map +0 -1
- package/dist/index-Su5SBM61.d.mts.map +0 -1
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["mapReferences","reference","reference","mapReferences","mapReferences","reference","mapReferences","reference","clamp"],"sources":["../src/components/button/variables/references.ts","../src/components/popover/variables/references.ts","../src/components/segmented/variables/references.ts","../src/components/toolbar/variables/references.ts","../src/components/tooltip/variables/references.ts","../src/color-palette/labels.ts","../src/color-palette/style.ts","../src/color-palette/palette.ts","../src/color-palette/conversion.ts","../src/color-palette/custom/style.ts","../src/color-palette/custom/elements.ts","../src/color-palette/custom/panel.ts","../src/theme/defaults.ts","../src/components/icon/review.ts","../src/selection-geometry/bands.ts"],"sourcesContent":["import { buttonCssVariableNames } from \"./names\";\n\n/** CSS-reference projection of every Button component token. */\nexport const buttonVariableReferences = Object.freeze({\n typography: mapReferences(buttonCssVariableNames.typography),\n size: Object.freeze({\n xs: mapReferences(buttonCssVariableNames.size.xs),\n sm: mapReferences(buttonCssVariableNames.size.sm),\n md: mapReferences(buttonCssVariableNames.size.md),\n lg: mapReferences(buttonCssVariableNames.size.lg),\n xl: mapReferences(buttonCssVariableNames.size.xl)\n }),\n color: Object.freeze({\n neutral: mapReferences(buttonCssVariableNames.color.neutral),\n primary: mapReferences(buttonCssVariableNames.color.primary),\n info: mapReferences(buttonCssVariableNames.color.info),\n success: mapReferences(buttonCssVariableNames.color.success),\n warning: mapReferences(buttonCssVariableNames.color.warning),\n danger: mapReferences(buttonCssVariableNames.color.danger)\n }),\n disabled: mapReferences(buttonCssVariableNames.disabled),\n borderWidth: reference(buttonCssVariableNames.borderWidth),\n focusColor: reference(buttonCssVariableNames.focusColor),\n hoverOpacity: reference(buttonCssVariableNames.hoverOpacity),\n pressedOpacity: reference(buttonCssVariableNames.pressedOpacity),\n feedbackDuration: reference(buttonCssVariableNames.feedbackDuration),\n feedbackEasing: reference(buttonCssVariableNames.feedbackEasing)\n});\n\n/**\n * Creates a CSS reference to an explicitly declared component variable.\n *\n * @param name - Declared CSS custom-property name.\n * @returns CSS variable reference.\n */\nfunction reference(name: string): string {\n return `var(${name})`;\n}\n\n/**\n * Projects one explicit component-variable group to CSS references.\n *\n * @param names - Approved variable names.\n * @returns Same-shaped CSS references.\n */\nfunction mapReferences<T extends Readonly<Record<string, string>>>(\n names: T\n): { readonly [Key in keyof T]: string } {\n return Object.freeze(\n Object.fromEntries(\n Object.entries(names).map(([key, name]) => [key, reference(name)])\n )\n ) as { readonly [Key in keyof T]: string };\n}\n","import { popoverCssVariableNames } from \"./names\";\n\n/** Popover 组件 token 的 CSS 引用投影。 */\nexport const popoverVariableReferences = Object.freeze({\n background: reference(popoverCssVariableNames.background),\n foreground: reference(popoverCssVariableNames.foreground),\n mutedForeground: reference(popoverCssVariableNames.mutedForeground),\n borderColor: reference(popoverCssVariableNames.borderColor),\n borderWidth: reference(popoverCssVariableNames.borderWidth),\n radius: reference(popoverCssVariableNames.radius),\n shadow: reference(popoverCssVariableNames.shadow),\n padding: reference(popoverCssVariableNames.padding),\n gap: reference(popoverCssVariableNames.gap),\n arrowSize: reference(popoverCssVariableNames.arrowSize),\n closeSize: reference(popoverCssVariableNames.closeSize),\n closeRadius: reference(popoverCssVariableNames.closeRadius),\n closeHoverBackground: reference(\n popoverCssVariableNames.closeHoverBackground\n ),\n closeForeground: reference(popoverCssVariableNames.closeForeground),\n focusColor: reference(popoverCssVariableNames.focusColor),\n fontFamily: reference(popoverCssVariableNames.fontFamily),\n title: mapReferences(popoverCssVariableNames.title),\n body: mapReferences(popoverCssVariableNames.body),\n motionDuration: reference(popoverCssVariableNames.motionDuration),\n enterEasing: reference(popoverCssVariableNames.enterEasing),\n exitEasing: reference(popoverCssVariableNames.exitEasing),\n layer: reference(popoverCssVariableNames.layer)\n});\n\n/**\n * 创建对一个显式组件变量的 CSS 引用。\n *\n * @param name - 已声明的 CSS 自定义属性名。\n * @returns CSS 变量引用。\n */\nfunction reference(name: string): string {\n return `var(${name})`;\n}\n\n/**\n * 将一个显式变量名分组投影为同形状的 CSS 引用。\n *\n * @param names - 已批准的 CSS 变量名分组。\n * @returns 同形状的 CSS 引用分组。\n */\nfunction mapReferences<T extends Readonly<Record<string, string>>>(\n names: T\n): { readonly [Key in keyof T]: string } {\n return Object.freeze(\n Object.fromEntries(\n Object.entries(names).map(([key, name]) => [key, reference(name)])\n )\n ) as { readonly [Key in keyof T]: string };\n}\n","import { segmentedCssVariableNames } from \"./names\";\n\n/** Segmented Control 全部组件 token 的 CSS 引用投影。 */\nexport const segmentedVariableReferences = Object.freeze({\n typography: mapReferences(segmentedCssVariableNames.typography),\n size: Object.freeze({\n xs: mapReferences(segmentedCssVariableNames.size.xs),\n sm: mapReferences(segmentedCssVariableNames.size.sm),\n md: mapReferences(segmentedCssVariableNames.size.md),\n lg: mapReferences(segmentedCssVariableNames.size.lg),\n xl: mapReferences(segmentedCssVariableNames.size.xl)\n }),\n trackInset: reference(segmentedCssVariableNames.trackInset),\n trackRadius: reference(segmentedCssVariableNames.trackRadius),\n indicatorRadius: reference(segmentedCssVariableNames.indicatorRadius),\n trackBackground: reference(segmentedCssVariableNames.trackBackground),\n foreground: reference(segmentedCssVariableNames.foreground),\n hoverForeground: reference(segmentedCssVariableNames.hoverForeground),\n hoverBackground: reference(segmentedCssVariableNames.hoverBackground),\n selectedForeground: reference(segmentedCssVariableNames.selectedForeground),\n selectedBackground: reference(segmentedCssVariableNames.selectedBackground),\n disabledForeground: reference(segmentedCssVariableNames.disabledForeground),\n focusColor: reference(segmentedCssVariableNames.focusColor),\n transitionDuration: reference(segmentedCssVariableNames.transitionDuration),\n transitionEasing: reference(segmentedCssVariableNames.transitionEasing)\n});\n\n/**\n * 创建一个已显式声明组件变量的 CSS 引用。\n *\n * @param name - 已声明的 CSS 自定义属性名。\n * @returns CSS 变量引用。\n */\nfunction reference(name: string): string {\n return `var(${name})`;\n}\n\n/**\n * 把显式变量名组投影为相同结构的 CSS 引用。\n *\n * @param names - 已批准的变量名组。\n * @returns 与输入同结构的 CSS 引用。\n */\nfunction mapReferences<T extends Readonly<Record<string, string>>>(\n names: T\n): { readonly [Key in keyof T]: string } {\n return Object.freeze(\n Object.fromEntries(\n Object.entries(names).map(([key, name]) => [key, reference(name)])\n )\n ) as { readonly [Key in keyof T]: string };\n}\n","import { toolbarCssVariableNames } from \"./names\";\n\n/** CSS-reference projection of every Toolbar component token. */\nexport const toolbarVariableReferences = Object.freeze({\n typography: mapReferences(toolbarCssVariableNames.typography),\n geometry: mapReferences(toolbarCssVariableNames.geometry),\n color: mapReferences(toolbarCssVariableNames.color),\n feedbackDuration: reference(toolbarCssVariableNames.feedbackDuration),\n feedbackEasing: reference(toolbarCssVariableNames.feedbackEasing)\n});\n\n/**\n * Creates a CSS reference to an explicitly declared component variable.\n *\n * @param name - Declared CSS custom-property name.\n * @returns CSS variable reference.\n */\nfunction reference(name: string): string {\n return `var(${name})`;\n}\n\n/**\n * Projects a variable-name group to same-shaped CSS references.\n *\n * @param names - Approved Toolbar variable-name group.\n * @returns Same-shaped CSS references.\n */\nfunction mapReferences<T extends Readonly<Record<string, string>>>(\n names: T\n): { readonly [Key in keyof T]: string } {\n return Object.freeze(\n Object.fromEntries(\n Object.entries(names).map(([key, name]) => [key, reference(name)])\n )\n ) as { readonly [Key in keyof T]: string };\n}\n","import { tooltipCssVariableNames } from \"./names\";\n\n/** Tooltip 组件 token 的 CSS 引用投影。 */\nexport const tooltipVariableReferences = Object.freeze({\n background: reference(tooltipCssVariableNames.background),\n foreground: reference(tooltipCssVariableNames.foreground),\n borderColor: reference(tooltipCssVariableNames.borderColor),\n borderWidth: reference(tooltipCssVariableNames.borderWidth),\n radius: reference(tooltipCssVariableNames.radius),\n shadow: reference(tooltipCssVariableNames.shadow),\n paddingBlock: reference(tooltipCssVariableNames.paddingBlock),\n paddingInline: reference(tooltipCssVariableNames.paddingInline),\n gap: reference(tooltipCssVariableNames.gap),\n arrowSize: reference(tooltipCssVariableNames.arrowSize),\n typography: mapReferences(tooltipCssVariableNames.typography),\n motionDuration: reference(tooltipCssVariableNames.motionDuration),\n enterEasing: reference(tooltipCssVariableNames.enterEasing),\n exitEasing: reference(tooltipCssVariableNames.exitEasing),\n layer: reference(tooltipCssVariableNames.layer)\n});\n\n/**\n * 创建对一个显式组件变量的 CSS 引用。\n *\n * @param name - 已声明的 CSS 自定义属性名。\n * @returns CSS 变量引用。\n */\nfunction reference(name: string): string {\n return `var(${name})`;\n}\n\n/**\n * 将一个显式变量名分组投影为同形状的 CSS 引用。\n *\n * @param names - 已批准的 CSS 变量名分组。\n * @returns 同形状的 CSS 引用分组。\n */\nfunction mapReferences<T extends Readonly<Record<string, string>>>(\n names: T\n): { readonly [Key in keyof T]: string } {\n return Object.freeze(\n Object.fromEntries(\n Object.entries(names).map(([key, name]) => [key, reference(name)])\n )\n ) as { readonly [Key in keyof T]: string };\n}\n","import type { Messages as QuireColorPickerMessages } from \"../locale/components/color-picker\";\nimport { quireKitDefaultLocale } from \"../locale/resolve\";\nimport type { QuireColorPaletteLabels } from \"./types\";\n\n/**\n * Completes palette copy from the active language; host-supplied labels name this palette's purpose.\n *\n * @param labels - Host-supplied labels, such as \"Shape fill\" or \"No fill\".\n * @param messages - ColorPicker text of the active language; defaults to Chinese.\n * @returns Complete palette copy.\n */\nexport function resolveQuireColorPaletteLabels(\n labels: Partial<QuireColorPaletteLabels> | undefined,\n messages: QuireColorPickerMessages = quireKitDefaultLocale.messages.colorPicker\n): QuireColorPaletteLabels {\n return {\n label: labels?.label ?? messages.documentPalette,\n defaultColor: labels?.defaultColor ?? messages.defaultColor,\n moreColors: labels?.moreColors ?? messages.more,\n recentColors: labels?.recentColors ?? messages.recent\n };\n}\n\n/**\n * Resolves the accessible name of the custom-color surface.\n *\n * @param label - Host-supplied name, if any.\n * @param messages - ColorPicker text of the active language; defaults to Chinese.\n * @returns Accessible name for the surface.\n */\nexport function resolveQuireCustomColorPanelLabel(\n label: string | undefined,\n messages: QuireColorPickerMessages = quireKitDefaultLocale.messages.colorPicker\n): string {\n return label ?? messages.more;\n}\n","/**\n * Applies the shared palette root presentation.\n *\n * @param root - Palette root receiving framework-neutral styles.\n */\nexport function styleColorPaletteRoot(root: HTMLElement): void {\n root.style.boxSizing = \"border-box\";\n root.style.width = \"258px\";\n root.style.padding = \"12px 0 0\";\n root.style.color = \"#252b36\";\n root.style.background = \"#ffffff\";\n root.style.font = \"12px/1.4 system-ui, sans-serif\";\n}\n\n/**\n * Applies a full-width palette action row.\n *\n * @param button - Default or more-colors action.\n * @param divided - Whether a top divider separates this action.\n */\nexport function styleColorPaletteAction(\n button: HTMLButtonElement,\n divided: boolean\n): void {\n button.style.boxSizing = \"border-box\";\n button.style.width = divided ? \"100%\" : \"calc(100% - 24px)\";\n button.style.height = divided ? \"40px\" : \"30px\";\n button.style.margin = divided ? \"12px 0 0\" : \"0 12px\";\n button.style.padding = divided ? \"0 12px\" : \"0\";\n button.style.border = \"0\";\n button.style.borderTop = divided ? \"1px solid #eceef2\" : \"0\";\n button.style.borderRadius = \"0\";\n button.style.background = \"transparent\";\n button.style.color = \"#252b36\";\n button.style.display = \"flex\";\n button.style.alignItems = \"center\";\n button.style.gap = \"8px\";\n button.style.font = \"inherit\";\n button.style.cursor = \"pointer\";\n}\n\n/**\n * Applies the fixed ten-column document-color grid.\n *\n * @param grid - Preset-color grid receiving its shared layout.\n */\nexport function styleColorPaletteGrid(grid: HTMLElement): void {\n grid.style.display = \"grid\";\n grid.style.gridTemplateColumns = \"repeat(10, 18px)\";\n grid.style.gap = \"6px\";\n grid.style.margin = \"8px 12px 0\";\n}\n\n/**\n * Applies one document-color chip and its selected state.\n *\n * @param button - Color button.\n * @param color - Canonical visible color.\n * @param selected - Whether this chip is current.\n */\nexport function styleColorPaletteChip(\n button: HTMLButtonElement,\n color: string,\n selected: boolean\n): void {\n button.style.position = \"relative\";\n button.style.boxSizing = \"border-box\";\n button.style.width = \"18px\";\n button.style.height = \"18px\";\n button.style.padding = \"0\";\n button.style.border = selected\n ? \"2px solid #2563eb\"\n : \"1px solid rgba(22, 28, 38, 0.12)\";\n button.style.borderRadius = \"2px\";\n button.style.background = color;\n button.style.boxShadow = selected ? \"0 0 0 1px #ffffff inset\" : \"none\";\n button.style.cursor = \"pointer\";\n}\n\n/**\n * Applies a reset-state chip, including explicit no-color presentation.\n *\n * @param chip - Reset indicator receiving its current paint.\n * @param color - Default color, or null for crossed no paint.\n */\nexport function styleColorPaletteDefaultChip(\n chip: HTMLElement,\n color: string | null\n): void {\n chip.style.width = \"18px\";\n chip.style.height = \"18px\";\n chip.style.flex = \"0 0 18px\";\n chip.style.border = \"1px solid rgba(22, 28, 38, 0.12)\";\n chip.style.borderRadius = \"2px\";\n chip.style.background = color === null\n ? \"linear-gradient(135deg, transparent 46%, #d92d20 47% 53%, transparent 54%), #ffffff\"\n : color;\n}\n\n/**\n * Applies the recent-color section label.\n *\n * @param label - Recent-colors heading receiving shared typography.\n */\nexport function styleColorPaletteSectionLabel(label: HTMLElement): void {\n label.style.margin = \"13px 12px 6px\";\n label.style.color = \"#6d7685\";\n}\n\n/**\n * Applies the recent-color row.\n *\n * @param row - Recent-colors row receiving shared layout.\n */\nexport function styleColorPaletteRecentRow(row: HTMLElement): void {\n row.style.display = \"flex\";\n row.style.gap = \"6px\";\n row.style.margin = \"0 12px\";\n}\n\n/**\n * Applies the circular color-spectrum glyph.\n *\n * @param wheel - Decorative spectrum element receiving shared paint.\n */\nexport function styleColorWheel(wheel: HTMLElement): void {\n wheel.style.width = \"18px\";\n wheel.style.height = \"18px\";\n wheel.style.flex = \"0 0 18px\";\n wheel.style.background =\n \"conic-gradient(#e53935, #facc15, #22c55e, #06b6d4, #2563eb, #9333ea, #e53935)\";\n wheel.style.borderRadius = \"50%\";\n}\n","import { resolveQuireColorPaletteLabels } from \"./labels\";\nimport { quireDocumentColorRows } from \"./presets\";\nimport {\n styleColorPaletteAction,\n styleColorPaletteChip,\n styleColorPaletteDefaultChip,\n styleColorPaletteGrid,\n styleColorPaletteRecentRow,\n styleColorPaletteRoot,\n styleColorPaletteSectionLabel,\n styleColorWheel\n} from \"./style\";\nimport type {\n CreateQuireColorPaletteOptions,\n QuireColorPaletteController,\n QuireColorPaletteLabels,\n QuireColorPaletteState\n} from \"./types\";\n\n/** Controlled state with complete copy, as rendered by the palette helpers. */\ninterface ResolvedPaletteState extends QuireColorPaletteState {\n /** Complete copy resolved from host labels and the active language. */\n readonly labels: QuireColorPaletteLabels;\n}\n\n/**\n * @param state - Controlled presentation state.\n * @returns The state with complete copy.\n */\nfunction resolveState(state: QuireColorPaletteState): ResolvedPaletteState {\n return { ...state, labels: resolveQuireColorPaletteLabels(state.labels, state.messages) };\n}\n\n/**\n * Creates one controlled, framework-neutral document color palette.\n *\n * @param options - Initial state, localized copy, and semantic callbacks.\n * @returns Mounted palette element plus update and teardown lifecycle.\n */\nexport function createQuireColorPalette(\n options: CreateQuireColorPaletteOptions\n): QuireColorPaletteController {\n const root = options.ownerDocument.createElement(\"div\");\n let state = resolveState(options);\n let destroyed = false;\n root.dataset.qkColorPalette = \"true\";\n root.setAttribute(\"role\", \"group\");\n styleColorPaletteRoot(root);\n\n /** Rebuilds descendants from complete controlled state. */\n const render = (): void => {\n root.replaceChildren();\n root.setAttribute(\"aria-label\", state.labels.label);\n root.append(createResetAction(options, state));\n const grid = options.ownerDocument.createElement(\"div\");\n grid.dataset.qkColorGrid = \"true\";\n styleColorPaletteGrid(grid);\n for (const row of quireDocumentColorRows) {\n for (const color of row) {\n grid.append(createColorButton(options, state, color));\n }\n }\n root.append(grid);\n if (state.recentColors.length > 0) {\n root.append(createRecentSection(options, state));\n }\n if (options.onMoreColors !== undefined) {\n root.append(createMoreColorsAction(options, state));\n }\n };\n\n render();\n return {\n element: root,\n update(nextState): void {\n if (destroyed) {\n return;\n }\n state = resolveState(nextState);\n render();\n },\n destroy(): void {\n if (destroyed) {\n return;\n }\n destroyed = true;\n root.remove();\n }\n };\n}\n\n/**\n * Creates the consumer-defined reset or no-paint action.\n *\n * @param options - Palette callbacks and owner document.\n * @param state - Current controlled presentation.\n * @returns Reset action row.\n */\nfunction createResetAction(\n options: CreateQuireColorPaletteOptions,\n state: ResolvedPaletteState\n): HTMLButtonElement {\n const button = options.ownerDocument.createElement(\"button\");\n button.type = \"button\";\n button.dataset.qkColorDefault = \"true\";\n button.setAttribute(\"aria-label\", state.labels.defaultColor);\n styleColorPaletteAction(button, false);\n const chip = options.ownerDocument.createElement(\"span\");\n chip.setAttribute(\"aria-hidden\", \"true\");\n styleColorPaletteDefaultChip(chip, state.defaultColor);\n button.append(chip, state.labels.defaultColor);\n button.addEventListener(\"pointerdown\", preserveEditorFocus);\n button.addEventListener(\"click\", options.onReset);\n return button;\n}\n\n/**\n * Creates one preset or recent controlled color button.\n *\n * @param options - Palette callbacks and owner document.\n * @param state - Current controlled presentation.\n * @param color - Canonical color represented by the button.\n * @returns Accessible color control.\n */\nfunction createColorButton(\n options: CreateQuireColorPaletteOptions,\n state: ResolvedPaletteState,\n color: string\n): HTMLButtonElement {\n const button = options.ownerDocument.createElement(\"button\");\n const selected = state.value?.toUpperCase() === color.toUpperCase();\n button.type = \"button\";\n button.dataset.qkColorValue = color;\n button.setAttribute(\"aria-label\", `${state.labels.label} ${color}`);\n button.setAttribute(\"aria-pressed\", String(selected));\n styleColorPaletteChip(button, color, selected);\n button.addEventListener(\"pointerenter\", () => {\n button.style.border = \"2px solid rgba(37, 99, 235, 0.5)\";\n });\n button.addEventListener(\"pointerleave\", () => {\n button.style.border = selected\n ? \"2px solid #2563eb\"\n : \"1px solid rgba(22, 28, 38, 0.12)\";\n });\n button.addEventListener(\"pointerdown\", preserveEditorFocus);\n button.addEventListener(\"click\", () => options.onSelect(color));\n return button;\n}\n\n/**\n * Creates the optional recent-colors heading and row.\n *\n * @param options - Palette callbacks and owner document.\n * @param state - Current controlled presentation.\n * @returns Recent-color section.\n */\nfunction createRecentSection(\n options: CreateQuireColorPaletteOptions,\n state: ResolvedPaletteState\n): DocumentFragment {\n const fragment = options.ownerDocument.createDocumentFragment();\n const label = options.ownerDocument.createElement(\"p\");\n label.textContent = state.labels.recentColors;\n styleColorPaletteSectionLabel(label);\n fragment.append(label);\n const row = options.ownerDocument.createElement(\"div\");\n row.dataset.qkRecentColors = \"true\";\n styleColorPaletteRecentRow(row);\n for (const color of state.recentColors) {\n row.append(createColorButton(options, state, color));\n }\n fragment.append(row);\n return fragment;\n}\n\n/**\n * Creates the optional consumer-owned custom-color entry.\n *\n * @param options - Palette callbacks and owner document.\n * @param state - Current controlled presentation.\n * @returns More-colors action row.\n */\nfunction createMoreColorsAction(\n options: CreateQuireColorPaletteOptions,\n state: ResolvedPaletteState\n): HTMLButtonElement {\n const button = options.ownerDocument.createElement(\"button\");\n button.type = \"button\";\n button.dataset.qkColorMore = \"true\";\n styleColorPaletteAction(button, true);\n const wheel = options.ownerDocument.createElement(\"span\");\n wheel.setAttribute(\"aria-hidden\", \"true\");\n styleColorWheel(wheel);\n const arrow = options.ownerDocument.createElement(\"span\");\n arrow.setAttribute(\"aria-hidden\", \"true\");\n arrow.style.marginLeft = \"auto\";\n arrow.style.color = \"#87909f\";\n arrow.style.fontSize = \"20px\";\n arrow.textContent = \"›\";\n button.append(wheel, state.labels.moreColors, arrow);\n button.addEventListener(\"pointerdown\", preserveEditorFocus);\n button.addEventListener(\"click\", () => options.onMoreColors?.());\n return button;\n}\n\n/**\n * Keeps a document-editor selection authoritative while a palette control is used.\n *\n * @param event - Pointer transition targeting a palette control.\n */\nfunction preserveEditorFocus(event: PointerEvent): void {\n event.preventDefault();\n}\n","import type { HsvColor, RgbColor } from \"./types\";\n\n/**\n * Keeps a numeric channel inside its supported value space.\n *\n * @param value - Candidate channel value.\n * @param minimum - Inclusive lower bound.\n * @param maximum - Inclusive upper bound.\n * @returns Clamped channel value.\n */\nfunction clamp(value: number, minimum: number, maximum: number): number {\n return Math.min(maximum, Math.max(minimum, value));\n}\n\n/**\n * Converts one canonical hexadecimal color into RGB channels.\n *\n * @param color - Six-digit hexadecimal color with a leading hash.\n * @returns Parsed RGB channels.\n */\nexport function hexToRgb(color: string): RgbColor {\n const value = color.slice(1);\n return {\n red: Number.parseInt(value.slice(0, 2), 16),\n green: Number.parseInt(value.slice(2, 4), 16),\n blue: Number.parseInt(value.slice(4, 6), 16)\n };\n}\n\n/**\n * Converts RGB channels into one canonical uppercase hexadecimal color.\n *\n * @param color - RGB channels to serialize.\n * @returns Six-digit hexadecimal color with a leading hash.\n */\nexport function rgbToHex(color: RgbColor): string {\n /**\n * Serializes one clamped integer channel.\n *\n * @param value - Candidate RGB channel.\n * @returns Two-digit hexadecimal channel.\n */\n const channel = (value: number): string => (\n Math.round(clamp(value, 0, 255)).toString(16).padStart(2, \"0\")\n );\n return `#${channel(color.red)}${channel(color.green)}${channel(color.blue)}`\n .toUpperCase();\n}\n\n/**\n * Converts RGB channels into the HSV editing value space.\n *\n * @param color - RGB channels to convert.\n * @returns Equivalent HSV channels.\n */\nexport function rgbToHsv(color: RgbColor): HsvColor {\n const red = clamp(color.red, 0, 255) / 255;\n const green = clamp(color.green, 0, 255) / 255;\n const blue = clamp(color.blue, 0, 255) / 255;\n const maximum = Math.max(red, green, blue);\n const minimum = Math.min(red, green, blue);\n const delta = maximum - minimum;\n let hue = 0;\n if (delta > 0) {\n if (maximum === red) hue = 60 * (((green - blue) / delta) % 6);\n else if (maximum === green) hue = 60 * ((blue - red) / delta + 2);\n else hue = 60 * ((red - green) / delta + 4);\n }\n return {\n hue: hue < 0 ? hue + 360 : hue,\n saturation: maximum === 0 ? 0 : (delta / maximum) * 100,\n value: maximum * 100\n };\n}\n\n/**\n * Converts HSV editing channels into RGB channels.\n *\n * @param color - HSV channels to convert.\n * @returns Equivalent RGB channels.\n */\nexport function hsvToRgb(color: HsvColor): RgbColor {\n const hue = ((color.hue % 360) + 360) % 360;\n const saturation = clamp(color.saturation, 0, 100) / 100;\n const value = clamp(color.value, 0, 100) / 100;\n const chroma = value * saturation;\n const segment = hue / 60;\n const intermediate = chroma * (1 - Math.abs((segment % 2) - 1));\n const offset = value - chroma;\n const [red, green, blue] = (\n segment < 1 ? [chroma, intermediate, 0]\n : segment < 2 ? [intermediate, chroma, 0]\n : segment < 3 ? [0, chroma, intermediate]\n : segment < 4 ? [0, intermediate, chroma]\n : segment < 5 ? [intermediate, 0, chroma]\n : [chroma, 0, intermediate]\n );\n return {\n red: (red + offset) * 255,\n green: (green + offset) * 255,\n blue: (blue + offset) * 255\n };\n}\n\n/**\n * Normalizes user-entered hexadecimal text without silently changing invalid colors.\n *\n * @param value - Candidate hexadecimal text, with or without a leading hash.\n * @returns Canonical color, or undefined when the input is incomplete.\n */\nexport function normalizeHexColor(value: string): string | undefined {\n const normalized = value.trim().replace(/^#/u, \"\");\n if (!/^[0-9A-F]{6}$/iu.test(normalized)) return undefined;\n return `#${normalized.toUpperCase()}`;\n}\n","/**\n * Applies the shared custom-color panel presentation.\n *\n * @param panel - Custom-color root receiving framework-neutral styles.\n */\nexport function styleCustomColorPanel(panel: HTMLElement): void {\n panel.style.boxSizing = \"border-box\";\n panel.style.width = \"260px\";\n panel.style.padding = \"12px\";\n panel.style.color = \"#252b36\";\n panel.style.background = \"#ffffff\";\n panel.style.border = \"1px solid #e2e5eb\";\n panel.style.borderRadius = \"8px\";\n panel.style.boxShadow = \"0 10px 28px rgba(26, 35, 52, 0.18)\";\n panel.style.font = \"12px/1.4 system-ui, sans-serif\";\n}\n\n/**\n * Applies the saturation/value editing plane presentation.\n *\n * @param plane - Pointer-editable color plane.\n */\nexport function styleCustomColorPlane(plane: HTMLElement): void {\n plane.style.position = \"relative\";\n plane.style.height = \"146px\";\n plane.style.overflow = \"hidden\";\n plane.style.cursor = \"crosshair\";\n plane.style.backgroundImage = [\n \"linear-gradient(to top, #000, transparent)\",\n \"linear-gradient(to right, #fff, transparent)\"\n ].join(\", \");\n plane.style.borderRadius = \"4px\";\n plane.style.touchAction = \"none\";\n plane.style.userSelect = \"none\";\n}\n\n/**\n * Applies the current saturation/value cursor presentation.\n *\n * @param cursor - Decorative position indicator.\n */\nexport function styleCustomColorCursor(cursor: HTMLElement): void {\n cursor.style.position = \"absolute\";\n cursor.style.width = \"12px\";\n cursor.style.height = \"12px\";\n cursor.style.border = \"2px solid #ffffff\";\n cursor.style.borderRadius = \"50%\";\n cursor.style.boxShadow = \"0 0 0 1px rgba(22, 28, 38, 0.35)\";\n cursor.style.transform = \"translate(-50%, -50%)\";\n cursor.style.pointerEvents = \"none\";\n}\n\n/**\n * Applies the hue and preview row layout.\n *\n * @param row - Row containing hue input and current-color preview.\n */\nexport function styleCustomColorSliderRow(row: HTMLElement): void {\n row.style.display = \"flex\";\n row.style.alignItems = \"center\";\n row.style.gap = \"12px\";\n row.style.marginTop = \"11px\";\n}\n\n/**\n * Applies the native hue range presentation.\n *\n * @param input - Hue range input.\n */\nexport function styleCustomColorHue(input: HTMLInputElement): void {\n input.style.width = \"100%\";\n input.style.height = \"12px\";\n input.style.margin = \"0\";\n input.style.background = [\n \"linear-gradient(90deg, #f00, #ff0 17%, #0f0 33%,\",\n \"#0ff 50%, #00f 67%, #f0f 83%, #f00)\"\n ].join(\" \");\n input.style.borderRadius = \"6px\";\n input.style.outline = \"0\";\n input.style.cursor = \"pointer\";\n input.style.accentColor = \"#ffffff\";\n input.style.setProperty(\"appearance\", \"none\");\n}\n\n/**\n * Applies the current-color preview chip.\n *\n * @param preview - Decorative solid-color preview.\n */\nexport function styleCustomColorPreview(preview: HTMLElement): void {\n preview.style.width = \"30px\";\n preview.style.height = \"30px\";\n preview.style.flex = \"0 0 30px\";\n preview.style.border = \"1px solid rgba(22, 28, 38, 0.12)\";\n preview.style.borderRadius = \"8px\";\n preview.style.boxShadow = \"0 2px 6px rgba(22, 28, 38, 0.12)\";\n}\n\n/**\n * Applies the hexadecimal and RGB field row.\n *\n * @param row - Row receiving four labelled inputs.\n */\nexport function styleCustomColorInputRow(row: HTMLElement): void {\n row.style.display = \"grid\";\n row.style.gridTemplateColumns = \"72px repeat(3, 1fr)\";\n row.style.alignItems = \"start\";\n row.style.gap = \"7px\";\n row.style.marginTop = \"12px\";\n}\n\n/**\n * Applies one channel field layout.\n *\n * @param label - Label wrapping an input and channel name.\n */\nexport function styleCustomColorField(label: HTMLLabelElement): void {\n label.style.display = \"grid\";\n label.style.minWidth = \"0\";\n label.style.justifyItems = \"center\";\n label.style.gap = \"4px\";\n label.style.color = \"#7b8290\";\n}\n\n/**\n * Applies one compact custom-color channel input.\n *\n * @param input - Hexadecimal or numeric channel input.\n */\nexport function styleCustomColorInput(input: HTMLInputElement): void {\n input.style.boxSizing = \"border-box\";\n input.style.width = \"100%\";\n input.style.height = \"28px\";\n input.style.padding = \"0 4px\";\n input.style.color = \"#252b36\";\n input.style.background = \"#ffffff\";\n input.style.border = \"1px solid #d7dce4\";\n input.style.borderRadius = \"5px\";\n input.style.outline = \"0\";\n input.style.font = \"12px/1 system-ui, sans-serif\";\n input.style.textAlign = \"center\";\n}\n","import {\n styleCustomColorCursor,\n styleCustomColorField,\n styleCustomColorHue,\n styleCustomColorInput,\n styleCustomColorInputRow,\n styleCustomColorPanel,\n styleCustomColorPlane,\n styleCustomColorPreview,\n styleCustomColorSliderRow\n} from \"./style\";\n\n/**\n * Creates and styles the stable custom-color DOM.\n *\n * @param ownerDocument - Document creating the editing surface.\n * @returns Complete element references used by controlled updates.\n */\nexport function createCustomColorPanelElements(ownerDocument: Document) {\n const root = ownerDocument.createElement(\"div\");\n root.dataset.qkCustomColorPanel = \"true\";\n root.setAttribute(\"role\", \"group\");\n styleCustomColorPanel(root);\n const plane = ownerDocument.createElement(\"div\");\n plane.dataset.qkCustomColorPlane = \"true\";\n styleCustomColorPlane(plane);\n const cursor = ownerDocument.createElement(\"span\");\n cursor.setAttribute(\"aria-hidden\", \"true\");\n styleCustomColorCursor(cursor);\n plane.append(cursor);\n const sliderRow = ownerDocument.createElement(\"div\");\n styleCustomColorSliderRow(sliderRow);\n const hue = ownerDocument.createElement(\"input\");\n hue.type = \"range\";\n hue.min = \"0\";\n hue.max = \"360\";\n hue.dataset.qkCustomColorHue = \"true\";\n styleCustomColorHue(hue);\n const preview = ownerDocument.createElement(\"span\");\n preview.setAttribute(\"aria-hidden\", \"true\");\n styleCustomColorPreview(preview);\n sliderRow.append(hue, preview);\n const fields = ownerDocument.createElement(\"div\");\n styleCustomColorInputRow(fields);\n const hex = createInput(ownerDocument, \"hex\", \"text\", \"HEX\", fields);\n hex.maxLength = 6;\n const red = createInput(ownerDocument, \"red\", \"number\", \"R\", fields);\n const green = createInput(ownerDocument, \"green\", \"number\", \"G\", fields);\n const blue = createInput(ownerDocument, \"blue\", \"number\", \"B\", fields);\n for (const input of [red, green, blue]) {\n input.min = \"0\";\n input.max = \"255\";\n }\n root.append(plane, sliderRow, fields);\n return {\n root,\n plane,\n cursor,\n hue,\n preview,\n hex,\n red,\n green,\n blue,\n channels: [[hex, \"HEX\"], [red, \"R\"], [green, \"G\"], [blue, \"B\"]] as const\n };\n}\n\n/**\n * Creates one labelled hexadecimal or RGB input.\n *\n * @param ownerDocument - Document creating the input.\n * @param name - Stable dataset suffix.\n * @param type - Native input type.\n * @param channel - Visible channel label.\n * @param parent - Field row receiving the label.\n * @returns Created native input.\n */\nfunction createInput(\n ownerDocument: Document,\n name: \"hex\" | \"red\" | \"green\" | \"blue\",\n type: \"text\" | \"number\",\n channel: string,\n parent: HTMLElement\n): HTMLInputElement {\n const label = ownerDocument.createElement(\"label\");\n styleCustomColorField(label);\n const input = ownerDocument.createElement(\"input\");\n input.type = type;\n input.placeholder = name === \"hex\" ? \"#RRGGBB\" : \"0–255\";\n input.dataset[`qkCustomColor${name[0]?.toUpperCase()}${name.slice(1)}`] = \"true\";\n styleCustomColorInput(input);\n label.append(input, channel);\n parent.append(label);\n return input;\n}\n","import {\n hexToRgb,\n hsvToRgb,\n normalizeHexColor,\n rgbToHex,\n rgbToHsv\n} from \"../conversion\";\nimport { resolveQuireCustomColorPanelLabel } from \"../labels\";\nimport { createCustomColorPanelElements } from \"./elements\";\nimport type {\n CreateQuireCustomColorPanelOptions,\n QuireCustomColorPanelController,\n QuireCustomColorPanelState,\n RgbColor\n} from \"../types\";\n\n/**\n * Creates one controlled, framework-neutral custom-color editing surface.\n *\n * @param options - Initial color, accessible copy, and semantic callback.\n * @returns Mounted editor element plus update and teardown lifecycle.\n */\nexport function createQuireCustomColorPanel(\n options: CreateQuireCustomColorPanelOptions\n): QuireCustomColorPanelController {\n const elements = createCustomColorPanelElements(options.ownerDocument);\n let color = normalizeHexColor(options.value) ?? \"#000000\";\n let hsv = rgbToHsv(hexToRgb(color));\n let label = resolveQuireCustomColorPanelLabel(options.label, options.messages);\n let destroyed = false;\n\n /** Projects current color state into every editable control. */\n const render = (): void => {\n const rgb = hexToRgb(color);\n const hueColor = rgbToHex(hsvToRgb({\n hue: hsv.hue,\n saturation: 100,\n value: 100\n }));\n elements.root.setAttribute(\"aria-label\", label);\n elements.plane.style.backgroundColor = hueColor;\n elements.cursor.style.left = `${hsv.saturation}%`;\n elements.cursor.style.top = `${100 - hsv.value}%`;\n elements.hue.value = String(hsv.hue);\n elements.preview.style.backgroundColor = color;\n elements.hex.value = color.slice(1);\n elements.red.value = String(Math.round(rgb.red));\n elements.green.value = String(Math.round(rgb.green));\n elements.blue.value = String(Math.round(rgb.blue));\n for (const [input, channel] of elements.channels) {\n input.setAttribute(\"aria-label\", `${label} ${channel}`);\n }\n };\n\n /**\n * Commits one canonical color through the consumer callback.\n *\n * @param nextColor - Canonical color to project and emit.\n */\n const commit = (nextColor: string): void => {\n color = nextColor;\n hsv = rgbToHsv(hexToRgb(color));\n render();\n options.onChange(color);\n };\n\n /** Commits a complete hexadecimal input or restores the canonical value. */\n const commitHex = (): void => {\n const normalized = normalizeHexColor(elements.hex.value);\n if (normalized === undefined) {\n render();\n return;\n }\n commit(normalized);\n };\n\n /**\n * Commits one changed RGB input.\n *\n * @param channel - RGB channel owned by the changed input.\n * @param input - Numeric field supplying the next channel value.\n */\n const commitRgb = (channel: keyof RgbColor, input: HTMLInputElement): void => {\n const value = Number(input.value);\n if (!Number.isFinite(value)) {\n render();\n return;\n }\n commit(rgbToHex({\n ...hexToRgb(color),\n [channel]: value\n }));\n };\n\n /**\n * Projects a plane pointer into saturation and value.\n *\n * @param event - Pointer event inside the saturation/value plane.\n */\n const updatePlane = (event: PointerEvent): void => {\n const bounds = elements.plane.getBoundingClientRect();\n if (bounds.width <= 0 || bounds.height <= 0) {\n return;\n }\n hsv = {\n ...hsv,\n saturation: clamp(((event.clientX - bounds.left) / bounds.width) * 100),\n value: 100 - clamp(((event.clientY - bounds.top) / bounds.height) * 100)\n };\n color = rgbToHex(hsvToRgb(hsv));\n render();\n };\n\n elements.plane.addEventListener(\"pointerdown\", (event) => {\n elements.plane.setPointerCapture?.(event.pointerId);\n updatePlane(event);\n });\n elements.plane.addEventListener(\"pointermove\", (event) => {\n if (event.buttons !== 0) updatePlane(event);\n });\n elements.plane.addEventListener(\"pointerup\", (event) => {\n updatePlane(event);\n commit(color);\n });\n elements.hue.addEventListener(\"input\", () => {\n hsv = { ...hsv, hue: Number(elements.hue.value) };\n commit(rgbToHex(hsvToRgb(hsv)));\n });\n elements.hex.addEventListener(\"change\", commitHex);\n elements.hex.addEventListener(\"keydown\", (event) => {\n if (event.key === \"Enter\") {\n event.preventDefault();\n commitHex();\n }\n });\n elements.red.addEventListener(\"change\", () => commitRgb(\"red\", elements.red));\n elements.green.addEventListener(\"change\", () => commitRgb(\"green\", elements.green));\n elements.blue.addEventListener(\"change\", () => commitRgb(\"blue\", elements.blue));\n render();\n\n return {\n element: elements.root,\n update(state: QuireCustomColorPanelState): void {\n if (destroyed) return;\n color = normalizeHexColor(state.value) ?? color;\n hsv = rgbToHsv(hexToRgb(color));\n label = resolveQuireCustomColorPanelLabel(state.label, state.messages);\n render();\n },\n destroy(): void {\n if (destroyed) return;\n destroyed = true;\n elements.root.remove();\n }\n };\n}\n\n/**\n * Keeps one percentage inside the custom-color editing value space.\n *\n * @param value - Candidate percentage.\n * @returns Clamped percentage.\n */\nfunction clamp(value: number): number {\n return Math.min(100, Math.max(0, value));\n}\n","import { createTheme } from \"./create\";\n\n/** Shared immutable theme for consumers without an explicit theme. */\nexport const defaultTheme = createTheme();\n\n/** DOM-independent semantic colors shared by default DOM, Canvas and SVG consumers. */\nexport const defaultThemeColors = defaultTheme.color;\n","import { quireKitEditorLucideIconSvg } from \"./lucide\";\nimport { formattingIconSvg } from \"./custom/formatting\";\n\n/** Compatibility export of the shared review family; no independently maintained artwork. */\nexport const quireKitReviewIconSvg = Object.freeze({\n commentPrevious: quireKitEditorLucideIconSvg.commentPrevious,\n commentNext: quireKitEditorLucideIconSvg.commentNext,\n revisionPrevious: quireKitEditorLucideIconSvg.revisionPrevious,\n revisionNext: quireKitEditorLucideIconSvg.revisionNext,\n revisionAccept: quireKitEditorLucideIconSvg.revisionAccept,\n revisionReject: quireKitEditorLucideIconSvg.revisionReject,\n revisionAcceptAll: quireKitEditorLucideIconSvg.revisionAcceptAll,\n revisionRejectAll: quireKitEditorLucideIconSvg.revisionRejectAll,\n revisionMarkup: quireKitEditorLucideIconSvg.revisionMarkup,\n revisionFinal: quireKitEditorLucideIconSvg.revisionFinal,\n revisionOriginal: quireKitEditorLucideIconSvg.revisionOriginal,\n trackChanges: quireKitEditorLucideIconSvg.trackChanges,\n revisionSimpleMarkup: formattingIconSvg.revisionSimpleMarkup\n});\n","import type { QuireSelectionPaintRect, QuireSelectionTextBand, SelectionTextBandBuilder } from \"./types\";\n\n/**\n * Groups measured text fragments by visual row without joining unselected horizontal gaps.\n * @param rects - Browser-ordered fragments from one text owner and one canonical range.\n * @returns Flat vertical bands retaining each original fragment and its provenance.\n */\nexport function groupQuireSelectionTextBands<T extends QuireSelectionPaintRect>(\n rects: readonly T[]\n): readonly QuireSelectionTextBand<T>[] {\n const bands: SelectionTextBandBuilder<T>[] = [];\n for (const rect of rects) {\n if (![rect.left, rect.right, rect.top, rect.bottom].every(Number.isFinite)\n || rect.right <= rect.left || rect.bottom <= rect.top) continue;\n // A shared intersection, rather than the growing bounding box, prevents a\n // raised/lowered glyph from connecting the previous and next wrapped rows.\n let band: SelectionTextBandBuilder<T> | undefined;\n for (let index = bands.length - 1; index >= 0; index--) {\n const row = bands[index]!;\n if (rect.top < row.sharedBottom && rect.bottom > row.sharedTop) { band = row; break; }\n }\n if (!band) {\n bands.push({ top: rect.top, bottom: rect.bottom, sharedTop: rect.top, sharedBottom: rect.bottom, rects: [rect] });\n continue;\n }\n // Inner text and its padded inline surface share one band. A redundant inner\n // rectangle must not narrow the intersection that decides the next row.\n if (!band.rects.some(selected => contains(selected, rect))) {\n band.top = Math.min(band.top, rect.top);\n band.bottom = Math.max(band.bottom, rect.bottom);\n band.sharedTop = Math.max(band.sharedTop, rect.top);\n band.sharedBottom = Math.min(band.sharedBottom, rect.bottom);\n }\n band.rects.push(rect);\n }\n return bands;\n}\n\n/** @param outer - Selected text or inline surface. @param inner - Candidate fragment. @returns Whether its geometry is already enclosed. */\nfunction contains(outer: QuireSelectionPaintRect, inner: QuireSelectionPaintRect): boolean {\n return inner.left >= outer.left - 0.01 && inner.right <= outer.right + 0.01\n && inner.top >= outer.top - 0.01 && inner.bottom <= outer.bottom + 0.01;\n}\n"],"mappings":";;;;;AAGA,MAAa,2BAA2B,OAAO,OAAO;CACpD,YAAYA,gBAAc,uBAAuB,UAAU;CAC3D,MAAM,OAAO,OAAO;EAClB,IAAIA,gBAAc,uBAAuB,KAAK,EAAE;EAChD,IAAIA,gBAAc,uBAAuB,KAAK,EAAE;EAChD,IAAIA,gBAAc,uBAAuB,KAAK,EAAE;EAChD,IAAIA,gBAAc,uBAAuB,KAAK,EAAE;EAChD,IAAIA,gBAAc,uBAAuB,KAAK,EAAE;CAClD,CAAC;CACD,OAAO,OAAO,OAAO;EACnB,SAASA,gBAAc,uBAAuB,MAAM,OAAO;EAC3D,SAASA,gBAAc,uBAAuB,MAAM,OAAO;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M,KAAK;GAAO,KAAK;GAAK,KAAK;EAAM,CAAC,CAAC,MAAM,OAAO,QAAQ,KACpE,KAAK,SAAS,KAAK,QAAQ,KAAK,UAAU,KAAK,KAAK;EAGzD,IAAI;EACJ,KAAK,IAAI,QAAQ,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS;GACtD,MAAM,MAAM,MAAM;GAClB,IAAI,KAAK,MAAM,IAAI,gBAAgB,KAAK,SAAS,IAAI,WAAW;IAAE,OAAO;IAAK;GAAO;EACvF;EACA,IAAI,CAAC,MAAM;GACT,MAAM,KAAK;IAAE,KAAK,KAAK;IAAK,QAAQ,KAAK;IAAQ,WAAW,KAAK;IAAK,cAAc,KAAK;IAAQ,OAAO,CAAC,IAAI;GAAE,CAAC;GAChH;EACF;EAGA,IAAI,CAAC,KAAK,MAAM,MAAK,aAAY,SAAS,UAAU,IAAI,CAAC,GAAG;GAC1D,KAAK,MAAM,KAAK,IAAI,KAAK,KAAK,KAAK,GAAG;GACtC,KAAK,SAAS,KAAK,IAAI,KAAK,QAAQ,KAAK,MAAM;GAC/C,KAAK,YAAY,KAAK,IAAI,KAAK,WAAW,KAAK,GAAG;GAClD,KAAK,eAAe,KAAK,IAAI,KAAK,cAAc,KAAK,MAAM;EAC7D;EACA,KAAK,MAAM,KAAK,IAAI;CACtB;CACA,OAAO;AACT;;AAGA,SAAS,SAAS,OAAgC,OAAyC;CACzF,OAAO,MAAM,QAAQ,MAAM,OAAO,OAAQ,MAAM,SAAS,MAAM,QAAQ,OAClE,MAAM,OAAO,MAAM,MAAM,OAAQ,MAAM,UAAU,MAAM,SAAS;AACvE"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["mapReferences","reference","reference","mapReferences","mapReferences","reference","mapReferences","reference","clamp"],"sources":["../src/components/button/variables/references.ts","../src/components/popover/variables/references.ts","../src/components/segmented/variables/references.ts","../src/components/toolbar/variables/references.ts","../src/components/tooltip/variables/references.ts","../src/color-palette/labels.ts","../src/color-palette/style.ts","../src/color-palette/palette.ts","../src/color-palette/conversion.ts","../src/color-palette/custom/style.ts","../src/color-palette/custom/elements.ts","../src/color-palette/custom/panel.ts","../src/theme/defaults.ts","../src/components/icon/review.ts","../src/selection-geometry/bands.ts","../src/drag-cursor/hold.ts"],"sourcesContent":["import { buttonCssVariableNames } from \"./names\";\n\n/** CSS-reference projection of every Button component token. */\nexport const buttonVariableReferences = Object.freeze({\n typography: mapReferences(buttonCssVariableNames.typography),\n size: Object.freeze({\n xs: mapReferences(buttonCssVariableNames.size.xs),\n sm: mapReferences(buttonCssVariableNames.size.sm),\n md: mapReferences(buttonCssVariableNames.size.md),\n lg: mapReferences(buttonCssVariableNames.size.lg),\n xl: mapReferences(buttonCssVariableNames.size.xl)\n }),\n color: Object.freeze({\n neutral: mapReferences(buttonCssVariableNames.color.neutral),\n primary: mapReferences(buttonCssVariableNames.color.primary),\n info: mapReferences(buttonCssVariableNames.color.info),\n success: mapReferences(buttonCssVariableNames.color.success),\n warning: mapReferences(buttonCssVariableNames.color.warning),\n danger: mapReferences(buttonCssVariableNames.color.danger)\n }),\n disabled: mapReferences(buttonCssVariableNames.disabled),\n borderWidth: reference(buttonCssVariableNames.borderWidth),\n focusColor: reference(buttonCssVariableNames.focusColor),\n hoverOpacity: reference(buttonCssVariableNames.hoverOpacity),\n pressedOpacity: reference(buttonCssVariableNames.pressedOpacity),\n feedbackDuration: reference(buttonCssVariableNames.feedbackDuration),\n feedbackEasing: reference(buttonCssVariableNames.feedbackEasing)\n});\n\n/**\n * Creates a CSS reference to an explicitly declared component variable.\n *\n * @param name - Declared CSS custom-property name.\n * @returns CSS variable reference.\n */\nfunction reference(name: string): string {\n return `var(${name})`;\n}\n\n/**\n * Projects one explicit component-variable group to CSS references.\n *\n * @param names - Approved variable names.\n * @returns Same-shaped CSS references.\n */\nfunction mapReferences<T extends Readonly<Record<string, string>>>(\n names: T\n): { readonly [Key in keyof T]: string } {\n return Object.freeze(\n Object.fromEntries(\n Object.entries(names).map(([key, name]) => [key, reference(name)])\n )\n ) as { readonly [Key in keyof T]: string };\n}\n","import { popoverCssVariableNames } from \"./names\";\n\n/** Popover 组件 token 的 CSS 引用投影。 */\nexport const popoverVariableReferences = Object.freeze({\n background: reference(popoverCssVariableNames.background),\n foreground: reference(popoverCssVariableNames.foreground),\n mutedForeground: reference(popoverCssVariableNames.mutedForeground),\n borderColor: reference(popoverCssVariableNames.borderColor),\n borderWidth: reference(popoverCssVariableNames.borderWidth),\n radius: reference(popoverCssVariableNames.radius),\n shadow: reference(popoverCssVariableNames.shadow),\n padding: reference(popoverCssVariableNames.padding),\n gap: reference(popoverCssVariableNames.gap),\n arrowSize: reference(popoverCssVariableNames.arrowSize),\n closeSize: reference(popoverCssVariableNames.closeSize),\n closeRadius: reference(popoverCssVariableNames.closeRadius),\n closeHoverBackground: reference(\n popoverCssVariableNames.closeHoverBackground\n ),\n closeForeground: reference(popoverCssVariableNames.closeForeground),\n focusColor: reference(popoverCssVariableNames.focusColor),\n fontFamily: reference(popoverCssVariableNames.fontFamily),\n title: mapReferences(popoverCssVariableNames.title),\n body: mapReferences(popoverCssVariableNames.body),\n motionDuration: reference(popoverCssVariableNames.motionDuration),\n enterEasing: reference(popoverCssVariableNames.enterEasing),\n exitEasing: reference(popoverCssVariableNames.exitEasing),\n layer: reference(popoverCssVariableNames.layer)\n});\n\n/**\n * 创建对一个显式组件变量的 CSS 引用。\n *\n * @param name - 已声明的 CSS 自定义属性名。\n * @returns CSS 变量引用。\n */\nfunction reference(name: string): string {\n return `var(${name})`;\n}\n\n/**\n * 将一个显式变量名分组投影为同形状的 CSS 引用。\n *\n * @param names - 已批准的 CSS 变量名分组。\n * @returns 同形状的 CSS 引用分组。\n */\nfunction mapReferences<T extends Readonly<Record<string, string>>>(\n names: T\n): { readonly [Key in keyof T]: string } {\n return Object.freeze(\n Object.fromEntries(\n Object.entries(names).map(([key, name]) => [key, reference(name)])\n )\n ) as { readonly [Key in keyof T]: string };\n}\n","import { segmentedCssVariableNames } from \"./names\";\n\n/** Segmented Control 全部组件 token 的 CSS 引用投影。 */\nexport const segmentedVariableReferences = Object.freeze({\n typography: mapReferences(segmentedCssVariableNames.typography),\n size: Object.freeze({\n xs: mapReferences(segmentedCssVariableNames.size.xs),\n sm: mapReferences(segmentedCssVariableNames.size.sm),\n md: mapReferences(segmentedCssVariableNames.size.md),\n lg: mapReferences(segmentedCssVariableNames.size.lg),\n xl: mapReferences(segmentedCssVariableNames.size.xl)\n }),\n trackInset: reference(segmentedCssVariableNames.trackInset),\n trackRadius: reference(segmentedCssVariableNames.trackRadius),\n indicatorRadius: reference(segmentedCssVariableNames.indicatorRadius),\n trackBackground: reference(segmentedCssVariableNames.trackBackground),\n foreground: reference(segmentedCssVariableNames.foreground),\n hoverForeground: reference(segmentedCssVariableNames.hoverForeground),\n hoverBackground: reference(segmentedCssVariableNames.hoverBackground),\n selectedForeground: reference(segmentedCssVariableNames.selectedForeground),\n selectedBackground: reference(segmentedCssVariableNames.selectedBackground),\n disabledForeground: reference(segmentedCssVariableNames.disabledForeground),\n focusColor: reference(segmentedCssVariableNames.focusColor),\n transitionDuration: reference(segmentedCssVariableNames.transitionDuration),\n transitionEasing: reference(segmentedCssVariableNames.transitionEasing)\n});\n\n/**\n * 创建一个已显式声明组件变量的 CSS 引用。\n *\n * @param name - 已声明的 CSS 自定义属性名。\n * @returns CSS 变量引用。\n */\nfunction reference(name: string): string {\n return `var(${name})`;\n}\n\n/**\n * 把显式变量名组投影为相同结构的 CSS 引用。\n *\n * @param names - 已批准的变量名组。\n * @returns 与输入同结构的 CSS 引用。\n */\nfunction mapReferences<T extends Readonly<Record<string, string>>>(\n names: T\n): { readonly [Key in keyof T]: string } {\n return Object.freeze(\n Object.fromEntries(\n Object.entries(names).map(([key, name]) => [key, reference(name)])\n )\n ) as { readonly [Key in keyof T]: string };\n}\n","import { toolbarCssVariableNames } from \"./names\";\n\n/** CSS-reference projection of every Toolbar component token. */\nexport const toolbarVariableReferences = Object.freeze({\n typography: mapReferences(toolbarCssVariableNames.typography),\n geometry: mapReferences(toolbarCssVariableNames.geometry),\n color: mapReferences(toolbarCssVariableNames.color),\n feedbackDuration: reference(toolbarCssVariableNames.feedbackDuration),\n feedbackEasing: reference(toolbarCssVariableNames.feedbackEasing)\n});\n\n/**\n * Creates a CSS reference to an explicitly declared component variable.\n *\n * @param name - Declared CSS custom-property name.\n * @returns CSS variable reference.\n */\nfunction reference(name: string): string {\n return `var(${name})`;\n}\n\n/**\n * Projects a variable-name group to same-shaped CSS references.\n *\n * @param names - Approved Toolbar variable-name group.\n * @returns Same-shaped CSS references.\n */\nfunction mapReferences<T extends Readonly<Record<string, string>>>(\n names: T\n): { readonly [Key in keyof T]: string } {\n return Object.freeze(\n Object.fromEntries(\n Object.entries(names).map(([key, name]) => [key, reference(name)])\n )\n ) as { readonly [Key in keyof T]: string };\n}\n","import { tooltipCssVariableNames } from \"./names\";\n\n/** Tooltip 组件 token 的 CSS 引用投影。 */\nexport const tooltipVariableReferences = Object.freeze({\n background: reference(tooltipCssVariableNames.background),\n foreground: reference(tooltipCssVariableNames.foreground),\n borderColor: reference(tooltipCssVariableNames.borderColor),\n borderWidth: reference(tooltipCssVariableNames.borderWidth),\n radius: reference(tooltipCssVariableNames.radius),\n shadow: reference(tooltipCssVariableNames.shadow),\n paddingBlock: reference(tooltipCssVariableNames.paddingBlock),\n paddingInline: reference(tooltipCssVariableNames.paddingInline),\n gap: reference(tooltipCssVariableNames.gap),\n arrowSize: reference(tooltipCssVariableNames.arrowSize),\n typography: mapReferences(tooltipCssVariableNames.typography),\n motionDuration: reference(tooltipCssVariableNames.motionDuration),\n enterEasing: reference(tooltipCssVariableNames.enterEasing),\n exitEasing: reference(tooltipCssVariableNames.exitEasing),\n layer: reference(tooltipCssVariableNames.layer)\n});\n\n/**\n * 创建对一个显式组件变量的 CSS 引用。\n *\n * @param name - 已声明的 CSS 自定义属性名。\n * @returns CSS 变量引用。\n */\nfunction reference(name: string): string {\n return `var(${name})`;\n}\n\n/**\n * 将一个显式变量名分组投影为同形状的 CSS 引用。\n *\n * @param names - 已批准的 CSS 变量名分组。\n * @returns 同形状的 CSS 引用分组。\n */\nfunction mapReferences<T extends Readonly<Record<string, string>>>(\n names: T\n): { readonly [Key in keyof T]: string } {\n return Object.freeze(\n Object.fromEntries(\n Object.entries(names).map(([key, name]) => [key, reference(name)])\n )\n ) as { readonly [Key in keyof T]: string };\n}\n","import type { Messages as QuireColorPickerMessages } from \"../locale/components/color-picker\";\nimport { quireKitDefaultLocale } from \"../locale/resolve\";\nimport type { QuireColorPaletteLabels } from \"./types\";\n\n/**\n * Completes palette copy from the active language; host-supplied labels name this palette's purpose.\n *\n * @param labels - Host-supplied labels, such as \"Shape fill\" or \"No fill\".\n * @param messages - ColorPicker text of the active language; defaults to Chinese.\n * @returns Complete palette copy.\n */\nexport function resolveQuireColorPaletteLabels(\n labels: Partial<QuireColorPaletteLabels> | undefined,\n messages: QuireColorPickerMessages = quireKitDefaultLocale.messages.colorPicker\n): QuireColorPaletteLabels {\n return {\n label: labels?.label ?? messages.documentPalette,\n defaultColor: labels?.defaultColor ?? messages.defaultColor,\n moreColors: labels?.moreColors ?? messages.more,\n recentColors: labels?.recentColors ?? messages.recent\n };\n}\n\n/**\n * Resolves the accessible name of the custom-color surface.\n *\n * @param label - Host-supplied name, if any.\n * @param messages - ColorPicker text of the active language; defaults to Chinese.\n * @returns Accessible name for the surface.\n */\nexport function resolveQuireCustomColorPanelLabel(\n label: string | undefined,\n messages: QuireColorPickerMessages = quireKitDefaultLocale.messages.colorPicker\n): string {\n return label ?? messages.more;\n}\n","/**\n * Applies the shared palette root presentation.\n *\n * @param root - Palette root receiving framework-neutral styles.\n */\nexport function styleColorPaletteRoot(root: HTMLElement): void {\n root.style.boxSizing = \"border-box\";\n root.style.width = \"258px\";\n root.style.padding = \"12px 0 0\";\n root.style.color = \"#252b36\";\n root.style.background = \"#ffffff\";\n root.style.font = \"12px/1.4 system-ui, sans-serif\";\n}\n\n/**\n * Applies a full-width palette action row.\n *\n * @param button - Default or more-colors action.\n * @param divided - Whether a top divider separates this action.\n */\nexport function styleColorPaletteAction(\n button: HTMLButtonElement,\n divided: boolean\n): void {\n button.style.boxSizing = \"border-box\";\n button.style.width = divided ? \"100%\" : \"calc(100% - 24px)\";\n button.style.height = divided ? \"40px\" : \"30px\";\n button.style.margin = divided ? \"12px 0 0\" : \"0 12px\";\n button.style.padding = divided ? \"0 12px\" : \"0\";\n button.style.border = \"0\";\n button.style.borderTop = divided ? \"1px solid #eceef2\" : \"0\";\n button.style.borderRadius = \"0\";\n button.style.background = \"transparent\";\n button.style.color = \"#252b36\";\n button.style.display = \"flex\";\n button.style.alignItems = \"center\";\n button.style.gap = \"8px\";\n button.style.font = \"inherit\";\n button.style.cursor = \"pointer\";\n}\n\n/**\n * Applies the fixed ten-column document-color grid.\n *\n * @param grid - Preset-color grid receiving its shared layout.\n */\nexport function styleColorPaletteGrid(grid: HTMLElement): void {\n grid.style.display = \"grid\";\n grid.style.gridTemplateColumns = \"repeat(10, 18px)\";\n grid.style.gap = \"6px\";\n grid.style.margin = \"8px 12px 0\";\n}\n\n/**\n * Applies one document-color chip and its selected state.\n *\n * @param button - Color button.\n * @param color - Canonical visible color.\n * @param selected - Whether this chip is current.\n */\nexport function styleColorPaletteChip(\n button: HTMLButtonElement,\n color: string,\n selected: boolean\n): void {\n button.style.position = \"relative\";\n button.style.boxSizing = \"border-box\";\n button.style.width = \"18px\";\n button.style.height = \"18px\";\n button.style.padding = \"0\";\n button.style.border = selected\n ? \"2px solid #2563eb\"\n : \"1px solid rgba(22, 28, 38, 0.12)\";\n button.style.borderRadius = \"2px\";\n button.style.background = color;\n button.style.boxShadow = selected ? \"0 0 0 1px #ffffff inset\" : \"none\";\n button.style.cursor = \"pointer\";\n}\n\n/**\n * Applies a reset-state chip, including explicit no-color presentation.\n *\n * @param chip - Reset indicator receiving its current paint.\n * @param color - Default color, or null for crossed no paint.\n */\nexport function styleColorPaletteDefaultChip(\n chip: HTMLElement,\n color: string | null\n): void {\n chip.style.width = \"18px\";\n chip.style.height = \"18px\";\n chip.style.flex = \"0 0 18px\";\n chip.style.border = \"1px solid rgba(22, 28, 38, 0.12)\";\n chip.style.borderRadius = \"2px\";\n chip.style.background = color === null\n ? \"linear-gradient(135deg, transparent 46%, #d92d20 47% 53%, transparent 54%), #ffffff\"\n : color;\n}\n\n/**\n * Applies the recent-color section label.\n *\n * @param label - Recent-colors heading receiving shared typography.\n */\nexport function styleColorPaletteSectionLabel(label: HTMLElement): void {\n label.style.margin = \"13px 12px 6px\";\n label.style.color = \"#6d7685\";\n}\n\n/**\n * Applies the recent-color row.\n *\n * @param row - Recent-colors row receiving shared layout.\n */\nexport function styleColorPaletteRecentRow(row: HTMLElement): void {\n row.style.display = \"flex\";\n row.style.gap = \"6px\";\n row.style.margin = \"0 12px\";\n}\n\n/**\n * Applies the circular color-spectrum glyph.\n *\n * @param wheel - Decorative spectrum element receiving shared paint.\n */\nexport function styleColorWheel(wheel: HTMLElement): void {\n wheel.style.width = \"18px\";\n wheel.style.height = \"18px\";\n wheel.style.flex = \"0 0 18px\";\n wheel.style.background =\n \"conic-gradient(#e53935, #facc15, #22c55e, #06b6d4, #2563eb, #9333ea, #e53935)\";\n wheel.style.borderRadius = \"50%\";\n}\n","import { resolveQuireColorPaletteLabels } from \"./labels\";\nimport { quireDocumentColorRows } from \"./presets\";\nimport {\n styleColorPaletteAction,\n styleColorPaletteChip,\n styleColorPaletteDefaultChip,\n styleColorPaletteGrid,\n styleColorPaletteRecentRow,\n styleColorPaletteRoot,\n styleColorPaletteSectionLabel,\n styleColorWheel\n} from \"./style\";\nimport type {\n CreateQuireColorPaletteOptions,\n QuireColorPaletteController,\n QuireColorPaletteLabels,\n QuireColorPaletteState\n} from \"./types\";\n\n/** Controlled state with complete copy, as rendered by the palette helpers. */\ninterface ResolvedPaletteState extends QuireColorPaletteState {\n /** Complete copy resolved from host labels and the active language. */\n readonly labels: QuireColorPaletteLabels;\n}\n\n/**\n * @param state - Controlled presentation state.\n * @returns The state with complete copy.\n */\nfunction resolveState(state: QuireColorPaletteState): ResolvedPaletteState {\n return { ...state, labels: resolveQuireColorPaletteLabels(state.labels, state.messages) };\n}\n\n/**\n * Creates one controlled, framework-neutral document color palette.\n *\n * @param options - Initial state, localized copy, and semantic callbacks.\n * @returns Mounted palette element plus update and teardown lifecycle.\n */\nexport function createQuireColorPalette(\n options: CreateQuireColorPaletteOptions\n): QuireColorPaletteController {\n const root = options.ownerDocument.createElement(\"div\");\n let state = resolveState(options);\n let destroyed = false;\n root.dataset.qkColorPalette = \"true\";\n root.setAttribute(\"role\", \"group\");\n styleColorPaletteRoot(root);\n\n /** Rebuilds descendants from complete controlled state. */\n const render = (): void => {\n root.replaceChildren();\n root.setAttribute(\"aria-label\", state.labels.label);\n root.append(createResetAction(options, state));\n const grid = options.ownerDocument.createElement(\"div\");\n grid.dataset.qkColorGrid = \"true\";\n styleColorPaletteGrid(grid);\n for (const row of quireDocumentColorRows) {\n for (const color of row) {\n grid.append(createColorButton(options, state, color));\n }\n }\n root.append(grid);\n if (state.recentColors.length > 0) {\n root.append(createRecentSection(options, state));\n }\n if (options.onMoreColors !== undefined) {\n root.append(createMoreColorsAction(options, state));\n }\n };\n\n render();\n return {\n element: root,\n update(nextState): void {\n if (destroyed) {\n return;\n }\n state = resolveState(nextState);\n render();\n },\n destroy(): void {\n if (destroyed) {\n return;\n }\n destroyed = true;\n root.remove();\n }\n };\n}\n\n/**\n * Creates the consumer-defined reset or no-paint action.\n *\n * @param options - Palette callbacks and owner document.\n * @param state - Current controlled presentation.\n * @returns Reset action row.\n */\nfunction createResetAction(\n options: CreateQuireColorPaletteOptions,\n state: ResolvedPaletteState\n): HTMLButtonElement {\n const button = options.ownerDocument.createElement(\"button\");\n button.type = \"button\";\n button.dataset.qkColorDefault = \"true\";\n button.setAttribute(\"aria-label\", state.labels.defaultColor);\n styleColorPaletteAction(button, false);\n const chip = options.ownerDocument.createElement(\"span\");\n chip.setAttribute(\"aria-hidden\", \"true\");\n styleColorPaletteDefaultChip(chip, state.defaultColor);\n button.append(chip, state.labels.defaultColor);\n button.addEventListener(\"pointerdown\", preserveEditorFocus);\n button.addEventListener(\"click\", options.onReset);\n return button;\n}\n\n/**\n * Creates one preset or recent controlled color button.\n *\n * @param options - Palette callbacks and owner document.\n * @param state - Current controlled presentation.\n * @param color - Canonical color represented by the button.\n * @returns Accessible color control.\n */\nfunction createColorButton(\n options: CreateQuireColorPaletteOptions,\n state: ResolvedPaletteState,\n color: string\n): HTMLButtonElement {\n const button = options.ownerDocument.createElement(\"button\");\n const selected = state.value?.toUpperCase() === color.toUpperCase();\n button.type = \"button\";\n button.dataset.qkColorValue = color;\n button.setAttribute(\"aria-label\", `${state.labels.label} ${color}`);\n button.setAttribute(\"aria-pressed\", String(selected));\n styleColorPaletteChip(button, color, selected);\n button.addEventListener(\"pointerenter\", () => {\n button.style.border = \"2px solid rgba(37, 99, 235, 0.5)\";\n });\n button.addEventListener(\"pointerleave\", () => {\n button.style.border = selected\n ? \"2px solid #2563eb\"\n : \"1px solid rgba(22, 28, 38, 0.12)\";\n });\n button.addEventListener(\"pointerdown\", preserveEditorFocus);\n button.addEventListener(\"click\", () => options.onSelect(color));\n return button;\n}\n\n/**\n * Creates the optional recent-colors heading and row.\n *\n * @param options - Palette callbacks and owner document.\n * @param state - Current controlled presentation.\n * @returns Recent-color section.\n */\nfunction createRecentSection(\n options: CreateQuireColorPaletteOptions,\n state: ResolvedPaletteState\n): DocumentFragment {\n const fragment = options.ownerDocument.createDocumentFragment();\n const label = options.ownerDocument.createElement(\"p\");\n label.textContent = state.labels.recentColors;\n styleColorPaletteSectionLabel(label);\n fragment.append(label);\n const row = options.ownerDocument.createElement(\"div\");\n row.dataset.qkRecentColors = \"true\";\n styleColorPaletteRecentRow(row);\n for (const color of state.recentColors) {\n row.append(createColorButton(options, state, color));\n }\n fragment.append(row);\n return fragment;\n}\n\n/**\n * Creates the optional consumer-owned custom-color entry.\n *\n * @param options - Palette callbacks and owner document.\n * @param state - Current controlled presentation.\n * @returns More-colors action row.\n */\nfunction createMoreColorsAction(\n options: CreateQuireColorPaletteOptions,\n state: ResolvedPaletteState\n): HTMLButtonElement {\n const button = options.ownerDocument.createElement(\"button\");\n button.type = \"button\";\n button.dataset.qkColorMore = \"true\";\n styleColorPaletteAction(button, true);\n const wheel = options.ownerDocument.createElement(\"span\");\n wheel.setAttribute(\"aria-hidden\", \"true\");\n styleColorWheel(wheel);\n const arrow = options.ownerDocument.createElement(\"span\");\n arrow.setAttribute(\"aria-hidden\", \"true\");\n arrow.style.marginLeft = \"auto\";\n arrow.style.color = \"#87909f\";\n arrow.style.fontSize = \"20px\";\n arrow.textContent = \"›\";\n button.append(wheel, state.labels.moreColors, arrow);\n button.addEventListener(\"pointerdown\", preserveEditorFocus);\n button.addEventListener(\"click\", () => options.onMoreColors?.());\n return button;\n}\n\n/**\n * Keeps a document-editor selection authoritative while a palette control is used.\n *\n * @param event - Pointer transition targeting a palette control.\n */\nfunction preserveEditorFocus(event: PointerEvent): void {\n event.preventDefault();\n}\n","import type { HsvColor, RgbColor } from \"./types\";\n\n/**\n * Keeps a numeric channel inside its supported value space.\n *\n * @param value - Candidate channel value.\n * @param minimum - Inclusive lower bound.\n * @param maximum - Inclusive upper bound.\n * @returns Clamped channel value.\n */\nfunction clamp(value: number, minimum: number, maximum: number): number {\n return Math.min(maximum, Math.max(minimum, value));\n}\n\n/**\n * Converts one canonical hexadecimal color into RGB channels.\n *\n * @param color - Six-digit hexadecimal color with a leading hash.\n * @returns Parsed RGB channels.\n */\nexport function hexToRgb(color: string): RgbColor {\n const value = color.slice(1);\n return {\n red: Number.parseInt(value.slice(0, 2), 16),\n green: Number.parseInt(value.slice(2, 4), 16),\n blue: Number.parseInt(value.slice(4, 6), 16)\n };\n}\n\n/**\n * Converts RGB channels into one canonical uppercase hexadecimal color.\n *\n * @param color - RGB channels to serialize.\n * @returns Six-digit hexadecimal color with a leading hash.\n */\nexport function rgbToHex(color: RgbColor): string {\n /**\n * Serializes one clamped integer channel.\n *\n * @param value - Candidate RGB channel.\n * @returns Two-digit hexadecimal channel.\n */\n const channel = (value: number): string => (\n Math.round(clamp(value, 0, 255)).toString(16).padStart(2, \"0\")\n );\n return `#${channel(color.red)}${channel(color.green)}${channel(color.blue)}`\n .toUpperCase();\n}\n\n/**\n * Converts RGB channels into the HSV editing value space.\n *\n * @param color - RGB channels to convert.\n * @returns Equivalent HSV channels.\n */\nexport function rgbToHsv(color: RgbColor): HsvColor {\n const red = clamp(color.red, 0, 255) / 255;\n const green = clamp(color.green, 0, 255) / 255;\n const blue = clamp(color.blue, 0, 255) / 255;\n const maximum = Math.max(red, green, blue);\n const minimum = Math.min(red, green, blue);\n const delta = maximum - minimum;\n let hue = 0;\n if (delta > 0) {\n if (maximum === red) hue = 60 * (((green - blue) / delta) % 6);\n else if (maximum === green) hue = 60 * ((blue - red) / delta + 2);\n else hue = 60 * ((red - green) / delta + 4);\n }\n return {\n hue: hue < 0 ? hue + 360 : hue,\n saturation: maximum === 0 ? 0 : (delta / maximum) * 100,\n value: maximum * 100\n };\n}\n\n/**\n * Converts HSV editing channels into RGB channels.\n *\n * @param color - HSV channels to convert.\n * @returns Equivalent RGB channels.\n */\nexport function hsvToRgb(color: HsvColor): RgbColor {\n const hue = ((color.hue % 360) + 360) % 360;\n const saturation = clamp(color.saturation, 0, 100) / 100;\n const value = clamp(color.value, 0, 100) / 100;\n const chroma = value * saturation;\n const segment = hue / 60;\n const intermediate = chroma * (1 - Math.abs((segment % 2) - 1));\n const offset = value - chroma;\n const [red, green, blue] = (\n segment < 1 ? [chroma, intermediate, 0]\n : segment < 2 ? [intermediate, chroma, 0]\n : segment < 3 ? [0, chroma, intermediate]\n : segment < 4 ? [0, intermediate, chroma]\n : segment < 5 ? [intermediate, 0, chroma]\n : [chroma, 0, intermediate]\n );\n return {\n red: (red + offset) * 255,\n green: (green + offset) * 255,\n blue: (blue + offset) * 255\n };\n}\n\n/**\n * Normalizes user-entered hexadecimal text without silently changing invalid colors.\n *\n * @param value - Candidate hexadecimal text, with or without a leading hash.\n * @returns Canonical color, or undefined when the input is incomplete.\n */\nexport function normalizeHexColor(value: string): string | undefined {\n const normalized = value.trim().replace(/^#/u, \"\");\n if (!/^[0-9A-F]{6}$/iu.test(normalized)) return undefined;\n return `#${normalized.toUpperCase()}`;\n}\n","/**\n * Applies the shared custom-color panel presentation.\n *\n * @param panel - Custom-color root receiving framework-neutral styles.\n */\nexport function styleCustomColorPanel(panel: HTMLElement): void {\n panel.style.boxSizing = \"border-box\";\n panel.style.width = \"260px\";\n panel.style.padding = \"12px\";\n panel.style.color = \"#252b36\";\n panel.style.background = \"#ffffff\";\n panel.style.border = \"1px solid #e2e5eb\";\n panel.style.borderRadius = \"8px\";\n panel.style.boxShadow = \"0 10px 28px rgba(26, 35, 52, 0.18)\";\n panel.style.font = \"12px/1.4 system-ui, sans-serif\";\n}\n\n/**\n * Applies the saturation/value editing plane presentation.\n *\n * @param plane - Pointer-editable color plane.\n */\nexport function styleCustomColorPlane(plane: HTMLElement): void {\n plane.style.position = \"relative\";\n plane.style.height = \"146px\";\n plane.style.overflow = \"hidden\";\n plane.style.cursor = \"crosshair\";\n plane.style.backgroundImage = [\n \"linear-gradient(to top, #000, transparent)\",\n \"linear-gradient(to right, #fff, transparent)\"\n ].join(\", \");\n plane.style.borderRadius = \"4px\";\n plane.style.touchAction = \"none\";\n plane.style.userSelect = \"none\";\n}\n\n/**\n * Applies the current saturation/value cursor presentation.\n *\n * @param cursor - Decorative position indicator.\n */\nexport function styleCustomColorCursor(cursor: HTMLElement): void {\n cursor.style.position = \"absolute\";\n cursor.style.width = \"12px\";\n cursor.style.height = \"12px\";\n cursor.style.border = \"2px solid #ffffff\";\n cursor.style.borderRadius = \"50%\";\n cursor.style.boxShadow = \"0 0 0 1px rgba(22, 28, 38, 0.35)\";\n cursor.style.transform = \"translate(-50%, -50%)\";\n cursor.style.pointerEvents = \"none\";\n}\n\n/**\n * Applies the hue and preview row layout.\n *\n * @param row - Row containing hue input and current-color preview.\n */\nexport function styleCustomColorSliderRow(row: HTMLElement): void {\n row.style.display = \"flex\";\n row.style.alignItems = \"center\";\n row.style.gap = \"12px\";\n row.style.marginTop = \"11px\";\n}\n\n/**\n * Applies the native hue range presentation.\n *\n * @param input - Hue range input.\n */\nexport function styleCustomColorHue(input: HTMLInputElement): void {\n input.style.width = \"100%\";\n input.style.height = \"12px\";\n input.style.margin = \"0\";\n input.style.background = [\n \"linear-gradient(90deg, #f00, #ff0 17%, #0f0 33%,\",\n \"#0ff 50%, #00f 67%, #f0f 83%, #f00)\"\n ].join(\" \");\n input.style.borderRadius = \"6px\";\n input.style.outline = \"0\";\n input.style.cursor = \"pointer\";\n input.style.accentColor = \"#ffffff\";\n input.style.setProperty(\"appearance\", \"none\");\n}\n\n/**\n * Applies the current-color preview chip.\n *\n * @param preview - Decorative solid-color preview.\n */\nexport function styleCustomColorPreview(preview: HTMLElement): void {\n preview.style.width = \"30px\";\n preview.style.height = \"30px\";\n preview.style.flex = \"0 0 30px\";\n preview.style.border = \"1px solid rgba(22, 28, 38, 0.12)\";\n preview.style.borderRadius = \"8px\";\n preview.style.boxShadow = \"0 2px 6px rgba(22, 28, 38, 0.12)\";\n}\n\n/**\n * Applies the hexadecimal and RGB field row.\n *\n * @param row - Row receiving four labelled inputs.\n */\nexport function styleCustomColorInputRow(row: HTMLElement): void {\n row.style.display = \"grid\";\n row.style.gridTemplateColumns = \"72px repeat(3, 1fr)\";\n row.style.alignItems = \"start\";\n row.style.gap = \"7px\";\n row.style.marginTop = \"12px\";\n}\n\n/**\n * Applies one channel field layout.\n *\n * @param label - Label wrapping an input and channel name.\n */\nexport function styleCustomColorField(label: HTMLLabelElement): void {\n label.style.display = \"grid\";\n label.style.minWidth = \"0\";\n label.style.justifyItems = \"center\";\n label.style.gap = \"4px\";\n label.style.color = \"#7b8290\";\n}\n\n/**\n * Applies one compact custom-color channel input.\n *\n * @param input - Hexadecimal or numeric channel input.\n */\nexport function styleCustomColorInput(input: HTMLInputElement): void {\n input.style.boxSizing = \"border-box\";\n input.style.width = \"100%\";\n input.style.height = \"28px\";\n input.style.padding = \"0 4px\";\n input.style.color = \"#252b36\";\n input.style.background = \"#ffffff\";\n input.style.border = \"1px solid #d7dce4\";\n input.style.borderRadius = \"5px\";\n input.style.outline = \"0\";\n input.style.font = \"12px/1 system-ui, sans-serif\";\n input.style.textAlign = \"center\";\n}\n","import {\n styleCustomColorCursor,\n styleCustomColorField,\n styleCustomColorHue,\n styleCustomColorInput,\n styleCustomColorInputRow,\n styleCustomColorPanel,\n styleCustomColorPlane,\n styleCustomColorPreview,\n styleCustomColorSliderRow\n} from \"./style\";\n\n/**\n * Creates and styles the stable custom-color DOM.\n *\n * @param ownerDocument - Document creating the editing surface.\n * @returns Complete element references used by controlled updates.\n */\nexport function createCustomColorPanelElements(ownerDocument: Document) {\n const root = ownerDocument.createElement(\"div\");\n root.dataset.qkCustomColorPanel = \"true\";\n root.setAttribute(\"role\", \"group\");\n styleCustomColorPanel(root);\n const plane = ownerDocument.createElement(\"div\");\n plane.dataset.qkCustomColorPlane = \"true\";\n styleCustomColorPlane(plane);\n const cursor = ownerDocument.createElement(\"span\");\n cursor.setAttribute(\"aria-hidden\", \"true\");\n styleCustomColorCursor(cursor);\n plane.append(cursor);\n const sliderRow = ownerDocument.createElement(\"div\");\n styleCustomColorSliderRow(sliderRow);\n const hue = ownerDocument.createElement(\"input\");\n hue.type = \"range\";\n hue.min = \"0\";\n hue.max = \"360\";\n hue.dataset.qkCustomColorHue = \"true\";\n styleCustomColorHue(hue);\n const preview = ownerDocument.createElement(\"span\");\n preview.setAttribute(\"aria-hidden\", \"true\");\n styleCustomColorPreview(preview);\n sliderRow.append(hue, preview);\n const fields = ownerDocument.createElement(\"div\");\n styleCustomColorInputRow(fields);\n const hex = createInput(ownerDocument, \"hex\", \"text\", \"HEX\", fields);\n hex.maxLength = 6;\n const red = createInput(ownerDocument, \"red\", \"number\", \"R\", fields);\n const green = createInput(ownerDocument, \"green\", \"number\", \"G\", fields);\n const blue = createInput(ownerDocument, \"blue\", \"number\", \"B\", fields);\n for (const input of [red, green, blue]) {\n input.min = \"0\";\n input.max = \"255\";\n }\n root.append(plane, sliderRow, fields);\n return {\n root,\n plane,\n cursor,\n hue,\n preview,\n hex,\n red,\n green,\n blue,\n channels: [[hex, \"HEX\"], [red, \"R\"], [green, \"G\"], [blue, \"B\"]] as const\n };\n}\n\n/**\n * Creates one labelled hexadecimal or RGB input.\n *\n * @param ownerDocument - Document creating the input.\n * @param name - Stable dataset suffix.\n * @param type - Native input type.\n * @param channel - Visible channel label.\n * @param parent - Field row receiving the label.\n * @returns Created native input.\n */\nfunction createInput(\n ownerDocument: Document,\n name: \"hex\" | \"red\" | \"green\" | \"blue\",\n type: \"text\" | \"number\",\n channel: string,\n parent: HTMLElement\n): HTMLInputElement {\n const label = ownerDocument.createElement(\"label\");\n styleCustomColorField(label);\n const input = ownerDocument.createElement(\"input\");\n input.type = type;\n input.placeholder = name === \"hex\" ? \"#RRGGBB\" : \"0–255\";\n input.dataset[`qkCustomColor${name[0]?.toUpperCase()}${name.slice(1)}`] = \"true\";\n styleCustomColorInput(input);\n label.append(input, channel);\n parent.append(label);\n return input;\n}\n","import {\n hexToRgb,\n hsvToRgb,\n normalizeHexColor,\n rgbToHex,\n rgbToHsv\n} from \"../conversion\";\nimport { resolveQuireCustomColorPanelLabel } from \"../labels\";\nimport { createCustomColorPanelElements } from \"./elements\";\nimport type {\n CreateQuireCustomColorPanelOptions,\n QuireCustomColorPanelController,\n QuireCustomColorPanelState,\n RgbColor\n} from \"../types\";\n\n/**\n * Creates one controlled, framework-neutral custom-color editing surface.\n *\n * @param options - Initial color, accessible copy, and semantic callback.\n * @returns Mounted editor element plus update and teardown lifecycle.\n */\nexport function createQuireCustomColorPanel(\n options: CreateQuireCustomColorPanelOptions\n): QuireCustomColorPanelController {\n const elements = createCustomColorPanelElements(options.ownerDocument);\n let color = normalizeHexColor(options.value) ?? \"#000000\";\n let hsv = rgbToHsv(hexToRgb(color));\n let label = resolveQuireCustomColorPanelLabel(options.label, options.messages);\n let destroyed = false;\n\n /** Projects current color state into every editable control. */\n const render = (): void => {\n const rgb = hexToRgb(color);\n const hueColor = rgbToHex(hsvToRgb({\n hue: hsv.hue,\n saturation: 100,\n value: 100\n }));\n elements.root.setAttribute(\"aria-label\", label);\n elements.plane.style.backgroundColor = hueColor;\n elements.cursor.style.left = `${hsv.saturation}%`;\n elements.cursor.style.top = `${100 - hsv.value}%`;\n elements.hue.value = String(hsv.hue);\n elements.preview.style.backgroundColor = color;\n elements.hex.value = color.slice(1);\n elements.red.value = String(Math.round(rgb.red));\n elements.green.value = String(Math.round(rgb.green));\n elements.blue.value = String(Math.round(rgb.blue));\n for (const [input, channel] of elements.channels) {\n input.setAttribute(\"aria-label\", `${label} ${channel}`);\n }\n };\n\n /**\n * Commits one canonical color through the consumer callback.\n *\n * @param nextColor - Canonical color to project and emit.\n */\n const commit = (nextColor: string): void => {\n color = nextColor;\n hsv = rgbToHsv(hexToRgb(color));\n render();\n options.onChange(color);\n };\n\n /** Commits a complete hexadecimal input or restores the canonical value. */\n const commitHex = (): void => {\n const normalized = normalizeHexColor(elements.hex.value);\n if (normalized === undefined) {\n render();\n return;\n }\n commit(normalized);\n };\n\n /**\n * Commits one changed RGB input.\n *\n * @param channel - RGB channel owned by the changed input.\n * @param input - Numeric field supplying the next channel value.\n */\n const commitRgb = (channel: keyof RgbColor, input: HTMLInputElement): void => {\n const value = Number(input.value);\n if (!Number.isFinite(value)) {\n render();\n return;\n }\n commit(rgbToHex({\n ...hexToRgb(color),\n [channel]: value\n }));\n };\n\n /**\n * Projects a plane pointer into saturation and value.\n *\n * @param event - Pointer event inside the saturation/value plane.\n */\n const updatePlane = (event: PointerEvent): void => {\n const bounds = elements.plane.getBoundingClientRect();\n if (bounds.width <= 0 || bounds.height <= 0) {\n return;\n }\n hsv = {\n ...hsv,\n saturation: clamp(((event.clientX - bounds.left) / bounds.width) * 100),\n value: 100 - clamp(((event.clientY - bounds.top) / bounds.height) * 100)\n };\n color = rgbToHex(hsvToRgb(hsv));\n render();\n };\n\n elements.plane.addEventListener(\"pointerdown\", (event) => {\n elements.plane.setPointerCapture?.(event.pointerId);\n updatePlane(event);\n });\n elements.plane.addEventListener(\"pointermove\", (event) => {\n if (event.buttons !== 0) updatePlane(event);\n });\n elements.plane.addEventListener(\"pointerup\", (event) => {\n updatePlane(event);\n commit(color);\n });\n elements.hue.addEventListener(\"input\", () => {\n hsv = { ...hsv, hue: Number(elements.hue.value) };\n commit(rgbToHex(hsvToRgb(hsv)));\n });\n elements.hex.addEventListener(\"change\", commitHex);\n elements.hex.addEventListener(\"keydown\", (event) => {\n if (event.key === \"Enter\") {\n event.preventDefault();\n commitHex();\n }\n });\n elements.red.addEventListener(\"change\", () => commitRgb(\"red\", elements.red));\n elements.green.addEventListener(\"change\", () => commitRgb(\"green\", elements.green));\n elements.blue.addEventListener(\"change\", () => commitRgb(\"blue\", elements.blue));\n render();\n\n return {\n element: elements.root,\n update(state: QuireCustomColorPanelState): void {\n if (destroyed) return;\n color = normalizeHexColor(state.value) ?? color;\n hsv = rgbToHsv(hexToRgb(color));\n label = resolveQuireCustomColorPanelLabel(state.label, state.messages);\n render();\n },\n destroy(): void {\n if (destroyed) return;\n destroyed = true;\n elements.root.remove();\n }\n };\n}\n\n/**\n * Keeps one percentage inside the custom-color editing value space.\n *\n * @param value - Candidate percentage.\n * @returns Clamped percentage.\n */\nfunction clamp(value: number): number {\n return Math.min(100, Math.max(0, value));\n}\n","import { createTheme } from \"./create\";\n\n/** Shared immutable theme for consumers without an explicit theme. */\nexport const defaultTheme = createTheme();\n\n/** DOM-independent semantic colors shared by default DOM, Canvas and SVG consumers. */\nexport const defaultThemeColors = defaultTheme.color;\n","import { quireKitEditorLucideIconSvg } from \"./lucide\";\nimport { formattingIconSvg } from \"./custom/formatting\";\n\n/** Compatibility export of the shared review family; no independently maintained artwork. */\nexport const quireKitReviewIconSvg = Object.freeze({\n commentPrevious: quireKitEditorLucideIconSvg.commentPrevious,\n commentNext: quireKitEditorLucideIconSvg.commentNext,\n revisionPrevious: quireKitEditorLucideIconSvg.revisionPrevious,\n revisionNext: quireKitEditorLucideIconSvg.revisionNext,\n revisionAccept: quireKitEditorLucideIconSvg.revisionAccept,\n revisionReject: quireKitEditorLucideIconSvg.revisionReject,\n revisionAcceptAll: quireKitEditorLucideIconSvg.revisionAcceptAll,\n revisionRejectAll: quireKitEditorLucideIconSvg.revisionRejectAll,\n revisionMarkup: quireKitEditorLucideIconSvg.revisionMarkup,\n revisionFinal: quireKitEditorLucideIconSvg.revisionFinal,\n revisionOriginal: quireKitEditorLucideIconSvg.revisionOriginal,\n trackChanges: quireKitEditorLucideIconSvg.trackChanges,\n revisionSimpleMarkup: formattingIconSvg.revisionSimpleMarkup\n});\n","import type { QuireSelectionPaintRect, QuireSelectionTextBand, SelectionTextBandBuilder } from \"./types\";\n\n/**\n * Groups measured text fragments by visual row without joining unselected horizontal gaps.\n * @param rects - Browser-ordered fragments from one text owner and one canonical range.\n * @returns Flat vertical bands retaining each original fragment and its provenance.\n */\nexport function groupQuireSelectionTextBands<T extends QuireSelectionPaintRect>(\n rects: readonly T[]\n): readonly QuireSelectionTextBand<T>[] {\n const bands: SelectionTextBandBuilder<T>[] = [];\n for (const rect of rects) {\n if (![rect.left, rect.right, rect.top, rect.bottom].every(Number.isFinite)\n || rect.right <= rect.left || rect.bottom <= rect.top) continue;\n // A shared intersection, rather than the growing bounding box, prevents a\n // raised/lowered glyph from connecting the previous and next wrapped rows.\n let band: SelectionTextBandBuilder<T> | undefined;\n for (let index = bands.length - 1; index >= 0; index--) {\n const row = bands[index]!;\n if (rect.top < row.sharedBottom && rect.bottom > row.sharedTop) { band = row; break; }\n }\n if (!band) {\n bands.push({ top: rect.top, bottom: rect.bottom, sharedTop: rect.top, sharedBottom: rect.bottom, rects: [rect] });\n continue;\n }\n // Inner text and its padded inline surface share one band. A redundant inner\n // rectangle must not narrow the intersection that decides the next row.\n if (!band.rects.some(selected => contains(selected, rect))) {\n band.top = Math.min(band.top, rect.top);\n band.bottom = Math.max(band.bottom, rect.bottom);\n band.sharedTop = Math.max(band.sharedTop, rect.top);\n band.sharedBottom = Math.min(band.sharedBottom, rect.bottom);\n }\n band.rects.push(rect);\n }\n return bands;\n}\n\n/** @param outer - Selected text or inline surface. @param inner - Candidate fragment. @returns Whether its geometry is already enclosed. */\nfunction contains(outer: QuireSelectionPaintRect, inner: QuireSelectionPaintRect): boolean {\n return inner.left >= outer.left - 0.01 && inner.right <= outer.right + 0.01\n && inner.top >= outer.top - 0.01 && inner.bottom <= outer.bottom + 0.01;\n}\n","/**\n * Shows the grabbing cursor across the document for one drag. Captured pointers\n * otherwise keep whatever hover cursor the element under them last resolved.\n * @param ownerDocument - Document containing the drag.\n * @returns Idempotent release.\n */\nexport function holdQuireDragCursor(ownerDocument: Document): () => void {\n const style = ownerDocument.createElement(\"style\");\n style.textContent = \"* { cursor: grabbing !important; }\";\n ownerDocument.head.append(style);\n return () => style.remove();\n}\n"],"mappings":";;;;;AAGA,MAAa,2BAA2B,OAAO,OAAO;CACpD,YAAYA,gBAAc,uBAAuB,UAAU;CAC3D,MAAM,OAAO,OAAO;EAClB,IAAIA,gBAAc,uBAAuB,KAAK,EAAE;EAChD,IAAIA,gBAAc,uBAAuB,KAAK,EAAE;EAChD,IAAIA,gBAAc,uBAAuB,KAAK,EAAE;EAChD,IAAIA,gBAAc,uBAAuB,KAAK,EAAE;EAChD,IAAIA,gBAAc,uBAAuB,KAAK,EAAE;CAClD,CAAC;CACD,OAAO,OAAO,OAAO;EACnB,SAASA,gBAAc,uBAAuB,MAAM,OAAO;EAC3D,SAASA,gBAAc,uBAAuB,MAAM,OAAO;EAC3D,MAAMA,gBAAc,uBAAuB,MAAM,IAAI;EACrD,SAASA,gBAAc,uBAAuB,MAAM,OAAO;EAC3D,SAASA,gBAAc,uBAAuB,MAAM,OAAO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AK;EAGzD,IAAI;EACJ,KAAK,IAAI,QAAQ,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS;GACtD,MAAM,MAAM,MAAM;GAClB,IAAI,KAAK,MAAM,IAAI,gBAAgB,KAAK,SAAS,IAAI,WAAW;IAAE,OAAO;IAAK;GAAO;EACvF;EACA,IAAI,CAAC,MAAM;GACT,MAAM,KAAK;IAAE,KAAK,KAAK;IAAK,QAAQ,KAAK;IAAQ,WAAW,KAAK;IAAK,cAAc,KAAK;IAAQ,OAAO,CAAC,IAAI;GAAE,CAAC;GAChH;EACF;EAGA,IAAI,CAAC,KAAK,MAAM,MAAK,aAAY,SAAS,UAAU,IAAI,CAAC,GAAG;GAC1D,KAAK,MAAM,KAAK,IAAI,KAAK,KAAK,KAAK,GAAG;GACtC,KAAK,SAAS,KAAK,IAAI,KAAK,QAAQ,KAAK,MAAM;GAC/C,KAAK,YAAY,KAAK,IAAI,KAAK,WAAW,KAAK,GAAG;GAClD,KAAK,eAAe,KAAK,IAAI,KAAK,cAAc,KAAK,MAAM;EAC7D;EACA,KAAK,MAAM,KAAK,IAAI;CACtB;CACA,OAAO;AACT;;AAGA,SAAS,SAAS,OAAgC,OAAyC;CACzF,OAAO,MAAM,QAAQ,MAAM,OAAO,OAAQ,MAAM,SAAS,MAAM,QAAQ,OAClE,MAAM,OAAO,MAAM,MAAM,OAAQ,MAAM,UAAU,MAAM,SAAS;AACvE;;;;;;;;;ACpCA,SAAgB,oBAAoB,eAAqC;CACvE,MAAM,QAAQ,cAAc,cAAc,OAAO;CACjD,MAAM,cAAc;CACpB,cAAc,KAAK,OAAO,KAAK;CAC/B,aAAa,MAAM,OAAO;AAC5B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as trackQuireKitInputModality } from "./resolve-
|
|
1
|
+
import { E as trackQuireKitInputModality } from "./resolve-BwTfY4PS.mjs";
|
|
2
2
|
import { F as themeCssVariableNames, h as quireKitDefaultLocale, m as quireKitBuiltInLocales, y as en } from "./catalog-AqWLE58Z.mjs";
|
|
3
3
|
import { parseColor } from "@ark-ui/vue/color-picker";
|
|
4
4
|
//#region src/theme/variables/references.ts
|
|
@@ -1601,4 +1601,4 @@ function isDimension(value, maximum) {
|
|
|
1601
1601
|
//#endregion
|
|
1602
1602
|
export { themeVariableReferences as C, resolveQuireKitToolbarVisibleUnits as S, quireDocumentColorRows as _, createQuireSelectionGesture as a, resolveToolbarNavigationTarget as b, resolveQuireRecentEmojis as c, getQuireKitFileUploadErrorMessage as d, parseQuireColor as f, projectQuireCommentAnchor as g, layoutQuireCommentRail as h, tableQuickGridSize as i, createQuireEmojiCatalog as l, serializeQuireColor as m, moveTableGridSelection as n, createQuireSelectionHandles as o, quireColorPickerFallbackValue as p, normalizeTableSize as r, filterQuireEmojis as s, isTableGridCellHighlighted as t, createQuireEmojiGroups as u, resolveQuireKitToolbarEntrySpan as v, resolveToolbarTabStop as x, sumQuireKitToolbarSpans as y };
|
|
1603
1603
|
|
|
1604
|
-
//# sourceMappingURL=model-
|
|
1604
|
+
//# sourceMappingURL=model-D4-FbKXY.mjs.map
|