@aleph-alpha/chat-kit 2.1.0 → 2.2.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/dist/{CkInput.vue_vue_type_script_setup_true_lang-DPZedAQS.js → CkInput.vue_vue_type_script_setup_true_lang-CjfKRuZs.js} +291 -61
- package/dist/chat-kit.css +40 -5
- package/dist/components/base/CkDropZoneOverlay/CkDropZoneIllustration.vue.d.ts +4 -0
- package/dist/components/base/CkDropZoneOverlay/CkDropZoneIllustration.vue.d.ts.map +1 -0
- package/dist/components/base/CkDropZoneOverlay/CkDropZoneOverlay.stories.d.ts +17 -0
- package/dist/components/base/CkDropZoneOverlay/CkDropZoneOverlay.stories.d.ts.map +1 -0
- package/dist/components/base/CkDropZoneOverlay/CkDropZoneOverlay.vue.d.ts +31 -0
- package/dist/components/base/CkDropZoneOverlay/CkDropZoneOverlay.vue.d.ts.map +1 -0
- package/dist/components/base/CkDropZoneOverlay/index.d.ts +3 -0
- package/dist/components/base/CkDropZoneOverlay/index.d.ts.map +1 -0
- package/dist/components/base/CkDropZoneOverlay/types.d.ts +88 -0
- package/dist/components/base/CkDropZoneOverlay/types.d.ts.map +1 -0
- package/dist/components/base/CkFeedbackDialog/CkFeedbackDialog.vue.d.ts.map +1 -1
- package/dist/components/base/index.d.ts +2 -0
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +19 -18
- package/dist/composables/fileUpload/index.d.ts +1 -1
- package/dist/composables/fileUpload/index.d.ts.map +1 -1
- package/dist/composables/fileUpload/types.d.ts +11 -1
- package/dist/composables/fileUpload/types.d.ts.map +1 -1
- package/dist/composables/fileUpload/useFileUpload.d.ts.map +1 -1
- package/dist/composables/fileUpload/useFileUploadWrapper.d.ts.map +1 -1
- package/dist/composables/index.js +1 -1
- package/dist/{index-DrtHeZpl.js → index-CfXEGjc7.js} +73 -27
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -20
- package/package.json +1 -1
- package/src/components/base/CkDropZoneOverlay/CkDropZoneIllustration.vue +125 -0
- package/src/components/base/CkDropZoneOverlay/CkDropZoneOverlay.spec.ts +104 -0
- package/src/components/base/CkDropZoneOverlay/CkDropZoneOverlay.stories.ts +130 -0
- package/src/components/base/CkDropZoneOverlay/CkDropZoneOverlay.vue +272 -0
- package/src/components/base/CkDropZoneOverlay/index.ts +2 -0
- package/src/components/base/CkDropZoneOverlay/types.ts +93 -0
- package/src/components/base/CkFeedbackDialog/CkFeedbackDialog.vue +22 -1
- package/src/components/base/index.ts +7 -0
- package/src/components/index.ts +5 -0
- package/src/composables/fileUpload/index.spec.ts +39 -7
- package/src/composables/fileUpload/index.ts +41 -19
- package/src/composables/fileUpload/types.ts +15 -1
- package/src/composables/fileUpload/useFileUpload.spec.ts +147 -0
- package/src/composables/fileUpload/useFileUpload.ts +18 -4
- package/src/composables/fileUpload/useFileUploadWrapper.spec.ts +202 -0
- package/src/composables/fileUpload/useFileUploadWrapper.ts +25 -3
- package/src/index.ts +5 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createCommentVNode, ref, onMounted, nextTick, onUnmounted, watch, Fragment, renderList, normalizeStyle, createBlock, unref, mergeProps, withCtx, createVNode, Transition, toDisplayString, computed, normalizeClass, toRefs, h, useId, createTextVNode, useAttrs, useSlots,
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createCommentVNode, ref, onMounted, nextTick, onUnmounted, watch, Fragment, renderList, normalizeStyle, createBlock, unref, mergeProps, withCtx, createVNode, Transition, toDisplayString, createStaticVNode, computed, onBeforeUnmount, Teleport, withModifiers, normalizeClass, toRefs, h, useId, createTextVNode, useAttrs, useSlots, resolveDynamicComponent, useTemplateRef, createSlots, normalizeProps, guardReactiveProps } from "vue";
|
|
2
2
|
import { u as useChatKitLabels, d as defaultChatKitLabels, a as useMarkdownParser } from "./useChatKitLabels-ZutacPad.js";
|
|
3
3
|
import { UiButton, UiTooltip, UiIcon, UiDialog, UiDialogContent, UiDialogDescription, UiFieldLabel, UiToggleGroup, UiToggleGroupItem, UiField, UiTextarea, UiFileItem, UiPopover, UiPopoverTrigger, UiFileType, UiPopoverContent, Primitive, UiAvatar, UiAvatarImage, UiSpinner, UiAvatarFallback, UiSidebarPopoverMenu, UiSidebarPopoverMenuItem } from "@aleph-alpha/ui-library";
|
|
4
4
|
const MINUTE = 60;
|
|
@@ -36,7 +36,7 @@ function formatRelativeTime(unixSeconds, nowSeconds = Math.floor(Date.now() / 1e
|
|
|
36
36
|
const years = Math.floor(delta / YEAR);
|
|
37
37
|
return years === 1 ? "1 year ago" : `${years} years ago`;
|
|
38
38
|
}
|
|
39
|
-
const _hoisted_1$
|
|
39
|
+
const _hoisted_1$e = {
|
|
40
40
|
xmlns: "http://www.w3.org/2000/svg",
|
|
41
41
|
width: "16",
|
|
42
42
|
height: "16",
|
|
@@ -47,31 +47,31 @@ const _hoisted_1$c = {
|
|
|
47
47
|
"stroke-linecap": "round",
|
|
48
48
|
"stroke-linejoin": "round"
|
|
49
49
|
};
|
|
50
|
-
const _sfc_main$
|
|
50
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
51
51
|
...{ name: "CkSendIcon" },
|
|
52
52
|
__name: "CkSendIcon",
|
|
53
53
|
setup(__props) {
|
|
54
54
|
return (_ctx, _cache) => {
|
|
55
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
55
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$e, [..._cache[0] || (_cache[0] = [
|
|
56
56
|
createElementVNode("path", { d: "M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z" }, null, -1),
|
|
57
57
|
createElementVNode("path", { d: "M6 12h16" }, null, -1)
|
|
58
58
|
])]);
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
-
const _hoisted_1$
|
|
62
|
+
const _hoisted_1$d = {
|
|
63
63
|
xmlns: "http://www.w3.org/2000/svg",
|
|
64
64
|
width: "16",
|
|
65
65
|
height: "16",
|
|
66
66
|
viewBox: "0 0 16 16",
|
|
67
67
|
fill: "none"
|
|
68
68
|
};
|
|
69
|
-
const _sfc_main$
|
|
69
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
70
70
|
...{ name: "CkStopIcon" },
|
|
71
71
|
__name: "CkStopIcon",
|
|
72
72
|
setup(__props) {
|
|
73
73
|
return (_ctx, _cache) => {
|
|
74
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
74
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$d, [..._cache[0] || (_cache[0] = [
|
|
75
75
|
createElementVNode("path", {
|
|
76
76
|
d: "M13.3335 3.33301C13.3335 2.96482 13.035 2.66634 12.6668 2.66634H3.3335C2.96531 2.66634 2.66683 2.96482 2.66683 3.33301V12.6663C2.66683 13.0345 2.96531 13.333 3.3335 13.333H12.6668C13.035 13.333 13.3335 13.0345 13.3335 12.6663V3.33301ZM14.6668 12.6663C14.6668 13.7709 13.7714 14.6663 12.6668 14.6663H3.3335C2.22893 14.6663 1.3335 13.7709 1.3335 12.6663V3.33301C1.3335 2.22844 2.22893 1.33301 3.3335 1.33301H12.6668C13.7714 1.33301 14.6668 2.22844 14.6668 3.33301V12.6663Z",
|
|
77
77
|
fill: "#1D1D1B"
|
|
@@ -80,60 +80,60 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
|
-
const _hoisted_1$
|
|
84
|
-
const _hoisted_2$
|
|
83
|
+
const _hoisted_1$c = { class: "flex w-full flex-col gap-6 pb-6" };
|
|
84
|
+
const _hoisted_2$8 = {
|
|
85
85
|
key: 0,
|
|
86
86
|
class: "flex items-start gap-3"
|
|
87
87
|
};
|
|
88
|
-
const _hoisted_3$
|
|
88
|
+
const _hoisted_3$7 = {
|
|
89
89
|
key: 0,
|
|
90
90
|
"data-testid": "ck-agent-message-icon",
|
|
91
91
|
class: "flex flex-shrink-0 justify-center"
|
|
92
92
|
};
|
|
93
|
-
const _hoisted_4$
|
|
93
|
+
const _hoisted_4$6 = {
|
|
94
94
|
key: 1,
|
|
95
95
|
"data-testid": "ck-agent-message-header",
|
|
96
96
|
class: "body-14-regular text-content-on-surface-muted min-w-0 flex-1 [word-break:break-word]"
|
|
97
97
|
};
|
|
98
|
-
const _hoisted_5$
|
|
99
|
-
const _hoisted_6$
|
|
98
|
+
const _hoisted_5$5 = { class: "text-content-on-surface-primary text-base leading-7" };
|
|
99
|
+
const _hoisted_6$3 = {
|
|
100
100
|
key: 1,
|
|
101
101
|
class: "flex items-center gap-4"
|
|
102
102
|
};
|
|
103
|
-
const _sfc_main$
|
|
103
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
104
104
|
...{ name: "CkAgentMessage" },
|
|
105
105
|
__name: "CkAgentMessage",
|
|
106
106
|
setup(__props) {
|
|
107
107
|
return (_ctx, _cache) => {
|
|
108
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
109
|
-
_ctx.$slots.icon || _ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
110
|
-
_ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
108
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
109
|
+
_ctx.$slots.icon || _ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
|
|
110
|
+
_ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
|
|
111
111
|
renderSlot(_ctx.$slots, "icon")
|
|
112
112
|
])) : createCommentVNode("", true),
|
|
113
|
-
_ctx.$slots.header ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
113
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("span", _hoisted_4$6, [
|
|
114
114
|
renderSlot(_ctx.$slots, "header")
|
|
115
115
|
])) : createCommentVNode("", true)
|
|
116
116
|
])) : createCommentVNode("", true),
|
|
117
|
-
createElementVNode("div", _hoisted_5$
|
|
117
|
+
createElementVNode("div", _hoisted_5$5, [
|
|
118
118
|
renderSlot(_ctx.$slots, "default")
|
|
119
119
|
]),
|
|
120
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
120
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_6$3, [
|
|
121
121
|
renderSlot(_ctx.$slots, "footer")
|
|
122
122
|
])) : createCommentVNode("", true)
|
|
123
123
|
]);
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
|
-
const _hoisted_1$
|
|
128
|
-
const _hoisted_2$
|
|
127
|
+
const _hoisted_1$b = ["data-message-row"];
|
|
128
|
+
const _hoisted_2$7 = {
|
|
129
129
|
key: 0,
|
|
130
130
|
class: "flex justify-end"
|
|
131
131
|
};
|
|
132
|
-
const _hoisted_3$
|
|
132
|
+
const _hoisted_3$6 = {
|
|
133
133
|
key: 1,
|
|
134
134
|
class: "flex justify-start"
|
|
135
135
|
};
|
|
136
|
-
const _sfc_main$
|
|
136
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
137
137
|
...{ name: "CkConversationLayout" },
|
|
138
138
|
__name: "CkConversationLayout",
|
|
139
139
|
props: {
|
|
@@ -273,12 +273,12 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
273
273
|
key: message.id,
|
|
274
274
|
"data-message-row": message.role
|
|
275
275
|
}, [
|
|
276
|
-
message.role === "user" ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
276
|
+
message.role === "user" ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
|
|
277
277
|
renderSlot(_ctx.$slots, "user-message", { message })
|
|
278
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_3$
|
|
278
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_3$6, [
|
|
279
279
|
renderSlot(_ctx.$slots, "agent-message", { message })
|
|
280
280
|
]))
|
|
281
|
-
], 8, _hoisted_1$
|
|
281
|
+
], 8, _hoisted_1$b);
|
|
282
282
|
}), 128)),
|
|
283
283
|
hasBottomSpacer.value ? (openBlock(), createElementBlock("div", {
|
|
284
284
|
key: 0,
|
|
@@ -289,7 +289,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
289
289
|
};
|
|
290
290
|
}
|
|
291
291
|
});
|
|
292
|
-
const _sfc_main$
|
|
292
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
293
293
|
...{
|
|
294
294
|
name: "CkMessageActionButton"
|
|
295
295
|
},
|
|
@@ -313,11 +313,11 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
313
313
|
};
|
|
314
314
|
}
|
|
315
315
|
});
|
|
316
|
-
const _hoisted_1$
|
|
316
|
+
const _hoisted_1$a = {
|
|
317
317
|
class: "sr-only",
|
|
318
318
|
"aria-live": "polite"
|
|
319
319
|
};
|
|
320
|
-
const _sfc_main$
|
|
320
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
321
321
|
...{
|
|
322
322
|
name: "CkCopyMessageActionButton"
|
|
323
323
|
},
|
|
@@ -374,7 +374,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
374
374
|
"delay-duration": 0
|
|
375
375
|
}, {
|
|
376
376
|
default: withCtx(() => [
|
|
377
|
-
createVNode(unref(_sfc_main$
|
|
377
|
+
createVNode(unref(_sfc_main$j), mergeProps({ ariaLabel: copied.value ? __props.ariaLabelCopied : __props.ariaLabelCopy }, {
|
|
378
378
|
disabled: __props.disabled,
|
|
379
379
|
onClick: handleClick
|
|
380
380
|
}), {
|
|
@@ -401,7 +401,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
401
401
|
]),
|
|
402
402
|
_: 1
|
|
403
403
|
}, 16, ["disabled"]),
|
|
404
|
-
createElementVNode("span", _hoisted_1$
|
|
404
|
+
createElementVNode("span", _hoisted_1$a, toDisplayString(copied.value ? __props.ariaLabelCopied : __props.ariaLabelCopy), 1)
|
|
405
405
|
]),
|
|
406
406
|
_: 1
|
|
407
407
|
}, 8, ["open", "content"]);
|
|
@@ -415,7 +415,235 @@ const _export_sfc = (sfc, props) => {
|
|
|
415
415
|
}
|
|
416
416
|
return target;
|
|
417
417
|
};
|
|
418
|
-
const CkCopyMessageActionButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
418
|
+
const CkCopyMessageActionButton = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-f77a1193"]]);
|
|
419
|
+
const _hoisted_1$9 = {
|
|
420
|
+
width: "208",
|
|
421
|
+
height: "144",
|
|
422
|
+
viewBox: "0 0 208 144",
|
|
423
|
+
fill: "none",
|
|
424
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
425
|
+
"aria-hidden": "true",
|
|
426
|
+
focusable: "false"
|
|
427
|
+
};
|
|
428
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
429
|
+
...{ name: "CkDropZoneIllustration" },
|
|
430
|
+
__name: "CkDropZoneIllustration",
|
|
431
|
+
setup(__props) {
|
|
432
|
+
return (_ctx, _cache) => {
|
|
433
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$9, [..._cache[0] || (_cache[0] = [
|
|
434
|
+
createStaticVNode('<g clip-path="url(#ck-drop-zone-clip)"><path d="M0 71.5391C0 32.0292 32.0292 0 71.5391 0H135.739C175.249 0 207.278 32.0292 207.278 71.5391C207.278 111.049 175.249 143.078 135.739 143.078H71.5392C32.0292 143.078 0 111.049 0 71.5391Z" fill="#F2EBE8"></path><path d="M120.899 98.2608L134.973 45.7385C135.223 44.805 136.182 44.251 137.116 44.5011L172.976 54.1098C173.909 54.3599 174.463 55.3195 174.213 56.2531L160.14 108.775C159.89 109.709 158.93 110.263 157.997 110.013L122.137 100.404C121.203 100.154 120.649 99.1943 120.899 98.2608Z" fill="#FFCCBB" stroke="#333333"></path><g><path d="M153.839 69.86L144.18 67.2718C143.118 66.9871 142.015 67.6235 141.731 68.686L137.589 84.1409C137.305 85.2034 137.941 86.3056 139.004 86.5904L150.595 89.6962C151.657 89.9809 152.76 89.3445 153.044 88.282L156.668 74.759L153.839 69.86Z" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M153.839 69.86L153.063 72.7578C152.921 73.2891 153.239 73.8402 153.77 73.9825L156.668 74.759" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M143.783 76.4828L151.51 78.5534" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M143.006 79.3806L150.733 81.4511" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M142.23 82.2784L147.059 83.5725" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path></g><path d="M86.3795 98.2608L72.3062 45.7385C72.0561 44.805 71.0965 44.251 70.1629 44.5011L34.3029 54.1098C33.3694 54.3599 32.8153 55.3195 33.0655 56.2531L47.1388 108.775C47.3889 109.709 48.3485 110.263 49.2821 110.013L85.1421 100.404C86.0756 100.154 86.6297 99.1943 86.3795 98.2608Z" fill="#FFE9B5" stroke="#333333"></path><g><path d="M60.3294 76.0227L58.0001 67.3293C60.3057 66.7116 62.7623 67.035 64.8294 68.2284C66.8966 69.4219 68.405 71.3877 69.0228 73.6933L60.3294 76.0227Z" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M55.3303 68.8899C54.4077 69.3934 53.5755 70.0573 52.8752 70.8559C51.7015 72.1942 50.9511 73.8504 50.7187 75.6152C50.4864 77.38 50.7826 79.1741 51.5699 80.7706C52.3572 82.367 53.6002 83.6942 55.1417 84.5842C56.6833 85.4742 58.4541 85.8871 60.2304 85.7707C62.0066 85.6543 63.7084 85.0138 65.1206 83.9302C66.5328 82.8465 67.5919 81.3685 68.1641 79.6829C68.5135 78.6536 68.6717 77.5751 68.6371 76.4998" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path></g><path d="M76.5186 107.5L76.5185 35C76.5185 33.6193 77.6378 32.5 79.0185 32.5H128.519C129.899 32.5 131.019 33.6193 131.019 35V107.5C131.019 108.881 129.899 110 128.519 110H79.0186C77.6378 110 76.5186 108.881 76.5186 107.5Z" fill="#FFB3DD" stroke="#333333"></path><g><path d="M107.519 56.8335H95.519C94.419 56.8335 93.519 57.7335 93.519 58.8335V82.1665C93.519 83.2675 94.419 84.1665 95.519 84.1665H111.519C112.619 84.1665 113.519 83.2675 113.519 82.1665V64.8335L107.519 56.8335Z" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M107.519 56.8335V62.8335C107.519 63.9335 108.419 64.8335 109.519 64.8335H113.519" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M103.519 78.8335V70.8335" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M99.519 74.8335L103.519 70.8335L107.519 74.8335" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path></g></g><defs><clipPath id="ck-drop-zone-clip"><rect width="208" height="144" fill="white"></rect></clipPath></defs>', 2)
|
|
435
|
+
])]);
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
const _hoisted_1$8 = ["aria-label"];
|
|
440
|
+
const _hoisted_2$6 = { class: "pointer-events-none flex h-full w-full flex-col items-center justify-center gap-4 text-content-on-surface-primary" };
|
|
441
|
+
const _hoisted_3$5 = { class: "flex flex-col items-center gap-1 text-center" };
|
|
442
|
+
const _hoisted_4$5 = { class: "body-16-bold" };
|
|
443
|
+
const _hoisted_5$4 = {
|
|
444
|
+
key: 0,
|
|
445
|
+
class: "body-16-regular"
|
|
446
|
+
};
|
|
447
|
+
const _hoisted_6$2 = {
|
|
448
|
+
key: 0,
|
|
449
|
+
"data-slot": "drop-zone-errors",
|
|
450
|
+
class: "pointer-events-none fixed bottom-6 left-1/2 z-50 max-w-[36rem] -translate-x-1/2 flex list-inside list-disc flex-col gap-1 rounded-md border border-border-surface-default bg-background-surface-default p-3 text-sm text-content-on-surface-secondary",
|
|
451
|
+
role: "alert"
|
|
452
|
+
};
|
|
453
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
454
|
+
...{
|
|
455
|
+
name: "CkDropZoneOverlay"
|
|
456
|
+
},
|
|
457
|
+
__name: "CkDropZoneOverlay",
|
|
458
|
+
props: {
|
|
459
|
+
accept: { default: "" },
|
|
460
|
+
maxFileSizeBytes: { default: Number.POSITIVE_INFINITY },
|
|
461
|
+
maxFiles: { default: Number.POSITIVE_INFINITY },
|
|
462
|
+
disabled: { type: Boolean, default: false },
|
|
463
|
+
heading: { default: void 0 },
|
|
464
|
+
hint: { default: "Add txt, docx, pdf, md, or csv" },
|
|
465
|
+
ariaLabel: { default: "Drop files anywhere to attach" },
|
|
466
|
+
showErrors: { type: Boolean, default: true },
|
|
467
|
+
errorTimeoutMs: { default: 4e3 }
|
|
468
|
+
},
|
|
469
|
+
emits: ["files", "rejected"],
|
|
470
|
+
setup(__props, { emit: __emit }) {
|
|
471
|
+
const props = __props;
|
|
472
|
+
const emit = __emit;
|
|
473
|
+
const visible = ref(false);
|
|
474
|
+
const dragCounter = ref(0);
|
|
475
|
+
const errors = ref([]);
|
|
476
|
+
let errorTimer = null;
|
|
477
|
+
const parsedAccept = computed(() => {
|
|
478
|
+
const extensions = [];
|
|
479
|
+
const mimes = [];
|
|
480
|
+
const wildcards = [];
|
|
481
|
+
for (const raw of props.accept.split(",")) {
|
|
482
|
+
const token = raw.trim().toLowerCase();
|
|
483
|
+
if (!token) continue;
|
|
484
|
+
if (token.startsWith(".")) {
|
|
485
|
+
extensions.push(token);
|
|
486
|
+
} else if (token.endsWith("/*")) {
|
|
487
|
+
wildcards.push(token.slice(0, -1));
|
|
488
|
+
} else {
|
|
489
|
+
mimes.push(token);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
return { extensions, mimes, wildcards };
|
|
493
|
+
});
|
|
494
|
+
function fileMatchesAccept(file) {
|
|
495
|
+
const { extensions, mimes, wildcards } = parsedAccept.value;
|
|
496
|
+
if (!extensions.length && !mimes.length && !wildcards.length) return true;
|
|
497
|
+
const name = file.name.toLowerCase();
|
|
498
|
+
const type = file.type.toLowerCase();
|
|
499
|
+
if (extensions.some((e) => name.endsWith(e))) return true;
|
|
500
|
+
if (type && mimes.includes(type)) return true;
|
|
501
|
+
if (type && wildcards.some((w) => type.startsWith(w))) return true;
|
|
502
|
+
return false;
|
|
503
|
+
}
|
|
504
|
+
function formatBytes(bytes) {
|
|
505
|
+
const mb = bytes / (1024 * 1024);
|
|
506
|
+
if (mb >= 1) return `${mb.toFixed(0)} MB`;
|
|
507
|
+
return `${Math.max(1, Math.round(bytes / 1024))} KB`;
|
|
508
|
+
}
|
|
509
|
+
const isSingle = computed(() => props.maxFiles === 1);
|
|
510
|
+
const resolvedHeading = computed(
|
|
511
|
+
() => props.heading ?? (isSingle.value ? "Drop a file here to add to chat" : "Drop files here to add to chat")
|
|
512
|
+
);
|
|
513
|
+
function isFileDrag(e) {
|
|
514
|
+
const types = e.dataTransfer?.types;
|
|
515
|
+
if (!types) return false;
|
|
516
|
+
for (const t of types) {
|
|
517
|
+
if (t === "Files" || t.toLowerCase().includes("file")) return true;
|
|
518
|
+
}
|
|
519
|
+
return false;
|
|
520
|
+
}
|
|
521
|
+
function onWindowDragEnter(e) {
|
|
522
|
+
if (props.disabled || !isFileDrag(e)) return;
|
|
523
|
+
dragCounter.value += 1;
|
|
524
|
+
visible.value = true;
|
|
525
|
+
}
|
|
526
|
+
function onWindowDragOver(e) {
|
|
527
|
+
if (props.disabled || !visible.value || !isFileDrag(e)) return;
|
|
528
|
+
e.preventDefault();
|
|
529
|
+
}
|
|
530
|
+
function onWindowDragLeave() {
|
|
531
|
+
if (!visible.value) return;
|
|
532
|
+
dragCounter.value = Math.max(0, dragCounter.value - 1);
|
|
533
|
+
if (dragCounter.value === 0) hide();
|
|
534
|
+
}
|
|
535
|
+
function onWindowDrop(e) {
|
|
536
|
+
if (props.disabled || !visible.value || !isFileDrag(e)) return;
|
|
537
|
+
e.preventDefault();
|
|
538
|
+
hide();
|
|
539
|
+
}
|
|
540
|
+
function hide() {
|
|
541
|
+
dragCounter.value = 0;
|
|
542
|
+
visible.value = false;
|
|
543
|
+
}
|
|
544
|
+
function onOverlayDrop(e) {
|
|
545
|
+
e.preventDefault();
|
|
546
|
+
const dropped = Array.from(e.dataTransfer?.files ?? []);
|
|
547
|
+
hide();
|
|
548
|
+
if (!dropped.length) return;
|
|
549
|
+
const accepted = [];
|
|
550
|
+
const rejected = [];
|
|
551
|
+
for (const file of dropped) {
|
|
552
|
+
if (!fileMatchesAccept(file)) {
|
|
553
|
+
rejected.push({
|
|
554
|
+
file,
|
|
555
|
+
reason: "unsupported-type",
|
|
556
|
+
message: `"${file.name}" — unsupported file type`
|
|
557
|
+
});
|
|
558
|
+
continue;
|
|
559
|
+
}
|
|
560
|
+
if (file.size > props.maxFileSizeBytes) {
|
|
561
|
+
rejected.push({
|
|
562
|
+
file,
|
|
563
|
+
reason: "too-large",
|
|
564
|
+
message: `"${file.name}" — exceeds ${formatBytes(props.maxFileSizeBytes)} limit`
|
|
565
|
+
});
|
|
566
|
+
continue;
|
|
567
|
+
}
|
|
568
|
+
accepted.push(file);
|
|
569
|
+
}
|
|
570
|
+
let toEmit = accepted;
|
|
571
|
+
if (accepted.length > props.maxFiles) {
|
|
572
|
+
toEmit = accepted.slice(0, props.maxFiles);
|
|
573
|
+
rejected.push({
|
|
574
|
+
reason: "too-many",
|
|
575
|
+
message: isSingle.value ? "Only one file at a time — kept the first." : `Only up to ${props.maxFiles} files at a time — kept the first ${props.maxFiles}.`
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
if (rejected.length) {
|
|
579
|
+
emit("rejected", rejected);
|
|
580
|
+
if (props.showErrors) pushErrors(rejected.map((r) => r.message));
|
|
581
|
+
}
|
|
582
|
+
if (toEmit.length) emit("files", toEmit);
|
|
583
|
+
}
|
|
584
|
+
function pushErrors(messages) {
|
|
585
|
+
errors.value = [...errors.value, ...messages];
|
|
586
|
+
if (errorTimer) clearTimeout(errorTimer);
|
|
587
|
+
errorTimer = setTimeout(() => {
|
|
588
|
+
errors.value = [];
|
|
589
|
+
}, props.errorTimeoutMs);
|
|
590
|
+
}
|
|
591
|
+
onMounted(() => {
|
|
592
|
+
window.addEventListener("dragenter", onWindowDragEnter);
|
|
593
|
+
window.addEventListener("dragover", onWindowDragOver);
|
|
594
|
+
window.addEventListener("dragleave", onWindowDragLeave);
|
|
595
|
+
window.addEventListener("drop", onWindowDrop);
|
|
596
|
+
});
|
|
597
|
+
onBeforeUnmount(() => {
|
|
598
|
+
window.removeEventListener("dragenter", onWindowDragEnter);
|
|
599
|
+
window.removeEventListener("dragover", onWindowDragOver);
|
|
600
|
+
window.removeEventListener("dragleave", onWindowDragLeave);
|
|
601
|
+
window.removeEventListener("drop", onWindowDrop);
|
|
602
|
+
if (errorTimer) clearTimeout(errorTimer);
|
|
603
|
+
});
|
|
604
|
+
return (_ctx, _cache) => {
|
|
605
|
+
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
606
|
+
createVNode(Transition, { name: "ck-drop-overlay" }, {
|
|
607
|
+
default: withCtx(() => [
|
|
608
|
+
visible.value ? (openBlock(), createElementBlock("div", {
|
|
609
|
+
key: 0,
|
|
610
|
+
"data-slot": "drop-zone-overlay",
|
|
611
|
+
class: "fixed inset-0 z-50 flex flex-col items-center justify-center bg-background-surface-secondary/80 backdrop-blur-sm p-6",
|
|
612
|
+
role: "dialog",
|
|
613
|
+
"aria-modal": "false",
|
|
614
|
+
"aria-label": __props.ariaLabel,
|
|
615
|
+
onDragover: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
616
|
+
}, ["prevent"])),
|
|
617
|
+
onDrop: onOverlayDrop
|
|
618
|
+
}, [
|
|
619
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
620
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
621
|
+
createVNode(_sfc_main$h, { class: "h-36 w-52" }),
|
|
622
|
+
createElementVNode("div", _hoisted_3$5, [
|
|
623
|
+
createElementVNode("p", _hoisted_4$5, toDisplayString(resolvedHeading.value), 1),
|
|
624
|
+
__props.hint ? (openBlock(), createElementBlock("p", _hoisted_5$4, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
|
|
625
|
+
])
|
|
626
|
+
], true)
|
|
627
|
+
])
|
|
628
|
+
], 40, _hoisted_1$8)) : createCommentVNode("", true)
|
|
629
|
+
]),
|
|
630
|
+
_: 3
|
|
631
|
+
}),
|
|
632
|
+
createVNode(Transition, { name: "ck-drop-overlay" }, {
|
|
633
|
+
default: withCtx(() => [
|
|
634
|
+
__props.showErrors && errors.value.length ? (openBlock(), createElementBlock("ul", _hoisted_6$2, [
|
|
635
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(errors.value, (msg, i) => {
|
|
636
|
+
return openBlock(), createElementBlock("li", { key: i }, toDisplayString(msg), 1);
|
|
637
|
+
}), 128))
|
|
638
|
+
])) : createCommentVNode("", true)
|
|
639
|
+
]),
|
|
640
|
+
_: 1
|
|
641
|
+
})
|
|
642
|
+
]);
|
|
643
|
+
};
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
const CkDropZoneOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-ede88d0d"]]);
|
|
419
647
|
const _hoisted_1$7 = ["aria-label"];
|
|
420
648
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
421
649
|
...{
|
|
@@ -472,7 +700,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
472
700
|
"delay-duration": 0
|
|
473
701
|
}, {
|
|
474
702
|
default: withCtx(() => [
|
|
475
|
-
createVNode(unref(_sfc_main$
|
|
703
|
+
createVNode(unref(_sfc_main$j), mergeProps({ ariaLabel: thumbsUpLabel.value }, {
|
|
476
704
|
"aria-pressed": isUpSelected.value,
|
|
477
705
|
"aria-disabled": __props.locked || void 0,
|
|
478
706
|
disabled: isUpDisabled.value,
|
|
@@ -502,7 +730,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
502
730
|
"delay-duration": 0
|
|
503
731
|
}, {
|
|
504
732
|
default: withCtx(() => [
|
|
505
|
-
createVNode(unref(_sfc_main$
|
|
733
|
+
createVNode(unref(_sfc_main$j), mergeProps({ ariaLabel: thumbsDownLabel.value }, {
|
|
506
734
|
"aria-pressed": isDownSelected.value,
|
|
507
735
|
"aria-disabled": __props.locked || void 0,
|
|
508
736
|
disabled: isDownDisabled.value,
|
|
@@ -790,7 +1018,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
790
1018
|
return openBlock(), createBlock(unref(UiToggleGroupItem), {
|
|
791
1019
|
key: reason.code,
|
|
792
1020
|
value: reason.code,
|
|
793
|
-
class: "ck-feedback-dialog__chip"
|
|
1021
|
+
class: "ck-feedback-dialog__chip shadow-none"
|
|
794
1022
|
}, {
|
|
795
1023
|
default: withCtx(() => [
|
|
796
1024
|
createTextVNode(toDisplayString(reason.label), 1)
|
|
@@ -817,6 +1045,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
817
1045
|
modelValue: freeText.value,
|
|
818
1046
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => freeText.value = $event),
|
|
819
1047
|
name: "ck-feedback-dialog-free-text",
|
|
1048
|
+
class: "ck-feedback-dialog__freetext",
|
|
820
1049
|
placeholder: freeTextPlaceholder.value,
|
|
821
1050
|
disabled: __props.disabled || __props.submitting,
|
|
822
1051
|
maxlength: __props.maxFreeTextLength,
|
|
@@ -837,7 +1066,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
837
1066
|
};
|
|
838
1067
|
}
|
|
839
1068
|
});
|
|
840
|
-
const CkFeedbackDialog = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-
|
|
1069
|
+
const CkFeedbackDialog = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-12dfee8a"]]);
|
|
841
1070
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
842
1071
|
...{
|
|
843
1072
|
name: "CkFileItemRow",
|
|
@@ -1702,7 +1931,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1702
1931
|
return message.content.filter((c) => c.type === "text").map((c) => c.text).join("");
|
|
1703
1932
|
}
|
|
1704
1933
|
return (_ctx, _cache) => {
|
|
1705
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1934
|
+
return openBlock(), createBlock(_sfc_main$k, { messages: __props.messages }, {
|
|
1706
1935
|
"user-message": withCtx(({ message }) => [
|
|
1707
1936
|
createElementVNode("div", {
|
|
1708
1937
|
class: normalizeClass({ "ml-8": hasIcon.value })
|
|
@@ -1721,7 +1950,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1721
1950
|
]),
|
|
1722
1951
|
"agent-message": withCtx(({ message }) => [
|
|
1723
1952
|
renderSlot(_ctx.$slots, "agent-message", { message }, () => [
|
|
1724
|
-
createVNode(_sfc_main$
|
|
1953
|
+
createVNode(_sfc_main$l, null, createSlots({
|
|
1725
1954
|
footer: withCtx(() => [
|
|
1726
1955
|
renderSlot(_ctx.$slots, "agent-message-footer", { message }, () => [
|
|
1727
1956
|
getMessageText(message) && !isLoading(message) ? (openBlock(), createBlock(CkCopyMessageActionButton, {
|
|
@@ -2002,7 +2231,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2002
2231
|
}, {
|
|
2003
2232
|
default: withCtx(() => [
|
|
2004
2233
|
renderSlot(_ctx.$slots, "stop-icon", {}, () => [
|
|
2005
|
-
createVNode(_sfc_main$
|
|
2234
|
+
createVNode(_sfc_main$m)
|
|
2006
2235
|
])
|
|
2007
2236
|
]),
|
|
2008
2237
|
_: 3
|
|
@@ -2012,7 +2241,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2012
2241
|
}), {
|
|
2013
2242
|
default: withCtx(() => [
|
|
2014
2243
|
renderSlot(_ctx.$slots, "send-icon", {}, () => [
|
|
2015
|
-
createVNode(_sfc_main$
|
|
2244
|
+
createVNode(_sfc_main$n)
|
|
2016
2245
|
])
|
|
2017
2246
|
]),
|
|
2018
2247
|
_: 3
|
|
@@ -2042,25 +2271,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2042
2271
|
});
|
|
2043
2272
|
export {
|
|
2044
2273
|
CkCopyMessageActionButton as C,
|
|
2045
|
-
_sfc_main$
|
|
2274
|
+
_sfc_main$l as _,
|
|
2046
2275
|
_sfc_main$2 as a,
|
|
2047
|
-
_sfc_main$
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
_sfc_main$
|
|
2052
|
-
_sfc_main$
|
|
2053
|
-
_sfc_main$
|
|
2054
|
-
_sfc_main as i,
|
|
2055
|
-
_sfc_main
|
|
2056
|
-
_sfc_main$
|
|
2057
|
-
_sfc_main$
|
|
2058
|
-
_sfc_main$
|
|
2059
|
-
_sfc_main$
|
|
2060
|
-
_sfc_main$
|
|
2061
|
-
_sfc_main$
|
|
2062
|
-
_sfc_main$
|
|
2063
|
-
_sfc_main$
|
|
2064
|
-
|
|
2065
|
-
|
|
2276
|
+
_sfc_main$k as b,
|
|
2277
|
+
CkDropZoneOverlay as c,
|
|
2278
|
+
CkFeedbackButton as d,
|
|
2279
|
+
CkFeedbackDialog as e,
|
|
2280
|
+
_sfc_main$b as f,
|
|
2281
|
+
_sfc_main$1 as g,
|
|
2282
|
+
_sfc_main$a as h,
|
|
2283
|
+
_sfc_main$9 as i,
|
|
2284
|
+
_sfc_main as j,
|
|
2285
|
+
_sfc_main$e as k,
|
|
2286
|
+
_sfc_main$j as l,
|
|
2287
|
+
_sfc_main$8 as m,
|
|
2288
|
+
_sfc_main$7 as n,
|
|
2289
|
+
_sfc_main$5 as o,
|
|
2290
|
+
_sfc_main$4 as p,
|
|
2291
|
+
_sfc_main$6 as q,
|
|
2292
|
+
_sfc_main$n as r,
|
|
2293
|
+
_sfc_main$m as s,
|
|
2294
|
+
CkUserMessage as t,
|
|
2295
|
+
formatRelativeTime as u
|
|
2066
2296
|
};
|
package/dist/chat-kit.css
CHANGED
|
@@ -14,6 +14,21 @@
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
.ck-drop-overlay-enter-active[data-v-ede88d0d],
|
|
18
|
+
.ck-drop-overlay-leave-active[data-v-ede88d0d] {
|
|
19
|
+
transition: opacity 150ms ease;
|
|
20
|
+
}
|
|
21
|
+
.ck-drop-overlay-enter-from[data-v-ede88d0d],
|
|
22
|
+
.ck-drop-overlay-leave-to[data-v-ede88d0d] {
|
|
23
|
+
opacity: 0;
|
|
24
|
+
}
|
|
25
|
+
@media (prefers-reduced-motion: reduce) {
|
|
26
|
+
.ck-drop-overlay-enter-active[data-v-ede88d0d],
|
|
27
|
+
.ck-drop-overlay-leave-active[data-v-ede88d0d] {
|
|
28
|
+
transition: none;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
17
32
|
.ck-feedback-button__thumb[data-v-245705b8] {
|
|
18
33
|
transition: background-color 0.15s ease-out;
|
|
19
34
|
}
|
|
@@ -23,7 +38,7 @@
|
|
|
23
38
|
}
|
|
24
39
|
}
|
|
25
40
|
|
|
26
|
-
.ck-feedback-dialog__chip[data-v-
|
|
41
|
+
.ck-feedback-dialog__chip[data-v-12dfee8a] {
|
|
27
42
|
width: 100%;
|
|
28
43
|
min-height: 36px;
|
|
29
44
|
height: auto;
|
|
@@ -31,14 +46,34 @@
|
|
|
31
46
|
text-align: center;
|
|
32
47
|
line-height: 1rem;
|
|
33
48
|
}
|
|
34
|
-
|
|
35
|
-
|
|
49
|
+
|
|
50
|
+
/* Selected chip: soft-active treatment (per Figma). Token vars keep it
|
|
51
|
+
* theme-aware; scoped here because the data-[state=on]:bg-* utility isn't
|
|
52
|
+
* emitted by the consumer's UnoCSS build. The :hover selector holds the
|
|
53
|
+
* styling when hovering a selected chip (the outline variant ships a
|
|
54
|
+
* data-[state=on]:hover override of equal specificity otherwise). */
|
|
55
|
+
.ck-feedback-dialog__chip[data-state='on'][data-v-12dfee8a],
|
|
56
|
+
.ck-feedback-dialog__chip[data-state='on'][data-v-12dfee8a]:hover {
|
|
57
|
+
border-color: oklch(var(--accent-default));
|
|
58
|
+
background-color: oklch(var(--background-accent-soft));
|
|
59
|
+
color: oklch(var(--content-on-accent-soft));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/*
|
|
63
|
+
* The free-text field stays vertically resizable, but cap its height so
|
|
64
|
+
* dragging the resize handle can't push it past the dialog bounds.
|
|
65
|
+
*/
|
|
66
|
+
.ck-feedback-dialog__freetext[data-v-12dfee8a] {
|
|
67
|
+
max-height: 11rem;
|
|
68
|
+
}
|
|
69
|
+
.ck-feedback-dialog__response[data-v-12dfee8a] p,
|
|
70
|
+
.ck-feedback-dialog__response[data-v-12dfee8a] li {
|
|
36
71
|
line-height: 1.5rem;
|
|
37
72
|
}
|
|
38
|
-
.ck-feedback-dialog__response[data-v-
|
|
73
|
+
.ck-feedback-dialog__response[data-v-12dfee8a] p {
|
|
39
74
|
margin: 0 0 0.5rem 0;
|
|
40
75
|
}
|
|
41
|
-
.ck-feedback-dialog__response[data-v-
|
|
76
|
+
.ck-feedback-dialog__response[data-v-12dfee8a] p:last-child {
|
|
42
77
|
margin-bottom: 0;
|
|
43
78
|
}
|
|
44
79
|
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
//# sourceMappingURL=CkDropZoneIllustration.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CkDropZoneIllustration.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkDropZoneOverlay/CkDropZoneIllustration.vue"],"names":[],"mappings":"AAwQA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
import CkDropZoneOverlay from './CkDropZoneOverlay.vue';
|
|
3
|
+
declare const meta: Meta<typeof CkDropZoneOverlay>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof CkDropZoneOverlay>;
|
|
6
|
+
/**
|
|
7
|
+
* The overlay is invisible until a file drag enters the window. The "Simulate
|
|
8
|
+
* drag" button dispatches a synthetic `dragenter` so you can preview the
|
|
9
|
+
* overlay without an OS-level drag; dropping a real file emits `files`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const Default: Story;
|
|
12
|
+
/**
|
|
13
|
+
* A single-file zone (`maxFiles="1"`) switches the default heading to its
|
|
14
|
+
* singular form and rejects extra files with a `too-many` reason.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SingleFile: Story;
|
|
17
|
+
//# sourceMappingURL=CkDropZoneOverlay.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CkDropZoneOverlay.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkDropZoneOverlay/CkDropZoneOverlay.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AAGxD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CAqBxC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAuBhD;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAyDrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC"}
|