@uibot/registry 0.20.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/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 +4 -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 +1 -1
- 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/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 +13 -13
- 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 +1 -1
- 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/document-workspace.json +1 -1
- package/dist/shadcn/r/education-workspace.json +1 -1
- package/dist/shadcn/r/launch-site.json +72 -0
- package/dist/shadcn/r/layout.json +34 -18
- 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/workspace.json +1 -1
- package/dist/shadcn/registry.json +194 -20
- 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
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{
|
|
15
15
|
"path": "components/uibot/workspace.tsx",
|
|
16
16
|
"target": "components/uibot/workspace.tsx",
|
|
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 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",
|
|
18
18
|
"type": "registry:ui"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -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",
|
|
@@ -367,6 +389,32 @@
|
|
|
367
389
|
"@uibot/chat-workspace"
|
|
368
390
|
]
|
|
369
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
|
+
},
|
|
370
418
|
{
|
|
371
419
|
"name": "document-writing",
|
|
372
420
|
"type": "registry:block",
|
|
@@ -415,6 +463,33 @@
|
|
|
415
463
|
"@uibot/primitives"
|
|
416
464
|
]
|
|
417
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
|
+
},
|
|
418
493
|
{
|
|
419
494
|
"name": "auth",
|
|
420
495
|
"type": "registry:block",
|
|
@@ -468,6 +543,18 @@
|
|
|
468
543
|
"@uibot/nav"
|
|
469
544
|
]
|
|
470
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
|
+
},
|
|
471
558
|
{
|
|
472
559
|
"name": "auth-registration",
|
|
473
560
|
"type": "registry:block",
|
|
@@ -494,6 +581,78 @@
|
|
|
494
581
|
"@uibot/nav"
|
|
495
582
|
]
|
|
496
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
|
+
},
|
|
497
656
|
{
|
|
498
657
|
"name": "admin-overview",
|
|
499
658
|
"type": "registry:block",
|
|
@@ -761,6 +920,21 @@
|
|
|
761
920
|
"@uibot/primitives"
|
|
762
921
|
]
|
|
763
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
|
+
},
|
|
764
938
|
{
|
|
765
939
|
"name": "shadcn-admin",
|
|
766
940
|
"type": "registry:block",
|
|
@@ -1381,8 +1555,8 @@
|
|
|
1381
1555
|
"registryDependencies": [],
|
|
1382
1556
|
"dependencies": [
|
|
1383
1557
|
"react@19.3.0",
|
|
1384
|
-
"@uibot/contracts@0.
|
|
1385
|
-
"@uibot/creation-kit@0.
|
|
1558
|
+
"@uibot/contracts@0.22.0",
|
|
1559
|
+
"@uibot/creation-kit@0.22.0"
|
|
1386
1560
|
]
|
|
1387
1561
|
},
|
|
1388
1562
|
{
|
|
@@ -1397,8 +1571,8 @@
|
|
|
1397
1571
|
],
|
|
1398
1572
|
"dependencies": [
|
|
1399
1573
|
"react@19.3.0",
|
|
1400
|
-
"@uibot/contracts@0.
|
|
1401
|
-
"@uibot/creation-kit@0.
|
|
1574
|
+
"@uibot/contracts@0.22.0",
|
|
1575
|
+
"@uibot/creation-kit@0.22.0"
|
|
1402
1576
|
]
|
|
1403
1577
|
},
|
|
1404
1578
|
{
|
|
@@ -1413,8 +1587,8 @@
|
|
|
1413
1587
|
],
|
|
1414
1588
|
"dependencies": [
|
|
1415
1589
|
"react@19.3.0",
|
|
1416
|
-
"@uibot/contracts@0.
|
|
1417
|
-
"@uibot/creation-kit@0.
|
|
1590
|
+
"@uibot/contracts@0.22.0",
|
|
1591
|
+
"@uibot/creation-kit@0.22.0"
|
|
1418
1592
|
]
|
|
1419
1593
|
},
|
|
1420
1594
|
{
|
|
@@ -1427,8 +1601,8 @@
|
|
|
1427
1601
|
],
|
|
1428
1602
|
"dependencies": [
|
|
1429
1603
|
"react@19.3.0",
|
|
1430
|
-
"@uibot/contracts@0.
|
|
1431
|
-
"@uibot/creation-kit@0.
|
|
1604
|
+
"@uibot/contracts@0.22.0",
|
|
1605
|
+
"@uibot/creation-kit@0.22.0"
|
|
1432
1606
|
]
|
|
1433
1607
|
},
|
|
1434
1608
|
{
|
|
@@ -1444,9 +1618,9 @@
|
|
|
1444
1618
|
],
|
|
1445
1619
|
"dependencies": [
|
|
1446
1620
|
"react@19.3.0",
|
|
1447
|
-
"@uibot/contracts@0.
|
|
1448
|
-
"@uibot/creation-kit@0.
|
|
1449
|
-
"@uibot/web-preview@0.
|
|
1621
|
+
"@uibot/contracts@0.22.0",
|
|
1622
|
+
"@uibot/creation-kit@0.22.0",
|
|
1623
|
+
"@uibot/web-preview@0.22.0"
|
|
1450
1624
|
]
|
|
1451
1625
|
},
|
|
1452
1626
|
{
|
|
@@ -1466,9 +1640,9 @@
|
|
|
1466
1640
|
],
|
|
1467
1641
|
"dependencies": [
|
|
1468
1642
|
"react@19.3.0",
|
|
1469
|
-
"@uibot/contracts@0.
|
|
1470
|
-
"@uibot/creation-kit@0.
|
|
1471
|
-
"@uibot/web-preview@0.
|
|
1643
|
+
"@uibot/contracts@0.22.0",
|
|
1644
|
+
"@uibot/creation-kit@0.22.0",
|
|
1645
|
+
"@uibot/web-preview@0.22.0"
|
|
1472
1646
|
]
|
|
1473
1647
|
},
|
|
1474
1648
|
{
|
|
@@ -1478,7 +1652,7 @@
|
|
|
1478
1652
|
"registryDependencies": [],
|
|
1479
1653
|
"dependencies": [
|
|
1480
1654
|
"react@19.3.0",
|
|
1481
|
-
"@uibot/renderer-react@0.
|
|
1655
|
+
"@uibot/renderer-react@0.22.0"
|
|
1482
1656
|
]
|
|
1483
1657
|
},
|
|
1484
1658
|
{
|
|
@@ -1496,7 +1670,7 @@
|
|
|
1496
1670
|
],
|
|
1497
1671
|
"dependencies": [
|
|
1498
1672
|
"react@19.3.0",
|
|
1499
|
-
"@uibot/renderer-react@0.
|
|
1673
|
+
"@uibot/renderer-react@0.22.0",
|
|
1500
1674
|
"cmdk@1.1.1",
|
|
1501
1675
|
"date-fns@4.4.0",
|
|
1502
1676
|
"lucide-react@1.56.0",
|
|
@@ -1513,7 +1687,7 @@
|
|
|
1513
1687
|
],
|
|
1514
1688
|
"dependencies": [
|
|
1515
1689
|
"react@19.3.0",
|
|
1516
|
-
"@uibot/renderer-react@0.
|
|
1690
|
+
"@uibot/renderer-react@0.22.0"
|
|
1517
1691
|
]
|
|
1518
1692
|
},
|
|
1519
1693
|
{
|
|
@@ -1527,7 +1701,7 @@
|
|
|
1527
1701
|
],
|
|
1528
1702
|
"dependencies": [
|
|
1529
1703
|
"react@19.3.0",
|
|
1530
|
-
"@uibot/renderer-react@0.
|
|
1704
|
+
"@uibot/renderer-react@0.22.0"
|
|
1531
1705
|
]
|
|
1532
1706
|
},
|
|
1533
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;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type CatalogEntry, type SwapVariantInput, type SwapVariantResult, type UIBotVariantContract, type VariantLevel, type VariantTargetKind } from "@uibot/contracts";
|
|
2
|
+
export interface VariantListFilter {
|
|
3
|
+
familyId?: string;
|
|
4
|
+
resourceId?: string;
|
|
5
|
+
level?: VariantLevel;
|
|
6
|
+
targetKind?: VariantTargetKind;
|
|
7
|
+
query?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface VariantRegistry {
|
|
10
|
+
register(contract: UIBotVariantContract): void;
|
|
11
|
+
get(familyId: string): UIBotVariantContract | undefined;
|
|
12
|
+
list(filter?: VariantListFilter): UIBotVariantContract[];
|
|
13
|
+
}
|
|
14
|
+
/** Browser-safe synchronous SHA-256 digest used for portable provenance hashes. */
|
|
15
|
+
export declare function sha256Hex(input: string): string;
|
|
16
|
+
export declare function summarizeVariantValue(value: unknown, maxLength?: number): string;
|
|
17
|
+
export declare function createVariantRegistry(families?: readonly UIBotVariantContract[]): VariantRegistry;
|
|
18
|
+
export declare function listVariantFamilies(source: readonly UIBotVariantContract[] | VariantRegistry, filter?: VariantListFilter): UIBotVariantContract[];
|
|
19
|
+
/** Derives L1 block-level UIBotVariantContracts from Catalog entries declaring `replacement`. */
|
|
20
|
+
export declare function deriveComponentVariantFamilies(components: Record<string, CatalogEntry>): UIBotVariantContract[];
|
|
21
|
+
/** Projects semantic bindings and customizations across same-family L1-L4 variants. */
|
|
22
|
+
export declare function swapVariant(familiesOrRegistry: readonly UIBotVariantContract[] | VariantRegistry, input: SwapVariantInput): SwapVariantResult;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uibot/registry",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@uibot/contracts": "^0.
|
|
34
|
+
"@uibot/contracts": "^0.22.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "rm -rf dist tsconfig.tsbuildinfo && bun build --minify ./src/index.ts ./src/resources.ts --outdir ./dist --format esm --target bun && bun x tsc -b",
|