@wildo-ai/presets-components 1.1.1 → 1.1.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 (100) hide show
  1. package/dist/esm/components/actions/action-button.d.ts +1 -4
  2. package/dist/esm/components/actions/action-button.d.ts.map +1 -1
  3. package/dist/esm/components/actions/action-button.js +21 -5
  4. package/dist/esm/components/actions/action-button.js.map +1 -1
  5. package/dist/esm/components/ai-elements/artifacts/artifact-browser.d.ts.map +1 -1
  6. package/dist/esm/components/ai-elements/artifacts/artifact-browser.js +7 -3
  7. package/dist/esm/components/ai-elements/artifacts/artifact-browser.js.map +1 -1
  8. package/dist/esm/components/ai-elements/execution/task.d.ts.map +1 -1
  9. package/dist/esm/components/ai-elements/execution/task.js +10 -2
  10. package/dist/esm/components/ai-elements/execution/task.js.map +1 -1
  11. package/dist/esm/components/app/app-layout-main-container.labels.d.ts.map +1 -1
  12. package/dist/esm/components/app/app-layout-main-container.labels.js +10 -2
  13. package/dist/esm/components/app/app-layout-main-container.labels.js.map +1 -1
  14. package/dist/esm/components/app/public-layout-main-container.d.ts.map +1 -1
  15. package/dist/esm/components/app/public-layout-main-container.js +52 -5
  16. package/dist/esm/components/app/public-layout-main-container.js.map +1 -1
  17. package/dist/esm/components/data-display/description-list.d.ts.map +1 -1
  18. package/dist/esm/components/data-display/description-list.js +10 -7
  19. package/dist/esm/components/data-display/description-list.js.map +1 -1
  20. package/dist/esm/components/data-display/formatters/display-field-string.d.ts.map +1 -1
  21. package/dist/esm/components/data-display/formatters/display-field-string.js +3 -0
  22. package/dist/esm/components/data-display/formatters/display-field-string.js.map +1 -1
  23. package/dist/esm/components/form/chromes/form-primitive.labels.js +2 -2
  24. package/dist/esm/components/form/chromes/form-primitive.labels.js.map +1 -1
  25. package/dist/esm/components/navigation/app-level/menu-user-org.d.ts.map +1 -1
  26. package/dist/esm/components/navigation/app-level/menu-user-org.js +8 -2
  27. package/dist/esm/components/navigation/app-level/menu-user-org.js.map +1 -1
  28. package/dist/esm/components/navigation/app-level/sidebar.d.ts.map +1 -1
  29. package/dist/esm/components/navigation/app-level/sidebar.js +32 -15
  30. package/dist/esm/components/navigation/app-level/sidebar.js.map +1 -1
  31. package/dist/esm/components/overlays/containers/sheet.d.ts.map +1 -1
  32. package/dist/esm/components/overlays/containers/sheet.js +2 -2
  33. package/dist/esm/components/overlays/containers/sheet.js.map +1 -1
  34. package/dist/esm/components/sections/accordion.d.ts.map +1 -1
  35. package/dist/esm/components/sections/accordion.js +43 -13
  36. package/dist/esm/components/sections/accordion.js.map +1 -1
  37. package/dist/esm/components/sections/collapsible.d.ts.map +1 -1
  38. package/dist/esm/components/sections/collapsible.js +17 -3
  39. package/dist/esm/components/sections/collapsible.js.map +1 -1
  40. package/dist/esm/components/sections/content-section.d.ts.map +1 -1
  41. package/dist/esm/components/sections/content-section.js +11 -7
  42. package/dist/esm/components/sections/content-section.js.map +1 -1
  43. package/dist/esm/components/sections/disclosure-nesting.d.ts +20 -0
  44. package/dist/esm/components/sections/disclosure-nesting.d.ts.map +1 -0
  45. package/dist/esm/components/sections/disclosure-nesting.js +20 -0
  46. package/dist/esm/components/sections/disclosure-nesting.js.map +1 -0
  47. package/dist/esm/components/sections/tabs.d.ts.map +1 -1
  48. package/dist/esm/components/sections/tabs.js +141 -10
  49. package/dist/esm/components/sections/tabs.js.map +1 -1
  50. package/dist/esm/config/preset-kits.d.ts.map +1 -1
  51. package/dist/esm/config/preset-kits.js +0 -4
  52. package/dist/esm/config/preset-kits.js.map +1 -1
  53. package/dist/esm/config/preset-shell.d.ts.map +1 -1
  54. package/dist/esm/config/preset-shell.js +0 -4
  55. package/dist/esm/config/preset-shell.js.map +1 -1
  56. package/dist/esm/config/presets.d.ts.map +1 -1
  57. package/dist/esm/config/presets.js +0 -1
  58. package/dist/esm/config/presets.js.map +1 -1
  59. package/dist/esm/config/resources/application.resource-presets.d.ts.map +1 -1
  60. package/dist/esm/config/resources/application.resource-presets.js +6 -6
  61. package/dist/esm/config/resources/application.resource-presets.js.map +1 -1
  62. package/dist/esm/config/resources/billing.resource-presets.d.ts.map +1 -1
  63. package/dist/esm/config/resources/billing.resource-presets.js +8 -8
  64. package/dist/esm/config/resources/billing.resource-presets.js.map +1 -1
  65. package/dist/esm/config/resources/guidance.resource-presets.d.ts.map +1 -1
  66. package/dist/esm/config/resources/guidance.resource-presets.js +7 -7
  67. package/dist/esm/config/resources/guidance.resource-presets.js.map +1 -1
  68. package/dist/esm/config/resources/identity.resource-presets.d.ts.map +1 -1
  69. package/dist/esm/config/resources/identity.resource-presets.js +7 -7
  70. package/dist/esm/config/resources/identity.resource-presets.js.map +1 -1
  71. package/dist/esm/config/resources/organizations.resource-presets.d.ts.map +1 -1
  72. package/dist/esm/config/resources/organizations.resource-presets.js +8 -8
  73. package/dist/esm/config/resources/organizations.resource-presets.js.map +1 -1
  74. package/dist/esm/config/resources/security.resource-presets.d.ts.map +1 -1
  75. package/dist/esm/config/resources/security.resource-presets.js +9 -9
  76. package/dist/esm/config/resources/security.resource-presets.js.map +1 -1
  77. package/dist/esm/themes/cozy.theme.d.ts.map +1 -1
  78. package/dist/esm/themes/cozy.theme.js +8 -3
  79. package/dist/esm/themes/cozy.theme.js.map +1 -1
  80. package/dist/esm/themes/dense.theme.d.ts.map +1 -1
  81. package/dist/esm/themes/dense.theme.js +8 -5
  82. package/dist/esm/themes/dense.theme.js.map +1 -1
  83. package/dist/esm/themes/editorial.theme.d.ts.map +1 -1
  84. package/dist/esm/themes/editorial.theme.js +8 -3
  85. package/dist/esm/themes/editorial.theme.js.map +1 -1
  86. package/dist/esm/themes/glass.theme.d.ts.map +1 -1
  87. package/dist/esm/themes/glass.theme.js +10 -4
  88. package/dist/esm/themes/glass.theme.js.map +1 -1
  89. package/dist/esm/themes/neo-brutalist.theme.d.ts.map +1 -1
  90. package/dist/esm/themes/neo-brutalist.theme.js +8 -3
  91. package/dist/esm/themes/neo-brutalist.theme.js.map +1 -1
  92. package/dist/esm/themes/terminal.theme.d.ts.map +1 -1
  93. package/dist/esm/themes/terminal.theme.js +8 -3
  94. package/dist/esm/themes/terminal.theme.js.map +1 -1
  95. package/dist/esm/themes/trading.theme.d.ts.map +1 -1
  96. package/dist/esm/themes/trading.theme.js +8 -3
  97. package/dist/esm/themes/trading.theme.js.map +1 -1
  98. package/dist/tsconfig.build.tsbuildinfo +1 -1
  99. package/package.json +7 -7
  100. package/dist/esm/.builder.pid +0 -9
@@ -1,8 +1,5 @@
1
1
  import * as React from "react";
2
2
  import type { ActionButtonProps } from '@wildo-ai/saas-frontend-lib';
3
- declare function ActionButton({ icon, label, onClick, variant, size, labelDisplayMode, disabled, stopPropagation, className, tabIndex, operationIdentifier, }: ActionButtonProps): React.JSX.Element;
4
- declare namespace ActionButton {
5
- var displayName: string;
6
- }
3
+ declare const ActionButton: React.ForwardRefExoticComponent<ActionButtonProps & React.RefAttributes<HTMLButtonElement>>;
7
4
  export { ActionButton };
8
5
  //# sourceMappingURL=action-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"action-button.d.ts","sourceRoot":"","sources":["../../../../../src/components/actions/action-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAoB,MAAM,6BAA6B,CAAA;AA0BtF,iBAAS,YAAY,CAAC,EACpB,IAAI,EACJ,KAAK,EACL,OAAO,EACP,OAAsC,EACtC,IAAyB,EACzB,gBAAiD,EACjD,QAAgB,EAChB,eAAsB,EACtB,SAAS,EACT,QAAQ,EACR,mBAAmB,GACpB,EAAE,iBAAiB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkDvC;kBA9DQ,YAAY;;;AAkErB,OAAO,EAAE,YAAY,EAAE,CAAA"}
1
+ {"version":3,"file":"action-button.d.ts","sourceRoot":"","sources":["../../../../../src/components/actions/action-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAoB,MAAM,6BAA6B,CAAA;AA0BtF,QAAA,MAAM,YAAY,6FAmFhB,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -22,19 +22,35 @@ import { PlacementSide } from "@wildo-ai/presets-components-models";
22
22
  * Event propagation is stopped by default, which makes ActionButton safe
23
23
  * inside clickable containers (table rows, cards, etc.).
24
24
  * ────────────────────────────────────────────────────────────────────────── */
25
- function ActionButton({ icon, label, onClick, variant = ButtonVariants_Variant.GHOST, size = ButtonSize.ICON_SM, labelDisplayMode = ActionLabelDisplayMode.TOOLTIP, disabled = false, stopPropagation = true, className, tabIndex, operationIdentifier, }) {
25
+ const ActionButton = React.forwardRef(function ActionButton({ icon, label, onClick, variant = ButtonVariants_Variant.GHOST, size = ButtonSize.ICON_SM, labelDisplayMode = ActionLabelDisplayMode.TOOLTIP, disabled = false, stopPropagation = true, className, tabIndex, operationIdentifier, triggerProps, }, ref) {
26
26
  const handleClick = React.useCallback((e) => {
27
27
  if (stopPropagation)
28
28
  e.stopPropagation();
29
+ /*
30
+ * The OUTER trigger's handler first, then this component's own.
31
+ *
32
+ * An anchored overlay opens from its trigger's `onClick`; dropping it is what made
33
+ * `ActionBarButton.popover` inert. Calling both keeps an action that has BOTH — a panel and a
34
+ * fallback — behaving the same in either label mode.
35
+ */
36
+ triggerProps?.onClick?.(e);
29
37
  onClick?.(e);
30
- }, [onClick, stopPropagation]);
38
+ }, [onClick, stopPropagation, triggerProps]);
31
39
  /* ── Inline-label mode ──────────────────────────────────────────────── */
32
40
  if (labelDisplayMode === ActionLabelDisplayMode.INLINE) {
33
- return (_jsxs(Button, { variant: variant, size: ButtonSize.SM, disabled: disabled, onClick: handleClick, tabIndex: tabIndex, "data-operation-id": operationIdentifier, className: cn("gap-1.5", className), children: [icon, _jsx("span", { className: "text-xs font-medium whitespace-nowrap", children: label })] }));
41
+ return (_jsxs(Button, { variant: variant, size: ButtonSize.SM, disabled: disabled, ...triggerProps, onClick: handleClick, ref: ref, tabIndex: tabIndex, "data-operation-id": operationIdentifier, className: cn("gap-1.5", className), children: [icon, _jsx("span", { className: "text-xs font-medium whitespace-nowrap", children: label })] }));
34
42
  }
35
43
  /* ── Icon-only mode with tooltip ────────────────────────────────────── */
36
- return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { variant: variant, size: size, disabled: disabled, onClick: handleClick, "aria-label": label, tabIndex: tabIndex, "data-operation-id": operationIdentifier, className: className, children: icon }) }), _jsx(TooltipContent, { side: PlacementSide.BOTTOM, sideOffset: 5, children: label })] }));
37
- }
44
+ /*
45
+ * `triggerProps` and `ref` land on the BUTTON, not on the `<Tooltip>` root above it.
46
+ *
47
+ * A Radix root renders no DOM element and forwards nothing, so an outer `asChild` trigger cloning
48
+ * onto THIS component's return value would merge its props into nothing — which is precisely how
49
+ * `ActionBar`'s `ActionBarButton.popover` came to be silently inert in this mode: the button
50
+ * rendered, hovered, focused and clicked, and the panel never opened.
51
+ */
52
+ return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { variant: variant, size: size, disabled: disabled, ...triggerProps, onClick: handleClick, ref: ref, "aria-label": label, tabIndex: tabIndex, "data-operation-id": operationIdentifier, className: className, children: icon }) }), _jsx(TooltipContent, { side: PlacementSide.BOTTOM, sideOffset: 5, children: label })] }));
53
+ });
38
54
  ActionButton.displayName = "ActionButton";
39
55
  export { ActionButton };
40
56
  //# sourceMappingURL=action-button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"action-button.js","sourceRoot":"","sources":["../../../../../src/components/actions/action-button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzH,OAAO,EAAE,UAAU,E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Q,EAAE,QAAQ,uBACC,mBAAmB,EACtC,SAAS,EAAE,SAAS,YAEnB,IAAI,GACE,GACM,EACjB,KAAC,cAAc,IAAC,IAAI,EAAE,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,YACtD,KAAK,GACS,IACT,CACX,CAAA;AACH,CAAC;AAED,YAAY,CAAC,WAAW,GAAG,cAAc,CAAA;AAEzC,OAAO,EAAE,YAAY,EAAE,CAAA","sourcesContent":["import * as React from \"react\"\nimport type { ActionButtonProps, ActionButtonSize } from '@wildo-ai/saas-frontend-lib'\n\nimport { cn, Button, Tooltip, TooltipTrigger, TooltipContent, ButtonVariants_Variant } from \"@wildo-ai/saas-frontend-lib\"\nimport { ButtonSize, FrontendComponentType, ActionLabelDisplayMode } from \"@wildo-ai/presets-components-models\"\nimport { PlacementSide } from \"@wildo-ai/presets-components-models\"\n\n/* ─────────────────────────────────────────────────────────────────────────────\n * ActionButton\n *\n * A compact, icon-first button designed for toolbars, table rows, and inline\n * action groups. Wraps the base Button with automatic tooltip behaviour:\n *\n * • Tooltip mode (default) — icon-only; shows a tooltip on hover / focus.\n * • Inline mode — renders the label as text next to the icon.\n *\n * The mode is driven by `labelDisplayMode`. (The `DROPDOWN` app-policy is\n * resolved by ActionBar, which never renders a direct ActionButton in that\n * mode, so here `DROPDOWN` degrades to the tooltip affordance.)\n *\n * Uses the design-system recipe system, so it adapts to every theme\n * (default, glass, neo-brutalist, …).\n *\n * Event propagation is stopped by default, which makes ActionButton safe\n * inside clickable containers (table rows, cards, etc.).\n * ────────────────────────────────────────────────────────────────────────── */\n\nfunction ActionButton({\n icon,\n label,\n onClick,\n variant = ButtonVariants_Variant.GHOST,\n size = ButtonSize.ICON_SM,\n labelDisplayMode = ActionLabelDisplayMode.TOOLTIP,\n disabled = false,\n stopPropagation = true,\n className,\n tabIndex,\n operationIdentifier,\n}: ActionButtonProps): React.JSX.Element {\n\n const handleClick = React.useCallback(\n (e: React.MouseEvent<HTMLButtonElement>) => {\n if (stopPropagation) e.stopPropagation()\n onClick?.(e)\n },\n [onClick, stopPropagation],\n )\n\n /* ── Inline-label mode ──────────────────────────────────────────────── */\n if (labelDisplayMode === ActionLabelDisplayMode.INLINE) {\n return (\n <Button\n variant={variant}\n size={ButtonSize.SM}\n disabled={disabled}\n onClick={handleClick}\n tabIndex={tabIndex}\n data-operation-id={operationIdentifier}\n className={cn(\"gap-1.5\", className)}\n >\n {icon}\n <span className=\"text-xs font-medium whitespace-nowrap\">{label}</span>\n </Button>\n )\n }\n\n /* ── Icon-only mode with tooltip ────────────────────────────────────── */\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n variant={variant}\n size={size}\n disabled={disabled}\n onClick={handleClick}\n aria-label={label}\n tabIndex={tabIndex}\n data-operation-id={operationIdentifier}\n className={className}\n >\n {icon}\n </Button>\n </TooltipTrigger>\n <TooltipContent side={PlacementSide.BOTTOM} sideOffset={5}>\n {label}\n </TooltipContent>\n </Tooltip>\n )\n}\n\nActionButton.displayName = \"ActionButton\"\n\nexport { ActionButton }\n"]}
1
+ {"version":3,"file":"action-button.js","sourceRoot":"","sources":["../../../../../src/components/actions/action-button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzH,OAAO,EAAE,UAAU,EAAyB,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AAC/G,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AAEnE;;;;;;;;;;;;;;;;;;gFAkBgF;AAEhF,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAuC,SAAS,YAAY,CAAC,EAChG,IAAI,EACJ,KAAK,EACL,OAAO,EACP,OAAO,GAAG,sBAAsB,CAAC,KAAK,EACtC,IAAI,GAAG,UAAU,CAAC,OAAO,EACzB,gB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,EACjB,KAAC,cAAc,IAAC,IAAI,EAAE,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,YACtD,KAAK,GACS,IACT,CACX,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAA;AAEzC,OAAO,EAAE,YAAY,EAAE,CAAA","sourcesContent":["import * as React from \"react\"\nimport type { ActionButtonProps, ActionButtonSize } from '@wildo-ai/saas-frontend-lib'\n\nimport { cn, Button, Tooltip, TooltipTrigger, TooltipContent, ButtonVariants_Variant } from \"@wildo-ai/saas-frontend-lib\"\nimport { ButtonSize, FrontendComponentType, ActionLabelDisplayMode } from \"@wildo-ai/presets-components-models\"\nimport { PlacementSide } from \"@wildo-ai/presets-components-models\"\n\n/* ─────────────────────────────────────────────────────────────────────────────\n * ActionButton\n *\n * A compact, icon-first button designed for toolbars, table rows, and inline\n * action groups. Wraps the base Button with automatic tooltip behaviour:\n *\n * • Tooltip mode (default) — icon-only; shows a tooltip on hover / focus.\n * • Inline mode — renders the label as text next to the icon.\n *\n * The mode is driven by `labelDisplayMode`. (The `DROPDOWN` app-policy is\n * resolved by ActionBar, which never renders a direct ActionButton in that\n * mode, so here `DROPDOWN` degrades to the tooltip affordance.)\n *\n * Uses the design-system recipe system, so it adapts to every theme\n * (default, glass, neo-brutalist, …).\n *\n * Event propagation is stopped by default, which makes ActionButton safe\n * inside clickable containers (table rows, cards, etc.).\n * ────────────────────────────────────────────────────────────────────────── */\n\nconst ActionButton = React.forwardRef<HTMLButtonElement, ActionButtonProps>(function ActionButton({\n icon,\n label,\n onClick,\n variant = ButtonVariants_Variant.GHOST,\n size = ButtonSize.ICON_SM,\n labelDisplayMode = ActionLabelDisplayMode.TOOLTIP,\n disabled = false,\n stopPropagation = true,\n className,\n tabIndex,\n operationIdentifier,\n triggerProps,\n}: ActionButtonProps, ref): React.JSX.Element {\n\n const handleClick = React.useCallback(\n (e: React.MouseEvent<HTMLButtonElement>) => {\n if (stopPropagation) e.stopPropagation()\n /*\n * The OUTER trigger's handler first, then this component's own.\n *\n * An anchored overlay opens from its trigger's `onClick`; dropping it is what made\n * `ActionBarButton.popover` inert. Calling both keeps an action that has BOTH — a panel and a\n * fallback — behaving the same in either label mode.\n */\n triggerProps?.onClick?.(e)\n onClick?.(e)\n },\n [onClick, stopPropagation, triggerProps],\n )\n\n /* ── Inline-label mode ──────────────────────────────────────────────── */\n if (labelDisplayMode === ActionLabelDisplayMode.INLINE) {\n return (\n <Button\n variant={variant}\n size={ButtonSize.SM}\n disabled={disabled}\n {...triggerProps}\n onClick={handleClick}\n ref={ref}\n tabIndex={tabIndex}\n data-operation-id={operationIdentifier}\n className={cn(\"gap-1.5\", className)}\n >\n {icon}\n <span className=\"text-xs font-medium whitespace-nowrap\">{label}</span>\n </Button>\n )\n }\n\n /* ── Icon-only mode with tooltip ────────────────────────────────────── */\n /*\n * `triggerProps` and `ref` land on the BUTTON, not on the `<Tooltip>` root above it.\n *\n * A Radix root renders no DOM element and forwards nothing, so an outer `asChild` trigger cloning\n * onto THIS component's return value would merge its props into nothing — which is precisely how\n * `ActionBar`'s `ActionBarButton.popover` came to be silently inert in this mode: the button\n * rendered, hovered, focused and clicked, and the panel never opened.\n */\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n variant={variant}\n size={size}\n disabled={disabled}\n {...triggerProps}\n onClick={handleClick}\n ref={ref}\n aria-label={label}\n tabIndex={tabIndex}\n data-operation-id={operationIdentifier}\n className={className}\n >\n {icon}\n </Button>\n </TooltipTrigger>\n <TooltipContent side={PlacementSide.BOTTOM} sideOffset={5}>\n {label}\n </TooltipContent>\n </Tooltip>\n )\n})\n\nActionButton.displayName = \"ActionButton\"\n\nexport { ActionButton }\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-browser.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ai-elements/artifacts/artifact-browser.tsx"],"names":[],"mappings":"AAGA,OAAO,EAaL,uBAAuB,EAUxB,MAAM,6BAA6B,CAAC;AAyZrC,eAAO,MAAM,eAAe,yBAM1B,CAAC"}
1
+ {"version":3,"file":"artifact-browser.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ai-elements/artifacts/artifact-browser.tsx"],"names":[],"mappings":"AAGA,OAAO,EAaL,uBAAuB,EAUxB,MAAM,6BAA6B,CAAC;AA6ZrC,eAAO,MAAM,eAAe,yBAM1B,CAAC"}
@@ -2,7 +2,7 @@
2
2
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { Badge, Button, Collapsible, CollapsibleContent, CollapsibleTrigger, InputRoot, ScrollArea, cn, useUI, useI18n, createCompoundPreset, Surface, ButtonVariants_Variant, } from '@wildo-ai/saas-frontend-lib';
5
- import { UIBehavior, SurfaceVariant, TypographyVariant, FrontendComponentType, ButtonSize } from "@wildo-ai/presets-components-models";
5
+ import { DividerVariant, UIBehavior, SurfaceVariant, TypographyVariant, FrontendComponentType, ButtonSize } from "@wildo-ai/presets-components-models";
6
6
  const CT = FrontendComponentType.LOW_LEVEL_AI_ARTIFACT_BROWSER;
7
7
  const TYPE_VARIANT = {
8
8
  TEXT: "default",
@@ -56,6 +56,10 @@ const AI_ArtifactFileContent = ({ filename, mimeType, size, url, path, className
56
56
  return (_jsxs("div", { className: cn("flex flex-col gap-card-sm", className), ...props, children: [_jsx(Surface, { asChild: true, emitPolicyVars: false, variant: SurfaceVariant.INSET, children: _jsxs("div", { className: cn(surfaceInsetRecipe.base, "flex items-center justify-between rounded-md p-card-sm"), children: [_jsxs("div", { className: "flex flex-col gap-1", children: [filename && _jsx("span", { className: "text-sm font-medium", children: filename }), _jsxs("div", { className: "flex items-center gap-element text-2xs text-muted-foreground", children: [mimeType && _jsx("span", { children: mimeType }), size != null && _jsx("span", { children: formatFileSize(size) })] })] }), url && (_jsx(Button, { variant: ButtonVariants_Variant.OUTLINE, size: ButtonSize.SM, asChild: true, children: _jsx("a", { href: url, target: "_blank", rel: "noopener noreferrer", download: filename, children: tComponent(CT, "download") }) }))] }) }), isImage && url && (_jsx(Surface, { asChild: true, emitPolicyVars: false, variant: SurfaceVariant.INSET, children: _jsx("div", { className: "flex justify-center rounded-md bg-muted p-card", children: _jsx("img", { src: url, alt: filename ?? tComponent(CT, "preview"), className: "max-h-64 max-w-full rounded object-contain" }) }) })), isText && !isImage && url && (_jsxs("div", { className: "text-2xs text-muted-foreground", children: [tComponent(CT, "preview"), ": ", path ?? url] }))] }));
57
57
  };
58
58
  function JsonTreeNode({ value, depth }) {
59
+ // Themed nesting guide for the collapsed-branch reveal (`DIVIDER` / `NESTING_GUIDE`) — the same
60
+ // recipe every nested disclosure uses; the `ps-4` micro-indent is this tree's own density choice.
61
+ const { getRecipe } = useUI();
62
+ const jsonTreeNestingGuide = getRecipe(UIBehavior.DIVIDER, DividerVariant.NESTING_GUIDE).base;
59
63
  const [expanded, setExpanded] = React.useState(depth < 2);
60
64
  if (value === null || value === undefined) {
61
65
  return _jsx("span", { className: "text-muted-foreground italic", children: "null" });
@@ -69,13 +73,13 @@ function JsonTreeNode({ value, depth }) {
69
73
  if (Array.isArray(value)) {
70
74
  if (value.length === 0)
71
75
  return _jsx("span", { className: "text-muted-foreground", children: "[]" });
72
- return (_jsxs(Collapsible, { open: expanded, onOpenChange: setExpanded, children: [_jsx(CollapsibleTrigger, { asChild: true, children: _jsxs("button", { type: "button", className: "text-2xs text-muted-foreground hover:text-foreground", children: ["[", expanded ? "" : `…${value.length}`] }) }), _jsx(CollapsibleContent, { children: _jsx("div", { className: "ps-4 border-s border-border", children: value.map((item, i) => (_jsxs("div", { className: "py-px", children: [_jsx(JsonTreeNode, { value: item, depth: depth + 1 }), i < value.length - 1 && _jsx("span", { className: "text-muted-foreground", children: "," })] }, i))) }) }), expanded && _jsx("span", { className: "text-2xs text-muted-foreground", children: "]" })] }));
76
+ return (_jsxs(Collapsible, { open: expanded, onOpenChange: setExpanded, children: [_jsx(CollapsibleTrigger, { asChild: true, children: _jsxs("button", { type: "button", className: "text-2xs text-muted-foreground hover:text-foreground", children: ["[", expanded ? "" : `…${value.length}`] }) }), _jsx(CollapsibleContent, { children: _jsx("div", { className: cn(jsonTreeNestingGuide, "ps-4"), children: value.map((item, i) => (_jsxs("div", { className: "py-px", children: [_jsx(JsonTreeNode, { value: item, depth: depth + 1 }), i < value.length - 1 && _jsx("span", { className: "text-muted-foreground", children: "," })] }, i))) }) }), expanded && _jsx("span", { className: "text-2xs text-muted-foreground", children: "]" })] }));
73
77
  }
74
78
  if (typeof value === "object") {
75
79
  const entries = Object.entries(value);
76
80
  if (entries.length === 0)
77
81
  return _jsx("span", { className: "text-muted-foreground", children: "{}" });
78
- return (_jsxs(Collapsible, { open: expanded, onOpenChange: setExpanded, children: [_jsx(CollapsibleTrigger, { asChild: true, children: _jsxs("button", { type: "button", className: "text-2xs text-muted-foreground hover:text-foreground", children: ["{", expanded ? "" : `…${entries.length}`] }) }), _jsx(CollapsibleContent, { children: _jsx("div", { className: "ps-4 border-s border-border", children: entries.map(([key, val], i) => (_jsxs("div", { className: "py-px", children: [_jsxs("span", { className: "text-primary me-1", children: ["\"", key, "\""] }), _jsx("span", { className: "text-muted-foreground me-1", children: ":" }), _jsx(JsonTreeNode, { value: val, depth: depth + 1 }), i < entries.length - 1 && _jsx("span", { className: "text-muted-foreground", children: "," })] }, key))) }) }), expanded && _jsx("span", { className: "text-2xs text-muted-foreground", children: "}" })] }));
82
+ return (_jsxs(Collapsible, { open: expanded, onOpenChange: setExpanded, children: [_jsx(CollapsibleTrigger, { asChild: true, children: _jsxs("button", { type: "button", className: "text-2xs text-muted-foreground hover:text-foreground", children: ["{", expanded ? "" : `…${entries.length}`] }) }), _jsx(CollapsibleContent, { children: _jsx("div", { className: cn(jsonTreeNestingGuide, "ps-4"), children: entries.map(([key, val], i) => (_jsxs("div", { className: "py-px", children: [_jsxs("span", { className: "text-primary me-1", children: ["\"", key, "\""] }), _jsx("span", { className: "text-muted-foreground me-1", children: ":" }), _jsx(JsonTreeNode, { value: val, depth: depth + 1 }), i < entries.length - 1 && _jsx("span", { className: "text-muted-foreground", children: "," })] }, key))) }) }), expanded && _jsx("span", { className: "text-2xs text-muted-foreground", children: "}" })] }));
79
83
  }
80
84
  return _jsx("span", { children: String(value) });
81
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-browser.js","sourceRoot":"","sources":["../../../../../../src/components/ai-elements/artifacts/artifact-browser.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,KAAK,EACL,MAAM,EACN,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,EAAE,EACF,KAAK,EACL,OAAO,EACP,oBAAoB,EACpB,OAAO,EAEP,sBAAsB,GASvB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEvI,MAAM,EAAE,GAA0B,qBAAqB,CAAC,6BAA6B,CAAC;AAEtF,MAAM,YAAY,GAAkF;IAClG,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,SAAS;CACtB,CAAC;AAEF,MAAM,cAAc,GAAqC;IACvD,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,aAAa;IACvB,UAAU,EAAE,gBAAgB;CAC7B,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,EACzB,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACe,EAA4B,EAAE;IACrD,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;IAE3D,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,MAAM;QA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C,UAAU,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,CAAC,GAC7E,CACL,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,SAAS,EAAC,eAAe,YACnC,cAAK,SAAS,EAAC,2BAA2B,YACvC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACtB,KAAC,eAAe,IAAgB,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,IAAxC,IAAI,CAAC,GAAG,CAAoC,CACnE,CAAC,GACE,GACK,CACd,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAA0B,mBAAmB,EAAE;IAChG,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,iBAAiB;IACzB,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,sBAAsB;IACnC,iBAAiB,EAAE,4BAA4B;CAChD,CAAC,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n Badge,\n Button,\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n InputRoot,\n ScrollArea,\n cn,\n useUI,\n useI18n,\n createCompoundPreset,\n Surface,\n AI_ArtifactListCompound,\n ButtonVariants_Variant,\n ArtifactPartKind,\n ArtifactItemData,\n AI_ArtifactOriginProps,\n AI_ArtifactTextContentProps,\n AI_ArtifactFileContentProps,\n AI_ArtifactStructuredContentProps,\n AI_ArtifactItemProps,\n AI_ArtifactListProps,\n} from '@wildo-ai/saas-frontend-lib';\n\nimport { UIBehavior, SurfaceVariant, TypographyVariant, FrontendComponentType, ButtonSize } from \"@wildo-ai/presets-components-models\";\n\nconst CT: FrontendComponentType = FrontendComponentType.LOW_LEVEL_AI_ARTIFACT_BROWSER;\n\nconst TYPE_VARIANT: Record<ArtifactPartKind, \"default\" | \"secondary\" | \"outline\" | \"destructive\"> = {\n TEXT: \"default\",\n FILE: \"secondary\",\n RAW_DATA: \"outline\",\n STRUCTURED: \"outline\",\n};\n\nconst TYPE_LABEL_KEY: Record<ArtifactPartKind, string> = {\n TEXT: \"typeText\",\n FILE: \"typeFile\",\n RAW_DATA: \"typeRawData\",\n STRUCTURED: \"typeStructured\",\n};\n\nconst AI_ArtifactOrigin = ({\n origin,\n className,\n ...props\n}: AI_ArtifactOriginProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n\n if (!origin?.taskId && !origin?.stepId) return null;\n\n if (!isReady) return null;\n\n return (\n <span className={cn(\"flex items-center gap-1 text-2xs text-muted-foreground\", className)} {...props}>\n {origin.taskId && (\n <Badge variant=\"outline\" className=\"text-2xs font-mono\">\n {tComponent(CT, \"originTask\")}: {origin.taskId}\n </Badge>\n )}\n {origin.stepId && (\n <Badge variant=\"outline\" className=\"text-2xs font-mono\">\n {tComponent(CT, \"originStep\")}: {origin.stepId}\n </Badge>\n )}\n </span>\n );\n};\n\nconst AI_ArtifactTextContent = ({\n text,\n mimeType,\n className,\n ...props\n}: AI_ArtifactTextContentProps): React.JSX.Element => {\n const isCode = mimeType?.startsWith(\"text/x-\") ||\n mimeType?.startsWith(\"application/javascript\") ||\n mimeType?.startsWith(\"application/json\") ||\n mimeType?.startsWith(\"application/xml\") ||\n mimeType?.startsWith(\"text/css\") ||\n mimeType?.startsWith(\"text/html\");\n\n if (isCode) {\n return (\n <div className={cn(\"overflow-auto\", className)} {...props}>\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <pre className=\"rounded-md bg-muted p-card text-xs font-mono leading-relaxed whitespace-pre-wrap break-words\">\n {text}\n </pre>\n </Surface>\n </div>\n );\n }\n\n return (\n <div className={cn(\"overflow-auto\", className)} {...props}>\n <div className=\"text-sm leading-relaxed whitespace-pre-wrap break-words\">\n {text}\n </div>\n </div>\n );\n};\n\nfunction formatFileSize(bytes: number | undefined): string {\n if (bytes == null) return \"\";\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n}\n\nconst AI_ArtifactFileContent = ({\n filename,\n mimeType,\n size,\n url,\n path,\n className,\n ...props\n}: AI_ArtifactFileContentProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const { getRecipe } = useUI();\n const surfaceInsetRecipe = getRecipe(UIBehavior.SURFACE, SurfaceVariant.INSET);\n const isImage = mimeType?.startsWith(\"image/\");\n const isText = mimeType?.startsWith(\"text/\");\n\n if (!isReady) return null;\n\n return (\n <div className={cn(\"flex flex-col gap-card-sm\", className)} {...props}>\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <div className={cn(surfaceInsetRecipe.base, \"flex items-center justify-between rounded-md p-card-sm\")}>\n <div className=\"flex flex-col gap-1\">\n {filename && <span className=\"text-sm font-medium\">{filename}</span>}\n <div className=\"flex items-center gap-element text-2xs text-muted-foreground\">\n {mimeType && <span>{mimeType}</span>}\n {size != null && <span>{formatFileSize(size)}</span>}\n </div>\n </div>\n {url && (\n <Button variant={ButtonVariants_Variant.OUTLINE} size={ButtonSize.SM} asChild>\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\" download={filename}>\n {tComponent(CT, \"download\")}\n </a>\n </Button>\n )}\n </div>\n </Surface>\n\n {isImage && url && (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <div className=\"flex justify-center rounded-md bg-muted p-card\">\n <img\n src={url}\n alt={filename ?? tComponent(CT, \"preview\")}\n className=\"max-h-64 max-w-full rounded object-contain\"\n />\n </div>\n </Surface>\n )}\n\n {isText && !isImage && url && (\n <div className=\"text-2xs text-muted-foreground\">\n {tComponent(CT, \"preview\")}: {path ?? url}\n </div>\n )}\n </div>\n );\n};\n\nfunction JsonTreeNode({ value, depth }: { value: unknown; depth: number }): React.JSX.Element {\n const [expanded, setExpanded] = React.useState(depth < 2);\n\n if (value === null || value === undefined) {\n return <span className=\"text-muted-foreground italic\">null</span>;\n }\n\n if (typeof value === \"string\") {\n return <span className=\"text-success\">\"{value}\"</span>;\n }\n\n if (typeof value === \"number\" || typeof value === \"boolean\") {\n return <span className=\"text-info\">{String(value)}</span>;\n }\n\n if (Array.isArray(value)) {\n if (value.length === 0) return <span className=\"text-muted-foreground\">[]</span>;\n\n return (\n <Collapsible open={expanded} onOpenChange={setExpanded}>\n <CollapsibleTrigger asChild>\n <button type=\"button\" className=\"text-2xs text-muted-foreground hover:text-foreground\">\n [{expanded ? \"\" : `…${value.length}`}\n </button>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <div className=\"ps-4 border-s border-border\">\n {value.map((item, i) => (\n <div key={i} className=\"py-px\">\n <JsonTreeNode value={item} depth={depth + 1} />\n {i < value.length - 1 && <span className=\"text-muted-foreground\">,</span>}\n </div>\n ))}\n </div>\n </CollapsibleContent>\n {expanded && <span className=\"text-2xs text-muted-foreground\">]</span>}\n </Collapsible>\n );\n }\n\n if (typeof value === \"object\") {\n const entries = Object.entries(value as Record<string, unknown>);\n if (entries.length === 0) return <span className=\"text-muted-foreground\">{\"{}\"}</span>;\n\n return (\n <Collapsible open={expanded} onOpenChange={setExpanded}>\n <CollapsibleTrigger asChild>\n <button type=\"button\" className=\"text-2xs text-muted-foreground hover:text-foreground\">\n {\"{\"}{expanded ? \"\" : `…${entries.length}`}\n </button>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <div className=\"ps-4 border-s border-border\">\n {entries.map(([key, val], i) => (\n <div key={key} className=\"py-px\">\n <span className=\"text-primary me-1\">\"{key}\"</span>\n <span className=\"text-muted-foreground me-1\">:</span>\n <JsonTreeNode value={val} depth={depth + 1} />\n {i < entries.length - 1 && <span className=\"text-muted-foreground\">,</span>}\n </div>\n ))}\n </div>\n </CollapsibleContent>\n {expanded && <span className=\"text-2xs text-muted-foreground\">{\"}\"}</span>}\n </Collapsible>\n );\n }\n\n return <span>{String(value)}</span>;\n}\n\nconst AI_ArtifactStructuredContent = ({\n data,\n className,\n ...props\n}: AI_ArtifactStructuredContentProps): React.JSX.Element => (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <div className={cn(\"overflow-auto rounded-md bg-muted p-card font-mono text-xs\", className)} {...props}>\n <JsonTreeNode value={data} depth={0} />\n </div>\n </Surface>\n);\n\nfunction resolveContent(item: ArtifactItemData): React.JSX.Element {\n const content = item.content as Record<string, unknown> | undefined;\n\n switch (item.type) {\n case \"TEXT\": {\n const text = (content as { text?: string } | undefined)?.text ?? \"\";\n return <AI_ArtifactTextContent text={text} mimeType={item.mimeType} />;\n }\n case \"FILE\": {\n const storage = (content as { storage?: Record<string, unknown> } | undefined)?.storage;\n return (\n <AI_ArtifactFileContent\n filename={item.name}\n mimeType={item.mimeType}\n size={item.size}\n url={storage?.url as string | undefined}\n path={storage?.path as string | undefined}\n />\n );\n }\n case \"RAW_DATA\":\n case \"STRUCTURED\": {\n const data = (content as { data?: unknown } | undefined)?.data ?? content;\n return <AI_ArtifactStructuredContent data={data} />;\n }\n default:\n return <AI_ArtifactStructuredContent data={content} />;\n }\n}\n\nconst AI_ArtifactItem = ({\n item,\n onSelect,\n defaultExpanded = false,\n className,\n ...props\n}: AI_ArtifactItemProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const { getRecipe } = useUI();\n const surfaceRecipe = getRecipe(UIBehavior.SURFACE, SurfaceVariant.BASE);\n const descRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.DESCRIPTION);\n\n if (!isReady) return null;\n\n return (\n <Collapsible defaultOpen={defaultExpanded}>\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.BASE}>\n <div className={cn(surfaceRecipe.base, className)} {...props}>\n <CollapsibleTrigger asChild>\n <button\n type=\"button\"\n className=\"flex w-full items-center justify-between gap-element p-card-sm text-start hover:bg-muted/50\"\n onClick={() => onSelect?.(item.ref)}\n >\n <div className=\"flex flex-col gap-1 min-w-0\">\n <div className=\"flex items-center gap-element\">\n <span className=\"truncate text-sm font-medium\">{item.name}</span>\n <Badge variant={TYPE_VARIANT[item.type]} className=\"text-2xs shrink-0\">\n {tComponent(CT, TYPE_LABEL_KEY[item.type])}\n </Badge>\n </div>\n\n <div className=\"flex flex-wrap items-center gap-element\">\n <AI_ArtifactOrigin origin={item.origin} />\n {item.createdAt && (\n <span className={cn(descRecipe.base, \"text-2xs\")}>\n {new Date(item.createdAt).toLocaleString()}\n </span>\n )}\n {item.size != null && (\n <span className={cn(descRecipe.base, \"text-2xs\")}>\n {formatFileSize(item.size)}\n </span>\n )}\n </div>\n </div>\n </button>\n </CollapsibleTrigger>\n\n <CollapsibleContent>\n <div className=\"border-t p-card-sm\">\n {resolveContent(item)}\n </div>\n </CollapsibleContent>\n </div>\n </Surface>\n </Collapsible>\n );\n};\n\nconst AI_ArtifactListRoot = ({\n items,\n onSelect,\n className,\n ...props\n}: AI_ArtifactListProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const { getRecipe } = useUI();\n const descRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.DESCRIPTION);\n\n const [search, setSearch] = React.useState(\"\");\n const [typeFilter, setTypeFilter] = React.useState<ArtifactPartKind | \"ALL\">(\"ALL\");\n\n const filtered = React.useMemo(() => {\n let result = items;\n\n if (search) {\n const q = search.toLowerCase();\n result = result.filter((a) =>\n a.name.toLowerCase().includes(q) ||\n a.description?.toLowerCase().includes(q) ||\n a.ref.toLowerCase().includes(q)\n );\n }\n\n if (typeFilter !== \"ALL\") {\n result = result.filter((a) => a.type === typeFilter);\n }\n\n return result;\n }, [items, search, typeFilter]);\n\n const typeOptions: Array<ArtifactPartKind | \"ALL\"> = [\"ALL\", \"TEXT\", \"FILE\", \"RAW_DATA\", \"STRUCTURED\"];\n\n if (!isReady) return null;\n\n return (\n <div className={cn(\"flex flex-col gap-card\", className)} {...props}>\n <div className=\"flex items-center justify-between gap-element\">\n <div className=\"flex items-center gap-element\">\n <h3 className=\"text-sm font-semibold\">{tComponent(CT, \"title\")}</h3>\n <Badge variant=\"secondary\" className=\"text-2xs\">\n {tComponent(CT, \"artifactCount\", { count: String(items.length) })}\n </Badge>\n </div>\n </div>\n\n <div className=\"flex items-center gap-element\">\n <InputRoot\n type=\"text\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n placeholder={tComponent(CT, \"searchPlaceholder\")}\n className=\"flex-1 h-8 text-xs\"\n />\n {/* V-5: candidate for Button/IconButton migration — see audit doc */}\n {/* (filter pills override SM ladder rung with h-7 + text-2xs; same pattern as meta/agent.tsx) */}\n <div className=\"flex gap-1\">\n {typeOptions.map((t) => (\n <Button\n key={t}\n type=\"button\"\n variant={typeFilter === t ? ButtonVariants_Variant.SECONDARY : ButtonVariants_Variant.GHOST}\n size={ButtonSize.XS}\n onClick={() => setTypeFilter(t)}\n >\n {t === \"ALL\" ? tComponent(CT, \"allTypes\") : tComponent(CT, TYPE_LABEL_KEY[t])}\n </Button>\n ))}\n </div>\n </div>\n\n {filtered.length === 0 ? (\n <p className={cn(descRecipe.base, \"py-card text-center text-sm\")}>\n {items.length === 0 ? tComponent(CT, \"noArtifacts\") : tComponent(CT, \"noMatch\")}\n </p>\n ) : (\n <ScrollArea className=\"max-h-[600px]\">\n <div className=\"flex flex-col gap-card-sm\">\n {filtered.map((item) => (\n <AI_ArtifactItem key={item.ref} item={item} onSelect={onSelect} />\n ))}\n </div>\n </ScrollArea>\n )}\n </div>\n );\n};\n\nexport const AI_ArtifactList = createCompoundPreset<AI_ArtifactListCompound>(AI_ArtifactListRoot, {\n Item: AI_ArtifactItem,\n Origin: AI_ArtifactOrigin,\n TextContent: AI_ArtifactTextContent,\n FileContent: AI_ArtifactFileContent,\n StructuredContent: AI_ArtifactStructuredContent,\n});\n"]}
1
+ {"version":3,"file":"artifact-browser.js","sourceRoot":"","sources":["../../../../../../src/components/ai-elements/artifacts/artifact-browser.tsx"],"names":[],"mappings":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EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,CAAC,GAC7E,CACL,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,SAAS,EAAC,eAAe,YACnC,cAAK,SAAS,EAAC,2BAA2B,YACvC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACtB,KAAC,eAAe,IAAgB,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,IAAxC,IAAI,CAAC,GAAG,CAAoC,CACnE,CAAC,GACE,GACK,CACd,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAA0B,mBAAmB,EAAE;IAChG,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,iBAAiB;IACzB,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,sBAAsB;IACnC,iBAAiB,EAAE,4BAA4B;CAChD,CAAC,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n Badge,\n Button,\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n InputRoot,\n ScrollArea,\n cn,\n useUI,\n useI18n,\n createCompoundPreset,\n Surface,\n AI_ArtifactListCompound,\n ButtonVariants_Variant,\n ArtifactPartKind,\n ArtifactItemData,\n AI_ArtifactOriginProps,\n AI_ArtifactTextContentProps,\n AI_ArtifactFileContentProps,\n AI_ArtifactStructuredContentProps,\n AI_ArtifactItemProps,\n AI_ArtifactListProps,\n} from '@wildo-ai/saas-frontend-lib';\n\nimport { DividerVariant, UIBehavior, SurfaceVariant, TypographyVariant, FrontendComponentType, ButtonSize } from \"@wildo-ai/presets-components-models\";\n\nconst CT: FrontendComponentType = FrontendComponentType.LOW_LEVEL_AI_ARTIFACT_BROWSER;\n\nconst TYPE_VARIANT: Record<ArtifactPartKind, \"default\" | \"secondary\" | \"outline\" | \"destructive\"> = {\n TEXT: \"default\",\n FILE: \"secondary\",\n RAW_DATA: \"outline\",\n STRUCTURED: \"outline\",\n};\n\nconst TYPE_LABEL_KEY: Record<ArtifactPartKind, string> = {\n TEXT: \"typeText\",\n FILE: \"typeFile\",\n RAW_DATA: \"typeRawData\",\n STRUCTURED: \"typeStructured\",\n};\n\nconst AI_ArtifactOrigin = ({\n origin,\n className,\n ...props\n}: AI_ArtifactOriginProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n\n if (!origin?.taskId && !origin?.stepId) return null;\n\n if (!isReady) return null;\n\n return (\n <span className={cn(\"flex items-center gap-1 text-2xs text-muted-foreground\", className)} {...props}>\n {origin.taskId && (\n <Badge variant=\"outline\" className=\"text-2xs font-mono\">\n {tComponent(CT, \"originTask\")}: {origin.taskId}\n </Badge>\n )}\n {origin.stepId && (\n <Badge variant=\"outline\" className=\"text-2xs font-mono\">\n {tComponent(CT, \"originStep\")}: {origin.stepId}\n </Badge>\n )}\n </span>\n );\n};\n\nconst AI_ArtifactTextContent = ({\n text,\n mimeType,\n className,\n ...props\n}: AI_ArtifactTextContentProps): React.JSX.Element => {\n const isCode = mimeType?.startsWith(\"text/x-\") ||\n mimeType?.startsWith(\"application/javascript\") ||\n mimeType?.startsWith(\"application/json\") ||\n mimeType?.startsWith(\"application/xml\") ||\n mimeType?.startsWith(\"text/css\") ||\n mimeType?.startsWith(\"text/html\");\n\n if (isCode) {\n return (\n <div className={cn(\"overflow-auto\", className)} {...props}>\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <pre className=\"rounded-md bg-muted p-card text-xs font-mono leading-relaxed whitespace-pre-wrap break-words\">\n {text}\n </pre>\n </Surface>\n </div>\n );\n }\n\n return (\n <div className={cn(\"overflow-auto\", className)} {...props}>\n <div className=\"text-sm leading-relaxed whitespace-pre-wrap break-words\">\n {text}\n </div>\n </div>\n );\n};\n\nfunction formatFileSize(bytes: number | undefined): string {\n if (bytes == null) return \"\";\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n}\n\nconst AI_ArtifactFileContent = ({\n filename,\n mimeType,\n size,\n url,\n path,\n className,\n ...props\n}: AI_ArtifactFileContentProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const { getRecipe } = useUI();\n const surfaceInsetRecipe = getRecipe(UIBehavior.SURFACE, SurfaceVariant.INSET);\n const isImage = mimeType?.startsWith(\"image/\");\n const isText = mimeType?.startsWith(\"text/\");\n\n if (!isReady) return null;\n\n return (\n <div className={cn(\"flex flex-col gap-card-sm\", className)} {...props}>\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <div className={cn(surfaceInsetRecipe.base, \"flex items-center justify-between rounded-md p-card-sm\")}>\n <div className=\"flex flex-col gap-1\">\n {filename && <span className=\"text-sm font-medium\">{filename}</span>}\n <div className=\"flex items-center gap-element text-2xs text-muted-foreground\">\n {mimeType && <span>{mimeType}</span>}\n {size != null && <span>{formatFileSize(size)}</span>}\n </div>\n </div>\n {url && (\n <Button variant={ButtonVariants_Variant.OUTLINE} size={ButtonSize.SM} asChild>\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\" download={filename}>\n {tComponent(CT, \"download\")}\n </a>\n </Button>\n )}\n </div>\n </Surface>\n\n {isImage && url && (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <div className=\"flex justify-center rounded-md bg-muted p-card\">\n <img\n src={url}\n alt={filename ?? tComponent(CT, \"preview\")}\n className=\"max-h-64 max-w-full rounded object-contain\"\n />\n </div>\n </Surface>\n )}\n\n {isText && !isImage && url && (\n <div className=\"text-2xs text-muted-foreground\">\n {tComponent(CT, \"preview\")}: {path ?? url}\n </div>\n )}\n </div>\n );\n};\n\nfunction JsonTreeNode({ value, depth }: { value: unknown; depth: number }): React.JSX.Element {\n // Themed nesting guide for the collapsed-branch reveal (`DIVIDER` / `NESTING_GUIDE`) — the same\n // recipe every nested disclosure uses; the `ps-4` micro-indent is this tree's own density choice.\n const { getRecipe } = useUI();\n const jsonTreeNestingGuide = getRecipe(UIBehavior.DIVIDER, DividerVariant.NESTING_GUIDE).base;\n const [expanded, setExpanded] = React.useState(depth < 2);\n\n if (value === null || value === undefined) {\n return <span className=\"text-muted-foreground italic\">null</span>;\n }\n\n if (typeof value === \"string\") {\n return <span className=\"text-success\">\"{value}\"</span>;\n }\n\n if (typeof value === \"number\" || typeof value === \"boolean\") {\n return <span className=\"text-info\">{String(value)}</span>;\n }\n\n if (Array.isArray(value)) {\n if (value.length === 0) return <span className=\"text-muted-foreground\">[]</span>;\n\n return (\n <Collapsible open={expanded} onOpenChange={setExpanded}>\n <CollapsibleTrigger asChild>\n <button type=\"button\" className=\"text-2xs text-muted-foreground hover:text-foreground\">\n [{expanded ? \"\" : `…${value.length}`}\n </button>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <div className={cn(jsonTreeNestingGuide, \"ps-4\")}>\n {value.map((item, i) => (\n <div key={i} className=\"py-px\">\n <JsonTreeNode value={item} depth={depth + 1} />\n {i < value.length - 1 && <span className=\"text-muted-foreground\">,</span>}\n </div>\n ))}\n </div>\n </CollapsibleContent>\n {expanded && <span className=\"text-2xs text-muted-foreground\">]</span>}\n </Collapsible>\n );\n }\n\n if (typeof value === \"object\") {\n const entries = Object.entries(value as Record<string, unknown>);\n if (entries.length === 0) return <span className=\"text-muted-foreground\">{\"{}\"}</span>;\n\n return (\n <Collapsible open={expanded} onOpenChange={setExpanded}>\n <CollapsibleTrigger asChild>\n <button type=\"button\" className=\"text-2xs text-muted-foreground hover:text-foreground\">\n {\"{\"}{expanded ? \"\" : `…${entries.length}`}\n </button>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <div className={cn(jsonTreeNestingGuide, \"ps-4\")}>\n {entries.map(([key, val], i) => (\n <div key={key} className=\"py-px\">\n <span className=\"text-primary me-1\">\"{key}\"</span>\n <span className=\"text-muted-foreground me-1\">:</span>\n <JsonTreeNode value={val} depth={depth + 1} />\n {i < entries.length - 1 && <span className=\"text-muted-foreground\">,</span>}\n </div>\n ))}\n </div>\n </CollapsibleContent>\n {expanded && <span className=\"text-2xs text-muted-foreground\">{\"}\"}</span>}\n </Collapsible>\n );\n }\n\n return <span>{String(value)}</span>;\n}\n\nconst AI_ArtifactStructuredContent = ({\n data,\n className,\n ...props\n}: AI_ArtifactStructuredContentProps): React.JSX.Element => (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <div className={cn(\"overflow-auto rounded-md bg-muted p-card font-mono text-xs\", className)} {...props}>\n <JsonTreeNode value={data} depth={0} />\n </div>\n </Surface>\n);\n\nfunction resolveContent(item: ArtifactItemData): React.JSX.Element {\n const content = item.content as Record<string, unknown> | undefined;\n\n switch (item.type) {\n case \"TEXT\": {\n const text = (content as { text?: string } | undefined)?.text ?? \"\";\n return <AI_ArtifactTextContent text={text} mimeType={item.mimeType} />;\n }\n case \"FILE\": {\n const storage = (content as { storage?: Record<string, unknown> } | undefined)?.storage;\n return (\n <AI_ArtifactFileContent\n filename={item.name}\n mimeType={item.mimeType}\n size={item.size}\n url={storage?.url as string | undefined}\n path={storage?.path as string | undefined}\n />\n );\n }\n case \"RAW_DATA\":\n case \"STRUCTURED\": {\n const data = (content as { data?: unknown } | undefined)?.data ?? content;\n return <AI_ArtifactStructuredContent data={data} />;\n }\n default:\n return <AI_ArtifactStructuredContent data={content} />;\n }\n}\n\nconst AI_ArtifactItem = ({\n item,\n onSelect,\n defaultExpanded = false,\n className,\n ...props\n}: AI_ArtifactItemProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const { getRecipe } = useUI();\n const surfaceRecipe = getRecipe(UIBehavior.SURFACE, SurfaceVariant.BASE);\n const descRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.DESCRIPTION);\n\n if (!isReady) return null;\n\n return (\n <Collapsible defaultOpen={defaultExpanded}>\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.BASE}>\n <div className={cn(surfaceRecipe.base, className)} {...props}>\n <CollapsibleTrigger asChild>\n <button\n type=\"button\"\n className=\"flex w-full items-center justify-between gap-element p-card-sm text-start hover:bg-muted/50\"\n onClick={() => onSelect?.(item.ref)}\n >\n <div className=\"flex flex-col gap-1 min-w-0\">\n <div className=\"flex items-center gap-element\">\n <span className=\"truncate text-sm font-medium\">{item.name}</span>\n <Badge variant={TYPE_VARIANT[item.type]} className=\"text-2xs shrink-0\">\n {tComponent(CT, TYPE_LABEL_KEY[item.type])}\n </Badge>\n </div>\n\n <div className=\"flex flex-wrap items-center gap-element\">\n <AI_ArtifactOrigin origin={item.origin} />\n {item.createdAt && (\n <span className={cn(descRecipe.base, \"text-2xs\")}>\n {new Date(item.createdAt).toLocaleString()}\n </span>\n )}\n {item.size != null && (\n <span className={cn(descRecipe.base, \"text-2xs\")}>\n {formatFileSize(item.size)}\n </span>\n )}\n </div>\n </div>\n </button>\n </CollapsibleTrigger>\n\n <CollapsibleContent>\n <div className=\"border-t p-card-sm\">\n {resolveContent(item)}\n </div>\n </CollapsibleContent>\n </div>\n </Surface>\n </Collapsible>\n );\n};\n\nconst AI_ArtifactListRoot = ({\n items,\n onSelect,\n className,\n ...props\n}: AI_ArtifactListProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const { getRecipe } = useUI();\n const descRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.DESCRIPTION);\n\n const [search, setSearch] = React.useState(\"\");\n const [typeFilter, setTypeFilter] = React.useState<ArtifactPartKind | \"ALL\">(\"ALL\");\n\n const filtered = React.useMemo(() => {\n let result = items;\n\n if (search) {\n const q = search.toLowerCase();\n result = result.filter((a) =>\n a.name.toLowerCase().includes(q) ||\n a.description?.toLowerCase().includes(q) ||\n a.ref.toLowerCase().includes(q)\n );\n }\n\n if (typeFilter !== \"ALL\") {\n result = result.filter((a) => a.type === typeFilter);\n }\n\n return result;\n }, [items, search, typeFilter]);\n\n const typeOptions: Array<ArtifactPartKind | \"ALL\"> = [\"ALL\", \"TEXT\", \"FILE\", \"RAW_DATA\", \"STRUCTURED\"];\n\n if (!isReady) return null;\n\n return (\n <div className={cn(\"flex flex-col gap-card\", className)} {...props}>\n <div className=\"flex items-center justify-between gap-element\">\n <div className=\"flex items-center gap-element\">\n <h3 className=\"text-sm font-semibold\">{tComponent(CT, \"title\")}</h3>\n <Badge variant=\"secondary\" className=\"text-2xs\">\n {tComponent(CT, \"artifactCount\", { count: String(items.length) })}\n </Badge>\n </div>\n </div>\n\n <div className=\"flex items-center gap-element\">\n <InputRoot\n type=\"text\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n placeholder={tComponent(CT, \"searchPlaceholder\")}\n className=\"flex-1 h-8 text-xs\"\n />\n {/* V-5: candidate for Button/IconButton migration — see audit doc */}\n {/* (filter pills override SM ladder rung with h-7 + text-2xs; same pattern as meta/agent.tsx) */}\n <div className=\"flex gap-1\">\n {typeOptions.map((t) => (\n <Button\n key={t}\n type=\"button\"\n variant={typeFilter === t ? ButtonVariants_Variant.SECONDARY : ButtonVariants_Variant.GHOST}\n size={ButtonSize.XS}\n onClick={() => setTypeFilter(t)}\n >\n {t === \"ALL\" ? tComponent(CT, \"allTypes\") : tComponent(CT, TYPE_LABEL_KEY[t])}\n </Button>\n ))}\n </div>\n </div>\n\n {filtered.length === 0 ? (\n <p className={cn(descRecipe.base, \"py-card text-center text-sm\")}>\n {items.length === 0 ? tComponent(CT, \"noArtifacts\") : tComponent(CT, \"noMatch\")}\n </p>\n ) : (\n <ScrollArea className=\"max-h-[600px]\">\n <div className=\"flex flex-col gap-card-sm\">\n {filtered.map((item) => (\n <AI_ArtifactItem key={item.ref} item={item} onSelect={onSelect} />\n ))}\n </div>\n </ScrollArea>\n )}\n </div>\n );\n};\n\nexport const AI_ArtifactList = createCompoundPreset<AI_ArtifactListCompound>(AI_ArtifactListRoot, {\n Item: AI_ArtifactItem,\n Origin: AI_ArtifactOrigin,\n TextContent: AI_ArtifactTextContent,\n FileContent: AI_ArtifactFileContent,\n StructuredContent: AI_ArtifactStructuredContent,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ai-elements/execution/task.tsx"],"names":[],"mappings":"AAGA,OAAO,EAeL,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAkFrC,eAAO,MAAM,OAAO,iBAKlB,CAAC"}
1
+ {"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ai-elements/execution/task.tsx"],"names":[],"mappings":"AAGA,OAAO,EAeL,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAiGrC,eAAO,MAAM,OAAO,iBAKlB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Collapsible, CollapsibleContent, CollapsibleTrigger, cn, useIconRegistry, StandardIconReference, useUI, createCompoundPreset, Surface, } from '@wildo-ai/saas-frontend-lib';
4
- import { SurfaceVariant, TypographyVariant, UIBehavior } from "@wildo-ai/presets-components-models";
4
+ import { DividerVariant, SurfaceVariant, TypographyVariant, UIBehavior } from "@wildo-ai/presets-components-models";
5
5
  const AI_TaskItemFile = ({ children, className, ...props }) => (_jsx(Surface, { asChild: true, emitPolicyVars: false, variant: SurfaceVariant.INSET, children: _jsx("div", { className: cn("inline-flex items-center gap-item-xs rounded-md border bg-secondary px-1.5 py-0.5 text-foreground text-xs", className), ...props, children: children }) }));
6
6
  const AI_TaskItem = ({ children, className, ...props }) => {
7
7
  const { getRecipe } = useUI();
@@ -15,7 +15,15 @@ const AI_TaskTrigger = ({ children, className, title, ...props }) => {
15
15
  const descRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.DESCRIPTION);
16
16
  return (_jsx(CollapsibleTrigger, { asChild: true, className: cn("group", className), ...props, children: children ?? (_jsxs("div", { className: cn("flex w-full cursor-pointer items-center gap-element transition-colors hover:text-foreground", descRecipe.base), children: [renderIcon(StandardIconReference.SEARCH, { className: "size-4" }), _jsx("p", { className: "text-sm", children: title }), renderIcon(StandardIconReference.CHEVRON_DOWN, { className: "size-4 transition-transform group-data-[state=open]:rotate-180" })] })) }));
17
17
  };
18
- const AI_TaskContent = ({ children, className, ...props }) => (_jsx(CollapsibleContent, { className: cn("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in", className), ...props, children: _jsx("div", { className: "mt-field space-y-item border-muted border-s-2 ps-card", children: children }) }));
18
+ /** The themed nesting guide for the task's revealed items — a hook because a recipe is runtime theme state. */
19
+ function useTaskNestingGuide() {
20
+ const { getRecipe } = useUI();
21
+ return getRecipe(UIBehavior.DIVIDER, DividerVariant.NESTING_GUIDE).base;
22
+ }
23
+ const AI_TaskContent = ({ children, className, ...props }) => {
24
+ const nestingGuide = useTaskNestingGuide();
25
+ return (_jsx(CollapsibleContent, { className: cn("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in", className), ...props, children: _jsx("div", { className: cn(nestingGuide, "mt-field space-y-item ps-card"), children: children }) }));
26
+ };
19
27
  export const AI_Task = createCompoundPreset(AI_TaskRoot, {
20
28
  Trigger: AI_TaskTrigger,
21
29
  Content: AI_TaskContent,
@@ -1 +1 @@
1
- {"version":3,"file":"task.js","sourceRoot":"","sources":["../../../../../../src/components/ai-elements/execution/task.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAML,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,EAAE,EACF,eAAe,EACf,qBAAqB,EACrB,KAAK,EACL,oBAAoB,EACpB,OAAO,GAER,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAyB,cAA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B,CAAC,WAAW,CAAC,CAAC;IAEnF,OAAO,CACL,KAAC,kBAAkB,IAAC,OAAO,QAAC,SAAS,EAAE,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,KAAM,KAAK,YACrE,QAAQ,IAAI,CACX,eAAK,SAAS,EAAE,EAAE,CAAC,6FAA6F,EAAE,UAAU,CAAC,IAAI,CAAC,aAC/H,UAAU,CAAC,qBAAqB,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,EAClE,YAAG,SAAS,EAAC,SAAS,YAAE,KAAK,GAAK,EACjC,UAAU,CAAC,qBAAqB,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,gEAAgE,EAAE,CAAC,IAC5H,CACP,GACkB,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACY,EAAqB,EAAE,CAAC,CAC5C,KAAC,kBAAkB,IACjB,SAAS,EAAE,EAAE,CACX,uMAAuM,EACvM,SAAS,CACV,KACG,KAAK,YAET,cAAK,SAAS,EAAC,uDAAuD,YACnE,QAAQ,GACL,GACa,CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,oBAAoB,CAAkB,WAAW,EAAE;IACxE,OAAO,EAAE,cAAc;IACvB,OAAO,EAAE,cAAc;IACvB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,eAAe;CAC1B,CAAC,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n AI_TaskProps,\n AI_TaskTriggerProps,\n AI_TaskContentProps,\n AI_TaskItemProps,\n AI_TaskItemFileProps,\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n cn,\n useIconRegistry,\n StandardIconReference,\n useUI,\n createCompoundPreset,\n Surface,\n AI_TaskCompound,\n} from '@wildo-ai/saas-frontend-lib';\n\nimport { FrontendComponentType, SurfaceVariant, TypographyVariant, UIBehavior } from \"@wildo-ai/presets-components-models\";\n\nconst AI_TaskItemFile = ({\n children,\n className,\n ...props\n}: AI_TaskItemFileProps): React.JSX.Element => (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <div\n className={cn(\n \"inline-flex items-center gap-item-xs rounded-md border bg-secondary px-1.5 py-0.5 text-foreground text-xs\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n </Surface>\n);\n\nconst AI_TaskItem = ({ children, className, ...props }: AI_TaskItemProps): React.JSX.Element => {\n const { getRecipe } = useUI();\n const descRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.DESCRIPTION);\n\n return (\n <div className={cn(descRecipe.base, className)} {...props}>\n {children}\n </div>\n );\n};\n\nconst AI_TaskRoot = ({\n defaultOpen = true,\n className,\n ...props\n}: AI_TaskProps): React.JSX.Element => (\n <Collapsible className={cn(className)} defaultOpen={defaultOpen} {...props} />\n);\n\nconst AI_TaskTrigger = ({\n children,\n className,\n title,\n ...props\n}: AI_TaskTriggerProps): React.JSX.Element => {\n const { renderIcon } = useIconRegistry();\n const { getRecipe } = useUI();\n const descRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.DESCRIPTION);\n\n return (\n <CollapsibleTrigger asChild className={cn(\"group\", className)} {...props}>\n {children ?? (\n <div className={cn(\"flex w-full cursor-pointer items-center gap-element transition-colors hover:text-foreground\", descRecipe.base)}>\n {renderIcon(StandardIconReference.SEARCH, { className: \"size-4\" })}\n <p className=\"text-sm\">{title}</p>\n {renderIcon(StandardIconReference.CHEVRON_DOWN, { className: \"size-4 transition-transform group-data-[state=open]:rotate-180\" })}\n </div>\n )}\n </CollapsibleTrigger>\n );\n};\n\nconst AI_TaskContent = ({\n children,\n className,\n ...props\n}: AI_TaskContentProps): React.JSX.Element => (\n <CollapsibleContent\n className={cn(\n \"data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in\",\n className\n )}\n {...props}\n >\n <div className=\"mt-field space-y-item border-muted border-s-2 ps-card\">\n {children}\n </div>\n </CollapsibleContent>\n);\n\nexport const AI_Task = createCompoundPreset<AI_TaskCompound>(AI_TaskRoot, {\n Trigger: AI_TaskTrigger,\n Content: AI_TaskContent,\n Item: AI_TaskItem,\n ItemFile: AI_TaskItemFile,\n});\n"]}
1
+ {"version":3,"file":"task.js","sourceRoot":"","sources":["../../../../../../src/components/ai-elements/execution/task.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAML,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,EAAE,EACF,eAAe,EACf,qBAAqB,EACrB,KAAK,EACL,oBAAoB,EACpB,OAAO,GAER,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,cAAc,EAAyB,cAAc,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAE3I,MAAM,eAAe,GAAG,CAAC,EACvB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACa,EAAqB,EAAE,CAAC,CAC7C,KAAC,OAAO,IAAC,OAAO,QAAC,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,KAAK,YACnE,cACE,SAAS,EAAE,EAAE,CACX,2GAA2G,EAC3G,SAAS,CACV,KACG,KAAK,YAER,QAAQ,GACL,GACE,CACX,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoB,EAAqB,EAAE;IAC7F,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,CAAC;IAC9B,MAAM,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC,UAAU,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAEnF,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,KAAM,KAAK,YACtD,QAAQ,GAC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c,GAAG,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACY,EAAqB,EAAE;IAC3C,MAAM,YAAY,GAAG,mBAAmB,EAAE,CAAA;IAC1C,OAAO,CACP,KAAC,kBAAkB,IACjB,SAAS,EAAE,EAAE,CACX,uMAAuM,EACvM,SAAS,CACV,KACG,KAAK,YAOT,cAAK,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,+BAA+B,CAAC,YAC9D,QAAQ,GACL,GACa,CACpB,CAAA;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,oBAAoB,CAAkB,WAAW,EAAE;IACxE,OAAO,EAAE,cAAc;IACvB,OAAO,EAAE,cAAc;IACvB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,eAAe;CAC1B,CAAC,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n AI_TaskProps,\n AI_TaskTriggerProps,\n AI_TaskContentProps,\n AI_TaskItemProps,\n AI_TaskItemFileProps,\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n cn,\n useIconRegistry,\n StandardIconReference,\n useUI,\n createCompoundPreset,\n Surface,\n AI_TaskCompound,\n} from '@wildo-ai/saas-frontend-lib';\n\nimport { DividerVariant, FrontendComponentType, SurfaceVariant, TypographyVariant, UIBehavior } from \"@wildo-ai/presets-components-models\";\n\nconst AI_TaskItemFile = ({\n children,\n className,\n ...props\n}: AI_TaskItemFileProps): React.JSX.Element => (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <div\n className={cn(\n \"inline-flex items-center gap-item-xs rounded-md border bg-secondary px-1.5 py-0.5 text-foreground text-xs\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n </Surface>\n);\n\nconst AI_TaskItem = ({ children, className, ...props }: AI_TaskItemProps): React.JSX.Element => {\n const { getRecipe } = useUI();\n const descRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.DESCRIPTION);\n\n return (\n <div className={cn(descRecipe.base, className)} {...props}>\n {children}\n </div>\n );\n};\n\nconst AI_TaskRoot = ({\n defaultOpen = true,\n className,\n ...props\n}: AI_TaskProps): React.JSX.Element => (\n <Collapsible className={cn(className)} defaultOpen={defaultOpen} {...props} />\n);\n\nconst AI_TaskTrigger = ({\n children,\n className,\n title,\n ...props\n}: AI_TaskTriggerProps): React.JSX.Element => {\n const { renderIcon } = useIconRegistry();\n const { getRecipe } = useUI();\n const descRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.DESCRIPTION);\n\n return (\n <CollapsibleTrigger asChild className={cn(\"group\", className)} {...props}>\n {children ?? (\n <div className={cn(\"flex w-full cursor-pointer items-center gap-element transition-colors hover:text-foreground\", descRecipe.base)}>\n {renderIcon(StandardIconReference.SEARCH, { className: \"size-4\" })}\n <p className=\"text-sm\">{title}</p>\n {renderIcon(StandardIconReference.CHEVRON_DOWN, { className: \"size-4 transition-transform group-data-[state=open]:rotate-180\" })}\n </div>\n )}\n </CollapsibleTrigger>\n );\n};\n\n\n/** The themed nesting guide for the task's revealed items — a hook because a recipe is runtime theme state. */\nfunction useTaskNestingGuide(): string | undefined {\n const { getRecipe } = useUI()\n return getRecipe(UIBehavior.DIVIDER, DividerVariant.NESTING_GUIDE).base\n}\n\nconst AI_TaskContent = ({\n children,\n className,\n ...props\n}: AI_TaskContentProps): React.JSX.Element => {\n const nestingGuide = useTaskNestingGuide()\n return (\n <CollapsibleContent\n className={cn(\n \"data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in\",\n className\n )}\n {...props}\n >\n {/*\n * The nested-items guide comes from the theme (`DIVIDER` / `NESTING_GUIDE`) rather than the\n * hand-rolled `border-muted border-s-2` it used to be — one meaning, one recipe, restylable per\n * theme. The `ps-card` indent is this component's own structural choice and stays.\n */}\n <div className={cn(nestingGuide, \"mt-field space-y-item ps-card\")}>\n {children}\n </div>\n </CollapsibleContent>\n )\n};\n\nexport const AI_Task = createCompoundPreset<AI_TaskCompound>(AI_TaskRoot, {\n Trigger: AI_TaskTrigger,\n Content: AI_TaskContent,\n Item: AI_TaskItem,\n ItemFile: AI_TaskItemFile,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"app-layout-main-container.labels.d.ts","sourceRoot":"","sources":["../../../../../src/components/app/app-layout-main-container.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,mBAAmB,EAA2B,MAAM,qCAAqC,CAAC;AAM/H,eAAO,MAAM,6BAA6B,EAAE,mBAAmB,EAAO,CAAC"}
1
+ {"version":3,"file":"app-layout-main-container.labels.d.ts","sourceRoot":"","sources":["../../../../../src/components/app/app-layout-main-container.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,mBAAmB,EAA2B,MAAM,qCAAqC,CAAC;AAM1I,eAAO,MAAM,6BAA6B,EAAE,mBAAmB,EAS9D,CAAC"}
@@ -1,7 +1,15 @@
1
- import { FrontendComponentType, registerComponentLabels } from '@wildo-ai/presets-components-models';
1
+ import { FrontendComponentType, LabelKind, registerComponentLabels } from '@wildo-ai/presets-components-models';
2
2
  // Companion-only label metadata for this component: keys + params + (where
3
3
  // authored) per-key purpose / kind / variable meaning. Statically scanned by
4
4
  // the dev companion; NOT imported at runtime, so it never ships in the bundle.
5
- export const AppLayoutsMainContainerLabels = [];
5
+ export const AppLayoutsMainContainerLabels = [
6
+ {
7
+ ref: 'zoneEmptyState',
8
+ kind: LabelKind.EMPTY_STATE,
9
+ purpose: 'Shown in an adjacent content zone (detail / companion pane) that a layout keeps VISIBLE while '
10
+ + 'empty via onEmpty: EMPTY_STATE — tells the reader the pane is waiting for a selection rather '
11
+ + 'than broken. Not shown when the zone collapses instead.',
12
+ },
13
+ ];
6
14
  registerComponentLabels(FrontendComponentType.APP_LAYOUTS_MAIN_CONTAINER, AppLayoutsMainContainerLabels);
7
15
  //# sourceMappingURL=app-layout-main-container.labels.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-layout-main-container.labels.js","sourceRoot":"","sources":["../../../../../src/components/app/app-layout-main-container.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAA4B,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE/H,2EAA2E;AAC3E,6EAA6E;AAC7E,+EAA+E;AAE/E,MAAM,CAAC,MAAM,6BAA6B,GAA0B,EAAE,CAAC;AACvE,uBAAuB,CAAC,qBAAqB,CAAC,0BAA0B,EAAE,6BAA6B,CAAC,CAAC","sourcesContent":["import { FrontendComponentType, type LabellingUnitaryDef, registerComponentLabels } from '@wildo-ai/presets-components-models';\n\n// Companion-only label metadata for this component: keys + params + (where\n// authored) per-key purpose / kind / variable meaning. Statically scanned by\n// the dev companion; NOT imported at runtime, so it never ships in the bundle.\n\nexport const AppLayoutsMainContainerLabels: LabellingUnitaryDef[] = [];\nregisterComponentLabels(FrontendComponentType.APP_LAYOUTS_MAIN_CONTAINER, AppLayoutsMainContainerLabels);\n"]}
1
+ {"version":3,"file":"app-layout-main-container.labels.js","sourceRoot":"","sources":["../../../../../src/components/app/app-layout-main-container.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAA4B,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE1I,2EAA2E;AAC3E,6EAA6E;AAC7E,+EAA+E;AAE/E,MAAM,CAAC,MAAM,6BAA6B,GAA0B;IAClE;QACE,GAAG,EAAE,gBAAgB;QACrB,IAAI,EAAE,SAAS,CAAC,WAAW;QAC3B,OAAO,EACL,gGAAgG;cAC9F,+FAA+F;cAC/F,yDAAyD;KAC9D;CACF,CAAC;AACF,uBAAuB,CAAC,qBAAqB,CAAC,0BAA0B,EAAE,6BAA6B,CAAC,CAAC","sourcesContent":["import { FrontendComponentType, LabelKind, type LabellingUnitaryDef, registerComponentLabels } from '@wildo-ai/presets-components-models';\n\n// Companion-only label metadata for this component: keys + params + (where\n// authored) per-key purpose / kind / variable meaning. Statically scanned by\n// the dev companion; NOT imported at runtime, so it never ships in the bundle.\n\nexport const AppLayoutsMainContainerLabels: LabellingUnitaryDef[] = [\n {\n ref: 'zoneEmptyState',\n kind: LabelKind.EMPTY_STATE,\n purpose:\n 'Shown in an adjacent content zone (detail / companion pane) that a layout keeps VISIBLE while '\n + 'empty via onEmpty: EMPTY_STATE — tells the reader the pane is waiting for a selection rather '\n + 'than broken. Not shown when the zone collapses instead.',\n },\n];\nregisterComponentLabels(FrontendComponentType.APP_LAYOUTS_MAIN_CONTAINER, AppLayoutsMainContainerLabels);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"public-layout-main-container.d.ts","sourceRoot":"","sources":["../../../../../src/components/app/public-layout-main-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,6CAA6C,EAO9C,MAAM,6BAA6B,CAAC;AAIrC,eAAO,MAAM,wCAAwC,GAAI,wCAItD,6CAA6C,KAAG,KAAK,CAAC,GAAG,CAAC,OA0C5D,CAAC"}
1
+ {"version":3,"file":"public-layout-main-container.d.ts","sourceRoot":"","sources":["../../../../../src/components/app/public-layout-main-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,6CAA6C,EAU9C,MAAM,6BAA6B,CAAC;AAuErC,eAAO,MAAM,wCAAwC,GAAI,wCAItD,6CAA6C,KAAG,KAAK,CAAC,GAAG,CAAC,OAoD5D,CAAC"}
@@ -1,10 +1,57 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Card, CardContent, usePublicShellLayout, cn, NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE, Surface, } from '@wildo-ai/saas-frontend-lib';
3
- import { SurfaceVariant } from "@wildo-ai/presets-components-models";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Card, CardContent, usePublicShellLayout, useBrandPresentation, useUI, cn, NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE, Surface, } from '@wildo-ai/saas-frontend-lib';
3
+ import { SurfaceVariant, TypographyVariant, UIBehavior } from "@wildo-ai/presets-components-models";
4
+ /**
5
+ * The surface's identity, at the top of the public card.
6
+ *
7
+ * Rendered ONLY when the application opted in (`publicShellIdentityMode`) — `usePublicShellLayout`
8
+ * gates that, so reaching this component at all is the permission. What it draws is decided from the
9
+ * DATA, and each branch is a defect that would otherwise ship silently:
10
+ *
11
+ * - a WORDMARK/LOCKUP already contains the name, so the name label is dropped rather than printed
12
+ * twice — the brand resolver returns one for an application that generated no symbol;
13
+ * - a mark whose URL 404s degrades to the name alone instead of a browser broken-image glyph;
14
+ * - an identity with neither mark nor name renders nothing, not an empty gap above the card.
15
+ *
16
+ * The height is RESERVED rather than left to the image. A login card that jumps downward when a logo
17
+ * finishes loading is the "glitch" this feature is most likely to introduce, and it is worst exactly
18
+ * where it is most visible: a cold load on a slow link, which is the first impression the page
19
+ * exists to make. The `h-14` box is fixed and `w-auto` lets a wide lockup keep its aspect ratio
20
+ * inside it — sized against the name beneath rather than picked in the abstract, so mark and name
21
+ * read as one unit (hence the tighter `gap-element-sm` between them, and the wider `mb-group` below
22
+ * the pair).
23
+ *
24
+ * ## Why the name is styled from the recipe and is NOT a heading
25
+ *
26
+ * The type comes from the design system's `TYPOGRAPHY.HEADING` recipe rather than from classes
27
+ * chosen here, so an application that restyles its headings restyles this too — the same thing
28
+ * `CardTitle` does, and the reason it is worth a hook call for one line of text. `h1` SIZE — the top
29
+ * of the design system's ordinary ladder — because the identity is what the card is opening with; at
30
+ * `h2` it rendered visibly smaller than the action heading beneath it and read as a caption on the
31
+ * logo rather than as the product's name. Measured on a screenshot, not reasoned about.
32
+ *
33
+ * It renders as a `<p>`, not a heading, because `Auth_Main` already emits the page's `<h1>` inside
34
+ * this same card. A second one would give the document two competing top-level headings; the recipe
35
+ * supplies the LOOK while the outline stays owned by the content.
36
+ */
37
+ const PublicShellBrandHeader = ({ identity }) => {
38
+ const { name, logoUrl, hasMark, markCarriesName, isEmpty, onMarkError } = useBrandPresentation(identity);
39
+ const { getRecipe } = useUI();
40
+ const headingRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.HEADING);
41
+ if (isEmpty)
42
+ return null;
43
+ return (_jsxs("div", { className: "flex flex-col items-center gap-element-sm mb-group", children: [hasMark && (_jsx("div", { className: "flex h-14 items-center justify-center", children: _jsx("img", { src: logoUrl,
44
+ /*
45
+ * A mark that CARRIES the name is the only thing announcing it, so it is the accessible
46
+ * name. A symbol sits beside the name text below and is decorative — announcing it too
47
+ * would read the product name twice to a screen reader.
48
+ */
49
+ alt: markCarriesName ? name : '', "aria-hidden": markCarriesName ? undefined : 'true', onError: onMarkError, className: "max-h-14 w-auto object-contain" }) })), !markCarriesName && name !== '' && (_jsx("p", { className: cn(headingRecipe.base, headingRecipe.sizes?.h1 ?? 'text-3xl', 'text-center text-foreground'), children: name }))] }));
50
+ };
4
51
  export const PublicLayoutPreset_MainContainer_Default = ({ children = null, useCardLayout = false, className = "" }) => {
5
- usePublicShellLayout(useCardLayout);
52
+ const { brandHeader } = usePublicShellLayout(useCardLayout);
6
53
  if (useCardLayout) {
7
- return (_jsx(Surface, { asChild: true, emitPolicyVars: false, variant: SurfaceVariant.SHELL, policyOverride: NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE, children: _jsx("div", { className: "h-screen w-screen overflow-auto", children: _jsx("div", { className: "min-h-full flex items-center justify-center p-container", children: _jsx(Card, { className: cn('w-full max-w-md', className), policyOverride: { a11y: { landmarkRole: 'none' } }, children: _jsx(CardContent, { className: "p-container-xl", children: children }) }) }) }) }));
54
+ return (_jsx(Surface, { asChild: true, emitPolicyVars: false, variant: SurfaceVariant.SHELL, policyOverride: NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE, children: _jsx("div", { className: "h-screen w-screen overflow-auto", children: _jsx("div", { className: "min-h-full flex items-center justify-center p-container", children: _jsx(Card, { className: cn('w-full max-w-md', className), policyOverride: { a11y: { landmarkRole: 'none' } }, children: _jsxs(CardContent, { className: "p-container-xl", children: [brandHeader && _jsx(PublicShellBrandHeader, { identity: brandHeader }), children] }) }) }) }) }));
8
55
  }
9
56
  return (_jsx(Surface, { asChild: true, emitPolicyVars: false, variant: SurfaceVariant.SHELL, policyOverride: NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE, children: _jsx("div", { className: cn('h-screen w-screen overflow-auto', className), children: _jsx("main", { className: "min-h-full py-section", children: _jsx("div", { className: "max-w-7xl mx-auto px-card sm:px-container lg:px-container-lg", children: children }) }) }) }));
10
57
  };
@@ -1 +1 @@
1
- {"version":3,"file":"public-layout-main-container.js","sourceRoot":"","sources":["../../../../../src/components/app/public-layout-main-container.tsx"],"names":[],"mappings":";AAEA,OAAO,EAEL,IAAI,EACJ,WAAW,EACX,oBAAoB,EACpB,EAAE,EACF,2CAA2C,EAC3C,OAAO,GACR,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAyB,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAE3F,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,EACvD,QAAQ,GAAG,IAAI,EACf,aAAa,GAAG,KAAK,EACrB,SAAS,GAAG,EAAE,EACgC,EAAqB,EAAE;IAErE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAEpC,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,CACL,KAAC,OAAO,IAAC,OAAO,QAAC,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,KAAK,EAAE,cAAc,EAAE,2CAA2C,YAChI,cAAK,SAAS,EAAC,iCAAiC,YAC9C,cAAK,SAAS,EAAC,yDAAyD,YAStE,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,EAC3C,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,YAElD,KAAC,WAAW,IAAC,SAAS,EAAC,gBAAgB,YACpC,QAAQ,GACG,GACT,GACH,GACF,GACE,CACX,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,OAAO,IAAC,OAAO,QAAC,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,KAAK,EAAE,cAAc,EAAE,2CAA2C,YAChI,cAAK,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,SAAS,CAAC,YAC9D,eAAM,SAAS,EAAC,uBAAuB,YACrC,cAAK,SAAS,EAAC,8DAA8D,YAC1E,QAAQ,GACL,GACD,GACH,GACE,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport {\n PublicLayoutPreset_MainContainer_DefaultProps,\n Card,\n CardContent,\n usePublicShellLayout,\n cn,\n NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE,\n Surface,\n} from '@wildo-ai/saas-frontend-lib';\n\nimport { FrontendComponentType, SurfaceVariant } from \"@wildo-ai/presets-components-models\"\n\nexport const PublicLayoutPreset_MainContainer_Default = ({\n children = null,\n useCardLayout = false,\n className = \"\"\n}: PublicLayoutPreset_MainContainer_DefaultProps): React.JSX.Element => {\n\n usePublicShellLayout(useCardLayout);\n\n if (useCardLayout) {\n return (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div className=\"h-screen w-screen overflow-auto\">\n <div className=\"min-h-full flex items-center justify-center p-container\">\n {/*\n `landmarkRole: 'none'` opts this card out of the BASE variant's\n default `region` landmark. The card here is presentational\n chrome wrapping the public-auth panel — it doesn't represent a\n distinct semantic region on the page. Without the override the\n card would emit `role=\"region\"` without a label (no header,\n no aria-label) and the framework would warn on every render.\n */}\n <Card\n className={cn('w-full max-w-md', className)}\n policyOverride={{ a11y: { landmarkRole: 'none' } }}\n >\n <CardContent className=\"p-container-xl\">\n {children}\n </CardContent>\n </Card>\n </div>\n </div>\n </Surface>\n );\n }\n\n return (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div className={cn('h-screen w-screen overflow-auto', className)}>\n <main className=\"min-h-full py-section\">\n <div className=\"max-w-7xl mx-auto px-card sm:px-container lg:px-container-lg\">\n {children}\n </div>\n </main>\n </div>\n </Surface>\n );\n};\n"]}
1
+ {"version":3,"file":"public-layout-main-container.js","sourceRoot":"","sources":["../../../../../src/components/app/public-layout-main-container.tsx"],"names":[],"mappings":";AAEA,OAAO,EAEL,IAAI,EACJ,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,KAAK,EACL,EAAE,EACF,2CAA2C,EAC3C,OAAO,GAER,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAyB,cAAc,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAE1H;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,sBAAsB,GAAG,CAAC,EAAE,QAAQ,EAA+B,EAA4B,EAAE;IACrG,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACzG,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,CAAC;IAC9B,MAAM,aAAa,GAAG,SAAS,CAAC,UAAU,CAAC,UAAU,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAElF,IAAI,OAAO;QAAE,OAAO,IAAI,CAAC;IAEzB,OAAO,CACL,eAAK,SAAS,EAAC,oDAAoD,aAChE,OAAO,IAAI,CACV,cAAK,SAAS,EAAC,uCAAuC,YACpD,cACE,GAAG,EAAE,OAAO;oBACZ;;;;uBAIG;oBACH,GAAG,EAAE,eAAe,CAAC,CAAC,CAAC,IAAI,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Ac,EAAE,2CAA2C,YAChI,cAAK,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,SAAS,CAAC,YAC9D,eAAM,SAAS,EAAC,uBAAuB,YACrC,cAAK,SAAS,EAAC,8DAA8D,YAC1E,QAAQ,GACL,GACD,GACH,GACE,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport {\n PublicLayoutPreset_MainContainer_DefaultProps,\n Card,\n CardContent,\n usePublicShellLayout,\n useBrandPresentation,\n useUI,\n cn,\n NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE,\n Surface,\n type BrandIdentity,\n} from '@wildo-ai/saas-frontend-lib';\n\nimport { FrontendComponentType, SurfaceVariant, TypographyVariant, UIBehavior } from \"@wildo-ai/presets-components-models\"\n\n/**\n * The surface's identity, at the top of the public card.\n *\n * Rendered ONLY when the application opted in (`publicShellIdentityMode`) — `usePublicShellLayout`\n * gates that, so reaching this component at all is the permission. What it draws is decided from the\n * DATA, and each branch is a defect that would otherwise ship silently:\n *\n * - a WORDMARK/LOCKUP already contains the name, so the name label is dropped rather than printed\n * twice — the brand resolver returns one for an application that generated no symbol;\n * - a mark whose URL 404s degrades to the name alone instead of a browser broken-image glyph;\n * - an identity with neither mark nor name renders nothing, not an empty gap above the card.\n *\n * The height is RESERVED rather than left to the image. A login card that jumps downward when a logo\n * finishes loading is the \"glitch\" this feature is most likely to introduce, and it is worst exactly\n * where it is most visible: a cold load on a slow link, which is the first impression the page\n * exists to make. The `h-14` box is fixed and `w-auto` lets a wide lockup keep its aspect ratio\n * inside it — sized against the name beneath rather than picked in the abstract, so mark and name\n * read as one unit (hence the tighter `gap-element-sm` between them, and the wider `mb-group` below\n * the pair).\n *\n * ## Why the name is styled from the recipe and is NOT a heading\n *\n * The type comes from the design system's `TYPOGRAPHY.HEADING` recipe rather than from classes\n * chosen here, so an application that restyles its headings restyles this too — the same thing\n * `CardTitle` does, and the reason it is worth a hook call for one line of text. `h1` SIZE — the top\n * of the design system's ordinary ladder — because the identity is what the card is opening with; at\n * `h2` it rendered visibly smaller than the action heading beneath it and read as a caption on the\n * logo rather than as the product's name. Measured on a screenshot, not reasoned about.\n *\n * It renders as a `<p>`, not a heading, because `Auth_Main` already emits the page's `<h1>` inside\n * this same card. A second one would give the document two competing top-level headings; the recipe\n * supplies the LOOK while the outline stays owned by the content.\n */\nconst PublicShellBrandHeader = ({ identity }: { identity: BrandIdentity }): React.JSX.Element | null => {\n const { name, logoUrl, hasMark, markCarriesName, isEmpty, onMarkError } = useBrandPresentation(identity);\n const { getRecipe } = useUI();\n const headingRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.HEADING);\n\n if (isEmpty) return null;\n\n return (\n <div className=\"flex flex-col items-center gap-element-sm mb-group\">\n {hasMark && (\n <div className=\"flex h-14 items-center justify-center\">\n <img\n src={logoUrl}\n /*\n * A mark that CARRIES the name is the only thing announcing it, so it is the accessible\n * name. A symbol sits beside the name text below and is decorative — announcing it too\n * would read the product name twice to a screen reader.\n */\n alt={markCarriesName ? name : ''}\n aria-hidden={markCarriesName ? undefined : 'true'}\n onError={onMarkError}\n className=\"max-h-14 w-auto object-contain\"\n />\n </div>\n )}\n {!markCarriesName && name !== '' && (\n <p className={cn(headingRecipe.base, headingRecipe.sizes?.h1 ?? 'text-3xl', 'text-center text-foreground')}>\n {name}\n </p>\n )}\n </div>\n );\n};\n\nexport const PublicLayoutPreset_MainContainer_Default = ({\n children = null,\n useCardLayout = false,\n className = \"\"\n}: PublicLayoutPreset_MainContainer_DefaultProps): React.JSX.Element => {\n\n const { brandHeader } = usePublicShellLayout(useCardLayout);\n\n if (useCardLayout) {\n return (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div className=\"h-screen w-screen overflow-auto\">\n <div className=\"min-h-full flex items-center justify-center p-container\">\n {/*\n `landmarkRole: 'none'` opts this card out of the BASE variant's\n default `region` landmark. The card here is presentational\n chrome wrapping the public-auth panel — it doesn't represent a\n distinct semantic region on the page. Without the override the\n card would emit `role=\"region\"` without a label (no header,\n no aria-label) and the framework would warn on every render.\n */}\n <Card\n className={cn('w-full max-w-md', className)}\n policyOverride={{ a11y: { landmarkRole: 'none' } }}\n >\n <CardContent className=\"p-container-xl\">\n {/*\n The identity sits INSIDE the card, above the form's own heading — so the box reads\n as one object (\"this is <product>, sign in\") rather than as a card with a caption\n floating over it.\n\n Only the CARD branch carries it. The other branch is the wide static-content layout\n (terms, legal pages), which is reached with the application's chrome around it and\n does not ask \"sign in to what\".\n */}\n {brandHeader && <PublicShellBrandHeader identity={brandHeader} />}\n {children}\n </CardContent>\n </Card>\n </div>\n </div>\n </Surface>\n );\n }\n\n return (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div className={cn('h-screen w-screen overflow-auto', className)}>\n <main className=\"min-h-full py-section\">\n <div className=\"max-w-7xl mx-auto px-card sm:px-container lg:px-container-lg\">\n {children}\n </div>\n </main>\n </div>\n </Surface>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"description-list.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/description-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAgBhH;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqBhH;AAED,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmBnH"}
1
+ {"version":3,"file":"description-list.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/description-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAgBhH;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAwBhH;AAED,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAenH"}
@@ -13,24 +13,27 @@ export function DescriptionList({ className, ...props }) {
13
13
  export function DescriptionTerm({ className, ...props }) {
14
14
  const { getRecipe } = useUI();
15
15
  const descRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.DESCRIPTION);
16
- const dividerRecipe = getRecipe(UIBehavior.DIVIDER);
17
16
  return (_jsx("dt", { ...props, className: cn(
18
17
  // Structure
19
18
  'col-start-1 pt-group first:border-none sm:py-group',
20
19
  // Style — term uses description color (muted)
21
20
  descRecipe.base,
22
- // Divider between items
23
- 'border-t', dividerRecipe.base, 'sm:border-t', className) }));
21
+ /*
22
+ * A plain `border-t`, NOT the divider recipe. The DIVIDER recipe's base is a background
23
+ * FILL (`bg-border` and per-theme variants) for elements that ARE the line — Separator, menu
24
+ * rules. Composed onto a whole `<dt>` it painted every term cell as a filled gray box, which
25
+ * is what the "default field view" looked like until 2026-09-01. The hairline's color comes
26
+ * from the design system's base rule (`* { border-color: var(--border) }`).
27
+ */
28
+ 'border-t sm:border-t', className) }));
24
29
  }
25
30
  export function DescriptionDetails({ className, ...props }) {
26
- const { getRecipe } = useUI();
27
- const dividerRecipe = getRecipe(UIBehavior.DIVIDER);
28
31
  return (_jsx("dd", { ...props, className: cn(
29
32
  // Structure
30
33
  'pt-item pb-group sm:py-group sm:nth-2:border-none',
31
34
  // Style — value text
32
35
  'text-foreground',
33
- // Divider between items
34
- 'sm:border-t', dividerRecipe.base, className) }));
36
+ // Same rule as DescriptionTerm: a hairline, never the divider recipe's FILL.
37
+ 'sm:border-t', className) }));
35
38
  }
36
39
  //# sourceMappingURL=description-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"description-list.js","sourceRoot":"","sources":["../../../../../src/components/data-display/description-list.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAyB,iBAAiB,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAE1G,MAAM,UAAU,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAwC;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,CAAA;IAC7B,MAAM,MAAM,GAAG,SAAS,CAAC,UAAU,CAAC,UAAU,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAEvE,OAAO,CACL,gBACM,KAAK,EACT,SAAS,EAAE,EAAE;QACX,YAAY;QACZ,6DAA6D;QAC7D,oCAAoC;QACpC,MAAM,CAAC,IAAI,EACX,SAAS,CACV,GACD,CACH,CAAA;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAwC;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,CAAA;IAC7B,MAAM,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC,UAAU,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAClF,MAAM,aAAa,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;IAEnD,OAAO,CACL,gBACM,KAAK,EACT,SAAS,EAAE,EAAE;QACX,YAAY;QACZ,oDAAoD;QACpD,8CAA8C;QAC9C,UAAU,CAAC,IAAI;QACf,wBAAwB;QACxB,UAAU,EACV,aAAa,CAAC,IAAI,EAClB,aAAa,EACb,SAAS,CACV,GACD,CACH,CAAA;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAwC;IAC9F,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,CAAA;IAC7B,MAAM,aAAa,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;IAEnD,OAAO,CACL,gBACM,KAAK,EACT,SAAS,EAAE,EAAE;QACX,YAAY;QACZ,mDAAmD;QACnD,qBAAqB;QACrB,iBAAiB;QACjB,wBAAwB;QACxB,aAAa,EACb,aAAa,CAAC,IAAI,EAClB,SAAS,CACV,GACD,CACH,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport { cn, useUI } from '@wildo-ai/saas-frontend-lib'\nimport { FrontendComponentType, TypographyVariant, UIBehavior } from '@wildo-ai/presets-components-models'\n\nexport function DescriptionList({ className, ...props }: React.ComponentPropsWithoutRef<'dl'>): React.JSX.Element {\n const { getRecipe } = useUI()\n const recipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.BODY)\n\n return (\n <dl\n {...props}\n className={cn(\n // Structure\n 'grid grid-cols-1 sm:grid-cols-[min(50%,--spacing(80))_auto]',\n // Style from TYPOGRAPHY.BODY recipe\n recipe.base,\n className\n )}\n />\n )\n}\n\nexport function DescriptionTerm({ className, ...props }: React.ComponentPropsWithoutRef<'dt'>): React.JSX.Element {\n const { getRecipe } = useUI()\n const descRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.DESCRIPTION)\n const dividerRecipe = getRecipe(UIBehavior.DIVIDER)\n\n return (\n <dt\n {...props}\n className={cn(\n // Structure\n 'col-start-1 pt-group first:border-none sm:py-group',\n // Style — term uses description color (muted)\n descRecipe.base,\n // Divider between items\n 'border-t',\n dividerRecipe.base,\n 'sm:border-t',\n className\n )}\n />\n )\n}\n\nexport function DescriptionDetails({ className, ...props }: React.ComponentPropsWithoutRef<'dd'>): React.JSX.Element {\n const { getRecipe } = useUI()\n const dividerRecipe = getRecipe(UIBehavior.DIVIDER)\n\n return (\n <dd\n {...props}\n className={cn(\n // Structure\n 'pt-item pb-group sm:py-group sm:nth-2:border-none',\n // Style — value text\n 'text-foreground',\n // Divider between items\n 'sm:border-t',\n dividerRecipe.base,\n className\n )}\n />\n )\n}\n"]}
1
+ {"version":3,"file":"description-list.js","sourceRoot":"","sources":["../../../../../src/components/data-display/description-list.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAyB,iBAAiB,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAE1G,MAAM,UAAU,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAwC;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,CAAA;IAC7B,MAAM,MAAM,GAAG,SAAS,CAAC,UAAU,CAAC,UAAU,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAEvE,OAAO,CACL,gBACM,KAAK,EACT,SAAS,EAAE,EAAE;QACX,YAAY;QACZ,6DAA6D;QAC7D,oCAAoC;QACpC,MAAM,CAAC,IAAI,EACX,SAAS,CACV,GACD,CACH,CAAA;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAwC;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,CAAA;IAC7B,MAAM,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC,UAAU,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAElF,OAAO,CACL,gBACM,KAAK,EACT,SAAS,EAAE,EAAE;QACX,YAAY;QACZ,oDAAoD;QACpD,8CAA8C;QAC9C,UAAU,CAAC,IAAI;QACf;;;;;;WAMG;QACH,sBAAsB,EACtB,SAAS,CACV,GACD,CACH,CAAA;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAwC;IAC9F,OAAO,CACL,gBACM,KAAK,EACT,SAAS,EAAE,EAAE;QACX,YAAY;QACZ,mDAAmD;QACnD,qBAAqB;QACrB,iBAAiB;QACjB,6EAA6E;QAC7E,aAAa,EACb,SAAS,CACV,GACD,CACH,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport { cn, useUI } from '@wildo-ai/saas-frontend-lib'\nimport { FrontendComponentType, TypographyVariant, UIBehavior } from '@wildo-ai/presets-components-models'\n\nexport function DescriptionList({ className, ...props }: React.ComponentPropsWithoutRef<'dl'>): React.JSX.Element {\n const { getRecipe } = useUI()\n const recipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.BODY)\n\n return (\n <dl\n {...props}\n className={cn(\n // Structure\n 'grid grid-cols-1 sm:grid-cols-[min(50%,--spacing(80))_auto]',\n // Style from TYPOGRAPHY.BODY recipe\n recipe.base,\n className\n )}\n />\n )\n}\n\nexport function DescriptionTerm({ className, ...props }: React.ComponentPropsWithoutRef<'dt'>): React.JSX.Element {\n const { getRecipe } = useUI()\n const descRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.DESCRIPTION)\n\n return (\n <dt\n {...props}\n className={cn(\n // Structure\n 'col-start-1 pt-group first:border-none sm:py-group',\n // Style — term uses description color (muted)\n descRecipe.base,\n /*\n * A plain `border-t`, NOT the divider recipe. The DIVIDER recipe's base is a background\n * FILL (`bg-border` and per-theme variants) for elements that ARE the line — Separator, menu\n * rules. Composed onto a whole `<dt>` it painted every term cell as a filled gray box, which\n * is what the \"default field view\" looked like until 2026-09-01. The hairline's color comes\n * from the design system's base rule (`* { border-color: var(--border) }`).\n */\n 'border-t sm:border-t',\n className\n )}\n />\n )\n}\n\nexport function DescriptionDetails({ className, ...props }: React.ComponentPropsWithoutRef<'dd'>): React.JSX.Element {\n return (\n <dd\n {...props}\n className={cn(\n // Structure\n 'pt-item pb-group sm:py-group sm:nth-2:border-none',\n // Style — value text\n 'text-foreground',\n // Same rule as DescriptionTerm: a hairline, never the divider recipe's FILL.\n 'sm:border-t',\n className\n )}\n />\n )\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"display-field-string.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-display/formatters/display-field-string.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAI1E;;;;GAIG;AACH,iBAAS,kBAAkB,CAAC,EAC1B,MAAM,EACN,KAAK,EACL,SAAS,GACV,EAAE,uBAAuB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAgKpD;AAID,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
1
+ {"version":3,"file":"display-field-string.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-display/formatters/display-field-string.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAI1E;;;;GAIG;AACH,iBAAS,kBAAkB,CAAC,EAC1B,MAAM,EACN,KAAK,EACL,SAAS,GACV,EAAE,uBAAuB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAoKpD;AAID,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
@@ -54,6 +54,9 @@ function DisplayFieldString({ schema, value, className, }) {
54
54
  return (_jsx(Text, { className: "min-w-0 truncate", children: value }));
55
55
  case StringDisplayMode.MULTILINE:
56
56
  return (_jsx(Text, { className: "whitespace-pre-wrap", children: value }));
57
+ case StringDisplayMode.IDENTIFIER:
58
+ // A machine ref/slug: verbatim and greppable, styled to recede behind the prose.
59
+ return _jsx(Text, { className: "font-mono text-xs text-muted-foreground break-all", children: value });
57
60
  case StringDisplayMode.MARKDOWN:
58
61
  // Rich long-form content (descriptions, notes): full markdown body
59
62
  // themed through the typography recipes. See markdown-content.tsx for