@quirekit/ui 0.0.3 → 0.1.0
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/LICENSE.md +1 -1
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/{catalog-AqWLE58Z.mjs → catalog-TxH_u9wJ.mjs} +318 -276
- package/dist/catalog-TxH_u9wJ.mjs.map +1 -0
- package/dist/{chat-BSVF78Hu.mjs → chat-CDuOfk3d.mjs} +222 -141
- package/dist/chat-CDuOfk3d.mjs.map +1 -0
- package/dist/chat.d.mts +2 -2
- package/dist/chat.mjs +1 -1
- package/dist/{code-block-pXaSN9eY.mjs → code-block-5fEEwwMN.mjs} +2 -2
- package/dist/{code-block-pXaSN9eY.mjs.map → code-block-5fEEwwMN.mjs.map} +1 -1
- package/dist/{html-sandbox-CMsenGYi.mjs → html-sandbox-BJeg9mHs.mjs} +2 -2
- package/dist/{html-sandbox-CMsenGYi.mjs.map → html-sandbox-BJeg9mHs.mjs.map} +1 -1
- package/dist/html-sandbox.mjs +1 -1
- package/dist/{index-Bf9CudSF.d.mts → index-BOSlg0Xl.d.mts} +212 -142
- package/dist/index-BOSlg0Xl.d.mts.map +1 -0
- package/dist/{index-DZc5z5s2.d.mts → index-CtgUjd_A.d.mts} +3 -2
- package/dist/index-CtgUjd_A.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +21 -4
- package/dist/index.mjs.map +1 -1
- package/dist/{model-D4-FbKXY.mjs → model-DvNHVLwg.mjs} +3 -3
- package/dist/{model-D4-FbKXY.mjs.map → model-DvNHVLwg.mjs.map} +1 -1
- package/dist/{resolve-BwTfY4PS.mjs → resolve-DlCNcx0Q.mjs} +2 -2
- package/dist/{resolve-BwTfY4PS.mjs.map → resolve-DlCNcx0Q.mjs.map} +1 -1
- package/dist/vue.d.mts +509 -458
- package/dist/vue.d.mts.map +1 -1
- package/dist/vue.mjs +3288 -2830
- package/dist/vue.mjs.map +1 -1
- package/package.json +11 -4
- package/src/components/chat/composer/types.ts +2 -0
- package/src/components/chat/message-part/types.ts +3 -1
- package/src/components/chat/reasoning/types.ts +1 -1
- package/src/components/chat/tool/types.ts +1 -1
- package/src/components/edit-bar/index.ts +1 -0
- package/src/components/edit-bar/types.ts +24 -0
- package/src/components/icon/custom/indicators.ts +1 -0
- package/src/components/icon/custom/insert.ts +3 -1
- package/src/components/icon/metadata.ts +12 -0
- package/src/components/index.ts +1 -0
- package/src/components/kbd/index.ts +1 -0
- package/src/components/kbd/platform.test.ts +16 -0
- package/src/components/kbd/platform.ts +16 -0
- package/src/components/toolbar/index.ts +1 -0
- package/src/components/toolbar/types.ts +8 -0
- package/src/locale/components/chat.ts +9 -7
- package/src/locale/components/edit-bar.ts +15 -0
- package/src/locale/components/icon-catalog/en.ts +3 -0
- package/src/locale/components/icon-catalog/zh-hans.ts +3 -0
- package/src/locale/packs/en.ts +2 -0
- package/src/locale/packs/zh-cn.ts +2 -0
- package/src/locale/types.ts +3 -0
- package/src/vue/action-menu/directory.vue +0 -7
- package/src/vue/block-handle/block-handle.test.ts +5 -0
- package/src/vue/block-handle/block-handle.vue +4 -11
- package/src/vue/block-handle/index.ts +1 -1
- package/src/vue/block-handle/presentation.ts +4 -0
- package/src/vue/chat/composer/composer.test.ts +11 -2
- package/src/vue/chat/composer/composer.vue +15 -3
- package/src/vue/chat/composer-submit/composer-submit.test.ts +5 -1
- package/src/vue/chat/composer-submit/composer-submit.vue +1 -1
- package/src/vue/chat/confirmation/confirmation.vue +3 -2
- package/src/vue/chat/locale.test.ts +2 -2
- package/src/vue/chat/message/message.test.ts +1 -1
- package/src/vue/chat/message/message.vue +8 -3
- package/src/vue/chat/message-actions/message-actions.vue +1 -1
- package/src/vue/chat/message-list/message-list.test.ts +2 -2
- package/src/vue/chat/message-list/message-list.vue +2 -2
- package/src/vue/chat/message-list/types.ts +2 -0
- package/src/vue/chat/message-list/use-scroll.test.ts +7 -1
- package/src/vue/chat/message-list/use-scroll.ts +12 -9
- package/src/vue/chat/message-part/message-part.test.ts +1 -1
- package/src/vue/chat/message-part/message-part.vue +2 -3
- package/src/vue/chat/shared/disclosure.vue +1 -1
- package/src/vue/chat/shared/part-actions.ts +1 -1
- package/src/vue/chat/shared/state-icon.ts +2 -1
- package/src/vue/combobox/async-value.test.ts +49 -0
- package/src/vue/combobox/use-combobox-model.ts +3 -1
- package/src/vue/component-styles.test.ts +17 -0
- package/src/vue/edit-bar/edit-bar.test.ts +125 -0
- package/src/vue/edit-bar/edit-bar.vue +108 -0
- package/src/vue/edit-bar/index.ts +2 -0
- package/src/vue/edit-bar/types.ts +21 -0
- package/src/vue/index.ts +1 -0
- package/src/vue/menu/items/disabled-submenu.test.ts +24 -0
- package/src/vue/menu/items/items.test.ts +29 -0
- package/src/vue/menu/items/items.vue +6 -0
- package/src/vue/menu/menu-group.vue +11 -2
- package/src/vue/splitter/splitter.test.ts +18 -0
- package/src/vue/splitter/splitter.vue +5 -2
- package/src/vue/task-panel/root.vue +0 -8
- package/src/vue/toolbar/context.ts +5 -2
- package/src/vue/toolbar/items/control.vue +9 -1
- package/src/vue/toolbar/items/sheet-entries.ts +52 -0
- package/src/vue/toolbar/items/sheet.test.ts +61 -0
- package/src/vue/toolbar/items/sheet.vue +78 -0
- package/src/vue/toolbar/presentation/mobile.test.ts +14 -0
- package/src/vue/toolbar/presentation/visibility.ts +38 -0
- package/src/vue/toolbar/toolbar.vue +8 -3
- package/src/vue/toolbar/types.ts +3 -1
- package/dist/catalog-AqWLE58Z.mjs.map +0 -1
- package/dist/chat-BSVF78Hu.mjs.map +0 -1
- package/dist/index-Bf9CudSF.d.mts.map +0 -1
- package/dist/index-DZc5z5s2.d.mts.map +0 -1
- package/dist/style.css +0 -37
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { E as trackQuireKitInputModality, c as resolveTooltipContent, n as createUiThemeCssVariables, t as resolveQuireKitFileIdentity, v as menuVariableReferences } from "./resolve-
|
|
2
|
-
import { f as createTheme, i as quireKitEditorIconData } from "./catalog-
|
|
3
|
-
import { a as useQuireKitLocale, i as quireKitLocaleKey, l as _sfc_main$64, o as useQuireKitMessages, r as _sfc_main$66, s as _sfc_main$65, t as _sfc_main$67 } from "./code-block-
|
|
4
|
-
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, inject, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onBeforeUpdate, onMounted, onUpdated, openBlock, provide, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, unref, useAttrs, useId, useModel, useSlots, watch, watchEffect, withCtx, withDirectives, withModifiers } from "vue";
|
|
1
|
+
import { E as trackQuireKitInputModality, c as resolveTooltipContent, n as createUiThemeCssVariables, t as resolveQuireKitFileIdentity, v as menuVariableReferences } from "./resolve-DlCNcx0Q.mjs";
|
|
2
|
+
import { f as createTheme, i as quireKitEditorIconData } from "./catalog-TxH_u9wJ.mjs";
|
|
3
|
+
import { a as useQuireKitLocale, i as quireKitLocaleKey, l as _sfc_main$64, o as useQuireKitMessages, r as _sfc_main$66, s as _sfc_main$65, t as _sfc_main$67 } from "./code-block-5fEEwwMN.mjs";
|
|
4
|
+
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, inject, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onBeforeUpdate, onMounted, onUpdated, openBlock, provide, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, unref, useAttrs, useId, useModel, useSlots, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
5
5
|
import { ark } from "@ark-ui/vue/factory";
|
|
6
6
|
import { EnvironmentProvider } from "@ark-ui/vue/environment";
|
|
7
7
|
import { Dialog, useDialogContext } from "@ark-ui/vue/dialog";
|
|
@@ -17,7 +17,7 @@ import { Tooltip, useTooltipContext } from "@ark-ui/vue/tooltip";
|
|
|
17
17
|
import { DEFAULT_LOCALE, LocaleProvider, useLocaleContext } from "@ark-ui/vue/locale";
|
|
18
18
|
import { autoUpdate, computePosition, flip, offset, shift, size } from "@floating-ui/dom";
|
|
19
19
|
//#region src/vue/button/icon-button.vue
|
|
20
|
-
const _hoisted_1$
|
|
20
|
+
const _hoisted_1$43 = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "qk-button__spinner",
|
|
23
23
|
viewBox: "0 0 24 24",
|
|
@@ -68,7 +68,7 @@ const _sfc_main$63 = /*@__PURE__*/ defineComponent({
|
|
|
68
68
|
class: normalizeClass(["qk-button__icon", `qk-button__icon--${__props.size}`]),
|
|
69
69
|
"aria-hidden": "true",
|
|
70
70
|
"data-slot": "icon"
|
|
71
|
-
}, [__props.busy ? (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
71
|
+
}, [__props.busy ? (openBlock(), createElementBlock("svg", _hoisted_1$43, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M20 12a8 8 0 0 1-8 8" }, null, -1), createElementVNode("path", {
|
|
72
72
|
d: "M4 12a8 8 0 0 1 8-8",
|
|
73
73
|
opacity: ".35"
|
|
74
74
|
}, null, -1)])])) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)], 2)]),
|
|
@@ -86,7 +86,7 @@ const _sfc_main$63 = /*@__PURE__*/ defineComponent({
|
|
|
86
86
|
});
|
|
87
87
|
//#endregion
|
|
88
88
|
//#region src/vue/file-icon/file-icon.vue
|
|
89
|
-
const _hoisted_1$
|
|
89
|
+
const _hoisted_1$42 = [
|
|
90
90
|
"data-kind",
|
|
91
91
|
"width",
|
|
92
92
|
"height",
|
|
@@ -94,7 +94,7 @@ const _hoisted_1$41 = [
|
|
|
94
94
|
"aria-label",
|
|
95
95
|
"aria-hidden"
|
|
96
96
|
];
|
|
97
|
-
const _hoisted_2$
|
|
97
|
+
const _hoisted_2$29 = ["font-size"];
|
|
98
98
|
const _sfc_main$62 = /*@__PURE__*/ defineComponent({
|
|
99
99
|
__name: "file-icon",
|
|
100
100
|
props: {
|
|
@@ -135,14 +135,14 @@ const _sfc_main$62 = /*@__PURE__*/ defineComponent({
|
|
|
135
135
|
y: "28",
|
|
136
136
|
"text-anchor": "middle",
|
|
137
137
|
"font-size": identity.value.badge.length === 1 ? 17 : 9
|
|
138
|
-
}, toDisplayString(identity.value.badge), 9, _hoisted_2$
|
|
139
|
-
], 8, _hoisted_1$
|
|
138
|
+
}, toDisplayString(identity.value.badge), 9, _hoisted_2$29)
|
|
139
|
+
], 8, _hoisted_1$42);
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region src/vue/image/media.vue
|
|
145
|
-
const _hoisted_1$
|
|
145
|
+
const _hoisted_1$41 = [
|
|
146
146
|
"src",
|
|
147
147
|
"alt",
|
|
148
148
|
"data-load-state"
|
|
@@ -209,7 +209,7 @@ const _sfc_main$61 = /*@__PURE__*/ defineComponent({
|
|
|
209
209
|
"data-load-state": status.value,
|
|
210
210
|
onLoad: loaded,
|
|
211
211
|
onError: failed
|
|
212
|
-
}, null, 40, _hoisted_1$
|
|
212
|
+
}, null, 40, _hoisted_1$41);
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
215
|
});
|
|
@@ -722,7 +722,7 @@ function usePreviewGestures(stage, transform, navigate) {
|
|
|
722
722
|
}
|
|
723
723
|
//#endregion
|
|
724
724
|
//#region src/vue/image-preview/stage.vue
|
|
725
|
-
const _hoisted_1$
|
|
725
|
+
const _hoisted_1$40 = [
|
|
726
726
|
"data-zoom",
|
|
727
727
|
"data-angle",
|
|
728
728
|
"data-x",
|
|
@@ -731,12 +731,12 @@ const _hoisted_1$39 = [
|
|
|
731
731
|
"data-zoomed",
|
|
732
732
|
"data-dragging"
|
|
733
733
|
];
|
|
734
|
-
const _hoisted_2$
|
|
734
|
+
const _hoisted_2$28 = {
|
|
735
735
|
key: 0,
|
|
736
736
|
class: "qk-image-preview__status",
|
|
737
737
|
role: "status"
|
|
738
738
|
};
|
|
739
|
-
const _hoisted_3$
|
|
739
|
+
const _hoisted_3$23 = {
|
|
740
740
|
key: 1,
|
|
741
741
|
class: "qk-image-preview__status",
|
|
742
742
|
role: "alert"
|
|
@@ -819,10 +819,10 @@ const _sfc_main$57 = /*@__PURE__*/ defineComponent({
|
|
|
819
819
|
"src",
|
|
820
820
|
"alt",
|
|
821
821
|
"style"
|
|
822
|
-
])), status.value === "loading" ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
822
|
+
])), status.value === "loading" ? (openBlock(), createElementBlock("div", _hoisted_2$28, [_cache[11] || (_cache[11] = createElementVNode("span", {
|
|
823
823
|
class: "qk-image-preview__loading",
|
|
824
824
|
"aria-hidden": "true"
|
|
825
|
-
}, null, -1)), createTextVNode(toDisplayString(__props.labels.loading), 1)])) : status.value === "error" ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
825
|
+
}, null, -1)), createTextVNode(toDisplayString(__props.labels.loading), 1)])) : status.value === "error" ? (openBlock(), createElementBlock("div", _hoisted_3$23, [createElementVNode("span", null, toDisplayString(__props.labels.unavailable), 1), createVNode(unref(_sfc_main$64), {
|
|
826
826
|
variant: "outline",
|
|
827
827
|
onPointerdown: _cache[2] || (_cache[2] = withModifiers(() => {}, ["stop"])),
|
|
828
828
|
onDblclick: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"])),
|
|
@@ -830,7 +830,7 @@ const _sfc_main$57 = /*@__PURE__*/ defineComponent({
|
|
|
830
830
|
}, {
|
|
831
831
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.labels.retry), 1)]),
|
|
832
832
|
_: 1
|
|
833
|
-
})])) : createCommentVNode("v-if", true)], 40, _hoisted_1$
|
|
833
|
+
})])) : createCommentVNode("v-if", true)], 40, _hoisted_1$40);
|
|
834
834
|
};
|
|
835
835
|
}
|
|
836
836
|
});
|
|
@@ -907,13 +907,13 @@ function resolveToolbarLayout(toolbar = true, hasActions = false, hasCustom = fa
|
|
|
907
907
|
}
|
|
908
908
|
//#endregion
|
|
909
909
|
//#region src/vue/image-preview/toolbar/toolbar.vue
|
|
910
|
-
const _hoisted_1$
|
|
911
|
-
const _hoisted_2$
|
|
910
|
+
const _hoisted_1$39 = ["aria-label"];
|
|
911
|
+
const _hoisted_2$27 = {
|
|
912
912
|
key: 2,
|
|
913
913
|
class: "qk-image-preview__divider",
|
|
914
914
|
"aria-hidden": "true"
|
|
915
915
|
};
|
|
916
|
-
const _hoisted_3$
|
|
916
|
+
const _hoisted_3$22 = ["aria-label"];
|
|
917
917
|
const _sfc_main$56 = /*@__PURE__*/ defineComponent({
|
|
918
918
|
__name: "toolbar",
|
|
919
919
|
props: {
|
|
@@ -1004,13 +1004,13 @@ const _sfc_main$56 = /*@__PURE__*/ defineComponent({
|
|
|
1004
1004
|
scale: __props.scale,
|
|
1005
1005
|
ready: __props.ready,
|
|
1006
1006
|
count: __props.count
|
|
1007
|
-
}, void 0, void 0, 0) : part === "actions" ? renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1) : part === "separator" ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
1007
|
+
}, void 0, void 0, 0) : part === "actions" ? renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1) : part === "separator" ? (openBlock(), createElementBlock("span", _hoisted_2$27)) : part === "counter" ? (openBlock(), createElementBlock("span", {
|
|
1008
1008
|
key: 3,
|
|
1009
1009
|
class: "qk-image-preview__count",
|
|
1010
1010
|
role: "status",
|
|
1011
1011
|
"aria-live": "polite",
|
|
1012
1012
|
"aria-label": __props.labels.current
|
|
1013
|
-
}, toDisplayString(__props.labels.position(__props.count ? __props.index + 1 : 0, __props.count)), 9, _hoisted_3$
|
|
1013
|
+
}, toDisplayString(__props.labels.position(__props.count ? __props.index + 1 : 0, __props.count)), 9, _hoisted_3$22)) : part === "scale" ? (openBlock(), createBlock(unref(_sfc_main$64), {
|
|
1014
1014
|
key: 4,
|
|
1015
1015
|
class: "qk-image-preview__scale",
|
|
1016
1016
|
variant: "text",
|
|
@@ -1047,7 +1047,7 @@ const _sfc_main$56 = /*@__PURE__*/ defineComponent({
|
|
|
1047
1047
|
"disabled",
|
|
1048
1048
|
"onClick"
|
|
1049
1049
|
]))], 64);
|
|
1050
|
-
}), 128))], 8, _hoisted_1$
|
|
1050
|
+
}), 128))], 8, _hoisted_1$39)) : createCommentVNode("v-if", true);
|
|
1051
1051
|
};
|
|
1052
1052
|
}
|
|
1053
1053
|
});
|
|
@@ -1135,10 +1135,10 @@ function createMaskDismiss(enabled, close) {
|
|
|
1135
1135
|
}
|
|
1136
1136
|
//#endregion
|
|
1137
1137
|
//#region src/vue/image-preview/surface.vue
|
|
1138
|
-
const _hoisted_1$
|
|
1139
|
-
const _hoisted_2$
|
|
1140
|
-
const _hoisted_3$
|
|
1141
|
-
const _hoisted_4$
|
|
1138
|
+
const _hoisted_1$38 = { class: "qk-image-preview__heading" };
|
|
1139
|
+
const _hoisted_2$26 = ["aria-label"];
|
|
1140
|
+
const _hoisted_3$21 = ["data-navigation"];
|
|
1141
|
+
const _hoisted_4$16 = {
|
|
1142
1142
|
key: 1,
|
|
1143
1143
|
class: "qk-image-preview__status",
|
|
1144
1144
|
role: "status"
|
|
@@ -1271,7 +1271,7 @@ const _sfc_main$54 = /*@__PURE__*/ defineComponent({
|
|
|
1271
1271
|
ref_key: "header",
|
|
1272
1272
|
ref: header,
|
|
1273
1273
|
class: "qk-image-preview__header"
|
|
1274
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
1274
|
+
}, [createElementVNode("div", _hoisted_1$38, [createVNode(unref(Dialog).Title, { class: normalizeClass(title.value ? "qk-image-preview__title" : "sr-only") }, {
|
|
1275
1275
|
default: withCtx(() => [createTextVNode(toDisplayString(title.value || __props.labels.title), 1)]),
|
|
1276
1276
|
_: 1
|
|
1277
1277
|
}, 8, ["class"]), __props.items.length && !toolbarHasCounter.value ? (openBlock(), createElementBlock("span", {
|
|
@@ -1280,7 +1280,7 @@ const _sfc_main$54 = /*@__PURE__*/ defineComponent({
|
|
|
1280
1280
|
role: "status",
|
|
1281
1281
|
"aria-live": "polite",
|
|
1282
1282
|
"aria-label": __props.labels.current
|
|
1283
|
-
}, toDisplayString(__props.labels.position(__props.index + 1, __props.items.length)), 9, _hoisted_2$
|
|
1283
|
+
}, toDisplayString(__props.labels.position(__props.index + 1, __props.items.length)), 9, _hoisted_2$26)) : createCommentVNode("v-if", true)]), createVNode(unref(Dialog).CloseTrigger, { "as-child": "" }, {
|
|
1284
1284
|
default: withCtx(() => [createVNode(unref(_sfc_main$63), {
|
|
1285
1285
|
id: `${__props.id}-close`,
|
|
1286
1286
|
label: __props.labels.close,
|
|
@@ -1311,7 +1311,7 @@ const _sfc_main$54 = /*@__PURE__*/ defineComponent({
|
|
|
1311
1311
|
item: current.value,
|
|
1312
1312
|
labels: __props.labels,
|
|
1313
1313
|
onNavigate: navigate
|
|
1314
|
-
}, null, 8, ["item", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
1314
|
+
}, null, 8, ["item", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_4$16, toDisplayString(__props.labels.empty), 1)), __props.options.navigation !== false && __props.items.length > 1 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createVNode(unref(_sfc_main$63), {
|
|
1315
1315
|
class: "qk-image-preview__previous",
|
|
1316
1316
|
label: __props.labels.previous,
|
|
1317
1317
|
title: `${__props.labels.previous} (←)`,
|
|
@@ -1347,7 +1347,7 @@ const _sfc_main$54 = /*@__PURE__*/ defineComponent({
|
|
|
1347
1347
|
"label",
|
|
1348
1348
|
"title",
|
|
1349
1349
|
"disabled"
|
|
1350
|
-
])], 64)) : createCommentVNode("v-if", true)], 8, _hoisted_3$
|
|
1350
|
+
])], 64)) : createCommentVNode("v-if", true)], 8, _hoisted_3$21),
|
|
1351
1351
|
createElementVNode("footer", _hoisted_5$14, [
|
|
1352
1352
|
__props.options.caption !== false && current.value?.description ? (openBlock(), createBlock(unref(Dialog).Description, {
|
|
1353
1353
|
key: 0,
|
|
@@ -1600,18 +1600,18 @@ const _sfc_main$53 = /*@__PURE__*/ defineComponent({
|
|
|
1600
1600
|
const imagePreviewGroupKey = Symbol("quirekit.image-preview-group");
|
|
1601
1601
|
//#endregion
|
|
1602
1602
|
//#region src/vue/image/image.vue
|
|
1603
|
-
const _hoisted_1$
|
|
1603
|
+
const _hoisted_1$37 = [
|
|
1604
1604
|
"data-state",
|
|
1605
1605
|
"data-fallback",
|
|
1606
1606
|
"aria-busy"
|
|
1607
1607
|
];
|
|
1608
|
-
const _hoisted_2$
|
|
1608
|
+
const _hoisted_2$25 = {
|
|
1609
1609
|
key: 0,
|
|
1610
1610
|
class: "qk-image__placeholder",
|
|
1611
1611
|
role: "status"
|
|
1612
1612
|
};
|
|
1613
|
-
const _hoisted_3$
|
|
1614
|
-
const _hoisted_4$
|
|
1613
|
+
const _hoisted_3$20 = { class: "sr-only" };
|
|
1614
|
+
const _hoisted_4$15 = {
|
|
1615
1615
|
key: 1,
|
|
1616
1616
|
class: "qk-image__error",
|
|
1617
1617
|
role: "status"
|
|
@@ -1781,14 +1781,14 @@ const _sfc_main$52 = /*@__PURE__*/ defineComponent({
|
|
|
1781
1781
|
"height",
|
|
1782
1782
|
"style"
|
|
1783
1783
|
])),
|
|
1784
|
-
status.value === "loading" ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
1784
|
+
status.value === "loading" ? (openBlock(), createElementBlock("span", _hoisted_2$25, [renderSlot(_ctx.$slots, "placeholder", {
|
|
1785
1785
|
src: source.value,
|
|
1786
1786
|
fallback: usingFallback.value
|
|
1787
1787
|
}, () => [createVNode(_sfc_main$65, {
|
|
1788
1788
|
name: "image",
|
|
1789
1789
|
size: 24
|
|
1790
|
-
}), createElementVNode("span", _hoisted_3$
|
|
1791
|
-
status.value === "error" ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
1790
|
+
}), createElementVNode("span", _hoisted_3$20, toDisplayString(unref(text).loading), 1)])])) : createCommentVNode("v-if", true),
|
|
1791
|
+
status.value === "error" ? (openBlock(), createElementBlock("span", _hoisted_4$15, [renderSlot(_ctx.$slots, "error", {
|
|
1792
1792
|
retry,
|
|
1793
1793
|
src: source.value,
|
|
1794
1794
|
fallback: usingFallback.value
|
|
@@ -1816,7 +1816,7 @@ const _sfc_main$52 = /*@__PURE__*/ defineComponent({
|
|
|
1816
1816
|
name: "zoomIn",
|
|
1817
1817
|
size: 16
|
|
1818
1818
|
}), createTextVNode(toDisplayString(unref(text).previewHint), 1)])) : createCommentVNode("v-if", true)], 8, _hoisted_5$13)) : createCommentVNode("v-if", true)
|
|
1819
|
-
], 16, _hoisted_1$
|
|
1819
|
+
], 16, _hoisted_1$37)]),
|
|
1820
1820
|
_: 3
|
|
1821
1821
|
}, 16, ["items"]);
|
|
1822
1822
|
};
|
|
@@ -1854,7 +1854,7 @@ function normalizeProgressValue(value, min, max) {
|
|
|
1854
1854
|
}
|
|
1855
1855
|
//#endregion
|
|
1856
1856
|
//#region src/vue/progress/progress.vue
|
|
1857
|
-
const _hoisted_1$
|
|
1857
|
+
const _hoisted_1$36 = { class: "qk-progress__circle-wrap" };
|
|
1858
1858
|
const _sfc_main$51 = /*@__PURE__*/ defineComponent({
|
|
1859
1859
|
__name: "progress",
|
|
1860
1860
|
props: /*@__PURE__*/ mergeModels({
|
|
@@ -1955,7 +1955,7 @@ const _sfc_main$51 = /*@__PURE__*/ defineComponent({
|
|
|
1955
1955
|
default: withCtx(() => [createVNode(unref(Progress).Range, { class: "qk-progress__range" })]),
|
|
1956
1956
|
_: 1
|
|
1957
1957
|
}, 8, ["aria-labelledby", "aria-valuetext"])], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1958
|
-
createElementVNode("div", _hoisted_1$
|
|
1958
|
+
createElementVNode("div", _hoisted_1$36, [createVNode(unref(Progress).Circle, {
|
|
1959
1959
|
"aria-labelledby": progress.getLabelProps().id,
|
|
1960
1960
|
"aria-valuetext": valueText(progress),
|
|
1961
1961
|
class: "qk-progress__circle"
|
|
@@ -2001,7 +2001,7 @@ const _sfc_main$51 = /*@__PURE__*/ defineComponent({
|
|
|
2001
2001
|
});
|
|
2002
2002
|
//#endregion
|
|
2003
2003
|
//#region src/vue/shimmer/shimmer.vue
|
|
2004
|
-
const _hoisted_1$
|
|
2004
|
+
const _hoisted_1$35 = ["data-active"];
|
|
2005
2005
|
const _sfc_main$50 = /*@__PURE__*/ defineComponent({
|
|
2006
2006
|
__name: "shimmer",
|
|
2007
2007
|
props: {
|
|
@@ -2020,7 +2020,7 @@ const _sfc_main$50 = /*@__PURE__*/ defineComponent({
|
|
|
2020
2020
|
class: "qk-shimmer",
|
|
2021
2021
|
"data-active": __props.active,
|
|
2022
2022
|
style: normalizeStyle(style.value)
|
|
2023
|
-
}, toDisplayString(__props.text), 13, _hoisted_1$
|
|
2023
|
+
}, toDisplayString(__props.text), 13, _hoisted_1$35);
|
|
2024
2024
|
};
|
|
2025
2025
|
}
|
|
2026
2026
|
});
|
|
@@ -2063,7 +2063,7 @@ function attachmentIsImage(item) {
|
|
|
2063
2063
|
}
|
|
2064
2064
|
//#endregion
|
|
2065
2065
|
//#region src/vue/attachment/actions.vue
|
|
2066
|
-
const _hoisted_1$
|
|
2066
|
+
const _hoisted_1$34 = {
|
|
2067
2067
|
key: 0,
|
|
2068
2068
|
class: "qk-attachment__actions"
|
|
2069
2069
|
};
|
|
@@ -2089,7 +2089,7 @@ const _sfc_main$49 = /*@__PURE__*/ defineComponent({
|
|
|
2089
2089
|
});
|
|
2090
2090
|
}
|
|
2091
2091
|
return (_ctx, _cache) => {
|
|
2092
|
-
return actions.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2092
|
+
return actions.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$34, [(openBlock(true), createElementBlock(Fragment, null, renderList(actions.value, (action) => {
|
|
2093
2093
|
return openBlock(), createBlock(_sfc_main$63, {
|
|
2094
2094
|
key: action,
|
|
2095
2095
|
class: "qk-attachment__action",
|
|
@@ -2123,7 +2123,7 @@ const _sfc_main$49 = /*@__PURE__*/ defineComponent({
|
|
|
2123
2123
|
});
|
|
2124
2124
|
//#endregion
|
|
2125
2125
|
//#region src/vue/attachment/attachment.vue
|
|
2126
|
-
const _hoisted_1$
|
|
2126
|
+
const _hoisted_1$33 = [
|
|
2127
2127
|
"data-layout",
|
|
2128
2128
|
"data-state",
|
|
2129
2129
|
"data-preview-failed",
|
|
@@ -2131,9 +2131,9 @@ const _hoisted_1$32 = [
|
|
|
2131
2131
|
"data-attachment-id",
|
|
2132
2132
|
"data-source"
|
|
2133
2133
|
];
|
|
2134
|
-
const _hoisted_2$
|
|
2135
|
-
const _hoisted_3$
|
|
2136
|
-
const _hoisted_4$
|
|
2134
|
+
const _hoisted_2$24 = { class: "qk-attachment__preview" };
|
|
2135
|
+
const _hoisted_3$19 = { class: "qk-attachment__content" };
|
|
2136
|
+
const _hoisted_4$14 = ["title"];
|
|
2137
2137
|
const _hoisted_5$12 = {
|
|
2138
2138
|
key: 0,
|
|
2139
2139
|
class: "qk-attachment__meta"
|
|
@@ -2175,7 +2175,7 @@ const _sfc_main$48 = /*@__PURE__*/ defineComponent({
|
|
|
2175
2175
|
"data-attachment-id": __props.item.id,
|
|
2176
2176
|
"data-source": __props.item.source
|
|
2177
2177
|
}, [
|
|
2178
|
-
createElementVNode("div", _hoisted_2$
|
|
2178
|
+
createElementVNode("div", _hoisted_2$24, [imageSource.value ? (openBlock(), createBlock(_sfc_main$52, {
|
|
2179
2179
|
key: 0,
|
|
2180
2180
|
src: imageSource.value,
|
|
2181
2181
|
alt: __props.item.alt ?? __props.item.name,
|
|
@@ -2229,12 +2229,12 @@ const _sfc_main$48 = /*@__PURE__*/ defineComponent({
|
|
|
2229
2229
|
"media-type",
|
|
2230
2230
|
"size"
|
|
2231
2231
|
]))]),
|
|
2232
|
-
createElementVNode("div", _hoisted_3$
|
|
2232
|
+
createElementVNode("div", _hoisted_3$19, [
|
|
2233
2233
|
createElementVNode("span", {
|
|
2234
2234
|
class: "qk-attachment__name",
|
|
2235
2235
|
title: __props.item.name,
|
|
2236
2236
|
dir: "auto"
|
|
2237
|
-
}, toDisplayString(__props.item.name), 9, _hoisted_4$
|
|
2237
|
+
}, toDisplayString(__props.item.name), 9, _hoisted_4$14),
|
|
2238
2238
|
__props.layout !== "inline" && !(__props.layout === "strip" && status.value) && unref(attachmentMeta)(__props.item) ? (openBlock(), createElementBlock("span", _hoisted_5$12, toDisplayString(unref(attachmentMeta)(__props.item)), 1)) : createCommentVNode("v-if", true),
|
|
2239
2239
|
status.value ? (openBlock(), createElementBlock("span", {
|
|
2240
2240
|
key: 1,
|
|
@@ -2260,7 +2260,7 @@ const _sfc_main$48 = /*@__PURE__*/ defineComponent({
|
|
|
2260
2260
|
"show-label": false,
|
|
2261
2261
|
"show-value": false
|
|
2262
2262
|
}, null, 8, ["model-value", "label"])) : createCommentVNode("v-if", true)
|
|
2263
|
-
], 8, _hoisted_1$
|
|
2263
|
+
], 8, _hoisted_1$33);
|
|
2264
2264
|
};
|
|
2265
2265
|
}
|
|
2266
2266
|
});
|
|
@@ -2570,7 +2570,7 @@ const scrollRightIcon = Object.freeze({
|
|
|
2570
2570
|
});
|
|
2571
2571
|
//#endregion
|
|
2572
2572
|
//#region src/vue/shared/horizontal-scroll/strip.vue
|
|
2573
|
-
const _hoisted_1$
|
|
2573
|
+
const _hoisted_1$32 = ["data-enabled", "data-overflow"];
|
|
2574
2574
|
const _sfc_main$47 = /*@__PURE__*/ defineComponent({
|
|
2575
2575
|
__name: "strip",
|
|
2576
2576
|
props: {
|
|
@@ -2652,14 +2652,14 @@ const _sfc_main$47 = /*@__PURE__*/ defineComponent({
|
|
|
2652
2652
|
}, null, 8, ["data"])]),
|
|
2653
2653
|
_: 1
|
|
2654
2654
|
}, 8, ["label", "disabled"])) : createCommentVNode("v-if", true)
|
|
2655
|
-
], 40, _hoisted_1$
|
|
2655
|
+
], 40, _hoisted_1$32);
|
|
2656
2656
|
};
|
|
2657
2657
|
}
|
|
2658
2658
|
});
|
|
2659
2659
|
//#endregion
|
|
2660
2660
|
//#region src/vue/attachment/attachments.vue
|
|
2661
|
-
const _hoisted_1$
|
|
2662
|
-
const _hoisted_2$
|
|
2661
|
+
const _hoisted_1$31 = ["data-layout", "aria-label"];
|
|
2662
|
+
const _hoisted_2$23 = { class: "qk-attachments__items" };
|
|
2663
2663
|
const _sfc_main$46 = /*@__PURE__*/ defineComponent({
|
|
2664
2664
|
inheritAttrs: false,
|
|
2665
2665
|
__name: "attachments",
|
|
@@ -2738,7 +2738,7 @@ const _sfc_main$46 = /*@__PURE__*/ defineComponent({
|
|
|
2738
2738
|
"previous-label": unref(text).previous,
|
|
2739
2739
|
"next-label": unref(text).next
|
|
2740
2740
|
}, {
|
|
2741
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_2$
|
|
2741
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_2$23, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
|
|
2742
2742
|
return openBlock(), createBlock(_sfc_main$48, {
|
|
2743
2743
|
key: item.id,
|
|
2744
2744
|
item,
|
|
@@ -2756,7 +2756,7 @@ const _sfc_main$46 = /*@__PURE__*/ defineComponent({
|
|
|
2756
2756
|
"enabled",
|
|
2757
2757
|
"previous-label",
|
|
2758
2758
|
"next-label"
|
|
2759
|
-
])], 16, _hoisted_1$
|
|
2759
|
+
])], 16, _hoisted_1$31), createVNode(_sfc_main$53, {
|
|
2760
2760
|
items: unref(gallery).items.value,
|
|
2761
2761
|
open: unref(gallery).opened.value,
|
|
2762
2762
|
"onUpdate:open": _cache[2] || (_cache[2] = ($event) => unref(gallery).opened.value = $event),
|
|
@@ -2780,13 +2780,13 @@ const _sfc_main$46 = /*@__PURE__*/ defineComponent({
|
|
|
2780
2780
|
});
|
|
2781
2781
|
//#endregion
|
|
2782
2782
|
//#region src/vue/checkbox/checkbox.vue
|
|
2783
|
-
const _hoisted_1$
|
|
2784
|
-
const _hoisted_2$
|
|
2783
|
+
const _hoisted_1$30 = { class: "qk-checkbox__content" };
|
|
2784
|
+
const _hoisted_2$22 = {
|
|
2785
2785
|
key: 0,
|
|
2786
2786
|
"aria-hidden": "true",
|
|
2787
2787
|
class: "qk-checkbox__required"
|
|
2788
2788
|
};
|
|
2789
|
-
const _hoisted_3$
|
|
2789
|
+
const _hoisted_3$18 = ["id"];
|
|
2790
2790
|
const _sfc_main$45 = /*@__PURE__*/ defineComponent({
|
|
2791
2791
|
__name: "checkbox",
|
|
2792
2792
|
props: /*@__PURE__*/ mergeModels({
|
|
@@ -2888,14 +2888,14 @@ const _sfc_main$45 = /*@__PURE__*/ defineComponent({
|
|
|
2888
2888
|
})]),
|
|
2889
2889
|
_: 1
|
|
2890
2890
|
}, 8, ["class"]),
|
|
2891
|
-
createElementVNode("span", _hoisted_1$
|
|
2892
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)]), __props.required ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
2891
|
+
createElementVNode("span", _hoisted_1$30, [createVNode(unref(Checkbox).Label, { class: "qk-checkbox__label" }, {
|
|
2892
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)]), __props.required ? (openBlock(), createElementBlock("span", _hoisted_2$22, "*")) : createCommentVNode("v-if", true)]),
|
|
2893
2893
|
_: 3
|
|
2894
2894
|
}), __props.description !== void 0 || _ctx.$slots.description ? (openBlock(), createElementBlock("span", {
|
|
2895
2895
|
key: 0,
|
|
2896
2896
|
id: descriptionId.value,
|
|
2897
2897
|
class: "qk-checkbox__description"
|
|
2898
|
-
}, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])], 8, _hoisted_3$
|
|
2898
|
+
}, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])], 8, _hoisted_3$18)) : createCommentVNode("v-if", true)])
|
|
2899
2899
|
]),
|
|
2900
2900
|
_: 3
|
|
2901
2901
|
}, 16, [
|
|
@@ -2911,7 +2911,7 @@ const _sfc_main$45 = /*@__PURE__*/ defineComponent({
|
|
|
2911
2911
|
});
|
|
2912
2912
|
//#endregion
|
|
2913
2913
|
//#region src/vue/collapsible/collapsible.vue
|
|
2914
|
-
const _hoisted_1$
|
|
2914
|
+
const _hoisted_1$29 = {
|
|
2915
2915
|
key: 0,
|
|
2916
2916
|
class: "qk-collapsible__description"
|
|
2917
2917
|
};
|
|
@@ -2988,7 +2988,7 @@ const _sfc_main$44 = /*@__PURE__*/ defineComponent({
|
|
|
2988
2988
|
]),
|
|
2989
2989
|
onClick: focusTrigger
|
|
2990
2990
|
}, {
|
|
2991
|
-
default: withCtx(() => [createElementVNode("span", { class: normalizeClass(["qk-collapsible__heading", __props.indicatorPlacement === "inline" && "qk-collapsible__heading--inline"]) }, [renderSlot(_ctx.$slots, "trigger", {}, () => [createTextVNode(toDisplayString(__props.title), 1)]), __props.description !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
2991
|
+
default: withCtx(() => [createElementVNode("span", { class: normalizeClass(["qk-collapsible__heading", __props.indicatorPlacement === "inline" && "qk-collapsible__heading--inline"]) }, [renderSlot(_ctx.$slots, "trigger", {}, () => [createTextVNode(toDisplayString(__props.title), 1)]), __props.description !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_1$29, toDisplayString(__props.description), 1)) : createCommentVNode("v-if", true)], 2), createVNode(unref(Collapsible).Indicator, { class: "qk-collapsible__indicator" }, {
|
|
2992
2992
|
default: withCtx(() => [createVNode(_sfc_main$65, {
|
|
2993
2993
|
name: "chevronRight",
|
|
2994
2994
|
size: 16
|
|
@@ -3188,7 +3188,7 @@ function useTextareaAutoResize(root, value, options, appearance) {
|
|
|
3188
3188
|
}
|
|
3189
3189
|
//#endregion
|
|
3190
3190
|
//#region src/vue/textarea/textarea.vue
|
|
3191
|
-
const _hoisted_1$
|
|
3191
|
+
const _hoisted_1$28 = {
|
|
3192
3192
|
key: 0,
|
|
3193
3193
|
"aria-hidden": "true",
|
|
3194
3194
|
class: "qk-textarea__count"
|
|
@@ -3348,14 +3348,14 @@ const _sfc_main$43 = /*@__PURE__*/ defineComponent({
|
|
|
3348
3348
|
"minlength",
|
|
3349
3349
|
"maxlength",
|
|
3350
3350
|
"class"
|
|
3351
|
-
])), __props.showCount ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
3351
|
+
])), __props.showCount ? (openBlock(), createElementBlock("span", _hoisted_1$28, toDisplayString(countLabel.value), 1)) : createCommentVNode("v-if", true)], 6);
|
|
3352
3352
|
};
|
|
3353
3353
|
}
|
|
3354
3354
|
});
|
|
3355
3355
|
//#endregion
|
|
3356
3356
|
//#region src/vue/kbd/kbd.vue
|
|
3357
|
-
const _hoisted_1$
|
|
3358
|
-
const _hoisted_2$
|
|
3357
|
+
const _hoisted_1$27 = { "aria-hidden": "true" };
|
|
3358
|
+
const _hoisted_2$21 = { class: "sr-only" };
|
|
3359
3359
|
const _sfc_main$42 = /*@__PURE__*/ defineComponent({
|
|
3360
3360
|
__name: "kbd",
|
|
3361
3361
|
props: {
|
|
@@ -3367,23 +3367,23 @@ const _sfc_main$42 = /*@__PURE__*/ defineComponent({
|
|
|
3367
3367
|
const props = __props;
|
|
3368
3368
|
const accessible = computed(() => props.label ?? keyLabel(props.keys));
|
|
3369
3369
|
return (_ctx, _cache) => {
|
|
3370
|
-
return openBlock(), createElementBlock("kbd", { class: normalizeClass(["qk-kbd", `qk-kbd--${__props.size}`]) }, [createElementVNode("span", _hoisted_1$
|
|
3370
|
+
return openBlock(), createElementBlock("kbd", { class: normalizeClass(["qk-kbd", `qk-kbd--${__props.size}`]) }, [createElementVNode("span", _hoisted_1$27, toDisplayString(__props.keys.join(" + ")), 1), createElementVNode("span", _hoisted_2$21, toDisplayString(accessible.value), 1)], 2);
|
|
3371
3371
|
};
|
|
3372
3372
|
}
|
|
3373
3373
|
});
|
|
3374
3374
|
//#endregion
|
|
3375
3375
|
//#region src/vue/menu/menu-item.vue
|
|
3376
|
-
const _hoisted_1$
|
|
3376
|
+
const _hoisted_1$26 = {
|
|
3377
3377
|
key: 0,
|
|
3378
3378
|
class: "qk-menu__indicator",
|
|
3379
3379
|
"aria-hidden": "true"
|
|
3380
3380
|
};
|
|
3381
|
-
const _hoisted_2$
|
|
3381
|
+
const _hoisted_2$20 = {
|
|
3382
3382
|
key: 1,
|
|
3383
3383
|
class: "qk-menu__copy"
|
|
3384
3384
|
};
|
|
3385
|
-
const _hoisted_3$
|
|
3386
|
-
const _hoisted_4$
|
|
3385
|
+
const _hoisted_3$17 = { class: "qk-menu__description" };
|
|
3386
|
+
const _hoisted_4$13 = {
|
|
3387
3387
|
key: 3,
|
|
3388
3388
|
class: "qk-menu__trailing",
|
|
3389
3389
|
"aria-hidden": "true"
|
|
@@ -3430,18 +3430,18 @@ const _sfc_main$41 = /*@__PURE__*/ defineComponent({
|
|
|
3430
3430
|
"onMenu:select": handleSelection
|
|
3431
3431
|
}, {
|
|
3432
3432
|
default: withCtx(() => [
|
|
3433
|
-
_ctx.$slots.leading || __props.inset ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
3434
|
-
__props.description ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
3433
|
+
_ctx.$slots.leading || __props.inset ? (openBlock(), createElementBlock("span", _hoisted_1$26, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("v-if", true),
|
|
3434
|
+
__props.description ? (openBlock(), createElementBlock("span", _hoisted_2$20, [createVNode(unref(Menu).ItemText, { class: "qk-menu__label" }, {
|
|
3435
3435
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
3436
3436
|
_: 3
|
|
3437
|
-
}), createElementVNode("span", _hoisted_3$
|
|
3437
|
+
}), createElementVNode("span", _hoisted_3$17, toDisplayString(__props.description), 1)])) : (openBlock(), createBlock(unref(Menu).ItemText, {
|
|
3438
3438
|
key: 2,
|
|
3439
3439
|
class: "qk-menu__label"
|
|
3440
3440
|
}, {
|
|
3441
3441
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
3442
3442
|
_: 3
|
|
3443
3443
|
})),
|
|
3444
|
-
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
3444
|
+
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_4$13, [renderSlot(_ctx.$slots, "trailing")])) : __props.shortcut?.length ? (openBlock(), createElementBlock("span", _hoisted_5$11, [createVNode(_sfc_main$42, {
|
|
3445
3445
|
keys: typeof __props.shortcut === "string" ? [__props.shortcut] : __props.shortcut,
|
|
3446
3446
|
size: "xs"
|
|
3447
3447
|
}, null, 8, ["keys"])])) : createCommentVNode("v-if", true)
|
|
@@ -3459,6 +3459,16 @@ const _sfc_main$41 = /*@__PURE__*/ defineComponent({
|
|
|
3459
3459
|
});
|
|
3460
3460
|
//#endregion
|
|
3461
3461
|
//#region src/vue/menu/menu-group.vue
|
|
3462
|
+
const _hoisted_1$25 = {
|
|
3463
|
+
key: 0,
|
|
3464
|
+
class: "qk-menu__group-leading",
|
|
3465
|
+
"aria-hidden": "true"
|
|
3466
|
+
};
|
|
3467
|
+
const _hoisted_2$19 = { class: "qk-menu__group-text" };
|
|
3468
|
+
const _hoisted_3$16 = {
|
|
3469
|
+
key: 1,
|
|
3470
|
+
class: "qk-menu__trailing"
|
|
3471
|
+
};
|
|
3462
3472
|
const _sfc_main$40 = /*@__PURE__*/ defineComponent({
|
|
3463
3473
|
__name: "menu-group",
|
|
3464
3474
|
props: {
|
|
@@ -3474,10 +3484,17 @@ const _sfc_main$40 = /*@__PURE__*/ defineComponent({
|
|
|
3474
3484
|
return openBlock(), createBlock(unref(Menu).ItemGroup, mergeProps(__props.id === void 0 ? {} : { id: __props.id }, { class: "qk-menu__group" }), {
|
|
3475
3485
|
default: withCtx(() => [__props.label ? (openBlock(), createBlock(unref(Menu).ItemGroupLabel, {
|
|
3476
3486
|
key: 0,
|
|
3477
|
-
class: normalizeClass(["qk-menu__group-label", {
|
|
3487
|
+
class: normalizeClass(["qk-menu__group-label", {
|
|
3488
|
+
"qk-menu__group-label--inset": __props.inset,
|
|
3489
|
+
"qk-menu__group-label--slotted": _ctx.$slots.leading || _ctx.$slots.trailing
|
|
3490
|
+
}])
|
|
3478
3491
|
}, {
|
|
3479
|
-
default: withCtx(() => [
|
|
3480
|
-
|
|
3492
|
+
default: withCtx(() => [_ctx.$slots.leading || _ctx.$slots.trailing ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3493
|
+
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_1$25, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("v-if", true),
|
|
3494
|
+
createElementVNode("span", _hoisted_2$19, toDisplayString(__props.label), 1),
|
|
3495
|
+
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_3$16, [renderSlot(_ctx.$slots, "trailing")])) : createCommentVNode("v-if", true)
|
|
3496
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(__props.label), 1)], 64))]),
|
|
3497
|
+
_: 3
|
|
3481
3498
|
}, 8, ["class"])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")]),
|
|
3482
3499
|
_: 3
|
|
3483
3500
|
}, 16);
|
|
@@ -3880,7 +3897,7 @@ const _hoisted_2$17 = {
|
|
|
3880
3897
|
class: "qk-menu__copy"
|
|
3881
3898
|
};
|
|
3882
3899
|
const _hoisted_3$15 = { class: "qk-menu__description" };
|
|
3883
|
-
const _hoisted_4$
|
|
3900
|
+
const _hoisted_4$12 = {
|
|
3884
3901
|
key: 3,
|
|
3885
3902
|
class: "qk-menu__trailing",
|
|
3886
3903
|
"aria-hidden": "true"
|
|
@@ -3930,7 +3947,7 @@ const _sfc_main$36 = /*@__PURE__*/ defineComponent({
|
|
|
3930
3947
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
3931
3948
|
_: 3
|
|
3932
3949
|
})),
|
|
3933
|
-
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
3950
|
+
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_4$12, [renderSlot(_ctx.$slots, "trailing")])) : __props.shortcut?.length ? (openBlock(), createElementBlock("span", _hoisted_5$10, [createVNode(_sfc_main$42, {
|
|
3934
3951
|
keys: typeof __props.shortcut === "string" ? [__props.shortcut] : __props.shortcut,
|
|
3935
3952
|
size: "xs"
|
|
3936
3953
|
}, null, 8, ["keys"])])) : createCommentVNode("v-if", true),
|
|
@@ -3972,7 +3989,7 @@ const _hoisted_2$16 = {
|
|
|
3972
3989
|
class: "qk-menu__copy"
|
|
3973
3990
|
};
|
|
3974
3991
|
const _hoisted_3$14 = { class: "qk-menu__description" };
|
|
3975
|
-
const _hoisted_4$
|
|
3992
|
+
const _hoisted_4$11 = {
|
|
3976
3993
|
key: 3,
|
|
3977
3994
|
class: "qk-menu__trailing",
|
|
3978
3995
|
"aria-hidden": "true"
|
|
@@ -4034,7 +4051,7 @@ const _sfc_main$35 = /*@__PURE__*/ defineComponent({
|
|
|
4034
4051
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
4035
4052
|
_: 3
|
|
4036
4053
|
})),
|
|
4037
|
-
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
4054
|
+
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_4$11, [renderSlot(_ctx.$slots, "trailing")])) : __props.shortcut?.length ? (openBlock(), createElementBlock("span", _hoisted_5$9, [createVNode(_sfc_main$42, {
|
|
4038
4055
|
keys: typeof __props.shortcut === "string" ? [__props.shortcut] : __props.shortcut,
|
|
4039
4056
|
size: "xs"
|
|
4040
4057
|
}, null, 8, ["keys"])])) : createCommentVNode("v-if", true),
|
|
@@ -4119,8 +4136,37 @@ const _sfc_main$34 = /*@__PURE__*/ defineComponent({
|
|
|
4119
4136
|
"content-props",
|
|
4120
4137
|
"inset",
|
|
4121
4138
|
"tone"
|
|
4122
|
-
])) : item.kind === "
|
|
4123
|
-
|
|
4139
|
+
])) : item.kind === "submenu" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createCommentVNode(" A disabled submenu keeps its disclosure mark so it still reads as a submenu, not as a dead label. "), createVNode(_sfc_main$41, {
|
|
4140
|
+
inset: __props.items.some((entry) => !!entry.icon),
|
|
4141
|
+
value: item.value,
|
|
4142
|
+
disabled: "",
|
|
4143
|
+
tone: item.tone ?? "neutral",
|
|
4144
|
+
title: item.reason
|
|
4145
|
+
}, createSlots({
|
|
4146
|
+
trailing: withCtx(() => [_cache[3] || (_cache[3] = createElementVNode("span", { class: "qk-menu__disclosure" }, [createElementVNode("svg", {
|
|
4147
|
+
viewBox: "0 0 16 16",
|
|
4148
|
+
fill: "none",
|
|
4149
|
+
stroke: "currentColor",
|
|
4150
|
+
"stroke-width": "1.6",
|
|
4151
|
+
"stroke-linecap": "round",
|
|
4152
|
+
"stroke-linejoin": "round"
|
|
4153
|
+
}, [createElementVNode("path", { d: "m6 3.5 4.5 4.5L6 12.5" })])], -1))]),
|
|
4154
|
+
default: withCtx(() => [createTextVNode(" " + toDisplayString(item.label) + " ", 1)]),
|
|
4155
|
+
_: 2
|
|
4156
|
+
}, [_ctx.$slots.leading || item.icon ? {
|
|
4157
|
+
name: "leading",
|
|
4158
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "leading", { item }, () => [item.icon ? (openBlock(), createBlock(_sfc_main$65, {
|
|
4159
|
+
key: 0,
|
|
4160
|
+
name: item.icon
|
|
4161
|
+
}, null, 8, ["name"])) : createCommentVNode("v-if", true)])]),
|
|
4162
|
+
key: "0"
|
|
4163
|
+
} : void 0]), 1032, [
|
|
4164
|
+
"inset",
|
|
4165
|
+
"value",
|
|
4166
|
+
"tone",
|
|
4167
|
+
"title"
|
|
4168
|
+
])], 2112)) : item.kind === "radio-group" ? (openBlock(), createBlock(_sfc_main$37, {
|
|
4169
|
+
key: 4,
|
|
4124
4170
|
label: item.label,
|
|
4125
4171
|
"model-value": item.selectedValue ?? "",
|
|
4126
4172
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => emit("select", $event))
|
|
@@ -4155,7 +4201,7 @@ const _sfc_main$34 = /*@__PURE__*/ defineComponent({
|
|
|
4155
4201
|
}), 128))]),
|
|
4156
4202
|
_: 2
|
|
4157
4203
|
}, 1032, ["label", "model-value"])) : item.checked !== void 0 ? (openBlock(), createBlock(_sfc_main$35, {
|
|
4158
|
-
key:
|
|
4204
|
+
key: 5,
|
|
4159
4205
|
value: item.value,
|
|
4160
4206
|
checked: item.checked,
|
|
4161
4207
|
disabled: item.disabled ?? false,
|
|
@@ -4186,7 +4232,7 @@ const _sfc_main$34 = /*@__PURE__*/ defineComponent({
|
|
|
4186
4232
|
"inset",
|
|
4187
4233
|
"onUpdate:checked"
|
|
4188
4234
|
])) : (openBlock(), createBlock(_sfc_main$41, {
|
|
4189
|
-
key:
|
|
4235
|
+
key: 6,
|
|
4190
4236
|
inset: __props.items.some((entry) => !!entry.icon),
|
|
4191
4237
|
value: item.value,
|
|
4192
4238
|
disabled: item.disabled ?? false,
|
|
@@ -5438,7 +5484,7 @@ const _hoisted_2$13 = {
|
|
|
5438
5484
|
"stroke-linejoin": "round"
|
|
5439
5485
|
};
|
|
5440
5486
|
const _hoisted_3$12 = { key: 0 };
|
|
5441
|
-
const _hoisted_4$
|
|
5487
|
+
const _hoisted_4$10 = { key: 1 };
|
|
5442
5488
|
const _hoisted_5$8 = { key: 2 };
|
|
5443
5489
|
const _hoisted_6$6 = { key: 3 };
|
|
5444
5490
|
const _hoisted_7$6 = { key: 4 };
|
|
@@ -5462,7 +5508,7 @@ const _sfc_main$24 = /*@__PURE__*/ defineComponent({
|
|
|
5462
5508
|
rx: "55",
|
|
5463
5509
|
ry: "5",
|
|
5464
5510
|
fill: "var(--qk-color-surface-subtle)"
|
|
5465
|
-
}, null, -1)), createElementVNode("g", _hoisted_2$13, [__props.scene === "data" ? (openBlock(), createElementBlock("g", _hoisted_3$12, [..._cache[0] || (_cache[0] = [createStaticVNode("<rect x=\"28\" y=\"14\" width=\"99\" height=\"68\" rx=\"7\" fill=\"var(--qk-color-surface-subtle)\"></rect><rect x=\"20\" y=\"26\" width=\"118\" height=\"23\" rx=\"5\" fill=\"var(--qk-color-surface-page)\"></rect><rect x=\"26\" y=\"54\" width=\"108\" height=\"23\" rx=\"5\" fill=\"var(--qk-color-surface-page)\"></rect><circle cx=\"34\" cy=\"37.5\" r=\"3\" fill=\"var(--qk-color-border-default)\" stroke=\"none\"></circle><circle cx=\"40\" cy=\"65.5\" r=\"3\" fill=\"var(--qk-color-border-default)\" stroke=\"none\"></circle><path d=\"M47 35H94M47 41H76M53 63H111M53 69H83\"></path><path d=\"M117 35H125M121 31V39\" stroke=\"var(--qk-color-icon-secondary)\"></path><path d=\"M50 86H110\" stroke-dasharray=\"2 5\"></path>", 8)])])) : __props.scene === "search" ? (openBlock(), createElementBlock("g", _hoisted_4$
|
|
5511
|
+
}, null, -1)), createElementVNode("g", _hoisted_2$13, [__props.scene === "data" ? (openBlock(), createElementBlock("g", _hoisted_3$12, [..._cache[0] || (_cache[0] = [createStaticVNode("<rect x=\"28\" y=\"14\" width=\"99\" height=\"68\" rx=\"7\" fill=\"var(--qk-color-surface-subtle)\"></rect><rect x=\"20\" y=\"26\" width=\"118\" height=\"23\" rx=\"5\" fill=\"var(--qk-color-surface-page)\"></rect><rect x=\"26\" y=\"54\" width=\"108\" height=\"23\" rx=\"5\" fill=\"var(--qk-color-surface-page)\"></rect><circle cx=\"34\" cy=\"37.5\" r=\"3\" fill=\"var(--qk-color-border-default)\" stroke=\"none\"></circle><circle cx=\"40\" cy=\"65.5\" r=\"3\" fill=\"var(--qk-color-border-default)\" stroke=\"none\"></circle><path d=\"M47 35H94M47 41H76M53 63H111M53 69H83\"></path><path d=\"M117 35H125M121 31V39\" stroke=\"var(--qk-color-icon-secondary)\"></path><path d=\"M50 86H110\" stroke-dasharray=\"2 5\"></path>", 8)])])) : __props.scene === "search" ? (openBlock(), createElementBlock("g", _hoisted_4$10, [..._cache[1] || (_cache[1] = [createStaticVNode("<rect x=\"25\" y=\"14\" width=\"82\" height=\"70\" rx=\"6\" fill=\"var(--qk-color-surface-subtle)\"></rect><path d=\"M39 30H77M39 40H91M39 50H61M39 69H53\"></path><circle cx=\"98\" cy=\"56\" r=\"26\" fill=\"var(--qk-color-surface-page)\"></circle><circle cx=\"98\" cy=\"56\" r=\"19\" stroke-dasharray=\"3 5\"></circle><path d=\"m117 75 20 17\" stroke=\"var(--qk-color-icon-secondary)\" stroke-width=\"5\"></path><path d=\"M91 56H105\" stroke=\"var(--qk-color-icon-secondary)\"></path><path d=\"M121 19V27M117 23H125\"></path>", 7)])])) : __props.scene === "create" ? (openBlock(), createElementBlock("g", _hoisted_5$8, [..._cache[2] || (_cache[2] = [createStaticVNode("<path d=\"M44 15H94L115 36V88H44Z\" fill=\"var(--qk-color-surface-page)\"></path><path d=\"M94 15V36H115\" fill=\"var(--qk-color-surface-subtle)\"></path><path d=\"M56 49H94M56 58H84M56 67H74\"></path><rect x=\"101\" y=\"60\" width=\"34\" height=\"34\" rx=\"9\" fill=\"var(--qk-color-surface-subtle)\"></rect><path d=\"M118 69V85M110 77H126\" stroke=\"var(--qk-color-icon-secondary)\" stroke-width=\"2\"></path><path d=\"M25 36V44M21 40H29M123 20V26M120 23H126\"></path><path d=\"m31 75 3 3-3 3-3-3Z\"></path>", 7)])])) : __props.scene === "documents" ? (openBlock(), createElementBlock("g", _hoisted_6$6, [..._cache[3] || (_cache[3] = [createStaticVNode("<path d=\"M32 25 79 17 92 83 45 91Z\" fill=\"var(--qk-color-surface-subtle)\"></path><path d=\"m86 18 43 8-12 65-43-8Z\" fill=\"var(--qk-color-surface-subtle)\"></path><path d=\"M51 10H94L111 27V89H51Z\" fill=\"var(--qk-color-surface-page)\"></path><path d=\"M94 10V27H111\" fill=\"var(--qk-color-surface-subtle)\"></path><rect x=\"64\" y=\"35\" width=\"21\" height=\"15\" rx=\"3\" fill=\"var(--qk-color-surface-subtle)\"></rect><path d=\"M64 61H98M64 69H98M64 77H83\"></path><path d=\"M22 62H28M25 59V65M132 52H138\"></path>", 7)])])) : __props.scene === "chart" ? (openBlock(), createElementBlock("g", _hoisted_7$6, [..._cache[4] || (_cache[4] = [createStaticVNode("<rect x=\"23\" y=\"16\" width=\"115\" height=\"71\" rx=\"6\" fill=\"var(--qk-color-surface-page)\"></rect><path d=\"M36 31H124M36 48H124M36 65H124\" stroke-dasharray=\"2 5\"></path><path d=\"M38 75H124M38 28V75\"></path><rect x=\"50\" y=\"56\" width=\"13\" height=\"19\" rx=\"2\" fill=\"var(--qk-color-surface-subtle)\"></rect><rect x=\"76\" y=\"42\" width=\"13\" height=\"33\" rx=\"2\" fill=\"var(--qk-color-surface-subtle)\"></rect><rect x=\"102\" y=\"30\" width=\"13\" height=\"45\" rx=\"2\" fill=\"var(--qk-color-surface-subtle)\"></rect><path d=\"m15 38 3 3-3 3-3-3ZM143 64H149M146 61V67\"></path>", 7)])])) : (openBlock(), createElementBlock("g", _hoisted_8$5, [..._cache[5] || (_cache[5] = [createStaticVNode("<rect x=\"23\" y=\"18\" width=\"114\" height=\"69\" rx=\"6\" fill=\"var(--qk-color-surface-page)\"></rect><path d=\"M29 18H131Q137 18 137 24V37H23V24Q23 18 29 18Z\" fill=\"var(--qk-color-surface-subtle)\"></path><path d=\"M23 37H137M23 54H137M23 71H137M64 37V87M105 37V87\"></path><path d=\"M34 28H52M74 28H94M114 28H125\" stroke=\"var(--qk-color-icon-secondary)\"></path><path d=\"M34 45H48M75 62H89M115 79H125\"></path><path d=\"M12 58H18M15 55V61M143 36H149\"></path>", 6)])]))])], 8, _hoisted_1$17);
|
|
5466
5512
|
};
|
|
5467
5513
|
}
|
|
5468
5514
|
});
|
|
@@ -5572,7 +5618,7 @@ const _hoisted_2$11 = {
|
|
|
5572
5618
|
"aria-hidden": "true"
|
|
5573
5619
|
};
|
|
5574
5620
|
const _hoisted_3$11 = { class: "qk-alert__body" };
|
|
5575
|
-
const _hoisted_4$
|
|
5621
|
+
const _hoisted_4$9 = {
|
|
5576
5622
|
key: 2,
|
|
5577
5623
|
class: "qk-alert__content"
|
|
5578
5624
|
};
|
|
@@ -5659,7 +5705,7 @@ const _sfc_main$22 = /*@__PURE__*/ defineComponent({
|
|
|
5659
5705
|
default: withCtx(() => [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])]),
|
|
5660
5706
|
_: 3
|
|
5661
5707
|
})) : createCommentVNode("v-if", true),
|
|
5662
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
5708
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$9, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("v-if", true),
|
|
5663
5709
|
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$7, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("v-if", true)
|
|
5664
5710
|
]),
|
|
5665
5711
|
__props.closable ? (openBlock(), createBlock(_sfc_main$63, {
|
|
@@ -5689,7 +5735,7 @@ const _hoisted_2$10 = [
|
|
|
5689
5735
|
"onClick"
|
|
5690
5736
|
];
|
|
5691
5737
|
const _hoisted_3$10 = { class: "qk-candidate-list__label" };
|
|
5692
|
-
const _hoisted_4$
|
|
5738
|
+
const _hoisted_4$8 = {
|
|
5693
5739
|
key: 0,
|
|
5694
5740
|
class: "qk-candidate-list__description"
|
|
5695
5741
|
};
|
|
@@ -5729,7 +5775,7 @@ const _sfc_main$21 = /*@__PURE__*/ defineComponent({
|
|
|
5729
5775
|
"data-active": item.key === __props.activeKey || void 0,
|
|
5730
5776
|
onPointerdown: _cache[0] || (_cache[0] = withModifiers(() => {}, ["prevent"])),
|
|
5731
5777
|
onClick: ($event) => select(item.key)
|
|
5732
|
-
}, [createElementVNode("span", _hoisted_3$10, toDisplayString(item.label), 1), item.description ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
5778
|
+
}, [createElementVNode("span", _hoisted_3$10, toDisplayString(item.label), 1), item.description ? (openBlock(), createElementBlock("span", _hoisted_4$8, toDisplayString(item.description), 1)) : createCommentVNode("v-if", true)], 40, _hoisted_2$10);
|
|
5733
5779
|
}), 128))], 8, _hoisted_1$14);
|
|
5734
5780
|
};
|
|
5735
5781
|
}
|
|
@@ -6094,7 +6140,7 @@ const _sfc_main$17 = /*@__PURE__*/ defineComponent({
|
|
|
6094
6140
|
onClick: activate
|
|
6095
6141
|
}, {
|
|
6096
6142
|
default: withCtx(() => [createVNode(_sfc_main$65, {
|
|
6097
|
-
name: __props.busy ? "
|
|
6143
|
+
name: __props.busy ? "stop" : "arrowUp",
|
|
6098
6144
|
size: 16
|
|
6099
6145
|
}, null, 8, ["name"])]),
|
|
6100
6146
|
_: 1
|
|
@@ -6172,7 +6218,7 @@ const _hoisted_2$8 = {
|
|
|
6172
6218
|
class: "qk-chat-composer__header"
|
|
6173
6219
|
};
|
|
6174
6220
|
const _hoisted_3$8 = { class: "qk-chat-composer__editor" };
|
|
6175
|
-
const _hoisted_4$
|
|
6221
|
+
const _hoisted_4$7 = {
|
|
6176
6222
|
key: 0,
|
|
6177
6223
|
class: "qk-chat-composer__leading"
|
|
6178
6224
|
};
|
|
@@ -6244,6 +6290,7 @@ const _sfc_main$14 = /*@__PURE__*/ defineComponent({
|
|
|
6244
6290
|
const fileDragging = ref(false);
|
|
6245
6291
|
const footerId = `qk-composer-footer-${useId()}`;
|
|
6246
6292
|
const minRows = computed(() => props.rows ?? (props.layout === "inline" ? 1 : 2));
|
|
6293
|
+
const inputSubmitMode = computed(() => props.busy || props.submitDisabled ? "button" : props.submitMode);
|
|
6247
6294
|
const canSubmit = computed(() => !props.disabled && !props.readOnly && !props.busy && !props.submitDisabled && (props.modelValue.trim().length > 0 || props.hasContent));
|
|
6248
6295
|
const context = computed(() => ({
|
|
6249
6296
|
value: props.modelValue,
|
|
@@ -6251,6 +6298,7 @@ const _sfc_main$14 = /*@__PURE__*/ defineComponent({
|
|
|
6251
6298
|
busy: props.busy,
|
|
6252
6299
|
disabled: props.disabled,
|
|
6253
6300
|
readOnly: props.readOnly,
|
|
6301
|
+
submitMode: inputSubmitMode.value,
|
|
6254
6302
|
canSubmit: canSubmit.value,
|
|
6255
6303
|
updateValue,
|
|
6256
6304
|
submit,
|
|
@@ -6270,6 +6318,15 @@ const _sfc_main$14 = /*@__PURE__*/ defineComponent({
|
|
|
6270
6318
|
function stop() {
|
|
6271
6319
|
if (props.busy && !props.disabled) emit("stop");
|
|
6272
6320
|
}
|
|
6321
|
+
/** Cancel from the default draft field while leaving IME, menus and custom input adapters their own Escape.
|
|
6322
|
+
* @param event - Native field key event.
|
|
6323
|
+
*/
|
|
6324
|
+
function onInputEscape(event) {
|
|
6325
|
+
if (!props.busy || props.disabled || event.defaultPrevented || event.isComposing || event.keyCode === 229 || event.repeat || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;
|
|
6326
|
+
event.preventDefault();
|
|
6327
|
+
event.stopPropagation();
|
|
6328
|
+
stop();
|
|
6329
|
+
}
|
|
6273
6330
|
/** Forward default-input focus without querying a child component's DOM.
|
|
6274
6331
|
* @param options - Native focus scrolling options.
|
|
6275
6332
|
*/
|
|
@@ -6356,7 +6413,7 @@ const _sfc_main$14 = /*@__PURE__*/ defineComponent({
|
|
|
6356
6413
|
onPointerdown: onSurfacePointerDown
|
|
6357
6414
|
}, [
|
|
6358
6415
|
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_2$8, [renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps(context.value)))])) : createCommentVNode("v-if", true),
|
|
6359
|
-
createElementVNode("div", _hoisted_3$8, [_ctx.$slots.leading ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
6416
|
+
createElementVNode("div", _hoisted_3$8, [_ctx.$slots.leading ? (openBlock(), createElementBlock("div", _hoisted_4$7, [renderSlot(_ctx.$slots, "leading", normalizeProps(guardReactiveProps(context.value)))])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_5$6, [renderSlot(_ctx.$slots, "input", normalizeProps(guardReactiveProps(context.value)), () => [createVNode(_sfc_main$18, {
|
|
6360
6417
|
ref_key: "input",
|
|
6361
6418
|
ref: input,
|
|
6362
6419
|
"model-value": __props.modelValue,
|
|
@@ -6365,13 +6422,14 @@ const _sfc_main$14 = /*@__PURE__*/ defineComponent({
|
|
|
6365
6422
|
size: __props.size,
|
|
6366
6423
|
variant: "embedded",
|
|
6367
6424
|
"aria-describedby": _ctx.$slots.footer ? footerId : void 0,
|
|
6368
|
-
"submit-mode":
|
|
6425
|
+
"submit-mode": inputSubmitMode.value,
|
|
6369
6426
|
disabled: __props.disabled,
|
|
6370
6427
|
"read-only": __props.readOnly,
|
|
6371
6428
|
rows: minRows.value,
|
|
6372
6429
|
"max-rows": __props.maxRows,
|
|
6373
6430
|
"onUpdate:modelValue": updateValue,
|
|
6374
|
-
onSubmit: submit
|
|
6431
|
+
onSubmit: submit,
|
|
6432
|
+
onKeydown: withKeys(onInputEscape, ["esc"])
|
|
6375
6433
|
}, null, 8, [
|
|
6376
6434
|
"model-value",
|
|
6377
6435
|
"label",
|
|
@@ -7064,7 +7122,8 @@ const _sfc_main$13 = /*@__PURE__*/ defineComponent({
|
|
|
7064
7122
|
function stateIcon(state) {
|
|
7065
7123
|
if (state === "running" || state === "streaming") return "loaderCircle";
|
|
7066
7124
|
if (state === "error" || state === "failed") return "circleX";
|
|
7067
|
-
if (state === "stopped" || state === "cancelled") return "
|
|
7125
|
+
if (state === "stopped" || state === "cancelled") return "stop";
|
|
7126
|
+
if (state === "interrupted") return "circleHelp";
|
|
7068
7127
|
if (state === "complete" || state === "succeeded") return "check";
|
|
7069
7128
|
return "clock";
|
|
7070
7129
|
}
|
|
@@ -7101,7 +7160,7 @@ const _hoisted_1$10 = [
|
|
|
7101
7160
|
];
|
|
7102
7161
|
const _hoisted_2$7 = ["data-state"];
|
|
7103
7162
|
const _hoisted_3$7 = ["title"];
|
|
7104
|
-
const _hoisted_4$
|
|
7163
|
+
const _hoisted_4$6 = ["title"];
|
|
7105
7164
|
const _hoisted_5$5 = ["title"];
|
|
7106
7165
|
const _hoisted_6$4 = {
|
|
7107
7166
|
key: 4,
|
|
@@ -7198,14 +7257,14 @@ const _sfc_main$12 = /*@__PURE__*/ defineComponent({
|
|
|
7198
7257
|
class: "qk-chat-process__preview",
|
|
7199
7258
|
title: __props.summary,
|
|
7200
7259
|
dir: "auto"
|
|
7201
|
-
}, toDisplayString(__props.summary), 9, _hoisted_4$
|
|
7260
|
+
}, toDisplayString(__props.summary), 9, _hoisted_4$6)) : createCommentVNode("v-if", true),
|
|
7202
7261
|
active.value ? (openBlock(), createBlock(_sfc_main$50, {
|
|
7203
7262
|
key: 2,
|
|
7204
7263
|
class: "qk-chat-process__state",
|
|
7205
7264
|
text: status.value,
|
|
7206
7265
|
title: status.value,
|
|
7207
7266
|
dir: "auto"
|
|
7208
|
-
}, null, 8, ["text", "title"])) : !settled.value ? (openBlock(), createElementBlock("span", {
|
|
7267
|
+
}, null, 8, ["text", "title"])) : !settled.value || status.value !== unref(text).status[__props.state] ? (openBlock(), createElementBlock("span", {
|
|
7209
7268
|
key: 3,
|
|
7210
7269
|
class: "qk-chat-process__state",
|
|
7211
7270
|
title: status.value,
|
|
@@ -7363,7 +7422,7 @@ const _sfc_main$10 = /*@__PURE__*/ defineComponent({
|
|
|
7363
7422
|
"data-reveal": reveal.value || void 0,
|
|
7364
7423
|
tabindex: "-1"
|
|
7365
7424
|
}), [
|
|
7366
|
-
__props.copyText
|
|
7425
|
+
__props.copyText && !active.value ? (openBlock(), createBlock(_sfc_main$66, {
|
|
7367
7426
|
key: 0,
|
|
7368
7427
|
value: __props.copyText,
|
|
7369
7428
|
mode: "icon",
|
|
@@ -7444,7 +7503,7 @@ function actionState(state) {
|
|
|
7444
7503
|
if (state === "running") return "streaming";
|
|
7445
7504
|
if (state === "succeeded" || state === "approved" || state === "rejected" || state === "answered" || state === "expired") return "complete";
|
|
7446
7505
|
if (state === "failed") return "error";
|
|
7447
|
-
if (state === "cancelled") return "stopped";
|
|
7506
|
+
if (state === "cancelled" || state === "interrupted") return "stopped";
|
|
7448
7507
|
return state;
|
|
7449
7508
|
}
|
|
7450
7509
|
//#endregion
|
|
@@ -7525,7 +7584,7 @@ const _hoisted_3$6 = {
|
|
|
7525
7584
|
key: 0,
|
|
7526
7585
|
class: "qk-chat-part__error"
|
|
7527
7586
|
};
|
|
7528
|
-
const _hoisted_4$
|
|
7587
|
+
const _hoisted_4$5 = { dir: "auto" };
|
|
7529
7588
|
const _sfc_main$8 = /*@__PURE__*/ defineComponent({
|
|
7530
7589
|
__name: "tool",
|
|
7531
7590
|
props: {
|
|
@@ -7593,7 +7652,7 @@ const _sfc_main$8 = /*@__PURE__*/ defineComponent({
|
|
|
7593
7652
|
fn: withCtx(() => [__props.part.error ? (openBlock(), createElementBlock("div", _hoisted_3$6, [createVNode(_sfc_main$65, {
|
|
7594
7653
|
name: "circleX",
|
|
7595
7654
|
size: 16
|
|
7596
|
-
}), createElementVNode("span", _hoisted_4$
|
|
7655
|
+
}), createElementVNode("span", _hoisted_4$5, toDisplayString(__props.part.error), 1)])) : createCommentVNode("v-if", true), __props.part.actions?.length ? (openBlock(), createBlock(_sfc_main$10, {
|
|
7597
7656
|
key: identity.value,
|
|
7598
7657
|
actions: unref(localActions)(__props.part.actions),
|
|
7599
7658
|
state: unref(actionState)(__props.part.state),
|
|
@@ -7624,7 +7683,7 @@ const _sfc_main$8 = /*@__PURE__*/ defineComponent({
|
|
|
7624
7683
|
const _hoisted_1$6 = ["aria-label"];
|
|
7625
7684
|
const _hoisted_2$5 = { class: "qk-sources__trigger" };
|
|
7626
7685
|
const _hoisted_3$5 = { class: "qk-sources__count" };
|
|
7627
|
-
const _hoisted_4$
|
|
7686
|
+
const _hoisted_4$4 = {
|
|
7628
7687
|
class: "qk-sources__list",
|
|
7629
7688
|
role: "list"
|
|
7630
7689
|
};
|
|
@@ -7713,7 +7772,7 @@ const _sfc_main$7 = /*@__PURE__*/ defineComponent({
|
|
|
7713
7772
|
createElementVNode("span", null, toDisplayString(title.value), 1),
|
|
7714
7773
|
createElementVNode("span", _hoisted_3$5, toDisplayString(__props.sources.length), 1)
|
|
7715
7774
|
])]),
|
|
7716
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_4$
|
|
7775
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_4$4, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.sources, (source, index) => {
|
|
7717
7776
|
return openBlock(), createElementBlock("div", {
|
|
7718
7777
|
key: source.id,
|
|
7719
7778
|
role: "listitem",
|
|
@@ -7741,10 +7800,14 @@ const _sfc_main$7 = /*@__PURE__*/ defineComponent({
|
|
|
7741
7800
|
});
|
|
7742
7801
|
//#endregion
|
|
7743
7802
|
//#region src/vue/chat/confirmation/confirmation.vue
|
|
7744
|
-
const _hoisted_1$5 = [
|
|
7803
|
+
const _hoisted_1$5 = [
|
|
7804
|
+
"data-intent",
|
|
7805
|
+
"data-state",
|
|
7806
|
+
"aria-label"
|
|
7807
|
+
];
|
|
7745
7808
|
const _hoisted_2$4 = { class: "qk-chat-decision__heading" };
|
|
7746
7809
|
const _hoisted_3$4 = { class: "qk-chat-decision__title" };
|
|
7747
|
-
const _hoisted_4$
|
|
7810
|
+
const _hoisted_4$3 = ["data-state"];
|
|
7748
7811
|
const _hoisted_5$3 = {
|
|
7749
7812
|
key: 0,
|
|
7750
7813
|
class: "qk-chat-decision__description"
|
|
@@ -7786,15 +7849,20 @@ const _sfc_main$6 = /*@__PURE__*/ defineComponent({
|
|
|
7786
7849
|
return (_ctx, _cache) => {
|
|
7787
7850
|
return withDirectives((openBlock(), createElementBlock("section", {
|
|
7788
7851
|
class: "qk-chat-decision qk-chat-confirmation",
|
|
7852
|
+
"data-intent": __props.intent ?? "permission",
|
|
7789
7853
|
"data-state": __props.state,
|
|
7790
7854
|
"aria-label": __props.title,
|
|
7791
7855
|
tabindex: "-1"
|
|
7792
7856
|
}, [
|
|
7793
|
-
createElementVNode("div", _hoisted_2$4, [createElementVNode("strong", _hoisted_3$4,
|
|
7857
|
+
createElementVNode("div", _hoisted_2$4, [createElementVNode("strong", _hoisted_3$4, [__props.intent === "review" ? (openBlock(), createBlock(_sfc_main$65, {
|
|
7858
|
+
key: 0,
|
|
7859
|
+
name: "fileCheck",
|
|
7860
|
+
size: 16
|
|
7861
|
+
})) : createCommentVNode("v-if", true), createTextVNode(toDisplayString(__props.title), 1)]), createElementVNode("span", {
|
|
7794
7862
|
class: "qk-chat-decision__state",
|
|
7795
7863
|
"data-state": __props.state,
|
|
7796
7864
|
role: "status"
|
|
7797
|
-
}, toDisplayString(labels.value[__props.state]), 9, _hoisted_4$
|
|
7865
|
+
}, toDisplayString(labels.value[__props.state]), 9, _hoisted_4$3)]),
|
|
7798
7866
|
__props.description ? (openBlock(), createElementBlock("p", _hoisted_5$3, toDisplayString(__props.description), 1)) : createCommentVNode("v-if", true),
|
|
7799
7867
|
renderSlot(_ctx.$slots, "default"),
|
|
7800
7868
|
__props.state === "failed" ? (openBlock(), createElementBlock("p", _hoisted_6$2, toDisplayString(__props.error || labels.value.failed), 1)) : createCommentVNode("v-if", true),
|
|
@@ -7830,7 +7898,7 @@ const _hoisted_1$4 = [
|
|
|
7830
7898
|
];
|
|
7831
7899
|
const _hoisted_2$3 = { class: "qk-chat-decision__heading" };
|
|
7832
7900
|
const _hoisted_3$3 = { class: "qk-chat-decision__title" };
|
|
7833
|
-
const _hoisted_4$
|
|
7901
|
+
const _hoisted_4$2 = ["data-state"];
|
|
7834
7902
|
const _hoisted_5$2 = {
|
|
7835
7903
|
key: 0,
|
|
7836
7904
|
class: "qk-chat-decision__description"
|
|
@@ -8033,7 +8101,7 @@ const _sfc_main$5 = /*@__PURE__*/ defineComponent({
|
|
|
8033
8101
|
class: "qk-chat-decision__state",
|
|
8034
8102
|
"data-state": __props.state,
|
|
8035
8103
|
role: "status"
|
|
8036
|
-
}, toDisplayString(__props.state === "failed" ? labels.value.failed : labels.value[__props.state]), 9, _hoisted_4$
|
|
8104
|
+
}, toDisplayString(__props.state === "failed" ? labels.value.failed : labels.value[__props.state]), 9, _hoisted_4$2)) : createCommentVNode("v-if", true)]),
|
|
8037
8105
|
__props.description ? (openBlock(), createElementBlock("p", _hoisted_5$2, toDisplayString(__props.description), 1)) : createCommentVNode("v-if", true),
|
|
8038
8106
|
prompt.value && editable.value ? (openBlock(), createElementBlock("div", _hoisted_6$1, [createVNode(_sfc_main$64, {
|
|
8039
8107
|
size: "sm",
|
|
@@ -8172,14 +8240,10 @@ const _hoisted_1$3 = [
|
|
|
8172
8240
|
"data-state"
|
|
8173
8241
|
];
|
|
8174
8242
|
const _hoisted_2$2 = {
|
|
8175
|
-
key: 0,
|
|
8176
|
-
class: "qk-chat-part__hint"
|
|
8177
|
-
};
|
|
8178
|
-
const _hoisted_3$2 = {
|
|
8179
8243
|
class: "qk-chat-part__text",
|
|
8180
8244
|
dir: "auto"
|
|
8181
8245
|
};
|
|
8182
|
-
const
|
|
8246
|
+
const _hoisted_3$2 = {
|
|
8183
8247
|
key: 0,
|
|
8184
8248
|
class: "qk-chat-part__hint"
|
|
8185
8249
|
};
|
|
@@ -8188,6 +8252,10 @@ const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
|
8188
8252
|
__name: "message-part",
|
|
8189
8253
|
props: {
|
|
8190
8254
|
part: {},
|
|
8255
|
+
showTextStatus: {
|
|
8256
|
+
type: Boolean,
|
|
8257
|
+
default: true
|
|
8258
|
+
},
|
|
8191
8259
|
messageId: {},
|
|
8192
8260
|
open: {
|
|
8193
8261
|
type: Boolean,
|
|
@@ -8234,7 +8302,7 @@ const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
|
8234
8302
|
}), [(openBlock(), createElementBlock("div", {
|
|
8235
8303
|
key: identity.value,
|
|
8236
8304
|
class: "qk-chat-part__content"
|
|
8237
|
-
}, [__props.part.kind === "text" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [renderSlot(_ctx.$slots, "text", { part: __props.part }, () => [
|
|
8305
|
+
}, [__props.part.kind === "text" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [renderSlot(_ctx.$slots, "text", { part: __props.part }, () => [createElementVNode("div", _hoisted_2$2, toDisplayString(__props.part.text), 1)]), __props.showTextStatus && (state.value === "stopped" || state.value === "error") ? (openBlock(), createElementBlock("div", _hoisted_3$2, toDisplayString(unref(text).status[state.value]), 1)) : createCommentVNode("v-if", true)], 64)) : __props.part.kind === "reasoning" ? (openBlock(), createBlock(_sfc_main$9, {
|
|
8238
8306
|
key: 1,
|
|
8239
8307
|
part: __props.part,
|
|
8240
8308
|
"message-id": __props.messageId,
|
|
@@ -8477,7 +8545,7 @@ const _hoisted_1$1 = [
|
|
|
8477
8545
|
"data-actions-visibility",
|
|
8478
8546
|
"aria-label"
|
|
8479
8547
|
];
|
|
8480
|
-
const _hoisted_2$1 =
|
|
8548
|
+
const _hoisted_2$1 = ["data-side-copy"];
|
|
8481
8549
|
const _hoisted_3$1 = {
|
|
8482
8550
|
key: 0,
|
|
8483
8551
|
class: "qk-chat-message__header"
|
|
@@ -8549,8 +8617,9 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
8549
8617
|
const identity = computed(() => JSON.stringify([props.messageId, props.branch?.selectedId]));
|
|
8550
8618
|
const status = computed(() => props.statusText ?? (props.state === "complete" ? "" : text.value.status[props.state]));
|
|
8551
8619
|
const active = computed(() => props.state === "pending" || props.state === "streaming");
|
|
8552
|
-
const hasActions = computed(() => !!slots.actions || !active.value && props.copyText
|
|
8620
|
+
const hasActions = computed(() => !!slots.actions || !active.value && !!props.copyText || props.actions?.some((action) => action.when === "always" || (action.when === "active" ? active.value : !active.value)));
|
|
8553
8621
|
const hasFooter = computed(() => hasActions.value || props.meta || (props.branch?.ids.length ?? 0) > 1);
|
|
8622
|
+
const sideCopy = computed(() => props.align === "end" && props.variant === "soft" && props.copyText && props.parts?.length === 1 && props.parts[0]?.kind === "text" && !props.meta && !props.branch && !props.actions?.length && !slots.actions && !slots.default && !active.value);
|
|
8554
8623
|
/** Reveal the whole footer together, preserving emergency actions and its layout slot.
|
|
8555
8624
|
* @returns Whether this message footer waits for pointer or keyboard focus.
|
|
8556
8625
|
*/
|
|
@@ -8577,7 +8646,10 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
8577
8646
|
"data-actions-visibility": __props.actionsVisibility,
|
|
8578
8647
|
"aria-label": __props.author,
|
|
8579
8648
|
tabindex: "-1"
|
|
8580
|
-
}), [createElementVNode("div",
|
|
8649
|
+
}), [createElementVNode("div", {
|
|
8650
|
+
class: "qk-chat-message__body",
|
|
8651
|
+
"data-side-copy": sideCopy.value || void 0
|
|
8652
|
+
}, [
|
|
8581
8653
|
__props.showHeader ? (openBlock(), createElementBlock("div", _hoisted_3$1, [_ctx.$slots.avatar ? (openBlock(), createElementBlock("span", _hoisted_4$1, [renderSlot(_ctx.$slots, "avatar")])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "header", {}, () => [createElementVNode("span", null, toDisplayString(__props.author), 1)])])) : createCommentVNode("v-if", true),
|
|
8582
8654
|
_ctx.$slots.default || __props.parts?.length ? (openBlock(), createElementBlock("div", {
|
|
8583
8655
|
key: identity.value,
|
|
@@ -8588,6 +8660,7 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
8588
8660
|
key: part.id,
|
|
8589
8661
|
part,
|
|
8590
8662
|
"message-id": __props.messageId,
|
|
8663
|
+
"show-text-status": part.kind !== "text" || part.state !== __props.state || !status.value && !_ctx.$slots.status,
|
|
8591
8664
|
onAction: _cache[0] || (_cache[0] = ($event) => emit("action", $event)),
|
|
8592
8665
|
onAttachmentAction: _cache[1] || (_cache[1] = ($event) => emit("attachmentAction", $event)),
|
|
8593
8666
|
onSourceNavigate: _cache[2] || (_cache[2] = ($event) => emit("sourceNavigate", $event)),
|
|
@@ -8621,7 +8694,11 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
8621
8694
|
fn: withCtx((context) => [renderSlot(_ctx.$slots, "custom", mergeProps({ ref_for: true }, context))]),
|
|
8622
8695
|
key: "4"
|
|
8623
8696
|
} : void 0
|
|
8624
|
-
]), 1032, [
|
|
8697
|
+
]), 1032, [
|
|
8698
|
+
"part",
|
|
8699
|
+
"message-id",
|
|
8700
|
+
"show-text-status"
|
|
8701
|
+
]);
|
|
8625
8702
|
}), 128))])], 8, _hoisted_5$1)) : createCommentVNode("v-if", true),
|
|
8626
8703
|
_ctx.$slots.status || status.value ? (openBlock(), createElementBlock("div", {
|
|
8627
8704
|
key: 2,
|
|
@@ -8674,7 +8751,7 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
8674
8751
|
]))])])) : createCommentVNode("v-if", true),
|
|
8675
8752
|
__props.meta ? (openBlock(), createElementBlock("span", _hoisted_9, toDisplayString(__props.meta), 1)) : createCommentVNode("v-if", true)
|
|
8676
8753
|
], 8, _hoisted_7)) : createCommentVNode("v-if", true)
|
|
8677
|
-
]), createElementVNode("span", _hoisted_10, toDisplayString(announcement.value), 1)], 16, _hoisted_1$1)), [[unref(vChatFocusRecovery)]])]),
|
|
8754
|
+
], 8, _hoisted_2$1), createElementVNode("span", _hoisted_10, toDisplayString(announcement.value), 1)], 16, _hoisted_1$1)), [[unref(vChatFocusRecovery)]])]),
|
|
8678
8755
|
_: 3
|
|
8679
8756
|
});
|
|
8680
8757
|
};
|
|
@@ -8785,6 +8862,7 @@ function restoreAnchor(anchors, nodes, viewport) {
|
|
|
8785
8862
|
*/
|
|
8786
8863
|
function useMessageListScroll(options) {
|
|
8787
8864
|
const following = ref(true);
|
|
8865
|
+
const latestBelow = ref(false);
|
|
8788
8866
|
const nodes = /* @__PURE__ */ new Map();
|
|
8789
8867
|
let anchors = [];
|
|
8790
8868
|
let observer;
|
|
@@ -8799,10 +8877,12 @@ function useMessageListScroll(options) {
|
|
|
8799
8877
|
following.value = value;
|
|
8800
8878
|
options.onFollowingChange(value);
|
|
8801
8879
|
}
|
|
8802
|
-
/**
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8880
|
+
/** Record the actual reading position after scrolling or a content resize.
|
|
8881
|
+
* @param viewport - The same native viewport used for anchor corrections.
|
|
8882
|
+
*/
|
|
8883
|
+
function capture(viewport) {
|
|
8884
|
+
latestBelow.value = viewport.scrollHeight - viewport.clientHeight - viewport.scrollTop > 24;
|
|
8885
|
+
anchors = captureAnchors(options.keys(), nodes, viewport);
|
|
8806
8886
|
}
|
|
8807
8887
|
/** Process real user/native scrolling without interpreting our own correction as intent. */
|
|
8808
8888
|
function onScroll() {
|
|
@@ -8811,8 +8891,8 @@ function useMessageListScroll(options) {
|
|
|
8811
8891
|
const corrected = writtenTop !== void 0 && Math.abs(viewport.scrollTop - writtenTop) <= 1;
|
|
8812
8892
|
writtenTop = void 0;
|
|
8813
8893
|
if (corrected) return;
|
|
8814
|
-
|
|
8815
|
-
|
|
8894
|
+
capture(viewport);
|
|
8895
|
+
setFollowing(!latestBelow.value);
|
|
8816
8896
|
}
|
|
8817
8897
|
/** Apply one geometry correction per frame, then refresh the surviving anchor. */
|
|
8818
8898
|
function reconcile() {
|
|
@@ -8823,7 +8903,7 @@ function useMessageListScroll(options) {
|
|
|
8823
8903
|
if (following.value) viewport.scrollTop = viewport.scrollHeight;
|
|
8824
8904
|
else restoreAnchor(anchors, nodes, viewport);
|
|
8825
8905
|
if (viewport.scrollTop !== before) writtenTop = viewport.scrollTop;
|
|
8826
|
-
capture();
|
|
8906
|
+
capture(viewport);
|
|
8827
8907
|
}
|
|
8828
8908
|
/** Coalesce content, viewport and key updates into the same layout pass. */
|
|
8829
8909
|
function schedule() {
|
|
@@ -8850,7 +8930,7 @@ function useMessageListScroll(options) {
|
|
|
8850
8930
|
setFollowing(false);
|
|
8851
8931
|
viewport.scrollTop += node.getBoundingClientRect().top - viewport.getBoundingClientRect().top;
|
|
8852
8932
|
writtenTop = viewport.scrollTop;
|
|
8853
|
-
capture();
|
|
8933
|
+
capture(viewport);
|
|
8854
8934
|
return true;
|
|
8855
8935
|
}
|
|
8856
8936
|
onMounted(() => {
|
|
@@ -8881,6 +8961,7 @@ function useMessageListScroll(options) {
|
|
|
8881
8961
|
});
|
|
8882
8962
|
return {
|
|
8883
8963
|
following,
|
|
8964
|
+
latestBelow,
|
|
8884
8965
|
nodes,
|
|
8885
8966
|
onScroll,
|
|
8886
8967
|
scrollToLatest,
|
|
@@ -8941,7 +9022,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
8941
9022
|
const area = ref();
|
|
8942
9023
|
const content = ref();
|
|
8943
9024
|
const keys = computed(() => props.messages.map((message) => message.messageId));
|
|
8944
|
-
const { following, nodes, onScroll, scrollToLatest, scrollToMessage } = useMessageListScroll({
|
|
9025
|
+
const { following, latestBelow, nodes, onScroll, scrollToLatest, scrollToMessage } = useMessageListScroll({
|
|
8945
9026
|
viewport: () => area.value?.getViewportElement() ?? null,
|
|
8946
9027
|
content,
|
|
8947
9028
|
keys: () => keys.value,
|
|
@@ -9091,7 +9172,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
9091
9172
|
])])], 8, _hoisted_3);
|
|
9092
9173
|
}), 128))])) : (openBlock(), createElementBlock("div", _hoisted_4, [renderSlot(_ctx.$slots, "empty", {}, () => [createVNode(_sfc_main$23, { description: unref(text).list.empty }, null, 8, ["description"])])]))], 512)]),
|
|
9093
9174
|
_: 3
|
|
9094
|
-
}, 8, ["label", "onScroll"]), !unref(following) ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(_sfc_main$64, {
|
|
9175
|
+
}, 8, ["label", "onScroll"]), !unref(following) && unref(latestBelow) ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(_sfc_main$64, {
|
|
9095
9176
|
variant: "soft",
|
|
9096
9177
|
onClick: jumpToLatest
|
|
9097
9178
|
}, {
|
|
@@ -9104,4 +9185,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
9104
9185
|
//#endregion
|
|
9105
9186
|
export { _sfc_main$45 as $, _sfc_main$31 as A, useMenuLayerClass as B, _sfc_main$23 as C, _sfc_main$63 as Ct, _sfc_main$28 as D, _sfc_main$27 as E, _sfc_main$36 as F, _sfc_main$42 as G, anchoredSurfaceStyle as H, _sfc_main$37 as I, keyLabel as J, _sfc_main$43 as K, _sfc_main$38 as L, _sfc_main$32 as M, _sfc_main$34 as N, _sfc_main$29 as O, _sfc_main$35 as P, _sfc_main$44 as Q, _sfc_main$39 as R, _sfc_main$22 as S, _sfc_main$62 as St, _sfc_main$26 as T, _sfc_main$40 as U, resolveViewportMenuContentStyle as V, _sfc_main$41 as W, useFieldLabel as X, provideFieldLabel as Y, useModalPortal as Z, _sfc_main$19 as _, provideQuireInheritedThemePortals as _t, _sfc_main$4 as a, useImagePreviewGroup as at, _sfc_main$20 as b, provideQuireOverlayHost as bt, _sfc_main$7 as c, _sfc_main$51 as ct, _sfc_main$10 as d, _sfc_main$53 as dt, _sfc_main$46 as et, _sfc_main$11 as f, quireImagePreviewToolbarPresets as ft, _sfc_main$18 as g, _sfc_main$60 as gt, _sfc_main$17 as h, _sfc_main$59 as ht, _sfc_main$3 as i, useHorizontalScroll as it, guardRadioReadOnlyKey as j, _sfc_main$30 as k, _sfc_main$8 as l, _sfc_main$52 as lt, _sfc_main$14 as m, _sfc_main$58 as mt, _sfc_main$1 as n, scrollLeftIcon as nt, _sfc_main$5 as o, _sfc_main$48 as ot, _sfc_main$13 as p, useModalSurfaceOwner as pt, chordText as q, _sfc_main$2 as r, scrollRightIcon as rt, _sfc_main$6 as s, _sfc_main$50 as st, _sfc_main as t, _sfc_main$47 as tt, _sfc_main$9 as u, imagePreviewGroupKey as ut, assertChoiceValues as v, quireKitThemeKey as vt, _sfc_main$25 as w, _sfc_main$21 as x, useQuireOverlayHost as xt, useChoiceState as y, useQuireKitTheme as yt, provideSubmenuSiblings as z };
|
|
9106
9187
|
|
|
9107
|
-
//# sourceMappingURL=chat-
|
|
9188
|
+
//# sourceMappingURL=chat-CDuOfk3d.mjs.map
|