@loworbitstudio/visor 1.51.0 → 1.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "0.4.0",
3
- "generated_at": "2026-11-14T03:24:58.774Z",
3
+ "generated_at": "2026-11-14T04:36:08.558Z",
4
4
  "components": {
5
5
  "accessibility-specimen": {
6
6
  "changeType": "current",
@@ -4325,12 +4325,12 @@
4325
4325
  {
4326
4326
  "path": "blocks/admin-shell/admin-shell.tsx",
4327
4327
  "type": "registry:block",
4328
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\nimport styles from \"./admin-shell.module.css\"\n\nexport interface AdminShellProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Branding slot at the top of the sidebar (logo, wordmark, product switcher). */\n logo?: React.ReactNode\n /** Navigation content rendered in the sidebar body. Consumer provides their own link list. */\n sidebarNav: React.ReactNode\n /** Bottom-of-sidebar slot (user menu, logout, theme toggle, etc.). */\n sidebarFooter?: React.ReactNode\n /** Sidebar width. Number is treated as pixels; strings pass through. Default 256. */\n sidebarWidth?: number | string\n\n /**\n * When true, the sidebar folds to an icon rail and back, from a button beside\n * the logo or the `collapseShortcut` key. The shell and its sidebar carry\n * `data-collapsed`, so a slot can hide its labels. Desk only: below 48rem the\n * sidebar stays open and the button is not drawn. Default false.\n */\n collapsible?: boolean\n /** Uncontrolled initial state, used when nothing is remembered. Default false. */\n defaultCollapsed?: boolean\n /** Controlled state. Pair with `onCollapsedChange`. */\n collapsed?: boolean\n /** Called with the next state when the button or the key folds or opens the sidebar. */\n onCollapsedChange?: (collapsed: boolean) => void\n /** Key pressed with ⌘ (Ctrl off a Mac) that folds and opens the sidebar. `false` turns it off. Default \"\\\\\". */\n collapseShortcut?: string | false\n /** localStorage key that remembers the state per browser. Omit to remember nothing. */\n storageKey?: string\n\n /** Breadcrumb component instance rendered at the start of the topbar. */\n breadcrumb?: React.ReactNode\n /** Left side of the topbar, after the breadcrumb. */\n topbarStart?: React.ReactNode\n /** Center slot (status indicators, search, realtime signals). */\n topbarCenter?: React.ReactNode\n /** Right side of the topbar (user menu, theme toggle, quick actions). */\n topbarEnd?: React.ReactNode\n /** When true, the topbar is not rendered. Default false. */\n hideTopbar?: boolean\n\n /** Main content. */\n children: React.ReactNode\n /** Optional max-width for the main content area. Number is treated as pixels. */\n mainMaxWidth?: number | string\n /** Padding scale applied to the main content area. Default \"lg\". */\n mainPadding?: \"none\" | \"sm\" | \"md\" | \"lg\"\n}\n\n// The rail is desk-only; this matches the shell's narrow container query.\nconst NARROW_QUERY = \"(max-width: 48rem)\"\n\nfunction subscribeNarrow(callback: () => void) {\n const mql = window.matchMedia(NARROW_QUERY)\n mql.addEventListener(\"change\", callback)\n return () => mql.removeEventListener(\"change\", callback)\n}\n\nconst getNarrow = () => window.matchMedia(NARROW_QUERY).matches\nconst getFalse = () => false\n\nfunction subscribeStorage(callback: () => void) {\n window.addEventListener(\"storage\", callback)\n return () => window.removeEventListener(\"storage\", callback)\n}\n\n// A private window or blocked storage throws; the shell then just opens expanded.\nfunction readStored(key: string | undefined): boolean | null {\n if (!key) return null\n try {\n const value = window.localStorage.getItem(key)\n return value === \"rail\" ? true : value === \"open\" ? false : null\n } catch {\n return null\n }\n}\n\nfunction writeStored(key: string | undefined, collapsed: boolean) {\n if (!key) return\n try {\n window.localStorage.setItem(key, collapsed ? \"rail\" : \"open\")\n } catch {\n // Not remembered in a private window.\n }\n}\n\nfunction resolveSize(value: number | string | undefined, fallback: string): string {\n if (value == null) return fallback\n return typeof value === \"number\" ? `${value}px` : value\n}\n\nexport function AdminShell({\n logo,\n sidebarNav,\n sidebarFooter,\n sidebarWidth = 256,\n collapsible = false,\n defaultCollapsed = false,\n collapsed: collapsedProp,\n onCollapsedChange,\n collapseShortcut = \"\\\\\",\n storageKey,\n breadcrumb,\n topbarStart,\n topbarCenter,\n topbarEnd,\n hideTopbar = false,\n children,\n mainMaxWidth,\n mainPadding = \"lg\",\n className,\n style,\n ...props\n}: AdminShellProps) {\n const narrow = React.useSyncExternalStore(subscribeNarrow, getNarrow, getFalse)\n const stored = React.useSyncExternalStore(\n subscribeStorage,\n () => readStored(storageKey),\n () => null\n )\n const [localCollapsed, setLocalCollapsed] = React.useState<boolean | null>(null)\n // Only a toggle animates; restoring the remembered state on load does not.\n const [animate, setAnimate] = React.useState(false)\n const sidebarId = React.useId()\n\n const isCollapsed = collapsedProp ?? localCollapsed ?? stored ?? defaultCollapsed\n const canFold = collapsible && !narrow\n const railed = canFold && isCollapsed\n\n const toggle = React.useCallback(() => {\n const next = !isCollapsed\n setAnimate(true)\n if (collapsedProp === undefined) setLocalCollapsed(next)\n writeStored(storageKey, next)\n onCollapsedChange?.(next)\n }, [isCollapsed, collapsedProp, storageKey, onCollapsedChange])\n\n React.useEffect(() => {\n if (!canFold || collapseShortcut === false) return\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === collapseShortcut && (event.metaKey || event.ctrlKey) && !event.altKey) {\n event.preventDefault()\n toggle()\n }\n }\n window.addEventListener(\"keydown\", onKeyDown)\n return () => window.removeEventListener(\"keydown\", onKeyDown)\n }, [canFold, collapseShortcut, toggle])\n\n const collapsedAttr = collapsible ? String(railed) : undefined\n const toggleLabel = railed ? \"Expand the sidebar\" : \"Collapse the sidebar\"\n\n const resolvedSidebarWidth = resolveSize(sidebarWidth, \"16rem\")\n const resolvedMaxWidth = resolveSize(mainMaxWidth, \"none\")\n\n const shellStyle = {\n ...style,\n [\"--admin-shell-sidebar-width\" as string]: resolvedSidebarWidth,\n [\"--admin-shell-main-max-width\" as string]: resolvedMaxWidth,\n } as React.CSSProperties\n\n return (\n <div\n className={cn(styles.root, className)}\n style={shellStyle}\n data-slot=\"admin-shell\"\n data-collapsed={collapsedAttr}\n data-animate={animate ? \"\" : undefined}\n {...props}\n >\n <a href=\"#admin-main-content\" className={styles.skipLink}>\n Skip to main content\n </a>\n\n <aside\n id={sidebarId}\n className={styles.sidebar}\n data-slot=\"admin-shell-sidebar\"\n data-collapsed={collapsedAttr}\n aria-label=\"Primary navigation\"\n >\n {logo || canFold ? (\n <div className={styles.sidebarHeader} data-slot=\"admin-shell-sidebar-header\">\n {logo}\n {canFold ? (\n <button\n type=\"button\"\n className={styles.collapseButton}\n data-slot=\"admin-shell-collapse\"\n aria-expanded={!railed}\n aria-controls={sidebarId}\n aria-label={toggleLabel}\n aria-keyshortcuts={\n collapseShortcut === false\n ? undefined\n : `Meta+${collapseShortcut} Control+${collapseShortcut}`\n }\n title={toggleLabel}\n onClick={toggle}\n >\n <svg\n viewBox=\"0 0 16 16\"\n width=\"16\"\n height=\"16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.6\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <rect x=\"2\" y=\"2.5\" width=\"12\" height=\"11\" rx=\"2.5\" />\n <path d=\"M6.5 2.5v11M11 6.5 9.5 8l1.5 1.5\" />\n </svg>\n </button>\n ) : null}\n </div>\n ) : null}\n <nav\n className={styles.sidebarNav}\n data-slot=\"admin-shell-sidebar-nav\"\n aria-label=\"Sidebar\"\n >\n {sidebarNav}\n </nav>\n {sidebarFooter ? (\n <div className={styles.sidebarFooter} data-slot=\"admin-shell-sidebar-footer\">\n {sidebarFooter}\n </div>\n ) : null}\n </aside>\n\n <div className={styles.body} data-slot=\"admin-shell-body\">\n {!hideTopbar ? (\n <header\n role=\"banner\"\n className={styles.topbar}\n data-slot=\"admin-shell-topbar\"\n >\n <div className={styles.topbarStart}>\n {breadcrumb}\n {topbarStart}\n </div>\n <div className={styles.topbarCenter}>{topbarCenter}</div>\n <div className={styles.topbarEnd}>{topbarEnd}</div>\n </header>\n ) : null}\n\n <main\n id=\"admin-main-content\"\n role=\"main\"\n className={styles.main}\n data-slot=\"admin-shell-main\"\n data-padding={mainPadding}\n tabIndex={-1}\n >\n <div className={styles.mainInner}>{children}</div>\n </main>\n </div>\n </div>\n )\n}\n"
4328
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\nimport styles from \"./admin-shell.module.css\"\n\nexport interface AdminShellProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Branding slot at the top of the sidebar (logo, wordmark, product switcher). */\n logo?: React.ReactNode\n /** Navigation content rendered in the sidebar body. Consumer provides their own link list. */\n sidebarNav: React.ReactNode\n /** Bottom-of-sidebar slot (user menu, logout, theme toggle, etc.). */\n sidebarFooter?: React.ReactNode\n /** Sidebar width. Number is treated as pixels; strings pass through. Default 256. */\n sidebarWidth?: number | string\n\n /**\n * When true, the sidebar folds to an icon rail and back, from a button beside\n * the logo or the `collapseShortcut` key. The shell and its sidebar carry\n * `data-collapsed`, so a slot can hide its labels. Desk only: below 48rem the\n * sidebar stays open and the button is not drawn. Default false.\n */\n collapsible?: boolean\n /** Uncontrolled initial state, used when nothing is remembered. Default false. */\n defaultCollapsed?: boolean\n /** Controlled state. Pair with `onCollapsedChange`. */\n collapsed?: boolean\n /** Called with the next state when the button or the key folds or opens the sidebar. */\n onCollapsedChange?: (collapsed: boolean) => void\n /** Key pressed with ⌘ (Ctrl off a Mac) that folds and opens the sidebar. `false` turns it off. Default \"\\\\\". */\n collapseShortcut?: string | false\n /** localStorage key that remembers the state per browser. Omit to remember nothing. */\n storageKey?: string\n\n /** Breadcrumb component instance rendered at the start of the topbar. */\n breadcrumb?: React.ReactNode\n /** Left side of the topbar, after the breadcrumb. */\n topbarStart?: React.ReactNode\n /** Center slot (status indicators, search, realtime signals). */\n topbarCenter?: React.ReactNode\n /** Right side of the topbar (user menu, theme toggle, quick actions). */\n topbarEnd?: React.ReactNode\n /** When true, the topbar is not rendered. Below 48rem a bar holding just the menu button still is. Default false. */\n hideTopbar?: boolean\n\n /** Main content. */\n children: React.ReactNode\n /** Optional max-width for the main content area. Number is treated as pixels. */\n mainMaxWidth?: number | string\n /** Padding scale applied to the main content area. Default \"lg\". */\n mainPadding?: \"none\" | \"sm\" | \"md\" | \"lg\"\n}\n\n// The rail is desk-only; this matches the shell's narrow container query.\nconst NARROW_QUERY = \"(max-width: 48rem)\"\n\nfunction subscribeNarrow(callback: () => void) {\n const mql = window.matchMedia(NARROW_QUERY)\n mql.addEventListener(\"change\", callback)\n return () => mql.removeEventListener(\"change\", callback)\n}\n\nconst getNarrow = () => window.matchMedia(NARROW_QUERY).matches\nconst getFalse = () => false\n\nfunction subscribeStorage(callback: () => void) {\n window.addEventListener(\"storage\", callback)\n return () => window.removeEventListener(\"storage\", callback)\n}\n\n// A private window or blocked storage throws; the shell then just opens expanded.\nfunction readStored(key: string | undefined): boolean | null {\n if (!key) return null\n try {\n const value = window.localStorage.getItem(key)\n return value === \"rail\" ? true : value === \"open\" ? false : null\n } catch {\n return null\n }\n}\n\nfunction writeStored(key: string | undefined, collapsed: boolean) {\n if (!key) return\n try {\n window.localStorage.setItem(key, collapsed ? \"rail\" : \"open\")\n } catch {\n // Not remembered in a private window.\n }\n}\n\nconst FOCUSABLE =\n 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), details > summary'\n\nfunction focusables(container: HTMLElement): HTMLElement[] {\n return Array.from(container.querySelectorAll<HTMLElement>(FOCUSABLE)).filter((el) => {\n const css = getComputedStyle(el)\n return css.display !== \"none\" && css.visibility !== \"hidden\"\n })\n}\n\nfunction resolveSize(value: number | string | undefined, fallback: string): string {\n if (value == null) return fallback\n return typeof value === \"number\" ? `${value}px` : value\n}\n\nexport function AdminShell({\n logo,\n sidebarNav,\n sidebarFooter,\n sidebarWidth = 256,\n collapsible = false,\n defaultCollapsed = false,\n collapsed: collapsedProp,\n onCollapsedChange,\n collapseShortcut = \"\\\\\",\n storageKey,\n breadcrumb,\n topbarStart,\n topbarCenter,\n topbarEnd,\n hideTopbar = false,\n children,\n mainMaxWidth,\n mainPadding = \"lg\",\n className,\n style,\n ...props\n}: AdminShellProps) {\n const narrow = React.useSyncExternalStore(subscribeNarrow, getNarrow, getFalse)\n const stored = React.useSyncExternalStore(\n subscribeStorage,\n () => readStored(storageKey),\n () => null\n )\n const [localCollapsed, setLocalCollapsed] = React.useState<boolean | null>(null)\n // Only a toggle animates; restoring the remembered state on load does not.\n const [animate, setAnimate] = React.useState(false)\n const sidebarId = React.useId()\n // Below 48rem the sidebar is a sheet behind the topbar's menu button (VI-781).\n const [sheetOpen, setSheetOpen] = React.useState(false)\n const sidebarRef = React.useRef<HTMLElement>(null)\n const menuRef = React.useRef<HTMLButtonElement>(null)\n // Widening past the phone breakpoint closes the sheet.\n if (sheetOpen && !narrow) setSheetOpen(false)\n\n const isCollapsed = collapsedProp ?? localCollapsed ?? stored ?? defaultCollapsed\n const canFold = collapsible && !narrow\n const railed = canFold && isCollapsed\n\n const toggle = React.useCallback(() => {\n const next = !isCollapsed\n setAnimate(true)\n if (collapsedProp === undefined) setLocalCollapsed(next)\n writeStored(storageKey, next)\n onCollapsedChange?.(next)\n }, [isCollapsed, collapsedProp, storageKey, onCollapsedChange])\n\n React.useEffect(() => {\n if (!canFold || collapseShortcut === false) return\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === collapseShortcut && (event.metaKey || event.ctrlKey) && !event.altKey) {\n event.preventDefault()\n toggle()\n }\n }\n window.addEventListener(\"keydown\", onKeyDown)\n return () => window.removeEventListener(\"keydown\", onKeyDown)\n }, [canFold, collapseShortcut, toggle])\n\n React.useEffect(() => {\n const sheet = sidebarRef.current\n if (!sheetOpen || !sheet) return\n const menu = menuRef.current\n const html = document.documentElement\n const overflow = html.style.overflow\n html.style.overflow = \"hidden\"\n focusables(sheet)[0]?.focus()\n\n const onKeyDown = (event: KeyboardEvent) => {\n // A menu open inside the sheet (Radix marks its Esc handled) closes first.\n if (event.key === \"Escape\" && !event.defaultPrevented) {\n event.preventDefault()\n setSheetOpen(false)\n return\n }\n if (event.key !== \"Tab\") return\n const items = focusables(sheet)\n if (items.length === 0) return\n const active = document.activeElement\n const edge = event.shiftKey ? items[0] : items[items.length - 1]\n if (active === edge || !sheet.contains(active)) {\n event.preventDefault()\n ;(event.shiftKey ? items[items.length - 1] : items[0]).focus()\n }\n }\n document.addEventListener(\"keydown\", onKeyDown)\n return () => {\n document.removeEventListener(\"keydown\", onKeyDown)\n html.style.overflow = overflow\n menu?.focus()\n }\n }, [sheetOpen])\n\n const closeOnLink = (event: React.MouseEvent) => {\n if ((event.target as Element).closest(\"a[href]\")) setSheetOpen(false)\n }\n\n const menuButton = (\n <button\n ref={menuRef}\n type=\"button\"\n className={styles.menuButton}\n data-slot=\"admin-shell-menu\"\n aria-label=\"Menu\"\n aria-expanded={sheetOpen}\n aria-controls={sidebarId}\n onClick={() => setSheetOpen(true)}\n >\n <svg\n viewBox=\"0 0 16 16\"\n width=\"20\"\n height=\"20\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.6\"\n strokeLinecap=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M2.5 4h11M2.5 8h11M2.5 12h11\" />\n </svg>\n </button>\n )\n\n const collapsedAttr = collapsible ? String(railed) : undefined\n const toggleLabel = railed ? \"Expand the sidebar\" : \"Collapse the sidebar\"\n\n const resolvedSidebarWidth = resolveSize(sidebarWidth, \"16rem\")\n const resolvedMaxWidth = resolveSize(mainMaxWidth, \"none\")\n\n const shellStyle = {\n ...style,\n [\"--admin-shell-sidebar-width\" as string]: resolvedSidebarWidth,\n [\"--admin-shell-main-max-width\" as string]: resolvedMaxWidth,\n } as React.CSSProperties\n\n return (\n <div\n className={cn(styles.root, className)}\n style={shellStyle}\n data-slot=\"admin-shell\"\n data-collapsed={collapsedAttr}\n data-animate={animate ? \"\" : undefined}\n {...props}\n >\n <a href=\"#admin-main-content\" className={styles.skipLink} inert={sheetOpen}>\n Skip to main content\n </a>\n\n {sheetOpen ? (\n <div\n className={styles.scrim}\n data-slot=\"admin-shell-scrim\"\n aria-hidden=\"true\"\n onClick={() => setSheetOpen(false)}\n />\n ) : null}\n\n <aside\n ref={sidebarRef}\n id={sidebarId}\n className={styles.sidebar}\n data-slot=\"admin-shell-sidebar\"\n data-collapsed={collapsedAttr}\n data-sheet={sheetOpen ? \"open\" : undefined}\n aria-label=\"Primary navigation\"\n onClick={sheetOpen ? closeOnLink : undefined}\n >\n {logo || canFold ? (\n <div className={styles.sidebarHeader} data-slot=\"admin-shell-sidebar-header\">\n {logo}\n {canFold ? (\n <button\n type=\"button\"\n className={styles.collapseButton}\n data-slot=\"admin-shell-collapse\"\n aria-expanded={!railed}\n aria-controls={sidebarId}\n aria-label={toggleLabel}\n aria-keyshortcuts={\n collapseShortcut === false\n ? undefined\n : `Meta+${collapseShortcut} Control+${collapseShortcut}`\n }\n title={toggleLabel}\n onClick={toggle}\n >\n <svg\n viewBox=\"0 0 16 16\"\n width=\"16\"\n height=\"16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.6\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <rect x=\"2\" y=\"2.5\" width=\"12\" height=\"11\" rx=\"2.5\" />\n <path d=\"M6.5 2.5v11M11 6.5 9.5 8l1.5 1.5\" />\n </svg>\n </button>\n ) : null}\n </div>\n ) : null}\n <nav\n className={styles.sidebarNav}\n data-slot=\"admin-shell-sidebar-nav\"\n aria-label=\"Sidebar\"\n >\n {sidebarNav}\n </nav>\n {sidebarFooter ? (\n <div className={styles.sidebarFooter} data-slot=\"admin-shell-sidebar-footer\">\n {sidebarFooter}\n </div>\n ) : null}\n </aside>\n\n <div className={styles.body} data-slot=\"admin-shell-body\" inert={sheetOpen}>\n {hideTopbar ? (\n <header\n role=\"banner\"\n className={cn(styles.topbar, styles.menuBar)}\n data-slot=\"admin-shell-menu-bar\"\n >\n {menuButton}\n </header>\n ) : (\n <header\n role=\"banner\"\n className={styles.topbar}\n data-slot=\"admin-shell-topbar\"\n >\n <div className={styles.topbarStart}>\n {menuButton}\n {breadcrumb}\n {topbarStart}\n </div>\n <div className={styles.topbarCenter}>{topbarCenter}</div>\n <div className={styles.topbarEnd}>{topbarEnd}</div>\n </header>\n )}\n\n <main\n id=\"admin-main-content\"\n role=\"main\"\n className={styles.main}\n data-slot=\"admin-shell-main\"\n data-padding={mainPadding}\n tabIndex={-1}\n >\n <div className={styles.mainInner}>{children}</div>\n </main>\n </div>\n </div>\n )\n}\n"
4329
4329
  },
4330
4330
  {
4331
4331
  "path": "blocks/admin-shell/admin-shell.module.css",
4332
4332
  "type": "registry:block",
4333
- "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/* Collapsible: the sidebar folds to an icon rail (VI-770) */\n.sidebar[data-collapsed] {\n overflow-x: clip;\n}\n\n.root[data-animate] .sidebar {\n transition: width var(--admin-shell-rail-duration, var(--motion-duration-slow, 500ms))\n var(--admin-shell-rail-easing, var(--motion-easing-default, ease));\n}\n\n.sidebar[data-collapsed=\"true\"] {\n width: var(--admin-shell-rail-width, 4.25rem);\n}\n\n.collapseButton {\n display: inline-grid;\n place-items: center;\n flex: none;\n width: var(--spacing-8, 2rem);\n height: var(--spacing-8, 2rem);\n margin-left: auto;\n padding: 0;\n border: 0;\n border-radius: var(--radius-sm, 0.375rem);\n background: transparent;\n color: var(--text-secondary, #4b5563);\n cursor: pointer;\n}\n\n.collapseButton:hover {\n background: var(--interactive-ghost-bg-hover, var(--surface-muted, #f3f4f6));\n color: var(--text-primary, #111827);\n}\n\n.collapseButton:focus-visible {\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.collapseButton svg {\n transition: transform var(--admin-shell-rail-duration, var(--motion-duration-slow, 500ms))\n var(--admin-shell-rail-easing, var(--motion-easing-default, ease));\n}\n\n.sidebar[data-collapsed=\"true\"] .collapseButton {\n margin-left: 0;\n}\n\n.sidebar[data-collapsed=\"true\"] .collapseButton svg {\n transform: scaleX(-1);\n}\n\n.sidebar[data-collapsed=\"true\"] .sidebarHeader {\n flex-direction: column;\n gap: var(--spacing-2, 0.5rem);\n padding-left: var(--spacing-2, 0.5rem);\n padding-right: var(--spacing-2, 0.5rem);\n}\n\n.sidebar[data-collapsed=\"true\"] .sidebarNav {\n align-items: center;\n padding-left: var(--spacing-2, 0.5rem);\n padding-right: var(--spacing-2, 0.5rem);\n}\n\n.sidebar[data-collapsed=\"true\"] .sidebarFooter {\n display: flex;\n justify-content: center;\n padding-left: var(--spacing-2, 0.5rem);\n padding-right: var(--spacing-2, 0.5rem);\n}\n\n/* A slot marks its labels; the rail hides them visually and keeps them as accessible names. */\n.sidebar[data-collapsed=\"true\"] [data-admin-shell-label] {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .root[data-animate] .sidebar,\n .collapseButton svg {\n transition: none;\n }\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"
4333
+ "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/* Collapsible: the sidebar folds to an icon rail (VI-770) */\n.sidebar[data-collapsed] {\n overflow-x: clip;\n}\n\n.root[data-animate] .sidebar {\n transition: width var(--admin-shell-rail-duration, var(--motion-duration-slow, 500ms))\n var(--admin-shell-rail-easing, var(--motion-easing-default, ease));\n}\n\n.sidebar[data-collapsed=\"true\"] {\n width: var(--admin-shell-rail-width, 4.25rem);\n}\n\n.collapseButton {\n display: inline-grid;\n place-items: center;\n flex: none;\n width: var(--spacing-8, 2rem);\n height: var(--spacing-8, 2rem);\n margin-left: auto;\n padding: 0;\n border: 0;\n border-radius: var(--radius-sm, 0.375rem);\n background: transparent;\n color: var(--text-secondary, #4b5563);\n cursor: pointer;\n}\n\n.collapseButton:hover {\n background: var(--interactive-ghost-bg-hover, var(--surface-muted, #f3f4f6));\n color: var(--text-primary, #111827);\n}\n\n.collapseButton:focus-visible {\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.collapseButton svg {\n transition: transform var(--admin-shell-rail-duration, var(--motion-duration-slow, 500ms))\n var(--admin-shell-rail-easing, var(--motion-easing-default, ease));\n}\n\n.sidebar[data-collapsed=\"true\"] .collapseButton {\n margin-left: 0;\n}\n\n.sidebar[data-collapsed=\"true\"] .collapseButton svg {\n transform: scaleX(-1);\n}\n\n.sidebar[data-collapsed=\"true\"] .sidebarHeader {\n flex-direction: column;\n gap: var(--spacing-2, 0.5rem);\n padding-left: var(--spacing-2, 0.5rem);\n padding-right: var(--spacing-2, 0.5rem);\n}\n\n.sidebar[data-collapsed=\"true\"] .sidebarNav {\n align-items: center;\n padding-left: var(--spacing-2, 0.5rem);\n padding-right: var(--spacing-2, 0.5rem);\n}\n\n.sidebar[data-collapsed=\"true\"] .sidebarFooter {\n display: flex;\n justify-content: center;\n padding-left: var(--spacing-2, 0.5rem);\n padding-right: var(--spacing-2, 0.5rem);\n}\n\n/* A slot marks its labels; the rail hides them visually and keeps them as accessible names. */\n.sidebar[data-collapsed=\"true\"] [data-admin-shell-label] {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .root[data-animate] .sidebar,\n .collapseButton svg {\n transition: none;\n }\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/* Phone: the sidebar is a sheet behind the topbar's menu button (VI-781). */\n.menuButton {\n display: none;\n}\n\n/* With hideTopbar, the bar holding only the menu button exists on a phone alone. */\n.menuBar {\n display: none;\n}\n\n.scrim {\n display: none;\n}\n\n@media (max-width: 48rem) {\n .menuBar {\n display: flex;\n }\n\n .menuButton {\n display: inline-grid;\n place-items: center;\n flex: none;\n /* 44px touch target (WCAG 2.5.5). */\n width: 2.75rem;\n height: 2.75rem;\n /* The icon lines up with the page gutter; the 44px target overhangs it. */\n margin-left: calc(var(--spacing-3, 0.75rem) * -1);\n padding: 0;\n border: 0;\n border-radius: var(--radius-md, 0.5rem);\n background: transparent;\n color: var(--text-primary, #111827);\n cursor: pointer;\n }\n\n .menuButton:hover {\n background: var(--interactive-ghost-bg-hover, var(--surface-muted, #f3f4f6));\n }\n\n .menuButton: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 .root .sidebar,\n .root[data-animate] .sidebar {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n z-index: var(--z-modal, 1300);\n width: min(var(--admin-shell-sidebar-width, 16rem), calc(100% - var(--spacing-12, 3rem)));\n min-height: 0;\n max-height: none;\n box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));\n transform: translateX(-100%);\n visibility: hidden;\n transition:\n transform var(--motion-duration-normal, 200ms) var(--motion-easing-exit, ease-in),\n visibility 0s linear var(--motion-duration-normal, 200ms);\n }\n\n .root .sidebar[data-sheet=\"open\"] {\n transform: none;\n visibility: visible;\n transition: transform var(--motion-duration-normal, 200ms) var(--motion-easing-enter, ease-out);\n }\n\n .scrim {\n display: block;\n position: fixed;\n inset: 0;\n z-index: var(--z-modal, 1300);\n background: var(--overlay-bg, rgba(0, 0, 0, 0.5));\n backdrop-filter: blur(4px);\n -webkit-backdrop-filter: blur(4px);\n animation: admin-shell-scrim-in var(--motion-duration-normal, 200ms)\n var(--motion-easing-enter, ease-out);\n }\n}\n\n@keyframes admin-shell-scrim-in {\n from {\n opacity: 0;\n }\n}\n\n@media (max-width: 48rem) and (prefers-reduced-motion: reduce) {\n .root .sidebar,\n .root[data-animate] .sidebar,\n .root .sidebar[data-sheet=\"open\"] {\n transition: none;\n }\n\n .scrim {\n animation: none;\n }\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"
4334
4334
  }
4335
4335
  ]
4336
4336
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "0.4.0",
3
- "generated_at": "2026-11-14T03:24:58.767Z",
3
+ "generated_at": "2026-11-14T04:36:08.549Z",
4
4
  "components": {
5
5
  "accessibility-specimen": {
6
6
  "category": "specimen",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loworbitstudio/visor",
3
- "version": "1.51.0",
3
+ "version": "1.52.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": {