@uibot/registry 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/index.js +9 -9
  2. package/dist/shadcn/r/admin-dashboard.json +70 -0
  3. package/dist/shadcn/r/admin-shell.json +148 -0
  4. package/dist/shadcn/r/ai-chat.json +74 -0
  5. package/dist/shadcn/r/analytics-dashboard.json +65 -0
  6. package/dist/shadcn/r/app-shell-floating.json +54 -0
  7. package/dist/shadcn/r/app-shell-icon-rail.json +54 -0
  8. package/dist/shadcn/r/app-shell-inset.json +54 -0
  9. package/dist/shadcn/r/app-shell-settings.json +54 -0
  10. package/dist/shadcn/r/app-shell-sidebar.json +54 -0
  11. package/dist/shadcn/r/app-shell-workspace.json +54 -0
  12. package/dist/shadcn/r/auth.json +61 -0
  13. package/dist/shadcn/r/blog.json +64 -0
  14. package/dist/shadcn/r/charts.json +211 -0
  15. package/dist/shadcn/r/content.json +444 -0
  16. package/dist/shadcn/r/creation-html-generation.json +29 -0
  17. package/dist/shadcn/r/creation-reference-generation.json +29 -0
  18. package/dist/shadcn/r/creation-revision-export.json +27 -0
  19. package/dist/shadcn/r/creation-shared.json +24 -0
  20. package/dist/shadcn/r/creation-workspace.json +33 -0
  21. package/dist/shadcn/r/crm.json +67 -0
  22. package/dist/shadcn/r/dashboard.json +147 -0
  23. package/dist/shadcn/r/data-studio.json +368 -0
  24. package/dist/shadcn/r/data-table.json +224 -0
  25. package/dist/shadcn/r/data.json +320 -0
  26. package/dist/shadcn/r/ecommerce.json +65 -0
  27. package/dist/shadcn/r/feedback.json +300 -0
  28. package/dist/shadcn/r/field.json +164 -0
  29. package/dist/shadcn/r/form.json +425 -0
  30. package/dist/shadcn/r/grid.json +188 -0
  31. package/dist/shadcn/r/interactive.json +355 -0
  32. package/dist/shadcn/r/kanban.json +154 -0
  33. package/dist/shadcn/r/layout.json +529 -0
  34. package/dist/shadcn/r/lms.json +74 -0
  35. package/dist/shadcn/r/marketing.json +402 -0
  36. package/dist/shadcn/r/nav.json +257 -0
  37. package/dist/shadcn/r/portfolio.json +62 -0
  38. package/dist/shadcn/r/presentation.json +454 -0
  39. package/dist/shadcn/r/pricing.json +63 -0
  40. package/dist/shadcn/r/primitives.json +360 -0
  41. package/dist/shadcn/r/saas-landing.json +60 -0
  42. package/dist/shadcn/r/sections.json +734 -0
  43. package/dist/shadcn/r/settings.json +72 -0
  44. package/dist/shadcn/r/shadcn-admin-shell.json +49 -0
  45. package/dist/shadcn/r/shadcn-admin.json +76 -0
  46. package/dist/shadcn/r/store.json +75 -0
  47. package/dist/shadcn/r/support-inbox.json +63 -0
  48. package/dist/shadcn/r/team-directory.json +59 -0
  49. package/dist/shadcn/r/uibot-base.json +30 -0
  50. package/dist/shadcn/r/uibot-theme.json +86 -0
  51. package/dist/shadcn/r/workspace.json +174 -0
  52. package/dist/shadcn/registry.json +615 -0
  53. package/dist/shadcn.d.ts +10 -5
  54. package/package.json +2 -2
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "creation-revision-export",
4
+ "type": "registry:block",
5
+ "description": "Download a saved HTML revision (PPTX for presentations) once no model request is open; the host supplies the export transport.",
6
+ "dependencies": [
7
+ "react",
8
+ "@uibot/contracts@^0.7.0",
9
+ "@uibot/creation-kit@^0.7.0"
10
+ ],
11
+ "registryDependencies": [
12
+ "button",
13
+ "@uibot/creation-shared"
14
+ ],
15
+ "files": [
16
+ {
17
+ "path": "components/uibot/creation/creation-revision-export.tsx",
18
+ "target": "components/uibot/creation/creation-revision-export.tsx",
19
+ "content": "import { Button } from \"@/components/ui/button\";\nimport type { CreationArtifact, CreationProject, CreationRevision } from \"@uibot/contracts\";\nimport {\n CREATION_RUN_CHANGED_EVENT,\n type CreationClient,\n type CreationLocale,\n} from \"@uibot/creation-kit\";\nimport { useEffect, useLayoutEffect, useRef, useState } from \"react\";\n\nimport { creationBlockMessages, HTML_DOCUMENT_KINDS, hasUnresolvedRun } from \"./creation-shared\";\n\nexport type CreationExportFormat = \"html\" | \"pptx\";\n\nexport interface CreationRevisionExportInput {\n projectId: string;\n artifactId: string;\n revisionId: string;\n format: CreationExportFormat;\n}\n\nexport interface CreationRevisionExportProps {\n client: Pick<CreationClient, \"getProject\">;\n /** Host transport that renders a saved revision server-side. */\n exportRevision: (input: CreationRevisionExportInput) => Promise<Blob>;\n project: CreationProject;\n artifact: CreationArtifact;\n revision: CreationRevision;\n /** The generation reservation key; export waits while a reservation exists. */\n storageKey?: string;\n /** Changes when the signed-in session changes; stale results are dropped. */\n sessionIdentity: string;\n isSessionCurrent?: () => boolean;\n onProject?: (project: CreationProject) => void;\n dirty: boolean;\n locale?: CreationLocale;\n}\n\nfunction hasPendingRequest(key: string | undefined): boolean {\n if (!key) return false;\n try {\n return window.localStorage.getItem(key) !== null;\n } catch {\n // Unreadable storage cannot prove there is no reservation.\n return true;\n }\n}\n\nfunction safeFilename(title: string, revision: number, format: CreationExportFormat): string {\n const safeTitle = title\n .normalize(\"NFKC\")\n .replace(/[^\\p{L}\\p{N}._-]+/gu, \"-\")\n .replace(/^[.-]+|[.-]+$/g, \"\")\n .slice(0, 80);\n return `${safeTitle || \"creation\"}-revision-${revision}.${format}`;\n}\n\n/** Download a saved HTML revision (and PPTX for presentations) once no model request is open. */\nexport function CreationRevisionExport({\n client,\n exportRevision,\n project,\n artifact,\n revision,\n storageKey,\n sessionIdentity,\n isSessionCurrent = () => true,\n onProject = () => {},\n dirty,\n locale,\n}: CreationRevisionExportProps) {\n const t = creationBlockMessages(locale);\n const [busy, setBusy] = useState(false);\n const [refreshing, setRefreshing] = useState(false);\n const [error, setError] = useState(\"\");\n const [pendingRequest, setPendingRequest] = useState(() => hasPendingRequest(storageKey));\n const operation = useRef(0);\n const busyRef = useRef(false);\n const refreshBusyRef = useRef(false);\n const mounted = useRef(false);\n const urls = useRef(new Set<string>());\n const timers = useRef(new Set<ReturnType<typeof setTimeout>>());\n const serverBlocked = hasUnresolvedRun(project);\n const blocked = serverBlocked || pendingRequest;\n const identity = JSON.stringify([sessionIdentity, project.id, artifact.id, revision.id]);\n const scope = JSON.stringify([identity, dirty, blocked]);\n const current = useRef({ scope, identity, dirty, blocked });\n const previousScope = useRef(scope);\n current.current = { scope, identity, dirty, blocked };\n\n // A new selection, draft state or block invalidates any in-flight operation.\n useLayoutEffect(() => {\n if (previousScope.current === scope) return;\n previousScope.current = scope;\n operation.current += 1;\n busyRef.current = false;\n refreshBusyRef.current = false;\n setBusy(false);\n setRefreshing(false);\n }, [scope]);\n\n useLayoutEffect(() => {\n setPendingRequest(hasPendingRequest(storageKey));\n }, [storageKey]);\n\n useEffect(() => {\n const refresh = () => setPendingRequest(hasPendingRequest(storageKey));\n window.addEventListener(CREATION_RUN_CHANGED_EVENT, refresh);\n window.addEventListener(\"storage\", refresh);\n return () => {\n window.removeEventListener(CREATION_RUN_CHANGED_EVENT, refresh);\n window.removeEventListener(\"storage\", refresh);\n };\n }, [storageKey]);\n\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n operation.current += 1;\n for (const timer of timers.current) clearTimeout(timer);\n timers.current.clear();\n for (const url of urls.current) URL.revokeObjectURL(url);\n urls.current.clear();\n };\n }, []);\n\n async function download(format: CreationExportFormat) {\n const reservationExists = hasPendingRequest(storageKey);\n if (reservationExists) setPendingRequest(true);\n if (\n busyRef.current ||\n dirty ||\n serverBlocked ||\n reservationExists ||\n revision.source.format !== \"html\" ||\n !HTML_DOCUMENT_KINDS.includes(artifact.kind) ||\n (format === \"pptx\" && artifact.kind !== \"presentation\")\n )\n return;\n const selectedIdentity = identity;\n const request = ++operation.current;\n const sessionWasCurrent = isSessionCurrent();\n const selectionIsCurrent = () =>\n mounted.current &&\n sessionWasCurrent &&\n isSessionCurrent() &&\n operation.current === request &&\n current.current.identity === selectedIdentity &&\n !current.current.dirty &&\n !current.current.blocked &&\n !hasPendingRequest(storageKey);\n setBusy(true);\n busyRef.current = true;\n setError(\"\");\n try {\n const blob = await exportRevision({\n projectId: project.id,\n artifactId: artifact.id,\n revisionId: revision.id,\n format,\n });\n if (!selectionIsCurrent()) return;\n const url = URL.createObjectURL(blob);\n urls.current.add(url);\n const anchor = document.createElement(\"a\");\n anchor.href = url;\n anchor.download = safeFilename(artifact.title, revision.number, format);\n anchor.style.display = \"none\";\n document.body.append(anchor);\n try {\n anchor.click();\n } finally {\n anchor.remove();\n }\n const timer = setTimeout(() => {\n URL.revokeObjectURL(url);\n urls.current.delete(url);\n timers.current.delete(timer);\n }, 0);\n timers.current.add(timer);\n } catch {\n if (selectionIsCurrent()) setError(t.exportFailed);\n } finally {\n if (mounted.current && operation.current === request) {\n busyRef.current = false;\n setBusy(false);\n }\n }\n }\n\n async function refreshProject() {\n if (dirty || !serverBlocked || refreshBusyRef.current) return;\n refreshBusyRef.current = true;\n const selectedIdentity = identity;\n const request = ++operation.current;\n const sessionWasCurrent = isSessionCurrent();\n const isCurrent = () =>\n mounted.current &&\n sessionWasCurrent &&\n isSessionCurrent() &&\n operation.current === request &&\n current.current.identity === selectedIdentity &&\n !current.current.dirty;\n setRefreshing(true);\n setError(\"\");\n try {\n const updated = await client.getProject(project.id);\n if (!isCurrent()) return;\n refreshBusyRef.current = false;\n setRefreshing(false);\n onProject(updated);\n } catch {\n if (isCurrent()) setError(t.refreshFailed);\n } finally {\n if (mounted.current && operation.current === request) {\n refreshBusyRef.current = false;\n setRefreshing(false);\n }\n }\n }\n\n if (revision.source.format !== \"html\" || !HTML_DOCUMENT_KINDS.includes(artifact.kind))\n return null;\n const disabled = dirty || blocked || busy;\n return (\n <section aria-label={t.exportTitle} className=\"flex flex-col gap-2\">\n <div className=\"flex flex-wrap gap-2\">\n <Button\n type=\"button\"\n variant=\"outline\"\n disabled={disabled}\n onClick={() => void download(\"html\")}\n >\n {busy ? t.exporting : t.exportHtml(revision.number)}\n </Button>\n {artifact.kind === \"presentation\" && (\n <Button\n type=\"button\"\n variant=\"outline\"\n disabled={disabled}\n onClick={() => void download(\"pptx\")}\n >\n {busy ? t.exporting : t.exportPptx(revision.number)}\n </Button>\n )}\n </div>\n {dirty && <p className=\"text-sm text-muted-foreground\">{t.saveBeforeExport}</p>}\n {blocked && <p className=\"text-sm text-muted-foreground\">{t.exportBlocked}</p>}\n {serverBlocked && (\n <Button\n type=\"button\"\n variant=\"outline\"\n disabled={refreshing || dirty}\n onClick={() => void refreshProject()}\n >\n {refreshing ? t.refreshingStatus : t.refreshStatus}\n </Button>\n )}\n {error && (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {error}\n </p>\n )}\n </section>\n );\n}\n",
20
+ "type": "registry:component"
21
+ }
22
+ ],
23
+ "meta": {
24
+ "composite": true,
25
+ "channel": "public"
26
+ }
27
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "creation-shared",
4
+ "type": "registry:lib",
5
+ "description": "Copy (zh/en), domain filters and run checks shared by the UIBot creation blocks.",
6
+ "dependencies": [
7
+ "react",
8
+ "@uibot/contracts@^0.7.0",
9
+ "@uibot/creation-kit@^0.7.0"
10
+ ],
11
+ "registryDependencies": [],
12
+ "files": [
13
+ {
14
+ "path": "components/uibot/creation/creation-shared.ts",
15
+ "target": "components/uibot/creation/creation-shared.ts",
16
+ "content": "import type { CreationDomain, CreationProject } from \"@uibot/contracts\";\nimport { type CreationLocale, unresolvedCreationRuns } from \"@uibot/creation-kit\";\n\n/** What the generation blocks need from the creation configuration endpoint. */\nexport interface CreationGenerationCapabilities {\n domains: CreationDomain[];\n generation?: { ready: boolean };\n}\n\nconst MESSAGES = {\n zh: {\n htmlTitle: \"HTML 生成\",\n generationUnavailable: \"当前模型生成不可用,仍可手工编辑 HTML。\",\n saveBeforeGenerate: \"请先保存或放弃草稿,再生成。\",\n kindLabel: \"生成类型\",\n kindPlaceholder: \"请选择可用类型\",\n intentLabel: \"生成描述\",\n generateNew: \"生成新 HTML 工件\",\n rewriteCurrent: \"重写当前 HTML 修订\",\n reconcile: \"核对生成状态\",\n referenceTitle: \"从已保存修订生成演示文稿\",\n presentationUnavailable: \"当前演示文稿生成不可用。\",\n saveBeforeReference: \"请先保存或放弃草稿,再引用已保存修订。\",\n referenceArtifactLabel: \"参考作品\",\n referenceArtifactPlaceholder: \"选择已保存 HTML 工件\",\n referenceRevisionLabel: \"参考修订\",\n referenceRevisionPlaceholder: \"明确选择已保存修订\",\n revisionOption: (number: number) => `修订 ${number}`,\n presentationIntentLabel: \"演示文稿描述\",\n generatePresentation: \"生成演示文稿\",\n exportTitle: \"导出已保存修订\",\n exporting: \"正在导出…\",\n exportHtml: (number: number) => `导出 HTML 修订 ${number}`,\n exportPptx: (number: number) => `导出 PPTX 修订 ${number}`,\n saveBeforeExport: \"请先保存或放弃草稿,再导出已保存修订。\",\n exportBlocked: \"原模型请求待核对期间不可导出。\",\n refreshingStatus: \"正在读取生成状态…\",\n refreshStatus: \"刷新生成状态\",\n exportFailed: \"导出失败,请稍后重试。\",\n refreshFailed: \"无法读取最新生成状态。\",\n workspaceLabel: \"作品工作区\",\n workspaceEyebrow: \"手工 HTML 工作区\",\n workspaceLoading: \"正在读取作品…\",\n workspaceLoadFailed: \"无法读取作品能力,请稍后重试。\",\n newProject: \"新建作品\",\n conflict: \"版本已更新。你的草稿仍保留;重新读取后再编辑。\",\n reread: \"重新读取\",\n projectTitleLabel: \"作品名称\",\n createProject: \"创建作品\",\n cancel: \"取消\",\n selectProjectLabel: \"选择作品\",\n artifactTitleLabel: \"工件标题\",\n artifactKindLabel: \"工件类型\",\n unavailableKindOption: (kind: string) => `${kind}(已不可用)`,\n refreshingCapabilities: \"正在刷新能力…\",\n refreshCapabilities: \"刷新工件能力\",\n appendArtifact: \"添加 HTML 工件\",\n kindUnavailable: (kind: string) => `所选工件类型“${kind}”已不可用,请重新选择或刷新能力。`,\n noHtmlDomains: \"当前没有启用的 HTML 工件类型\",\n htmlContentLabel: \"HTML 内容\",\n saveRevision: \"保存版本\",\n savedRevisionsLabel: \"已保存版本\",\n historyRevision: (number: number) => `历史版本 ${number}`,\n },\n en: {\n htmlTitle: \"HTML generation\",\n generationUnavailable: \"Model generation is unavailable; you can still edit HTML by hand.\",\n saveBeforeGenerate: \"Save or discard the draft before generating.\",\n kindLabel: \"Generation type\",\n kindPlaceholder: \"Choose an available type\",\n intentLabel: \"Generation brief\",\n generateNew: \"Generate new HTML artifact\",\n rewriteCurrent: \"Rewrite current HTML revision\",\n reconcile: \"Check generation status\",\n referenceTitle: \"Generate a presentation from a saved revision\",\n presentationUnavailable: \"Presentation generation is unavailable.\",\n saveBeforeReference: \"Save or discard the draft before referencing a saved revision.\",\n referenceArtifactLabel: \"Reference artifact\",\n referenceArtifactPlaceholder: \"Choose a saved HTML artifact\",\n referenceRevisionLabel: \"Reference revision\",\n referenceRevisionPlaceholder: \"Choose a saved revision\",\n revisionOption: (number: number) => `Revision ${number}`,\n presentationIntentLabel: \"Presentation brief\",\n generatePresentation: \"Generate presentation\",\n exportTitle: \"Export saved revision\",\n exporting: \"Exporting…\",\n exportHtml: (number: number) => `Export HTML revision ${number}`,\n exportPptx: (number: number) => `Export PPTX revision ${number}`,\n saveBeforeExport: \"Save or discard the draft before exporting a saved revision.\",\n exportBlocked: \"Export is unavailable while the original model request is being checked.\",\n refreshingStatus: \"Reading generation status…\",\n refreshStatus: \"Refresh generation status\",\n exportFailed: \"Export failed. Try again later.\",\n refreshFailed: \"Could not read the latest generation status.\",\n workspaceLabel: \"Creation workspace\",\n workspaceEyebrow: \"Manual HTML workspace\",\n workspaceLoading: \"Loading projects…\",\n workspaceLoadFailed: \"Could not read creation capabilities. Try again later.\",\n newProject: \"New project\",\n conflict: \"This revision changed. Your draft is kept; reread before editing again.\",\n reread: \"Reread\",\n projectTitleLabel: \"Project name\",\n createProject: \"Create project\",\n cancel: \"Cancel\",\n selectProjectLabel: \"Select project\",\n artifactTitleLabel: \"Artifact title\",\n artifactKindLabel: \"Artifact type\",\n unavailableKindOption: (kind: string) => `${kind} (unavailable)`,\n refreshingCapabilities: \"Refreshing capabilities…\",\n refreshCapabilities: \"Refresh artifact capabilities\",\n appendArtifact: \"Add HTML artifact\",\n kindUnavailable: (kind: string) =>\n `The selected artifact type \"${kind}\" is unavailable; choose another or refresh capabilities.`,\n noHtmlDomains: \"No HTML artifact types are enabled\",\n htmlContentLabel: \"HTML content\",\n saveRevision: \"Save revision\",\n savedRevisionsLabel: \"Saved revisions\",\n historyRevision: (number: number) => `Revision ${number}`,\n },\n} satisfies Record<CreationLocale, unknown>;\n\nexport type CreationBlockMessages = (typeof MESSAGES)[\"en\"];\n\nexport function creationBlockMessages(locale: CreationLocale = \"en\"): CreationBlockMessages {\n return MESSAGES[locale];\n}\n\n/** A domain that can produce HTML (directly or through HTML generation instructions). */\nexport function generatesHtml(domain: CreationDomain): boolean {\n return (\n domain.enabled &&\n domain.formats.includes(\"html\") &&\n (domain.outputFormat === \"html\" || !!domain.generationInstructions?.html)\n );\n}\n\n/** HTML-capable domains, first one per artifact kind. */\nexport function htmlGenerationDomains(domains: CreationDomain[]): CreationDomain[] {\n return domains.filter(\n (domain, index, all) =>\n generatesHtml(domain) &&\n all.findIndex((candidate) => candidate.artifactKind === domain.artifactKind) === index,\n );\n}\n\n/** True while any run may still produce a result; a malformed `runs` field fails closed. */\nexport function hasUnresolvedRun(project: CreationProject): boolean {\n const runs: unknown = project.runs;\n if (!Array.isArray(runs)) return true;\n // Checked here too: `@uibot/creation-kit` before 0.4 throws on non-object entries.\n if (runs.some((run) => !run || typeof run !== \"object\" || Array.isArray(run))) return true;\n return unresolvedCreationRuns(runs).length > 0;\n}\n\n/** Artifact kinds whose saved HTML revisions can be exported or referenced. */\nexport const HTML_DOCUMENT_KINDS = [\"web\", \"presentation\"];\n\n/** Shared field styling for the native controls the blocks use. */\nexport const FIELD_CLASS =\n \"flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\";\n",
17
+ "type": "registry:lib"
18
+ }
19
+ ],
20
+ "meta": {
21
+ "composite": true,
22
+ "channel": "public"
23
+ }
24
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "creation-workspace",
4
+ "type": "registry:block",
5
+ "description": "Manual HTML creation workspace (projects, artifacts, CAS saves with a conflict step, generation, export) over useCreationWorkspace; the host renders the editor.",
6
+ "dependencies": [
7
+ "react",
8
+ "@uibot/contracts@^0.7.0",
9
+ "@uibot/creation-kit@^0.7.0"
10
+ ],
11
+ "registryDependencies": [
12
+ "button",
13
+ "input",
14
+ "label",
15
+ "textarea",
16
+ "@uibot/creation-shared",
17
+ "@uibot/creation-html-generation",
18
+ "@uibot/creation-reference-generation",
19
+ "@uibot/creation-revision-export"
20
+ ],
21
+ "files": [
22
+ {
23
+ "path": "components/uibot/creation/creation-workspace.tsx",
24
+ "target": "components/uibot/creation/creation-workspace.tsx",
25
+ "content": "import { Button } from \"@/components/ui/button\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport type { CreationContent } from \"@uibot/contracts\";\nimport {\n type CreationClient,\n type CreationLocale,\n type CreationWorkspaceClient,\n type CreationWorkspaceSaveInput,\n type CreationWorkspaceSaveResult,\n useCreationWorkspace,\n} from \"@uibot/creation-kit\";\nimport { Fragment, type ReactNode, useId, useState } from \"react\";\nimport { CreationHtmlGeneration } from \"./creation-html-generation\";\nimport { CreationReferenceGeneration } from \"./creation-reference-generation\";\nimport {\n CreationRevisionExport,\n type CreationRevisionExportProps,\n} from \"./creation-revision-export\";\nimport { creationBlockMessages, FIELD_CLASS } from \"./creation-shared\";\n\n/** What the host's editor receives; `HtmlSourceEditor` from `@uibot/renderer-react` accepts it. */\nexport interface CreationWorkspaceEditorProps {\n projectId: string;\n artifactId: string;\n title: string;\n revision: { id: string; number: number };\n source: CreationContent;\n onDirty: (dirty: boolean) => void;\n saveRevision: (input: CreationWorkspaceSaveInput) => Promise<CreationWorkspaceSaveResult>;\n renderSaveAction: (action: { disabled: boolean; onSave: () => void }) => ReactNode;\n}\n\nexport interface CreationWorkspaceProps {\n client: CreationWorkspaceClient & Pick<CreationClient, \"startRun\">;\n exportRevision: CreationRevisionExportProps[\"exportRevision\"];\n /** Run reservation key for a project; scope it to the signed-in identity. */\n runStorageKey: (projectId: string) => string;\n /** Changes when the signed-in actor or tenant changes. Hosts with sign-in must pass it. */\n authority?: () => string;\n /** Identity the export block binds a download to. */\n sessionIdentity: string;\n isSessionCurrent?: () => boolean;\n locale?: CreationLocale;\n /** The host's HTML editor (preview transport, data bridge); usually `HtmlSourceEditor`. */\n renderEditor: (editor: CreationWorkspaceEditorProps) => ReactNode;\n initialSource?: string;\n /** Host overlays rendered inside the workspace (e.g. approval dialogs). */\n children?: ReactNode;\n}\n\n/**\n * Manual HTML creation workspace: projects, artifacts, saved revisions, generation and export.\n * State lives in `useCreationWorkspace`; key the component by identity/tenant so a switch starts\n * a fresh workspace.\n */\nexport function CreationWorkspace({\n client,\n exportRevision,\n runStorageKey,\n authority,\n sessionIdentity,\n isSessionCurrent,\n locale,\n renderEditor,\n initialSource = \"<main>\\n <h1>My page</h1>\\n</main>\",\n children,\n}: CreationWorkspaceProps) {\n const t = creationBlockMessages(locale);\n const id = useId();\n const workspace = useCreationWorkspace({ client, ...(locale ? { locale } : {}) });\n const [showCreateProject, setShowCreateProject] = useState(false);\n const [projectTitle, setProjectTitle] = useState(\"\");\n const [artifactTitle, setArtifactTitle] = useState(\"\");\n const [newSource, setNewSource] = useState(initialSource);\n const {\n project,\n selectedArtifact,\n selectedRevision,\n enabledDomain,\n busy,\n refreshingDomains,\n generationPending,\n editorDirty,\n } = workspace;\n const runProps = {\n client,\n ...(authority ? { authority } : {}),\n ...(locale ? { locale } : {}),\n };\n\n if (workspace.status !== \"ready\")\n return (\n <section aria-label={t.workspaceLabel}>\n {workspace.status === \"loading\" ? (\n <p>{t.workspaceLoading}</p>\n ) : (\n <p role=\"alert\">{t.workspaceLoadFailed}</p>\n )}\n </section>\n );\n\n return (\n <section\n aria-label={t.workspaceLabel}\n data-testid=\"creation-workspace\"\n className=\"mx-auto flex max-w-6xl flex-col gap-4 p-6\"\n >\n <header className=\"flex items-center justify-between gap-4\">\n <div>\n <p className=\"text-xs text-muted-foreground\">{t.workspaceEyebrow}</p>\n <h1 className=\"text-xl font-semibold\">{t.workspaceLabel}</h1>\n </div>\n <Button type=\"button\" onClick={() => setShowCreateProject(true)} disabled={busy}>\n {t.newProject}\n </Button>\n </header>\n {workspace.message && (\n <p role=\"status\" className=\"text-sm\">\n {workspace.message}\n </p>\n )}\n {workspace.conflict && (\n <div role=\"alert\" className=\"flex items-center gap-3 text-sm\">\n <span>{t.conflict}</span>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => void workspace.rereadProject()}\n disabled={busy}\n >\n {t.reread}\n </Button>\n </div>\n )}\n {showCreateProject && (\n <form\n onSubmit={(event) => {\n event.preventDefault();\n void workspace.createProject(projectTitle).then((created) => {\n if (!created) return;\n setShowCreateProject(false);\n setProjectTitle(\"\");\n });\n }}\n className=\"flex flex-wrap items-end gap-2\"\n >\n <div className=\"flex flex-col gap-1.5\">\n <Label htmlFor={`${id}-project-title`}>{t.projectTitleLabel}</Label>\n <Input\n id={`${id}-project-title`}\n aria-label={t.projectTitleLabel}\n value={projectTitle}\n onChange={(event) => setProjectTitle(event.target.value)}\n />\n </div>\n <Button type=\"submit\" disabled={busy || !projectTitle.trim()}>\n {t.createProject}\n </Button>\n <Button type=\"button\" variant=\"outline\" onClick={() => setShowCreateProject(false)}>\n {t.cancel}\n </Button>\n </form>\n )}\n {!!workspace.projects.length && (\n <div className=\"flex flex-col gap-1.5\">\n <Label htmlFor={`${id}-project`}>{t.selectProjectLabel}</Label>\n <select\n id={`${id}-project`}\n aria-label={t.selectProjectLabel}\n className={FIELD_CLASS}\n value={project?.id ?? \"\"}\n disabled={busy}\n onChange={(event) => void workspace.selectProject(event.target.value)}\n >\n {workspace.projects.map((item) => (\n <option key={item.id} value={item.id}>\n {item.title}\n </option>\n ))}\n </select>\n </div>\n )}\n {project && (\n <>\n <CreationHtmlGeneration\n key={`html-generation:${project.id}`}\n {...runProps}\n storageKey={runStorageKey(project.id)}\n project={project}\n capabilities={workspace.capabilities}\n artifact={selectedArtifact}\n dirty={editorDirty}\n busy={busy || refreshingDomains}\n onPending={(pending) => workspace.setGenerationPending(\"html\", pending)}\n onProject={workspace.applyProject}\n />\n <CreationReferenceGeneration\n key={`reference-generation:${project.id}`}\n {...runProps}\n storageKey={runStorageKey(project.id)}\n project={project}\n capabilities={workspace.capabilities}\n dirty={editorDirty}\n busy={busy || refreshingDomains}\n onPending={(pending) => workspace.setGenerationPending(\"reference\", pending)}\n onProject={workspace.applyProject}\n />\n <div className=\"flex flex-wrap items-end gap-3 rounded-lg border p-4\">\n <div className=\"flex flex-col gap-1.5\">\n <Label htmlFor={`${id}-artifact-title`}>{t.artifactTitleLabel}</Label>\n <Input\n id={`${id}-artifact-title`}\n aria-label={t.artifactTitleLabel}\n value={artifactTitle}\n onChange={(event) => setArtifactTitle(event.target.value)}\n />\n </div>\n <div className=\"flex flex-col gap-1.5\">\n <Label htmlFor={`${id}-artifact-kind`}>{t.artifactKindLabel}</Label>\n <select\n id={`${id}-artifact-kind`}\n aria-label={t.artifactKindLabel}\n className={FIELD_CLASS}\n value={workspace.selectedDomainKind}\n onChange={(event) => workspace.selectDomain(event.target.value)}\n disabled={!workspace.domains.length || busy || refreshingDomains}\n >\n {workspace.selectedDomainKind && !enabledDomain && (\n <option value={workspace.selectedDomainKind} disabled>\n {t.unavailableKindOption(workspace.selectedDomainKind)}\n </option>\n )}\n {workspace.domains.map((domain) => (\n <option\n key={`${domain.artifactKind}:${domain.version}`}\n value={domain.artifactKind}\n >\n {domain.title}\n </option>\n ))}\n </select>\n </div>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => void workspace.refreshDomains()}\n disabled={busy || refreshingDomains || editorDirty || generationPending}\n >\n {refreshingDomains ? t.refreshingCapabilities : t.refreshCapabilities}\n </Button>\n <Button\n type=\"button\"\n onClick={() =>\n void workspace\n .appendArtifact({\n title: artifactTitle,\n source: { format: \"html\", schemaVersion: \"1\", content: newSource },\n })\n .then((appended) => {\n if (appended) setArtifactTitle(\"\");\n })\n }\n disabled={\n busy ||\n refreshingDomains ||\n generationPending ||\n !workspace.capabilitiesFresh ||\n !enabledDomain ||\n !artifactTitle.trim()\n }\n >\n {t.appendArtifact}\n </Button>\n </div>\n {workspace.selectedDomainKind && !enabledDomain && (\n <p role=\"status\" className=\"text-sm text-muted-foreground\">\n {t.kindUnavailable(workspace.selectedDomainKind)}\n </p>\n )}\n {!workspace.domains.length && (\n <p role=\"status\" className=\"text-sm text-muted-foreground\">\n {t.noHtmlDomains}\n </p>\n )}\n {!selectedArtifact && (\n <div className=\"flex flex-col gap-1.5\">\n <Label htmlFor={`${id}-source`}>{t.htmlContentLabel}</Label>\n <Textarea\n id={`${id}-source`}\n aria-label={t.htmlContentLabel}\n value={newSource}\n onChange={(event) => setNewSource(event.target.value)}\n disabled={busy}\n />\n </div>\n )}\n {selectedArtifact && selectedRevision?.source.format === \"html\" && (\n <fieldset\n disabled={refreshingDomains || generationPending}\n className=\"m-0 min-w-0 border-0 p-0\"\n >\n <Fragment\n key={`${project.id}:${selectedArtifact.id}:${workspace.editorResetGeneration}`}\n >\n {renderEditor({\n projectId: project.id,\n artifactId: selectedArtifact.id,\n title: selectedArtifact.title,\n revision: { id: selectedRevision.id, number: selectedRevision.number },\n source: selectedRevision.source,\n onDirty: workspace.setEditorDirty,\n saveRevision: workspace.saveRevision,\n renderSaveAction: ({ disabled, onSave }) => (\n <Button\n type=\"button\"\n onClick={onSave}\n disabled={disabled || busy || refreshingDomains || generationPending}\n >\n {t.saveRevision}\n </Button>\n ),\n })}\n </Fragment>\n </fieldset>\n )}\n {selectedArtifact && selectedRevision && (\n <>\n <fieldset\n aria-label={t.savedRevisionsLabel}\n className=\"m-0 flex min-w-0 flex-wrap gap-2 border-0 p-0\"\n >\n {selectedArtifact.revisions.map((revision) => (\n <Button\n key={revision.id}\n type=\"button\"\n variant=\"outline\"\n aria-pressed={\n (workspace.exportRevisionId || selectedRevision.id) === revision.id\n }\n onClick={() => workspace.selectExportRevision(revision.id)}\n disabled={busy}\n >\n {t.historyRevision(revision.number)}\n </Button>\n ))}\n </fieldset>\n <CreationRevisionExport\n client={client}\n exportRevision={exportRevision}\n {...(locale ? { locale } : {})}\n project={project}\n artifact={selectedArtifact}\n storageKey={runStorageKey(project.id)}\n sessionIdentity={sessionIdentity}\n {...(isSessionCurrent ? { isSessionCurrent } : {})}\n onProject={(updated) => workspace.applyProject(updated)}\n revision={\n selectedArtifact.revisions.find(\n (revision) => revision.id === workspace.exportRevisionId,\n ) ?? selectedRevision\n }\n dirty={editorDirty || busy || refreshingDomains || generationPending}\n />\n </>\n )}\n </>\n )}\n {children}\n </section>\n );\n}\n",
26
+ "type": "registry:component"
27
+ }
28
+ ],
29
+ "meta": {
30
+ "composite": true,
31
+ "channel": "public"
32
+ }
33
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "crm",
4
+ "type": "registry:block",
5
+ "description": "Pipeline — CRM",
6
+ "registryDependencies": [
7
+ "@uibot/app-shell-sidebar",
8
+ "@uibot/data",
9
+ "@uibot/data-studio",
10
+ "@uibot/feedback",
11
+ "@uibot/interactive",
12
+ "@uibot/kanban",
13
+ "@uibot/layout",
14
+ "@uibot/nav"
15
+ ],
16
+ "files": [
17
+ {
18
+ "path": "lib/uibot/templates/crm.uibot.yaml",
19
+ "target": "lib/uibot/templates/crm.uibot.yaml",
20
+ "content": "version: \"2.0\"\npages:\n - id: crm\n path: /\n title: Pipeline — CRM\n blocks:\n - type: PageLayout\n template: app-shell-sidebar\n props:\n title: Relate CRM\n slots:\n headerActions:\n - type: Button\n props:\n label: \"+ Add lead\"\n size: sm\n sidebar:\n - type: PageSiderMenu\n props:\n title: Sales\n children:\n - type: MenuLink\n props:\n label: Pipeline\n href: \"#\"\n icon: \"◫\"\n active: true\n - type: MenuLink\n props:\n label: Contacts\n href: \"#\"\n icon: \"◍\"\n badge: \"5\"\n - type: MenuLink\n props:\n label: Deals\n href: \"#\"\n icon: \"◆\"\n - type: MenuLink\n props:\n label: Reports\n href: \"#\"\n icon: \"◔\"\n badge: \"n/a\"\n children:\n - type: Box\n props:\n className: \"flex items-end justify-between gap-4 mb-3 border-b border-border pb-3\"\n children:\n - type: Box\n children:\n - type: Heading\n props:\n level: 2\n text: Pipeline\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: \"Demo workspace · sample deals, not live ARR\"\n - type: BadgeGroup\n props:\n items:\n - label: 1 hot deal\n tone: warning\n - label: Forecast n/a\n tone: info\n - type: Toast\n props:\n level: warning\n title: Status first\n message: \"Umbrella Inc is marked hot. Pipeline dollars below are demo labels — live forecast stays n/a.\"\n - type: StatGrid\n props:\n cols: \"3\"\n items:\n - label: Open pipeline (demo)\n value: \"$1.24M\"\n change: \"sample board\"\n trend: up\n - label: Win rate (demo)\n value: \"32%\"\n change: \"+3pt sample\"\n trend: up\n - label: Live forecast\n value: \"n/a\"\n description: \"CRM source offline\"\n - type: Card\n props:\n title: Pipeline by stage\n description: \"Five sample cards · hairline board\"\n className: \"rounded-none border border-border shadow-none\"\n children:\n - type: KanbanBoard\n props:\n columns:\n - id: lead\n title: Lead\n - id: qualified\n title: Qualified\n - id: proposal\n title: Proposal\n - id: won\n title: Won\n cards:\n - id: c1\n column: lead\n title: Globex Corp\n subtitle: \"$22,000 · demo\"\n badge: New\n - id: c2\n column: lead\n title: Initech\n subtitle: \"$8,400 · demo\"\n - id: c3\n column: qualified\n title: Umbrella Inc\n subtitle: \"$54,000 · demo\"\n badge: Hot\n - id: c4\n column: proposal\n title: Stark Industries\n subtitle: \"$140,000 · demo\"\n - id: c5\n column: won\n title: Wayne Enterprises\n subtitle: \"$96,000 · demo\"\n badge: Closed\n - type: Card\n props:\n title: Recent contacts\n description: \"Empty state is wired if the demo rows are cleared\"\n className: \"rounded-none border border-border shadow-none\"\n children:\n - type: Table\n props:\n emptyText: No contacts in this window.\n striped: true\n columns:\n - key: name\n label: Name\n - key: company\n label: Company\n - key: stage\n label: Stage\n - key: value\n label: Value\n align: right\n rows:\n - name: Marcus Webb\n company: Globex Corp\n stage: Lead\n value: \"$22,000\"\n - name: Lena Park\n company: Umbrella Inc\n stage: Qualified\n value: \"$54,000\"\n - name: Omar Haddad\n company: Stark Industries\n stage: Proposal\n value: \"$140,000\"\n",
21
+ "type": "registry:lib"
22
+ },
23
+ {
24
+ "path": "lib/uibot/templates/crm.uibot.json",
25
+ "target": "lib/uibot/templates/crm.uibot.json",
26
+ "content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"crm\",\n \"channel\": \"public\",\n \"template\": {\n \"file\": \"crm.uibot.yaml\",\n \"contract\": {\n \"name\": \"crm\",\n \"description\": \"Pipeline — CRM\",\n \"level\": \"L4\",\n \"category\": \"template\",\n \"keywords\": [\n \"crm\",\n \"crm\",\n \"uibot-template\"\n ],\n \"composedFrom\": [\n \"BadgeGroup\",\n \"Box\",\n \"Button\",\n \"Card\",\n \"Heading\",\n \"KanbanBoard\",\n \"MenuLink\",\n \"PageLayout\",\n \"PageSiderMenu\",\n \"Paragraph\",\n \"StatGrid\",\n \"Table\",\n \"Toast\",\n \"app-shell-sidebar\"\n ]\n }\n }\n}\n",
27
+ "type": "registry:lib"
28
+ }
29
+ ],
30
+ "meta": {
31
+ "uibot": {
32
+ "schema": "uibot.registry.item.v1",
33
+ "item": "crm",
34
+ "channel": "public",
35
+ "template": {
36
+ "file": "crm.uibot.yaml",
37
+ "contract": {
38
+ "name": "crm",
39
+ "description": "Pipeline — CRM",
40
+ "level": "L4",
41
+ "category": "template",
42
+ "keywords": [
43
+ "crm",
44
+ "crm",
45
+ "uibot-template"
46
+ ],
47
+ "composedFrom": [
48
+ "BadgeGroup",
49
+ "Box",
50
+ "Button",
51
+ "Card",
52
+ "Heading",
53
+ "KanbanBoard",
54
+ "MenuLink",
55
+ "PageLayout",
56
+ "PageSiderMenu",
57
+ "Paragraph",
58
+ "StatGrid",
59
+ "Table",
60
+ "Toast",
61
+ "app-shell-sidebar"
62
+ ]
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,147 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "dashboard",
4
+ "type": "registry:ui",
5
+ "description": "Metric with label, value and supporting text",
6
+ "dependencies": [
7
+ "react"
8
+ ],
9
+ "registryDependencies": [
10
+ "@uibot/uibot-base"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "components/uibot/dashboard.tsx",
15
+ "target": "components/uibot/dashboard.tsx",
16
+ "content": "import type { RendererComponent } from \"@/lib/uibot-renderer\";\nimport { records, text } from \"./interaction\";\nimport { Icon } from \"./icons\";\nexport const StatCard: RendererComponent = (props) => (\n <article className=\"rounded-xl border bg-card p-6 shadow-sm\" data-uibot-type=\"StatCard\">\n <div className=\"mb-4 flex items-center justify-between gap-4\">\n <h3 className=\"text-sm font-medium\">{text(props.label)}</h3>\n <span className=\"text-muted-foreground\">\n <Icon name={text(props.icon, \"chart-no-axes-column\")} size={16} />\n </span>\n </div>\n <div className=\"text-2xl font-bold tracking-tight\">{text(props.value)}</div>\n <p className=\"mt-1 text-xs text-muted-foreground\">{text(props.description)}</p>\n </article>\n);\nexport const BarChart: RendererComponent = (props) => {\n const points = records(props.data),\n max = Math.max(1, ...points.map((p) => Number(p.value) || 0));\n return (\n <figure\n data-uibot-type=\"BarChart\"\n aria-label={text(props.label, \"Monthly overview\")}\n className=\"w-full\"\n >\n <div className=\"flex gap-3\" style={{ height: Number(props.height) || 320 }}>\n <div className=\"flex w-9 flex-col justify-between pb-7 text-right text-xs text-muted-foreground\">\n {[1, 0.75, 0.5, 0.25, 0].map((n) => (\n <span key={n}>\n {text(props.prefix)}\n {Math.round(max * n).toLocaleString()}\n </span>\n ))}\n </div>\n <div className=\"flex min-w-0 flex-1 items-end justify-around gap-2\">\n {points.map((p) => (\n <div\n key={text(p.label)}\n className=\"flex h-full min-w-0 flex-1 flex-col justify-end gap-2\"\n >\n <div\n className=\"group relative w-full rounded-t bg-primary focus-visible:outline-2\"\n style={{ height: `${Math.max(1, ((Number(p.value) || 0) / max) * 90)}%` }}\n tabIndex={0}\n role=\"img\"\n aria-label={`${text(p.label)}: ${text(props.prefix)}${text(p.value)}`}\n >\n <span className=\"absolute -top-8 start-1/2 hidden -translate-x-1/2 whitespace-nowrap rounded border bg-popover px-2 py-1 text-xs group-hover:block group-focus:block\">\n {text(props.prefix)}\n {text(p.value)}\n </span>\n </div>\n <span className=\"h-5 text-center text-xs text-muted-foreground\">{text(p.label)}</span>\n </div>\n ))}\n </div>\n </div>\n <figcaption className=\"sr-only\">\n {points.map((p) => `${text(p.label)} ${text(p.value)}`).join(\", \")}\n </figcaption>\n </figure>\n );\n};\nexport const AvatarList: RendererComponent = (props) => (\n <ul data-uibot-type=\"AvatarList\" className=\"space-y-7\">\n {records(props.items).map((item) => (\n <li key={text(item.id, item.name as string)} className=\"flex items-center gap-4\">\n <span className=\"grid size-9 shrink-0 place-items-center rounded-full bg-muted text-xs font-medium\">\n {text(item.initials)}\n </span>\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-medium\">{text(item.name)}</p>\n <p className=\"truncate text-sm text-muted-foreground\">{text(item.description)}</p>\n </div>\n <span className=\"text-sm font-medium\">{text(item.value)}</span>\n </li>\n ))}\n </ul>\n);\n",
17
+ "type": "registry:ui"
18
+ },
19
+ {
20
+ "path": "components/uibot/interaction.ts",
21
+ "target": "components/uibot/interaction.ts",
22
+ "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",
23
+ "type": "registry:ui"
24
+ },
25
+ {
26
+ "path": "components/uibot/icons.tsx",
27
+ "target": "components/uibot/icons.tsx",
28
+ "content": "/*\nISC License\n\nCopyright (c) 2026 Lucide Icons and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n---\n\nThe following Lucide icons are derived from the Feather project:\n\nairplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out\n\nThe MIT License (MIT) (for the icons listed above)\n\nCopyright (c) 2013-present Cole Bemis\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n*/\n// Icon paths from lucide-react 1.8.0 (ISC); see docs/shadcn-admin-attribution.md.\nimport { createElement } from \"react\";\nconst paths: Record<string, [string, Record<string, string>][]> = {\n \"panel-left\": [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", key: \"afitv7\" }],\n [\"path\", { d: \"M9 3v18\", key: \"fh3hqa\" }],\n ],\n \"layout-dashboard\": [\n [\"rect\", { width: \"7\", height: \"9\", x: \"3\", y: \"3\", rx: \"1\", key: \"10lvy0\" }],\n [\"rect\", { width: \"7\", height: \"5\", x: \"14\", y: \"3\", rx: \"1\", key: \"16une8\" }],\n [\"rect\", { width: \"7\", height: \"9\", x: \"14\", y: \"12\", rx: \"1\", key: \"1hutg5\" }],\n [\"rect\", { width: \"7\", height: \"5\", x: \"3\", y: \"16\", rx: \"1\", key: \"ldoo1y\" }],\n ],\n \"list-todo\": [\n [\"path\", { d: \"M13 5h8\", key: \"a7qcls\" }],\n [\"path\", { d: \"M13 12h8\", key: \"h98zly\" }],\n [\"path\", { d: \"M13 19h8\", key: \"c3s6r1\" }],\n [\"path\", { d: \"m3 17 2 2 4-4\", key: \"1jhpwq\" }],\n [\"rect\", { x: \"3\", y: \"4\", width: \"6\", height: \"6\", rx: \"1\", key: \"cif1o7\" }],\n ],\n users: [\n [\"path\", { d: \"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\", key: \"1yyitq\" }],\n [\"path\", { d: \"M16 3.128a4 4 0 0 1 0 7.744\", key: \"16gr8j\" }],\n [\"path\", { d: \"M22 21v-2a4 4 0 0 0-3-3.87\", key: \"kshegd\" }],\n [\"circle\", { cx: \"9\", cy: \"7\", r: \"4\", key: \"nufk8\" }],\n ],\n settings: [\n [\n \"path\",\n {\n d: \"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915\",\n key: \"1i5ecw\",\n },\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }],\n ],\n \"message-circle\": [\n [\n \"path\",\n {\n d: \"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719\",\n key: \"1sd12s\",\n },\n ],\n ],\n command: [\n [\n \"path\",\n {\n d: \"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3\",\n key: \"11bfej\",\n },\n ],\n ],\n search: [\n [\"path\", { d: \"m21 21-4.34-4.34\", key: \"14j7rj\" }],\n [\"circle\", { cx: \"11\", cy: \"11\", r: \"8\", key: \"4ej97u\" }],\n ],\n sun: [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"4\", key: \"4exip2\" }],\n [\"path\", { d: \"M12 2v2\", key: \"tus03m\" }],\n [\"path\", { d: \"M12 20v2\", key: \"1lh1kg\" }],\n [\"path\", { d: \"m4.93 4.93 1.41 1.41\", key: \"149t6j\" }],\n [\"path\", { d: \"m17.66 17.66 1.41 1.41\", key: \"ptbguv\" }],\n [\"path\", { d: \"M2 12h2\", key: \"1t8f8n\" }],\n [\"path\", { d: \"M20 12h2\", key: \"1q8mjw\" }],\n [\"path\", { d: \"m6.34 17.66-1.41 1.41\", key: \"1m8zz5\" }],\n [\"path\", { d: \"m19.07 4.93-1.41 1.41\", key: \"1shlcs\" }],\n ],\n moon: [\n [\n \"path\",\n {\n d: \"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\",\n key: \"kfwtm\",\n },\n ],\n ],\n \"chevron-down\": [[\"path\", { d: \"m6 9 6 6 6-6\", key: \"qrunsl\" }]],\n \"chevron-right\": [[\"path\", { d: \"m9 18 6-6-6-6\", key: \"mthhwq\" }]],\n \"chevrons-up-down\": [\n [\"path\", { d: \"m7 15 5 5 5-5\", key: \"1hf1tw\" }],\n [\"path\", { d: \"m7 9 5-5 5 5\", key: \"sgt6xg\" }],\n ],\n plus: [\n [\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }],\n [\"path\", { d: \"M12 5v14\", key: \"s699le\" }],\n ],\n download: [\n [\"path\", { d: \"M12 15V3\", key: \"m9g1x1\" }],\n [\"path\", { d: \"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\", key: \"ih7n3h\" }],\n [\"path\", { d: \"m7 10 5 5 5-5\", key: \"brsn70\" }],\n ],\n \"sliders-horizontal\": [\n [\"path\", { d: \"M10 5H3\", key: \"1qgfaw\" }],\n [\"path\", { d: \"M12 19H3\", key: \"yhmn1j\" }],\n [\"path\", { d: \"M14 3v4\", key: \"1sua03\" }],\n [\"path\", { d: \"M16 17v4\", key: \"1q0r14\" }],\n [\"path\", { d: \"M21 12h-9\", key: \"1o4lsq\" }],\n [\"path\", { d: \"M21 19h-5\", key: \"1rlt1p\" }],\n [\"path\", { d: \"M21 5h-7\", key: \"1oszz2\" }],\n [\"path\", { d: \"M8 10v4\", key: \"tgpxqk\" }],\n [\"path\", { d: \"M8 12H3\", key: \"a7s4jb\" }],\n ],\n shield: [\n [\n \"path\",\n {\n d: \"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\",\n key: \"oel41y\",\n },\n ],\n ],\n \"log-out\": [\n [\"path\", { d: \"m16 17 5-5-5-5\", key: \"1bji2h\" }],\n [\"path\", { d: \"M21 12H9\", key: \"dn1m92\" }],\n [\"path\", { d: \"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\", key: \"1uf3rs\" }],\n ],\n boxes: [\n [\n \"path\",\n {\n d: \"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z\",\n key: \"lc1i9w\",\n },\n ],\n [\"path\", { d: \"m7 16.5-4.74-2.85\", key: \"1o9zyk\" }],\n [\"path\", { d: \"m7 16.5 5-3\", key: \"va8pkn\" }],\n [\"path\", { d: \"M7 16.5v5.17\", key: \"jnp8gn\" }],\n [\n \"path\",\n {\n d: \"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z\",\n key: \"8zsnat\",\n },\n ],\n [\"path\", { d: \"m17 16.5-5-3\", key: \"8arw3v\" }],\n [\"path\", { d: \"m17 16.5 4.74-2.85\", key: \"8rfmw\" }],\n [\"path\", { d: \"M17 16.5v5.17\", key: \"k6z78m\" }],\n [\n \"path\",\n {\n d: \"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z\",\n key: \"1xygjf\",\n },\n ],\n [\"path\", { d: \"M12 8 7.26 5.15\", key: \"1vbdud\" }],\n [\"path\", { d: \"m12 8 4.74-2.85\", key: \"3rx089\" }],\n [\"path\", { d: \"M12 13.5V8\", key: \"1io7kd\" }],\n ],\n \"chart-no-axes-column\": [\n [\"path\", { d: \"M5 21v-6\", key: \"1hz6c0\" }],\n [\"path\", { d: \"M12 21V3\", key: \"1lcnhd\" }],\n [\"path\", { d: \"M19 21V9\", key: \"unv183\" }],\n ],\n ellipsis: [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"1\", key: \"41hilf\" }],\n [\"circle\", { cx: \"19\", cy: \"12\", r: \"1\", key: \"1wjl8i\" }],\n [\"circle\", { cx: \"5\", cy: \"12\", r: \"1\", key: \"1pcz8c\" }],\n ],\n \"arrow-up\": [\n [\"path\", { d: \"m5 12 7-7 7 7\", key: \"hav0vg\" }],\n [\"path\", { d: \"M12 19V5\", key: \"x0mq9r\" }],\n ],\n \"arrow-down\": [\n [\"path\", { d: \"M12 5v14\", key: \"s699le\" }],\n [\"path\", { d: \"m19 12-7 7-7-7\", key: \"1idqje\" }],\n ],\n x: [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }],\n ],\n check: [[\"path\", { d: \"M20 6 9 17l-5-5\", key: \"1gmf2c\" }]],\n send: [\n [\n \"path\",\n {\n d: \"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z\",\n key: \"1ffxy3\",\n },\n ],\n [\"path\", { d: \"m21.854 2.147-10.94 10.939\", key: \"12cjpa\" }],\n ],\n mail: [\n [\"path\", { d: \"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7\", key: \"132q7q\" }],\n [\"rect\", { x: \"2\", y: \"4\", width: \"20\", height: \"16\", rx: \"2\", key: \"izxlao\" }],\n ],\n calendar: [\n [\"path\", { d: \"M8 2v4\", key: \"1cmpym\" }],\n [\"path\", { d: \"M16 2v4\", key: \"4m81vk\" }],\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"4\", rx: \"2\", key: \"1hopcy\" }],\n [\"path\", { d: \"M3 10h18\", key: \"8toen8\" }],\n ],\n eye: [\n [\n \"path\",\n {\n d: \"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\",\n key: \"1nclc0\",\n },\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }],\n ],\n \"eye-off\": [\n [\n \"path\",\n {\n d: \"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49\",\n key: \"ct8e1f\",\n },\n ],\n [\"path\", { d: \"M14.084 14.158a3 3 0 0 1-4.242-4.242\", key: \"151rxh\" }],\n [\n \"path\",\n {\n d: \"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143\",\n key: \"13bj9a\",\n },\n ],\n [\"path\", { d: \"m2 2 20 20\", key: \"1ooewy\" }],\n ],\n};\nexport function Icon({ name, size = 18 }: { name: string; size?: number }) {\n const nodes = paths[name] ?? paths.boxes ?? [];\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n style={{ flexShrink: 0 }}\n >\n {nodes.map(([tag, attributes]) => createElement(tag, attributes))}\n </svg>\n );\n}\n",
29
+ "type": "registry:ui"
30
+ },
31
+ {
32
+ "path": "components/uibot/dashboard.uibot.json",
33
+ "target": "components/uibot/dashboard.uibot.json",
34
+ "content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"dashboard\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"AvatarList\",\n \"export\": \"AvatarList\",\n \"module\": \"dashboard.tsx\",\n \"catalog\": {\n \"name\": \"AvatarList\",\n \"tags\": [\n \"list\"\n ],\n \"description\": \"Compact people and activity list\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"props\": {\n \"items\": {\n \"type\": \"array\"\n }\n },\n \"events\": {}\n }\n },\n {\n \"name\": \"BarChart\",\n \"export\": \"BarChart\",\n \"module\": \"dashboard.tsx\",\n \"catalog\": {\n \"name\": \"BarChart\",\n \"tags\": [\n \"chart\"\n ],\n \"description\": \"Accessible deterministic bar series with visible labels and hover values\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"props\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"data\": {\n \"type\": \"array\"\n },\n \"height\": {\n \"type\": \"number\"\n },\n \"prefix\": {\n \"type\": \"string\"\n }\n },\n \"events\": {}\n }\n },\n {\n \"name\": \"StatCard\",\n \"export\": \"StatCard\",\n \"module\": \"dashboard.tsx\",\n \"catalog\": {\n \"name\": \"StatCard\",\n \"tags\": [\n \"metric\"\n ],\n \"description\": \"Metric with label, value and supporting text\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"props\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"icon\": {\n \"type\": \"string\"\n }\n },\n \"events\": {}\n }\n }\n ]\n}\n",
35
+ "type": "registry:ui"
36
+ }
37
+ ],
38
+ "meta": {
39
+ "category": "composite",
40
+ "level": "L2",
41
+ "props": {
42
+ "label": {
43
+ "type": "string"
44
+ },
45
+ "value": {
46
+ "type": "string"
47
+ },
48
+ "description": {
49
+ "type": "string"
50
+ },
51
+ "icon": {
52
+ "type": "string"
53
+ }
54
+ },
55
+ "events": {},
56
+ "provides": [
57
+ "StatCard",
58
+ "BarChart",
59
+ "AvatarList"
60
+ ],
61
+ "uibot": {
62
+ "schema": "uibot.registry.item.v1",
63
+ "item": "dashboard",
64
+ "channel": "public",
65
+ "components": [
66
+ {
67
+ "name": "AvatarList",
68
+ "export": "AvatarList",
69
+ "module": "dashboard.tsx",
70
+ "catalog": {
71
+ "name": "AvatarList",
72
+ "tags": [
73
+ "list"
74
+ ],
75
+ "description": "Compact people and activity list",
76
+ "category": "composite",
77
+ "level": "L2",
78
+ "props": {
79
+ "items": {
80
+ "type": "array"
81
+ }
82
+ },
83
+ "events": {}
84
+ }
85
+ },
86
+ {
87
+ "name": "BarChart",
88
+ "export": "BarChart",
89
+ "module": "dashboard.tsx",
90
+ "catalog": {
91
+ "name": "BarChart",
92
+ "tags": [
93
+ "chart"
94
+ ],
95
+ "description": "Accessible deterministic bar series with visible labels and hover values",
96
+ "category": "composite",
97
+ "level": "L2",
98
+ "props": {
99
+ "label": {
100
+ "type": "string"
101
+ },
102
+ "data": {
103
+ "type": "array"
104
+ },
105
+ "height": {
106
+ "type": "number"
107
+ },
108
+ "prefix": {
109
+ "type": "string"
110
+ }
111
+ },
112
+ "events": {}
113
+ }
114
+ },
115
+ {
116
+ "name": "StatCard",
117
+ "export": "StatCard",
118
+ "module": "dashboard.tsx",
119
+ "catalog": {
120
+ "name": "StatCard",
121
+ "tags": [
122
+ "metric"
123
+ ],
124
+ "description": "Metric with label, value and supporting text",
125
+ "category": "composite",
126
+ "level": "L2",
127
+ "props": {
128
+ "label": {
129
+ "type": "string"
130
+ },
131
+ "value": {
132
+ "type": "string"
133
+ },
134
+ "description": {
135
+ "type": "string"
136
+ },
137
+ "icon": {
138
+ "type": "string"
139
+ }
140
+ },
141
+ "events": {}
142
+ }
143
+ }
144
+ ]
145
+ }
146
+ }
147
+ }