@aleph-alpha/chat-kit 5.11.0 → 5.13.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/{CkHistory.vue_vue_type_script_setup_true_lang-SL1vOAd9.js → CkHistory.vue_vue_type_script_setup_true_lang-BNcJURkq.js} +216 -87
- package/dist/chat-kit.css +13 -13
- package/dist/components/base/CkCitation/CkCitation.stories.d.ts +1 -4
- package/dist/components/base/CkCitation/CkCitation.stories.d.ts.map +1 -1
- package/dist/components/base/CkCitation/CkCitation.vue.d.ts.map +1 -1
- package/dist/components/base/CkCitation/types.d.ts +6 -1
- package/dist/components/base/CkCitation/types.d.ts.map +1 -1
- package/dist/components/base/CkCitationCard/CkCitationCard.stories.d.ts +13 -2
- package/dist/components/base/CkCitationCard/CkCitationCard.stories.d.ts.map +1 -1
- package/dist/components/base/CkCitationCard/CkCitationCard.vue.d.ts +1 -0
- package/dist/components/base/CkCitationCard/CkCitationCard.vue.d.ts.map +1 -1
- package/dist/components/base/CkCitationCard/types.d.ts +6 -1
- package/dist/components/base/CkCitationCard/types.d.ts.map +1 -1
- package/dist/components/base/CkCitationLabel/CkCitationLabel.stories.d.ts +39 -0
- package/dist/components/base/CkCitationLabel/CkCitationLabel.stories.d.ts.map +1 -0
- package/dist/components/base/CkCitationLabel/CkCitationLabel.vue.d.ts +9 -0
- package/dist/components/base/CkCitationLabel/CkCitationLabel.vue.d.ts.map +1 -0
- package/dist/components/base/CkCitationLabel/index.d.ts +3 -0
- package/dist/components/base/CkCitationLabel/index.d.ts.map +1 -0
- package/dist/components/base/CkCitationLabel/types.d.ts +44 -0
- package/dist/components/base/CkCitationLabel/types.d.ts.map +1 -0
- package/dist/components/base/CkFeedbackDialog/CkFeedbackDialog.stories.d.ts +7 -0
- package/dist/components/base/CkFeedbackDialog/CkFeedbackDialog.stories.d.ts.map +1 -1
- package/dist/components/base/CkFeedbackDialog/CkFeedbackDialog.vue.d.ts +2 -2
- package/dist/components/base/CkFeedbackDialog/CkFeedbackDialog.vue.d.ts.map +1 -1
- package/dist/components/base/CkFeedbackDialog/types.d.ts +19 -0
- package/dist/components/base/CkFeedbackDialog/types.d.ts.map +1 -1
- package/dist/components/base/CkFileItemsList/CkFileItemsList.vue.d.ts +1 -1
- package/dist/components/base/CkUserMessage/CkUserMessage.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/composed/CkConversation/CkConversation.stories.d.ts +12 -0
- package/dist/components/composed/CkConversation/CkConversation.stories.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 +28 -27
- package/dist/composables/useIsTruncated.d.ts +22 -0
- package/dist/composables/useIsTruncated.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -28
- package/dist/types.d.ts +33 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/base/CkCitation/CkCitation.spec.ts +14 -3
- package/src/components/base/CkCitation/CkCitation.stories.ts +85 -3
- package/src/components/base/CkCitation/CkCitation.vue +13 -36
- package/src/components/base/CkCitation/types.ts +6 -1
- package/src/components/base/CkCitationCard/CkCitationCard.spec.ts +37 -0
- package/src/components/base/CkCitationCard/CkCitationCard.stories.ts +30 -3
- package/src/components/base/CkCitationCard/CkCitationCard.vue +53 -11
- package/src/components/base/CkCitationCard/types.ts +6 -1
- package/src/components/base/CkCitationLabel/CkCitationLabel.spec.ts +73 -0
- package/src/components/base/CkCitationLabel/CkCitationLabel.stories.ts +86 -0
- package/src/components/base/CkCitationLabel/CkCitationLabel.vue +70 -0
- package/src/components/base/CkCitationLabel/index.ts +2 -0
- package/src/components/base/CkCitationLabel/types.ts +43 -0
- package/src/components/base/CkFeedbackDialog/CkFeedbackDialog.spec.ts +36 -0
- package/src/components/base/CkFeedbackDialog/CkFeedbackDialog.stories.ts +42 -0
- package/src/components/base/CkFeedbackDialog/CkFeedbackDialog.vue +11 -1
- package/src/components/base/CkFeedbackDialog/types.ts +20 -0
- package/src/components/base/CkUserMessage/CkUserMessage.vue +1 -1
- package/src/components/base/index.ts +2 -0
- package/src/components/composed/CkConversation/CkConversation.spec.ts +65 -2
- package/src/components/composed/CkConversation/CkConversation.stories.ts +136 -0
- package/src/components/index.ts +2 -0
- package/src/composables/useIsTruncated.ts +82 -0
- package/src/index.ts +2 -0
- package/src/types.ts +34 -4
|
@@ -10,11 +10,8 @@ import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
|
10
10
|
declare const meta: Meta<typeof CkCitation>;
|
|
11
11
|
export default meta;
|
|
12
12
|
type Story = StoryObj<typeof meta>;
|
|
13
|
-
/**
|
|
14
|
-
* A single marker in its default (amber) state. Hover the chip (or focus it and
|
|
15
|
-
* press Enter) to reveal the source card.
|
|
16
|
-
*/
|
|
17
13
|
export declare const Default: Story;
|
|
14
|
+
export declare const States: Story;
|
|
18
15
|
/**
|
|
19
16
|
* The selected (teal) state — set `selected` when the citation's source is the
|
|
20
17
|
* one currently open/highlighted, so the active marker stands out.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkCitation.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitation/CkCitation.stories.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"CkCitation.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitation/CkCitation.stories.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAE1C,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAK3D;;;;;;GAMG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CA2BjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA6BnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAoBF,eAAO,MAAM,MAAM,EAAE,KAoCpB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAqB1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAE7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAE7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAsBzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkCitation.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitation/CkCitation.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CkCitation.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitation/CkCitation.vue"],"names":[],"mappings":"AA8JA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAiS/C,QAAA,MAAM,YAAY;;;;;;;;;;6EAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -27,6 +27,11 @@ export interface CkCitationSource {
|
|
|
27
27
|
* non-paginated sources.
|
|
28
28
|
*/
|
|
29
29
|
locationLabel?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Name of the collection the source belongs to, shown in the card footer
|
|
32
|
+
* before the location. Omit when the source has no collection.
|
|
33
|
+
*/
|
|
34
|
+
collectionName?: string;
|
|
30
35
|
/**
|
|
31
36
|
* Source URL for the card's external-link action. Activating it emits
|
|
32
37
|
* `open-source`. Omit to hide the action.
|
|
@@ -52,7 +57,7 @@ export interface CkCitationProps extends CkCitationSource {
|
|
|
52
57
|
/**
|
|
53
58
|
* Marks the citation as selected/active (e.g. the source it points to is
|
|
54
59
|
* currently open or highlighted). Renders the marker in its selected (teal)
|
|
55
|
-
* state instead of the default
|
|
60
|
+
* state instead of the default neutral one.
|
|
56
61
|
* @default false
|
|
57
62
|
*/
|
|
58
63
|
selected?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitation/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,CAAC,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitation/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,CAAC,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC"}
|
|
@@ -22,10 +22,21 @@ export declare const Default: Story;
|
|
|
22
22
|
*/
|
|
23
23
|
export declare const WithoutLink: Story;
|
|
24
24
|
/**
|
|
25
|
-
* No `locationLabel` — the footer
|
|
26
|
-
* such as a plain web page
|
|
25
|
+
* No `locationLabel` — the footer keeps just the collection. Use for
|
|
26
|
+
* non-paginated sources such as a plain web page.
|
|
27
27
|
*/
|
|
28
28
|
export declare const WithoutLocation: Story;
|
|
29
|
+
/**
|
|
30
|
+
* No `collectionName` — the footer keeps just the location, and the separator
|
|
31
|
+
* goes with it. Use for sources that don't come from a collection.
|
|
32
|
+
*/
|
|
33
|
+
export declare const WithoutCollection: Story;
|
|
34
|
+
/**
|
|
35
|
+
* A collection name longer than the card is wide. The name truncates and the
|
|
36
|
+
* location stays on the same line — the page a citation points at is the more
|
|
37
|
+
* useful half, so it must not be pushed out or wrapped away.
|
|
38
|
+
*/
|
|
39
|
+
export declare const LongCollectionName: Story;
|
|
29
40
|
/**
|
|
30
41
|
* Minimal: title + excerpt only (no link, no location). The leanest source a
|
|
31
42
|
* card can describe.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkCitationCard.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitationCard/CkCitationCard.stories.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAK3D;;;;;;;GAOG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,
|
|
1
|
+
{"version":3,"file":"CkCitationCard.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitationCard/CkCitationCard.stories.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAK3D;;;;;;;GAOG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAyBrC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAqBnC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAE7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAE/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAuB9B,CAAC"}
|
|
@@ -5,6 +5,7 @@ declare const __VLS_export: import("vue").DefineComponent<CkCitationCardProps, {
|
|
|
5
5
|
"onOpen-source"?: ((url: string) => any) | undefined;
|
|
6
6
|
}>, {
|
|
7
7
|
locationLabel: string;
|
|
8
|
+
collectionName: string;
|
|
8
9
|
url: string;
|
|
9
10
|
openSourceLabel: string;
|
|
10
11
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkCitationCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitationCard/CkCitationCard.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CkCitationCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitationCard/CkCitationCard.vue"],"names":[],"mappings":"AAuIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AA+PnD,QAAA,MAAM,YAAY;;;;;;;;;6EAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -25,9 +25,14 @@ export interface CkCitationCardProps {
|
|
|
25
25
|
/**
|
|
26
26
|
* Location label shown in the footer, e.g. `"Page 3"`. Pass a fully
|
|
27
27
|
* formatted, localized string — the component does no number formatting.
|
|
28
|
-
* Omit for non-paginated sources
|
|
28
|
+
* Omit for non-paginated sources.
|
|
29
29
|
*/
|
|
30
30
|
locationLabel?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Name of the collection the source belongs to, shown in the footer before
|
|
33
|
+
* the location. Omit when the source has no collection.
|
|
34
|
+
*/
|
|
35
|
+
collectionName?: string;
|
|
31
36
|
/**
|
|
32
37
|
* When set, the external-link action is shown in the header. Activating it
|
|
33
38
|
* emits `open-source` with this value; the host opens it (it may be an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitationCard/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,CAAC,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitationCard/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,CAAC,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import CkCitationLabel from './CkCitationLabel.vue';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
3
|
+
/**
|
|
4
|
+
* CkCitationLabel is the numbered chip on its own — the citation marker
|
|
5
|
+
* without a popover. `CkCitation` composes it as its hover-card trigger
|
|
6
|
+
* (`as="button"`); use it directly, in its default static `span` form,
|
|
7
|
+
* wherever cited text should keep the marker styling but stay inert — the
|
|
8
|
+
* response preview in `CkFeedbackDialog` renders it that way.
|
|
9
|
+
*/
|
|
10
|
+
declare const meta: Meta<typeof CkCitationLabel>;
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
/**
|
|
14
|
+
* The default: a static `span` in its amber state. Not focusable, no hover
|
|
15
|
+
* card — it just carries the marker styling.
|
|
16
|
+
*/
|
|
17
|
+
export declare const Default: Story;
|
|
18
|
+
/**
|
|
19
|
+
* The selected (teal) state — set `selected` when the citation's source is the
|
|
20
|
+
* one currently open/highlighted.
|
|
21
|
+
*/
|
|
22
|
+
export declare const Selected: Story;
|
|
23
|
+
/**
|
|
24
|
+
* `as="button"` makes the chip an activatable control and gives it an
|
|
25
|
+
* accessible name (`"Source {index}"` by default, overridable with
|
|
26
|
+
* `ariaLabel`). This is the mode `CkCitation` uses for its popover trigger.
|
|
27
|
+
*/
|
|
28
|
+
export declare const AsButton: Story;
|
|
29
|
+
/**
|
|
30
|
+
* How static markers read inside a sentence — the way a cited answer looks in
|
|
31
|
+
* a read-only surface such as the feedback dialog's response preview.
|
|
32
|
+
*/
|
|
33
|
+
export declare const InlineInText: Story;
|
|
34
|
+
/**
|
|
35
|
+
* Multi-digit indices keep the chip legible — it grows with its number while
|
|
36
|
+
* staying aligned to the surrounding text.
|
|
37
|
+
*/
|
|
38
|
+
export declare const MultiDigitIndex: Story;
|
|
39
|
+
//# sourceMappingURL=CkCitationLabel.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CkCitationLabel.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitationLabel/CkCitationLabel.stories.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;;;GAMG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAmBtC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAgB1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAE7B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CkCitationLabelProps } from './types';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<CkCitationLabelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CkCitationLabelProps> & Readonly<{}>, {
|
|
3
|
+
ariaLabel: string;
|
|
4
|
+
selected: boolean;
|
|
5
|
+
as: "span" | "button";
|
|
6
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=CkCitationLabel.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CkCitationLabel.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitationLabel/CkCitationLabel.vue"],"names":[],"mappings":"AA8EA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAiHpD,QAAA,MAAM,YAAY;;;;6EAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitationLabel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnE,mBAAmB,SAAS,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The bare citation marker — the numbered chip rendered in place of a `[n]`
|
|
3
|
+
* reference, with no popover attached. `CkCitation` composes it as its popover
|
|
4
|
+
* trigger (`as="button"`); use it directly, in its default static `span` form,
|
|
5
|
+
* wherever cited text should keep the marker styling without being interactive
|
|
6
|
+
* (e.g. the response preview in `CkFeedbackDialog`).
|
|
7
|
+
*
|
|
8
|
+
* @category Data Display
|
|
9
|
+
* @useCases static citation marker, read-only cited answer, popover trigger for CkCitation
|
|
10
|
+
* @keywords citation, source, reference, inline, marker, footnote, number, chip
|
|
11
|
+
* @related CkCitation, CkCitationCard, CkMarkdownRenderer, CkFeedbackDialog
|
|
12
|
+
*/
|
|
13
|
+
export interface CkCitationLabelProps {
|
|
14
|
+
/**
|
|
15
|
+
* 1-based source number shown in the chip. Matches the `[n]` reference it
|
|
16
|
+
* replaces in the answer text.
|
|
17
|
+
*/
|
|
18
|
+
index: number;
|
|
19
|
+
/**
|
|
20
|
+
* Marks the citation as selected/active (e.g. the source it points to is
|
|
21
|
+
* currently open or highlighted). Renders the chip in its selected (teal)
|
|
22
|
+
* state instead of the default amber.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
selected?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Element the chip renders as. `'span'` (the default) is inert: not
|
|
28
|
+
* focusable and not activatable. It is exposed to assistive tech as a single
|
|
29
|
+
* labelled object (`role="img"`) so the number is announced as
|
|
30
|
+
* `"Source {index}"` rather than being glued onto the preceding word, while
|
|
31
|
+
* the rendered text stays the plain number so it survives a copy of the
|
|
32
|
+
* surrounding prose. `'button'` makes it an activatable control — used by
|
|
33
|
+
* `CkCitation` as its popover trigger.
|
|
34
|
+
* @default 'span'
|
|
35
|
+
*/
|
|
36
|
+
as?: 'span' | 'button';
|
|
37
|
+
/**
|
|
38
|
+
* Accessible label for the chip, in both modes. When omitted, resolves to
|
|
39
|
+
* `"{citationSourceLabel} {index}"` from `useChatKitLabels` (English default
|
|
40
|
+
* `"Source {index}"`).
|
|
41
|
+
*/
|
|
42
|
+
ariaLabel?: string;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCitationLabel/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;OASG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -12,6 +12,13 @@ export declare const Positive: Story;
|
|
|
12
12
|
* Negative variant. Same shape, different reason set and title.
|
|
13
13
|
*/
|
|
14
14
|
export declare const Negative: Story;
|
|
15
|
+
/**
|
|
16
|
+
* Pass the same `citations` array the message was rendered with and the `[n]`
|
|
17
|
+
* references in the preview pick up the marker styling of the original answer.
|
|
18
|
+
* They are static here — no hover card, no focus stop — so the preview stays a
|
|
19
|
+
* preview.
|
|
20
|
+
*/
|
|
21
|
+
export declare const WithCitations: Story;
|
|
15
22
|
/**
|
|
16
23
|
* When no response text is provided, the left column collapses and the reasons
|
|
17
24
|
* + free-text input fill the dialog.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkFeedbackDialog.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackDialog/CkFeedbackDialog.stories.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AAOtD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"CkFeedbackDialog.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackDialog/CkFeedbackDialog.stories.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AAOtD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAoF3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAkBvC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAoEnC;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAO9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAqEhC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload } from './types';
|
|
2
2
|
declare const __VLS_export: import("vue").DefineComponent<CkFeedbackDialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
|
-
submit: (payload: CkFeedbackDialogSubmitPayload) => any;
|
|
4
3
|
cancel: () => any;
|
|
4
|
+
submit: (payload: CkFeedbackDialogSubmitPayload) => any;
|
|
5
5
|
"update:open": (open: boolean) => any;
|
|
6
6
|
}, string, import("vue").PublicProps, Readonly<CkFeedbackDialogProps> & Readonly<{
|
|
7
|
-
onSubmit?: ((payload: CkFeedbackDialogSubmitPayload) => any) | undefined;
|
|
8
7
|
onCancel?: (() => any) | undefined;
|
|
8
|
+
onSubmit?: ((payload: CkFeedbackDialogSubmitPayload) => any) | undefined;
|
|
9
9
|
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
10
10
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkFeedbackDialog.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackDialog/CkFeedbackDialog.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CkFeedbackDialog.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackDialog/CkFeedbackDialog.vue"],"names":[],"mappings":"AAiVA,OAAO,KAAK,EACV,qBAAqB,EACrB,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AAgjBjB,QAAA,MAAM,YAAY;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CkCitationSource } from '../CkCitation';
|
|
1
2
|
/**
|
|
2
3
|
* Modal dialog for collecting qualitative feedback on an assistant response.
|
|
3
4
|
* Opened after a binary thumbs-up / thumbs-down click (see `CkFeedbackButton`),
|
|
@@ -64,6 +65,24 @@ export interface CkFeedbackDialogProps {
|
|
|
64
65
|
* @default undefined
|
|
65
66
|
*/
|
|
66
67
|
responseText?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Citation sources for inline `[n]` references in `responseText`. Pass the
|
|
70
|
+
* same array the message itself was rendered with, so the preview matches
|
|
71
|
+
* the answer the user is rating.
|
|
72
|
+
*
|
|
73
|
+
* The dialog renders the markers as **static** numbered chips
|
|
74
|
+
* (`CkCitationLabel`): styling only — no hover card, no focus stop, no
|
|
75
|
+
* `open-source`. Only each source's `index` is used; the rest of the shape
|
|
76
|
+
* is accepted so callers can forward their existing array unchanged.
|
|
77
|
+
* Omit it and `[n]` stays literal text.
|
|
78
|
+
*
|
|
79
|
+
* Same caveats as `CkMarkdownRenderer`'s `citations`: any numeric `[n]` in
|
|
80
|
+
* prose with a matching source is converted (wrap incidental ones in a code
|
|
81
|
+
* span to keep them literal), `index` must be unique, and the array
|
|
82
|
+
* reference should be stable/memoized.
|
|
83
|
+
* @default undefined
|
|
84
|
+
*/
|
|
85
|
+
citations?: CkCitationSource[];
|
|
67
86
|
/**
|
|
68
87
|
* Available reasons to render as multi-select chips. The host fetches the
|
|
69
88
|
* appropriate per-sentiment list from `GET /feedback/config` and passes it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackDialog/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,UAAU,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,6BAA6B;IAC5C,+CAA+C;IAC/C,SAAS,EAAE,mBAAmB,CAAC;IAC/B;;;;OAIG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,4EAA4E;IAC5E,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,SAAS,EAAE,mBAAmB,CAAC;IAC/B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACxC;;;;OAIG;IACH,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,6BAA6B,GAAG,IAAI,CAAC;IAC5D;;;OAGG;IACH,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CACrB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackDialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,UAAU,CAAC;AAE1D;;;;;GAKG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C;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACxC;;;;OAIG;IACH,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,6BAA6B,GAAG,IAAI,CAAC;IAC5D;;;OAGG;IACH,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CACrB"}
|
|
@@ -19,12 +19,12 @@ declare const __VLS_base: import("vue").DefineComponent<CkFileItemsListProps, {}
|
|
|
19
19
|
}>, {
|
|
20
20
|
size: UiFileItemSize;
|
|
21
21
|
disabled: boolean;
|
|
22
|
-
triggerLabel: string;
|
|
23
22
|
isRemovable: boolean;
|
|
24
23
|
removeLabel: string;
|
|
25
24
|
minItemWidth: number;
|
|
26
25
|
maxItemWidth: number;
|
|
27
26
|
showStatus: boolean;
|
|
27
|
+
triggerLabel: string;
|
|
28
28
|
triggerAriaLabel: string;
|
|
29
29
|
listLabel: string;
|
|
30
30
|
popoverClass: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkUserMessage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkUserMessage/CkUserMessage.vue"],"names":[],"mappings":"AA0HA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"CkUserMessage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkUserMessage/CkUserMessage.vue"],"names":[],"mappings":"AA0HA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAoJlD,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAO/C,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"}
|
|
@@ -6,6 +6,8 @@ export { CkHeaderActivityButton } from './CkHeaderActivityButton';
|
|
|
6
6
|
export type { CkHeaderActivityButtonProps, CkHeaderActivityButtonEmits, } from './CkHeaderActivityButton';
|
|
7
7
|
export { CkCitation } from './CkCitation';
|
|
8
8
|
export type { CkCitationProps, CkCitationEmits, CkCitationSource, } from './CkCitation';
|
|
9
|
+
export { CkCitationLabel } from './CkCitationLabel';
|
|
10
|
+
export type { CkCitationLabelProps } from './CkCitationLabel';
|
|
9
11
|
export { CkCitationCard } from './CkCitationCard';
|
|
10
12
|
export type { CkCitationCardProps, CkCitationCardEmits, } from './CkCitationCard';
|
|
11
13
|
export { CkConversationLayout } from './CkConversationLayout';
|
|
@@ -1 +1 @@
|
|
|
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,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EACV,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EACV,eAAe,EACf,eAAe,EACf,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO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E,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EACV,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,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,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EACV,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,yBAAyB,CAAC"}
|
|
@@ -64,6 +64,18 @@ export declare const WithCustomUserContent: Story;
|
|
|
64
64
|
* different renderer.
|
|
65
65
|
*/
|
|
66
66
|
export declare const WithCustomAgentContent: Story;
|
|
67
|
+
/**
|
|
68
|
+
* Citations are opt-in: override `#agent-message-content` and hand the message's
|
|
69
|
+
* sources to `CkMarkdownRenderer`. Every `[n]` in the answer whose number
|
|
70
|
+
* matches a source's `index` becomes a marker that reveals the source on hover
|
|
71
|
+
* or keyboard activation; unmatched markers stay plain text. `open-source` is
|
|
72
|
+
* re-emitted for the host to perform the (often auth-proxied) navigation — the
|
|
73
|
+
* second source here has no `url`, so its card omits the action.
|
|
74
|
+
*
|
|
75
|
+
* The footer copy button is unaffected: it copies the message text, so the
|
|
76
|
+
* `[n]` references travel with a pasted answer.
|
|
77
|
+
*/
|
|
78
|
+
export declare const WithCitations: Story;
|
|
67
79
|
/**
|
|
68
80
|
* End-to-end streaming scenario: appending a new user message and then
|
|
69
81
|
* streaming an assistant reply chunk-by-chunk. Use as a reference for wiring
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkConversation.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkConversation/CkConversation.stories.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CkConversation.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/CkConversation/CkConversation.stories.ts"],"names":[],"mappings":"AAWA,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAuL3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAkCrC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA0ZnC;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,EAAE,KAerB,CAAC;AA2HF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,KAgCzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAYtC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,KASpB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,KAe5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,KAU7B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAmC/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAiBnC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAiBpC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,EAAE,KA6B3B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,KA4GjC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAmBvC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,KA6C9B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAoDjC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,KAsC7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { CkAgentMessage, CkAgentMessageHeader, CkHeaderActivityButton, CkCitation, CkCitationCard, CkConversationLayout, CkCopyMessageButton, CkDropZoneOverlay, CkFeedbackButton, CkFeedbackDialog, CkFileItemsList, CkHistoryItem, CkHistoryWrapper, CkMarkdownRenderer, CkMessageButton, CkModelSelector, CkPromptSendButton, CkPromptMenuButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkRegenerateMessageButton, CkSendIcon, CkStopIcon, CkUserMessage, CkEditableUserMessage, } from './base';
|
|
2
|
-
export type { CkAgentMessageHeaderProps, CkHeaderActivityButtonProps, CkHeaderActivityButtonEmits, CkCitationProps, CkCitationEmits, CkCitationSource, CkCitationCardProps, CkCitationCardEmits, CkConversationLayoutProps, CkDropZoneOverlayProps, CkDropZoneOverlayEmits, CkDropZoneRejection, CkDropZoneRejectionReason, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkMarkdownRendererEmits, CkModelOption, CkModelSelectorProps, CkModelSelectorEmits, CkPromptMenuButtonProps, CkUserMessageProps, CkEditableUserMessageProps, CkEditableUserMessageEmits, } from './base';
|
|
1
|
+
export { CkAgentMessage, CkAgentMessageHeader, CkHeaderActivityButton, CkCitation, CkCitationLabel, CkCitationCard, CkConversationLayout, CkCopyMessageButton, CkDropZoneOverlay, CkFeedbackButton, CkFeedbackDialog, CkFileItemsList, CkHistoryItem, CkHistoryWrapper, CkMarkdownRenderer, CkMessageButton, CkModelSelector, CkPromptSendButton, CkPromptMenuButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkRegenerateMessageButton, CkSendIcon, CkStopIcon, CkUserMessage, CkEditableUserMessage, } from './base';
|
|
2
|
+
export type { CkAgentMessageHeaderProps, CkHeaderActivityButtonProps, CkHeaderActivityButtonEmits, CkCitationProps, CkCitationEmits, CkCitationSource, CkCitationLabelProps, CkCitationCardProps, CkCitationCardEmits, CkConversationLayoutProps, CkDropZoneOverlayProps, CkDropZoneOverlayEmits, CkDropZoneRejection, CkDropZoneRejectionReason, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkMarkdownRendererEmits, CkModelOption, CkModelSelectorProps, CkModelSelectorEmits, CkPromptMenuButtonProps, CkUserMessageProps, CkEditableUserMessageProps, CkEditableUserMessageEmits, } from './base';
|
|
3
3
|
export { CkConversation, CkHistory } from './composed';
|
|
4
4
|
export type { CkConversationProps, CkHistoryEmits, CkHistoryProps, } from './composed';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,yBAAyB,EACzB,UAAU,EACV,UAAU,EACV,aAAa,EACb,qBAAqB,GACtB,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvD,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,cAAc,GACf,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,sBAAsB,EACtB,UAAU,EACV,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,yBAAyB,EACzB,UAAU,EACV,UAAU,EACV,aAAa,EACb,qBAAqB,GACtB,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvD,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { _, a,
|
|
1
|
+
import { _, a, b, c, C, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A } from "../CkHistory.vue_vue_type_script_setup_true_lang-BNcJURkq.js";
|
|
2
2
|
export {
|
|
3
3
|
_ as CkAgentMessage,
|
|
4
4
|
a as CkAgentMessageHeader,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
d as
|
|
9
|
-
e as
|
|
10
|
-
f as
|
|
11
|
-
g as
|
|
12
|
-
h as
|
|
13
|
-
i as
|
|
14
|
-
j as
|
|
15
|
-
k as
|
|
16
|
-
l as
|
|
17
|
-
m as
|
|
18
|
-
n as
|
|
19
|
-
o as
|
|
20
|
-
p as
|
|
21
|
-
q as
|
|
22
|
-
r as
|
|
23
|
-
s as
|
|
24
|
-
t as
|
|
25
|
-
u as
|
|
26
|
-
v as
|
|
27
|
-
w as
|
|
28
|
-
x as
|
|
29
|
-
y as
|
|
30
|
-
z as
|
|
5
|
+
b as CkCitation,
|
|
6
|
+
c as CkCitationCard,
|
|
7
|
+
C as CkCitationLabel,
|
|
8
|
+
d as CkConversation,
|
|
9
|
+
e as CkConversationLayout,
|
|
10
|
+
f as CkCopyMessageButton,
|
|
11
|
+
g as CkDropZoneOverlay,
|
|
12
|
+
h as CkEditableUserMessage,
|
|
13
|
+
i as CkFeedbackButton,
|
|
14
|
+
j as CkFeedbackDialog,
|
|
15
|
+
k as CkFileItemsList,
|
|
16
|
+
l as CkHeaderActivityButton,
|
|
17
|
+
m as CkHistory,
|
|
18
|
+
n as CkHistoryItem,
|
|
19
|
+
o as CkHistoryWrapper,
|
|
20
|
+
p as CkMarkdownRenderer,
|
|
21
|
+
q as CkMessageButton,
|
|
22
|
+
r as CkModelSelector,
|
|
23
|
+
s as CkPromptInput,
|
|
24
|
+
t as CkPromptInputDisclaimer,
|
|
25
|
+
u as CkPromptMenuButton,
|
|
26
|
+
v as CkPromptSendButton,
|
|
27
|
+
w as CkPromptStopButton,
|
|
28
|
+
x as CkRegenerateMessageButton,
|
|
29
|
+
y as CkSendIcon,
|
|
30
|
+
z as CkStopIcon,
|
|
31
|
+
A as CkUserMessage
|
|
31
32
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local copy of ui-library's internal probe of the same name. chat-kit's
|
|
3
|
+
* supported ui-library range (^5.3.0) does not export it, and it is too small
|
|
4
|
+
* to justify widening that package's public API. Drop this file once the range
|
|
5
|
+
* moves up to a version that exports it.
|
|
6
|
+
*/
|
|
7
|
+
import { type Ref, type ShallowRef } from 'vue';
|
|
8
|
+
/** An element ref as produced by `useTemplateRef`. */
|
|
9
|
+
type ElementRef = Readonly<ShallowRef<HTMLElement | null>>;
|
|
10
|
+
/**
|
|
11
|
+
* Whether an element's text is currently clipped by `text-overflow: ellipsis`.
|
|
12
|
+
*
|
|
13
|
+
* Re-measures when the element resizes and whenever `watchSource` changes, so
|
|
14
|
+
* it stays correct as the container narrows or the text is swapped out. Use it
|
|
15
|
+
* to show a tooltip only for names that are actually cut off.
|
|
16
|
+
* @param elementRef - The element whose text may be clipped
|
|
17
|
+
* @param watchSource - Value to re-measure on, e.g. the rendered text
|
|
18
|
+
* @returns Reactive truncation state
|
|
19
|
+
*/
|
|
20
|
+
export declare function useIsTruncated(elementRef: ElementRef, watchSource?: () => unknown): Ref<boolean>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=useIsTruncated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsTruncated.d.ts","sourceRoot":"","sources":["../../src/composables/useIsTruncated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAA8B,KAAK,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,KAAK,CAAC;AAE5E,sDAAsD;AACtD,KAAK,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC;AA6B3D;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,UAAU,EAAE,UAAU,EACtB,WAAW,CAAC,EAAE,MAAM,OAAO,GAC1B,GAAG,CAAC,OAAO,CAAC,CA6Bd"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export { useChat, useConversationSessions, useConversations, } from './composabl
|
|
|
6
6
|
export type { ChatActions, ChatState, ConversationSession, CreateConversationInput, MessageHandler, MutationOptions, UseChatReturn, UseConversationSessionsReturn, UseConversationsOptions, UseConversationsReturn, } from './composables';
|
|
7
7
|
export { SdkError, createDocumentUploadProvider, defaultDocumentUploadConfig, defaultEndpoints, useDocumentUploadWithDefaultConfig, } from './composables/fileUpload';
|
|
8
8
|
export type { DocumentUploadConfig, DocumentUploadProvider, FileEntry, FileStatus, } from './composables/fileUpload';
|
|
9
|
-
export { CkAgentMessage, CkAgentMessageHeader, CkHeaderActivityButton, CkCitation, CkCitationCard, CkConversation, CkConversationLayout, CkCopyMessageButton, CkDropZoneOverlay, CkFeedbackButton, CkFeedbackDialog, CkFileItemsList, CkHistory, CkHistoryItem, CkHistoryWrapper, CkMarkdownRenderer, CkMessageButton, CkModelSelector, CkPromptSendButton, CkPromptMenuButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkRegenerateMessageButton, CkSendIcon, CkStopIcon, CkUserMessage, CkEditableUserMessage, } from './components';
|
|
10
|
-
export type { CkAgentMessageHeaderProps, CkHeaderActivityButtonProps, CkHeaderActivityButtonEmits, CkCitationProps, CkCitationEmits, CkCitationSource, CkCitationCardProps, CkCitationCardEmits, CkConversationLayoutProps, CkConversationProps, CkDropZoneOverlayProps, CkDropZoneOverlayEmits, CkDropZoneRejection, CkDropZoneRejectionReason, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryEmits, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkMarkdownRendererEmits, CkModelOption, CkModelSelectorProps, CkModelSelectorEmits, CkPromptMenuButtonProps, CkUserMessageProps, CkEditableUserMessageProps, CkEditableUserMessageEmits, } from './components';
|
|
9
|
+
export { CkAgentMessage, CkAgentMessageHeader, CkHeaderActivityButton, CkCitation, CkCitationLabel, CkCitationCard, CkConversation, CkConversationLayout, CkCopyMessageButton, CkDropZoneOverlay, CkFeedbackButton, CkFeedbackDialog, CkFileItemsList, CkHistory, CkHistoryItem, CkHistoryWrapper, CkMarkdownRenderer, CkMessageButton, CkModelSelector, CkPromptSendButton, CkPromptMenuButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkRegenerateMessageButton, CkSendIcon, CkStopIcon, CkUserMessage, CkEditableUserMessage, } from './components';
|
|
10
|
+
export type { CkAgentMessageHeaderProps, CkHeaderActivityButtonProps, CkHeaderActivityButtonEmits, CkCitationProps, CkCitationEmits, CkCitationSource, CkCitationLabelProps, CkCitationCardProps, CkCitationCardEmits, CkConversationLayoutProps, CkConversationProps, CkDropZoneOverlayProps, CkDropZoneOverlayEmits, CkDropZoneRejection, CkDropZoneRejectionReason, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryEmits, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkMarkdownRendererEmits, CkModelOption, CkModelSelectorProps, CkModelSelectorEmits, CkPromptMenuButtonProps, CkUserMessageProps, CkEditableUserMessageProps, CkEditableUserMessageEmits, } from './components';
|
|
11
11
|
export { formatRelativeTime } from './helpers';
|
|
12
12
|
export type { ActiveComparison, BaseMessage, ComparisonLane, Conversation, ConversationTree, MessageContent, MessageContentStatus, MessageMetadata, MessageReasoningContent, MessageRole, MessageStatus, MessageTextContent, MessageToolContent, TreeMessage, } from './types';
|
|
13
13
|
//# 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":"AAMA,OAAO,iBAAiB,CAAC;AAGzB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AASpB,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,EACL,OAAO,EACP,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,aAAa,EACb,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,QAAQ,EACR,4BAA4B,EAC5B,2BAA2B,EAC3B,gBAAgB,EAChB,kCAAkC,GACnC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,oBAAoB,EACpB,sBAAsB,EACtB,SAAS,EACT,UAAU,GACX,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,UAAU,EACV,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,yBAAyB,EACzB,UAAU,EACV,UAAU,EACV,aAAa,EACb,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAG/C,YAAY,EACV,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,GACZ,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,iBAAiB,CAAC;AAGzB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,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