@humain/ui 2.2.7 → 2.2.9

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 (159) hide show
  1. package/dist/index101.js +2 -2
  2. package/dist/index101.js.map +1 -1
  3. package/dist/index103.js +3 -3
  4. package/dist/index103.js.map +1 -1
  5. package/dist/index108.js +1 -1
  6. package/dist/index108.js.map +1 -1
  7. package/dist/index117.js +1 -1
  8. package/dist/index117.js.map +1 -1
  9. package/dist/index122.js +6 -6
  10. package/dist/index122.js.map +1 -1
  11. package/dist/index126.js +1 -1
  12. package/dist/index126.js.map +1 -1
  13. package/dist/index130.js +2 -2
  14. package/dist/index130.js.map +1 -1
  15. package/dist/index146.js +4 -4
  16. package/dist/index146.js.map +1 -1
  17. package/dist/index152.js +1 -1
  18. package/dist/index152.js.map +1 -1
  19. package/dist/index154.js +2 -2
  20. package/dist/index154.js.map +1 -1
  21. package/dist/index166.js +1 -1
  22. package/dist/index166.js.map +1 -1
  23. package/dist/index168.js +1 -1
  24. package/dist/index168.js.map +1 -1
  25. package/dist/index169.js +1 -1
  26. package/dist/index169.js.map +1 -1
  27. package/dist/index173.js +2 -2
  28. package/dist/index173.js.map +1 -1
  29. package/dist/index175.js +4 -4
  30. package/dist/index175.js.map +1 -1
  31. package/dist/index176.js +2 -2
  32. package/dist/index176.js.map +1 -1
  33. package/dist/index177.js +2 -2
  34. package/dist/index177.js.map +1 -1
  35. package/dist/index184.js +1 -1
  36. package/dist/index184.js.map +1 -1
  37. package/dist/index191.js +3 -3
  38. package/dist/index191.js.map +1 -1
  39. package/dist/index192.js +2 -2
  40. package/dist/index192.js.map +1 -1
  41. package/dist/index201.js +2 -2
  42. package/dist/index201.js.map +1 -1
  43. package/dist/index204.js +4 -4
  44. package/dist/index204.js.map +1 -1
  45. package/dist/index228.js +1 -1
  46. package/dist/index228.js.map +1 -1
  47. package/dist/index229.js +1 -1
  48. package/dist/index229.js.map +1 -1
  49. package/dist/index24.js +2 -2
  50. package/dist/index24.js.map +1 -1
  51. package/dist/index5.js +1 -1
  52. package/dist/index5.js.map +1 -1
  53. package/dist/styles.css +1 -1
  54. package/dist/wc/AICodeBlock.js +41 -41
  55. package/dist/wc/AICodeBlock.js.map +1 -1
  56. package/dist/wc/AIMermaidDiagram.js +7 -7
  57. package/dist/wc/AIMermaidDiagram.js.map +1 -1
  58. package/dist/wc/AIMessage.js +6 -6
  59. package/dist/wc/AIMessage.js.map +1 -1
  60. package/dist/wc/AISource.js +2 -2
  61. package/dist/wc/AISource.js.map +1 -1
  62. package/dist/wc/AIToolCall.js +1 -1
  63. package/dist/wc/AIToolCall.js.map +1 -1
  64. package/dist/wc/Breadcrumb.js +43 -43
  65. package/dist/wc/Breadcrumb.js.map +1 -1
  66. package/dist/wc/DropdownMenu.js +9 -9
  67. package/dist/wc/DropdownMenu.js.map +1 -1
  68. package/dist/wc/Kbd.js +22 -22
  69. package/dist/wc/Kbd.js.map +1 -1
  70. package/dist/wc/button.js +7 -7
  71. package/dist/wc/button.js.map +1 -1
  72. package/dist/wc/close-button.js +19 -19
  73. package/dist/wc/close-button.js.map +1 -1
  74. package/dist/wc/hf-ai-prompt-suggestion.js +14 -14
  75. package/dist/wc/hf-ai-prompt-suggestion.js.map +1 -1
  76. package/dist/wc/hf-ai-reasoning-block.js +13 -13
  77. package/dist/wc/hf-ai-reasoning-block.js.map +1 -1
  78. package/dist/wc/hf-ai-steps.js +53 -53
  79. package/dist/wc/hf-ai-steps.js.map +1 -1
  80. package/dist/wc/hf-ai-system-message.js +26 -26
  81. package/dist/wc/hf-ai-system-message.js.map +1 -1
  82. package/dist/wc/hf-code-snippet.js +35 -35
  83. package/dist/wc/hf-code-snippet.js.map +1 -1
  84. package/dist/wc/hf-command-menu.js +39 -39
  85. package/dist/wc/hf-command-menu.js.map +1 -1
  86. package/dist/wc/hf-data-table.js +3 -3
  87. package/dist/wc/hf-data-table.js.map +1 -1
  88. package/dist/wc/hf-display-value.js +50 -50
  89. package/dist/wc/hf-display-value.js.map +1 -1
  90. package/dist/wc/hf-nav-account-menu.js +5 -5
  91. package/dist/wc/hf-nav-account-menu.js.map +1 -1
  92. package/dist/wc/hf-rich-textarea.js +1 -1
  93. package/dist/wc/hf-rich-textarea.js.map +1 -1
  94. package/dist/wc/hf-steps.js +8 -8
  95. package/dist/wc/hf-steps.js.map +1 -1
  96. package/dist/wc/markdown-renderer.js +1 -1
  97. package/dist/wc/markdown-renderer.js.map +1 -1
  98. package/dist/wc/selection-group.js +26 -26
  99. package/dist/wc/selection-group.js.map +1 -1
  100. package/dist/wc/syntax-highlight.js +4 -4
  101. package/dist/wc/syntax-highlight.js.map +1 -1
  102. package/dist/wc/workflow-step-renderer.js +51 -51
  103. package/dist/wc/workflow-step-renderer.js.map +1 -1
  104. package/dist/wc-react/AICodeBlock.js +17 -17
  105. package/dist/wc-react/AICodeBlock.js.map +1 -1
  106. package/dist/wc-react/AIMermaidDiagram.js +16 -16
  107. package/dist/wc-react/AIMermaidDiagram.js.map +1 -1
  108. package/dist/wc-react/AIMessage.js +7 -7
  109. package/dist/wc-react/AIMessage.js.map +1 -1
  110. package/dist/wc-react/AISource.js +41 -41
  111. package/dist/wc-react/AISource.js.map +1 -1
  112. package/dist/wc-react/AIToolCall.js +6 -6
  113. package/dist/wc-react/AIToolCall.js.map +1 -1
  114. package/dist/wc-react/Breadcrumb.js +18 -18
  115. package/dist/wc-react/Breadcrumb.js.map +1 -1
  116. package/dist/wc-react/DropdownMenu.js +27 -27
  117. package/dist/wc-react/DropdownMenu.js.map +1 -1
  118. package/dist/wc-react/Kbd.js +17 -17
  119. package/dist/wc-react/Kbd.js.map +1 -1
  120. package/dist/wc-react/button.js +12 -12
  121. package/dist/wc-react/button.js.map +1 -1
  122. package/dist/wc-react/close-button.js +19 -19
  123. package/dist/wc-react/close-button.js.map +1 -1
  124. package/dist/wc-react/hf-ai-prompt-suggestion.js +1 -1
  125. package/dist/wc-react/hf-ai-prompt-suggestion.js.map +1 -1
  126. package/dist/wc-react/hf-ai-reasoning-block.js +1 -1
  127. package/dist/wc-react/hf-ai-reasoning-block.js.map +1 -1
  128. package/dist/wc-react/hf-ai-steps.js +33 -33
  129. package/dist/wc-react/hf-ai-steps.js.map +1 -1
  130. package/dist/wc-react/hf-ai-system-message.js +9 -9
  131. package/dist/wc-react/hf-ai-system-message.js.map +1 -1
  132. package/dist/wc-react/hf-code-snippet.js +3 -3
  133. package/dist/wc-react/hf-code-snippet.js.map +1 -1
  134. package/dist/wc-react/hf-command-menu.js +56 -56
  135. package/dist/wc-react/hf-command-menu.js.map +1 -1
  136. package/dist/wc-react/hf-data-table.js +3 -3
  137. package/dist/wc-react/hf-data-table.js.map +1 -1
  138. package/dist/wc-react/hf-display-value.js +58 -58
  139. package/dist/wc-react/hf-display-value.js.map +1 -1
  140. package/dist/wc-react/hf-nav-account-menu.js +7 -7
  141. package/dist/wc-react/hf-nav-account-menu.js.map +1 -1
  142. package/dist/wc-react/hf-rich-textarea.js +5 -5
  143. package/dist/wc-react/hf-rich-textarea.js.map +1 -1
  144. package/dist/wc-react/hf-steps.js +2 -2
  145. package/dist/wc-react/hf-steps.js.map +1 -1
  146. package/dist/wc-react/markdown-renderer.js +1 -1
  147. package/dist/wc-react/markdown-renderer.js.map +1 -1
  148. package/dist/wc-react/selection-group.js +7 -7
  149. package/dist/wc-react/selection-group.js.map +1 -1
  150. package/dist/wc-react/syntax-highlight.js +4 -4
  151. package/dist/wc-react/syntax-highlight.js.map +1 -1
  152. package/dist/wc-react/workflow-step-renderer.js +44 -44
  153. package/dist/wc-react/workflow-step-renderer.js.map +1 -1
  154. package/package.json +1 -1
  155. package/skills/humain-ui/SKILL.md +1 -1
  156. package/skills/humain-ui-wc/SKILL.md +1 -1
  157. package/skills/humain-ui-wc.skill +0 -0
  158. package/skills/humain-ui.skill +0 -0
  159. package/src/tokens.css +4 -0
@@ -1,5 +1,5 @@
1
1
  import { f as i } from "./_shared.js";
2
- import { t as x } from "./minus.js";
2
+ import { t as v } from "./minus.js";
3
3
  import { t as b } from "./dist.js";
4
4
  import * as u from "react";
5
5
  import { jsx as s } from "react/jsx-runtime";
@@ -20,7 +20,7 @@ function _(a = {}) {
20
20
  r
21
21
  ])];
22
22
  }
23
- var v = {
23
+ var x = {
24
24
  primary: {
25
25
  indicator: "border-primary",
26
26
  indicatorChecked: "bg-primary",
@@ -119,7 +119,7 @@ function C({ className: a }) {
119
119
  });
120
120
  }
121
121
  var w = u.forwardRef(({ type: a, checked: e = !1, disabled: t = !1, size: r = "sm", color: d = "primary", className: o, indeterminate: c = !1 }, n) => {
122
- const l = v[d];
122
+ const l = x[d];
123
123
  return a === "checkbox" ? /* @__PURE__ */ s("span", {
124
124
  ref: n,
125
125
  "data-slot": "selection-indicator",
@@ -127,7 +127,7 @@ var w = u.forwardRef(({ type: a, checked: e = !1, disabled: t = !1, size: r = "s
127
127
  "data-checked": e,
128
128
  className: i(y({ size: r }), e ? i(l.indicatorChecked, l.border, l.text, "border", "delight-check-bounce") : "border-border bg-background", t && "opacity-50", o),
129
129
  "aria-hidden": "true",
130
- children: e && (c ? /* @__PURE__ */ s(x, {
130
+ children: e && (c ? /* @__PURE__ */ s(v, {
131
131
  className: i(m[r], "animate-[scale-in_150ms_ease-out] motion-reduce:animate-none"),
132
132
  strokeWidth: 3
133
133
  }) : /* @__PURE__ */ s(C, { className: m[r] }))
@@ -155,10 +155,10 @@ var S = {
155
155
  return /* @__PURE__ */ s("div", {
156
156
  ref: r,
157
157
  "data-slot": "featured-icon",
158
- className: i("shrink-0 rounded-md border border-border bg-card/60", "flex items-center justify-center", "dark:bg-foreground/60 dark:border-border", d, t),
158
+ className: i("shrink-0 rounded-md border border-border bg-card/60", "flex items-center justify-center", "dark:border-border", d, t),
159
159
  style: { boxShadow: "var(--shadow-inset-ring)" },
160
160
  children: /* @__PURE__ */ s("div", {
161
- className: i("text-secondary-foreground dark:text-text-quaternary", o),
161
+ className: i("text-secondary-foreground", o),
162
162
  children: a
163
163
  })
164
164
  });
@@ -190,7 +190,7 @@ var N = {
190
190
  });
191
191
  R.displayName = "ColorDot";
192
192
  export {
193
- v as a,
193
+ x as a,
194
194
  _ as c,
195
195
  w as i,
196
196
  W as l,
@@ -1 +1 @@
1
- {"version":3,"file":"selection-group.js","names":[],"sources":["../../src/components/ui/selection-group.tsx"],"sourcesContent":["'use client';\n\nimport { cva } from 'class-variance-authority';\nimport { Minus } from 'lucide-react';\nimport * as React from 'react';\nimport { cn } from '@/lib/utils';\n\n// =============================================================================\n// Types\n// =============================================================================\n\nexport type SelectionColor =\n | 'primary'\n | 'secondary'\n | 'success'\n | 'warning'\n | 'info'\n | 'destructive';\n\nexport type SelectionSize = 'sm' | 'md' | 'lg';\n\nexport type SelectionVariant =\n | 'default'\n | 'card'\n | 'pill'\n | 'stacked'\n | 'icon-simple'\n | 'icon-card'\n | 'avatar'\n | 'payment'\n | 'simple'\n | 'chip';\n\nexport interface SelectionItem {\n /** Unique value for the option */\n value: string;\n /** Display label */\n label: string;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Secondary text (e.g., \"$10/month\") */\n subtext?: string;\n /** Supporting description text */\n description?: string;\n /** Leading icon component */\n icon?: React.ReactNode;\n /** Avatar element */\n avatar?: React.ReactNode;\n /** Image URL */\n image?: string;\n /** Alt text for the image (defaults to \"\" if omitted) */\n imageAlt?: string;\n /** Position of the image */\n imagePosition?: 'top' | 'left' | 'trailing';\n /** Badge element */\n badge?: React.ReactNode;\n /** Dot color for chip variant (named color or hex) */\n dotColor?: string;\n /** Price display (e.g., \"$10\") */\n price?: string;\n /** Price period (e.g., \"per month\") */\n pricePeriod?: string;\n /** Payment icon element */\n paymentIcon?: React.ReactNode;\n /** Action buttons */\n actions?: React.ReactNode;\n}\n\n// =============================================================================\n// Hooks\n// =============================================================================\n\ninterface UseSelectionStateOptions {\n /** Controlled value */\n value?: string;\n /** Default value for uncontrolled mode */\n defaultValue?: string;\n /** Callback when value changes */\n onValueChange?: (value: string) => void;\n}\n\n/**\n * Hook for managing single selection state (radio behavior).\n * Supports both controlled and uncontrolled modes.\n */\nexport function useSelectionState(\n options: UseSelectionStateOptions = {},\n): [string | undefined, (value: string) => void] {\n const { value: controlledValue, defaultValue, onValueChange } = options;\n\n const [internalValue, setInternalValue] = React.useState<string | undefined>(\n defaultValue,\n );\n\n const isControlled = controlledValue !== undefined;\n const selectedValue = isControlled ? controlledValue : internalValue;\n\n const setValue = React.useCallback(\n (newValue: string) => {\n if (!isControlled) {\n setInternalValue(newValue);\n }\n onValueChange?.(newValue);\n },\n [isControlled, onValueChange],\n );\n\n return [selectedValue, setValue];\n}\n\ninterface UseMultiSelectionStateOptions {\n /** Controlled value */\n value?: string[];\n /** Default value for uncontrolled mode */\n defaultValue?: string[];\n /** Callback when value changes */\n onValueChange?: (value: string[]) => void;\n}\n\n/**\n * Hook for managing multi selection state (checkbox behavior).\n * Supports both controlled and uncontrolled modes.\n */\nexport function useMultiSelectionState(\n options: UseMultiSelectionStateOptions = {},\n): [string[], (value: string, checked: boolean) => void] {\n const { value: controlledValue, defaultValue = [], onValueChange } = options;\n\n const [internalValue, setInternalValue] =\n React.useState<string[]>(defaultValue);\n\n const isControlled = controlledValue !== undefined;\n const selectedValues = isControlled ? controlledValue : internalValue;\n\n const setValue = React.useCallback(\n (itemValue: string, checked: boolean) => {\n const newValue = checked\n ? [...selectedValues, itemValue]\n : selectedValues.filter((v) => v !== itemValue);\n\n if (!isControlled) {\n setInternalValue(newValue);\n }\n onValueChange?.(newValue);\n },\n [isControlled, selectedValues, onValueChange],\n );\n\n return [selectedValues, setValue];\n}\n\n// =============================================================================\n// Color Mappings\n// =============================================================================\n\nexport const selectionColorClasses: Record<\n SelectionColor,\n {\n indicator: string;\n indicatorChecked: string;\n border: string;\n bg: string;\n text: string;\n }\n> = {\n primary: {\n indicator: 'border-primary',\n indicatorChecked: 'bg-primary',\n border: 'border-primary',\n bg: 'bg-primary',\n text: 'text-primary-foreground',\n },\n secondary: {\n indicator: 'border-secondary',\n indicatorChecked: 'bg-secondary',\n border: 'border-secondary',\n bg: 'bg-secondary',\n text: 'text-secondary-foreground',\n },\n success: {\n indicator: 'border-success',\n indicatorChecked: 'bg-success',\n border: 'border-success',\n bg: 'bg-success',\n text: 'text-primary-foreground',\n },\n warning: {\n indicator: 'border-warning',\n indicatorChecked: 'bg-warning',\n border: 'border-warning',\n bg: 'bg-warning',\n text: 'text-primary-foreground',\n },\n info: {\n indicator: 'border-info',\n indicatorChecked: 'bg-info',\n border: 'border-info',\n bg: 'bg-info',\n text: 'text-primary-foreground',\n },\n destructive: {\n indicator: 'border-destructive',\n indicatorChecked: 'bg-destructive',\n border: 'border-destructive',\n bg: 'bg-destructive',\n text: 'text-primary-foreground',\n },\n};\n\n// =============================================================================\n// CVA Variants\n// =============================================================================\n\n/**\n * Selection group container variants.\n * Used for the outer wrapper of a group of selection items.\n */\nexport const selectionGroupVariants = cva('flex', {\n variants: {\n orientation: {\n horizontal: 'flex-row flex-wrap',\n vertical: 'flex-col',\n },\n gap: {\n sm: 'gap-2',\n md: 'gap-3',\n lg: 'gap-4',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n gap: 'md',\n },\n});\n\n/**\n * Selection indicator variants (for both radio and checkbox).\n * Renders as a rounded indicator with border.\n */\nexport const selectionIndicatorVariants = cva(\n 'shrink-0 rounded-full border-2 transition-all flex items-center justify-center',\n {\n variants: {\n size: {\n sm: 'size-4',\n md: 'size-5',\n lg: 'size-6',\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n },\n);\n\n/**\n * Checkbox indicator variants (square with rounded corners).\n */\nexport const checkboxIndicatorVariants = cva(\n 'shrink-0 border transition-[border-color,background-color,color,box-shadow] duration-200 ease-out motion-reduce:transition-none flex items-center justify-center',\n {\n variants: {\n size: {\n sm: 'size-4 rounded-[4px]',\n md: 'size-5 rounded-[5px]',\n lg: 'size-6 rounded-[6px]',\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n },\n);\n\n/**\n * Inner dot sizes for radio indicators when checked.\n */\nexport const innerDotSizes: Record<SelectionSize, string> = {\n sm: 'size-1.5',\n md: 'size-2',\n lg: 'size-2.5',\n};\n\n/**\n * Text size classes for selection labels.\n */\nexport const textSizeClasses: Record<SelectionSize, string> = {\n sm: 'text-sm',\n md: 'text-sm',\n lg: 'text-base',\n};\n\n/**\n * Icon size classes for checkbox indicators.\n */\nexport const iconSizeClasses: Record<SelectionSize, string> = {\n sm: 'size-3',\n md: 'size-3.5',\n lg: 'size-4',\n};\n\n// =============================================================================\n// Draw-on checkmark SVG (shared delight animation)\n// =============================================================================\n\nexport const CHECKMARK_PATH = 'M4 12l5 5L20 6';\n\nexport function DrawCheck({ className }: { className?: string }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={cn(className, 'delight-check-draw')}\n >\n <path d={CHECKMARK_PATH} />\n </svg>\n );\n}\n\n// =============================================================================\n// SelectionIndicator Component\n// =============================================================================\n\nexport interface SelectionIndicatorProps {\n /** Type of indicator to render */\n type: 'checkbox' | 'radio';\n /** Whether the indicator is checked */\n checked?: boolean;\n /** Whether the indicator is disabled */\n disabled?: boolean;\n /** Size of the indicator */\n size?: SelectionSize;\n /** Color of the indicator */\n color?: SelectionColor;\n /** Additional CSS classes */\n className?: string;\n /** Whether the checkbox is in indeterminate state (checkbox only) */\n indeterminate?: boolean;\n}\n\n/**\n * SelectionIndicator renders either a checkbox or radio indicator based on type.\n * For checkbox: renders a check icon when checked.\n * For radio: renders an inner dot when checked.\n */\nconst SelectionIndicator = React.forwardRef<\n HTMLSpanElement,\n SelectionIndicatorProps\n>(\n (\n {\n type,\n checked = false,\n disabled = false,\n size = 'sm',\n color = 'primary',\n className,\n indeterminate = false,\n },\n ref,\n ) => {\n const colors = selectionColorClasses[color];\n\n if (type === 'checkbox') {\n return (\n <span\n ref={ref}\n data-slot=\"selection-indicator\"\n data-type=\"checkbox\"\n data-checked={checked}\n className={cn(\n checkboxIndicatorVariants({ size }),\n checked\n ? cn(\n colors.indicatorChecked,\n colors.border,\n colors.text,\n 'border',\n 'delight-check-bounce',\n )\n : 'border-border bg-background',\n disabled && 'opacity-50',\n className,\n )}\n aria-hidden=\"true\"\n >\n {checked &&\n (indeterminate ? (\n <Minus\n className={cn(\n iconSizeClasses[size],\n 'animate-[scale-in_150ms_ease-out] motion-reduce:animate-none',\n )}\n strokeWidth={3}\n />\n ) : (\n <DrawCheck className={iconSizeClasses[size]} />\n ))}\n </span>\n );\n }\n\n // Radio type\n return (\n <span\n ref={ref}\n data-slot=\"selection-indicator\"\n data-type=\"radio\"\n data-checked={checked}\n className={cn(\n selectionIndicatorVariants({ size }),\n 'transition-[background-color,border-color] duration-150 motion-reduce:transition-none',\n checked\n ? cn(colors.indicatorChecked, 'border-transparent')\n : 'border-border bg-background',\n disabled && 'opacity-50',\n className,\n )}\n aria-hidden=\"true\"\n >\n <span\n className={cn(\n 'bg-background rounded-full transition-transform duration-150 ease-out motion-reduce:transition-none',\n innerDotSizes[size],\n checked ? 'scale-100' : 'scale-0',\n )}\n />\n </span>\n );\n },\n);\n\nSelectionIndicator.displayName = 'SelectionIndicator';\n\n// =============================================================================\n// FeaturedIcon Component\n// =============================================================================\n\nexport interface FeaturedIconProps {\n /** The icon content to display */\n children: React.ReactNode;\n /** Size of the featured icon container */\n size?: SelectionSize;\n /** Additional CSS classes */\n className?: string;\n}\n\n// Hoisted outside component to avoid recreation on every render\nconst featuredIconContainerSizes: Record<SelectionSize, string> = {\n sm: 'size-8',\n md: 'size-10',\n lg: 'size-12',\n};\n\nconst featuredIconInnerSizes: Record<SelectionSize, string> = {\n sm: 'size-4',\n md: 'size-5',\n lg: 'size-6',\n};\n\n/**\n * FeaturedIcon is a container for icons with border and shadow.\n * Used in icon-simple and icon-card variants.\n */\nconst FeaturedIcon = React.forwardRef<HTMLDivElement, FeaturedIconProps>(\n ({ children, size = 'sm', className }, ref) => {\n const containerSize = featuredIconContainerSizes[size];\n const innerSize = featuredIconInnerSizes[size];\n\n return (\n <div\n ref={ref}\n data-slot=\"featured-icon\"\n className={cn(\n 'shrink-0 rounded-md border border-border bg-card/60',\n 'flex items-center justify-center',\n 'dark:bg-foreground/60 dark:border-border',\n containerSize,\n className,\n )}\n style={{\n boxShadow: 'var(--shadow-inset-ring)',\n }}\n >\n <div\n className={cn(\n 'text-secondary-foreground dark:text-text-quaternary',\n innerSize,\n )}\n >\n {children}\n </div>\n </div>\n );\n },\n);\n\nFeaturedIcon.displayName = 'FeaturedIcon';\n\n// =============================================================================\n// ColorDot Component\n// =============================================================================\n\nexport type ColorDotColor =\n | 'gray'\n | 'orange'\n | 'red'\n | 'darkRed'\n | 'brand'\n | 'success'\n | 'warning'\n | 'error'\n | string; // Allow custom hex colors\n\nconst dotColorMap: Record<string, string> = {\n gray: 'bg-muted',\n orange: 'bg-warning',\n red: 'bg-destructive',\n darkRed: 'bg-destructive-hover',\n brand: 'bg-primary/10',\n success: 'bg-success/10',\n warning: 'bg-warning/10',\n error: 'bg-destructive/10',\n};\n\nconst dotSizeMap: Record<SelectionSize, string> = {\n sm: 'size-[10px]',\n md: 'size-3',\n lg: 'size-3.5',\n};\n\nexport interface ColorDotProps {\n /** Color of the dot (named color or hex) */\n color?: ColorDotColor;\n /** Size of the dot */\n size?: SelectionSize;\n /** Additional CSS classes */\n className?: string;\n}\n\n/**\n * ColorDot renders a colored dot for chip variant.\n * Supports named colors (gray, orange, red, etc.) and hex colors.\n */\nconst ColorDot = React.forwardRef<HTMLSpanElement, ColorDotProps>(\n ({ color, size = 'sm', className }, ref) => {\n if (!color) return null;\n\n const colorClass = dotColorMap[color];\n const isHexColor = color.startsWith('#');\n\n return (\n <span\n ref={ref}\n data-slot=\"color-dot\"\n className={cn(\n 'shrink-0 rounded-full',\n dotSizeMap[size],\n !isHexColor && colorClass,\n className,\n )}\n style={isHexColor ? { backgroundColor: color } : undefined}\n aria-hidden=\"true\"\n />\n );\n },\n);\n\nColorDot.displayName = 'ColorDot';\n\n// =============================================================================\n// Exports\n// =============================================================================\n\nexport { ColorDot, FeaturedIcon, SelectionIndicator };\n"],"mappings":";;;;;AAqFA,SAAgB,EACd,IAAoC,CAAC,GACU;AAC/C,QAAM,EAAE,OAAO,GAAiB,cAAA,GAAc,eAAA,EAAA,IAAkB,GAE1D,CAAC,GAAe,CAAA,IAAoB,EAAM,SAC9C,CACF,GAEM,IAAe,MAAoB;AAazC,SAAO,CAZe,IAAe,IAAkB,GAEtC,EAAM,YAAA,CACpB,MAAqB;AACpB,IAAK,KACH,EAAiB,CAAQ,GAE3B,IAAgB,CAAQ;AAAA,EAC1B,GACA,CAAC,GAAc,CAAa,CAGP,CAAQ;AACjC;AAeA,SAAgB,EACd,IAAyC,CAAC,GACa;AACvD,QAAM,EAAE,OAAO,GAAiB,cAAA,IAAe,CAAC,GAAG,eAAA,EAAA,IAAkB,GAE/D,CAAC,GAAe,CAAA,IACpB,EAAM,SAAmB,CAAY,GAEjC,IAAe,MAAoB,QACnC,IAAiB,IAAe,IAAkB;AAgBxD,SAAO,CAAC,GAdS,EAAM,YAAA,CACpB,GAAmB,MAAqB;AACvC,UAAM,IAAW,IACb,CAAC,GAAG,GAAgB,CAAS,IAC7B,EAAe,OAAA,CAAQ,MAAM,MAAM,CAAS;AAEhD,IAAK,KACH,EAAiB,CAAQ,GAE3B,IAAgB,CAAQ;AAAA,EAC1B,GACA;AAAA,IAAC;AAAA,IAAc;AAAA,IAAgB;AAAA,EAAa,CAGtB,CAAQ;AAClC;AAMA,IAAa,IAST;AAAA,EACF,SAAS;AAAA,IACP,WAAW;AAAA,IACX,kBAAkB;AAAA,IAClB,QAAQ;AAAA,IACR,IAAI;AAAA,IACJ,MAAM;AAAA,EACR;AAAA,EACA,WAAW;AAAA,IACT,WAAW;AAAA,IACX,kBAAkB;AAAA,IAClB,QAAQ;AAAA,IACR,IAAI;AAAA,IACJ,MAAM;AAAA,EACR;AAAA,EACA,SAAS;A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C,QAAD;AAAA,IACO,KAAA;AAAA,IACL,aAAU;AAAA,IACV,WAAW,EACT,yBACA,EAAW,CAAA,GACX,CAAC,KAAc,GACf,CACF;AAAA,IACA,OAAO,IAAa,EAAE,iBAAiB,EAAM,IAAI;AAAA,IACjD,eAAY;AAAA,EACb,CAAA;AAEL,CACF;AAEA,EAAS,cAAc"}
1
+ {"version":3,"file":"selection-group.js","names":[],"sources":["../../src/components/ui/selection-group.tsx"],"sourcesContent":["'use client';\n\nimport { cva } from 'class-variance-authority';\nimport { Minus } from 'lucide-react';\nimport * as React from 'react';\nimport { cn } from '@/lib/utils';\n\n// =============================================================================\n// Types\n// =============================================================================\n\nexport type SelectionColor =\n | 'primary'\n | 'secondary'\n | 'success'\n | 'warning'\n | 'info'\n | 'destructive';\n\nexport type SelectionSize = 'sm' | 'md' | 'lg';\n\nexport type SelectionVariant =\n | 'default'\n | 'card'\n | 'pill'\n | 'stacked'\n | 'icon-simple'\n | 'icon-card'\n | 'avatar'\n | 'payment'\n | 'simple'\n | 'chip';\n\nexport interface SelectionItem {\n /** Unique value for the option */\n value: string;\n /** Display label */\n label: string;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Secondary text (e.g., \"$10/month\") */\n subtext?: string;\n /** Supporting description text */\n description?: string;\n /** Leading icon component */\n icon?: React.ReactNode;\n /** Avatar element */\n avatar?: React.ReactNode;\n /** Image URL */\n image?: string;\n /** Alt text for the image (defaults to \"\" if omitted) */\n imageAlt?: string;\n /** Position of the image */\n imagePosition?: 'top' | 'left' | 'trailing';\n /** Badge element */\n badge?: React.ReactNode;\n /** Dot color for chip variant (named color or hex) */\n dotColor?: string;\n /** Price display (e.g., \"$10\") */\n price?: string;\n /** Price period (e.g., \"per month\") */\n pricePeriod?: string;\n /** Payment icon element */\n paymentIcon?: React.ReactNode;\n /** Action buttons */\n actions?: React.ReactNode;\n}\n\n// =============================================================================\n// Hooks\n// =============================================================================\n\ninterface UseSelectionStateOptions {\n /** Controlled value */\n value?: string;\n /** Default value for uncontrolled mode */\n defaultValue?: string;\n /** Callback when value changes */\n onValueChange?: (value: string) => void;\n}\n\n/**\n * Hook for managing single selection state (radio behavior).\n * Supports both controlled and uncontrolled modes.\n */\nexport function useSelectionState(\n options: UseSelectionStateOptions = {},\n): [string | undefined, (value: string) => void] {\n const { value: controlledValue, defaultValue, onValueChange } = options;\n\n const [internalValue, setInternalValue] = React.useState<string | undefined>(\n defaultValue,\n );\n\n const isControlled = controlledValue !== undefined;\n const selectedValue = isControlled ? controlledValue : internalValue;\n\n const setValue = React.useCallback(\n (newValue: string) => {\n if (!isControlled) {\n setInternalValue(newValue);\n }\n onValueChange?.(newValue);\n },\n [isControlled, onValueChange],\n );\n\n return [selectedValue, setValue];\n}\n\ninterface UseMultiSelectionStateOptions {\n /** Controlled value */\n value?: string[];\n /** Default value for uncontrolled mode */\n defaultValue?: string[];\n /** Callback when value changes */\n onValueChange?: (value: string[]) => void;\n}\n\n/**\n * Hook for managing multi selection state (checkbox behavior).\n * Supports both controlled and uncontrolled modes.\n */\nexport function useMultiSelectionState(\n options: UseMultiSelectionStateOptions = {},\n): [string[], (value: string, checked: boolean) => void] {\n const { value: controlledValue, defaultValue = [], onValueChange } = options;\n\n const [internalValue, setInternalValue] =\n React.useState<string[]>(defaultValue);\n\n const isControlled = controlledValue !== undefined;\n const selectedValues = isControlled ? controlledValue : internalValue;\n\n const setValue = React.useCallback(\n (itemValue: string, checked: boolean) => {\n const newValue = checked\n ? [...selectedValues, itemValue]\n : selectedValues.filter((v) => v !== itemValue);\n\n if (!isControlled) {\n setInternalValue(newValue);\n }\n onValueChange?.(newValue);\n },\n [isControlled, selectedValues, onValueChange],\n );\n\n return [selectedValues, setValue];\n}\n\n// =============================================================================\n// Color Mappings\n// =============================================================================\n\nexport const selectionColorClasses: Record<\n SelectionColor,\n {\n indicator: string;\n indicatorChecked: string;\n border: string;\n bg: string;\n text: string;\n }\n> = {\n primary: {\n indicator: 'border-primary',\n indicatorChecked: 'bg-primary',\n border: 'border-primary',\n bg: 'bg-primary',\n text: 'text-primary-foreground',\n },\n secondary: {\n indicator: 'border-secondary',\n indicatorChecked: 'bg-secondary',\n border: 'border-secondary',\n bg: 'bg-secondary',\n text: 'text-secondary-foreground',\n },\n success: {\n indicator: 'border-success',\n indicatorChecked: 'bg-success',\n border: 'border-success',\n bg: 'bg-success',\n text: 'text-primary-foreground',\n },\n warning: {\n indicator: 'border-warning',\n indicatorChecked: 'bg-warning',\n border: 'border-warning',\n bg: 'bg-warning',\n text: 'text-primary-foreground',\n },\n info: {\n indicator: 'border-info',\n indicatorChecked: 'bg-info',\n border: 'border-info',\n bg: 'bg-info',\n text: 'text-primary-foreground',\n },\n destructive: {\n indicator: 'border-destructive',\n indicatorChecked: 'bg-destructive',\n border: 'border-destructive',\n bg: 'bg-destructive',\n text: 'text-primary-foreground',\n },\n};\n\n// =============================================================================\n// CVA Variants\n// =============================================================================\n\n/**\n * Selection group container variants.\n * Used for the outer wrapper of a group of selection items.\n */\nexport const selectionGroupVariants = cva('flex', {\n variants: {\n orientation: {\n horizontal: 'flex-row flex-wrap',\n vertical: 'flex-col',\n },\n gap: {\n sm: 'gap-2',\n md: 'gap-3',\n lg: 'gap-4',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n gap: 'md',\n },\n});\n\n/**\n * Selection indicator variants (for both radio and checkbox).\n * Renders as a rounded indicator with border.\n */\nexport const selectionIndicatorVariants = cva(\n 'shrink-0 rounded-full border-2 transition-all flex items-center justify-center',\n {\n variants: {\n size: {\n sm: 'size-4',\n md: 'size-5',\n lg: 'size-6',\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n },\n);\n\n/**\n * Checkbox indicator variants (square with rounded corners).\n */\nexport const checkboxIndicatorVariants = cva(\n 'shrink-0 border transition-[border-color,background-color,color,box-shadow] duration-200 ease-out motion-reduce:transition-none flex items-center justify-center',\n {\n variants: {\n size: {\n sm: 'size-4 rounded-[4px]',\n md: 'size-5 rounded-[5px]',\n lg: 'size-6 rounded-[6px]',\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n },\n);\n\n/**\n * Inner dot sizes for radio indicators when checked.\n */\nexport const innerDotSizes: Record<SelectionSize, string> = {\n sm: 'size-1.5',\n md: 'size-2',\n lg: 'size-2.5',\n};\n\n/**\n * Text size classes for selection labels.\n */\nexport const textSizeClasses: Record<SelectionSize, string> = {\n sm: 'text-sm',\n md: 'text-sm',\n lg: 'text-base',\n};\n\n/**\n * Icon size classes for checkbox indicators.\n */\nexport const iconSizeClasses: Record<SelectionSize, string> = {\n sm: 'size-3',\n md: 'size-3.5',\n lg: 'size-4',\n};\n\n// =============================================================================\n// Draw-on checkmark SVG (shared delight animation)\n// =============================================================================\n\nexport const CHECKMARK_PATH = 'M4 12l5 5L20 6';\n\nexport function DrawCheck({ className }: { className?: string }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={cn(className, 'delight-check-draw')}\n >\n <path d={CHECKMARK_PATH} />\n </svg>\n );\n}\n\n// =============================================================================\n// SelectionIndicator Component\n// =============================================================================\n\nexport interface SelectionIndicatorProps {\n /** Type of indicator to render */\n type: 'checkbox' | 'radio';\n /** Whether the indicator is checked */\n checked?: boolean;\n /** Whether the indicator is disabled */\n disabled?: boolean;\n /** Size of the indicator */\n size?: SelectionSize;\n /** Color of the indicator */\n color?: SelectionColor;\n /** Additional CSS classes */\n className?: string;\n /** Whether the checkbox is in indeterminate state (checkbox only) */\n indeterminate?: boolean;\n}\n\n/**\n * SelectionIndicator renders either a checkbox or radio indicator based on type.\n * For checkbox: renders a check icon when checked.\n * For radio: renders an inner dot when checked.\n */\nconst SelectionIndicator = React.forwardRef<\n HTMLSpanElement,\n SelectionIndicatorProps\n>(\n (\n {\n type,\n checked = false,\n disabled = false,\n size = 'sm',\n color = 'primary',\n className,\n indeterminate = false,\n },\n ref,\n ) => {\n const colors = selectionColorClasses[color];\n\n if (type === 'checkbox') {\n return (\n <span\n ref={ref}\n data-slot=\"selection-indicator\"\n data-type=\"checkbox\"\n data-checked={checked}\n className={cn(\n checkboxIndicatorVariants({ size }),\n checked\n ? cn(\n colors.indicatorChecked,\n colors.border,\n colors.text,\n 'border',\n 'delight-check-bounce',\n )\n : 'border-border bg-background',\n disabled && 'opacity-50',\n className,\n )}\n aria-hidden=\"true\"\n >\n {checked &&\n (indeterminate ? (\n <Minus\n className={cn(\n iconSizeClasses[size],\n 'animate-[scale-in_150ms_ease-out] motion-reduce:animate-none',\n )}\n strokeWidth={3}\n />\n ) : (\n <DrawCheck className={iconSizeClasses[size]} />\n ))}\n </span>\n );\n }\n\n // Radio type\n return (\n <span\n ref={ref}\n data-slot=\"selection-indicator\"\n data-type=\"radio\"\n data-checked={checked}\n className={cn(\n selectionIndicatorVariants({ size }),\n 'transition-[background-color,border-color] duration-150 motion-reduce:transition-none',\n checked\n ? cn(colors.indicatorChecked, 'border-transparent')\n : 'border-border bg-background',\n disabled && 'opacity-50',\n className,\n )}\n aria-hidden=\"true\"\n >\n <span\n className={cn(\n 'bg-background rounded-full transition-transform duration-150 ease-out motion-reduce:transition-none',\n innerDotSizes[size],\n checked ? 'scale-100' : 'scale-0',\n )}\n />\n </span>\n );\n },\n);\n\nSelectionIndicator.displayName = 'SelectionIndicator';\n\n// =============================================================================\n// FeaturedIcon Component\n// =============================================================================\n\nexport interface FeaturedIconProps {\n /** The icon content to display */\n children: React.ReactNode;\n /** Size of the featured icon container */\n size?: SelectionSize;\n /** Additional CSS classes */\n className?: string;\n}\n\n// Hoisted outside component to avoid recreation on every render\nconst featuredIconContainerSizes: Record<SelectionSize, string> = {\n sm: 'size-8',\n md: 'size-10',\n lg: 'size-12',\n};\n\nconst featuredIconInnerSizes: Record<SelectionSize, string> = {\n sm: 'size-4',\n md: 'size-5',\n lg: 'size-6',\n};\n\n/**\n * FeaturedIcon is a container for icons with border and shadow.\n * Used in icon-simple and icon-card variants.\n */\nconst FeaturedIcon = React.forwardRef<HTMLDivElement, FeaturedIconProps>(\n ({ children, size = 'sm', className }, ref) => {\n const containerSize = featuredIconContainerSizes[size];\n const innerSize = featuredIconInnerSizes[size];\n\n return (\n <div\n ref={ref}\n data-slot=\"featured-icon\"\n className={cn(\n 'shrink-0 rounded-md border border-border bg-card/60',\n 'flex items-center justify-center',\n 'dark:border-border',\n containerSize,\n className,\n )}\n style={{\n boxShadow: 'var(--shadow-inset-ring)',\n }}\n >\n <div className={cn('text-secondary-foreground', innerSize)}>\n {children}\n </div>\n </div>\n );\n },\n);\n\nFeaturedIcon.displayName = 'FeaturedIcon';\n\n// =============================================================================\n// ColorDot Component\n// =============================================================================\n\nexport type ColorDotColor =\n | 'gray'\n | 'orange'\n | 'red'\n | 'darkRed'\n | 'brand'\n | 'success'\n | 'warning'\n | 'error'\n | string; // Allow custom hex colors\n\nconst dotColorMap: Record<string, string> = {\n gray: 'bg-muted',\n orange: 'bg-warning',\n red: 'bg-destructive',\n darkRed: 'bg-destructive-hover',\n brand: 'bg-primary/10',\n success: 'bg-success/10',\n warning: 'bg-warning/10',\n error: 'bg-destructive/10',\n};\n\nconst dotSizeMap: Record<SelectionSize, string> = {\n sm: 'size-[10px]',\n md: 'size-3',\n lg: 'size-3.5',\n};\n\nexport interface ColorDotProps {\n /** Color of the dot (named color or hex) */\n color?: ColorDotColor;\n /** Size of the dot */\n size?: SelectionSize;\n /** Additional CSS classes */\n className?: string;\n}\n\n/**\n * ColorDot renders a colored dot for chip variant.\n * Supports named colors (gray, orange, red, etc.) and hex colors.\n */\nconst ColorDot = React.forwardRef<HTMLSpanElement, ColorDotProps>(\n ({ color, size = 'sm', className }, ref) => {\n if (!color) return null;\n\n const colorClass = dotColorMap[color];\n const isHexColor = color.startsWith('#');\n\n return (\n <span\n ref={ref}\n data-slot=\"color-dot\"\n className={cn(\n 'shrink-0 rounded-full',\n dotSizeMap[size],\n !isHexColor && colorClass,\n className,\n )}\n style={isHexColor ? { backgroundColor: color } : undefined}\n aria-hidden=\"true\"\n />\n );\n },\n);\n\nColorDot.displayName = 'ColorDot';\n\n// =============================================================================\n// Exports\n// =============================================================================\n\nexport { ColorDot, FeaturedIcon, SelectionIndicator };\n"],"mappings":";;;;;AAqFA,SAAgB,EACd,IAAoC,CAAC,GACU;AAC/C,QAAM,EAAE,OAAO,GAAiB,cAAA,GAAc,eAAA,EAAA,IAAkB,GAE1D,CAAC,GAAe,CAAA,IAAoB,EAAM,SAC9C,CACF,GAEM,IAAe,MAAoB;AAazC,SAAO,CAZe,IAAe,IAAkB,GAEtC,EAAM,YAAA,CACpB,MAAqB;AACpB,IAAK,KACH,EAAiB,CAAQ,GAE3B,IAAgB,CAAQ;AAAA,EAC1B,GACA,CAAC,GAAc,CAAa,CAGP,CAAQ;AACjC;AAeA,SAAgB,EACd,IAAyC,CAAC,GACa;AACvD,QAAM,EAAE,OAAO,GAAiB,cAAA,IAAe,CAAC,GAAG,eAAA,EAAA,IAAkB,GAE/D,CAAC,GAAe,CAAA,IACpB,EAAM,SAAmB,CAAY,GAEjC,IAAe,MAAoB,QACnC,IAAiB,IAAe,IAAkB;AAgBxD,SAAO,CAAC,GAdS,EAAM,YAAA,CACpB,GAAmB,MAAqB;AACvC,UAAM,IAAW,IACb,CAAC,GAAG,GAAgB,CAAS,IAC7B,EAAe,OAAA,CAAQ,MAAM,MAAM,CAAS;AAEhD,IAAK,KACH,EAAiB,CAAQ,GAE3B,IAAgB,CAAQ;AAAA,EAC1B,GACA;AAAA,IAAC;AAAA,IAAc;AAAA,IAAgB;AAAA,EAAa,CAGtB,CAAQ;AAClC;AAMA,IAAa,IAST;AAAA,EACF,SAAS;AAAA,IACP,WAAW;AAAA,IACX,kBAAkB;AAAA,IAClB,QAAQ;AAAA,IACR,IAAI;AAAA,IACJ,MAAM;AAAA,EACR;AAAA,EACA,WAAW;AAAA,IACT,WAAW;AAAA,IACX,kBAAkB;AAAA,IAClB,QAAQ;AAAA,IACR,IAAI;AAAA,IACJ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,EAAM,WAAW,GAAG;AAEvC,SACE,gBAAA,EAAC,QAAD;AAAA,IACO,KAAA;AAAA,IACL,aAAU;AAAA,IACV,WAAW,EACT,yBACA,EAAW,CAAA,GACX,CAAC,KAAc,GACf,CACF;AAAA,IACA,OAAO,IAAa,EAAE,iBAAiB,EAAM,IAAI;AAAA,IACjD,eAAY;AAAA,EACb,CAAA;AAEL,CACF;AAEA,EAAS,cAAc"}
@@ -1,14 +1,14 @@
1
1
  var r = {
2
2
  "--sh-class": "var(--blue-700)",
3
3
  "--sh-identifier": "var(--foreground)",
4
- "--sh-sign": "var(--muted-foreground)",
4
+ "--sh-sign": "var(--secondary-foreground)",
5
5
  "--sh-property": "var(--pink-600)",
6
6
  "--sh-entity": "var(--purple-700)",
7
7
  "--sh-jsxliterals": "var(--cyan-700)",
8
8
  "--sh-string": "var(--green-700)",
9
9
  "--sh-keyword": "var(--indigo-700)",
10
- "--sh-comment": "var(--text-quaternary)"
11
- }, a = {
10
+ "--sh-comment": "var(--secondary-foreground)"
11
+ }, s = {
12
12
  "--sh-class": "var(--blue-200)",
13
13
  "--sh-identifier": "var(--primary-foreground)",
14
14
  "--sh-sign": "var(--primary-foreground)",
@@ -21,7 +21,7 @@ var r = {
21
21
  };
22
22
  export {
23
23
  r as n,
24
- a as t
24
+ s as t
25
25
  };
26
26
 
27
27
  //# sourceMappingURL=syntax-highlight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"syntax-highlight.js","names":[],"sources":["../../src/lib/syntax-highlight.ts"],"sourcesContent":["import type * as React from 'react';\n\nexport const SUGAR_HIGH_STYLE = {\n '--sh-class': 'var(--blue-700)',\n '--sh-identifier': 'var(--foreground)',\n '--sh-sign': 'var(--muted-foreground)',\n '--sh-property': 'var(--pink-600)',\n '--sh-entity': 'var(--purple-700)',\n '--sh-jsxliterals': 'var(--cyan-700)',\n '--sh-string': 'var(--green-700)',\n '--sh-keyword': 'var(--indigo-700)',\n '--sh-comment': 'var(--text-quaternary)',\n} as React.CSSProperties;\n\nexport const INVERTED_SUGAR_HIGH_STYLE = {\n '--sh-class': 'var(--blue-200)',\n '--sh-identifier': 'var(--primary-foreground)',\n '--sh-sign': 'var(--primary-foreground)',\n '--sh-property': 'var(--pink-300)',\n '--sh-entity': 'var(--purple-300)',\n '--sh-jsxliterals': 'var(--cyan-300)',\n '--sh-string': 'var(--green-300)',\n '--sh-keyword': 'var(--indigo-300)',\n '--sh-comment': 'var(--primary-foreground)',\n} as React.CSSProperties;\n"],"mappings":"AAEA,IAAa,IAAmB;AAAA,EAC9B,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAClB,GAEa,IAA4B;AAAA,EACvC,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAClB"}
1
+ {"version":3,"file":"syntax-highlight.js","names":[],"sources":["../../src/lib/syntax-highlight.ts"],"sourcesContent":["import type * as React from 'react';\n\nexport const SUGAR_HIGH_STYLE = {\n '--sh-class': 'var(--blue-700)',\n '--sh-identifier': 'var(--foreground)',\n '--sh-sign': 'var(--secondary-foreground)',\n '--sh-property': 'var(--pink-600)',\n '--sh-entity': 'var(--purple-700)',\n '--sh-jsxliterals': 'var(--cyan-700)',\n '--sh-string': 'var(--green-700)',\n '--sh-keyword': 'var(--indigo-700)',\n '--sh-comment': 'var(--secondary-foreground)',\n} as React.CSSProperties;\n\nexport const INVERTED_SUGAR_HIGH_STYLE = {\n '--sh-class': 'var(--blue-200)',\n '--sh-identifier': 'var(--primary-foreground)',\n '--sh-sign': 'var(--primary-foreground)',\n '--sh-property': 'var(--pink-300)',\n '--sh-entity': 'var(--purple-300)',\n '--sh-jsxliterals': 'var(--cyan-300)',\n '--sh-string': 'var(--green-300)',\n '--sh-keyword': 'var(--indigo-300)',\n '--sh-comment': 'var(--primary-foreground)',\n} as React.CSSProperties;\n"],"mappings":"AAEA,IAAa,IAAmB;AAAA,EAC9B,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAClB,GAEa,IAA4B;AAAA,EACvC,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAClB"}
@@ -1,12 +1,12 @@
1
1
  import { d as W, f } from "./_shared.js";
2
2
  import { t as E } from "./createLucideIcon.js";
3
3
  import { t as A } from "./check.js";
4
- import { t as q } from "./chevron-down.js";
5
- import { t as V } from "./chevron-right.js";
4
+ import { t as V } from "./chevron-down.js";
5
+ import { t as P } from "./chevron-right.js";
6
6
  import { t as $ } from "./circle-alert.js";
7
7
  import { t as D } from "./dist.js";
8
- import { t as P } from "./react.js";
9
- import { t as _ } from "./AnimatePresence.js";
8
+ import { t as _ } from "./react.js";
9
+ import { t as q } from "./AnimatePresence.js";
10
10
  import { t as F } from "./use-reduced-motion2.js";
11
11
  import * as c from "react";
12
12
  import { Fragment as B, jsx as t, jsxs as g } from "react/jsx-runtime";
@@ -61,11 +61,11 @@ var K = [
61
61
  function G(e) {
62
62
  const r = Math.max(0, Math.round(e));
63
63
  if (r < 1e3) return `${r}ms`;
64
- const a = Math.round(r / 1e3), n = Math.floor(a / 3600), o = Math.floor(a % 3600 / 60), d = a % 60;
65
- return n > 0 ? [n ? `${n}h` : "", o ? `${o}m` : ""].filter(Boolean).join(" ") : o > 0 ? `${o}m${d ? ` ${d}s` : ""}` : `${a}s`;
64
+ const o = Math.round(r / 1e3), n = Math.floor(o / 3600), a = Math.floor(o % 3600 / 60), d = o % 60;
65
+ return n > 0 ? [n ? `${n}h` : "", a ? `${a}m` : ""].filter(Boolean).join(" ") : a > 0 ? `${a}m${d ? ` ${d}s` : ""}` : `${o}s`;
66
66
  }
67
67
  var H = {
68
- pending: "text-muted-foreground",
68
+ pending: "text-secondary-foreground",
69
69
  running: "text-primary",
70
70
  suspended: "text-warning",
71
71
  completed: "text-success",
@@ -100,11 +100,11 @@ var H = {
100
100
  }
101
101
  };
102
102
  function N(e, r) {
103
- const a = new Set(e);
104
- return r.flatMap((n) => a.has(n.id) ? [n.id] : []);
103
+ const o = new Set(e);
104
+ return r.flatMap((n) => o.has(n.id) ? [n.id] : []);
105
105
  }
106
106
  function Y(e, r) {
107
- return e.length === r.length && e.every((a, n) => a === r[n]);
107
+ return e.length === r.length && e.every((o, n) => o === r[n]);
108
108
  }
109
109
  function Z(e) {
110
110
  return typeof e == "object" && e !== null && Symbol.iterator in e && typeof e[Symbol.iterator] == "function";
@@ -114,16 +114,16 @@ function ee(e) {
114
114
  }
115
115
  var M = /* @__PURE__ */ new WeakMap();
116
116
  function te(e, r) {
117
- const a = [];
118
- let n = !1, o = !Array.isArray(e);
117
+ const o = [];
118
+ let n = !1, a = !Array.isArray(e);
119
119
  for (let d = r.next(); !d.done; d = r.next()) {
120
120
  const u = z(d.value);
121
- a.push(u.content), n ||= u.hasRenderableContent, o ||= u.changed;
121
+ o.push(u.content), n ||= u.hasRenderableContent, a ||= u.changed;
122
122
  }
123
123
  return {
124
- content: o ? a : e,
124
+ content: a ? o : e,
125
125
  hasRenderableContent: n,
126
- changed: o
126
+ changed: a
127
127
  };
128
128
  }
129
129
  function z(e) {
@@ -151,13 +151,13 @@ function z(e) {
151
151
  };
152
152
  }
153
153
  if (Z(e)) {
154
- const r = e[Symbol.iterator](), a = ee(r) ? r : null;
155
- if (a !== null) {
156
- const o = M.get(a);
157
- if (o !== void 0) return o;
154
+ const r = e[Symbol.iterator](), o = ee(r) ? r : null;
155
+ if (o !== null) {
156
+ const a = M.get(o);
157
+ if (a !== void 0) return a;
158
158
  }
159
159
  const n = te(e, r);
160
- return a !== null && M.set(a, n), n;
160
+ return o !== null && M.set(o, n), n;
161
161
  }
162
162
  return {
163
163
  content: e,
@@ -184,8 +184,8 @@ function ne(e) {
184
184
  return W(e);
185
185
  }
186
186
  }
187
- function j({ status: e, index: r, className: a }) {
188
- const n = f(Q({ status: e }), a);
187
+ function j({ status: e, index: r, className: o }) {
188
+ const n = f(Q({ status: e }), o);
189
189
  switch (e) {
190
190
  case "pending":
191
191
  return /* @__PURE__ */ t("div", {
@@ -225,8 +225,8 @@ function j({ status: e, index: r, className: a }) {
225
225
  }
226
226
  }
227
227
  j.displayName = "WorkflowStepStatusIcon";
228
- function L({ step: e, index: r, isLast: a, appearance: n = "contained", itemSlot: o = "workflow-step-item", expandable: d = !0, expanded: u, active: k = !1, onExpandedChange: S }) {
229
- const y = c.useId(), l = c.useId(), h = z(e.content), C = h.hasRenderableContent, p = re(e.error), m = p !== void 0, v = C || m, w = v && d, I = F(), x = X[n], i = { duration: I ? 0 : 0.2 }, s = /* @__PURE__ */ g(B, { children: [
228
+ function L({ step: e, index: r, isLast: o, appearance: n = "contained", itemSlot: a = "workflow-step-item", expandable: d = !0, expanded: u, active: y = !1, onExpandedChange: S }) {
229
+ const k = c.useId(), l = c.useId(), h = z(e.content), C = h.hasRenderableContent, p = re(e.error), m = p !== void 0, v = C || m, w = v && d, I = F(), x = X[n], i = { duration: I ? 0 : 0.2 }, s = /* @__PURE__ */ g(B, { children: [
230
230
  /* @__PURE__ */ t(j, {
231
231
  status: e.status,
232
232
  index: r
@@ -242,7 +242,7 @@ function L({ step: e, index: r, isLast: a, appearance: n = "contained", itemSlot
242
242
  children: e.contextLabel
243
243
  }),
244
244
  /* @__PURE__ */ t("span", {
245
- className: f("text-sm font-medium", e.status === "pending" ? "text-text-quaternary" : "text-foreground"),
245
+ className: f("text-sm font-medium", e.status === "pending" ? "text-secondary-foreground" : "text-foreground"),
246
246
  children: e.title
247
247
  }),
248
248
  /* @__PURE__ */ t("span", {
@@ -250,45 +250,45 @@ function L({ step: e, index: r, isLast: a, appearance: n = "contained", itemSlot
250
250
  children: ne(e.status)
251
251
  }),
252
252
  e.durationMs !== void 0 && /* @__PURE__ */ t("span", {
253
- className: "text-xs text-muted-foreground",
253
+ className: "text-xs text-secondary-foreground",
254
254
  children: G(e.durationMs)
255
255
  })
256
256
  ]
257
257
  }), e.description && /* @__PURE__ */ t("p", {
258
- className: "mt-0.5 text-xs text-text-quaternary",
258
+ className: "mt-0.5 text-xs text-secondary-foreground",
259
259
  children: e.description
260
260
  })]
261
261
  }),
262
262
  w && /* @__PURE__ */ t("div", {
263
263
  className: "shrink-0",
264
- children: u ? /* @__PURE__ */ t(q, { className: "size-4 text-muted-foreground" }) : /* @__PURE__ */ t(V, { className: "size-4 text-muted-foreground rtl:rotate-180" })
264
+ children: u ? /* @__PURE__ */ t(V, { className: "size-4 text-muted-foreground" }) : /* @__PURE__ */ t(P, { className: "size-4 text-muted-foreground rtl:rotate-180" })
265
265
  })
266
266
  ] });
267
267
  return /* @__PURE__ */ g("div", {
268
- "data-slot": o,
268
+ "data-slot": a,
269
269
  "data-step-status": e.status,
270
270
  "data-appearance": n,
271
- className: f(x.rootClassName, x.hasDivider && !a && "border-b border-border"),
271
+ className: f(x.rootClassName, x.hasDivider && !o && "border-b border-border"),
272
272
  children: [
273
273
  w ? /* @__PURE__ */ t("button", {
274
274
  type: "button",
275
275
  onClick: S,
276
- "aria-current": k ? "step" : void 0,
276
+ "aria-current": y ? "step" : void 0,
277
277
  "aria-expanded": u,
278
- "aria-controls": y,
278
+ "aria-controls": k,
279
279
  "aria-describedby": m ? l : void 0,
280
280
  className: f(R({ status: e.status }), "w-full cursor-pointer hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring"),
281
281
  children: s
282
282
  }) : /* @__PURE__ */ t("div", {
283
- "aria-current": k ? "step" : void 0,
283
+ "aria-current": y ? "step" : void 0,
284
284
  "aria-describedby": m ? l : void 0,
285
285
  className: f(R({ status: e.status }), "w-full"),
286
286
  children: s
287
287
  }),
288
- /* @__PURE__ */ t(_, {
288
+ /* @__PURE__ */ t(q, {
289
289
  initial: !1,
290
- children: u && v && /* @__PURE__ */ t(P.div, {
291
- id: y,
290
+ children: u && v && /* @__PURE__ */ t(_.div, {
291
+ id: k,
292
292
  "data-slot": "workflow-step-panel",
293
293
  initial: {
294
294
  height: 0,
@@ -327,7 +327,7 @@ function L({ step: e, index: r, isLast: a, appearance: n = "contained", itemSlot
327
327
  className: "sr-only",
328
328
  children: p
329
329
  }),
330
- x.hasConnector && !a && /* @__PURE__ */ t("div", {
330
+ x.hasConnector && !o && /* @__PURE__ */ t("div", {
331
331
  "data-slot": "workflow-step-connector",
332
332
  "aria-hidden": "true",
333
333
  className: "absolute top-8 -bottom-3 start-6 w-px bg-border"
@@ -336,7 +336,7 @@ function L({ step: e, index: r, isLast: a, appearance: n = "contained", itemSlot
336
336
  });
337
337
  }
338
338
  L.displayName = "WorkflowStepItem";
339
- function ae({ steps: e, appearance: r = "contained", itemSlot: a = "workflow-step-item", expandable: n = !0, activeStepId: o, expandedStepIds: d, defaultExpandedStepIds: u = [], onExpandedStepIdsChange: k, className: S, renderItems: y = !0 }) {
339
+ function oe({ steps: e, appearance: r = "contained", itemSlot: o = "workflow-step-item", expandable: n = !0, activeStepId: a, expandedStepIds: d, defaultExpandedStepIds: u = [], onExpandedStepIdsChange: y, className: S, renderItems: k = !0 }) {
340
340
  const l = d !== void 0, h = l ? [...d] : void 0, [C, p] = c.useState(() => N(u, e)), m = c.useRef(h ?? []), v = c.useRef(l), w = N(l ? d : C, e), I = new Set(w);
341
341
  c.useLayoutEffect(() => {
342
342
  h !== void 0 && (m.current = h);
@@ -351,9 +351,9 @@ function ae({ steps: e, appearance: r = "contained", itemSlot: a = "workflow-ste
351
351
  const s = new Set(w);
352
352
  s.has(i) ? s.delete(i) : s.add(i);
353
353
  const b = N([...s], e);
354
- l || p([...b]), k?.([...b]);
354
+ l || p([...b]), y?.([...b]);
355
355
  };
356
- return y ? /* @__PURE__ */ t("ol", {
356
+ return k ? /* @__PURE__ */ t("ol", {
357
357
  "data-slot": "workflow-step-list",
358
358
  "data-appearance": r,
359
359
  className: f("m-0 list-none p-0", S),
@@ -362,18 +362,18 @@ function ae({ steps: e, appearance: r = "contained", itemSlot: a = "workflow-ste
362
362
  index: s,
363
363
  isLast: s === e.length - 1,
364
364
  appearance: r,
365
- itemSlot: a,
365
+ itemSlot: o,
366
366
  expandable: n,
367
367
  expanded: I.has(i.id),
368
- active: o === i.id,
368
+ active: a === i.id,
369
369
  onExpandedChange: () => x(i.id)
370
370
  }) }, i.id))
371
371
  }) : null;
372
372
  }
373
- ae.displayName = "WorkflowStepRenderer";
373
+ oe.displayName = "WorkflowStepRenderer";
374
374
  export {
375
375
  G as i,
376
- ae as n,
376
+ oe as n,
377
377
  j as r,
378
378
  L as t
379
379
  };
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-step-renderer.js","names":["__iconNode"],"sources":["../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/loader.mjs","../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/pause.mjs","../../src/components/organisms/ai/_shared/format-ai-duration.ts","../../src/components/organisms/ai/_shared/workflow-step-renderer.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M12 2v4\", key: \"3427ic\" }],\n [\"path\", { d: \"m16.2 7.8 2.9-2.9\", key: \"r700ao\" }],\n [\"path\", { d: \"M18 12h4\", key: \"wj9ykh\" }],\n [\"path\", { d: \"m16.2 16.2 2.9 2.9\", key: \"1bxg5t\" }],\n [\"path\", { d: \"M12 18v4\", key: \"jadmvz\" }],\n [\"path\", { d: \"m4.9 19.1 2.9-2.9\", key: \"bwix9q\" }],\n [\"path\", { d: \"M2 12h4\", key: \"j09sii\" }],\n [\"path\", { d: \"m4.9 4.9 2.9 2.9\", key: \"giyufr\" }]\n];\nconst Loader = createLucideIcon(\"loader\", __iconNode);\n\nexport { __iconNode, Loader as default };\n//# sourceMappingURL=loader.mjs.map\n","/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { x: \"14\", y: \"3\", width: \"5\", height: \"18\", rx: \"1\", key: \"kaeet6\" }],\n [\"rect\", { x: \"5\", y: \"3\", width: \"5\", height: \"18\", rx: \"1\", key: \"1wsw3u\" }]\n];\nconst Pause = createLucideIcon(\"pause\", __iconNode);\n\nexport { __iconNode, Pause as default };\n//# sourceMappingURL=pause.mjs.map\n","export function formatAIDuration(durationMs: number): string {\n const normalizedMs = Math.max(0, Math.round(durationMs));\n if (normalizedMs < 1000) return `${normalizedMs}ms`;\n\n const totalSeconds = Math.round(normalizedMs / 1000);\n const hours = Math.floor(totalSeconds / 3600);\n const minutes = Math.floor((totalSeconds % 3600) / 60);\n const seconds = totalSeconds % 60;\n\n if (hours > 0) {\n return [hours ? `${hours}h` : '', minutes ? `${minutes}m` : '']\n .filter(Boolean)\n .join(' ');\n }\n if (minutes > 0) {\n return `${minutes}m${seconds ? ` ${seconds}s` : ''}`;\n }\n return `${totalSeconds}s`;\n}\n","import { cva } from 'class-variance-authority';\nimport {\n AlertCircle,\n Check,\n ChevronDown,\n ChevronRight,\n Loader,\n Pause,\n} from 'lucide-react';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport * as React from 'react';\nimport { assertNever, cn } from '@/lib/utils';\nimport { formatAIDuration } from './format-ai-duration';\n\nexport type WorkflowStepStatus =\n | 'pending'\n | 'running'\n | 'suspended'\n | 'completed'\n | 'error';\n\nexport type WorkflowStepAppearance = 'contained' | 'embedded' | 'timeline';\n\nexport interface WorkflowStepViewModel {\n id: string;\n title: string;\n description?: string;\n contextLabel?: string;\n status: WorkflowStepStatus;\n content?: React.ReactNode;\n durationMs?: number;\n error?: string;\n}\n\nexport interface WorkflowStepRendererProps {\n steps: readonly WorkflowStepViewModel[];\n appearance?: WorkflowStepAppearance;\n itemSlot?: string;\n expandable?: boolean;\n activeStepId?: string;\n expandedStepIds?: readonly string[];\n defaultExpandedStepIds?: readonly string[];\n onExpandedStepIdsChange?: (ids: readonly string[]) => void;\n className?: string;\n}\n\ninterface PrivateWorkflowStepRendererProps extends WorkflowStepRendererProps {\n renderItems?: boolean;\n}\n\nconst workflowStepItemStatusClasses = {\n pending: 'text-muted-foreground',\n running: 'text-primary',\n suspended: 'text-warning',\n completed: 'text-success',\n error: 'text-destructive',\n} as const satisfies Record<WorkflowStepStatus, string>;\n\nconst workflowStepIconStatusClasses = {\n pending: 'bg-accent text-muted-foreground',\n running: 'bg-primary/20 text-primary',\n suspended: 'bg-warning/20 text-warning',\n completed: 'bg-success/20 text-success',\n error: 'bg-destructive/20 text-destructive',\n} as const satisfies Record<WorkflowStepStatus, string>;\n\nexport const workflowStepItemVariants = cva(\n 'flex items-start gap-3 px-4 py-3 transition-colors motion-reduce:transition-none',\n {\n variants: {\n status: workflowStepItemStatusClasses,\n },\n defaultVariants: {\n status: 'pending',\n },\n },\n);\n\nexport const workflowStepIconVariants = cva(\n 'size-5 shrink-0 flex items-center justify-center rounded-full',\n {\n variants: {\n status: workflowStepIconStatusClasses,\n },\n defaultVariants: {\n status: 'pending',\n },\n },\n);\n\nconst workflowStepAppearanceConfig = {\n contained: {\n rootClassName: 'relative',\n hasDivider: true,\n hasConnector: false,\n },\n embedded: {\n rootClassName: 'relative',\n hasDivider: true,\n hasConnector: false,\n },\n timeline: {\n rootClassName: 'relative',\n hasDivider: false,\n hasConnector: true,\n },\n} as const satisfies Record<\n WorkflowStepAppearance,\n { rootClassName: string; hasDivider: boolean; hasConnector: boolean }\n>;\n\nexport function normalizeExpandedWorkflowStepIds(\n ids: readonly string[],\n steps: readonly WorkflowStepViewModel[],\n): string[] {\n const requested = new Set(ids);\n return steps.flatMap((step) => (requested.has(step.id) ? [step.id] : []));\n}\n\nfunction areWorkflowStepIdsEqual(\n left: readonly string[],\n right: readonly string[],\n): boolean {\n return (\n left.length === right.length &&\n left.every((id, index) => id === right[index])\n );\n}\n\nfunction isIterableWorkflowStepContent(\n content: React.ReactNode,\n): content is Iterable<React.ReactNode> {\n return (\n typeof content === 'object' &&\n content !== null &&\n Symbol.iterator in content &&\n typeof (content as Iterable<React.ReactNode>)[Symbol.iterator] ===\n 'function'\n );\n}\n\nfunction isIteratorWorkflowStepContent(\n content: unknown,\n): content is Iterator<React.ReactNode> {\n return (\n typeof (content as Partial<Iterator<React.ReactNode>>).next === 'function'\n );\n}\n\ninterface NormalizedWorkflowStepContent {\n content: React.ReactNode;\n hasRenderableContent: boolean;\n changed: boolean;\n}\n\nconst normalizedOneShotWorkflowStepContent = new WeakMap<\n object,\n NormalizedWorkflowStepContent\n>();\n\nfunction normalizeIterableWorkflowStepContent(\n content: Iterable<React.ReactNode>,\n iterator: Iterator<React.ReactNode>,\n): NormalizedWorkflowStepContent {\n const normalizedChildren: React.ReactNode[] = [];\n let hasRenderableContent = false;\n let changed = !Array.isArray(content);\n\n for (let result = iterator.next(); !result.done; result = iterator.next()) {\n const normalizedChild = normalizeWorkflowStepContent(result.value);\n normalizedChildren.push(normalizedChild.content);\n hasRenderableContent ||= normalizedChild.hasRenderableContent;\n changed ||= normalizedChild.changed;\n }\n\n return {\n content: changed ? normalizedChildren : content,\n hasRenderableContent,\n changed,\n };\n}\n\nfunction normalizeWorkflowStepContent(\n content: React.ReactNode,\n): NormalizedWorkflowStepContent {\n if (\n content === null ||\n content === undefined ||\n typeof content === 'boolean' ||\n content === ''\n ) {\n return { content, hasRenderableContent: false, changed: false };\n }\n\n if (\n typeof content === 'string' ||\n typeof content === 'number' ||\n typeof content === 'bigint'\n ) {\n return { content, hasRenderableContent: true, changed: false };\n }\n\n if (React.isValidElement<{ children?: React.ReactNode }>(content)) {\n if (content.type !== React.Fragment) {\n return { content, hasRenderableContent: true, changed: false };\n }\n\n const normalizedChildren = normalizeWorkflowStepContent(\n content.props.children,\n );\n return {\n content: normalizedChildren.changed\n ? React.cloneElement(content, undefined, normalizedChildren.content)\n : content,\n hasRenderableContent: normalizedChildren.hasRenderableContent,\n changed: normalizedChildren.changed,\n };\n }\n\n if (isIterableWorkflowStepContent(content)) {\n const iterator = content[Symbol.iterator]();\n const oneShotCacheKey = isIteratorWorkflowStepContent(iterator)\n ? (iterator as object)\n : null;\n\n if (oneShotCacheKey !== null) {\n const cached = normalizedOneShotWorkflowStepContent.get(oneShotCacheKey);\n if (cached !== undefined) return cached;\n }\n\n const normalized = normalizeIterableWorkflowStepContent(content, iterator);\n if (oneShotCacheKey !== null) {\n normalizedOneShotWorkflowStepContent.set(oneShotCacheKey, normalized);\n }\n return normalized;\n }\n\n return { content, hasRenderableContent: true, changed: false };\n}\n\nfunction getNonBlankWorkflowStepError(\n error: string | undefined,\n): string | undefined {\n return error?.trim() ? error : undefined;\n}\n\nfunction getWorkflowStepStatusLabel(status: WorkflowStepStatus): string {\n switch (status) {\n case 'pending':\n return 'Pending';\n case 'running':\n return 'Running';\n case 'suspended':\n return 'Paused';\n case 'completed':\n return 'Completed';\n case 'error':\n return 'Error';\n default:\n return assertNever(status);\n }\n}\n\nexport interface WorkflowStepStatusIconProps {\n status: WorkflowStepStatus;\n index: number;\n className?: string;\n}\n\nexport function WorkflowStepStatusIcon({\n status,\n index,\n className,\n}: WorkflowStepStatusIconProps) {\n const iconClass = cn(workflowStepIconVariants({ status }), className);\n\n switch (status) {\n case 'pending':\n return (\n <div data-slot=\"workflow-step-icon\" className={iconClass}>\n <span className=\"text-xs font-medium\">{index + 1}</span>\n </div>\n );\n case 'running':\n return (\n <div\n data-slot=\"workflow-step-icon\"\n className={cn(\n iconClass,\n 'delight-status-pulse motion-reduce:!animate-none',\n )}\n >\n <Loader className=\"size-3 animate-spin motion-reduce:animate-none\" />\n </div>\n );\n case 'suspended':\n return (\n <div data-slot=\"workflow-step-icon\" className={iconClass}>\n <Pause className=\"size-3\" />\n </div>\n );\n case 'completed':\n return (\n <div\n data-slot=\"workflow-step-icon\"\n className={cn(\n iconClass,\n 'delight-check-bounce motion-reduce:!animate-none',\n )}\n >\n <Check className=\"size-3\" />\n </div>\n );\n case 'error':\n return (\n <div\n data-slot=\"workflow-step-icon\"\n className={cn(iconClass, 'delight-shake motion-reduce:!animate-none')}\n >\n <AlertCircle className=\"size-3\" />\n </div>\n );\n default:\n return assertNever(status);\n }\n}\n\nWorkflowStepStatusIcon.displayName = 'WorkflowStepStatusIcon';\n\nexport interface WorkflowStepItemProps {\n step: WorkflowStepViewModel;\n index: number;\n isLast: boolean;\n appearance?: WorkflowStepAppearance;\n itemSlot?: string;\n expandable?: boolean;\n expanded: boolean;\n active?: boolean;\n onExpandedChange: () => void;\n}\n\nexport function WorkflowStepItem({\n step,\n index,\n isLast,\n appearance = 'contained',\n itemSlot = 'workflow-step-item',\n expandable = true,\n expanded,\n active = false,\n onExpandedChange,\n}: WorkflowStepItemProps) {\n const contentId = React.useId();\n const errorDescriptionId = React.useId();\n const normalizedContent = normalizeWorkflowStepContent(step.content);\n const hasContent = normalizedContent.hasRenderableContent;\n const error = getNonBlankWorkflowStepError(step.error);\n const hasError = error !== undefined;\n const hasExpandableDetails = hasContent || hasError;\n const isDisclosureControl = hasExpandableDetails && expandable;\n const prefersReducedMotion = useReducedMotion();\n const appearanceConfig = workflowStepAppearanceConfig[appearance];\n const disclosureTransition = {\n duration: prefersReducedMotion ? 0 : 0.2,\n };\n const stepContent = (\n <>\n <WorkflowStepStatusIcon status={step.status} index={index} />\n\n <div className=\"min-w-0 flex-1 text-start\">\n <div className=\"flex flex-wrap items-center gap-2\">\n {step.contextLabel && (\n <span\n data-slot=\"workflow-step-context\"\n className=\"rounded-full border border-border px-2 py-0.5 text-[0.6875rem] font-medium leading-none text-secondary-foreground\"\n >\n {step.contextLabel}\n </span>\n )}\n <span\n className={cn(\n 'text-sm font-medium',\n step.status === 'pending'\n ? 'text-text-quaternary'\n : 'text-foreground',\n )}\n >\n {step.title}\n </span>\n <span className=\"text-xs text-secondary-foreground\">\n {getWorkflowStepStatusLabel(step.status)}\n </span>\n {step.durationMs !== undefined && (\n <span className=\"text-xs text-muted-foreground\">\n {formatAIDuration(step.durationMs)}\n </span>\n )}\n </div>\n {step.description && (\n <p className=\"mt-0.5 text-xs text-text-quaternary\">\n {step.description}\n </p>\n )}\n </div>\n\n {isDisclosureControl && (\n <div className=\"shrink-0\">\n {expanded ? (\n <ChevronDown className=\"size-4 text-muted-foreground\" />\n ) : (\n <ChevronRight className=\"size-4 text-muted-foreground rtl:rotate-180\" />\n )}\n </div>\n )}\n </>\n );\n\n return (\n <div\n data-slot={itemSlot}\n data-step-status={step.status}\n data-appearance={appearance}\n className={cn(\n appearanceConfig.rootClassName,\n appearanceConfig.hasDivider && !isLast && 'border-b border-border',\n )}\n >\n {isDisclosureControl ? (\n <button\n type=\"button\"\n onClick={onExpandedChange}\n aria-current={active ? 'step' : undefined}\n aria-expanded={expanded}\n aria-controls={contentId}\n aria-describedby={hasError ? errorDescriptionId : undefined}\n className={cn(\n workflowStepItemVariants({ status: step.status }),\n 'w-full cursor-pointer hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring',\n )}\n >\n {stepContent}\n </button>\n ) : (\n <div\n aria-current={active ? 'step' : undefined}\n aria-describedby={hasError ? errorDescriptionId : undefined}\n className={cn(\n workflowStepItemVariants({ status: step.status }),\n 'w-full',\n )}\n >\n {stepContent}\n </div>\n )}\n\n <AnimatePresence initial={false}>\n {expanded && hasExpandableDetails && (\n <motion.div\n id={contentId}\n data-slot=\"workflow-step-panel\"\n initial={{ height: 0, opacity: 0 }}\n animate={{ height: 'auto', opacity: 1 }}\n exit={{ height: 0, opacity: 0 }}\n transition={disclosureTransition}\n className=\"overflow-hidden motion-reduce:transition-none\"\n >\n <div className=\"px-4 pb-3 ps-12\">\n {hasError && (\n <div className=\"rounded-lg border border-destructive/50 bg-destructive/10 p-3\">\n <div className=\"flex items-start gap-2\">\n <AlertCircle className=\"mt-0.5 size-4 shrink-0 text-destructive\" />\n <p className=\"text-sm text-destructive\">{error}</p>\n </div>\n </div>\n )}\n {hasContent && (\n <div className={hasError ? 'mt-3' : undefined}>\n {normalizedContent.content}\n </div>\n )}\n </div>\n </motion.div>\n )}\n </AnimatePresence>\n\n {hasError && (\n <span id={errorDescriptionId} className=\"sr-only\">\n {error}\n </span>\n )}\n\n {appearanceConfig.hasConnector && !isLast && (\n <div\n data-slot=\"workflow-step-connector\"\n aria-hidden=\"true\"\n className=\"absolute top-8 -bottom-3 start-6 w-px bg-border\"\n />\n )}\n </div>\n );\n}\n\nWorkflowStepItem.displayName = 'WorkflowStepItem';\n\nexport function WorkflowStepRenderer({\n steps,\n appearance = 'contained',\n itemSlot = 'workflow-step-item',\n expandable = true,\n activeStepId,\n expandedStepIds: controlledExpandedStepIds,\n defaultExpandedStepIds = [],\n onExpandedStepIdsChange,\n className,\n renderItems = true,\n}: PrivateWorkflowStepRendererProps) {\n const isControlled = controlledExpandedStepIds !== undefined;\n const controlledSnapshot = isControlled\n ? [...controlledExpandedStepIds]\n : undefined;\n const [uncontrolledExpandedStepIds, setUncontrolledExpandedStepIds] =\n React.useState<readonly string[]>(() =>\n normalizeExpandedWorkflowStepIds(defaultExpandedStepIds, steps),\n );\n const lastControlledExpandedStepIdsRef = React.useRef<readonly string[]>(\n controlledSnapshot ?? [],\n );\n const wasControlledRef = React.useRef(isControlled);\n const rawExpandedStepIds = isControlled\n ? controlledExpandedStepIds\n : uncontrolledExpandedStepIds;\n const visibleExpandedStepIds = normalizeExpandedWorkflowStepIds(\n rawExpandedStepIds,\n steps,\n );\n const expandedSet = new Set(visibleExpandedStepIds);\n\n React.useLayoutEffect(() => {\n if (controlledSnapshot !== undefined) {\n lastControlledExpandedStepIdsRef.current = controlledSnapshot;\n }\n }, [controlledSnapshot]);\n\n React.useLayoutEffect(() => {\n const wasControlled = wasControlledRef.current;\n wasControlledRef.current = isControlled;\n if (isControlled) return;\n\n setUncontrolledExpandedStepIds((current) => {\n const source = wasControlled\n ? lastControlledExpandedStepIdsRef.current\n : current;\n const reconciled = normalizeExpandedWorkflowStepIds(source, steps);\n return areWorkflowStepIdsEqual(reconciled, current)\n ? current\n : reconciled;\n });\n }, [isControlled, steps]);\n\n const toggleStep = (id: string) => {\n const next = new Set(visibleExpandedStepIds);\n if (next.has(id)) next.delete(id);\n else next.add(id);\n const normalizedNext = normalizeExpandedWorkflowStepIds([...next], steps);\n if (!isControlled) {\n setUncontrolledExpandedStepIds([...normalizedNext]);\n }\n onExpandedStepIdsChange?.([...normalizedNext]);\n };\n\n if (!renderItems) return null;\n\n return (\n <ol\n data-slot=\"workflow-step-list\"\n data-appearance={appearance}\n className={cn('m-0 list-none p-0', className)}\n >\n {steps.map((step, index) => (\n <li key={step.id}>\n <WorkflowStepItem\n step={step}\n index={index}\n isLast={index === steps.length - 1}\n appearance={appearance}\n itemSlot={itemSlot}\n expandable={expandable}\n expanded={expandedSet.has(step.id)}\n active={activeStepId === step.id}\n onExpandedChange={() => toggleStep(step.id)}\n />\n </li>\n ))}\n </ol>\n );\n}\n\nWorkflowStepRenderer.displayName = 'WorkflowStepRenderer';\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;AASA,IAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAW,KAAK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xE,IAAK,KACH,EAA+B,CAAC,GAAG,CAAc,CAAC,GAEpD,IAA0B,CAAC,GAAG,CAAc,CAAC;AAAA,EAC/C;AAEA,SAAK,IAGH,gBAAA,EAAC,MAAD;AAAA,IACE,aAAU;AAAA,IACV,mBAAiB;AAAA,IACjB,WAAW,EAAG,qBAAqB,CAAS;AAAA,cAE3C,EAAM,IAAA,CAAK,GAAM,MAChB,gBAAA,EAAC,MAAD,EAAA,UACE,gBAAA,EAAC,GAAD;AAAA,MACQ,MAAA;AAAA,MACC,OAAA;AAAA,MACP,QAAQ,MAAU,EAAM,SAAS;AAAA,MACrB,YAAA;AAAA,MACF,UAAA;AAAA,MACE,YAAA;AAAA,MACZ,UAAU,EAAY,IAAI,EAAK,EAAE;AAAA,MACjC,QAAQ,MAAiB,EAAK;AAAA,MAC9B,kBAAA,MAAwB,EAAW,EAAK,EAAE;AAAA,IAC3C,CAAA,EACC,GAZK,EAAK,EAYV,CACL;AAAA,EACC,CAAA,IAvBmB;AAyB3B;AAEA,GAAqB,cAAc"}
1
+ {"version":3,"file":"workflow-step-renderer.js","names":["__iconNode"],"sources":["../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/loader.mjs","../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/pause.mjs","../../src/components/organisms/ai/_shared/format-ai-duration.ts","../../src/components/organisms/ai/_shared/workflow-step-renderer.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M12 2v4\", key: \"3427ic\" }],\n [\"path\", { d: \"m16.2 7.8 2.9-2.9\", key: \"r700ao\" }],\n [\"path\", { d: \"M18 12h4\", key: \"wj9ykh\" }],\n [\"path\", { d: \"m16.2 16.2 2.9 2.9\", key: \"1bxg5t\" }],\n [\"path\", { d: \"M12 18v4\", key: \"jadmvz\" }],\n [\"path\", { d: \"m4.9 19.1 2.9-2.9\", key: \"bwix9q\" }],\n [\"path\", { d: \"M2 12h4\", key: \"j09sii\" }],\n [\"path\", { d: \"m4.9 4.9 2.9 2.9\", key: \"giyufr\" }]\n];\nconst Loader = createLucideIcon(\"loader\", __iconNode);\n\nexport { __iconNode, Loader as default };\n//# sourceMappingURL=loader.mjs.map\n","/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { x: \"14\", y: \"3\", width: \"5\", height: \"18\", rx: \"1\", key: \"kaeet6\" }],\n [\"rect\", { x: \"5\", y: \"3\", width: \"5\", height: \"18\", rx: \"1\", key: \"1wsw3u\" }]\n];\nconst Pause = createLucideIcon(\"pause\", __iconNode);\n\nexport { __iconNode, Pause as default };\n//# sourceMappingURL=pause.mjs.map\n","export function formatAIDuration(durationMs: number): string {\n const normalizedMs = Math.max(0, Math.round(durationMs));\n if (normalizedMs < 1000) return `${normalizedMs}ms`;\n\n const totalSeconds = Math.round(normalizedMs / 1000);\n const hours = Math.floor(totalSeconds / 3600);\n const minutes = Math.floor((totalSeconds % 3600) / 60);\n const seconds = totalSeconds % 60;\n\n if (hours > 0) {\n return [hours ? `${hours}h` : '', minutes ? `${minutes}m` : '']\n .filter(Boolean)\n .join(' ');\n }\n if (minutes > 0) {\n return `${minutes}m${seconds ? ` ${seconds}s` : ''}`;\n }\n return `${totalSeconds}s`;\n}\n","import { cva } from 'class-variance-authority';\nimport {\n AlertCircle,\n Check,\n ChevronDown,\n ChevronRight,\n Loader,\n Pause,\n} from 'lucide-react';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport * as React from 'react';\nimport { assertNever, cn } from '@/lib/utils';\nimport { formatAIDuration } from './format-ai-duration';\n\nexport type WorkflowStepStatus =\n | 'pending'\n | 'running'\n | 'suspended'\n | 'completed'\n | 'error';\n\nexport type WorkflowStepAppearance = 'contained' | 'embedded' | 'timeline';\n\nexport interface WorkflowStepViewModel {\n id: string;\n title: string;\n description?: string;\n contextLabel?: string;\n status: WorkflowStepStatus;\n content?: React.ReactNode;\n durationMs?: number;\n error?: string;\n}\n\nexport interface WorkflowStepRendererProps {\n steps: readonly WorkflowStepViewModel[];\n appearance?: WorkflowStepAppearance;\n itemSlot?: string;\n expandable?: boolean;\n activeStepId?: string;\n expandedStepIds?: readonly string[];\n defaultExpandedStepIds?: readonly string[];\n onExpandedStepIdsChange?: (ids: readonly string[]) => void;\n className?: string;\n}\n\ninterface PrivateWorkflowStepRendererProps extends WorkflowStepRendererProps {\n renderItems?: boolean;\n}\n\nconst workflowStepItemStatusClasses = {\n pending: 'text-secondary-foreground',\n running: 'text-primary',\n suspended: 'text-warning',\n completed: 'text-success',\n error: 'text-destructive',\n} as const satisfies Record<WorkflowStepStatus, string>;\n\nconst workflowStepIconStatusClasses = {\n pending: 'bg-accent text-muted-foreground',\n running: 'bg-primary/20 text-primary',\n suspended: 'bg-warning/20 text-warning',\n completed: 'bg-success/20 text-success',\n error: 'bg-destructive/20 text-destructive',\n} as const satisfies Record<WorkflowStepStatus, string>;\n\nexport const workflowStepItemVariants = cva(\n 'flex items-start gap-3 px-4 py-3 transition-colors motion-reduce:transition-none',\n {\n variants: {\n status: workflowStepItemStatusClasses,\n },\n defaultVariants: {\n status: 'pending',\n },\n },\n);\n\nexport const workflowStepIconVariants = cva(\n 'size-5 shrink-0 flex items-center justify-center rounded-full',\n {\n variants: {\n status: workflowStepIconStatusClasses,\n },\n defaultVariants: {\n status: 'pending',\n },\n },\n);\n\nconst workflowStepAppearanceConfig = {\n contained: {\n rootClassName: 'relative',\n hasDivider: true,\n hasConnector: false,\n },\n embedded: {\n rootClassName: 'relative',\n hasDivider: true,\n hasConnector: false,\n },\n timeline: {\n rootClassName: 'relative',\n hasDivider: false,\n hasConnector: true,\n },\n} as const satisfies Record<\n WorkflowStepAppearance,\n { rootClassName: string; hasDivider: boolean; hasConnector: boolean }\n>;\n\nexport function normalizeExpandedWorkflowStepIds(\n ids: readonly string[],\n steps: readonly WorkflowStepViewModel[],\n): string[] {\n const requested = new Set(ids);\n return steps.flatMap((step) => (requested.has(step.id) ? [step.id] : []));\n}\n\nfunction areWorkflowStepIdsEqual(\n left: readonly string[],\n right: readonly string[],\n): boolean {\n return (\n left.length === right.length &&\n left.every((id, index) => id === right[index])\n );\n}\n\nfunction isIterableWorkflowStepContent(\n content: React.ReactNode,\n): content is Iterable<React.ReactNode> {\n return (\n typeof content === 'object' &&\n content !== null &&\n Symbol.iterator in content &&\n typeof (content as Iterable<React.ReactNode>)[Symbol.iterator] ===\n 'function'\n );\n}\n\nfunction isIteratorWorkflowStepContent(\n content: unknown,\n): content is Iterator<React.ReactNode> {\n return (\n typeof (content as Partial<Iterator<React.ReactNode>>).next === 'function'\n );\n}\n\ninterface NormalizedWorkflowStepContent {\n content: React.ReactNode;\n hasRenderableContent: boolean;\n changed: boolean;\n}\n\nconst normalizedOneShotWorkflowStepContent = new WeakMap<\n object,\n NormalizedWorkflowStepContent\n>();\n\nfunction normalizeIterableWorkflowStepContent(\n content: Iterable<React.ReactNode>,\n iterator: Iterator<React.ReactNode>,\n): NormalizedWorkflowStepContent {\n const normalizedChildren: React.ReactNode[] = [];\n let hasRenderableContent = false;\n let changed = !Array.isArray(content);\n\n for (let result = iterator.next(); !result.done; result = iterator.next()) {\n const normalizedChild = normalizeWorkflowStepContent(result.value);\n normalizedChildren.push(normalizedChild.content);\n hasRenderableContent ||= normalizedChild.hasRenderableContent;\n changed ||= normalizedChild.changed;\n }\n\n return {\n content: changed ? normalizedChildren : content,\n hasRenderableContent,\n changed,\n };\n}\n\nfunction normalizeWorkflowStepContent(\n content: React.ReactNode,\n): NormalizedWorkflowStepContent {\n if (\n content === null ||\n content === undefined ||\n typeof content === 'boolean' ||\n content === ''\n ) {\n return { content, hasRenderableContent: false, changed: false };\n }\n\n if (\n typeof content === 'string' ||\n typeof content === 'number' ||\n typeof content === 'bigint'\n ) {\n return { content, hasRenderableContent: true, changed: false };\n }\n\n if (React.isValidElement<{ children?: React.ReactNode }>(content)) {\n if (content.type !== React.Fragment) {\n return { content, hasRenderableContent: true, changed: false };\n }\n\n const normalizedChildren = normalizeWorkflowStepContent(\n content.props.children,\n );\n return {\n content: normalizedChildren.changed\n ? React.cloneElement(content, undefined, normalizedChildren.content)\n : content,\n hasRenderableContent: normalizedChildren.hasRenderableContent,\n changed: normalizedChildren.changed,\n };\n }\n\n if (isIterableWorkflowStepContent(content)) {\n const iterator = content[Symbol.iterator]();\n const oneShotCacheKey = isIteratorWorkflowStepContent(iterator)\n ? (iterator as object)\n : null;\n\n if (oneShotCacheKey !== null) {\n const cached = normalizedOneShotWorkflowStepContent.get(oneShotCacheKey);\n if (cached !== undefined) return cached;\n }\n\n const normalized = normalizeIterableWorkflowStepContent(content, iterator);\n if (oneShotCacheKey !== null) {\n normalizedOneShotWorkflowStepContent.set(oneShotCacheKey, normalized);\n }\n return normalized;\n }\n\n return { content, hasRenderableContent: true, changed: false };\n}\n\nfunction getNonBlankWorkflowStepError(\n error: string | undefined,\n): string | undefined {\n return error?.trim() ? error : undefined;\n}\n\nfunction getWorkflowStepStatusLabel(status: WorkflowStepStatus): string {\n switch (status) {\n case 'pending':\n return 'Pending';\n case 'running':\n return 'Running';\n case 'suspended':\n return 'Paused';\n case 'completed':\n return 'Completed';\n case 'error':\n return 'Error';\n default:\n return assertNever(status);\n }\n}\n\nexport interface WorkflowStepStatusIconProps {\n status: WorkflowStepStatus;\n index: number;\n className?: string;\n}\n\nexport function WorkflowStepStatusIcon({\n status,\n index,\n className,\n}: WorkflowStepStatusIconProps) {\n const iconClass = cn(workflowStepIconVariants({ status }), className);\n\n switch (status) {\n case 'pending':\n return (\n <div data-slot=\"workflow-step-icon\" className={iconClass}>\n <span className=\"text-xs font-medium\">{index + 1}</span>\n </div>\n );\n case 'running':\n return (\n <div\n data-slot=\"workflow-step-icon\"\n className={cn(\n iconClass,\n 'delight-status-pulse motion-reduce:!animate-none',\n )}\n >\n <Loader className=\"size-3 animate-spin motion-reduce:animate-none\" />\n </div>\n );\n case 'suspended':\n return (\n <div data-slot=\"workflow-step-icon\" className={iconClass}>\n <Pause className=\"size-3\" />\n </div>\n );\n case 'completed':\n return (\n <div\n data-slot=\"workflow-step-icon\"\n className={cn(\n iconClass,\n 'delight-check-bounce motion-reduce:!animate-none',\n )}\n >\n <Check className=\"size-3\" />\n </div>\n );\n case 'error':\n return (\n <div\n data-slot=\"workflow-step-icon\"\n className={cn(iconClass, 'delight-shake motion-reduce:!animate-none')}\n >\n <AlertCircle className=\"size-3\" />\n </div>\n );\n default:\n return assertNever(status);\n }\n}\n\nWorkflowStepStatusIcon.displayName = 'WorkflowStepStatusIcon';\n\nexport interface WorkflowStepItemProps {\n step: WorkflowStepViewModel;\n index: number;\n isLast: boolean;\n appearance?: WorkflowStepAppearance;\n itemSlot?: string;\n expandable?: boolean;\n expanded: boolean;\n active?: boolean;\n onExpandedChange: () => void;\n}\n\nexport function WorkflowStepItem({\n step,\n index,\n isLast,\n appearance = 'contained',\n itemSlot = 'workflow-step-item',\n expandable = true,\n expanded,\n active = false,\n onExpandedChange,\n}: WorkflowStepItemProps) {\n const contentId = React.useId();\n const errorDescriptionId = React.useId();\n const normalizedContent = normalizeWorkflowStepContent(step.content);\n const hasContent = normalizedContent.hasRenderableContent;\n const error = getNonBlankWorkflowStepError(step.error);\n const hasError = error !== undefined;\n const hasExpandableDetails = hasContent || hasError;\n const isDisclosureControl = hasExpandableDetails && expandable;\n const prefersReducedMotion = useReducedMotion();\n const appearanceConfig = workflowStepAppearanceConfig[appearance];\n const disclosureTransition = {\n duration: prefersReducedMotion ? 0 : 0.2,\n };\n const stepContent = (\n <>\n <WorkflowStepStatusIcon status={step.status} index={index} />\n\n <div className=\"min-w-0 flex-1 text-start\">\n <div className=\"flex flex-wrap items-center gap-2\">\n {step.contextLabel && (\n <span\n data-slot=\"workflow-step-context\"\n className=\"rounded-full border border-border px-2 py-0.5 text-[0.6875rem] font-medium leading-none text-secondary-foreground\"\n >\n {step.contextLabel}\n </span>\n )}\n <span\n className={cn(\n 'text-sm font-medium',\n step.status === 'pending'\n ? 'text-secondary-foreground'\n : 'text-foreground',\n )}\n >\n {step.title}\n </span>\n <span className=\"text-xs text-secondary-foreground\">\n {getWorkflowStepStatusLabel(step.status)}\n </span>\n {step.durationMs !== undefined && (\n <span className=\"text-xs text-secondary-foreground\">\n {formatAIDuration(step.durationMs)}\n </span>\n )}\n </div>\n {step.description && (\n <p className=\"mt-0.5 text-xs text-secondary-foreground\">\n {step.description}\n </p>\n )}\n </div>\n\n {isDisclosureControl && (\n <div className=\"shrink-0\">\n {expanded ? (\n <ChevronDown className=\"size-4 text-muted-foreground\" />\n ) : (\n <ChevronRight className=\"size-4 text-muted-foreground rtl:rotate-180\" />\n )}\n </div>\n )}\n </>\n );\n\n return (\n <div\n data-slot={itemSlot}\n data-step-status={step.status}\n data-appearance={appearance}\n className={cn(\n appearanceConfig.rootClassName,\n appearanceConfig.hasDivider && !isLast && 'border-b border-border',\n )}\n >\n {isDisclosureControl ? (\n <button\n type=\"button\"\n onClick={onExpandedChange}\n aria-current={active ? 'step' : undefined}\n aria-expanded={expanded}\n aria-controls={contentId}\n aria-describedby={hasError ? errorDescriptionId : undefined}\n className={cn(\n workflowStepItemVariants({ status: step.status }),\n 'w-full cursor-pointer hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring',\n )}\n >\n {stepContent}\n </button>\n ) : (\n <div\n aria-current={active ? 'step' : undefined}\n aria-describedby={hasError ? errorDescriptionId : undefined}\n className={cn(\n workflowStepItemVariants({ status: step.status }),\n 'w-full',\n )}\n >\n {stepContent}\n </div>\n )}\n\n <AnimatePresence initial={false}>\n {expanded && hasExpandableDetails && (\n <motion.div\n id={contentId}\n data-slot=\"workflow-step-panel\"\n initial={{ height: 0, opacity: 0 }}\n animate={{ height: 'auto', opacity: 1 }}\n exit={{ height: 0, opacity: 0 }}\n transition={disclosureTransition}\n className=\"overflow-hidden motion-reduce:transition-none\"\n >\n <div className=\"px-4 pb-3 ps-12\">\n {hasError && (\n <div className=\"rounded-lg border border-destructive/50 bg-destructive/10 p-3\">\n <div className=\"flex items-start gap-2\">\n <AlertCircle className=\"mt-0.5 size-4 shrink-0 text-destructive\" />\n <p className=\"text-sm text-destructive\">{error}</p>\n </div>\n </div>\n )}\n {hasContent && (\n <div className={hasError ? 'mt-3' : undefined}>\n {normalizedContent.content}\n </div>\n )}\n </div>\n </motion.div>\n )}\n </AnimatePresence>\n\n {hasError && (\n <span id={errorDescriptionId} className=\"sr-only\">\n {error}\n </span>\n )}\n\n {appearanceConfig.hasConnector && !isLast && (\n <div\n data-slot=\"workflow-step-connector\"\n aria-hidden=\"true\"\n className=\"absolute top-8 -bottom-3 start-6 w-px bg-border\"\n />\n )}\n </div>\n );\n}\n\nWorkflowStepItem.displayName = 'WorkflowStepItem';\n\nexport function WorkflowStepRenderer({\n steps,\n appearance = 'contained',\n itemSlot = 'workflow-step-item',\n expandable = true,\n activeStepId,\n expandedStepIds: controlledExpandedStepIds,\n defaultExpandedStepIds = [],\n onExpandedStepIdsChange,\n className,\n renderItems = true,\n}: PrivateWorkflowStepRendererProps) {\n const isControlled = controlledExpandedStepIds !== undefined;\n const controlledSnapshot = isControlled\n ? [...controlledExpandedStepIds]\n : undefined;\n const [uncontrolledExpandedStepIds, setUncontrolledExpandedStepIds] =\n React.useState<readonly string[]>(() =>\n normalizeExpandedWorkflowStepIds(defaultExpandedStepIds, steps),\n );\n const lastControlledExpandedStepIdsRef = React.useRef<readonly string[]>(\n controlledSnapshot ?? [],\n );\n const wasControlledRef = React.useRef(isControlled);\n const rawExpandedStepIds = isControlled\n ? controlledExpandedStepIds\n : uncontrolledExpandedStepIds;\n const visibleExpandedStepIds = normalizeExpandedWorkflowStepIds(\n rawExpandedStepIds,\n steps,\n );\n const expandedSet = new Set(visibleExpandedStepIds);\n\n React.useLayoutEffect(() => {\n if (controlledSnapshot !== undefined) {\n lastControlledExpandedStepIdsRef.current = controlledSnapshot;\n }\n }, [controlledSnapshot]);\n\n React.useLayoutEffect(() => {\n const wasControlled = wasControlledRef.current;\n wasControlledRef.current = isControlled;\n if (isControlled) return;\n\n setUncontrolledExpandedStepIds((current) => {\n const source = wasControlled\n ? lastControlledExpandedStepIdsRef.current\n : current;\n const reconciled = normalizeExpandedWorkflowStepIds(source, steps);\n return areWorkflowStepIdsEqual(reconciled, current)\n ? current\n : reconciled;\n });\n }, [isControlled, steps]);\n\n const toggleStep = (id: string) => {\n const next = new Set(visibleExpandedStepIds);\n if (next.has(id)) next.delete(id);\n else next.add(id);\n const normalizedNext = normalizeExpandedWorkflowStepIds([...next], steps);\n if (!isControlled) {\n setUncontrolledExpandedStepIds([...normalizedNext]);\n }\n onExpandedStepIdsChange?.([...normalizedNext]);\n };\n\n if (!renderItems) return null;\n\n return (\n <ol\n data-slot=\"workflow-step-list\"\n data-appearance={appearance}\n className={cn('m-0 list-none p-0', className)}\n >\n {steps.map((step, index) => (\n <li key={step.id}>\n <WorkflowStepItem\n step={step}\n index={index}\n isLast={index === steps.length - 1}\n appearance={appearance}\n itemSlot={itemSlot}\n expandable={expandable}\n expanded={expandedSet.has(step.id)}\n active={activeStepId === step.id}\n onExpandedChange={() => toggleStep(step.id)}\n />\n </li>\n ))}\n </ol>\n );\n}\n\nWorkflowStepRenderer.displayName = 'WorkflowStepRenderer';\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;AASA,IAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAW,KAAK;AAAA,EAAS,CAAC;AAAA,EACxC,CAAC,QAA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AAC,GAEpD,IAA0B,CAAC,GAAG,CAAc,CAAC;AAAA,EAC/C;AAEA,SAAK,IAGH,gBAAA,EAAC,MAAD;AAAA,IACE,aAAU;AAAA,IACV,mBAAiB;AAAA,IACjB,WAAW,EAAG,qBAAqB,CAAS;AAAA,cAE3C,EAAM,IAAA,CAAK,GAAM,MAChB,gBAAA,EAAC,MAAD,EAAA,UACE,gBAAA,EAAC,GAAD;AAAA,MACQ,MAAA;AAAA,MACC,OAAA;AAAA,MACP,QAAQ,MAAU,EAAM,SAAS;AAAA,MACrB,YAAA;AAAA,MACF,UAAA;AAAA,MACE,YAAA;AAAA,MACZ,UAAU,EAAY,IAAI,EAAK,EAAE;AAAA,MACjC,QAAQ,MAAiB,EAAK;AAAA,MAC9B,kBAAA,MAAwB,EAAW,EAAK,EAAE;AAAA,IAC3C,CAAA,EACC,GAZK,EAAK,EAYV,CACL;AAAA,EACC,CAAA,IAvBmB;AAyB3B;AAEA,GAAqB,cAAc"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humain/ui",
3
- "version": "2.2.7",
3
+ "version": "2.2.9",
4
4
  "description": "HUMAIN UI React components, design tokens, Web Components, and agent skills.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -3,7 +3,7 @@ name: humain-ui
3
3
  description: Use when building, migrating, auditing, or bootstrapping React UI with @humain/ui, including pages, dashboards, app shells, forms, dialogs, data tables, charts, AI chat workspaces, or Figma-to-Humain mapping.
4
4
  ---
5
5
 
6
- # Humain Foundation UI (v2.2.7)
6
+ # Humain Foundation UI (v2.2.9)
7
7
 
8
8
  Build product UI with `@humain/ui`, a React 18/19 component library with Tailwind v4, dark mode, design tokens, Web Component projections, and AI-facing references.
9
9
 
@@ -3,7 +3,7 @@ name: humain-ui-wc
3
3
  description: Use when building browser-native prototypes, iframe artifacts, static HTML, custom-element demos, framework-neutral integrations, or any HUMAIN UI that must use hf-* Web Components instead of React JSX.
4
4
  ---
5
5
 
6
- # Humain Foundation UI Web Components (v2.2.7)
6
+ # Humain Foundation UI Web Components (v2.2.9)
7
7
 
8
8
  **Identity** - You build HUMAIN interfaces with `hf-*` custom elements. You keep the same product taste, spacing discipline, and component intent as the React `humain-ui` skill, but you only use Web Component APIs that actually exist in the manifest.
9
9
 
Binary file
Binary file