@uibot/registry 0.5.0 → 0.7.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.
Files changed (54) hide show
  1. package/dist/index.js +9 -9
  2. package/dist/shadcn/r/admin-dashboard.json +70 -0
  3. package/dist/shadcn/r/admin-shell.json +148 -0
  4. package/dist/shadcn/r/ai-chat.json +74 -0
  5. package/dist/shadcn/r/analytics-dashboard.json +65 -0
  6. package/dist/shadcn/r/app-shell-floating.json +54 -0
  7. package/dist/shadcn/r/app-shell-icon-rail.json +54 -0
  8. package/dist/shadcn/r/app-shell-inset.json +54 -0
  9. package/dist/shadcn/r/app-shell-settings.json +54 -0
  10. package/dist/shadcn/r/app-shell-sidebar.json +54 -0
  11. package/dist/shadcn/r/app-shell-workspace.json +54 -0
  12. package/dist/shadcn/r/auth.json +61 -0
  13. package/dist/shadcn/r/blog.json +64 -0
  14. package/dist/shadcn/r/charts.json +211 -0
  15. package/dist/shadcn/r/content.json +444 -0
  16. package/dist/shadcn/r/creation-html-generation.json +29 -0
  17. package/dist/shadcn/r/creation-reference-generation.json +29 -0
  18. package/dist/shadcn/r/creation-revision-export.json +27 -0
  19. package/dist/shadcn/r/creation-shared.json +24 -0
  20. package/dist/shadcn/r/creation-workspace.json +33 -0
  21. package/dist/shadcn/r/crm.json +67 -0
  22. package/dist/shadcn/r/dashboard.json +147 -0
  23. package/dist/shadcn/r/data-studio.json +368 -0
  24. package/dist/shadcn/r/data-table.json +224 -0
  25. package/dist/shadcn/r/data.json +320 -0
  26. package/dist/shadcn/r/ecommerce.json +65 -0
  27. package/dist/shadcn/r/feedback.json +300 -0
  28. package/dist/shadcn/r/field.json +164 -0
  29. package/dist/shadcn/r/form.json +425 -0
  30. package/dist/shadcn/r/grid.json +188 -0
  31. package/dist/shadcn/r/interactive.json +355 -0
  32. package/dist/shadcn/r/kanban.json +154 -0
  33. package/dist/shadcn/r/layout.json +529 -0
  34. package/dist/shadcn/r/lms.json +74 -0
  35. package/dist/shadcn/r/marketing.json +402 -0
  36. package/dist/shadcn/r/nav.json +257 -0
  37. package/dist/shadcn/r/portfolio.json +62 -0
  38. package/dist/shadcn/r/presentation.json +454 -0
  39. package/dist/shadcn/r/pricing.json +63 -0
  40. package/dist/shadcn/r/primitives.json +360 -0
  41. package/dist/shadcn/r/saas-landing.json +60 -0
  42. package/dist/shadcn/r/sections.json +734 -0
  43. package/dist/shadcn/r/settings.json +72 -0
  44. package/dist/shadcn/r/shadcn-admin-shell.json +49 -0
  45. package/dist/shadcn/r/shadcn-admin.json +76 -0
  46. package/dist/shadcn/r/store.json +75 -0
  47. package/dist/shadcn/r/support-inbox.json +63 -0
  48. package/dist/shadcn/r/team-directory.json +59 -0
  49. package/dist/shadcn/r/uibot-base.json +30 -0
  50. package/dist/shadcn/r/uibot-theme.json +86 -0
  51. package/dist/shadcn/r/workspace.json +174 -0
  52. package/dist/shadcn/registry.json +615 -0
  53. package/dist/shadcn.d.ts +10 -5
  54. package/package.json +2 -2
@@ -0,0 +1,529 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "layout",
4
+ "type": "registry:ui",
5
+ "description": "Flex container for composing layout. Use as a row or column spacer between other blocks.",
6
+ "dependencies": [
7
+ "react"
8
+ ],
9
+ "registryDependencies": [
10
+ "@uibot/uibot-base"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "components/uibot/layout.tsx",
15
+ "target": "components/uibot/layout.tsx",
16
+ "content": "import { PREVIEW_SCOPE_CSS, SCROLLBAR_CSS } from \"./preview-scope\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport { useEffect, useId, useRef, useState } from \"react\";\nimport { AdminFrame } from \"./admin-shell\";\nimport { LiveDrawer, LiveModal, SidebarDrawer } from \"./overlay\";\nimport { emit, type BlockContext } from \"./interaction\";\nimport type { RendererComponent } from \"@/lib/uibot-renderer\";\n\nconst GAP: Record<string, string> = {\n none: \"gap-0\",\n xs: \"gap-1\",\n sm: \"gap-2\",\n md: \"gap-4\",\n lg: \"gap-6\",\n xl: \"gap-8\",\n};\nconst PAD: Record<string, string> = {\n none: \"p-0\",\n xs: \"p-1\",\n sm: \"p-2\",\n md: \"p-4\",\n lg: \"p-6\",\n xl: \"p-8\",\n};\n\n/** Flexible container box */\nexport const Box: RendererComponent = (props, ctx) => {\n const dir =\n props.direction === \"col\" ? \"flex-col\" : props.direction === \"row\" ? \"flex-row\" : \"flex-col\";\n const gap = GAP[typeof props.gap === \"string\" ? props.gap : \"\"] ?? \"\";\n const pad = PAD[typeof props.padding === \"string\" ? props.padding : \"\"] ?? \"\";\n const align = typeof props.align === \"string\" ? `items-${props.align}` : \"\";\n const justify = typeof props.justify === \"string\" ? `justify-${props.justify}` : \"\";\n const wrap = props.wrap === true ? \"flex-wrap\" : \"\";\n const full = props.full === true ? \"w-full\" : \"\";\n const userCls = typeof props.className === \"string\" ? props.className : \"\";\n\n return (\n <div\n className={cn(\"uibot-box flex\", dir, gap, pad, align, justify, wrap, full, userCls)}\n data-uibot-type=\"Box\"\n >\n {ctx.children as ReactNode[]}\n </div>\n );\n};\n\nfunction pageLayoutVariant(value: unknown): \"sidebar\" | \"inset\" | \"floating\" {\n if (value === \"inset\" || value === \"floating\") return value;\n return \"sidebar\";\n}\n\nfunction pageLayoutCollapsible(value: unknown): \"none\" | \"icon\" | \"offcanvas\" {\n if (value === \"icon\" || value === \"offcanvas\") return value;\n return \"none\";\n}\n\nconst ICON_SIDEBAR_CSS = `\n.uibot-icon-sidebar:is(:hover,:focus-within){width:14rem}\n.uibot-icon-sidebar:not(:hover):not(:focus-within) .uibot-menu-link{justify-content:center;gap:0;padding-inline:0}\n.uibot-icon-sidebar:not(:hover):not(:focus-within) .uibot-menu-label,\n.uibot-icon-sidebar:not(:hover):not(:focus-within) .uibot-menu-badge,\n.uibot-icon-sidebar:not(:hover):not(:focus-within) .uibot-sider-full-title,\n.uibot-icon-sidebar:not(:hover):not(:focus-within) .uibot-menu-group-title{display:none}\n.uibot-icon-sidebar:not(:hover):not(:focus-within) .uibot-menu-fallback,\n.uibot-icon-sidebar:not(:hover):not(:focus-within) .uibot-sider-abbreviation{display:block}\n.uibot-icon-sidebar:not(:hover):not(:focus-within) .uibot-sider-title{padding-inline:0;text-align:center}\n.uibot-icon-sidebar .uibot-menu-link{min-width:0}\n.uibot-icon-sidebar .uibot-menu-label{overflow-wrap:anywhere}\n`;\n\n/** Full-page layout with optional header, sidebar, and footer */\nexport const PageLayout: RendererComponent = (props, ctx) => {\n if (props.appearance === \"admin\") return <AdminFrame props={props} ctx={ctx} />;\n return <PageLayoutView props={props} ctx={ctx} />;\n};\n\nfunction PageLayoutView({ props, ctx }: { props: Record<string, unknown>; ctx: BlockContext }) {\n const variant = pageLayoutVariant(props.variant);\n const collapsible = pageLayoutCollapsible(props.collapsible);\n const hasSidebar = Boolean(ctx.slots.sidebar);\n const offcanvas = collapsible === \"offcanvas\";\n const [smallScreen, setSmallScreen] = useState(false);\n const [sidebarOpen, setSidebarOpen] = useState(false);\n const sidebarTrigger = useRef<HTMLButtonElement>(null);\n const sidebarId = useId();\n useEffect(() => {\n if (!offcanvas || !hasSidebar) {\n setSmallScreen(false);\n setSidebarOpen(false);\n return;\n }\n const media = window.matchMedia(\"(max-width:767px)\");\n const sync = () => {\n setSmallScreen(media.matches);\n if (!media.matches) setSidebarOpen(false);\n };\n sync();\n media.addEventListener(\"change\", sync);\n return () => media.removeEventListener(\"change\", sync);\n }, [offcanvas, hasSidebar]);\n\n const asideWidth = collapsible === \"icon\" ? \"w-16\" : \"w-56\";\n const showSidebar = hasSidebar && (!offcanvas || !smallScreen);\n const showHeader =\n typeof props.title === \"string\" || ctx.slots.headerActions || (offcanvas && hasSidebar);\n\n return (\n <div\n className={cn(\n \"uibot-page-layout flex h-dvh flex-col overflow-hidden bg-background text-foreground\",\n variant === \"inset\" && \"uibot-page-layout-inset\",\n variant === \"floating\" && \"uibot-page-layout-floating\",\n )}\n data-uibot-type=\"PageLayout\"\n data-variant={variant}\n data-collapsible={collapsible}\n >\n <style>{PREVIEW_SCOPE_CSS + SCROLLBAR_CSS}</style>\n {collapsible === \"icon\" && <style>{ICON_SIDEBAR_CSS}</style>}\n {showHeader && (\n <header className=\"sticky top-0 z-10 flex h-14 shrink-0 items-center justify-between gap-4 border-b bg-background/95 px-6 backdrop-blur supports-[backdrop-filter]:bg-background/80\">\n {offcanvas && hasSidebar && (\n <button\n ref={sidebarTrigger}\n id={`${sidebarId}-trigger`}\n type=\"button\"\n className=\"inline-flex shrink-0 items-center justify-center rounded-md border px-3 py-2 text-sm focus-visible:ring-2 md:hidden\"\n aria-label=\"Open navigation\"\n aria-haspopup=\"dialog\"\n aria-controls={sidebarId}\n aria-expanded={smallScreen && sidebarOpen}\n onClick={() => setSidebarOpen(true)}\n >\n Menu\n </button>\n )}\n <span className=\"text-base font-semibold tracking-tight\">\n {typeof props.title === \"string\" ? props.title : \"\"}\n </span>\n {ctx.slots.headerActions && (\n <div className=\"flex items-center gap-2\">\n {ctx.slots.headerActions as ReactNode[]}\n </div>\n )}\n </header>\n )}\n <div className={cn(\"flex min-w-0 flex-1 overflow-hidden\", variant === \"inset\" && \"p-2\")}>\n {showSidebar && (\n <aside\n className={cn(\n \"shrink-0 overflow-y-auto bg-muted/30\",\n asideWidth,\n collapsible === \"icon\" && \"uibot-icon-sidebar\",\n offcanvas && \"hidden md:block\",\n variant === \"floating\" ? \"m-2 rounded-xl border shadow-sm\" : \"border-r\",\n )}\n >\n {ctx.slots.sidebar as ReactNode[]}\n </aside>\n )}\n <main\n className={cn(\n \"min-w-0 flex-1 overflow-auto px-6 py-6 [&>*+*]:mt-5\",\n variant === \"inset\" && \"rounded-xl border bg-background shadow-sm\",\n )}\n >\n {ctx.children as ReactNode[]}\n </main>\n </div>\n {offcanvas && hasSidebar && (\n <SidebarDrawer\n id={sidebarId}\n open={smallScreen && sidebarOpen}\n onClose={() => setSidebarOpen(false)}\n triggerRef={sidebarTrigger}\n >\n {ctx.slots.sidebar as ReactNode[]}\n </SidebarDrawer>\n )}\n {ctx.slots.footer && (\n <footer className=\"shrink-0 border-t px-6 py-3 text-sm text-muted-foreground\">\n {ctx.slots.footer as ReactNode[]}\n </footer>\n )}\n </div>\n );\n}\n\n/** Card container with optional title, description, and actions slot */\nexport const Card: RendererComponent = (props, ctx) => {\n const hasHeader =\n typeof props.title === \"string\" ||\n typeof props.description === \"string\" ||\n Boolean(ctx.slots.actions);\n\n return (\n <div\n className=\"uibot-card bg-card text-card-foreground rounded-xl border shadow-sm\"\n data-uibot-type=\"Card\"\n >\n {hasHeader && (\n <div className=\"flex items-start justify-between px-6 pt-6\">\n <div className=\"flex flex-col gap-1\">\n {typeof props.title === \"string\" && (\n <h3 className=\"text-base font-semibold leading-none tracking-tight\">{props.title}</h3>\n )}\n {typeof props.description === \"string\" && (\n <p className=\"text-sm text-muted-foreground\">{props.description}</p>\n )}\n </div>\n {ctx.slots.actions && (\n <div className=\"ml-4 flex items-center gap-2\">\n {ctx.slots.actions as ReactNode[]}\n </div>\n )}\n </div>\n )}\n <div className={cn(\"px-6 pb-6\", hasHeader ? \"pt-4\" : \"pt-6\")}>\n {ctx.children as ReactNode[]}\n {ctx.slots.default as ReactNode[]}\n </div>\n </div>\n );\n};\n\n/** Parse tabs prop — accepts string[] or comma-separated string */\nfunction parseTabs(raw: unknown): string[] {\n if (Array.isArray(raw)) return raw.map(String);\n if (typeof raw === \"string\" && raw.trim())\n return raw\n .split(\",\")\n .map((s) => s.trim())\n .filter(Boolean);\n return [];\n}\n\nfunction TabsView({ props, ctx }: { props: Record<string, unknown>; ctx: BlockContext }) {\n const tabs = parseTabs(props.tabs);\n const [local, setLocal] = useState(Number(props.defaultTab) || 0);\n const disabled = new Set(Array.isArray(props.disabledTabs) ? props.disabledTabs.map(Number) : []);\n const enabled = tabs.map((_, i) => i).filter((i) => !disabled.has(i));\n const segmented = props.variant === \"segmented\";\n const requested = Math.max(\n 0,\n Math.min(tabs.length - 1, typeof props.value === \"number\" ? props.value : local),\n );\n const active = disabled.has(requested) ? (enabled[0] ?? 0) : requested;\n const id = useId();\n const activate = (index: number) => {\n if (disabled.has(index)) return;\n setLocal(index);\n emit(ctx, \"onChange\", { index }, index);\n };\n return (\n <div\n className=\"uibot-tabs\"\n data-uibot-type=\"Tabs\"\n data-variant={segmented ? \"segmented\" : \"underline\"}\n >\n <div\n className={\n segmented\n ? \"inline-flex max-w-full overflow-x-auto rounded-lg bg-muted p-1 gap-1\"\n : \"flex max-w-full overflow-x-auto gap-4 border-b\"\n }\n role=\"tablist\"\n aria-label={String(props.label ?? \"Tabs\")}\n >\n {tabs.map((tab, i) => (\n <button\n key={tab}\n type=\"button\"\n id={`${id}-${i}`}\n role=\"tab\"\n aria-controls={`${id}-panel-${i}`}\n disabled={disabled.has(i)}\n aria-selected={active === i}\n tabIndex={active === i ? 0 : -1}\n onClick={() => activate(i)}\n onKeyDown={(event) => {\n const next =\n event.key === \"ArrowRight\"\n ? (enabled[(enabled.indexOf(i) + 1) % enabled.length] ?? -1)\n : event.key === \"ArrowLeft\"\n ? (enabled[(enabled.indexOf(i) + enabled.length - 1) % enabled.length] ?? -1)\n : event.key === \"Home\"\n ? (enabled[0] ?? -1)\n : event.key === \"End\"\n ? (enabled.at(-1) ?? -1)\n : -1;\n if (next < 0) return;\n event.preventDefault();\n activate(next);\n event.currentTarget.parentElement\n ?.querySelectorAll<HTMLButtonElement>(\"button\")\n [next]?.focus();\n }}\n className={cn(\n \"text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed\",\n segmented ? \"rounded-md px-3 py-1\" : \"border-b-2 px-1 py-2\",\n active === i\n ? segmented\n ? \"bg-background shadow-sm\"\n : \"border-foreground\"\n : \"border-transparent text-muted-foreground\",\n )}\n >\n {tab}\n </button>\n ))}\n </div>\n <div\n role=\"tabpanel\"\n id={`${id}-panel-${active}`}\n aria-labelledby={`${id}-${active}`}\n tabIndex={0}\n className={segmented ? \"pt-4\" : \"pt-6\"}\n >\n {ctx.children[active] as ReactNode}\n </div>\n </div>\n );\n}\nexport const Tabs: RendererComponent = (props, ctx) => <TabsView props={props} ctx={ctx} />;\n\n/** Drawer (off-canvas side panel) — rendered inline in preview */\nconst InlineDrawer: RendererComponent = (props, ctx) => (\n <div\n className=\"uibot-drawer bg-background rounded-lg border shadow-xl\"\n data-uibot-type=\"Drawer\"\n role=\"dialog\"\n aria-label={typeof props.title === \"string\" ? props.title : \"Drawer\"}\n >\n {typeof props.title === \"string\" && (\n <div className=\"flex items-center border-b px-5 py-4\">\n <h2 className=\"text-base font-semibold\">{props.title}</h2>\n </div>\n )}\n <div className=\"px-5 py-4\">{ctx.children as ReactNode[]}</div>\n </div>\n);\n\n/** Modal dialog — rendered inline in preview */\nconst InlineModal: RendererComponent = (props, ctx) => (\n <div\n className=\"uibot-modal\"\n role=\"dialog\"\n data-uibot-type=\"Modal\"\n aria-modal=\"true\"\n aria-label={typeof props.title === \"string\" ? props.title : \"Modal\"}\n >\n <div className=\"bg-background text-foreground mx-auto w-full max-w-md rounded-xl border p-6 shadow-xl\">\n {typeof props.title === \"string\" && (\n <h2 className=\"mb-1 text-lg font-semibold tracking-tight\">{props.title}</h2>\n )}\n {typeof props.description === \"string\" && (\n <p className=\"mb-4 text-sm text-muted-foreground\">{props.description}</p>\n )}\n {ctx.children as ReactNode[]}\n </div>\n </div>\n);\n\n/** Horizontal or vertical separator */\nexport const Divider: RendererComponent = (props) => {\n const vertical = props.orientation === \"vertical\";\n return (\n <hr\n data-uibot-type=\"Divider\"\n aria-orientation={vertical ? \"vertical\" : \"horizontal\"}\n className={cn(\n \"uibot-divider shrink-0 border-0 bg-border\",\n vertical ? \"mx-3 w-px self-stretch\" : \"my-4 h-px w-full\",\n )}\n />\n );\n};\n\nexport const Drawer: RendererComponent = (props, ctx) =>\n props.open === undefined ? InlineDrawer(props, ctx) : LiveDrawer(props, ctx);\nexport const Modal: RendererComponent = (props, ctx) =>\n props.open === undefined ? InlineModal(props, ctx) : LiveModal(props, ctx);\n",
17
+ "type": "registry:ui"
18
+ },
19
+ {
20
+ "path": "components/uibot/preview-scope.ts",
21
+ "target": "components/uibot/preview-scope.ts",
22
+ "content": "/**\n * Page frames (`PageLayout`) fill the viewport so only their main area scrolls. Hosts that embed a\n * rendered page in a smaller pane mark the pane with `data-uibot-preview-scope`; inside it the frame\n * fills the pane instead of the viewport: wrappers between the pane and the frame become a flex column\n * chain, so a pane that is a flex column with a definite height hands the frame exactly the space\n * left under any sibling (such as a notice strip). Without such a pane the frame falls back to\n * `height:100%`, and to content height when that is not definite either. The pane also becomes the\n * containing block for fixed-position content (floating toasts, dialogs), so they anchor to the\n * preview instead of the whole browser window.\n */\nexport const PREVIEW_SCOPE_CSS =\n \"[data-uibot-preview-scope]{contain:layout}[data-uibot-preview-scope] .uibot-admin,[data-uibot-preview-scope] .uibot-page-layout{height:100%;min-height:0;flex:1 1 0}[data-uibot-preview-scope] div:has(.uibot-admin),[data-uibot-preview-scope] div:has(.uibot-page-layout){display:flex;flex-direction:column;min-height:0;flex:1 1 0}\";\n\n/**\n * shadcn/ui Scroll Area look for every scroll container inside a page frame (content area, sidebar,\n * table wrappers, dialogs): a slim 10px track with a rounded, theme-aware thumb. This styles the\n * native scrollbar so it matches shadcn's `ScrollArea`; it does not load Radix.\n */\nexport const SCROLLBAR_CSS =\n \".uibot-admin,.uibot-admin *,.uibot-page-layout,.uibot-page-layout *{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,currentColor 28%,transparent) transparent}.uibot-admin ::-webkit-scrollbar,.uibot-page-layout ::-webkit-scrollbar{width:10px;height:10px}.uibot-admin ::-webkit-scrollbar-track,.uibot-page-layout ::-webkit-scrollbar-track{background:transparent}.uibot-admin ::-webkit-scrollbar-thumb,.uibot-page-layout ::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:9999px;background:color-mix(in srgb,currentColor 28%,transparent);background-clip:padding-box}.uibot-admin ::-webkit-scrollbar-thumb:hover,.uibot-page-layout ::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,currentColor 45%,transparent);background-clip:padding-box}.uibot-admin ::-webkit-scrollbar-corner,.uibot-page-layout ::-webkit-scrollbar-corner{background:transparent}\";\n",
23
+ "type": "registry:ui"
24
+ },
25
+ {
26
+ "path": "components/uibot/admin-shell.tsx",
27
+ "target": "components/uibot/admin-shell.tsx",
28
+ "content": "import {\n useCallback,\n useEffect,\n useRef,\n useState,\n type CSSProperties,\n type ReactNode,\n} from \"react\";\nimport type { RendererComponent } from \"@/lib/uibot-renderer\";\nimport { Icon } from \"./icons\";\nimport { emit, records, text, type BlockContext } from \"./interaction\";\nimport { PREVIEW_SCOPE_CSS, SCROLLBAR_CSS } from \"./preview-scope\";\n\nconst shellStyle = `\n.uibot-admin{font-family:var(--nui-font,Inter,ui-sans-serif,system-ui,sans-serif);display:flex;height:100dvh;overflow:hidden;background:var(--nui-sidebar,#fafafa);color:var(--nui-foreground,#171717);font-size:14px;line-height:1.5}.uibot-admin.dark{background:#141414;color:#fafafa}.uibot-admin *{box-sizing:border-box}.uibot-admin button,.uibot-admin a,.uibot-admin summary{touch-action:manipulation}.uibot-admin button:focus-visible,.uibot-admin a:focus-visible,.uibot-admin summary:focus-visible{outline:2px solid #737373;outline-offset:3px}.nui-sidebar{width:256px;flex:none;padding:8px;position:sticky;top:0;height:100dvh;overflow:auto;display:flex;flex-direction:column}.nui-main{min-width:0;min-height:0;flex:1;display:flex;flex-direction:column;overflow:hidden;margin:8px;margin-inline-start:0;border:1px solid var(--nui-border,#e5e5e5);border-radius:12px;background:var(--nui-surface,#fff);box-shadow:0 1px 2px #00000005}.dark .nui-main{background:#0a0a0a;border-color:#262626}.nui-header{flex:none;height:64px;display:flex;gap:20px;align-items:center;padding:0 24px}.nui-header-links{display:flex;gap:24px;font-weight:500;font-size:14px}.nui-header-links a{color:#737373;text-decoration:none}.nui-header-links a[aria-current=page]{color:inherit}.nui-toolbar{display:flex;gap:12px;align-items:center;margin-inline-start:auto}.nui-icon-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:6px;background:transparent;border:0;color:inherit;cursor:pointer}.nui-icon-button:hover{background:#88888815}.nui-search{display:flex;align-items:center;gap:9px;border:1px solid #e5e5e5;background:transparent;color:#737373;border-radius:6px;padding:5px 10px;width:240px;text-align:start}.nui-search kbd{margin-inline-start:auto;background:#88888810;border-radius:4px;padding:0 4px;font-size:11px}.nui-avatar{width:32px;height:32px;border-radius:50%;background:#eaeaea;color:#353535;display:grid;place-items:center;font-size:12px;font-weight:500}.nui-content{flex:1;min-height:0;overflow:auto;padding:20px 24px 28px}.nui-content>*+*{margin-top:20px}.nui-no-sidebar .nui-main{margin-inline-start:8px}.nui-brand{display:flex;align-items:center;gap:10px;padding:8px;margin-bottom:14px;text-align:start;width:100%;border:0;background:transparent;color:inherit}.nui-brand-mark{width:32px;height:32px;border-radius:8px;background:#171717;color:white;display:grid;place-items:center}.dark .nui-brand-mark{background:#fafafa;color:#171717}.nui-brand-copy{display:flex;flex:1;flex-direction:column;font-size:14px;line-height:19px}.nui-brand-copy small{font-size:12px;color:#737373}.nui-nav-group{margin:12px 0}.nui-nav-label{font-size:12px;font-weight:500;color:#737373;padding:0 8px;margin-bottom:6px}.nui-nav-link{display:flex;align-items:center;gap:9px;padding:7px 8px;border-radius:6px;font-size:14px;color:inherit;text-decoration:none;white-space:nowrap}.nui-nav-link:hover{background:#88888810}.nui-nav-link[aria-current=page]{background:var(--nui-accent,#e9e9e9);color:var(--nui-accent-foreground,inherit);font-weight:500}.dark .nui-nav-link[aria-current=page]{background:var(--nui-accent,#272727)}.dark .nui-nav-link .nui-badge{background:#fafafa;color:#171717}.nui-nav-link .nui-badge{margin-inline-start:auto;border-radius:5px;background:#171717;color:#fff;font-size:11px;padding:0 6px}.nui-nav-section summary{cursor:pointer;list-style:none}.nui-nav-section summary>svg:last-child{margin-inline-start:auto}.nui-nav-section[open] summary>svg:last-child{transform:rotate(90deg)}.nui-rail .nui-nav-section>div{display:none}.nui-nav-footer{margin-top:auto;padding-top:24px}.nui-rail .nui-sidebar{width:64px}.nui-rail .nui-nav-label,.nui-rail .nui-nav-text,.nui-rail .nui-brand-copy,.nui-rail .nui-badge,.nui-rail .nui-brand-chevron{display:none}.nui-rail .nui-nav-link{justify-content:center;padding:10px 0}.nui-command{border:1px solid #ddd;border-radius:10px;width:500px;max-width:calc(100vw - 32px);padding:0;margin:auto;background:inherit;color:inherit;box-shadow:0 20px 80px #0003}.nui-command::backdrop,.nui-mobile::backdrop{background:#0008}.nui-command input{width:100%;padding:16px;border:0;border-bottom:1px solid #8883;background:transparent;outline:none}.nui-command nav{padding:8px;max-height:360px;overflow:auto}.nui-mobile{margin:0;padding:8px;width:280px;max-width:85vw;height:100dvh;max-height:100dvh;border:0;background:#fafafa;color:#171717}.nui-mobile .nui-nav-footer{margin-top:24px}.nui-user-menu{position:relative}.nui-user-menu summary{list-style:none;cursor:pointer}.nui-user-menu nav{position:absolute;inset-inline-end:0;top:40px;min-width:190px;border:1px solid #8883;background:var(--nui-surface,#fff);border-radius:8px;padding:8px;z-index:40;box-shadow:0 4px 12px #0002}.nui-user-menu a{display:block;padding:8px;color:inherit;text-decoration:none}.dark .nui-user-menu nav,.dark .nui-command,.dark .nui-mobile{background:var(--nui-surface,#171717);color:#fafafa}.nui-mobile-close{float:right}.nui-brand-picker summary{list-style:none;cursor:pointer}.nui-brand-picker nav{padding:4px 8px;margin-bottom:12px}.nui-brand-picker a{display:block;padding:4px;color:inherit}\n@media(max-width:1024px){.nui-header-links{display:none}.nui-search{width:200px}}@media(max-width:767px){.nui-sidebar{display:none}.nui-main{margin:0;border:0;border-radius:0}.nui-header{padding:0 16px;gap:8px;height:60px}.nui-content{padding:16px}.nui-search{width:150px;font-size:12px}.nui-search kbd{display:none}.nui-toolbar{gap:5px}.uibot-admin table{min-width:680px}.uibot-admin h1{font-size:24px}}\n${PREVIEW_SCOPE_CSS}${SCROLLBAR_CSS}`;\nexport const AppNavigation: RendererComponent = (props, ctx) => (\n <>\n <style>{shellStyle}</style>\n <Navigation props={props} ctx={ctx} />\n </>\n);\nfunction Navigation({ props, ctx }: { props: Record<string, unknown>; ctx: BlockContext }) {\n return (\n <>\n <details className=\"nui-brand-picker\">\n <summary aria-label={text(props.brand, \"Shadcn Admin\")}>\n <div className=\"nui-brand\">\n {typeof props.logoSrc === \"string\" && props.logoSrc ? (\n <img\n src={props.logoSrc}\n alt={text(props.brand, \"Brand\")}\n width={32}\n height={32}\n style={{ objectFit: \"contain\", flexShrink: 0 }}\n />\n ) : (\n <span className=\"nui-brand-mark\">\n <Icon name=\"command\" />\n </span>\n )}\n <span className=\"nui-brand-copy\">\n <strong>{text(props.brand, \"Shadcn Admin\")}</strong>\n <small>{text(props.subtitle, \"Vite + ShadcnUI\")}</small>\n </span>\n <span className=\"nui-brand-chevron\">\n <Icon name=\"chevrons-up-down\" size={16} />\n </span>\n </div>\n </summary>\n <nav aria-label=\"Workspaces\">\n {records(props.workspaces).map((w) => (\n <a\n key={text(w.href)}\n href={text(w.href)}\n onClick={() => emit(ctx, \"onNavigate\", { href: text(w.href) })}\n >\n {text(w.label)}\n </a>\n ))}\n </nav>\n </details>\n <nav aria-label=\"Main navigation\">\n {records(props.groups).map((group) => (\n <div className=\"nui-nav-group\" key={text(group.label)}>\n <div className=\"nui-nav-label\">{text(group.label)}</div>\n {records(group.items).map((item) =>\n records(item.children).length ? (\n <details\n key={text(item.label)}\n className=\"nui-nav-section\"\n open={\n records(item.children).some((child) => child.href === props.activePath) ||\n undefined\n }\n >\n <summary\n className=\"nui-nav-link\"\n aria-label={text(item.label)}\n title={text(item.label)}\n >\n <Icon name={text(item.icon, \"boxes\")} />\n <span className=\"nui-nav-text\">{text(item.label)}</span>\n <Icon name=\"chevron-right\" size={16} />\n </summary>\n <div className=\"ms-4 border-s ps-3\">\n {records(item.children).map((child) => (\n <a\n className=\"nui-nav-link\"\n key={text(child.href)}\n href={text(child.href)}\n aria-current={child.href === props.activePath ? \"page\" : undefined}\n onClick={() => emit(ctx, \"onNavigate\", { href: text(child.href) })}\n >\n {text(child.label)}\n </a>\n ))}\n </div>\n </details>\n ) : (\n <a\n key={text(item.href)}\n className=\"nui-nav-link\"\n title={text(item.label)}\n href={text(item.href)}\n aria-current={\n item.active === true || item.href === props.activePath ? \"page\" : undefined\n }\n onClick={() => emit(ctx, \"onNavigate\", { href: text(item.href) })}\n >\n <Icon name={text(item.icon, \"boxes\")} />\n <span className=\"nui-nav-text\">{text(item.label)}</span>\n {Boolean(item.badge) && <span className=\"nui-badge\">{text(item.badge)}</span>}\n </a>\n ),\n )}\n </div>\n ))}\n </nav>\n <div className=\"nui-nav-footer\">\n <a className=\"nui-nav-link\" href={text(props.profileHref, \"/settings/profile\")}>\n <span className=\"nui-avatar\">{text(props.initials, \"SN\")}</span>\n <span className=\"nui-brand-copy\">\n <strong>{text(props.userName, \"shadcn\")}</strong>\n <small>{text(props.email, \"m@example.com\")}</small>\n </span>\n <Icon name=\"chevrons-up-down\" size={16} />\n </a>\n </div>\n </>\n );\n}\nexport function AdminFrame({ props, ctx }: { props: Record<string, unknown>; ctx: BlockContext }) {\n const [rail, setRail] = useState(false),\n [localDark, setDark] = useState(props.theme === \"dark\"),\n [query, setQuery] = useState(\"\");\n const [systemDark, setSystemDark] = useState(false);\n const [smallScreen, setSmallScreen] = useState(false);\n const [mobileOpen, setMobileOpen] = useState(false);\n useEffect(() => {\n const media = window.matchMedia(\"(max-width:767px)\");\n const sync = () => setSmallScreen(media.matches);\n sync();\n media.addEventListener(\"change\", sync);\n return () => media.removeEventListener(\"change\", sync);\n }, []);\n useEffect(() => {\n const media = window.matchMedia(\"(prefers-color-scheme: dark)\");\n const sync = () => setSystemDark(media.matches);\n sync();\n media.addEventListener(\"change\", sync);\n return () => media.removeEventListener(\"change\", sync);\n }, []);\n const dark =\n props.theme === \"system\"\n ? systemDark\n : typeof props.theme === \"string\"\n ? props.theme === \"dark\"\n : localDark;\n const root = useRef<HTMLDivElement>(null);\n // A page without sidebar content gets no empty navigation rail, toggle or drawer.\n const hasSidebarSlot: unknown = ctx.slots.sidebar;\n const hasSidebar = Array.isArray(hasSidebarSlot)\n ? hasSidebarSlot.length > 0\n : Boolean(hasSidebarSlot);\n const mobile = useRef<HTMLDialogElement>(null),\n command = useRef<HTMLDialogElement>(null),\n trigger = useRef<HTMLElement | null>(null);\n const close = (dialog: HTMLDialogElement | null) => {\n dialog?.close();\n trigger.current?.focus();\n };\n const show = useCallback((dialog: HTMLDialogElement | null) => {\n trigger.current = document.activeElement as HTMLElement;\n dialog?.showModal();\n }, []);\n useEffect(() => {\n const key = (e: KeyboardEvent) => {\n if (root.current?.closest(\"[inert]\")) return;\n if (\n document.activeElement !== document.body &&\n !root.current?.contains(document.activeElement)\n )\n return;\n if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === \"k\") {\n e.preventDefault();\n show(command.current);\n }\n };\n document.addEventListener(\"keydown\", key);\n return () => document.removeEventListener(\"keydown\", key);\n }, [show]);\n useEffect(() => {\n const menus = () =>\n Array.from(\n root.current?.querySelectorAll<HTMLDetailsElement>(\n \".nui-user-menu[open],.nui-brand-picker[open]\",\n ) ?? [],\n );\n const dismissOutside = (event: PointerEvent) => {\n for (const menu of menus()) if (!menu.contains(event.target as Node)) menu.open = false;\n };\n const dismissEscape = (event: KeyboardEvent) => {\n if (event.key !== \"Escape\" || root.current?.querySelector(\"dialog[open]\")) return;\n for (const menu of menus()) {\n if (!menu.contains(document.activeElement)) continue;\n event.preventDefault();\n menu.open = false;\n menu.querySelector<HTMLElement>(\"summary\")?.focus();\n }\n };\n document.addEventListener(\"pointerdown\", dismissOutside);\n document.addEventListener(\"keydown\", dismissEscape);\n return () => {\n document.removeEventListener(\"pointerdown\", dismissOutside);\n document.removeEventListener(\"keydown\", dismissEscape);\n };\n }, []);\n useEffect(() => {\n if (!smallScreen) mobile.current?.close();\n }, [smallScreen]);\n const activePath = props.activePath ?? ctx.resolve?.getState?.(\"currentPath\");\n const routes = records(props.routes).filter((r) =>\n text(r.label).toLowerCase().includes(query.toLowerCase()),\n );\n return (\n <div\n ref={root}\n style={\n {\n fontFamily:\n props.font === \"System\"\n ? \"system-ui,sans-serif\"\n : props.font === \"Manrope\"\n ? \"Manrope,system-ui,sans-serif\"\n : undefined,\n ...Object.fromEntries(\n Object.entries(\n (props.tokens && typeof props.tokens === \"object\" ? props.tokens : {}) as Record<\n string,\n unknown\n >,\n )\n .filter(\n ([key, value]) =>\n [\n \"sidebar\",\n \"surface\",\n \"foreground\",\n \"accent\",\n \"accent-foreground\",\n \"primary\",\n \"primary-foreground\",\n \"border\",\n \"font\",\n ].includes(key) && typeof value === \"string\",\n )\n .map(([key, value]) => [\n key === \"primary\" || key === \"primary-foreground\" ? `--${key}` : `--nui-${key}`,\n value,\n ]),\n ),\n } as CSSProperties\n }\n data-uibot-type=\"PageLayout\"\n data-appearance=\"admin\"\n dir={props.direction === \"rtl\" ? \"rtl\" : \"ltr\"}\n className={`uibot-admin ${rail && !smallScreen ? \"nui-rail\" : \"\"} ${dark ? \"dark\" : \"\"} ${hasSidebar ? \"\" : \"nui-no-sidebar\"}`}\n onClickCapture={(event) => {\n if (rail && (event.target as HTMLElement).closest(\".nui-sidebar summary\")) setRail(false);\n }}\n >\n <style>{shellStyle}</style>\n {hasSidebar && <aside className=\"nui-sidebar\">{ctx.slots.sidebar as ReactNode[]}</aside>}\n <div className=\"nui-main\">\n <header className=\"nui-header\">\n {hasSidebar && (\n <button\n type=\"button\"\n className=\"nui-icon-button\"\n aria-label=\"Toggle sidebar\"\n aria-expanded={smallScreen ? mobileOpen : !rail}\n onClick={() => {\n if (smallScreen) {\n setMobileOpen(true);\n show(mobile.current);\n } else setRail(!rail);\n }}\n >\n <Icon name=\"panel-left\" />\n </button>\n )}\n <nav className=\"nui-header-links\" aria-label=\"Workspace\">\n {records(props.headerLinks).map((link) => (\n <a\n href={text(link.href)}\n key={text(link.label)}\n aria-current={\n link.href === activePath ||\n (link.href === \"/settings/profile\" &&\n typeof activePath === \"string\" &&\n activePath.startsWith(\"/settings/\"))\n ? \"page\"\n : undefined\n }\n >\n {text(link.label)}\n </a>\n ))}\n </nav>\n <div className=\"nui-toolbar\">\n <button type=\"button\" className=\"nui-search\" onClick={() => show(command.current)}>\n <Icon name=\"search\" size={16} />\n Search<kbd>⌘ K</kbd>\n </button>\n <button\n type=\"button\"\n className=\"nui-icon-button\"\n aria-label={dark ? \"Use light theme\" : \"Use dark theme\"}\n onClick={() => {\n setDark(!dark);\n emit(\n ctx,\n \"onThemeChange\",\n { theme: dark ? \"light\" : \"dark\" },\n dark ? \"light\" : \"dark\",\n );\n }}\n >\n <Icon name={dark ? \"moon\" : \"sun\"} />\n </button>\n <details className=\"nui-user-menu\">\n <summary aria-label=\"Open account menu\">\n <span className=\"nui-avatar\">{text(props.initials, \"SN\")}</span>\n </summary>\n <nav aria-label=\"Account\">\n {records(\n props.accountLinks ?? [\n { href: \"/settings/profile\", label: \"Profile\" },\n { href: \"/settings/account\", label: \"Account\" },\n { href: \"/settings/notifications\", label: \"Notifications\" },\n { href: \"/sign-in\", label: \"Sign in\" },\n ],\n ).map((link) => (\n <a key={text(link.href)} href={text(link.href)}>\n {text(link.label)}\n </a>\n ))}\n </nav>\n </details>\n {ctx.slots.headerActions as ReactNode[]}\n </div>\n </header>\n <main className=\"nui-content\">{ctx.children as ReactNode[]}</main>\n {ctx.slots.footer as ReactNode[]}\n </div>\n {hasSidebar && (\n <dialog\n ref={mobile}\n className=\"nui-mobile\"\n aria-label=\"Navigation\"\n onClose={() => {\n setMobileOpen(false);\n trigger.current?.focus();\n }}\n >\n <button\n type=\"button\"\n className=\"nui-icon-button nui-mobile-close\"\n aria-label=\"Close navigation\"\n onClick={() => close(mobile.current)}\n >\n <Icon name=\"x\" />\n </button>\n <div\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"a\")) close(mobile.current);\n }}\n >\n {ctx.slots.sidebar as ReactNode[]}\n </div>\n </dialog>\n )}\n <dialog\n ref={command}\n className=\"nui-command\"\n aria-label=\"Search pages\"\n onClose={() => {\n setQuery(\"\");\n trigger.current?.focus();\n }}\n onKeyDown={(event) => {\n if (\n ![\"ArrowDown\", \"ArrowUp\", \"Home\", \"End\"].includes(event.key) ||\n event.target instanceof HTMLInputElement\n )\n return;\n const links = Array.from(\n command.current?.querySelectorAll<HTMLAnchorElement>(\"nav a\") ?? [],\n );\n if (!links.length) return;\n event.preventDefault();\n const index = links.indexOf(document.activeElement as HTMLAnchorElement);\n const next =\n event.key === \"Home\"\n ? 0\n : event.key === \"End\"\n ? links.length - 1\n : (index + (event.key === \"ArrowDown\" ? 1 : -1) + links.length) % links.length;\n links[next]?.focus();\n }}\n >\n <input\n aria-label=\"Search pages\"\n autoComplete=\"off\"\n placeholder=\"Type a command or search...\"\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === \"ArrowDown\" || e.key === \"ArrowUp\") {\n const links = command.current?.querySelectorAll<HTMLAnchorElement>(\"nav a\");\n if (!links?.length) return;\n e.preventDefault();\n links[e.key === \"ArrowDown\" ? 0 : links.length - 1]?.focus();\n }\n }}\n />\n <nav>\n {routes.map((route) => (\n <a\n className=\"nui-nav-link\"\n href={text(route.href)}\n key={text(route.href)}\n onClick={() => close(command.current)}\n >\n <Icon name={text(route.icon, \"chevron-right\")} />\n {text(route.label)}\n </a>\n ))}\n {!routes.length && <p className=\"p-4 text-sm\">No results found.</p>}\n </nav>\n </dialog>\n </div>\n );\n}\n",
29
+ "type": "registry:ui"
30
+ },
31
+ {
32
+ "path": "components/uibot/icons.tsx",
33
+ "target": "components/uibot/icons.tsx",
34
+ "content": "/*\nISC License\n\nCopyright (c) 2026 Lucide Icons and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n---\n\nThe following Lucide icons are derived from the Feather project:\n\nairplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out\n\nThe MIT License (MIT) (for the icons listed above)\n\nCopyright (c) 2013-present Cole Bemis\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n*/\n// Icon paths from lucide-react 1.8.0 (ISC); see docs/shadcn-admin-attribution.md.\nimport { createElement } from \"react\";\nconst paths: Record<string, [string, Record<string, string>][]> = {\n \"panel-left\": [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", key: \"afitv7\" }],\n [\"path\", { d: \"M9 3v18\", key: \"fh3hqa\" }],\n ],\n \"layout-dashboard\": [\n [\"rect\", { width: \"7\", height: \"9\", x: \"3\", y: \"3\", rx: \"1\", key: \"10lvy0\" }],\n [\"rect\", { width: \"7\", height: \"5\", x: \"14\", y: \"3\", rx: \"1\", key: \"16une8\" }],\n [\"rect\", { width: \"7\", height: \"9\", x: \"14\", y: \"12\", rx: \"1\", key: \"1hutg5\" }],\n [\"rect\", { width: \"7\", height: \"5\", x: \"3\", y: \"16\", rx: \"1\", key: \"ldoo1y\" }],\n ],\n \"list-todo\": [\n [\"path\", { d: \"M13 5h8\", key: \"a7qcls\" }],\n [\"path\", { d: \"M13 12h8\", key: \"h98zly\" }],\n [\"path\", { d: \"M13 19h8\", key: \"c3s6r1\" }],\n [\"path\", { d: \"m3 17 2 2 4-4\", key: \"1jhpwq\" }],\n [\"rect\", { x: \"3\", y: \"4\", width: \"6\", height: \"6\", rx: \"1\", key: \"cif1o7\" }],\n ],\n users: [\n [\"path\", { d: \"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\", key: \"1yyitq\" }],\n [\"path\", { d: \"M16 3.128a4 4 0 0 1 0 7.744\", key: \"16gr8j\" }],\n [\"path\", { d: \"M22 21v-2a4 4 0 0 0-3-3.87\", key: \"kshegd\" }],\n [\"circle\", { cx: \"9\", cy: \"7\", r: \"4\", key: \"nufk8\" }],\n ],\n settings: [\n [\n \"path\",\n {\n d: \"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915\",\n key: \"1i5ecw\",\n },\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }],\n ],\n \"message-circle\": [\n [\n \"path\",\n {\n d: \"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719\",\n key: \"1sd12s\",\n },\n ],\n ],\n command: [\n [\n \"path\",\n {\n d: \"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3\",\n key: \"11bfej\",\n },\n ],\n ],\n search: [\n [\"path\", { d: \"m21 21-4.34-4.34\", key: \"14j7rj\" }],\n [\"circle\", { cx: \"11\", cy: \"11\", r: \"8\", key: \"4ej97u\" }],\n ],\n sun: [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"4\", key: \"4exip2\" }],\n [\"path\", { d: \"M12 2v2\", key: \"tus03m\" }],\n [\"path\", { d: \"M12 20v2\", key: \"1lh1kg\" }],\n [\"path\", { d: \"m4.93 4.93 1.41 1.41\", key: \"149t6j\" }],\n [\"path\", { d: \"m17.66 17.66 1.41 1.41\", key: \"ptbguv\" }],\n [\"path\", { d: \"M2 12h2\", key: \"1t8f8n\" }],\n [\"path\", { d: \"M20 12h2\", key: \"1q8mjw\" }],\n [\"path\", { d: \"m6.34 17.66-1.41 1.41\", key: \"1m8zz5\" }],\n [\"path\", { d: \"m19.07 4.93-1.41 1.41\", key: \"1shlcs\" }],\n ],\n moon: [\n [\n \"path\",\n {\n d: \"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\",\n key: \"kfwtm\",\n },\n ],\n ],\n \"chevron-down\": [[\"path\", { d: \"m6 9 6 6 6-6\", key: \"qrunsl\" }]],\n \"chevron-right\": [[\"path\", { d: \"m9 18 6-6-6-6\", key: \"mthhwq\" }]],\n \"chevrons-up-down\": [\n [\"path\", { d: \"m7 15 5 5 5-5\", key: \"1hf1tw\" }],\n [\"path\", { d: \"m7 9 5-5 5 5\", key: \"sgt6xg\" }],\n ],\n plus: [\n [\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }],\n [\"path\", { d: \"M12 5v14\", key: \"s699le\" }],\n ],\n download: [\n [\"path\", { d: \"M12 15V3\", key: \"m9g1x1\" }],\n [\"path\", { d: \"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\", key: \"ih7n3h\" }],\n [\"path\", { d: \"m7 10 5 5 5-5\", key: \"brsn70\" }],\n ],\n \"sliders-horizontal\": [\n [\"path\", { d: \"M10 5H3\", key: \"1qgfaw\" }],\n [\"path\", { d: \"M12 19H3\", key: \"yhmn1j\" }],\n [\"path\", { d: \"M14 3v4\", key: \"1sua03\" }],\n [\"path\", { d: \"M16 17v4\", key: \"1q0r14\" }],\n [\"path\", { d: \"M21 12h-9\", key: \"1o4lsq\" }],\n [\"path\", { d: \"M21 19h-5\", key: \"1rlt1p\" }],\n [\"path\", { d: \"M21 5h-7\", key: \"1oszz2\" }],\n [\"path\", { d: \"M8 10v4\", key: \"tgpxqk\" }],\n [\"path\", { d: \"M8 12H3\", key: \"a7s4jb\" }],\n ],\n shield: [\n [\n \"path\",\n {\n d: \"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\",\n key: \"oel41y\",\n },\n ],\n ],\n \"log-out\": [\n [\"path\", { d: \"m16 17 5-5-5-5\", key: \"1bji2h\" }],\n [\"path\", { d: \"M21 12H9\", key: \"dn1m92\" }],\n [\"path\", { d: \"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\", key: \"1uf3rs\" }],\n ],\n boxes: [\n [\n \"path\",\n {\n d: \"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z\",\n key: \"lc1i9w\",\n },\n ],\n [\"path\", { d: \"m7 16.5-4.74-2.85\", key: \"1o9zyk\" }],\n [\"path\", { d: \"m7 16.5 5-3\", key: \"va8pkn\" }],\n [\"path\", { d: \"M7 16.5v5.17\", key: \"jnp8gn\" }],\n [\n \"path\",\n {\n d: \"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z\",\n key: \"8zsnat\",\n },\n ],\n [\"path\", { d: \"m17 16.5-5-3\", key: \"8arw3v\" }],\n [\"path\", { d: \"m17 16.5 4.74-2.85\", key: \"8rfmw\" }],\n [\"path\", { d: \"M17 16.5v5.17\", key: \"k6z78m\" }],\n [\n \"path\",\n {\n d: \"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z\",\n key: \"1xygjf\",\n },\n ],\n [\"path\", { d: \"M12 8 7.26 5.15\", key: \"1vbdud\" }],\n [\"path\", { d: \"m12 8 4.74-2.85\", key: \"3rx089\" }],\n [\"path\", { d: \"M12 13.5V8\", key: \"1io7kd\" }],\n ],\n \"chart-no-axes-column\": [\n [\"path\", { d: \"M5 21v-6\", key: \"1hz6c0\" }],\n [\"path\", { d: \"M12 21V3\", key: \"1lcnhd\" }],\n [\"path\", { d: \"M19 21V9\", key: \"unv183\" }],\n ],\n ellipsis: [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"1\", key: \"41hilf\" }],\n [\"circle\", { cx: \"19\", cy: \"12\", r: \"1\", key: \"1wjl8i\" }],\n [\"circle\", { cx: \"5\", cy: \"12\", r: \"1\", key: \"1pcz8c\" }],\n ],\n \"arrow-up\": [\n [\"path\", { d: \"m5 12 7-7 7 7\", key: \"hav0vg\" }],\n [\"path\", { d: \"M12 19V5\", key: \"x0mq9r\" }],\n ],\n \"arrow-down\": [\n [\"path\", { d: \"M12 5v14\", key: \"s699le\" }],\n [\"path\", { d: \"m19 12-7 7-7-7\", key: \"1idqje\" }],\n ],\n x: [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }],\n ],\n check: [[\"path\", { d: \"M20 6 9 17l-5-5\", key: \"1gmf2c\" }]],\n send: [\n [\n \"path\",\n {\n d: \"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z\",\n key: \"1ffxy3\",\n },\n ],\n [\"path\", { d: \"m21.854 2.147-10.94 10.939\", key: \"12cjpa\" }],\n ],\n mail: [\n [\"path\", { d: \"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7\", key: \"132q7q\" }],\n [\"rect\", { x: \"2\", y: \"4\", width: \"20\", height: \"16\", rx: \"2\", key: \"izxlao\" }],\n ],\n calendar: [\n [\"path\", { d: \"M8 2v4\", key: \"1cmpym\" }],\n [\"path\", { d: \"M16 2v4\", key: \"4m81vk\" }],\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"4\", rx: \"2\", key: \"1hopcy\" }],\n [\"path\", { d: \"M3 10h18\", key: \"8toen8\" }],\n ],\n eye: [\n [\n \"path\",\n {\n d: \"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\",\n key: \"1nclc0\",\n },\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }],\n ],\n \"eye-off\": [\n [\n \"path\",\n {\n d: \"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49\",\n key: \"ct8e1f\",\n },\n ],\n [\"path\", { d: \"M14.084 14.158a3 3 0 0 1-4.242-4.242\", key: \"151rxh\" }],\n [\n \"path\",\n {\n d: \"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143\",\n key: \"13bj9a\",\n },\n ],\n [\"path\", { d: \"m2 2 20 20\", key: \"1ooewy\" }],\n ],\n};\nexport function Icon({ name, size = 18 }: { name: string; size?: number }) {\n const nodes = paths[name] ?? paths.boxes ?? [];\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n style={{ flexShrink: 0 }}\n >\n {nodes.map(([tag, attributes]) => createElement(tag, attributes))}\n </svg>\n );\n}\n",
35
+ "type": "registry:ui"
36
+ },
37
+ {
38
+ "path": "components/uibot/interaction.ts",
39
+ "target": "components/uibot/interaction.ts",
40
+ "content": "import type { RendererComponent } from \"@/lib/uibot-renderer\";\nexport type BlockContext = Parameters<RendererComponent>[1];\nexport type Chain = Parameters<NonNullable<BlockContext[\"dispatch\"]>>[0];\nexport type EventValue = string | number | boolean | null;\nexport function emit(\n ctx: BlockContext,\n name: string,\n values: Record<string, EventValue | EventValue[]> = {},\n value?: EventValue,\n): void {\n const element = ctx.element as { events?: Record<string, Chain> };\n const chain = element.events?.[name];\n if (chain?.length)\n void ctx.dispatch?.(chain, {\n event: { type: name, values, ...(value !== undefined ? { value } : {}) },\n });\n}\nexport function text(value: unknown, fallback = \"\"): string {\n return value == null ? fallback : String(value);\n}\nexport function records(value: unknown): Record<string, unknown>[] {\n return Array.isArray(value)\n ? value.filter(\n (v): v is Record<string, unknown> => !!v && typeof v === \"object\" && !Array.isArray(v),\n )\n : [];\n}\n\nconst submissions = new WeakMap<object, { payload: string; key: string }>();\n/** A new owner represents a new user intent; an unchanged failed submission keeps its key. */\nexport function submissionKey(owner: object, values: unknown): string {\n const payload = JSON.stringify(values);\n const previous = submissions.get(owner);\n if (previous?.payload === payload) return previous.key;\n const key = crypto.randomUUID();\n submissions.set(owner, { payload, key });\n return key;\n}\n",
41
+ "type": "registry:ui"
42
+ },
43
+ {
44
+ "path": "components/uibot/overlay.tsx",
45
+ "target": "components/uibot/overlay.tsx",
46
+ "content": "import { useEffect, useId, useRef, type ReactNode } from \"react\";\nimport type { RendererComponent } from \"@/lib/uibot-renderer\";\nimport { emit, text, type BlockContext } from \"./interaction\";\n\nfunction useNativeDialogLifecycle(\n ref: { current: HTMLDialogElement | null },\n open: boolean,\n triggerRef?: { current: HTMLElement | null },\n) {\n useEffect(() => {\n const dialog = ref.current;\n if (!dialog || !open) return;\n const trigger = triggerRef\n ? triggerRef.current\n : document.activeElement instanceof HTMLElement\n ? document.activeElement\n : null;\n dialog.showModal();\n return () => {\n if (dialog.open) dialog.close();\n if (trigger?.isConnected) trigger.focus();\n };\n }, [open, ref, triggerRef]);\n}\n\nfunction Overlay({\n props,\n ctx,\n drawer,\n}: {\n props: Record<string, unknown>;\n ctx: BlockContext;\n drawer: boolean;\n}) {\n const ref = useRef<HTMLDialogElement>(null);\n const titleId = useId(),\n descriptionId = useId();\n const open = props.open === true;\n const close = () => emit(ctx, \"onClose\", { open: false }, false);\n useNativeDialogLifecycle(ref, open);\n if (!open) return null;\n return (\n <dialog\n ref={ref}\n aria-labelledby={titleId}\n aria-describedby={props.description ? descriptionId : undefined}\n data-uibot-type={drawer ? \"Drawer\" : \"Modal\"}\n className={`uibot-overlay bg-background text-foreground p-0 shadow-xl backdrop:bg-black/50 ${drawer ? \"fixed inset-y-0 start-auto end-0 m-0 h-dvh max-h-dvh w-full max-w-md border-s\" : \"m-auto w-[calc(100%-2rem)] max-w-lg rounded-xl border\"}`}\n onCancel={(e) => {\n e.preventDefault();\n if (props.pending !== true) close();\n }}\n onClick={(e) => {\n if (e.target === e.currentTarget && props.pending !== true) {\n const r = e.currentTarget.getBoundingClientRect();\n if (\n e.clientX < r.left ||\n e.clientX > r.right ||\n e.clientY < r.top ||\n e.clientY > r.bottom\n )\n close();\n }\n }}\n >\n <div className=\"flex h-full max-h-dvh flex-col\">\n <header className=\"flex items-start justify-between gap-4 border-b p-6\">\n <div>\n <h2 id={titleId} className=\"text-lg font-semibold\">\n {text(props.title, drawer ? \"Edit record\" : \"Confirm\")}\n </h2>\n {Boolean(props.description) && (\n <p id={descriptionId} className=\"mt-1 text-sm text-muted-foreground\">\n {text(props.description)}\n </p>\n )}\n </div>\n <button\n type=\"button\"\n disabled={props.pending === true}\n className=\"rounded px-2 py-1 text-sm hover:bg-muted focus-visible:ring-2\"\n aria-label=\"Close dialog\"\n onClick={close}\n >\n Close\n </button>\n </header>\n <div className=\"min-h-0 flex-1 overflow-auto p-6\">{ctx.children as ReactNode[]}</div>\n {ctx.slots.footer && (\n <footer className=\"flex justify-end gap-2 border-t p-6\">\n {ctx.slots.footer as ReactNode[]}\n </footer>\n )}\n </div>\n </dialog>\n );\n}\nexport const LiveDrawer: RendererComponent = (props, ctx) => (\n <Overlay props={props} ctx={ctx} drawer />\n);\nexport const LiveModal: RendererComponent = (props, ctx) => (\n <Overlay props={props} ctx={ctx} drawer={false} />\n);\n\n/** Internal mobile navigation drawer shared by renderer blocks, not a Spec component. */\nexport function SidebarDrawer({\n id,\n open,\n onClose,\n triggerRef,\n children,\n}: {\n id: string;\n open: boolean;\n onClose: () => void;\n triggerRef: { current: HTMLButtonElement | null };\n children: ReactNode;\n}) {\n const ref = useRef<HTMLDialogElement>(null);\n useNativeDialogLifecycle(ref, open, triggerRef);\n\n if (!open) return null;\n return (\n <dialog\n id={id}\n ref={ref}\n aria-label=\"Navigation\"\n className=\"fixed inset-y-0 start-0 z-50 m-0 h-dvh max-h-dvh w-72 max-w-[85vw] border-r bg-background p-0 text-foreground shadow-xl backdrop:bg-black/50\"\n onCancel={(event) => {\n event.preventDefault();\n onClose();\n }}\n onClick={(event) => {\n if (event.target === event.currentTarget) {\n const bounds = event.currentTarget.getBoundingClientRect();\n if (\n event.clientX < bounds.left ||\n event.clientX > bounds.right ||\n event.clientY < bounds.top ||\n event.clientY > bounds.bottom\n )\n onClose();\n }\n if (event.target instanceof Element && event.target.closest(\"a\")) onClose();\n }}\n >\n <button\n type=\"button\"\n className=\"m-3 rounded border px-3 py-2 text-sm focus-visible:ring-2\"\n aria-label=\"Close navigation\"\n onClick={onClose}\n >\n Close\n </button>\n <div className=\"max-h-[calc(100dvh-4rem)] overflow-y-auto\">{children}</div>\n </dialog>\n );\n}\n",
47
+ "type": "registry:ui"
48
+ },
49
+ {
50
+ "path": "components/uibot/layout.uibot.json",
51
+ "target": "components/uibot/layout.uibot.json",
52
+ "content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"layout\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"Box\",\n \"export\": \"Box\",\n \"module\": \"layout.tsx\",\n \"catalog\": {\n \"name\": \"Box\",\n \"description\": \"Flex container for composing layout. Use as a row or column spacer between other blocks.\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"container\",\n \"layout\"\n ],\n \"props\": {\n \"direction\": {\n \"type\": \"string\",\n \"enum\": [\n \"col\",\n \"row\"\n ],\n \"default\": \"col\",\n \"description\": \"Flex direction\"\n },\n \"gap\": {\n \"type\": \"string\",\n \"enum\": [\n \"none\",\n \"xs\",\n \"sm\",\n \"md\",\n \"lg\",\n \"xl\"\n ],\n \"default\": \"md\"\n },\n \"padding\": {\n \"type\": \"string\",\n \"enum\": [\n \"none\",\n \"xs\",\n \"sm\",\n \"md\",\n \"lg\",\n \"xl\"\n ]\n },\n \"align\": {\n \"type\": \"string\",\n \"enum\": [\n \"start\",\n \"center\",\n \"end\",\n \"stretch\"\n ]\n },\n \"justify\": {\n \"type\": \"string\",\n \"enum\": [\n \"start\",\n \"center\",\n \"end\",\n \"between\",\n \"around\"\n ]\n },\n \"wrap\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"full\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n },\n \"usageScenarios\": [\n \"Horizontal row of action buttons\",\n \"Vertical stack of form fields\",\n \"Two-column grid using two Box[direction=row] with flex-1 children\"\n ],\n \"constraints\": [\n \"Do not use Box as a semantic section; prefer Card or PageLayout for major layout regions\"\n ]\n }\n },\n {\n \"name\": \"Card\",\n \"export\": \"Card\",\n \"module\": \"layout.tsx\",\n \"catalog\": {\n \"name\": \"Card\",\n \"description\": \"Surface container with rounded border and optional header (title + description + actions slot).\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"card\",\n \"surface\"\n ],\n \"props\": {\n \"title\": {\n \"type\": \"string\",\n \"description\": \"Card heading\"\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"Supporting subtitle text\"\n }\n },\n \"slots\": {\n \"actions\": {\n \"description\": \"Action buttons rendered in the top-right of the card header\"\n },\n \"default\": {\n \"description\": \"Card body content\"\n }\n },\n \"usageScenarios\": [\n \"Stats overview section\",\n \"User profile panel\",\n \"Settings form container\"\n ],\n \"constraints\": [\n \"Avoid nesting Card directly inside another Card\"\n ]\n }\n },\n {\n \"name\": \"Divider\",\n \"export\": \"Divider\",\n \"module\": \"layout.tsx\",\n \"catalog\": {\n \"name\": \"Divider\",\n \"description\": \"Thin horizontal (default) or vertical separator line.\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"separator\"\n ],\n \"props\": {\n \"orientation\": {\n \"type\": \"string\",\n \"enum\": [\n \"horizontal\",\n \"vertical\"\n ],\n \"default\": \"horizontal\"\n }\n },\n \"usageScenarios\": [\n \"Visual break between form sections\",\n \"Vertical separator between two columns\"\n ],\n \"constraints\": []\n }\n },\n {\n \"name\": \"Drawer\",\n \"export\": \"Drawer\",\n \"module\": \"layout.tsx\",\n \"catalog\": {\n \"name\": \"Drawer\",\n \"description\": \"Off-canvas side panel for secondary context (filters, details, comments). Rendered inline in preview.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"drawer\",\n \"overlay\"\n ],\n \"events\": {\n \"onClose\": {\n \"description\": \"Close requested; set controlled open false\"\n }\n },\n \"props\": {\n \"open\": {\n \"type\": \"boolean\"\n },\n \"pending\": {\n \"type\": \"boolean\"\n },\n \"title\": {\n \"type\": \"string\"\n }\n },\n \"usageScenarios\": [\n \"Filter panel for a table\",\n \"Item detail side sheet\"\n ],\n \"constraints\": [\n \"Drawer is always visible in static preview — use conditionally in production via state\"\n ]\n }\n },\n {\n \"name\": \"Modal\",\n \"export\": \"Modal\",\n \"module\": \"layout.tsx\",\n \"catalog\": {\n \"name\": \"Modal\",\n \"description\": \"Centered overlay dialog for focused tasks or confirmations. Rendered inline in preview.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"modal\",\n \"overlay\"\n ],\n \"events\": {\n \"onClose\": {\n \"description\": \"Close requested; set controlled open false\"\n }\n },\n \"props\": {\n \"open\": {\n \"type\": \"boolean\"\n },\n \"pending\": {\n \"type\": \"boolean\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n }\n },\n \"usageScenarios\": [\n \"Create / edit form dialog\",\n \"Image preview lightbox\"\n ],\n \"constraints\": [\n \"Modal is always visible in static preview — drive open/close state from actions in production\"\n ]\n }\n },\n {\n \"name\": \"PageLayout\",\n \"export\": \"PageLayout\",\n \"module\": \"layout.tsx\",\n \"catalog\": {\n \"name\": \"PageLayout\",\n \"description\": \"Top-level page scaffold: sticky header, optional sidebar, scrollable main area, optional footer.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"page\",\n \"layout\"\n ],\n \"props\": {\n \"appearance\": {\n \"type\": \"string\",\n \"enum\": [\n \"default\",\n \"admin\"\n ]\n },\n \"routes\": {\n \"type\": \"array\"\n },\n \"headerLinks\": {\n \"type\": \"array\"\n },\n \"accountLinks\": {\n \"type\": \"array\"\n },\n \"tokens\": {\n \"type\": \"object\",\n \"description\": \"Admin frame sidebar/surface/foreground/accent/accent-foreground/border/font and primary/primary-foreground CSS tokens\"\n },\n \"theme\": {\n \"type\": \"string\"\n },\n \"font\": {\n \"type\": \"string\"\n },\n \"direction\": {\n \"type\": \"string\"\n },\n \"initials\": {\n \"type\": \"string\"\n },\n \"title\": {\n \"type\": \"string\",\n \"description\": \"App or page title shown in the sticky header\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"enum\": [\n \"sidebar\",\n \"inset\",\n \"floating\"\n ],\n \"default\": \"sidebar\",\n \"description\": \"Frame: flush sidebar, inset main, or floating sidebar card\"\n },\n \"collapsible\": {\n \"type\": \"string\",\n \"enum\": [\n \"none\",\n \"icon\",\n \"offcanvas\"\n ],\n \"default\": \"none\",\n \"description\": \"How the sidebar collapses; default none keeps v2.40 width\"\n }\n },\n \"events\": {\n \"onThemeChange\": {\n \"description\": \"Selected theme in event.value\"\n }\n },\n \"slots\": {\n \"headerActions\": {\n \"description\": \"Buttons or links placed in the top-right of the header\"\n },\n \"sidebar\": {\n \"description\": \"Left sidebar content, e.g. PageSiderMenu\"\n },\n \"footer\": {\n \"description\": \"Bottom footer strip\"\n }\n },\n \"usageScenarios\": [\n \"Admin dashboard shell\",\n \"Settings page with left navigation\",\n \"Landing page with header and main content\"\n ],\n \"constraints\": [\n \"Use at most one PageLayout per page\",\n \"Do not nest PageLayout inside another PageLayout\"\n ]\n }\n },\n {\n \"name\": \"Tabs\",\n \"export\": \"Tabs\",\n \"module\": \"layout.tsx\",\n \"catalog\": {\n \"name\": \"Tabs\",\n \"description\": \"Tab switcher. Each child maps to the tab at the same index. Supports up to 6 tabs.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"tabs\",\n \"navigation\"\n ],\n \"props\": {\n \"variant\": {\n \"type\": \"string\",\n \"enum\": [\n \"underline\",\n \"segmented\"\n ]\n },\n \"disabledTabs\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"integer\"\n }\n },\n \"value\": {\n \"type\": \"integer\"\n },\n \"tabs\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"Tab label list, e.g. [Overview, Details, Activity]\"\n },\n \"defaultTab\": {\n \"type\": \"integer\",\n \"default\": 0,\n \"description\": \"0-based index of the initially active tab\"\n }\n },\n \"usageScenarios\": [\n \"Split view of Overview / Settings / Logs\",\n \"Mobile-friendly section switcher\"\n ],\n \"constraints\": [\n \"Children count must equal tabs array length\",\n \"Do not use more than 6 tabs\"\n ]\n }\n }\n ]\n}\n",
53
+ "type": "registry:ui"
54
+ }
55
+ ],
56
+ "meta": {
57
+ "category": "primitive",
58
+ "level": "L1",
59
+ "props": {
60
+ "direction": {
61
+ "type": "string",
62
+ "enum": [
63
+ "col",
64
+ "row"
65
+ ],
66
+ "default": "col",
67
+ "description": "Flex direction"
68
+ },
69
+ "gap": {
70
+ "type": "string",
71
+ "enum": [
72
+ "none",
73
+ "xs",
74
+ "sm",
75
+ "md",
76
+ "lg",
77
+ "xl"
78
+ ],
79
+ "default": "md"
80
+ },
81
+ "padding": {
82
+ "type": "string",
83
+ "enum": [
84
+ "none",
85
+ "xs",
86
+ "sm",
87
+ "md",
88
+ "lg",
89
+ "xl"
90
+ ]
91
+ },
92
+ "align": {
93
+ "type": "string",
94
+ "enum": [
95
+ "start",
96
+ "center",
97
+ "end",
98
+ "stretch"
99
+ ]
100
+ },
101
+ "justify": {
102
+ "type": "string",
103
+ "enum": [
104
+ "start",
105
+ "center",
106
+ "end",
107
+ "between",
108
+ "around"
109
+ ]
110
+ },
111
+ "wrap": {
112
+ "type": "boolean",
113
+ "default": false
114
+ },
115
+ "full": {
116
+ "type": "boolean",
117
+ "default": false
118
+ }
119
+ },
120
+ "scenarios": [
121
+ "Horizontal row of action buttons",
122
+ "Vertical stack of form fields",
123
+ "Two-column grid using two Box[direction=row] with flex-1 children"
124
+ ],
125
+ "constraints": [
126
+ "Do not use Box as a semantic section; prefer Card or PageLayout for major layout regions"
127
+ ],
128
+ "provides": [
129
+ "Box",
130
+ "PageLayout",
131
+ "Card",
132
+ "Tabs",
133
+ "Drawer",
134
+ "Modal",
135
+ "Divider"
136
+ ],
137
+ "uibot": {
138
+ "schema": "uibot.registry.item.v1",
139
+ "item": "layout",
140
+ "channel": "public",
141
+ "components": [
142
+ {
143
+ "name": "Box",
144
+ "export": "Box",
145
+ "module": "layout.tsx",
146
+ "catalog": {
147
+ "name": "Box",
148
+ "description": "Flex container for composing layout. Use as a row or column spacer between other blocks.",
149
+ "category": "primitive",
150
+ "level": "L1",
151
+ "tags": [
152
+ "container",
153
+ "layout"
154
+ ],
155
+ "props": {
156
+ "direction": {
157
+ "type": "string",
158
+ "enum": [
159
+ "col",
160
+ "row"
161
+ ],
162
+ "default": "col",
163
+ "description": "Flex direction"
164
+ },
165
+ "gap": {
166
+ "type": "string",
167
+ "enum": [
168
+ "none",
169
+ "xs",
170
+ "sm",
171
+ "md",
172
+ "lg",
173
+ "xl"
174
+ ],
175
+ "default": "md"
176
+ },
177
+ "padding": {
178
+ "type": "string",
179
+ "enum": [
180
+ "none",
181
+ "xs",
182
+ "sm",
183
+ "md",
184
+ "lg",
185
+ "xl"
186
+ ]
187
+ },
188
+ "align": {
189
+ "type": "string",
190
+ "enum": [
191
+ "start",
192
+ "center",
193
+ "end",
194
+ "stretch"
195
+ ]
196
+ },
197
+ "justify": {
198
+ "type": "string",
199
+ "enum": [
200
+ "start",
201
+ "center",
202
+ "end",
203
+ "between",
204
+ "around"
205
+ ]
206
+ },
207
+ "wrap": {
208
+ "type": "boolean",
209
+ "default": false
210
+ },
211
+ "full": {
212
+ "type": "boolean",
213
+ "default": false
214
+ }
215
+ },
216
+ "usageScenarios": [
217
+ "Horizontal row of action buttons",
218
+ "Vertical stack of form fields",
219
+ "Two-column grid using two Box[direction=row] with flex-1 children"
220
+ ],
221
+ "constraints": [
222
+ "Do not use Box as a semantic section; prefer Card or PageLayout for major layout regions"
223
+ ]
224
+ }
225
+ },
226
+ {
227
+ "name": "Card",
228
+ "export": "Card",
229
+ "module": "layout.tsx",
230
+ "catalog": {
231
+ "name": "Card",
232
+ "description": "Surface container with rounded border and optional header (title + description + actions slot).",
233
+ "category": "composite",
234
+ "level": "L2",
235
+ "tags": [
236
+ "card",
237
+ "surface"
238
+ ],
239
+ "props": {
240
+ "title": {
241
+ "type": "string",
242
+ "description": "Card heading"
243
+ },
244
+ "description": {
245
+ "type": "string",
246
+ "description": "Supporting subtitle text"
247
+ }
248
+ },
249
+ "slots": {
250
+ "actions": {
251
+ "description": "Action buttons rendered in the top-right of the card header"
252
+ },
253
+ "default": {
254
+ "description": "Card body content"
255
+ }
256
+ },
257
+ "usageScenarios": [
258
+ "Stats overview section",
259
+ "User profile panel",
260
+ "Settings form container"
261
+ ],
262
+ "constraints": [
263
+ "Avoid nesting Card directly inside another Card"
264
+ ]
265
+ }
266
+ },
267
+ {
268
+ "name": "Divider",
269
+ "export": "Divider",
270
+ "module": "layout.tsx",
271
+ "catalog": {
272
+ "name": "Divider",
273
+ "description": "Thin horizontal (default) or vertical separator line.",
274
+ "category": "primitive",
275
+ "level": "L1",
276
+ "tags": [
277
+ "separator"
278
+ ],
279
+ "props": {
280
+ "orientation": {
281
+ "type": "string",
282
+ "enum": [
283
+ "horizontal",
284
+ "vertical"
285
+ ],
286
+ "default": "horizontal"
287
+ }
288
+ },
289
+ "usageScenarios": [
290
+ "Visual break between form sections",
291
+ "Vertical separator between two columns"
292
+ ],
293
+ "constraints": []
294
+ }
295
+ },
296
+ {
297
+ "name": "Drawer",
298
+ "export": "Drawer",
299
+ "module": "layout.tsx",
300
+ "catalog": {
301
+ "name": "Drawer",
302
+ "description": "Off-canvas side panel for secondary context (filters, details, comments). Rendered inline in preview.",
303
+ "category": "composite",
304
+ "level": "L2",
305
+ "tags": [
306
+ "drawer",
307
+ "overlay"
308
+ ],
309
+ "events": {
310
+ "onClose": {
311
+ "description": "Close requested; set controlled open false"
312
+ }
313
+ },
314
+ "props": {
315
+ "open": {
316
+ "type": "boolean"
317
+ },
318
+ "pending": {
319
+ "type": "boolean"
320
+ },
321
+ "title": {
322
+ "type": "string"
323
+ }
324
+ },
325
+ "usageScenarios": [
326
+ "Filter panel for a table",
327
+ "Item detail side sheet"
328
+ ],
329
+ "constraints": [
330
+ "Drawer is always visible in static preview — use conditionally in production via state"
331
+ ]
332
+ }
333
+ },
334
+ {
335
+ "name": "Modal",
336
+ "export": "Modal",
337
+ "module": "layout.tsx",
338
+ "catalog": {
339
+ "name": "Modal",
340
+ "description": "Centered overlay dialog for focused tasks or confirmations. Rendered inline in preview.",
341
+ "category": "composite",
342
+ "level": "L2",
343
+ "tags": [
344
+ "modal",
345
+ "overlay"
346
+ ],
347
+ "events": {
348
+ "onClose": {
349
+ "description": "Close requested; set controlled open false"
350
+ }
351
+ },
352
+ "props": {
353
+ "open": {
354
+ "type": "boolean"
355
+ },
356
+ "pending": {
357
+ "type": "boolean"
358
+ },
359
+ "title": {
360
+ "type": "string"
361
+ },
362
+ "description": {
363
+ "type": "string"
364
+ }
365
+ },
366
+ "usageScenarios": [
367
+ "Create / edit form dialog",
368
+ "Image preview lightbox"
369
+ ],
370
+ "constraints": [
371
+ "Modal is always visible in static preview — drive open/close state from actions in production"
372
+ ]
373
+ }
374
+ },
375
+ {
376
+ "name": "PageLayout",
377
+ "export": "PageLayout",
378
+ "module": "layout.tsx",
379
+ "catalog": {
380
+ "name": "PageLayout",
381
+ "description": "Top-level page scaffold: sticky header, optional sidebar, scrollable main area, optional footer.",
382
+ "category": "composite",
383
+ "level": "L2",
384
+ "tags": [
385
+ "page",
386
+ "layout"
387
+ ],
388
+ "props": {
389
+ "appearance": {
390
+ "type": "string",
391
+ "enum": [
392
+ "default",
393
+ "admin"
394
+ ]
395
+ },
396
+ "routes": {
397
+ "type": "array"
398
+ },
399
+ "headerLinks": {
400
+ "type": "array"
401
+ },
402
+ "accountLinks": {
403
+ "type": "array"
404
+ },
405
+ "tokens": {
406
+ "type": "object",
407
+ "description": "Admin frame sidebar/surface/foreground/accent/accent-foreground/border/font and primary/primary-foreground CSS tokens"
408
+ },
409
+ "theme": {
410
+ "type": "string"
411
+ },
412
+ "font": {
413
+ "type": "string"
414
+ },
415
+ "direction": {
416
+ "type": "string"
417
+ },
418
+ "initials": {
419
+ "type": "string"
420
+ },
421
+ "title": {
422
+ "type": "string",
423
+ "description": "App or page title shown in the sticky header"
424
+ },
425
+ "variant": {
426
+ "type": "string",
427
+ "enum": [
428
+ "sidebar",
429
+ "inset",
430
+ "floating"
431
+ ],
432
+ "default": "sidebar",
433
+ "description": "Frame: flush sidebar, inset main, or floating sidebar card"
434
+ },
435
+ "collapsible": {
436
+ "type": "string",
437
+ "enum": [
438
+ "none",
439
+ "icon",
440
+ "offcanvas"
441
+ ],
442
+ "default": "none",
443
+ "description": "How the sidebar collapses; default none keeps v2.40 width"
444
+ }
445
+ },
446
+ "events": {
447
+ "onThemeChange": {
448
+ "description": "Selected theme in event.value"
449
+ }
450
+ },
451
+ "slots": {
452
+ "headerActions": {
453
+ "description": "Buttons or links placed in the top-right of the header"
454
+ },
455
+ "sidebar": {
456
+ "description": "Left sidebar content, e.g. PageSiderMenu"
457
+ },
458
+ "footer": {
459
+ "description": "Bottom footer strip"
460
+ }
461
+ },
462
+ "usageScenarios": [
463
+ "Admin dashboard shell",
464
+ "Settings page with left navigation",
465
+ "Landing page with header and main content"
466
+ ],
467
+ "constraints": [
468
+ "Use at most one PageLayout per page",
469
+ "Do not nest PageLayout inside another PageLayout"
470
+ ]
471
+ }
472
+ },
473
+ {
474
+ "name": "Tabs",
475
+ "export": "Tabs",
476
+ "module": "layout.tsx",
477
+ "catalog": {
478
+ "name": "Tabs",
479
+ "description": "Tab switcher. Each child maps to the tab at the same index. Supports up to 6 tabs.",
480
+ "category": "composite",
481
+ "level": "L2",
482
+ "tags": [
483
+ "tabs",
484
+ "navigation"
485
+ ],
486
+ "props": {
487
+ "variant": {
488
+ "type": "string",
489
+ "enum": [
490
+ "underline",
491
+ "segmented"
492
+ ]
493
+ },
494
+ "disabledTabs": {
495
+ "type": "array",
496
+ "items": {
497
+ "type": "integer"
498
+ }
499
+ },
500
+ "value": {
501
+ "type": "integer"
502
+ },
503
+ "tabs": {
504
+ "type": "array",
505
+ "items": {
506
+ "type": "string"
507
+ },
508
+ "description": "Tab label list, e.g. [Overview, Details, Activity]"
509
+ },
510
+ "defaultTab": {
511
+ "type": "integer",
512
+ "default": 0,
513
+ "description": "0-based index of the initially active tab"
514
+ }
515
+ },
516
+ "usageScenarios": [
517
+ "Split view of Overview / Settings / Logs",
518
+ "Mobile-friendly section switcher"
519
+ ],
520
+ "constraints": [
521
+ "Children count must equal tabs array length",
522
+ "Do not use more than 6 tabs"
523
+ ]
524
+ }
525
+ }
526
+ ]
527
+ }
528
+ }
529
+ }