@urbicon-ui/blocks 6.40.4 → 6.43.2
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/README.md +1 -1
- package/dist/components/Calendar/calendar.variants.d.ts +63 -63
- package/dist/components/Chat/A2UIView/A2UINode.svelte +20 -39
- package/dist/components/Chat/A2UIView/A2UIView.svelte +47 -50
- package/dist/components/Chat/A2UIView/a2ui-basic-catalog.d.ts +17 -0
- package/dist/components/Chat/A2UIView/a2ui-basic-catalog.js +69 -0
- package/dist/components/Chat/A2UIView/a2ui-catalog.d.ts +95 -0
- package/dist/components/Chat/A2UIView/a2ui-catalog.js +87 -0
- package/dist/components/Chat/A2UIView/a2ui-node-common.d.ts +40 -0
- package/dist/components/Chat/A2UIView/a2ui-node-common.js +72 -0
- package/dist/components/Chat/A2UIView/a2ui-prompt.d.ts +21 -10
- package/dist/components/Chat/A2UIView/a2ui-prompt.js +170 -24
- package/dist/components/Chat/A2UIView/a2ui-registry.d.ts +1 -1
- package/dist/components/Chat/A2UIView/a2ui-registry.js +2 -1
- package/dist/components/Chat/A2UIView/a2ui-render.d.ts +30 -0
- package/dist/components/Chat/A2UIView/a2ui-render.js +61 -23
- package/dist/components/Chat/A2UIView/a2ui-router.d.ts +136 -0
- package/dist/components/Chat/A2UIView/a2ui-router.js +264 -0
- package/dist/components/Chat/A2UIView/a2ui-schema.d.ts +45 -0
- package/dist/components/Chat/A2UIView/a2ui-schema.js +133 -0
- package/dist/components/Chat/A2UIView/a2ui-stream.d.ts +120 -0
- package/dist/components/Chat/A2UIView/a2ui-stream.js +406 -0
- package/dist/components/Chat/A2UIView/a2ui-transcript.d.ts +65 -0
- package/dist/components/Chat/A2UIView/a2ui-transcript.js +101 -0
- package/dist/components/Chat/A2UIView/a2ui-validate.d.ts +33 -1
- package/dist/components/Chat/A2UIView/a2ui-validate.js +167 -63
- package/dist/components/Chat/A2UIView/a2ui.types.d.ts +50 -0
- package/dist/components/Chat/A2UIView/a2ui.types.js +38 -1
- package/dist/components/Chat/A2UIView/index.d.ts +35 -2
- package/dist/components/Chat/A2UIView/index.js +13 -0
- package/dist/components/Chat/A2UIView/urbicon/UrbiconA2UINode.svelte +831 -0
- package/dist/components/Chat/A2UIView/urbicon/UrbiconA2UINode.svelte.d.ts +4 -0
- package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon-catalog.d.ts +14 -0
- package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon-catalog.js +87 -0
- package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon-registry.d.ts +78 -0
- package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon-registry.js +783 -0
- package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon.variants.d.ts +43 -0
- package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon.variants.js +33 -0
- package/dist/components/Chat/A2UIView/urbicon/urbicon-axes.gen.d.ts +7 -0
- package/dist/components/Chat/A2UIView/urbicon/urbicon-axes.gen.js +86 -0
- package/dist/components/Chat/ChatMessage/ChatMessage.svelte +93 -67
- package/dist/components/Chat/ChatMessage/chat-message.variants.d.ts +26 -19
- package/dist/components/Chat/ChatMessage/chat-message.variants.js +45 -12
- package/dist/components/Chat/ChatMessage/index.d.ts +20 -5
- package/dist/components/Chat/CodeBlock/CodeBlock.svelte +59 -33
- package/dist/components/Chat/CodeBlock/code-block.variants.d.ts +7 -0
- package/dist/components/Chat/CodeBlock/code-block.variants.js +28 -13
- package/dist/components/Chat/CodeBlock/index.d.ts +39 -4
- package/dist/components/Chat/PromptInput/PromptInput.svelte +9 -16
- package/dist/components/Chat/PromptInput/prompt-input.variants.js +16 -15
- package/dist/components/Chat/ToolCallCard/ToolCallCard.svelte +9 -4
- package/dist/components/Chat/ToolCallCard/index.d.ts +4 -3
- package/dist/components/Chat/ToolCallCard/tool-call-card.variants.d.ts +0 -3
- package/dist/components/Chat/ToolCallCard/tool-call-card.variants.js +4 -4
- package/dist/components/CopyButton/CopyButton.svelte +9 -19
- package/dist/components/CopyButton/copy-button.variants.d.ts +4 -4
- package/dist/components/FileUpload/fileUpload.variants.js +15 -4
- package/dist/components/PinInput/PinInput.svelte +1 -0
- package/dist/components/PinInput/pin-input.variants.js +14 -1
- package/dist/components/TimeInput/time-input.variants.js +16 -1
- package/dist/i18n/index.d.ts +398 -2
- package/dist/internal/copy-state.svelte.d.ts +60 -0
- package/dist/internal/copy-state.svelte.js +76 -0
- package/dist/internal/field-chrome.d.ts +18 -1
- package/dist/internal/field-chrome.js +19 -2
- package/dist/primitives/Alert/alert.variants.d.ts +8 -8
- package/dist/primitives/Avatar/avatar.variants.js +4 -1
- package/dist/primitives/Badge/badge.variants.js +11 -2
- package/dist/primitives/Button/button.variants.js +4 -1
- package/dist/primitives/Card/card.variants.js +4 -1
- package/dist/primitives/Checkbox/checkbox.variants.js +7 -1
- package/dist/primitives/Combobox/Combobox.svelte +9 -1
- package/dist/primitives/Combobox/combobox.variants.d.ts +25 -0
- package/dist/primitives/Combobox/combobox.variants.js +43 -7
- package/dist/primitives/Combobox/index.d.ts +8 -2
- package/dist/primitives/Dialog/dialog.variants.js +4 -1
- package/dist/primitives/Drawer/drawer.variants.js +4 -1
- package/dist/primitives/Input/input.variants.js +17 -1
- package/dist/primitives/JourneyTimeline/journey-timeline.variants.d.ts +22 -22
- package/dist/primitives/Menu/menu.variants.js +5 -1
- package/dist/primitives/Progress/progress.variants.js +5 -2
- package/dist/primitives/RadioGroup/radioGroup.variants.js +74 -10
- package/dist/primitives/Select/select.variants.js +14 -5
- package/dist/primitives/Slider/Slider.svelte +4 -1
- package/dist/primitives/Slider/slider.variants.js +9 -2
- package/dist/primitives/Spinner/spinner.variants.d.ts +16 -16
- package/dist/primitives/Stepper/stepper.variants.d.ts +11 -11
- package/dist/primitives/Stepper/stepper.variants.js +2 -1
- package/dist/primitives/Tab/tab.variants.js +4 -1
- package/dist/primitives/Textarea/textarea.variants.js +16 -2
- package/dist/primitives/Toast/toast.variants.d.ts +12 -12
- package/dist/primitives/Toast/toast.variants.js +5 -1
- package/dist/primitives/Toggle/toggle.variants.js +94 -18
- package/dist/primitives/Tooltip/tooltip.variants.d.ts +3 -3
- package/dist/primitives/Tooltip/tooltip.variants.js +5 -1
- package/dist/style/foundation.css +19 -9
- package/dist/style/semantic.css +49 -2
- package/dist/style/themes/forest.css +2 -2
- package/dist/style/themes/neutral.css +2 -2
- package/dist/style/themes/ocean.css +2 -2
- package/dist/style/themes/rose.css +2 -2
- package/dist/style/themes/sunset.css +2 -2
- package/dist/utils/figma-token-export.js +7 -3
- package/dist/utils/persistent-state.svelte.d.ts +25 -1
- package/dist/utils/persistent-state.svelte.js +98 -10
- package/docs/MIGRATION-v5.md +29 -0
- package/package.json +3 -3
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type SlotNames, type VariantProps } from '../../../../utils/variants.js';
|
|
2
|
+
/**
|
|
3
|
+
* Extra slot styles the Urbicon A2UI dispatcher needs BEYOND the base
|
|
4
|
+
* `a2uiViewVariants` slots it inherits through the render context (column, row,
|
|
5
|
+
* list, icon, image, errorChip, pending, …). These are for the raw-HTML bits the
|
|
6
|
+
* Urbicon catalog renders itself — the `Section` archetype, plain body text, the
|
|
7
|
+
* field-error line — everything else renders through a real Urbicon component
|
|
8
|
+
* that carries its own tokens.
|
|
9
|
+
*
|
|
10
|
+
* Loaded LOCALLY by `UrbiconA2UINode.svelte` (never by the base `A2UIView` /
|
|
11
|
+
* `A2UINode`), so `urbicon/` value code stays out of the Basic bundle. Pure
|
|
12
|
+
* semantic tokens — no `dark:`, no hardcoded colours.
|
|
13
|
+
*/
|
|
14
|
+
export declare const a2uiUrbiconVariants: ((props?: {} | undefined) => {
|
|
15
|
+
section: (props?: ({} & {
|
|
16
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
17
|
+
}) | undefined) => string;
|
|
18
|
+
sectionHeader: (props?: ({} & {
|
|
19
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
20
|
+
}) | undefined) => string;
|
|
21
|
+
sectionTitle: (props?: ({} & {
|
|
22
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
23
|
+
}) | undefined) => string;
|
|
24
|
+
sectionDescription: (props?: ({} & {
|
|
25
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
26
|
+
}) | undefined) => string;
|
|
27
|
+
body: (props?: ({} & {
|
|
28
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
29
|
+
}) | undefined) => string;
|
|
30
|
+
fieldError: (props?: ({} & {
|
|
31
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
32
|
+
}) | undefined) => string;
|
|
33
|
+
field: (props?: ({} & {
|
|
34
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
35
|
+
}) | undefined) => string;
|
|
36
|
+
emptyStateCta: (props?: ({} & {
|
|
37
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
38
|
+
}) | undefined) => string;
|
|
39
|
+
}) & {
|
|
40
|
+
readonly config: import("../../../../utils/variants.js").TVConfig;
|
|
41
|
+
};
|
|
42
|
+
export type A2UIViewUrbiconVariants = VariantProps<typeof a2uiUrbiconVariants>;
|
|
43
|
+
export type A2UIViewUrbiconSlots = SlotNames<typeof a2uiUrbiconVariants>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { tv } from '../../../../utils/variants.js';
|
|
2
|
+
/**
|
|
3
|
+
* Extra slot styles the Urbicon A2UI dispatcher needs BEYOND the base
|
|
4
|
+
* `a2uiViewVariants` slots it inherits through the render context (column, row,
|
|
5
|
+
* list, icon, image, errorChip, pending, …). These are for the raw-HTML bits the
|
|
6
|
+
* Urbicon catalog renders itself — the `Section` archetype, plain body text, the
|
|
7
|
+
* field-error line — everything else renders through a real Urbicon component
|
|
8
|
+
* that carries its own tokens.
|
|
9
|
+
*
|
|
10
|
+
* Loaded LOCALLY by `UrbiconA2UINode.svelte` (never by the base `A2UIView` /
|
|
11
|
+
* `A2UINode`), so `urbicon/` value code stays out of the Basic bundle. Pure
|
|
12
|
+
* semantic tokens — no `dark:`, no hardcoded colours.
|
|
13
|
+
*/
|
|
14
|
+
export const a2uiUrbiconVariants = tv({
|
|
15
|
+
slots: {
|
|
16
|
+
/** Section wrapper (title/description block + body). */
|
|
17
|
+
section: 'flex min-w-0 flex-col gap-3',
|
|
18
|
+
/** Section header (title + optional description). */
|
|
19
|
+
sectionHeader: 'flex min-w-0 flex-col gap-1',
|
|
20
|
+
/** Section title heading. */
|
|
21
|
+
sectionTitle: 'min-w-0 text-lg font-semibold leading-tight text-text-primary',
|
|
22
|
+
/** Section description (secondary text under the title). */
|
|
23
|
+
sectionDescription: 'min-w-0 text-sm text-text-secondary',
|
|
24
|
+
/** Plain body text (Text variant=body — PLAIN, no Markdown). */
|
|
25
|
+
body: 'min-w-0 break-words text-sm text-text-primary',
|
|
26
|
+
/** A form field's error message line (shown under a field when `error` is non-empty). */
|
|
27
|
+
fieldError: 'mt-1 text-xs text-danger',
|
|
28
|
+
/** Wrapper around a form field + its error line. */
|
|
29
|
+
field: 'flex min-w-0 flex-col',
|
|
30
|
+
/** Wrapper for the EmptyState call-to-action. */
|
|
31
|
+
emptyStateCta: 'mt-2 flex justify-center'
|
|
32
|
+
}
|
|
33
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** One variant axis: its allowed values (sorted) and documented default. */
|
|
2
|
+
export interface UrbiconAxis {
|
|
3
|
+
readonly values: readonly string[];
|
|
4
|
+
readonly default?: string;
|
|
5
|
+
}
|
|
6
|
+
/** Urbicon component name → axis name → axis. The Urbicon A2UI registry references these. */
|
|
7
|
+
export declare const URBICON_AXES: Readonly<Record<string, Readonly<Record<string, UrbiconAxis>>>>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// DO NOT EDIT — generated by scripts/a2ui-axes-gen.ts (`bun run a2ui:axes`).
|
|
2
|
+
// Source: packages/design-content/content/component-catalog.json (docs-gen artifact).
|
|
3
|
+
//
|
|
4
|
+
// The variant-axis truth of the Urbicon components the A2UI catalog maps. The
|
|
5
|
+
// hand-curated registry couples to this (values ⊆ axis; default ===; every
|
|
6
|
+
// `urbicon` reference exists) so the catalog can never advertise a value the real
|
|
7
|
+
// component does not support. Regenerate after docs:gen with `bun run a2ui:axes`.
|
|
8
|
+
/** Urbicon component name → axis name → axis. The Urbicon A2UI registry references these. */
|
|
9
|
+
export const URBICON_AXES = {
|
|
10
|
+
Accordion: {
|
|
11
|
+
size: { values: ["lg", "md", "sm"], default: "md" },
|
|
12
|
+
variant: { values: ["card", "default", "ghost"], default: "default" },
|
|
13
|
+
},
|
|
14
|
+
Alert: {
|
|
15
|
+
intent: { values: ["danger", "info", "neutral", "primary", "success", "warning"], default: "primary" },
|
|
16
|
+
size: { values: ["lg", "md", "sm"], default: "md" },
|
|
17
|
+
variant: { values: ["filled", "inline", "soft"], default: "soft" },
|
|
18
|
+
},
|
|
19
|
+
Avatar: {
|
|
20
|
+
intent: { values: ["danger", "neutral", "primary", "secondary", "success", "warning"], default: "neutral" },
|
|
21
|
+
size: { values: ["2xl", "lg", "md", "sm", "xl", "xs"], default: "md" },
|
|
22
|
+
variant: { values: ["circle", "rounded", "square"], default: "circle" },
|
|
23
|
+
},
|
|
24
|
+
Badge: {
|
|
25
|
+
intent: { values: ["danger", "neutral", "primary", "secondary", "success", "warning"], default: "primary" },
|
|
26
|
+
size: { values: ["lg", "md", "sm", "xs"], default: "md" },
|
|
27
|
+
variant: { values: ["dot", "filled", "outlined", "soft"], default: "filled" },
|
|
28
|
+
},
|
|
29
|
+
Button: {
|
|
30
|
+
intent: { values: ["danger", "neutral", "primary", "secondary", "success", "warning"], default: "neutral" },
|
|
31
|
+
size: { values: ["2xs", "lg", "md", "sm", "xl", "xs"], default: "md" },
|
|
32
|
+
variant: { values: ["filled", "ghost", "outlined", "text"], default: "filled" },
|
|
33
|
+
},
|
|
34
|
+
Card: {
|
|
35
|
+
variant: { values: ["elevated", "floating", "outlined", "quiet"], default: "quiet" },
|
|
36
|
+
},
|
|
37
|
+
Checkbox: {
|
|
38
|
+
intent: { values: ["danger", "neutral", "primary", "secondary", "success", "warning"], default: "primary" },
|
|
39
|
+
size: { values: ["lg", "md", "sm", "xs"], default: "md" },
|
|
40
|
+
variant: { values: ["filled", "ghost", "outlined"], default: "outlined" },
|
|
41
|
+
},
|
|
42
|
+
Input: {
|
|
43
|
+
intent: { values: ["danger", "default", "success", "warning"], default: "default" },
|
|
44
|
+
size: { values: ["lg", "md", "sm", "xl", "xs"], default: "md" },
|
|
45
|
+
variant: { values: ["filled", "ghost", "outlined", "underline"], default: "outlined" },
|
|
46
|
+
},
|
|
47
|
+
Progress: {
|
|
48
|
+
intent: { values: ["danger", "neutral", "primary", "secondary", "success", "warning"], default: "primary" },
|
|
49
|
+
size: { values: ["lg", "md", "sm", "xs"], default: "md" },
|
|
50
|
+
},
|
|
51
|
+
RadioGroup: {
|
|
52
|
+
orientation: { values: ["horizontal", "vertical"], default: "vertical" },
|
|
53
|
+
},
|
|
54
|
+
Select: {
|
|
55
|
+
size: { values: ["lg", "md", "sm", "xl", "xs"], default: "md" },
|
|
56
|
+
variant: { values: ["filled", "ghost", "outlined", "underline"], default: "outlined" },
|
|
57
|
+
},
|
|
58
|
+
Separator: {
|
|
59
|
+
orientation: { values: ["horizontal", "vertical"], default: "horizontal" },
|
|
60
|
+
size: { values: ["lg", "md", "sm"], default: "md" },
|
|
61
|
+
},
|
|
62
|
+
Slider: {
|
|
63
|
+
intent: { values: ["danger", "neutral", "primary", "secondary", "success", "warning"], default: "primary" },
|
|
64
|
+
size: { values: ["lg", "md", "sm"], default: "md" },
|
|
65
|
+
variant: { values: ["default", "rail"], default: "default" },
|
|
66
|
+
},
|
|
67
|
+
Stepper: {
|
|
68
|
+
orientation: { values: ["horizontal", "vertical"], default: "horizontal" },
|
|
69
|
+
size: { values: ["lg", "md", "sm"], default: "md" },
|
|
70
|
+
variant: { values: ["default", "minimal", "outlined"], default: "default" },
|
|
71
|
+
},
|
|
72
|
+
Textarea: {
|
|
73
|
+
intent: { values: ["danger", "default", "success", "warning"], default: "default" },
|
|
74
|
+
size: { values: ["lg", "md", "sm", "xl", "xs"], default: "md" },
|
|
75
|
+
},
|
|
76
|
+
TimeInput: {
|
|
77
|
+
intent: { values: ["danger", "default", "success", "warning"], default: "default" },
|
|
78
|
+
size: { values: ["lg", "md", "sm"], default: "md" },
|
|
79
|
+
variant: { values: ["filled", "ghost", "outlined"], default: "outlined" },
|
|
80
|
+
},
|
|
81
|
+
Toggle: {
|
|
82
|
+
intent: { values: ["danger", "neutral", "primary", "secondary", "success", "warning"], default: "primary" },
|
|
83
|
+
size: { values: ["lg", "md", "sm", "xs"], default: "md" },
|
|
84
|
+
variant: { values: ["default", "dot"], default: "default" },
|
|
85
|
+
},
|
|
86
|
+
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { useBlocksI18n } from '../../../i18n';
|
|
2
3
|
import { getBlocksConfig, resolveSlotClasses } from '../../../provider';
|
|
4
|
+
import { createCopyState } from '../../../internal/copy-state.svelte';
|
|
5
|
+
import CoreIconButton from '../../../internal/core/CoreIconButton.svelte';
|
|
3
6
|
import { Alert, Avatar, Button, Skeleton, Tooltip } from '../../../primitives';
|
|
4
7
|
import { resolveIcon } from '../../../icons';
|
|
5
8
|
import SparklesIconDefault from '../../../icons/SparklesIcon.svelte';
|
|
@@ -34,8 +37,9 @@
|
|
|
34
37
|
layout = 'bubble',
|
|
35
38
|
density = 'comfortable',
|
|
36
39
|
roleLabels,
|
|
37
|
-
copyLabel
|
|
38
|
-
copiedLabel
|
|
40
|
+
copyLabel,
|
|
41
|
+
copiedLabel,
|
|
42
|
+
copyFailedLabel,
|
|
39
43
|
regenerateLabel = 'Regenerate',
|
|
40
44
|
retryLabel = 'Retry',
|
|
41
45
|
errorLabel = 'Something went wrong',
|
|
@@ -47,9 +51,15 @@
|
|
|
47
51
|
...restProps
|
|
48
52
|
}: ChatMessageProps = $props();
|
|
49
53
|
|
|
54
|
+
const bt = useBlocksI18n();
|
|
50
55
|
const blocksConfig = getBlocksConfig();
|
|
51
56
|
const unstyled = $derived(unstyledProp || blocksConfig?.unstyled || false);
|
|
52
57
|
|
|
58
|
+
// Localised by default instead of hardcoded English in the prop signature.
|
|
59
|
+
const copyText = $derived(copyLabel ?? bt('accessibility.copy'));
|
|
60
|
+
const copiedText = $derived(copiedLabel ?? bt('accessibility.copied'));
|
|
61
|
+
const copyFailedText = $derived(copyFailedLabel ?? bt('accessibility.copyFailed'));
|
|
62
|
+
|
|
53
63
|
const SparklesIcon = resolveIcon('sparkles', SparklesIconDefault);
|
|
54
64
|
const UserIcon = resolveIcon('user', UserIconDefault);
|
|
55
65
|
const InfoIcon = resolveIcon('info', InfoIconDefault);
|
|
@@ -93,7 +103,7 @@
|
|
|
93
103
|
});
|
|
94
104
|
|
|
95
105
|
// Concatenated text parts — what the copy action writes to the clipboard.
|
|
96
|
-
const
|
|
106
|
+
const messageText = $derived(
|
|
97
107
|
message.parts.flatMap((p) => (p.type === 'text' ? [p.text] : [])).join('\n\n')
|
|
98
108
|
);
|
|
99
109
|
|
|
@@ -114,27 +124,22 @@
|
|
|
114
124
|
);
|
|
115
125
|
|
|
116
126
|
// ── Copy interaction ─────────────────────────────────────────────────────
|
|
117
|
-
|
|
118
|
-
|
|
127
|
+
const copyState = createCopyState();
|
|
128
|
+
|
|
129
|
+
// Reports all three outcomes. A failed copy used to be console-only, so the
|
|
130
|
+
// action bar looked identical whether the clipboard write worked or not.
|
|
131
|
+
const copyButtonText = $derived(
|
|
132
|
+
copyState.phase === 'copied'
|
|
133
|
+
? copiedText
|
|
134
|
+
: copyState.phase === 'error'
|
|
135
|
+
? copyFailedText
|
|
136
|
+
: copyText
|
|
137
|
+
);
|
|
119
138
|
|
|
120
139
|
async function copyMessage() {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
copied = true;
|
|
124
|
-
if (resetTimer) clearTimeout(resetTimer);
|
|
125
|
-
resetTimer = setTimeout(() => {
|
|
126
|
-
copied = false;
|
|
127
|
-
resetTimer = undefined;
|
|
128
|
-
}, 2000);
|
|
129
|
-
} catch (err) {
|
|
130
|
-
// Never confirm a copy that failed (e.g. denied clipboard permission).
|
|
131
|
-
console.error('ChatMessage: failed to copy message', err);
|
|
132
|
-
}
|
|
140
|
+
const result = await copyState.copy(messageText);
|
|
141
|
+
if (!result.ok) console.error('ChatMessage: failed to copy message', result.error);
|
|
133
142
|
}
|
|
134
|
-
|
|
135
|
-
$effect(() => () => {
|
|
136
|
-
if (resetTimer) clearTimeout(resetTimer);
|
|
137
|
-
});
|
|
138
143
|
</script>
|
|
139
144
|
|
|
140
145
|
{#snippet defaultAvatar(role: ChatRole)}
|
|
@@ -249,65 +254,43 @@
|
|
|
249
254
|
<div class={cls('actions')}>
|
|
250
255
|
<!-- No copy for text-less messages (tool-call/reasoning-only): copying an
|
|
251
256
|
empty string and confirming "Copied" would be a lie (review finding). -->
|
|
252
|
-
{#if
|
|
253
|
-
<Tooltip label={
|
|
254
|
-
<
|
|
255
|
-
type="button"
|
|
257
|
+
{#if messageText}
|
|
258
|
+
<Tooltip label={copyButtonText}>
|
|
259
|
+
<CoreIconButton
|
|
256
260
|
class={cls('actionButton')}
|
|
257
261
|
onclick={copyMessage}
|
|
258
|
-
aria-label={
|
|
262
|
+
aria-label={copyButtonText}
|
|
259
263
|
>
|
|
260
|
-
{#if copied}
|
|
264
|
+
{#if copyState.phase === 'copied'}
|
|
261
265
|
<CheckIcon size={16} />
|
|
262
266
|
{:else}
|
|
263
267
|
<CopyIcon size={16} />
|
|
264
268
|
{/if}
|
|
265
|
-
</
|
|
269
|
+
</CoreIconButton>
|
|
266
270
|
</Tooltip>
|
|
267
271
|
{/if}
|
|
268
272
|
{#if onRegenerate}
|
|
269
273
|
<Tooltip label={regenerateLabel}>
|
|
270
|
-
<
|
|
271
|
-
type="button"
|
|
274
|
+
<CoreIconButton
|
|
272
275
|
class={cls('actionButton')}
|
|
273
276
|
onclick={onRegenerate}
|
|
274
277
|
aria-label={regenerateLabel}
|
|
275
278
|
>
|
|
276
279
|
<RefreshIcon size={16} />
|
|
277
|
-
</
|
|
280
|
+
</CoreIconButton>
|
|
278
281
|
</Tooltip>
|
|
279
282
|
{/if}
|
|
280
283
|
</div>
|
|
281
284
|
{/snippet}
|
|
282
285
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
<span class={cls('roleName')}>{roleLabel}</span>
|
|
292
|
-
</div>
|
|
293
|
-
<div class={cls('bubble')}>
|
|
294
|
-
{@render body()}
|
|
295
|
-
</div>
|
|
296
|
-
{:else}
|
|
297
|
-
<div class={cls('container')}>
|
|
298
|
-
{#if message.role !== 'user'}
|
|
299
|
-
{#if avatar}
|
|
300
|
-
{@render avatar({ role: message.role })}
|
|
301
|
-
{:else}
|
|
302
|
-
{@render defaultAvatar(message.role)}
|
|
303
|
-
{/if}
|
|
304
|
-
{/if}
|
|
305
|
-
<div class={cls('bubble')}>
|
|
306
|
-
{@render body()}
|
|
307
|
-
</div>
|
|
308
|
-
</div>
|
|
309
|
-
{/if}
|
|
310
|
-
|
|
286
|
+
<!--
|
|
287
|
+
`column` wraps the bubble together with everything that hangs under it —
|
|
288
|
+
citations, the status alert, the footer. They must be siblings of the bubble
|
|
289
|
+
INSIDE the column, not of `container`: the column is what carries the
|
|
290
|
+
role-dependent side (`items-end` for a user message), so the timestamp ends up
|
|
291
|
+
under the bubble's own edge instead of at the left margin.
|
|
292
|
+
-->
|
|
293
|
+
{#snippet belowBubble()}
|
|
311
294
|
{#if sources.length}
|
|
312
295
|
<div class={cls('sourcesFooter')}>
|
|
313
296
|
{#each sources as source, i (source.id)}
|
|
@@ -326,20 +309,63 @@
|
|
|
326
309
|
</div>
|
|
327
310
|
{/if}
|
|
328
311
|
|
|
312
|
+
<!--
|
|
313
|
+
Metadata first in the DOM, actions second — and the footer reverses for a
|
|
314
|
+
user message (see the variants). That ordering is what puts the timestamp
|
|
315
|
+
against the bubble's own edge on BOTH sides: the action bar is `opacity-0`
|
|
316
|
+
until hover, so whichever element comes first at the edge is the only one
|
|
317
|
+
visible there. Actions-first left the timestamp floating one button-width in
|
|
318
|
+
from the edge, attached to nothing.
|
|
319
|
+
-->
|
|
329
320
|
<div class={cls('footer')}>
|
|
330
|
-
{#if actions}
|
|
331
|
-
{@render actions({ message })}
|
|
332
|
-
{:else}
|
|
333
|
-
{@render defaultActions()}
|
|
334
|
-
{/if}
|
|
335
321
|
{#if metadata}
|
|
336
322
|
{@render metadata({ message })}
|
|
337
323
|
{:else if createdAtTime}
|
|
338
324
|
<time class={cls('metadata')} datetime={createdAtIso}>{createdAtTime}</time>
|
|
339
325
|
{/if}
|
|
326
|
+
{#if actions}
|
|
327
|
+
{@render actions({ message })}
|
|
328
|
+
{:else}
|
|
329
|
+
{@render defaultActions()}
|
|
330
|
+
{/if}
|
|
340
331
|
</div>
|
|
332
|
+
{/snippet}
|
|
333
|
+
|
|
334
|
+
<div class={cls('root', className)} data-role={message.role} data-status={status} {...restProps}>
|
|
335
|
+
{#if layout === 'plain'}
|
|
336
|
+
<div class={cls('header')}>
|
|
337
|
+
{#if avatar}
|
|
338
|
+
{@render avatar({ role: message.role })}
|
|
339
|
+
{:else}
|
|
340
|
+
{@render defaultAvatar(message.role)}
|
|
341
|
+
{/if}
|
|
342
|
+
<span class={cls('roleName')}>{roleLabel}</span>
|
|
343
|
+
</div>
|
|
344
|
+
<div class={cls('column')}>
|
|
345
|
+
<div class={cls('bubble')}>
|
|
346
|
+
{@render body()}
|
|
347
|
+
</div>
|
|
348
|
+
{@render belowBubble()}
|
|
349
|
+
</div>
|
|
350
|
+
{:else}
|
|
351
|
+
<div class={cls('container')}>
|
|
352
|
+
{#if message.role !== 'user'}
|
|
353
|
+
{#if avatar}
|
|
354
|
+
{@render avatar({ role: message.role })}
|
|
355
|
+
{:else}
|
|
356
|
+
{@render defaultAvatar(message.role)}
|
|
357
|
+
{/if}
|
|
358
|
+
{/if}
|
|
359
|
+
<div class={cls('column')}>
|
|
360
|
+
<div class={cls('bubble')}>
|
|
361
|
+
{@render body()}
|
|
362
|
+
</div>
|
|
363
|
+
{@render belowBubble()}
|
|
364
|
+
</div>
|
|
365
|
+
</div>
|
|
366
|
+
{/if}
|
|
341
367
|
|
|
342
|
-
<!-- Copy
|
|
343
|
-
|
|
344
|
-
<span class="sr-only" role="status">{
|
|
368
|
+
<!-- Copy outcome for screen readers — a live status region, present before the
|
|
369
|
+
phase flips so it always announces the change. -->
|
|
370
|
+
<span class="sr-only" role="status">{copyState.phase === 'idle' ? '' : copyButtonText}</span>
|
|
345
371
|
</div>
|
|
@@ -2,131 +2,138 @@ import { type SlotNames, type VariantProps } from '../../../utils/variants.js';
|
|
|
2
2
|
export declare const chatMessageVariants: ((props?: {
|
|
3
3
|
layout?: "bubble" | "plain" | undefined;
|
|
4
4
|
role?: "user" | "system" | "assistant" | undefined;
|
|
5
|
-
density?: "
|
|
5
|
+
density?: "compact" | "comfortable" | undefined;
|
|
6
6
|
} | undefined) => {
|
|
7
7
|
root: (props?: ({
|
|
8
8
|
layout?: "bubble" | "plain" | undefined;
|
|
9
9
|
role?: "user" | "system" | "assistant" | undefined;
|
|
10
|
-
density?: "
|
|
10
|
+
density?: "compact" | "comfortable" | undefined;
|
|
11
11
|
} & {
|
|
12
12
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
13
13
|
}) | undefined) => string;
|
|
14
14
|
container: (props?: ({
|
|
15
15
|
layout?: "bubble" | "plain" | undefined;
|
|
16
16
|
role?: "user" | "system" | "assistant" | undefined;
|
|
17
|
-
density?: "
|
|
17
|
+
density?: "compact" | "comfortable" | undefined;
|
|
18
18
|
} & {
|
|
19
19
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
20
20
|
}) | undefined) => string;
|
|
21
21
|
header: (props?: ({
|
|
22
22
|
layout?: "bubble" | "plain" | undefined;
|
|
23
23
|
role?: "user" | "system" | "assistant" | undefined;
|
|
24
|
-
density?: "
|
|
24
|
+
density?: "compact" | "comfortable" | undefined;
|
|
25
25
|
} & {
|
|
26
26
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
27
27
|
}) | undefined) => string;
|
|
28
28
|
roleName: (props?: ({
|
|
29
29
|
layout?: "bubble" | "plain" | undefined;
|
|
30
30
|
role?: "user" | "system" | "assistant" | undefined;
|
|
31
|
-
density?: "
|
|
31
|
+
density?: "compact" | "comfortable" | undefined;
|
|
32
32
|
} & {
|
|
33
33
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
34
34
|
}) | undefined) => string;
|
|
35
35
|
avatar: (props?: ({
|
|
36
36
|
layout?: "bubble" | "plain" | undefined;
|
|
37
37
|
role?: "user" | "system" | "assistant" | undefined;
|
|
38
|
-
density?: "
|
|
38
|
+
density?: "compact" | "comfortable" | undefined;
|
|
39
|
+
} & {
|
|
40
|
+
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
41
|
+
}) | undefined) => string;
|
|
42
|
+
column: (props?: ({
|
|
43
|
+
layout?: "bubble" | "plain" | undefined;
|
|
44
|
+
role?: "user" | "system" | "assistant" | undefined;
|
|
45
|
+
density?: "compact" | "comfortable" | undefined;
|
|
39
46
|
} & {
|
|
40
47
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
41
48
|
}) | undefined) => string;
|
|
42
49
|
bubble: (props?: ({
|
|
43
50
|
layout?: "bubble" | "plain" | undefined;
|
|
44
51
|
role?: "user" | "system" | "assistant" | undefined;
|
|
45
|
-
density?: "
|
|
52
|
+
density?: "compact" | "comfortable" | undefined;
|
|
46
53
|
} & {
|
|
47
54
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
48
55
|
}) | undefined) => string;
|
|
49
56
|
partsFlow: (props?: ({
|
|
50
57
|
layout?: "bubble" | "plain" | undefined;
|
|
51
58
|
role?: "user" | "system" | "assistant" | undefined;
|
|
52
|
-
density?: "
|
|
59
|
+
density?: "compact" | "comfortable" | undefined;
|
|
53
60
|
} & {
|
|
54
61
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
55
62
|
}) | undefined) => string;
|
|
56
63
|
attachment: (props?: ({
|
|
57
64
|
layout?: "bubble" | "plain" | undefined;
|
|
58
65
|
role?: "user" | "system" | "assistant" | undefined;
|
|
59
|
-
density?: "
|
|
66
|
+
density?: "compact" | "comfortable" | undefined;
|
|
60
67
|
} & {
|
|
61
68
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
62
69
|
}) | undefined) => string;
|
|
63
70
|
attachmentIcon: (props?: ({
|
|
64
71
|
layout?: "bubble" | "plain" | undefined;
|
|
65
72
|
role?: "user" | "system" | "assistant" | undefined;
|
|
66
|
-
density?: "
|
|
73
|
+
density?: "compact" | "comfortable" | undefined;
|
|
67
74
|
} & {
|
|
68
75
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
69
76
|
}) | undefined) => string;
|
|
70
77
|
attachmentName: (props?: ({
|
|
71
78
|
layout?: "bubble" | "plain" | undefined;
|
|
72
79
|
role?: "user" | "system" | "assistant" | undefined;
|
|
73
|
-
density?: "
|
|
80
|
+
density?: "compact" | "comfortable" | undefined;
|
|
74
81
|
} & {
|
|
75
82
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
76
83
|
}) | undefined) => string;
|
|
77
84
|
attachmentSize: (props?: ({
|
|
78
85
|
layout?: "bubble" | "plain" | undefined;
|
|
79
86
|
role?: "user" | "system" | "assistant" | undefined;
|
|
80
|
-
density?: "
|
|
87
|
+
density?: "compact" | "comfortable" | undefined;
|
|
81
88
|
} & {
|
|
82
89
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
83
90
|
}) | undefined) => string;
|
|
84
91
|
sourcesFooter: (props?: ({
|
|
85
92
|
layout?: "bubble" | "plain" | undefined;
|
|
86
93
|
role?: "user" | "system" | "assistant" | undefined;
|
|
87
|
-
density?: "
|
|
94
|
+
density?: "compact" | "comfortable" | undefined;
|
|
88
95
|
} & {
|
|
89
96
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
90
97
|
}) | undefined) => string;
|
|
91
98
|
placeholder: (props?: ({
|
|
92
99
|
layout?: "bubble" | "plain" | undefined;
|
|
93
100
|
role?: "user" | "system" | "assistant" | undefined;
|
|
94
|
-
density?: "
|
|
101
|
+
density?: "compact" | "comfortable" | undefined;
|
|
95
102
|
} & {
|
|
96
103
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
97
104
|
}) | undefined) => string;
|
|
98
105
|
statusAlert: (props?: ({
|
|
99
106
|
layout?: "bubble" | "plain" | undefined;
|
|
100
107
|
role?: "user" | "system" | "assistant" | undefined;
|
|
101
|
-
density?: "
|
|
108
|
+
density?: "compact" | "comfortable" | undefined;
|
|
102
109
|
} & {
|
|
103
110
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
104
111
|
}) | undefined) => string;
|
|
105
112
|
footer: (props?: ({
|
|
106
113
|
layout?: "bubble" | "plain" | undefined;
|
|
107
114
|
role?: "user" | "system" | "assistant" | undefined;
|
|
108
|
-
density?: "
|
|
115
|
+
density?: "compact" | "comfortable" | undefined;
|
|
109
116
|
} & {
|
|
110
117
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
111
118
|
}) | undefined) => string;
|
|
112
119
|
actions: (props?: ({
|
|
113
120
|
layout?: "bubble" | "plain" | undefined;
|
|
114
121
|
role?: "user" | "system" | "assistant" | undefined;
|
|
115
|
-
density?: "
|
|
122
|
+
density?: "compact" | "comfortable" | undefined;
|
|
116
123
|
} & {
|
|
117
124
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
118
125
|
}) | undefined) => string;
|
|
119
126
|
actionButton: (props?: ({
|
|
120
127
|
layout?: "bubble" | "plain" | undefined;
|
|
121
128
|
role?: "user" | "system" | "assistant" | undefined;
|
|
122
|
-
density?: "
|
|
129
|
+
density?: "compact" | "comfortable" | undefined;
|
|
123
130
|
} & {
|
|
124
131
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
125
132
|
}) | undefined) => string;
|
|
126
133
|
metadata: (props?: ({
|
|
127
134
|
layout?: "bubble" | "plain" | undefined;
|
|
128
135
|
role?: "user" | "system" | "assistant" | undefined;
|
|
129
|
-
density?: "
|
|
136
|
+
density?: "compact" | "comfortable" | undefined;
|
|
130
137
|
} & {
|
|
131
138
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
132
139
|
}) | undefined) => string;
|