@loworbitstudio/visor 1.55.0 → 1.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "0.4.0",
3
- "generated_at": "2026-11-20T04:46:19.508Z",
3
+ "generated_at": "2026-11-20T22:31:25.708Z",
4
4
  "components": {
5
5
  "accessibility-specimen": {
6
6
  "changeType": "current",
@@ -153,9 +153,10 @@
153
153
  {
154
154
  "name": "button",
155
155
  "type": "registry:ui",
156
- "description": "A button component with multiple variants and sizes using CVA. Includes a gated permission state and a pending state that holds the control's geometry while its action is in flight.",
156
+ "description": "A button component with multiple variants and sizes using CVA. Includes a gated permission state, a pending state that holds the control's geometry while its action is in flight, a glass variant and an arrow-swap slot.",
157
157
  "category": "form",
158
158
  "dependencies": [
159
+ "@phosphor-icons/react",
159
160
  "@radix-ui/react-slot",
160
161
  "class-variance-authority",
161
162
  "@loworbitstudio/visor-core"
@@ -169,12 +170,12 @@
169
170
  {
170
171
  "path": "components/ui/button/button.tsx",
171
172
  "type": "registry:ui",
172
- "content": "import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./button.module.css\"\nimport { Spinner } from \"../spinner/spinner\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"../tooltip/tooltip\"\n\nconst buttonVariants = cva(styles.base, {\n variants: {\n variant: {\n default: styles.variantDefault,\n hero: styles.variantHero,\n secondary: styles.variantSecondary,\n outline: styles.variantOutline,\n ghost: styles.variantGhost,\n destructive: styles.variantDestructive,\n },\n size: {\n sm: styles.sizeSm,\n md: styles.sizeMd,\n lg: styles.sizeLg,\n dlg: styles.sizeDlg,\n icon: styles.sizeIcon,\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n})\n\n/**\n * Fallback thresholds for the `pending` affordance, in milliseconds.\n *\n * The delay suppresses the busy glyph for actions that resolve fast enough\n * that showing one would read as a flicker; the minimum duration keeps it on\n * screen long enough to be legible once it has appeared. Both are overridable\n * per call site (`pendingDelay` / `pendingMinDuration`) and per theme\n * (`--button-pending-delay` / `--button-pending-min-duration`).\n */\nexport const BUTTON_PENDING_DELAY_MS = 200\nexport const BUTTON_PENDING_MIN_DURATION_MS = 300\n\n/** Parses a CSS time value (`200ms`, `0.2s`, bare `200`) into milliseconds. */\nfunction parseCssDuration(raw: string | null | undefined): number | undefined {\n if (!raw) return undefined\n const match = /^(\\d+(?:\\.\\d+)?)\\s*(ms|s)?$/.exec(raw.trim())\n if (!match) return undefined\n const value = Number.parseFloat(match[1] ?? \"\")\n if (!Number.isFinite(value)) return undefined\n return match[2] === \"s\" ? value * 1000 : value\n}\n\n/**\n * Resolution order for a threshold: explicit prop, then the themed custom\n * property read off the live element, then the module fallback.\n *\n * The custom properties are deliberately NOT declared on `.base` — an\n * element-level declaration would shadow anything a theme emits on `:root`,\n * which is the defect VI-625 fixed on Spinner.\n */\nfunction resolveThreshold(\n element: HTMLElement | null,\n customProperty: string,\n propValue: number | undefined,\n fallback: number\n): number {\n if (typeof propValue === \"number\" && Number.isFinite(propValue)) {\n return Math.max(0, propValue)\n }\n if (element && typeof window !== \"undefined\" && typeof window.getComputedStyle === \"function\") {\n const themed = parseCssDuration(\n window.getComputedStyle(element).getPropertyValue(customProperty)\n )\n if (themed !== undefined) return themed\n }\n return fallback\n}\n\n/**\n * Turns a raw `pending` boolean into a *paintable* one: false for the first\n * `delay` ms, then true for at least `minDuration` ms once shown.\n *\n * Without the delay a 150ms action strobes; without the minimum a 250ms action\n * shows a one-frame flash, which reads as a glitch rather than as progress.\n */\nfunction usePendingVisibility(\n pending: boolean,\n elementRef: React.RefObject<HTMLElement | null>,\n delay: number | undefined,\n minDuration: number | undefined\n): boolean {\n const [visible, setVisible] = React.useState(false)\n const visibleRef = React.useRef(false)\n const shownAtRef = React.useRef(0)\n\n const show = React.useCallback((next: boolean) => {\n visibleRef.current = next\n setVisible(next)\n }, [])\n\n React.useEffect(() => {\n if (pending) {\n const delayMs = resolveThreshold(\n elementRef.current,\n \"--button-pending-delay\",\n delay,\n BUTTON_PENDING_DELAY_MS\n )\n if (delayMs <= 0) {\n shownAtRef.current = Date.now()\n show(true)\n return\n }\n const armed = setTimeout(() => {\n shownAtRef.current = Date.now()\n show(true)\n }, delayMs)\n return () => clearTimeout(armed)\n }\n\n // Never painted — nothing to unwind, and no minimum to honour.\n if (!visibleRef.current) return\n\n const minMs = resolveThreshold(\n elementRef.current,\n \"--button-pending-min-duration\",\n minDuration,\n BUTTON_PENDING_MIN_DURATION_MS\n )\n const remaining = minMs - (Date.now() - shownAtRef.current)\n if (remaining <= 0) {\n show(false)\n return\n }\n const held = setTimeout(() => show(false), remaining)\n return () => clearTimeout(held)\n }, [pending, delay, minDuration, elementRef, show])\n\n return visible\n}\n\n/** Spinner ring size that reads correctly inside each button size. */\nconst PENDING_SPINNER_SIZE: Record<string, \"xs\" | \"sm\"> = {\n sm: \"xs\",\n dlg: \"xs\",\n md: \"sm\",\n lg: \"sm\",\n icon: \"sm\",\n}\n\n/**\n * An icon-only button has no text for assistive tech to read, so it needs an\n * `aria-label` (or `aria-labelledby`). Warns once per mount in development;\n * silent in production.\n */\nfunction useIconLabelWarning(\n size: string | null | undefined,\n asChild: boolean | undefined,\n children: React.ReactNode,\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n) {\n // Under asChild the name can live on the child, which is not inspectable\n // here, so only a plain <button> is checked. A text child or a title is a name.\n const hasText = React.Children.toArray(children).some((c) => typeof c === \"string\" || typeof c === \"number\")\n const unlabelled =\n size === \"icon\" && !asChild && !hasText && !props[\"aria-label\"] && !props[\"aria-labelledby\"] && !props.title\n React.useEffect(() => {\n if (unlabelled && process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\n '[Button] size=\"icon\" renders no text, so it needs an accessible name. ' +\n \"Pass aria-label (or aria-labelledby) describing the action.\"\n )\n }\n }, [unlabelled])\n}\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n /**\n * When true, the button renders in an inert gated state — visually dimmed,\n * cursor not-allowed, and click handlers suppressed. Uses `aria-disabled`\n * instead of the native `disabled` attribute so the button remains\n * keyboard-focusable (required for the tooltip to be accessible).\n *\n * Note: a `<TooltipProvider>` ancestor is required when `gatedReason` is set.\n */\n gated?: boolean\n /**\n * Explanation surfaced in an anchored tooltip when the button is gated.\n * Only rendered when `gated` is also true.\n * Example: \"You can't delete this — you're not an owner\"\n */\n gatedReason?: string\n /**\n * When true, the button reports that its action is in flight: a busy glyph\n * appears, `aria-busy` is set, and activation is suppressed so the action\n * cannot be double-submitted.\n *\n * **The geometry is held.** The idle children stay in the box at zero\n * opacity and the glyph paints over them, so the control never resizes and\n * never shoves its siblings. That is the whole point — a pending state that\n * reflows has not fixed the visible defect.\n *\n * Like `gated`, this does NOT set the native `disabled` attribute: the\n * button stays focusable, which matters because it is the user's focus\n * anchor while they wait.\n */\n pending?: boolean\n /**\n * Optional text shown beside the busy glyph while pending. Purely visual —\n * it is `aria-hidden`, and the accessible name stays the idle label so the\n * control is not renamed mid-action. Pair `pending` with your own\n * `role=\"status\"` region when the message needs to be spoken.\n */\n pendingLabel?: React.ReactNode\n /**\n * Milliseconds to wait before painting the busy glyph. Overrides the themed\n * `--button-pending-delay`. @default 200\n */\n pendingDelay?: number\n /**\n * Milliseconds to keep the busy glyph on screen once painted. Overrides the\n * themed `--button-pending-min-duration`. @default 300\n */\n pendingMinDuration?: number\n}\n\n/**\n * Wrap bare text in a block label so the stylesheet can trim its line box to the\n * capital-to-baseline band (`text-box`, see `.label`). Flexbox centres the line\n * box, whose height comes from the font's ascent and descent rather than from\n * where its capitals sit, so an untrimmed label lands off-centre by an amount\n * that differs per font (VI-682). Elements (icons, spinners) pass through.\n */\nfunction wrapLabel(children: React.ReactNode): React.ReactNode {\n // Adjacent strings join into one label; a whitespace-only run (the \" \" in\n // `<Icon/> {label}`) is dropped so it never becomes an empty flex item (VI-733).\n const parts: React.ReactNode[] = []\n let text = \"\"\n const flush = () => {\n const label = text.trim()\n if (label) {\n parts.push(\n <span key={parts.length} className={styles.label} data-slot=\"button-text\">\n {label}\n </span>\n )\n }\n text = \"\"\n }\n React.Children.toArray(children).forEach((child) => {\n if (typeof child === \"string\" || typeof child === \"number\") {\n text += child\n } else {\n flush()\n parts.push(child)\n }\n })\n flush()\n return parts\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild,\n gated,\n gatedReason,\n pending,\n pendingLabel,\n pendingDelay,\n pendingMinDuration,\n onClick,\n children,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n\n useIconLabelWarning(size, asChild, children, props)\n\n const elementRef = React.useRef<HTMLButtonElement | null>(null)\n const mergeRef = React.useCallback(\n (node: HTMLButtonElement | null) => {\n elementRef.current = node\n if (typeof ref === \"function\") ref(node)\n else if (ref) ref.current = node\n },\n [ref]\n )\n\n const pendingVisible = usePendingVisibility(\n pending === true,\n elementRef,\n pendingDelay,\n pendingMinDuration\n )\n\n // Activation follows what the user can see: suppressed while the action is\n // in flight AND for as long as the glyph is still held on screen, so a\n // control that looks busy never silently accepts a click.\n const inert = gated === true || pending === true || pendingVisible\n\n const handleClick = React.useCallback(\n (e: React.MouseEvent<HTMLButtonElement>) => {\n if (inert) {\n /* `preventDefault` as well as swallowing the handler, and this is\n * load-bearing: most buttons `pending` and `gated` exist for are a\n * `type=\"submit\"` inside a form, and suppressing `onClick` alone\n * leaves the browser's own ACTIVATION BEHAVIOUR intact — the form\n * submits anyway, through `onSubmit`, which this never sees. Measured\n * in a consumer: a second click on a pending submit mailed a second\n * one-time code. A keyboard Enter on a focused submit button\n * dispatches a click too, so this covers that path as well. */\n e.preventDefault()\n return\n }\n onClick?.(e)\n },\n [inert, onClick]\n )\n\n // `asChild` hands a single child straight to Slot, so the pending chrome\n // (which needs its own wrapper elements) cannot be injected. The state\n // attributes and activation suppression still apply.\n const showPendingChrome = !asChild && pendingVisible\n const spinnerSize = PENDING_SPINNER_SIZE[size ?? \"md\"] ?? \"sm\"\n\n const button = (\n <Comp\n className={cn(buttonVariants({ variant, size }), className)}\n ref={mergeRef}\n aria-disabled={gated || pendingVisible ? true : undefined}\n aria-busy={pending === true || pendingVisible ? true : undefined}\n data-gated={gated ? \"true\" : undefined}\n data-gated-reason={gated && gatedReason ? gatedReason : undefined}\n data-pending={pendingVisible ? \"true\" : undefined}\n onClick={handleClick}\n {...props}\n >\n {showPendingChrome ? (\n <>\n <span className={styles.pendingLabel} data-slot=\"button-label\">\n {wrapLabel(children)}\n </span>\n <span\n className={styles.pendingOverlay}\n data-slot=\"button-pending\"\n aria-hidden=\"true\"\n >\n <Spinner size={spinnerSize} />\n {pendingLabel ? (\n <span className={styles.pendingText}>{pendingLabel}</span>\n ) : null}\n </span>\n </>\n ) : asChild && React.isValidElement<{ children?: React.ReactNode }>(children) ? (\n // Slot merges onto its one child, so the child's own text is wrapped\n // in place; its props and ref are kept by cloneElement.\n React.cloneElement(children, undefined, wrapLabel(children.props.children))\n ) : (\n wrapLabel(children)\n )}\n </Comp>\n )\n\n if (gated && gatedReason) {\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent>{gatedReason}</TooltipContent>\n </Tooltip>\n )\n }\n\n return button\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n"
173
+ "content": "import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { ArrowLeftIcon, ArrowRightIcon } from \"@phosphor-icons/react\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./button.module.css\"\nimport { Spinner } from \"../spinner/spinner\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"../tooltip/tooltip\"\n\nconst buttonVariants = cva(styles.base, {\n variants: {\n variant: {\n default: styles.variantDefault,\n hero: styles.variantHero,\n secondary: styles.variantSecondary,\n outline: styles.variantOutline,\n ghost: styles.variantGhost,\n destructive: styles.variantDestructive,\n glass: styles.variantGlass,\n },\n size: {\n sm: styles.sizeSm,\n md: styles.sizeMd,\n lg: styles.sizeLg,\n dlg: styles.sizeDlg,\n icon: styles.sizeIcon,\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n})\n\n/**\n * Fallback thresholds for the `pending` affordance, in milliseconds.\n *\n * The delay suppresses the busy glyph for actions that resolve fast enough\n * that showing one would read as a flicker; the minimum duration keeps it on\n * screen long enough to be legible once it has appeared. Both are overridable\n * per call site (`pendingDelay` / `pendingMinDuration`) and per theme\n * (`--button-pending-delay` / `--button-pending-min-duration`).\n */\nexport const BUTTON_PENDING_DELAY_MS = 200\nexport const BUTTON_PENDING_MIN_DURATION_MS = 300\n\n/** Parses a CSS time value (`200ms`, `0.2s`, bare `200`) into milliseconds. */\nfunction parseCssDuration(raw: string | null | undefined): number | undefined {\n if (!raw) return undefined\n const match = /^(\\d+(?:\\.\\d+)?)\\s*(ms|s)?$/.exec(raw.trim())\n if (!match) return undefined\n const value = Number.parseFloat(match[1] ?? \"\")\n if (!Number.isFinite(value)) return undefined\n return match[2] === \"s\" ? value * 1000 : value\n}\n\n/**\n * Resolution order for a threshold: explicit prop, then the themed custom\n * property read off the live element, then the module fallback.\n *\n * The custom properties are deliberately NOT declared on `.base` — an\n * element-level declaration would shadow anything a theme emits on `:root`,\n * which is the defect VI-625 fixed on Spinner.\n */\nfunction resolveThreshold(\n element: HTMLElement | null,\n customProperty: string,\n propValue: number | undefined,\n fallback: number\n): number {\n if (typeof propValue === \"number\" && Number.isFinite(propValue)) {\n return Math.max(0, propValue)\n }\n if (element && typeof window !== \"undefined\" && typeof window.getComputedStyle === \"function\") {\n const themed = parseCssDuration(\n window.getComputedStyle(element).getPropertyValue(customProperty)\n )\n if (themed !== undefined) return themed\n }\n return fallback\n}\n\n/**\n * Turns a raw `pending` boolean into a *paintable* one: false for the first\n * `delay` ms, then true for at least `minDuration` ms once shown.\n *\n * Without the delay a 150ms action strobes; without the minimum a 250ms action\n * shows a one-frame flash, which reads as a glitch rather than as progress.\n */\nfunction usePendingVisibility(\n pending: boolean,\n elementRef: React.RefObject<HTMLElement | null>,\n delay: number | undefined,\n minDuration: number | undefined\n): boolean {\n const [visible, setVisible] = React.useState(false)\n const visibleRef = React.useRef(false)\n const shownAtRef = React.useRef(0)\n\n const show = React.useCallback((next: boolean) => {\n visibleRef.current = next\n setVisible(next)\n }, [])\n\n React.useEffect(() => {\n if (pending) {\n const delayMs = resolveThreshold(\n elementRef.current,\n \"--button-pending-delay\",\n delay,\n BUTTON_PENDING_DELAY_MS\n )\n if (delayMs <= 0) {\n shownAtRef.current = Date.now()\n show(true)\n return\n }\n const armed = setTimeout(() => {\n shownAtRef.current = Date.now()\n show(true)\n }, delayMs)\n return () => clearTimeout(armed)\n }\n\n // Never painted — nothing to unwind, and no minimum to honour.\n if (!visibleRef.current) return\n\n const minMs = resolveThreshold(\n elementRef.current,\n \"--button-pending-min-duration\",\n minDuration,\n BUTTON_PENDING_MIN_DURATION_MS\n )\n const remaining = minMs - (Date.now() - shownAtRef.current)\n if (remaining <= 0) {\n show(false)\n return\n }\n const held = setTimeout(() => show(false), remaining)\n return () => clearTimeout(held)\n }, [pending, delay, minDuration, elementRef, show])\n\n return visible\n}\n\n/** Spinner ring size that reads correctly inside each button size. */\nconst PENDING_SPINNER_SIZE: Record<string, \"xs\" | \"sm\"> = {\n sm: \"xs\",\n dlg: \"xs\",\n md: \"sm\",\n lg: \"sm\",\n icon: \"sm\",\n}\n\n/**\n * An icon-only button has no text for assistive tech to read, so it needs an\n * `aria-label` (or `aria-labelledby`). Warns once per mount in development;\n * silent in production.\n */\nfunction useIconLabelWarning(\n size: string | null | undefined,\n asChild: boolean | undefined,\n children: React.ReactNode,\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n) {\n // Under asChild the name can live on the child, which is not inspectable\n // here, so only a plain <button> is checked. A text child or a title is a name.\n const hasText = React.Children.toArray(children).some((c) => typeof c === \"string\" || typeof c === \"number\")\n const unlabelled =\n size === \"icon\" && !asChild && !hasText && !props[\"aria-label\"] && !props[\"aria-labelledby\"] && !props.title\n React.useEffect(() => {\n if (unlabelled && process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\n '[Button] size=\"icon\" renders no text, so it needs an accessible name. ' +\n \"Pass aria-label (or aria-labelledby) describing the action.\"\n )\n }\n }, [unlabelled])\n}\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n /**\n * When true, the button renders in an inert gated state — visually dimmed,\n * cursor not-allowed, and click handlers suppressed. Uses `aria-disabled`\n * instead of the native `disabled` attribute so the button remains\n * keyboard-focusable (required for the tooltip to be accessible).\n *\n * Note: a `<TooltipProvider>` ancestor is required when `gatedReason` is set.\n */\n gated?: boolean\n /**\n * Explanation surfaced in an anchored tooltip when the button is gated.\n * Only rendered when `gated` is also true.\n * Example: \"You can't delete this — you're not an owner\"\n */\n gatedReason?: string\n /**\n * When true, the button reports that its action is in flight: a busy glyph\n * appears, `aria-busy` is set, and activation is suppressed so the action\n * cannot be double-submitted.\n *\n * **The geometry is held.** The idle children stay in the box at zero\n * opacity and the glyph paints over them, so the control never resizes and\n * never shoves its siblings. That is the whole point — a pending state that\n * reflows has not fixed the visible defect.\n *\n * Like `gated`, this does NOT set the native `disabled` attribute: the\n * button stays focusable, which matters because it is the user's focus\n * anchor while they wait.\n */\n pending?: boolean\n /**\n * Optional text shown beside the busy glyph while pending. Purely visual —\n * it is `aria-hidden`, and the accessible name stays the idle label so the\n * control is not renamed mid-action. Pair `pending` with your own\n * `role=\"status\"` region when the message needs to be spoken.\n */\n pendingLabel?: React.ReactNode\n /**\n * Milliseconds to wait before painting the busy glyph. Overrides the themed\n * `--button-pending-delay`. @default 200\n */\n pendingDelay?: number\n /**\n * Milliseconds to keep the busy glyph on screen once painted. Overrides the\n * themed `--button-pending-min-duration`. @default 300\n */\n pendingMinDuration?: number\n}\n\n/**\n * Wrap bare text in a block label so the stylesheet can trim its line box to the\n * capital-to-baseline band (`text-box`, see `.label`). Flexbox centres the line\n * box, whose height comes from the font's ascent and descent rather than from\n * where its capitals sit, so an untrimmed label lands off-centre by an amount\n * that differs per font (VI-682). Elements (icons, spinners) pass through.\n */\nfunction wrapLabel(children: React.ReactNode): React.ReactNode {\n // Adjacent strings join into one label; a whitespace-only run (the \" \" in\n // `<Icon/> {label}`) is dropped so it never becomes an empty flex item (VI-733).\n const parts: React.ReactNode[] = []\n let text = \"\"\n const flush = () => {\n const label = text.trim()\n if (label) {\n parts.push(\n <span key={parts.length} className={styles.label} data-slot=\"button-text\">\n {label}\n </span>\n )\n }\n text = \"\"\n }\n React.Children.toArray(children).forEach((child) => {\n if (typeof child === \"string\" || typeof child === \"number\") {\n text += child\n } else {\n flush()\n parts.push(child)\n }\n })\n flush()\n return parts\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild,\n gated,\n gatedReason,\n pending,\n pendingLabel,\n pendingDelay,\n pendingMinDuration,\n onClick,\n children,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n\n useIconLabelWarning(size, asChild, children, props)\n\n const elementRef = React.useRef<HTMLButtonElement | null>(null)\n const mergeRef = React.useCallback(\n (node: HTMLButtonElement | null) => {\n elementRef.current = node\n if (typeof ref === \"function\") ref(node)\n else if (ref) ref.current = node\n },\n [ref]\n )\n\n const pendingVisible = usePendingVisibility(\n pending === true,\n elementRef,\n pendingDelay,\n pendingMinDuration\n )\n\n // Activation follows what the user can see: suppressed while the action is\n // in flight AND for as long as the glyph is still held on screen, so a\n // control that looks busy never silently accepts a click.\n const inert = gated === true || pending === true || pendingVisible\n\n const handleClick = React.useCallback(\n (e: React.MouseEvent<HTMLButtonElement>) => {\n if (inert) {\n /* `preventDefault` as well as swallowing the handler, and this is\n * load-bearing: most buttons `pending` and `gated` exist for are a\n * `type=\"submit\"` inside a form, and suppressing `onClick` alone\n * leaves the browser's own ACTIVATION BEHAVIOUR intact — the form\n * submits anyway, through `onSubmit`, which this never sees. Measured\n * in a consumer: a second click on a pending submit mailed a second\n * one-time code. A keyboard Enter on a focused submit button\n * dispatches a click too, so this covers that path as well. */\n e.preventDefault()\n return\n }\n onClick?.(e)\n },\n [inert, onClick]\n )\n\n // `asChild` hands a single child straight to Slot, so the pending chrome\n // (which needs its own wrapper elements) cannot be injected. The state\n // attributes and activation suppression still apply.\n const showPendingChrome = !asChild && pendingVisible\n const spinnerSize = PENDING_SPINNER_SIZE[size ?? \"md\"] ?? \"sm\"\n\n const button = (\n <Comp\n className={cn(buttonVariants({ variant, size }), className)}\n ref={mergeRef}\n aria-disabled={gated || pendingVisible ? true : undefined}\n aria-busy={pending === true || pendingVisible ? true : undefined}\n data-gated={gated ? \"true\" : undefined}\n data-gated-reason={gated && gatedReason ? gatedReason : undefined}\n data-pending={pendingVisible ? \"true\" : undefined}\n onClick={handleClick}\n {...props}\n >\n {showPendingChrome ? (\n <>\n <span className={styles.pendingLabel} data-slot=\"button-label\">\n {wrapLabel(children)}\n </span>\n <span\n className={styles.pendingOverlay}\n data-slot=\"button-pending\"\n aria-hidden=\"true\"\n >\n <Spinner size={spinnerSize} />\n {pendingLabel ? (\n <span className={styles.pendingText}>{pendingLabel}</span>\n ) : null}\n </span>\n </>\n ) : asChild && React.isValidElement<{ children?: React.ReactNode }>(children) ? (\n // Slot merges onto its one child, so the child's own text is wrapped\n // in place; its props and ref are kept by cloneElement.\n React.cloneElement(children, undefined, wrapLabel(children.props.children))\n ) : (\n wrapLabel(children)\n )}\n </Comp>\n )\n\n if (gated && gatedReason) {\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent>{gatedReason}</TooltipContent>\n </Tooltip>\n )\n }\n\n return button\n }\n)\nButton.displayName = \"Button\"\n\nexport interface ArrowSwapProps {\n /** Which way the arrow points. @default \"right\" */\n direction?: \"left\" | \"right\"\n}\n\n/**\n * Two arrows in a one-arrow window, for a Button's trailing (or leading) slot.\n * On the button's hover or keyboard focus both slide the way the arrow points:\n * the hidden one takes the visible one's place as it leaves. Decorative only.\n */\nfunction ArrowSwap({ direction = \"right\" }: ArrowSwapProps) {\n const Arrow = direction === \"left\" ? ArrowLeftIcon : ArrowRightIcon\n return (\n <span className={styles.arrowSwap} data-slot=\"button-arrow\" data-direction={direction} aria-hidden=\"true\">\n <span className={styles.arrowTrack}>\n <Arrow weight=\"bold\" />\n <Arrow weight=\"bold\" />\n </span>\n </span>\n )\n}\n\nexport { ArrowSwap, Button, buttonVariants }\n"
173
174
  },
174
175
  {
175
176
  "path": "components/ui/button/button.module.css",
176
177
  "type": "registry:ui",
177
- "content": "/* Button base styles */\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--button-icon-gap, var(--spacing-2, 0.5rem));\n white-space: nowrap;\n border-radius: var(--radius-md, 0.375rem);\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-medium, 500);\n line-height: 1;\n cursor: pointer;\n /* VI-655: the border only holds box geometry and is always transparent. The\n faces that draw an edge (outline, gated, dlg ghost) draw it on ::after —\n see \"Edged faces\" below — so the button's own outline stays free for the\n focus ring. */\n border: 1px solid transparent;\n transition: background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), transform var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n text-decoration: none;\n outline: none;\n}\n\n.base:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n.base:active:not(:disabled) {\n transform: translateY(1px);\n transition: none;\n}\n\n.base:disabled {\n pointer-events: none;\n opacity: 0.5;\n}\n\n/* Label (VI-682; shared spec: the label-centering doc under docs/). Bare text is wrapped in a block span whose line box is trimmed\n to the capital-height band, so the flex container centres the ink and not the\n font's ascent/descent (which put Product Sans ~1px high in a 40px button).\n Without text-box (Firefox) the span is a plain block and rendering is exactly\n what it was before. */\n.label {\n display: block;\n}\n\n@supports (text-box: trim-both cap alphabetic) {\n .label {\n text-box: trim-both cap alphabetic;\n }\n\n /* The compact dlg size is height:auto, so trimming would shrink its box. */\n .sizeDlg .label {\n text-box: normal;\n }\n}\n\n/* Blink only. Blink snaps the text baseline to a whole CSS px, which leaves the\n trimmed ink up to half a pixel off for fractional cap heights (12px type). The\n baseline lands at (box + cap) / 2; this hands back what the snap took. WebKit\n positions the baseline exactly, so correcting there would overshoot. The\n -apple-pay-button-style probe is the WebKit-only property that tells them apart. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .label {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n\n .sizeDlg .label {\n transform: none;\n }\n}\n\n/* Variants */\n.variantDefault {\n background-color: var(--button-default-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n color: var(--button-default-text, var(--interactive-primary-text, #f9fafb));\n}\n\n/* Hero (VI-699): the solid, special-moment face. Unset it is the default face. */\n.variantHero {\n background-color: var(--button-hero-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n color: var(--button-hero-text, var(--interactive-primary-text, #f9fafb));\n}\n\n.variantSecondary {\n background-color: var(--interactive-secondary-bg, #f3f4f6);\n color: var(--interactive-secondary-text, #111827);\n}\n\n/* Editorial density: secondary on the card tier, ghost truly transparent.\n * Direct values — the editorial design language owns control surfaces, so the\n * theme's --interactive-secondary-bg / --interactive-ghost-bg are deliberately\n * bypassed (matches the blessed overlay, which out-cascaded the palette). */\n:global([data-density=\"editorial\"]) .variantSecondary {\n background-color: var(--surface-card, #ffffff);\n}\n\n:global([data-density=\"editorial\"]) .variantGhost {\n background-color: transparent;\n}\n\n.variantOutline {\n background-color: transparent;\n color: var(--text-primary, #111827);\n}\n\n/* Edged faces (VI-655). The resting edge is an inset outline over the border\n box, on the shared --control-edge-* tokens, so --control-edge-width: 0 on any\n ancestor removes it with no layout shift. Each face sets only the colour, in\n the same source position its border-color used to hold. */\n.variantOutline,\n.base[data-gated=\"true\"],\n.sizeDlg.variantGhost {\n position: relative;\n}\n\n.variantOutline::after,\n.base[data-gated=\"true\"]::after,\n.sizeDlg.variantGhost::after {\n content: \"\";\n position: absolute;\n inset: -1px;\n border-radius: inherit;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) transparent;\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n pointer-events: none;\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.variantOutline::after {\n outline-color: var(--control-edge-color, var(--border-strong, #e5e7eb));\n}\n\n.variantGhost {\n background-color: var(--interactive-ghost-bg, transparent);\n color: var(--button-ghost-text, var(--text-primary, #111827));\n}\n\n.variantDestructive {\n background-color: var(--interactive-destructive-bg, #ef4444);\n color: var(--interactive-destructive-text, #fef2f2);\n}\n\n@media (hover: hover) {\n .variantDefault:hover {\n background-color: var(--button-default-bg-hover, var(--interactive-primary-bg-hover, #1f2937));\n }\n\n .variantHero:hover {\n background-color: var(--button-hero-bg-hover, var(--interactive-primary-bg-hover, #1f2937));\n }\n\n .variantSecondary:hover {\n background-color: var(--interactive-secondary-bg-hover, #e5e7eb);\n }\n\n .variantOutline:hover {\n background-color: var(--surface-muted, #f3f4f6);\n }\n\n .variantGhost:hover {\n background-color: var(--interactive-ghost-bg-hover, var(--surface-muted, #f3f4f6));\n color: var(--button-ghost-text-hover, var(--text-primary, #111827));\n }\n\n .sizeDlg.variantGhost:hover {\n color: var(--button-ghost-text-hover, var(--text-secondary, #6b7280));\n }\n\n .variantDestructive:hover {\n background-color: var(--interactive-destructive-bg-hover, #dc2626);\n }\n}\n\n/* Open / active state — ghost variant only. OPT-IN, strictly additive.\n A ghost Button reads as \"held\" while its popover/menu is open so the\n trigger no longer needs an inline style. Three opt-in triggers, all\n resolving to the same held look:\n - data-state=\"open\" — forwarded automatically by Radix when the\n Button is the trigger via <Trigger asChild> (Popover/DropdownMenu).\n - data-active=\"true\" — manual non-Radix triggers (mirrors the\n sidebar `data-active` convention).\n - .isActive — className opt-in (mirrors sidebar/section-nav).\n Default ghost rendering is untouched: none of these match unless a\n consumer explicitly sets them. Matches the prototype-overlay held look:\n background var(--surface-subtle), color var(--text-primary). */\n.variantGhost[data-state=\"open\"],\n.variantGhost[data-active=\"true\"],\n.variantGhost.isActive {\n background-color: var(--surface-subtle, var(--surface-muted, #f3f4f6));\n color: var(--text-primary, #111827);\n}\n\n/* Gated state — orthogonal to variant, works with all variants */\n.base[data-gated=\"true\"] {\n opacity: var(--opacity-40, 0.4);\n cursor: not-allowed;\n}\n\n.base[data-gated=\"true\"]::after {\n outline-color: var(--control-edge-color, var(--border-default, #e5e7eb));\n}\n\n/* Editorial density: gated reads like plain disabled (the blessed admin\n builds render gated actions at the 0.5 disabled opacity). */\n:global([data-density=\"editorial\"]) .base[data-gated=\"true\"] {\n opacity: 0.5;\n}\n\n/* Suppress active transform when gated */\n.base[data-gated=\"true\"]:active {\n transform: none;\n transition: opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n/* Sizes\n Default (no data-density attr) rendering is byte-identical to the prior\n canonical values. Under data-density=\"editorial\" (set on any ancestor,\n typically the app root), the editorial density axis re-drives specific\n metrics to the blessed admin values.\n\n Type and rounding are theme hooks (VI-656, VI-663): --button-<size>-font-size,\n -font-weight, -text-transform, -letter-spacing and -radius set one size, and\n the unprefixed --button-font-weight / -text-transform / -letter-spacing /\n -radius set every size. Unset, each size keeps its shipped type size and rounding; case and\n tracking live in visor-base, after the dlg size. */\n.sizeSm {\n --label-box-height: 2rem;\n height: var(--label-box-height);\n padding: 0 var(--spacing-3, 0.75rem);\n font-size: var(--button-sm-font-size, var(--font-size-xs, 0.75rem));\n font-weight: var(--button-sm-font-weight, var(--button-font-weight, var(--font-weight-medium, 500)));\n border-radius: var(--button-sm-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n.sizeMd {\n --label-box-height: 2.5rem;\n height: var(--button-md-height, var(--label-box-height));\n padding: var(--button-md-padding, 0 var(--spacing-4, 1rem));\n line-height: 1;\n font-size: var(--button-md-font-size, var(--font-size-sm, 0.875rem));\n font-weight: var(--button-md-font-weight, var(--button-font-weight, var(--font-weight-medium, 500)));\n border-radius: var(--button-md-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n:global([data-density=\"editorial\"]) .sizeSm {\n font-size: var(--button-sm-font-size, 0.8125rem);\n}\n\n:global([data-density=\"editorial\"]) .sizeMd {\n --label-box-height: 2.125rem;\n height: var(--label-box-height);\n line-height: normal;\n}\n\n.sizeLg {\n --label-box-height: 3rem;\n height: var(--label-box-height);\n padding: 0 var(--spacing-6, 1.5rem);\n font-size: var(--button-lg-font-size, var(--font-size-base, 1rem));\n font-weight: var(--button-lg-font-weight, var(--button-font-weight, var(--font-weight-medium, 500)));\n border-radius: var(--button-lg-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n/* Dialog-footer button — dlg-btn (Animal dialog substrate, VI-620).\n Compact modal-action metrics measured from the AN prototype (11.5px / 600,\n ~7px 13px padding, 7px radius), normalized onto Visor tokens: font-size-2xs\n (11px), spacing-2/spacing-3 padding (8/12px), radius-lg (8px). Height is\n auto so the compact padding drives the box. Color faces reuse the existing\n variant axis — primary via variant=\"default\", ghost via variant=\"ghost\"\n (refined below to a hairline-outlined, secondary-ink face), danger via\n variant=\"destructive\" (refined below to a subtle-danger face). */\n.sizeDlg {\n height: auto;\n padding: var(--button-dlg-padding, var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem));\n font-size: var(--button-dlg-font-size, var(--font-size-2xs, 0.6875rem));\n font-weight: var(--button-dlg-font-weight, var(--button-font-weight, var(--font-weight-semibold, 600)));\n line-height: 1;\n border-radius: var(--button-dlg-radius, var(--button-radius, var(--radius-lg, 0.5rem)));\n}\n\n/* Icon-only button — a square mark around one glyph (VI-659). The box is the\n glyph plus a hit-target pad on every side, so width always equals height;\n --button-icon-size sets the glyph and --button-icon-pad the pad. A 1em glyph\n (Phosphor's default) takes the size from font-size; a glyph with its own\n width/height attributes is sized by the svg rule. No edge on ghost; on\n outline the edge is the shared ::after one, so --control-edge-width: 0 turns\n it off. */\n.sizeIcon {\n width: calc(var(--button-icon-size, 1rem) + 2 * var(--button-icon-pad, var(--spacing-2, 0.5rem)));\n height: calc(var(--button-icon-size, 1rem) + 2 * var(--button-icon-pad, var(--spacing-2, 0.5rem)));\n padding: 0;\n flex-shrink: 0;\n font-size: var(--button-icon-size, 1rem);\n border-radius: var(--button-icon-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n.sizeIcon > svg {\n width: var(--button-icon-size, 1rem);\n height: var(--button-icon-size, 1rem);\n flex-shrink: 0;\n}\n\n/* Ghost icon ink — the mark sits beside what it acts on, so it rests quieter\n than a labelled ghost button and comes up to primary ink on hover. :where()\n keeps it at one-class weight, so the held (open / active) ghost rule above\n still wins. */\n:where(.sizeIcon).variantGhost {\n color: var(--button-icon-ghost-color, var(--text-secondary, #6b7280));\n}\n\n@media (hover: hover) {\n :where(.sizeIcon).variantGhost:hover {\n color: var(--text-primary, #111827);\n }\n}\n\n/* Case and tracking are inherited properties, so any unlayered fallback would\n override something: `inherit` beats a layered utility, `revert-layer` drops\n an unlayered consumer rule. In visor-base, the lowest Visor layer (the reset's),\n every consumer rule still wins, and when the hook is unset revert-layer\n leaves the element exactly as if these declarations were absent. */\n@layer visor-base {\n .sizeSm {\n text-transform: var(--button-sm-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-sm-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n\n .sizeMd {\n text-transform: var(--button-md-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-md-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n\n .sizeLg {\n text-transform: var(--button-lg-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-lg-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n\n .sizeDlg {\n text-transform: var(--button-dlg-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-dlg-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n}\n\n/* dlg ghost — transparent well with a hairline outline + secondary ink\n (AN dlg-btn ghost face: transparent / --ink-60 / 1px --hair). Two-class\n specificity keeps this scoped to the dlg size only. */\n.sizeDlg.variantGhost {\n color: var(--button-ghost-text, var(--text-secondary, #6b7280));\n}\n\n.sizeDlg.variantGhost::after {\n outline-color: var(--control-edge-color, var(--hairline, var(--border-default, #e5e7eb)));\n}\n\n/* dlg danger — subtle-danger face (AN dlg-btn danger face: --red on a faint\n red fill), distinct from the solid `destructive` variant. */\n.sizeDlg.variantDestructive {\n background-color: var(--button-dlg-destructive-bg, var(--surface-error-subtle, color-mix(in srgb, var(--destructive, #ef4444) 8%, transparent)));\n color: var(--button-dlg-destructive-text, var(--text-error, var(--destructive, #b91c1c)));\n}\n\n@media (hover: hover) {\n .sizeDlg.variantDestructive:hover {\n background-color: var(--button-dlg-destructive-bg-hover, color-mix(in srgb, var(--destructive, #ef4444) 14%, transparent));\n }\n}\n\n/* Pending state — orthogonal to variant and size (VI-643).\n The idle children stay in the box at zero opacity so the control keeps its\n width, its height and its accessible name; the busy glyph paints over them\n in an absolutely-positioned overlay. A pending state that reflows has not\n fixed the defect it exists for, which is why nothing here is a leading slot\n that adds width.\n\n Themes tune the two timings via --button-pending-delay and\n --button-pending-min-duration. Neither is declared here on purpose: an\n element-level declaration shadows anything a theme emits on :root (VI-625). */\n.base[data-pending=\"true\"] {\n position: relative;\n cursor: progress;\n}\n\n/* No press dip while the action is in flight — the button is not accepting\n the click, so it must not pretend to. */\n.base[data-pending=\"true\"]:active {\n transform: none;\n transition: none;\n}\n\n/* Geometry holder. Mirrors .base's own flex metrics so wrapping the children\n does not change how they lay out. */\n.pendingLabel {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-2, 0.5rem);\n opacity: 0;\n transition: opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.pendingOverlay {\n position: absolute;\n inset: 0;\n box-sizing: border-box;\n padding: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-2, 0.5rem);\n pointer-events: none;\n}\n\n/* Clamped, so a pending label longer than the idle one can never widen the\n box it is being held inside. */\n.pendingText {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n"
178
+ "content": "/* Button base styles */\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--button-icon-gap, var(--spacing-2, 0.5rem));\n white-space: nowrap;\n border-radius: var(--radius-md, 0.375rem);\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-medium, 500);\n line-height: 1;\n cursor: pointer;\n /* VI-655: the border only holds box geometry and is always transparent. The\n faces that draw an edge (outline, gated, dlg ghost) draw it on ::after —\n see \"Edged faces\" below — so the button's own outline stays free for the\n focus ring. */\n border: 1px solid transparent;\n /* VI-807: one duration and curve for every property, so a theme can slow the\n grow, press and fill change together (the kit's 0.5s ease-out). */\n transition: background-color var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), color var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), opacity var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), transform var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), scale var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), box-shadow var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out));\n text-decoration: none;\n outline: none;\n}\n\n.base:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n /* Slides an ArrowSwap child, as hover does. */\n --_button-swap: 1;\n}\n\n.base:active:not(:disabled) {\n transform: var(--button-press-transform, translateY(1px));\n transition-duration: var(--button-press-duration, 0s);\n}\n\n.base:disabled {\n pointer-events: none;\n opacity: 0.5;\n}\n\n/* Label (VI-682; shared spec: the label-centering doc under docs/). Bare text is wrapped in a block span whose line box is trimmed\n to the capital-height band, so the flex container centres the ink and not the\n font's ascent/descent (which put Product Sans ~1px high in a 40px button).\n Without text-box (Firefox) the span is a plain block and rendering is exactly\n what it was before. */\n.label {\n display: block;\n}\n\n@supports (text-box: trim-both cap alphabetic) {\n .label {\n text-box: trim-both cap alphabetic;\n }\n\n /* The compact dlg size is height:auto, so trimming would shrink its box. */\n .sizeDlg .label {\n text-box: normal;\n }\n}\n\n/* Blink only. Blink snaps the text baseline to a whole CSS px, which leaves the\n trimmed ink up to half a pixel off for fractional cap heights (12px type). The\n baseline lands at (box + cap) / 2; this hands back what the snap took. WebKit\n positions the baseline exactly, so correcting there would overshoot. The\n -apple-pay-button-style probe is the WebKit-only property that tells them apart. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .label {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n\n .sizeDlg .label {\n transform: none;\n }\n}\n\n/* Variants */\n.variantDefault {\n background-color: var(--button-default-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n color: var(--button-default-text, var(--interactive-primary-text, #f9fafb));\n}\n\n/* Hero (VI-699): the solid, special-moment face. Unset it is the default face. */\n.variantHero {\n background-color: var(--button-hero-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n color: var(--button-hero-text, var(--interactive-primary-text, #f9fafb));\n}\n\n.variantSecondary {\n background-color: var(--interactive-secondary-bg, #f3f4f6);\n color: var(--interactive-secondary-text, #111827);\n}\n\n/* Editorial density: secondary on the card tier, ghost truly transparent.\n * Direct values — the editorial design language owns control surfaces, so the\n * theme's --interactive-secondary-bg / --interactive-ghost-bg are deliberately\n * bypassed (matches the blessed overlay, which out-cascaded the palette). */\n:global([data-density=\"editorial\"]) .variantSecondary {\n background-color: var(--surface-card, #ffffff);\n}\n\n:global([data-density=\"editorial\"]) .variantGhost {\n background-color: transparent;\n}\n\n.variantOutline {\n background-color: transparent;\n color: var(--button-outline-text, var(--text-primary, #111827));\n}\n\n/* Edged faces (VI-655). The resting edge is an inset outline over the border\n box, on the shared --control-edge-* tokens, so --control-edge-width: 0 on any\n ancestor removes it with no layout shift. Each face sets only the colour, in\n the same source position its border-color used to hold. */\n.variantOutline,\n.base[data-gated=\"true\"],\n.sizeDlg.variantGhost {\n position: relative;\n}\n\n.variantOutline::after,\n.base[data-gated=\"true\"]::after,\n.sizeDlg.variantGhost::after {\n content: \"\";\n position: absolute;\n inset: -1px;\n border-radius: inherit;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) transparent;\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n pointer-events: none;\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.variantOutline::after {\n outline-color: var(--control-edge-color, var(--border-strong, #e5e7eb));\n}\n\n.variantGhost {\n background-color: var(--interactive-ghost-bg, transparent);\n color: var(--button-ghost-text, var(--text-primary, #111827));\n}\n\n.variantDestructive {\n background-color: var(--interactive-destructive-bg, #ef4444);\n color: var(--interactive-destructive-text, #fef2f2);\n}\n\n/* Glass (VI-807): a control that turns to glass under the glass switch\n (data-glass=\"on\", VI-795) and is a solid ringed control everywhere else, the\n glass layer's documented control recipe. It reads the layer's shared control\n values, the same set ThemeToggle reads, so the blur exists only where glass\n is on. The prefixed\n backdrop-filter line comes first so Lightning CSS keeps both (VI-788). */\n.variantGlass {\n background-color: var(--glass-on-control-fill, var(--surface-subtle, #f3f4f6));\n color: var(--glass-on-control-ink, var(--text-primary, #111827));\n box-shadow: inset 0 0 0 var(--stroke-width-thin, 1px) var(--glass-on-control-ring, var(--border-default, #e5e7eb));\n -webkit-backdrop-filter: var(--glass-on-control-blur, none);\n backdrop-filter: var(--glass-on-control-blur, none);\n}\n\n@media (hover: hover) {\n .variantDefault:hover {\n background-color: var(--button-default-bg-hover, var(--interactive-primary-bg-hover, #1f2937));\n }\n\n .variantHero:hover {\n background-color: var(--button-hero-bg-hover, var(--interactive-primary-bg-hover, #1f2937));\n }\n\n .variantSecondary:hover {\n background-color: var(--interactive-secondary-bg-hover, #e5e7eb);\n }\n\n .variantOutline:hover {\n background-color: var(--button-outline-bg-hover, var(--surface-muted, #f3f4f6));\n }\n\n .variantGlass:hover {\n background-color: var(--glass-on-control-hover-fill, var(--surface-muted, #f3f4f6));\n }\n\n .variantGhost:hover {\n background-color: var(--interactive-ghost-bg-hover, var(--surface-muted, #f3f4f6));\n color: var(--button-ghost-text-hover, var(--text-primary, #111827));\n }\n\n .sizeDlg.variantGhost:hover {\n color: var(--button-ghost-text-hover, var(--text-secondary, #6b7280));\n }\n\n .variantDestructive:hover {\n background-color: var(--interactive-destructive-bg-hover, #dc2626);\n }\n}\n\n/* Open / active state — ghost variant only. OPT-IN, strictly additive.\n A ghost Button reads as \"held\" while its popover/menu is open so the\n trigger no longer needs an inline style. Three opt-in triggers, all\n resolving to the same held look:\n - data-state=\"open\" — forwarded automatically by Radix when the\n Button is the trigger via <Trigger asChild> (Popover/DropdownMenu).\n - data-active=\"true\" — manual non-Radix triggers (mirrors the\n sidebar `data-active` convention).\n - .isActive — className opt-in (mirrors sidebar/section-nav).\n Default ghost rendering is untouched: none of these match unless a\n consumer explicitly sets them. Matches the prototype-overlay held look:\n background var(--surface-subtle), color var(--text-primary). */\n.variantGhost[data-state=\"open\"],\n.variantGhost[data-active=\"true\"],\n.variantGhost.isActive {\n background-color: var(--surface-subtle, var(--surface-muted, #f3f4f6));\n color: var(--text-primary, #111827);\n}\n\n/* Gated state — orthogonal to variant, works with all variants */\n.base[data-gated=\"true\"] {\n opacity: var(--opacity-40, 0.4);\n cursor: not-allowed;\n}\n\n.base[data-gated=\"true\"]::after {\n outline-color: var(--control-edge-color, var(--border-default, #e5e7eb));\n}\n\n/* Editorial density: gated reads like plain disabled (the blessed admin\n builds render gated actions at the 0.5 disabled opacity). */\n:global([data-density=\"editorial\"]) .base[data-gated=\"true\"] {\n opacity: 0.5;\n}\n\n/* Suppress active transform when gated */\n.base[data-gated=\"true\"]:active {\n transform: none;\n transition: opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n/* Sizes\n Default (no data-density attr) rendering is byte-identical to the prior\n canonical values. Under data-density=\"editorial\" (set on any ancestor,\n typically the app root), the editorial density axis re-drives specific\n metrics to the blessed admin values.\n\n Type and rounding are theme hooks (VI-656, VI-663): --button-<size>-font-size,\n -font-weight, -text-transform, -letter-spacing and -radius set one size, and\n the unprefixed --button-font-weight / -text-transform / -letter-spacing /\n -radius set every size. Unset, each size keeps its shipped type size and rounding; case and\n tracking live in visor-base, after the dlg size. */\n.sizeSm {\n --label-box-height: 2rem;\n height: var(--label-box-height);\n padding: 0 var(--spacing-3, 0.75rem);\n font-size: var(--button-sm-font-size, var(--font-size-xs, 0.75rem));\n font-weight: var(--button-sm-font-weight, var(--button-font-weight, var(--font-weight-medium, 500)));\n border-radius: var(--button-sm-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n.sizeMd {\n --label-box-height: 2.5rem;\n height: var(--button-md-height, var(--label-box-height));\n padding: var(--button-md-padding, 0 var(--spacing-4, 1rem));\n line-height: 1;\n font-size: var(--button-md-font-size, var(--font-size-sm, 0.875rem));\n font-weight: var(--button-md-font-weight, var(--button-font-weight, var(--font-weight-medium, 500)));\n border-radius: var(--button-md-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n:global([data-density=\"editorial\"]) .sizeSm {\n font-size: var(--button-sm-font-size, 0.8125rem);\n}\n\n:global([data-density=\"editorial\"]) .sizeMd {\n --label-box-height: 2.125rem;\n height: var(--label-box-height);\n line-height: normal;\n}\n\n.sizeLg {\n --label-box-height: 3rem;\n height: var(--button-lg-height, var(--label-box-height));\n padding: var(--button-lg-padding, 0 var(--spacing-6, 1.5rem));\n font-size: var(--button-lg-font-size, var(--font-size-base, 1rem));\n font-weight: var(--button-lg-font-weight, var(--button-font-weight, var(--font-weight-medium, 500)));\n border-radius: var(--button-lg-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n/* Dialog-footer button — dlg-btn (Animal dialog substrate, VI-620).\n Compact modal-action metrics measured from the AN prototype (11.5px / 600,\n ~7px 13px padding, 7px radius), normalized onto Visor tokens: font-size-2xs\n (11px), spacing-2/spacing-3 padding (8/12px), radius-lg (8px). Height is\n auto so the compact padding drives the box. Color faces reuse the existing\n variant axis — primary via variant=\"default\", ghost via variant=\"ghost\"\n (refined below to a hairline-outlined, secondary-ink face), danger via\n variant=\"destructive\" (refined below to a subtle-danger face). */\n.sizeDlg {\n height: auto;\n padding: var(--button-dlg-padding, var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem));\n font-size: var(--button-dlg-font-size, var(--font-size-2xs, 0.6875rem));\n font-weight: var(--button-dlg-font-weight, var(--button-font-weight, var(--font-weight-semibold, 600)));\n line-height: 1;\n border-radius: var(--button-dlg-radius, var(--button-radius, var(--radius-lg, 0.5rem)));\n}\n\n/* Icon-only button — a square mark around one glyph (VI-659). The box is the\n glyph plus a hit-target pad on every side, so width always equals height;\n --button-icon-size sets the glyph and --button-icon-pad the pad. A 1em glyph\n (Phosphor's default) takes the size from font-size; a glyph with its own\n width/height attributes is sized by the svg rule. No edge on ghost; on\n outline the edge is the shared ::after one, so --control-edge-width: 0 turns\n it off. */\n.sizeIcon {\n width: calc(var(--button-icon-size, 1rem) + 2 * var(--button-icon-pad, var(--spacing-2, 0.5rem)));\n height: calc(var(--button-icon-size, 1rem) + 2 * var(--button-icon-pad, var(--spacing-2, 0.5rem)));\n padding: 0;\n flex-shrink: 0;\n font-size: var(--button-icon-size, 1rem);\n border-radius: var(--button-icon-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n.sizeIcon > svg {\n width: var(--button-icon-size, 1rem);\n height: var(--button-icon-size, 1rem);\n flex-shrink: 0;\n}\n\n/* Ghost icon ink — the mark sits beside what it acts on, so it rests quieter\n than a labelled ghost button and comes up to primary ink on hover. :where()\n keeps it at one-class weight, so the held (open / active) ghost rule above\n still wins. */\n:where(.sizeIcon).variantGhost {\n color: var(--button-icon-ghost-color, var(--text-secondary, #6b7280));\n}\n\n@media (hover: hover) {\n :where(.sizeIcon).variantGhost:hover {\n color: var(--text-primary, #111827);\n }\n}\n\n/* Case and tracking are inherited properties, so any unlayered fallback would\n override something: `inherit` beats a layered utility, `revert-layer` drops\n an unlayered consumer rule. In visor-base, the lowest Visor layer (the reset's),\n every consumer rule still wins, and when the hook is unset revert-layer\n leaves the element exactly as if these declarations were absent. */\n@layer visor-base {\n .sizeSm {\n text-transform: var(--button-sm-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-sm-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n\n .sizeMd {\n text-transform: var(--button-md-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-md-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n\n .sizeLg {\n text-transform: var(--button-lg-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-lg-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n\n .sizeDlg {\n text-transform: var(--button-dlg-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-dlg-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n}\n\n/* Pill motion and lift (VI-807). The grow on hover and the press both use the\n scale property, apart from the press nudge on transform, so a theme can turn\n on the kit's grow (1.06) and press (0.97) without touching a consumer's own\n transform. The default face can carry a drop shadow that deepens on hover.\n Each falls back to revert-layer in visor-base, so an unbound theme renders\n as if these rules were absent and every consumer rule still wins. A busy or\n gated button holds still. */\n@layer visor-base {\n .variantDefault {\n box-shadow: var(--button-default-shadow, revert-layer);\n }\n\n .variantDefault:disabled {\n box-shadow: none;\n }\n\n @media (hover: hover) {\n .variantDefault:hover {\n box-shadow: var(--button-default-shadow-hover, var(--button-default-shadow, revert-layer));\n }\n\n .base:hover:not(:disabled, [aria-busy=\"true\"], [aria-disabled=\"true\"]) {\n scale: var(--button-hover-scale, revert-layer);\n }\n }\n\n .base:active:not(:disabled, [aria-busy=\"true\"], [aria-disabled=\"true\"]) {\n scale: var(--button-press-scale, revert-layer);\n }\n}\n\n/* Arrow swap (VI-807): two arrows in a one-arrow window. At rest a right arrow's\n track sits half left, showing its second arrow; on the button's hover or\n keyboard focus it slides right, so the first arrow arrives as the second\n leaves. A left arrow is the mirror. */\n.arrowSwap {\n display: inline-flex;\n flex: none;\n width: 1em;\n height: 1em;\n overflow: hidden;\n}\n\n.arrowTrack {\n display: flex;\n flex: none;\n width: 2em;\n transform: translateX(calc(-50% + 50% * var(--_button-swap, 0)));\n transition: transform var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out));\n}\n\n.arrowTrack > svg {\n flex: none;\n width: 1em;\n height: 1em;\n}\n\n.arrowSwap[data-direction=\"left\"] .arrowTrack {\n transform: translateX(calc(-50% * var(--_button-swap, 0)));\n}\n\n/* The button's hover (and its keyboard focus, in the focus-ring rule at the\n top) sets the swap to 1. */\n@media (hover: hover) {\n .base:hover {\n --_button-swap: 1;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .arrowTrack {\n transition: none;\n }\n}\n\n/* dlg ghost — transparent well with a hairline outline + secondary ink\n (AN dlg-btn ghost face: transparent / --ink-60 / 1px --hair). Two-class\n specificity keeps this scoped to the dlg size only. */\n.sizeDlg.variantGhost {\n color: var(--button-ghost-text, var(--text-secondary, #6b7280));\n}\n\n.sizeDlg.variantGhost::after {\n outline-color: var(--control-edge-color, var(--hairline, var(--border-default, #e5e7eb)));\n}\n\n/* dlg danger — subtle-danger face (AN dlg-btn danger face: --red on a faint\n red fill), distinct from the solid `destructive` variant. */\n.sizeDlg.variantDestructive {\n background-color: var(--button-dlg-destructive-bg, var(--surface-error-subtle, color-mix(in srgb, var(--destructive, #ef4444) 8%, transparent)));\n color: var(--button-dlg-destructive-text, var(--text-error, var(--destructive, #b91c1c)));\n}\n\n@media (hover: hover) {\n .sizeDlg.variantDestructive:hover {\n background-color: var(--button-dlg-destructive-bg-hover, color-mix(in srgb, var(--destructive, #ef4444) 14%, transparent));\n }\n}\n\n/* Pending state — orthogonal to variant and size (VI-643).\n The idle children stay in the box at zero opacity so the control keeps its\n width, its height and its accessible name; the busy glyph paints over them\n in an absolutely-positioned overlay. A pending state that reflows has not\n fixed the defect it exists for, which is why nothing here is a leading slot\n that adds width.\n\n Themes tune the two timings via --button-pending-delay and\n --button-pending-min-duration. Neither is declared here on purpose: an\n element-level declaration shadows anything a theme emits on :root (VI-625). */\n.base[data-pending=\"true\"] {\n position: relative;\n cursor: progress;\n}\n\n/* No press dip while the action is in flight — the button is not accepting\n the click, so it must not pretend to. */\n.base[data-pending=\"true\"]:active {\n transform: none;\n transition: none;\n}\n\n/* Geometry holder. Mirrors .base's own flex metrics so wrapping the children\n does not change how they lay out. */\n.pendingLabel {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-2, 0.5rem);\n opacity: 0;\n transition: opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.pendingOverlay {\n position: absolute;\n inset: 0;\n box-sizing: border-box;\n padding: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-2, 0.5rem);\n pointer-events: none;\n}\n\n/* Clamped, so a pending label longer than the idle one can never widen the\n box it is being held inside. */\n.pendingText {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n"
178
179
  }
179
180
  ]
180
181
  },
@@ -611,7 +612,7 @@
611
612
  {
612
613
  "name": "spinner",
613
614
  "type": "registry:ui",
614
- "description": "Loading spinner — an inline rotating ring, or a dotted thinking-orb (nine animations) for waits over larger surfaces. Three sizes (xs/sm/md), two tones (default/primary), accessible label contract, and full reduced-motion support.",
615
+ "description": "Loading spinner — an inline rotating ring, or a dotted thinking-orb (nine animations) for waits over larger surfaces. Three sizes (xs/sm/md), two tones (default/primary), accessible label contract with optional visible words (showLabel), a delay so quick loads never flash it, and full reduced-motion support.",
615
616
  "category": "data-display",
616
617
  "dependencies": [
617
618
  "class-variance-authority",
@@ -625,7 +626,7 @@
625
626
  {
626
627
  "path": "components/ui/spinner/spinner.tsx",
627
628
  "type": "registry:ui",
628
- "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./spinner.module.css\"\nimport { SpinnerOrb, type SpinnerOrbState } from \"./spinner-orb\"\n\nconst spinnerVariants = cva(styles.root, {\n variants: {\n size: {\n xs: styles.sizeXs,\n sm: styles.sizeSm,\n md: styles.sizeMd,\n },\n tone: {\n default: styles.toneDefault,\n primary: styles.tonePrimary,\n },\n },\n defaultVariants: {\n size: \"md\",\n tone: \"default\",\n },\n})\n\nexport interface SpinnerProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\">,\n VariantProps<typeof spinnerVariants> {\n /** Visual size. Ring: xs 12px, sm 16px, md 24px. Orb: xs 20px, sm 32px, md 64px. @default \"md\" */\n size?: \"xs\" | \"sm\" | \"md\"\n /** Color tone — the ring's leading edge, or the orb's ink. @default \"default\" */\n tone?: \"default\" | \"primary\"\n /** `ring` is the inline rotating border; `orb` is a dotted thinking-orb for waits over larger surfaces. @default \"ring\" */\n variant?: \"ring\" | \"orb\"\n /** Which orb animation to show. Read only when `variant=\"orb\"`. @default \"working\" */\n orb?: SpinnerOrbState\n /** Accessible label. When provided, renders role=\"status\" with visually-hidden text. When omitted, aria-hidden=\"true\". */\n label?: string\n}\n\nconst Spinner = React.forwardRef<HTMLSpanElement, SpinnerProps>(\n (\n {\n className,\n size = \"md\",\n tone = \"default\",\n label,\n variant = \"ring\",\n orb = \"working\",\n ...props\n },\n ref\n ) => {\n if (variant === \"orb\") {\n return (\n <SpinnerOrb\n ref={ref}\n state={orb}\n size={size}\n tone={tone}\n className={className}\n {...(label\n ? { role: \"status\", \"aria-label\": label }\n : { \"aria-hidden\": \"true\" })}\n {...props}\n >\n {label ? <span className={styles.srOnly}>{label}</span> : null}\n </SpinnerOrb>\n )\n }\n\n return (\n <span\n ref={ref}\n data-slot=\"spinner\"\n data-size={size}\n data-tone={tone}\n className={cn(spinnerVariants({ size, tone }), className)}\n {...(label\n ? { role: \"status\", \"aria-label\": label }\n : { \"aria-hidden\": \"true\" })}\n {...props}\n >\n {label ? (\n <span className={styles.srOnly}>{label}</span>\n ) : null}\n </span>\n )\n }\n)\nSpinner.displayName = \"Spinner\"\n\nexport { Spinner, spinnerVariants }\nexport type { SpinnerOrbState }\n"
629
+ "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./spinner.module.css\"\nimport { SpinnerOrb, type SpinnerOrbState } from \"./spinner-orb\"\n\nconst spinnerVariants = cva(styles.root, {\n variants: {\n size: {\n xs: styles.sizeXs,\n sm: styles.sizeSm,\n md: styles.sizeMd,\n },\n tone: {\n default: styles.toneDefault,\n primary: styles.tonePrimary,\n },\n },\n defaultVariants: {\n size: \"md\",\n tone: \"default\",\n },\n})\n\nexport interface SpinnerProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\">,\n VariantProps<typeof spinnerVariants> {\n /** Visual size. Ring: xs 12px, sm 16px, md 24px. Orb: xs 20px, sm 32px, md 64px. @default \"md\" */\n size?: \"xs\" | \"sm\" | \"md\"\n /** Color tone — the ring's leading edge, or the orb's ink. @default \"default\" */\n tone?: \"default\" | \"primary\"\n /** `ring` is the inline rotating border; `orb` is a dotted thinking-orb for waits over larger surfaces. @default \"ring\" */\n variant?: \"ring\" | \"orb\"\n /** Which orb animation to show. Read only when `variant=\"orb\"`. @default \"working\" */\n orb?: SpinnerOrbState\n /** Accessible label. When provided, renders role=\"status\" with visually-hidden text. When omitted, aria-hidden=\"true\". */\n label?: string\n /** Show `label` as visible words beside the spinner. The spinner and the words sit in one `role=\"status\"` wrapper, and `delay` fades both. @default false */\n showLabel?: boolean\n /** Wait this many milliseconds before fading in, so a quick load never flashes the spinner. CSS `animation-delay`, so the server renders the same markup. */\n delay?: number\n}\n\nconst Spinner = React.forwardRef<HTMLSpanElement, SpinnerProps>(\n (\n {\n className,\n style,\n size = \"md\",\n tone = \"default\",\n label,\n showLabel = false,\n delay,\n variant = \"ring\",\n orb = \"working\",\n ...props\n },\n ref\n ) => {\n // The delay goes on the outermost element: the status wrapper when the words show, else the spinner.\n const delayed = {\n \"data-delay\": delay == null ? undefined : \"\",\n style:\n delay == null\n ? style\n : ({ ...style, \"--spinner-delay\": `${delay}ms` } as React.CSSProperties),\n }\n const words = showLabel && label ? label : undefined\n const outer = words\n ? { \"aria-hidden\": \"true\" as const }\n : {\n ref,\n ...(label\n ? { role: \"status\", \"aria-label\": label }\n : { \"aria-hidden\": \"true\" as const }),\n ...props,\n ...delayed,\n }\n const srLabel =\n label && !words ? <span className={styles.srOnly}>{label}</span> : null\n\n const spinner =\n variant === \"orb\" ? (\n <SpinnerOrb\n state={orb}\n size={size}\n tone={tone}\n className={words ? undefined : className}\n {...outer}\n >\n {srLabel}\n </SpinnerOrb>\n ) : (\n <span\n data-slot=\"spinner\"\n data-size={size}\n data-tone={tone}\n className={cn(spinnerVariants({ size, tone }), !words && className)}\n {...outer}\n >\n {srLabel}\n </span>\n )\n\n if (!words) return spinner\n\n return (\n <span\n ref={ref}\n role=\"status\"\n data-slot=\"spinner-status\"\n className={cn(styles.status, className)}\n {...props}\n {...delayed}\n >\n {spinner}\n <span>{words}</span>\n </span>\n )\n }\n)\nSpinner.displayName = \"Spinner\"\n\nexport { Spinner, spinnerVariants }\nexport type { SpinnerOrbState }\n"
629
630
  },
630
631
  {
631
632
  "path": "components/ui/spinner/spinner-orb.tsx",
@@ -635,7 +636,7 @@
635
636
  {
636
637
  "path": "components/ui/spinner/spinner.module.css",
637
638
  "type": "registry:ui",
638
- "content": "/* Spinner\n *\n * Inline loading spinner — a border-based rotating ring with a subtle track\n * and a tone-colored leading edge. Sizes: xs (12px), sm (16px), md (24px).\n *\n * All colors flow through CSS custom properties so themes can override the\n * track and edge colors without forking the component. Stroke widths are\n * sourced from the --stroke-width-* token set (thin/regular/medium/thick).\n */\n\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n/* VI-625: the hooks used to be *declared* on .root, which meant an element-level\n declaration shadowed anything a theme emitted on :root — the \"themes can\n override the track and edge colors\" promise in the header never actually\n held. Reading them with the same expression as the inline fallback is\n value-preserving and makes them genuinely theme-bindable. */\n.root {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n border-radius: var(--spinner-radius, var(--radius-full, 9999px));\n border-style: solid;\n border-color: var(--spinner-track-color, var(--border-default, #e5e7eb));\n border-top-color: var(--spinner-edge-color, var(--text-tertiary, #6b7280));\n animation: spin var(--spinner-duration, var(--motion-duration-1500, 1500ms)) var(--motion-easing-linear, linear) infinite;\n box-sizing: border-box;\n}\n\n/* Visually-hidden label text — accessible to screen readers, not visible */\n.srOnly {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n/* Size xs — 12px ring, stroke-width-thin (1px) */\n.root.sizeXs {\n width: var(--spinner-xs-size, 12px);\n height: var(--spinner-xs-size, 12px);\n border-width: var(--spinner-xs-border-width, var(--stroke-width-thin, 1px));\n}\n\n/* Size sm — 16px ring, stroke-width-regular (1.5px) */\n.root.sizeSm {\n width: var(--spinner-sm-size, 16px);\n height: var(--spinner-sm-size, 16px);\n border-width: var(--spinner-sm-border-width, var(--stroke-width-regular, 1.5px));\n}\n\n/* Size md — 24px ring, stroke-width-medium (2px) */\n.root.sizeMd {\n width: var(--spinner-md-size, 24px);\n height: var(--spinner-md-size, 24px);\n border-width: var(--spinner-md-border-width, var(--stroke-width-medium, 2px));\n}\n\n/* Tone: default — tertiary text for leading edge */\n.root.toneDefault {\n border-top-color: var(--spinner-edge-color, var(--text-tertiary, #6b7280));\n}\n\n/* Tone: primary — primary brand color for leading edge */\n.root.tonePrimary {\n border-top-color: var(--spinner-primary-edge-color, var(--primary, #111827));\n}\n\n/* Respect reduced motion — stop rotation */\n@media (prefers-reduced-motion: reduce) {\n .root {\n animation-play-state: paused;\n }\n}\n\n/* Orb variant (VI-653) — a dotted thinking-orb drawn on a canvas by\n thinking-orbs. The wrapper is sized inline to the canvas preset (20/32/64)\n so server and client boxes match. The ink is read at runtime from the\n hidden probe below: default tone follows the surrounding text colour,\n primary tone the same hook the ring's primary edge reads. */\n.orb {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n line-height: 0;\n}\n\n.orbInk {\n display: none;\n color: currentColor;\n}\n\n.orbInkPrimary {\n color: var(--spinner-primary-edge-color, var(--primary, #111827));\n}\n"
639
+ "content": "/* Spinner\n *\n * Inline loading spinner — a border-based rotating ring with a subtle track\n * and a tone-colored leading edge. Sizes: xs (12px), sm (16px), md (24px).\n *\n * All colors flow through CSS custom properties so themes can override the\n * track and edge colors without forking the component. Stroke widths are\n * sourced from the --stroke-width-* token set (thin/regular/medium/thick).\n */\n\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n/* VI-625: the hooks used to be *declared* on .root, which meant an element-level\n declaration shadowed anything a theme emitted on :root — the \"themes can\n override the track and edge colors\" promise in the header never actually\n held. Reading them with the same expression as the inline fallback is\n value-preserving and makes them genuinely theme-bindable. */\n.root {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n border-radius: var(--spinner-radius, var(--radius-full, 9999px));\n border-style: solid;\n border-color: var(--spinner-track-color, var(--border-default, #e5e7eb));\n border-top-color: var(--spinner-edge-color, var(--text-tertiary, #6b7280));\n animation: spin var(--spinner-duration, var(--motion-duration-1500, 1500ms)) var(--motion-easing-linear, linear) infinite;\n box-sizing: border-box;\n /* VI-797: a ring stays a circle when a theme draws squircle corners (VI-796). */\n --corner-shape: round;\n}\n\n/* Visually-hidden label text — accessible to screen readers, not visible */\n.srOnly {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n/* Size xs — 12px ring, stroke-width-thin (1px) */\n.root.sizeXs {\n width: var(--spinner-xs-size, 12px);\n height: var(--spinner-xs-size, 12px);\n border-width: var(--spinner-xs-border-width, var(--stroke-width-thin, 1px));\n}\n\n/* Size sm — 16px ring, stroke-width-regular (1.5px) */\n.root.sizeSm {\n width: var(--spinner-sm-size, 16px);\n height: var(--spinner-sm-size, 16px);\n border-width: var(--spinner-sm-border-width, var(--stroke-width-regular, 1.5px));\n}\n\n/* Size md — 24px ring, stroke-width-medium (2px) */\n.root.sizeMd {\n width: var(--spinner-md-size, 24px);\n height: var(--spinner-md-size, 24px);\n border-width: var(--spinner-md-border-width, var(--stroke-width-medium, 2px));\n}\n\n/* Tone: default — tertiary text for leading edge */\n.root.toneDefault {\n border-top-color: var(--spinner-edge-color, var(--text-tertiary, #6b7280));\n}\n\n/* Tone: primary — primary brand color for leading edge */\n.root.tonePrimary {\n border-top-color: var(--spinner-primary-edge-color, var(--primary, #111827));\n}\n\n/* VI-797: `delay` — nothing shows until the wait passes, then the spinner (or\n the status wrapper with its words) fades in. Pure CSS, so the server and the\n client render the same markup. */\n@keyframes appear {\n from {\n opacity: 0;\n }\n}\n\n.root[data-delay] {\n animation:\n spin var(--spinner-duration, var(--motion-duration-1500, 1500ms)) var(--motion-easing-linear, linear) infinite,\n appear var(--spinner-appear-duration, var(--motion-duration-500, 500ms)) var(--motion-easing-ease-out, cubic-bezier(0, 0, 0.2, 1)) var(--spinner-delay) both;\n}\n\n.orb[data-delay],\n.status[data-delay] {\n animation: appear var(--spinner-appear-duration, var(--motion-duration-500, 500ms)) var(--motion-easing-ease-out, cubic-bezier(0, 0, 0.2, 1)) var(--spinner-delay) both;\n}\n\n/* `showLabel` — the spinner and its visible words in one status wrapper. */\n.status {\n display: inline-flex;\n align-items: center;\n gap: var(--spinner-label-gap, var(--spacing-2, 0.5rem));\n font-size: var(--spinner-label-font-size, var(--font-size-sm, 0.875rem));\n font-weight: var(--spinner-label-font-weight, var(--font-weight-medium, 500));\n color: var(--spinner-label-color, var(--text-secondary, #4b5563));\n}\n\n/* Respect reduced motion — stop rotation. A delayed spinner still fades in:\n only the spin pauses, or the fade would freeze at opacity 0. */\n@media (prefers-reduced-motion: reduce) {\n .root {\n animation-play-state: paused;\n }\n\n .root[data-delay] {\n animation-play-state: paused, running;\n }\n}\n\n/* Orb variant (VI-653) — a dotted thinking-orb drawn on a canvas by\n thinking-orbs. The wrapper is sized inline to the canvas preset (20/32/64)\n so server and client boxes match. The ink is read at runtime from the\n hidden probe below: default tone follows the surrounding text colour,\n primary tone the same hook the ring's primary edge reads. */\n.orb {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n line-height: 0;\n}\n\n.orbInk {\n display: none;\n color: currentColor;\n}\n\n.orbInkPrimary {\n color: var(--spinner-primary-edge-color, var(--primary, #111827));\n}\n"
639
640
  }
640
641
  ]
641
642
  },
@@ -2188,12 +2189,12 @@
2188
2189
  {
2189
2190
  "path": "components/ui/number-input/number-input.tsx",
2190
2191
  "type": "registry:ui",
2191
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Minus, Plus } from \"@phosphor-icons/react\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./number-input.module.css\"\n\nexport interface NumberInputProps\n extends Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n \"type\" | \"onChange\" | \"value\" | \"defaultValue\" | \"prefix\"\n > {\n value?: number\n defaultValue?: number\n onChange?: (value: number | undefined) => void\n min?: number\n max?: number\n step?: number\n /**\n * Fixed text before the value, inside the same well (a currency symbol).\n * Same treatment as `Input`'s `prefix`: secondary ink, never part of the\n * value, clicking it focuses the field, and it is wired to the input with\n * `aria-describedby`. Replaces the native `prefix` HTML attribute, which is\n * not forwarded.\n */\n prefix?: React.ReactNode\n /** Fixed text after the value, inside the same well (a unit: `h`, `m`). See `prefix`. */\n suffix?: React.ReactNode\n}\n\nfunction clamp(value: number, min?: number, max?: number): number {\n if (min !== undefined && value < min) return min\n if (max !== undefined && value > max) return max\n return value\n}\n\nconst NumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n className,\n value,\n defaultValue,\n onChange,\n min,\n max,\n step = 1,\n disabled,\n prefix,\n suffix,\n ...props\n },\n ref\n ) => {\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n const setRefs = React.useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node\n if (typeof ref === \"function\") ref(node)\n else if (ref) ref.current = node\n },\n [ref]\n )\n const affixId = React.useId()\n const hasPrefix = prefix !== undefined && prefix !== null && prefix !== false\n const hasSuffix = suffix !== undefined && suffix !== null && suffix !== false\n const prefixId = `${affixId}-prefix`\n const suffixId = `${affixId}-suffix`\n const describedBy =\n [props[\"aria-describedby\"], hasPrefix && prefixId, hasSuffix && suffixId]\n .filter(Boolean)\n .join(\" \") || undefined\n // A press on an affix would blur the input; hand it back instead.\n const focusInput = (e: React.MouseEvent) => {\n if (!hasPrefix && !hasSuffix) return\n const target = e.target as HTMLElement\n if (target === inputRef.current || target.closest(\"button\")) return\n e.preventDefault()\n inputRef.current?.focus()\n }\n const [internalValue, setInternalValue] = React.useState<string>(\n defaultValue !== undefined ? String(defaultValue) : \"\"\n )\n const isControlled = value !== undefined\n const displayValue = isControlled ? String(value) : internalValue\n\n const updateValue = (newValue: number | undefined) => {\n if (!isControlled) {\n setInternalValue(newValue !== undefined ? String(newValue) : \"\")\n }\n onChange?.(newValue)\n }\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const raw = e.target.value\n if (raw === \"\" || raw === \"-\") {\n if (!isControlled) setInternalValue(raw)\n if (raw === \"\") onChange?.(undefined)\n return\n }\n const parsed = Number(raw)\n if (!Number.isNaN(parsed)) {\n if (!isControlled) setInternalValue(raw)\n onChange?.(parsed)\n }\n }\n\n const handleBlur = () => {\n const parsed = Number(displayValue)\n if (displayValue === \"\" || Number.isNaN(parsed)) {\n updateValue(undefined)\n return\n }\n const clamped = clamp(parsed, min, max)\n updateValue(clamped)\n }\n\n const increment = () => {\n const current = Number(displayValue) || 0\n const next = clamp(current + step, min, max)\n updateValue(next)\n }\n\n const decrement = () => {\n const current = Number(displayValue) || 0\n const next = clamp(current - step, min, max)\n updateValue(next)\n }\n\n return (\n <div\n data-slot=\"number-input\"\n className={cn(styles.wrapper, disabled && styles.wrapperDisabled, className)}\n onMouseDown={focusInput}\n >\n <button\n type=\"button\"\n className={styles.button}\n onClick={decrement}\n disabled={disabled}\n aria-label=\"Decrease value\"\n tabIndex={-1}\n >\n <Minus className={styles.buttonIcon} aria-hidden=\"true\" />\n </button>\n {hasPrefix ? (\n <span id={prefixId} className={cn(styles.affix, styles.affixPrefix)} data-slot=\"number-input-prefix\">\n {prefix}\n </span>\n ) : null}\n <input\n ref={setRefs}\n type=\"text\"\n inputMode=\"numeric\"\n pattern=\"[0-9]*\"\n role=\"spinbutton\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={\n displayValue !== \"\" ? Number(displayValue) : undefined\n }\n value={displayValue}\n onChange={handleInputChange}\n onBlur={handleBlur}\n disabled={disabled}\n className={cn(\n styles.input,\n hasPrefix && !hasSuffix && styles.inputAfterPrefix,\n hasSuffix && !hasPrefix && styles.inputBeforeSuffix\n )}\n {...props}\n aria-describedby={describedBy}\n />\n {hasSuffix ? (\n <span id={suffixId} className={cn(styles.affix, styles.affixSuffix)} data-slot=\"number-input-suffix\">\n {suffix}\n </span>\n ) : null}\n <button\n type=\"button\"\n className={styles.button}\n onClick={increment}\n disabled={disabled}\n aria-label=\"Increase value\"\n tabIndex={-1}\n >\n <Plus className={styles.buttonIcon} aria-hidden=\"true\" />\n </button>\n </div>\n )\n }\n)\nNumberInput.displayName = \"NumberInput\"\n\nexport { NumberInput }\n"
2192
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Minus, Plus } from \"@phosphor-icons/react\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./number-input.module.css\"\n\nexport interface NumberInputProps\n extends Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n \"type\" | \"onChange\" | \"value\" | \"defaultValue\" | \"prefix\"\n > {\n value?: number\n defaultValue?: number\n onChange?: (value: number | undefined) => void\n min?: number\n max?: number\n step?: number\n /**\n * Fixed text before the value, inside the same well (a currency symbol).\n * Same treatment as `Input`'s `prefix`: secondary ink, never part of the\n * value, clicking it focuses the field, and it is wired to the input with\n * `aria-describedby`. Replaces the native `prefix` HTML attribute, which is\n * not forwarded.\n */\n prefix?: React.ReactNode\n /** Fixed text after the value, inside the same well (a unit: `h`, `m`). See `prefix`. */\n suffix?: React.ReactNode\n}\n\nfunction clamp(value: number, min?: number, max?: number): number {\n if (min !== undefined && value < min) return min\n if (max !== undefined && value > max) return max\n return value\n}\n\nconst NumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n className,\n value,\n defaultValue,\n onChange,\n min,\n max,\n step = 1,\n disabled,\n prefix,\n suffix,\n onKeyDown,\n ...props\n },\n ref\n ) => {\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n const setRefs = React.useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node\n if (typeof ref === \"function\") ref(node)\n else if (ref) ref.current = node\n },\n [ref]\n )\n const affixId = React.useId()\n const hasPrefix = prefix !== undefined && prefix !== null && prefix !== false\n const hasSuffix = suffix !== undefined && suffix !== null && suffix !== false\n const prefixId = `${affixId}-prefix`\n const suffixId = `${affixId}-suffix`\n const describedBy =\n [props[\"aria-describedby\"], hasPrefix && prefixId, hasSuffix && suffixId]\n .filter(Boolean)\n .join(\" \") || undefined\n // A press on an affix would blur the input; hand it back instead.\n const focusInput = (e: React.MouseEvent) => {\n if (!hasPrefix && !hasSuffix) return\n const target = e.target as HTMLElement\n if (target === inputRef.current || target.closest(\"button\")) return\n e.preventDefault()\n inputRef.current?.focus()\n }\n const [internalValue, setInternalValue] = React.useState<string>(\n defaultValue !== undefined ? String(defaultValue) : \"\"\n )\n const isControlled = value !== undefined\n const displayValue = isControlled ? String(value) : internalValue\n\n const updateValue = (newValue: number | undefined) => {\n if (!isControlled) {\n setInternalValue(newValue !== undefined ? String(newValue) : \"\")\n }\n onChange?.(newValue)\n }\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const raw = e.target.value\n if (raw === \"\" || raw === \"-\") {\n if (!isControlled) setInternalValue(raw)\n if (raw === \"\") onChange?.(undefined)\n return\n }\n const parsed = Number(raw)\n if (!Number.isNaN(parsed)) {\n if (!isControlled) setInternalValue(raw)\n onChange?.(parsed)\n }\n }\n\n const handleBlur = () => {\n const parsed = Number(displayValue)\n if (displayValue === \"\" || Number.isNaN(parsed)) {\n updateValue(undefined)\n return\n }\n const clamped = clamp(parsed, min, max)\n updateValue(clamped)\n }\n\n const parsedValue = displayValue === \"\" ? NaN : Number(displayValue)\n const atMin = min !== undefined && parsedValue <= min\n const atMax = max !== undefined && parsedValue >= max\n\n // From empty, the first press lands on `min` when there is one.\n const stepBy = (delta: number) => {\n if (Number.isNaN(parsedValue) && min !== undefined) {\n updateValue(min)\n return\n }\n const current = Number(displayValue) || 0\n updateValue(clamp(current + delta, min, max))\n }\n const increment = () => stepBy(step)\n const decrement = () => stepBy(-step)\n\n // ArrowUp and ArrowDown step the value, as on a native spinbutton.\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n onKeyDown?.(e)\n if (e.defaultPrevented || (e.key !== \"ArrowUp\" && e.key !== \"ArrowDown\")) return\n e.preventDefault()\n if (e.key === \"ArrowUp\") increment()\n else decrement()\n }\n\n return (\n <div\n data-slot=\"number-input\"\n className={cn(styles.wrapper, disabled && styles.wrapperDisabled, className)}\n onMouseDown={focusInput}\n >\n <button\n type=\"button\"\n className={styles.button}\n onClick={decrement}\n disabled={disabled || atMin}\n aria-label=\"Decrease value\"\n tabIndex={-1}\n >\n <Minus className={styles.buttonIcon} aria-hidden=\"true\" />\n </button>\n {hasPrefix ? (\n <span id={prefixId} className={cn(styles.affix, styles.affixPrefix)} data-slot=\"number-input-prefix\">\n {prefix}\n </span>\n ) : null}\n <input\n ref={setRefs}\n type=\"text\"\n inputMode=\"numeric\"\n pattern=\"[0-9]*\"\n role=\"spinbutton\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={\n displayValue !== \"\" ? Number(displayValue) : undefined\n }\n value={displayValue}\n onChange={handleInputChange}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n className={cn(\n styles.input,\n hasPrefix && !hasSuffix && styles.inputAfterPrefix,\n hasSuffix && !hasPrefix && styles.inputBeforeSuffix\n )}\n {...props}\n aria-describedby={describedBy}\n />\n {hasSuffix ? (\n <span id={suffixId} className={cn(styles.affix, styles.affixSuffix)} data-slot=\"number-input-suffix\">\n {suffix}\n </span>\n ) : null}\n <button\n type=\"button\"\n className={styles.button}\n onClick={increment}\n disabled={disabled || atMax}\n aria-label=\"Increase value\"\n tabIndex={-1}\n >\n <Plus className={styles.buttonIcon} aria-hidden=\"true\" />\n </button>\n </div>\n )\n }\n)\nNumberInput.displayName = \"NumberInput\"\n\nexport { NumberInput }\n"
2192
2193
  },
2193
2194
  {
2194
2195
  "path": "components/ui/number-input/number-input.module.css",
2195
2196
  "type": "registry:ui",
2196
- "content": "/* Number input wrapper */\n.wrapper {\n display: inline-flex;\n align-items: center;\n /* VI-662: the border only holds box geometry. The resting edge is the shared\n --control-edge-* outline (VI-655), so --control-edge-width: 0 turns it off.\n --number-input-border stays the per-component colour override. */\n border: 1px solid transparent;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--number-input-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n border-radius: var(--radius-md, 0.375rem);\n background-color: var(--number-input-bg, var(--surface-interactive-default, #f9fafb));\n overflow: hidden;\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n@media (hover: hover) {\n .button:hover {\n color: var(--text-primary, #111827);\n background-color: var(--surface-muted, #f3f4f6);\n }\n}\n\n.wrapper:focus-within {\n outline: var(--control-state-edge-width, 1px) solid var(--border-focus, #111827);\n outline-offset: calc(-1 * var(--control-state-edge-width, 1px));\n box-shadow: 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-focus, #111827) 15%, transparent);\n}\n\n.wrapperDisabled {\n opacity: 0.5;\n pointer-events: none;\n}\n\n/* Stepper buttons */\n.button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2.25rem;\n height: 2.25rem;\n padding: 0;\n border: none;\n background: transparent;\n color: var(--text-secondary, #9ca3af);\n cursor: pointer;\n flex-shrink: 0;\n transition: color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.button:active {\n background-color: var(--surface-interactive-hover, #e5e7eb);\n transition: none;\n}\n\n.button:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, -2px);\n}\n\n.button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.buttonIcon {\n width: 0.875rem;\n height: 0.875rem;\n}\n\n/* Input */\n.input {\n width: 4rem;\n height: 2.25rem;\n padding: 0;\n border: none;\n background: transparent;\n text-align: center;\n font-size: var(--font-size-sm, 0.875rem);\n color: var(--text-primary, #111827);\n outline: none;\n}\n\n.input::placeholder {\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Prefix and suffix (VI-662). Fixed text inside the same well, between the\n steppers and the value. Both are flex items beside the input, so the value\n never runs under them. The affix reads the same tokens as Input's. */\n.affix {\n flex-shrink: 0;\n white-space: nowrap;\n user-select: none;\n cursor: text;\n font-size: var(--font-size-sm, 0.875rem);\n line-height: 1.5;\n color: var(--input-affix-color, var(--text-secondary, #6b7280));\n}\n\n/* With one affix the value leans toward it, so the pair reads as one figure\n (\"€ 150\", \"2 h\"); with both, or neither, the value stays centred. */\n.inputAfterPrefix {\n text-align: start;\n padding-inline-start: var(--input-affix-gap, var(--spacing-2, 0.5rem));\n}\n\n.inputBeforeSuffix {\n text-align: end;\n padding-inline-end: var(--input-affix-gap, var(--spacing-2, 0.5rem));\n}\n\n.affixPrefix {\n margin-inline-start: var(--spacing-2, 0.5rem);\n}\n\n.affixSuffix {\n margin-inline-end: var(--spacing-2, 0.5rem);\n}\n\n/* Per-font baseline nudge (VI-684 mechanism, shared with Input). The theme engine\n publishes the body face's ascent and descent as unitless em ratios; the value\n box is 2.25rem, the same as Input sm, so it takes the same nudge: the gap\n between the whole px nearest the ideal baseline and the one the font produces.\n The value and both affixes move by it, so they share a baseline. Blink only\n (WebKit places the baseline exactly); no font metrics means no nudge (0px). */\n@supports (padding-top: round(1.4px, 1px)) and (not (-apple-pay-button-style: black)) {\n .wrapper {\n --input-nudge: calc(round((2.25rem + 1cap) / 2, 1px) - (2.25rem + (round(var(--font-ascent) * 1em, 1px) - round(var(--font-descent) * 1em, 1px))) / 2);\n }\n\n .input,\n .affix {\n position: relative;\n top: var(--input-nudge, 0px);\n }\n}\n"
2197
+ "content": "/* Number input wrapper.\n Skin hooks (VI-798): --number-input-* each fall back to the value shipped before\n them, so an unbound theme renders as it did. Glass (VI-795): under\n data-glass=\"on\" the field reads the glass layer's shared control values (fill,\n hover fill, ring, ink, blur), the set ThemeToggle and the glass icon Button read;\n everywhere else the --glass-on-* variables are unset and the field stays solid. */\n.wrapper {\n display: inline-flex;\n align-items: center;\n /* VI-662: the border only holds box geometry. The resting edge is the shared\n --control-edge-* outline (VI-655), so --control-edge-width: 0 turns it off.\n --number-input-border stays the per-component colour override. */\n border: 1px solid transparent;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--glass-on-control-ring, var(--number-input-border, var(--control-edge-color, var(--border-default, #e5e7eb))));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n border-radius: var(--number-input-radius, var(--radius-md, 0.375rem));\n background-color: var(--glass-on-control-fill, var(--number-input-bg, var(--surface-interactive-default, #f9fafb)));\n /* Prefixed line first, so Lightning CSS keeps both (VI-788). */\n -webkit-backdrop-filter: var(--glass-on-control-blur, none);\n backdrop-filter: var(--glass-on-control-blur, none);\n overflow: hidden;\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n@media (hover: hover) {\n .button:not(:disabled):hover {\n color: var(--glass-on-control-ink, var(--text-primary, #111827));\n background-color: var(--glass-on-control-hover-fill, var(--number-input-button-hover-bg, var(--surface-muted, #f3f4f6)));\n }\n}\n\n.wrapper:focus-within {\n outline: var(--control-state-edge-width, 1px) solid var(--border-focus, #111827);\n outline-offset: calc(-1 * var(--control-state-edge-width, 1px));\n box-shadow: 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-focus, #111827) 15%, transparent);\n background-color: var(--glass-on-control-hover-fill, var(--number-input-bg-focus, var(--number-input-bg, var(--surface-interactive-default, #f9fafb))));\n}\n\n.wrapperDisabled {\n opacity: 0.5;\n pointer-events: none;\n}\n\n/* Stepper buttons */\n.button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--number-input-button-size, 2.25rem);\n height: var(--number-input-button-size, 2.25rem);\n margin-inline: var(--number-input-button-inset, 0);\n padding: 0;\n border: none;\n border-radius: var(--number-input-button-radius, 0);\n background: transparent;\n color: var(--glass-on-control-ink, var(--number-input-button-color, var(--text-secondary, #9ca3af)));\n cursor: pointer;\n flex-shrink: 0;\n transition: color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.button:active {\n background-color: var(--surface-interactive-hover, #e5e7eb);\n transition: none;\n}\n\n.button:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, -2px);\n}\n\n.button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.buttonIcon {\n width: var(--number-input-icon-size, 0.875rem);\n height: var(--number-input-icon-size, 0.875rem);\n}\n\n/* Input */\n.input {\n width: var(--number-input-value-width, 4rem);\n height: var(--number-input-height, 2.25rem);\n padding: 0;\n border: none;\n background: transparent;\n text-align: center;\n font-size: var(--number-input-value-font-size, var(--font-size-sm, 0.875rem));\n font-weight: var(--number-input-value-font-weight, inherit);\n color: var(--glass-on-control-ink, var(--text-primary, #111827));\n outline: none;\n}\n\n.input::placeholder {\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Prefix and suffix (VI-662). Fixed text inside the same well, between the\n steppers and the value. Both are flex items beside the input, so the value\n never runs under them. The affix reads the same tokens as Input's. */\n.affix {\n flex-shrink: 0;\n white-space: nowrap;\n user-select: none;\n cursor: text;\n font-size: var(--font-size-sm, 0.875rem);\n line-height: 1.5;\n color: var(--input-affix-color, var(--text-secondary, #6b7280));\n}\n\n/* With one affix the value leans toward it, so the pair reads as one figure\n (\"€ 150\", \"2 h\"); with both, or neither, the value stays centred. */\n.inputAfterPrefix {\n text-align: start;\n padding-inline-start: var(--input-affix-gap, var(--spacing-2, 0.5rem));\n}\n\n.inputBeforeSuffix {\n text-align: end;\n padding-inline-end: var(--input-affix-gap, var(--spacing-2, 0.5rem));\n}\n\n.affixPrefix {\n margin-inline-start: var(--spacing-2, 0.5rem);\n}\n\n.affixSuffix {\n margin-inline-end: var(--spacing-2, 0.5rem);\n}\n\n/* Per-font baseline nudge (VI-684 mechanism, shared with Input). The theme engine\n publishes the body face's ascent and descent as unitless em ratios; the value\n box is --number-input-height (2.25rem, the same as Input sm), so it takes the same nudge: the gap\n between the whole px nearest the ideal baseline and the one the font produces.\n The value and both affixes move by it, so they share a baseline. Blink only\n (WebKit places the baseline exactly); no font metrics means no nudge (0px). */\n@supports (padding-top: round(1.4px, 1px)) and (not (-apple-pay-button-style: black)) {\n .wrapper {\n --input-nudge: calc(round((var(--number-input-height, 2.25rem) + 1cap) / 2, 1px) - (var(--number-input-height, 2.25rem) + (round(var(--font-ascent) * 1em, 1px) - round(var(--font-descent) * 1em, 1px))) / 2);\n }\n\n .input,\n .affix {\n position: relative;\n top: var(--input-nudge, 0px);\n }\n}\n"
2197
2198
  }
2198
2199
  ]
2199
2200
  },
@@ -2267,7 +2268,7 @@
2267
2268
  {
2268
2269
  "path": "components/ui/photo-picker/photo-picker.tsx",
2269
2270
  "type": "registry:ui",
2270
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./photo-picker.module.css\"\n\nexport interface PhotoPickerPhoto {\n /** Unique key, reported by `onValueChange`. */\n key: string\n /** The thumbnail's URL. */\n thumb: string\n /** The thumbnail's accessible name. Defaults to \"Photo N\". */\n label?: string\n}\n\nexport interface PhotoPickerProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"defaultValue\" | \"onChange\"> {\n photos: PhotoPickerPhoto[]\n /** The chosen photo's key, or null for none. */\n value?: string | null\n /** Called with a photo's key when it is pressed. */\n onValueChange?: (key: string) => void\n /**\n * The draw wave plays when the grid mounts and every time `play` changes,\n * except to `false`. Pass the menu's open state, or a counter you bump.\n */\n play?: boolean | number\n /** Thumbnails load only once this has been true. Pass the menu's open state to wait for the first open. */\n load?: boolean\n}\n\n// Each thumbnail rises on its own beat, a wave from the top left: its row plus its\n// place in the row, by where it sits on screen now. Capped so a long grid doesn't drag.\nconst BEAT_CAP = 12\n\nfunction drawWave(items: HTMLElement[]) {\n const rects = items.map((x) => x.getBoundingClientRect())\n const tops = rects.map((r) => Math.round(r.top))\n const rows = [...new Set(tops)].sort((a, b) => a - b)\n items.forEach((x, i) => {\n const col = rects.filter((r, j) => tops[j] === tops[i] && r.left < rects[i].left).length\n x.style.setProperty(\"--draw-i\", String(Math.min(rows.indexOf(tops[i]) + col, BEAT_CAP)))\n x.classList.remove(styles.drawing)\n })\n void items[0]?.offsetWidth // one reflow, so every animation restarts\n items.forEach((x) => {\n x.classList.add(styles.drawing)\n const done = (e: AnimationEvent) => {\n if (e.target !== x) return\n x.classList.remove(styles.drawing)\n x.removeEventListener(\"animationend\", done)\n }\n x.addEventListener(\"animationend\", done)\n })\n}\n\n/** A grid of photo thumbnails, one chosen. The consumer supplies the popover or panel it sits in. */\nconst PhotoPicker = React.forwardRef<HTMLDivElement, PhotoPickerProps>(\n ({ photos, value = null, onValueChange, play, load = true, className, ...props }, ref) => {\n const gridRef = React.useRef<HTMLDivElement>(null)\n React.useImperativeHandle(ref, () => gridRef.current as HTMLDivElement)\n\n // Once loaded, stay loaded: closing the menu must not blank the thumbnails.\n const [loaded, setLoaded] = React.useState(load)\n if (load && !loaded) setLoaded(true)\n\n React.useEffect(() => {\n const grid = gridRef.current\n if (play === false || !grid) return\n const raf = requestAnimationFrame(() => drawWave([...grid.children] as HTMLElement[]))\n return () => cancelAnimationFrame(raf)\n }, [play])\n\n return (\n <div ref={gridRef} role=\"group\" data-slot=\"photo-picker\" className={cn(styles.root, className)} {...props}>\n {photos.map((photo, i) => (\n <button\n key={photo.key}\n type=\"button\"\n className={styles.thumb}\n aria-pressed={photo.key === value}\n aria-label={photo.label ?? `Photo ${i + 1}`}\n onClick={() => onValueChange?.(photo.key)}\n >\n <img src={loaded ? photo.thumb : undefined} alt=\"\" />\n </button>\n ))}\n </div>\n )\n }\n)\nPhotoPicker.displayName = \"PhotoPicker\"\n\nexport { PhotoPicker }\n"
2271
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./photo-picker.module.css\"\n\nexport interface PhotoPickerPhoto {\n /** Unique key, reported by `onValueChange`. */\n key: string\n /** The thumbnail's URL. */\n thumb: string\n /** The thumbnail's accessible name. Defaults to \"Photo N\". */\n label?: string\n}\n\nexport interface PhotoPickerProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"defaultValue\" | \"onChange\"> {\n photos: PhotoPickerPhoto[]\n /** The chosen photo's key, or null for none. */\n value?: string | null\n /** Called with a photo's key when it is pressed. */\n onValueChange?: (key: string) => void\n /**\n * The draw wave plays when the grid mounts and every time `play` changes,\n * except to `false`. Pass the menu's open state, or a counter you bump.\n */\n play?: boolean | number\n /** Thumbnails load only once this has been true. Pass the menu's open state to wait for the first open. */\n load?: boolean\n}\n\n// Each thumbnail rises on its own beat, a wave from the top left: its row plus its\n// place in the row, by where it sits on screen now. Capped so a long grid doesn't drag.\nconst BEAT_CAP = 12\nconst DRAWING = styles.drawing ?? \"drawing\" // ?? only types the checked index read\n\nfunction drawWave(items: HTMLElement[]) {\n const rects = items.map((x) => x.getBoundingClientRect())\n const tops = rects.map((r) => Math.round(r.top))\n const rows = [...new Set(tops)].sort((a, b) => a - b)\n items.forEach((x, i) => {\n const rect = rects[i]\n const top = tops[i]\n if (!rect || top === undefined) return\n const col = rects.filter((r, j) => tops[j] === top && r.left < rect.left).length\n x.style.setProperty(\"--draw-i\", String(Math.min(rows.indexOf(top) + col, BEAT_CAP)))\n x.classList.remove(DRAWING)\n })\n void items[0]?.offsetWidth // one reflow, so every animation restarts\n items.forEach((x) => {\n x.classList.add(DRAWING)\n const done = (e: AnimationEvent) => {\n if (e.target !== x) return\n x.classList.remove(DRAWING)\n x.removeEventListener(\"animationend\", done)\n }\n x.addEventListener(\"animationend\", done)\n })\n}\n\n/** A grid of photo thumbnails, one chosen. The consumer supplies the popover or panel it sits in. */\nconst PhotoPicker = React.forwardRef<HTMLDivElement, PhotoPickerProps>(\n ({ photos, value = null, onValueChange, play, load = true, className, ...props }, ref) => {\n const gridRef = React.useRef<HTMLDivElement>(null)\n React.useImperativeHandle(ref, () => gridRef.current as HTMLDivElement)\n\n // Once loaded, stay loaded: closing the menu must not blank the thumbnails.\n const [loaded, setLoaded] = React.useState(load)\n if (load && !loaded) setLoaded(true)\n\n React.useEffect(() => {\n const grid = gridRef.current\n if (play === false || !grid) return\n const raf = requestAnimationFrame(() => drawWave([...grid.children] as HTMLElement[]))\n return () => cancelAnimationFrame(raf)\n }, [play])\n\n return (\n <div ref={gridRef} role=\"group\" data-slot=\"photo-picker\" className={cn(styles.root, className)} {...props}>\n {photos.map((photo, i) => (\n <button\n key={photo.key}\n type=\"button\"\n className={styles.thumb}\n aria-pressed={photo.key === value}\n aria-label={photo.label ?? `Photo ${i + 1}`}\n onClick={() => onValueChange?.(photo.key)}\n >\n <img src={loaded ? photo.thumb : undefined} alt=\"\" />\n </button>\n ))}\n </div>\n )\n }\n)\nPhotoPicker.displayName = \"PhotoPicker\"\n\nexport { PhotoPicker }\n"
2271
2272
  },
2272
2273
  {
2273
2274
  "path": "components/ui/photo-picker/photo-picker.module.css",
@@ -5636,7 +5637,7 @@
5636
5637
  {
5637
5638
  "path": "components/devtools/source-inspector/visor-component-names.generated.ts",
5638
5639
  "type": "registry:devtool",
5639
- "content": "// THIS FILE IS GENERATED BY scripts/generate-visor-component-names.ts.\n// Do not edit by hand. Re-run `npm run generate:component-names` after\n// adding, removing, or renaming a Visor component.\n//\n// Source of truth: registry/registry-{ui,blocks,deck,visual,devtools}.ts\n// Used by: components/devtools/source-inspector/* (VI-311)\n\nexport const VISOR_COMPONENT_NAMES: ReadonlySet<string> = new Set([\n \"AccessibilitySection\",\n \"AccessibilitySlide\",\n \"AccessibilitySpecimen\",\n \"Accordion\",\n \"AccordionContent\",\n \"AccordionItem\",\n \"AccordionTrigger\",\n \"ActionRow\",\n \"ActionRowList\",\n \"ActivityFeed\",\n \"ActivityFeedContext\",\n \"ActivityFeedItem\",\n \"ActivityFeedRoot\",\n \"AdminDashboard\",\n \"AdminDetail\",\n \"AdminDetailDrawer\",\n \"AdminListPage\",\n \"AdminListPageInner\",\n \"AdminSettingsPage\",\n \"AdminShell\",\n \"AdminTabbedEditor\",\n \"AdminWizard\",\n \"Alert\",\n \"AlertActions\",\n \"AlertDescription\",\n \"AlertLead\",\n \"AlertTitle\",\n \"AmbientGlow\",\n \"Avatar\",\n \"AvatarFallback\",\n \"AvatarImage\",\n \"AvatarStack\",\n \"Badge\",\n \"Banner\",\n \"BannerAction\",\n \"BannerDescription\",\n \"BannerTitle\",\n \"BentoGrid\",\n \"BentoTile\",\n \"BentoTileBody\",\n \"BentoTileDescription\",\n \"BentoTileFigure\",\n \"BentoTileHeadline\",\n \"BentoTileMedia\",\n \"BentoTileMeta\",\n \"BentoTileTitle\",\n \"BillingSlider\",\n \"BottomNav\",\n \"Box\",\n \"Breadcrumb\",\n \"BreadcrumbEllipsis\",\n \"BreadcrumbItem\",\n \"BreadcrumbLink\",\n \"BreadcrumbList\",\n \"BreadcrumbPage\",\n \"BreadcrumbSeparator\",\n \"BrowserFrame\",\n \"BulkActionBar\",\n \"Button\",\n \"ButtonSpecimenSection\",\n \"ButtonSpecimenSlide\",\n \"Calendar\",\n \"Capture\",\n \"Card\",\n \"CardContent\",\n \"CardDescription\",\n \"CardFooter\",\n \"CardGrid\",\n \"CardHeader\",\n \"CardIndicatorContext\",\n \"CardLift\",\n \"CardTitle\",\n \"Carousel\",\n \"CarouselContent\",\n \"CarouselContext\",\n \"CarouselGallery\",\n \"CarouselItem\",\n \"CarouselNext\",\n \"CarouselPrevious\",\n \"ChallengeCard\",\n \"ChallengeCardAction\",\n \"ChallengeCardActions\",\n \"ChallengeCardBody\",\n \"ChallengeCardGate\",\n \"ChallengeCardHeader\",\n \"ChartContainer\",\n \"ChartContext\",\n \"ChartLegend\",\n \"ChartLegendContent\",\n \"ChartStyle\",\n \"ChartTooltip\",\n \"ChartTooltipContent\",\n \"Checkbox\",\n \"CheckGroup\",\n \"CheckRow\",\n \"Chip\",\n \"ChipGroup\",\n \"ChipGroupContext\",\n \"ChipGroupItem\",\n \"ChoiceChip\",\n \"ChromeButton\",\n \"ClosingSlide\",\n \"CodeBlock\",\n \"Collapsible\",\n \"CollapsibleContent\",\n \"CollapsibleTrigger\",\n \"ColorBar\",\n \"ColorPaletteSection\",\n \"ColorPicker\",\n \"ColorPickerSurface\",\n \"ColorSwatch\",\n \"ColorSwatchGrid\",\n \"Column\",\n \"Combobox\",\n \"ComboboxContent\",\n \"ComboboxContext\",\n \"ComboboxEmpty\",\n \"ComboboxGroup\",\n \"ComboboxInput\",\n \"ComboboxItem\",\n \"ComboboxSeparator\",\n \"Command\",\n \"CommandDialog\",\n \"CommandEmpty\",\n \"CommandGroup\",\n \"CommandInput\",\n \"CommandItem\",\n \"CommandList\",\n \"CommandLoading\",\n \"CommandSeparator\",\n \"CommandShortcut\",\n \"ComponentShowcaseContent\",\n \"ComponentShowcaseSection\",\n \"ComponentShowcaseSlide\",\n \"Composer\",\n \"ComposerContext\",\n \"ComposerField\",\n \"ComposerSend\",\n \"ComposerSpacer\",\n \"ComposerToolbar\",\n \"ComposerToolButton\",\n \"ConceptSlide\",\n \"ConfigurationPanel\",\n \"ConfirmDialog\",\n \"ConflictBanner\",\n \"Container\",\n \"ContextMenu\",\n \"ContextMenuCheckboxItem\",\n \"ContextMenuContent\",\n \"ContextMenuGroup\",\n \"ContextMenuItem\",\n \"ContextMenuLabel\",\n \"ContextMenuPortal\",\n \"ContextMenuRadioGroup\",\n \"ContextMenuRadioItem\",\n \"ContextMenuSeparator\",\n \"ContextMenuShortcut\",\n \"ContextMenuSub\",\n \"ContextMenuSubContent\",\n \"ContextMenuSubTrigger\",\n \"ContextMenuTrigger\",\n \"Controls\",\n \"CtaSection\",\n \"DataTable\",\n \"DataTableInner\",\n \"DatePicker\",\n \"DateRangePicker\",\n \"DeckContext\",\n \"DeckFooter\",\n \"DeckLayout\",\n \"DeckProvider\",\n \"DeckRenderer\",\n \"DesignSystemDeck\",\n \"DesignSystemSpecimen\",\n \"Dialog\",\n \"DialogBack\",\n \"DialogClose\",\n \"DialogContent\",\n \"DialogContext\",\n \"DialogDescription\",\n \"DialogField\",\n \"DialogFieldControl\",\n \"DialogFieldLabel\",\n \"DialogFooter\",\n \"DialogForm\",\n \"DialogFormBody\",\n \"DialogFormClose\",\n \"DialogFormContent\",\n \"DialogFormDescription\",\n \"DialogFormFooter\",\n \"DialogFormHeader\",\n \"DialogFormTitle\",\n \"DialogFormTrigger\",\n \"DialogHeader\",\n \"DialogOverlay\",\n \"DialogPortal\",\n \"DialogScrim\",\n \"DialogTitle\",\n \"DialogTrigger\",\n \"DocFrame\",\n \"DocFrameBrand\",\n \"DocNav\",\n \"DocNavGroup\",\n \"DocNavPill\",\n \"DotNav\",\n \"DropdownMenu\",\n \"DropdownMenuCheckboxItem\",\n \"DropdownMenuContent\",\n \"DropdownMenuGroup\",\n \"DropdownMenuItem\",\n \"DropdownMenuLabel\",\n \"DropdownMenuPortal\",\n \"DropdownMenuRadioGroup\",\n \"DropdownMenuRadioItem\",\n \"DropdownMenuSeparator\",\n \"DropdownMenuShortcut\",\n \"DropdownMenuSub\",\n \"DropdownMenuSubContent\",\n \"DropdownMenuSubTrigger\",\n \"DropdownMenuTrigger\",\n \"EditableBlock\",\n \"ElevationCard\",\n \"ElevationSlide\",\n \"EmptyState\",\n \"ErrorPlacard\",\n \"ExportMenu\",\n \"FeaturesGrid\",\n \"FidelityMirror\",\n \"Field\",\n \"FieldDescription\",\n \"FieldError\",\n \"FieldLabel\",\n \"Fieldset\",\n \"FieldsetLegend\",\n \"FileUpload\",\n \"FilterBar\",\n \"FilterChip\",\n \"FontShowcase\",\n \"FontShowcaseGrid\",\n \"Footer\",\n \"FooterSection\",\n \"Form\",\n \"FormError\",\n \"FormErrorDescription\",\n \"FormErrorTitle\",\n \"FormField\",\n \"FormSpecimenSection\",\n \"FormSpecimenSlide\",\n \"FullscreenOverlay\",\n \"FullscreenOverlayContent\",\n \"FullscreenOverlayTrigger\",\n \"GrainOverlay\",\n \"Grid\",\n \"Header\",\n \"Heading\",\n \"HeroGlow\",\n \"HeroSection\",\n \"HeroSlide\",\n \"HoverCard\",\n \"HoverCardContent\",\n \"HoverCardTrigger\",\n \"IconGrid\",\n \"IconGridSection\",\n \"IconSizeRow\",\n \"IconsSlide\",\n \"Image\",\n \"InfographicBar\",\n \"Inline\",\n \"InlineEdit\",\n \"Input\",\n \"KanbanBoard\",\n \"Kbd\",\n \"KeyValueList\",\n \"Label\",\n \"Landing\",\n \"LayerChart\",\n \"Lightbox\",\n \"LightboxContent\",\n \"LightboxContext\",\n \"LightboxTrigger\",\n \"LoginForm\",\n \"Marquee\",\n \"MarqueeBandRenderer\",\n \"MatrixCell\",\n \"MatrixTable\",\n \"MatrixTableInner\",\n \"Menubar\",\n \"MenubarCheckboxItem\",\n \"MenubarContent\",\n \"MenubarGroup\",\n \"MenubarItem\",\n \"MenubarLabel\",\n \"MenubarMenu\",\n \"MenubarRadioGroup\",\n \"MenubarRadioItem\",\n \"MenubarSeparator\",\n \"MenubarShortcut\",\n \"MenubarSub\",\n \"MenubarSubContent\",\n \"MenubarSubTrigger\",\n \"MenubarTrigger\",\n \"Meter\",\n \"MonthCalendar\",\n \"MotionDuration\",\n \"MotionDurationSection\",\n \"MotionEasing\",\n \"MotionEasingSection\",\n \"MotionSlide\",\n \"NameRoster\",\n \"NameRosterItem\",\n \"Navbar\",\n \"NavbarBrand\",\n \"NavbarContent\",\n \"NavbarItem\",\n \"NavbarLink\",\n \"NavbarToggle\",\n \"NumberInput\",\n \"OfflineBanner\",\n \"OpacityBar\",\n \"OpacitySlide\",\n \"OTPInput\",\n \"PageHeader\",\n \"Pagination\",\n \"PaginationContent\",\n \"PaginationEllipsis\",\n \"PaginationItem\",\n \"PaginationLink\",\n \"PaginationNext\",\n \"PaginationPrevious\",\n \"PasswordInput\",\n \"PhoneInput\",\n \"PhotoPicker\",\n \"PlatformChip\",\n \"Popover\",\n \"PopoverAnchor\",\n \"PopoverContent\",\n \"PopoverFooter\",\n \"PopoverSelectionItem\",\n \"PopoverSelectionLabel\",\n \"PopoverSelectionList\",\n \"PopoverTrigger\",\n \"PositionPicker\",\n \"PricingSection\",\n \"ProfileMenu\",\n \"Progress\",\n \"ProportionBar\",\n \"PrototypeReview\",\n \"QuickActions\",\n \"RadioGroup\",\n \"RadioGroupItem\",\n \"RadioGroupVariantContext\",\n \"RadiusScale\",\n \"RadiusSection\",\n \"RadiusSlide\",\n \"RecordSection\",\n \"ResizableSplit\",\n \"RightRailList\",\n \"SaveStatus\",\n \"ScoreIndicator\",\n \"ScrollArea\",\n \"ScrollBar\",\n \"SearchInput\",\n \"SectionHeader\",\n \"SectionIntro\",\n \"SectionNav\",\n \"SectionNavItem\",\n \"SegmentedControl\",\n \"SegmentedProgress\",\n \"Select\",\n \"SelectContent\",\n \"SelectGroup\",\n \"SelectionListContext\",\n \"SelectItem\",\n \"SelectLabel\",\n \"SelectScrollDownButton\",\n \"SelectScrollUpButton\",\n \"SelectSeparator\",\n \"SelectTrigger\",\n \"SelectValue\",\n \"SemanticColorGrid\",\n \"SemanticColorItem\",\n \"SemanticTokensSlide\",\n \"SensitivePanel\",\n \"Separator\",\n \"SessionTimeout\",\n \"ShadowSection\",\n \"Sheet\",\n \"SheetClose\",\n \"SheetContent\",\n \"SheetContext\",\n \"SheetDescription\",\n \"SheetFooter\",\n \"SheetHeader\",\n \"SheetOverlay\",\n \"SheetPortal\",\n \"SheetScrim\",\n \"SheetTitle\",\n \"SheetTrigger\",\n \"Sidebar\",\n \"SidebarContent\",\n \"SidebarContext\",\n \"SidebarFooter\",\n \"SidebarGroup\",\n \"SidebarGroupAction\",\n \"SidebarGroupContent\",\n \"SidebarGroupLabel\",\n \"SidebarHeader\",\n \"SidebarInset\",\n \"SidebarMenu\",\n \"SidebarMenuAction\",\n \"SidebarMenuBadge\",\n \"SidebarMenuButton\",\n \"SidebarMenuItem\",\n \"SidebarMenuSub\",\n \"SidebarMenuSubButton\",\n \"SidebarMenuSubItem\",\n \"SidebarProvider\",\n \"SidebarRail\",\n \"SidebarScopeContext\",\n \"SidebarSeparator\",\n \"SidebarTrigger\",\n \"Skeleton\",\n \"SkeletonDetail\",\n \"SkeletonList\",\n \"SkeletonTable\",\n \"Slide\",\n \"SlideHeader\",\n \"Slider\",\n \"SliderControl\",\n \"SlideThemeContext\",\n \"SlideThemeProvider\",\n \"SlowNetworkBar\",\n \"SourceInspector\",\n \"SourceInspectorContext\",\n \"SourceInspectorDevImpl\",\n \"SourceInspectorProvider\",\n \"SourceInspectorRunner\",\n \"SourceInspectorToggle\",\n \"SpacingScale\",\n \"SpacingSection\",\n \"SpacingSlide\",\n \"SpanStrip\",\n \"Sparkline\",\n \"SpecimenCard\",\n \"SpecimenCardFooter\",\n \"Sphere\",\n \"SpherePlayground\",\n \"Spinner\",\n \"SpinnerOrb\",\n \"Stack\",\n \"Stage\",\n \"StatCard\",\n \"StatHero\",\n \"StationSpectrum\",\n \"StatusBadge\",\n \"StatusColorsSlide\",\n \"StatusDot\",\n \"Stepper\",\n \"StepperContext\",\n \"StepperDescription\",\n \"StepperItem\",\n \"StepperSeparator\",\n \"StepperTitle\",\n \"StepperTrigger\",\n \"StepsSection\",\n \"StructuredPrompt\",\n \"StructuredPromptBody\",\n \"StructuredPromptHeader\",\n \"StructuredPromptHint\",\n \"StructuredPromptSlot\",\n \"SuccessLiveRegion\",\n \"SuccessPanel\",\n \"SurfaceRow\",\n \"SurfaceScaleStack\",\n \"SurfaceSection\",\n \"Switch\",\n \"Table\",\n \"TableBody\",\n \"TableCaption\",\n \"TableCell\",\n \"TableFooter\",\n \"TableHead\",\n \"TableHeader\",\n \"TableRow\",\n \"Tabs\",\n \"TabsContent\",\n \"TabsList\",\n \"TabsTrigger\",\n \"TagInput\",\n \"TestimonialAttribution\",\n \"TestimonialSection\",\n \"Text\",\n \"Textarea\",\n \"ThemeArchitectureSlide\",\n \"ThemeColorsSlide\",\n \"ThemeSwitcher\",\n \"ThemeToggle\",\n \"ThinkingOrb\",\n \"Timeline\",\n \"TimelineContent\",\n \"TimelineDescription\",\n \"TimelineIcon\",\n \"TimelineItem\",\n \"TimelineTimestamp\",\n \"TimelineTitle\",\n \"TimePicker\",\n \"TinInput\",\n \"TitleSlide\",\n \"ToastCard\",\n \"ToastCardStack\",\n \"Toaster\",\n \"TOCSlide\",\n \"ToggleButton\",\n \"ToggleDevImpl\",\n \"ToggleGroup\",\n \"ToggleGroupContext\",\n \"ToggleGroupItem\",\n \"Tooltip\",\n \"TooltipContent\",\n \"TooltipProvider\",\n \"TooltipTrigger\",\n \"TypeBodySlide\",\n \"TypeDisplaySlide\",\n \"TypeScaleStack\",\n \"TypeSpecimen\",\n \"TypographySection\",\n \"Vignette\",\n \"WorkspaceSwitcher\",\n])\n"
5640
+ "content": "// THIS FILE IS GENERATED BY scripts/generate-visor-component-names.ts.\n// Do not edit by hand. Re-run `npm run generate:component-names` after\n// adding, removing, or renaming a Visor component.\n//\n// Source of truth: registry/registry-{ui,blocks,deck,visual,devtools}.ts\n// Used by: components/devtools/source-inspector/* (VI-311)\n\nexport const VISOR_COMPONENT_NAMES: ReadonlySet<string> = new Set([\n \"AccessibilitySection\",\n \"AccessibilitySlide\",\n \"AccessibilitySpecimen\",\n \"Accordion\",\n \"AccordionContent\",\n \"AccordionItem\",\n \"AccordionTrigger\",\n \"ActionRow\",\n \"ActionRowList\",\n \"ActivityFeed\",\n \"ActivityFeedContext\",\n \"ActivityFeedItem\",\n \"ActivityFeedRoot\",\n \"AdminDashboard\",\n \"AdminDetail\",\n \"AdminDetailDrawer\",\n \"AdminListPage\",\n \"AdminListPageInner\",\n \"AdminSettingsPage\",\n \"AdminShell\",\n \"AdminTabbedEditor\",\n \"AdminWizard\",\n \"Alert\",\n \"AlertActions\",\n \"AlertDescription\",\n \"AlertLead\",\n \"AlertTitle\",\n \"AmbientGlow\",\n \"ArrowSwap\",\n \"Avatar\",\n \"AvatarFallback\",\n \"AvatarImage\",\n \"AvatarStack\",\n \"Badge\",\n \"Banner\",\n \"BannerAction\",\n \"BannerDescription\",\n \"BannerTitle\",\n \"BentoGrid\",\n \"BentoTile\",\n \"BentoTileBody\",\n \"BentoTileDescription\",\n \"BentoTileFigure\",\n \"BentoTileHeadline\",\n \"BentoTileMedia\",\n \"BentoTileMeta\",\n \"BentoTileTitle\",\n \"BillingSlider\",\n \"BottomNav\",\n \"Box\",\n \"Breadcrumb\",\n \"BreadcrumbEllipsis\",\n \"BreadcrumbItem\",\n \"BreadcrumbLink\",\n \"BreadcrumbList\",\n \"BreadcrumbPage\",\n \"BreadcrumbSeparator\",\n \"BrowserFrame\",\n \"BulkActionBar\",\n \"Button\",\n \"ButtonSpecimenSection\",\n \"ButtonSpecimenSlide\",\n \"Calendar\",\n \"Capture\",\n \"Card\",\n \"CardContent\",\n \"CardDescription\",\n \"CardFooter\",\n \"CardGrid\",\n \"CardHeader\",\n \"CardIndicatorContext\",\n \"CardLift\",\n \"CardTitle\",\n \"Carousel\",\n \"CarouselContent\",\n \"CarouselContext\",\n \"CarouselGallery\",\n \"CarouselItem\",\n \"CarouselNext\",\n \"CarouselPrevious\",\n \"ChallengeCard\",\n \"ChallengeCardAction\",\n \"ChallengeCardActions\",\n \"ChallengeCardBody\",\n \"ChallengeCardGate\",\n \"ChallengeCardHeader\",\n \"ChartContainer\",\n \"ChartContext\",\n \"ChartLegend\",\n \"ChartLegendContent\",\n \"ChartStyle\",\n \"ChartTooltip\",\n \"ChartTooltipContent\",\n \"Checkbox\",\n \"CheckGroup\",\n \"CheckRow\",\n \"Chip\",\n \"ChipGroup\",\n \"ChipGroupContext\",\n \"ChipGroupItem\",\n \"ChoiceChip\",\n \"ChromeButton\",\n \"ClosingSlide\",\n \"CodeBlock\",\n \"Collapsible\",\n \"CollapsibleContent\",\n \"CollapsibleTrigger\",\n \"ColorBar\",\n \"ColorPaletteSection\",\n \"ColorPicker\",\n \"ColorPickerSurface\",\n \"ColorSwatch\",\n \"ColorSwatchGrid\",\n \"Column\",\n \"Combobox\",\n \"ComboboxContent\",\n \"ComboboxContext\",\n \"ComboboxEmpty\",\n \"ComboboxGroup\",\n \"ComboboxInput\",\n \"ComboboxItem\",\n \"ComboboxSeparator\",\n \"Command\",\n \"CommandDialog\",\n \"CommandEmpty\",\n \"CommandGroup\",\n \"CommandInput\",\n \"CommandItem\",\n \"CommandList\",\n \"CommandLoading\",\n \"CommandSeparator\",\n \"CommandShortcut\",\n \"ComponentShowcaseContent\",\n \"ComponentShowcaseSection\",\n \"ComponentShowcaseSlide\",\n \"Composer\",\n \"ComposerContext\",\n \"ComposerField\",\n \"ComposerSend\",\n \"ComposerSpacer\",\n \"ComposerToolbar\",\n \"ComposerToolButton\",\n \"ConceptSlide\",\n \"ConfigurationPanel\",\n \"ConfirmDialog\",\n \"ConflictBanner\",\n \"Container\",\n \"ContextMenu\",\n \"ContextMenuCheckboxItem\",\n \"ContextMenuContent\",\n \"ContextMenuGroup\",\n \"ContextMenuItem\",\n \"ContextMenuLabel\",\n \"ContextMenuPortal\",\n \"ContextMenuRadioGroup\",\n \"ContextMenuRadioItem\",\n \"ContextMenuSeparator\",\n \"ContextMenuShortcut\",\n \"ContextMenuSub\",\n \"ContextMenuSubContent\",\n \"ContextMenuSubTrigger\",\n \"ContextMenuTrigger\",\n \"Controls\",\n \"CtaSection\",\n \"DataTable\",\n \"DataTableInner\",\n \"DatePicker\",\n \"DateRangePicker\",\n \"DeckContext\",\n \"DeckFooter\",\n \"DeckLayout\",\n \"DeckProvider\",\n \"DeckRenderer\",\n \"DesignSystemDeck\",\n \"DesignSystemSpecimen\",\n \"Dialog\",\n \"DialogBack\",\n \"DialogClose\",\n \"DialogContent\",\n \"DialogContext\",\n \"DialogDescription\",\n \"DialogField\",\n \"DialogFieldControl\",\n \"DialogFieldLabel\",\n \"DialogFooter\",\n \"DialogForm\",\n \"DialogFormBody\",\n \"DialogFormClose\",\n \"DialogFormContent\",\n \"DialogFormDescription\",\n \"DialogFormFooter\",\n \"DialogFormHeader\",\n \"DialogFormTitle\",\n \"DialogFormTrigger\",\n \"DialogHeader\",\n \"DialogOverlay\",\n \"DialogPortal\",\n \"DialogScrim\",\n \"DialogTitle\",\n \"DialogTrigger\",\n \"DocFrame\",\n \"DocFrameBrand\",\n \"DocNav\",\n \"DocNavGroup\",\n \"DocNavPill\",\n \"DotNav\",\n \"DropdownMenu\",\n \"DropdownMenuCheckboxItem\",\n \"DropdownMenuContent\",\n \"DropdownMenuGroup\",\n \"DropdownMenuItem\",\n \"DropdownMenuLabel\",\n \"DropdownMenuPortal\",\n \"DropdownMenuRadioGroup\",\n \"DropdownMenuRadioItem\",\n \"DropdownMenuSeparator\",\n \"DropdownMenuShortcut\",\n \"DropdownMenuSub\",\n \"DropdownMenuSubContent\",\n \"DropdownMenuSubTrigger\",\n \"DropdownMenuTrigger\",\n \"EditableBlock\",\n \"ElevationCard\",\n \"ElevationSlide\",\n \"EmptyState\",\n \"ErrorPlacard\",\n \"ExportMenu\",\n \"FeaturesGrid\",\n \"FidelityMirror\",\n \"Field\",\n \"FieldDescription\",\n \"FieldError\",\n \"FieldLabel\",\n \"Fieldset\",\n \"FieldsetLegend\",\n \"FileUpload\",\n \"FilterBar\",\n \"FilterChip\",\n \"FontShowcase\",\n \"FontShowcaseGrid\",\n \"Footer\",\n \"FooterSection\",\n \"Form\",\n \"FormError\",\n \"FormErrorDescription\",\n \"FormErrorTitle\",\n \"FormField\",\n \"FormSpecimenSection\",\n \"FormSpecimenSlide\",\n \"FullscreenOverlay\",\n \"FullscreenOverlayContent\",\n \"FullscreenOverlayTrigger\",\n \"GrainOverlay\",\n \"Grid\",\n \"Header\",\n \"Heading\",\n \"HeroGlow\",\n \"HeroSection\",\n \"HeroSlide\",\n \"HoverCard\",\n \"HoverCardContent\",\n \"HoverCardTrigger\",\n \"IconGrid\",\n \"IconGridSection\",\n \"IconSizeRow\",\n \"IconsSlide\",\n \"Image\",\n \"InfographicBar\",\n \"Inline\",\n \"InlineEdit\",\n \"Input\",\n \"KanbanBoard\",\n \"Kbd\",\n \"KeyValueList\",\n \"Label\",\n \"Landing\",\n \"LayerChart\",\n \"Lightbox\",\n \"LightboxContent\",\n \"LightboxContext\",\n \"LightboxTrigger\",\n \"LoginForm\",\n \"Marquee\",\n \"MarqueeBandRenderer\",\n \"MatrixCell\",\n \"MatrixTable\",\n \"MatrixTableInner\",\n \"Menubar\",\n \"MenubarCheckboxItem\",\n \"MenubarContent\",\n \"MenubarGroup\",\n \"MenubarItem\",\n \"MenubarLabel\",\n \"MenubarMenu\",\n \"MenubarRadioGroup\",\n \"MenubarRadioItem\",\n \"MenubarSeparator\",\n \"MenubarShortcut\",\n \"MenubarSub\",\n \"MenubarSubContent\",\n \"MenubarSubTrigger\",\n \"MenubarTrigger\",\n \"Meter\",\n \"MonthCalendar\",\n \"MotionDuration\",\n \"MotionDurationSection\",\n \"MotionEasing\",\n \"MotionEasingSection\",\n \"MotionSlide\",\n \"NameRoster\",\n \"NameRosterItem\",\n \"Navbar\",\n \"NavbarBrand\",\n \"NavbarContent\",\n \"NavbarItem\",\n \"NavbarLink\",\n \"NavbarToggle\",\n \"NumberInput\",\n \"OfflineBanner\",\n \"OpacityBar\",\n \"OpacitySlide\",\n \"OTPInput\",\n \"PageHeader\",\n \"Pagination\",\n \"PaginationContent\",\n \"PaginationEllipsis\",\n \"PaginationItem\",\n \"PaginationLink\",\n \"PaginationNext\",\n \"PaginationPrevious\",\n \"PasswordInput\",\n \"PhoneInput\",\n \"PhotoPicker\",\n \"PlatformChip\",\n \"Popover\",\n \"PopoverAnchor\",\n \"PopoverContent\",\n \"PopoverFooter\",\n \"PopoverSelectionItem\",\n \"PopoverSelectionLabel\",\n \"PopoverSelectionList\",\n \"PopoverTrigger\",\n \"PositionPicker\",\n \"PricingSection\",\n \"ProfileMenu\",\n \"Progress\",\n \"ProportionBar\",\n \"PrototypeReview\",\n \"QuickActions\",\n \"RadioGroup\",\n \"RadioGroupItem\",\n \"RadioGroupVariantContext\",\n \"RadiusScale\",\n \"RadiusSection\",\n \"RadiusSlide\",\n \"RecordSection\",\n \"ResizableSplit\",\n \"RightRailList\",\n \"SaveStatus\",\n \"ScoreIndicator\",\n \"ScrollArea\",\n \"ScrollBar\",\n \"SearchInput\",\n \"SectionHeader\",\n \"SectionIntro\",\n \"SectionNav\",\n \"SectionNavItem\",\n \"SegmentedControl\",\n \"SegmentedProgress\",\n \"Select\",\n \"SelectContent\",\n \"SelectGroup\",\n \"SelectionListContext\",\n \"SelectItem\",\n \"SelectLabel\",\n \"SelectScrollDownButton\",\n \"SelectScrollUpButton\",\n \"SelectSeparator\",\n \"SelectTrigger\",\n \"SelectValue\",\n \"SemanticColorGrid\",\n \"SemanticColorItem\",\n \"SemanticTokensSlide\",\n \"SensitivePanel\",\n \"Separator\",\n \"SessionTimeout\",\n \"ShadowSection\",\n \"Sheet\",\n \"SheetClose\",\n \"SheetContent\",\n \"SheetContext\",\n \"SheetDescription\",\n \"SheetFooter\",\n \"SheetHeader\",\n \"SheetOverlay\",\n \"SheetPortal\",\n \"SheetScrim\",\n \"SheetTitle\",\n \"SheetTrigger\",\n \"Sidebar\",\n \"SidebarContent\",\n \"SidebarContext\",\n \"SidebarFooter\",\n \"SidebarGroup\",\n \"SidebarGroupAction\",\n \"SidebarGroupContent\",\n \"SidebarGroupLabel\",\n \"SidebarHeader\",\n \"SidebarInset\",\n \"SidebarMenu\",\n \"SidebarMenuAction\",\n \"SidebarMenuBadge\",\n \"SidebarMenuButton\",\n \"SidebarMenuItem\",\n \"SidebarMenuSub\",\n \"SidebarMenuSubButton\",\n \"SidebarMenuSubItem\",\n \"SidebarProvider\",\n \"SidebarRail\",\n \"SidebarScopeContext\",\n \"SidebarSeparator\",\n \"SidebarTrigger\",\n \"Skeleton\",\n \"SkeletonDetail\",\n \"SkeletonList\",\n \"SkeletonTable\",\n \"Slide\",\n \"SlideHeader\",\n \"Slider\",\n \"SliderControl\",\n \"SlideThemeContext\",\n \"SlideThemeProvider\",\n \"SlowNetworkBar\",\n \"SourceInspector\",\n \"SourceInspectorContext\",\n \"SourceInspectorDevImpl\",\n \"SourceInspectorProvider\",\n \"SourceInspectorRunner\",\n \"SourceInspectorToggle\",\n \"SpacingScale\",\n \"SpacingSection\",\n \"SpacingSlide\",\n \"SpanStrip\",\n \"Sparkline\",\n \"SpecimenCard\",\n \"SpecimenCardFooter\",\n \"Sphere\",\n \"SpherePlayground\",\n \"Spinner\",\n \"SpinnerOrb\",\n \"Stack\",\n \"Stage\",\n \"StatCard\",\n \"StatHero\",\n \"StationSpectrum\",\n \"StatusBadge\",\n \"StatusColorsSlide\",\n \"StatusDot\",\n \"Stepper\",\n \"StepperContext\",\n \"StepperDescription\",\n \"StepperItem\",\n \"StepperSeparator\",\n \"StepperTitle\",\n \"StepperTrigger\",\n \"StepsSection\",\n \"StructuredPrompt\",\n \"StructuredPromptBody\",\n \"StructuredPromptHeader\",\n \"StructuredPromptHint\",\n \"StructuredPromptSlot\",\n \"SuccessLiveRegion\",\n \"SuccessPanel\",\n \"SurfaceRow\",\n \"SurfaceScaleStack\",\n \"SurfaceSection\",\n \"Switch\",\n \"Table\",\n \"TableBody\",\n \"TableCaption\",\n \"TableCell\",\n \"TableFooter\",\n \"TableHead\",\n \"TableHeader\",\n \"TableRow\",\n \"Tabs\",\n \"TabsContent\",\n \"TabsList\",\n \"TabsTrigger\",\n \"TagInput\",\n \"TestimonialAttribution\",\n \"TestimonialSection\",\n \"Text\",\n \"Textarea\",\n \"ThemeArchitectureSlide\",\n \"ThemeColorsSlide\",\n \"ThemeSwitcher\",\n \"ThemeToggle\",\n \"ThinkingOrb\",\n \"Timeline\",\n \"TimelineContent\",\n \"TimelineDescription\",\n \"TimelineIcon\",\n \"TimelineItem\",\n \"TimelineTimestamp\",\n \"TimelineTitle\",\n \"TimePicker\",\n \"TinInput\",\n \"TitleSlide\",\n \"ToastCard\",\n \"ToastCardStack\",\n \"Toaster\",\n \"TOCSlide\",\n \"ToggleButton\",\n \"ToggleDevImpl\",\n \"ToggleGroup\",\n \"ToggleGroupContext\",\n \"ToggleGroupItem\",\n \"Tooltip\",\n \"TooltipContent\",\n \"TooltipProvider\",\n \"TooltipTrigger\",\n \"TypeBodySlide\",\n \"TypeDisplaySlide\",\n \"TypeScaleStack\",\n \"TypeSpecimen\",\n \"TypographySection\",\n \"Vignette\",\n \"WorkspaceSwitcher\",\n])\n"
5640
5641
  }
5641
5642
  ]
5642
5643
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "0.4.0",
3
- "generated_at": "2026-11-20T04:46:19.501Z",
3
+ "generated_at": "2026-11-20T22:31:25.696Z",
4
4
  "components": {
5
5
  "accessibility-specimen": {
6
6
  "category": "specimen",
@@ -1424,7 +1424,8 @@
1424
1424
  "secondary",
1425
1425
  "outline",
1426
1426
  "ghost",
1427
- "destructive"
1427
+ "destructive",
1428
+ "glass"
1428
1429
  ],
1429
1430
  "size": [
1430
1431
  "sm",
@@ -1437,9 +1438,9 @@
1437
1438
  "props": [
1438
1439
  {
1439
1440
  "name": "variant",
1440
- "type": "'default' | 'hero' | 'secondary' | 'outline' | 'ghost' | 'destructive'",
1441
+ "type": "'default' | 'hero' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'glass'",
1441
1442
  "default": "default",
1442
- "description": "`hero` is the solid face for special moments. Unset it renders as `default`; a theme sets its own fill and ink with `components.button.hero-bg` / `hero-text`.\n"
1443
+ "description": "`hero` is the solid face for special moments. Unset it renders as `default`; a theme sets its own fill and ink with `components.button.hero-bg` / `hero-text`. `glass` is a solid ringed control on a plain page and turns to glass (the glass layer's control fill, ring, ink and blur) under `data-glass=\"on\"`. Pair it with `size=\"icon\"` and `components.button.icon-radius: 999px` for a round glass icon button.\n"
1443
1444
  },
1444
1445
  {
1445
1446
  "name": "size",
@@ -1496,15 +1497,19 @@
1496
1497
  }
1497
1498
  ],
1498
1499
  "dependencies": [
1500
+ "@phosphor-icons/react",
1499
1501
  "class-variance-authority",
1500
1502
  "@radix-ui/react-tooltip"
1501
1503
  ],
1502
1504
  "tokens_used": [
1505
+ "--_button-swap",
1503
1506
  "--border-default",
1504
1507
  "--border-focus",
1505
1508
  "--border-strong",
1506
1509
  "--button-default-bg",
1507
1510
  "--button-default-bg-hover",
1511
+ "--button-default-shadow",
1512
+ "--button-default-shadow-hover",
1508
1513
  "--button-default-text",
1509
1514
  "--button-dlg-destructive-bg",
1510
1515
  "--button-dlg-destructive-bg-hover",
@@ -1521,6 +1526,7 @@
1521
1526
  "--button-hero-bg",
1522
1527
  "--button-hero-bg-hover",
1523
1528
  "--button-hero-text",
1529
+ "--button-hover-scale",
1524
1530
  "--button-icon-gap",
1525
1531
  "--button-icon-ghost-color",
1526
1532
  "--button-icon-pad",
@@ -1529,7 +1535,9 @@
1529
1535
  "--button-letter-spacing",
1530
1536
  "--button-lg-font-size",
1531
1537
  "--button-lg-font-weight",
1538
+ "--button-lg-height",
1532
1539
  "--button-lg-letter-spacing",
1540
+ "--button-lg-padding",
1533
1541
  "--button-lg-radius",
1534
1542
  "--button-lg-text-transform",
1535
1543
  "--button-md-font-size",
@@ -1539,6 +1547,13 @@
1539
1547
  "--button-md-padding",
1540
1548
  "--button-md-radius",
1541
1549
  "--button-md-text-transform",
1550
+ "--button-motion-duration",
1551
+ "--button-motion-easing",
1552
+ "--button-outline-bg-hover",
1553
+ "--button-outline-text",
1554
+ "--button-press-duration",
1555
+ "--button-press-scale",
1556
+ "--button-press-transform",
1542
1557
  "--button-radius",
1543
1558
  "--button-sm-font-size",
1544
1559
  "--button-sm-font-weight",
@@ -1558,6 +1573,11 @@
1558
1573
  "--font-size-xs",
1559
1574
  "--font-weight-medium",
1560
1575
  "--font-weight-semibold",
1576
+ "--glass-on-control-blur",
1577
+ "--glass-on-control-fill",
1578
+ "--glass-on-control-hover-fill",
1579
+ "--glass-on-control-ink",
1580
+ "--glass-on-control-ring",
1561
1581
  "--hairline",
1562
1582
  "--interactive-destructive-bg",
1563
1583
  "--interactive-destructive-bg-hover",
@@ -1581,6 +1601,7 @@
1581
1601
  "--spacing-3",
1582
1602
  "--spacing-4",
1583
1603
  "--spacing-6",
1604
+ "--stroke-width-thin",
1584
1605
  "--surface-card",
1585
1606
  "--surface-error-subtle",
1586
1607
  "--surface-muted",
@@ -1589,7 +1610,7 @@
1589
1610
  "--text-primary",
1590
1611
  "--text-secondary"
1591
1612
  ],
1592
- "example": "<Button variant=\"default\" size=\"md\">Save changes</Button>\n\n<Button variant=\"destructive\">Delete account</Button>\n\n<Button variant=\"ghost\" size=\"sm\">Cancel</Button>\n\n{/* Gated — no reason (tooltip suppressed) */}\n<Button gated>Delete organization</Button>\n\n{/* Pending — geometry held, activation suppressed, aria-busy set */}\n<Button pending={saving}>Save changes</Button>\n\n{/* Pending with a decorative busy label */}\n<Button pending={saving} pendingLabel=\"Saving…\">Save changes</Button>\n\n {/* Gated with reason — tooltip shown on hover/focus */}\n<TooltipProvider>\n <Button gated gatedReason=\"You can't delete this — you're not an owner\">\n Delete organization\n </Button>\n</TooltipProvider>\n"
1613
+ "example": "<Button variant=\"default\" size=\"md\">Save changes</Button>\n\n<Button variant=\"destructive\">Delete account</Button>\n\n<Button variant=\"ghost\" size=\"sm\">Cancel</Button>\n\n{/* Pill with an arrow swap, and a round glass icon button */}\n<Button size=\"lg\">Continue <ArrowSwap /></Button>\n<Button variant=\"glass\" size=\"icon\" aria-label=\"Back\"><ArrowSwap direction=\"left\" /></Button>\n\n{/* Gated — no reason (tooltip suppressed) */}\n<Button gated>Delete organization</Button>\n\n{/* Pending — geometry held, activation suppressed, aria-busy set */}\n<Button pending={saving}>Save changes</Button>\n\n{/* Pending with a decorative busy label */}\n<Button pending={saving} pendingLabel=\"Saving…\">Save changes</Button>\n\n {/* Gated with reason — tooltip shown on hover/focus */}\n<TooltipProvider>\n <Button gated gatedReason=\"You can't delete this — you're not an owner\">\n Delete organization\n </Button>\n</TooltipProvider>\n"
1593
1614
  },
1594
1615
  "calendar": {
1595
1616
  "category": "form",
@@ -7173,13 +7194,30 @@
7173
7194
  "--font-ascent",
7174
7195
  "--font-descent",
7175
7196
  "--font-size-sm",
7197
+ "--glass-on-control-blur",
7198
+ "--glass-on-control-fill",
7199
+ "--glass-on-control-hover-fill",
7200
+ "--glass-on-control-ink",
7201
+ "--glass-on-control-ring",
7176
7202
  "--input-affix-color",
7177
7203
  "--input-affix-gap",
7178
7204
  "--input-nudge",
7179
7205
  "--motion-duration-150",
7180
7206
  "--motion-easing-default",
7181
7207
  "--number-input-bg",
7208
+ "--number-input-bg-focus",
7182
7209
  "--number-input-border",
7210
+ "--number-input-button-color",
7211
+ "--number-input-button-hover-bg",
7212
+ "--number-input-button-inset",
7213
+ "--number-input-button-radius",
7214
+ "--number-input-button-size",
7215
+ "--number-input-height",
7216
+ "--number-input-icon-size",
7217
+ "--number-input-radius",
7218
+ "--number-input-value-font-size",
7219
+ "--number-input-value-font-weight",
7220
+ "--number-input-value-width",
7183
7221
  "--radius-md",
7184
7222
  "--spacing-2",
7185
7223
  "--surface-interactive-default",
@@ -10140,10 +10178,11 @@
10140
10178
  },
10141
10179
  "spinner": {
10142
10180
  "category": "data-display",
10143
- "description": "Loading spinner — an inline rotating border ring, or a dotted thinking-orb (nine animations) for waits over larger surfaces. Three sizes (xs/sm/md), two tones (default/primary), and full reduced-motion support.",
10181
+ "description": "Loading spinner — an inline rotating border ring, or a dotted thinking-orb (nine animations) for waits over larger surfaces. Three sizes (xs/sm/md), two tones (default/primary), optional visible words, an opt-in delay so quick loads never flash it, and full reduced-motion support.",
10144
10182
  "when_to_use": [
10145
10183
  "Indicating an async operation is in progress within a button, form field, or inline context",
10146
10184
  "Replacing text or an icon while content is loading (inline, non-blocking)",
10185
+ "A page or card still loading that may finish fast — set delay (e.g. 600) and showLabel so a quick load never flashes the spinner",
10147
10186
  "Decorative loading affordance inside a card or panel where a full-page skeleton would be too heavy",
10148
10187
  "A wait over a large visual (a card re-rendering under a scrim, an agent thinking) — use variant=\"orb\" at md (64px)"
10149
10188
  ],
@@ -10196,6 +10235,17 @@
10196
10235
  "name": "label",
10197
10236
  "type": "string",
10198
10237
  "description": "Accessible label. When provided, renders role=\"status\" with visually-hidden text. When omitted, aria-hidden=\"true\" (decorative)."
10238
+ },
10239
+ {
10240
+ "name": "showLabel",
10241
+ "type": "boolean",
10242
+ "default": "false",
10243
+ "description": "Show the label as visible words beside the spinner. The spinner and the words sit in one role=\"status\" wrapper, and delay fades both. The words read --spinner-label-color (falls back to --text-secondary)."
10244
+ },
10245
+ {
10246
+ "name": "delay",
10247
+ "type": "number",
10248
+ "description": "Milliseconds to wait before fading in, so a quick load never flashes the spinner. A CSS animation-delay, so server and client markup match. Omit for no delay."
10199
10249
  }
10200
10250
  ],
10201
10251
  "dependencies": [
@@ -10205,12 +10255,23 @@
10205
10255
  ],
10206
10256
  "tokens_used": [
10207
10257
  "--border-default",
10258
+ "--font-size-sm",
10259
+ "--font-weight-medium",
10208
10260
  "--motion-duration-1500",
10261
+ "--motion-duration-500",
10262
+ "--motion-easing-ease-out",
10209
10263
  "--motion-easing-linear",
10210
10264
  "--primary",
10211
10265
  "--radius-full",
10266
+ "--spacing-2",
10267
+ "--spinner-appear-duration",
10268
+ "--spinner-delay",
10212
10269
  "--spinner-duration",
10213
10270
  "--spinner-edge-color",
10271
+ "--spinner-label-color",
10272
+ "--spinner-label-font-size",
10273
+ "--spinner-label-font-weight",
10274
+ "--spinner-label-gap",
10214
10275
  "--spinner-md-border-width",
10215
10276
  "--spinner-md-size",
10216
10277
  "--spinner-primary-edge-color",
@@ -10223,9 +10284,10 @@
10223
10284
  "--stroke-width-medium",
10224
10285
  "--stroke-width-regular",
10225
10286
  "--stroke-width-thin",
10287
+ "--text-secondary",
10226
10288
  "--text-tertiary"
10227
10289
  ],
10228
- "example": "<Spinner />\n<Spinner size=\"xs\" tone=\"primary\" />\n<Spinner size=\"sm\" label=\"Loading results…\" />\n<Spinner variant=\"orb\" orb=\"working\" label=\"Rendering preview…\" />\n"
10290
+ "example": "<Spinner />\n<Spinner size=\"xs\" tone=\"primary\" />\n<Spinner size=\"sm\" label=\"Loading results…\" />\n<Spinner variant=\"orb\" orb=\"working\" label=\"Rendering preview…\" />\n<Spinner label=\"Loading your form\" showLabel delay={600} />\n"
10229
10291
  },
10230
10292
  "stack": {
10231
10293
  "category": "layout",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loworbitstudio/visor",
3
- "version": "1.55.0",
3
+ "version": "1.57.0",
4
4
  "description": "CLI for the Visor design system — add components, hooks, and utilities to your project.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -46,7 +46,7 @@
46
46
  "dependencies": {
47
47
  "@aws-sdk/client-s3": "^3.1021.0",
48
48
  "@babel/parser": "^7.26.0",
49
- "@loworbitstudio/visor-theme-engine": "^0.41.0",
49
+ "@loworbitstudio/visor-theme-engine": "^0.43.0",
50
50
  "commander": "^13.1.0",
51
51
  "diff": "^8.0.4",
52
52
  "picocolors": "^1.1.1",