@uibot/registry 0.19.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component-replacement.d.ts +10 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +2117 -12
- package/dist/materialize-templates.d.ts +28 -0
- package/dist/materialize.d.ts +63 -0
- package/dist/resources.d.ts +5 -0
- package/dist/resources.js +2108 -3
- package/dist/shadcn/r/admin-apps.json +1 -1
- package/dist/shadcn/r/admin-chats.json +1 -1
- package/dist/shadcn/r/admin-settings-account.json +1 -1
- package/dist/shadcn/r/admin-settings-appearance.json +1 -1
- package/dist/shadcn/r/admin-settings-display.json +1 -1
- package/dist/shadcn/r/admin-settings-notifications.json +1 -1
- package/dist/shadcn/r/admin-settings-profile.json +1 -1
- package/dist/shadcn/r/admin-settings.json +1 -1
- package/dist/shadcn/r/admin-shell.json +16 -3
- package/dist/shadcn/r/admin-tasks.json +1 -1
- package/dist/shadcn/r/admin-users.json +1 -1
- package/dist/shadcn/r/agent-run-console.json +64 -0
- package/dist/shadcn/r/auth-minimal.json +59 -0
- package/dist/shadcn/r/billing-overview.json +66 -0
- package/dist/shadcn/r/billing-usage-ledger.json +66 -0
- package/dist/shadcn/r/charts.json +44 -17
- package/dist/shadcn/r/chat-workspace.json +1 -1
- package/dist/shadcn/r/collection-cell-editor.json +1 -1
- package/dist/shadcn/r/collection-kanban.json +134 -0
- package/dist/shadcn/r/collection-panel-drawer.json +1 -1
- package/dist/shadcn/r/collection-record-menu.json +1 -1
- package/dist/shadcn/r/collection-shared.json +1 -1
- package/dist/shadcn/r/commerce-workspace.json +1 -1
- package/dist/shadcn/r/console-billing.json +1 -1
- package/dist/shadcn/r/console-page.json +14 -14
- package/dist/shadcn/r/console-shell.json +2 -2
- package/dist/shadcn/r/creation-html-generation.json +2 -2
- package/dist/shadcn/r/creation-reference-generation.json +2 -2
- package/dist/shadcn/r/creation-revision-export.json +2 -2
- package/dist/shadcn/r/creation-shared.json +2 -2
- package/dist/shadcn/r/creation-variant-compare.json +3 -3
- package/dist/shadcn/r/creation-workspace.json +3 -3
- package/dist/shadcn/r/crm-workspace.json +1 -1
- package/dist/shadcn/r/dashboard-01.json +78 -0
- package/dist/shadcn/r/dashboard.json +113 -3
- package/dist/shadcn/r/data-crud-gallery.json +66 -0
- package/dist/shadcn/r/data-crud-kanban.json +66 -0
- package/dist/shadcn/r/data-crud-master-detail.json +66 -0
- package/dist/shadcn/r/data-crud-table.json +66 -0
- package/dist/shadcn/r/data-table.json +120 -10
- package/dist/shadcn/r/data.json +9 -2
- package/dist/shadcn/r/document-assistant.json +1 -1
- package/dist/shadcn/r/document-workspace.json +1 -1
- package/dist/shadcn/r/drilldown-menu.json +1 -1
- package/dist/shadcn/r/education-workspace.json +1 -1
- package/dist/shadcn/r/feedback.json +15 -2
- package/dist/shadcn/r/form.json +1 -1
- package/dist/shadcn/r/launch-site.json +72 -0
- package/dist/shadcn/r/layout.json +57 -22
- package/dist/shadcn/r/nav.json +38 -10
- package/dist/shadcn/r/onboarding-checklist.json +63 -0
- package/dist/shadcn/r/onboarding-wizard.json +66 -0
- package/dist/shadcn/r/prompt-eval-workbench.json +65 -0
- package/dist/shadcn/r/record-master-detail.json +132 -0
- package/dist/shadcn/r/shadcn-admin.json +1 -1
- package/dist/shadcn/r/sidebar-primitives.json +1 -1
- package/dist/shadcn/r/workspace.json +9 -2
- package/dist/shadcn/registry.json +229 -27
- package/dist/solution-regions.d.ts +12 -2
- package/dist/spec-blueprint.d.ts +11 -0
- package/dist/spec-patch.d.ts +10 -0
- package/dist/variant-swap.d.ts +22 -0
- package/package.json +2 -2
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
{
|
|
61
61
|
"path": "components/uibot/sidebars/ui-dropdown-menu.tsx",
|
|
62
62
|
"target": "components/uibot/sidebars/ui-dropdown-menu.tsx",
|
|
63
|
-
"content": "// Adapted from shadcn/ui (MIT). See THIRD_PARTY_LICENSE and provenance.json.\n\"use client\";\n\nimport type * as React from \"react\";\nimport { cn } from \"./utils\";\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n \"z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n",
|
|
63
|
+
"content": "// Adapted from shadcn/ui (MIT). See THIRD_PARTY_LICENSE and provenance.json.\n\"use client\";\n\nimport type * as React from \"react\";\nimport { cn } from \"./utils\";\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n container,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content> & {\n container?: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>[\"container\"];\n}) {\n return (\n <DropdownMenuPrimitive.Portal {...(container ? { container } : {})}>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n \"z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n",
|
|
64
64
|
"type": "registry:component"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
"type": "registry:ui",
|
|
5
5
|
"description": "Searchable integrations with explicit capability availability",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"react@19.3.0"
|
|
7
|
+
"react@19.3.0",
|
|
8
|
+
"radix-ui@1.4.3"
|
|
8
9
|
],
|
|
9
10
|
"registryDependencies": [
|
|
10
11
|
"@uibot/uibot-base"
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
{
|
|
14
15
|
"path": "components/uibot/workspace.tsx",
|
|
15
16
|
"target": "components/uibot/workspace.tsx",
|
|
16
|
-
"content": "import { useEffect, useRef, useState } from \"react\";\nimport type { RendererComponent } from \"@/lib/uibot-renderer\";\nimport { Icon } from \"./icons\";\nimport { BrandIcon } from \"./brand-icons\";\nimport { emit, records, submissionKey, text, type BlockContext } from \"./interaction\";\nfunction Integrations({ props, ctx }: { props: Record<string, unknown>; ctx: BlockContext }) {\n const [search, filter] = useState(\"\"),\n [status, setStatus] = useState(\"all\"),\n [sort, setSort] = useState(\"asc\");\n const items = records(props.items)\n .filter(\n (i) =>\n text(i.name).toLowerCase().includes(search.toLowerCase()) &&\n (status === \"all\" || (status === \"connected\") === (i.connected === true)),\n )\n .sort((a, b) => text(a.name).localeCompare(text(b.name)) * (sort === \"asc\" ? 1 : -1));\n return (\n <section data-uibot-type=\"IntegrationGrid\">\n <div className=\"mb-6 flex flex-wrap gap-2\">\n <input\n className=\"h-9 rounded-md border bg-background px-3 text-sm\"\n aria-label=\"Search apps\"\n placeholder=\"Filter apps...\"\n value={search}\n onChange={(e) => filter(e.target.value)}\n />\n <select\n aria-label=\"Connection status\"\n className=\"rounded-md border bg-background px-3 text-sm\"\n value={status}\n onChange={(e) => setStatus(e.target.value)}\n >\n <option value=\"all\">All apps</option>\n <option value=\"connected\">Connected</option>\n <option value=\"available\">Not connected</option>\n </select>\n <select\n className=\"ms-auto rounded-md border bg-background px-3 text-sm\"\n aria-label=\"Sort apps\"\n value={sort}\n onChange={(e) => setSort(e.target.value)}\n >\n <option value=\"asc\">Ascending</option>\n <option value=\"desc\">Descending</option>\n </select>\n </div>\n <div className=\"grid gap-4 md:grid-cols-2 xl:grid-cols-3\">\n {items.map((item) => (\n <article key={text(item.id)} className=\"rounded-xl border p-6\">\n <div className=\"mb-5 flex items-center justify-between\">\n <span className=\"grid size-11 place-items-center rounded-lg border bg-muted\">\n {typeof item.brand === \"string\" ? (\n <BrandIcon name={item.brand} />\n ) : (\n <Icon name={text(item.icon, \"boxes\")} size={24} />\n )}\n </span>\n <button\n type=\"button\"\n disabled={item.available !== true || props.pending === true}\n className=\"rounded-md border px-3 py-1.5 text-sm disabled:opacity-50\"\n onClick={() =>\n emit(ctx, \"onAction\", {\n id: text(item.id),\n action: item.connected === true ? \"disconnect\" : \"connect\",\n })\n }\n >\n {item.connected === true\n ? \"Connected\"\n : item.available === true\n ? \"Connect\"\n : \"Unavailable\"}\n </button>\n </div>\n <h3 className=\"font-semibold\">{text(item.name)}</h3>\n <p className=\"mt-2 text-sm text-muted-foreground\">{text(item.description)}</p>\n {props.configurable === true && (\n <button\n type=\"button\"\n className=\"mt-4 rounded-md border px-3 py-1.5 text-sm\"\n disabled={props.pending === true}\n aria-label={`Configure ${text(item.name)}`}\n onClick={() => {\n const config = records(props.configurations).find(\n (row) => row.provider === item.id,\n );\n const values =\n config?.config && typeof config.config === \"object\"\n ? (config.config as Record<string, unknown>)\n : {};\n emit(ctx, \"onConfigure\", {\n provider: text(item.id),\n id: text(config?.id),\n version: typeof config?.version === \"number\" ? config.version : null,\n enabled: config?.enabled === true,\n label: text(values.label, text(item.name)),\n channel: text(values.channel),\n });\n }}\n >\n Configure\n </button>\n )}\n </article>\n ))}\n </div>\n {!items.length && (\n <p className=\"py-16 text-center text-sm text-muted-foreground\">No apps found.</p>\n )}\n {Boolean(props.error) && (\n <p role=\"alert\" className=\"mt-4 text-sm text-destructive\">\n {text(props.error)}\n </p>\n )}\n </section>\n );\n}\nexport const IntegrationGrid: RendererComponent = (props, ctx) => (\n <Integrations props={props} ctx={ctx} />\n);\nfunction Chat({ props, ctx }: { props: Record<string, unknown>; ctx: BlockContext }) {\n const [search, setSearch] = useState(\"\"),\n [localId, setId] = useState(\"\"),\n [localDraft, setDraft] = useState(\"\");\n const draft = typeof props.draft === \"string\" ? props.draft : localDraft;\n const intent = useRef<object>({});\n useEffect(() => {\n if (!draft) intent.current = {};\n }, [draft]);\n const conversations = records(props.conversations),\n id = text(props.selectedId, localId),\n selected = conversations.find((c) => c.id === id),\n messages = records(props.messages)\n .filter((m) => m.conversationId === id)\n .sort((a, b) => {\n const first = Date.parse(text(a.createdAt)),\n second = Date.parse(text(b.createdAt));\n return Number.isFinite(first) && Number.isFinite(second) ? first - second : 0;\n });\n const matches = conversations.filter((c) =>\n text(c.name).toLowerCase().includes(search.trim().toLowerCase()),\n );\n const backButton = useRef<HTMLButtonElement>(null);\n const searchInput = useRef<HTMLInputElement>(null);\n const returnButton = useRef<HTMLButtonElement | null>(null);\n const navigationFocus = useRef<{\n id: string;\n fromId: string;\n origin: HTMLButtonElement;\n } | null>(null);\n const hasSelection = Boolean(selected);\n useEffect(() => {\n const request = navigationFocus.current;\n if (!request) return;\n if (request.id !== id) {\n if (request.fromId !== id) navigationFocus.current = null;\n return;\n }\n if (id && !hasSelection) return;\n navigationFocus.current = null;\n const document = request.origin.ownerDocument;\n if (document.activeElement !== request.origin && document.activeElement !== document.body)\n return;\n const target = id\n ? backButton.current\n : returnButton.current?.isConnected\n ? returnButton.current\n : searchInput.current;\n if (target?.getClientRects().length) target.focus({ preventScroll: true });\n }, [id, hasSelection]);\n const log = useRef<HTMLDivElement>(null);\n const content = useRef<HTMLDivElement>(null);\n const followLatest = useRef(true);\n const layout = useRef({ width: 0, height: 0, content: 0 });\n const previousId = useRef(id);\n const lastMessage = messages.at(-1);\n // biome-ignore lint/correctness/useExhaustiveDependencies: Scroll follows the latest message only while the reader is at the bottom.\n useEffect(() => {\n const element = log.current;\n if (previousId.current !== id) followLatest.current = true;\n previousId.current = id;\n if (!element) return;\n const scroll = () => {\n if (followLatest.current) element.scrollTop = element.scrollHeight;\n layout.current = {\n width: element.clientWidth,\n height: element.clientHeight,\n content: element.scrollHeight,\n };\n };\n scroll();\n if (typeof ResizeObserver === \"undefined\") return;\n const observer = new ResizeObserver(scroll);\n observer.observe(element);\n if (content.current) observer.observe(content.current);\n return () => observer.disconnect();\n }, [id, messages.length, lastMessage?.id, lastMessage?.text]);\n return (\n <>\n {Boolean(props.error) && (\n <p role=\"alert\" className=\"mb-3 text-sm text-destructive\">\n {text(props.error)}\n </p>\n )}\n <section\n data-uibot-type=\"ChatPanel\"\n className=\"flex min-h-[560px] overflow-hidden rounded-xl border\"\n >\n <aside\n className={`${selected ? \"hidden md:block\" : \"block\"} w-full shrink-0 border-e p-4 md:w-72`}\n >\n <div className=\"mb-4 flex items-center justify-between\">\n <h2 className=\"text-2xl font-bold\">Inbox</h2>\n <Icon name=\"message-circle\" />\n </div>\n <input\n ref={searchInput}\n aria-label=\"Search conversations\"\n placeholder=\"Search chat...\"\n className=\"mb-4 w-full rounded-md border bg-background px-3 py-2 text-sm\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n {!matches.length && (\n <p role=\"status\" className=\"p-3 text-sm text-muted-foreground\">\n {search.trim() ? \"No conversations found.\" : \"No conversations yet.\"}\n </p>\n )}\n {matches.map((c) => (\n <button\n key={text(c.id)}\n type=\"button\"\n className={`mb-1 flex w-full gap-3 rounded-md p-3 text-start ${c.id === id ? \"bg-muted\" : \"hover:bg-muted/50\"}`}\n onClick={(event) => {\n returnButton.current = event.currentTarget;\n navigationFocus.current = {\n id: text(c.id),\n fromId: id,\n origin: event.currentTarget,\n };\n setId(text(c.id));\n emit(ctx, \"onSelect\", { id: text(c.id) }, text(c.id));\n }}\n >\n <span className=\"grid size-10 shrink-0 place-items-center rounded-full bg-muted text-xs font-medium\">\n {text(c.initials)}\n </span>\n <span className=\"min-w-0\">\n <span className=\"block text-sm font-semibold\">{text(c.name)}</span>\n <span className=\"block truncate text-xs text-muted-foreground\">\n {text(c.preview)}\n </span>\n </span>\n </button>\n ))}\n </aside>\n <div className={`${selected ? \"flex\" : \"hidden md:flex\"} min-w-0 flex-1 flex-col`}>\n {selected ? (\n <>\n <header className=\"flex items-center gap-3 border-b px-6 py-4\">\n <button\n ref={backButton}\n type=\"button\"\n className=\"text-sm md:hidden\"\n onClick={(event) => {\n navigationFocus.current = { id: \"\", fromId: id, origin: event.currentTarget };\n setId(\"\");\n emit(ctx, \"onSelect\", { id: \"\" }, \"\");\n }}\n >\n Back\n </button>\n <div>\n <h3 className=\"font-semibold\">{text(selected.name)}</h3>\n <p className=\"text-xs text-muted-foreground\">\n {text(selected.description, \"Conversation\")}\n </p>\n </div>\n </header>\n <div\n ref={log}\n onScroll={(event) => {\n const element = event.currentTarget;\n // Layout anchoring can emit scroll before ResizeObserver delivers.\n if (\n element.clientWidth === layout.current.width &&\n element.clientHeight === layout.current.height &&\n element.scrollHeight === layout.current.content\n ) {\n followLatest.current =\n element.scrollHeight - element.scrollTop - element.clientHeight < 48;\n }\n }}\n className=\"max-h-[480px] flex-1 overflow-auto p-6\"\n role=\"log\"\n aria-label=\"Messages\"\n >\n <div ref={content} className=\"flex flex-col gap-4\">\n {messages.map((m) => (\n <div\n key={text(m.id)}\n className={`max-w-[80%] shrink-0 rounded-xl px-4 py-2.5 text-sm ${m.own === true || (props.currentUserId && m.senderId === props.currentUserId) ? \"ms-auto bg-primary text-primary-foreground\" : \"me-auto bg-muted\"}`}\n >\n <p className=\"whitespace-pre-wrap [overflow-wrap:anywhere]\">{text(m.text)}</p>\n <time className=\"mt-1 block text-[11px] opacity-60\">\n {m.time\n ? text(m.time)\n : Number.isFinite(Date.parse(text(m.createdAt)))\n ? new Date(text(m.createdAt)).toLocaleTimeString(undefined, {\n hour: \"2-digit\",\n minute: \"2-digit\",\n })\n : \"\"}\n </time>\n </div>\n ))}\n </div>\n </div>\n <form\n className=\"m-4 flex gap-2\"\n onSubmit={(e) => {\n e.preventDefault();\n if (props.canSend === true && props.pending !== true && draft.trim())\n emit(ctx, \"onSend\", {\n conversationId: id,\n text: draft.trim(),\n requestId: submissionKey(intent.current, { id, text: draft.trim() }),\n });\n }}\n >\n <input\n aria-label=\"Message\"\n required\n maxLength={8000}\n className=\"min-w-0 flex-1 rounded-md border bg-background px-3 py-2 text-sm\"\n placeholder=\"Type your message...\"\n value={draft}\n onChange={(e) => {\n setDraft(e.target.value);\n emit(ctx, \"onDraftChange\", { text: e.target.value }, e.target.value);\n }}\n disabled={props.pending === true}\n />\n <button\n type=\"submit\"\n aria-label=\"Send message\"\n disabled={props.canSend !== true || props.pending === true || !draft.trim()}\n className=\"rounded-md bg-primary px-3 text-primary-foreground disabled:opacity-40\"\n >\n <Icon name=\"send\" />\n </button>\n </form>\n {props.canSend !== true && (\n <p className=\"px-4 pb-4 text-xs text-muted-foreground\">\n Messaging service is not configured.\n </p>\n )}\n </>\n ) : (\n <div className=\"m-auto flex flex-col items-center gap-3 p-6\">\n <Icon name=\"message-circle\" size={40} />\n <h2 className=\"text-xl font-semibold\">Your messages</h2>\n <p className=\"text-sm text-muted-foreground\">\n Select a conversation to start chatting.\n </p>\n </div>\n )}\n </div>\n </section>\n </>\n );\n}\nexport const ChatPanel: RendererComponent = (props, ctx) => <Chat props={props} ctx={ctx} />;\n",
|
|
17
|
+
"content": "import { useEffect, useRef, useState } from \"react\";\nimport type { RendererComponent } from \"@/lib/uibot-renderer\";\nimport { Icon } from \"./icons\";\nimport { BrandIcon } from \"./brand-icons\";\nimport { emit, records, submissionKey, text, type BlockContext } from \"./interaction\";\nimport { ScrollArea } from \"./scroll-area\";\nfunction Integrations({ props, ctx }: { props: Record<string, unknown>; ctx: BlockContext }) {\n const [search, filter] = useState(\"\"),\n [status, setStatus] = useState(\"all\"),\n [sort, setSort] = useState(\"asc\");\n const items = records(props.items)\n .filter(\n (i) =>\n text(i.name).toLowerCase().includes(search.toLowerCase()) &&\n (status === \"all\" || (status === \"connected\") === (i.connected === true)),\n )\n .sort((a, b) => text(a.name).localeCompare(text(b.name)) * (sort === \"asc\" ? 1 : -1));\n return (\n <section data-uibot-type=\"IntegrationGrid\">\n <div className=\"mb-6 flex flex-wrap gap-2\">\n <input\n className=\"h-9 rounded-md border bg-background px-3 text-sm\"\n aria-label=\"Search apps\"\n placeholder=\"Filter apps...\"\n value={search}\n onChange={(e) => filter(e.target.value)}\n />\n <select\n aria-label=\"Connection status\"\n className=\"rounded-md border bg-background px-3 text-sm\"\n value={status}\n onChange={(e) => setStatus(e.target.value)}\n >\n <option value=\"all\">All apps</option>\n <option value=\"connected\">Connected</option>\n <option value=\"available\">Not connected</option>\n </select>\n <select\n className=\"ms-auto rounded-md border bg-background px-3 text-sm\"\n aria-label=\"Sort apps\"\n value={sort}\n onChange={(e) => setSort(e.target.value)}\n >\n <option value=\"asc\">Ascending</option>\n <option value=\"desc\">Descending</option>\n </select>\n </div>\n <div className=\"grid gap-4 md:grid-cols-2 xl:grid-cols-3\">\n {items.map((item) => (\n <article key={text(item.id)} className=\"rounded-xl border p-6\">\n <div className=\"mb-5 flex items-center justify-between\">\n <span className=\"grid size-11 place-items-center rounded-lg border bg-muted\">\n {typeof item.brand === \"string\" ? (\n <BrandIcon name={item.brand} />\n ) : (\n <Icon name={text(item.icon, \"boxes\")} size={24} />\n )}\n </span>\n <button\n type=\"button\"\n disabled={item.available !== true || props.pending === true}\n className=\"rounded-md border px-3 py-1.5 text-sm disabled:opacity-50\"\n onClick={() =>\n emit(ctx, \"onAction\", {\n id: text(item.id),\n action: item.connected === true ? \"disconnect\" : \"connect\",\n })\n }\n >\n {item.connected === true\n ? \"Connected\"\n : item.available === true\n ? \"Connect\"\n : \"Unavailable\"}\n </button>\n </div>\n <h3 className=\"font-semibold\">{text(item.name)}</h3>\n <p className=\"mt-2 text-sm text-muted-foreground\">{text(item.description)}</p>\n {props.configurable === true && (\n <button\n type=\"button\"\n className=\"mt-4 rounded-md border px-3 py-1.5 text-sm\"\n disabled={props.pending === true}\n aria-label={`Configure ${text(item.name)}`}\n onClick={() => {\n const config = records(props.configurations).find(\n (row) => row.provider === item.id,\n );\n const values =\n config?.config && typeof config.config === \"object\"\n ? (config.config as Record<string, unknown>)\n : {};\n emit(ctx, \"onConfigure\", {\n provider: text(item.id),\n id: text(config?.id),\n version: typeof config?.version === \"number\" ? config.version : null,\n enabled: config?.enabled === true,\n label: text(values.label, text(item.name)),\n channel: text(values.channel),\n });\n }}\n >\n Configure\n </button>\n )}\n </article>\n ))}\n </div>\n {!items.length && (\n <p className=\"py-16 text-center text-sm text-muted-foreground\">No apps found.</p>\n )}\n {Boolean(props.error) && (\n <p role=\"alert\" className=\"mt-4 text-sm text-destructive\">\n {text(props.error)}\n </p>\n )}\n </section>\n );\n}\nexport const IntegrationGrid: RendererComponent = (props, ctx) => (\n <Integrations props={props} ctx={ctx} />\n);\nfunction Chat({ props, ctx }: { props: Record<string, unknown>; ctx: BlockContext }) {\n const [search, setSearch] = useState(\"\"),\n [localId, setId] = useState(\"\"),\n [localDraft, setDraft] = useState(\"\");\n const draft = typeof props.draft === \"string\" ? props.draft : localDraft;\n const intent = useRef<object>({});\n useEffect(() => {\n if (!draft) intent.current = {};\n }, [draft]);\n const conversations = records(props.conversations),\n id = text(props.selectedId, localId),\n selected = conversations.find((c) => c.id === id),\n messages = records(props.messages)\n .filter((m) => m.conversationId === id)\n .sort((a, b) => {\n const first = Date.parse(text(a.createdAt)),\n second = Date.parse(text(b.createdAt));\n return Number.isFinite(first) && Number.isFinite(second) ? first - second : 0;\n });\n const matches = conversations.filter((c) =>\n text(c.name).toLowerCase().includes(search.trim().toLowerCase()),\n );\n const backButton = useRef<HTMLButtonElement>(null);\n const searchInput = useRef<HTMLInputElement>(null);\n const returnButton = useRef<HTMLButtonElement | null>(null);\n const navigationFocus = useRef<{\n id: string;\n fromId: string;\n origin: HTMLButtonElement;\n } | null>(null);\n const hasSelection = Boolean(selected);\n useEffect(() => {\n const request = navigationFocus.current;\n if (!request) return;\n if (request.id !== id) {\n if (request.fromId !== id) navigationFocus.current = null;\n return;\n }\n if (id && !hasSelection) return;\n navigationFocus.current = null;\n const document = request.origin.ownerDocument;\n if (document.activeElement !== request.origin && document.activeElement !== document.body)\n return;\n const target = id\n ? backButton.current\n : returnButton.current?.isConnected\n ? returnButton.current\n : searchInput.current;\n if (target?.getClientRects().length) target.focus({ preventScroll: true });\n }, [id, hasSelection]);\n const log = useRef<HTMLDivElement>(null);\n const content = useRef<HTMLDivElement>(null);\n const followLatest = useRef(true);\n const layout = useRef({ width: 0, height: 0, content: 0 });\n const previousId = useRef(id);\n const lastMessage = messages.at(-1);\n // biome-ignore lint/correctness/useExhaustiveDependencies: Scroll follows the latest message only while the reader is at the bottom.\n useEffect(() => {\n const element = log.current;\n if (previousId.current !== id) followLatest.current = true;\n previousId.current = id;\n if (!element) return;\n const scroll = () => {\n if (followLatest.current) element.scrollTop = element.scrollHeight;\n layout.current = {\n width: element.clientWidth,\n height: element.clientHeight,\n content: element.scrollHeight,\n };\n };\n scroll();\n if (typeof ResizeObserver === \"undefined\") return;\n const observer = new ResizeObserver(scroll);\n observer.observe(element);\n if (content.current) observer.observe(content.current);\n return () => observer.disconnect();\n }, [id, messages.length, lastMessage?.id, lastMessage?.text]);\n return (\n <>\n {Boolean(props.error) && (\n <p role=\"alert\" className=\"mb-3 text-sm text-destructive\">\n {text(props.error)}\n </p>\n )}\n <section\n data-uibot-type=\"ChatPanel\"\n className=\"flex min-h-[560px] overflow-hidden rounded-xl border\"\n >\n <aside\n className={`${selected ? \"hidden md:block\" : \"block\"} w-full shrink-0 border-e p-4 md:w-72`}\n >\n <div className=\"mb-4 flex items-center justify-between\">\n <h2 className=\"text-2xl font-bold\">Inbox</h2>\n <Icon name=\"message-circle\" />\n </div>\n <input\n ref={searchInput}\n aria-label=\"Search conversations\"\n placeholder=\"Search chat...\"\n className=\"mb-4 w-full rounded-md border bg-background px-3 py-2 text-sm\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n {!matches.length && (\n <p role=\"status\" className=\"p-3 text-sm text-muted-foreground\">\n {search.trim() ? \"No conversations found.\" : \"No conversations yet.\"}\n </p>\n )}\n {matches.map((c) => (\n <button\n key={text(c.id)}\n type=\"button\"\n className={`mb-1 flex w-full gap-3 rounded-md p-3 text-start ${c.id === id ? \"bg-muted\" : \"hover:bg-muted/50\"}`}\n onClick={(event) => {\n returnButton.current = event.currentTarget;\n navigationFocus.current = {\n id: text(c.id),\n fromId: id,\n origin: event.currentTarget,\n };\n setId(text(c.id));\n emit(ctx, \"onSelect\", { id: text(c.id) }, text(c.id));\n }}\n >\n <span className=\"grid size-10 shrink-0 place-items-center rounded-full bg-muted text-xs font-medium\">\n {text(c.initials)}\n </span>\n <span className=\"min-w-0\">\n <span className=\"block text-sm font-semibold\">{text(c.name)}</span>\n <span className=\"block truncate text-xs text-muted-foreground\">\n {text(c.preview)}\n </span>\n </span>\n </button>\n ))}\n </aside>\n <div className={`${selected ? \"flex\" : \"hidden md:flex\"} min-w-0 flex-1 flex-col`}>\n {selected ? (\n <>\n <header className=\"flex items-center gap-3 border-b px-6 py-4\">\n <button\n ref={backButton}\n type=\"button\"\n className=\"text-sm md:hidden\"\n onClick={(event) => {\n navigationFocus.current = { id: \"\", fromId: id, origin: event.currentTarget };\n setId(\"\");\n emit(ctx, \"onSelect\", { id: \"\" }, \"\");\n }}\n >\n Back\n </button>\n <div>\n <h3 className=\"font-semibold\">{text(selected.name)}</h3>\n <p className=\"text-xs text-muted-foreground\">\n {text(selected.description, \"Conversation\")}\n </p>\n </div>\n </header>\n <ScrollArea\n className=\"flex-1\"\n style={{ maxHeight: 480 }}\n viewportProps={{\n ref: log,\n onScroll: (event) => {\n const element = event.currentTarget;\n // Layout anchoring can emit scroll before ResizeObserver delivers.\n if (\n element.clientWidth === layout.current.width &&\n element.clientHeight === layout.current.height &&\n element.scrollHeight === layout.current.content\n ) {\n followLatest.current =\n element.scrollHeight - element.scrollTop - element.clientHeight < 48;\n }\n },\n className: \"p-6\",\n role: \"log\",\n \"aria-label\": \"Messages\",\n }}\n >\n <div ref={content} className=\"flex flex-col gap-4\">\n {messages.map((m) => (\n <div\n key={text(m.id)}\n className={`max-w-[80%] shrink-0 rounded-xl px-4 py-2.5 text-sm ${m.own === true || (props.currentUserId && m.senderId === props.currentUserId) ? \"ms-auto bg-primary text-primary-foreground\" : \"me-auto bg-muted\"}`}\n >\n <p className=\"whitespace-pre-wrap [overflow-wrap:anywhere]\">{text(m.text)}</p>\n <time className=\"mt-1 block text-[11px] opacity-60\">\n {m.time\n ? text(m.time)\n : Number.isFinite(Date.parse(text(m.createdAt)))\n ? new Date(text(m.createdAt)).toLocaleTimeString(undefined, {\n hour: \"2-digit\",\n minute: \"2-digit\",\n })\n : \"\"}\n </time>\n </div>\n ))}\n </div>\n </ScrollArea>\n <form\n className=\"m-4 flex gap-2\"\n onSubmit={(e) => {\n e.preventDefault();\n if (props.canSend === true && props.pending !== true && draft.trim())\n emit(ctx, \"onSend\", {\n conversationId: id,\n text: draft.trim(),\n createdAt: new Date().toISOString(),\n requestId: submissionKey(intent.current, { id, text: draft.trim() }),\n });\n }}\n >\n <input\n aria-label=\"Message\"\n required\n maxLength={8000}\n className=\"min-w-0 flex-1 rounded-md border bg-background px-3 py-2 text-sm\"\n placeholder=\"Type your message...\"\n value={draft}\n onChange={(e) => {\n setDraft(e.target.value);\n emit(ctx, \"onDraftChange\", { text: e.target.value }, e.target.value);\n }}\n disabled={props.pending === true}\n />\n <button\n type=\"submit\"\n aria-label=\"Send message\"\n disabled={props.canSend !== true || props.pending === true || !draft.trim()}\n className=\"rounded-md bg-primary px-3 text-primary-foreground disabled:opacity-40\"\n >\n <Icon name=\"send\" />\n </button>\n </form>\n {props.canSend !== true && (\n <p className=\"px-4 pb-4 text-xs text-muted-foreground\">\n Messaging service is not configured.\n </p>\n )}\n </>\n ) : (\n <div className=\"m-auto flex flex-col items-center gap-3 p-6\">\n <Icon name=\"message-circle\" size={40} />\n <h2 className=\"text-xl font-semibold\">Your messages</h2>\n <p className=\"text-sm text-muted-foreground\">\n Select a conversation to start chatting.\n </p>\n </div>\n )}\n </div>\n </section>\n </>\n );\n}\nexport const ChatPanel: RendererComponent = (props, ctx) => <Chat props={props} ctx={ctx} />;\n",
|
|
17
18
|
"type": "registry:ui"
|
|
18
19
|
},
|
|
19
20
|
{
|
|
@@ -34,6 +35,12 @@
|
|
|
34
35
|
"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",
|
|
35
36
|
"type": "registry:ui"
|
|
36
37
|
},
|
|
38
|
+
{
|
|
39
|
+
"path": "components/uibot/scroll-area.tsx",
|
|
40
|
+
"target": "components/uibot/scroll-area.tsx",
|
|
41
|
+
"content": "// Adapted from shadcn/ui Scroll Area (MIT).\nimport type { ComponentProps } from \"react\";\nimport { ScrollArea as Primitive } from \"radix-ui\";\n\nconst styles = `\n.uibot-scroll-area{position:relative;min-width:0;min-height:0;overflow:hidden}\n.uibot-scroll-viewport{width:100%;height:100%;max-height:inherit;border-radius:inherit;outline:none}\n.uibot-scroll-viewport:focus-visible{outline:2px solid var(--ring,#94a3b8);outline-offset:-2px}\n.uibot-scroll-viewport>div{display:block!important;min-width:100%}\n.uibot-scroll-area[data-fill-content=true]>.uibot-scroll-viewport>div{display:flex!important;flex-direction:column;min-height:100%}\n.uibot-scroll-area[data-scrollbars=horizontal]>.uibot-scroll-viewport{height:auto}\n.uibot-scrollbar{display:flex;touch-action:none;user-select:none;padding:1px;z-index:20}\n.uibot-scrollbar[data-orientation=vertical]{width:10px;border-inline-start:1px solid transparent}\n.uibot-scrollbar[data-orientation=horizontal]{height:10px;flex-direction:column;border-top:1px solid transparent}\n.uibot-scroll-thumb{position:relative;flex:1;border-radius:9999px;background:var(--nui-border,var(--border,#d4d4d8))}\n.uibot-scroll-thumb:hover,.uibot-scrollbar[data-state=visible]:active .uibot-scroll-thumb{background:var(--muted-foreground,#71717a)}\n`;\n\n/** Shared presentation primitive; refs and scroll events belong to the actual viewport. */\nexport function ScrollArea({\n children,\n className,\n scrollbars = \"vertical\",\n viewportProps,\n fillContent = false,\n ...props\n}: ComponentProps<typeof Primitive.Root> & {\n scrollbars?: \"vertical\" | \"horizontal\" | \"both\";\n viewportProps?: ComponentProps<typeof Primitive.Viewport>;\n fillContent?: boolean;\n}) {\n const { className: viewportClassName, ...viewportRest } = viewportProps ?? {};\n return (\n <Primitive.Root\n data-slot=\"scroll-area\"\n data-scrollbars={scrollbars}\n data-fill-content={fillContent}\n className={`uibot-scroll-area ${className ?? \"\"}`}\n type=\"auto\"\n {...props}\n >\n <style>{styles}</style>\n <Primitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className={`uibot-scroll-viewport ${viewportClassName ?? \"\"}`}\n tabIndex={0}\n {...viewportRest}\n >\n {children}\n </Primitive.Viewport>\n {scrollbars !== \"horizontal\" && <ScrollBar />}\n {scrollbars !== \"vertical\" && <ScrollBar orientation=\"horizontal\" />}\n <Primitive.Corner />\n </Primitive.Root>\n );\n}\n\nexport function ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: ComponentProps<typeof Primitive.Scrollbar>) {\n return (\n <Primitive.Scrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={`uibot-scrollbar ${className ?? \"\"}`}\n {...props}\n >\n <Primitive.Thumb data-slot=\"scroll-area-thumb\" className=\"uibot-scroll-thumb\" />\n </Primitive.Scrollbar>\n );\n}\n",
|
|
42
|
+
"type": "registry:ui"
|
|
43
|
+
},
|
|
37
44
|
{
|
|
38
45
|
"path": "components/uibot/workspace.uibot.json",
|
|
39
46
|
"target": "components/uibot/workspace.uibot.json",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": [
|
|
28
28
|
"react@19.3.0",
|
|
29
|
-
"@uibot/ai-chat@0.
|
|
29
|
+
"@uibot/ai-chat@0.22.0"
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
{
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": [
|
|
40
40
|
"react@19.3.0",
|
|
41
|
-
"@uibot/document-editor@0.
|
|
41
|
+
"@uibot/document-editor@0.22.0"
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
{
|
|
@@ -61,6 +61,28 @@
|
|
|
61
61
|
"yaml@2.9.1"
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
|
+
{
|
|
65
|
+
"name": "collection-kanban",
|
|
66
|
+
"type": "registry:ui",
|
|
67
|
+
"description": "Kanban.",
|
|
68
|
+
"registryDependencies": [
|
|
69
|
+
"@uibot/uibot-base"
|
|
70
|
+
],
|
|
71
|
+
"dependencies": [
|
|
72
|
+
"react@19.3.0"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "record-master-detail",
|
|
77
|
+
"type": "registry:ui",
|
|
78
|
+
"description": "Master-detail.",
|
|
79
|
+
"registryDependencies": [
|
|
80
|
+
"@uibot/uibot-base"
|
|
81
|
+
],
|
|
82
|
+
"dependencies": [
|
|
83
|
+
"react@19.3.0"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
64
86
|
{
|
|
65
87
|
"name": "item-grid",
|
|
66
88
|
"type": "registry:ui",
|
|
@@ -80,7 +102,8 @@
|
|
|
80
102
|
"@uibot/uibot-base"
|
|
81
103
|
],
|
|
82
104
|
"dependencies": [
|
|
83
|
-
"react@19.3.0"
|
|
105
|
+
"react@19.3.0",
|
|
106
|
+
"radix-ui@1.4.3"
|
|
84
107
|
]
|
|
85
108
|
},
|
|
86
109
|
{
|
|
@@ -113,7 +136,8 @@
|
|
|
113
136
|
"@uibot/uibot-base"
|
|
114
137
|
],
|
|
115
138
|
"dependencies": [
|
|
116
|
-
"react@19.3.0"
|
|
139
|
+
"react@19.3.0",
|
|
140
|
+
"radix-ui@1.4.3"
|
|
117
141
|
]
|
|
118
142
|
},
|
|
119
143
|
{
|
|
@@ -124,7 +148,15 @@
|
|
|
124
148
|
"@uibot/uibot-base"
|
|
125
149
|
],
|
|
126
150
|
"dependencies": [
|
|
127
|
-
"react@19.3.0"
|
|
151
|
+
"react@19.3.0",
|
|
152
|
+
"@dnd-kit/core@6.3.1",
|
|
153
|
+
"@dnd-kit/sortable@10.0.0",
|
|
154
|
+
"@dnd-kit/utilities@3.2.2",
|
|
155
|
+
"clsx@2.1.1",
|
|
156
|
+
"lucide-react@1.56.0",
|
|
157
|
+
"radix-ui@1.4.3",
|
|
158
|
+
"react-day-picker@9.14.0",
|
|
159
|
+
"tailwind-merge@3.7.0"
|
|
128
160
|
]
|
|
129
161
|
},
|
|
130
162
|
{
|
|
@@ -166,7 +198,8 @@
|
|
|
166
198
|
"@uibot/uibot-base"
|
|
167
199
|
],
|
|
168
200
|
"dependencies": [
|
|
169
|
-
"react@19.3.0"
|
|
201
|
+
"react@19.3.0",
|
|
202
|
+
"radix-ui@1.4.3"
|
|
170
203
|
]
|
|
171
204
|
},
|
|
172
205
|
{
|
|
@@ -177,7 +210,8 @@
|
|
|
177
210
|
"@uibot/uibot-base"
|
|
178
211
|
],
|
|
179
212
|
"dependencies": [
|
|
180
|
-
"react@19.3.0"
|
|
213
|
+
"react@19.3.0",
|
|
214
|
+
"radix-ui@1.4.3"
|
|
181
215
|
]
|
|
182
216
|
},
|
|
183
217
|
{
|
|
@@ -201,7 +235,8 @@
|
|
|
201
235
|
"@uibot/uibot-base"
|
|
202
236
|
],
|
|
203
237
|
"dependencies": [
|
|
204
|
-
"react@19.3.0"
|
|
238
|
+
"react@19.3.0",
|
|
239
|
+
"radix-ui@1.4.3"
|
|
205
240
|
]
|
|
206
241
|
},
|
|
207
242
|
{
|
|
@@ -240,7 +275,7 @@
|
|
|
240
275
|
{
|
|
241
276
|
"name": "charts",
|
|
242
277
|
"type": "registry:ui",
|
|
243
|
-
"description": "
|
|
278
|
+
"description": "SVG line/area chart: shared axes, pointer/keyboard values and crosshair. Alias: LineChart.",
|
|
244
279
|
"registryDependencies": [
|
|
245
280
|
"@uibot/uibot-base"
|
|
246
281
|
],
|
|
@@ -354,6 +389,32 @@
|
|
|
354
389
|
"@uibot/chat-workspace"
|
|
355
390
|
]
|
|
356
391
|
},
|
|
392
|
+
{
|
|
393
|
+
"name": "agent-run-console",
|
|
394
|
+
"type": "registry:block",
|
|
395
|
+
"description": "AI operations console combining Collection-backed agent run telemetry, status filtering, and an embedded operator ChatWorkspace.",
|
|
396
|
+
"registryDependencies": [
|
|
397
|
+
"@uibot/chat-workspace",
|
|
398
|
+
"@uibot/data",
|
|
399
|
+
"@uibot/data-table",
|
|
400
|
+
"@uibot/feedback",
|
|
401
|
+
"@uibot/form",
|
|
402
|
+
"@uibot/layout"
|
|
403
|
+
]
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"name": "prompt-eval-workbench",
|
|
407
|
+
"type": "registry:block",
|
|
408
|
+
"description": "Prompt iteration and case-by-case evaluation workbench with master-detail scoring and embedded sandbox chat, hot-swappable with agent-run-console.",
|
|
409
|
+
"registryDependencies": [
|
|
410
|
+
"@uibot/chat-workspace",
|
|
411
|
+
"@uibot/data",
|
|
412
|
+
"@uibot/feedback",
|
|
413
|
+
"@uibot/form",
|
|
414
|
+
"@uibot/layout",
|
|
415
|
+
"@uibot/record-master-detail"
|
|
416
|
+
]
|
|
417
|
+
},
|
|
357
418
|
{
|
|
358
419
|
"name": "document-writing",
|
|
359
420
|
"type": "registry:block",
|
|
@@ -402,6 +463,33 @@
|
|
|
402
463
|
"@uibot/primitives"
|
|
403
464
|
]
|
|
404
465
|
},
|
|
466
|
+
{
|
|
467
|
+
"name": "billing-overview",
|
|
468
|
+
"type": "registry:block",
|
|
469
|
+
"description": "Brand-neutral SaaS billing page with annual/monthly toggle, seat & API quota KPIs, and Collection-backed invoice table.",
|
|
470
|
+
"registryDependencies": [
|
|
471
|
+
"@uibot/data",
|
|
472
|
+
"@uibot/data-table",
|
|
473
|
+
"@uibot/feedback",
|
|
474
|
+
"@uibot/form",
|
|
475
|
+
"@uibot/layout",
|
|
476
|
+
"@uibot/primitives"
|
|
477
|
+
]
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"name": "billing-usage-ledger",
|
|
481
|
+
"type": "registry:block",
|
|
482
|
+
"description": "Metered spend chart paired with a master-detail invoice ledger, hot-swappable with billing-overview over the same invoices entity.",
|
|
483
|
+
"registryDependencies": [
|
|
484
|
+
"@uibot/dashboard",
|
|
485
|
+
"@uibot/data",
|
|
486
|
+
"@uibot/feedback",
|
|
487
|
+
"@uibot/form",
|
|
488
|
+
"@uibot/layout",
|
|
489
|
+
"@uibot/primitives",
|
|
490
|
+
"@uibot/record-master-detail"
|
|
491
|
+
]
|
|
492
|
+
},
|
|
405
493
|
{
|
|
406
494
|
"name": "auth",
|
|
407
495
|
"type": "registry:block",
|
|
@@ -455,6 +543,18 @@
|
|
|
455
543
|
"@uibot/nav"
|
|
456
544
|
]
|
|
457
545
|
},
|
|
546
|
+
{
|
|
547
|
+
"name": "auth-minimal",
|
|
548
|
+
"type": "registry:block",
|
|
549
|
+
"description": "Minimal card sign in: shared Admin forms, native validation and host-owned authentication.",
|
|
550
|
+
"registryDependencies": [
|
|
551
|
+
"@uibot/data",
|
|
552
|
+
"@uibot/feedback",
|
|
553
|
+
"@uibot/field",
|
|
554
|
+
"@uibot/form",
|
|
555
|
+
"@uibot/layout"
|
|
556
|
+
]
|
|
557
|
+
},
|
|
458
558
|
{
|
|
459
559
|
"name": "auth-registration",
|
|
460
560
|
"type": "registry:block",
|
|
@@ -481,6 +581,78 @@
|
|
|
481
581
|
"@uibot/nav"
|
|
482
582
|
]
|
|
483
583
|
},
|
|
584
|
+
{
|
|
585
|
+
"name": "onboarding-wizard",
|
|
586
|
+
"type": "registry:block",
|
|
587
|
+
"description": "Multi-step interactive workspace onboarding wizard covering profile setup, starter workflow selection, and team invitations.",
|
|
588
|
+
"registryDependencies": [
|
|
589
|
+
"@uibot/data",
|
|
590
|
+
"@uibot/feedback",
|
|
591
|
+
"@uibot/form",
|
|
592
|
+
"@uibot/layout",
|
|
593
|
+
"@uibot/primitives"
|
|
594
|
+
]
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"name": "onboarding-checklist",
|
|
598
|
+
"type": "registry:block",
|
|
599
|
+
"description": "Single-screen activation checklist paired with workspace quick settings, hot-swappable with onboarding-wizard.",
|
|
600
|
+
"registryDependencies": [
|
|
601
|
+
"@uibot/data",
|
|
602
|
+
"@uibot/feedback",
|
|
603
|
+
"@uibot/form",
|
|
604
|
+
"@uibot/layout",
|
|
605
|
+
"@uibot/primitives"
|
|
606
|
+
]
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"name": "data-crud-table",
|
|
610
|
+
"type": "registry:block",
|
|
611
|
+
"description": "High-density searchable CRUD data table bound to a uibot.data.v1 Collection.",
|
|
612
|
+
"registryDependencies": [
|
|
613
|
+
"@uibot/data-table",
|
|
614
|
+
"@uibot/feedback",
|
|
615
|
+
"@uibot/form",
|
|
616
|
+
"@uibot/layout",
|
|
617
|
+
"@uibot/primitives"
|
|
618
|
+
]
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"name": "data-crud-kanban",
|
|
622
|
+
"type": "registry:block",
|
|
623
|
+
"description": "Status-lane kanban board with drag/button transitions and CRUD forms.",
|
|
624
|
+
"registryDependencies": [
|
|
625
|
+
"@uibot/collection-kanban",
|
|
626
|
+
"@uibot/feedback",
|
|
627
|
+
"@uibot/form",
|
|
628
|
+
"@uibot/layout",
|
|
629
|
+
"@uibot/primitives"
|
|
630
|
+
]
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"name": "data-crud-gallery",
|
|
634
|
+
"type": "registry:block",
|
|
635
|
+
"description": "Responsive card gallery over the same Collection filter, selection and CRUD state.",
|
|
636
|
+
"registryDependencies": [
|
|
637
|
+
"@uibot/feedback",
|
|
638
|
+
"@uibot/form",
|
|
639
|
+
"@uibot/item-grid",
|
|
640
|
+
"@uibot/layout",
|
|
641
|
+
"@uibot/primitives"
|
|
642
|
+
]
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"name": "data-crud-master-detail",
|
|
646
|
+
"type": "registry:block",
|
|
647
|
+
"description": "Split selectable list paired with an inline detail inspector and CRUD editor.",
|
|
648
|
+
"registryDependencies": [
|
|
649
|
+
"@uibot/feedback",
|
|
650
|
+
"@uibot/form",
|
|
651
|
+
"@uibot/layout",
|
|
652
|
+
"@uibot/primitives",
|
|
653
|
+
"@uibot/record-master-detail"
|
|
654
|
+
]
|
|
655
|
+
},
|
|
484
656
|
{
|
|
485
657
|
"name": "admin-overview",
|
|
486
658
|
"type": "registry:block",
|
|
@@ -733,6 +905,36 @@
|
|
|
733
905
|
"@uibot/nav"
|
|
734
906
|
]
|
|
735
907
|
},
|
|
908
|
+
{
|
|
909
|
+
"name": "dashboard-01",
|
|
910
|
+
"type": "registry:block",
|
|
911
|
+
"description": "An inset dashboard with four metrics, date-range visitor trends and an editable document outline, adapted from shadcn/ui dashboard-01.",
|
|
912
|
+
"registryDependencies": [
|
|
913
|
+
"@uibot/charts",
|
|
914
|
+
"@uibot/data",
|
|
915
|
+
"@uibot/data-table",
|
|
916
|
+
"@uibot/feedback",
|
|
917
|
+
"@uibot/form",
|
|
918
|
+
"@uibot/layout",
|
|
919
|
+
"@uibot/nav",
|
|
920
|
+
"@uibot/primitives"
|
|
921
|
+
]
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"name": "launch-site",
|
|
925
|
+
"type": "registry:block",
|
|
926
|
+
"description": "Responsive product launch landing page assembled from all six swappable L2 conversion section families (hero, bento-features, pricing, testimonials, faq-accordion, cta-banner).",
|
|
927
|
+
"registryDependencies": [
|
|
928
|
+
"@uibot/content",
|
|
929
|
+
"@uibot/data",
|
|
930
|
+
"@uibot/data-studio",
|
|
931
|
+
"@uibot/layout",
|
|
932
|
+
"@uibot/marketing",
|
|
933
|
+
"@uibot/nav",
|
|
934
|
+
"@uibot/presentation",
|
|
935
|
+
"@uibot/sections"
|
|
936
|
+
]
|
|
937
|
+
},
|
|
736
938
|
{
|
|
737
939
|
"name": "shadcn-admin",
|
|
738
940
|
"type": "registry:block",
|
|
@@ -1353,8 +1555,8 @@
|
|
|
1353
1555
|
"registryDependencies": [],
|
|
1354
1556
|
"dependencies": [
|
|
1355
1557
|
"react@19.3.0",
|
|
1356
|
-
"@uibot/contracts@0.
|
|
1357
|
-
"@uibot/creation-kit@0.
|
|
1558
|
+
"@uibot/contracts@0.22.0",
|
|
1559
|
+
"@uibot/creation-kit@0.22.0"
|
|
1358
1560
|
]
|
|
1359
1561
|
},
|
|
1360
1562
|
{
|
|
@@ -1369,8 +1571,8 @@
|
|
|
1369
1571
|
],
|
|
1370
1572
|
"dependencies": [
|
|
1371
1573
|
"react@19.3.0",
|
|
1372
|
-
"@uibot/contracts@0.
|
|
1373
|
-
"@uibot/creation-kit@0.
|
|
1574
|
+
"@uibot/contracts@0.22.0",
|
|
1575
|
+
"@uibot/creation-kit@0.22.0"
|
|
1374
1576
|
]
|
|
1375
1577
|
},
|
|
1376
1578
|
{
|
|
@@ -1385,8 +1587,8 @@
|
|
|
1385
1587
|
],
|
|
1386
1588
|
"dependencies": [
|
|
1387
1589
|
"react@19.3.0",
|
|
1388
|
-
"@uibot/contracts@0.
|
|
1389
|
-
"@uibot/creation-kit@0.
|
|
1590
|
+
"@uibot/contracts@0.22.0",
|
|
1591
|
+
"@uibot/creation-kit@0.22.0"
|
|
1390
1592
|
]
|
|
1391
1593
|
},
|
|
1392
1594
|
{
|
|
@@ -1399,8 +1601,8 @@
|
|
|
1399
1601
|
],
|
|
1400
1602
|
"dependencies": [
|
|
1401
1603
|
"react@19.3.0",
|
|
1402
|
-
"@uibot/contracts@0.
|
|
1403
|
-
"@uibot/creation-kit@0.
|
|
1604
|
+
"@uibot/contracts@0.22.0",
|
|
1605
|
+
"@uibot/creation-kit@0.22.0"
|
|
1404
1606
|
]
|
|
1405
1607
|
},
|
|
1406
1608
|
{
|
|
@@ -1416,9 +1618,9 @@
|
|
|
1416
1618
|
],
|
|
1417
1619
|
"dependencies": [
|
|
1418
1620
|
"react@19.3.0",
|
|
1419
|
-
"@uibot/contracts@0.
|
|
1420
|
-
"@uibot/creation-kit@0.
|
|
1421
|
-
"@uibot/web-preview@0.
|
|
1621
|
+
"@uibot/contracts@0.22.0",
|
|
1622
|
+
"@uibot/creation-kit@0.22.0",
|
|
1623
|
+
"@uibot/web-preview@0.22.0"
|
|
1422
1624
|
]
|
|
1423
1625
|
},
|
|
1424
1626
|
{
|
|
@@ -1438,9 +1640,9 @@
|
|
|
1438
1640
|
],
|
|
1439
1641
|
"dependencies": [
|
|
1440
1642
|
"react@19.3.0",
|
|
1441
|
-
"@uibot/contracts@0.
|
|
1442
|
-
"@uibot/creation-kit@0.
|
|
1443
|
-
"@uibot/web-preview@0.
|
|
1643
|
+
"@uibot/contracts@0.22.0",
|
|
1644
|
+
"@uibot/creation-kit@0.22.0",
|
|
1645
|
+
"@uibot/web-preview@0.22.0"
|
|
1444
1646
|
]
|
|
1445
1647
|
},
|
|
1446
1648
|
{
|
|
@@ -1450,7 +1652,7 @@
|
|
|
1450
1652
|
"registryDependencies": [],
|
|
1451
1653
|
"dependencies": [
|
|
1452
1654
|
"react@19.3.0",
|
|
1453
|
-
"@uibot/renderer-react@0.
|
|
1655
|
+
"@uibot/renderer-react@0.22.0"
|
|
1454
1656
|
]
|
|
1455
1657
|
},
|
|
1456
1658
|
{
|
|
@@ -1468,7 +1670,7 @@
|
|
|
1468
1670
|
],
|
|
1469
1671
|
"dependencies": [
|
|
1470
1672
|
"react@19.3.0",
|
|
1471
|
-
"@uibot/renderer-react@0.
|
|
1673
|
+
"@uibot/renderer-react@0.22.0",
|
|
1472
1674
|
"cmdk@1.1.1",
|
|
1473
1675
|
"date-fns@4.4.0",
|
|
1474
1676
|
"lucide-react@1.56.0",
|
|
@@ -1485,7 +1687,7 @@
|
|
|
1485
1687
|
],
|
|
1486
1688
|
"dependencies": [
|
|
1487
1689
|
"react@19.3.0",
|
|
1488
|
-
"@uibot/renderer-react@0.
|
|
1690
|
+
"@uibot/renderer-react@0.22.0"
|
|
1489
1691
|
]
|
|
1490
1692
|
},
|
|
1491
1693
|
{
|
|
@@ -1499,7 +1701,7 @@
|
|
|
1499
1701
|
],
|
|
1500
1702
|
"dependencies": [
|
|
1501
1703
|
"react@19.3.0",
|
|
1502
|
-
"@uibot/renderer-react@0.
|
|
1704
|
+
"@uibot/renderer-react@0.22.0"
|
|
1503
1705
|
]
|
|
1504
1706
|
},
|
|
1505
1707
|
{
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
import { type PageFrameSolution, type UIBotSpec } from "@uibot/contracts";
|
|
1
|
+
import { type PageFrameSolution, type UIBotSpec, type VariantUnmappedWarning } from "@uibot/contracts";
|
|
2
|
+
export interface ReplaceSolutionPageFramesOptions {
|
|
3
|
+
/** Reject customized outer frames instead of emitting unmappedWarnings. Default false. */
|
|
4
|
+
strictBaseline?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface ReplaceSolutionPageFramesResult {
|
|
7
|
+
spec: UIBotSpec;
|
|
8
|
+
unmappedWarnings: VariantUnmappedWarning[];
|
|
9
|
+
}
|
|
10
|
+
/** Pure, whole-group replacement with baseline diff warnings instead of hard lock-out. */
|
|
11
|
+
export declare function replaceSolutionPageFramesWithWarnings(target: UIBotSpec, source: PageFrameSolution, mapping: Record<string, string>, options?: ReplaceSolutionPageFramesOptions): ReplaceSolutionPageFramesResult;
|
|
2
12
|
/** Pure, whole-group replacement. Business content stays in its explicit slot. */
|
|
3
|
-
export declare function replaceSolutionPageFrames(target: UIBotSpec, source: PageFrameSolution, mapping: Record<string, string
|
|
13
|
+
export declare function replaceSolutionPageFrames(target: UIBotSpec, source: PageFrameSolution, mapping: Record<string, string>, options?: ReplaceSolutionPageFramesOptions): UIBotSpec;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type AppBlueprint, type PageSolutionDefinition, type ComposeBlueprintResult, type UIBotVariantContract } from "@uibot/contracts";
|
|
2
|
+
import { type VariantRegistry } from "./variant-swap.js";
|
|
3
|
+
export interface ComposeBlueprintContext {
|
|
4
|
+
solutions?: readonly PageSolutionDefinition[];
|
|
5
|
+
variantRegistry?: readonly UIBotVariantContract[] | VariantRegistry;
|
|
6
|
+
shellFamilyId?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Deterministically composes a strictly valid multi-page `UIBotSpec` v2.0 from a compact `AppBlueprint`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function composeSpecFromBlueprint(blueprint: AppBlueprint, context?: ComposeBlueprintContext): ComposeBlueprintResult;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ApplySpecPatchOptions, type ApplySpecPatchResult, type SpecPatchOp, type UIBotSpec, type UIBotVariantContract } from "@uibot/contracts";
|
|
2
|
+
import { type VariantRegistry } from "./variant-swap.js";
|
|
3
|
+
export interface ApplySpecPatchRegistryOptions extends ApplySpecPatchOptions {
|
|
4
|
+
variantRegistry?: readonly UIBotVariantContract[] | VariantRegistry;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Atomically executes a batch of deterministic `SpecPatchOp[]` operations on a cloned Spec.
|
|
8
|
+
* Untouched pages retain exact AST structure and field ordering; any error leaves input untouched.
|
|
9
|
+
*/
|
|
10
|
+
export declare function applySpecPatch(spec: UIBotSpec, operations: readonly SpecPatchOp[], options?: ApplySpecPatchRegistryOptions): ApplySpecPatchResult;
|