@loworbitstudio/visor 1.42.0 → 1.43.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-10-29T22:45:48.368Z",
3
+ "generated_at": "2026-11-06T22:58:11.732Z",
4
4
  "components": {
5
5
  "accessibility-specimen": {
6
6
  "changeType": "current",
package/dist/index.js CHANGED
@@ -9071,6 +9071,7 @@ var FIXTURES = {
9071
9071
  props: `{ gated: true, children: "Upgrade" }`
9072
9072
  },
9073
9073
  // Type tokens (VI-656): one fixture per size, plus the dlg outline face.
9074
+ hero: { export: "Button", interactiveTarget: "button", props: `{ variant: "hero", children: "Send invoice" }` },
9074
9075
  sm: { export: "Button", interactiveTarget: "button", props: `{ size: "sm", children: "Small" }` },
9075
9076
  lg: { export: "Button", interactiveTarget: "button", props: `{ size: "lg", children: "Large" }` },
9076
9077
  dlg: { export: "Button", interactiveTarget: "button", props: `{ size: "dlg", children: "Save" }` },
@@ -9477,6 +9478,11 @@ var FIXTURES = {
9477
9478
  export: "TagInput",
9478
9479
  interactiveTarget: "input",
9479
9480
  props: `{ defaultValue: ["design", "tokens"], placeholder: "Add a tag", entryAs: "slot" }`
9481
+ },
9482
+ invalid: {
9483
+ export: "TagInput",
9484
+ interactiveTarget: "input",
9485
+ props: `{ defaultValue: ["design"], "aria-invalid": true }`
9480
9486
  }
9481
9487
  },
9482
9488
  chip: {
@@ -162,18 +162,19 @@
162
162
  ],
163
163
  "registryDependencies": [
164
164
  "utils",
165
- "spinner"
165
+ "spinner",
166
+ "tooltip"
166
167
  ],
167
168
  "files": [
168
169
  {
169
170
  "path": "components/ui/button/button.tsx",
170
171
  "type": "registry:ui",
171
- "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 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 return React.Children.map(children, (child) =>\n typeof child === \"string\" || typeof child === \"number\" ? (\n <span className={styles.label} data-slot=\"button-text\">\n {child}\n </span>\n ) : (\n child\n )\n )\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"
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 return React.Children.map(children, (child) =>\n typeof child === \"string\" || typeof child === \"number\" ? (\n <span className={styles.label} data-slot=\"button-text\">\n {child}\n </span>\n ) : (\n child\n )\n )\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"
172
173
  },
173
174
  {
174
175
  "path": "components/ui/button/button.module.css",
175
176
  "type": "registry:ui",
176
- "content": "/* Button base styles */\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n 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(--interactive-primary-bg, var(--primary, #111827));\n color: 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(--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(--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 }\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(--label-box-height);\n 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(--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(--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(--surface-error-subtle, color-mix(in srgb, var(--destructive, #ef4444) 8%, transparent));\n color: var(--text-error, var(--destructive, #b91c1c));\n}\n\n@media (hover: hover) {\n .sizeDlg.variantDestructive:hover {\n background-color: 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"
177
+ "content": "/* Button base styles */\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n 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(--surface-error-subtle, color-mix(in srgb, var(--destructive, #ef4444) 8%, transparent));\n color: var(--text-error, var(--destructive, #b91c1c));\n}\n\n@media (hover: hover) {\n .sizeDlg.variantDestructive:hover {\n background-color: 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"
177
178
  }
178
179
  ]
179
180
  },
@@ -224,7 +225,7 @@
224
225
  {
225
226
  "path": "components/ui/input/input.module.css",
226
227
  "type": "registry:ui",
227
- "content": "/* Input base styles */\n.base {\n width: 100%;\n min-width: 0;\n /* VI-655: the border only holds box geometry and is always transparent. The\n visible resting edge is an outline pulled inside the box, drawn from the\n shared --control-edge-* tokens, so --control-edge-width: 0 on any ancestor\n removes it with no layout shift. --input-border stays the per-component\n colour override and still wins over the shared colour. */\n border: 1px solid transparent;\n /* --field-control-bg is the shared \"what surface does a form control sit on\"\n role. It defaults to var(--input-bg), so default inputs are unchanged. A\n form context (for example an in-dialog wrapper) can set --field-control-bg:\n var(--surface-subtle) to lift controls onto a different surface without a\n per-component prop. Under data-density=\"editorial\", the fallback chain\n defaults to var(--surface-card) while still honoring any scoped\n --field-control-bg override from a form context. */\n background-color: var(--field-control-bg, var(--input-bg, var(--surface-interactive-default, #f9fafb)));\n line-height: 1.5;\n color: var(--text-primary, #111827);\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--input-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n}\n\n:global([data-density=\"editorial\"]) .base {\n background-color: var(--field-control-bg, var(--surface-card));\n}\n\n.base::placeholder {\n color: var(--input-placeholder-color, var(--text-secondary, #9ca3af));\n}\n\n@media (hover: hover) {\n .base:hover:not(:focus-visible):not(:disabled):not([aria-invalid=\"true\"]) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n/* Focus and invalid draw at --control-state-edge-width, which the edge switch\n does not touch, so both stay visible with edges off. */\n.base:focus-visible {\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.base:disabled {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.base[aria-invalid=\"true\"] {\n outline-color: transparent;\n background-color: var(--input-bg-invalid, var(--surface-error-subtle, color-mix(in srgb, var(--border-error, #ef4444) 6%, var(--field-control-bg, var(--input-bg, #f9fafb)))));\n /* VI-663: the ring and halo widths are theme keys. Unset, the halo is 0px\n wide and paints nothing, so the look is the 1.5px inset ring alone. */\n box-shadow: inset 0 0 0 var(--control-invalid-ring-width, 1.5px) var(--border-error, #ef4444),\n 0 0 0 var(--control-invalid-halo-width, 0px) color-mix(in srgb, var(--border-error, #ef4444) 15%, transparent);\n}\n\n:global([data-density=\"editorial\"]) .base[aria-invalid=\"true\"] {\n background-color: var(--input-bg-invalid, var(--surface-error-subtle, color-mix(in srgb, var(--border-error, #ef4444) 6%, var(--field-control-bg, var(--surface-card)))));\n}\n\n.base[aria-invalid=\"true\"]:focus-visible {\n outline-color: transparent;\n outline-offset: var(--focus-ring-offset, 2px);\n box-shadow: inset 0 0 0 var(--control-invalid-ring-width, 1.5px) var(--border-error, #ef4444),\n 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-error, #ef4444) 30%, transparent);\n}\n\n/* File input styles */\n.base[type=\"file\"] {\n font-size: var(--font-size-sm, 0.875rem);\n}\n\n/* Leading-icon wrapper\n *\n * When the consumer passes a leadingIcon node, Input wraps its <input> in a\n * <span> and positions the icon absolutely inside it. The <input> itself\n * picks up .hasLeadingIcon, which adds enough left padding to clear the\n * icon (sized in em so it scales with the field's font-size). */\n.leadingIconWrapper {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-width: 0;\n}\n\n.leadingIcon {\n position: absolute;\n left: var(--spacing-3, 0.75rem);\n top: 50%;\n transform: translateY(-50%);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--text-secondary, #9ca3af);\n pointer-events: none;\n font-size: 1.125em;\n line-height: 1;\n}\n\n/* Size variants\n *\n * Default rendering uses canonical values directly. Under data-density=\"editorial\"\n * (set on any ancestor), the editorial density axis bakes in the blessed admin\n * values — sm inputs at 33.5px height with --radius-md corners. Padding and the\n * md/lg sizes are not driven by the editorial treatment and remain canonical. */\n.sizeSm {\n height: 2.25rem;\n padding: var(--input-padding-sm, var(--spacing-1, 0.25rem) var(--spacing-3, 0.75rem));\n font-size: var(--font-size-sm, 0.875rem);\n border-radius: var(--radius-sm, 0.25rem);\n}\n\n:global([data-density=\"editorial\"]) .sizeSm {\n height: 33.5px;\n border-radius: var(--radius-md);\n}\n\n.sizeMd {\n height: var(--input-md-height, var(--input-height-md, auto));\n padding: var(--input-md-padding, var(--input-padding-md, var(--spacing-3_5, 0.875rem) var(--spacing-4, 1rem)));\n font-size: var(--font-size-sm, 0.875rem);\n border-radius: var(--input-md-radius, var(--input-radius-md, var(--radius-sm, 0.5rem)));\n}\n\n.sizeLg {\n height: var(--input-height-lg, auto);\n padding: var(--input-padding-lg, var(--spacing-4_5, 1.125rem) var(--spacing-5, 1.25rem));\n font-size: var(--font-size-base, 1rem);\n border-radius: var(--input-radius-lg, var(--radius-sm, 0.5rem));\n}\n\n/* Baseline nudge (VI-684). A native <input> cannot be trimmed to its capital\n band without clipping descenders and accents, so its capitals sit wherever the\n font's line box puts them: half a line above the box centre plus (ascent -\n descent) / 2, with ascent and descent each rounded to a whole px, and then the\n baseline snapped to a whole CSS px (Blink). Both depend on the font, so no one\n constant centres every face. The theme engine publishes the body face's\n ascent and descent as unitless em ratios (--font-ascent, --font-descent); the\n box height H is known, so the ideal baseline (H + 1cap) / 2 and the one the\n font produces can both be written out. --input-nudge is the gap between the\n nearest whole px to the ideal and the baseline the font produces; moving that\n much padding from the bottom edge to the top lands the snapped baseline on the\n whole px nearest the ideal, within half a px of centre in any font. padding-top\n plus padding-bottom is unchanged, so the box is exactly as tall as before. A\n theme that sets --input-padding-* (or the theme key md-padding) replaces it, as before; a face the engine has\n no metrics for gets no nudge (the var() fallback is 0px).\n Blink only: WebKit places the baseline exactly, so correcting there overshoots\n (-apple-pay-button-style is the WebKit-only probe). */\n@supports (padding-top: round(1.4px, 1px)) and (not (-apple-pay-button-style: black)) {\n .sizeSm {\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 padding: var(--input-padding-sm, calc(var(--spacing-1, 0.25rem) + var(--input-nudge, 0px)) var(--spacing-3, 0.75rem) calc(var(--spacing-1, 0.25rem) - var(--input-nudge, 0px)));\n }\n\n .sizeMd {\n --input-box: calc(2px + 2 * var(--spacing-3_5, 0.875rem) + 1lh);\n --input-nudge: calc(round((var(--input-box) + 1cap) / 2, 1px) - (var(--input-box) + (round(var(--font-ascent) * 1em, 1px) - round(var(--font-descent) * 1em, 1px))) / 2);\n padding: var(--input-md-padding, var(--input-padding-md, calc(var(--spacing-3_5, 0.875rem) + var(--input-nudge, 0px)) var(--spacing-4, 1rem) calc(var(--spacing-3_5, 0.875rem) - var(--input-nudge, 0px))));\n }\n\n .sizeLg {\n --input-box: calc(2px + 2 * var(--spacing-4_5, 1.125rem) + 1lh);\n --input-nudge: calc(round((var(--input-box) + 1cap) / 2, 1px) - (var(--input-box) + (round(var(--font-ascent) * 1em, 1px) - round(var(--font-descent) * 1em, 1px))) / 2);\n padding: var(--input-padding-lg, calc(var(--spacing-4_5, 1.125rem) + var(--input-nudge, 0px)) var(--spacing-5, 1.25rem) calc(var(--spacing-4_5, 1.125rem) - var(--input-nudge, 0px)));\n }\n}\n\n/* Leading-icon left-padding override.\n *\n * Declared AFTER the size variants so the padding-left value wins the\n * cascade against the shorthand `padding` each size sets. Double-class\n * selector bumps specificity above the size classes for good measure. */\n.sizeSm.hasLeadingIcon {\n padding-left: calc(var(--spacing-3, 0.75rem) * 2 + 1.125em);\n}\n\n.sizeMd.hasLeadingIcon {\n padding-left: calc(var(--spacing-4, 1rem) + var(--spacing-3, 0.75rem) + 1.125em);\n}\n\n.sizeLg.hasLeadingIcon {\n padding-left: calc(var(--spacing-5, 1.25rem) + var(--spacing-3, 0.75rem) + 1.125em);\n}\n\n/* Prefix and suffix (VI-662)\n *\n * With an affix the WRAPPER is the well: it draws the one edge, the ground, the\n * radius and the focus and invalid states around the affix and the value\n * together, from the same tokens .base reads. The <input> inside is bare (no\n * edge, no ground) and is a flex item, so its content box starts where the\n * prefix ends and stops where the suffix begins: a value of any length scrolls\n * inside that box and never runs under an affix. The input keeps its 1px\n * transparent geometry border and its size class, so the wrapper is exactly as\n * tall as a plain Input. The edge is the shared --control-edge-* outline (no\n * visible border), so --control-edge-width: 0 removes it here too. */\n.affixWrapper {\n --affix-inset: var(--spacing-4, 1rem);\n --affix-pad-y: var(--spacing-3_5, 0.875rem);\n display: flex;\n align-items: center;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n cursor: text;\n background-color: var(--field-control-bg, var(--input-bg, var(--surface-interactive-default, #f9fafb)));\n color: var(--text-primary, #111827);\n font-size: var(--font-size-sm, 0.875rem);\n line-height: 1.5;\n border-radius: var(--input-radius-md, var(--radius-sm, 0.5rem));\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--input-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n}\n\n.affixSm {\n --affix-pad-y: var(--spacing-1, 0.25rem);\n --affix-inset: var(--spacing-3, 0.75rem);\n border-radius: var(--radius-sm, 0.25rem);\n}\n\n.affixLg {\n --affix-pad-y: var(--spacing-4_5, 1.125rem);\n --affix-inset: var(--spacing-5, 1.25rem);\n font-size: var(--font-size-base, 1rem);\n border-radius: var(--input-radius-lg, var(--radius-sm, 0.5rem));\n}\n\n:global([data-density=\"editorial\"]) .affixWrapper {\n background-color: var(--field-control-bg, var(--surface-card));\n}\n\n:global([data-density=\"editorial\"]) .affixSm {\n border-radius: var(--radius-md);\n}\n\n@media (hover: hover) {\n .affixWrapper:hover:not(:has(> .bare:focus-visible)):not(:has(> .bare:disabled)):not(:has(> .bare[aria-invalid=\"true\"])) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n.affixWrapper:has(> .bare:focus-visible) {\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.affixWrapper:has(> .bare:disabled) {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.affixWrapper:has(> .bare[aria-invalid=\"true\"]) {\n outline-color: transparent;\n background-color: var(--input-bg-invalid, var(--surface-error-subtle, color-mix(in srgb, var(--border-error, #ef4444) 6%, var(--field-control-bg, var(--input-bg, #f9fafb)))));\n box-shadow: inset 0 0 0 1.5px var(--border-error, #ef4444);\n}\n\n:global([data-density=\"editorial\"]) .affixWrapper:has(> .bare[aria-invalid=\"true\"]) {\n background-color: var(--input-bg-invalid, var(--surface-error-subtle, color-mix(in srgb, var(--border-error, #ef4444) 6%, var(--field-control-bg, var(--surface-card)))));\n}\n\n.affixWrapper:has(> .bare[aria-invalid=\"true\"]:focus-visible) {\n outline-color: transparent;\n outline-offset: var(--focus-ring-offset, 2px);\n box-shadow: inset 0 0 0 1.5px var(--border-error, #ef4444),\n 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-error, #ef4444) 30%, transparent);\n}\n\n/* The bare input: the value only. It keeps .base's geometry (width, 1px\n transparent border, line-height, size class) and drops its edge and ground. */\n.bare {\n flex: 1 1 auto;\n width: auto;\n min-width: 0;\n border: 1px solid transparent;\n border-radius: 0;\n background: transparent;\n box-shadow: none;\n outline: none;\n line-height: 1.5;\n color: inherit;\n}\n\n.bare::placeholder {\n color: var(--input-placeholder-color, var(--text-secondary, #9ca3af));\n}\n\n/* The side that meets an affix gives up its padding and border for the gap, so\n the gap is exactly --input-affix-gap. Two classes beat the size class. */\n.bare.afterPrefix {\n padding-left: var(--input-affix-gap, var(--spacing-2, 0.5rem));\n border-left-width: 0;\n}\n\n.bare.beforeSuffix {\n padding-right: var(--input-affix-gap, var(--spacing-2, 0.5rem));\n border-right-width: 0;\n}\n\n.affixIcon {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n margin-left: calc(var(--affix-inset) + 1px);\n color: var(--text-secondary, #9ca3af);\n font-size: 1.125em;\n line-height: 1;\n}\n\n.affixIcon + .affix {\n margin-left: var(--input-affix-gap, var(--spacing-2, 0.5rem));\n}\n\n/* The affix is part of the well, never of the value: it does not shrink, wrap\n or take the selection. The ink is the secondary text colour, retunable with\n --input-affix-color. */\n.affix {\n flex-shrink: 0;\n white-space: nowrap;\n user-select: none;\n color: var(--input-affix-color, var(--text-secondary, #6b7280));\n}\n\n/* The value is nudged by --input-nudge (the VI-684 per-font baseline correction,\n set on .sizeSm / .sizeMd / .sizeLg above from the theme's --font-ascent and\n --font-descent). The affix sits on the same baseline, so the wrapper computes\n the same nudge for the same box and the affix takes it. Blink only, like the\n value's. With no font metrics the nudge falls back to 0px, as the value's does.\n A theme that re-binds --input-padding-* drops the value's nudge; the affix then\n keeps it, which is the one case the two can differ. */\n@supports (padding-top: round(1.4px, 1px)) and (not (-apple-pay-button-style: black)) {\n .affixWrapper {\n --input-box: calc(2px + 2 * var(--spacing-3_5, 0.875rem) + 1lh);\n --input-nudge: calc(round((var(--input-box) + 1cap) / 2, 1px) - (var(--input-box) + (round(var(--font-ascent) * 1em, 1px) - round(var(--font-descent) * 1em, 1px))) / 2);\n }\n\n .affixSm {\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 .affixLg {\n --input-box: calc(2px + 2 * var(--spacing-4_5, 1.125rem) + 1lh);\n --input-nudge: calc(round((var(--input-box) + 1cap) / 2, 1px) - (var(--input-box) + (round(var(--font-ascent) * 1em, 1px) - round(var(--font-descent) * 1em, 1px))) / 2);\n }\n\n /* The affix takes the nudge the way the input does, as padding moved from the\n bottom edge to the top, so its baseline snaps exactly as the value's does. */\n .affix {\n align-self: stretch;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n border-block: 1px solid transparent;\n padding-top: calc(var(--affix-pad-y) + var(--input-nudge, 0px));\n padding-bottom: calc(var(--affix-pad-y) - var(--input-nudge, 0px));\n }\n}\n\n.affix:first-child {\n margin-left: calc(var(--affix-inset) + 1px);\n}\n\n.affix:last-child {\n margin-right: calc(var(--affix-inset) + 1px);\n}\n\n"
228
+ "content": "/* Input base styles */\n.base {\n width: 100%;\n min-width: 0;\n /* VI-655: the border only holds box geometry and is always transparent. The\n visible resting edge is an outline pulled inside the box, drawn from the\n shared --control-edge-* tokens, so --control-edge-width: 0 on any ancestor\n removes it with no layout shift. --input-border stays the per-component\n colour override and still wins over the shared colour. */\n border: 1px solid transparent;\n /* --field-control-bg is the shared \"what surface does a form control sit on\"\n role. It defaults to var(--input-bg), so default inputs are unchanged. A\n form context (for example an in-dialog wrapper) can set --field-control-bg:\n var(--surface-subtle) to lift controls onto a different surface without a\n per-component prop. Under data-density=\"editorial\", the fallback chain\n defaults to var(--surface-card) while still honoring any scoped\n --field-control-bg override from a form context. */\n background-color: var(--field-control-bg, var(--input-bg, var(--surface-interactive-default, #f9fafb)));\n line-height: 1.5;\n color: var(--text-primary, #111827);\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--input-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n}\n\n:global([data-density=\"editorial\"]) .base {\n background-color: var(--field-control-bg, var(--surface-card));\n}\n\n.base::placeholder {\n color: var(--input-placeholder-color, var(--text-secondary, #9ca3af));\n}\n\n@media (hover: hover) {\n .base:hover:not(:focus-visible):not(:disabled):not([aria-invalid=\"true\"]) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n/* Focus and invalid draw at --control-state-edge-width, which the edge switch\n does not touch, so both stay visible with edges off. */\n.base:focus-visible {\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(--control-focus-halo-width, var(--focus-ring-width, 2px)) var(--control-focus-halo-color, color-mix(in srgb, var(--border-focus, #111827) 15%, transparent));\n}\n\n.base:disabled {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.base[aria-invalid=\"true\"] {\n outline-color: transparent;\n background-color: var(--input-bg-invalid, var(--surface-error-subtle, color-mix(in srgb, var(--border-error, #ef4444) 6%, var(--field-control-bg, var(--input-bg, #f9fafb)))));\n /* VI-663: the ring and halo widths are theme keys. Unset, the halo is 0px\n wide and paints nothing, so the look is the 1.5px inset ring alone. */\n box-shadow: inset 0 0 0 var(--control-invalid-ring-width, 1.5px) var(--control-invalid-ring-color, var(--border-error, #ef4444)),\n 0 0 0 var(--control-invalid-halo-width, 0px) var(--control-invalid-halo-color, color-mix(in srgb, var(--border-error, #ef4444) 15%, transparent));\n}\n\n:global([data-density=\"editorial\"]) .base[aria-invalid=\"true\"] {\n background-color: var(--input-bg-invalid, var(--surface-error-subtle, color-mix(in srgb, var(--border-error, #ef4444) 6%, var(--field-control-bg, var(--surface-card)))));\n}\n\n.base[aria-invalid=\"true\"]:focus-visible {\n outline-color: transparent;\n outline-offset: var(--focus-ring-offset, 2px);\n box-shadow: inset 0 0 0 var(--control-invalid-ring-width, 1.5px) var(--control-invalid-ring-color, var(--border-error, #ef4444)),\n 0 0 0 var(--control-focus-halo-width, var(--focus-ring-width, 2px)) var(--control-invalid-halo-color, color-mix(in srgb, var(--border-error, #ef4444) 30%, transparent));\n}\n\n/* File input styles */\n.base[type=\"file\"] {\n font-size: var(--font-size-sm, 0.875rem);\n}\n\n/* Leading-icon wrapper\n *\n * When the consumer passes a leadingIcon node, Input wraps its <input> in a\n * <span> and positions the icon absolutely inside it. The <input> itself\n * picks up .hasLeadingIcon, which adds enough left padding to clear the\n * icon (sized in em so it scales with the field's font-size). */\n.leadingIconWrapper {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-width: 0;\n}\n\n.leadingIcon {\n position: absolute;\n left: var(--spacing-3, 0.75rem);\n top: 50%;\n transform: translateY(-50%);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--text-secondary, #9ca3af);\n pointer-events: none;\n font-size: 1.125em;\n line-height: 1;\n}\n\n/* Size variants\n *\n * Default rendering uses canonical values directly. Under data-density=\"editorial\"\n * (set on any ancestor), the editorial density axis bakes in the blessed admin\n * values — sm inputs at 33.5px height with --radius-md corners. Padding and the\n * md/lg sizes are not driven by the editorial treatment and remain canonical. */\n.sizeSm {\n height: 2.25rem;\n padding: var(--input-padding-sm, var(--spacing-1, 0.25rem) var(--spacing-3, 0.75rem));\n font-size: var(--font-size-sm, 0.875rem);\n border-radius: var(--radius-sm, 0.25rem);\n}\n\n:global([data-density=\"editorial\"]) .sizeSm {\n height: 33.5px;\n border-radius: var(--radius-md);\n}\n\n.sizeMd {\n height: var(--input-md-height, var(--input-height-md, auto));\n padding: var(--input-md-padding, var(--input-padding-md, var(--spacing-3_5, 0.875rem) var(--spacing-4, 1rem)));\n font-size: var(--font-size-sm, 0.875rem);\n border-radius: var(--input-md-radius, var(--input-radius-md, var(--radius-sm, 0.5rem)));\n}\n\n.sizeLg {\n height: var(--input-height-lg, auto);\n padding: var(--input-padding-lg, var(--spacing-4_5, 1.125rem) var(--spacing-5, 1.25rem));\n font-size: var(--font-size-base, 1rem);\n border-radius: var(--input-radius-lg, var(--radius-sm, 0.5rem));\n}\n\n/* Baseline nudge (VI-684). A native <input> cannot be trimmed to its capital\n band without clipping descenders and accents, so its capitals sit wherever the\n font's line box puts them: half a line above the box centre plus (ascent -\n descent) / 2, with ascent and descent each rounded to a whole px, and then the\n baseline snapped to a whole CSS px (Blink). Both depend on the font, so no one\n constant centres every face. The theme engine publishes the body face's\n ascent and descent as unitless em ratios (--font-ascent, --font-descent); the\n box height H is known, so the ideal baseline (H + 1cap) / 2 and the one the\n font produces can both be written out. --input-nudge is the gap between the\n nearest whole px to the ideal and the baseline the font produces; moving that\n much padding from the bottom edge to the top lands the snapped baseline on the\n whole px nearest the ideal, within half a px of centre in any font. padding-top\n plus padding-bottom is unchanged, so the box is exactly as tall as before. A\n theme that sets --input-padding-* (or the theme key md-padding) replaces it, as before; a face the engine has\n no metrics for gets no nudge (the var() fallback is 0px).\n Blink only: WebKit places the baseline exactly, so correcting there overshoots\n (-apple-pay-button-style is the WebKit-only probe). */\n@supports (padding-top: round(1.4px, 1px)) and (not (-apple-pay-button-style: black)) {\n .sizeSm {\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 padding: var(--input-padding-sm, calc(var(--spacing-1, 0.25rem) + var(--input-nudge, 0px)) var(--spacing-3, 0.75rem) calc(var(--spacing-1, 0.25rem) - var(--input-nudge, 0px)));\n }\n\n .sizeMd {\n --input-box: calc(2px + 2 * var(--spacing-3_5, 0.875rem) + 1lh);\n --input-nudge: calc(round((var(--input-box) + 1cap) / 2, 1px) - (var(--input-box) + (round(var(--font-ascent) * 1em, 1px) - round(var(--font-descent) * 1em, 1px))) / 2);\n padding: var(--input-md-padding, var(--input-padding-md, calc(var(--spacing-3_5, 0.875rem) + var(--input-nudge, 0px)) var(--spacing-4, 1rem) calc(var(--spacing-3_5, 0.875rem) - var(--input-nudge, 0px))));\n }\n\n .sizeLg {\n --input-box: calc(2px + 2 * var(--spacing-4_5, 1.125rem) + 1lh);\n --input-nudge: calc(round((var(--input-box) + 1cap) / 2, 1px) - (var(--input-box) + (round(var(--font-ascent) * 1em, 1px) - round(var(--font-descent) * 1em, 1px))) / 2);\n padding: var(--input-padding-lg, calc(var(--spacing-4_5, 1.125rem) + var(--input-nudge, 0px)) var(--spacing-5, 1.25rem) calc(var(--spacing-4_5, 1.125rem) - var(--input-nudge, 0px)));\n }\n}\n\n/* Leading-icon left-padding override.\n *\n * Declared AFTER the size variants so the padding-left value wins the\n * cascade against the shorthand `padding` each size sets. Double-class\n * selector bumps specificity above the size classes for good measure. */\n.sizeSm.hasLeadingIcon {\n padding-left: calc(var(--spacing-3, 0.75rem) * 2 + 1.125em);\n}\n\n.sizeMd.hasLeadingIcon {\n padding-left: calc(var(--spacing-4, 1rem) + var(--spacing-3, 0.75rem) + 1.125em);\n}\n\n.sizeLg.hasLeadingIcon {\n padding-left: calc(var(--spacing-5, 1.25rem) + var(--spacing-3, 0.75rem) + 1.125em);\n}\n\n/* Prefix and suffix (VI-662)\n *\n * With an affix the WRAPPER is the well: it draws the one edge, the ground, the\n * radius and the focus and invalid states around the affix and the value\n * together, from the same tokens .base reads. The <input> inside is bare (no\n * edge, no ground) and is a flex item, so its content box starts where the\n * prefix ends and stops where the suffix begins: a value of any length scrolls\n * inside that box and never runs under an affix. The input keeps its 1px\n * transparent geometry border and its size class, so the wrapper is exactly as\n * tall as a plain Input. The edge is the shared --control-edge-* outline (no\n * visible border), so --control-edge-width: 0 removes it here too. */\n.affixWrapper {\n --affix-inset: var(--spacing-4, 1rem);\n --affix-pad-y: var(--spacing-3_5, 0.875rem);\n display: flex;\n align-items: center;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n cursor: text;\n background-color: var(--field-control-bg, var(--input-bg, var(--surface-interactive-default, #f9fafb)));\n color: var(--text-primary, #111827);\n font-size: var(--font-size-sm, 0.875rem);\n line-height: 1.5;\n border-radius: var(--input-radius-md, var(--radius-sm, 0.5rem));\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--input-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n}\n\n.affixSm {\n --affix-pad-y: var(--spacing-1, 0.25rem);\n --affix-inset: var(--spacing-3, 0.75rem);\n border-radius: var(--radius-sm, 0.25rem);\n}\n\n.affixLg {\n --affix-pad-y: var(--spacing-4_5, 1.125rem);\n --affix-inset: var(--spacing-5, 1.25rem);\n font-size: var(--font-size-base, 1rem);\n border-radius: var(--input-radius-lg, var(--radius-sm, 0.5rem));\n}\n\n:global([data-density=\"editorial\"]) .affixWrapper {\n background-color: var(--field-control-bg, var(--surface-card));\n}\n\n:global([data-density=\"editorial\"]) .affixSm {\n border-radius: var(--radius-md);\n}\n\n@media (hover: hover) {\n .affixWrapper:hover:not(:has(> .bare:focus-visible)):not(:has(> .bare:disabled)):not(:has(> .bare[aria-invalid=\"true\"])) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n.affixWrapper:has(> .bare:focus-visible) {\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(--control-focus-halo-width, var(--focus-ring-width, 2px)) var(--control-focus-halo-color, color-mix(in srgb, var(--border-focus, #111827) 15%, transparent));\n}\n\n.affixWrapper:has(> .bare:disabled) {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.affixWrapper:has(> .bare[aria-invalid=\"true\"]) {\n outline-color: transparent;\n background-color: var(--input-bg-invalid, var(--surface-error-subtle, color-mix(in srgb, var(--border-error, #ef4444) 6%, var(--field-control-bg, var(--input-bg, #f9fafb)))));\n box-shadow: inset 0 0 0 1.5px var(--control-invalid-ring-color, var(--border-error, #ef4444));\n}\n\n:global([data-density=\"editorial\"]) .affixWrapper:has(> .bare[aria-invalid=\"true\"]) {\n background-color: var(--input-bg-invalid, var(--surface-error-subtle, color-mix(in srgb, var(--border-error, #ef4444) 6%, var(--field-control-bg, var(--surface-card)))));\n}\n\n.affixWrapper:has(> .bare[aria-invalid=\"true\"]:focus-visible) {\n outline-color: transparent;\n outline-offset: var(--focus-ring-offset, 2px);\n box-shadow: inset 0 0 0 1.5px var(--control-invalid-ring-color, var(--border-error, #ef4444)),\n 0 0 0 var(--control-focus-halo-width, var(--focus-ring-width, 2px)) var(--control-invalid-halo-color, color-mix(in srgb, var(--border-error, #ef4444) 30%, transparent));\n}\n\n/* The bare input: the value only. It keeps .base's geometry (width, 1px\n transparent border, line-height, size class) and drops its edge and ground. */\n.bare {\n flex: 1 1 auto;\n width: auto;\n min-width: 0;\n border: 1px solid transparent;\n border-radius: 0;\n background: transparent;\n box-shadow: none;\n outline: none;\n line-height: 1.5;\n color: inherit;\n}\n\n.bare::placeholder {\n color: var(--input-placeholder-color, var(--text-secondary, #9ca3af));\n}\n\n/* The side that meets an affix gives up its padding and border for the gap, so\n the gap is exactly --input-affix-gap. Two classes beat the size class. */\n.bare.afterPrefix {\n padding-left: var(--input-affix-gap, var(--spacing-2, 0.5rem));\n border-left-width: 0;\n}\n\n.bare.beforeSuffix {\n padding-right: var(--input-affix-gap, var(--spacing-2, 0.5rem));\n border-right-width: 0;\n}\n\n.affixIcon {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n margin-left: calc(var(--affix-inset) + 1px);\n color: var(--text-secondary, #9ca3af);\n font-size: 1.125em;\n line-height: 1;\n}\n\n.affixIcon + .affix {\n margin-left: var(--input-affix-gap, var(--spacing-2, 0.5rem));\n}\n\n/* The affix is part of the well, never of the value: it does not shrink, wrap\n or take the selection. The ink is the secondary text colour, retunable with\n --input-affix-color. */\n.affix {\n flex-shrink: 0;\n white-space: nowrap;\n user-select: none;\n color: var(--input-affix-color, var(--text-secondary, #6b7280));\n}\n\n/* The value is nudged by --input-nudge (the VI-684 per-font baseline correction,\n set on .sizeSm / .sizeMd / .sizeLg above from the theme's --font-ascent and\n --font-descent). The affix sits on the same baseline, so the wrapper computes\n the same nudge for the same box and the affix takes it. Blink only, like the\n value's. With no font metrics the nudge falls back to 0px, as the value's does.\n A theme that re-binds --input-padding-* drops the value's nudge; the affix then\n keeps it, which is the one case the two can differ. */\n@supports (padding-top: round(1.4px, 1px)) and (not (-apple-pay-button-style: black)) {\n .affixWrapper {\n --input-box: calc(2px + 2 * var(--spacing-3_5, 0.875rem) + 1lh);\n --input-nudge: calc(round((var(--input-box) + 1cap) / 2, 1px) - (var(--input-box) + (round(var(--font-ascent) * 1em, 1px) - round(var(--font-descent) * 1em, 1px))) / 2);\n }\n\n .affixSm {\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 .affixLg {\n --input-box: calc(2px + 2 * var(--spacing-4_5, 1.125rem) + 1lh);\n --input-nudge: calc(round((var(--input-box) + 1cap) / 2, 1px) - (var(--input-box) + (round(var(--font-ascent) * 1em, 1px) - round(var(--font-descent) * 1em, 1px))) / 2);\n }\n\n /* The affix takes the nudge the way the input does, as padding moved from the\n bottom edge to the top, so its baseline snaps exactly as the value's does. */\n .affix {\n align-self: stretch;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n border-block: 1px solid transparent;\n padding-top: calc(var(--affix-pad-y) + var(--input-nudge, 0px));\n padding-bottom: calc(var(--affix-pad-y) - var(--input-nudge, 0px));\n }\n}\n\n.affix:first-child {\n margin-left: calc(var(--affix-inset) + 1px);\n}\n\n.affix:last-child {\n margin-right: calc(var(--affix-inset) + 1px);\n}\n\n"
228
229
  }
229
230
  ]
230
231
  },
@@ -275,7 +276,7 @@
275
276
  {
276
277
  "path": "components/ui/textarea/textarea.module.css",
277
278
  "type": "registry:ui",
278
- "content": "/* Textarea base styles */\n.base {\n display: flex;\n width: 100%;\n resize: none;\n /* VI-655: transparent geometry border; the visible resting edge is an inset\n outline from the shared --control-edge-* tokens (as Input does). */\n border: 1px solid transparent;\n background-color: var(--textarea-bg, var(--surface-interactive-default, #f9fafb));\n line-height: 1.5;\n color: var(--text-primary, #111827);\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--textarea-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n}\n\n.base::placeholder {\n color: var(--text-secondary, #9ca3af);\n}\n\n@media (hover: hover) {\n .base:hover:not(:focus-visible):not(:disabled):not([aria-invalid=\"true\"]) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n/* Focus and invalid draw at --control-state-edge-width, which the edge switch\n does not touch. */\n.base:focus-visible {\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.base:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.base[aria-invalid=\"true\"] {\n /* VI-663: ring and halo widths are theme keys; unset they are the state\n edge and the focus ring, as before. */\n outline: var(--control-invalid-ring-width, var(--control-state-edge-width, 1px)) solid var(--border-error, #ef4444);\n outline-offset: calc(-1 * var(--control-invalid-ring-width, var(--control-state-edge-width, 1px)));\n box-shadow: 0 0 0 var(--control-invalid-halo-width, var(--focus-ring-width, 2px)) color-mix(in srgb, var(--border-error, #ef4444) 15%, transparent);\n}\n\n/* Size variants */\n.sizeSm {\n min-height: 4rem;\n padding: var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n border-radius: var(--radius-sm, 0.25rem);\n}\n\n.sizeMd {\n min-height: 6.25rem;\n padding: var(--textarea-padding, var(--spacing-3_5, 0.875rem) var(--spacing-4, 1rem));\n font-size: var(--font-size-sm, 0.875rem);\n border-radius: var(--textarea-radius, var(--radius-sm, 0.5rem));\n}\n\n.sizeLg {\n min-height: 8rem;\n padding: var(--spacing-4_5, 1.125rem) var(--spacing-5, 1.25rem);\n font-size: var(--font-size-base, 1rem);\n border-radius: var(--radius-sm, 0.5rem);\n}\n"
279
+ "content": "/* Textarea base styles */\n.base {\n display: flex;\n width: 100%;\n resize: none;\n /* VI-655: transparent geometry border; the visible resting edge is an inset\n outline from the shared --control-edge-* tokens (as Input does). */\n border: 1px solid transparent;\n background-color: var(--textarea-bg, var(--surface-interactive-default, #f9fafb));\n line-height: 1.5;\n color: var(--text-primary, #111827);\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--textarea-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n}\n\n.base::placeholder {\n color: var(--text-secondary, #9ca3af);\n}\n\n@media (hover: hover) {\n .base:hover:not(:focus-visible):not(:disabled):not([aria-invalid=\"true\"]) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n/* Focus and invalid draw at --control-state-edge-width, which the edge switch\n does not touch. */\n.base:focus-visible {\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(--control-focus-halo-width, var(--focus-ring-width, 2px)) var(--control-focus-halo-color, color-mix(in srgb, var(--border-focus, #111827) 15%, transparent));\n}\n\n.base:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.base[aria-invalid=\"true\"] {\n /* VI-663: ring and halo widths are theme keys; unset they are the state\n edge and the focus ring, as before. */\n outline: var(--control-invalid-ring-width, var(--control-state-edge-width, 1px)) solid var(--control-invalid-ring-color, var(--border-error, #ef4444));\n outline-offset: calc(-1 * var(--control-invalid-ring-width, var(--control-state-edge-width, 1px)));\n box-shadow: 0 0 0 var(--control-invalid-halo-width, var(--focus-ring-width, 2px)) var(--control-invalid-halo-color, color-mix(in srgb, var(--border-error, #ef4444) 15%, transparent));\n background-color: var(--input-bg-invalid, var(--textarea-bg, var(--surface-interactive-default, #f9fafb)));\n}\n\n/* Size variants */\n.sizeSm {\n min-height: 4rem;\n padding: var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n border-radius: var(--radius-sm, 0.25rem);\n}\n\n.sizeMd {\n min-height: 6.25rem;\n padding: var(--textarea-padding, var(--spacing-3_5, 0.875rem) var(--spacing-4, 1rem));\n font-size: var(--font-size-sm, 0.875rem);\n border-radius: var(--textarea-radius, var(--radius-sm, 0.5rem));\n}\n\n.sizeLg {\n min-height: 8rem;\n padding: var(--spacing-4_5, 1.125rem) var(--spacing-5, 1.25rem);\n font-size: var(--font-size-base, 1rem);\n border-radius: var(--radius-sm, 0.5rem);\n}\n"
279
280
  }
280
281
  ]
281
282
  },
@@ -327,7 +328,7 @@
327
328
  {
328
329
  "path": "components/ui/select/select.module.css",
329
330
  "type": "registry:ui",
330
- "content": "/* Select Trigger */\n.trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--spacing-1, 0.25rem) * 1.5);\n width: fit-content;\n border-radius: var(--radius-md, 0.375rem);\n /* VI-655: transparent geometry border; the visible resting edge is an inset\n outline from the shared --control-edge-* tokens (as Input does). */\n border: 1px solid transparent;\n background-color: var(--field-control-bg, var(--select-bg, var(--surface-interactive-default, #f9fafb)));\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n /* Match Input's line-height so the trigger's height tracks the text field at\n the same size. Without this the trigger inherited line-height 2.0, rendering\n ~7px taller than a same-size Input. */\n line-height: 1.5;\n white-space: nowrap;\n color: var(--text-primary, #111827);\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--select-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .trigger:hover:not(:focus-visible):not(:disabled):not([aria-invalid=\"true\"]) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n/* Focus and invalid draw at --control-state-edge-width, which the edge switch\n does not touch. */\n.trigger:focus-visible {\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.trigger:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.trigger[aria-invalid=\"true\"] {\n /* VI-663: ring and halo widths are theme keys; unset they are the state\n edge and the focus ring, as before. */\n outline: var(--control-invalid-ring-width, var(--control-state-edge-width, 1px)) solid var(--border-error, #ef4444);\n outline-offset: calc(-1 * var(--control-invalid-ring-width, var(--control-state-edge-width, 1px)));\n box-shadow: 0 0 0 var(--control-invalid-halo-width, var(--focus-ring-width, 2px)) color-mix(in srgb, var(--border-error, #ef4444) 15%, transparent);\n}\n\n.trigger[data-placeholder] {\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Borderless trigger variant (opt-in via <SelectTrigger variant=\"borderless\">).\n *\n * Closed trigger has no resting edge and sits on --field-control-bg — the same\n * shared form-control surface role Input uses — so a borderless Select matches a\n * borderless Input inside an in-dialog form context that sets\n * --field-control-bg: var(--surface-subtle). Default Select is unchanged. The\n * edge is made transparent (rather than removed) so the trigger's box size\n * stays identical to the default trigger and the focus ring keeps its geometry.\n * Declared after the base .trigger so these overrides win the cascade. */\n.triggerBorderless {\n outline-color: transparent;\n background-color: var(--field-control-bg, var(--select-bg, var(--surface-interactive-default, #f9fafb)));\n /* In-form borderless selects match the Input they sit beside: full width and\n the same md height/padding (the prototype paired select and input controls inside its field rows). */\n width: 100%;\n padding: var(--spacing-3_5, 0.875rem) var(--spacing-4, 1rem);\n}\n\n@media (hover: hover) {\n .triggerBorderless:hover:not(:focus-visible):not(:disabled):not([aria-invalid=\"true\"]) {\n outline-color: transparent;\n }\n}\n\n.triggerBorderless:focus-visible {\n outline-color: transparent;\n box-shadow: 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-focus, #111827) 15%, transparent);\n}\n\n:global([data-density=\"editorial\"]) .trigger {\n background-color: var(--field-control-bg, var(--surface-card));\n}\n\n:global([data-density=\"editorial\"]) .triggerBorderless {\n background-color: var(--field-control-bg, var(--surface-card));\n}\n\n.triggerSizeSm {\n --label-box-height: 2.25rem; /* VI-684: outer height, for the label correction */\n height: var(--label-box-height);\n border-radius: var(--radius-sm, 0.25rem);\n}\n\n.triggerSizeMd {\n --label-box-height: var(--select-height, calc(1lh + var(--spacing-3_5, 0.875rem) * 2 + 2px));\n height: var(--select-height, auto);\n padding: var(--select-padding, var(--spacing-3_5, 0.875rem) var(--spacing-4, 1rem));\n font-size: var(--font-size-sm, 0.875rem);\n border-radius: var(--select-radius, var(--radius-sm, 0.5rem));\n}\n\n.triggerSizeLg {\n --label-box-height: calc(1lh + var(--spacing-4_5, 1.125rem) * 2 + 2px);\n height: auto;\n padding: var(--spacing-4_5, 1.125rem) var(--spacing-5, 1.25rem);\n font-size: var(--font-size-base, 1rem);\n border-radius: var(--radius-sm, 0.5rem);\n}\n\n.triggerIcon {\n pointer-events: none;\n width: 1rem;\n height: 1rem;\n flex-shrink: 0;\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Select Content */\n.content {\n position: relative;\n z-index: 50;\n max-height: var(--radix-select-content-available-height, 300px);\n min-width: 9rem;\n overflow: hidden;\n border-radius: var(--radius-lg, 0.5rem);\n background-color: var(--field-menu-bg, var(--surface-popover, var(--surface-card, #ffffff)));\n color: var(--text-primary, #111827);\n box-shadow: var(--shadow-lg);\n}\n\n/* Select Viewport */\n.viewport {\n padding: var(--spacing-1, 0.25rem);\n}\n\n.viewportPopper {\n height: var(--radix-select-trigger-height);\n width: 100%;\n min-width: var(--radix-select-trigger-width);\n}\n\n/* Select Label */\n.label {\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-xs, 0.75rem);\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Select Item */\n.item {\n position: relative;\n display: flex;\n width: 100%;\n cursor: default;\n align-items: center;\n gap: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n border-radius: var(--radius-sm, 0.25rem);\n padding: var(--spacing-2, 0.5rem) var(--spacing-8, 2rem) var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n user-select: none;\n}\n\n.item:focus,\n.item[data-highlighted] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n.item[data-disabled] {\n pointer-events: none;\n opacity: 0.5;\n}\n\n.itemIndicatorWrapper {\n position: absolute;\n right: 0.5rem;\n display: flex;\n width: 1rem;\n height: 1rem;\n align-items: center;\n justify-content: center;\n}\n\n.itemIndicatorIcon {\n width: 0.875rem;\n height: 0.875rem;\n pointer-events: none;\n}\n\n/* Select Separator */\n.separator {\n pointer-events: none;\n margin: var(--spacing-1, 0.25rem) calc(-1 * var(--spacing-1, 0.25rem));\n height: 1px;\n background-color: var(--border-default, #e5e7eb);\n}\n\n/* Scroll Buttons */\n.scrollButton {\n display: flex;\n cursor: default;\n align-items: center;\n justify-content: center;\n padding: var(--spacing-1, 0.25rem);\n background-color: var(--field-menu-bg, var(--surface-popover, var(--surface-card, #ffffff)));\n}\n\n.scrollButtonIcon {\n width: 1rem;\n height: 1rem;\n}\n\n/* Label centring (VI-684, shared spec: the label-centering doc under docs/). The value (or\n placeholder) span's line box is trimmed to the capital-to-baseline band, so\n the flex trigger centres the ink and not the font's ascent/descent.\n padding-block hands back the room the trim took, so the trigger's box is\n unchanged. Without text-box (Firefox) rendering is exactly what it was. */\n@supports (text-box: trim-both cap alphabetic) {\n .trigger > span {\n text-box: trim-both cap alphabetic;\n padding-block: calc((1lh - 1cap) / 2);\n }\n}\n\n/* Blink only: it snaps the baseline to a whole CSS px; this hands back what the\n snap took, from the trigger's outer height (--label-box-height, per size\n above). WebKit places the baseline exactly, so it is excluded. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .trigger > span {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n}\n"
331
+ "content": "/* Select Trigger */\n.trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--spacing-1, 0.25rem) * 1.5);\n width: fit-content;\n border-radius: var(--radius-md, 0.375rem);\n /* VI-655: transparent geometry border; the visible resting edge is an inset\n outline from the shared --control-edge-* tokens (as Input does). */\n border: 1px solid transparent;\n background-color: var(--field-control-bg, var(--select-bg, var(--surface-interactive-default, #f9fafb)));\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n /* Match Input's line-height so the trigger's height tracks the text field at\n the same size. Without this the trigger inherited line-height 2.0, rendering\n ~7px taller than a same-size Input. */\n line-height: 1.5;\n white-space: nowrap;\n color: var(--text-primary, #111827);\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--select-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .trigger:hover:not(:focus-visible):not(:disabled):not([aria-invalid=\"true\"]) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n/* Focus and invalid draw at --control-state-edge-width, which the edge switch\n does not touch. */\n.trigger:focus-visible {\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(--control-focus-halo-width, var(--focus-ring-width, 2px)) var(--control-focus-halo-color, color-mix(in srgb, var(--border-focus, #111827) 15%, transparent));\n}\n\n.trigger:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.trigger[aria-invalid=\"true\"] {\n /* VI-663: ring and halo widths are theme keys; unset they are the state\n edge and the focus ring, as before. */\n outline: var(--control-invalid-ring-width, var(--control-state-edge-width, 1px)) solid var(--control-invalid-ring-color, var(--border-error, #ef4444));\n outline-offset: calc(-1 * var(--control-invalid-ring-width, var(--control-state-edge-width, 1px)));\n box-shadow: 0 0 0 var(--control-invalid-halo-width, var(--focus-ring-width, 2px)) var(--control-invalid-halo-color, color-mix(in srgb, var(--border-error, #ef4444) 15%, transparent));\n background-color: var(--input-bg-invalid, var(--field-control-bg, var(--select-bg, var(--surface-interactive-default, #f9fafb))));\n}\n\n.trigger[data-placeholder] {\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Borderless trigger variant (opt-in via <SelectTrigger variant=\"borderless\">).\n *\n * Closed trigger has no resting edge and sits on --field-control-bg — the same\n * shared form-control surface role Input uses — so a borderless Select matches a\n * borderless Input inside an in-dialog form context that sets\n * --field-control-bg: var(--surface-subtle). Default Select is unchanged. The\n * edge is made transparent (rather than removed) so the trigger's box size\n * stays identical to the default trigger and the focus ring keeps its geometry.\n * Declared after the base .trigger so these overrides win the cascade. */\n.triggerBorderless {\n outline-color: transparent;\n background-color: var(--field-control-bg, var(--select-bg, var(--surface-interactive-default, #f9fafb)));\n /* In-form borderless selects match the Input they sit beside: full width and\n the same md height/padding (the prototype paired select and input controls inside its field rows). */\n width: 100%;\n padding: var(--spacing-3_5, 0.875rem) var(--spacing-4, 1rem);\n}\n\n@media (hover: hover) {\n .triggerBorderless:hover:not(:focus-visible):not(:disabled):not([aria-invalid=\"true\"]) {\n outline-color: transparent;\n }\n}\n\n.triggerBorderless:focus-visible {\n outline-color: transparent;\n box-shadow: 0 0 0 var(--control-focus-halo-width, var(--focus-ring-width, 2px)) var(--control-focus-halo-color, color-mix(in srgb, var(--border-focus, #111827) 15%, transparent));\n}\n\n:global([data-density=\"editorial\"]) .trigger {\n background-color: var(--field-control-bg, var(--surface-card));\n}\n\n:global([data-density=\"editorial\"]) .trigger[aria-invalid=\"true\"] {\n background-color: var(--input-bg-invalid, var(--field-control-bg, var(--surface-card)));\n}\n\n:global([data-density=\"editorial\"]) .triggerBorderless {\n background-color: var(--field-control-bg, var(--surface-card));\n}\n\n.triggerSizeSm {\n --label-box-height: 2.25rem; /* VI-684: outer height, for the label correction */\n height: var(--label-box-height);\n border-radius: var(--radius-sm, 0.25rem);\n}\n\n.triggerSizeMd {\n --label-box-height: var(--select-height, calc(1lh + var(--spacing-3_5, 0.875rem) * 2 + 2px));\n height: var(--select-height, auto);\n padding: var(--select-padding, var(--spacing-3_5, 0.875rem) var(--spacing-4, 1rem));\n font-size: var(--font-size-sm, 0.875rem);\n border-radius: var(--select-radius, var(--radius-sm, 0.5rem));\n}\n\n.triggerSizeLg {\n --label-box-height: calc(1lh + var(--spacing-4_5, 1.125rem) * 2 + 2px);\n height: auto;\n padding: var(--spacing-4_5, 1.125rem) var(--spacing-5, 1.25rem);\n font-size: var(--font-size-base, 1rem);\n border-radius: var(--radius-sm, 0.5rem);\n}\n\n.triggerIcon {\n pointer-events: none;\n width: 1rem;\n height: 1rem;\n flex-shrink: 0;\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Select Content */\n.content {\n position: relative;\n z-index: 50;\n max-height: var(--radix-select-content-available-height, 300px);\n min-width: 9rem;\n overflow: hidden;\n border-radius: var(--radius-lg, 0.5rem);\n background-color: var(--field-menu-bg, var(--surface-popover, var(--surface-card, #ffffff)));\n color: var(--text-primary, #111827);\n box-shadow: var(--shadow-lg);\n}\n\n/* Select Viewport */\n.viewport {\n padding: var(--spacing-1, 0.25rem);\n}\n\n.viewportPopper {\n height: var(--radix-select-trigger-height);\n width: 100%;\n min-width: var(--radix-select-trigger-width);\n}\n\n/* Select Label */\n.label {\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-xs, 0.75rem);\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Select Item */\n.item {\n position: relative;\n display: flex;\n width: 100%;\n cursor: default;\n align-items: center;\n gap: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n border-radius: var(--radius-sm, 0.25rem);\n padding: var(--spacing-2, 0.5rem) var(--spacing-8, 2rem) var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n user-select: none;\n}\n\n.item:focus,\n.item[data-highlighted] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n.item[data-disabled] {\n pointer-events: none;\n opacity: 0.5;\n}\n\n.itemIndicatorWrapper {\n position: absolute;\n right: 0.5rem;\n display: flex;\n width: 1rem;\n height: 1rem;\n align-items: center;\n justify-content: center;\n}\n\n.itemIndicatorIcon {\n width: 0.875rem;\n height: 0.875rem;\n pointer-events: none;\n}\n\n/* Select Separator */\n.separator {\n pointer-events: none;\n margin: var(--spacing-1, 0.25rem) calc(-1 * var(--spacing-1, 0.25rem));\n height: 1px;\n background-color: var(--border-default, #e5e7eb);\n}\n\n/* Scroll Buttons */\n.scrollButton {\n display: flex;\n cursor: default;\n align-items: center;\n justify-content: center;\n padding: var(--spacing-1, 0.25rem);\n background-color: var(--field-menu-bg, var(--surface-popover, var(--surface-card, #ffffff)));\n}\n\n.scrollButtonIcon {\n width: 1rem;\n height: 1rem;\n}\n\n/* Label centring (VI-684, shared spec: the label-centering doc under docs/). The value (or\n placeholder) span's line box is trimmed to the capital-to-baseline band, so\n the flex trigger centres the ink and not the font's ascent/descent.\n padding-block hands back the room the trim took, so the trigger's box is\n unchanged. Without text-box (Firefox) rendering is exactly what it was. */\n@supports (text-box: trim-both cap alphabetic) {\n .trigger > span {\n text-box: trim-both cap alphabetic;\n padding-block: calc((1lh - 1cap) / 2);\n }\n}\n\n/* Blink only: it snaps the baseline to a whole CSS px; this hands back what the\n snap took, from the trigger's outer height (--label-box-height, per size\n above). WebKit places the baseline exactly, so it is excluded. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .trigger > span {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n}\n"
331
332
  }
332
333
  ]
333
334
  },
@@ -629,7 +630,7 @@
629
630
  {
630
631
  "path": "components/ui/spinner/spinner-orb.tsx",
631
632
  "type": "registry:ui",
632
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport type { OrbState } from \"thinking-orbs\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./spinner.module.css\"\n\n/** The nine thinking-orbs animations. */\nexport type SpinnerOrbState = OrbState\n\n/**\n * thinking-orbs is fetched the first time an orb renders, never before\n * (VI-660). `spinner.tsx` imports this file for every Spinner, so a static\n * import here shipped the canvas engine to every consumer of the ring — a busy\n * button, a \"Saving…\" line — which never draws an orb.\n */\nconst ThinkingOrb = React.lazy(() =>\n import(\"thinking-orbs\").then((m) => ({ default: m.ThinkingOrb }))\n)\n\n/**\n * Spinner size → orb preset. thinking-orbs ships 20 and 64 as hand-tuned\n * designs (not a scale factor); 32 is interpolated between them upstream.\n */\nconst ORB_PX = { xs: 20, sm: 32, md: 64 } as const\n\ninterface OrbInk {\n /** rgb() tint for the dots — the orb keeps its depth ramp on it. */\n color?: string\n /** True when the surrounding text is light, i.e. the orb sits on a dark substrate. */\n dark: boolean\n}\n\nlet probeCtx: CanvasRenderingContext2D | null | undefined\n\n/**\n * Normalise any computed CSS colour (oklch, color-mix, hex, …) to the\n * `rgb()` form thinking-orbs accepts, by painting one pixel.\n */\nfunction toRgb(value: string): [number, number, number] | null {\n if (probeCtx === undefined) {\n const canvas = document.createElement(\"canvas\")\n canvas.width = canvas.height = 1\n probeCtx = canvas.getContext(\"2d\", { willReadFrequently: true })\n }\n if (!probeCtx || !value) return null\n probeCtx.clearRect(0, 0, 1, 1)\n probeCtx.fillStyle = value\n probeCtx.fillRect(0, 0, 1, 1)\n const [r, g, b] = probeCtx.getImageData(0, 0, 1, 1).data\n return [r, g, b]\n}\n\nfunction readInk(host: HTMLElement, probe: HTMLElement): OrbInk | null {\n const text = toRgb(getComputedStyle(host).color)\n const tint = toRgb(getComputedStyle(probe).color)\n if (!text || !tint) return null\n const [r, g, b] = text\n return {\n color: `rgb(${tint.join(\", \")})`,\n dark: (0.2126 * r + 0.7152 * g + 0.0722 * b) / 255 > 0.5,\n }\n}\n\n/**\n * Resolve the orb's ink from Visor's tokens rather than thinking-orbs' own\n * `auto` detection, which only knows a `.dark`/`.light` class or the OS\n * preference and so misreads Visor's `html:not(.dark)` light mode. Re-reads\n * when the root theme or the OS scheme changes.\n */\nfunction useOrbInk(\n hostRef: React.RefObject<HTMLSpanElement | null>,\n probeRef: React.RefObject<HTMLSpanElement | null>,\n tone: string\n): OrbInk | null {\n const [ink, setInk] = React.useState<OrbInk | null>(null)\n\n React.useLayoutEffect(() => {\n const host = hostRef.current\n const probe = probeRef.current\n if (!host || !probe) return\n const read = () => {\n const next = readInk(host, probe)\n setInk((prev) =>\n prev?.color === next?.color && prev?.dark === next?.dark ? prev : next\n )\n }\n read()\n const observer = new MutationObserver(read)\n for (const el of [document.documentElement, document.body]) {\n observer.observe(el, {\n attributes: true,\n attributeFilter: [\"class\", \"style\", \"data-theme\"],\n })\n }\n const scheme =\n typeof matchMedia === \"undefined\"\n ? null\n : matchMedia(\"(prefers-color-scheme: dark)\")\n scheme?.addEventListener(\"change\", read)\n return () => {\n observer.disconnect()\n scheme?.removeEventListener(\"change\", read)\n }\n }, [hostRef, probeRef, tone])\n\n return ink\n}\n\nexport interface SpinnerOrbProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"color\"> {\n state: SpinnerOrbState\n size: \"xs\" | \"sm\" | \"md\"\n tone: \"default\" | \"primary\"\n}\n\nconst SpinnerOrb = React.forwardRef<HTMLSpanElement, SpinnerOrbProps>(\n ({ className, style, state, size, tone, children, ...props }, ref) => {\n const hostRef = React.useRef<HTMLSpanElement | null>(null)\n const probeRef = React.useRef<HTMLSpanElement | null>(null)\n const ink = useOrbInk(hostRef, probeRef, tone)\n const px = ORB_PX[size]\n\n const setRef = React.useCallback(\n (node: HTMLSpanElement | null) => {\n hostRef.current = node\n if (typeof ref === \"function\") ref(node)\n else if (ref) ref.current = node\n },\n [ref]\n )\n\n return (\n <span\n ref={setRef}\n data-slot=\"spinner\"\n data-variant=\"orb\"\n data-orb={state}\n data-size={size}\n data-tone={tone}\n className={cn(styles.orb, className)}\n style={{ width: px, height: px, ...style }}\n {...props}\n >\n <span\n ref={probeRef}\n className={cn(\n styles.orbInk,\n tone === \"primary\" && styles.orbInkPrimary\n )}\n />\n {/* The box is sized inline, so it holds still on hydrate and while\n thinking-orbs loads; the canvas mounts into it once it arrives. */}\n <React.Suspense fallback={null}>\n <ThinkingOrb\n state={state}\n size={px}\n theme={ink ? (ink.dark ? \"dark\" : \"light\") : \"auto\"}\n color={ink?.color}\n role=\"presentation\"\n aria-hidden=\"true\"\n />\n </React.Suspense>\n {children}\n </span>\n )\n }\n)\nSpinnerOrb.displayName = \"SpinnerOrb\"\n\nexport { SpinnerOrb }\n"
633
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport type { OrbState } from \"thinking-orbs\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./spinner.module.css\"\n\n/** The nine thinking-orbs animations. */\nexport type SpinnerOrbState = OrbState\n\n/**\n * thinking-orbs is fetched the first time an orb renders, never before\n * (VI-660). `spinner.tsx` imports this file for every Spinner, so a static\n * import here shipped the canvas engine to every consumer of the ring — a busy\n * button, a \"Saving…\" line — which never draws an orb.\n */\nconst ThinkingOrb = React.lazy(() =>\n import(\"thinking-orbs\").then((m) => ({ default: m.ThinkingOrb }))\n)\n\n/**\n * Spinner size → orb preset. thinking-orbs ships 20 and 64 as hand-tuned\n * designs (not a scale factor); 32 is interpolated between them upstream.\n */\nconst ORB_PX = { xs: 20, sm: 32, md: 64 } as const\n\ninterface OrbInk {\n /** rgb() tint for the dots — the orb keeps its depth ramp on it. */\n color?: string\n /** True when the surrounding text is light, i.e. the orb sits on a dark substrate. */\n dark: boolean\n}\n\nlet probeCtx: CanvasRenderingContext2D | null | undefined\n\n/**\n * Normalise any computed CSS colour (oklch, color-mix, hex, …) to the\n * `rgb()` form thinking-orbs accepts, by painting one pixel.\n */\nfunction toRgb(value: string): [number, number, number] | null {\n if (probeCtx === undefined) {\n const canvas = document.createElement(\"canvas\")\n canvas.width = canvas.height = 1\n probeCtx = canvas.getContext(\"2d\", { willReadFrequently: true })\n }\n if (!probeCtx || !value) return null\n probeCtx.clearRect(0, 0, 1, 1)\n probeCtx.fillStyle = value\n probeCtx.fillRect(0, 0, 1, 1)\n const [r = 0, g = 0, b = 0] = probeCtx.getImageData(0, 0, 1, 1).data\n return [r, g, b]\n}\n\nfunction readInk(host: HTMLElement, probe: HTMLElement): OrbInk | null {\n const text = toRgb(getComputedStyle(host).color)\n const tint = toRgb(getComputedStyle(probe).color)\n if (!text || !tint) return null\n const [r, g, b] = text\n return {\n color: `rgb(${tint.join(\", \")})`,\n dark: (0.2126 * r + 0.7152 * g + 0.0722 * b) / 255 > 0.5,\n }\n}\n\n/**\n * Resolve the orb's ink from Visor's tokens rather than thinking-orbs' own\n * `auto` detection, which only knows a `.dark`/`.light` class or the OS\n * preference and so misreads Visor's `html:not(.dark)` light mode. Re-reads\n * when the root theme or the OS scheme changes.\n */\nfunction useOrbInk(\n hostRef: React.RefObject<HTMLSpanElement | null>,\n probeRef: React.RefObject<HTMLSpanElement | null>,\n tone: string\n): OrbInk | null {\n const [ink, setInk] = React.useState<OrbInk | null>(null)\n\n React.useLayoutEffect(() => {\n const host = hostRef.current\n const probe = probeRef.current\n if (!host || !probe) return\n const read = () => {\n const next = readInk(host, probe)\n setInk((prev) =>\n prev?.color === next?.color && prev?.dark === next?.dark ? prev : next\n )\n }\n read()\n const observer = new MutationObserver(read)\n for (const el of [document.documentElement, document.body]) {\n observer.observe(el, {\n attributes: true,\n attributeFilter: [\"class\", \"style\", \"data-theme\"],\n })\n }\n const scheme =\n typeof matchMedia === \"undefined\"\n ? null\n : matchMedia(\"(prefers-color-scheme: dark)\")\n scheme?.addEventListener(\"change\", read)\n return () => {\n observer.disconnect()\n scheme?.removeEventListener(\"change\", read)\n }\n }, [hostRef, probeRef, tone])\n\n return ink\n}\n\nexport interface SpinnerOrbProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"color\"> {\n state: SpinnerOrbState\n size: \"xs\" | \"sm\" | \"md\"\n tone: \"default\" | \"primary\"\n}\n\nconst SpinnerOrb = React.forwardRef<HTMLSpanElement, SpinnerOrbProps>(\n ({ className, style, state, size, tone, children, ...props }, ref) => {\n const hostRef = React.useRef<HTMLSpanElement | null>(null)\n const probeRef = React.useRef<HTMLSpanElement | null>(null)\n const ink = useOrbInk(hostRef, probeRef, tone)\n const px = ORB_PX[size]\n\n const setRef = React.useCallback(\n (node: HTMLSpanElement | null) => {\n hostRef.current = node\n if (typeof ref === \"function\") ref(node)\n else if (ref) ref.current = node\n },\n [ref]\n )\n\n return (\n <span\n ref={setRef}\n data-slot=\"spinner\"\n data-variant=\"orb\"\n data-orb={state}\n data-size={size}\n data-tone={tone}\n className={cn(styles.orb, className)}\n style={{ width: px, height: px, ...style }}\n {...props}\n >\n <span\n ref={probeRef}\n className={cn(\n styles.orbInk,\n tone === \"primary\" && styles.orbInkPrimary\n )}\n />\n {/* The box is sized inline, so it holds still on hydrate and while\n thinking-orbs loads; the canvas mounts into it once it arrives. */}\n <React.Suspense fallback={null}>\n <ThinkingOrb\n state={state}\n size={px}\n theme={ink ? (ink.dark ? \"dark\" : \"light\") : \"auto\"}\n color={ink?.color}\n role=\"presentation\"\n aria-hidden=\"true\"\n />\n </React.Suspense>\n {children}\n </span>\n )\n }\n)\nSpinnerOrb.displayName = \"SpinnerOrb\"\n\nexport { SpinnerOrb }\n"
633
634
  },
634
635
  {
635
636
  "path": "components/ui/spinner/spinner.module.css",
@@ -2216,7 +2217,7 @@
2216
2217
  {
2217
2218
  "path": "components/ui/tag-input/tag-input.module.css",
2218
2219
  "type": "registry:ui",
2219
- "content": "/* Tag input wrapper — styled like an Input */\n.wrapper {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-1, 0.25rem);\n min-height: var(--tag-input-min-height, 2.25rem);\n width: 100%;\n border-radius: var(--tag-input-radius, var(--radius-md, 0.375rem));\n /* VI-655: transparent geometry border; the visible resting edge is an inset\n outline from the shared --control-edge-* tokens (as Input does). */\n border: 1px solid transparent;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--tag-input-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n background-color: var(--tag-input-bg, var(--surface-interactive-default, #f9fafb));\n padding: var(--tag-input-padding, var(--spacing-1, 0.25rem) var(--spacing-2, 0.5rem));\n cursor: text;\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 .wrapper:hover:not(.wrapperFocused):not(.wrapperDisabled) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n/* Focus draws at --control-state-edge-width, which the edge switch does not\n touch. */\n.wrapperFocused {\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 pointer-events: none;\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Individual tag chip */\n.tag {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-1, 0.25rem);\n height: var(--tag-input-tag-height, auto);\n padding: calc(var(--spacing-1, 0.25rem) / 4) var(--tag-input-tag-padding-x, var(--spacing-2, 0.5rem));\n border-radius: var(--tag-input-tag-radius, var(--radius-full, 9999px));\n background-color: var(--surface-muted, #f3f4f6);\n /* The tag chip's edge follows the same switch as the field around it. */\n border: 1px solid transparent;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--control-edge-color, var(--border-default, #e5e7eb));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n font-size: var(--tag-input-tag-font-size, var(--font-size-xs, 0.75rem));\n line-height: 1.5;\n color: var(--text-primary, #111827);\n}\n\n/* Weight is inherited, so any unlayered fallback would override something:\n `inherit` beats a layered utility, `revert-layer` drops an unlayered consumer\n rule. In visor-base every consumer rule still wins, and while the token is\n unset revert-layer leaves the tag inheriting its row's weight. */\n@layer visor-base {\n .tag {\n font-weight: var(--tag-input-tag-font-weight, revert-layer);\n }\n}\n\n.tagLabel {\n white-space: nowrap;\n}\n\n.tagRemove {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 0.875rem;\n height: 0.875rem;\n padding: 0;\n border: none;\n background: transparent;\n color: var(--text-secondary, #9ca3af);\n cursor: pointer;\n border-radius: var(--radius-full, 9999px);\n transition: color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n@media (hover: hover) {\n .tagRemove:hover {\n color: var(--text-primary, #111827);\n }\n}\n\n.tagRemove svg {\n width: 0.625rem;\n height: 0.625rem;\n}\n\n/* Inline text input */\n.input {\n flex: 1;\n min-width: 4rem;\n height: 1.5rem;\n padding: 0;\n border: none;\n background: transparent;\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/* Typing slot (entryAs=\"slot\", VI-663). The next tag is typed into a dashed\n slot the shape of a held tag, and the slot grows with what is typed. The\n dashed edge is the shared drop edge (VI-655), so --control-edge-width: 0\n turns it off with every other edge. Declared after .input so it wins.\n 1.375rem is the height a held tag draws while --tag-input-tag-height is\n unset (an 18px line, 1px padding and the 1px geometry border, each side),\n so the unbound slot is the tag's shape too. */\n.inputSlot {\n flex: 0 1 auto;\n box-sizing: border-box;\n field-sizing: content;\n min-width: var(--tag-input-slot-min-width, 4rem);\n max-width: 100%;\n height: var(--tag-input-slot-height, var(--tag-input-tag-height, 1.375rem));\n padding: 0 var(--tag-input-slot-padding-x, var(--tag-input-tag-padding-x, var(--spacing-2, 0.5rem)));\n border-radius: var(--tag-input-slot-radius, var(--tag-input-tag-radius, var(--radius-full, 9999px)));\n font-size: var(--tag-input-tag-font-size, var(--font-size-xs, 0.75rem));\n outline: var(--control-drop-edge-width, var(--control-edge-width, 1px)) var(--control-drop-edge-style, dashed) var(--control-edge-color, var(--border-default, #e5e7eb));\n outline-offset: calc(-1 * var(--control-drop-edge-width, var(--control-edge-width, 1px)));\n}\n"
2220
+ "content": "/* Tag input wrapper — styled like an Input */\n.wrapper {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-1, 0.25rem);\n min-height: var(--tag-input-min-height, 2.25rem);\n width: 100%;\n border-radius: var(--tag-input-radius, var(--radius-md, 0.375rem));\n /* VI-655: transparent geometry border; the visible resting edge is an inset\n outline from the shared --control-edge-* tokens (as Input does). */\n border: 1px solid transparent;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--tag-input-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n background-color: var(--tag-input-bg, var(--surface-interactive-default, #f9fafb));\n padding: var(--tag-input-padding, var(--spacing-1, 0.25rem) var(--spacing-2, 0.5rem));\n cursor: text;\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 .wrapper:hover:not(.wrapperFocused):not(.wrapperDisabled) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n/* Focus draws at --control-state-edge-width, which the edge switch does not\n touch. */\n.wrapperFocused {\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(--control-focus-halo-width, var(--focus-ring-width, 2px)) var(--control-focus-halo-color, color-mix(in srgb, var(--border-focus, #111827) 15%, transparent));\n}\n\n/* Refused value (VI-699): only the well is themed; the ring and halo stay Input's\n and Textarea's. Unset, the well is the resting one. */\n.wrapper[aria-invalid=\"true\"] {\n background-color: var(--input-bg-invalid, var(--tag-input-bg, var(--surface-interactive-default, #f9fafb)));\n}\n\n.wrapperDisabled {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Individual tag chip */\n.tag {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-1, 0.25rem);\n height: var(--tag-input-tag-height, auto);\n padding: calc(var(--spacing-1, 0.25rem) / 4) var(--tag-input-tag-padding-x, var(--spacing-2, 0.5rem));\n border-radius: var(--tag-input-tag-radius, var(--radius-full, 9999px));\n background-color: var(--surface-muted, #f3f4f6);\n /* The tag chip's edge follows the same switch as the field around it. */\n border: 1px solid transparent;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--control-edge-color, var(--border-default, #e5e7eb));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n font-size: var(--tag-input-tag-font-size, var(--font-size-xs, 0.75rem));\n line-height: 1.5;\n color: var(--text-primary, #111827);\n}\n\n/* Weight is inherited, so any unlayered fallback would override something:\n `inherit` beats a layered utility, `revert-layer` drops an unlayered consumer\n rule. In visor-base every consumer rule still wins, and while the token is\n unset revert-layer leaves the tag inheriting its row's weight. */\n@layer visor-base {\n .tag {\n font-weight: var(--tag-input-tag-font-weight, revert-layer);\n }\n}\n\n.tagLabel {\n white-space: nowrap;\n}\n\n.tagRemove {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 0.875rem;\n height: 0.875rem;\n padding: 0;\n border: none;\n background: transparent;\n color: var(--text-secondary, #9ca3af);\n cursor: pointer;\n border-radius: var(--radius-full, 9999px);\n transition: color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n@media (hover: hover) {\n .tagRemove:hover {\n color: var(--text-primary, #111827);\n }\n}\n\n.tagRemove svg {\n width: 0.625rem;\n height: 0.625rem;\n}\n\n/* Inline text input */\n.input {\n flex: 1;\n min-width: 4rem;\n height: 1.5rem;\n padding: 0;\n border: none;\n background: transparent;\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/* Typing slot (entryAs=\"slot\", VI-663). The next tag is typed into a dashed\n slot the shape of a held tag, and the slot grows with what is typed. The\n dashed edge is the shared drop edge (VI-655), so --control-edge-width: 0\n turns it off with every other edge. Declared after .input so it wins.\n 1.375rem is the height a held tag draws while --tag-input-tag-height is\n unset (an 18px line, 1px padding and the 1px geometry border, each side),\n so the unbound slot is the tag's shape too. */\n.inputSlot {\n flex: 0 1 auto;\n box-sizing: border-box;\n field-sizing: content;\n min-width: var(--tag-input-slot-min-width, 4rem);\n max-width: 100%;\n height: var(--tag-input-slot-height, var(--tag-input-tag-height, 1.375rem));\n padding: 0 var(--tag-input-slot-padding-x, var(--tag-input-tag-padding-x, var(--spacing-2, 0.5rem)));\n border-radius: var(--tag-input-slot-radius, var(--tag-input-tag-radius, var(--radius-full, 9999px)));\n font-size: var(--tag-input-tag-font-size, var(--font-size-xs, 0.75rem));\n outline: var(--control-drop-edge-width, var(--control-edge-width, 1px)) var(--control-drop-edge-style, dashed) var(--control-edge-color, var(--border-default, #e5e7eb));\n outline-offset: calc(-1 * var(--control-drop-edge-width, var(--control-edge-width, 1px)));\n}\n"
2220
2221
  }
2221
2222
  ]
2222
2223
  },
@@ -2255,7 +2256,8 @@
2255
2256
  "@loworbitstudio/visor-core"
2256
2257
  ],
2257
2258
  "registryDependencies": [
2258
- "utils"
2259
+ "utils",
2260
+ "color-utils"
2259
2261
  ],
2260
2262
  "files": [
2261
2263
  {
@@ -2280,7 +2282,8 @@
2280
2282
  ],
2281
2283
  "registryDependencies": [
2282
2284
  "utils",
2283
- "text"
2285
+ "text",
2286
+ "color-utils"
2284
2287
  ],
2285
2288
  "files": [
2286
2289
  {
@@ -2561,7 +2564,7 @@
2561
2564
  {
2562
2565
  "path": "components/ui/font-showcase/font-showcase.tsx",
2563
2566
  "type": "registry:ui",
2564
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"../../../lib/utils\"\nimport { Text } from \"../text/text\"\nimport styles from \"./font-showcase.module.css\"\n\n// ─── Types ──────────────────────────────────────────────────────────────────\n\nexport interface FontWeightSpecimen {\n label: string\n value: number\n}\n\nexport interface FontShowcaseProps {\n /** CSS custom property token for font-family (e.g. \"--font-heading\") */\n token: string\n /** Display role (e.g. \"Heading & Body\", \"Monospace\") */\n role: string\n /** Font family display name — omit to read dynamically from the CSS token */\n familyName?: string\n /** Available weights to display */\n weights: FontWeightSpecimen[]\n className?: string\n}\n\nexport interface FontShowcaseGridProps {\n fonts: FontShowcaseProps[]\n className?: string\n}\n\n// ─── Hooks ──────────────────────────────────────────────────────────────────\n\n/**\n * Resolves the first font name from a CSS custom property by applying it to a\n * hidden span and reading the computed fontFamily. Re-syncs on theme class changes.\n */\nfunction useLiveFontName(token: string): string {\n const [name, setName] = React.useState(\"\")\n\n React.useEffect(() => {\n const span = document.createElement(\"span\")\n Object.assign(span.style, {\n position: \"absolute\",\n visibility: \"hidden\",\n pointerEvents: \"none\",\n fontFamily: `var(${token})`,\n })\n document.body.appendChild(span)\n\n function read() {\n const ff = getComputedStyle(span).fontFamily\n // Parse first font name: \"PP Model Plastic\", sans-serif → PP Model Plastic\n const first = ff.split(\",\")[0].trim().replace(/^[\"']|[\"']$/g, \"\")\n setName(first || token)\n }\n\n read()\n const obs = new MutationObserver(read)\n obs.observe(document.documentElement, { attributes: true, attributeFilter: [\"class\", \"data-theme\", \"data-creator-revision\"] })\n obs.observe(document.body, { attributes: true, attributeFilter: [\"class\", \"data-theme\"] })\n\n return () => {\n obs.disconnect()\n span.remove()\n }\n }, [token])\n\n return name\n}\n\n// ─── FontShowcase ───────────────────────────────────────────────────────────\n\nfunction FontShowcase({\n token,\n role,\n familyName,\n weights,\n className,\n}: FontShowcaseProps) {\n const fontFamily = `var(${token})`\n const liveName = useLiveFontName(token)\n const displayName = familyName ?? liveName\n\n return (\n <div data-slot=\"font-showcase\" className={cn(styles.card, className)}>\n <div className={styles.header}>\n <div className={styles.meta}>\n <span className={styles.familyName} style={{ fontFamily }}>\n {displayName}\n </span>\n <Text size=\"xs\" color=\"secondary\" as=\"span\">{role}</Text>\n <code className={styles.token}>{token}</code>\n </div>\n </div>\n\n <span\n className={styles.hero}\n style={{ fontFamily }}\n aria-hidden=\"true\"\n >\n Aa\n </span>\n\n <hr className={styles.divider} />\n\n <div className={styles.weights}>\n {weights.map((w) => (\n <div key={w.value} className={styles.weightRow}>\n <span\n className={styles.weightSample}\n style={{ fontFamily, fontWeight: w.value }}\n >\n The quick brown fox jumps\n </span>\n <div className={styles.weightMeta}>\n <Text size=\"xs\" color=\"secondary\" as=\"span\">{w.label}</Text>\n <code className={styles.weightValue}>{w.value}</code>\n </div>\n </div>\n ))}\n </div>\n </div>\n )\n}\n\n// ─── FontShowcaseGrid ───────────────────────────────────────────────────────\n\nfunction FontShowcaseGrid({ fonts, className }: FontShowcaseGridProps) {\n return (\n <div data-slot=\"font-showcase-grid\" className={cn(styles.grid, className)}>\n {fonts.map((font) => (\n <FontShowcase key={font.token} {...font} />\n ))}\n </div>\n )\n}\n\nexport { FontShowcase, FontShowcaseGrid }\n"
2567
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"../../../lib/utils\"\nimport { Text } from \"../text/text\"\nimport styles from \"./font-showcase.module.css\"\n\n// ─── Types ──────────────────────────────────────────────────────────────────\n\nexport interface FontWeightSpecimen {\n label: string\n value: number\n}\n\nexport interface FontShowcaseProps {\n /** CSS custom property token for font-family (e.g. \"--font-heading\") */\n token: string\n /** Display role (e.g. \"Heading & Body\", \"Monospace\") */\n role: string\n /** Font family display name — omit to read dynamically from the CSS token */\n familyName?: string\n /** Available weights to display */\n weights: FontWeightSpecimen[]\n className?: string\n}\n\nexport interface FontShowcaseGridProps {\n fonts: FontShowcaseProps[]\n className?: string\n}\n\n// ─── Hooks ──────────────────────────────────────────────────────────────────\n\n/**\n * Resolves the first font name from a CSS custom property by applying it to a\n * hidden span and reading the computed fontFamily. Re-syncs on theme class changes.\n */\nfunction useLiveFontName(token: string): string {\n const [name, setName] = React.useState(\"\")\n\n React.useEffect(() => {\n const span = document.createElement(\"span\")\n Object.assign(span.style, {\n position: \"absolute\",\n visibility: \"hidden\",\n pointerEvents: \"none\",\n fontFamily: `var(${token})`,\n })\n document.body.appendChild(span)\n\n function read() {\n const ff = getComputedStyle(span).fontFamily\n // Parse first font name: \"PP Model Plastic\", sans-serif → PP Model Plastic\n const first = (ff.split(\",\")[0] ?? \"\").trim().replace(/^[\"']|[\"']$/g, \"\")\n setName(first || token)\n }\n\n read()\n const obs = new MutationObserver(read)\n obs.observe(document.documentElement, { attributes: true, attributeFilter: [\"class\", \"data-theme\", \"data-creator-revision\"] })\n obs.observe(document.body, { attributes: true, attributeFilter: [\"class\", \"data-theme\"] })\n\n return () => {\n obs.disconnect()\n span.remove()\n }\n }, [token])\n\n return name\n}\n\n// ─── FontShowcase ───────────────────────────────────────────────────────────\n\nfunction FontShowcase({\n token,\n role,\n familyName,\n weights,\n className,\n}: FontShowcaseProps) {\n const fontFamily = `var(${token})`\n const liveName = useLiveFontName(token)\n const displayName = familyName ?? liveName\n\n return (\n <div data-slot=\"font-showcase\" className={cn(styles.card, className)}>\n <div className={styles.header}>\n <div className={styles.meta}>\n <span className={styles.familyName} style={{ fontFamily }}>\n {displayName}\n </span>\n <Text size=\"xs\" color=\"secondary\" as=\"span\">{role}</Text>\n <code className={styles.token}>{token}</code>\n </div>\n </div>\n\n <span\n className={styles.hero}\n style={{ fontFamily }}\n aria-hidden=\"true\"\n >\n Aa\n </span>\n\n <hr className={styles.divider} />\n\n <div className={styles.weights}>\n {weights.map((w) => (\n <div key={w.value} className={styles.weightRow}>\n <span\n className={styles.weightSample}\n style={{ fontFamily, fontWeight: w.value }}\n >\n The quick brown fox jumps\n </span>\n <div className={styles.weightMeta}>\n <Text size=\"xs\" color=\"secondary\" as=\"span\">{w.label}</Text>\n <code className={styles.weightValue}>{w.value}</code>\n </div>\n </div>\n ))}\n </div>\n </div>\n )\n}\n\n// ─── FontShowcaseGrid ───────────────────────────────────────────────────────\n\nfunction FontShowcaseGrid({ fonts, className }: FontShowcaseGridProps) {\n return (\n <div data-slot=\"font-showcase-grid\" className={cn(styles.grid, className)}>\n {fonts.map((font) => (\n <FontShowcase key={font.token} {...font} />\n ))}\n </div>\n )\n}\n\nexport { FontShowcase, FontShowcaseGrid }\n"
2565
2568
  },
2566
2569
  {
2567
2570
  "path": "components/ui/font-showcase/font-showcase.module.css",
@@ -3669,7 +3672,7 @@
3669
3672
  {
3670
3673
  "path": "hooks/use-keyboard-nav.ts",
3671
3674
  "type": "registry:hook",
3672
- "content": "\"use client\"\n\nimport { useEffect } from \"react\"\n\nexport interface UseKeyboardNavOptions {\n /** Container element to listen on. Falls back to document if not provided. */\n containerRef?: React.RefObject<HTMLElement | null>\n goTo: (index: number) => void\n currentIndexRef: React.MutableRefObject<number>\n totalSectionsRef: React.MutableRefObject<number>\n}\n\nexport function useKeyboardNav({\n containerRef,\n goTo,\n currentIndexRef,\n totalSectionsRef,\n}: UseKeyboardNavOptions) {\n useEffect(() => {\n const target = containerRef?.current ?? document\n\n function handleKeydown(e: KeyboardEvent) {\n // Let browser handle Cmd+Arrow (back/forward navigation)\n if (e.metaKey && (e.key === \"ArrowLeft\" || e.key === \"ArrowRight\")) {\n return\n }\n if (e.metaKey && e.key === \"ArrowUp\") {\n e.preventDefault()\n goTo(0)\n } else if (e.key === \"ArrowDown\" || e.key === \" \") {\n e.preventDefault()\n goTo(currentIndexRef.current + 1)\n } else if (e.key === \"ArrowUp\") {\n e.preventDefault()\n goTo(currentIndexRef.current - 1)\n } else if (e.key === \"Home\") {\n e.preventDefault()\n goTo(0)\n } else if (e.key === \"End\") {\n e.preventDefault()\n goTo(totalSectionsRef.current - 1)\n }\n }\n\n target.addEventListener(\"keydown\", handleKeydown as EventListener)\n return () => target.removeEventListener(\"keydown\", handleKeydown as EventListener)\n }, [containerRef, goTo, currentIndexRef, totalSectionsRef])\n}\n"
3675
+ "content": "\"use client\"\n\nimport { useEffect } from \"react\"\n\nexport interface UseKeyboardNavOptions {\n /** Container element to listen on. Falls back to document if not provided. */\n containerRef?: React.RefObject<HTMLElement | null>\n goTo: (index: number) => void\n currentIndexRef: React.MutableRefObject<number>\n totalSectionsRef: React.MutableRefObject<number>\n}\n\n/** Focused controls that use these keys themselves (typing, radio/tab/toggle groups, sliders, selects). */\nconst OWNS_KEYS =\n 'input, textarea, select, [contenteditable]:not([contenteditable=\"false\"]), [role=\"slider\"], [role=\"combobox\"], [role=\"spinbutton\"], [role=\"listbox\"], [role=\"menu\"], [data-radix-collection-item]'\n\nexport function useKeyboardNav({\n containerRef,\n goTo,\n currentIndexRef,\n totalSectionsRef,\n}: UseKeyboardNavOptions) {\n useEffect(() => {\n const target = containerRef?.current ?? document\n\n function handleKeydown(e: KeyboardEvent) {\n if (e.target instanceof Element && e.target.closest(OWNS_KEYS)) return\n // Let browser handle Cmd+Arrow (back/forward navigation)\n if (e.metaKey && (e.key === \"ArrowLeft\" || e.key === \"ArrowRight\")) {\n return\n }\n if (e.metaKey && e.key === \"ArrowUp\") {\n e.preventDefault()\n goTo(0)\n } else if (e.key === \"ArrowDown\" || e.key === \" \") {\n e.preventDefault()\n goTo(currentIndexRef.current + 1)\n } else if (e.key === \"ArrowUp\") {\n e.preventDefault()\n goTo(currentIndexRef.current - 1)\n } else if (e.key === \"Home\") {\n e.preventDefault()\n goTo(0)\n } else if (e.key === \"End\") {\n e.preventDefault()\n goTo(totalSectionsRef.current - 1)\n }\n }\n\n target.addEventListener(\"keydown\", handleKeydown as EventListener)\n return () => target.removeEventListener(\"keydown\", handleKeydown as EventListener)\n }, [containerRef, goTo, currentIndexRef, totalSectionsRef])\n}\n"
3673
3676
  }
3674
3677
  ]
3675
3678
  },
@@ -3682,7 +3685,7 @@
3682
3685
  {
3683
3686
  "path": "hooks/use-slide-engine.ts",
3684
3687
  "type": "registry:hook",
3685
- "content": "\"use client\"\n\nimport { useCallback, useRef } from \"react\"\n\nexport interface UseSlideEngineOptions {\n /** Container element that scrolls */\n containerRef?: React.RefObject<HTMLElement | null>\n sectionsRef: React.RefObject<HTMLElement[]>\n currentIndexRef: React.MutableRefObject<number>\n setCurrentIndex?: (index: number) => void\n}\n\nexport function useSlideEngine({\n containerRef,\n sectionsRef,\n currentIndexRef,\n setCurrentIndex,\n}: UseSlideEngineOptions) {\n const isScrollingRef = useRef(false)\n\n const goTo = useCallback(\n (index: number) => {\n const sections = sectionsRef.current\n if (!sections || index < 0 || index >= sections.length || isScrollingRef.current) return\n\n isScrollingRef.current = true\n currentIndexRef.current = index\n setCurrentIndex?.(index)\n\n const container = containerRef?.current\n const el = sections[index]\n\n // Use native smooth scroll — the browser coordinates with scroll-snap\n // internally, avoiding the stutter caused by rAF + snap fighting.\n if (container) {\n const target = el.offsetTop - container.offsetTop\n container.scrollTo({ top: target, behavior: \"smooth\" })\n } else {\n el.scrollIntoView({ behavior: \"smooth\", block: \"start\" })\n }\n\n el.setAttribute(\"data-deck-visible\", \"true\")\n\n // Unlock after scroll settles (native smooth scroll ~400-600ms)\n setTimeout(() => {\n isScrollingRef.current = false\n }, 600)\n },\n [containerRef, sectionsRef, currentIndexRef, setCurrentIndex]\n )\n\n const navigateTo = useCallback(\n (id: string) => {\n const el = document.getElementById(id)\n if (!el || !sectionsRef.current) return\n const index = sectionsRef.current.indexOf(el)\n if (index >= 0) goTo(index)\n },\n [sectionsRef, goTo]\n )\n\n return { goTo, navigateTo, isScrollingRef }\n}\n"
3688
+ "content": "\"use client\"\n\nimport { useCallback, useRef } from \"react\"\n\nexport interface UseSlideEngineOptions {\n /** Container element that scrolls */\n containerRef?: React.RefObject<HTMLElement | null>\n sectionsRef: React.RefObject<HTMLElement[]>\n currentIndexRef: React.MutableRefObject<number>\n setCurrentIndex?: (index: number) => void\n}\n\nexport function useSlideEngine({\n containerRef,\n sectionsRef,\n currentIndexRef,\n setCurrentIndex,\n}: UseSlideEngineOptions) {\n const isScrollingRef = useRef(false)\n\n const goTo = useCallback(\n (index: number) => {\n const el = sectionsRef.current?.[index]\n if (!el || isScrollingRef.current) return\n\n isScrollingRef.current = true\n currentIndexRef.current = index\n setCurrentIndex?.(index)\n\n const container = containerRef?.current\n\n // Use native smooth scroll — the browser coordinates with scroll-snap\n // internally, avoiding the stutter caused by rAF + snap fighting.\n if (container) {\n const target = el.offsetTop - container.offsetTop\n container.scrollTo({ top: target, behavior: \"smooth\" })\n } else {\n el.scrollIntoView({ behavior: \"smooth\", block: \"start\" })\n }\n\n el.setAttribute(\"data-deck-visible\", \"true\")\n\n // Unlock after scroll settles (native smooth scroll ~400-600ms)\n setTimeout(() => {\n isScrollingRef.current = false\n }, 600)\n },\n [containerRef, sectionsRef, currentIndexRef, setCurrentIndex]\n )\n\n const navigateTo = useCallback(\n (id: string) => {\n const el = document.getElementById(id)\n if (!el || !sectionsRef.current) return\n const index = sectionsRef.current.indexOf(el)\n if (index >= 0) goTo(index)\n },\n [sectionsRef, goTo]\n )\n\n return { goTo, navigateTo, isScrollingRef }\n}\n"
3686
3689
  }
3687
3690
  ]
3688
3691
  },
@@ -3714,6 +3717,24 @@
3714
3717
  }
3715
3718
  ]
3716
3719
  },
3720
+ {
3721
+ "name": "color-utils",
3722
+ "type": "registry:lib",
3723
+ "description": "OKLCH-aware color helpers built on culori: parse, format and WCAG contrast.",
3724
+ "dependencies": [
3725
+ "culori"
3726
+ ],
3727
+ "devDependencies": [
3728
+ "@types/culori"
3729
+ ],
3730
+ "files": [
3731
+ {
3732
+ "path": "lib/color-utils.ts",
3733
+ "type": "registry:lib",
3734
+ "content": "/**\n * Color utilities — built on culori for OKLCH-aware color math.\n *\n * Used by ColorSwatch and related specimen components.\n */\n\nimport { parse, formatHex, wcagContrast } from \"culori\"\n\n/**\n * Normalizes any CSS color string (hex, rgb, oklch, hsl, etc.) to a lowercase\n * 6-digit hex string. Returns the original string if parsing fails.\n */\nexport function toHex(cssColor: string): string {\n const parsed = parse(cssColor.trim())\n if (!parsed) return cssColor\n return formatHex(parsed) ?? cssColor\n}\n\n/**\n * Returns true if white text has better WCAG contrast against the given color\n * than black text. Falls back to false (dark text) if color cannot be parsed.\n */\nexport function needsLightText(cssColor: string): boolean {\n const color = parse(cssColor.trim())\n if (!color) return false\n const white = parse(\"#ffffff\")!\n const black = parse(\"#000000\")!\n return wcagContrast(color, white) >= wcagContrast(color, black)\n}\n"
3735
+ }
3736
+ ]
3737
+ },
3717
3738
  {
3718
3739
  "name": "deck-registry",
3719
3740
  "type": "registry:lib",
@@ -3723,7 +3744,7 @@
3723
3744
  {
3724
3745
  "path": "lib/deck-registry.ts",
3725
3746
  "type": "registry:lib",
3726
- "content": "import type { ComponentType } from \"react\"\n\n/* ------------------------------------------------------------------ */\n/* Core types — exported for template authors */\n/* ------------------------------------------------------------------ */\n\n/** A single slide entry in a deck registry. */\nexport interface SlideEntry {\n /** Unique slide identifier (used as element id, e.g. \"s-intro\") */\n id: string\n /** Display title shown in dot-nav tooltips and TOC */\n title: string\n /** Section name for TOC grouping. Prefix with \"_\" to exclude from TOC/footer. */\n section: string\n /** The React component to render for this slide */\n component: ComponentType\n}\n\n/** A group of slides sharing the same section name. */\nexport interface DeckSection {\n section: string\n slides: SlideEntry[]\n}\n\n/** Optional extra link for the deck footer. */\nexport interface FooterExtra {\n label: string\n /** Slide id for internal navigation */\n slide?: string\n /** External URL */\n href?: string\n /** Highlight as accent link */\n accent?: boolean\n}\n\n/** Declarative configuration for a slide deck. */\nexport interface DeckRegistry {\n /** Brand/deck description shown in the footer */\n description: string\n /** Ordered list of slide entries */\n slides: SlideEntry[]\n /** Optional extra links appended to the last footer column */\n footerExtras?: FooterExtra[]\n}\n\n/* ------------------------------------------------------------------ */\n/* Utility functions */\n/* ------------------------------------------------------------------ */\n\n/**\n * Group slides by section, excluding sections that start with \"_\".\n */\nexport function getSections(registry: DeckRegistry): DeckSection[] {\n const groups: DeckSection[] = []\n for (const slide of registry.slides) {\n if (slide.section.startsWith(\"_\")) continue\n const existing = groups.find((g) => g.section === slide.section)\n if (existing) {\n existing.slides.push(slide)\n } else {\n groups.push({ section: slide.section, slides: [slide] })\n }\n }\n return groups\n}\n\n/** Footer column shape matching DeckFooterColumn. */\ninterface FooterColumn {\n title: string\n links: FooterExtra[]\n}\n\n/**\n * Build footer columns from registry sections + optional extras.\n */\nexport function getFooterColumns(registry: DeckRegistry): FooterColumn[] {\n const sections = getSections(registry)\n const columns: FooterColumn[] = sections.map((group) => ({\n title: group.section,\n links: group.slides.map((slide) => ({\n label: slide.title,\n slide: slide.id,\n })),\n }))\n\n if (registry.footerExtras?.length && columns.length > 0) {\n const lastCol = columns[columns.length - 1]\n for (const extra of registry.footerExtras) {\n lastCol.links.push(extra)\n }\n }\n\n return columns\n}\n"
3747
+ "content": "import type { ComponentType } from \"react\"\n\n/* ------------------------------------------------------------------ */\n/* Core types — exported for template authors */\n/* ------------------------------------------------------------------ */\n\n/** A single slide entry in a deck registry. */\nexport interface SlideEntry {\n /** Unique slide identifier (used as element id, e.g. \"s-intro\") */\n id: string\n /** Display title shown in dot-nav tooltips and TOC */\n title: string\n /** Section name for TOC grouping. Prefix with \"_\" to exclude from TOC/footer. */\n section: string\n /** The React component to render for this slide */\n component: ComponentType\n}\n\n/** A group of slides sharing the same section name. */\nexport interface DeckSection {\n section: string\n slides: SlideEntry[]\n}\n\n/** Optional extra link for the deck footer. */\nexport interface FooterExtra {\n label: string\n /** Slide id for internal navigation */\n slide?: string\n /** External URL */\n href?: string\n /** Highlight as accent link */\n accent?: boolean\n}\n\n/** Declarative configuration for a slide deck. */\nexport interface DeckRegistry {\n /** Brand/deck description shown in the footer */\n description: string\n /** Ordered list of slide entries */\n slides: SlideEntry[]\n /** Optional extra links appended to the last footer column */\n footerExtras?: FooterExtra[]\n}\n\n/* ------------------------------------------------------------------ */\n/* Utility functions */\n/* ------------------------------------------------------------------ */\n\n/**\n * Group slides by section, excluding sections that start with \"_\".\n */\nexport function getSections(registry: DeckRegistry): DeckSection[] {\n const groups: DeckSection[] = []\n for (const slide of registry.slides) {\n if (slide.section.startsWith(\"_\")) continue\n const existing = groups.find((g) => g.section === slide.section)\n if (existing) {\n existing.slides.push(slide)\n } else {\n groups.push({ section: slide.section, slides: [slide] })\n }\n }\n return groups\n}\n\n/** Footer column shape matching DeckFooterColumn. */\ninterface FooterColumn {\n title: string\n links: FooterExtra[]\n}\n\n/**\n * Build footer columns from registry sections + optional extras.\n */\nexport function getFooterColumns(registry: DeckRegistry): FooterColumn[] {\n const sections = getSections(registry)\n const columns: FooterColumn[] = sections.map((group) => ({\n title: group.section,\n links: group.slides.map((slide) => ({\n label: slide.title,\n slide: slide.id,\n })),\n }))\n\n const lastCol = columns[columns.length - 1]\n if (registry.footerExtras?.length && lastCol) {\n for (const extra of registry.footerExtras) {\n lastCol.links.push(extra)\n }\n }\n\n return columns\n}\n"
3727
3748
  }
3728
3749
  ]
3729
3750
  },
@@ -3793,7 +3814,7 @@
3793
3814
  {
3794
3815
  "path": "hooks/use-slide-engine.ts",
3795
3816
  "type": "registry:hook",
3796
- "content": "\"use client\"\n\nimport { useCallback, useRef } from \"react\"\n\nexport interface UseSlideEngineOptions {\n /** Container element that scrolls */\n containerRef?: React.RefObject<HTMLElement | null>\n sectionsRef: React.RefObject<HTMLElement[]>\n currentIndexRef: React.MutableRefObject<number>\n setCurrentIndex?: (index: number) => void\n}\n\nexport function useSlideEngine({\n containerRef,\n sectionsRef,\n currentIndexRef,\n setCurrentIndex,\n}: UseSlideEngineOptions) {\n const isScrollingRef = useRef(false)\n\n const goTo = useCallback(\n (index: number) => {\n const sections = sectionsRef.current\n if (!sections || index < 0 || index >= sections.length || isScrollingRef.current) return\n\n isScrollingRef.current = true\n currentIndexRef.current = index\n setCurrentIndex?.(index)\n\n const container = containerRef?.current\n const el = sections[index]\n\n // Use native smooth scroll — the browser coordinates with scroll-snap\n // internally, avoiding the stutter caused by rAF + snap fighting.\n if (container) {\n const target = el.offsetTop - container.offsetTop\n container.scrollTo({ top: target, behavior: \"smooth\" })\n } else {\n el.scrollIntoView({ behavior: \"smooth\", block: \"start\" })\n }\n\n el.setAttribute(\"data-deck-visible\", \"true\")\n\n // Unlock after scroll settles (native smooth scroll ~400-600ms)\n setTimeout(() => {\n isScrollingRef.current = false\n }, 600)\n },\n [containerRef, sectionsRef, currentIndexRef, setCurrentIndex]\n )\n\n const navigateTo = useCallback(\n (id: string) => {\n const el = document.getElementById(id)\n if (!el || !sectionsRef.current) return\n const index = sectionsRef.current.indexOf(el)\n if (index >= 0) goTo(index)\n },\n [sectionsRef, goTo]\n )\n\n return { goTo, navigateTo, isScrollingRef }\n}\n"
3817
+ "content": "\"use client\"\n\nimport { useCallback, useRef } from \"react\"\n\nexport interface UseSlideEngineOptions {\n /** Container element that scrolls */\n containerRef?: React.RefObject<HTMLElement | null>\n sectionsRef: React.RefObject<HTMLElement[]>\n currentIndexRef: React.MutableRefObject<number>\n setCurrentIndex?: (index: number) => void\n}\n\nexport function useSlideEngine({\n containerRef,\n sectionsRef,\n currentIndexRef,\n setCurrentIndex,\n}: UseSlideEngineOptions) {\n const isScrollingRef = useRef(false)\n\n const goTo = useCallback(\n (index: number) => {\n const el = sectionsRef.current?.[index]\n if (!el || isScrollingRef.current) return\n\n isScrollingRef.current = true\n currentIndexRef.current = index\n setCurrentIndex?.(index)\n\n const container = containerRef?.current\n\n // Use native smooth scroll — the browser coordinates with scroll-snap\n // internally, avoiding the stutter caused by rAF + snap fighting.\n if (container) {\n const target = el.offsetTop - container.offsetTop\n container.scrollTo({ top: target, behavior: \"smooth\" })\n } else {\n el.scrollIntoView({ behavior: \"smooth\", block: \"start\" })\n }\n\n el.setAttribute(\"data-deck-visible\", \"true\")\n\n // Unlock after scroll settles (native smooth scroll ~400-600ms)\n setTimeout(() => {\n isScrollingRef.current = false\n }, 600)\n },\n [containerRef, sectionsRef, currentIndexRef, setCurrentIndex]\n )\n\n const navigateTo = useCallback(\n (id: string) => {\n const el = document.getElementById(id)\n if (!el || !sectionsRef.current) return\n const index = sectionsRef.current.indexOf(el)\n if (index >= 0) goTo(index)\n },\n [sectionsRef, goTo]\n )\n\n return { goTo, navigateTo, isScrollingRef }\n}\n"
3797
3818
  }
3798
3819
  ]
3799
3820
  },
@@ -3806,7 +3827,7 @@
3806
3827
  {
3807
3828
  "path": "hooks/use-keyboard-nav.ts",
3808
3829
  "type": "registry:hook",
3809
- "content": "\"use client\"\n\nimport { useEffect } from \"react\"\n\nexport interface UseKeyboardNavOptions {\n /** Container element to listen on. Falls back to document if not provided. */\n containerRef?: React.RefObject<HTMLElement | null>\n goTo: (index: number) => void\n currentIndexRef: React.MutableRefObject<number>\n totalSectionsRef: React.MutableRefObject<number>\n}\n\nexport function useKeyboardNav({\n containerRef,\n goTo,\n currentIndexRef,\n totalSectionsRef,\n}: UseKeyboardNavOptions) {\n useEffect(() => {\n const target = containerRef?.current ?? document\n\n function handleKeydown(e: KeyboardEvent) {\n // Let browser handle Cmd+Arrow (back/forward navigation)\n if (e.metaKey && (e.key === \"ArrowLeft\" || e.key === \"ArrowRight\")) {\n return\n }\n if (e.metaKey && e.key === \"ArrowUp\") {\n e.preventDefault()\n goTo(0)\n } else if (e.key === \"ArrowDown\" || e.key === \" \") {\n e.preventDefault()\n goTo(currentIndexRef.current + 1)\n } else if (e.key === \"ArrowUp\") {\n e.preventDefault()\n goTo(currentIndexRef.current - 1)\n } else if (e.key === \"Home\") {\n e.preventDefault()\n goTo(0)\n } else if (e.key === \"End\") {\n e.preventDefault()\n goTo(totalSectionsRef.current - 1)\n }\n }\n\n target.addEventListener(\"keydown\", handleKeydown as EventListener)\n return () => target.removeEventListener(\"keydown\", handleKeydown as EventListener)\n }, [containerRef, goTo, currentIndexRef, totalSectionsRef])\n}\n"
3830
+ "content": "\"use client\"\n\nimport { useEffect } from \"react\"\n\nexport interface UseKeyboardNavOptions {\n /** Container element to listen on. Falls back to document if not provided. */\n containerRef?: React.RefObject<HTMLElement | null>\n goTo: (index: number) => void\n currentIndexRef: React.MutableRefObject<number>\n totalSectionsRef: React.MutableRefObject<number>\n}\n\n/** Focused controls that use these keys themselves (typing, radio/tab/toggle groups, sliders, selects). */\nconst OWNS_KEYS =\n 'input, textarea, select, [contenteditable]:not([contenteditable=\"false\"]), [role=\"slider\"], [role=\"combobox\"], [role=\"spinbutton\"], [role=\"listbox\"], [role=\"menu\"], [data-radix-collection-item]'\n\nexport function useKeyboardNav({\n containerRef,\n goTo,\n currentIndexRef,\n totalSectionsRef,\n}: UseKeyboardNavOptions) {\n useEffect(() => {\n const target = containerRef?.current ?? document\n\n function handleKeydown(e: KeyboardEvent) {\n if (e.target instanceof Element && e.target.closest(OWNS_KEYS)) return\n // Let browser handle Cmd+Arrow (back/forward navigation)\n if (e.metaKey && (e.key === \"ArrowLeft\" || e.key === \"ArrowRight\")) {\n return\n }\n if (e.metaKey && e.key === \"ArrowUp\") {\n e.preventDefault()\n goTo(0)\n } else if (e.key === \"ArrowDown\" || e.key === \" \") {\n e.preventDefault()\n goTo(currentIndexRef.current + 1)\n } else if (e.key === \"ArrowUp\") {\n e.preventDefault()\n goTo(currentIndexRef.current - 1)\n } else if (e.key === \"Home\") {\n e.preventDefault()\n goTo(0)\n } else if (e.key === \"End\") {\n e.preventDefault()\n goTo(totalSectionsRef.current - 1)\n }\n }\n\n target.addEventListener(\"keydown\", handleKeydown as EventListener)\n return () => target.removeEventListener(\"keydown\", handleKeydown as EventListener)\n }, [containerRef, goTo, currentIndexRef, totalSectionsRef])\n}\n"
3810
3831
  }
3811
3832
  ]
3812
3833
  },
@@ -3857,7 +3878,7 @@
3857
3878
  {
3858
3879
  "path": "components/deck/slide/slide.module.css",
3859
3880
  "type": "registry:ui",
3860
- "content": ".slide {\n position: relative;\n width: 100%;\n min-height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n padding: 5vh 8vw;\n scroll-snap-align: start;\n overflow: hidden;\n background-color: var(--surface-page, #ffffff);\n color: var(--text-primary, #111827);\n}\n\n.center {\n justify-content: center;\n align-items: center;\n text-align: center;\n}\n\n.flush {\n padding: 0;\n}\n\n.dark {\n color: var(--text-on-dark, #f9fafb);\n}\n\n.hero {\n justify-content: flex-end;\n padding-bottom: 8vh;\n}\n\n.photo {\n padding: 0;\n justify-content: center;\n align-items: center;\n}\n\n.bgImage {\n padding: 0;\n justify-content: center;\n align-items: center;\n}\n\n/* Hero background image */\n.heroBg {\n position: absolute;\n inset: 0;\n background-size: cover;\n background-position: center;\n z-index: 0;\n}\n\n.heroOverlay {\n position: absolute;\n inset: 0;\n background: linear-gradient(\n to top,\n var(--color-primary-900, #111827) 0%,\n rgba(17, 24, 39, 0.6) 40%,\n transparent 100%\n );\n z-index: 1;\n}\n\n.heroContent {\n position: relative;\n z-index: 2;\n}\n\n/* Full-bleed background image */\n.bgImg {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n z-index: 0;\n}\n\n.bgOverlay {\n position: absolute;\n inset: 0;\n background: rgba(17, 24, 39, 0.4);\n z-index: 1;\n}\n\n/* Animation: fade in when slide becomes visible */\n.slide [data-deck-animate] {\n opacity: 0;\n transform: translateY(24px);\n transition:\n opacity var(--motion-duration-normal, 500ms) var(--motion-easing-standard, cubic-bezier(0.4, 0, 0.2, 1)),\n transform var(--motion-duration-normal, 500ms) var(--motion-easing-standard, cubic-bezier(0.4, 0, 0.2, 1));\n}\n\n:global([data-deck-visible=\"true\"]) [data-deck-animate] {\n opacity: 1;\n transform: translateY(0);\n}\n"
3881
+ "content": ".slide {\n position: relative;\n width: 100%;\n min-height: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n padding: 5vh 8vw;\n scroll-snap-align: start;\n overflow: hidden;\n background-color: var(--surface-page, #ffffff);\n color: var(--text-primary, #111827);\n}\n\n.center {\n justify-content: center;\n align-items: center;\n text-align: center;\n}\n\n.flush {\n padding: 0;\n}\n\n.dark {\n color: var(--text-on-dark, #f9fafb);\n}\n\n.hero {\n justify-content: flex-end;\n padding-bottom: 8vh;\n}\n\n.photo {\n padding: 0;\n justify-content: center;\n align-items: center;\n}\n\n.bgImage {\n padding: 0;\n justify-content: center;\n align-items: center;\n}\n\n/* Hero background image */\n.heroBg {\n position: absolute;\n inset: 0;\n background-size: cover;\n background-position: center;\n z-index: 0;\n}\n\n.heroOverlay {\n position: absolute;\n inset: 0;\n background: linear-gradient(\n to top,\n var(--color-primary-900, #111827) 0%,\n rgba(17, 24, 39, 0.6) 40%,\n transparent 100%\n );\n z-index: 1;\n}\n\n.heroContent {\n position: relative;\n z-index: 2;\n}\n\n/* Full-bleed background image */\n.bgImg {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n z-index: 0;\n}\n\n.bgOverlay {\n position: absolute;\n inset: 0;\n background: rgba(17, 24, 39, 0.4);\n z-index: 1;\n}\n\n/* Animation: fade in when slide becomes visible */\n.slide [data-deck-animate] {\n opacity: 0;\n transform: translateY(24px);\n transition:\n opacity var(--motion-duration-normal, 500ms) var(--motion-easing-standard, cubic-bezier(0.4, 0, 0.2, 1)),\n transform var(--motion-duration-normal, 500ms) var(--motion-easing-standard, cubic-bezier(0.4, 0, 0.2, 1));\n}\n\n:global([data-deck-visible=\"true\"]) [data-deck-animate] {\n opacity: 1;\n transform: translateY(0);\n}\n"
3861
3882
  }
3862
3883
  ]
3863
3884
  },
@@ -4111,12 +4132,12 @@
4111
4132
  {
4112
4133
  "path": "components/deck/deck-layout/deck-layout.tsx",
4113
4134
  "type": "registry:ui",
4114
- "content": "\"use client\"\n\nimport {\n type ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\"\nimport { DeckProvider } from \"../deck-context/deck-context\"\nimport { DotNav } from \"../dot-nav/dot-nav\"\nimport { useSlideEngine } from \"../../../hooks/use-slide-engine\"\nimport { useIntersectionAnimation } from \"../../../hooks/use-intersection-animation\"\nimport { useKeyboardNav } from \"../../../hooks/use-keyboard-nav\"\nimport { useWheelNav } from \"../../../hooks/use-wheel-nav\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./deck-layout.module.css\"\n\nexport interface DeckLayoutProps {\n children: ReactNode\n /** Slide titles for dot-nav tooltips */\n slideTitles?: string[]\n /** Optional render prop for custom controls (e.g., export menu) */\n controls?: (props: {\n containerRef: React.RefObject<HTMLDivElement | null>\n currentIndex: number\n variant: \"light\" | \"dark\"\n }) => ReactNode\n className?: string\n}\n\nexport function DeckLayout({\n children,\n slideTitles,\n controls,\n className,\n}: DeckLayoutProps) {\n const containerRef = useRef<HTMLDivElement>(null)\n const sectionsRef = useRef<HTMLElement[]>([])\n const currentIndexRef = useRef(0)\n const totalSectionsRef = useRef(0)\n const [currentIndex, setCurrentIndex] = useState(0)\n const [slideCount, setSlideCount] = useState(0)\n const [currentTheme, setCurrentTheme] = useState<\"light\" | \"dark\">(\"light\")\n\n const updateCurrentIndex = useCallback((index: number) => {\n currentIndexRef.current = index\n setCurrentIndex(index)\n const el = sectionsRef.current[index]\n const dotNav = el?.dataset.dotNav\n const theme = (dotNav ?? el?.dataset.theme) === \"dark\" ? \"dark\" : \"light\"\n setCurrentTheme(theme)\n }, [])\n\n useEffect(() => {\n const container = containerRef.current\n if (!container) return\n const elements = Array.from(\n container.querySelectorAll('[data-slot=\"slide\"], [data-slot=\"deck-footer\"]')\n ) as HTMLElement[]\n sectionsRef.current = elements\n totalSectionsRef.current = elements.length\n setSlideCount(\n elements.filter((el) => el.getAttribute(\"data-slot\") === \"slide\").length\n )\n const first = elements[0]\n setCurrentTheme(\n (first?.dataset.dotNav ?? first?.dataset.theme) === \"dark\" ? \"dark\" : \"light\"\n )\n }, [])\n\n const { goTo, navigateTo, isScrollingRef } = useSlideEngine({\n containerRef,\n sectionsRef,\n currentIndexRef,\n setCurrentIndex: updateCurrentIndex,\n })\n\n useIntersectionAnimation({\n sectionsRef,\n currentIndexRef,\n setCurrentIndex: updateCurrentIndex,\n isScrollingRef,\n })\n\n useKeyboardNav({ containerRef, goTo, currentIndexRef, totalSectionsRef })\n useWheelNav({ containerRef, goTo, currentIndexRef })\n\n // Focus/blur container based on fullscreen state so keyboard nav\n // only captures arrow keys during presentation mode\n useEffect(() => {\n const container = containerRef.current\n if (!container) return\n\n const observer = new MutationObserver(() => {\n const isFullscreen = container.closest(\"[data-fullscreen='true']\") !== null\n if (isFullscreen) {\n container.focus()\n } else {\n container.blur()\n }\n })\n\n // Observe ancestors for data-fullscreen changes\n const previewContainer = container.closest(\".preview-container\")\n if (previewContainer) {\n observer.observe(previewContainer, { attributes: true, attributeFilter: [\"data-fullscreen\"] })\n }\n\n return () => observer.disconnect()\n }, [])\n\n const deckValue = useMemo(() => ({ goTo, navigateTo }), [goTo, navigateTo])\n\n return (\n <DeckProvider value={deckValue}>\n <DotNav\n slideCount={slideCount}\n currentIndex={currentIndex}\n onDotClick={goTo}\n variant={currentTheme}\n titles={slideTitles}\n />\n {controls?.({ containerRef, currentIndex, variant: currentTheme })}\n <div\n ref={containerRef}\n data-slot=\"deck-layout\"\n className={cn(styles.container, className)}\n tabIndex={0}\n style={{ outline: 'none' }}\n >\n {children}\n </div>\n </DeckProvider>\n )\n}\n"
4135
+ "content": "\"use client\"\n\nimport {\n type ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\"\nimport { DeckProvider } from \"../deck-context/deck-context\"\nimport { DotNav } from \"../dot-nav/dot-nav\"\nimport { useSlideEngine } from \"../../../hooks/use-slide-engine\"\nimport { useIntersectionAnimation } from \"../../../hooks/use-intersection-animation\"\nimport { useKeyboardNav } from \"../../../hooks/use-keyboard-nav\"\nimport { useWheelNav } from \"../../../hooks/use-wheel-nav\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./deck-layout.module.css\"\n\nexport interface DeckLayoutProps {\n children: ReactNode\n /** Slide titles for dot-nav tooltips */\n slideTitles?: string[]\n /** Optional render prop for custom controls (e.g., export menu) */\n controls?: (props: {\n containerRef: React.RefObject<HTMLDivElement | null>\n currentIndex: number\n variant: \"light\" | \"dark\"\n }) => ReactNode\n className?: string\n}\n\nexport function DeckLayout({\n children,\n slideTitles,\n controls,\n className,\n}: DeckLayoutProps) {\n const containerRef = useRef<HTMLDivElement>(null)\n const sectionsRef = useRef<HTMLElement[]>([])\n const currentIndexRef = useRef(0)\n const totalSectionsRef = useRef(0)\n const [currentIndex, setCurrentIndex] = useState(0)\n const [slideCount, setSlideCount] = useState(0)\n const [currentTheme, setCurrentTheme] = useState<\"light\" | \"dark\">(\"light\")\n\n const updateCurrentIndex = useCallback((index: number) => {\n currentIndexRef.current = index\n setCurrentIndex(index)\n const el = sectionsRef.current[index]\n const dotNav = el?.dataset.dotNav\n const theme = (dotNav ?? el?.dataset.theme) === \"dark\" ? \"dark\" : \"light\"\n setCurrentTheme(theme)\n }, [])\n\n useEffect(() => {\n const container = containerRef.current\n if (!container) return\n const elements = Array.from(\n container.querySelectorAll('[data-slot=\"slide\"], [data-slot=\"deck-footer\"]')\n ) as HTMLElement[]\n sectionsRef.current = elements\n totalSectionsRef.current = elements.length\n setSlideCount(\n elements.filter((el) => el.getAttribute(\"data-slot\") === \"slide\").length\n )\n const first = elements[0]\n setCurrentTheme(\n (first?.dataset.dotNav ?? first?.dataset.theme) === \"dark\" ? \"dark\" : \"light\"\n )\n }, [])\n\n const { goTo, navigateTo, isScrollingRef } = useSlideEngine({\n containerRef,\n sectionsRef,\n currentIndexRef,\n setCurrentIndex: updateCurrentIndex,\n })\n\n useIntersectionAnimation({\n sectionsRef,\n currentIndexRef,\n setCurrentIndex: updateCurrentIndex,\n isScrollingRef,\n })\n\n useKeyboardNav({ containerRef, goTo, currentIndexRef, totalSectionsRef })\n useWheelNav({ containerRef, goTo, currentIndexRef })\n\n // Focus/blur container based on fullscreen state so keyboard nav\n // only captures arrow keys during presentation mode\n useEffect(() => {\n const container = containerRef.current\n if (!container) return\n\n const observer = new MutationObserver(() => {\n const isFullscreen = container.closest(\"[data-fullscreen='true']\") !== null\n if (isFullscreen) {\n container.focus()\n } else {\n container.blur()\n }\n })\n\n // Observe ancestors for data-fullscreen changes\n const previewContainer = container.closest(\".preview-container\")\n if (previewContainer) {\n observer.observe(previewContainer, { attributes: true, attributeFilter: [\"data-fullscreen\"] })\n }\n\n return () => observer.disconnect()\n }, [])\n\n // A deck that fills the viewport is the page, so it owns the arrow keys from\n // the start. An embedded deck (a docs preview) leaves the page's keys alone.\n useEffect(() => {\n const container = containerRef.current\n if (container && container.getBoundingClientRect().height >= window.innerHeight - 1) {\n container.focus({ preventScroll: true })\n }\n }, [])\n\n // A dot click moves focus to the dot, outside the container; hand it back.\n const handleDotClick = useCallback(\n (index: number) => {\n goTo(index)\n containerRef.current?.focus({ preventScroll: true })\n },\n [goTo]\n )\n\n const deckValue = useMemo(() => ({ goTo, navigateTo }), [goTo, navigateTo])\n\n return (\n <DeckProvider value={deckValue}>\n <DotNav\n slideCount={slideCount}\n currentIndex={currentIndex}\n onDotClick={handleDotClick}\n variant={currentTheme}\n titles={slideTitles}\n />\n {controls?.({ containerRef, currentIndex, variant: currentTheme })}\n <div\n ref={containerRef}\n data-slot=\"deck-layout\"\n className={cn(styles.container, className)}\n tabIndex={0}\n style={{ outline: 'none' }}\n >\n {children}\n </div>\n </DeckProvider>\n )\n}\n"
4115
4136
  },
4116
4137
  {
4117
4138
  "path": "components/deck/deck-layout/deck-layout.module.css",
4118
4139
  "type": "registry:ui",
4119
- "content": ".container {\n position: relative;\n width: 100%;\n height: 100%;\n overflow-y: auto;\n scroll-snap-type: y mandatory;\n scroll-behavior: smooth;\n overscroll-behavior: contain;\n}\n"
4140
+ "content": ".container {\n position: relative;\n width: 100%;\n /* Fills the viewport on a bare page; a sized parent caps it (a percentage\n max-height against an auto-height parent resolves to none). */\n height: 100dvh;\n max-height: 100%;\n overflow-y: auto;\n scroll-snap-type: y mandatory;\n scroll-behavior: smooth;\n overscroll-behavior: contain;\n}\n\n/* Slides size padding inside width:100%. Don't rely on the host having a\n border-box reset; zero specificity so any component's own rule wins. */\n:where(.container),\n:where(.container) *,\n:where(.container) *::before,\n:where(.container) *::after {\n box-sizing: border-box;\n}\n"
4120
4141
  }
4121
4142
  ]
4122
4143
  },
@@ -4149,7 +4170,7 @@
4149
4170
  {
4150
4171
  "path": "lib/deck-registry.ts",
4151
4172
  "type": "registry:lib",
4152
- "content": "import type { ComponentType } from \"react\"\n\n/* ------------------------------------------------------------------ */\n/* Core types — exported for template authors */\n/* ------------------------------------------------------------------ */\n\n/** A single slide entry in a deck registry. */\nexport interface SlideEntry {\n /** Unique slide identifier (used as element id, e.g. \"s-intro\") */\n id: string\n /** Display title shown in dot-nav tooltips and TOC */\n title: string\n /** Section name for TOC grouping. Prefix with \"_\" to exclude from TOC/footer. */\n section: string\n /** The React component to render for this slide */\n component: ComponentType\n}\n\n/** A group of slides sharing the same section name. */\nexport interface DeckSection {\n section: string\n slides: SlideEntry[]\n}\n\n/** Optional extra link for the deck footer. */\nexport interface FooterExtra {\n label: string\n /** Slide id for internal navigation */\n slide?: string\n /** External URL */\n href?: string\n /** Highlight as accent link */\n accent?: boolean\n}\n\n/** Declarative configuration for a slide deck. */\nexport interface DeckRegistry {\n /** Brand/deck description shown in the footer */\n description: string\n /** Ordered list of slide entries */\n slides: SlideEntry[]\n /** Optional extra links appended to the last footer column */\n footerExtras?: FooterExtra[]\n}\n\n/* ------------------------------------------------------------------ */\n/* Utility functions */\n/* ------------------------------------------------------------------ */\n\n/**\n * Group slides by section, excluding sections that start with \"_\".\n */\nexport function getSections(registry: DeckRegistry): DeckSection[] {\n const groups: DeckSection[] = []\n for (const slide of registry.slides) {\n if (slide.section.startsWith(\"_\")) continue\n const existing = groups.find((g) => g.section === slide.section)\n if (existing) {\n existing.slides.push(slide)\n } else {\n groups.push({ section: slide.section, slides: [slide] })\n }\n }\n return groups\n}\n\n/** Footer column shape matching DeckFooterColumn. */\ninterface FooterColumn {\n title: string\n links: FooterExtra[]\n}\n\n/**\n * Build footer columns from registry sections + optional extras.\n */\nexport function getFooterColumns(registry: DeckRegistry): FooterColumn[] {\n const sections = getSections(registry)\n const columns: FooterColumn[] = sections.map((group) => ({\n title: group.section,\n links: group.slides.map((slide) => ({\n label: slide.title,\n slide: slide.id,\n })),\n }))\n\n if (registry.footerExtras?.length && columns.length > 0) {\n const lastCol = columns[columns.length - 1]\n for (const extra of registry.footerExtras) {\n lastCol.links.push(extra)\n }\n }\n\n return columns\n}\n"
4173
+ "content": "import type { ComponentType } from \"react\"\n\n/* ------------------------------------------------------------------ */\n/* Core types — exported for template authors */\n/* ------------------------------------------------------------------ */\n\n/** A single slide entry in a deck registry. */\nexport interface SlideEntry {\n /** Unique slide identifier (used as element id, e.g. \"s-intro\") */\n id: string\n /** Display title shown in dot-nav tooltips and TOC */\n title: string\n /** Section name for TOC grouping. Prefix with \"_\" to exclude from TOC/footer. */\n section: string\n /** The React component to render for this slide */\n component: ComponentType\n}\n\n/** A group of slides sharing the same section name. */\nexport interface DeckSection {\n section: string\n slides: SlideEntry[]\n}\n\n/** Optional extra link for the deck footer. */\nexport interface FooterExtra {\n label: string\n /** Slide id for internal navigation */\n slide?: string\n /** External URL */\n href?: string\n /** Highlight as accent link */\n accent?: boolean\n}\n\n/** Declarative configuration for a slide deck. */\nexport interface DeckRegistry {\n /** Brand/deck description shown in the footer */\n description: string\n /** Ordered list of slide entries */\n slides: SlideEntry[]\n /** Optional extra links appended to the last footer column */\n footerExtras?: FooterExtra[]\n}\n\n/* ------------------------------------------------------------------ */\n/* Utility functions */\n/* ------------------------------------------------------------------ */\n\n/**\n * Group slides by section, excluding sections that start with \"_\".\n */\nexport function getSections(registry: DeckRegistry): DeckSection[] {\n const groups: DeckSection[] = []\n for (const slide of registry.slides) {\n if (slide.section.startsWith(\"_\")) continue\n const existing = groups.find((g) => g.section === slide.section)\n if (existing) {\n existing.slides.push(slide)\n } else {\n groups.push({ section: slide.section, slides: [slide] })\n }\n }\n return groups\n}\n\n/** Footer column shape matching DeckFooterColumn. */\ninterface FooterColumn {\n title: string\n links: FooterExtra[]\n}\n\n/**\n * Build footer columns from registry sections + optional extras.\n */\nexport function getFooterColumns(registry: DeckRegistry): FooterColumn[] {\n const sections = getSections(registry)\n const columns: FooterColumn[] = sections.map((group) => ({\n title: group.section,\n links: group.slides.map((slide) => ({\n label: slide.title,\n slide: slide.id,\n })),\n }))\n\n const lastCol = columns[columns.length - 1]\n if (registry.footerExtras?.length && lastCol) {\n for (const extra of registry.footerExtras) {\n lastCol.links.push(extra)\n }\n }\n\n return columns\n}\n"
4153
4174
  }
4154
4175
  ]
4155
4176
  },
@@ -4673,8 +4694,10 @@
4673
4694
  "button",
4674
4695
  "card",
4675
4696
  "checkbox",
4697
+ "color-bar",
4676
4698
  "color-swatch",
4677
4699
  "deck-renderer",
4700
+ "design-system-specimen",
4678
4701
  "elevation-card",
4679
4702
  "heading",
4680
4703
  "icon-grid",
@@ -4687,7 +4710,7 @@
4687
4710
  "select",
4688
4711
  "separator",
4689
4712
  "slide",
4690
- "slide-header",
4713
+ "deck-slide-header",
4691
4714
  "spacing-scale",
4692
4715
  "surface-row",
4693
4716
  "switch",
@@ -4775,7 +4798,7 @@
4775
4798
  {
4776
4799
  "path": "blocks/design-system-deck/slides/icons-slide.tsx",
4777
4800
  "type": "registry:block",
4778
- "content": "import * as React from \"react\"\nimport { Slide } from \"../../../components/deck/slide/slide\"\nimport { SlideHeader } from \"../../../components/deck/slide-header/slide-header\"\nimport { Text } from \"../../../components/ui/text/text\"\nimport { IconGrid, IconSizeRow } from \"../../../components/ui/icon-grid/icon-grid\"\nimport { House } from \"@phosphor-icons/react\"\nimport { ICON_SPECIMENS, ICON_SIZES } from \"../../design-system-specimen/specimen-data\"\nimport { ICON_MAP } from \"../../design-system-specimen/icon-map\"\nimport styles from \"./slides.module.css\"\n\nexport function IconsSlide() {\n const gridItems = ICON_SPECIMENS\n .filter((icon) => ICON_MAP[icon.phosphorName])\n .map((icon) => {\n const IconComponent = ICON_MAP[icon.phosphorName]\n return {\n name: icon.name,\n usage: icon.usage,\n icon: <IconComponent size={24} />,\n }\n })\n\n return (\n <Slide id=\"s-icons\">\n <SlideHeader\n subtitle=\"Utility\"\n title=\"Icons\"\n description=\"Phosphor icons at multiple sizes. All icons from @phosphor-icons/react.\"\n />\n\n <div className={styles.content}>\n <div className={styles.iconSubsection}>\n <Text weight=\"medium\" size=\"sm\" as=\"div\">Size Scale</Text>\n <IconSizeRow\n sizes={ICON_SIZES.map((size) => ({\n size,\n icon: <House size={size} />,\n }))}\n />\n </div>\n\n <div className={styles.iconSubsection}>\n <Text weight=\"medium\" size=\"sm\" as=\"div\">Icon Map</Text>\n <IconGrid icons={gridItems} />\n </div>\n </div>\n </Slide>\n )\n}\n"
4801
+ "content": "import * as React from \"react\"\nimport { Slide } from \"../../../components/deck/slide/slide\"\nimport { SlideHeader } from \"../../../components/deck/slide-header/slide-header\"\nimport { Text } from \"../../../components/ui/text/text\"\nimport { IconGrid, IconSizeRow } from \"../../../components/ui/icon-grid/icon-grid\"\nimport { House } from \"@phosphor-icons/react\"\nimport { ICON_SPECIMENS, ICON_SIZES } from \"../../design-system-specimen/specimen-data\"\nimport { ICON_MAP } from \"../../design-system-specimen/icon-map\"\nimport styles from \"./slides.module.css\"\n\nexport function IconsSlide() {\n const gridItems = ICON_SPECIMENS\n .flatMap((icon) => {\n const IconComponent = ICON_MAP[icon.phosphorName]\n if (!IconComponent) return []\n return [{\n name: icon.name,\n usage: icon.usage,\n icon: <IconComponent size={24} />,\n }]\n })\n\n return (\n <Slide id=\"s-icons\">\n <SlideHeader\n subtitle=\"Utility\"\n title=\"Icons\"\n description=\"Phosphor icons at multiple sizes. All icons from @phosphor-icons/react.\"\n />\n\n <div className={styles.content}>\n <div className={styles.iconSubsection}>\n <Text weight=\"medium\" size=\"sm\" as=\"div\">Size Scale</Text>\n <IconSizeRow\n sizes={ICON_SIZES.map((size) => ({\n size,\n icon: <House size={size} />,\n }))}\n />\n </div>\n\n <div className={styles.iconSubsection}>\n <Text weight=\"medium\" size=\"sm\" as=\"div\">Icon Map</Text>\n <IconGrid icons={gridItems} />\n </div>\n </div>\n </Slide>\n )\n}\n"
4779
4802
  },
4780
4803
  {
4781
4804
  "path": "blocks/design-system-deck/slides/accessibility-slide.tsx",
@@ -4837,8 +4860,10 @@
4837
4860
  "button",
4838
4861
  "card",
4839
4862
  "checkbox",
4863
+ "color-bar",
4840
4864
  "color-swatch",
4841
4865
  "elevation-card",
4866
+ "font-showcase",
4842
4867
  "heading",
4843
4868
  "icon-grid",
4844
4869
  "input",
@@ -4863,7 +4888,7 @@
4863
4888
  {
4864
4889
  "path": "blocks/design-system-specimen/design-system-specimen.tsx",
4865
4890
  "type": "registry:block",
4866
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\nimport { Heading } from \"../../components/ui/heading/heading\"\nimport { Text } from \"../../components/ui/text/text\"\nimport { Separator } from \"../../components/ui/separator/separator\"\nimport styles from \"./design-system-specimen.module.css\"\n\nimport {\n ColorPaletteSection,\n TypographySection,\n SpacingSection,\n ShadowSection,\n SurfaceSection,\n RadiusSection,\n} from \"./token-specimens\"\nimport { MotionDurationSection, MotionEasingSection } from \"./motion-specimens\"\nimport { IconGridSection, AccessibilitySection } from \"./utility-specimens\"\nimport {\n ButtonSpecimenSection,\n FormSpecimenSection,\n ComponentShowcaseSection,\n} from \"./component-specimens\"\nimport {\n THEME_COLOR_SCALES,\n STATUS_COLOR_SCALES,\n SEMANTIC_COLORS,\n FONT_FAMILIES,\n TYPE_SPECIMENS,\n SPACING_STEPS,\n SHADOW_LEVELS,\n SURFACES,\n RADIUS_STEPS,\n MOTION_DURATIONS,\n EASINGS,\n CONTRAST_PAIRS,\n ICON_SPECIMENS,\n deriveFontFamiliesFromTypography,\n type FontFamilyData,\n type ThemeTypographyManifest,\n} from \"./specimen-data\"\n\n/**\n * Subset of the docs-site PRIVATE_THEMES manifest the specimen consumes.\n * Only `slug` + `typography` are required — `label`/`group` are accepted to\n * keep callers from having to remap their manifest objects (VI-356).\n */\nexport interface DesignSystemSpecimenThemeEntry {\n slug: string\n typography?: ThemeTypographyManifest\n}\n\ninterface DesignSystemSpecimenProps {\n className?: string\n /**\n * Optional theme manifest. When provided alongside an active `*-theme` body\n * class that matches an entry's slug, the Font Families specimen renders\n * the theme's actual loaded weights instead of the hardcoded defaults. If\n * absent or no slug matches, defaults are used. VI-356.\n */\n themeManifest?: DesignSystemSpecimenThemeEntry[]\n /**\n * Optional override for the Font Families specimen rows. Takes precedence\n * over `themeManifest` resolution — useful for tests and one-off renders.\n */\n fontFamilies?: FontFamilyData[]\n}\n\nconst THEME_CLASS_PATTERN = /(^|\\s)([\\w-]+)-theme(?=\\s|$)/\n\n/**\n * Reads the active theme slug from `body.className` (`{slug}-theme`) and\n * re-syncs whenever the docs site fires `visor-theme-change` or whenever\n * <body>'s class attribute mutates. Returns null in non-browser contexts.\n */\nfunction useActiveThemeSlug(): string | null {\n const [slug, setSlug] = React.useState<string | null>(null)\n\n React.useEffect(() => {\n if (typeof document === \"undefined\") return undefined\n const body = document.body\n\n function read() {\n const match = body.className.match(THEME_CLASS_PATTERN)\n setSlug(match ? match[2] : null)\n }\n read()\n\n const handler = () => read()\n document.addEventListener(\"visor-theme-change\", handler)\n const obs = new MutationObserver(read)\n obs.observe(body, { attributes: true, attributeFilter: [\"class\"] })\n\n return () => {\n document.removeEventListener(\"visor-theme-change\", handler)\n obs.disconnect()\n }\n }, [])\n\n return slug\n}\n\n/**\n * Design System Specimen\n *\n * A live, interactive design system specimen block that showcases\n * the full Visor token system and component library.\n * Responds dynamically to the active theme.\n */\nexport function DesignSystemSpecimen({\n className,\n themeManifest,\n fontFamilies,\n}: DesignSystemSpecimenProps) {\n const activeSlug = useActiveThemeSlug()\n\n const resolvedFontFamilies = React.useMemo<FontFamilyData[]>(() => {\n if (fontFamilies) return fontFamilies\n if (!themeManifest || !activeSlug) return FONT_FAMILIES\n const entry = themeManifest.find((t) => t.slug === activeSlug)\n return deriveFontFamiliesFromTypography(entry?.typography, FONT_FAMILIES)\n }, [fontFamilies, themeManifest, activeSlug])\n\n return (\n <div className={cn(styles.root, className)}>\n <div>\n <Heading level={2}>Design System Specimen</Heading>\n <Text color=\"secondary\">\n A live showcase of all Visor design tokens and components.\n Switch themes to see everything update in real-time.\n </Text>\n </div>\n\n <Separator />\n\n <ColorPaletteSection themeScales={THEME_COLOR_SCALES} statusScales={STATUS_COLOR_SCALES} semanticColors={SEMANTIC_COLORS} />\n <Separator />\n\n <TypographySection fontFamilies={resolvedFontFamilies} specimens={TYPE_SPECIMENS} />\n <Separator />\n\n <SpacingSection steps={SPACING_STEPS} />\n <Separator />\n\n <ShadowSection levels={SHADOW_LEVELS} />\n <Separator />\n\n <SurfaceSection surfaces={SURFACES} />\n <Separator />\n\n <RadiusSection steps={RADIUS_STEPS} />\n <Separator />\n\n <MotionDurationSection durations={MOTION_DURATIONS} />\n <Separator />\n\n <MotionEasingSection easings={EASINGS} />\n <Separator />\n\n <IconGridSection icons={ICON_SPECIMENS} />\n <Separator />\n\n <AccessibilitySection pairs={CONTRAST_PAIRS} />\n <Separator />\n\n <ButtonSpecimenSection />\n <Separator />\n\n <FormSpecimenSection />\n <Separator />\n\n <ComponentShowcaseSection />\n </div>\n )\n}\n"
4891
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\nimport { Heading } from \"../../components/ui/heading/heading\"\nimport { Text } from \"../../components/ui/text/text\"\nimport { Separator } from \"../../components/ui/separator/separator\"\nimport styles from \"./design-system-specimen.module.css\"\n\nimport {\n ColorPaletteSection,\n TypographySection,\n SpacingSection,\n ShadowSection,\n SurfaceSection,\n RadiusSection,\n} from \"./token-specimens\"\nimport { MotionDurationSection, MotionEasingSection } from \"./motion-specimens\"\nimport { IconGridSection, AccessibilitySection } from \"./utility-specimens\"\nimport {\n ButtonSpecimenSection,\n FormSpecimenSection,\n ComponentShowcaseSection,\n} from \"./component-specimens\"\nimport {\n THEME_COLOR_SCALES,\n STATUS_COLOR_SCALES,\n SEMANTIC_COLORS,\n FONT_FAMILIES,\n TYPE_SPECIMENS,\n SPACING_STEPS,\n SHADOW_LEVELS,\n SURFACES,\n RADIUS_STEPS,\n MOTION_DURATIONS,\n EASINGS,\n CONTRAST_PAIRS,\n ICON_SPECIMENS,\n deriveFontFamiliesFromTypography,\n type FontFamilyData,\n type ThemeTypographyManifest,\n} from \"./specimen-data\"\n\n/**\n * Subset of the docs-site PRIVATE_THEMES manifest the specimen consumes.\n * Only `slug` + `typography` are required — `label`/`group` are accepted to\n * keep callers from having to remap their manifest objects (VI-356).\n */\nexport interface DesignSystemSpecimenThemeEntry {\n slug: string\n typography?: ThemeTypographyManifest\n}\n\ninterface DesignSystemSpecimenProps {\n className?: string\n /**\n * Optional theme manifest. When provided alongside an active `*-theme` body\n * class that matches an entry's slug, the Font Families specimen renders\n * the theme's actual loaded weights instead of the hardcoded defaults. If\n * absent or no slug matches, defaults are used. VI-356.\n */\n themeManifest?: DesignSystemSpecimenThemeEntry[]\n /**\n * Optional override for the Font Families specimen rows. Takes precedence\n * over `themeManifest` resolution — useful for tests and one-off renders.\n */\n fontFamilies?: FontFamilyData[]\n}\n\nconst THEME_CLASS_PATTERN = /(^|\\s)([\\w-]+)-theme(?=\\s|$)/\n\n/**\n * Reads the active theme slug from `body.className` (`{slug}-theme`) and\n * re-syncs whenever the docs site fires `visor-theme-change` or whenever\n * <body>'s class attribute mutates. Returns null in non-browser contexts.\n */\nfunction useActiveThemeSlug(): string | null {\n const [slug, setSlug] = React.useState<string | null>(null)\n\n React.useEffect(() => {\n if (typeof document === \"undefined\") return undefined\n const body = document.body\n\n function read() {\n const match = body.className.match(THEME_CLASS_PATTERN)\n setSlug(match?.[2] ?? null)\n }\n read()\n\n const handler = () => read()\n document.addEventListener(\"visor-theme-change\", handler)\n const obs = new MutationObserver(read)\n obs.observe(body, { attributes: true, attributeFilter: [\"class\"] })\n\n return () => {\n document.removeEventListener(\"visor-theme-change\", handler)\n obs.disconnect()\n }\n }, [])\n\n return slug\n}\n\n/**\n * Design System Specimen\n *\n * A live, interactive design system specimen block that showcases\n * the full Visor token system and component library.\n * Responds dynamically to the active theme.\n */\nexport function DesignSystemSpecimen({\n className,\n themeManifest,\n fontFamilies,\n}: DesignSystemSpecimenProps) {\n const activeSlug = useActiveThemeSlug()\n\n const resolvedFontFamilies = React.useMemo<FontFamilyData[]>(() => {\n if (fontFamilies) return fontFamilies\n if (!themeManifest || !activeSlug) return FONT_FAMILIES\n const entry = themeManifest.find((t) => t.slug === activeSlug)\n return deriveFontFamiliesFromTypography(entry?.typography, FONT_FAMILIES)\n }, [fontFamilies, themeManifest, activeSlug])\n\n return (\n <div className={cn(styles.root, className)}>\n <div>\n <Heading level={2}>Design System Specimen</Heading>\n <Text color=\"secondary\">\n A live showcase of all Visor design tokens and components.\n Switch themes to see everything update in real-time.\n </Text>\n </div>\n\n <Separator />\n\n <ColorPaletteSection themeScales={THEME_COLOR_SCALES} statusScales={STATUS_COLOR_SCALES} semanticColors={SEMANTIC_COLORS} />\n <Separator />\n\n <TypographySection fontFamilies={resolvedFontFamilies} specimens={TYPE_SPECIMENS} />\n <Separator />\n\n <SpacingSection steps={SPACING_STEPS} />\n <Separator />\n\n <ShadowSection levels={SHADOW_LEVELS} />\n <Separator />\n\n <SurfaceSection surfaces={SURFACES} />\n <Separator />\n\n <RadiusSection steps={RADIUS_STEPS} />\n <Separator />\n\n <MotionDurationSection durations={MOTION_DURATIONS} />\n <Separator />\n\n <MotionEasingSection easings={EASINGS} />\n <Separator />\n\n <IconGridSection icons={ICON_SPECIMENS} />\n <Separator />\n\n <AccessibilitySection pairs={CONTRAST_PAIRS} />\n <Separator />\n\n <ButtonSpecimenSection />\n <Separator />\n\n <FormSpecimenSection />\n <Separator />\n\n <ComponentShowcaseSection />\n </div>\n )\n}\n"
4867
4892
  },
4868
4893
  {
4869
4894
  "path": "blocks/design-system-specimen/design-system-specimen.module.css",
@@ -4893,7 +4918,12 @@
4893
4918
  {
4894
4919
  "path": "blocks/design-system-specimen/utility-specimens.tsx",
4895
4920
  "type": "registry:block",
4896
- "content": "import * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\nimport { Heading } from \"../../components/ui/heading/heading\"\nimport { Text } from \"../../components/ui/text/text\"\nimport { IconGrid, IconSizeRow } from \"../../components/ui/icon-grid/icon-grid\"\nimport { AccessibilitySpecimen } from \"../../components/ui/accessibility-specimen/accessibility-specimen\"\nimport { House } from \"@phosphor-icons/react\"\nimport styles from \"./design-system-specimen.module.css\"\nimport type { IconSpecimenData, ContrastPairData } from \"./specimen-data\"\nimport { ICON_SIZES } from \"./specimen-data\"\nimport { ICON_MAP } from \"./icon-map\"\n\n// ─── Icon Grid ───────────────────────────────────────────────────────────────\n\ninterface IconGridSectionProps {\n icons: IconSpecimenData[]\n className?: string\n}\n\nexport function IconGridSection({ icons, className }: IconGridSectionProps) {\n const gridItems = icons\n .filter((icon) => ICON_MAP[icon.phosphorName])\n .map((icon) => {\n const IconComponent = ICON_MAP[icon.phosphorName]\n return {\n name: icon.name,\n usage: icon.usage,\n icon: <IconComponent size={24} />,\n }\n })\n\n return (\n <section id=\"specimen-icons\" className={cn(styles.section, className)}>\n <Heading level={3} size=\"lg\">Icons</Heading>\n <Text color=\"secondary\" size=\"sm\">\n Phosphor icons at multiple sizes. All icons from @phosphor-icons/react.\n </Text>\n\n <div className={styles.iconSubsection}>\n <Text weight=\"medium\" size=\"sm\" as=\"div\">Size Scale</Text>\n <IconSizeRow\n sizes={ICON_SIZES.map((size) => ({\n size,\n icon: <House size={size} />,\n }))}\n />\n </div>\n\n <div className={styles.iconSubsection}>\n <Text weight=\"medium\" size=\"sm\" as=\"div\">Icon Map</Text>\n <IconGrid icons={gridItems} />\n </div>\n </section>\n )\n}\n\n// ─── Accessibility ───────────────────────────────────────────────────────────\n\ninterface AccessibilitySectionProps {\n pairs: ContrastPairData[]\n className?: string\n}\n\nexport function AccessibilitySection({\n pairs,\n className,\n}: AccessibilitySectionProps) {\n return (\n <section id=\"specimen-accessibility\" className={cn(styles.section, className)}>\n <Heading level={3} size=\"lg\">Accessibility</Heading>\n <Text color=\"secondary\" size=\"sm\">\n WCAG contrast ratios for key text/background pairs.\n </Text>\n\n <div className={styles.contrastList}>\n {pairs.map((pair, i) => (\n <AccessibilitySpecimen\n key={i}\n fgToken={pair.fgToken}\n bgToken={pair.bgToken}\n fgLabel={pair.fgLabel}\n bgLabel={pair.bgLabel}\n ratio={pair.ratio}\n wcagAA={pair.wcagAA}\n wcagAAA={pair.wcagAAA}\n />\n ))}\n </div>\n </section>\n )\n}\n"
4921
+ "content": "import * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\nimport { Heading } from \"../../components/ui/heading/heading\"\nimport { Text } from \"../../components/ui/text/text\"\nimport { IconGrid, IconSizeRow } from \"../../components/ui/icon-grid/icon-grid\"\nimport { AccessibilitySpecimen } from \"../../components/ui/accessibility-specimen/accessibility-specimen\"\nimport { House } from \"@phosphor-icons/react\"\nimport styles from \"./design-system-specimen.module.css\"\nimport type { IconSpecimenData, ContrastPairData } from \"./specimen-data\"\nimport { ICON_SIZES } from \"./specimen-data\"\nimport { ICON_MAP } from \"./icon-map\"\n\n// ─── Icon Grid ───────────────────────────────────────────────────────────────\n\ninterface IconGridSectionProps {\n icons: IconSpecimenData[]\n className?: string\n}\n\nexport function IconGridSection({ icons, className }: IconGridSectionProps) {\n const gridItems = icons\n .flatMap((icon) => {\n const IconComponent = ICON_MAP[icon.phosphorName]\n if (!IconComponent) return []\n return [{\n name: icon.name,\n usage: icon.usage,\n icon: <IconComponent size={24} />,\n }]\n })\n\n return (\n <section id=\"specimen-icons\" className={cn(styles.section, className)}>\n <Heading level={3} size=\"lg\">Icons</Heading>\n <Text color=\"secondary\" size=\"sm\">\n Phosphor icons at multiple sizes. All icons from @phosphor-icons/react.\n </Text>\n\n <div className={styles.iconSubsection}>\n <Text weight=\"medium\" size=\"sm\" as=\"div\">Size Scale</Text>\n <IconSizeRow\n sizes={ICON_SIZES.map((size) => ({\n size,\n icon: <House size={size} />,\n }))}\n />\n </div>\n\n <div className={styles.iconSubsection}>\n <Text weight=\"medium\" size=\"sm\" as=\"div\">Icon Map</Text>\n <IconGrid icons={gridItems} />\n </div>\n </section>\n )\n}\n\n// ─── Accessibility ───────────────────────────────────────────────────────────\n\ninterface AccessibilitySectionProps {\n pairs: ContrastPairData[]\n className?: string\n}\n\nexport function AccessibilitySection({\n pairs,\n className,\n}: AccessibilitySectionProps) {\n return (\n <section id=\"specimen-accessibility\" className={cn(styles.section, className)}>\n <Heading level={3} size=\"lg\">Accessibility</Heading>\n <Text color=\"secondary\" size=\"sm\">\n WCAG contrast ratios for key text/background pairs.\n </Text>\n\n <div className={styles.contrastList}>\n {pairs.map((pair, i) => (\n <AccessibilitySpecimen\n key={i}\n fgToken={pair.fgToken}\n bgToken={pair.bgToken}\n fgLabel={pair.fgLabel}\n bgLabel={pair.bgLabel}\n ratio={pair.ratio}\n wcagAA={pair.wcagAA}\n wcagAAA={pair.wcagAAA}\n />\n ))}\n </div>\n </section>\n )\n}\n"
4922
+ },
4923
+ {
4924
+ "path": "blocks/design-system-specimen/icon-map.tsx",
4925
+ "type": "registry:block",
4926
+ "content": "import * as React from \"react\"\nimport {\n House,\n MagnifyingGlass,\n Gear,\n User,\n Bell,\n EnvelopeSimple,\n Plus,\n X,\n Check,\n Warning,\n Info,\n ArrowRight,\n CaretDown,\n DotsThree,\n PencilSimple,\n Trash,\n} from \"@phosphor-icons/react\"\n\nexport const ICON_MAP: Record<string, React.ComponentType<{ size?: number; weight?: \"regular\" | \"bold\" | \"fill\" }>> = {\n House,\n MagnifyingGlass,\n Gear,\n User,\n Bell,\n EnvelopeSimple,\n Plus,\n X,\n Check,\n Warning,\n Info,\n ArrowRight,\n CaretDown,\n DotsThree,\n PencilSimple,\n Trash,\n}\n"
4897
4927
  }
4898
4928
  ]
4899
4929
  },
@@ -4969,6 +4999,7 @@
4969
4999
  "sphere",
4970
5000
  "configuration-panel",
4971
5001
  "slider",
5002
+ "slider-control",
4972
5003
  "toggle-group"
4973
5004
  ],
4974
5005
  "files": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "0.4.0",
3
- "generated_at": "2026-10-29T22:45:48.361Z",
3
+ "generated_at": "2026-11-06T22:58:11.725Z",
4
4
  "components": {
5
5
  "accessibility-specimen": {
6
6
  "category": "specimen",
@@ -1243,6 +1243,7 @@
1243
1243
  "variants": {
1244
1244
  "variant": [
1245
1245
  "default",
1246
+ "hero",
1246
1247
  "secondary",
1247
1248
  "outline",
1248
1249
  "ghost",
@@ -1259,8 +1260,9 @@
1259
1260
  "props": [
1260
1261
  {
1261
1262
  "name": "variant",
1262
- "type": "'default' | 'secondary' | 'outline' | 'ghost' | 'destructive'",
1263
- "default": "default"
1263
+ "type": "'default' | 'hero' | 'secondary' | 'outline' | 'ghost' | 'destructive'",
1264
+ "default": "default",
1265
+ "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"
1264
1266
  },
1265
1267
  {
1266
1268
  "name": "size",
@@ -1324,12 +1326,21 @@
1324
1326
  "--border-default",
1325
1327
  "--border-focus",
1326
1328
  "--border-strong",
1329
+ "--button-default-bg",
1330
+ "--button-default-bg-hover",
1331
+ "--button-default-text",
1327
1332
  "--button-dlg-font-size",
1328
1333
  "--button-dlg-font-weight",
1329
1334
  "--button-dlg-letter-spacing",
1335
+ "--button-dlg-padding",
1330
1336
  "--button-dlg-radius",
1331
1337
  "--button-dlg-text-transform",
1332
1338
  "--button-font-weight",
1339
+ "--button-ghost-text",
1340
+ "--button-ghost-text-hover",
1341
+ "--button-hero-bg",
1342
+ "--button-hero-bg-hover",
1343
+ "--button-hero-text",
1333
1344
  "--button-icon-ghost-color",
1334
1345
  "--button-icon-pad",
1335
1346
  "--button-icon-radius",
@@ -1342,7 +1353,9 @@
1342
1353
  "--button-lg-text-transform",
1343
1354
  "--button-md-font-size",
1344
1355
  "--button-md-font-weight",
1356
+ "--button-md-height",
1345
1357
  "--button-md-letter-spacing",
1358
+ "--button-md-padding",
1346
1359
  "--button-md-radius",
1347
1360
  "--button-md-text-transform",
1348
1361
  "--button-radius",
@@ -5845,7 +5858,11 @@
5845
5858
  "--control-edge-color",
5846
5859
  "--control-edge-style",
5847
5860
  "--control-edge-width",
5861
+ "--control-focus-halo-color",
5862
+ "--control-focus-halo-width",
5863
+ "--control-invalid-halo-color",
5848
5864
  "--control-invalid-halo-width",
5865
+ "--control-invalid-ring-color",
5849
5866
  "--control-invalid-ring-width",
5850
5867
  "--control-state-edge-width",
5851
5868
  "--field-control-bg",
@@ -8519,7 +8536,11 @@
8519
8536
  "--control-edge-color",
8520
8537
  "--control-edge-style",
8521
8538
  "--control-edge-width",
8539
+ "--control-focus-halo-color",
8540
+ "--control-focus-halo-width",
8541
+ "--control-invalid-halo-color",
8522
8542
  "--control-invalid-halo-width",
8543
+ "--control-invalid-ring-color",
8523
8544
  "--control-invalid-ring-width",
8524
8545
  "--control-state-edge-width",
8525
8546
  "--field-control-bg",
@@ -8528,6 +8549,7 @@
8528
8549
  "--font-size-base",
8529
8550
  "--font-size-sm",
8530
8551
  "--font-size-xs",
8552
+ "--input-bg-invalid",
8531
8553
  "--label-box-height",
8532
8554
  "--motion-duration-150",
8533
8555
  "--motion-easing-default",
@@ -10754,10 +10776,13 @@
10754
10776
  "--control-edge-color",
10755
10777
  "--control-edge-style",
10756
10778
  "--control-edge-width",
10779
+ "--control-focus-halo-color",
10780
+ "--control-focus-halo-width",
10757
10781
  "--control-state-edge-width",
10758
10782
  "--focus-ring-width",
10759
10783
  "--font-size-sm",
10760
10784
  "--font-size-xs",
10785
+ "--input-bg-invalid",
10761
10786
  "--motion-duration-150",
10762
10787
  "--motion-easing-default",
10763
10788
  "--radius-full",
@@ -10957,12 +10982,17 @@
10957
10982
  "--control-edge-color",
10958
10983
  "--control-edge-style",
10959
10984
  "--control-edge-width",
10985
+ "--control-focus-halo-color",
10986
+ "--control-focus-halo-width",
10987
+ "--control-invalid-halo-color",
10960
10988
  "--control-invalid-halo-width",
10989
+ "--control-invalid-ring-color",
10961
10990
  "--control-invalid-ring-width",
10962
10991
  "--control-state-edge-width",
10963
10992
  "--focus-ring-width",
10964
10993
  "--font-size-base",
10965
10994
  "--font-size-sm",
10995
+ "--input-bg-invalid",
10966
10996
  "--motion-duration-150",
10967
10997
  "--motion-easing-default",
10968
10998
  "--radius-sm",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loworbitstudio/visor",
3
- "version": "1.42.0",
3
+ "version": "1.43.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.32.0",
49
+ "@loworbitstudio/visor-theme-engine": "^0.33.0",
50
50
  "commander": "^13.1.0",
51
51
  "diff": "^8.0.4",
52
52
  "picocolors": "^1.1.1",