@aleph-alpha/chat-kit 0.7.0 → 0.8.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-B6_ZF6rz.js → CkInput.vue_vue_type_script_setup_true_lang-Bpa5PJj-.js} +243 -62
- package/dist/chat-kit.css +20 -0
- package/dist/components/base/CkCopyMessageActionButton/CkCopyMessageActionButton.stories.d.ts +8 -0
- package/dist/components/base/CkCopyMessageActionButton/CkCopyMessageActionButton.stories.d.ts.map +1 -0
- package/dist/components/base/CkCopyMessageActionButton/CkCopyMessageActionButton.vue.d.ts +31 -0
- package/dist/components/base/CkCopyMessageActionButton/CkCopyMessageActionButton.vue.d.ts.map +1 -0
- package/dist/components/base/CkCopyMessageActionButton/index.d.ts +2 -0
- package/dist/components/base/CkCopyMessageActionButton/index.d.ts.map +1 -0
- package/dist/components/base/CkMessageActionButton/CkMessageActionButton.stories.d.ts +7 -0
- package/dist/components/base/CkMessageActionButton/CkMessageActionButton.stories.d.ts.map +1 -0
- package/dist/components/base/CkMessageActionButton/CkMessageActionButton.vue.d.ts +20 -0
- package/dist/components/base/CkMessageActionButton/CkMessageActionButton.vue.d.ts.map +1 -0
- package/dist/components/base/CkMessageActionButton/index.d.ts +2 -0
- package/dist/components/base/CkMessageActionButton/index.d.ts.map +1 -0
- package/dist/components/base/CkPromptActionButton/CkPromptActionButton.vue.d.ts +1 -1
- package/dist/components/base/CkPromptActionButton/CkPromptActionButton.vue.d.ts.map +1 -1
- package/dist/components/base/CkPromptStopButton/CkPromptStopButton.stories.d.ts +8 -0
- package/dist/components/base/CkPromptStopButton/CkPromptStopButton.stories.d.ts.map +1 -0
- package/dist/components/base/CkPromptStopButton/CkPromptStopButton.vue.d.ts +25 -0
- package/dist/components/base/CkPromptStopButton/CkPromptStopButton.vue.d.ts.map +1 -0
- package/dist/components/base/CkPromptStopButton/index.d.ts +2 -0
- package/dist/components/base/CkPromptStopButton/index.d.ts.map +1 -0
- package/dist/components/base/icons/CkStopIcon.vue.d.ts +4 -0
- package/dist/components/base/icons/CkStopIcon.vue.d.ts.map +1 -0
- package/dist/components/base/icons/index.d.ts +1 -0
- package/dist/components/base/icons/index.d.ts.map +1 -1
- package/dist/components/base/index.d.ts +4 -0
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/composed/CkConversation/CkConversation.vue.d.ts.map +1 -1
- package/dist/components/composed/CkInput/CkInput.stories.d.ts +1 -1
- package/dist/components/composed/CkInput/CkInput.stories.d.ts.map +1 -1
- package/dist/components/composed/CkInput/CkInput.vue.d.ts +9 -3
- package/dist/components/composed/CkInput/CkInput.vue.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +10 -5
- package/dist/handlers/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -6
- package/dist/{useChatKitLabels-xZXcnxZZ.js → useChatKitLabels-DOiK9ds0.js} +113 -52
- package/package.json +3 -3
|
@@ -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=CkStopIcon.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CkStopIcon.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/icons/CkStopIcon.vue"],"names":[],"mappings":"AAsCA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/base/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/base/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
export { CkSendIcon, CkStopIcon } from './icons';
|
|
1
2
|
export { CkAgentMessage } from './CkAgentMessage';
|
|
2
3
|
export { CkConversationLayout } from './CkConversationLayout';
|
|
3
4
|
export type { CkConversationLayoutProps } from './CkConversationLayout';
|
|
5
|
+
export { CkCopyMessageActionButton } from './CkCopyMessageActionButton';
|
|
4
6
|
export { CkMarkdownRenderer } from './CkMarkdownRenderer';
|
|
5
7
|
export type { CkMarkdownRendererProps, CkMarkdownElementClasses } from './CkMarkdownRenderer';
|
|
8
|
+
export { CkMessageActionButton } from './CkMessageActionButton';
|
|
6
9
|
export { CkPromptActionButton } from './CkPromptActionButton';
|
|
10
|
+
export { CkPromptStopButton } from './CkPromptStopButton';
|
|
7
11
|
export { CkPromptInput } from './CkPromptInput';
|
|
8
12
|
export { CkPromptInputDisclaimer } from './CkPromptInputDisclaimer';
|
|
9
13
|
export { CkUserMessage } from './CkUserMessage';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkConversation.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkConversation/CkConversation.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CkConversation.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkConversation/CkConversation.vue"],"names":[],"mappings":"AA+HE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMlD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAanD,KAAK,WAAW,GAAG;IACjB,gDAAgD;IAChD,cAAc,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAC1D,yDAAyD;IACzD,sBAAsB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAClE,iDAAiD;IACjD,eAAe,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAC3D,oCAAoC;IACpC,oBAAoB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAChE,8EAA8E;IAC9E,4BAA4B,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IACxE,uCAAuC;IACvC,sBAAsB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAClE,qCAAqC;IACrC,uBAAuB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IACnE,mDAAmD;IACnD,sBAAsB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAC;IAClE,qEAAqE;IACrE,0BAA0B,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACjF,CAAC;AAgRJ,QAAA,MAAM,UAAU;;;;6EAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -7,7 +7,7 @@ export declare const Default: Story;
|
|
|
7
7
|
export declare const WithModeToggle: Story;
|
|
8
8
|
export declare const FullExample: Story;
|
|
9
9
|
export declare const Disabled: Story;
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const GeneratingResponse: Story;
|
|
11
11
|
export declare const WithLongText: Story;
|
|
12
12
|
export declare const MobileWidth: Story;
|
|
13
13
|
//# sourceMappingURL=CkInput.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkInput.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkInput/CkInput.stories.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAM3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAS9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KA+C5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA0FzB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAC;AAEF,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"CkInput.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkInput/CkInput.stories.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAM3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAS9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KA+C5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA0FzB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KA0BhC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAsB1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAqBzB,CAAC"}
|
|
@@ -5,6 +5,7 @@ type __VLS_Props = {
|
|
|
5
5
|
loading?: boolean;
|
|
6
6
|
maxHeight?: number;
|
|
7
7
|
ariaLabel?: string;
|
|
8
|
+
stopAriaLabel?: string;
|
|
8
9
|
disclaimer?: string;
|
|
9
10
|
};
|
|
10
11
|
declare function focus(): void;
|
|
@@ -13,23 +14,27 @@ declare var __VLS_13: {}, __VLS_16: {
|
|
|
13
14
|
submit: () => void;
|
|
14
15
|
disabled: boolean;
|
|
15
16
|
isEmpty: boolean;
|
|
16
|
-
},
|
|
17
|
+
}, __VLS_26: {}, __VLS_39: {}, __VLS_47: {};
|
|
17
18
|
type __VLS_Slots = {} & {
|
|
18
19
|
'toolbar-left'?: (props: typeof __VLS_13) => any;
|
|
19
20
|
} & {
|
|
20
21
|
'toolbar-right'?: (props: typeof __VLS_16) => any;
|
|
21
22
|
} & {
|
|
22
|
-
'
|
|
23
|
+
'stop-icon'?: (props: typeof __VLS_26) => any;
|
|
23
24
|
} & {
|
|
24
|
-
|
|
25
|
+
'send-icon'?: (props: typeof __VLS_39) => any;
|
|
26
|
+
} & {
|
|
27
|
+
footer?: (props: typeof __VLS_47) => any;
|
|
25
28
|
};
|
|
26
29
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
27
30
|
focus: typeof focus;
|
|
28
31
|
submit: typeof submit;
|
|
29
32
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
33
|
+
stop: () => any;
|
|
30
34
|
submit: (value: string) => any;
|
|
31
35
|
"update:modelValue": (value: string) => any;
|
|
32
36
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
37
|
+
onStop?: (() => any) | undefined;
|
|
33
38
|
onSubmit?: ((value: string) => any) | undefined;
|
|
34
39
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
35
40
|
}>, {
|
|
@@ -39,6 +44,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
|
39
44
|
modelValue: string;
|
|
40
45
|
placeholder: string;
|
|
41
46
|
maxHeight: number;
|
|
47
|
+
stopAriaLabel: string;
|
|
42
48
|
disclaimer: string;
|
|
43
49
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
50
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkInput/CkInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CkInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkInput/CkInput.vue"],"names":[],"mappings":"AA+HE,KAAK,WAAW,GAAG;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAsCJ,iBAAS,KAAK,IAAI,IAAI,CAErB;AAED,iBAAS,MAAM,IAAI,IAAI,CAEtB;AAqKH,QAAA,IAAuB,QAAQ,IAAW,EAAE,QAAQ;;;;CAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACjI,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACpD;IAAE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACrD;IAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACjD;IAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACjD;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAO/C,QAAA,MAAM,UAAU;;;;;;;;;;;;eAjOE,MAAM;cAHP,OAAO;aACR,OAAO;gBAHJ,MAAM;iBACL,MAAM;eAGR,MAAM;mBAEF,MAAM;gBACT,MAAM;6EAoOvB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CkAgentMessage, CkConversationLayout, CkMarkdownRenderer, CkPromptActionButton, CkPromptInput, CkPromptInputDisclaimer, CkUserMessage, } from './base';
|
|
1
|
+
export { CkAgentMessage, CkConversationLayout, CkCopyMessageActionButton, CkMarkdownRenderer, CkMessageActionButton, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './base';
|
|
2
2
|
export type { CkConversationLayoutProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkUserMessageProps, } from './base';
|
|
3
3
|
export { CkConversation, CkInput } from './composed';
|
|
4
4
|
export type { CkConversationProps } from './composed';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,uBAAuB,EACvB,aAAa,GACd,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { _, a, b, c, d, e, f, g, h } from "../CkInput.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _, a, b, C, c, d, e, f, g, h, i, j, k, l } from "../CkInput.vue_vue_type_script_setup_true_lang-Bpa5PJj-.js";
|
|
2
2
|
export {
|
|
3
3
|
_ as CkAgentMessage,
|
|
4
4
|
a as CkConversation,
|
|
5
5
|
b as CkConversationLayout,
|
|
6
|
+
C as CkCopyMessageActionButton,
|
|
6
7
|
c as CkInput,
|
|
7
8
|
d as CkMarkdownRenderer,
|
|
8
|
-
e as
|
|
9
|
-
f as
|
|
10
|
-
g as
|
|
11
|
-
h as
|
|
9
|
+
e as CkMessageActionButton,
|
|
10
|
+
f as CkPromptActionButton,
|
|
11
|
+
g as CkPromptInput,
|
|
12
|
+
h as CkPromptInputDisclaimer,
|
|
13
|
+
i as CkPromptStopButton,
|
|
14
|
+
j as CkSendIcon,
|
|
15
|
+
k as CkStopIcon,
|
|
16
|
+
l as CkUserMessage
|
|
12
17
|
};
|
package/dist/handlers/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { useMessageHandler, useMarkdownParser, provideChatKitLabels, useChatKitL
|
|
|
3
3
|
export type { ChatKitLabels } from './handlers';
|
|
4
4
|
export { useChat } from './composables';
|
|
5
5
|
export type { ChatActions, ChatState, UseChatReturn } from './composables';
|
|
6
|
-
export { CkAgentMessage, CkConversation, CkConversationLayout, CkInput, CkMarkdownRenderer, CkPromptActionButton, CkPromptInput, CkPromptInputDisclaimer, CkUserMessage, } from './components';
|
|
6
|
+
export { CkAgentMessage, CkConversation, CkConversationLayout, CkInput, CkMarkdownRenderer, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, CkMessageActionButton, CkCopyMessageActionButton, } from './components';
|
|
7
7
|
export type { CkConversationLayoutProps, CkConversationProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkUserMessageProps, } from './components';
|
|
8
8
|
export type { BaseMessage, ConversationTree, MessageRole, MessageStatus, TreeMessage, } from './types';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG3E,OAAO,EACL,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,OAAO,EACP,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,uBAAuB,EACvB,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG3E,OAAO,EACL,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,OAAO,EACP,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,UAAU,EACV,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,yBAAyB,EACzB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,WAAW,GACZ,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import { C } from "./ChatService-LogwJNxh.js";
|
|
2
2
|
import { u } from "./useMessageHandler-D7OdrrcB.js";
|
|
3
|
-
import { C as C2, d, p, u as u2, a } from "./useChatKitLabels-
|
|
3
|
+
import { C as C2, d, p, u as u2, a } from "./useChatKitLabels-DOiK9ds0.js";
|
|
4
4
|
import { useChat } from "./composables/index.js";
|
|
5
|
-
import { _, a as a2, b, c, d as d2, e, f, g, h } from "./CkInput.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _, a as a2, b, C as C3, c, d as d2, e, f, g, h, i, j, k, l } from "./CkInput.vue_vue_type_script_setup_true_lang-Bpa5PJj-.js";
|
|
6
6
|
export {
|
|
7
7
|
C2 as CHAT_KIT_LABELS,
|
|
8
8
|
C as ChatService,
|
|
9
9
|
_ as CkAgentMessage,
|
|
10
10
|
a2 as CkConversation,
|
|
11
11
|
b as CkConversationLayout,
|
|
12
|
+
C3 as CkCopyMessageActionButton,
|
|
12
13
|
c as CkInput,
|
|
13
14
|
d2 as CkMarkdownRenderer,
|
|
14
|
-
e as
|
|
15
|
-
f as
|
|
16
|
-
g as
|
|
17
|
-
h as
|
|
15
|
+
e as CkMessageActionButton,
|
|
16
|
+
f as CkPromptActionButton,
|
|
17
|
+
g as CkPromptInput,
|
|
18
|
+
h as CkPromptInputDisclaimer,
|
|
19
|
+
i as CkPromptStopButton,
|
|
20
|
+
j as CkSendIcon,
|
|
21
|
+
k as CkStopIcon,
|
|
22
|
+
l as CkUserMessage,
|
|
18
23
|
d as defaultChatKitLabels,
|
|
19
24
|
p as provideChatKitLabels,
|
|
20
25
|
useChat,
|
|
@@ -12715,13 +12715,19 @@ const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
|
|
|
12715
12715
|
const arrayPop = unapply(Array.prototype.pop);
|
|
12716
12716
|
const arrayPush = unapply(Array.prototype.push);
|
|
12717
12717
|
const arraySplice = unapply(Array.prototype.splice);
|
|
12718
|
+
const arrayIsArray = Array.isArray;
|
|
12718
12719
|
const stringToLowerCase = unapply(String.prototype.toLowerCase);
|
|
12719
12720
|
const stringToString = unapply(String.prototype.toString);
|
|
12720
12721
|
const stringMatch = unapply(String.prototype.match);
|
|
12721
12722
|
const stringReplace = unapply(String.prototype.replace);
|
|
12722
12723
|
const stringIndexOf = unapply(String.prototype.indexOf);
|
|
12723
12724
|
const stringTrim = unapply(String.prototype.trim);
|
|
12725
|
+
const numberToString = unapply(Number.prototype.toString);
|
|
12726
|
+
const booleanToString = unapply(Boolean.prototype.toString);
|
|
12727
|
+
const bigintToString = typeof BigInt === "undefined" ? null : unapply(BigInt.prototype.toString);
|
|
12728
|
+
const symbolToString = typeof Symbol === "undefined" ? null : unapply(Symbol.prototype.toString);
|
|
12724
12729
|
const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
|
|
12730
|
+
const objectToString = unapply(Object.prototype.toString);
|
|
12725
12731
|
const regExpTest = unapply(RegExp.prototype.test);
|
|
12726
12732
|
const typeErrorCreate = unconstruct(TypeError);
|
|
12727
12733
|
function unapply(func) {
|
|
@@ -12748,6 +12754,9 @@ function addToSet(set, array) {
|
|
|
12748
12754
|
if (setPrototypeOf) {
|
|
12749
12755
|
setPrototypeOf(set, null);
|
|
12750
12756
|
}
|
|
12757
|
+
if (!arrayIsArray(array)) {
|
|
12758
|
+
return set;
|
|
12759
|
+
}
|
|
12751
12760
|
let l = array.length;
|
|
12752
12761
|
while (l--) {
|
|
12753
12762
|
let element2 = array[l];
|
|
@@ -12778,7 +12787,7 @@ function clone(object) {
|
|
|
12778
12787
|
for (const [property, value] of entries(object)) {
|
|
12779
12788
|
const isPropertyExist = objectHasOwnProperty(object, property);
|
|
12780
12789
|
if (isPropertyExist) {
|
|
12781
|
-
if (
|
|
12790
|
+
if (arrayIsArray(value)) {
|
|
12782
12791
|
newObject[property] = cleanArray(value);
|
|
12783
12792
|
} else if (value && typeof value === "object" && value.constructor === Object) {
|
|
12784
12793
|
newObject[property] = clone(value);
|
|
@@ -12789,6 +12798,44 @@ function clone(object) {
|
|
|
12789
12798
|
}
|
|
12790
12799
|
return newObject;
|
|
12791
12800
|
}
|
|
12801
|
+
function stringifyValue(value) {
|
|
12802
|
+
switch (typeof value) {
|
|
12803
|
+
case "string": {
|
|
12804
|
+
return value;
|
|
12805
|
+
}
|
|
12806
|
+
case "number": {
|
|
12807
|
+
return numberToString(value);
|
|
12808
|
+
}
|
|
12809
|
+
case "boolean": {
|
|
12810
|
+
return booleanToString(value);
|
|
12811
|
+
}
|
|
12812
|
+
case "bigint": {
|
|
12813
|
+
return bigintToString ? bigintToString(value) : "0";
|
|
12814
|
+
}
|
|
12815
|
+
case "symbol": {
|
|
12816
|
+
return symbolToString ? symbolToString(value) : "Symbol()";
|
|
12817
|
+
}
|
|
12818
|
+
case "undefined": {
|
|
12819
|
+
return objectToString(value);
|
|
12820
|
+
}
|
|
12821
|
+
case "function":
|
|
12822
|
+
case "object": {
|
|
12823
|
+
if (value === null) {
|
|
12824
|
+
return objectToString(value);
|
|
12825
|
+
}
|
|
12826
|
+
const valueAsRecord = value;
|
|
12827
|
+
const valueToString = lookupGetter(valueAsRecord, "toString");
|
|
12828
|
+
if (typeof valueToString === "function") {
|
|
12829
|
+
const stringified = valueToString(valueAsRecord);
|
|
12830
|
+
return typeof stringified === "string" ? stringified : objectToString(stringified);
|
|
12831
|
+
}
|
|
12832
|
+
return objectToString(value);
|
|
12833
|
+
}
|
|
12834
|
+
default: {
|
|
12835
|
+
return objectToString(value);
|
|
12836
|
+
}
|
|
12837
|
+
}
|
|
12838
|
+
}
|
|
12792
12839
|
function lookupGetter(object, prop) {
|
|
12793
12840
|
while (object !== null) {
|
|
12794
12841
|
const desc = getOwnPropertyDescriptor(object, prop);
|
|
@@ -12807,6 +12854,14 @@ function lookupGetter(object, prop) {
|
|
|
12807
12854
|
}
|
|
12808
12855
|
return fallbackValue;
|
|
12809
12856
|
}
|
|
12857
|
+
function isRegex(value) {
|
|
12858
|
+
try {
|
|
12859
|
+
regExpTest(value, "");
|
|
12860
|
+
return true;
|
|
12861
|
+
} catch (_unused) {
|
|
12862
|
+
return false;
|
|
12863
|
+
}
|
|
12864
|
+
}
|
|
12810
12865
|
const html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
|
|
12811
12866
|
const svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
|
|
12812
12867
|
const svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
|
|
@@ -12814,9 +12869,9 @@ const svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "
|
|
|
12814
12869
|
const mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
|
|
12815
12870
|
const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
|
|
12816
12871
|
const text = freeze(["#text"]);
|
|
12817
|
-
const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"
|
|
12872
|
+
const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]);
|
|
12818
12873
|
const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
|
|
12819
|
-
const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "
|
|
12874
|
+
const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
|
|
12820
12875
|
const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
|
|
12821
12876
|
const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
|
|
12822
12877
|
const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
|
|
@@ -12898,7 +12953,7 @@ const _createHooksMap = function _createHooksMap2() {
|
|
|
12898
12953
|
function createDOMPurify() {
|
|
12899
12954
|
let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
|
|
12900
12955
|
const DOMPurify = (root2) => createDOMPurify(root2);
|
|
12901
|
-
DOMPurify.version = "3.
|
|
12956
|
+
DOMPurify.version = "3.4.1";
|
|
12902
12957
|
DOMPurify.removed = [];
|
|
12903
12958
|
if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
|
|
12904
12959
|
DOMPurify.isSupported = false;
|
|
@@ -13053,15 +13108,15 @@ function createDOMPurify() {
|
|
|
13053
13108
|
PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
|
|
13054
13109
|
SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
|
|
13055
13110
|
transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
|
|
13056
|
-
ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
|
13057
|
-
ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
|
13058
|
-
ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
|
|
13059
|
-
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
|
13060
|
-
DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
|
13061
|
-
FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
|
13062
|
-
FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
|
|
13063
|
-
FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
|
|
13064
|
-
USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES : false;
|
|
13111
|
+
ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") && arrayIsArray(cfg.ALLOWED_TAGS) ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
|
13112
|
+
ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") && arrayIsArray(cfg.ALLOWED_ATTR) ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
|
13113
|
+
ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") && arrayIsArray(cfg.ALLOWED_NAMESPACES) ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
|
|
13114
|
+
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR) ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
|
13115
|
+
DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") && arrayIsArray(cfg.ADD_DATA_URI_TAGS) ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
|
13116
|
+
FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS) ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
|
13117
|
+
FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") && arrayIsArray(cfg.FORBID_TAGS) ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
|
|
13118
|
+
FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") && arrayIsArray(cfg.FORBID_ATTR) ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
|
|
13119
|
+
USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === "object" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
|
|
13065
13120
|
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
|
|
13066
13121
|
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
|
|
13067
13122
|
ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
|
|
@@ -13077,19 +13132,20 @@ function createDOMPurify() {
|
|
|
13077
13132
|
SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
|
|
13078
13133
|
KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
|
|
13079
13134
|
IN_PLACE = cfg.IN_PLACE || false;
|
|
13080
|
-
IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP
|
|
13081
|
-
NAMESPACE = cfg.NAMESPACE
|
|
13082
|
-
MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS
|
|
13083
|
-
HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS
|
|
13084
|
-
|
|
13085
|
-
|
|
13086
|
-
|
|
13135
|
+
IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;
|
|
13136
|
+
NAMESPACE = typeof cfg.NAMESPACE === "string" ? cfg.NAMESPACE : HTML_NAMESPACE;
|
|
13137
|
+
MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "MATHML_TEXT_INTEGRATION_POINTS") && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === "object" ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
|
|
13138
|
+
HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "HTML_INTEGRATION_POINTS") && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === "object" ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, ["annotation-xml"]);
|
|
13139
|
+
const customElementHandling = objectHasOwnProperty(cfg, "CUSTOM_ELEMENT_HANDLING") && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === "object" ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create(null);
|
|
13140
|
+
CUSTOM_ELEMENT_HANDLING = create(null);
|
|
13141
|
+
if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) {
|
|
13142
|
+
CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
|
|
13087
13143
|
}
|
|
13088
|
-
if (
|
|
13089
|
-
CUSTOM_ELEMENT_HANDLING.attributeNameCheck =
|
|
13144
|
+
if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) {
|
|
13145
|
+
CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
|
|
13090
13146
|
}
|
|
13091
|
-
if (
|
|
13092
|
-
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements =
|
|
13147
|
+
if (objectHasOwnProperty(customElementHandling, "allowCustomizedBuiltInElements") && typeof customElementHandling.allowCustomizedBuiltInElements === "boolean") {
|
|
13148
|
+
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;
|
|
13093
13149
|
}
|
|
13094
13150
|
if (SAFE_FOR_TEMPLATES) {
|
|
13095
13151
|
ALLOW_DATA_ATTR = false;
|
|
@@ -13120,42 +13176,38 @@ function createDOMPurify() {
|
|
|
13120
13176
|
addToSet(ALLOWED_ATTR, xml);
|
|
13121
13177
|
}
|
|
13122
13178
|
}
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
if (!objectHasOwnProperty(cfg, "ADD_ATTR")) {
|
|
13127
|
-
EXTRA_ELEMENT_HANDLING.attributeCheck = null;
|
|
13128
|
-
}
|
|
13129
|
-
if (cfg.ADD_TAGS) {
|
|
13179
|
+
EXTRA_ELEMENT_HANDLING.tagCheck = null;
|
|
13180
|
+
EXTRA_ELEMENT_HANDLING.attributeCheck = null;
|
|
13181
|
+
if (objectHasOwnProperty(cfg, "ADD_TAGS")) {
|
|
13130
13182
|
if (typeof cfg.ADD_TAGS === "function") {
|
|
13131
13183
|
EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
|
|
13132
|
-
} else {
|
|
13184
|
+
} else if (arrayIsArray(cfg.ADD_TAGS)) {
|
|
13133
13185
|
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
|
13134
13186
|
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
13135
13187
|
}
|
|
13136
13188
|
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
13137
13189
|
}
|
|
13138
13190
|
}
|
|
13139
|
-
if (cfg
|
|
13191
|
+
if (objectHasOwnProperty(cfg, "ADD_ATTR")) {
|
|
13140
13192
|
if (typeof cfg.ADD_ATTR === "function") {
|
|
13141
13193
|
EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
|
|
13142
|
-
} else {
|
|
13194
|
+
} else if (arrayIsArray(cfg.ADD_ATTR)) {
|
|
13143
13195
|
if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
|
13144
13196
|
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
13145
13197
|
}
|
|
13146
13198
|
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
13147
13199
|
}
|
|
13148
13200
|
}
|
|
13149
|
-
if (cfg.ADD_URI_SAFE_ATTR) {
|
|
13201
|
+
if (objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {
|
|
13150
13202
|
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
|
13151
13203
|
}
|
|
13152
|
-
if (cfg.FORBID_CONTENTS) {
|
|
13204
|
+
if (objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS)) {
|
|
13153
13205
|
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
13154
13206
|
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
13155
13207
|
}
|
|
13156
13208
|
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
|
13157
13209
|
}
|
|
13158
|
-
if (cfg.ADD_FORBID_CONTENTS) {
|
|
13210
|
+
if (objectHasOwnProperty(cfg, "ADD_FORBID_CONTENTS") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
|
|
13159
13211
|
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
13160
13212
|
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
13161
13213
|
}
|
|
@@ -13348,6 +13400,10 @@ function createDOMPurify() {
|
|
|
13348
13400
|
_forceRemove(currentNode);
|
|
13349
13401
|
return true;
|
|
13350
13402
|
}
|
|
13403
|
+
if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) {
|
|
13404
|
+
_forceRemove(currentNode);
|
|
13405
|
+
return true;
|
|
13406
|
+
}
|
|
13351
13407
|
if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
|
|
13352
13408
|
_forceRemove(currentNode);
|
|
13353
13409
|
return true;
|
|
@@ -13356,7 +13412,7 @@ function createDOMPurify() {
|
|
|
13356
13412
|
_forceRemove(currentNode);
|
|
13357
13413
|
return true;
|
|
13358
13414
|
}
|
|
13359
|
-
if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) &&
|
|
13415
|
+
if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
|
|
13360
13416
|
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
13361
13417
|
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
13362
13418
|
return false;
|
|
@@ -13372,7 +13428,6 @@ function createDOMPurify() {
|
|
|
13372
13428
|
const childCount = childNodes.length;
|
|
13373
13429
|
for (let i = childCount - 1; i >= 0; --i) {
|
|
13374
13430
|
const childClone = cloneNode(childNodes[i], true);
|
|
13375
|
-
childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
|
|
13376
13431
|
parentNode.insertBefore(childClone, getNextSibling(currentNode));
|
|
13377
13432
|
}
|
|
13378
13433
|
}
|
|
@@ -13434,8 +13489,9 @@ function createDOMPurify() {
|
|
|
13434
13489
|
} else ;
|
|
13435
13490
|
return true;
|
|
13436
13491
|
};
|
|
13492
|
+
const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]);
|
|
13437
13493
|
const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
|
|
13438
|
-
return tagName
|
|
13494
|
+
return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT2, tagName);
|
|
13439
13495
|
};
|
|
13440
13496
|
const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
|
|
13441
13497
|
_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
|
|
@@ -13469,7 +13525,7 @@ function createDOMPurify() {
|
|
|
13469
13525
|
hookEvent.forceKeepAttr = void 0;
|
|
13470
13526
|
_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
|
|
13471
13527
|
value = hookEvent.attrValue;
|
|
13472
|
-
if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
|
|
13528
|
+
if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
|
|
13473
13529
|
_removeAttribute(name, currentNode);
|
|
13474
13530
|
value = SANITIZE_NAMED_PROPS_PREFIX + value;
|
|
13475
13531
|
}
|
|
@@ -13536,7 +13592,7 @@ function createDOMPurify() {
|
|
|
13536
13592
|
}
|
|
13537
13593
|
_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
|
|
13538
13594
|
};
|
|
13539
|
-
const
|
|
13595
|
+
const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
|
|
13540
13596
|
let shadowNode = null;
|
|
13541
13597
|
const shadowIterator = _createNodeIterator(fragment);
|
|
13542
13598
|
_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
|
|
@@ -13561,13 +13617,9 @@ function createDOMPurify() {
|
|
|
13561
13617
|
dirty = "<!-->";
|
|
13562
13618
|
}
|
|
13563
13619
|
if (typeof dirty !== "string" && !_isNode(dirty)) {
|
|
13564
|
-
|
|
13565
|
-
|
|
13566
|
-
|
|
13567
|
-
throw typeErrorCreate("dirty is not a string, aborting");
|
|
13568
|
-
}
|
|
13569
|
-
} else {
|
|
13570
|
-
throw typeErrorCreate("toString is not a function");
|
|
13620
|
+
dirty = stringifyValue(dirty);
|
|
13621
|
+
if (typeof dirty !== "string") {
|
|
13622
|
+
throw typeErrorCreate("dirty is not a string, aborting");
|
|
13571
13623
|
}
|
|
13572
13624
|
}
|
|
13573
13625
|
if (!DOMPurify.isSupported) {
|
|
@@ -13581,8 +13633,9 @@ function createDOMPurify() {
|
|
|
13581
13633
|
IN_PLACE = false;
|
|
13582
13634
|
}
|
|
13583
13635
|
if (IN_PLACE) {
|
|
13584
|
-
|
|
13585
|
-
|
|
13636
|
+
const nn = dirty.nodeName;
|
|
13637
|
+
if (typeof nn === "string") {
|
|
13638
|
+
const tagName = transformCaseFunc(nn);
|
|
13586
13639
|
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
13587
13640
|
throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
13588
13641
|
}
|
|
@@ -13615,13 +13668,21 @@ function createDOMPurify() {
|
|
|
13615
13668
|
_sanitizeElements(currentNode);
|
|
13616
13669
|
_sanitizeAttributes(currentNode);
|
|
13617
13670
|
if (currentNode.content instanceof DocumentFragment) {
|
|
13618
|
-
|
|
13671
|
+
_sanitizeShadowDOM2(currentNode.content);
|
|
13619
13672
|
}
|
|
13620
13673
|
}
|
|
13621
13674
|
if (IN_PLACE) {
|
|
13622
13675
|
return dirty;
|
|
13623
13676
|
}
|
|
13624
13677
|
if (RETURN_DOM) {
|
|
13678
|
+
if (SAFE_FOR_TEMPLATES) {
|
|
13679
|
+
body2.normalize();
|
|
13680
|
+
let html2 = body2.innerHTML;
|
|
13681
|
+
arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
|
|
13682
|
+
html2 = stringReplace(html2, expr, " ");
|
|
13683
|
+
});
|
|
13684
|
+
body2.innerHTML = html2;
|
|
13685
|
+
}
|
|
13625
13686
|
if (RETURN_DOM_FRAGMENT) {
|
|
13626
13687
|
returnNode = createDocumentFragment.call(body2.ownerDocument);
|
|
13627
13688
|
while (body2.firstChild) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aleph-alpha/chat-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Chat kit package for building chat interfaces with Vue",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"remark-parse": "^11.0.0",
|
|
64
64
|
"remark-rehype": "^11.1.2",
|
|
65
65
|
"unified": "^11.0.5",
|
|
66
|
-
"@aleph-alpha/ui-library": "1.25.
|
|
66
|
+
"@aleph-alpha/ui-library": "1.25.1"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@storybook/addon-a11y": "10.2.17",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"unocss": "^66.6.2",
|
|
85
85
|
"unocss-preset-animations": "^1.3.0",
|
|
86
86
|
"unocss-preset-shadcn": "^1.0.1",
|
|
87
|
-
"vite": "7.3.
|
|
87
|
+
"vite": "^7.3.2",
|
|
88
88
|
"vitest": "4.0.15",
|
|
89
89
|
"vue": "^3.5.27",
|
|
90
90
|
"vue-tsc": "^3.2.4",
|