@loworbitstudio/visor 1.45.1 → 1.47.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.
- package/dist/CHANGELOG.json +1 -1
- package/dist/index.js +9 -5
- package/dist/registry.json +35 -6
- package/dist/visor-manifest.json +31 -4
- package/package.json +2 -2
package/dist/CHANGELOG.json
CHANGED
package/dist/index.js
CHANGED
|
@@ -1821,16 +1821,20 @@ function readPackageJson(cwd) {
|
|
|
1821
1821
|
if (!existsSync4(pkgPath)) return null;
|
|
1822
1822
|
return JSON.parse(readFileSync7(pkgPath, "utf-8"));
|
|
1823
1823
|
}
|
|
1824
|
-
function isPackageInstalled(
|
|
1824
|
+
function isPackageInstalled(packageName2, cwd) {
|
|
1825
1825
|
const pkg2 = readPackageJson(cwd);
|
|
1826
1826
|
if (!pkg2) return false;
|
|
1827
|
-
return !!(pkg2.dependencies?.[
|
|
1827
|
+
return !!(pkg2.dependencies?.[packageName2] || pkg2.devDependencies?.[packageName2]);
|
|
1828
|
+
}
|
|
1829
|
+
function packageName(spec) {
|
|
1830
|
+
const at = spec.indexOf("@", 1);
|
|
1831
|
+
return at === -1 ? spec : spec.slice(0, at);
|
|
1828
1832
|
}
|
|
1829
1833
|
function hasVisorTokens(cwd) {
|
|
1830
1834
|
return isPackageInstalled("@loworbitstudio/visor-core", cwd);
|
|
1831
1835
|
}
|
|
1832
1836
|
function getUninstalledDeps(dependencies, cwd) {
|
|
1833
|
-
return dependencies.filter((dep) => !isPackageInstalled(dep, cwd));
|
|
1837
|
+
return dependencies.filter((dep) => !isPackageInstalled(packageName(dep), cwd));
|
|
1834
1838
|
}
|
|
1835
1839
|
function installPackages(packages, cwd, dev = false) {
|
|
1836
1840
|
if (packages.length === 0) return true;
|
|
@@ -2620,13 +2624,13 @@ function pubspecPath(cwd) {
|
|
|
2620
2624
|
function pubspecExists(cwd) {
|
|
2621
2625
|
return existsSync9(pubspecPath(cwd));
|
|
2622
2626
|
}
|
|
2623
|
-
function isPubPackageInstalled(
|
|
2627
|
+
function isPubPackageInstalled(packageName2, cwd) {
|
|
2624
2628
|
if (!pubspecExists(cwd)) return false;
|
|
2625
2629
|
const text = readFileSync12(pubspecPath(cwd), "utf-8");
|
|
2626
2630
|
const doc = parseDocument(text);
|
|
2627
2631
|
const depsNode = doc.get("dependencies");
|
|
2628
2632
|
if (!(depsNode instanceof YAMLMap)) return false;
|
|
2629
|
-
return depsNode.has(
|
|
2633
|
+
return depsNode.has(packageName2);
|
|
2630
2634
|
}
|
|
2631
2635
|
function getUninstalledPubDeps(deps, cwd) {
|
|
2632
2636
|
return deps.filter((d) => !isPubPackageInstalled(d.pub, cwd));
|
package/dist/registry.json
CHANGED
|
@@ -194,12 +194,12 @@
|
|
|
194
194
|
{
|
|
195
195
|
"path": "components/ui/inline-edit/inline-edit.tsx",
|
|
196
196
|
"type": "registry:ui",
|
|
197
|
-
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport { PencilSimple } from \"@phosphor-icons/react\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./inline-edit.module.css\"\n\ntype InlineEditElement = \"span\" | \"div\" | \"p\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"\n\nexport interface InlineEditProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"defaultValue\" | \"children\"> {\n /** The committed text. An empty string means \"no override\": `defaultValue` shows instead. */\n value: string\n /** Shown, muted, while `value` is empty. Committing an empty string brings it back. */\n defaultValue?: string\n
|
|
197
|
+
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport { PencilSimple } from \"@phosphor-icons/react\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./inline-edit.module.css\"\n\ntype InlineEditElement = \"span\" | \"div\" | \"p\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"\n\nexport interface InlineEditProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"defaultValue\" | \"children\"> {\n /** The committed text. An empty string means \"no override\": `defaultValue` shows instead. */\n value: string\n /** Shown, muted, while `value` is empty. Committing an empty string brings it back. */\n defaultValue?: string\n /**\n * Called with the trimmed text on Enter, blur or Tab, only when it differs from `value`.\n * Return a promise to save asynchronously: the field stays open and busy until it settles.\n * If it rejects, or resolves to `{ error: string }`, the message shows under the field,\n * the typed text stays, and Enter retries.\n */\n onCommit: (value: string) => void | Promise<unknown>\n /** The field's name, e.g. \"Section title\". Names the input, and the pencil as \"Edit {label}\". */\n label: string\n /** Accessible name of the pencil. Defaults to `Edit {label}`. */\n editLabel?: string\n /** The element to render. Typography inherits from it, so a title keeps its heading's size. */\n as?: InlineEditElement\n /**\n * Draw the pencil after the text. Default `true`. With `false` the text is the\n * control: a button named \"Edit {label}, {value}\" that opens the field on click,\n * Enter or Space, and takes focus back after Enter or Escape.\n */\n pencil?: boolean\n /** Open in the editing state on mount, without moving focus. */\n defaultEditing?: boolean\n}\n\nconst InlineEdit = React.forwardRef<HTMLElement, InlineEditProps>(\n (\n {\n value,\n defaultValue = \"\",\n onCommit,\n label,\n editLabel,\n as: Comp = \"span\",\n defaultEditing = false,\n pencil = true,\n className,\n ...props\n },\n ref\n ) => {\n const [editing, setEditing] = React.useState(defaultEditing)\n const [draft, setDraft] = React.useState(defaultEditing ? value : \"\")\n const inputRef = React.useRef<HTMLInputElement>(null)\n // The one focusable trigger at rest: the pencil, or the text without it.\n const triggerRef = React.useRef<HTMLButtonElement>(null)\n // Set once Enter or Escape has closed the editor, so the blur that follows\n // the input unmounting does not commit a second time.\n const settled = React.useRef(false)\n // Where focus goes after the next render: into the input when editing\n // starts, back to the trigger after Enter or Escape.\n const pendingFocus = React.useRef<\"input\" | \"trigger\" | null>(null)\n const [saving, setSaving] = React.useState(false)\n const [error, setError] = React.useState<string>()\n const errorId = React.useId()\n\n React.useEffect(() => {\n if (pendingFocus.current === \"input\" && inputRef.current) {\n inputRef.current.focus()\n inputRef.current.select()\n } else if (pendingFocus.current === \"trigger\") {\n triggerRef.current?.focus()\n }\n pendingFocus.current = null\n }, [editing])\n\n const start = () => {\n settled.current = false\n setError(undefined)\n pendingFocus.current = \"input\"\n setDraft(value)\n setEditing(true)\n }\n\n const finish = (commit: boolean, returnFocus: boolean) => {\n if (settled.current) return\n settled.current = true\n const next = draft.trim()\n // After a failed save, Enter retries even if the parent already took the value.\n const result = commit && (next !== value || error !== undefined) ? onCommit(next) : undefined\n if (!(result instanceof Promise)) {\n if (returnFocus) pendingFocus.current = \"trigger\"\n setError(undefined)\n setEditing(false)\n return\n }\n setSaving(true)\n setError(undefined)\n result.then(saveError, (reason) => messageOf(reason) ?? \"Could not save.\").then((message) => {\n setSaving(false)\n if (message) {\n settled.current = false\n setError(message)\n return\n }\n // Enter keeps focus in the input while saving; hand it back to the trigger.\n // A blur or Tab has already moved it on, so leave it there.\n if (document.activeElement === inputRef.current) pendingFocus.current = \"trigger\"\n setEditing(false)\n })\n }\n\n const onKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.nativeEvent.isComposing) return\n if (event.key === \"Enter\") {\n event.preventDefault()\n finish(true, true)\n } else if (event.key === \"Escape\") {\n event.preventDefault()\n finish(false, true)\n }\n }\n\n const isDefault = value === \"\"\n const shown = isDefault ? defaultValue : value\n\n return (\n <Comp\n ref={ref as React.Ref<never>}\n data-slot=\"inline-edit\"\n data-state={editing ? \"editing\" : \"rest\"}\n aria-busy={saving || undefined}\n className={cn(styles.root, className)}\n {...props}\n >\n {editing ? (\n <>\n {/* The field is sized by a hidden copy of the draft (CSS ::after), so\n the input is as wide as the text it replaces, not its container. */}\n <span data-slot=\"inline-edit-field\" className={styles.field} data-value={draft || defaultValue}>\n <input\n ref={inputRef}\n type=\"text\"\n // size={1} drops the input's own ~20-character width, so only the\n // hidden copy of the draft sizes the field.\n size={1}\n data-slot=\"inline-edit-input\"\n className={styles.input}\n aria-label={label}\n aria-invalid={error ? true : undefined}\n aria-describedby={error ? errorId : undefined}\n readOnly={saving}\n value={draft}\n placeholder={defaultValue}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={onKeyDown}\n onBlur={() => finish(true, false)}\n />\n </span>\n {error && (\n // A span, not FieldError's div: the root may be a span, p or heading.\n <span id={errorId} role=\"alert\" data-slot=\"inline-edit-error\" className={styles.error}>\n {error}\n </span>\n )}\n </>\n ) : (\n <>\n {pencil ? (\n <span\n data-slot=\"inline-edit-text\"\n data-default={isDefault || undefined}\n className={cn(styles.text, isDefault && styles.textDefault)}\n onClick={start}\n >\n {shown}\n </span>\n ) : (\n <button\n ref={triggerRef}\n type=\"button\"\n data-slot=\"inline-edit-text\"\n data-default={isDefault || undefined}\n data-control=\"\"\n className={cn(styles.text, styles.textControl, isDefault && styles.textDefault)}\n aria-label={`${editLabel ?? `Edit ${label}`}, ${shown}`}\n onClick={start}\n >\n {shown}\n </button>\n )}\n {pencil && (\n <button\n ref={triggerRef}\n type=\"button\"\n data-slot=\"inline-edit-pencil\"\n className={styles.pencil}\n aria-label={editLabel ?? `Edit ${label}`}\n onClick={start}\n >\n <PencilSimple aria-hidden=\"true\" />\n </button>\n )}\n </>\n )}\n </Comp>\n )\n }\n)\nInlineEdit.displayName = \"InlineEdit\"\n\n/** The message of a save that resolved to `{ error: string }`, else undefined. */\nfunction saveError(result: unknown): string | undefined {\n if (result && typeof result === \"object\" && \"error\" in result) return messageOf(result.error)\n return undefined\n}\n\nfunction messageOf(reason: unknown): string | undefined {\n if (reason instanceof Error) return reason.message || undefined\n return typeof reason === \"string\" && reason ? reason : undefined\n}\n\nexport { InlineEdit }\n"
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
"path": "components/ui/inline-edit/inline-edit.module.css",
|
|
201
201
|
"type": "registry:ui",
|
|
202
|
-
"content": "/* InlineEdit (VI-658)\n *\n * At rest: the text, then a pencil. No edge. Editing: an input in the same\n * box, so the line box keeps its height. Typography (size, weight, colour,\n * case, tracking) is inherited from the element InlineEdit renders as.\n *\n * The pencil is the editor's mark pattern (VI-659): one size and one ink,\n * read from the same --button-icon-* tokens as an icon-only Button. Its hit\n * target is the Button's too, but drawn on ::before so it adds no height to\n * a 14px line. */\n.root {\n /* A long title wraps; it is never truncated. */\n overflow-wrap: anywhere;\n}\n\n.text {\n cursor: text;\n}\n\n/* The default shows while there is no override, muted. */\n.textDefault {\n color: var(--text-tertiary, #9ca3af);\n}\n\n/* pencil={false}: the text is the control. A native button, reset to read as\n * the text it holds: typography comes from the reset's `font: inherit` and the\n * rest is inherited from the element InlineEdit renders as. No edge at rest. */\n.textControl {\n position: relative;\n display: inline;\n /* Padding is present in every state and cancelled by an equal negative\n * margin, so nothing shifts between rest, hover and focus. It is the room\n * the focus ring clears the glyphs by, on top of --focus-ring-offset. */\n margin: calc(-1 * var(--spacing-1, 0.25rem)) calc(-1 * var(--spacing-2, 0.5rem));\n padding: var(--spacing-1, 0.25rem) var(--spacing-2, 0.5rem);\n border: 0;\n border-radius: var(--radius-sm, 0.125rem);\n background: none;\n color: inherit;\n text-align: inherit;\n letter-spacing: inherit;\n text-transform: inherit;\n overflow-wrap: inherit;\n cursor: text;\n}\n\n/* Centre the ring on the capitals (label-centering doc). The button's line\n * box is trimmed to the capital-to-baseline band, so the padded box, and the\n * ring drawn around it, is symmetric about the caps and not about the font's\n * ascent and descent. The block padding and its cancelling negative margin\n * are the room the ring clears the glyphs by; the margin box is the cap band,\n * so the line box (set by the surrounding text) does not change. Without\n * text-box (Firefox) the padding above stands and the ring centres on the line box. */\n@supports (text-box: trim-both cap alphabetic) {\n .textControl {\n text-box: trim-both cap alphabetic;\n padding-block: var(--spacing-2, 0.5rem);\n margin-block: calc(-1 * var(--spacing-2, 0.5rem));\n }\n}\n\n.textControl.textDefault {\n color: var(--text-tertiary, #9ca3af);\n}\n\n/* WCAG 2.5.8: the hit target is at least 24px tall. Drawn on ::before so it\n * adds no height to the line; it only grows when the line is shorter. */\n.textControl::before {\n content: \"\";\n position: absolute;\n inset-inline: 0;\n inset-block: min(0px, calc((100% - 1.5rem) / 2));\n}\n\n/* Hover reads as editable without an icon: an underline. Solid by default;\n * a theme that wants a dashed one sets --inline-edit-underline-style. Never dotted. */\n@media (hover: hover) {\n .textControl:hover {\n text-decoration-line: underline;\n text-decoration-style: var(--inline-edit-underline-style, solid);\n text-decoration-thickness: var(--stroke-width-thin, 1px);\n text-underline-offset: var(--spacing-1, 0.25rem);\n }\n}\n\n/* Focus shows the ring alone. The underline is the hover cue; under the ring it\n * read as a double line. */\n.textControl:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, #111827);\n outline-offset: var(--focus-ring-offset, 2px);\n text-decoration-line: none;\n}\n\n.pencil {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n width: var(--button-icon-size, 1rem);\n height: var(--button-icon-size, 1rem);\n margin-inline-start: var(--spacing-2, 0.5rem);\n padding: 0;\n border: 0;\n border-radius: var(--radius-sm, 0.125rem);\n background: none;\n color: var(--button-icon-ghost-color, var(--text-secondary, #6b7280));\n cursor: pointer;\n transition: color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.pencil::before {\n content: \"\";\n position: absolute;\n inset: calc(-1 * var(--button-icon-pad, var(--spacing-2, 0.5rem)));\n}\n\n.pencil > svg {\n width: 100%;\n height: 100%;\n}\n\n@media (hover: hover) {\n .pencil:hover {\n color: var(--text-primary, #111827);\n }\n}\n\n.pencil:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, #111827);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n/* The editing field is the rest box: a one-cell grid sized by a hidden copy\n * of the draft plus the room the pencil took, so it is as wide as the text\n * and pencil were, grows as the user types, and stops at its container. */\n.field {\n display: inline-grid;\n grid-template-columns: minmax(0, 1fr);\n vertical-align: top;\n max-width: 100%;\n}\n\n.field::after {\n content: attr(data-value);\n grid-area: 1 / 1;\n visibility: hidden;\n overflow: hidden;\n white-space: pre;\n padding-inline-end: calc(var(--spacing-2, 0.5rem) + var(--button-icon-size, 1rem));\n}\n\n/* The input sits in the text's place. Its padding is cancelled by an equal\n * negative margin, so the text does not move and the line box keeps its\n * height; the padding only gives the edge room around the glyphs. */\n.input {\n box-sizing: border-box;\n grid-area: 1 / 1;\n width: calc(100% + 2 * var(--spacing-1, 0.25rem));\n min-width: 0;\n margin: calc(-1 * var(--spacing-1, 0.25rem));\n padding: var(--spacing-1, 0.25rem);\n border: 0;\n border-radius: var(--radius-sm, 0.125rem);\n background: transparent;\n /* Size, weight and line-height come from the reset's `font: inherit`;\n case, tracking and colour are not covered there. */\n letter-spacing: inherit;\n text-transform: inherit;\n color: inherit;\n /* VI-655: the resting edge is the shared control edge, so\n --control-edge-width: 0 turns it off with every other control. */\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 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}\n\n.input::placeholder {\n color: var(--text-tertiary, #9ca3af);\n}\n\n/* Focus draws at --control-state-edge-width, which the edge switch does not\n touch, so it stays visible with edges off. Same ring as Input. */\n.input: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"
|
|
202
|
+
"content": "/* InlineEdit (VI-658)\n *\n * At rest: the text, then a pencil. No edge. Editing: an input in the same\n * box, so the line box keeps its height. Typography (size, weight, colour,\n * case, tracking) is inherited from the element InlineEdit renders as.\n *\n * The pencil is the editor's mark pattern (VI-659): one size and one ink,\n * read from the same --button-icon-* tokens as an icon-only Button. Its hit\n * target is the Button's too, but drawn on ::before so it adds no height to\n * a 14px line. */\n.root {\n /* A long title wraps; it is never truncated. */\n overflow-wrap: anywhere;\n}\n\n.text {\n cursor: text;\n}\n\n/* The default shows while there is no override, muted. */\n.textDefault {\n color: var(--text-tertiary, #9ca3af);\n}\n\n/* pencil={false}: the text is the control. A native button, reset to read as\n * the text it holds: typography comes from the reset's `font: inherit` and the\n * rest is inherited from the element InlineEdit renders as. No edge at rest. */\n.textControl {\n position: relative;\n display: inline;\n /* Padding is present in every state and cancelled by an equal negative\n * margin, so nothing shifts between rest, hover and focus. It is the room\n * the focus ring clears the glyphs by, on top of --focus-ring-offset. */\n margin: calc(-1 * var(--spacing-1, 0.25rem)) calc(-1 * var(--spacing-2, 0.5rem));\n padding: var(--spacing-1, 0.25rem) var(--spacing-2, 0.5rem);\n border: 0;\n border-radius: var(--radius-sm, 0.125rem);\n background: none;\n color: inherit;\n text-align: inherit;\n letter-spacing: inherit;\n text-transform: inherit;\n overflow-wrap: inherit;\n cursor: text;\n}\n\n/* Centre the ring on the capitals (label-centering doc). The button's line\n * box is trimmed to the capital-to-baseline band, so the padded box, and the\n * ring drawn around it, is symmetric about the caps and not about the font's\n * ascent and descent. The block padding and its cancelling negative margin\n * are the room the ring clears the glyphs by; the margin box is the cap band,\n * so the line box (set by the surrounding text) does not change. Without\n * text-box (Firefox) the padding above stands and the ring centres on the line box. */\n@supports (text-box: trim-both cap alphabetic) {\n .textControl {\n text-box: trim-both cap alphabetic;\n padding-block: var(--spacing-2, 0.5rem);\n margin-block: calc(-1 * var(--spacing-2, 0.5rem));\n }\n}\n\n.textControl.textDefault {\n color: var(--text-tertiary, #9ca3af);\n}\n\n/* WCAG 2.5.8: the hit target is at least 24px tall. Drawn on ::before so it\n * adds no height to the line; it only grows when the line is shorter. */\n.textControl::before {\n content: \"\";\n position: absolute;\n inset-inline: 0;\n inset-block: min(0px, calc((100% - 1.5rem) / 2));\n}\n\n/* Hover reads as editable without an icon: an underline. Solid by default;\n * a theme that wants a dashed one sets --inline-edit-underline-style. Never dotted. */\n@media (hover: hover) {\n .textControl:hover {\n text-decoration-line: underline;\n text-decoration-style: var(--inline-edit-underline-style, solid);\n text-decoration-thickness: var(--stroke-width-thin, 1px);\n text-underline-offset: var(--spacing-1, 0.25rem);\n }\n}\n\n/* Focus shows the ring alone. The underline is the hover cue; under the ring it\n * read as a double line. */\n.textControl:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, #111827);\n outline-offset: var(--focus-ring-offset, 2px);\n text-decoration-line: none;\n}\n\n.pencil {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n width: var(--button-icon-size, 1rem);\n height: var(--button-icon-size, 1rem);\n margin-inline-start: var(--spacing-2, 0.5rem);\n padding: 0;\n border: 0;\n border-radius: var(--radius-sm, 0.125rem);\n background: none;\n color: var(--button-icon-ghost-color, var(--text-secondary, #6b7280));\n cursor: pointer;\n transition: color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.pencil::before {\n content: \"\";\n position: absolute;\n inset: calc(-1 * var(--button-icon-pad, var(--spacing-2, 0.5rem)));\n}\n\n.pencil > svg {\n width: 100%;\n height: 100%;\n}\n\n@media (hover: hover) {\n .pencil:hover {\n color: var(--text-primary, #111827);\n }\n}\n\n.pencil:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, #111827);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n/* The editing field is the rest box: a one-cell grid sized by a hidden copy\n * of the draft plus the room the pencil took, so it is as wide as the text\n * and pencil were, grows as the user types, and stops at its container. */\n.field {\n display: inline-grid;\n grid-template-columns: minmax(0, 1fr);\n vertical-align: top;\n max-width: 100%;\n}\n\n.field::after {\n content: attr(data-value);\n grid-area: 1 / 1;\n visibility: hidden;\n overflow: hidden;\n white-space: pre;\n padding-inline-end: calc(var(--spacing-2, 0.5rem) + var(--button-icon-size, 1rem));\n}\n\n/* The input sits in the text's place. Its padding is cancelled by an equal\n * negative margin, so the text does not move and the line box keeps its\n * height; the padding only gives the edge room around the glyphs. */\n.input {\n box-sizing: border-box;\n grid-area: 1 / 1;\n width: calc(100% + 2 * var(--spacing-1, 0.25rem));\n min-width: 0;\n margin: calc(-1 * var(--spacing-1, 0.25rem));\n padding: var(--spacing-1, 0.25rem);\n border: 0;\n border-radius: var(--radius-sm, 0.125rem);\n background: transparent;\n /* Size, weight and line-height come from the reset's `font: inherit`;\n case, tracking and colour are not covered there. */\n letter-spacing: inherit;\n text-transform: inherit;\n color: inherit;\n /* VI-655: the resting edge is the shared control edge, so\n --control-edge-width: 0 turns it off with every other control. */\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 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}\n\n.input::placeholder {\n color: var(--text-tertiary, #9ca3af);\n}\n\n/* Focus draws at --control-state-edge-width, which the edge switch does not\n touch, so it stays visible with edges off. Same ring as Input. */\n.input: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/* Saving (VI-760): onCommit returned a promise that has not settled. The input\n * is read-only and its text drops to the secondary ink until the save lands. */\n.root[aria-busy=\"true\"] .input {\n color: var(--text-secondary, #6b7280);\n cursor: progress;\n}\n\n/* A failed save: the edge turns to the error colour, focused or not. Same\n * specificity as the focus rule above and later, so it wins over the focus\n * edge while the focus halo stays. */\n.input[aria-invalid=\"true\"] {\n outline: var(--control-state-edge-width, 1px) solid var(--control-invalid-ring-color, var(--border-error, #ef4444));\n outline-offset: calc(-1 * var(--control-state-edge-width, 1px));\n}\n\n/* The message under the field, read like FieldError: its own size and weight,\n * not the heading's it may sit in. */\n.error {\n display: block;\n margin-block-start: var(--spacing-1, 0.25rem);\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-normal, 400);\n font-style: normal;\n line-height: var(--line-height-normal, 1.5);\n letter-spacing: normal;\n text-transform: none;\n color: var(--text-error, currentColor);\n}\n\n:global([data-density=\"editorial\"]) .error {\n font-size: 13px;\n}\n"
|
|
203
203
|
}
|
|
204
204
|
]
|
|
205
205
|
},
|
|
@@ -2733,7 +2733,7 @@
|
|
|
2733
2733
|
"description": "A generic Tanstack-powered data table compound that composes Visor's table primitive. Handles client-side sorting, pagination, row selection, global filter, sticky header, loading skeleton rows, and a pluggable empty state.",
|
|
2734
2734
|
"category": "admin",
|
|
2735
2735
|
"dependencies": [
|
|
2736
|
-
"@tanstack/react-table",
|
|
2736
|
+
"@tanstack/react-table@^8.21.3",
|
|
2737
2737
|
"@phosphor-icons/react",
|
|
2738
2738
|
"class-variance-authority",
|
|
2739
2739
|
"@loworbitstudio/visor-core"
|
|
@@ -4199,7 +4199,7 @@
|
|
|
4199
4199
|
{
|
|
4200
4200
|
"path": "blocks/admin-shell/admin-shell.module.css",
|
|
4201
4201
|
"type": "registry:block",
|
|
4202
|
-
"content": ".root {\n display: flex;\n min-height: 100vh;\n width: 100%;\n background: var(--surface-page, #f9fafb);\n color: var(--text-primary, #111827);\n container-type: inline-size;\n}\n\n/* Accessibility: skip link — visible only on keyboard focus */\n.skipLink {\n position: absolute;\n top: var(--spacing-2, 0.5rem);\n left: var(--spacing-2, 0.5rem);\n z-index: 100;\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n background: var(--surface-card, #ffffff);\n color: var(--text-primary, #111827);\n border: 1px solid var(--border-default, #e5e7eb);\n border-radius: var(--radius-md, 0.5rem);\n box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: 500;\n text-decoration: none;\n transform: translateY(-150%);\n transition:\n transform var(--motion-duration-fast, 150ms)\n var(--motion-easing-standard, ease);\n}\n\n.skipLink:focus-visible {\n transform: translateY(0);\n outline: var(--focus-ring-width, 2px) solid\n var(--focus-ring-color, var(--primary, #3b82f6));\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n/* Sidebar */\n.sidebar {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n width: var(--admin-shell-sidebar-width, 16rem);\n min-height: 100vh;\n background: var(--surface-card, #ffffff);\n border-right: 1px solid var(--border-default, #e5e7eb);\n position: sticky;\n top: 0;\n max-height: 100vh;\n}\n\n.sidebarHeader {\n display: flex;\n align-items: center;\n padding: var(--spacing-4, 1rem) var(--spacing-5, 1.25rem);\n border-bottom: 1px solid var(--border-muted, #e5e7eb);\n min-height: 3.5rem;\n flex-shrink: 0;\n}\n\n.sidebarNav {\n flex: 1 1 auto;\n overflow-y: auto;\n padding: var(--spacing-4, 1rem) var(--spacing-3, 0.75rem);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-1, 0.25rem);\n}\n\n.sidebarFooter {\n flex-shrink: 0;\n padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);\n border-top: 1px solid var(--border-muted, #e5e7eb);\n}\n\n/* Body = topbar + main */\n.body {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-width: 0;\n min-height: 100vh;\n}\n\n/* Topbar */\n.topbar {\n display: flex;\n align-items: center;\n gap: var(--spacing-4, 1rem);\n padding: var(--spacing-3, 0.75rem) var(--spacing-6, 1.5rem);\n min-height: 3.5rem;\n background: var(--surface-card, #ffffff);\n border-bottom: 1px solid var(--border-default, #e5e7eb);\n position: sticky;\n top: 0;\n z-index: 10;\n}\n\n.topbarStart {\n display: flex;\n align-items: center;\n gap: var(--spacing-3, 0.75rem);\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.topbarCenter {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-3, 0.75rem);\n flex: 0 1 auto;\n}\n\n.topbarEnd {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--spacing-2, 0.5rem);\n flex: 1 1 auto;\n min-width: 0;\n}\n\n/* Main */\n.main {\n flex: 1 1 auto;\n overflow-y: auto;\n min-width: 0;\n outline: none;\n}\n\n.main:focus-visible {\n outline: var(--focus-ring-width, 2px) solid\n var(--focus-ring-color, var(--primary, #3b82f6));\n outline-offset: calc(var(--focus-ring-offset, 2px) * -1);\n}\n\n.main[data-padding=\"none\"] .mainInner {\n padding: 0;\n}\n\n.main[data-padding=\"sm\"] .mainInner {\n padding: var(--spacing-4, 1rem);\n}\n\n.main[data-padding=\"md\"] .mainInner {\n padding: var(--spacing-6, 1.5rem);\n}\n\n.main[data-padding=\"lg\"] .mainInner {\n padding: var(--spacing-8, 2rem);\n}\n\n.mainInner {\n width: 100%;\n max-width: var(--admin-shell-main-max-width, none);\n margin: 0 auto;\n}\n\n/* Responsive: collapse sidebar on narrow containers */\n@container (max-width: 48rem) {\n .topbar {\n padding-left: var(--spacing-4, 1rem);\n padding-right: var(--spacing-4, 1rem);\n }\n\n .main[data-padding=\"lg\"] .mainInner {\n padding: var(--spacing-5, 1.25rem);\n }\n\n .main[data-padding=\"md\"] .mainInner {\n padding: var(--spacing-4, 1rem);\n }\n}\n"
|
|
4202
|
+
"content": ".root {\n display: flex;\n min-height: 100vh;\n width: 100%;\n background: var(--surface-page, #f9fafb);\n color: var(--text-primary, #111827);\n container-type: inline-size;\n}\n\n/* Accessibility: skip link — visible only on keyboard focus */\n.skipLink {\n position: absolute;\n top: var(--spacing-2, 0.5rem);\n left: var(--spacing-2, 0.5rem);\n z-index: 100;\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n background: var(--surface-card, #ffffff);\n color: var(--text-primary, #111827);\n border: 1px solid var(--border-default, #e5e7eb);\n border-radius: var(--radius-md, 0.5rem);\n box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: 500;\n text-decoration: none;\n transform: translateY(-150%);\n transition:\n transform var(--motion-duration-fast, 150ms)\n var(--motion-easing-standard, ease);\n}\n\n.skipLink:focus-visible {\n transform: translateY(0);\n outline: var(--focus-ring-width, 2px) solid\n var(--focus-ring-color, var(--primary, #3b82f6));\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n/* Sidebar */\n.sidebar {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n width: var(--admin-shell-sidebar-width, 16rem);\n min-height: 100vh;\n background: var(--surface-card, #ffffff);\n border-right: var(--admin-shell-sidebar-border, 1px solid var(--border-default, #e5e7eb));\n position: sticky;\n top: 0;\n max-height: 100vh;\n}\n\n.sidebarHeader {\n display: flex;\n align-items: center;\n padding: var(--spacing-4, 1rem) var(--spacing-5, 1.25rem);\n border-bottom: var(--admin-shell-sidebar-header-border, 1px solid var(--border-muted, #e5e7eb));\n min-height: 3.5rem;\n flex-shrink: 0;\n}\n\n.sidebarNav {\n flex: 1 1 auto;\n overflow-y: auto;\n padding: var(--spacing-4, 1rem) var(--spacing-3, 0.75rem);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-1, 0.25rem);\n}\n\n.sidebarFooter {\n flex-shrink: 0;\n padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);\n border-top: var(--admin-shell-sidebar-footer-border, 1px solid var(--border-muted, #e5e7eb));\n}\n\n/* Body = topbar + main */\n.body {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-width: 0;\n min-height: 100vh;\n}\n\n/* Topbar */\n.topbar {\n display: flex;\n align-items: center;\n gap: var(--spacing-4, 1rem);\n padding: var(--spacing-3, 0.75rem) var(--spacing-6, 1.5rem);\n min-height: 3.5rem;\n background: var(--admin-shell-topbar-bg, var(--surface-card, #ffffff));\n border-bottom: var(--admin-shell-topbar-border, 1px solid var(--border-default, #e5e7eb));\n position: sticky;\n top: 0;\n z-index: 10;\n}\n\n.topbarStart {\n display: flex;\n align-items: center;\n gap: var(--spacing-3, 0.75rem);\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.topbarCenter {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-3, 0.75rem);\n flex: 0 1 auto;\n}\n\n.topbarEnd {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--spacing-2, 0.5rem);\n flex: 1 1 auto;\n min-width: 0;\n}\n\n/* Main */\n.main {\n flex: 1 1 auto;\n overflow-y: auto;\n min-width: 0;\n outline: none;\n}\n\n.main:focus-visible {\n outline: var(--focus-ring-width, 2px) solid\n var(--focus-ring-color, var(--primary, #3b82f6));\n outline-offset: calc(var(--focus-ring-offset, 2px) * -1);\n}\n\n.main[data-padding=\"none\"] .mainInner {\n padding: 0;\n}\n\n.main[data-padding=\"sm\"] .mainInner {\n padding: var(--spacing-4, 1rem);\n}\n\n.main[data-padding=\"md\"] .mainInner {\n padding: var(--spacing-6, 1.5rem);\n}\n\n.main[data-padding=\"lg\"] .mainInner {\n padding: var(--spacing-8, 2rem);\n}\n\n.mainInner {\n width: 100%;\n max-width: var(--admin-shell-main-max-width, none);\n margin: 0 auto;\n}\n\n/* Responsive: collapse sidebar on narrow containers */\n@container (max-width: 48rem) {\n .topbar {\n padding-left: var(--spacing-4, 1rem);\n padding-right: var(--spacing-4, 1rem);\n }\n\n .main[data-padding=\"lg\"] .mainInner {\n padding: var(--spacing-5, 1.25rem);\n }\n\n .main[data-padding=\"md\"] .mainInner {\n padding: var(--spacing-4, 1rem);\n }\n}\n"
|
|
4203
4203
|
}
|
|
4204
4204
|
]
|
|
4205
4205
|
},
|
|
@@ -4237,7 +4237,7 @@
|
|
|
4237
4237
|
"description": "CRUD list archetype composing PageHeader, FilterBar, DataTable, BulkActionBar, and EmptyState into a single drop-in page. Generic over row data type, with controlled/uncontrolled search, selection, sorting, and pagination.",
|
|
4238
4238
|
"category": "admin",
|
|
4239
4239
|
"dependencies": [
|
|
4240
|
-
"@tanstack/react-table",
|
|
4240
|
+
"@tanstack/react-table@^8.21.3",
|
|
4241
4241
|
"@loworbitstudio/visor-core"
|
|
4242
4242
|
],
|
|
4243
4243
|
"registryDependencies": [
|
|
@@ -4538,6 +4538,35 @@
|
|
|
4538
4538
|
}
|
|
4539
4539
|
]
|
|
4540
4540
|
},
|
|
4541
|
+
{
|
|
4542
|
+
"name": "kanban-board",
|
|
4543
|
+
"type": "registry:block",
|
|
4544
|
+
"description": "Kanban board: stage columns in one row, cards that move between columns by native drag and drop or by keyboard (Space, Left/Right, Space; Escape cancels), arrow-key focus between cards, a count and total in each column header, and collapsed side rails for parked stages that expand on click and accept drops. Owns no data: the consumer renders the card inside and persists moves in onMove.",
|
|
4545
|
+
"category": "data-display",
|
|
4546
|
+
"dependencies": [
|
|
4547
|
+
"@loworbitstudio/visor-core"
|
|
4548
|
+
],
|
|
4549
|
+
"registryDependencies": [
|
|
4550
|
+
"utils",
|
|
4551
|
+
"card"
|
|
4552
|
+
],
|
|
4553
|
+
"suggestedDependencies": [
|
|
4554
|
+
"status-dot",
|
|
4555
|
+
"chip"
|
|
4556
|
+
],
|
|
4557
|
+
"files": [
|
|
4558
|
+
{
|
|
4559
|
+
"path": "blocks/kanban-board/kanban-board.tsx",
|
|
4560
|
+
"type": "registry:block",
|
|
4561
|
+
"content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Card } from \"../../components/ui/card/card\"\nimport styles from \"./kanban-board.module.css\"\n\nexport interface KanbanBoardItem {\n /** Stable id. `onMove` receives it. */\n id: string\n}\n\nexport interface KanbanBoardColumn<T extends KanbanBoardItem = KanbanBoardItem> {\n /** Stable id. `onMove` receives it as the target column. */\n id: string\n /** Column name, shown uppercase in the header and announced on moves. */\n label: string\n /** Right-aligned header figure (a sum, a value). Format it yourself. */\n total?: React.ReactNode\n /** The cards in this column, in display order. */\n items: T[]\n /** Shown when the column has no cards. */\n empty?: React.ReactNode\n}\n\nexport interface KanbanBoardProps<T extends KanbanBoardItem>\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** Columns in board order. Keyboard moves step through this order. */\n columns: KanbanBoardColumn<T>[]\n /** Column ids drawn as collapsed side rails until clicked open. */\n rails?: string[]\n /** The inside of a card. The block supplies the card surface, drag and keys. */\n renderCard: (item: T, column: KanbanBoardColumn<T>) => React.ReactNode\n /** Plain-text name of a card, used in screen reader announcements. */\n getItemLabel: (item: T) => string\n /** Called when a card is dropped on another column, by drag or by keyboard. */\n onMove: (itemId: string, toColumn: string) => void\n /** Called on Enter when no card is held (open the record). */\n onCardOpen?: (item: T) => void\n /** Content under an open column's cards (an Add button, a quick-add form). */\n renderColumnFooter?: (column: KanbanBoardColumn<T>) => React.ReactNode\n}\n\n/**\n * The card to focus for an arrow key: up and down within the column, left and\n * right to the nearest row of the next column that has cards. Null when none.\n */\nexport function neighborCard(columns: string[][], id: string, key: string): string | null {\n const col = columns.findIndex((c) => c.includes(id))\n if (col < 0) return null\n const row = columns[col].indexOf(id)\n if (key === \"ArrowUp\") return columns[col][row - 1] ?? null\n if (key === \"ArrowDown\") return columns[col][row + 1] ?? null\n const step = key === \"ArrowLeft\" ? -1 : key === \"ArrowRight\" ? 1 : 0\n if (!step) return null\n for (let i = col + step; i >= 0 && i < columns.length; i += step) {\n if (columns[i].length) return columns[i][Math.min(row, columns[i].length - 1)]\n }\n return null\n}\n\nexport function KanbanBoard<T extends KanbanBoardItem>({\n columns,\n rails = [],\n renderCard,\n getItemLabel,\n onMove,\n onCardOpen,\n renderColumnFooter,\n className,\n ...rest\n}: KanbanBoardProps<T>) {\n const rootRef = React.useRef<HTMLDivElement>(null)\n const hintId = React.useId()\n const [openRails, setOpenRails] = React.useState<string[]>([])\n const [dragId, setDragId] = React.useState<string | null>(null)\n const [over, setOver] = React.useState<string | null>(null)\n const [grab, setGrab] = React.useState<{ id: string; to: string } | null>(null)\n const [focusId, setFocusId] = React.useState<string | null>(null)\n const [live, setLive] = React.useState(\"\")\n\n const homeOf = new Map<string, KanbanBoardColumn<T>>()\n for (const column of columns) for (const item of column.items) homeOf.set(item.id, column)\n const labelOf = (columnId: string) => columns.find((c) => c.id === columnId)?.label ?? columnId\n const isCollapsed = (columnId: string) => rails.includes(columnId) && !openRails.includes(columnId)\n const cardEl = (id: string) =>\n Array.from(rootRef.current?.querySelectorAll<HTMLElement>(\"[data-card-id]\") ?? []).find(\n (el) => el.dataset.cardId === id\n )\n\n // A moved card remounts in its new column; put focus back on it unless the\n // user has already moved focus somewhere outside the board.\n React.useEffect(() => {\n if (!focusId) return\n const active = document.activeElement\n if (active && active !== document.body && !rootRef.current?.contains(active)) return\n const el = cardEl(focusId)\n if (el && el !== active) el.focus()\n }, [focusId, columns, openRails])\n\n function move(itemId: string, to: string) {\n const from = homeOf.get(itemId)\n // Ignore drops that are not one of this board's cards (text dragged in from elsewhere).\n if (!from || from.id === to) return\n const item = from.items.find((i) => i.id === itemId)!\n setLive(`${getItemLabel(item)} moved to ${labelOf(to)}.`)\n onMove(itemId, to)\n }\n\n function onCardKey(e: React.KeyboardEvent<HTMLDivElement>, item: T, column: KanbanBoardColumn<T>) {\n const name = getItemLabel(item)\n if (grab?.id === item.id) {\n e.preventDefault()\n if (e.key === \"ArrowLeft\" || e.key === \"ArrowRight\") {\n const i = columns.findIndex((c) => c.id === grab.to) + (e.key === \"ArrowLeft\" ? -1 : 1)\n const to = columns[Math.max(0, Math.min(columns.length - 1, i))].id\n setGrab({ id: item.id, to })\n setLive(`Over ${labelOf(to)}.`)\n } else if (e.key === \" \" || e.key === \"Enter\") {\n setGrab(null)\n if (grab.to === column.id) setLive(`${name} stays in ${column.label}.`)\n else {\n if (isCollapsed(grab.to)) setOpenRails((r) => [...r, grab.to])\n setFocusId(item.id)\n move(item.id, grab.to)\n }\n } else if (e.key === \"Escape\") {\n setGrab(null)\n setLive(`Move cancelled. ${name} stays in ${column.label}.`)\n }\n return\n }\n if (e.key === \" \") {\n e.preventDefault()\n setGrab({ id: item.id, to: column.id })\n setLive(`Picked up ${name}. Left and right arrows choose a column, Space drops, Escape cancels.`)\n } else if (e.key === \"Enter\" && onCardOpen) {\n e.preventDefault()\n onCardOpen(item)\n } else if (e.key.startsWith(\"Arrow\")) {\n const visible = columns.filter((c) => !isCollapsed(c.id)).map((c) => c.items.map((i) => i.id))\n const next = neighborCard(visible, item.id, e.key)\n if (next) {\n e.preventDefault()\n setFocusId(null)\n cardEl(next)?.focus()\n }\n }\n }\n\n const dropProps = (columnId: string) => ({\n onDragOver: (e: React.DragEvent) => {\n e.preventDefault()\n e.dataTransfer.dropEffect = \"move\"\n if (over !== columnId) setOver(columnId)\n },\n onDrop: (e: React.DragEvent) => {\n e.preventDefault()\n const id = e.dataTransfer.getData(\"text/plain\") || dragId\n setDragId(null)\n setOver(null)\n if (id) move(id, columnId)\n },\n })\n\n const heldFrom = homeOf.get(dragId ?? grab?.id ?? \"\")?.id\n const isTarget = (columnId: string) =>\n heldFrom !== columnId &&\n ((dragId !== null && over === columnId) || (grab !== null && grab.to === columnId))\n\n function renderColumn(column: KanbanBoardColumn<T>) {\n const target = isTarget(column.id)\n const isRail = rails.includes(column.id)\n if (isCollapsed(column.id)) {\n return (\n <button\n key={column.id}\n type=\"button\"\n className={styles.rail}\n data-slot=\"kanban-board-rail\"\n data-target={target || undefined}\n aria-expanded={false}\n aria-label={`${column.label}, ${column.items.length} cards. Show column`}\n onClick={() => setOpenRails((r) => [...r, column.id])}\n {...dropProps(column.id)}\n >\n {column.label} · {column.items.length}\n </button>\n )\n }\n return (\n <section\n key={column.id}\n className={styles.column}\n data-slot=\"kanban-board-column\"\n data-column-id={column.id}\n data-target={target || undefined}\n aria-label={column.label}\n {...dropProps(column.id)}\n >\n <header className={styles.head}>\n {isRail ? (\n <button\n type=\"button\"\n className={styles.label}\n aria-expanded\n aria-label={`${column.label}. Collapse column`}\n onClick={() => setOpenRails((r) => r.filter((id) => id !== column.id))}\n >\n {column.label}\n </button>\n ) : (\n <span className={styles.label}>{column.label}</span>\n )}\n <span className={styles.count}>{column.items.length}</span>\n {column.total != null ? <span className={styles.total}>{column.total}</span> : null}\n </header>\n {target ? (\n <div className={styles.drop} data-slot=\"kanban-board-drop\">\n Drop in {column.label}\n </div>\n ) : null}\n <div role=\"list\" className={styles.cards}>\n {column.items.map((item) => (\n <Card\n key={item.id}\n size=\"sm\"\n role=\"listitem\"\n tabIndex={0}\n draggable\n data-card-id={item.id}\n data-grabbed={grab?.id === item.id || dragId === item.id || undefined}\n aria-describedby={hintId}\n className={styles.card}\n onKeyDown={(e) => onCardKey(e, item, column)}\n onDragStart={(e) => {\n e.dataTransfer.setData(\"text/plain\", item.id)\n e.dataTransfer.effectAllowed = \"move\"\n setDragId(item.id)\n }}\n onDragEnd={() => {\n setDragId(null)\n setOver(null)\n }}\n >\n {renderCard(item, column)}\n </Card>\n ))}\n </div>\n {column.items.length === 0 && !target && column.empty ? (\n <p className={styles.empty}>{column.empty}</p>\n ) : null}\n {renderColumnFooter?.(column)}\n </section>\n )\n }\n\n return (\n <div ref={rootRef} className={cn(styles.board, className)} data-slot=\"kanban-board\" {...rest}>\n {columns.map(renderColumn)}\n <p id={hintId} className={styles.srOnly}>\n Press Space to pick up a card, Left and Right arrows to choose a column, Space to drop, Escape to cancel.\n </p>\n <div aria-live=\"polite\" className={styles.srOnly}>\n {live}\n </div>\n </div>\n )\n}\n"
|
|
4562
|
+
},
|
|
4563
|
+
{
|
|
4564
|
+
"path": "blocks/kanban-board/kanban-board.module.css",
|
|
4565
|
+
"type": "registry:block",
|
|
4566
|
+
"content": "/* Kanban Board\n * Stage columns in one row. Surfaces are told apart by tone, never borders:\n * columns sit on the card tone, cards on the raised popover tone, so a card\n * reads lighter than its column in light and dark alike. Every value binds to\n * a Visor token unless noted.\n */\n\n.board {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-3, 0.75rem);\n overflow-x: auto;\n padding-bottom: var(--spacing-1, 0.25rem);\n}\n\n.column,\n.rail {\n background: var(--surface-card, #ffffff);\n border-radius: var(--radius-xl, 1rem);\n /* Intentional: lanes keep their height when empty so drops have room. */\n min-height: 26rem;\n transition: background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease);\n}\n\n.column {\n flex: 1 1 0;\n /* Intentional: a card stays readable before the board scrolls sideways. */\n min-width: 12.5rem;\n padding: var(--spacing-2, 0.5rem);\n}\n\n.column[data-target],\n.rail[data-target] {\n background: color-mix(in srgb, var(--text-link, #2563eb) 10%, var(--surface-card, #ffffff));\n}\n\n/* ── Header ── */\n\n.head {\n display: flex;\n align-items: baseline;\n gap: var(--spacing-2, 0.5rem);\n padding: var(--spacing-2, 0.5rem) var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n}\n\n.label {\n font-size: var(--font-size-xs, 0.75rem);\n font-weight: var(--font-weight-bold, 700);\n letter-spacing: var(--letter-spacing-wide, 0.05em);\n text-transform: uppercase;\n color: var(--text-secondary, #6b7280);\n background: none;\n border: 0;\n padding: 0;\n}\n\nbutton.label {\n cursor: pointer;\n}\n\n.count,\n.total {\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-bold, 700);\n color: var(--text-secondary, #6b7280);\n}\n\n.total {\n margin-left: auto;\n}\n\n/* ── Collapsed rail ── */\n\n.rail {\n flex: none;\n /* Intentional: a rail is one label wide. */\n width: 3.5rem;\n writing-mode: vertical-rl;\n display: flex;\n align-items: center;\n padding: var(--spacing-4, 1rem) 0;\n border: 0;\n cursor: pointer;\n font-size: var(--font-size-xs, 0.75rem);\n font-weight: var(--font-weight-bold, 700);\n letter-spacing: var(--letter-spacing-wide, 0.05em);\n text-transform: uppercase;\n color: var(--text-secondary, #6b7280);\n}\n\n.rail:hover,\nbutton.label:hover {\n color: var(--text-primary, #111827);\n}\n\n.rail:focus-visible,\nbutton.label:focus-visible,\n.board .card:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, #2563eb);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n/* ── Cards ── */\n\n.cards {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-2, 0.5rem);\n}\n\n.board .card {\n background: var(--surface-popover, #ffffff);\n border-radius: var(--radius-lg, 0.75rem);\n padding: var(--spacing-3, 0.75rem);\n gap: 0;\n box-shadow: var(--shadow-xs);\n cursor: grab;\n}\n\n/* A held card tilts and lifts, as in the approved frame. */\n.board .card[data-grabbed] {\n /* Intentional: the frame's tilt and lift. */\n transform: rotate(-1.5deg) translateY(-0.25rem);\n box-shadow: var(--shadow-lg);\n}\n\n.drop {\n display: grid;\n place-items: center;\n /* Intentional: about one card tall. */\n min-height: 4.5rem;\n margin-bottom: var(--spacing-2, 0.5rem);\n border-radius: var(--radius-lg, 0.75rem);\n background: var(--surface-accent-subtle, #eff6ff);\n color: var(--text-link, #2563eb);\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-semibold, 600);\n}\n\n.empty {\n margin: 0;\n padding: var(--spacing-6, 1.5rem) var(--spacing-3, 0.75rem);\n text-align: center;\n color: var(--text-muted, #6b7280);\n font-size: var(--font-size-sm, 0.875rem);\n}\n\n.srOnly {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n"
|
|
4567
|
+
}
|
|
4568
|
+
]
|
|
4569
|
+
},
|
|
4541
4570
|
{
|
|
4542
4571
|
"name": "workspace-switcher",
|
|
4543
4572
|
"type": "registry:block",
|
|
@@ -5427,7 +5456,7 @@
|
|
|
5427
5456
|
{
|
|
5428
5457
|
"path": "components/devtools/source-inspector/visor-component-names.generated.ts",
|
|
5429
5458
|
"type": "registry:devtool",
|
|
5430
|
-
"content": "// THIS FILE IS GENERATED BY scripts/generate-visor-component-names.ts.\n// Do not edit by hand. Re-run `npm run generate:component-names` after\n// adding, removing, or renaming a Visor component.\n//\n// Source of truth: registry/registry-{ui,blocks,deck,visual,devtools}.ts\n// Used by: components/devtools/source-inspector/* (VI-311)\n\nexport const VISOR_COMPONENT_NAMES: ReadonlySet<string> = new Set([\n \"AccessibilitySection\",\n \"AccessibilitySlide\",\n \"AccessibilitySpecimen\",\n \"Accordion\",\n \"AccordionContent\",\n \"AccordionItem\",\n \"AccordionTrigger\",\n \"ActionRow\",\n \"ActionRowList\",\n \"ActivityFeed\",\n \"ActivityFeedContext\",\n \"ActivityFeedItem\",\n \"ActivityFeedRoot\",\n \"AdminDashboard\",\n \"AdminDetail\",\n \"AdminDetailDrawer\",\n \"AdminListPage\",\n \"AdminListPageInner\",\n \"AdminSettingsPage\",\n \"AdminShell\",\n \"AdminTabbedEditor\",\n \"AdminWizard\",\n \"Alert\",\n \"AlertActions\",\n \"AlertDescription\",\n \"AlertLead\",\n \"AlertTitle\",\n \"AmbientGlow\",\n \"Avatar\",\n \"AvatarFallback\",\n \"AvatarImage\",\n \"AvatarStack\",\n \"Badge\",\n \"Banner\",\n \"BannerAction\",\n \"BannerDescription\",\n \"BannerTitle\",\n \"BentoGrid\",\n \"BentoTile\",\n \"BentoTileBody\",\n \"BentoTileDescription\",\n \"BentoTileFigure\",\n \"BentoTileHeadline\",\n \"BentoTileMedia\",\n \"BentoTileMeta\",\n \"BentoTileTitle\",\n \"BottomNav\",\n \"Box\",\n \"Breadcrumb\",\n \"BreadcrumbEllipsis\",\n \"BreadcrumbItem\",\n \"BreadcrumbLink\",\n \"BreadcrumbList\",\n \"BreadcrumbPage\",\n \"BreadcrumbSeparator\",\n \"BrowserFrame\",\n \"BulkActionBar\",\n \"Button\",\n \"ButtonSpecimenSection\",\n \"ButtonSpecimenSlide\",\n \"Calendar\",\n \"Capture\",\n \"Card\",\n \"CardContent\",\n \"CardDescription\",\n \"CardFooter\",\n \"CardGrid\",\n \"CardHeader\",\n \"CardIndicatorContext\",\n \"CardLift\",\n \"CardTitle\",\n \"Carousel\",\n \"CarouselContent\",\n \"CarouselContext\",\n \"CarouselGallery\",\n \"CarouselItem\",\n \"CarouselNext\",\n \"CarouselPrevious\",\n \"ChallengeCard\",\n \"ChallengeCardAction\",\n \"ChallengeCardActions\",\n \"ChallengeCardBody\",\n \"ChallengeCardGate\",\n \"ChallengeCardHeader\",\n \"ChartContainer\",\n \"ChartContext\",\n \"ChartLegend\",\n \"ChartLegendContent\",\n \"ChartStyle\",\n \"ChartTooltip\",\n \"ChartTooltipContent\",\n \"Checkbox\",\n \"CheckGroup\",\n \"CheckRow\",\n \"Chip\",\n \"ChipGroup\",\n \"ChipGroupContext\",\n \"ChipGroupItem\",\n \"ChoiceChip\",\n \"ChromeButton\",\n \"ClosingSlide\",\n \"CodeBlock\",\n \"Collapsible\",\n \"CollapsibleContent\",\n \"CollapsibleTrigger\",\n \"ColorBar\",\n \"ColorPaletteSection\",\n \"ColorPicker\",\n \"ColorPickerSurface\",\n \"ColorSwatch\",\n \"ColorSwatchGrid\",\n \"Column\",\n \"Combobox\",\n \"ComboboxContent\",\n \"ComboboxContext\",\n \"ComboboxEmpty\",\n \"ComboboxGroup\",\n \"ComboboxInput\",\n \"ComboboxItem\",\n \"ComboboxSeparator\",\n \"Command\",\n \"CommandDialog\",\n \"CommandEmpty\",\n \"CommandGroup\",\n \"CommandInput\",\n \"CommandItem\",\n \"CommandList\",\n \"CommandLoading\",\n \"CommandSeparator\",\n \"CommandShortcut\",\n \"ComponentShowcaseContent\",\n \"ComponentShowcaseSection\",\n \"ComponentShowcaseSlide\",\n \"Composer\",\n \"ComposerContext\",\n \"ComposerField\",\n \"ComposerSend\",\n \"ComposerSpacer\",\n \"ComposerToolbar\",\n \"ComposerToolButton\",\n \"ConceptSlide\",\n \"ConfigurationPanel\",\n \"ConfirmDialog\",\n \"ConflictBanner\",\n \"Container\",\n \"ContextMenu\",\n \"ContextMenuCheckboxItem\",\n \"ContextMenuContent\",\n \"ContextMenuGroup\",\n \"ContextMenuItem\",\n \"ContextMenuLabel\",\n \"ContextMenuPortal\",\n \"ContextMenuRadioGroup\",\n \"ContextMenuRadioItem\",\n \"ContextMenuSeparator\",\n \"ContextMenuShortcut\",\n \"ContextMenuSub\",\n \"ContextMenuSubContent\",\n \"ContextMenuSubTrigger\",\n \"ContextMenuTrigger\",\n \"Controls\",\n \"CtaSection\",\n \"DataTable\",\n \"DataTableInner\",\n \"DatePicker\",\n \"DateRangePicker\",\n \"DeckContext\",\n \"DeckFooter\",\n \"DeckLayout\",\n \"DeckProvider\",\n \"DeckRenderer\",\n \"DesignSystemDeck\",\n \"DesignSystemSpecimen\",\n \"Dialog\",\n \"DialogBack\",\n \"DialogClose\",\n \"DialogContent\",\n \"DialogContext\",\n \"DialogDescription\",\n \"DialogField\",\n \"DialogFieldControl\",\n \"DialogFieldLabel\",\n \"DialogFooter\",\n \"DialogForm\",\n \"DialogFormBody\",\n \"DialogFormClose\",\n \"DialogFormContent\",\n \"DialogFormDescription\",\n \"DialogFormFooter\",\n \"DialogFormHeader\",\n \"DialogFormTitle\",\n \"DialogFormTrigger\",\n \"DialogHeader\",\n \"DialogOverlay\",\n \"DialogPortal\",\n \"DialogScrim\",\n \"DialogTitle\",\n \"DialogTrigger\",\n \"DocFrame\",\n \"DocFrameBrand\",\n \"DocNav\",\n \"DocNavGroup\",\n \"DocNavPill\",\n \"DotNav\",\n \"DropdownMenu\",\n \"DropdownMenuCheckboxItem\",\n \"DropdownMenuContent\",\n \"DropdownMenuGroup\",\n \"DropdownMenuItem\",\n \"DropdownMenuLabel\",\n \"DropdownMenuPortal\",\n \"DropdownMenuRadioGroup\",\n \"DropdownMenuRadioItem\",\n \"DropdownMenuSeparator\",\n \"DropdownMenuShortcut\",\n \"DropdownMenuSub\",\n \"DropdownMenuSubContent\",\n \"DropdownMenuSubTrigger\",\n \"DropdownMenuTrigger\",\n \"EditableBlock\",\n \"ElevationCard\",\n \"ElevationSlide\",\n \"EmptyState\",\n \"ErrorPlacard\",\n \"ExportMenu\",\n \"FeaturesGrid\",\n \"FidelityMirror\",\n \"Field\",\n \"FieldDescription\",\n \"FieldError\",\n \"FieldLabel\",\n \"Fieldset\",\n \"FieldsetLegend\",\n \"FileUpload\",\n \"FilterBar\",\n \"FilterChip\",\n \"FontShowcase\",\n \"FontShowcaseGrid\",\n \"Footer\",\n \"FooterSection\",\n \"Form\",\n \"FormError\",\n \"FormErrorDescription\",\n \"FormErrorTitle\",\n \"FormField\",\n \"FormSpecimenSection\",\n \"FormSpecimenSlide\",\n \"FullscreenOverlay\",\n \"FullscreenOverlayContent\",\n \"FullscreenOverlayTrigger\",\n \"GrainOverlay\",\n \"Grid\",\n \"Header\",\n \"Heading\",\n \"HeroGlow\",\n \"HeroSection\",\n \"HeroSlide\",\n \"HoverCard\",\n \"HoverCardContent\",\n \"HoverCardTrigger\",\n \"IconGrid\",\n \"IconGridSection\",\n \"IconSizeRow\",\n \"IconsSlide\",\n \"Image\",\n \"InfographicBar\",\n \"Inline\",\n \"InlineEdit\",\n \"Input\",\n \"Kbd\",\n \"KeyValueList\",\n \"Label\",\n \"Landing\",\n \"Lightbox\",\n \"LightboxContent\",\n \"LightboxContext\",\n \"LightboxTrigger\",\n \"LoginForm\",\n \"Marquee\",\n \"MarqueeBandRenderer\",\n \"MatrixCell\",\n \"MatrixTable\",\n \"MatrixTableInner\",\n \"Menubar\",\n \"MenubarCheckboxItem\",\n \"MenubarContent\",\n \"MenubarGroup\",\n \"MenubarItem\",\n \"MenubarLabel\",\n \"MenubarMenu\",\n \"MenubarRadioGroup\",\n \"MenubarRadioItem\",\n \"MenubarSeparator\",\n \"MenubarShortcut\",\n \"MenubarSub\",\n \"MenubarSubContent\",\n \"MenubarSubTrigger\",\n \"MenubarTrigger\",\n \"MonthCalendar\",\n \"MotionDuration\",\n \"MotionDurationSection\",\n \"MotionEasing\",\n \"MotionEasingSection\",\n \"MotionSlide\",\n \"NameRoster\",\n \"NameRosterItem\",\n \"Navbar\",\n \"NavbarBrand\",\n \"NavbarContent\",\n \"NavbarItem\",\n \"NavbarLink\",\n \"NavbarToggle\",\n \"NumberInput\",\n \"OfflineBanner\",\n \"OpacityBar\",\n \"OpacitySlide\",\n \"OTPInput\",\n \"PageHeader\",\n \"Pagination\",\n \"PaginationContent\",\n \"PaginationEllipsis\",\n \"PaginationItem\",\n \"PaginationLink\",\n \"PaginationNext\",\n \"PaginationPrevious\",\n \"PasswordInput\",\n \"PhoneInput\",\n \"PlatformChip\",\n \"Popover\",\n \"PopoverAnchor\",\n \"PopoverContent\",\n \"PopoverFooter\",\n \"PopoverSelectionItem\",\n \"PopoverSelectionLabel\",\n \"PopoverSelectionList\",\n \"PopoverTrigger\",\n \"PositionPicker\",\n \"PricingSection\",\n \"ProfileMenu\",\n \"Progress\",\n \"PrototypeReview\",\n \"QuickActions\",\n \"RadioGroup\",\n \"RadioGroupItem\",\n \"RadioGroupVariantContext\",\n \"RadiusScale\",\n \"RadiusSection\",\n \"RadiusSlide\",\n \"RecordSection\",\n \"RightRailList\",\n \"SaveStatus\",\n \"ScoreIndicator\",\n \"ScrollArea\",\n \"ScrollBar\",\n \"SearchInput\",\n \"SectionHeader\",\n \"SectionIntro\",\n \"SectionNav\",\n \"SectionNavItem\",\n \"SegmentedControl\",\n \"SegmentedProgress\",\n \"Select\",\n \"SelectContent\",\n \"SelectGroup\",\n \"SelectionListContext\",\n \"SelectItem\",\n \"SelectLabel\",\n \"SelectScrollDownButton\",\n \"SelectScrollUpButton\",\n \"SelectSeparator\",\n \"SelectTrigger\",\n \"SelectValue\",\n \"SemanticColorGrid\",\n \"SemanticColorItem\",\n \"SemanticTokensSlide\",\n \"SensitivePanel\",\n \"Separator\",\n \"SessionTimeout\",\n \"ShadowSection\",\n \"Sheet\",\n \"SheetClose\",\n \"SheetContent\",\n \"SheetContext\",\n \"SheetDescription\",\n \"SheetFooter\",\n \"SheetHeader\",\n \"SheetOverlay\",\n \"SheetPortal\",\n \"SheetScrim\",\n \"SheetTitle\",\n \"SheetTrigger\",\n \"Sidebar\",\n \"SidebarContent\",\n \"SidebarContext\",\n \"SidebarFooter\",\n \"SidebarGroup\",\n \"SidebarGroupAction\",\n \"SidebarGroupContent\",\n \"SidebarGroupLabel\",\n \"SidebarHeader\",\n \"SidebarInset\",\n \"SidebarMenu\",\n \"SidebarMenuAction\",\n \"SidebarMenuBadge\",\n \"SidebarMenuButton\",\n \"SidebarMenuItem\",\n \"SidebarMenuSub\",\n \"SidebarMenuSubButton\",\n \"SidebarMenuSubItem\",\n \"SidebarProvider\",\n \"SidebarRail\",\n \"SidebarScopeContext\",\n \"SidebarSeparator\",\n \"SidebarTrigger\",\n \"Skeleton\",\n \"SkeletonDetail\",\n \"SkeletonList\",\n \"SkeletonTable\",\n \"Slide\",\n \"SlideHeader\",\n \"Slider\",\n \"SliderControl\",\n \"SlideThemeContext\",\n \"SlideThemeProvider\",\n \"SlowNetworkBar\",\n \"SourceInspector\",\n \"SourceInspectorContext\",\n \"SourceInspectorDevImpl\",\n \"SourceInspectorProvider\",\n \"SourceInspectorRunner\",\n \"SourceInspectorToggle\",\n \"SpacingScale\",\n \"SpacingSection\",\n \"SpacingSlide\",\n \"Sparkline\",\n \"SpecimenCard\",\n \"SpecimenCardFooter\",\n \"Sphere\",\n \"SpherePlayground\",\n \"Spinner\",\n \"SpinnerOrb\",\n \"Stack\",\n \"Stage\",\n \"StatCard\",\n \"StatHero\",\n \"StationSpectrum\",\n \"StatusBadge\",\n \"StatusColorsSlide\",\n \"StatusDot\",\n \"Stepper\",\n \"StepperContext\",\n \"StepperDescription\",\n \"StepperItem\",\n \"StepperSeparator\",\n \"StepperTitle\",\n \"StepperTrigger\",\n \"StepsSection\",\n \"StructuredPrompt\",\n \"StructuredPromptBody\",\n \"StructuredPromptHeader\",\n \"StructuredPromptHint\",\n \"StructuredPromptSlot\",\n \"SuccessLiveRegion\",\n \"SuccessPanel\",\n \"SurfaceRow\",\n \"SurfaceScaleStack\",\n \"SurfaceSection\",\n \"Switch\",\n \"Table\",\n \"TableBody\",\n \"TableCaption\",\n \"TableCell\",\n \"TableFooter\",\n \"TableHead\",\n \"TableHeader\",\n \"TableRow\",\n \"Tabs\",\n \"TabsContent\",\n \"TabsList\",\n \"TabsTrigger\",\n \"TagInput\",\n \"TestimonialAttribution\",\n \"TestimonialSection\",\n \"Text\",\n \"Textarea\",\n \"ThemeArchitectureSlide\",\n \"ThemeColorsSlide\",\n \"ThemeSwitcher\",\n \"ThinkingOrb\",\n \"Timeline\",\n \"TimelineContent\",\n \"TimelineDescription\",\n \"TimelineIcon\",\n \"TimelineItem\",\n \"TimelineTimestamp\",\n \"TimelineTitle\",\n \"TimePicker\",\n \"TinInput\",\n \"TitleSlide\",\n \"ToastCard\",\n \"ToastCardStack\",\n \"Toaster\",\n \"TOCSlide\",\n \"ToggleButton\",\n \"ToggleDevImpl\",\n \"ToggleGroup\",\n \"ToggleGroupContext\",\n \"ToggleGroupItem\",\n \"Tooltip\",\n \"TooltipContent\",\n \"TooltipProvider\",\n \"TooltipTrigger\",\n \"TypeBodySlide\",\n \"TypeDisplaySlide\",\n \"TypeScaleStack\",\n \"TypeSpecimen\",\n \"TypographySection\",\n \"Vignette\",\n \"WorkspaceSwitcher\",\n])\n"
|
|
5459
|
+
"content": "// THIS FILE IS GENERATED BY scripts/generate-visor-component-names.ts.\n// Do not edit by hand. Re-run `npm run generate:component-names` after\n// adding, removing, or renaming a Visor component.\n//\n// Source of truth: registry/registry-{ui,blocks,deck,visual,devtools}.ts\n// Used by: components/devtools/source-inspector/* (VI-311)\n\nexport const VISOR_COMPONENT_NAMES: ReadonlySet<string> = new Set([\n \"AccessibilitySection\",\n \"AccessibilitySlide\",\n \"AccessibilitySpecimen\",\n \"Accordion\",\n \"AccordionContent\",\n \"AccordionItem\",\n \"AccordionTrigger\",\n \"ActionRow\",\n \"ActionRowList\",\n \"ActivityFeed\",\n \"ActivityFeedContext\",\n \"ActivityFeedItem\",\n \"ActivityFeedRoot\",\n \"AdminDashboard\",\n \"AdminDetail\",\n \"AdminDetailDrawer\",\n \"AdminListPage\",\n \"AdminListPageInner\",\n \"AdminSettingsPage\",\n \"AdminShell\",\n \"AdminTabbedEditor\",\n \"AdminWizard\",\n \"Alert\",\n \"AlertActions\",\n \"AlertDescription\",\n \"AlertLead\",\n \"AlertTitle\",\n \"AmbientGlow\",\n \"Avatar\",\n \"AvatarFallback\",\n \"AvatarImage\",\n \"AvatarStack\",\n \"Badge\",\n \"Banner\",\n \"BannerAction\",\n \"BannerDescription\",\n \"BannerTitle\",\n \"BentoGrid\",\n \"BentoTile\",\n \"BentoTileBody\",\n \"BentoTileDescription\",\n \"BentoTileFigure\",\n \"BentoTileHeadline\",\n \"BentoTileMedia\",\n \"BentoTileMeta\",\n \"BentoTileTitle\",\n \"BottomNav\",\n \"Box\",\n \"Breadcrumb\",\n \"BreadcrumbEllipsis\",\n \"BreadcrumbItem\",\n \"BreadcrumbLink\",\n \"BreadcrumbList\",\n \"BreadcrumbPage\",\n \"BreadcrumbSeparator\",\n \"BrowserFrame\",\n \"BulkActionBar\",\n \"Button\",\n \"ButtonSpecimenSection\",\n \"ButtonSpecimenSlide\",\n \"Calendar\",\n \"Capture\",\n \"Card\",\n \"CardContent\",\n \"CardDescription\",\n \"CardFooter\",\n \"CardGrid\",\n \"CardHeader\",\n \"CardIndicatorContext\",\n \"CardLift\",\n \"CardTitle\",\n \"Carousel\",\n \"CarouselContent\",\n \"CarouselContext\",\n \"CarouselGallery\",\n \"CarouselItem\",\n \"CarouselNext\",\n \"CarouselPrevious\",\n \"ChallengeCard\",\n \"ChallengeCardAction\",\n \"ChallengeCardActions\",\n \"ChallengeCardBody\",\n \"ChallengeCardGate\",\n \"ChallengeCardHeader\",\n \"ChartContainer\",\n \"ChartContext\",\n \"ChartLegend\",\n \"ChartLegendContent\",\n \"ChartStyle\",\n \"ChartTooltip\",\n \"ChartTooltipContent\",\n \"Checkbox\",\n \"CheckGroup\",\n \"CheckRow\",\n \"Chip\",\n \"ChipGroup\",\n \"ChipGroupContext\",\n \"ChipGroupItem\",\n \"ChoiceChip\",\n \"ChromeButton\",\n \"ClosingSlide\",\n \"CodeBlock\",\n \"Collapsible\",\n \"CollapsibleContent\",\n \"CollapsibleTrigger\",\n \"ColorBar\",\n \"ColorPaletteSection\",\n \"ColorPicker\",\n \"ColorPickerSurface\",\n \"ColorSwatch\",\n \"ColorSwatchGrid\",\n \"Column\",\n \"Combobox\",\n \"ComboboxContent\",\n \"ComboboxContext\",\n \"ComboboxEmpty\",\n \"ComboboxGroup\",\n \"ComboboxInput\",\n \"ComboboxItem\",\n \"ComboboxSeparator\",\n \"Command\",\n \"CommandDialog\",\n \"CommandEmpty\",\n \"CommandGroup\",\n \"CommandInput\",\n \"CommandItem\",\n \"CommandList\",\n \"CommandLoading\",\n \"CommandSeparator\",\n \"CommandShortcut\",\n \"ComponentShowcaseContent\",\n \"ComponentShowcaseSection\",\n \"ComponentShowcaseSlide\",\n \"Composer\",\n \"ComposerContext\",\n \"ComposerField\",\n \"ComposerSend\",\n \"ComposerSpacer\",\n \"ComposerToolbar\",\n \"ComposerToolButton\",\n \"ConceptSlide\",\n \"ConfigurationPanel\",\n \"ConfirmDialog\",\n \"ConflictBanner\",\n \"Container\",\n \"ContextMenu\",\n \"ContextMenuCheckboxItem\",\n \"ContextMenuContent\",\n \"ContextMenuGroup\",\n \"ContextMenuItem\",\n \"ContextMenuLabel\",\n \"ContextMenuPortal\",\n \"ContextMenuRadioGroup\",\n \"ContextMenuRadioItem\",\n \"ContextMenuSeparator\",\n \"ContextMenuShortcut\",\n \"ContextMenuSub\",\n \"ContextMenuSubContent\",\n \"ContextMenuSubTrigger\",\n \"ContextMenuTrigger\",\n \"Controls\",\n \"CtaSection\",\n \"DataTable\",\n \"DataTableInner\",\n \"DatePicker\",\n \"DateRangePicker\",\n \"DeckContext\",\n \"DeckFooter\",\n \"DeckLayout\",\n \"DeckProvider\",\n \"DeckRenderer\",\n \"DesignSystemDeck\",\n \"DesignSystemSpecimen\",\n \"Dialog\",\n \"DialogBack\",\n \"DialogClose\",\n \"DialogContent\",\n \"DialogContext\",\n \"DialogDescription\",\n \"DialogField\",\n \"DialogFieldControl\",\n \"DialogFieldLabel\",\n \"DialogFooter\",\n \"DialogForm\",\n \"DialogFormBody\",\n \"DialogFormClose\",\n \"DialogFormContent\",\n \"DialogFormDescription\",\n \"DialogFormFooter\",\n \"DialogFormHeader\",\n \"DialogFormTitle\",\n \"DialogFormTrigger\",\n \"DialogHeader\",\n \"DialogOverlay\",\n \"DialogPortal\",\n \"DialogScrim\",\n \"DialogTitle\",\n \"DialogTrigger\",\n \"DocFrame\",\n \"DocFrameBrand\",\n \"DocNav\",\n \"DocNavGroup\",\n \"DocNavPill\",\n \"DotNav\",\n \"DropdownMenu\",\n \"DropdownMenuCheckboxItem\",\n \"DropdownMenuContent\",\n \"DropdownMenuGroup\",\n \"DropdownMenuItem\",\n \"DropdownMenuLabel\",\n \"DropdownMenuPortal\",\n \"DropdownMenuRadioGroup\",\n \"DropdownMenuRadioItem\",\n \"DropdownMenuSeparator\",\n \"DropdownMenuShortcut\",\n \"DropdownMenuSub\",\n \"DropdownMenuSubContent\",\n \"DropdownMenuSubTrigger\",\n \"DropdownMenuTrigger\",\n \"EditableBlock\",\n \"ElevationCard\",\n \"ElevationSlide\",\n \"EmptyState\",\n \"ErrorPlacard\",\n \"ExportMenu\",\n \"FeaturesGrid\",\n \"FidelityMirror\",\n \"Field\",\n \"FieldDescription\",\n \"FieldError\",\n \"FieldLabel\",\n \"Fieldset\",\n \"FieldsetLegend\",\n \"FileUpload\",\n \"FilterBar\",\n \"FilterChip\",\n \"FontShowcase\",\n \"FontShowcaseGrid\",\n \"Footer\",\n \"FooterSection\",\n \"Form\",\n \"FormError\",\n \"FormErrorDescription\",\n \"FormErrorTitle\",\n \"FormField\",\n \"FormSpecimenSection\",\n \"FormSpecimenSlide\",\n \"FullscreenOverlay\",\n \"FullscreenOverlayContent\",\n \"FullscreenOverlayTrigger\",\n \"GrainOverlay\",\n \"Grid\",\n \"Header\",\n \"Heading\",\n \"HeroGlow\",\n \"HeroSection\",\n \"HeroSlide\",\n \"HoverCard\",\n \"HoverCardContent\",\n \"HoverCardTrigger\",\n \"IconGrid\",\n \"IconGridSection\",\n \"IconSizeRow\",\n \"IconsSlide\",\n \"Image\",\n \"InfographicBar\",\n \"Inline\",\n \"InlineEdit\",\n \"Input\",\n \"KanbanBoard\",\n \"Kbd\",\n \"KeyValueList\",\n \"Label\",\n \"Landing\",\n \"Lightbox\",\n \"LightboxContent\",\n \"LightboxContext\",\n \"LightboxTrigger\",\n \"LoginForm\",\n \"Marquee\",\n \"MarqueeBandRenderer\",\n \"MatrixCell\",\n \"MatrixTable\",\n \"MatrixTableInner\",\n \"Menubar\",\n \"MenubarCheckboxItem\",\n \"MenubarContent\",\n \"MenubarGroup\",\n \"MenubarItem\",\n \"MenubarLabel\",\n \"MenubarMenu\",\n \"MenubarRadioGroup\",\n \"MenubarRadioItem\",\n \"MenubarSeparator\",\n \"MenubarShortcut\",\n \"MenubarSub\",\n \"MenubarSubContent\",\n \"MenubarSubTrigger\",\n \"MenubarTrigger\",\n \"MonthCalendar\",\n \"MotionDuration\",\n \"MotionDurationSection\",\n \"MotionEasing\",\n \"MotionEasingSection\",\n \"MotionSlide\",\n \"NameRoster\",\n \"NameRosterItem\",\n \"Navbar\",\n \"NavbarBrand\",\n \"NavbarContent\",\n \"NavbarItem\",\n \"NavbarLink\",\n \"NavbarToggle\",\n \"NumberInput\",\n \"OfflineBanner\",\n \"OpacityBar\",\n \"OpacitySlide\",\n \"OTPInput\",\n \"PageHeader\",\n \"Pagination\",\n \"PaginationContent\",\n \"PaginationEllipsis\",\n \"PaginationItem\",\n \"PaginationLink\",\n \"PaginationNext\",\n \"PaginationPrevious\",\n \"PasswordInput\",\n \"PhoneInput\",\n \"PlatformChip\",\n \"Popover\",\n \"PopoverAnchor\",\n \"PopoverContent\",\n \"PopoverFooter\",\n \"PopoverSelectionItem\",\n \"PopoverSelectionLabel\",\n \"PopoverSelectionList\",\n \"PopoverTrigger\",\n \"PositionPicker\",\n \"PricingSection\",\n \"ProfileMenu\",\n \"Progress\",\n \"PrototypeReview\",\n \"QuickActions\",\n \"RadioGroup\",\n \"RadioGroupItem\",\n \"RadioGroupVariantContext\",\n \"RadiusScale\",\n \"RadiusSection\",\n \"RadiusSlide\",\n \"RecordSection\",\n \"RightRailList\",\n \"SaveStatus\",\n \"ScoreIndicator\",\n \"ScrollArea\",\n \"ScrollBar\",\n \"SearchInput\",\n \"SectionHeader\",\n \"SectionIntro\",\n \"SectionNav\",\n \"SectionNavItem\",\n \"SegmentedControl\",\n \"SegmentedProgress\",\n \"Select\",\n \"SelectContent\",\n \"SelectGroup\",\n \"SelectionListContext\",\n \"SelectItem\",\n \"SelectLabel\",\n \"SelectScrollDownButton\",\n \"SelectScrollUpButton\",\n \"SelectSeparator\",\n \"SelectTrigger\",\n \"SelectValue\",\n \"SemanticColorGrid\",\n \"SemanticColorItem\",\n \"SemanticTokensSlide\",\n \"SensitivePanel\",\n \"Separator\",\n \"SessionTimeout\",\n \"ShadowSection\",\n \"Sheet\",\n \"SheetClose\",\n \"SheetContent\",\n \"SheetContext\",\n \"SheetDescription\",\n \"SheetFooter\",\n \"SheetHeader\",\n \"SheetOverlay\",\n \"SheetPortal\",\n \"SheetScrim\",\n \"SheetTitle\",\n \"SheetTrigger\",\n \"Sidebar\",\n \"SidebarContent\",\n \"SidebarContext\",\n \"SidebarFooter\",\n \"SidebarGroup\",\n \"SidebarGroupAction\",\n \"SidebarGroupContent\",\n \"SidebarGroupLabel\",\n \"SidebarHeader\",\n \"SidebarInset\",\n \"SidebarMenu\",\n \"SidebarMenuAction\",\n \"SidebarMenuBadge\",\n \"SidebarMenuButton\",\n \"SidebarMenuItem\",\n \"SidebarMenuSub\",\n \"SidebarMenuSubButton\",\n \"SidebarMenuSubItem\",\n \"SidebarProvider\",\n \"SidebarRail\",\n \"SidebarScopeContext\",\n \"SidebarSeparator\",\n \"SidebarTrigger\",\n \"Skeleton\",\n \"SkeletonDetail\",\n \"SkeletonList\",\n \"SkeletonTable\",\n \"Slide\",\n \"SlideHeader\",\n \"Slider\",\n \"SliderControl\",\n \"SlideThemeContext\",\n \"SlideThemeProvider\",\n \"SlowNetworkBar\",\n \"SourceInspector\",\n \"SourceInspectorContext\",\n \"SourceInspectorDevImpl\",\n \"SourceInspectorProvider\",\n \"SourceInspectorRunner\",\n \"SourceInspectorToggle\",\n \"SpacingScale\",\n \"SpacingSection\",\n \"SpacingSlide\",\n \"Sparkline\",\n \"SpecimenCard\",\n \"SpecimenCardFooter\",\n \"Sphere\",\n \"SpherePlayground\",\n \"Spinner\",\n \"SpinnerOrb\",\n \"Stack\",\n \"Stage\",\n \"StatCard\",\n \"StatHero\",\n \"StationSpectrum\",\n \"StatusBadge\",\n \"StatusColorsSlide\",\n \"StatusDot\",\n \"Stepper\",\n \"StepperContext\",\n \"StepperDescription\",\n \"StepperItem\",\n \"StepperSeparator\",\n \"StepperTitle\",\n \"StepperTrigger\",\n \"StepsSection\",\n \"StructuredPrompt\",\n \"StructuredPromptBody\",\n \"StructuredPromptHeader\",\n \"StructuredPromptHint\",\n \"StructuredPromptSlot\",\n \"SuccessLiveRegion\",\n \"SuccessPanel\",\n \"SurfaceRow\",\n \"SurfaceScaleStack\",\n \"SurfaceSection\",\n \"Switch\",\n \"Table\",\n \"TableBody\",\n \"TableCaption\",\n \"TableCell\",\n \"TableFooter\",\n \"TableHead\",\n \"TableHeader\",\n \"TableRow\",\n \"Tabs\",\n \"TabsContent\",\n \"TabsList\",\n \"TabsTrigger\",\n \"TagInput\",\n \"TestimonialAttribution\",\n \"TestimonialSection\",\n \"Text\",\n \"Textarea\",\n \"ThemeArchitectureSlide\",\n \"ThemeColorsSlide\",\n \"ThemeSwitcher\",\n \"ThinkingOrb\",\n \"Timeline\",\n \"TimelineContent\",\n \"TimelineDescription\",\n \"TimelineIcon\",\n \"TimelineItem\",\n \"TimelineTimestamp\",\n \"TimelineTitle\",\n \"TimePicker\",\n \"TinInput\",\n \"TitleSlide\",\n \"ToastCard\",\n \"ToastCardStack\",\n \"Toaster\",\n \"TOCSlide\",\n \"ToggleButton\",\n \"ToggleDevImpl\",\n \"ToggleGroup\",\n \"ToggleGroupContext\",\n \"ToggleGroupItem\",\n \"Tooltip\",\n \"TooltipContent\",\n \"TooltipProvider\",\n \"TooltipTrigger\",\n \"TypeBodySlide\",\n \"TypeDisplaySlide\",\n \"TypeScaleStack\",\n \"TypeSpecimen\",\n \"TypographySection\",\n \"Vignette\",\n \"WorkspaceSwitcher\",\n])\n"
|
|
5431
5460
|
}
|
|
5432
5461
|
]
|
|
5433
5462
|
},
|
package/dist/visor-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.4.0",
|
|
3
|
-
"generated_at": "2026-11-
|
|
3
|
+
"generated_at": "2026-11-13T19:52:23.497Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"accessibility-specimen": {
|
|
6
6
|
"category": "specimen",
|
|
@@ -5723,7 +5723,9 @@
|
|
|
5723
5723
|
"variants": {
|
|
5724
5724
|
"state": {
|
|
5725
5725
|
"rest": "The text (or the muted default), then the pencil. No edge.",
|
|
5726
|
-
"editing": "A single-line input in the text's place, at the same size, drawing the shared control edge."
|
|
5726
|
+
"editing": "A single-line input in the text's place, at the same size, drawing the shared control edge.",
|
|
5727
|
+
"saving": "onCommit returned a promise that has not settled. The root carries aria-busy, the input is read-only and its text drops to --text-secondary.",
|
|
5728
|
+
"error": "The save rejected or resolved to `{ error }`. The message shows under the field (role=\"alert\", read like FieldError), the input draws the error edge and keeps the typed text, and Enter retries."
|
|
5727
5729
|
}
|
|
5728
5730
|
},
|
|
5729
5731
|
"props": [
|
|
@@ -5740,8 +5742,8 @@
|
|
|
5740
5742
|
},
|
|
5741
5743
|
{
|
|
5742
5744
|
"name": "onCommit",
|
|
5743
|
-
"type": "(value: string) => void",
|
|
5744
|
-
"description": "Called with the trimmed text on Enter, blur or Tab, only when it differs from `value`. An empty string means \"restore the default\". The parent updates `value`."
|
|
5745
|
+
"type": "(value: string) => void | Promise<unknown>",
|
|
5746
|
+
"description": "Called with the trimmed text on Enter, blur or Tab, only when it differs from `value`. An empty string means \"restore the default\". The parent updates `value`. Return a promise (a server action) to save asynchronously - the field stays open and busy until it settles. If it rejects, or resolves to `{ error: string }`, the message shows under the field, the typed text stays, and Enter retries; Escape gives up and restores `value`."
|
|
5745
5747
|
},
|
|
5746
5748
|
{
|
|
5747
5749
|
"name": "label",
|
|
@@ -5778,6 +5780,7 @@
|
|
|
5778
5780
|
],
|
|
5779
5781
|
"tokens_used": [
|
|
5780
5782
|
"--border-default",
|
|
5783
|
+
"--border-error",
|
|
5781
5784
|
"--border-focus",
|
|
5782
5785
|
"--button-icon-ghost-color",
|
|
5783
5786
|
"--button-icon-pad",
|
|
@@ -5785,16 +5788,21 @@
|
|
|
5785
5788
|
"--control-edge-color",
|
|
5786
5789
|
"--control-edge-style",
|
|
5787
5790
|
"--control-edge-width",
|
|
5791
|
+
"--control-invalid-ring-color",
|
|
5788
5792
|
"--control-state-edge-width",
|
|
5789
5793
|
"--focus-ring-offset",
|
|
5790
5794
|
"--focus-ring-width",
|
|
5795
|
+
"--font-size-sm",
|
|
5796
|
+
"--font-weight-normal",
|
|
5791
5797
|
"--inline-edit-underline-style",
|
|
5798
|
+
"--line-height-normal",
|
|
5792
5799
|
"--motion-duration-150",
|
|
5793
5800
|
"--motion-easing-default",
|
|
5794
5801
|
"--radius-sm",
|
|
5795
5802
|
"--spacing-1",
|
|
5796
5803
|
"--spacing-2",
|
|
5797
5804
|
"--stroke-width-thin",
|
|
5805
|
+
"--text-error",
|
|
5798
5806
|
"--text-primary",
|
|
5799
5807
|
"--text-secondary",
|
|
5800
5808
|
"--text-tertiary"
|
|
@@ -13167,6 +13175,25 @@
|
|
|
13167
13175
|
"Content sections without full-viewport height"
|
|
13168
13176
|
]
|
|
13169
13177
|
},
|
|
13178
|
+
"kanban-board": {
|
|
13179
|
+
"category": "data-display",
|
|
13180
|
+
"description": "Stage columns in one row with cards that move between columns. Cards move by native drag and drop or by keyboard: Space picks a card up, Left and Right choose the column, Space or Enter drops, Escape cancels; arrows move focus between cards when nothing is held. Each move is announced through an aria-live region. Each column header shows its count and an optional total. Columns listed in `rails` draw as collapsed side rails that expand on click and accept drops. Columns are told apart by tone, never borders; a held card tilts and lifts. The block owns no data: the consumer renders each card's inside and owns persistence, optimistic state and Undo through onMove.",
|
|
13181
|
+
"components_used": [
|
|
13182
|
+
"card",
|
|
13183
|
+
"status-dot",
|
|
13184
|
+
"chip"
|
|
13185
|
+
],
|
|
13186
|
+
"when_to_use": [
|
|
13187
|
+
"Records that move through stages (a sales pipeline, orders, booking requests)",
|
|
13188
|
+
"Boards where stages are changed by drag and must also work from the keyboard",
|
|
13189
|
+
"Parked stages (paused, archived) that should stay one click away without taking a full column"
|
|
13190
|
+
],
|
|
13191
|
+
"when_not_to_use": [
|
|
13192
|
+
"Sorting and filtering many records by field (use data-table)",
|
|
13193
|
+
"Reordering cards within one list (the block moves cards between columns only)",
|
|
13194
|
+
"Read-only status summaries (use stat-card or right-rail-list)"
|
|
13195
|
+
]
|
|
13196
|
+
},
|
|
13170
13197
|
"login-form": {
|
|
13171
13198
|
"category": "authentication",
|
|
13172
13199
|
"description": "A login form block using Visor form components (Button, Input, Label, Card), with optional OAuth provider buttons.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loworbitstudio/visor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.47.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.
|
|
49
|
+
"@loworbitstudio/visor-theme-engine": "^0.35.0",
|
|
50
50
|
"commander": "^13.1.0",
|
|
51
51
|
"diff": "^8.0.4",
|
|
52
52
|
"picocolors": "^1.1.1",
|