@uibot/registry 0.18.0 → 0.19.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 (119) hide show
  1. package/README.md +59 -0
  2. package/dist/distribution-snapshot.d.ts +22 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +11 -11
  5. package/dist/resource-query.d.ts +4 -0
  6. package/dist/resources.d.ts +3 -0
  7. package/dist/resources.js +3 -3
  8. package/dist/shadcn/r/admin-apps.json +61 -0
  9. package/dist/shadcn/r/admin-chats.json +54 -0
  10. package/dist/shadcn/r/admin-error-401.json +54 -0
  11. package/dist/shadcn/r/admin-error-403.json +54 -0
  12. package/dist/shadcn/r/admin-error-404.json +54 -0
  13. package/dist/shadcn/r/admin-error-500.json +54 -0
  14. package/dist/shadcn/r/admin-error-503.json +54 -0
  15. package/dist/shadcn/r/admin-forgot-password.json +59 -0
  16. package/dist/shadcn/r/admin-help.json +53 -0
  17. package/dist/shadcn/r/admin-otp.json +59 -0
  18. package/dist/shadcn/r/admin-overview.json +62 -0
  19. package/dist/shadcn/r/admin-settings-account.json +61 -0
  20. package/dist/shadcn/r/admin-settings-appearance.json +61 -0
  21. package/dist/shadcn/r/admin-settings-display.json +61 -0
  22. package/dist/shadcn/r/admin-settings-notifications.json +61 -0
  23. package/dist/shadcn/r/admin-settings-profile.json +61 -0
  24. package/dist/shadcn/r/admin-settings.json +65 -0
  25. package/dist/shadcn/r/admin-shell.json +11 -5
  26. package/dist/shadcn/r/admin-sign-in-2.json +67 -0
  27. package/dist/shadcn/r/admin-sign-in.json +59 -0
  28. package/dist/shadcn/r/admin-sign-up.json +59 -0
  29. package/dist/shadcn/r/admin-tasks.json +66 -0
  30. package/dist/shadcn/r/admin-users.json +66 -0
  31. package/dist/shadcn/r/auth-01.json +24 -0
  32. package/dist/shadcn/r/auth-02.json +24 -0
  33. package/dist/shadcn/r/auth-03.json +24 -0
  34. package/dist/shadcn/r/auth-04.json +24 -0
  35. package/dist/shadcn/r/auth-05.json +24 -0
  36. package/dist/shadcn/r/auth-centered.json +61 -0
  37. package/dist/shadcn/r/auth-enterprise.json +61 -0
  38. package/dist/shadcn/r/auth-primitives.json +58 -0
  39. package/dist/shadcn/r/auth-recovery.json +64 -0
  40. package/dist/shadcn/r/auth-registration.json +63 -0
  41. package/dist/shadcn/r/auth-split.json +67 -0
  42. package/dist/shadcn/r/auth.json +13 -13
  43. package/dist/shadcn/r/charts.json +1 -1
  44. package/dist/shadcn/r/chat-artifact.json +49 -0
  45. package/dist/shadcn/r/chat-focused.json +49 -0
  46. package/dist/shadcn/r/chat-history.json +49 -0
  47. package/dist/shadcn/r/chat-knowledge.json +49 -0
  48. package/dist/shadcn/r/chat-support.json +49 -0
  49. package/dist/shadcn/r/chat-workspace.json +136 -0
  50. package/dist/shadcn/r/collection-cell-editor.json +6 -6
  51. package/dist/shadcn/r/collection-panel-drawer.json +2 -2
  52. package/dist/shadcn/r/collection-record-menu.json +2 -2
  53. package/dist/shadcn/r/collection-shared.json +2 -2
  54. package/dist/shadcn/r/commerce-workspace.json +69 -0
  55. package/dist/shadcn/r/console-billing.json +68 -0
  56. package/dist/shadcn/r/console-page.json +289 -0
  57. package/dist/shadcn/r/console-shell.json +29 -0
  58. package/dist/shadcn/r/content.json +1 -1
  59. package/dist/shadcn/r/creation-html-generation.json +3 -3
  60. package/dist/shadcn/r/creation-reference-generation.json +3 -3
  61. package/dist/shadcn/r/creation-revision-export.json +3 -3
  62. package/dist/shadcn/r/creation-shared.json +3 -3
  63. package/dist/shadcn/r/creation-variant-compare.json +4 -4
  64. package/dist/shadcn/r/creation-workspace.json +4 -4
  65. package/dist/shadcn/r/crm-workspace.json +73 -0
  66. package/dist/shadcn/r/dashboard.json +1 -1
  67. package/dist/shadcn/r/data-studio.json +1 -1
  68. package/dist/shadcn/r/data-table.json +25 -7
  69. package/dist/shadcn/r/data.json +81 -11
  70. package/dist/shadcn/r/document-assistant.json +54 -0
  71. package/dist/shadcn/r/document-library.json +49 -0
  72. package/dist/shadcn/r/document-reading.json +49 -0
  73. package/dist/shadcn/r/document-workspace.json +164 -0
  74. package/dist/shadcn/r/document-writing.json +49 -0
  75. package/dist/shadcn/r/drilldown-menu.json +233 -0
  76. package/dist/shadcn/r/education-workspace.json +82 -0
  77. package/dist/shadcn/r/feedback.json +6 -6
  78. package/dist/shadcn/r/field.json +1 -1
  79. package/dist/shadcn/r/form.json +11 -11
  80. package/dist/shadcn/r/grid.json +1 -1
  81. package/dist/shadcn/r/interactive.json +1 -1
  82. package/dist/shadcn/r/item-grid.json +219 -0
  83. package/dist/shadcn/r/kanban.json +1 -1
  84. package/dist/shadcn/r/layout.json +196 -16
  85. package/dist/shadcn/r/marketing.json +1 -1
  86. package/dist/shadcn/r/nav.json +3 -3
  87. package/dist/shadcn/r/presentation.json +1 -1
  88. package/dist/shadcn/r/preview-device-frame.json +2 -2
  89. package/dist/shadcn/r/primitives.json +2 -2
  90. package/dist/shadcn/r/sections.json +1 -1
  91. package/dist/shadcn/r/shadcn-admin-shell.json +1 -1
  92. package/dist/shadcn/r/shadcn-admin.json +23 -22
  93. package/dist/shadcn/r/sidebar-01.json +42 -0
  94. package/dist/shadcn/r/sidebar-02.json +42 -0
  95. package/dist/shadcn/r/sidebar-03.json +30 -0
  96. package/dist/shadcn/r/sidebar-04.json +30 -0
  97. package/dist/shadcn/r/sidebar-05.json +36 -0
  98. package/dist/shadcn/r/sidebar-06.json +42 -0
  99. package/dist/shadcn/r/sidebar-07.json +54 -0
  100. package/dist/shadcn/r/sidebar-08.json +54 -0
  101. package/dist/shadcn/r/sidebar-09.json +36 -0
  102. package/dist/shadcn/r/sidebar-10.json +66 -0
  103. package/dist/shadcn/r/sidebar-11.json +30 -0
  104. package/dist/shadcn/r/sidebar-12.json +48 -0
  105. package/dist/shadcn/r/sidebar-13.json +30 -0
  106. package/dist/shadcn/r/sidebar-14.json +30 -0
  107. package/dist/shadcn/r/sidebar-15.json +84 -0
  108. package/dist/shadcn/r/sidebar-16.json +66 -0
  109. package/dist/shadcn/r/sidebar-drilldown.json +29 -0
  110. package/dist/shadcn/r/sidebar-primitives.json +155 -0
  111. package/dist/shadcn/r/uibot-base.json +3 -3
  112. package/dist/shadcn/r/workspace.json +3 -3
  113. package/dist/shadcn/registry.json +987 -175
  114. package/dist/shadcn.d.ts +0 -39
  115. package/dist/solution-composition.d.ts +45 -0
  116. package/dist/solution-regions.d.ts +3 -0
  117. package/dist/solution-spec.d.ts +7 -0
  118. package/dist/template-source.d.ts +2 -0
  119. package/package.json +2 -2
@@ -4,7 +4,7 @@
4
4
  "type": "registry:ui",
5
5
  "description": "Unordered list of child blocks. Use with divided or compact for different visual densities.",
6
6
  "dependencies": [
7
- "react"
7
+ "react@19.3.0"
8
8
  ],
9
9
  "registryDependencies": [
10
10
  "@uibot/uibot-base"
@@ -13,13 +13,13 @@
13
13
  {
14
14
  "path": "components/uibot/data.tsx",
15
15
  "target": "components/uibot/data.tsx",
16
- "content": "import type { RendererComponent } from \"@/lib/uibot-renderer\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\n/** Repeated list of items */\nexport const List: RendererComponent = (props, ctx) => {\n const divided = props[\"divided\"] === true;\n const compact = props[\"compact\"] === true;\n\n return (\n <ul\n className={cn(\n \"uibot-list\",\n divided ? \"divide-y divide-border\" : compact ? \"space-y-1\" : \"space-y-2\",\n )}\n data-uibot-type=\"List\"\n aria-label={typeof props[\"label\"] === \"string\" ? props[\"label\"] : undefined}\n >\n {ctx.children as ReactNode[]}\n </ul>\n );\n};\n\n/** Data table with columns and rows */\nexport const Table: RendererComponent = (props) => {\n const columns = Array.isArray(props[\"columns\"])\n ? (props[\"columns\"] as Array<{ key: string; label: string; align?: string }>)\n : [];\n const rows = Array.isArray(props[\"rows\"])\n ? (props[\"rows\"] as Array<Record<string, unknown>>)\n : [];\n const striped = props[\"striped\"] !== false;\n const caption = typeof props[\"caption\"] === \"string\" ? props[\"caption\"] : null;\n\n return (\n <div className=\"uibot-table w-full overflow-auto rounded-lg border\" data-uibot-type=\"Table\">\n <table className=\"w-full text-sm\">\n {caption && (\n <caption className=\"mb-1 py-2 text-sm text-muted-foreground\">{caption}</caption>\n )}\n <thead>\n <tr className=\"border-b bg-muted/50\">\n {columns.map((col) => (\n <th\n key={col.key}\n scope=\"col\"\n className={cn(\n \"px-4 py-3 text-xs font-medium uppercase tracking-wide text-muted-foreground\",\n col.align === \"right\"\n ? \"text-right\"\n : col.align === \"center\"\n ? \"text-center\"\n : \"text-left\",\n )}\n >\n {col.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.map((row, i) => (\n <tr\n key={i}\n className={cn(\n \"border-b transition-colors last:border-0 hover:bg-muted/30\",\n striped && i % 2 === 1 ? \"bg-muted/10\" : \"\",\n )}\n >\n {columns.map((col) => (\n <td\n key={col.key}\n className={cn(\n \"px-4 py-3 text-foreground\",\n col.align === \"right\"\n ? \"text-right\"\n : col.align === \"center\"\n ? \"text-center\"\n : \"\",\n )}\n >\n {String(row[col.key] ?? \"\")}\n </td>\n ))}\n </tr>\n ))}\n {rows.length === 0 && (\n <tr>\n <td\n colSpan={columns.length || 1}\n className=\"px-4 py-10 text-center text-sm text-muted-foreground\"\n >\n {typeof props[\"emptyText\"] === \"string\" ? props[\"emptyText\"] : \"No data\"}\n </td>\n </tr>\n )}\n </tbody>\n </table>\n </div>\n );\n};\n\nconst TREND_UP = (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"2 10 7 4 12 10\" />\n </svg>\n);\nconst TREND_DOWN = (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"2 4 7 10 12 4\" />\n </svg>\n);\n\n/** Single statistic display (number + label) */\nexport const Stat: RendererComponent = (props) => {\n const trend = props[\"trend\"] as \"up\" | \"down\" | undefined;\n const change =\n typeof props[\"change\"] === \"string\" || typeof props[\"change\"] === \"number\"\n ? String(props[\"change\"])\n : null;\n\n return (\n <div\n className=\"uibot-stat bg-card text-card-foreground rounded-xl border p-5 shadow-sm\"\n data-uibot-type=\"Stat\"\n >\n <p className=\"text-sm font-medium text-muted-foreground\">\n {typeof props[\"label\"] === \"string\" ? props[\"label\"] : \"Stat\"}\n </p>\n <p className=\"mt-1.5 text-3xl font-bold tracking-tight\">\n {props[\"value\"] !== undefined ? String(props[\"value\"]) : \"—\"}\n </p>\n {(change !== null || typeof props[\"description\"] === \"string\") && (\n <div className=\"mt-1.5 flex items-center gap-1.5\">\n {trend && (\n <span\n className={cn(\n \"flex items-center\",\n trend === \"up\" ? \"text-green-600\" : \"text-destructive\",\n )}\n >\n {trend === \"up\" ? TREND_UP : TREND_DOWN}\n </span>\n )}\n {change !== null && (\n <span\n className={cn(\n \"text-xs font-medium\",\n trend === \"up\"\n ? \"text-green-600\"\n : trend === \"down\"\n ? \"text-destructive\"\n : \"text-muted-foreground\",\n )}\n >\n {change}\n </span>\n )}\n {typeof props[\"description\"] === \"string\" && (\n <span className=\"text-xs text-muted-foreground\">{props[\"description\"]}</span>\n )}\n </div>\n )}\n </div>\n );\n};\n\n/** Simple inline Markdown renderer */\nfunction renderMarkdown(text: string): ReactNode[] {\n const lines = text.split(\"\\n\");\n const nodes: ReactNode[] = [];\n let listItems: ReactNode[] = [];\n\n const flushList = () => {\n if (listItems.length > 0) {\n nodes.push(\n <ul key={`ul-${nodes.length}`} className=\"my-2 ml-4 list-disc space-y-1 text-sm\">\n {listItems}\n </ul>,\n );\n listItems = [];\n }\n };\n\n const inlineFormat = (raw: string, key: string): ReactNode => {\n // Very small inline parser: **bold**, *italic*, `code`\n const parts = raw.split(/(\\*\\*[^*]+\\*\\*|\\*[^*]+\\*|`[^`]+`)/g);\n if (parts.length === 1) return raw;\n return (\n <span key={key}>\n {parts.map((p, i) => {\n if (p.startsWith(\"**\") && p.endsWith(\"**\"))\n return (\n <strong key={i} className=\"font-semibold\">\n {p.slice(2, -2)}\n </strong>\n );\n if (p.startsWith(\"*\") && p.endsWith(\"*\")) return <em key={i}>{p.slice(1, -1)}</em>;\n if (p.startsWith(\"`\") && p.endsWith(\"`\"))\n return (\n <code key={i} className=\"rounded bg-muted px-1 py-0.5 font-mono text-[0.8em]\">\n {p.slice(1, -1)}\n </code>\n );\n return p;\n })}\n </span>\n );\n };\n\n lines.forEach((line, i) => {\n const hm = /^(#{1,6})\\s+(.+)$/.exec(line);\n if (hm) {\n flushList();\n const level = hm[1]!.length;\n const sizeMap = [\"text-2xl\", \"text-xl\", \"text-lg\", \"text-base\", \"text-sm\", \"text-xs\"];\n const cls = cn(\"font-semibold leading-tight my-2\", sizeMap[level - 1] ?? \"text-base\");\n const Tag = `h${level}` as \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n nodes.push(\n <Tag key={i} className={cls}>\n {inlineFormat(hm[2]!, `h-${i}`)}\n </Tag>,\n );\n return;\n }\n\n const lm = /^[-*]\\s+(.+)$/.exec(line);\n if (lm) {\n listItems.push(<li key={i}>{inlineFormat(lm[1]!, `li-${i}`)}</li>);\n return;\n }\n\n flushList();\n if (line.trim() === \"\") {\n nodes.push(<br key={i} />);\n } else {\n nodes.push(\n <p key={i} className=\"my-1 text-sm leading-relaxed\">\n {inlineFormat(line, `p-${i}`)}\n </p>,\n );\n }\n });\n\n flushList();\n return nodes;\n}\n\n/** Markdown text content renderer */\nexport const Markdown: RendererComponent = (props) => {\n const content = typeof props[\"content\"] === \"string\" ? props[\"content\"] : \"\";\n return (\n <div className=\"uibot-markdown text-foreground\" data-uibot-type=\"Markdown\">\n {renderMarkdown(content)}\n </div>\n );\n};\n\nconst HEADING_SIZE: Record<number, string> = {\n 1: \"text-4xl\",\n 2: \"text-3xl\",\n 3: \"text-2xl\",\n 4: \"text-xl\",\n 5: \"text-lg\",\n 6: \"text-base\",\n};\n\n/** Section heading (h1–h6) */\nexport const Heading: RendererComponent = (props) => {\n const lvl = typeof props[\"level\"] === \"number\" ? Math.min(6, Math.max(1, props[\"level\"])) : 2;\n const size = HEADING_SIZE[lvl] ?? \"text-3xl\";\n const weight = lvl <= 2 ? \"font-bold\" : \"font-semibold\";\n const text = typeof props[\"text\"] === \"string\" ? props[\"text\"] : \"\";\n const muted = props[\"muted\"] === true ? \"text-muted-foreground\" : \"text-foreground\";\n const cls = cn(\n \"uibot-heading tracking-tight leading-tight\",\n size,\n weight,\n muted,\n typeof props.className === \"string\" ? props.className : \"\",\n );\n const Tag = `h${lvl}` as \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n return (\n <Tag className={cls} data-uibot-type=\"Heading\">\n {text}\n </Tag>\n );\n};\n\n/** Body paragraph text */\nexport const Paragraph: RendererComponent = (props) => (\n <p\n className={cn(\n \"uibot-paragraph leading-relaxed\",\n props[\"size\"] === \"sm\" ? \"text-sm\" : props[\"size\"] === \"lg\" ? \"text-lg\" : \"text-sm\",\n props[\"muted\"] === true ? \"text-muted-foreground\" : \"text-foreground\",\n typeof props.className === \"string\" ? props.className : \"\",\n )}\n data-uibot-type=\"Paragraph\"\n >\n {typeof props[\"text\"] === \"string\" ? props[\"text\"] : \"\"}\n </p>\n);\n",
16
+ "content": "import type { CSSProperties, ReactNode } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport type { RendererComponent } from \"@/lib/uibot-renderer\";\n\n/** Repeated list of items */\nexport const List: RendererComponent = (props, ctx) => {\n const divided = props[\"divided\"] === true;\n const compact = props[\"compact\"] === true;\n\n return (\n <ul\n className={cn(\n \"uibot-list\",\n divided ? \"divide-y divide-border\" : compact ? \"space-y-1\" : \"space-y-2\",\n )}\n data-uibot-type=\"List\"\n aria-label={typeof props[\"label\"] === \"string\" ? props[\"label\"] : undefined}\n >\n {ctx.children as ReactNode[]}\n </ul>\n );\n};\n\n/** Data table with columns and rows */\nexport const Table: RendererComponent = (props) => {\n const columns = Array.isArray(props[\"columns\"])\n ? (props[\"columns\"] as Array<{ key: string; label: string; align?: string }>)\n : [];\n const rows = Array.isArray(props[\"rows\"])\n ? (props[\"rows\"] as Array<Record<string, unknown>>)\n : [];\n const striped = props[\"striped\"] !== false;\n const caption = typeof props[\"caption\"] === \"string\" ? props[\"caption\"] : null;\n\n return (\n <div className=\"uibot-table w-full overflow-auto rounded-lg border\" data-uibot-type=\"Table\">\n <table className=\"w-full text-sm\">\n {caption && (\n <caption className=\"mb-1 py-2 text-sm text-muted-foreground\">{caption}</caption>\n )}\n <thead>\n <tr className=\"border-b bg-muted/50\">\n {columns.map((col) => (\n <th\n key={col.key}\n scope=\"col\"\n className={cn(\n \"px-4 py-3 text-xs font-medium uppercase tracking-wide text-muted-foreground\",\n col.align === \"right\"\n ? \"text-right\"\n : col.align === \"center\"\n ? \"text-center\"\n : \"text-left\",\n )}\n >\n {col.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.map((row, i) => (\n <tr\n key={i}\n className={cn(\n \"border-b transition-colors last:border-0 hover:bg-muted/30\",\n striped && i % 2 === 1 ? \"bg-muted/10\" : \"\",\n )}\n >\n {columns.map((col) => (\n <td\n key={col.key}\n className={cn(\n \"px-4 py-3 text-foreground\",\n col.align === \"right\"\n ? \"text-right\"\n : col.align === \"center\"\n ? \"text-center\"\n : \"\",\n )}\n >\n {String(row[col.key] ?? \"\")}\n </td>\n ))}\n </tr>\n ))}\n {rows.length === 0 && (\n <tr>\n <td\n colSpan={columns.length || 1}\n className=\"px-4 py-10 text-center text-sm text-muted-foreground\"\n >\n {typeof props[\"emptyText\"] === \"string\" ? props[\"emptyText\"] : \"No data\"}\n </td>\n </tr>\n )}\n </tbody>\n </table>\n </div>\n );\n};\n\nconst TREND_UP = (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"2 10 7 4 12 10\" />\n </svg>\n);\nconst TREND_DOWN = (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"2 4 7 10 12 4\" />\n </svg>\n);\n\n/** Single statistic display (number + label) */\nexport const Stat: RendererComponent = (props) => {\n const trend = props[\"trend\"] as \"up\" | \"down\" | undefined;\n const change =\n typeof props[\"change\"] === \"string\" || typeof props[\"change\"] === \"number\"\n ? String(props[\"change\"])\n : null;\n\n return (\n <div\n className=\"uibot-stat bg-card text-card-foreground rounded-xl border p-5 shadow-sm\"\n data-uibot-type=\"Stat\"\n >\n <p className=\"text-sm font-medium text-muted-foreground\">\n {typeof props[\"label\"] === \"string\" ? props[\"label\"] : \"Stat\"}\n </p>\n <p className=\"mt-1.5 text-3xl font-bold tracking-tight\">\n {props[\"value\"] !== undefined ? String(props[\"value\"]) : \"—\"}\n </p>\n {(change !== null || typeof props[\"description\"] === \"string\") && (\n <div className=\"mt-1.5 flex items-center gap-1.5\">\n {trend && (\n <span\n className={cn(\n \"flex items-center\",\n trend === \"up\" ? \"text-green-600\" : \"text-destructive\",\n )}\n >\n {trend === \"up\" ? TREND_UP : TREND_DOWN}\n </span>\n )}\n {change !== null && (\n <span\n className={cn(\n \"text-xs font-medium\",\n trend === \"up\"\n ? \"text-green-600\"\n : trend === \"down\"\n ? \"text-destructive\"\n : \"text-muted-foreground\",\n )}\n >\n {change}\n </span>\n )}\n {typeof props[\"description\"] === \"string\" && (\n <span className=\"text-xs text-muted-foreground\">{props[\"description\"]}</span>\n )}\n </div>\n )}\n </div>\n );\n};\n\n/** Simple inline Markdown renderer */\nfunction renderMarkdown(text: string): ReactNode[] {\n const lines = text.split(\"\\n\");\n const nodes: ReactNode[] = [];\n let listItems: ReactNode[] = [];\n\n const flushList = () => {\n if (listItems.length > 0) {\n nodes.push(\n <ul key={`ul-${nodes.length}`} className=\"my-2 ml-4 list-disc space-y-1 text-sm\">\n {listItems}\n </ul>,\n );\n listItems = [];\n }\n };\n\n const inlineFormat = (raw: string, key: string): ReactNode => {\n // Very small inline parser: **bold**, *italic*, `code`\n const parts = raw.split(/(\\*\\*[^*]+\\*\\*|\\*[^*]+\\*|`[^`]+`)/g);\n if (parts.length === 1) return raw;\n return (\n <span key={key}>\n {parts.map((p, i) => {\n if (p.startsWith(\"**\") && p.endsWith(\"**\"))\n return (\n <strong key={i} className=\"font-semibold\">\n {p.slice(2, -2)}\n </strong>\n );\n if (p.startsWith(\"*\") && p.endsWith(\"*\")) return <em key={i}>{p.slice(1, -1)}</em>;\n if (p.startsWith(\"`\") && p.endsWith(\"`\"))\n return (\n <code key={i} className=\"rounded bg-muted px-1 py-0.5 font-mono text-[0.8em]\">\n {p.slice(1, -1)}\n </code>\n );\n return p;\n })}\n </span>\n );\n };\n\n lines.forEach((line, i) => {\n const hm = /^(#{1,6})\\s+(.+)$/.exec(line);\n if (hm) {\n flushList();\n const level = hm[1]!.length;\n const sizeMap = [\"text-2xl\", \"text-xl\", \"text-lg\", \"text-base\", \"text-sm\", \"text-xs\"];\n const cls = cn(\"font-semibold leading-tight my-2\", sizeMap[level - 1] ?? \"text-base\");\n const Tag = `h${level}` as \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n nodes.push(\n <Tag key={i} className={cls}>\n {inlineFormat(hm[2]!, `h-${i}`)}\n </Tag>,\n );\n return;\n }\n\n const lm = /^[-*]\\s+(.+)$/.exec(line);\n if (lm) {\n listItems.push(<li key={i}>{inlineFormat(lm[1]!, `li-${i}`)}</li>);\n return;\n }\n\n flushList();\n if (line.trim() === \"\") {\n nodes.push(<br key={i} />);\n } else {\n nodes.push(\n <p key={i} className=\"my-1 text-sm leading-relaxed\">\n {inlineFormat(line, `p-${i}`)}\n </p>,\n );\n }\n });\n\n flushList();\n return nodes;\n}\n\n/** Markdown text content renderer */\nexport const Markdown: RendererComponent = (props) => {\n const content = typeof props[\"content\"] === \"string\" ? props[\"content\"] : \"\";\n return (\n <div className=\"uibot-markdown text-foreground\" data-uibot-type=\"Markdown\">\n {renderMarkdown(content)}\n </div>\n );\n};\n\nconst HEADING_SIZE: Record<number, string> = {\n 1: \"text-4xl\",\n 2: \"text-3xl\",\n 3: \"text-2xl\",\n 4: \"text-xl\",\n 5: \"text-lg\",\n 6: \"text-base\",\n};\n\nfunction fontRoleStyle(value: unknown) {\n return value === \"display\" || value === \"body\" || value === \"mono\"\n ? { fontFamily: `var(--font-${value}, inherit)` }\n : undefined;\n}\n\nconst HEADING_VISUAL_SIZE: Record<string, string> = {\n xs: \"1rem\",\n sm: \"1.25rem\",\n md: \"1.5rem\",\n lg: \"2rem\",\n xl: \"2.5rem\",\n display: \"clamp(2.25rem, calc(1.25rem + 4vw), 4.5rem)\",\n};\n\n/** Declared typography works without the host compiling generated utility classes. */\nfunction typographyStyle(props: Record<string, unknown>, heading = false): CSSProperties {\n const style: CSSProperties = { ...fontRoleStyle(props.font) };\n const size = typeof props.size === \"string\" ? props.size : \"\";\n const headingSize = Object.hasOwn(HEADING_VISUAL_SIZE, size)\n ? HEADING_VISUAL_SIZE[size]\n : undefined;\n if (heading && headingSize) {\n style.fontSize = headingSize;\n style.lineHeight = size === \"display\" ? 1.1 : 1.25;\n style.overflowWrap = \"anywhere\";\n } else if (!heading && size === \"lead\") {\n style.fontSize = \"clamp(1.125rem, calc(1rem + 0.5vw), 1.375rem)\";\n style.lineHeight = 1.6;\n style.overflowWrap = \"anywhere\";\n }\n const widths = heading\n ? { narrow: \"16ch\", normal: \"24ch\", wide: \"36ch\" }\n : { narrow: \"45ch\", normal: \"65ch\", wide: \"80ch\" };\n const measure = props.measure;\n if (measure === \"narrow\" || measure === \"normal\" || measure === \"wide\") {\n style.maxInlineSize = widths[measure];\n style.overflowWrap = \"anywhere\";\n }\n const align = props.align;\n if (align === \"start\" || align === \"center\" || align === \"end\") style.textAlign = align;\n return style;\n}\n\n/** Section heading (h1–h6) */\nexport const Heading: RendererComponent = (props) => {\n const lvl = typeof props[\"level\"] === \"number\" ? Math.min(6, Math.max(1, props[\"level\"])) : 2;\n const size = HEADING_SIZE[lvl] ?? \"text-3xl\";\n const weight = lvl <= 2 ? \"font-bold\" : \"font-semibold\";\n const text = typeof props[\"text\"] === \"string\" ? props[\"text\"] : \"\";\n const muted = props[\"muted\"] === true ? \"text-muted-foreground\" : \"text-foreground\";\n const cls = cn(\n \"uibot-heading tracking-tight leading-tight\",\n size,\n weight,\n muted,\n typeof props.className === \"string\" ? props.className : \"\",\n );\n const Tag = `h${lvl}` as \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n return (\n <Tag className={cls} style={typographyStyle(props, true)} data-uibot-type=\"Heading\">\n {text}\n </Tag>\n );\n};\n\n/** Body paragraph text */\nexport const Paragraph: RendererComponent = (props) => (\n <p\n style={typographyStyle(props)}\n className={cn(\n \"uibot-paragraph leading-relaxed\",\n props[\"size\"] === \"sm\" ? \"text-sm\" : props[\"size\"] === \"lg\" ? \"text-lg\" : \"text-sm\",\n props[\"muted\"] === true ? \"text-muted-foreground\" : \"text-foreground\",\n typeof props.className === \"string\" ? props.className : \"\",\n )}\n data-uibot-type=\"Paragraph\"\n >\n {typeof props[\"text\"] === \"string\" ? props[\"text\"] : \"\"}\n </p>\n);\n",
17
17
  "type": "registry:ui"
18
18
  },
19
19
  {
20
20
  "path": "components/uibot/data.uibot.json",
21
21
  "target": "components/uibot/data.uibot.json",
22
- "content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"data\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"Heading\",\n \"export\": \"Heading\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Heading\",\n \"description\": \"Semantic heading tag h1–h6 with size automatically mapped to the level.\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"text\",\n \"heading\",\n \"typography\"\n ],\n \"props\": {\n \"className\": {\n \"type\": \"string\",\n \"description\": \"Additional Tailwind utility classes\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"level\": {\n \"type\": \"integer\",\n \"default\": 2,\n \"description\": \"1=largest, 6=smallest\"\n },\n \"muted\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Render in muted-foreground\"\n }\n },\n \"usageScenarios\": [\n \"Section title above a Table or Card\",\n \"Hero headline on a landing page\"\n ],\n \"constraints\": [\n \"Use only one h1 per page\"\n ]\n }\n },\n {\n \"name\": \"List\",\n \"export\": \"List\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"List\",\n \"description\": \"Unordered list of child blocks. Use with divided or compact for different visual densities.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"list\"\n ],\n \"props\": {\n \"divided\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Add hairline dividers between items\"\n },\n \"compact\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"label\": {\n \"type\": \"string\",\n \"description\": \"ARIA label\"\n }\n },\n \"usageScenarios\": [\n \"Recent activity feed\",\n \"Search result list\"\n ],\n \"constraints\": []\n }\n },\n {\n \"name\": \"Markdown\",\n \"export\": \"Markdown\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Markdown\",\n \"description\": \"Renders Markdown source into HTML. Supports # headings, **bold**, *italic*, `code`, and - lists.\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"text\",\n \"markdown\",\n \"content\"\n ],\n \"props\": {\n \"content\": {\n \"type\": \"string\",\n \"description\": \"Markdown source text\"\n }\n },\n \"usageScenarios\": [\n \"Documentation sections\",\n \"Feature descriptions on a landing page\",\n \"Release notes\"\n ],\n \"constraints\": [\n \"No HTML injection; only Markdown syntax is parsed\"\n ]\n }\n },\n {\n \"name\": \"Paragraph\",\n \"export\": \"Paragraph\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Paragraph\",\n \"description\": \"Body text block. Use size='lg' for lead copy, size='sm' for captions.\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"text\",\n \"typography\"\n ],\n \"props\": {\n \"className\": {\n \"type\": \"string\",\n \"description\": \"Additional Tailwind utility classes\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"size\": {\n \"type\": \"string\",\n \"enum\": [\n \"sm\",\n \"md\",\n \"lg\"\n ],\n \"default\": \"md\"\n },\n \"muted\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n },\n \"usageScenarios\": [\n \"Feature description below a Heading\",\n \"Helper caption below a form field\"\n ],\n \"constraints\": []\n }\n },\n {\n \"name\": \"Stat\",\n \"export\": \"Stat\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Stat\",\n \"description\": \"KPI metric card: large value, label, optional trend arrow, and change string.\",\n \"category\": \"primitive\",\n \"level\": \"L2\",\n \"tags\": [\n \"stat\",\n \"kpi\",\n \"metric\"\n ],\n \"props\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\",\n \"description\": \"Main metric value, e.g. 1,234 or $12k\"\n },\n \"change\": {\n \"type\": \"string\",\n \"description\": \"Change label, e.g. \\\"+12% vs last month\\\"\"\n },\n \"trend\": {\n \"type\": \"string\",\n \"enum\": [\n \"up\",\n \"down\"\n ]\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"Secondary helper text\"\n }\n },\n \"usageScenarios\": [\n \"Dashboard KPI row (4 Stat blocks side-by-side in a Box[direction=row])\",\n \"Single revenue metric in a Card\"\n ],\n \"constraints\": [\n \"Do not put detailed charts inside a Stat; use Stat only for a single number + context\"\n ]\n }\n },\n {\n \"name\": \"Table\",\n \"export\": \"Table\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Table\",\n \"description\": \"Data grid with typed columns and row data. Columns define keys and display labels.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"table\",\n \"grid\",\n \"data\"\n ],\n \"props\": {\n \"columns\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"key\": {\n \"type\": \"string\"\n },\n \"label\": {\n \"type\": \"string\"\n },\n \"align\": {\n \"type\": \"string\",\n \"enum\": [\n \"left\",\n \"center\",\n \"right\"\n ]\n }\n }\n },\n \"description\": \"[{key, label, align?}]\"\n },\n \"rows\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\"\n },\n \"description\": \"Array of data objects keyed to column.key\"\n },\n \"emptyText\": {\n \"type\": \"string\",\n \"default\": \"No data\"\n },\n \"striped\": {\n \"type\": \"boolean\",\n \"default\": true\n },\n \"caption\": {\n \"type\": \"string\"\n }\n },\n \"usageScenarios\": [\n \"User management list\",\n \"Order history table\",\n \"API endpoint catalog\"\n ],\n \"constraints\": [\n \"rows entries must have keys matching column.key; missing keys render empty string\",\n \"Avoid more than 8 columns\"\n ]\n }\n }\n ]\n}\n",
22
+ "content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"data\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"Heading\",\n \"export\": \"Heading\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Heading\",\n \"description\": \"Semantic h1–h6. Optional visual size is independent of level; display scales with the viewport.\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"text\",\n \"heading\",\n \"typography\"\n ],\n \"props\": {\n \"className\": {\n \"type\": \"string\",\n \"description\": \"Tailwind classes\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"font\": {\n \"type\": \"string\",\n \"enum\": [\n \"inherit\",\n \"display\",\n \"body\",\n \"mono\"\n ],\n \"description\": \"Theme font role.\"\n },\n \"size\": {\n \"type\": \"string\",\n \"enum\": [\n \"xs\",\n \"sm\",\n \"md\",\n \"lg\",\n \"xl\",\n \"display\"\n ],\n \"description\": \"16/20/24/32/40px; display: fluid 36–72px.\"\n },\n \"measure\": {\n \"type\": \"string\",\n \"enum\": [\n \"narrow\",\n \"normal\",\n \"wide\"\n ],\n \"description\": \"Max line width: 16/24/36ch.\"\n },\n \"align\": {\n \"type\": \"string\",\n \"enum\": [\n \"start\",\n \"center\",\n \"end\"\n ],\n \"description\": \"Text alignment, not block placement.\"\n },\n \"level\": {\n \"type\": \"integer\",\n \"default\": 2,\n \"description\": \"Semantic heading level 1–6.\"\n },\n \"muted\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Render in muted-foreground\"\n }\n },\n \"usageScenarios\": [\n \"Section title above a Table or Card\",\n \"Hero headline on a landing page\"\n ],\n \"constraints\": [\n \"Use only one h1 per page\"\n ]\n }\n },\n {\n \"name\": \"List\",\n \"export\": \"List\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"List\",\n \"description\": \"Unordered list of child blocks. Use with divided or compact for different visual densities.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"list\"\n ],\n \"props\": {\n \"divided\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Add hairline dividers between items\"\n },\n \"compact\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"label\": {\n \"type\": \"string\",\n \"description\": \"ARIA label\"\n }\n },\n \"usageScenarios\": [\n \"Recent activity feed\",\n \"Search result list\"\n ],\n \"constraints\": []\n }\n },\n {\n \"name\": \"Markdown\",\n \"export\": \"Markdown\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Markdown\",\n \"description\": \"Renders Markdown source into HTML. Supports # headings, **bold**, *italic*, `code`, and - lists.\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"text\",\n \"markdown\",\n \"content\"\n ],\n \"props\": {\n \"content\": {\n \"type\": \"string\",\n \"description\": \"Markdown source text\"\n }\n },\n \"usageScenarios\": [\n \"Documentation sections\",\n \"Feature descriptions on a landing page\",\n \"Release notes\"\n ],\n \"constraints\": [\n \"No HTML injection; only Markdown syntax is parsed\"\n ]\n }\n },\n {\n \"name\": \"Paragraph\",\n \"export\": \"Paragraph\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Paragraph\",\n \"description\": \"Body text block. Use lead for fluid introductory copy; optional measure bounds reading width.\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"text\",\n \"typography\"\n ],\n \"props\": {\n \"className\": {\n \"type\": \"string\",\n \"description\": \"Tailwind classes\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"font\": {\n \"type\": \"string\",\n \"enum\": [\n \"inherit\",\n \"display\",\n \"body\",\n \"mono\"\n ],\n \"description\": \"Theme font role.\"\n },\n \"size\": {\n \"type\": \"string\",\n \"enum\": [\n \"sm\",\n \"md\",\n \"lg\",\n \"lead\"\n ],\n \"default\": \"md\",\n \"description\": \"lead: fluid 18–22px; legacy sizes unchanged.\"\n },\n \"measure\": {\n \"type\": \"string\",\n \"enum\": [\n \"narrow\",\n \"normal\",\n \"wide\"\n ],\n \"description\": \"Max line width: 45/65/80ch.\"\n },\n \"align\": {\n \"type\": \"string\",\n \"enum\": [\n \"start\",\n \"center\",\n \"end\"\n ],\n \"description\": \"Text alignment, not block placement.\"\n },\n \"muted\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n },\n \"usageScenarios\": [\n \"Feature description below a Heading\",\n \"Helper caption below a form field\"\n ],\n \"constraints\": []\n }\n },\n {\n \"name\": \"Stat\",\n \"export\": \"Stat\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Stat\",\n \"description\": \"KPI metric card: large value, label, optional trend arrow, and change string.\",\n \"category\": \"primitive\",\n \"level\": \"L2\",\n \"tags\": [\n \"stat\",\n \"kpi\",\n \"metric\"\n ],\n \"props\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\",\n \"description\": \"Main metric value, e.g. 1,234 or $12k\"\n },\n \"change\": {\n \"type\": \"string\",\n \"description\": \"Change label, e.g. \\\"+12% vs last month\\\"\"\n },\n \"trend\": {\n \"type\": \"string\",\n \"enum\": [\n \"up\",\n \"down\"\n ]\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"Secondary helper text\"\n }\n },\n \"usageScenarios\": [\n \"Dashboard KPI row (4 Stat blocks side-by-side in a Box[direction=row])\",\n \"Single revenue metric in a Card\"\n ],\n \"constraints\": [\n \"Do not put detailed charts inside a Stat; use Stat only for a single number + context\"\n ]\n }\n },\n {\n \"name\": \"Table\",\n \"export\": \"Table\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Table\",\n \"description\": \"Data grid with typed columns and row data. Columns define keys and display labels.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"table\",\n \"grid\",\n \"data\"\n ],\n \"props\": {\n \"columns\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"key\": {\n \"type\": \"string\"\n },\n \"label\": {\n \"type\": \"string\"\n },\n \"align\": {\n \"type\": \"string\",\n \"enum\": [\n \"left\",\n \"center\",\n \"right\"\n ]\n }\n }\n },\n \"description\": \"[{key, label, align?}]\"\n },\n \"rows\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\"\n },\n \"description\": \"Rows keyed to column.key\"\n },\n \"emptyText\": {\n \"type\": \"string\",\n \"default\": \"No data\"\n },\n \"striped\": {\n \"type\": \"boolean\",\n \"default\": true\n },\n \"caption\": {\n \"type\": \"string\"\n }\n },\n \"usageScenarios\": [\n \"User management list\",\n \"Order history table\",\n \"API endpoint catalog\"\n ],\n \"constraints\": [\n \"rows entries must have keys matching column.key; missing keys render empty string\",\n \"Avoid more than 8 columns\"\n ]\n }\n }\n ]\n}\n",
23
23
  "type": "registry:ui"
24
24
  }
25
25
  ],
@@ -65,7 +65,7 @@
65
65
  "module": "data.tsx",
66
66
  "catalog": {
67
67
  "name": "Heading",
68
- "description": "Semantic heading tag h1–h6 with size automatically mapped to the level.",
68
+ "description": "Semantic h1–h6. Optional visual size is independent of level; display scales with the viewport.",
69
69
  "category": "primitive",
70
70
  "level": "L1",
71
71
  "tags": [
@@ -76,15 +76,55 @@
76
76
  "props": {
77
77
  "className": {
78
78
  "type": "string",
79
- "description": "Additional Tailwind utility classes"
79
+ "description": "Tailwind classes"
80
80
  },
81
81
  "text": {
82
82
  "type": "string"
83
83
  },
84
+ "font": {
85
+ "type": "string",
86
+ "enum": [
87
+ "inherit",
88
+ "display",
89
+ "body",
90
+ "mono"
91
+ ],
92
+ "description": "Theme font role."
93
+ },
94
+ "size": {
95
+ "type": "string",
96
+ "enum": [
97
+ "xs",
98
+ "sm",
99
+ "md",
100
+ "lg",
101
+ "xl",
102
+ "display"
103
+ ],
104
+ "description": "16/20/24/32/40px; display: fluid 36–72px."
105
+ },
106
+ "measure": {
107
+ "type": "string",
108
+ "enum": [
109
+ "narrow",
110
+ "normal",
111
+ "wide"
112
+ ],
113
+ "description": "Max line width: 16/24/36ch."
114
+ },
115
+ "align": {
116
+ "type": "string",
117
+ "enum": [
118
+ "start",
119
+ "center",
120
+ "end"
121
+ ],
122
+ "description": "Text alignment, not block placement."
123
+ },
84
124
  "level": {
85
125
  "type": "integer",
86
126
  "default": 2,
87
- "description": "1=largest, 6=smallest"
127
+ "description": "Semantic heading level 1–6."
88
128
  },
89
129
  "muted": {
90
130
  "type": "boolean",
@@ -171,7 +211,7 @@
171
211
  "module": "data.tsx",
172
212
  "catalog": {
173
213
  "name": "Paragraph",
174
- "description": "Body text block. Use size='lg' for lead copy, size='sm' for captions.",
214
+ "description": "Body text block. Use lead for fluid introductory copy; optional measure bounds reading width.",
175
215
  "category": "primitive",
176
216
  "level": "L1",
177
217
  "tags": [
@@ -181,19 +221,49 @@
181
221
  "props": {
182
222
  "className": {
183
223
  "type": "string",
184
- "description": "Additional Tailwind utility classes"
224
+ "description": "Tailwind classes"
185
225
  },
186
226
  "text": {
187
227
  "type": "string"
188
228
  },
229
+ "font": {
230
+ "type": "string",
231
+ "enum": [
232
+ "inherit",
233
+ "display",
234
+ "body",
235
+ "mono"
236
+ ],
237
+ "description": "Theme font role."
238
+ },
189
239
  "size": {
190
240
  "type": "string",
191
241
  "enum": [
192
242
  "sm",
193
243
  "md",
194
- "lg"
244
+ "lg",
245
+ "lead"
246
+ ],
247
+ "default": "md",
248
+ "description": "lead: fluid 18–22px; legacy sizes unchanged."
249
+ },
250
+ "measure": {
251
+ "type": "string",
252
+ "enum": [
253
+ "narrow",
254
+ "normal",
255
+ "wide"
256
+ ],
257
+ "description": "Max line width: 45/65/80ch."
258
+ },
259
+ "align": {
260
+ "type": "string",
261
+ "enum": [
262
+ "start",
263
+ "center",
264
+ "end"
195
265
  ],
196
- "default": "md"
266
+ "description": "Text alignment, not block placement."
197
267
  },
198
268
  "muted": {
199
269
  "type": "boolean",
@@ -297,7 +367,7 @@
297
367
  "items": {
298
368
  "type": "object"
299
369
  },
300
- "description": "Array of data objects keyed to column.key"
370
+ "description": "Rows keyed to column.key"
301
371
  },
302
372
  "emptyText": {
303
373
  "type": "string",
@@ -0,0 +1,54 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "document-assistant",
4
+ "type": "registry:block",
5
+ "description": "Document with an assistant: shared rich editor with revision-aware host saves and protected drafts.",
6
+ "registryDependencies": [
7
+ "@uibot/chat-workspace",
8
+ "@uibot/document-workspace",
9
+ "@uibot/grid"
10
+ ],
11
+ "files": [
12
+ {
13
+ "path": "lib/uibot/templates/document-assistant.uibot.yaml",
14
+ "target": "lib/uibot/templates/document-assistant.uibot.yaml",
15
+ "content": "version: \"2.0\"\npages:\n - id: document-assistant\n path: /document-assistant\n title: Document with an assistant\n blocks:\n - type: Grid\n props:\n cols: 2\n gap: md\n children:\n - id: document-assistant-editor\n type: DocumentWorkspace\n props:\n bindingId: document\n title: Document with an assistant\n markdown: |-\n # Project notes\n\n Capture the decisions behind your next idea.\n\n ## Overview\n\n Write, select text, and explore the formatting controls.\n\n ## Next steps\n\n - Review the draft\n - Connect your document host\n readOnly: false\n autoSaveMs: 1500\n locale: zh-CN\n previewState: ready\n variant: assistant\n - id: document-assistant-chat\n type: ChatWorkspace\n props:\n bindingId: chat\n variant: copilot\n title: Writing assistant / 写作助手\n",
16
+ "type": "registry:lib"
17
+ },
18
+ {
19
+ "path": "lib/uibot/templates/document-assistant.uibot.json",
20
+ "target": "lib/uibot/templates/document-assistant.uibot.json",
21
+ "content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"document-assistant\",\n \"channel\": \"public\",\n \"template\": {\n \"file\": \"document-assistant.uibot.yaml\",\n \"contract\": {\n \"name\": \"document-assistant\",\n \"description\": \"Document with an assistant: shared rich editor with revision-aware host saves and protected drafts.\",\n \"level\": \"L4\",\n \"category\": \"page\",\n \"keywords\": [\n \"document-assistant\",\n \"文档与 AI 双栏\",\n \"Document with an assistant\",\n \"documents\",\n \"chat\",\n \"assistant\"\n ],\n \"composedFrom\": [\n \"Grid\",\n \"DocumentWorkspace\",\n \"ChatWorkspace\"\n ]\n }\n }\n}\n",
22
+ "type": "registry:lib"
23
+ }
24
+ ],
25
+ "meta": {
26
+ "uibot": {
27
+ "schema": "uibot.registry.item.v1",
28
+ "item": "document-assistant",
29
+ "channel": "public",
30
+ "template": {
31
+ "file": "document-assistant.uibot.yaml",
32
+ "contract": {
33
+ "name": "document-assistant",
34
+ "description": "Document with an assistant: shared rich editor with revision-aware host saves and protected drafts.",
35
+ "level": "L4",
36
+ "category": "page",
37
+ "keywords": [
38
+ "document-assistant",
39
+ "文档与 AI 双栏",
40
+ "Document with an assistant",
41
+ "documents",
42
+ "chat",
43
+ "assistant"
44
+ ],
45
+ "composedFrom": [
46
+ "Grid",
47
+ "DocumentWorkspace",
48
+ "ChatWorkspace"
49
+ ]
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "document-library",
4
+ "type": "registry:block",
5
+ "description": "Document library: shared rich editor with revision-aware host saves and protected drafts.",
6
+ "registryDependencies": [
7
+ "@uibot/document-workspace"
8
+ ],
9
+ "files": [
10
+ {
11
+ "path": "lib/uibot/templates/document-library.uibot.yaml",
12
+ "target": "lib/uibot/templates/document-library.uibot.yaml",
13
+ "content": "version: \"2.0\"\npages:\n - id: document-library\n path: /document-library\n title: Document library\n blocks:\n - id: document-library-editor\n type: DocumentWorkspace\n props:\n bindingId: document\n title: Document library\n markdown: |-\n # Project notes\n\n Capture the decisions behind your next idea.\n\n ## Overview\n\n Write, select text, and explore the formatting controls.\n\n ## Next steps\n\n - Review the draft\n - Connect your document host\n readOnly: false\n autoSaveMs: 1500\n locale: zh-CN\n previewState: ready\n variant: library\n",
14
+ "type": "registry:lib"
15
+ },
16
+ {
17
+ "path": "lib/uibot/templates/document-library.uibot.json",
18
+ "target": "lib/uibot/templates/document-library.uibot.json",
19
+ "content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"document-library\",\n \"channel\": \"public\",\n \"template\": {\n \"file\": \"document-library.uibot.yaml\",\n \"contract\": {\n \"name\": \"document-library\",\n \"description\": \"Document library: shared rich editor with revision-aware host saves and protected drafts.\",\n \"level\": \"L4\",\n \"category\": \"page\",\n \"keywords\": [\n \"document-library\",\n \"文档列表与编辑\",\n \"Document library\",\n \"documents\",\n \"library\"\n ],\n \"composedFrom\": [\n \"DocumentWorkspace\"\n ]\n }\n }\n}\n",
20
+ "type": "registry:lib"
21
+ }
22
+ ],
23
+ "meta": {
24
+ "uibot": {
25
+ "schema": "uibot.registry.item.v1",
26
+ "item": "document-library",
27
+ "channel": "public",
28
+ "template": {
29
+ "file": "document-library.uibot.yaml",
30
+ "contract": {
31
+ "name": "document-library",
32
+ "description": "Document library: shared rich editor with revision-aware host saves and protected drafts.",
33
+ "level": "L4",
34
+ "category": "page",
35
+ "keywords": [
36
+ "document-library",
37
+ "文档列表与编辑",
38
+ "Document library",
39
+ "documents",
40
+ "library"
41
+ ],
42
+ "composedFrom": [
43
+ "DocumentWorkspace"
44
+ ]
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "document-reading",
4
+ "type": "registry:block",
5
+ "description": "Reading with an outline: shared rich editor with revision-aware host saves and protected drafts.",
6
+ "registryDependencies": [
7
+ "@uibot/document-workspace"
8
+ ],
9
+ "files": [
10
+ {
11
+ "path": "lib/uibot/templates/document-reading.uibot.yaml",
12
+ "target": "lib/uibot/templates/document-reading.uibot.yaml",
13
+ "content": "version: \"2.0\"\npages:\n - id: document-reading\n path: /document-reading\n title: Reading with an outline\n blocks:\n - id: document-reading-editor\n type: DocumentWorkspace\n props:\n bindingId: document\n title: Reading with an outline\n markdown: |-\n # Project notes\n\n Capture the decisions behind your next idea.\n\n ## Overview\n\n Write, select text, and explore the formatting controls.\n\n ## Next steps\n\n - Review the draft\n - Connect your document host\n readOnly: true\n autoSaveMs: 1500\n locale: zh-CN\n previewState: ready\n variant: reading\n",
14
+ "type": "registry:lib"
15
+ },
16
+ {
17
+ "path": "lib/uibot/templates/document-reading.uibot.json",
18
+ "target": "lib/uibot/templates/document-reading.uibot.json",
19
+ "content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"document-reading\",\n \"channel\": \"public\",\n \"template\": {\n \"file\": \"document-reading.uibot.yaml\",\n \"contract\": {\n \"name\": \"document-reading\",\n \"description\": \"Reading with an outline: shared rich editor with revision-aware host saves and protected drafts.\",\n \"level\": \"L4\",\n \"category\": \"page\",\n \"keywords\": [\n \"document-reading\",\n \"目录阅读\",\n \"Reading with an outline\",\n \"documents\",\n \"reading\"\n ],\n \"composedFrom\": [\n \"DocumentWorkspace\"\n ]\n }\n }\n}\n",
20
+ "type": "registry:lib"
21
+ }
22
+ ],
23
+ "meta": {
24
+ "uibot": {
25
+ "schema": "uibot.registry.item.v1",
26
+ "item": "document-reading",
27
+ "channel": "public",
28
+ "template": {
29
+ "file": "document-reading.uibot.yaml",
30
+ "contract": {
31
+ "name": "document-reading",
32
+ "description": "Reading with an outline: shared rich editor with revision-aware host saves and protected drafts.",
33
+ "level": "L4",
34
+ "category": "page",
35
+ "keywords": [
36
+ "document-reading",
37
+ "目录阅读",
38
+ "Reading with an outline",
39
+ "documents",
40
+ "reading"
41
+ ],
42
+ "composedFrom": [
43
+ "DocumentWorkspace"
44
+ ]
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,164 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "document-workspace",
4
+ "type": "registry:ui",
5
+ "description": "Rich document editing using the shared editor and host-owned revision/CAS client.",
6
+ "dependencies": [
7
+ "react@19.3.0",
8
+ "@uibot/document-editor@0.19.0"
9
+ ],
10
+ "registryDependencies": [
11
+ "@uibot/uibot-base"
12
+ ],
13
+ "files": [
14
+ {
15
+ "path": "components/uibot/document-workspace.tsx",
16
+ "target": "components/uibot/document-workspace.tsx",
17
+ "content": "import { createElement } from \"react\";\nimport { DocumentWorkspace as View } from \"@uibot/document-editor/spec\";\nexport function DocumentWorkspace(props: Record<string, unknown>) {\n return createElement(View, props);\n}\n",
18
+ "type": "registry:ui"
19
+ },
20
+ {
21
+ "path": "components/uibot/document-workspace.uibot.json",
22
+ "target": "components/uibot/document-workspace.uibot.json",
23
+ "content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"document-workspace\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"DocumentWorkspace\",\n \"export\": \"DocumentWorkspace\",\n \"module\": \"document-workspace.tsx\",\n \"catalog\": {\n \"name\": \"DocumentWorkspace\",\n \"description\": \"Rich document editing using the shared editor and host-owned revision/CAS client.\",\n \"category\": \"feature\",\n \"level\": \"L2\",\n \"props\": {\n \"variant\": {\n \"enum\": [\n \"writing\",\n \"reading\",\n \"library\",\n \"assistant\"\n ],\n \"default\": \"writing\"\n },\n \"bindingId\": {\n \"type\": \"string\",\n \"default\": \"document\"\n },\n \"title\": {\n \"type\": \"string\",\n \"default\": \"Untitled / 无标题\"\n },\n \"markdown\": {\n \"type\": \"string\",\n \"default\": \"# Your next idea\\n\\nWrite something useful.\"\n },\n \"readOnly\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"autoSaveMs\": {\n \"type\": \"number\",\n \"default\": 1500\n },\n \"locale\": {\n \"enum\": [\n \"zh-CN\",\n \"en\"\n ],\n \"default\": \"zh-CN\"\n },\n \"previewState\": {\n \"enum\": [\n \"ready\",\n \"empty\",\n \"loading\",\n \"error\",\n \"conflict\",\n \"readonly\"\n ],\n \"default\": \"ready\"\n }\n },\n \"events\": {},\n \"tags\": [\n \"interactive\",\n \"documents\",\n \"editor\",\n \"writing\"\n ],\n \"constraints\": [\n \"Inject an authorized document/client binding. Local preview saves are not persistence receipts.\"\n ]\n }\n }\n ]\n}\n",
24
+ "type": "registry:ui"
25
+ }
26
+ ],
27
+ "meta": {
28
+ "category": "feature",
29
+ "level": "L2",
30
+ "props": {
31
+ "variant": {
32
+ "enum": [
33
+ "writing",
34
+ "reading",
35
+ "library",
36
+ "assistant"
37
+ ],
38
+ "default": "writing"
39
+ },
40
+ "bindingId": {
41
+ "type": "string",
42
+ "default": "document"
43
+ },
44
+ "title": {
45
+ "type": "string",
46
+ "default": "Untitled / 无标题"
47
+ },
48
+ "markdown": {
49
+ "type": "string",
50
+ "default": "# Your next idea\n\nWrite something useful."
51
+ },
52
+ "readOnly": {
53
+ "type": "boolean",
54
+ "default": false
55
+ },
56
+ "autoSaveMs": {
57
+ "type": "number",
58
+ "default": 1500
59
+ },
60
+ "locale": {
61
+ "enum": [
62
+ "zh-CN",
63
+ "en"
64
+ ],
65
+ "default": "zh-CN"
66
+ },
67
+ "previewState": {
68
+ "enum": [
69
+ "ready",
70
+ "empty",
71
+ "loading",
72
+ "error",
73
+ "conflict",
74
+ "readonly"
75
+ ],
76
+ "default": "ready"
77
+ }
78
+ },
79
+ "events": {},
80
+ "constraints": [
81
+ "Inject an authorized document/client binding. Local preview saves are not persistence receipts."
82
+ ],
83
+ "provides": [
84
+ "DocumentWorkspace"
85
+ ],
86
+ "uibot": {
87
+ "schema": "uibot.registry.item.v1",
88
+ "item": "document-workspace",
89
+ "channel": "public",
90
+ "components": [
91
+ {
92
+ "name": "DocumentWorkspace",
93
+ "export": "DocumentWorkspace",
94
+ "module": "document-workspace.tsx",
95
+ "catalog": {
96
+ "name": "DocumentWorkspace",
97
+ "description": "Rich document editing using the shared editor and host-owned revision/CAS client.",
98
+ "category": "feature",
99
+ "level": "L2",
100
+ "props": {
101
+ "variant": {
102
+ "enum": [
103
+ "writing",
104
+ "reading",
105
+ "library",
106
+ "assistant"
107
+ ],
108
+ "default": "writing"
109
+ },
110
+ "bindingId": {
111
+ "type": "string",
112
+ "default": "document"
113
+ },
114
+ "title": {
115
+ "type": "string",
116
+ "default": "Untitled / 无标题"
117
+ },
118
+ "markdown": {
119
+ "type": "string",
120
+ "default": "# Your next idea\n\nWrite something useful."
121
+ },
122
+ "readOnly": {
123
+ "type": "boolean",
124
+ "default": false
125
+ },
126
+ "autoSaveMs": {
127
+ "type": "number",
128
+ "default": 1500
129
+ },
130
+ "locale": {
131
+ "enum": [
132
+ "zh-CN",
133
+ "en"
134
+ ],
135
+ "default": "zh-CN"
136
+ },
137
+ "previewState": {
138
+ "enum": [
139
+ "ready",
140
+ "empty",
141
+ "loading",
142
+ "error",
143
+ "conflict",
144
+ "readonly"
145
+ ],
146
+ "default": "ready"
147
+ }
148
+ },
149
+ "events": {},
150
+ "tags": [
151
+ "interactive",
152
+ "documents",
153
+ "editor",
154
+ "writing"
155
+ ],
156
+ "constraints": [
157
+ "Inject an authorized document/client binding. Local preview saves are not persistence receipts."
158
+ ]
159
+ }
160
+ }
161
+ ]
162
+ }
163
+ }
164
+ }