@quirekit/ui 0.1.0 → 0.2.1
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/dist/{catalog-TxH_u9wJ.mjs → catalog-Dn7izrV5.mjs} +545 -18
- package/dist/catalog-Dn7izrV5.mjs.map +1 -0
- package/dist/{chat-CDuOfk3d.mjs → chat-1THPEdHw.mjs} +6 -6
- package/dist/chat-1THPEdHw.mjs.map +1 -0
- package/dist/chat.d.mts +2 -2
- package/dist/chat.mjs +1 -1
- package/dist/{code-block-5fEEwwMN.mjs → code-block-BLzjRjTb.mjs} +2 -2
- package/dist/{code-block-5fEEwwMN.mjs.map → code-block-BLzjRjTb.mjs.map} +1 -1
- package/dist/{html-sandbox-BJeg9mHs.mjs → html-sandbox-D9a7iXbU.mjs} +2 -2
- package/dist/{html-sandbox-BJeg9mHs.mjs.map → html-sandbox-D9a7iXbU.mjs.map} +1 -1
- package/dist/html-sandbox.mjs +1 -1
- package/dist/{index-BOSlg0Xl.d.mts → index-BkzB7Lb6.d.mts} +279 -6
- package/dist/index-BkzB7Lb6.d.mts.map +1 -0
- package/dist/{index-CtgUjd_A.d.mts → index-FDnUNAX_.d.mts} +27 -27
- package/dist/{index-CtgUjd_A.d.mts.map → index-FDnUNAX_.d.mts.map} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/{model-DvNHVLwg.mjs → model-BjGYjpa9.mjs} +3 -3
- package/dist/{model-DvNHVLwg.mjs.map → model-BjGYjpa9.mjs.map} +1 -1
- package/dist/{resolve-DlCNcx0Q.mjs → resolve-nFmJOtS9.mjs} +2 -2
- package/dist/{resolve-DlCNcx0Q.mjs.map → resolve-nFmJOtS9.mjs.map} +1 -1
- package/dist/vue.d.mts +180 -172
- package/dist/vue.d.mts.map +1 -1
- package/dist/vue.mjs +155 -62
- package/dist/vue.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/dialog/index.ts +1 -1
- package/src/components/dialog/types.ts +5 -2
- package/src/components/icon/custom/formatting.ts +3 -0
- package/src/components/icon/custom/insert.ts +30 -0
- package/src/components/icon/custom/mind-map.ts +28 -0
- package/src/components/icon/custom.ts +3 -1
- package/src/components/icon/lucide.ts +21 -1
- package/src/components/icon/metadata.ts +277 -0
- package/src/locale/components/icon-catalog/en.ts +86 -2
- package/src/locale/components/icon-catalog/zh-hans.ts +86 -2
- package/src/vue/dialog/content.vue +29 -5
- package/src/vue/dialog/size.test.ts +61 -0
- package/src/vue/scroll-area/scroll-area.test.ts +10 -0
- package/src/vue/scroll-area/scroll-area.vue +1 -1
- package/src/vue/select/select.test.ts +18 -0
- package/src/vue/select/select.vue +3 -0
- package/src/vue/slider/slider.test.ts +13 -0
- package/src/vue/slider/slider.vue +4 -2
- package/src/vue/splitter/splitter.vue +1 -1
- package/src/vue/toolbar/items/body.vue +5 -3
- package/src/vue/toolbar/items/memo.test.ts +49 -0
- package/src/vue/toolbar/items/memo.ts +24 -0
- package/src/vue/toolbar/toolbar-split-button.test.ts +2 -0
- package/src/vue/toolbar/toolbar-split-button.vue +1 -0
- package/dist/catalog-TxH_u9wJ.mjs.map +0 -1
- package/dist/chat-CDuOfk3d.mjs.map +0 -1
- package/dist/index-BOSlg0Xl.d.mts.map +0 -1
package/dist/chat.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as QuireKitChatProcessState, $t as QuireKitChatQuestionAnswer, At as QuireKitChatMessageProps, Bt as QuireKitChatPartBase, Ct as QuireKitChatMessageListItem, Dt as QuireKitChatBranchChangeDetails, Et as QuireKitChatMessageListSlots, Ft as QuireKitChatConfirmationPart, Gt as QuireKitChatQuestionPart, Ht as QuireKitChatPartState, It as QuireKitChatCustomPart, Jt as QuireKitChatSourceNavigateDetails, Kt as QuireKitChatQuestionSubmitPartDetails, Lt as QuireKitChatMessagePart, Mt as QuireKitChatAttachmentActionDetails, Nt as QuireKitChatAttachmentPart, Ot as QuireKitChatMessageActionsSlotContext, Pt as QuireKitChatConfirmationDecisionDetails, Q as QuireKitChatProcessProps, Qt as QuireKitChatToolState, Rt as QuireKitChatMessagePartProps, St as QuireKitChatMessageListHandle, Tt as QuireKitChatMessageListProps, Ut as QuireKitChatQuestionDraftDetails, Vt as QuireKitChatPartSlots, Wt as QuireKitChatQuestionOpenPartDetails, Xt as QuireKitChatTextPart, Yt as QuireKitChatSourcesPart, Zt as QuireKitChatToolPart, _t as QuireKitChatSubmitDetails, an as QuireKitChatQuestionPresentation, at as QuireKitChatComposerSubmitProps, bn as QuireKitChatMessageState, bt as QuireKitChatMessageListCopyDetails, cn as QuireKitChatQuestionSubmitDetails, ct as QuireKitChatInputSelection, dn as QuireKitChatConfirmationProps, dt as QuireKitChatRichInputInstance, en as QuireKitChatQuestionCustomOption, et as QuireKitChatToolProps, fn as QuireKitChatConfirmationSlots, ft as QuireKitChatRichInputProps, gt as QuireKitChatComposerSlots, ht as QuireKitChatComposerProps, in as QuireKitChatQuestionOption, it as QuireKitChatMessageActionProps, jt as QuireKitChatMessageSlots, kt as QuireKitChatMessageBranch, ln as QuireKitChatConfirmationDecision, lt as QuireKitChatInputSnapshot, mt as QuireKitChatComposerInstance, nn as QuireKitChatQuestionKind, nt as QuireKitChatMessageBranchProps, on as QuireKitChatQuestionProps, ot as QuireKitChatInputCandidate, pn as QuireKitChatConfirmationState, pt as QuireKitChatComposerContext, qt as QuireKitChatReasoningPart, rn as QuireKitChatQuestionOpenDetails, rt as QuireKitChatMessageActionsProps, sn as QuireKitChatQuestionState, st as QuireKitChatInputQuery, tn as QuireKitChatQuestionItem, tt as QuireKitChatReasoningProps, un as QuireKitChatConfirmationIntent, ut as QuireKitChatInputToken, vn as QuireKitChatAction, vt as QuireKitChatComposerInputInstance, wt as QuireKitChatMessageListItemContext, xt as QuireKitChatMessageListCopyErrorDetails, yn as QuireKitChatActionDetails, yt as QuireKitChatComposerInputProps, zt as QuireKitChatNoticePart } from "./index-
|
|
2
|
-
import { a as _default$14, c as _default$6, d as _default$4, f as _default$2, h as _default, i as _default$10, l as _default$5, m as _default$1, n as _default$3, o as _default$12, p as _default$13, r as _default$8, s as _default$7, t as _default$11, u as _default$9 } from "./index-
|
|
1
|
+
import { $ as QuireKitChatProcessState, $t as QuireKitChatQuestionAnswer, At as QuireKitChatMessageProps, Bt as QuireKitChatPartBase, Ct as QuireKitChatMessageListItem, Dt as QuireKitChatBranchChangeDetails, Et as QuireKitChatMessageListSlots, Ft as QuireKitChatConfirmationPart, Gt as QuireKitChatQuestionPart, Ht as QuireKitChatPartState, It as QuireKitChatCustomPart, Jt as QuireKitChatSourceNavigateDetails, Kt as QuireKitChatQuestionSubmitPartDetails, Lt as QuireKitChatMessagePart, Mt as QuireKitChatAttachmentActionDetails, Nt as QuireKitChatAttachmentPart, Ot as QuireKitChatMessageActionsSlotContext, Pt as QuireKitChatConfirmationDecisionDetails, Q as QuireKitChatProcessProps, Qt as QuireKitChatToolState, Rt as QuireKitChatMessagePartProps, St as QuireKitChatMessageListHandle, Tt as QuireKitChatMessageListProps, Ut as QuireKitChatQuestionDraftDetails, Vt as QuireKitChatPartSlots, Wt as QuireKitChatQuestionOpenPartDetails, Xt as QuireKitChatTextPart, Yt as QuireKitChatSourcesPart, Zt as QuireKitChatToolPart, _t as QuireKitChatSubmitDetails, an as QuireKitChatQuestionPresentation, at as QuireKitChatComposerSubmitProps, bn as QuireKitChatMessageState, bt as QuireKitChatMessageListCopyDetails, cn as QuireKitChatQuestionSubmitDetails, ct as QuireKitChatInputSelection, dn as QuireKitChatConfirmationProps, dt as QuireKitChatRichInputInstance, en as QuireKitChatQuestionCustomOption, et as QuireKitChatToolProps, fn as QuireKitChatConfirmationSlots, ft as QuireKitChatRichInputProps, gt as QuireKitChatComposerSlots, ht as QuireKitChatComposerProps, in as QuireKitChatQuestionOption, it as QuireKitChatMessageActionProps, jt as QuireKitChatMessageSlots, kt as QuireKitChatMessageBranch, ln as QuireKitChatConfirmationDecision, lt as QuireKitChatInputSnapshot, mt as QuireKitChatComposerInstance, nn as QuireKitChatQuestionKind, nt as QuireKitChatMessageBranchProps, on as QuireKitChatQuestionProps, ot as QuireKitChatInputCandidate, pn as QuireKitChatConfirmationState, pt as QuireKitChatComposerContext, qt as QuireKitChatReasoningPart, rn as QuireKitChatQuestionOpenDetails, rt as QuireKitChatMessageActionsProps, sn as QuireKitChatQuestionState, st as QuireKitChatInputQuery, tn as QuireKitChatQuestionItem, tt as QuireKitChatReasoningProps, un as QuireKitChatConfirmationIntent, ut as QuireKitChatInputToken, vn as QuireKitChatAction, vt as QuireKitChatComposerInputInstance, wt as QuireKitChatMessageListItemContext, xt as QuireKitChatMessageListCopyErrorDetails, yn as QuireKitChatActionDetails, yt as QuireKitChatComposerInputProps, zt as QuireKitChatNoticePart } from "./index-BkzB7Lb6.mjs";
|
|
2
|
+
import { a as _default$14, c as _default$6, d as _default$4, f as _default$2, h as _default, i as _default$10, l as _default$5, m as _default$1, n as _default$3, o as _default$12, p as _default$13, r as _default$8, s as _default$7, t as _default$11, u as _default$9 } from "./index-FDnUNAX_.mjs";
|
|
3
3
|
export { _default as QuireChatComposer, _default$1 as QuireChatComposerInput, _default$2 as QuireChatComposerSubmit, _default$3 as QuireChatConfirmation, _default$4 as QuireChatMessage, _default$5 as QuireChatMessageAction, _default$6 as QuireChatMessageActions, _default$7 as QuireChatMessageBranch, _default$8 as QuireChatMessageList, _default$9 as QuireChatMessagePart, _default$10 as QuireChatProcess, _default$11 as QuireChatQuestion, _default$12 as QuireChatReasoning, _default$13 as QuireChatRichInput, _default$14 as QuireChatTool, type QuireKitChatAction, type QuireKitChatActionDetails, type QuireKitChatAttachmentActionDetails, type QuireKitChatAttachmentPart, type QuireKitChatBranchChangeDetails, type QuireKitChatComposerContext, type QuireKitChatComposerInputInstance, type QuireKitChatComposerInputProps, type QuireKitChatComposerInstance, type QuireKitChatComposerProps, type QuireKitChatComposerSlots, type QuireKitChatComposerSubmitProps, type QuireKitChatConfirmationDecision, type QuireKitChatConfirmationDecisionDetails, type QuireKitChatConfirmationIntent, type QuireKitChatConfirmationPart, type QuireKitChatConfirmationProps, type QuireKitChatConfirmationSlots, type QuireKitChatConfirmationState, type QuireKitChatCustomPart, type QuireKitChatInputCandidate, type QuireKitChatInputQuery, type QuireKitChatInputSelection, type QuireKitChatInputSnapshot, type QuireKitChatInputToken, type QuireKitChatMessageActionProps, type QuireKitChatMessageActionsProps, type QuireKitChatMessageActionsSlotContext, type QuireKitChatMessageBranch, type QuireKitChatMessageBranchProps, type QuireKitChatMessageListCopyDetails, type QuireKitChatMessageListCopyErrorDetails, type QuireKitChatMessageListHandle, type QuireKitChatMessageListItem, type QuireKitChatMessageListItemContext, type QuireKitChatMessageListProps, type QuireKitChatMessageListSlots, type QuireKitChatMessagePart, type QuireKitChatMessagePartProps, type QuireKitChatMessageProps, type QuireKitChatMessageSlots, type QuireKitChatMessageState, type QuireKitChatNoticePart, type QuireKitChatPartBase, type QuireKitChatPartSlots, type QuireKitChatPartState, type QuireKitChatProcessProps, type QuireKitChatProcessState, type QuireKitChatQuestionAnswer, type QuireKitChatQuestionCustomOption, type QuireKitChatQuestionDraftDetails, type QuireKitChatQuestionItem, type QuireKitChatQuestionKind, type QuireKitChatQuestionOpenDetails, type QuireKitChatQuestionOpenPartDetails, type QuireKitChatQuestionOption, type QuireKitChatQuestionPart, type QuireKitChatQuestionPresentation, type QuireKitChatQuestionProps, type QuireKitChatQuestionState, type QuireKitChatQuestionSubmitDetails, type QuireKitChatQuestionSubmitPartDetails, type QuireKitChatReasoningPart, type QuireKitChatReasoningProps, type QuireKitChatRichInputInstance, type QuireKitChatRichInputProps, type QuireKitChatSourceNavigateDetails, type QuireKitChatSourcesPart, type QuireKitChatSubmitDetails, type QuireKitChatTextPart, type QuireKitChatToolPart, type QuireKitChatToolProps, type QuireKitChatToolState };
|
package/dist/chat.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as _sfc_main$9, d as _sfc_main$6, f as _sfc_main$5, g as _sfc_main$1, h as _sfc_main$2, i as _sfc_main$7, l as _sfc_main$14, m as _sfc_main, n as _sfc_main$10, o as _sfc_main$11, p as _sfc_main$13, r as _sfc_main$4, s as _sfc_main$3, t as _sfc_main$8, u as _sfc_main$12 } from "./chat-
|
|
1
|
+
import { a as _sfc_main$9, d as _sfc_main$6, f as _sfc_main$5, g as _sfc_main$1, h as _sfc_main$2, i as _sfc_main$7, l as _sfc_main$14, m as _sfc_main, n as _sfc_main$10, o as _sfc_main$11, p as _sfc_main$13, r as _sfc_main$4, s as _sfc_main$3, t as _sfc_main$8, u as _sfc_main$12 } from "./chat-1THPEdHw.mjs";
|
|
2
2
|
export { _sfc_main as QuireChatComposer, _sfc_main$1 as QuireChatComposerInput, _sfc_main$2 as QuireChatComposerSubmit, _sfc_main$3 as QuireChatConfirmation, _sfc_main$4 as QuireChatMessage, _sfc_main$5 as QuireChatMessageAction, _sfc_main$6 as QuireChatMessageActions, _sfc_main$7 as QuireChatMessageBranch, _sfc_main$8 as QuireChatMessageList, _sfc_main$9 as QuireChatMessagePart, _sfc_main$10 as QuireChatProcess, _sfc_main$11 as QuireChatQuestion, _sfc_main$12 as QuireChatReasoning, _sfc_main$13 as QuireChatRichInput, _sfc_main$14 as QuireChatTool };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as createThemeCssVariables, f as createTheme, h as quireKitDefaultLocale, i as quireKitEditorIconData } from "./catalog-
|
|
1
|
+
import { P as createThemeCssVariables, f as createTheme, h as quireKitDefaultLocale, i as quireKitEditorIconData } from "./catalog-Dn7izrV5.mjs";
|
|
2
2
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, inject, mergeProps, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, unref, useId, useSlots, watch, withCtx } from "vue";
|
|
3
3
|
import { ark } from "@ark-ui/vue/factory";
|
|
4
4
|
import { Clipboard } from "@ark-ui/vue/clipboard";
|
|
@@ -728,4 +728,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
728
728
|
//#endregion
|
|
729
729
|
export { useQuireKitLocale as a, quireKitIconRegistryKey as c, quireKitLocaleKey as i, _sfc_main$6 as l, _sfc_main$2 as n, useQuireKitMessages as o, _sfc_main$4 as r, _sfc_main$5 as s, _sfc_main as t };
|
|
730
730
|
|
|
731
|
-
//# sourceMappingURL=code-block-
|
|
731
|
+
//# sourceMappingURL=code-block-BLzjRjTb.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-block-5fEEwwMN.mjs","names":["$slots","$slots","$attrs","$slots"],"sources":["../src/vue/button/button.vue","../src/vue/icon/context.ts","../src/vue/icon/icon.vue","../src/vue/locale-provider/context.ts","../src/vue/clipboard/use-copy-feedback.ts","../src/vue/clipboard/clipboard.vue","../src/vue/code-block/code-lines.vue","../src/vue/code-block/code-block-header.vue","../src/vue/code-block/appearance.ts","../src/vue/code-block/theme-surface.vue","../src/vue/code-block/code-block.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { ButtonHTMLAttributes } from \"vue\";\nimport type {\n QuireKitButtonColor,\n QuireKitButtonSize,\n QuireKitButtonVariant\n} from \"../../components/button\";\n\nconst ArkButton = ark.button;\n\n/** Vue Button 适配器的公开属性。 */\ninterface Props {\n /** 原生 button 的提交行为。 */\n readonly type?: ButtonHTMLAttributes[\"type\"];\n /** 同步约束高度、排版、间距、圆角与图标盒的公开尺寸。 */\n readonly size?: QuireKitButtonSize;\n /** 通过主题注册的语义色族表达动作角色。 */\n readonly color?: QuireKitButtonColor;\n /** 与语义色正交的填充、边界和文字外观。 */\n readonly variant?: QuireKitButtonVariant;\n /** 是否占满所在容器的可用行内宽度。 */\n readonly block?: boolean;\n /** 是否阻止激活并暴露原生 disabled 语义。 */\n readonly disabled?: boolean;\n /** 是否处于处理中;保留标签并以 spinner 替换 leading。 */\n readonly busy?: boolean;\n}\n\n/** Vue Button 的稳定三段内容结构。 */\ninterface Slots {\n /** 描述动作的按钮标签。 */\n readonly default: () => unknown;\n /** 标签前的图标或稳定状态标记。 */\n readonly leading?: () => unknown;\n /** 标签后的快捷键提示或 disclosure。 */\n readonly trailing?: () => unknown;\n}\n\nconst {\n type = \"button\",\n size = \"sm\",\n color = \"neutral\",\n variant = \"ghost\",\n block = false,\n disabled = false,\n busy = false\n} = defineProps<Props>();\n\ndefineSlots<Slots>();\n</script>\n\n<template>\n <component\n :is=\"ArkButton\"\n :type=\"type\"\n data-scope=\"button\"\n data-part=\"root\"\n :class=\"[\n 'qk-button',\n `qk-button--${color}-${variant}`,\n `qk-button--${size}`,\n variant === 'link' && 'qk-button--link',\n block && 'qk-button--block'\n ]\"\n :disabled=\"disabled || busy\"\n :aria-busy=\"busy || undefined\"\n :data-state=\"busy ? 'busy' : undefined\"\n >\n <span\n v-if=\"busy || $slots.leading\"\n :class=\"['qk-button__icon', `qk-button__icon--${size}`]\"\n aria-hidden=\"true\"\n data-slot=\"leading\"\n >\n <svg\n v-if=\"busy\"\n class=\"qk-button__spinner\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n >\n <path d=\"M20 12a8 8 0 0 1-8 8\" />\n <path d=\"M4 12a8 8 0 0 1 8-8\" opacity=\".35\" />\n </svg>\n <slot v-else name=\"leading\" />\n </span>\n <span class=\"qk-button__label\" data-slot=\"label\"><slot /></span>\n <span\n v-if=\"$slots.trailing\"\n :class=\"['qk-button__trailing', `qk-button__trailing--${size}`]\"\n aria-hidden=\"true\"\n data-slot=\"trailing\"\n >\n <slot name=\"trailing\" />\n </span>\n </component>\n</template>\n","import type { ComputedRef, InjectionKey } from \"vue\";\nimport type { QuireKitIconRegistry } from \"../../components/icon\";\n\n/** Internal provider key for one product-owned icon registry. */\nexport const quireKitIconRegistryKey: InjectionKey<\n ComputedRef<QuireKitIconRegistry>\n> = Symbol(\"quirekit-icon-registry\");\n","<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport type {\n QuireKitIconData,\n QuireKitIconSize\n} from \"../../components/icon\";\nimport { quireKitIconRegistryKey } from \"./context\";\n\n/** Public properties for the Vue SVG icon renderer. */\ninterface Props {\n /** Registered product icon name. Ignored when data is supplied directly. */\n readonly name?: string | undefined;\n /** Normalized SVG icon data rendered directly without a registry lookup. */\n readonly data?: QuireKitIconData | undefined;\n /** Optical icon box size in CSS pixels. */\n readonly size?: QuireKitIconSize | undefined;\n /** Accessible name for a meaningful standalone icon; omit for decoration. */\n readonly label?: string | undefined;\n /** Optional runtime color applied to the icon's accent geometry. */\n readonly accentColor?: string | undefined;\n /** Whether stateful artwork should replace its accent with an empty-state mark. */\n readonly empty?: boolean | undefined;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n name: undefined,\n data: undefined,\n size: 16,\n label: undefined,\n accentColor: undefined,\n empty: false\n});\nconst providedRegistry = inject(quireKitIconRegistryKey, undefined);\nconst resolved = computed<QuireKitIconData | undefined>(() =>\n props.data\n ?? (props.name === undefined\n ? undefined\n : providedRegistry?.value.resolve(props.name))\n);\nconst missing = computed(() =>\n props.data === undefined\n && props.name !== undefined\n && !(providedRegistry?.value.has(props.name) ?? false)\n);\nconst iconStyle = computed(() => ({\n ...(props.accentColor === undefined ? {} : { \"--qk-icon-accent\": props.accentColor }),\n \"--qk-icon-optical-scale\": String(resolved.value?.opticalScale ?? 1)\n}));\n</script>\n\n<template>\n <span\n :class=\"['qk-icon', `qk-icon--${size}`]\"\n :role=\"label === undefined ? undefined : 'img'\"\n :aria-label=\"label\"\n :aria-hidden=\"label === undefined ? 'true' : undefined\"\n :data-icon-name=\"name\"\n :data-icon-source=\"resolved?.source\"\n :data-icon-missing=\"missing ? 'true' : undefined\"\n :data-icon-empty=\"empty ? 'true' : undefined\"\n :data-mirror-rtl=\"resolved?.mirrorInRtl ? 'true' : undefined\"\n :style=\"iconStyle\"\n v-html=\"resolved?.svg ?? ''\"\n />\n</template>\n","import { computed, inject, type ComputedRef, type InjectionKey } from \"vue\";\nimport { quireKitDefaultLocale } from \"../../locale/resolve\";\nimport type { QuireKitLocale, QuireKitMessages, QuireKitMessageScope } from \"../../locale/types\";\n\n/** Active language supplied by the nearest QuireLocaleProvider. */\nexport const quireKitLocaleKey: InjectionKey<ComputedRef<QuireKitLocale>> = Symbol(\"QuireKitLocale\");\n\n/** @returns The active language; Chinese when no provider is mounted. */\nfunction activeLocale(): ComputedRef<QuireKitLocale> {\n return inject(quireKitLocaleKey, computed(() => quireKitDefaultLocale));\n}\n\n/**\n * Reads one component's interface text from the active language.\n * @param scope - Component whose messages are needed.\n * @returns Reactive messages that follow language changes.\n */\nexport function useQuireKitMessages<Scope extends QuireKitMessageScope>(scope: Scope): ComputedRef<QuireKitMessages[Scope]> {\n const locale = activeLocale();\n return computed(() => locale.value.messages[scope]);\n}\n\n/** @returns Reactive BCP 47 tag of the active language, for date, number and size formatting. */\nexport function useQuireKitLocale(): ComputedRef<string> {\n const locale = activeLocale();\n return computed(() => locale.value.code);\n}\n","import { onBeforeUnmount, ref, watch } from \"vue\";\nimport type { QuireKitClipboardErrorDetails } from \"../../components/clipboard/types\";\n\n/**\n * Tracks completed system clipboard writes without reporting optimistic success.\n * @param value - Current public text getter.\n * @param timeout - Duration of confirmed success feedback.\n * @param onSuccess - Notifies a completed write of the current text.\n * @param onError - Notifies a failed write of the current text.\n * @param readValue - Optional action-only source; never evaluated by the reactive watcher.\n * @returns Feedback refs and the guarded asynchronous copy action.\n */\nexport function useCopyFeedback(\n value: () => string,\n timeout: () => number,\n onSuccess: () => void,\n onError: (details: QuireKitClipboardErrorDetails) => void,\n readValue: () => string = value\n) {\n const copied = ref(false);\n const copying = ref(false);\n const error = ref(false);\n let mounted = true;\n let resetTimer: ReturnType<typeof setTimeout> | undefined;\n\n /** Removes feedback that belongs to an earlier copy attempt. */\n function resetFeedback(): void {\n clearTimeout(resetTimer);\n copied.value = false;\n error.value = false;\n }\n\n watch(value, resetFeedback, { flush: \"sync\" });\n onBeforeUnmount(() => {\n mounted = false;\n clearTimeout(resetTimer);\n });\n\n /**\n * Writes the current text once and keeps stale results away from new content.\n * @returns A promise settled after the browser write and feedback update.\n */\n async function copy(): Promise<void> {\n if (copying.value) return;\n const identity = value();\n let attemptedValue = \"\";\n resetFeedback();\n copying.value = true;\n try {\n attemptedValue = readValue();\n if (attemptedValue.length === 0) return;\n if (!navigator.clipboard?.writeText) throw new Error(\"Clipboard API is unavailable\");\n await navigator.clipboard.writeText(attemptedValue);\n } catch (cause) {\n if (!mounted || value() !== identity) return;\n error.value = true;\n onError({ value: attemptedValue, error: cause });\n return;\n } finally {\n if (mounted) copying.value = false;\n }\n if (!mounted || value() !== identity) return;\n copied.value = true;\n resetTimer = setTimeout(() => { copied.value = false; }, timeout());\n onSuccess();\n }\n\n return { copied, copying, error, copy };\n}\n","<script setup lang=\"ts\">\nimport { Clipboard } from \"@ark-ui/vue/clipboard\";\nimport { useId } from \"vue\";\nimport type { QuireKitClipboardMode, QuireKitClipboardStatusDetails, QuireKitClipboardSlotProps, QuireKitClipboardControlSlotProps, QuireKitClipboardErrorDetails } from \"../../components/clipboard\";\nimport type { QuireKitControlSize } from \"../../components/control\";\nimport QuireIcon from \"../icon/icon.vue\";\nimport { useQuireKitMessages } from \"../locale-provider/context\";\nimport { useCopyFeedback } from \"./use-copy-feedback\";\n\n/** Clipboard 公开属性。 */\ninterface Props {\n /** 当前待复制的纯文本。 */\n readonly value: string;\n /** Read expensive source only for an explicit copy; value remains the displayed value and feedback identity. */\n readonly getValue?: (() => string) | undefined;\n /** 可见字段名称;同时用于复制按钮的可访问名称。 */\n readonly label?: string;\n /** 只用于复制按钮可访问名称的内容名称,如“代码”,不显示在界面上;省略时沿用 label。 */\n readonly target?: string;\n /** input 提供可选择的只读输入,text 展示文本,icon 只展示复制按钮。 */\n readonly mode?: QuireKitClipboardMode;\n /** 复制按钮外观;text 用于代码标题栏等轻量操作,默认 outline。 */\n readonly variant?: \"outline\" | \"text\";\n /** 输入框与按钮共用的尺寸档位,默认 sm;行内操作可用 xs。 */\n readonly size?: QuireKitControlSize;\n /** 复制反馈的持续时间,单位毫秒。 */\n readonly timeout?: number;\n /** 是否禁用复制操作。 */\n readonly disabled?: boolean;\n}\n\n/** Clipboard 的可替换内容。 */\ninterface Slots {\n /** 自定义待复制内容的呈现。 */\n readonly content?: (props: QuireKitClipboardSlotProps) => unknown;\n /** 自定义现有复制按钮内部的图标和文案。 */\n readonly trigger?: (props: QuireKitClipboardSlotProps) => unknown;\n /** 替换完整控件;必须接入 copy、disabled 和 describedBy,不能再嵌套按钮。 */\n readonly control?: (props: QuireKitClipboardControlSlotProps) => unknown;\n}\n\n/** Clipboard 语义事件。 */\ninterface Emits {\n /** 系统剪贴板完成写入时触发;超时后的状态从插槽 copied 读取。 */\n statusChange: [details: QuireKitClipboardStatusDetails];\n /** 写入失败时触发,复制按钮恢复后可以重试。 */\n copyError: [details: QuireKitClipboardErrorDetails];\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n mode: \"input\", size: \"sm\", variant: \"outline\", timeout: 2000, disabled: false\n});\nconst text = useQuireKitMessages(\"clipboard\");\nconst emit = defineEmits<Emits>();\ndefineSlots<Slots>();\nconst inputId = `qk-clipboard-${useId()}-input`;\nconst feedbackId = `${inputId}-feedback`;\nconst { copied, copying, error, copy } = useCopyFeedback(\n () => props.value, () => props.timeout,\n () => emit(\"statusChange\", { copied: true }),\n details => emit(\"copyError\", details), () => props.getValue?.() ?? props.value\n);\n\n/**\n * Preserves the readonly input's select-on-focus behavior.\n * @param event - Native focus event from the clipboard input.\n */\nfunction selectInput(event: FocusEvent): void {\n (event.target as HTMLInputElement).select();\n}\n\n/** Starts a copy only when the public disabled state allows it. */\nfunction requestCopy(): void {\n if (!props.disabled && (props.getValue || props.value.length > 0) && !copying.value) void copy();\n}\n</script>\n\n<template>\n <Clipboard.Root\n :model-value=\"value\" :ids=\"{ input: inputId }\" :class=\"['qk-clipboard', `qk-clipboard--${size}`]\"\n :data-copied=\"copied ? '' : undefined\" :aria-busy=\"copying || undefined\"\n >\n <Clipboard.Label v-if=\"label && mode === 'input' && !$slots.content\" class=\"qk-clipboard__label\">{{ label }}</Clipboard.Label>\n <span v-else-if=\"label\" class=\"qk-clipboard__label\">{{ label }}</span>\n <Clipboard.Control class=\"qk-clipboard__control\">\n <slot v-if=\"mode !== 'icon'\" name=\"content\" :value=\"value\" :copied=\"copied\" :copying=\"copying\" :error=\"error\">\n <input v-if=\"mode === 'input'\" :id=\"inputId\" :value=\"value\" readonly class=\"qk-clipboard__input\" :aria-label=\"label ?? text.content\" @focus=\"selectInput\" />\n <Clipboard.ValueText v-else class=\"qk-clipboard__text\" />\n </slot>\n <slot name=\"control\" :value=\"value\" :copied=\"copied\" :copying=\"copying\" :error=\"error\"\n :disabled=\"disabled || (!getValue && value.length === 0)\" :described-by=\"error ? feedbackId : undefined\" :copy=\"requestCopy\">\n <button\n type=\"button\" :aria-label=\"copied ? text.copiedTarget(target ?? label) : text.copyTarget(target ?? label)\"\n :aria-describedby=\"error ? feedbackId : undefined\" :data-copied=\"copied ? '' : undefined\"\n class=\"qk-clipboard__trigger\" :data-variant=\"variant\" :data-icon-only=\"mode === 'icon' ? '' : undefined\"\n :aria-disabled=\"copying || undefined\" :disabled=\"disabled || (!getValue && value.length === 0)\" @click=\"requestCopy\"\n >\n <slot name=\"trigger\" :value=\"value\" :copied=\"copied\" :copying=\"copying\" :error=\"error\">\n <QuireIcon :name=\"copied ? 'check' : 'copy'\" :size=\"size === 'xl' ? 20 : 16\" />\n <span v-if=\"mode !== 'icon'\" class=\"qk-clipboard__labels\" aria-hidden=\"true\">\n <span :data-hidden=\"copied ? '' : undefined\">{{ text.copy }}</span>\n <span :data-hidden=\"copied ? undefined : ''\">{{ text.copied }}</span>\n </span>\n </slot>\n </button>\n </slot>\n </Clipboard.Control>\n <span :id=\"feedbackId\" :class=\"error ? 'qk-clipboard__error' : 'sr-only'\" role=\"status\" aria-live=\"polite\">{{ error ? text.error : copied ? text.copied : '' }}</span>\n </Clipboard.Root>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport type { QuireKitCodeBlockProps, QuireKitCodeBlockLineSlotProps } from \"./types\";\nconst props = defineProps<Pick<QuireKitCodeBlockProps,\n \"code\" | \"lineNumbers\" | \"startLine\" | \"highlightedLines\" | \"addedLines\" | \"removedLines\"\n>>();\ndefineSlots<{ /** Optional trusted token spans for one source line. */\n line?: (props: QuireKitCodeBlockLineSlotProps) => unknown;\n}>();\nconst lines = computed(() => {\n const start = Number.isFinite(props.startLine) ? Math.max(1, Math.trunc(props.startLine!)) : 1;\n const source = props.code.split(/\\r\\n|\\r|\\n/);\n // A terminating separator ends the last source line; it does not add a numbered blank line.\n if (source.length > 1 && source.at(-1) === \"\") source.pop();\n return source.map((text, index) => ({ text, number: start + index }));\n});\n</script>\n\n<template>\n <code class=\"qk-code-block__lines\">\n <span v-for=\"line in lines\" :key=\"line.number\" class=\"qk-code-block__line\"\n :data-highlighted=\"highlightedLines?.includes(line.number) ? '' : undefined\"\n :data-change=\"removedLines?.includes(line.number) ? 'removed' : addedLines?.includes(line.number) ? 'added' : undefined\">\n <span v-if=\"lineNumbers\" class=\"qk-code-block__number\" aria-hidden=\"true\">{{ line.number }}</span>\n <span v-if=\"addedLines?.length || removedLines?.length\" class=\"qk-code-block__change\" aria-hidden=\"true\">{{ removedLines?.includes(line.number) ? '−' : addedLines?.includes(line.number) ? '+' : ' ' }}</span>\n <span class=\"qk-code-block__line-text\"><slot name=\"line\" v-bind=\"line\">{{ line.text }}</slot></span>\n </span>\n </code>\n</template>\n","<script setup lang=\"ts\">\nimport { QuireClipboard } from \"../clipboard\";\nimport type { QuireKitClipboardErrorDetails } from \"../../components/clipboard\";\nimport { useQuireKitMessages } from \"../locale-provider/context\";\nimport type { QuireKitCodeBlockHeaderProps } from \"./types\";\nwithDefaults(defineProps<QuireKitCodeBlockHeaderProps>(), { code: \"\", copy: true });\nconst text = useQuireKitMessages(\"codeBlock\");\nconst emit = defineEmits<{\n /** Clipboard write succeeded. */ copy: [];\n /** Clipboard read or write failed; the same control allows retry. */ copyError: [details: QuireKitClipboardErrorDetails];\n}>();\ndefineSlots<{\n /** Replace the source title, for example with a language Select. */ title?: () => unknown;\n /** Actions before the shared copy control. */ actions?: () => unknown;\n}>();\n</script>\n<template>\n <div class=\"qk-code-block__header\" data-qk-not-prose>\n <div class=\"qk-code-block__title\"><slot name=\"title\">\n <span class=\"qk-code-block__filename\">{{ filename || language || text.code }}</span>\n <span v-if=\"filename && language\" class=\"qk-code-block__language\">{{ language }}</span>\n </slot></div>\n <div class=\"qk-code-block__actions\">\n <slot name=\"actions\" />\n <QuireClipboard v-if=\"copy\" :value=\"code\" :get-value=\"getCode\" :target=\"text.copyTarget\" mode=\"icon\" variant=\"text\"\n @status-change=\"emit('copy')\" @copy-error=\"emit('copyError', $event)\" />\n </div>\n </div>\n</template>\n","import { createTheme, createThemeCssVariables } from \"../../theme\";\n\n/**\n * Isolates code colors without resetting inherited typography or density tokens.\n * @param scheme - Explicit scheme for this source surface.\n * @returns Default-theme color variables for the requested scheme.\n */\nfunction colors(scheme: \"light\" | \"dark\"): Readonly<Record<string, string>> {\n return Object.freeze(Object.fromEntries(\n Object.entries(createThemeCssVariables(createTheme({ scheme })))\n .filter(([name]) => name.startsWith(\"--qk-color-\"))\n ));\n}\n\n/** Explicit schemes share immutable color maps; auto keeps the host's complete theme. */\nexport const codeBlockColors = { light: colors(\"light\"), dark: colors(\"dark\") };\n","<script lang=\"ts\">\nimport { defineComponent, h, normalizeStyle, type CSSProperties, type PropType, type StyleValue } from \"vue\";\nimport { codeBlockColors } from \"./appearance\";\n\n/**\n * Compares normalized caller values, including CSS fallback arrays.\n * @param previous - Detached snapshot from the last style update.\n * @param next - Current normalized style value.\n * @returns Whether the effective value is unchanged.\n */\nfunction sameValue(previous: unknown, next: unknown): boolean {\n if (Object.is(previous, next)) return true;\n if (!Array.isArray(previous) || !Array.isArray(next) || previous.length !== next.length) return false;\n return previous.every((value, index) => Object.is(value, next[index]));\n}\n\n// The SFC compiler drops an annotation on `export default`, so the pure call is on its own declaration.\nconst CodeBlockThemeSurface = /* @__PURE__ */ defineComponent({\n name: \"QuireCodeBlockThemeSurface\",\n inheritAttrs: false,\n props: {\n /** Auto inherits all host tokens; explicit schemes isolate only source colors. */\n scheme: { type: String as PropType<\"auto\" | \"light\" | \"dark\">, required: true }\n },\n /**\n * Keeps the original business root independent of equivalent style allocations.\n * @param props - Requested source palette or inherited host theme.\n * @param context - Business attributes and stateful slot descendants.\n * @returns Original native root, preserving scoped CSS and descendant identity.\n */\n setup(props, context) {\n let previousScheme: typeof props.scheme | undefined;\n let previousCaller: Record<string, unknown> = {};\n let retained: Readonly<CSSProperties> | undefined;\n return () => {\n // Vue accepts objects, arrays and CSS strings. Compare their normalized\n // values before merging the palette so fresh equivalent caller objects\n // cannot make a content update rewrite every source color.\n const caller = normalizeStyle([context.attrs.style as StyleValue]) as Record<string, unknown>;\n const entries = Object.entries(caller);\n if (previousScheme !== props.scheme || entries.length !== Object.keys(previousCaller).length\n || entries.some(([name, value]) => !Object.hasOwn(previousCaller, name) || !sameValue(previousCaller[name], value))) {\n previousScheme = props.scheme;\n previousCaller = {};\n for (const [name, value] of entries) previousCaller[name] = Array.isArray(value) ? [...value] : value;\n retained = Object.freeze({\n ...(props.scheme === \"auto\" ? {} : codeBlockColors[props.scheme]),\n ...previousCaller as CSSProperties\n });\n }\n // One native root owns attrs, events and Vue's parent scope identifiers.\n // Only palette/style changes invalidate it; all slot updates still render.\n return h(\"div\", { ...context.attrs, style: retained }, context.slots.default?.());\n };\n }\n});\n\nexport default CodeBlockThemeSurface;\n</script>\n","<script setup lang=\"ts\">\nimport { computed, ref, shallowRef, useId, watch } from \"vue\";\nimport { QuireClipboard } from \"../clipboard\";\nimport QuireIcon from \"../icon/icon.vue\";\nimport { quireKitEditorIconData } from \"../../components/icon/catalog\";\nimport CodeLines from \"./code-lines.vue\";\nimport QuireCodeBlockHeader from \"./code-block-header.vue\";\nimport CodeBlockThemeSurface from \"./theme-surface.vue\";\nimport { codeBlockColors } from \"./appearance\";\nimport { useQuireKitMessages } from \"../locale-provider/context\";\nimport type { QuireKitClipboardErrorDetails } from \"../../components/clipboard\";\nimport type {\n QuireKitCodeBlockProps,\n QuireKitCodeBlockSlotProps,\n QuireKitCodeBlockLineSlotProps,\n QuireKitCodeBlockNavigationSlotProps,\n QuireKitCodeBlockActionsSlotProps,\n} from \"./types\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<QuireKitCodeBlockProps>(), {\n collapsed: undefined,\n variant: \"soft\", density: \"regular\", header: true, scheme: \"auto\",\n lineNumbers: false, startLine: 1, highlightedLines: () => [], addedLines: () => [], removedLines: () => [],\n copy: true,\n maxHeight: 400,\n wrap: false,\n collapsible: false,\n defaultCollapsed: true,\n});\nconst text = useQuireKitMessages(\"codeBlock\");\nconst emit = defineEmits<{\n /** Requests a controlled collapse change. */\n \"update:collapsed\": [value: boolean];\n /** The system clipboard successfully received the original source. */\n copy: [];\n /** Clipboard write failed; the public Clipboard trigger retains retry feedback. */\n copyError: [details: QuireKitClipboardErrorDetails];\n}>();\nconst slots = defineSlots<{\n /** Replace the filename and language with a custom title. */\n title?: () => unknown;\n /** Additional controls before the built-in copy action. */\n actions?: (props: QuireKitCodeBlockActionsSlotProps) => unknown;\n /** Navigation above the title and code, such as externally controlled Tabs. */\n navigation?: (props: QuireKitCodeBlockNavigationSlotProps) => unknown;\n /** Trusted token spans within the built-in line renderer. */\n line?: (props: QuireKitCodeBlockLineSlotProps) => unknown;\n /** Complete code element from a trusted highlighter; source text remains the copy authority. */\n code?: (props: QuireKitCodeBlockSlotProps) => unknown;\n}>();\nconst localCollapsed = ref(props.defaultCollapsed);\nconst isCollapsed = computed(\n () => props.collapsible && (props.collapsed ?? localCollapsed.value)\n);\nconst viewport = shallowRef<HTMLElement | null>(null);\nconst trigger = shallowRef<HTMLButtonElement | null>(null);\nconst showHeader = computed(() => props.header || props.collapsible || !!slots.title || !!slots.actions);\nconst renderLines = computed(() => props.lineNumbers || props.highlightedLines?.length || props.addedLines?.length || props.removedLines?.length || !!slots.line);\nconst viewportId = `qk-code-${useId()}`;\nconst height = computed(\n () =>\n `${\n Number.isFinite(props.maxHeight) ? Math.max(48, props.maxHeight) : 400\n }px`\n);\nwatch(isCollapsed, (collapsed) => {\n // A controlled collapse must not leave keyboard focus inside hidden source content.\n if (\n collapsed &&\n viewport.value?.contains(viewport.value.ownerDocument.activeElement)\n )\n trigger.value?.focus();\n});\n/** Toggles local state and notifies controlled consumers through one action. */\nfunction toggle(): void {\n const next = !isCollapsed.value;\n localCollapsed.value = next;\n emit(\"update:collapsed\", next);\n}\n</script>\n<template>\n <CodeBlockThemeSurface :scheme=\"scheme\" class=\"qk-code-block\" data-qk-not-prose :data-variant=\"variant\" :data-density=\"density\"\n :data-qk-scheme=\"scheme === 'auto' ? undefined : scheme\" v-bind=\"$attrs\">\n <div v-if=\"$slots.navigation\" class=\"qk-code-block__navigation\"><slot name=\"navigation\" :content-id=\"`${viewportId}-panel`\" /></div>\n <div :id=\"`${viewportId}-panel`\" class=\"qk-code-block__frame\" :role=\"$slots.navigation ? 'tabpanel' : undefined\"\n :aria-label=\"$slots.navigation ? ariaLabel ?? filename ?? language ?? text.code : undefined\">\n <QuireCodeBlockHeader v-if=\"showHeader\" :code=\"code\" :language=\"language\" :filename=\"filename\"\n :copy=\"copy\" @copy=\"emit('copy')\" @copy-error=\"emit('copyError', $event)\">\n <template v-if=\"$slots.title\" #title><slot name=\"title\" /></template>\n <template #actions>\n <slot name=\"actions\" :content-props=\"scheme === 'auto' ? {} : { 'data-qk-scheme': scheme, style: codeBlockColors[scheme] }\" />\n <button\n v-if=\"collapsible\"\n ref=\"trigger\"\n type=\"button\"\n class=\"qk-code-block__toggle\"\n :aria-controls=\"viewportId\"\n :aria-expanded=\"!isCollapsed\"\n :aria-label=\"isCollapsed ? text.expand : text.collapse\"\n :title=\"isCollapsed ? text.expand : text.collapse\"\n @click=\"toggle\"\n >\n <QuireIcon :data=\"isCollapsed ? quireKitEditorIconData.chevronRight : quireKitEditorIconData.chevronDown\" />\n </button>\n </template>\n </QuireCodeBlockHeader>\n <div v-else-if=\"copy\" class=\"qk-code-block__floating\">\n <QuireClipboard :value=\"code\" :target=\"text.copyTarget\" mode=\"icon\" variant=\"text\"\n @status-change=\"emit('copy')\" @copy-error=\"emit('copyError', $event)\" />\n </div>\n <pre\n :id=\"viewportId\"\n ref=\"viewport\"\n class=\"qk-code-block__viewport\"\n :class=\"{ 'qk-code-block__viewport--wrap': wrap }\"\n :hidden=\"isCollapsed\"\n :style=\"{ maxHeight: height }\"\n tabindex=\"0\"\n :aria-label=\"ariaLabel ?? filename ?? text.code\"\n ><slot name=\"code\" :code=\"code\" :language=\"language\"><CodeLines v-if=\"renderLines\" :code=\"code\" :line-numbers=\"lineNumbers\" :start-line=\"startLine\" :highlighted-lines=\"highlightedLines\" :added-lines=\"addedLines\" :removed-lines=\"removedLines\"><template v-if=\"$slots.line\" #line=\"line\"><slot name=\"line\" v-bind=\"line\" /></template></CodeLines><code v-else>{{ code }}</code></slot></pre>\n </div>\n </CodeBlockThemeSurface>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASA,MAAM,YAAY,IAAI;;;GA4CpB,OAAA,UAAA,GAAA,YA6CY,wBA5CL,MAAA,SAAA,CAAS,GAAA;IACb,MAAM,QAAA;IACP,cAAW;IACX,aAAU;IACT,OAAK,eAAA;;KAA2C,cAAA,QAAA,MAAK,GAAI,QAAA;KAA+B,cAAA,QAAA;KAAc,QAAA,YAAO,UAAA;KAAwC,QAAA,SAAK;;IAO1J,UAAU,QAAA,YAAY,QAAA;IACtB,aAAW,QAAA,QAAQ,KAAA;IACn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version":3,"file":"code-block-BLzjRjTb.mjs","names":["$slots","$slots","$attrs","$slots"],"sources":["../src/vue/button/button.vue","../src/vue/icon/context.ts","../src/vue/icon/icon.vue","../src/vue/locale-provider/context.ts","../src/vue/clipboard/use-copy-feedback.ts","../src/vue/clipboard/clipboard.vue","../src/vue/code-block/code-lines.vue","../src/vue/code-block/code-block-header.vue","../src/vue/code-block/appearance.ts","../src/vue/code-block/theme-surface.vue","../src/vue/code-block/code-block.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { ButtonHTMLAttributes } from \"vue\";\nimport type {\n QuireKitButtonColor,\n QuireKitButtonSize,\n QuireKitButtonVariant\n} from \"../../components/button\";\n\nconst ArkButton = ark.button;\n\n/** Vue Button 适配器的公开属性。 */\ninterface Props {\n /** 原生 button 的提交行为。 */\n readonly type?: ButtonHTMLAttributes[\"type\"];\n /** 同步约束高度、排版、间距、圆角与图标盒的公开尺寸。 */\n readonly size?: QuireKitButtonSize;\n /** 通过主题注册的语义色族表达动作角色。 */\n readonly color?: QuireKitButtonColor;\n /** 与语义色正交的填充、边界和文字外观。 */\n readonly variant?: QuireKitButtonVariant;\n /** 是否占满所在容器的可用行内宽度。 */\n readonly block?: boolean;\n /** 是否阻止激活并暴露原生 disabled 语义。 */\n readonly disabled?: boolean;\n /** 是否处于处理中;保留标签并以 spinner 替换 leading。 */\n readonly busy?: boolean;\n}\n\n/** Vue Button 的稳定三段内容结构。 */\ninterface Slots {\n /** 描述动作的按钮标签。 */\n readonly default: () => unknown;\n /** 标签前的图标或稳定状态标记。 */\n readonly leading?: () => unknown;\n /** 标签后的快捷键提示或 disclosure。 */\n readonly trailing?: () => unknown;\n}\n\nconst {\n type = \"button\",\n size = \"sm\",\n color = \"neutral\",\n variant = \"ghost\",\n block = false,\n disabled = false,\n busy = false\n} = defineProps<Props>();\n\ndefineSlots<Slots>();\n</script>\n\n<template>\n <component\n :is=\"ArkButton\"\n :type=\"type\"\n data-scope=\"button\"\n data-part=\"root\"\n :class=\"[\n 'qk-button',\n `qk-button--${color}-${variant}`,\n `qk-button--${size}`,\n variant === 'link' && 'qk-button--link',\n block && 'qk-button--block'\n ]\"\n :disabled=\"disabled || busy\"\n :aria-busy=\"busy || undefined\"\n :data-state=\"busy ? 'busy' : undefined\"\n >\n <span\n v-if=\"busy || $slots.leading\"\n :class=\"['qk-button__icon', `qk-button__icon--${size}`]\"\n aria-hidden=\"true\"\n data-slot=\"leading\"\n >\n <svg\n v-if=\"busy\"\n class=\"qk-button__spinner\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n >\n <path d=\"M20 12a8 8 0 0 1-8 8\" />\n <path d=\"M4 12a8 8 0 0 1 8-8\" opacity=\".35\" />\n </svg>\n <slot v-else name=\"leading\" />\n </span>\n <span class=\"qk-button__label\" data-slot=\"label\"><slot /></span>\n <span\n v-if=\"$slots.trailing\"\n :class=\"['qk-button__trailing', `qk-button__trailing--${size}`]\"\n aria-hidden=\"true\"\n data-slot=\"trailing\"\n >\n <slot name=\"trailing\" />\n </span>\n </component>\n</template>\n","import type { ComputedRef, InjectionKey } from \"vue\";\nimport type { QuireKitIconRegistry } from \"../../components/icon\";\n\n/** Internal provider key for one product-owned icon registry. */\nexport const quireKitIconRegistryKey: InjectionKey<\n ComputedRef<QuireKitIconRegistry>\n> = Symbol(\"quirekit-icon-registry\");\n","<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport type {\n QuireKitIconData,\n QuireKitIconSize\n} from \"../../components/icon\";\nimport { quireKitIconRegistryKey } from \"./context\";\n\n/** Public properties for the Vue SVG icon renderer. */\ninterface Props {\n /** Registered product icon name. Ignored when data is supplied directly. */\n readonly name?: string | undefined;\n /** Normalized SVG icon data rendered directly without a registry lookup. */\n readonly data?: QuireKitIconData | undefined;\n /** Optical icon box size in CSS pixels. */\n readonly size?: QuireKitIconSize | undefined;\n /** Accessible name for a meaningful standalone icon; omit for decoration. */\n readonly label?: string | undefined;\n /** Optional runtime color applied to the icon's accent geometry. */\n readonly accentColor?: string | undefined;\n /** Whether stateful artwork should replace its accent with an empty-state mark. */\n readonly empty?: boolean | undefined;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n name: undefined,\n data: undefined,\n size: 16,\n label: undefined,\n accentColor: undefined,\n empty: false\n});\nconst providedRegistry = inject(quireKitIconRegistryKey, undefined);\nconst resolved = computed<QuireKitIconData | undefined>(() =>\n props.data\n ?? (props.name === undefined\n ? undefined\n : providedRegistry?.value.resolve(props.name))\n);\nconst missing = computed(() =>\n props.data === undefined\n && props.name !== undefined\n && !(providedRegistry?.value.has(props.name) ?? false)\n);\nconst iconStyle = computed(() => ({\n ...(props.accentColor === undefined ? {} : { \"--qk-icon-accent\": props.accentColor }),\n \"--qk-icon-optical-scale\": String(resolved.value?.opticalScale ?? 1)\n}));\n</script>\n\n<template>\n <span\n :class=\"['qk-icon', `qk-icon--${size}`]\"\n :role=\"label === undefined ? undefined : 'img'\"\n :aria-label=\"label\"\n :aria-hidden=\"label === undefined ? 'true' : undefined\"\n :data-icon-name=\"name\"\n :data-icon-source=\"resolved?.source\"\n :data-icon-missing=\"missing ? 'true' : undefined\"\n :data-icon-empty=\"empty ? 'true' : undefined\"\n :data-mirror-rtl=\"resolved?.mirrorInRtl ? 'true' : undefined\"\n :style=\"iconStyle\"\n v-html=\"resolved?.svg ?? ''\"\n />\n</template>\n","import { computed, inject, type ComputedRef, type InjectionKey } from \"vue\";\nimport { quireKitDefaultLocale } from \"../../locale/resolve\";\nimport type { QuireKitLocale, QuireKitMessages, QuireKitMessageScope } from \"../../locale/types\";\n\n/** Active language supplied by the nearest QuireLocaleProvider. */\nexport const quireKitLocaleKey: InjectionKey<ComputedRef<QuireKitLocale>> = Symbol(\"QuireKitLocale\");\n\n/** @returns The active language; Chinese when no provider is mounted. */\nfunction activeLocale(): ComputedRef<QuireKitLocale> {\n return inject(quireKitLocaleKey, computed(() => quireKitDefaultLocale));\n}\n\n/**\n * Reads one component's interface text from the active language.\n * @param scope - Component whose messages are needed.\n * @returns Reactive messages that follow language changes.\n */\nexport function useQuireKitMessages<Scope extends QuireKitMessageScope>(scope: Scope): ComputedRef<QuireKitMessages[Scope]> {\n const locale = activeLocale();\n return computed(() => locale.value.messages[scope]);\n}\n\n/** @returns Reactive BCP 47 tag of the active language, for date, number and size formatting. */\nexport function useQuireKitLocale(): ComputedRef<string> {\n const locale = activeLocale();\n return computed(() => locale.value.code);\n}\n","import { onBeforeUnmount, ref, watch } from \"vue\";\nimport type { QuireKitClipboardErrorDetails } from \"../../components/clipboard/types\";\n\n/**\n * Tracks completed system clipboard writes without reporting optimistic success.\n * @param value - Current public text getter.\n * @param timeout - Duration of confirmed success feedback.\n * @param onSuccess - Notifies a completed write of the current text.\n * @param onError - Notifies a failed write of the current text.\n * @param readValue - Optional action-only source; never evaluated by the reactive watcher.\n * @returns Feedback refs and the guarded asynchronous copy action.\n */\nexport function useCopyFeedback(\n value: () => string,\n timeout: () => number,\n onSuccess: () => void,\n onError: (details: QuireKitClipboardErrorDetails) => void,\n readValue: () => string = value\n) {\n const copied = ref(false);\n const copying = ref(false);\n const error = ref(false);\n let mounted = true;\n let resetTimer: ReturnType<typeof setTimeout> | undefined;\n\n /** Removes feedback that belongs to an earlier copy attempt. */\n function resetFeedback(): void {\n clearTimeout(resetTimer);\n copied.value = false;\n error.value = false;\n }\n\n watch(value, resetFeedback, { flush: \"sync\" });\n onBeforeUnmount(() => {\n mounted = false;\n clearTimeout(resetTimer);\n });\n\n /**\n * Writes the current text once and keeps stale results away from new content.\n * @returns A promise settled after the browser write and feedback update.\n */\n async function copy(): Promise<void> {\n if (copying.value) return;\n const identity = value();\n let attemptedValue = \"\";\n resetFeedback();\n copying.value = true;\n try {\n attemptedValue = readValue();\n if (attemptedValue.length === 0) return;\n if (!navigator.clipboard?.writeText) throw new Error(\"Clipboard API is unavailable\");\n await navigator.clipboard.writeText(attemptedValue);\n } catch (cause) {\n if (!mounted || value() !== identity) return;\n error.value = true;\n onError({ value: attemptedValue, error: cause });\n return;\n } finally {\n if (mounted) copying.value = false;\n }\n if (!mounted || value() !== identity) return;\n copied.value = true;\n resetTimer = setTimeout(() => { copied.value = false; }, timeout());\n onSuccess();\n }\n\n return { copied, copying, error, copy };\n}\n","<script setup lang=\"ts\">\nimport { Clipboard } from \"@ark-ui/vue/clipboard\";\nimport { useId } from \"vue\";\nimport type { QuireKitClipboardMode, QuireKitClipboardStatusDetails, QuireKitClipboardSlotProps, QuireKitClipboardControlSlotProps, QuireKitClipboardErrorDetails } from \"../../components/clipboard\";\nimport type { QuireKitControlSize } from \"../../components/control\";\nimport QuireIcon from \"../icon/icon.vue\";\nimport { useQuireKitMessages } from \"../locale-provider/context\";\nimport { useCopyFeedback } from \"./use-copy-feedback\";\n\n/** Clipboard 公开属性。 */\ninterface Props {\n /** 当前待复制的纯文本。 */\n readonly value: string;\n /** Read expensive source only for an explicit copy; value remains the displayed value and feedback identity. */\n readonly getValue?: (() => string) | undefined;\n /** 可见字段名称;同时用于复制按钮的可访问名称。 */\n readonly label?: string;\n /** 只用于复制按钮可访问名称的内容名称,如“代码”,不显示在界面上;省略时沿用 label。 */\n readonly target?: string;\n /** input 提供可选择的只读输入,text 展示文本,icon 只展示复制按钮。 */\n readonly mode?: QuireKitClipboardMode;\n /** 复制按钮外观;text 用于代码标题栏等轻量操作,默认 outline。 */\n readonly variant?: \"outline\" | \"text\";\n /** 输入框与按钮共用的尺寸档位,默认 sm;行内操作可用 xs。 */\n readonly size?: QuireKitControlSize;\n /** 复制反馈的持续时间,单位毫秒。 */\n readonly timeout?: number;\n /** 是否禁用复制操作。 */\n readonly disabled?: boolean;\n}\n\n/** Clipboard 的可替换内容。 */\ninterface Slots {\n /** 自定义待复制内容的呈现。 */\n readonly content?: (props: QuireKitClipboardSlotProps) => unknown;\n /** 自定义现有复制按钮内部的图标和文案。 */\n readonly trigger?: (props: QuireKitClipboardSlotProps) => unknown;\n /** 替换完整控件;必须接入 copy、disabled 和 describedBy,不能再嵌套按钮。 */\n readonly control?: (props: QuireKitClipboardControlSlotProps) => unknown;\n}\n\n/** Clipboard 语义事件。 */\ninterface Emits {\n /** 系统剪贴板完成写入时触发;超时后的状态从插槽 copied 读取。 */\n statusChange: [details: QuireKitClipboardStatusDetails];\n /** 写入失败时触发,复制按钮恢复后可以重试。 */\n copyError: [details: QuireKitClipboardErrorDetails];\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n mode: \"input\", size: \"sm\", variant: \"outline\", timeout: 2000, disabled: false\n});\nconst text = useQuireKitMessages(\"clipboard\");\nconst emit = defineEmits<Emits>();\ndefineSlots<Slots>();\nconst inputId = `qk-clipboard-${useId()}-input`;\nconst feedbackId = `${inputId}-feedback`;\nconst { copied, copying, error, copy } = useCopyFeedback(\n () => props.value, () => props.timeout,\n () => emit(\"statusChange\", { copied: true }),\n details => emit(\"copyError\", details), () => props.getValue?.() ?? props.value\n);\n\n/**\n * Preserves the readonly input's select-on-focus behavior.\n * @param event - Native focus event from the clipboard input.\n */\nfunction selectInput(event: FocusEvent): void {\n (event.target as HTMLInputElement).select();\n}\n\n/** Starts a copy only when the public disabled state allows it. */\nfunction requestCopy(): void {\n if (!props.disabled && (props.getValue || props.value.length > 0) && !copying.value) void copy();\n}\n</script>\n\n<template>\n <Clipboard.Root\n :model-value=\"value\" :ids=\"{ input: inputId }\" :class=\"['qk-clipboard', `qk-clipboard--${size}`]\"\n :data-copied=\"copied ? '' : undefined\" :aria-busy=\"copying || undefined\"\n >\n <Clipboard.Label v-if=\"label && mode === 'input' && !$slots.content\" class=\"qk-clipboard__label\">{{ label }}</Clipboard.Label>\n <span v-else-if=\"label\" class=\"qk-clipboard__label\">{{ label }}</span>\n <Clipboard.Control class=\"qk-clipboard__control\">\n <slot v-if=\"mode !== 'icon'\" name=\"content\" :value=\"value\" :copied=\"copied\" :copying=\"copying\" :error=\"error\">\n <input v-if=\"mode === 'input'\" :id=\"inputId\" :value=\"value\" readonly class=\"qk-clipboard__input\" :aria-label=\"label ?? text.content\" @focus=\"selectInput\" />\n <Clipboard.ValueText v-else class=\"qk-clipboard__text\" />\n </slot>\n <slot name=\"control\" :value=\"value\" :copied=\"copied\" :copying=\"copying\" :error=\"error\"\n :disabled=\"disabled || (!getValue && value.length === 0)\" :described-by=\"error ? feedbackId : undefined\" :copy=\"requestCopy\">\n <button\n type=\"button\" :aria-label=\"copied ? text.copiedTarget(target ?? label) : text.copyTarget(target ?? label)\"\n :aria-describedby=\"error ? feedbackId : undefined\" :data-copied=\"copied ? '' : undefined\"\n class=\"qk-clipboard__trigger\" :data-variant=\"variant\" :data-icon-only=\"mode === 'icon' ? '' : undefined\"\n :aria-disabled=\"copying || undefined\" :disabled=\"disabled || (!getValue && value.length === 0)\" @click=\"requestCopy\"\n >\n <slot name=\"trigger\" :value=\"value\" :copied=\"copied\" :copying=\"copying\" :error=\"error\">\n <QuireIcon :name=\"copied ? 'check' : 'copy'\" :size=\"size === 'xl' ? 20 : 16\" />\n <span v-if=\"mode !== 'icon'\" class=\"qk-clipboard__labels\" aria-hidden=\"true\">\n <span :data-hidden=\"copied ? '' : undefined\">{{ text.copy }}</span>\n <span :data-hidden=\"copied ? undefined : ''\">{{ text.copied }}</span>\n </span>\n </slot>\n </button>\n </slot>\n </Clipboard.Control>\n <span :id=\"feedbackId\" :class=\"error ? 'qk-clipboard__error' : 'sr-only'\" role=\"status\" aria-live=\"polite\">{{ error ? text.error : copied ? text.copied : '' }}</span>\n </Clipboard.Root>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport type { QuireKitCodeBlockProps, QuireKitCodeBlockLineSlotProps } from \"./types\";\nconst props = defineProps<Pick<QuireKitCodeBlockProps,\n \"code\" | \"lineNumbers\" | \"startLine\" | \"highlightedLines\" | \"addedLines\" | \"removedLines\"\n>>();\ndefineSlots<{ /** Optional trusted token spans for one source line. */\n line?: (props: QuireKitCodeBlockLineSlotProps) => unknown;\n}>();\nconst lines = computed(() => {\n const start = Number.isFinite(props.startLine) ? Math.max(1, Math.trunc(props.startLine!)) : 1;\n const source = props.code.split(/\\r\\n|\\r|\\n/);\n // A terminating separator ends the last source line; it does not add a numbered blank line.\n if (source.length > 1 && source.at(-1) === \"\") source.pop();\n return source.map((text, index) => ({ text, number: start + index }));\n});\n</script>\n\n<template>\n <code class=\"qk-code-block__lines\">\n <span v-for=\"line in lines\" :key=\"line.number\" class=\"qk-code-block__line\"\n :data-highlighted=\"highlightedLines?.includes(line.number) ? '' : undefined\"\n :data-change=\"removedLines?.includes(line.number) ? 'removed' : addedLines?.includes(line.number) ? 'added' : undefined\">\n <span v-if=\"lineNumbers\" class=\"qk-code-block__number\" aria-hidden=\"true\">{{ line.number }}</span>\n <span v-if=\"addedLines?.length || removedLines?.length\" class=\"qk-code-block__change\" aria-hidden=\"true\">{{ removedLines?.includes(line.number) ? '−' : addedLines?.includes(line.number) ? '+' : ' ' }}</span>\n <span class=\"qk-code-block__line-text\"><slot name=\"line\" v-bind=\"line\">{{ line.text }}</slot></span>\n </span>\n </code>\n</template>\n","<script setup lang=\"ts\">\nimport { QuireClipboard } from \"../clipboard\";\nimport type { QuireKitClipboardErrorDetails } from \"../../components/clipboard\";\nimport { useQuireKitMessages } from \"../locale-provider/context\";\nimport type { QuireKitCodeBlockHeaderProps } from \"./types\";\nwithDefaults(defineProps<QuireKitCodeBlockHeaderProps>(), { code: \"\", copy: true });\nconst text = useQuireKitMessages(\"codeBlock\");\nconst emit = defineEmits<{\n /** Clipboard write succeeded. */ copy: [];\n /** Clipboard read or write failed; the same control allows retry. */ copyError: [details: QuireKitClipboardErrorDetails];\n}>();\ndefineSlots<{\n /** Replace the source title, for example with a language Select. */ title?: () => unknown;\n /** Actions before the shared copy control. */ actions?: () => unknown;\n}>();\n</script>\n<template>\n <div class=\"qk-code-block__header\" data-qk-not-prose>\n <div class=\"qk-code-block__title\"><slot name=\"title\">\n <span class=\"qk-code-block__filename\">{{ filename || language || text.code }}</span>\n <span v-if=\"filename && language\" class=\"qk-code-block__language\">{{ language }}</span>\n </slot></div>\n <div class=\"qk-code-block__actions\">\n <slot name=\"actions\" />\n <QuireClipboard v-if=\"copy\" :value=\"code\" :get-value=\"getCode\" :target=\"text.copyTarget\" mode=\"icon\" variant=\"text\"\n @status-change=\"emit('copy')\" @copy-error=\"emit('copyError', $event)\" />\n </div>\n </div>\n</template>\n","import { createTheme, createThemeCssVariables } from \"../../theme\";\n\n/**\n * Isolates code colors without resetting inherited typography or density tokens.\n * @param scheme - Explicit scheme for this source surface.\n * @returns Default-theme color variables for the requested scheme.\n */\nfunction colors(scheme: \"light\" | \"dark\"): Readonly<Record<string, string>> {\n return Object.freeze(Object.fromEntries(\n Object.entries(createThemeCssVariables(createTheme({ scheme })))\n .filter(([name]) => name.startsWith(\"--qk-color-\"))\n ));\n}\n\n/** Explicit schemes share immutable color maps; auto keeps the host's complete theme. */\nexport const codeBlockColors = { light: colors(\"light\"), dark: colors(\"dark\") };\n","<script lang=\"ts\">\nimport { defineComponent, h, normalizeStyle, type CSSProperties, type PropType, type StyleValue } from \"vue\";\nimport { codeBlockColors } from \"./appearance\";\n\n/**\n * Compares normalized caller values, including CSS fallback arrays.\n * @param previous - Detached snapshot from the last style update.\n * @param next - Current normalized style value.\n * @returns Whether the effective value is unchanged.\n */\nfunction sameValue(previous: unknown, next: unknown): boolean {\n if (Object.is(previous, next)) return true;\n if (!Array.isArray(previous) || !Array.isArray(next) || previous.length !== next.length) return false;\n return previous.every((value, index) => Object.is(value, next[index]));\n}\n\n// The SFC compiler drops an annotation on `export default`, so the pure call is on its own declaration.\nconst CodeBlockThemeSurface = /* @__PURE__ */ defineComponent({\n name: \"QuireCodeBlockThemeSurface\",\n inheritAttrs: false,\n props: {\n /** Auto inherits all host tokens; explicit schemes isolate only source colors. */\n scheme: { type: String as PropType<\"auto\" | \"light\" | \"dark\">, required: true }\n },\n /**\n * Keeps the original business root independent of equivalent style allocations.\n * @param props - Requested source palette or inherited host theme.\n * @param context - Business attributes and stateful slot descendants.\n * @returns Original native root, preserving scoped CSS and descendant identity.\n */\n setup(props, context) {\n let previousScheme: typeof props.scheme | undefined;\n let previousCaller: Record<string, unknown> = {};\n let retained: Readonly<CSSProperties> | undefined;\n return () => {\n // Vue accepts objects, arrays and CSS strings. Compare their normalized\n // values before merging the palette so fresh equivalent caller objects\n // cannot make a content update rewrite every source color.\n const caller = normalizeStyle([context.attrs.style as StyleValue]) as Record<string, unknown>;\n const entries = Object.entries(caller);\n if (previousScheme !== props.scheme || entries.length !== Object.keys(previousCaller).length\n || entries.some(([name, value]) => !Object.hasOwn(previousCaller, name) || !sameValue(previousCaller[name], value))) {\n previousScheme = props.scheme;\n previousCaller = {};\n for (const [name, value] of entries) previousCaller[name] = Array.isArray(value) ? [...value] : value;\n retained = Object.freeze({\n ...(props.scheme === \"auto\" ? {} : codeBlockColors[props.scheme]),\n ...previousCaller as CSSProperties\n });\n }\n // One native root owns attrs, events and Vue's parent scope identifiers.\n // Only palette/style changes invalidate it; all slot updates still render.\n return h(\"div\", { ...context.attrs, style: retained }, context.slots.default?.());\n };\n }\n});\n\nexport default CodeBlockThemeSurface;\n</script>\n","<script setup lang=\"ts\">\nimport { computed, ref, shallowRef, useId, watch } from \"vue\";\nimport { QuireClipboard } from \"../clipboard\";\nimport QuireIcon from \"../icon/icon.vue\";\nimport { quireKitEditorIconData } from \"../../components/icon/catalog\";\nimport CodeLines from \"./code-lines.vue\";\nimport QuireCodeBlockHeader from \"./code-block-header.vue\";\nimport CodeBlockThemeSurface from \"./theme-surface.vue\";\nimport { codeBlockColors } from \"./appearance\";\nimport { useQuireKitMessages } from \"../locale-provider/context\";\nimport type { QuireKitClipboardErrorDetails } from \"../../components/clipboard\";\nimport type {\n QuireKitCodeBlockProps,\n QuireKitCodeBlockSlotProps,\n QuireKitCodeBlockLineSlotProps,\n QuireKitCodeBlockNavigationSlotProps,\n QuireKitCodeBlockActionsSlotProps,\n} from \"./types\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<QuireKitCodeBlockProps>(), {\n collapsed: undefined,\n variant: \"soft\", density: \"regular\", header: true, scheme: \"auto\",\n lineNumbers: false, startLine: 1, highlightedLines: () => [], addedLines: () => [], removedLines: () => [],\n copy: true,\n maxHeight: 400,\n wrap: false,\n collapsible: false,\n defaultCollapsed: true,\n});\nconst text = useQuireKitMessages(\"codeBlock\");\nconst emit = defineEmits<{\n /** Requests a controlled collapse change. */\n \"update:collapsed\": [value: boolean];\n /** The system clipboard successfully received the original source. */\n copy: [];\n /** Clipboard write failed; the public Clipboard trigger retains retry feedback. */\n copyError: [details: QuireKitClipboardErrorDetails];\n}>();\nconst slots = defineSlots<{\n /** Replace the filename and language with a custom title. */\n title?: () => unknown;\n /** Additional controls before the built-in copy action. */\n actions?: (props: QuireKitCodeBlockActionsSlotProps) => unknown;\n /** Navigation above the title and code, such as externally controlled Tabs. */\n navigation?: (props: QuireKitCodeBlockNavigationSlotProps) => unknown;\n /** Trusted token spans within the built-in line renderer. */\n line?: (props: QuireKitCodeBlockLineSlotProps) => unknown;\n /** Complete code element from a trusted highlighter; source text remains the copy authority. */\n code?: (props: QuireKitCodeBlockSlotProps) => unknown;\n}>();\nconst localCollapsed = ref(props.defaultCollapsed);\nconst isCollapsed = computed(\n () => props.collapsible && (props.collapsed ?? localCollapsed.value)\n);\nconst viewport = shallowRef<HTMLElement | null>(null);\nconst trigger = shallowRef<HTMLButtonElement | null>(null);\nconst showHeader = computed(() => props.header || props.collapsible || !!slots.title || !!slots.actions);\nconst renderLines = computed(() => props.lineNumbers || props.highlightedLines?.length || props.addedLines?.length || props.removedLines?.length || !!slots.line);\nconst viewportId = `qk-code-${useId()}`;\nconst height = computed(\n () =>\n `${\n Number.isFinite(props.maxHeight) ? Math.max(48, props.maxHeight) : 400\n }px`\n);\nwatch(isCollapsed, (collapsed) => {\n // A controlled collapse must not leave keyboard focus inside hidden source content.\n if (\n collapsed &&\n viewport.value?.contains(viewport.value.ownerDocument.activeElement)\n )\n trigger.value?.focus();\n});\n/** Toggles local state and notifies controlled consumers through one action. */\nfunction toggle(): void {\n const next = !isCollapsed.value;\n localCollapsed.value = next;\n emit(\"update:collapsed\", next);\n}\n</script>\n<template>\n <CodeBlockThemeSurface :scheme=\"scheme\" class=\"qk-code-block\" data-qk-not-prose :data-variant=\"variant\" :data-density=\"density\"\n :data-qk-scheme=\"scheme === 'auto' ? undefined : scheme\" v-bind=\"$attrs\">\n <div v-if=\"$slots.navigation\" class=\"qk-code-block__navigation\"><slot name=\"navigation\" :content-id=\"`${viewportId}-panel`\" /></div>\n <div :id=\"`${viewportId}-panel`\" class=\"qk-code-block__frame\" :role=\"$slots.navigation ? 'tabpanel' : undefined\"\n :aria-label=\"$slots.navigation ? ariaLabel ?? filename ?? language ?? text.code : undefined\">\n <QuireCodeBlockHeader v-if=\"showHeader\" :code=\"code\" :language=\"language\" :filename=\"filename\"\n :copy=\"copy\" @copy=\"emit('copy')\" @copy-error=\"emit('copyError', $event)\">\n <template v-if=\"$slots.title\" #title><slot name=\"title\" /></template>\n <template #actions>\n <slot name=\"actions\" :content-props=\"scheme === 'auto' ? {} : { 'data-qk-scheme': scheme, style: codeBlockColors[scheme] }\" />\n <button\n v-if=\"collapsible\"\n ref=\"trigger\"\n type=\"button\"\n class=\"qk-code-block__toggle\"\n :aria-controls=\"viewportId\"\n :aria-expanded=\"!isCollapsed\"\n :aria-label=\"isCollapsed ? text.expand : text.collapse\"\n :title=\"isCollapsed ? text.expand : text.collapse\"\n @click=\"toggle\"\n >\n <QuireIcon :data=\"isCollapsed ? quireKitEditorIconData.chevronRight : quireKitEditorIconData.chevronDown\" />\n </button>\n </template>\n </QuireCodeBlockHeader>\n <div v-else-if=\"copy\" class=\"qk-code-block__floating\">\n <QuireClipboard :value=\"code\" :target=\"text.copyTarget\" mode=\"icon\" variant=\"text\"\n @status-change=\"emit('copy')\" @copy-error=\"emit('copyError', $event)\" />\n </div>\n <pre\n :id=\"viewportId\"\n ref=\"viewport\"\n class=\"qk-code-block__viewport\"\n :class=\"{ 'qk-code-block__viewport--wrap': wrap }\"\n :hidden=\"isCollapsed\"\n :style=\"{ maxHeight: height }\"\n tabindex=\"0\"\n :aria-label=\"ariaLabel ?? filename ?? text.code\"\n ><slot name=\"code\" :code=\"code\" :language=\"language\"><CodeLines v-if=\"renderLines\" :code=\"code\" :line-numbers=\"lineNumbers\" :start-line=\"startLine\" :highlighted-lines=\"highlightedLines\" :added-lines=\"addedLines\" :removed-lines=\"removedLines\"><template v-if=\"$slots.line\" #line=\"line\"><slot name=\"line\" v-bind=\"line\" /></template></CodeLines><code v-else>{{ code }}</code></slot></pre>\n </div>\n </CodeBlockThemeSurface>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASA,MAAM,YAAY,IAAI;;;GA4CpB,OAAA,UAAA,GAAA,YA6CY,wBA5CL,MAAA,SAAA,CAAS,GAAA;IACb,MAAM,QAAA;IACP,cAAW;IACX,aAAU;IACT,OAAK,eAAA;;KAA2C,cAAA,QAAA,MAAK,GAAI,QAAA;KAA+B,cAAA,QAAA;KAAc,QAAA,YAAO,UAAA;KAAwC,QAAA,SAAK;;IAO1J,UAAU,QAAA,YAAY,QAAA;IACtB,aAAW,QAAA,QAAQ,KAAA;IACnB,cAAY,QAAA,OAAI,SAAY,KAAA;;IAE7B,SAAA,cAmBO;KAlBC,QAAA,QAAQA,KAAAA,OAAO,WADvB,UAAA,GAAA,mBAmBO,QAAA;;MAjBJ,OAAK,eAAA,CAAA,mBAAA,oBAA0C,QAAA,MAAI,CAAA;MACpD,eAAY;MACZ,aAAU;SAGF,QAAA,QADR,UAAA,GAAA,mBAWM,OAXN,cAWM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAFJ,mBAAiC,QAAA,EAA3B,GAAE,uBAAsB,GAAA,MAAA,EAAA,GAC9B,mBAA8C,QAAA;MAAxC,GAAE;MAAsB,SAAQ;y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,MAAM;4EAEvE,mBASgY,OAAA;KAR7X,IAAI;KACD,SAAA;KAAJ,KAAI;KACJ,OAAK,eAAA,CAAC,2BAAyB,EAAA,iCACY,QAAA,KAAI,CAAA,CAAA;KAC9C,QAAQ,YAAA;KACR,OAAK,eAAA,EAAA,WAAe,OAAA,MAAM,CAAA;KAC3B,UAAS;KACR,cAAY,QAAA,aAAa,QAAA,YAAY,MAAA,IAAA,CAAI,CAAC;QAC5C,WAAyX,KAAA,QAAA,QAAA;KAAtW,MAAM,QAAA;KAAO,UAAU,QAAA;IAA1C,SAAyX,CAApT,YAAA,SAAjB,UAAA,GAAA,YAAgS,aAAA;;KAAjQ,MAAM,QAAA;KAAO,gBAAc,QAAA;KAAc,cAAY,QAAA;KAAY,qBAAmB,QAAA;KAAmB,eAAa,QAAA;KAAa,iBAAe,QAAA;8BAA8BA,KAAAA,OAAO,OAAA;KAAO,MAAA;KAAY,IAAA,SAAN,SAAI,CAAE,WAAkC,KAAA,QAAA,QAAA,eAAA,mBAAR,IAAI,CAAA,CAAA,CAAA,CAAA;;;;;;;;;WAA2B,UAAA,GAAA,mBAA8B,QAAA,YAAA,gBAAd,QAAA,IAAI,GAAA,CAAA,EAAA,CAAA,CAAA,GAAA,IAAA,UAAA,CAAA,GAAA,GAAA,UAAA,CAAA,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as _sfc_main$3, o as useQuireKitMessages, t as _sfc_main$4 } from "./code-block-
|
|
1
|
+
import { l as _sfc_main$3, o as useQuireKitMessages, t as _sfc_main$4 } from "./code-block-BLzjRjTb.mjs";
|
|
2
2
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderList, renderSlot, shallowRef, toDisplayString, unref, useId, useModel, useSlots, watch, withCtx, withModifiers } from "vue";
|
|
3
3
|
import { Tabs } from "@ark-ui/vue/tabs";
|
|
4
4
|
//#region src/vue/tabs/tabs.vue
|
|
@@ -528,4 +528,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
528
528
|
//#endregion
|
|
529
529
|
export { _sfc_main$1 as n, _sfc_main$2 as r, _sfc_main as t };
|
|
530
530
|
|
|
531
|
-
//# sourceMappingURL=html-sandbox-
|
|
531
|
+
//# sourceMappingURL=html-sandbox-D9a7iXbU.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-sandbox-BJeg9mHs.mjs","names":["$attrs"],"sources":["../src/vue/tabs/tabs.vue","../src/vue/prose/preview/preview.vue","../src/vue/html-sandbox/use-runtime.ts","../src/vue/html-sandbox/html-sandbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Tabs } from \"@ark-ui/vue/tabs\";\nimport { computed, ref, watch } from \"vue\";\nimport type {\n QuireKitTabsActivationMode,\n QuireKitTabsItem,\n QuireKitTabsOrientation,\n QuireKitTabsSize\n} from \"../../components/tabs\";\n\n/** Vue Tabs 的公开属性。 */\ninterface Props {\n /** tablist 的可访问名称。 */\n readonly label: string;\n /** Render internal panels; false requires each item to name its external panelId. */\n readonly renderPanels?: boolean;\n /** 面板留白;none 用于内部内容已管理留白的组合场景。 */\n readonly contentPadding?: \"default\" | \"none\";\n /** 按 DOM 顺序渲染的稳定页签。 */\n readonly items: readonly QuireKitTabsItem[];\n /** 未受控使用时的初始页签;省略时选中第一个可用页签。 */\n readonly defaultValue?: string;\n /** 页签布局和方向键导航方向。 */\n readonly orientation?: QuireKitTabsOrientation;\n /** 页签高度与排版尺寸。 */\n readonly size?: QuireKitTabsSize;\n /** 聚焦页签时自动选中,或等待 Enter/Space 手动确认。 */\n readonly activationMode?: QuireKitTabsActivationMode;\n /** 键盘导航是否从末项循环至首项。 */\n readonly loopFocus?: boolean;\n /** 是否延迟挂载尚未访问的面板。 */\n readonly lazyMount?: boolean;\n /** 面板退出时是否卸载其内容。 */\n readonly unmountOnExit?: boolean;\n}\n\n/** 页签标签插槽的稳定上下文。 */\ninterface TriggerSlotProps {\n /** 当前页签合同。 */\n readonly item: QuireKitTabsItem;\n /** 当前页签是否已选中。 */\n readonly selected: boolean;\n}\n\n/** 页签面板插槽的稳定上下文。 */\ninterface ContentSlotProps {\n /** 当前页签合同。 */\n readonly item: QuireKitTabsItem;\n /** 当前面板是否处于选中状态。 */\n readonly selected: boolean;\n}\n\n/** Tabs 的可替换内容位置。 */\ninterface Slots {\n /** 替换页签的可见标签。 */\n readonly trigger?: (props: TriggerSlotProps) => unknown;\n /** 替换每个页签面板内容。 */\n readonly content?: (props: ContentSlotProps) => unknown;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n renderPanels: true,\n contentPadding: \"default\",\n orientation: \"horizontal\",\n size: \"sm\",\n activationMode: \"automatic\",\n loopFocus: true,\n lazyMount: false,\n unmountOnExit: false\n});\nconst selectedValue = defineModel<string | undefined>();\ndefineSlots<Slots>();\n\nconst initialValue = computed(() => (\n props.defaultValue ?? props.items.find((item) => item.disabled !== true)?.value\n));\nconst currentValue = computed(() => selectedValue.value ?? initialValue.value);\n// Ark 5.39 presence only records a visit after present changes, so an initially\n// selected lazy panel can be destroyed on its first exit. Keep Ark's panel/focus\n// ownership and apply the public mount policy to slot contents instead.\nconst visited = ref(new Set<string>());\nwatch(currentValue, value => {\n if (value !== undefined) visited.value.add(value);\n}, { immediate: true });\nconst optionalRootProps = computed(() => ({\n ...(selectedValue.value === undefined ? {} : { modelValue: selectedValue.value }),\n ...(initialValue.value === undefined ? {} : { defaultValue: initialValue.value })\n}));\n\n/** 把 Ark 的下一值同步给可选的 v-model。 */\nfunction updateValue(value: string): void {\n selectedValue.value = value;\n}\n</script>\n\n<template>\n <Tabs.Root\n v-bind=\"optionalRootProps\"\n :orientation=\"orientation\"\n :activation-mode=\"activationMode\"\n :loop-focus=\"loopFocus\"\n :class=\"['qk-tabs', `qk-tabs--${orientation}`]\"\n @update:model-value=\"updateValue\"\n >\n <Tabs.List\n :aria-label=\"label\"\n :class=\"['qk-tabs__list', `qk-tabs__list--${orientation}`]\"\n >\n <Tabs.Trigger\n v-for=\"item in items\"\n :key=\"item.value\"\n :value=\"item.value\"\n v-bind=\"item.panelId ? { 'aria-controls': item.panelId } : {}\"\n :disabled=\"item.disabled\"\n :class=\"['qk-tabs__trigger', `qk-tabs__trigger--${size}`]\"\n >\n <slot name=\"trigger\" :item=\"item\" :selected=\"currentValue === item.value\">\n {{ item.label }}\n </slot>\n </Tabs.Trigger>\n <Tabs.Indicator class=\"qk-tabs__indicator\" />\n </Tabs.List>\n\n <div v-if=\"renderPanels\" class=\"qk-tabs__panels\">\n <Tabs.Content\n v-for=\"item in items\"\n :key=\"item.value\"\n :value=\"item.value\"\n class=\"qk-tabs__content\"\n :style=\"contentPadding === 'none' ? { padding: 0 } : undefined\"\n >\n <slot v-if=\"(!lazyMount || visited.has(item.value)) && (!unmountOnExit || currentValue === item.value)\" name=\"content\" :item=\"item\" :selected=\"currentValue === item.value\">\n {{ item.content }}\n </slot>\n </Tabs.Content>\n </div>\n </Tabs.Root>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, watch } from \"vue\";\nimport { QuireTabs } from \"../../tabs\";\nimport { useQuireKitMessages } from \"../../locale-provider/context\";\nimport type { QuireKitProsePreviewMode, QuireKitProsePreviewProps, QuireKitProsePreviewSlots } from \"./types\";\nconst props = withDefaults(defineProps<QuireKitProsePreviewProps>(), { defaultValue: \"preview\", overflow: \"hidden\" });\nconst text = useQuireKitMessages(\"prose\");\nconst slots = defineSlots<QuireKitProsePreviewSlots>();\nconst value = defineModel<QuireKitProsePreviewMode>();\nconst current = computed(() => value.value ?? props.defaultValue);\nconst sourceOpened = ref(false);\n// Keep content ownership separate from the Tabs panel shell: preview remains\n// mounted; expensive source is created on first access and survives later visits.\nwatch(current, next => { if (next === \"source\") sourceOpened.value = true; }, { immediate: true });\nconst items = computed(() => [{ value: \"preview\", label: text.value.preview }, { value: \"source\", label: text.value.source }]);\n/** @param next - Next value from the shared Tabs controller. */\nfunction update(next: string | undefined): void {\n if (next === \"preview\" || next === \"source\") value.value = next;\n}\n</script>\n<template>\n <div class=\"qk-prose-preview\" :style=\"{ overflow }\" data-qk-not-prose data-qk-not-typography>\n <QuireTabs v-if=\"slots.source\" :model-value=\"current\" :items=\"items\" :label=\"label ?? text.previewTabs\" size=\"md\" content-padding=\"none\" @update:model-value=\"update\">\n <template #content=\"{ item }\">\n <div v-if=\"item.value === 'preview'\" class=\"qk-prose-preview__content\"><slot /></div>\n <div v-else-if=\"sourceOpened\" class=\"qk-prose-preview__source\"><slot name=\"source\" /></div>\n </template>\n </QuireTabs>\n <div v-else class=\"qk-prose-preview__content\"><slot /></div>\n </div>\n</template>\n","import { computed, onBeforeUnmount, onMounted, ref, shallowRef, useId, watch, type ShallowRef } from \"vue\";\nimport type { HtmlSandboxHandle } from \"@quirekit/html-sandbox/browser\";\nimport type { HtmlSandboxDiagnostic, HtmlSandboxEvent, HtmlSandboxState } from \"@quirekit/html-sandbox\";\nimport type { HtmlSandboxComponentEvents, QuireKitHtmlSandboxProps } from \"./types\";\n\n/** Bind one lazy browser controller to the Vue lifecycle without duplicating execution state.\n * @param props - Readonly component inputs. @param events - Typed public event sink. @param mount - Template-owned container ref. @returns Mount, state and actions.\n */\nexport function useHtmlSandboxRuntime(props: QuireKitHtmlSandboxProps, events: HtmlSandboxComponentEvents, mount: ShallowRef<HTMLElement | undefined>) {\n const state = shallowRef<HtmlSandboxState>({ phase: \"idle\", dirty: false, runId: 0 });\n const logs = shallowRef<readonly HtmlSandboxDiagnostic[]>([]);\n const measured = ref(320);\n const pending = ref(true);\n let loading = false;\n const fallbackIdentity = `html-sandbox-${useId()}`;\n let runtime: HtmlSandboxHandle | undefined;\n let load: Promise<void> | undefined;\n let disposed = false;\n let mounted = false;\n let paused = false;\n let geometryTick = 0;\n let geometryChanges = 0;\n let geometryFrozen = false;\n const source = computed(() => ({ html: props.html, complete: props.complete ?? true, identity: props.identity ?? fallbackIdentity }));\n const bounds = computed(() => {\n const setting = props.height;\n /** @param value - Host dimension. @param fallback - Default dimension. @returns Finite bounded height. */\n const clamp = (value: number | undefined, fallback: number): number => Number.isFinite(value) ? Math.min(2000, Math.max(80, value!)) : fallback;\n if (typeof setting === \"number\" || setting === undefined) return { auto: false, min: 80, max: 2000, initial: clamp(setting, 320) };\n const min = clamp(setting.min, 160), max = Math.max(min, clamp(setting.max, 800));\n return { auto: true, min, max, initial: Math.max(min, Math.min(max, clamp(setting.initial, 320))) };\n });\n const height = computed(() => bounds.value.auto ? Math.max(bounds.value.min, Math.min(bounds.value.max, measured.value)) : bounds.value.initial);\n watch(bounds, value => { measured.value = value.initial; geometryFrozen = false; geometryChanges = 0; }, { immediate: true });\n /** @param diagnostic - Bounded plain-text report. */\n function diagnostic(diagnostic: HtmlSandboxDiagnostic): void {\n logs.value = [...logs.value.slice(-199), diagnostic];\n events.diagnostic(diagnostic);\n }\n /** @param event - Validated controller event. */\n function receive(event: HtmlSandboxEvent): void {\n if (disposed) return;\n if (event.type === \"state\") {\n if (event.state.runId !== state.value.runId || event.state.phase === \"idle\") { logs.value = []; geometryFrozen = false; geometryChanges = 0; }\n state.value = event.state;\n events.state(event.state);\n } else if (event.type === \"diagnostic\") diagnostic(event.diagnostic);\n else if (event.type === \"exit\") events.exit();\n else if (event.type === \"resize\" && bounds.value.auto && !geometryFrozen) {\n const next = Math.max(bounds.value.min, Math.min(bounds.value.max, Math.ceil(event.height)));\n if (next === measured.value) return;\n const now = Date.now();\n if (now - geometryTick > 2000) { geometryTick = now; geometryChanges = 0; }\n if (++geometryChanges > 30) {\n geometryFrozen = true;\n diagnostic({ code: \"sandbox.resize-unstable\", message: \"sandbox.resize-unstable\", level: \"warn\", untrusted: false });\n return;\n }\n measured.value = next;\n }\n }\n watch(height, value => events.resize(value));\n /** Load only for mounted sandbox consumers; imports do not touch browser globals. */\n async function initialize(): Promise<void> {\n if (disposed || runtime || loading || !mount.value) return;\n pending.value = true;\n loading = true;\n try {\n const { createHtmlSandbox } = await import(\"@quirekit/html-sandbox/browser\");\n if (disposed || !mount.value) return;\n runtime = createHtmlSandbox({ container: mount.value, source: source.value, ...(props.config ? { config: props.config } : {}), ...(props.title ? { title: props.title } : {}), onEvent: receive });\n if (paused) runtime.stop();\n } catch (error) {\n if (!disposed) {\n state.value = { phase: \"failed\", dirty: false, runId: 0 };\n events.state(state.value);\n diagnostic({ code: \"sandbox.initialize-failed\", message: String(error).slice(0, 4096), level: \"error\", untrusted: false });\n }\n } finally { pending.value = false; loading = false; }\n }\n // Ark may publish the initial tab panel after the parent mounted hook.\n // Observe the actual mount target, not just the component lifecycle.\n onMounted(() => { mounted = true; if (mount.value) load = initialize(); });\n watch(mount, value => { if (value && mounted && !runtime && !loading) load = initialize(); }, { flush: \"post\" });\n watch(source, value => { runtime?.update(value); });\n watch(() => props.config, value => { runtime?.configure(value ?? {}); }, { deep: true });\n onBeforeUnmount(() => { disposed = true; runtime?.destroy(); runtime = undefined; });\n /** @returns Admission result, after any pending module load. */\n async function run(): Promise<boolean> {\n paused = false;\n const identity = source.value.identity;\n const previousRun = state.value.runId;\n const wasPending = !runtime;\n if (!runtime) { if (!loading) load = initialize(); await load; }\n if (disposed || paused || source.value.identity !== identity) return false;\n if (wasPending && state.value.runId > previousRun && (state.value.phase === \"starting\" || state.value.phase === \"running\")) return true;\n runtime?.configure(props.config ?? {});\n runtime?.update(source.value);\n return runtime?.run() ?? false;\n }\n /** Also cancels a run waiting for the dynamic import to finish. */\n function stop(): void { paused = true; runtime?.stop(); }\n return { mount, state, logs, pending, height, run, stop };\n}\n","<script setup lang=\"ts\">\nimport { computed, ref, shallowRef, watch } from \"vue\";\nimport { QuireButton } from \"../button\";\nimport { QuireCodeBlock } from \"../code-block\";\nimport { QuireProsePreview } from \"../prose/preview\";\nimport { useQuireKitMessages } from \"../locale-provider/context\";\nimport { useHtmlSandboxRuntime } from \"./use-runtime\";\nimport type { HtmlSandboxDiagnostic, HtmlSandboxState } from \"@quirekit/html-sandbox\";\nimport type { QuireKitHtmlSandboxProps, QuireKitHtmlSandboxExpose } from \"./types\";\n\nconst props = withDefaults(defineProps<QuireKitHtmlSandboxProps>(), { complete: true, interactionGated: false });\ndefineOptions({ inheritAttrs: false });\nconst emit = defineEmits<{\n /** Current execution phase and dirty state. */ \"state-change\": [state: HtmlSandboxState];\n /** Bounded text-only report. */ diagnostic: [diagnostic: HtmlSandboxDiagnostic];\n /** Applied viewport height in CSS pixels. */ resize: [height: number];\n}>();\nconst text = useQuireKitMessages(\"htmlSandbox\");\nconst outer = ref<HTMLElement>();\nconst entered = ref(false);\nconst expanded = ref(false);\nconst mount = shallowRef<HTMLElement>();\nconst { state, logs, pending, height, run, stop } = useHtmlSandboxRuntime(props, {\n state: value => emit(\"state-change\", value), diagnostic: value => emit(\"diagnostic\", value), resize: value => emit(\"resize\", value),\n exit: leave,\n}, mount);\nconst active = computed(() => state.value.phase === \"starting\" || state.value.phase === \"running\");\nconst name = computed(() => props.title ?? text.value.title);\nconst status = computed(() => !props.complete ? text.value.incomplete : props.config?.execution === \"disabled\" ? text.value.disabled : state.value.dirty ? text.value.dirty : text.value[state.value.phase]);\nwatch(() => [props.identity, state.value.runId, active.value], () => { entered.value = false; });\n/** Restore focus to a trusted control; guest Escape is only a convenience. */\nfunction leave(): void {\n entered.value = false;\n outer.value?.querySelector<HTMLButtonElement>(\"button\")?.focus();\n}\n/** Enter an embedded page explicitly while the editor owns block selection. */\nfunction enter(): void { entered.value = true; mount.value?.querySelector(\"iframe\")?.focus(); }\n/** @returns Whether the current complete source was admitted. */\nasync function execute(): Promise<boolean> { return run(); }\ndefineExpose<QuireKitHtmlSandboxExpose>({ run: execute, stop });\n</script>\n<template>\n <section ref=\"outer\" v-bind=\"$attrs\" class=\"qk-html-sandbox\" :aria-label=\"name\" data-qk-not-prose data-qk-not-typography :data-phase=\"state.phase\">\n <div class=\"qk-html-sandbox__toolbar\">\n <span class=\"qk-html-sandbox__title\">{{ name }}</span>\n <span class=\"qk-html-sandbox__status\" role=\"status\">{{ status }}</span>\n <QuireButton variant=\"soft\" :disabled=\"!complete || config?.execution === 'disabled' || pending\" @click=\"execute\">{{ active ? text.rerun : text.run }}</QuireButton>\n <QuireButton :disabled=\"!active && !pending\" @click=\"stop\">{{ text.stop }}</QuireButton>\n <QuireButton v-if=\"interactionGated && entered\" @click=\"leave\">{{ text.leave }}</QuireButton>\n </div>\n <QuireProsePreview :label=\"name\">\n <div class=\"qk-html-sandbox__viewport\" :style=\"{ height: `${height}px` }\">\n <div ref=\"mount\" class=\"qk-html-sandbox__mount\" :inert=\"interactionGated && !entered\" />\n <div v-if=\"!active\" class=\"qk-html-sandbox__placeholder\"><span>{{ status }}</span></div>\n <div v-else-if=\"interactionGated && !entered\" class=\"qk-html-sandbox__gate\">\n <QuireButton variant=\"solid\" @click.stop=\"enter\">{{ text.enter }}</QuireButton>\n </div>\n </div>\n <template #source><QuireCodeBlock :code=\"html\" language=\"html\" variant=\"plain\" :max-height=\"height\" /></template>\n </QuireProsePreview>\n <div v-if=\"logs.length\" class=\"qk-html-sandbox__diagnostics\">\n <QuireButton :aria-expanded=\"expanded\" @click=\"expanded = !expanded\">{{ text.logs }} · {{ logs.length }}</QuireButton>\n <ol v-if=\"expanded\" class=\"qk-html-sandbox__logs\" :aria-label=\"text.logs\">\n <li v-for=\"(entry, index) in logs\" :key=\"index\"><span>{{ entry.level }} · {{ entry.code }}</span><pre>{{ entry.message }}</pre></li>\n </ol>\n </div>\n </section>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DA,MAAM,QAAQ;EAUd,MAAM,gBAAgB,SAA+B,SAAA,YAAC;EAGtD,MAAM,eAAe,eACnB,MAAM,gBAAgB,MAAM,MAAM,MAAM,SAAS,KAAK,aAAa,IAAI,CAAC,EAAE,KAC3E;EACD,MAAM,eAAe,eAAe,cAAc,SAAS,aAAa,KAAK;EAI7E,MAAM,UAAU,o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.ts","../src/vue/html-sandbox/html-sandbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Tabs } from \"@ark-ui/vue/tabs\";\nimport { computed, ref, watch } from \"vue\";\nimport type {\n QuireKitTabsActivationMode,\n QuireKitTabsItem,\n QuireKitTabsOrientation,\n QuireKitTabsSize\n} from \"../../components/tabs\";\n\n/** Vue Tabs 的公开属性。 */\ninterface Props {\n /** tablist 的可访问名称。 */\n readonly label: string;\n /** Render internal panels; false requires each item to name its external panelId. */\n readonly renderPanels?: boolean;\n /** 面板留白;none 用于内部内容已管理留白的组合场景。 */\n readonly contentPadding?: \"default\" | \"none\";\n /** 按 DOM 顺序渲染的稳定页签。 */\n readonly items: readonly QuireKitTabsItem[];\n /** 未受控使用时的初始页签;省略时选中第一个可用页签。 */\n readonly defaultValue?: string;\n /** 页签布局和方向键导航方向。 */\n readonly orientation?: QuireKitTabsOrientation;\n /** 页签高度与排版尺寸。 */\n readonly size?: QuireKitTabsSize;\n /** 聚焦页签时自动选中,或等待 Enter/Space 手动确认。 */\n readonly activationMode?: QuireKitTabsActivationMode;\n /** 键盘导航是否从末项循环至首项。 */\n readonly loopFocus?: boolean;\n /** 是否延迟挂载尚未访问的面板。 */\n readonly lazyMount?: boolean;\n /** 面板退出时是否卸载其内容。 */\n readonly unmountOnExit?: boolean;\n}\n\n/** 页签标签插槽的稳定上下文。 */\ninterface TriggerSlotProps {\n /** 当前页签合同。 */\n readonly item: QuireKitTabsItem;\n /** 当前页签是否已选中。 */\n readonly selected: boolean;\n}\n\n/** 页签面板插槽的稳定上下文。 */\ninterface ContentSlotProps {\n /** 当前页签合同。 */\n readonly item: QuireKitTabsItem;\n /** 当前面板是否处于选中状态。 */\n readonly selected: boolean;\n}\n\n/** Tabs 的可替换内容位置。 */\ninterface Slots {\n /** 替换页签的可见标签。 */\n readonly trigger?: (props: TriggerSlotProps) => unknown;\n /** 替换每个页签面板内容。 */\n readonly content?: (props: ContentSlotProps) => unknown;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n renderPanels: true,\n contentPadding: \"default\",\n orientation: \"horizontal\",\n size: \"sm\",\n activationMode: \"automatic\",\n loopFocus: true,\n lazyMount: false,\n unmountOnExit: false\n});\nconst selectedValue = defineModel<string | undefined>();\ndefineSlots<Slots>();\n\nconst initialValue = computed(() => (\n props.defaultValue ?? props.items.find((item) => item.disabled !== true)?.value\n));\nconst currentValue = computed(() => selectedValue.value ?? initialValue.value);\n// Ark 5.39 presence only records a visit after present changes, so an initially\n// selected lazy panel can be destroyed on its first exit. Keep Ark's panel/focus\n// ownership and apply the public mount policy to slot contents instead.\nconst visited = ref(new Set<string>());\nwatch(currentValue, value => {\n if (value !== undefined) visited.value.add(value);\n}, { immediate: true });\nconst optionalRootProps = computed(() => ({\n ...(selectedValue.value === undefined ? {} : { modelValue: selectedValue.value }),\n ...(initialValue.value === undefined ? {} : { defaultValue: initialValue.value })\n}));\n\n/** 把 Ark 的下一值同步给可选的 v-model。 */\nfunction updateValue(value: string): void {\n selectedValue.value = value;\n}\n</script>\n\n<template>\n <Tabs.Root\n v-bind=\"optionalRootProps\"\n :orientation=\"orientation\"\n :activation-mode=\"activationMode\"\n :loop-focus=\"loopFocus\"\n :class=\"['qk-tabs', `qk-tabs--${orientation}`]\"\n @update:model-value=\"updateValue\"\n >\n <Tabs.List\n :aria-label=\"label\"\n :class=\"['qk-tabs__list', `qk-tabs__list--${orientation}`]\"\n >\n <Tabs.Trigger\n v-for=\"item in items\"\n :key=\"item.value\"\n :value=\"item.value\"\n v-bind=\"item.panelId ? { 'aria-controls': item.panelId } : {}\"\n :disabled=\"item.disabled\"\n :class=\"['qk-tabs__trigger', `qk-tabs__trigger--${size}`]\"\n >\n <slot name=\"trigger\" :item=\"item\" :selected=\"currentValue === item.value\">\n {{ item.label }}\n </slot>\n </Tabs.Trigger>\n <Tabs.Indicator class=\"qk-tabs__indicator\" />\n </Tabs.List>\n\n <div v-if=\"renderPanels\" class=\"qk-tabs__panels\">\n <Tabs.Content\n v-for=\"item in items\"\n :key=\"item.value\"\n :value=\"item.value\"\n class=\"qk-tabs__content\"\n :style=\"contentPadding === 'none' ? { padding: 0 } : undefined\"\n >\n <slot v-if=\"(!lazyMount || visited.has(item.value)) && (!unmountOnExit || currentValue === item.value)\" name=\"content\" :item=\"item\" :selected=\"currentValue === item.value\">\n {{ item.content }}\n </slot>\n </Tabs.Content>\n </div>\n </Tabs.Root>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, watch } from \"vue\";\nimport { QuireTabs } from \"../../tabs\";\nimport { useQuireKitMessages } from \"../../locale-provider/context\";\nimport type { QuireKitProsePreviewMode, QuireKitProsePreviewProps, QuireKitProsePreviewSlots } from \"./types\";\nconst props = withDefaults(defineProps<QuireKitProsePreviewProps>(), { defaultValue: \"preview\", overflow: \"hidden\" });\nconst text = useQuireKitMessages(\"prose\");\nconst slots = defineSlots<QuireKitProsePreviewSlots>();\nconst value = defineModel<QuireKitProsePreviewMode>();\nconst current = computed(() => value.value ?? props.defaultValue);\nconst sourceOpened = ref(false);\n// Keep content ownership separate from the Tabs panel shell: preview remains\n// mounted; expensive source is created on first access and survives later visits.\nwatch(current, next => { if (next === \"source\") sourceOpened.value = true; }, { immediate: true });\nconst items = computed(() => [{ value: \"preview\", label: text.value.preview }, { value: \"source\", label: text.value.source }]);\n/** @param next - Next value from the shared Tabs controller. */\nfunction update(next: string | undefined): void {\n if (next === \"preview\" || next === \"source\") value.value = next;\n}\n</script>\n<template>\n <div class=\"qk-prose-preview\" :style=\"{ overflow }\" data-qk-not-prose data-qk-not-typography>\n <QuireTabs v-if=\"slots.source\" :model-value=\"current\" :items=\"items\" :label=\"label ?? text.previewTabs\" size=\"md\" content-padding=\"none\" @update:model-value=\"update\">\n <template #content=\"{ item }\">\n <div v-if=\"item.value === 'preview'\" class=\"qk-prose-preview__content\"><slot /></div>\n <div v-else-if=\"sourceOpened\" class=\"qk-prose-preview__source\"><slot name=\"source\" /></div>\n </template>\n </QuireTabs>\n <div v-else class=\"qk-prose-preview__content\"><slot /></div>\n </div>\n</template>\n","import { computed, onBeforeUnmount, onMounted, ref, shallowRef, useId, watch, type ShallowRef } from \"vue\";\nimport type { HtmlSandboxHandle } from \"@quirekit/html-sandbox/browser\";\nimport type { HtmlSandboxDiagnostic, HtmlSandboxEvent, HtmlSandboxState } from \"@quirekit/html-sandbox\";\nimport type { HtmlSandboxComponentEvents, QuireKitHtmlSandboxProps } from \"./types\";\n\n/** Bind one lazy browser controller to the Vue lifecycle without duplicating execution state.\n * @param props - Readonly component inputs. @param events - Typed public event sink. @param mount - Template-owned container ref. @returns Mount, state and actions.\n */\nexport function useHtmlSandboxRuntime(props: QuireKitHtmlSandboxProps, events: HtmlSandboxComponentEvents, mount: ShallowRef<HTMLElement | undefined>) {\n const state = shallowRef<HtmlSandboxState>({ phase: \"idle\", dirty: false, runId: 0 });\n const logs = shallowRef<readonly HtmlSandboxDiagnostic[]>([]);\n const measured = ref(320);\n const pending = ref(true);\n let loading = false;\n const fallbackIdentity = `html-sandbox-${useId()}`;\n let runtime: HtmlSandboxHandle | undefined;\n let load: Promise<void> | undefined;\n let disposed = false;\n let mounted = false;\n let paused = false;\n let geometryTick = 0;\n let geometryChanges = 0;\n let geometryFrozen = false;\n const source = computed(() => ({ html: props.html, complete: props.complete ?? true, identity: props.identity ?? fallbackIdentity }));\n const bounds = computed(() => {\n const setting = props.height;\n /** @param value - Host dimension. @param fallback - Default dimension. @returns Finite bounded height. */\n const clamp = (value: number | undefined, fallback: number): number => Number.isFinite(value) ? Math.min(2000, Math.max(80, value!)) : fallback;\n if (typeof setting === \"number\" || setting === undefined) return { auto: false, min: 80, max: 2000, initial: clamp(setting, 320) };\n const min = clamp(setting.min, 160), max = Math.max(min, clamp(setting.max, 800));\n return { auto: true, min, max, initial: Math.max(min, Math.min(max, clamp(setting.initial, 320))) };\n });\n const height = computed(() => bounds.value.auto ? Math.max(bounds.value.min, Math.min(bounds.value.max, measured.value)) : bounds.value.initial);\n watch(bounds, value => { measured.value = value.initial; geometryFrozen = false; geometryChanges = 0; }, { immediate: true });\n /** @param diagnostic - Bounded plain-text report. */\n function diagnostic(diagnostic: HtmlSandboxDiagnostic): void {\n logs.value = [...logs.value.slice(-199), diagnostic];\n events.diagnostic(diagnostic);\n }\n /** @param event - Validated controller event. */\n function receive(event: HtmlSandboxEvent): void {\n if (disposed) return;\n if (event.type === \"state\") {\n if (event.state.runId !== state.value.runId || event.state.phase === \"idle\") { logs.value = []; geometryFrozen = false; geometryChanges = 0; }\n state.value = event.state;\n events.state(event.state);\n } else if (event.type === \"diagnostic\") diagnostic(event.diagnostic);\n else if (event.type === \"exit\") events.exit();\n else if (event.type === \"resize\" && bounds.value.auto && !geometryFrozen) {\n const next = Math.max(bounds.value.min, Math.min(bounds.value.max, Math.ceil(event.height)));\n if (next === measured.value) return;\n const now = Date.now();\n if (now - geometryTick > 2000) { geometryTick = now; geometryChanges = 0; }\n if (++geometryChanges > 30) {\n geometryFrozen = true;\n diagnostic({ code: \"sandbox.resize-unstable\", message: \"sandbox.resize-unstable\", level: \"warn\", untrusted: false });\n return;\n }\n measured.value = next;\n }\n }\n watch(height, value => events.resize(value));\n /** Load only for mounted sandbox consumers; imports do not touch browser globals. */\n async function initialize(): Promise<void> {\n if (disposed || runtime || loading || !mount.value) return;\n pending.value = true;\n loading = true;\n try {\n const { createHtmlSandbox } = await import(\"@quirekit/html-sandbox/browser\");\n if (disposed || !mount.value) return;\n runtime = createHtmlSandbox({ container: mount.value, source: source.value, ...(props.config ? { config: props.config } : {}), ...(props.title ? { title: props.title } : {}), onEvent: receive });\n if (paused) runtime.stop();\n } catch (error) {\n if (!disposed) {\n state.value = { phase: \"failed\", dirty: false, runId: 0 };\n events.state(state.value);\n diagnostic({ code: \"sandbox.initialize-failed\", message: String(error).slice(0, 4096), level: \"error\", untrusted: false });\n }\n } finally { pending.value = false; loading = false; }\n }\n // Ark may publish the initial tab panel after the parent mounted hook.\n // Observe the actual mount target, not just the component lifecycle.\n onMounted(() => { mounted = true; if (mount.value) load = initialize(); });\n watch(mount, value => { if (value && mounted && !runtime && !loading) load = initialize(); }, { flush: \"post\" });\n watch(source, value => { runtime?.update(value); });\n watch(() => props.config, value => { runtime?.configure(value ?? {}); }, { deep: true });\n onBeforeUnmount(() => { disposed = true; runtime?.destroy(); runtime = undefined; });\n /** @returns Admission result, after any pending module load. */\n async function run(): Promise<boolean> {\n paused = false;\n const identity = source.value.identity;\n const previousRun = state.value.runId;\n const wasPending = !runtime;\n if (!runtime) { if (!loading) load = initialize(); await load; }\n if (disposed || paused || source.value.identity !== identity) return false;\n if (wasPending && state.value.runId > previousRun && (state.value.phase === \"starting\" || state.value.phase === \"running\")) return true;\n runtime?.configure(props.config ?? {});\n runtime?.update(source.value);\n return runtime?.run() ?? false;\n }\n /** Also cancels a run waiting for the dynamic import to finish. */\n function stop(): void { paused = true; runtime?.stop(); }\n return { mount, state, logs, pending, height, run, stop };\n}\n","<script setup lang=\"ts\">\nimport { computed, ref, shallowRef, watch } from \"vue\";\nimport { QuireButton } from \"../button\";\nimport { QuireCodeBlock } from \"../code-block\";\nimport { QuireProsePreview } from \"../prose/preview\";\nimport { useQuireKitMessages } from \"../locale-provider/context\";\nimport { useHtmlSandboxRuntime } from \"./use-runtime\";\nimport type { HtmlSandboxDiagnostic, HtmlSandboxState } from \"@quirekit/html-sandbox\";\nimport type { QuireKitHtmlSandboxProps, QuireKitHtmlSandboxExpose } from \"./types\";\n\nconst props = withDefaults(defineProps<QuireKitHtmlSandboxProps>(), { complete: true, interactionGated: false });\ndefineOptions({ inheritAttrs: false });\nconst emit = defineEmits<{\n /** Current execution phase and dirty state. */ \"state-change\": [state: HtmlSandboxState];\n /** Bounded text-only report. */ diagnostic: [diagnostic: HtmlSandboxDiagnostic];\n /** Applied viewport height in CSS pixels. */ resize: [height: number];\n}>();\nconst text = useQuireKitMessages(\"htmlSandbox\");\nconst outer = ref<HTMLElement>();\nconst entered = ref(false);\nconst expanded = ref(false);\nconst mount = shallowRef<HTMLElement>();\nconst { state, logs, pending, height, run, stop } = useHtmlSandboxRuntime(props, {\n state: value => emit(\"state-change\", value), diagnostic: value => emit(\"diagnostic\", value), resize: value => emit(\"resize\", value),\n exit: leave,\n}, mount);\nconst active = computed(() => state.value.phase === \"starting\" || state.value.phase === \"running\");\nconst name = computed(() => props.title ?? text.value.title);\nconst status = computed(() => !props.complete ? text.value.incomplete : props.config?.execution === \"disabled\" ? text.value.disabled : state.value.dirty ? text.value.dirty : text.value[state.value.phase]);\nwatch(() => [props.identity, state.value.runId, active.value], () => { entered.value = false; });\n/** Restore focus to a trusted control; guest Escape is only a convenience. */\nfunction leave(): void {\n entered.value = false;\n outer.value?.querySelector<HTMLButtonElement>(\"button\")?.focus();\n}\n/** Enter an embedded page explicitly while the editor owns block selection. */\nfunction enter(): void { entered.value = true; mount.value?.querySelector(\"iframe\")?.focus(); }\n/** @returns Whether the current complete source was admitted. */\nasync function execute(): Promise<boolean> { return run(); }\ndefineExpose<QuireKitHtmlSandboxExpose>({ run: execute, stop });\n</script>\n<template>\n <section ref=\"outer\" v-bind=\"$attrs\" class=\"qk-html-sandbox\" :aria-label=\"name\" data-qk-not-prose data-qk-not-typography :data-phase=\"state.phase\">\n <div class=\"qk-html-sandbox__toolbar\">\n <span class=\"qk-html-sandbox__title\">{{ name }}</span>\n <span class=\"qk-html-sandbox__status\" role=\"status\">{{ status }}</span>\n <QuireButton variant=\"soft\" :disabled=\"!complete || config?.execution === 'disabled' || pending\" @click=\"execute\">{{ active ? text.rerun : text.run }}</QuireButton>\n <QuireButton :disabled=\"!active && !pending\" @click=\"stop\">{{ text.stop }}</QuireButton>\n <QuireButton v-if=\"interactionGated && entered\" @click=\"leave\">{{ text.leave }}</QuireButton>\n </div>\n <QuireProsePreview :label=\"name\">\n <div class=\"qk-html-sandbox__viewport\" :style=\"{ height: `${height}px` }\">\n <div ref=\"mount\" class=\"qk-html-sandbox__mount\" :inert=\"interactionGated && !entered\" />\n <div v-if=\"!active\" class=\"qk-html-sandbox__placeholder\"><span>{{ status }}</span></div>\n <div v-else-if=\"interactionGated && !entered\" class=\"qk-html-sandbox__gate\">\n <QuireButton variant=\"solid\" @click.stop=\"enter\">{{ text.enter }}</QuireButton>\n </div>\n </div>\n <template #source><QuireCodeBlock :code=\"html\" language=\"html\" variant=\"plain\" :max-height=\"height\" /></template>\n </QuireProsePreview>\n <div v-if=\"logs.length\" class=\"qk-html-sandbox__diagnostics\">\n <QuireButton :aria-expanded=\"expanded\" @click=\"expanded = !expanded\">{{ text.logs }} · {{ logs.length }}</QuireButton>\n <ol v-if=\"expanded\" class=\"qk-html-sandbox__logs\" :aria-label=\"text.logs\">\n <li v-for=\"(entry, index) in logs\" :key=\"index\"><span>{{ entry.level }} · {{ entry.code }}</span><pre>{{ entry.message }}</pre></li>\n </ol>\n </div>\n </section>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DA,MAAM,QAAQ;EAUd,MAAM,gBAAgB,SAA+B,SAAA,YAAC;EAGtD,MAAM,eAAe,eACnB,MAAM,gBAAgB,MAAM,MAAM,MAAM,SAAS,KAAK,aAAa,IAAI,CAAC,EAAE,KAC3E;EACD,MAAM,eAAe,eAAe,cAAc,SAAS,aAAa,KAAK;EAI7E,MAAM,UAAU,oBAAI,IAAI,IAAY,CAAC;EACrC,MAAM,eAAc,UAAS;GAC3B,IAAI,UAAU,KAAA,GAAW,QAAQ,MAAM,IAAI,KAAK;EAClD,GAAG,EAAE,WAAW,KAAK,CAAC;EACtB,MAAM,oBAAoB,gBAAgB;GACxC,GAAI,cAAc,UAAU,KAAA,IAAY,CAAC,IAAI,EAAE,YAAY,cAAc,MAAM;GAC/E,GAAI,aAAa,UAAU,KAAA,IAAY,CAAC,IAAI,EAAE,cAAc,aAAa,MAAM;EACjF,EAAE;;EAGF,SAAS,YAAY,OAAqB;GACxC,cAAc,QAAQ;EACxB;;GAIE,OAAA,UAAA,GAAA,YAwCY,MAAA,IAAA,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