@uibot/cli 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 (127) hide show
  1. package/README.md +8 -0
  2. package/dist/cli.js +152 -148
  3. package/dist/commands/app.d.ts +10 -0
  4. package/dist/commands/resource.d.ts +1 -0
  5. package/dist/distribution-snapshot.d.ts +38 -0
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.js +12029 -214
  8. package/dist/resource-runtime.d.ts +1 -0
  9. package/dist/resources/bundle.json +1 -1
  10. package/dist/shells/shadcn-admin-shell.yaml +5 -4
  11. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/licenses/UIBot-LICENSE +21 -0
  12. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/licenses/blocks-icons-LICENSE +46 -0
  13. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/licenses/shadcn-THIRD_PARTY_LICENSE +21 -0
  14. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-apps.json +61 -0
  15. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-chats.json +54 -0
  16. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-dashboard.json +70 -0
  17. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-error-401.json +54 -0
  18. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-error-403.json +54 -0
  19. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-error-404.json +54 -0
  20. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-error-500.json +54 -0
  21. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-error-503.json +54 -0
  22. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-forgot-password.json +59 -0
  23. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-help.json +53 -0
  24. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-otp.json +59 -0
  25. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-overview.json +62 -0
  26. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-settings-account.json +61 -0
  27. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-settings-appearance.json +61 -0
  28. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-settings-display.json +61 -0
  29. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-settings-notifications.json +61 -0
  30. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-settings-profile.json +61 -0
  31. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-settings.json +65 -0
  32. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-shell.json +160 -0
  33. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-sign-in-2.json +67 -0
  34. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-sign-in.json +59 -0
  35. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-sign-up.json +59 -0
  36. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-tasks.json +66 -0
  37. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/admin-users.json +66 -0
  38. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/ai-chat.json +74 -0
  39. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/analytics-dashboard.json +65 -0
  40. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/app-shell-floating.json +54 -0
  41. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/app-shell-icon-rail.json +54 -0
  42. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/app-shell-inset.json +54 -0
  43. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/app-shell-settings.json +54 -0
  44. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/app-shell-sidebar.json +54 -0
  45. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/app-shell-workspace.json +54 -0
  46. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/auth-centered.json +61 -0
  47. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/auth-enterprise.json +61 -0
  48. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/auth-recovery.json +64 -0
  49. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/auth-registration.json +63 -0
  50. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/auth-split.json +67 -0
  51. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/auth.json +61 -0
  52. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/blog.json +64 -0
  53. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/charts.json +211 -0
  54. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/chat-artifact.json +49 -0
  55. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/chat-focused.json +49 -0
  56. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/chat-history.json +49 -0
  57. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/chat-knowledge.json +49 -0
  58. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/chat-support.json +49 -0
  59. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/chat-workspace.json +136 -0
  60. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/collection-shared.json +23 -0
  61. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/commerce-workspace.json +69 -0
  62. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/console-billing.json +68 -0
  63. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/console-page.json +289 -0
  64. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/console-shell.json +29 -0
  65. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/content.json +444 -0
  66. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/creation-shared.json +24 -0
  67. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/crm-workspace.json +73 -0
  68. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/crm.json +67 -0
  69. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/dashboard.json +147 -0
  70. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/data-studio.json +368 -0
  71. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/data-table.json +242 -0
  72. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/data.json +398 -0
  73. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/document-assistant.json +54 -0
  74. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/document-library.json +49 -0
  75. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/document-reading.json +49 -0
  76. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/document-workspace.json +164 -0
  77. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/document-writing.json +49 -0
  78. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/drilldown-menu.json +233 -0
  79. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/ecommerce.json +65 -0
  80. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/education-workspace.json +82 -0
  81. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/feedback.json +331 -0
  82. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/field.json +164 -0
  83. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/form.json +429 -0
  84. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/grid.json +188 -0
  85. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/interactive.json +355 -0
  86. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/item-grid.json +219 -0
  87. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/kanban.json +154 -0
  88. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/layout.json +771 -0
  89. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/lms.json +74 -0
  90. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/marketing.json +402 -0
  91. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/nav.json +257 -0
  92. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/portfolio.json +62 -0
  93. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/presentation.json +454 -0
  94. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/pricing.json +63 -0
  95. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/primitives.json +360 -0
  96. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/saas-landing.json +60 -0
  97. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sections.json +734 -0
  98. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/settings.json +72 -0
  99. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/shadcn-admin-shell.json +49 -0
  100. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/shadcn-admin.json +77 -0
  101. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-01.json +42 -0
  102. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-02.json +42 -0
  103. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-03.json +30 -0
  104. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-04.json +30 -0
  105. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-05.json +36 -0
  106. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-06.json +42 -0
  107. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-07.json +54 -0
  108. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-08.json +54 -0
  109. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-09.json +36 -0
  110. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-10.json +66 -0
  111. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-11.json +30 -0
  112. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-12.json +48 -0
  113. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-13.json +30 -0
  114. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-14.json +30 -0
  115. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-15.json +84 -0
  116. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-16.json +66 -0
  117. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-drilldown.json +29 -0
  118. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/sidebar-primitives.json +155 -0
  119. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/store.json +75 -0
  120. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/support-inbox.json +63 -0
  121. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/team-directory.json +59 -0
  122. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/uibot-base.json +30 -0
  123. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/r/workspace.json +174 -0
  124. package/dist/snapshots/b21e710e6bf4850f18adb9af1b9d48aa59852516ad54fa63926aed9b07943545/snapshot.json +1 -0
  125. package/dist/templates/auth.yaml +84 -67
  126. package/dist/templates/shadcn-admin.yaml +12210 -122
  127. package/package.json +9 -9
@@ -0,0 +1,242 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "data-table",
4
+ "type": "registry:ui",
5
+ "description": "Configurable record table with search, facets, sorting, stable selection and pagination. Server mode emits query intent without filtering current-page rows.",
6
+ "dependencies": [
7
+ "react@19.3.0"
8
+ ],
9
+ "registryDependencies": [
10
+ "@uibot/uibot-base"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "components/uibot/data-table.tsx",
15
+ "target": "components/uibot/data-table.tsx",
16
+ "content": "import { useState } from \"react\";\nimport type { RendererComponent } from \"@/lib/uibot-renderer\";\nimport { Icon } from \"./icons\";\nimport { emit, records, text, type BlockContext } from \"./interaction\";\n\nexport interface TableView {\n search: string;\n filters: Record<string, string[]>;\n sort: string;\n descending: boolean;\n page: number;\n pageSize: number;\n hiddenColumns?: string[];\n}\nexport function projectTableRows(\n rows: Record<string, unknown>[],\n view: TableView,\n searchKeys: string[],\n) {\n const query = view.search.toLocaleLowerCase();\n const filtered = rows.filter(\n (row) =>\n (!query || searchKeys.some((key) => text(row[key]).toLocaleLowerCase().includes(query))) &&\n Object.entries(view.filters).every(\n ([key, values]) => !values.length || values.includes(text(row[key])),\n ),\n );\n if (view.sort)\n filtered.sort((a, b) => {\n const x = a[view.sort],\n y = b[view.sort];\n const cmp =\n typeof x === \"number\" && typeof y === \"number\"\n ? x - y\n : text(x).localeCompare(text(y), undefined, { numeric: true });\n return view.descending ? -cmp : cmp;\n });\n const pageSize = Math.max(1, Math.min(200, Math.floor(view.pageSize) || 10));\n const pageCount = Math.max(1, Math.ceil(filtered.length / pageSize));\n const page = Math.max(0, Math.min(Math.floor(view.page) || 0, pageCount - 1));\n return {\n rows: filtered.slice(page * pageSize, (page + 1) * pageSize),\n total: filtered.length,\n page,\n pageCount,\n };\n}\nconst control =\n \"h-9 rounded-md border bg-background px-3 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40\";\nconst tableCopy = {\n en: {\n records: \"Records\",\n search: \"Search records\",\n placeholder: \"Filter records...\",\n reset: \"Reset\",\n view: \"View\",\n selectAll: \"Select all rows on this page\",\n selectRow: (id: string) => `Select row ${id}`,\n actions: \"Actions\",\n rowActions: (id: string) => `Actions for ${id}`,\n loading: \"Loading records...\",\n error: \"Records could not be loaded.\",\n empty: \"No results.\",\n selection: (count: number, total?: number) =>\n `${count}${total === undefined ? \" \" : ` of ${total} `}row(s) selected.`,\n pageSize: \"Rows per page\",\n page: (page: number, total?: number) =>\n `Page ${page}${total === undefined ? \"\" : ` of ${total}`}`,\n previous: \"Previous\",\n previousPage: \"Previous page\",\n next: \"Next\",\n nextPage: \"Next page\",\n selected: (count: number) => `${count} selected`,\n clear: \"Clear selection\",\n },\n \"zh-CN\": {\n records: \"记录\",\n search: \"搜索记录\",\n placeholder: \"筛选记录…\",\n reset: \"重置\",\n view: \"显示列\",\n selectAll: \"选择本页全部记录\",\n selectRow: (id: string) => `选择记录 ${id}`,\n actions: \"操作\",\n rowActions: (id: string) => `记录 ${id} 的操作`,\n loading: \"正在加载记录…\",\n error: \"无法加载记录\",\n empty: \"暂无结果\",\n selection: (count: number, total?: number) =>\n `已选择 ${count} 条${total === undefined ? \"\" : `,共 ${total} 条`}`,\n pageSize: \"每页条数\",\n page: (page: number, total?: number) =>\n `第 ${page} 页${total === undefined ? \"\" : `,共 ${total} 页`}`,\n previous: \"上一页\",\n previousPage: \"上一页\",\n next: \"下一页\",\n nextPage: \"下一页\",\n selected: (count: number) => `已选择 ${count} 条`,\n clear: \"清除选择\",\n },\n};\nfunction DataTableView({ props, ctx }: { props: Record<string, unknown>; ctx: BlockContext }) {\n const copy = tableCopy[props.locale === \"zh-CN\" ? \"zh-CN\" : \"en\"];\n const rows = records(props.rows),\n columns = records(props.columns),\n facets = records(props.filters);\n const rowKey = text(props.rowKey, \"id\");\n const [localView, setView] = useState<TableView>({\n search: \"\",\n filters: {},\n sort: \"\",\n descending: false,\n page: 0,\n pageSize: Number(props.pageSize) || 10,\n hiddenColumns: [],\n });\n let supplied: unknown = props.view;\n if (typeof supplied === \"string\") {\n try {\n supplied = JSON.parse(supplied);\n } catch {\n supplied = {};\n }\n }\n const raw = supplied && typeof supplied === \"object\" ? (supplied as Record<string, unknown>) : {};\n const view: TableView = {\n ...localView,\n hiddenColumns: Array.isArray(raw.hiddenColumns)\n ? raw.hiddenColumns.filter((x): x is string => typeof x === \"string\")\n : (localView.hiddenColumns ?? []),\n search: typeof raw.search === \"string\" ? raw.search : localView.search,\n sort: typeof raw.sort === \"string\" ? raw.sort : localView.sort,\n descending: typeof raw.descending === \"boolean\" ? raw.descending : localView.descending,\n page:\n typeof raw.page === \"number\" && Number.isFinite(raw.page)\n ? Math.max(0, Math.floor(raw.page))\n : localView.page,\n pageSize:\n typeof raw.pageSize === \"number\" && Number.isFinite(raw.pageSize)\n ? Math.max(1, Math.min(200, Math.floor(raw.pageSize)))\n : localView.pageSize,\n filters:\n raw.filters && typeof raw.filters === \"object\"\n ? Object.fromEntries(\n Object.entries(raw.filters)\n .filter(([, v]) => Array.isArray(v))\n .map(([k, v]) => [\n k,\n (v as unknown[]).filter((x): x is string => typeof x === \"string\"),\n ]),\n )\n : localView.filters,\n };\n const [selected, select] = useState<string[]>([]);\n const hidden = view.hiddenColumns ?? [];\n const ids = new Set(rows.map((r) => text(r[rowKey])));\n const selectedIds = (\n Array.isArray(props.selectedIds) ? props.selectedIds.map(String) : selected\n ).filter((id) => props.server === true || ids.has(id));\n const update = (patch: Partial<TableView>) => {\n const next = { ...view, page: 0, ...patch };\n setView(next);\n emit(\n ctx,\n \"onViewChange\",\n {\n search: next.search,\n filters: JSON.stringify(next.filters),\n sort: next.sort,\n descending: next.descending,\n page: next.page,\n pageSize: next.pageSize,\n },\n JSON.stringify(next),\n );\n };\n const selectRows = (next: string[]) => {\n select(next);\n emit(ctx, \"onSelectionChange\", { ids: next });\n };\n const projected = projectTableRows(\n rows,\n view,\n Array.isArray(props.searchKeys)\n ? props.searchKeys.map(String)\n : columns.map((c) => text(c.key)),\n );\n const result =\n props.server === true\n ? {\n ...projected,\n rows,\n total:\n typeof props.total === \"number\" && Number.isFinite(props.total) && props.total >= 0\n ? props.total\n : undefined,\n page: view.page,\n }\n : projected;\n const visible = columns.filter((c) => !hidden.includes(text(c.key)));\n const pageSizes = [...new Set([10, 20, 30, 50, 100, view.pageSize])].sort((a, b) => a - b);\n const pageIds = result.rows.map((row) => text(row[rowKey]));\n const allSelected = pageIds.length > 0 && pageIds.every((id) => selectedIds.includes(id));\n const partlySelected = !allSelected && pageIds.some((id) => selectedIds.includes(id));\n const busy = props.loading === true;\n const error = text(props.error);\n return (\n <section\n data-uibot-type=\"DataTable\"\n className=\"uibot-data-table space-y-4\"\n aria-label={text(props.label, copy.records)}\n aria-busy={busy}\n >\n <div className=\"flex flex-wrap items-center gap-2\">\n <input\n className={`${control} w-full sm:w-64`}\n aria-label={copy.search}\n placeholder={text(props.searchPlaceholder, copy.placeholder)}\n value={view.search}\n onChange={(e) => update({ search: e.target.value })}\n />\n {facets.map((facet) => (\n <details key={text(facet.key)} className=\"relative\">\n <summary className={`${control} flex cursor-pointer items-center gap-2 border-dashed`}>\n {text(facet.label)}\n {(view.filters[text(facet.key)]?.length ?? 0) > 0 && (\n <span className=\"rounded bg-muted px-1.5\">\n {view.filters[text(facet.key)]?.length}\n </span>\n )}\n </summary>\n <div className=\"absolute start-0 z-20 mt-1 min-w-44 rounded-md border bg-popover p-2 shadow-md\">\n {records(facet.options).map((option) => {\n const values = view.filters[text(facet.key)] ?? [],\n value = text(option.value);\n return (\n <label\n key={value}\n className=\"flex cursor-pointer items-center gap-2 rounded px-2 py-2 text-sm hover:bg-muted\"\n >\n <input\n type=\"checkbox\"\n checked={values.includes(value)}\n onChange={(e) =>\n update({\n filters: {\n ...view.filters,\n [text(facet.key)]: e.target.checked\n ? [...values, value]\n : values.filter((v) => v !== value),\n },\n })\n }\n />\n {text(option.label)}\n </label>\n );\n })}\n </div>\n </details>\n ))}\n {(view.search || Object.values(view.filters).some((v) => v.length)) && (\n <button\n type=\"button\"\n className={control}\n onClick={() => update({ search: \"\", filters: {} })}\n >\n {copy.reset}\n </button>\n )}\n <details className=\"relative ms-auto\">\n <summary className={`${control} flex cursor-pointer items-center`}>{copy.view}</summary>\n <div className=\"absolute end-0 z-20 mt-1 min-w-40 rounded-md border bg-popover p-2 shadow-md\">\n {columns\n .filter((c) => c.hideable !== false)\n .map((c) => (\n <label key={text(c.key)} className=\"flex items-center gap-2 p-2 text-sm\">\n <input\n type=\"checkbox\"\n checked={!hidden.includes(text(c.key))}\n onChange={(e) =>\n update({\n hiddenColumns: e.target.checked\n ? hidden.filter((k) => k !== c.key)\n : [...hidden, text(c.key)],\n })\n }\n />\n {text(c.label)}\n </label>\n ))}\n </div>\n </details>\n </div>\n {error && (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {error}\n </p>\n )}\n <div className=\"relative overflow-x-auto rounded-md border\">\n <table\n className=\"w-full text-start text-sm\"\n style={{ minWidth: typeof props.minWidth === \"number\" ? props.minWidth : undefined }}\n >\n <thead className=\"border-b text-muted-foreground\">\n <tr>\n {props.selectable !== false && (\n <th className=\"w-10 px-4 py-3\">\n <input\n ref={(element) => {\n if (element) element.indeterminate = partlySelected;\n }}\n aria-label={copy.selectAll}\n type=\"checkbox\"\n checked={allSelected}\n disabled={busy || !!error || !pageIds.length}\n onChange={() =>\n selectRows(\n allSelected\n ? selectedIds.filter((id) => !pageIds.includes(id))\n : [...new Set([...selectedIds, ...pageIds])],\n )\n }\n />\n </th>\n )}\n {visible.map((c) => (\n <th\n key={text(c.key)}\n scope=\"col\"\n aria-sort={\n view.sort === c.key ? (view.descending ? \"descending\" : \"ascending\") : \"none\"\n }\n className=\"whitespace-nowrap px-4 py-3 font-medium\"\n >\n <button\n type=\"button\"\n disabled={c.sortable === false}\n className=\"inline-flex items-center gap-2 hover:text-foreground\"\n onClick={() =>\n update({\n sort: text(c.key),\n descending: view.sort === c.key && !view.descending,\n })\n }\n >\n {text(c.label)}\n {view.sort === c.key && (\n <Icon name={view.descending ? \"arrow-down\" : \"arrow-up\"} size={14} />\n )}\n </button>\n </th>\n ))}\n {Array.isArray(props.actions) && (\n <th scope=\"col\">\n <span className=\"sr-only\">{copy.actions}</span>\n </th>\n )}\n </tr>\n </thead>\n <tbody>\n {result.rows.map((row) => {\n const id = text(row[rowKey]);\n return (\n <tr\n key={id}\n data-state={selectedIds.includes(id) ? \"selected\" : undefined}\n className=\"border-b last:border-b-0 hover:bg-muted/50 data-[state=selected]:bg-muted/60\"\n >\n {props.selectable !== false && (\n <td className=\"px-4 py-4\">\n <input\n type=\"checkbox\"\n aria-label={copy.selectRow(id)}\n checked={selectedIds.includes(id)}\n disabled={busy || !!error}\n onChange={(e) =>\n selectRows(\n e.target.checked\n ? [...selectedIds, id]\n : selectedIds.filter((s) => s !== id),\n )\n }\n />\n </td>\n )}\n {visible.map((column) => (\n <td key={text(column.key)} className=\"max-w-lg whitespace-nowrap px-4 py-3\">\n {typeof column.badgeKey === \"string\" && (\n <span className=\"me-2 inline-flex rounded-md border px-2 py-0.5 text-xs font-medium\">\n {text(row[column.badgeKey])}\n </span>\n )}\n <span\n className={\n column.kind === \"badge\"\n ? \"inline-flex whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-medium\"\n : column.kind === \"muted\"\n ? \"text-muted-foreground\"\n : \"inline-block max-w-[400px] truncate align-middle font-medium\"\n }\n >\n {Array.isArray(column.displayKeys)\n ? column.displayKeys\n .map((key) => text(row[String(key)]))\n .filter(Boolean)\n .join(\" \") || \"—\"\n : text(row[text(column.key)], \"—\")}\n </span>\n </td>\n ))}\n {Array.isArray(props.actions) && (\n <td className=\"px-3\">\n <details className=\"relative\">\n <summary\n aria-label={copy.rowActions(id)}\n className=\"cursor-pointer list-none rounded px-2 py-1\"\n >\n <Icon name=\"ellipsis\" size={16} />\n </summary>\n <div className=\"absolute end-0 z-20 min-w-36 rounded-md border bg-popover p-1 shadow-md\">\n {records(props.actions).map((action) => (\n <button\n key={text(action.id)}\n type=\"button\"\n disabled={busy || action.disabled === true}\n className=\"block w-full rounded px-3 py-2 text-start text-sm hover:bg-muted disabled:opacity-50\"\n onClick={(e) => {\n e.currentTarget.closest(\"details\")?.removeAttribute(\"open\");\n emit(ctx, \"onRowAction\", {\n ...(Object.fromEntries(\n Object.entries(row).filter(\n ([, v]) =>\n v === null ||\n [\"string\", \"number\", \"boolean\"].includes(typeof v),\n ),\n ) as Record<string, string | number | boolean | null>),\n id,\n action: text(action.id),\n });\n }}\n >\n {text(action.label)}\n </button>\n ))}\n </div>\n </details>\n </td>\n )}\n </tr>\n );\n })}\n {!result.rows.length && (\n <tr>\n <td colSpan={visible.length + 2} className=\"h-28 text-center text-muted-foreground\">\n {busy ? copy.loading : error ? copy.error : text(props.emptyText, copy.empty)}\n </td>\n </tr>\n )}\n </tbody>\n </table>\n </div>\n <div className=\"flex flex-wrap items-center justify-between gap-4 px-1 text-sm\">\n <span className=\"text-muted-foreground\">\n {copy.selection(selectedIds.length, result.total)}\n </span>\n <div className=\"flex flex-wrap items-center gap-4\">\n <label className=\"flex items-center gap-2\">\n {copy.pageSize}\n <select\n className={control}\n value={view.pageSize}\n onChange={(e) => update({ pageSize: Number(e.target.value) })}\n >\n {pageSizes.map((n) => (\n <option key={n}>{n}</option>\n ))}\n </select>\n </label>\n <span>\n {copy.page(result.page + 1, props.server !== true ? result.pageCount : undefined)}\n </span>\n <button\n type=\"button\"\n aria-label={copy.previousPage}\n className={control}\n disabled={busy || result.page === 0}\n onClick={() => update({ page: result.page - 1 })}\n >\n {copy.previous}\n </button>\n <button\n type=\"button\"\n aria-label={copy.nextPage}\n className={control}\n disabled={\n busy ||\n (props.server === true\n ? props.hasNextPage !== true\n : result.page + 1 >= result.pageCount)\n }\n onClick={() => update({ page: result.page + 1 })}\n >\n {copy.next}\n </button>\n </div>\n </div>\n {selectedIds.length > 0 && records(props.bulkActions).length > 0 && (\n <div className=\"flex items-center gap-2 rounded-md border bg-muted p-2\">\n <span className=\"px-2 text-sm\">{copy.selected(selectedIds.length)}</span>\n {records(props.bulkActions).map((action) => (\n <button\n key={text(action.id)}\n type=\"button\"\n className={control}\n disabled={busy || action.disabled === true}\n onClick={() =>\n emit(ctx, \"onBulkAction\", { ids: selectedIds, action: text(action.id) })\n }\n >\n {text(action.label)}\n </button>\n ))}\n <button type=\"button\" className={control} onClick={() => selectRows([])}>\n {copy.clear}\n </button>\n </div>\n )}\n </section>\n );\n}\nexport const DataTable: RendererComponent = (props, ctx) => (\n <DataTableView props={props} ctx={ctx} />\n);\n",
17
+ "type": "registry:ui"
18
+ },
19
+ {
20
+ "path": "components/uibot/icons.tsx",
21
+ "target": "components/uibot/icons.tsx",
22
+ "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",
23
+ "type": "registry:ui"
24
+ },
25
+ {
26
+ "path": "components/uibot/interaction.ts",
27
+ "target": "components/uibot/interaction.ts",
28
+ "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",
29
+ "type": "registry:ui"
30
+ },
31
+ {
32
+ "path": "components/uibot/data-table.uibot.json",
33
+ "target": "components/uibot/data-table.uibot.json",
34
+ "content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"data-table\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"DataTable\",\n \"export\": \"DataTable\",\n \"module\": \"data-table.tsx\",\n \"catalog\": {\n \"name\": \"DataTable\",\n \"description\": \"Configurable record table with search, facets, sorting, stable selection and pagination. Server mode emits query intent without filtering current-page rows.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"table\",\n \"records\",\n \"admin\"\n ],\n \"props\": {\n \"locale\": {\n \"type\": \"string\",\n \"enum\": [\n \"en\",\n \"zh-CN\"\n ],\n \"default\": \"en\",\n \"description\": \"Language for controls, status and accessible labels\"\n },\n \"rows\": {\n \"type\": \"array\"\n },\n \"columns\": {\n \"type\": \"array\"\n },\n \"filters\": {\n \"type\": \"array\"\n },\n \"actions\": {\n \"type\": \"array\"\n },\n \"bulkActions\": {\n \"type\": \"array\"\n },\n \"rowKey\": {\n \"type\": \"string\",\n \"default\": \"id\"\n },\n \"searchKeys\": {\n \"type\": \"array\"\n },\n \"selectedIds\": {\n \"type\": \"array\"\n },\n \"view\": {\n \"description\": \"TableView or URL view JSON\"\n },\n \"pageSize\": {\n \"type\": \"number\",\n \"default\": 10\n },\n \"server\": {\n \"type\": \"boolean\"\n },\n \"total\": {\n \"type\": \"number\"\n },\n \"hasNextPage\": {\n \"type\": \"boolean\"\n },\n \"loading\": {\n \"type\": \"boolean\"\n },\n \"error\": {\n \"type\": \"string\"\n },\n \"minWidth\": {\n \"type\": \"number\"\n },\n \"searchPlaceholder\": {\n \"type\": \"string\"\n },\n \"label\": {\n \"type\": \"string\"\n },\n \"selectable\": {\n \"type\": \"boolean\"\n },\n \"emptyText\": {\n \"type\": \"string\"\n }\n },\n \"events\": {\n \"onViewChange\": {\n \"description\": \"event.values query: search, filters JSON, sort, descending, page, pageSize\"\n },\n \"onSelectionChange\": {\n \"description\": \"Stable ids in event.values.ids\"\n },\n \"onRowAction\": {\n \"description\": \"event.values.id and action\"\n },\n \"onBulkAction\": {\n \"description\": \"event.values.ids and action\"\n }\n }\n }\n }\n ]\n}\n",
35
+ "type": "registry:ui"
36
+ }
37
+ ],
38
+ "meta": {
39
+ "category": "composite",
40
+ "level": "L2",
41
+ "props": {
42
+ "locale": {
43
+ "type": "string",
44
+ "enum": [
45
+ "en",
46
+ "zh-CN"
47
+ ],
48
+ "default": "en",
49
+ "description": "Language for controls, status and accessible labels"
50
+ },
51
+ "rows": {
52
+ "type": "array"
53
+ },
54
+ "columns": {
55
+ "type": "array"
56
+ },
57
+ "filters": {
58
+ "type": "array"
59
+ },
60
+ "actions": {
61
+ "type": "array"
62
+ },
63
+ "bulkActions": {
64
+ "type": "array"
65
+ },
66
+ "rowKey": {
67
+ "type": "string",
68
+ "default": "id"
69
+ },
70
+ "searchKeys": {
71
+ "type": "array"
72
+ },
73
+ "selectedIds": {
74
+ "type": "array"
75
+ },
76
+ "view": {
77
+ "description": "TableView or URL view JSON"
78
+ },
79
+ "pageSize": {
80
+ "type": "number",
81
+ "default": 10
82
+ },
83
+ "server": {
84
+ "type": "boolean"
85
+ },
86
+ "total": {
87
+ "type": "number"
88
+ },
89
+ "hasNextPage": {
90
+ "type": "boolean"
91
+ },
92
+ "loading": {
93
+ "type": "boolean"
94
+ },
95
+ "error": {
96
+ "type": "string"
97
+ },
98
+ "minWidth": {
99
+ "type": "number"
100
+ },
101
+ "searchPlaceholder": {
102
+ "type": "string"
103
+ },
104
+ "label": {
105
+ "type": "string"
106
+ },
107
+ "selectable": {
108
+ "type": "boolean"
109
+ },
110
+ "emptyText": {
111
+ "type": "string"
112
+ }
113
+ },
114
+ "events": {
115
+ "onViewChange": {
116
+ "description": "event.values query: search, filters JSON, sort, descending, page, pageSize"
117
+ },
118
+ "onSelectionChange": {
119
+ "description": "Stable ids in event.values.ids"
120
+ },
121
+ "onRowAction": {
122
+ "description": "event.values.id and action"
123
+ },
124
+ "onBulkAction": {
125
+ "description": "event.values.ids and action"
126
+ }
127
+ },
128
+ "provides": [
129
+ "DataTable"
130
+ ],
131
+ "uibot": {
132
+ "schema": "uibot.registry.item.v1",
133
+ "item": "data-table",
134
+ "channel": "public",
135
+ "components": [
136
+ {
137
+ "name": "DataTable",
138
+ "export": "DataTable",
139
+ "module": "data-table.tsx",
140
+ "catalog": {
141
+ "name": "DataTable",
142
+ "description": "Configurable record table with search, facets, sorting, stable selection and pagination. Server mode emits query intent without filtering current-page rows.",
143
+ "category": "composite",
144
+ "level": "L2",
145
+ "tags": [
146
+ "table",
147
+ "records",
148
+ "admin"
149
+ ],
150
+ "props": {
151
+ "locale": {
152
+ "type": "string",
153
+ "enum": [
154
+ "en",
155
+ "zh-CN"
156
+ ],
157
+ "default": "en",
158
+ "description": "Language for controls, status and accessible labels"
159
+ },
160
+ "rows": {
161
+ "type": "array"
162
+ },
163
+ "columns": {
164
+ "type": "array"
165
+ },
166
+ "filters": {
167
+ "type": "array"
168
+ },
169
+ "actions": {
170
+ "type": "array"
171
+ },
172
+ "bulkActions": {
173
+ "type": "array"
174
+ },
175
+ "rowKey": {
176
+ "type": "string",
177
+ "default": "id"
178
+ },
179
+ "searchKeys": {
180
+ "type": "array"
181
+ },
182
+ "selectedIds": {
183
+ "type": "array"
184
+ },
185
+ "view": {
186
+ "description": "TableView or URL view JSON"
187
+ },
188
+ "pageSize": {
189
+ "type": "number",
190
+ "default": 10
191
+ },
192
+ "server": {
193
+ "type": "boolean"
194
+ },
195
+ "total": {
196
+ "type": "number"
197
+ },
198
+ "hasNextPage": {
199
+ "type": "boolean"
200
+ },
201
+ "loading": {
202
+ "type": "boolean"
203
+ },
204
+ "error": {
205
+ "type": "string"
206
+ },
207
+ "minWidth": {
208
+ "type": "number"
209
+ },
210
+ "searchPlaceholder": {
211
+ "type": "string"
212
+ },
213
+ "label": {
214
+ "type": "string"
215
+ },
216
+ "selectable": {
217
+ "type": "boolean"
218
+ },
219
+ "emptyText": {
220
+ "type": "string"
221
+ }
222
+ },
223
+ "events": {
224
+ "onViewChange": {
225
+ "description": "event.values query: search, filters JSON, sort, descending, page, pageSize"
226
+ },
227
+ "onSelectionChange": {
228
+ "description": "Stable ids in event.values.ids"
229
+ },
230
+ "onRowAction": {
231
+ "description": "event.values.id and action"
232
+ },
233
+ "onBulkAction": {
234
+ "description": "event.values.ids and action"
235
+ }
236
+ }
237
+ }
238
+ }
239
+ ]
240
+ }
241
+ }
242
+ }