@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.
Files changed (107) hide show
  1. package/README.md +1 -1
  2. package/dist/components/Calendar/calendar.variants.d.ts +63 -63
  3. package/dist/components/Chat/A2UIView/A2UINode.svelte +20 -39
  4. package/dist/components/Chat/A2UIView/A2UIView.svelte +47 -50
  5. package/dist/components/Chat/A2UIView/a2ui-basic-catalog.d.ts +17 -0
  6. package/dist/components/Chat/A2UIView/a2ui-basic-catalog.js +69 -0
  7. package/dist/components/Chat/A2UIView/a2ui-catalog.d.ts +95 -0
  8. package/dist/components/Chat/A2UIView/a2ui-catalog.js +87 -0
  9. package/dist/components/Chat/A2UIView/a2ui-node-common.d.ts +40 -0
  10. package/dist/components/Chat/A2UIView/a2ui-node-common.js +72 -0
  11. package/dist/components/Chat/A2UIView/a2ui-prompt.d.ts +21 -10
  12. package/dist/components/Chat/A2UIView/a2ui-prompt.js +170 -24
  13. package/dist/components/Chat/A2UIView/a2ui-registry.d.ts +1 -1
  14. package/dist/components/Chat/A2UIView/a2ui-registry.js +2 -1
  15. package/dist/components/Chat/A2UIView/a2ui-render.d.ts +30 -0
  16. package/dist/components/Chat/A2UIView/a2ui-render.js +61 -23
  17. package/dist/components/Chat/A2UIView/a2ui-router.d.ts +136 -0
  18. package/dist/components/Chat/A2UIView/a2ui-router.js +264 -0
  19. package/dist/components/Chat/A2UIView/a2ui-schema.d.ts +45 -0
  20. package/dist/components/Chat/A2UIView/a2ui-schema.js +133 -0
  21. package/dist/components/Chat/A2UIView/a2ui-stream.d.ts +120 -0
  22. package/dist/components/Chat/A2UIView/a2ui-stream.js +406 -0
  23. package/dist/components/Chat/A2UIView/a2ui-transcript.d.ts +65 -0
  24. package/dist/components/Chat/A2UIView/a2ui-transcript.js +101 -0
  25. package/dist/components/Chat/A2UIView/a2ui-validate.d.ts +33 -1
  26. package/dist/components/Chat/A2UIView/a2ui-validate.js +167 -63
  27. package/dist/components/Chat/A2UIView/a2ui.types.d.ts +50 -0
  28. package/dist/components/Chat/A2UIView/a2ui.types.js +38 -1
  29. package/dist/components/Chat/A2UIView/index.d.ts +35 -2
  30. package/dist/components/Chat/A2UIView/index.js +13 -0
  31. package/dist/components/Chat/A2UIView/urbicon/UrbiconA2UINode.svelte +831 -0
  32. package/dist/components/Chat/A2UIView/urbicon/UrbiconA2UINode.svelte.d.ts +4 -0
  33. package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon-catalog.d.ts +14 -0
  34. package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon-catalog.js +87 -0
  35. package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon-registry.d.ts +78 -0
  36. package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon-registry.js +783 -0
  37. package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon.variants.d.ts +43 -0
  38. package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon.variants.js +33 -0
  39. package/dist/components/Chat/A2UIView/urbicon/urbicon-axes.gen.d.ts +7 -0
  40. package/dist/components/Chat/A2UIView/urbicon/urbicon-axes.gen.js +86 -0
  41. package/dist/components/Chat/ChatMessage/ChatMessage.svelte +93 -67
  42. package/dist/components/Chat/ChatMessage/chat-message.variants.d.ts +26 -19
  43. package/dist/components/Chat/ChatMessage/chat-message.variants.js +45 -12
  44. package/dist/components/Chat/ChatMessage/index.d.ts +20 -5
  45. package/dist/components/Chat/CodeBlock/CodeBlock.svelte +59 -33
  46. package/dist/components/Chat/CodeBlock/code-block.variants.d.ts +7 -0
  47. package/dist/components/Chat/CodeBlock/code-block.variants.js +28 -13
  48. package/dist/components/Chat/CodeBlock/index.d.ts +39 -4
  49. package/dist/components/Chat/PromptInput/PromptInput.svelte +9 -16
  50. package/dist/components/Chat/PromptInput/prompt-input.variants.js +16 -15
  51. package/dist/components/Chat/ToolCallCard/ToolCallCard.svelte +9 -4
  52. package/dist/components/Chat/ToolCallCard/index.d.ts +4 -3
  53. package/dist/components/Chat/ToolCallCard/tool-call-card.variants.d.ts +0 -3
  54. package/dist/components/Chat/ToolCallCard/tool-call-card.variants.js +4 -4
  55. package/dist/components/CopyButton/CopyButton.svelte +9 -19
  56. package/dist/components/CopyButton/copy-button.variants.d.ts +4 -4
  57. package/dist/components/FileUpload/fileUpload.variants.js +15 -4
  58. package/dist/components/PinInput/PinInput.svelte +1 -0
  59. package/dist/components/PinInput/pin-input.variants.js +14 -1
  60. package/dist/components/TimeInput/time-input.variants.js +16 -1
  61. package/dist/i18n/index.d.ts +398 -2
  62. package/dist/internal/copy-state.svelte.d.ts +60 -0
  63. package/dist/internal/copy-state.svelte.js +76 -0
  64. package/dist/internal/field-chrome.d.ts +18 -1
  65. package/dist/internal/field-chrome.js +19 -2
  66. package/dist/primitives/Alert/alert.variants.d.ts +8 -8
  67. package/dist/primitives/Avatar/avatar.variants.js +4 -1
  68. package/dist/primitives/Badge/badge.variants.js +11 -2
  69. package/dist/primitives/Button/button.variants.js +4 -1
  70. package/dist/primitives/Card/card.variants.js +4 -1
  71. package/dist/primitives/Checkbox/checkbox.variants.js +7 -1
  72. package/dist/primitives/Combobox/Combobox.svelte +9 -1
  73. package/dist/primitives/Combobox/combobox.variants.d.ts +25 -0
  74. package/dist/primitives/Combobox/combobox.variants.js +43 -7
  75. package/dist/primitives/Combobox/index.d.ts +8 -2
  76. package/dist/primitives/Dialog/dialog.variants.js +4 -1
  77. package/dist/primitives/Drawer/drawer.variants.js +4 -1
  78. package/dist/primitives/Input/input.variants.js +17 -1
  79. package/dist/primitives/JourneyTimeline/journey-timeline.variants.d.ts +22 -22
  80. package/dist/primitives/Menu/menu.variants.js +5 -1
  81. package/dist/primitives/Progress/progress.variants.js +5 -2
  82. package/dist/primitives/RadioGroup/radioGroup.variants.js +74 -10
  83. package/dist/primitives/Select/select.variants.js +14 -5
  84. package/dist/primitives/Slider/Slider.svelte +4 -1
  85. package/dist/primitives/Slider/slider.variants.js +9 -2
  86. package/dist/primitives/Spinner/spinner.variants.d.ts +16 -16
  87. package/dist/primitives/Stepper/stepper.variants.d.ts +11 -11
  88. package/dist/primitives/Stepper/stepper.variants.js +2 -1
  89. package/dist/primitives/Tab/tab.variants.js +4 -1
  90. package/dist/primitives/Textarea/textarea.variants.js +16 -2
  91. package/dist/primitives/Toast/toast.variants.d.ts +12 -12
  92. package/dist/primitives/Toast/toast.variants.js +5 -1
  93. package/dist/primitives/Toggle/toggle.variants.js +94 -18
  94. package/dist/primitives/Tooltip/tooltip.variants.d.ts +3 -3
  95. package/dist/primitives/Tooltip/tooltip.variants.js +5 -1
  96. package/dist/style/foundation.css +19 -9
  97. package/dist/style/semantic.css +49 -2
  98. package/dist/style/themes/forest.css +2 -2
  99. package/dist/style/themes/neutral.css +2 -2
  100. package/dist/style/themes/ocean.css +2 -2
  101. package/dist/style/themes/rose.css +2 -2
  102. package/dist/style/themes/sunset.css +2 -2
  103. package/dist/utils/figma-token-export.js +7 -3
  104. package/dist/utils/persistent-state.svelte.d.ts +25 -1
  105. package/dist/utils/persistent-state.svelte.js +98 -10
  106. package/docs/MIGRATION-v5.md +29 -0
  107. package/package.json +3 -3
@@ -0,0 +1,4 @@
1
+ import type { A2uiNodeProps } from '../a2ui-render.js';
2
+ declare const UrbiconA2UINode: import("svelte").Component<A2uiNodeProps, {}, "">;
3
+ type UrbiconA2UINode = ReturnType<typeof UrbiconA2UINode>;
4
+ export default UrbiconA2UINode;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The Urbicon-native A2UI catalog, fully wired: the pure `urbiconA2uiCatalogSpec`
3
+ * (from the registry module) plus its Svelte half — the `UrbiconA2UINode`
4
+ * dispatcher and the `createIcons` factory (Basic's 16 icons + 10 curated domain
5
+ * glyphs). Imports `.svelte`, so — unlike the registry/spec — this module is NOT
6
+ * server-importable; keep the Svelte-free spec in `a2ui-urbicon-registry.ts`.
7
+ *
8
+ * This module lives under `urbicon/` and is only reached when a consumer opts
9
+ * into the Urbicon catalog (`catalogs={[urbiconA2uiCatalog]}`), so its value code
10
+ * — dispatcher + every mapped Urbicon primitive — never enters the Basic bundle.
11
+ */
12
+ import type { A2uiCatalog } from '../a2ui-catalog.js';
13
+ /** The renderable Urbicon catalog: spec + `UrbiconA2UINode` dispatcher + icon factory. */
14
+ export declare const urbiconA2uiCatalog: A2uiCatalog;
@@ -0,0 +1,87 @@
1
+ /**
2
+ * The Urbicon-native A2UI catalog, fully wired: the pure `urbiconA2uiCatalogSpec`
3
+ * (from the registry module) plus its Svelte half — the `UrbiconA2UINode`
4
+ * dispatcher and the `createIcons` factory (Basic's 16 icons + 10 curated domain
5
+ * glyphs). Imports `.svelte`, so — unlike the registry/spec — this module is NOT
6
+ * server-importable; keep the Svelte-free spec in `a2ui-urbicon-registry.ts`.
7
+ *
8
+ * This module lives under `urbicon/` and is only reached when a consumer opts
9
+ * into the Urbicon catalog (`catalogs={[urbiconA2uiCatalog]}`), so its value code
10
+ * — dispatcher + every mapped Urbicon primitive — never enters the Basic bundle.
11
+ */
12
+ import { resolveIcon } from '../../../../icons/index.js';
13
+ import ArrowLeftIconDefault from '../../../../icons/ArrowLeftIcon.svelte';
14
+ import CalendarIconDefault from '../../../../icons/CalendarIcon.svelte';
15
+ import CheckIconDefault from '../../../../icons/CheckIcon.svelte';
16
+ import ChevronRightIconDefault from '../../../../icons/ChevronRightIcon.svelte';
17
+ import CircleHelpIconDefault from '../../../../icons/CircleHelpIcon.svelte';
18
+ import ClockIconDefault from '../../../../icons/ClockIcon.svelte';
19
+ import CloseIconDefault from '../../../../icons/CloseIcon.svelte';
20
+ import DangerCircleIconDefault from '../../../../icons/DangerCircleIcon.svelte';
21
+ import EditIconDefault from '../../../../icons/EditIcon.svelte';
22
+ import EuroIconDefault from '../../../../icons/EuroIcon.svelte';
23
+ import HomeIconDefault from '../../../../icons/HomeIcon.svelte';
24
+ import InfoCircleIconDefault from '../../../../icons/InfoCircleIcon.svelte';
25
+ import LinkIconDefault from '../../../../icons/LinkIcon.svelte';
26
+ import ListFilterIconDefault from '../../../../icons/ListFilterIcon.svelte';
27
+ import MailIconDefault from '../../../../icons/MailIcon.svelte';
28
+ import MapPinIconDefault from '../../../../icons/MapPinIcon.svelte';
29
+ import MenuIconDefault from '../../../../icons/MenuIcon.svelte';
30
+ import PhoneIconDefault from '../../../../icons/PhoneIcon.svelte';
31
+ import PlusIconDefault from '../../../../icons/PlusIcon.svelte';
32
+ import RefreshIconDefault from '../../../../icons/RefreshIcon.svelte';
33
+ import SearchIconDefault from '../../../../icons/SearchIcon.svelte';
34
+ import SendIconDefault from '../../../../icons/SendIcon.svelte';
35
+ import SettingsIconDefault from '../../../../icons/SettingsIcon.svelte';
36
+ import StarIconDefault from '../../../../icons/StarIcon.svelte';
37
+ import TrashIconDefault from '../../../../icons/TrashIcon.svelte';
38
+ import UserIconDefault from '../../../../icons/UserIcon.svelte';
39
+ import WarningTriangleIconDefault from '../../../../icons/WarningTriangleIcon.svelte';
40
+ import { urbiconA2uiCatalogSpec } from './a2ui-urbicon-registry.js';
41
+ import UrbiconA2UINode from './UrbiconA2UINode.svelte';
42
+ /**
43
+ * Build the Urbicon catalog's A2UI icon-enum name → resolved Urbicon icon map.
44
+ * Direct imports (tree-shakeable — never `getIcon()`); IconProvider overrides
45
+ * still win. Must run during component init (`resolveIcon` reads context).
46
+ */
47
+ function createUrbiconIcons() {
48
+ return {
49
+ icons: {
50
+ // Basic 16
51
+ add: resolveIcon('plus', PlusIconDefault),
52
+ arrowBack: resolveIcon('arrowLeft', ArrowLeftIconDefault),
53
+ check: resolveIcon('check', CheckIconDefault),
54
+ close: resolveIcon('close', CloseIconDefault),
55
+ delete: resolveIcon('trash', TrashIconDefault),
56
+ edit: resolveIcon('edit', EditIconDefault),
57
+ error: resolveIcon('danger', DangerCircleIconDefault),
58
+ home: resolveIcon('home', HomeIconDefault),
59
+ info: resolveIcon('info', InfoCircleIconDefault),
60
+ mail: resolveIcon('mail', MailIconDefault),
61
+ menu: resolveIcon('menu', MenuIconDefault),
62
+ search: resolveIcon('search', SearchIconDefault),
63
+ send: resolveIcon('send', SendIconDefault),
64
+ settings: resolveIcon('settings', SettingsIconDefault),
65
+ star: resolveIcon('star', StarIconDefault),
66
+ warning: resolveIcon('warning', WarningTriangleIconDefault),
67
+ // Curated 10
68
+ calendar: resolveIcon('calendar', CalendarIconDefault),
69
+ clock: resolveIcon('clock', ClockIconDefault),
70
+ user: resolveIcon('user', UserIconDefault),
71
+ phone: resolveIcon('phone', PhoneIconDefault),
72
+ mapPin: resolveIcon('mapPin', MapPinIconDefault),
73
+ euro: resolveIcon('euro', EuroIconDefault),
74
+ filter: resolveIcon('listFilter', ListFilterIconDefault),
75
+ refresh: resolveIcon('refresh', RefreshIconDefault),
76
+ chevronRight: resolveIcon('chevronRight', ChevronRightIconDefault),
77
+ link: resolveIcon('link', LinkIconDefault)
78
+ },
79
+ fallbackIcon: resolveIcon('circleHelp', CircleHelpIconDefault)
80
+ };
81
+ }
82
+ /** The renderable Urbicon catalog: spec + `UrbiconA2UINode` dispatcher + icon factory. */
83
+ export const urbiconA2uiCatalog = {
84
+ ...urbiconA2uiCatalogSpec,
85
+ Node: UrbiconA2UINode,
86
+ createIcons: createUrbiconIcons
87
+ };
@@ -0,0 +1,78 @@
1
+ /**
2
+ * The Urbicon-native A2UI catalog registry — the single source of truth for
3
+ * validation AND the Urbicon system prompt, exactly like the Basic registry but
4
+ * carrying the FULL Urbicon vocabulary the Basic subset flattens away: real
5
+ * intents (primary/secondary/success/warning/danger/neutral), a size axis, the
6
+ * component-native `variant` axes, a structure layer (`Section`), a
7
+ * plain-vs-markdown split (`Text` vs `RichText`) and labelled disclosure
8
+ * (`Accordion`).
9
+ *
10
+ * HAND-curated (descriptions, childId conventions, prop whitelist) but the axis
11
+ * VALUES it advertises are library truth: every prop that carries an `axis` is
12
+ * coupled to `urbicon-axes.gen.ts` (generated from the docs-gen catalog) by a
13
+ * blocks-internal drift test — curated `values ⊆ axis`, `default ===`, and every
14
+ * `urbicon` reference exists. So the catalog can never offer a variant the real
15
+ * component does not support. No Svelte imports: a server building the prompt has
16
+ * no DOM.
17
+ *
18
+ * Curation rules (never in the catalog): snippets, callbacks (`on*`),
19
+ * `class`/`unstyled`/`slotClasses`/`preset`/`mint`/`tier`, style booleans.
20
+ * Snippet slots become `childId`s; composites become data props (Stepper steps
21
+ * as a string list, Accordion items as `labeledChildren`); two-way state is a
22
+ * `dynamic` prop the renderer writes back. Field errors travel on a single
23
+ * `error?: string` (the renderer sets intent=danger) — NO per-field intent axis.
24
+ */
25
+ import type { A2uiCatalogSpec } from '../a2ui-catalog.js';
26
+ import type { A2uiComponentSpec, A2uiPropSpec } from '../a2ui-registry.js';
27
+ /**
28
+ * Axes shared across many components, defined ONCE so the prompt can document
29
+ * them a single time and each prop reference them (compression) instead of
30
+ * repeating the full list. Per-prop `default`s still vary (a Button defaults to
31
+ * neutral, a Badge to primary), so only the value SET is shared.
32
+ */
33
+ export declare const SHARED_AXES: {
34
+ /** The six semantic intents. Alert additionally offers `info` (its own axis). */
35
+ intent: readonly ["primary", "secondary", "success", "warning", "danger", "neutral"];
36
+ /** The curated size subset (the library also has 2xs/xs/xl/2xl — deliberately omitted). */
37
+ size: readonly ["sm", "md", "lg"];
38
+ };
39
+ /** A prop spec extended with Urbicon-specific drift/prompt anchors. */
40
+ export interface UrbiconPropSpec extends A2uiPropSpec {
41
+ /**
42
+ * The Urbicon variant-axis this prop maps to — the drift anchor into
43
+ * `URBICON_AXES[component.urbicon][axis]`. Present only on style-axis props.
44
+ */
45
+ axis?: string;
46
+ /**
47
+ * When set, the prop's values come from `SHARED_AXES` — a prompt hint so the
48
+ * axis is documented once and referenced, not spelled out per component.
49
+ */
50
+ sharedAxis?: 'intent' | 'size';
51
+ }
52
+ /** A component spec extended with the source component + a prompt-grouping category. */
53
+ export interface UrbiconComponentSpec extends A2uiComponentSpec {
54
+ props: Record<string, UrbiconPropSpec>;
55
+ /** The Urbicon component this maps to (drift anchor into `URBICON_AXES`). Omitted for structural/composite entries. */
56
+ urbicon?: string;
57
+ /** Prompt-grouping category (Layout / Text / Form / Status / Media). */
58
+ category: string;
59
+ }
60
+ /** The opaque catalog id this catalog advertises in `createSurface`. Custom catalogs are spec-sanctioned via `catalogId`. */
61
+ export declare const URBICON_A2UI_CATALOG_ID = "urbicon-ui/urbicon-catalog/v1";
62
+ /** Mapped `Icon.name` values: the Basic 16 plus 10 curated domain glyphs. */
63
+ export declare const URBICON_A2UI_ICON_NAMES: readonly string[];
64
+ /** Real Urbicon components deliberately not in the v1 catalog (error chip, not "unknown"). */
65
+ export declare const UNSUPPORTED_URBICON_A2UI_COMPONENTS: ReadonlySet<string>;
66
+ /** Props recognised anywhere but intentionally ignored (validation warning only, dropped before render). */
67
+ export declare const URBICON_A2UI_IGNORED_PROPS: ReadonlySet<string>;
68
+ export declare const URBICON_A2UI_REGISTRY: Readonly<Record<string, UrbiconComponentSpec>>;
69
+ /**
70
+ * The Urbicon catalog, spec half (Svelte-free — a server building the prompt can
71
+ * import this). The Svelte wiring (`Node`, `createIcons`) is added in
72
+ * `a2ui-urbicon-catalog.ts`. `flexContainers` and the layered check semantics
73
+ * mirror the Basic catalog; the sole catalog-specific check nudges the agent
74
+ * from plain `Text` toward `RichText` when it emits Markdown.
75
+ */
76
+ export declare const urbiconA2uiCatalogSpec: A2uiCatalogSpec;
77
+ /** The axis truth this registry couples to — re-exported for the drift test. */
78
+ export { URBICON_AXES } from './urbicon-axes.gen.js';