@uibot/mcp-server 0.18.1 → 0.20.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 (125) hide show
  1. package/README.md +34 -0
  2. package/dist/http.js +93 -93
  3. package/dist/resources/bundle.json +1 -1
  4. package/dist/resources/design-md/frontend-principles.design.md +12 -0
  5. package/dist/resources/shells/shadcn-admin-shell.yaml +5 -4
  6. package/dist/resources/templates/auth.yaml +84 -67
  7. package/dist/resources/templates/shadcn-admin.yaml +12210 -122
  8. package/dist/server.d.ts +3 -0
  9. package/dist/server.js +93 -93
  10. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/licenses/UIBot-LICENSE +21 -0
  11. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/licenses/blocks-icons-LICENSE +46 -0
  12. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/licenses/shadcn-THIRD_PARTY_LICENSE +21 -0
  13. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-apps.json +61 -0
  14. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-chats.json +54 -0
  15. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-dashboard.json +70 -0
  16. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-error-401.json +54 -0
  17. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-error-403.json +54 -0
  18. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-error-404.json +54 -0
  19. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-error-500.json +54 -0
  20. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-error-503.json +54 -0
  21. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-forgot-password.json +59 -0
  22. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-help.json +53 -0
  23. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-otp.json +59 -0
  24. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-overview.json +62 -0
  25. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-settings-account.json +61 -0
  26. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-settings-appearance.json +61 -0
  27. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-settings-display.json +61 -0
  28. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-settings-notifications.json +61 -0
  29. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-settings-profile.json +61 -0
  30. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-settings.json +65 -0
  31. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-shell.json +173 -0
  32. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-sign-in-2.json +67 -0
  33. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-sign-in.json +59 -0
  34. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-sign-up.json +59 -0
  35. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-tasks.json +66 -0
  36. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-users.json +66 -0
  37. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/ai-chat.json +74 -0
  38. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/analytics-dashboard.json +65 -0
  39. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/app-shell-floating.json +54 -0
  40. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/app-shell-icon-rail.json +54 -0
  41. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/app-shell-inset.json +54 -0
  42. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/app-shell-settings.json +54 -0
  43. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/app-shell-sidebar.json +54 -0
  44. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/app-shell-workspace.json +54 -0
  45. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/auth-centered.json +61 -0
  46. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/auth-enterprise.json +61 -0
  47. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/auth-recovery.json +64 -0
  48. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/auth-registration.json +63 -0
  49. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/auth-split.json +67 -0
  50. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/auth.json +61 -0
  51. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/blog.json +64 -0
  52. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/charts.json +238 -0
  53. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/chat-artifact.json +49 -0
  54. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/chat-focused.json +49 -0
  55. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/chat-history.json +49 -0
  56. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/chat-knowledge.json +49 -0
  57. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/chat-support.json +49 -0
  58. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/chat-workspace.json +136 -0
  59. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/collection-shared.json +23 -0
  60. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/commerce-workspace.json +69 -0
  61. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/console-billing.json +68 -0
  62. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/console-page.json +289 -0
  63. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/console-shell.json +29 -0
  64. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/content.json +444 -0
  65. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/creation-shared.json +24 -0
  66. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/crm-workspace.json +73 -0
  67. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/crm.json +67 -0
  68. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/dashboard-01.json +78 -0
  69. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/dashboard.json +257 -0
  70. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/data-studio.json +368 -0
  71. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/data-table.json +352 -0
  72. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/data.json +405 -0
  73. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/document-assistant.json +54 -0
  74. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/document-library.json +49 -0
  75. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/document-reading.json +49 -0
  76. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/document-workspace.json +164 -0
  77. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/document-writing.json +49 -0
  78. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/drilldown-menu.json +233 -0
  79. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/ecommerce.json +65 -0
  80. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/education-workspace.json +82 -0
  81. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/feedback.json +344 -0
  82. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/field.json +164 -0
  83. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/form.json +429 -0
  84. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/grid.json +188 -0
  85. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/interactive.json +355 -0
  86. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/item-grid.json +219 -0
  87. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/kanban.json +154 -0
  88. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/layout.json +790 -0
  89. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/lms.json +74 -0
  90. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/marketing.json +402 -0
  91. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/nav.json +285 -0
  92. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/portfolio.json +62 -0
  93. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/presentation.json +454 -0
  94. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/pricing.json +63 -0
  95. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/primitives.json +360 -0
  96. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/saas-landing.json +60 -0
  97. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sections.json +734 -0
  98. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/settings.json +72 -0
  99. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/shadcn-admin-shell.json +49 -0
  100. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/shadcn-admin.json +77 -0
  101. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-01.json +42 -0
  102. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-02.json +42 -0
  103. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-03.json +30 -0
  104. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-04.json +30 -0
  105. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-05.json +36 -0
  106. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-06.json +42 -0
  107. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-07.json +54 -0
  108. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-08.json +54 -0
  109. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-09.json +36 -0
  110. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-10.json +66 -0
  111. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-11.json +30 -0
  112. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-12.json +48 -0
  113. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-13.json +30 -0
  114. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-14.json +30 -0
  115. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-15.json +84 -0
  116. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-16.json +66 -0
  117. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-drilldown.json +29 -0
  118. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-primitives.json +155 -0
  119. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/store.json +75 -0
  120. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/support-inbox.json +63 -0
  121. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/team-directory.json +59 -0
  122. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/uibot-base.json +30 -0
  123. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/workspace.json +181 -0
  124. package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/snapshot.json +1 -0
  125. package/package.json +10 -9
@@ -0,0 +1,219 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "item-grid",
4
+ "type": "registry:ui",
5
+ "description": "Public-facing collection of whole-card buttons with optional images, local search and category filters. Use for browsable pets, products or projects instead of duplicating cards and a management table. No data writes.",
6
+ "dependencies": [
7
+ "react@19.3.0"
8
+ ],
9
+ "registryDependencies": [
10
+ "@uibot/uibot-base"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "components/uibot/item-grid.tsx",
15
+ "target": "components/uibot/item-grid.tsx",
16
+ "content": "import { useId, useState } from \"react\";\nimport type { RendererComponent } from \"@/lib/uibot-renderer\";\nimport { emit, records, text } from \"./interaction\";\n\nexport interface GridItem {\n id: string;\n title: string;\n description: string;\n category: string;\n meta: string;\n image: string;\n imageAlt: string;\n}\n\nexport function readGridItems(value: unknown): GridItem[] {\n const seen = new Set<string>();\n return records(value).flatMap((row) => {\n if (typeof row.id !== \"string\" || !row.id || seen.has(row.id)) return [];\n seen.add(row.id);\n return [\n {\n id: row.id,\n title: text(row.title),\n description: text(row.description),\n category: text(row.category),\n meta: text(row.meta),\n image:\n typeof row.image === \"string\" && /^(https?:\\/\\/|data:image\\/|\\/)/i.test(row.image)\n ? row.image\n : \"\",\n imageAlt: text(row.imageAlt),\n },\n ];\n });\n}\n\nexport function filterGridItems(items: GridItem[], query: string, category: string): GridItem[] {\n const needle = query.trim().toLocaleLowerCase();\n return items.filter(\n (item) =>\n (!category || item.category === category) &&\n (!needle ||\n [item.title, item.description, item.meta].some((value) =>\n value.toLocaleLowerCase().includes(needle),\n )),\n );\n}\n\nconst CSS = `\n.uibot-item-grid{container-type:inline-size;min-width:0}\n.uibot-item-grid-controls{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:24px}\n.uibot-item-grid input{flex:1 1 220px;min-width:0;min-height:44px;border:1px solid var(--border);border-radius:999px;padding:10px 18px;background:var(--card);font:inherit}\n.uibot-item-grid-filters{display:flex;flex-wrap:wrap;gap:8px}\n.uibot-item-grid-filters button{min-height:44px;padding:8px 20px;border:1px solid var(--border);border-radius:999px;background:transparent;font:inherit}\n.uibot-item-grid-filters button[aria-pressed=true]{background:var(--primary);color:var(--primary-foreground);border-color:var(--primary)}\n.uibot-item-grid-list{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;list-style:none;margin:0;padding:0}\n@container (min-width:560px){.uibot-item-grid-list{grid-template-columns:repeat(2,minmax(0,1fr))}}\n@container (min-width:960px){.uibot-item-grid-list[data-columns=\"3\"]{grid-template-columns:repeat(3,minmax(0,1fr))}}\n.uibot-item-grid li{min-width:0}\n.uibot-item-grid-card{display:flex;flex-direction:column;width:100%;height:100%;overflow:hidden;border:1px solid var(--border);border-radius:18px;background:var(--card);color:var(--card-foreground);text-align:start;font:inherit;padding:0}\nbutton.uibot-item-grid-card{cursor:pointer}\n.uibot-item-grid button:focus-visible,.uibot-item-grid input:focus-visible{outline:3px solid var(--ring,var(--primary));outline-offset:4px}\nbutton.uibot-item-grid-card:hover{border-color:var(--primary)}\n.uibot-item-grid-card img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block;background:var(--muted)}\n.uibot-item-grid-copy{display:flex;flex:1;flex-direction:column;gap:10px;padding:24px}\n.uibot-item-grid-meta{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:13px;color:var(--muted-foreground)}\n.uibot-item-grid-title{font-size:24px;font-weight:600;line-height:1.25}\n.uibot-item-grid-description{font-size:15px;line-height:1.7;color:var(--muted-foreground)}\n.uibot-item-grid-action{padding-top:12px;margin-top:auto;font-size:14px;font-weight:600;color:var(--primary)}\n.uibot-item-grid-empty{padding:32px 0;color:var(--muted-foreground)}\n`;\n\n/** A single searchable collection; all card content activates the declared item event. */\nexport const ItemGrid: RendererComponent = (props, ctx) => {\n const searchId = useId();\n const [query, setQuery] = useState(\"\");\n const [category, setCategory] = useState(\"\");\n const items = readGridItems(props.items);\n const categories = [...new Set(items.map((item) => item.category).filter(Boolean))];\n const activeCategory = categories.includes(category) ? category : \"\";\n const visible = filterGridItems(\n items,\n props.searchable === true ? query : \"\",\n props.filterable === true ? activeCategory : \"\",\n );\n const selectable = Boolean(\n (ctx.element as { events?: Record<string, unknown> }).events?.onSelect,\n );\n return (\n <section\n className=\"uibot-item-grid\"\n data-uibot-type=\"ItemGrid\"\n aria-label={text(props.label, \"Items\")}\n >\n <style>{CSS}</style>\n {(props.searchable === true || props.filterable === true) && (\n <div className=\"uibot-item-grid-controls\">\n {props.searchable === true && (\n <input\n id={searchId}\n type=\"search\"\n aria-label={text(props.searchPlaceholder, \"Search items\")}\n placeholder={text(props.searchPlaceholder, \"Search items\")}\n value={query}\n onChange={(event) => setQuery(event.currentTarget.value)}\n />\n )}\n {props.filterable === true && categories.length > 0 && (\n <div\n className=\"uibot-item-grid-filters\"\n role=\"group\"\n aria-label={text(props.filterLabel, \"Category\")}\n >\n {[\"\", ...categories].map((value) => (\n <button\n key={value}\n type=\"button\"\n aria-pressed={activeCategory === value}\n onClick={() => setCategory(value)}\n >\n {value || text(props.allLabel, \"All\")}\n </button>\n ))}\n </div>\n )}\n </div>\n )}\n <ul className=\"uibot-item-grid-list\" data-columns={props.columns === \"2\" ? \"2\" : \"3\"}>\n {visible.map((item) => {\n const content = (\n <>\n {item.image && <img src={item.image} alt={item.imageAlt} loading=\"lazy\" />}\n <span className=\"uibot-item-grid-copy\">\n {(item.category || item.meta) && (\n <span className=\"uibot-item-grid-meta\">\n <span>{item.category}</span>\n <span>{item.meta}</span>\n </span>\n )}\n <span className=\"uibot-item-grid-title\">{item.title}</span>\n {item.description && (\n <span className=\"uibot-item-grid-description\">{item.description}</span>\n )}\n {selectable && (\n <span className=\"uibot-item-grid-action\">\n {text(props.actionLabel, \"View details\")}\n </span>\n )}\n </span>\n </>\n );\n return (\n <li key={item.id}>\n {selectable ? (\n <button\n type=\"button\"\n className=\"uibot-item-grid-card\"\n aria-label={`${text(props.actionLabel, \"View details\")}: ${item.title}`}\n onClick={() => emit(ctx, \"onSelect\", { id: item.id })}\n >\n {content}\n </button>\n ) : (\n <article className=\"uibot-item-grid-card\">{content}</article>\n )}\n </li>\n );\n })}\n </ul>\n {visible.length === 0 && (\n <p role=\"status\" className=\"uibot-item-grid-empty\">\n {text(props.emptyText, \"No matching items\")}\n </p>\n )}\n </section>\n );\n};\n",
17
+ "type": "registry:ui"
18
+ },
19
+ {
20
+ "path": "components/uibot/interaction.ts",
21
+ "target": "components/uibot/interaction.ts",
22
+ "content": "import type { RendererComponent } from \"@/lib/uibot-renderer\";\nexport type BlockContext = Parameters<RendererComponent>[1];\nexport type Chain = Parameters<NonNullable<BlockContext[\"dispatch\"]>>[0];\nexport type EventValue = string | number | boolean | null;\nexport function emit(\n ctx: BlockContext,\n name: string,\n values: Record<string, EventValue | EventValue[]> = {},\n value?: EventValue,\n): void {\n const element = ctx.element as { events?: Record<string, Chain> };\n const chain = element.events?.[name];\n if (chain?.length)\n void ctx.dispatch?.(chain, {\n event: { type: name, values, ...(value !== undefined ? { value } : {}) },\n });\n}\nexport function text(value: unknown, fallback = \"\"): string {\n return value == null ? fallback : String(value);\n}\nexport function records(value: unknown): Record<string, unknown>[] {\n return Array.isArray(value)\n ? value.filter(\n (v): v is Record<string, unknown> => !!v && typeof v === \"object\" && !Array.isArray(v),\n )\n : [];\n}\n\nconst submissions = new WeakMap<object, { payload: string; key: string }>();\n/** A new owner represents a new user intent; an unchanged failed submission keeps its key. */\nexport function submissionKey(owner: object, values: unknown): string {\n const payload = JSON.stringify(values);\n const previous = submissions.get(owner);\n if (previous?.payload === payload) return previous.key;\n const key = crypto.randomUUID();\n submissions.set(owner, { payload, key });\n return key;\n}\n",
23
+ "type": "registry:ui"
24
+ },
25
+ {
26
+ "path": "components/uibot/item-grid.uibot.json",
27
+ "target": "components/uibot/item-grid.uibot.json",
28
+ "content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"item-grid\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"ItemGrid\",\n \"export\": \"ItemGrid\",\n \"module\": \"item-grid.tsx\",\n \"catalog\": {\n \"name\": \"ItemGrid\",\n \"description\": \"Public-facing collection of whole-card buttons with optional images, local search and category filters. Use for browsable pets, products or projects instead of duplicating cards and a management table. No data writes.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"cards\",\n \"search\",\n \"collection\",\n \"gallery\"\n ],\n \"props\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"items\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"title\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"category\": {\n \"type\": \"string\"\n },\n \"meta\": {\n \"type\": \"string\"\n },\n \"image\": {\n \"type\": \"string\",\n \"description\": \"Supplied image URL or inline data:image illustration; never invent an asset URL\"\n },\n \"imageAlt\": {\n \"type\": \"string\"\n }\n }\n }\n },\n \"columns\": {\n \"type\": \"string\",\n \"enum\": [\n \"2\",\n \"3\"\n ],\n \"default\": \"3\"\n },\n \"searchable\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"filterable\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"searchPlaceholder\": {\n \"type\": \"string\"\n },\n \"filterLabel\": {\n \"type\": \"string\"\n },\n \"allLabel\": {\n \"type\": \"string\"\n },\n \"emptyText\": {\n \"type\": \"string\"\n },\n \"actionLabel\": {\n \"type\": \"string\"\n }\n },\n \"events\": {\n \"onSelect\": {\n \"description\": \"Whole-card click or keyboard activation emits the selected string id in {\\\"_event\\\":\\\"values.id\\\"}.\"\n }\n },\n \"constraints\": [\n \"Use unique non-empty string item IDs. Category filters derive from items; search and category combine on these same cards. Set all control labels in the product language. Image is optional; omit it when unavailable.\"\n ]\n }\n }\n ]\n}\n",
29
+ "type": "registry:ui"
30
+ }
31
+ ],
32
+ "meta": {
33
+ "category": "composite",
34
+ "level": "L2",
35
+ "props": {
36
+ "label": {
37
+ "type": "string"
38
+ },
39
+ "items": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "object",
43
+ "required": [
44
+ "id",
45
+ "title"
46
+ ],
47
+ "properties": {
48
+ "id": {
49
+ "type": "string"
50
+ },
51
+ "title": {
52
+ "type": "string"
53
+ },
54
+ "description": {
55
+ "type": "string"
56
+ },
57
+ "category": {
58
+ "type": "string"
59
+ },
60
+ "meta": {
61
+ "type": "string"
62
+ },
63
+ "image": {
64
+ "type": "string",
65
+ "description": "Supplied image URL or inline data:image illustration; never invent an asset URL"
66
+ },
67
+ "imageAlt": {
68
+ "type": "string"
69
+ }
70
+ }
71
+ }
72
+ },
73
+ "columns": {
74
+ "type": "string",
75
+ "enum": [
76
+ "2",
77
+ "3"
78
+ ],
79
+ "default": "3"
80
+ },
81
+ "searchable": {
82
+ "type": "boolean",
83
+ "default": false
84
+ },
85
+ "filterable": {
86
+ "type": "boolean",
87
+ "default": false
88
+ },
89
+ "searchPlaceholder": {
90
+ "type": "string"
91
+ },
92
+ "filterLabel": {
93
+ "type": "string"
94
+ },
95
+ "allLabel": {
96
+ "type": "string"
97
+ },
98
+ "emptyText": {
99
+ "type": "string"
100
+ },
101
+ "actionLabel": {
102
+ "type": "string"
103
+ }
104
+ },
105
+ "events": {
106
+ "onSelect": {
107
+ "description": "Whole-card click or keyboard activation emits the selected string id in {\"_event\":\"values.id\"}."
108
+ }
109
+ },
110
+ "constraints": [
111
+ "Use unique non-empty string item IDs. Category filters derive from items; search and category combine on these same cards. Set all control labels in the product language. Image is optional; omit it when unavailable."
112
+ ],
113
+ "provides": [
114
+ "ItemGrid"
115
+ ],
116
+ "uibot": {
117
+ "schema": "uibot.registry.item.v1",
118
+ "item": "item-grid",
119
+ "channel": "public",
120
+ "components": [
121
+ {
122
+ "name": "ItemGrid",
123
+ "export": "ItemGrid",
124
+ "module": "item-grid.tsx",
125
+ "catalog": {
126
+ "name": "ItemGrid",
127
+ "description": "Public-facing collection of whole-card buttons with optional images, local search and category filters. Use for browsable pets, products or projects instead of duplicating cards and a management table. No data writes.",
128
+ "category": "composite",
129
+ "level": "L2",
130
+ "tags": [
131
+ "cards",
132
+ "search",
133
+ "collection",
134
+ "gallery"
135
+ ],
136
+ "props": {
137
+ "label": {
138
+ "type": "string"
139
+ },
140
+ "items": {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "object",
144
+ "required": [
145
+ "id",
146
+ "title"
147
+ ],
148
+ "properties": {
149
+ "id": {
150
+ "type": "string"
151
+ },
152
+ "title": {
153
+ "type": "string"
154
+ },
155
+ "description": {
156
+ "type": "string"
157
+ },
158
+ "category": {
159
+ "type": "string"
160
+ },
161
+ "meta": {
162
+ "type": "string"
163
+ },
164
+ "image": {
165
+ "type": "string",
166
+ "description": "Supplied image URL or inline data:image illustration; never invent an asset URL"
167
+ },
168
+ "imageAlt": {
169
+ "type": "string"
170
+ }
171
+ }
172
+ }
173
+ },
174
+ "columns": {
175
+ "type": "string",
176
+ "enum": [
177
+ "2",
178
+ "3"
179
+ ],
180
+ "default": "3"
181
+ },
182
+ "searchable": {
183
+ "type": "boolean",
184
+ "default": false
185
+ },
186
+ "filterable": {
187
+ "type": "boolean",
188
+ "default": false
189
+ },
190
+ "searchPlaceholder": {
191
+ "type": "string"
192
+ },
193
+ "filterLabel": {
194
+ "type": "string"
195
+ },
196
+ "allLabel": {
197
+ "type": "string"
198
+ },
199
+ "emptyText": {
200
+ "type": "string"
201
+ },
202
+ "actionLabel": {
203
+ "type": "string"
204
+ }
205
+ },
206
+ "events": {
207
+ "onSelect": {
208
+ "description": "Whole-card click or keyboard activation emits the selected string id in {\"_event\":\"values.id\"}."
209
+ }
210
+ },
211
+ "constraints": [
212
+ "Use unique non-empty string item IDs. Category filters derive from items; search and category combine on these same cards. Set all control labels in the product language. Image is optional; omit it when unavailable."
213
+ ]
214
+ }
215
+ }
216
+ ]
217
+ }
218
+ }
219
+ }
@@ -0,0 +1,154 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "kanban",
4
+ "type": "registry:ui",
5
+ "description": "Horizontal kanban board: columns as swimlanes, cards grouped by their column id. Read-only display.",
6
+ "dependencies": [
7
+ "react@19.3.0"
8
+ ],
9
+ "registryDependencies": [
10
+ "@uibot/uibot-base"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "components/uibot/kanban.tsx",
15
+ "target": "components/uibot/kanban.tsx",
16
+ "content": "import type { RendererComponent } from \"@/lib/uibot-renderer\";\n\ninterface Column {\n id: string;\n title: string;\n}\n\ninterface Card {\n id: string;\n column: string;\n title: string;\n subtitle?: string;\n badge?: string;\n}\n\nfunction parseColumns(raw: unknown): Column[] {\n if (!Array.isArray(raw)) return [];\n return raw\n .map((c) => {\n if (!c || typeof c !== \"object\") return null;\n const rec = c as Record<string, unknown>;\n const id = typeof rec[\"id\"] === \"string\" ? rec[\"id\"] : null;\n if (!id) return null;\n return { id, title: typeof rec[\"title\"] === \"string\" ? rec[\"title\"] : id } as Column;\n })\n .filter((c): c is Column => c !== null);\n}\n\nfunction parseCards(raw: unknown): Card[] {\n if (!Array.isArray(raw)) return [];\n return raw\n .map((c, i) => {\n if (!c || typeof c !== \"object\") return null;\n const rec = c as Record<string, unknown>;\n const column = typeof rec[\"column\"] === \"string\" ? rec[\"column\"] : null;\n if (!column) return null;\n return {\n id: typeof rec[\"id\"] === \"string\" ? rec[\"id\"] : `card-${i}`,\n column,\n title: typeof rec[\"title\"] === \"string\" ? rec[\"title\"] : \"\",\n subtitle: typeof rec[\"subtitle\"] === \"string\" ? rec[\"subtitle\"] : undefined,\n badge: typeof rec[\"badge\"] === \"string\" ? rec[\"badge\"] : undefined,\n } as Card;\n })\n .filter((c): c is Card => c !== null);\n}\n\n/** Column accent cycles the marketing palette — theme-token safe in any host. */\nconst COLUMN_ACCENTS = [\n \"var(--marketing-accent)\",\n \"var(--mk-accent-2)\",\n \"var(--mk-accent-3)\",\n \"var(--mk-accent-4)\",\n] as const;\n\nconst MONO = { fontFamily: \"var(--font-marketing-mono)\" } as const;\n\n/** Fit columns to the container: equal-width grid up to 4 lanes, scroll beyond. */\nconst FIT_COLS: Record<number, string> = {\n 1: \"grid-cols-1\",\n 2: \"grid-cols-2\",\n 3: \"grid-cols-3\",\n 4: \"grid-cols-4\",\n};\n\n/**\n * Horizontal kanban board: columns as swimlanes, cards grouped by `column`.\n * Up to four lanes fit the container width without scrolling; five or more\n * fall back to a horizontal scroll strip. Editorial chrome: per-column accent\n * dot + mono count chip, cards with a hover lift and a hairline badge.\n * Read-only display.\n */\nexport const KanbanBoard: RendererComponent = (props) => {\n const columns = parseColumns(props[\"columns\"]);\n const cards = parseCards(props[\"cards\"]);\n const fitClass = FIT_COLS[columns.length];\n\n return (\n <div\n className={\n fitClass\n ? `uibot-kanban grid ${fitClass} gap-3 pb-1`\n : \"uibot-kanban grid auto-cols-[minmax(240px,1fr)] grid-flow-col gap-3 overflow-x-auto pb-2\"\n }\n data-uibot-type=\"KanbanBoard\"\n role=\"region\"\n aria-label=\"Kanban board\"\n >\n {columns.map((col, colIdx) => {\n const accent = COLUMN_ACCENTS[colIdx % COLUMN_ACCENTS.length];\n const colCards = cards.filter((c) => c.column === col.id);\n return (\n <div\n key={col.id}\n className=\"flex min-h-[7rem] flex-col rounded-lg border bg-muted/25 p-2.5\"\n >\n <h4\n className=\"mb-2.5 flex items-center gap-1.5 px-1 text-[0.65rem] font-medium uppercase tracking-[0.12em] text-muted-foreground\"\n style={MONO}\n >\n <span\n aria-hidden=\"true\"\n className=\"size-1.5 shrink-0 rounded-full\"\n style={{\n background: accent,\n boxShadow: `0 0 0 3px color-mix(in oklch, ${accent} 20%, transparent)`,\n }}\n />\n <span className=\"truncate\">{col.title}</span>\n <span className=\"ml-auto shrink-0 rounded-full border bg-background/70 px-1.5 py-px text-[0.6rem] text-muted-foreground/80\">\n {colCards.length}\n </span>\n </h4>\n <div className=\"space-y-2\">\n {colCards.map((card) => (\n <div\n key={card.id}\n className=\"rounded-md border bg-card p-3 shadow-sm transition-all duration-200 hover:-translate-y-0.5 hover:border-[color-mix(in_oklch,var(--marketing-accent)_38%,var(--border))] hover:shadow-md\"\n data-uibot-card={card.id}\n >\n <div className=\"flex items-start justify-between gap-2\">\n <p className=\"text-sm font-medium leading-snug text-foreground\">{card.title}</p>\n {card.badge && (\n <span\n className=\"shrink-0 rounded-full border bg-muted/50 px-1.5 py-px text-[0.6rem] font-medium tracking-wide text-muted-foreground\"\n style={MONO}\n >\n {card.badge}\n </span>\n )}\n </div>\n {card.subtitle && (\n <p className=\"mt-1.5 truncate text-[0.6875rem] text-muted-foreground/90\">\n {card.subtitle}\n </p>\n )}\n </div>\n ))}\n {colCards.length === 0 && (\n <p className=\"rounded-md border border-dashed py-4 text-center text-xs text-muted-foreground\">\n Empty\n </p>\n )}\n </div>\n </div>\n );\n })}\n </div>\n );\n};\n",
17
+ "type": "registry:ui"
18
+ },
19
+ {
20
+ "path": "components/uibot/kanban.uibot.json",
21
+ "target": "components/uibot/kanban.uibot.json",
22
+ "content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"kanban\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"KanbanBoard\",\n \"export\": \"KanbanBoard\",\n \"module\": \"kanban.tsx\",\n \"catalog\": {\n \"name\": \"KanbanBoard\",\n \"description\": \"Horizontal kanban board: columns as swimlanes, cards grouped by their column id. Read-only display.\",\n \"category\": \"composite\",\n \"level\": \"L3\",\n \"tags\": [\n \"kanban\",\n \"board\",\n \"operations\"\n ],\n \"props\": {\n \"columns\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"title\": {\n \"type\": \"string\"\n }\n }\n },\n \"description\": \"[{id, title}] swimlane definitions\"\n },\n \"cards\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"column\": {\n \"type\": \"string\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"subtitle\": {\n \"type\": \"string\"\n },\n \"badge\": {\n \"type\": \"string\"\n }\n }\n },\n \"description\": \"[{id, column, title, subtitle?, badge?}] — column must match a column id\"\n }\n },\n \"usageScenarios\": [\n \"Operations task board (Todo / In progress / Done)\",\n \"Release pipeline stages\"\n ],\n \"constraints\": [\n \"Each card.column must reference an existing column.id, else the card is dropped\",\n \"Up to 4 columns fit the container as an equal-width grid (no scrollbar); 5+ columns switch to a horizontal scroll strip\"\n ]\n }\n }\n ]\n}\n",
23
+ "type": "registry:ui"
24
+ }
25
+ ],
26
+ "meta": {
27
+ "category": "composite",
28
+ "level": "L3",
29
+ "props": {
30
+ "columns": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "object",
34
+ "properties": {
35
+ "id": {
36
+ "type": "string"
37
+ },
38
+ "title": {
39
+ "type": "string"
40
+ }
41
+ }
42
+ },
43
+ "description": "[{id, title}] swimlane definitions"
44
+ },
45
+ "cards": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "object",
49
+ "properties": {
50
+ "id": {
51
+ "type": "string"
52
+ },
53
+ "column": {
54
+ "type": "string"
55
+ },
56
+ "title": {
57
+ "type": "string"
58
+ },
59
+ "subtitle": {
60
+ "type": "string"
61
+ },
62
+ "badge": {
63
+ "type": "string"
64
+ }
65
+ }
66
+ },
67
+ "description": "[{id, column, title, subtitle?, badge?}] — column must match a column id"
68
+ }
69
+ },
70
+ "scenarios": [
71
+ "Operations task board (Todo / In progress / Done)",
72
+ "Release pipeline stages"
73
+ ],
74
+ "constraints": [
75
+ "Each card.column must reference an existing column.id, else the card is dropped",
76
+ "Up to 4 columns fit the container as an equal-width grid (no scrollbar); 5+ columns switch to a horizontal scroll strip"
77
+ ],
78
+ "provides": [
79
+ "KanbanBoard"
80
+ ],
81
+ "uibot": {
82
+ "schema": "uibot.registry.item.v1",
83
+ "item": "kanban",
84
+ "channel": "public",
85
+ "components": [
86
+ {
87
+ "name": "KanbanBoard",
88
+ "export": "KanbanBoard",
89
+ "module": "kanban.tsx",
90
+ "catalog": {
91
+ "name": "KanbanBoard",
92
+ "description": "Horizontal kanban board: columns as swimlanes, cards grouped by their column id. Read-only display.",
93
+ "category": "composite",
94
+ "level": "L3",
95
+ "tags": [
96
+ "kanban",
97
+ "board",
98
+ "operations"
99
+ ],
100
+ "props": {
101
+ "columns": {
102
+ "type": "array",
103
+ "items": {
104
+ "type": "object",
105
+ "properties": {
106
+ "id": {
107
+ "type": "string"
108
+ },
109
+ "title": {
110
+ "type": "string"
111
+ }
112
+ }
113
+ },
114
+ "description": "[{id, title}] swimlane definitions"
115
+ },
116
+ "cards": {
117
+ "type": "array",
118
+ "items": {
119
+ "type": "object",
120
+ "properties": {
121
+ "id": {
122
+ "type": "string"
123
+ },
124
+ "column": {
125
+ "type": "string"
126
+ },
127
+ "title": {
128
+ "type": "string"
129
+ },
130
+ "subtitle": {
131
+ "type": "string"
132
+ },
133
+ "badge": {
134
+ "type": "string"
135
+ }
136
+ }
137
+ },
138
+ "description": "[{id, column, title, subtitle?, badge?}] — column must match a column id"
139
+ }
140
+ },
141
+ "usageScenarios": [
142
+ "Operations task board (Todo / In progress / Done)",
143
+ "Release pipeline stages"
144
+ ],
145
+ "constraints": [
146
+ "Each card.column must reference an existing column.id, else the card is dropped",
147
+ "Up to 4 columns fit the container as an equal-width grid (no scrollbar); 5+ columns switch to a horizontal scroll strip"
148
+ ]
149
+ }
150
+ }
151
+ ]
152
+ }
153
+ }
154
+ }