@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.
- package/README.md +34 -0
- package/dist/http.js +93 -93
- package/dist/resources/bundle.json +1 -1
- package/dist/resources/design-md/frontend-principles.design.md +12 -0
- package/dist/resources/shells/shadcn-admin-shell.yaml +5 -4
- package/dist/resources/templates/auth.yaml +84 -67
- package/dist/resources/templates/shadcn-admin.yaml +12210 -122
- package/dist/server.d.ts +3 -0
- package/dist/server.js +93 -93
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/licenses/UIBot-LICENSE +21 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/licenses/blocks-icons-LICENSE +46 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/licenses/shadcn-THIRD_PARTY_LICENSE +21 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-apps.json +61 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-chats.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-dashboard.json +70 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-error-401.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-error-403.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-error-404.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-error-500.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-error-503.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-forgot-password.json +59 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-help.json +53 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-otp.json +59 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-overview.json +62 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-settings-account.json +61 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-settings-appearance.json +61 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-settings-display.json +61 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-settings-notifications.json +61 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-settings-profile.json +61 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-settings.json +65 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-shell.json +173 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-sign-in-2.json +67 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-sign-in.json +59 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-sign-up.json +59 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-tasks.json +66 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/admin-users.json +66 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/ai-chat.json +74 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/analytics-dashboard.json +65 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/app-shell-floating.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/app-shell-icon-rail.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/app-shell-inset.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/app-shell-settings.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/app-shell-sidebar.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/app-shell-workspace.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/auth-centered.json +61 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/auth-enterprise.json +61 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/auth-recovery.json +64 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/auth-registration.json +63 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/auth-split.json +67 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/auth.json +61 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/blog.json +64 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/charts.json +238 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/chat-artifact.json +49 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/chat-focused.json +49 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/chat-history.json +49 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/chat-knowledge.json +49 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/chat-support.json +49 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/chat-workspace.json +136 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/collection-shared.json +23 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/commerce-workspace.json +69 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/console-billing.json +68 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/console-page.json +289 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/console-shell.json +29 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/content.json +444 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/creation-shared.json +24 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/crm-workspace.json +73 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/crm.json +67 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/dashboard-01.json +78 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/dashboard.json +257 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/data-studio.json +368 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/data-table.json +352 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/data.json +405 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/document-assistant.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/document-library.json +49 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/document-reading.json +49 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/document-workspace.json +164 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/document-writing.json +49 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/drilldown-menu.json +233 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/ecommerce.json +65 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/education-workspace.json +82 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/feedback.json +344 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/field.json +164 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/form.json +429 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/grid.json +188 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/interactive.json +355 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/item-grid.json +219 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/kanban.json +154 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/layout.json +790 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/lms.json +74 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/marketing.json +402 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/nav.json +285 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/portfolio.json +62 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/presentation.json +454 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/pricing.json +63 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/primitives.json +360 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/saas-landing.json +60 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sections.json +734 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/settings.json +72 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/shadcn-admin-shell.json +49 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/shadcn-admin.json +77 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-01.json +42 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-02.json +42 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-03.json +30 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-04.json +30 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-05.json +36 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-06.json +42 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-07.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-08.json +54 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-09.json +36 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-10.json +66 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-11.json +30 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-12.json +48 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-13.json +30 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-14.json +30 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-15.json +84 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-16.json +66 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-drilldown.json +29 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/sidebar-primitives.json +155 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/store.json +75 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/support-inbox.json +63 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/team-directory.json +59 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/uibot-base.json +30 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/r/workspace.json +181 -0
- package/dist/snapshots/4501a880e17691677109b35118b89434252d4e65aa7b9a7c3a174a38ce2b418f/snapshot.json +1 -0
- package/package.json +10 -9
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "education-workspace",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Learning, reading & questions: fixed-version pages composed into one exportable Spec.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"@uibot/charts",
|
|
8
|
+
"@uibot/chat-workspace",
|
|
9
|
+
"@uibot/data",
|
|
10
|
+
"@uibot/data-studio",
|
|
11
|
+
"@uibot/document-workspace",
|
|
12
|
+
"@uibot/feedback",
|
|
13
|
+
"@uibot/grid",
|
|
14
|
+
"@uibot/interactive",
|
|
15
|
+
"@uibot/layout",
|
|
16
|
+
"@uibot/nav"
|
|
17
|
+
],
|
|
18
|
+
"files": [
|
|
19
|
+
{
|
|
20
|
+
"path": "lib/uibot/templates/education-workspace.uibot.yaml",
|
|
21
|
+
"target": "lib/uibot/templates/education-workspace.uibot.yaml",
|
|
22
|
+
"content": "version: \"2.0\"\nmenus:\n items:\n - key: dashboard\n label: Learn — Dashboard\n path: /\n - key: courses\n label: Learn — Courses\n path: /courses\n - key: lessons\n label: Learn — Calculus I\n path: /lessons\n - key: grades\n label: Learn — Grades\n path: /grades\n - key: document-reading\n label: Reading with an outline\n path: /document-reading\n - key: chat-knowledge\n label: Knowledge questions\n path: /chat-knowledge\npages:\n - id: dashboard\n path: /\n title: Learn — Dashboard\n blocks:\n - type: PageLayout\n props:\n title: Lumen LMS\n variant: sidebar\n collapsible: none\n slots:\n headerActions:\n - type: Button\n props:\n label: Resume course\n size: sm\n sidebar:\n - type: PageSiderMenu\n props:\n title: Learn — Dashboard\n children:\n - type: MenuLink\n props:\n label: Dashboard\n href: /\n icon: ▦\n active: true\n - type: MenuLink\n props:\n label: Courses\n href: /courses\n icon: ◫\n - type: MenuLink\n props:\n label: Lessons\n href: /lessons\n icon: ◧\n - type: MenuLink\n props:\n label: Grades\n href: /grades\n icon: ◔\n children:\n - type: Box\n props:\n className: mb-2\n children:\n - type: Heading\n props:\n level: 2\n text: Welcome back, Ada\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: You have 3 lessons due this week. Keep your 14-day streak alive.\n - type: StatGrid\n props:\n cols: \"4\"\n items:\n - label: Courses in progress\n value: \"5\"\n change: \"+1\"\n trend: up\n - label: Overall completion\n value: 68%\n change: +6pt\n trend: up\n - label: Study streak\n value: 14 days\n change: \"+2\"\n trend: up\n - label: Hours this month\n value: 27h\n change: -3h\n trend: down\n - type: Grid\n props:\n cols: \"3\"\n gap: lg\n children:\n - type: Box\n props:\n className: col-span-2\n children:\n - type: Card\n props:\n title: Study time\n description: Minutes per day · last 7 days\n children:\n - type: TrendChart\n props:\n height: 200\n labels:\n - Mon\n - Tue\n - Wed\n - Thu\n - Fri\n - Sat\n - Sun\n series:\n - name: This week\n area: true\n points:\n - 45\n - 60\n - 30\n - 90\n - 75\n - 120\n - 50\n - name: Goal\n points:\n - 60\n - 60\n - 60\n - 60\n - 60\n - 60\n - 60\n - type: Card\n props:\n title: Due soon\n children:\n - type: TimelineList\n props:\n items:\n - time: Today\n title: \"Quiz: Derivatives\"\n desc: Calculus I\n status: warn\n - time: Wed\n title: Essay draft\n desc: Modern History\n status: ok\n - time: Fri\n title: Lab report\n desc: Intro to Chemistry\n status: error\n - time: Sun\n title: \"Reading: Ch. 4\"\n desc: Microeconomics\n status: ok\n - type: Heading\n props:\n level: 3\n text: Continue learning\n - type: Grid\n props:\n cols: \"3\"\n responsive: true\n gap: lg\n children:\n - type: Card\n props:\n title: Calculus I\n description: Limits, derivatives, integrals\n children:\n - type: BadgeGroup\n props:\n items:\n - label: 72% done\n tone: success\n - label: Math\n tone: info\n - type: Button\n props:\n label: Continue · Lesson 9\n full: true\n - type: Card\n props:\n title: Modern History\n description: 1900 to present\n children:\n - type: BadgeGroup\n props:\n items:\n - label: 40% done\n tone: warning\n - label: Humanities\n tone: info\n - type: Button\n props:\n label: Continue · Lesson 5\n full: true\n - type: Card\n props:\n title: Intro to Chemistry\n description: Atoms, bonds, reactions\n children:\n - type: BadgeGroup\n props:\n items:\n - label: 15% done\n tone: error\n - label: Science\n tone: info\n - type: Button\n props:\n label: Continue · Lesson 2\n full: true\n - id: courses\n path: /courses\n title: Learn — Courses\n blocks:\n - type: PageLayout\n props:\n title: Lumen LMS\n variant: sidebar\n collapsible: none\n slots:\n headerActions:\n - type: Button\n props:\n label: Browse catalog\n size: sm\n variant: outline\n sidebar:\n - type: PageSiderMenu\n props:\n title: Learn — Courses\n children:\n - type: MenuLink\n props:\n label: Dashboard\n href: /\n icon: ▦\n - type: MenuLink\n props:\n label: Courses\n href: /courses\n icon: ◫\n active: true\n - type: MenuLink\n props:\n label: Lessons\n href: /lessons\n icon: ◧\n - type: MenuLink\n props:\n label: Grades\n href: /grades\n icon: ◔\n children:\n - type: Box\n props:\n className: mb-2\n children:\n - type: Heading\n props:\n level: 2\n text: My courses\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: 12 enrolled · 5 in progress · 7 completed\n - type: Card\n props:\n title: Enrolled courses\n children:\n - type: SearchableTable\n props:\n searchKey: courseSearch\n placeholder: Search courses…\n columns:\n - key: title\n label: Course\n - key: instructor\n label: Instructor\n - key: category\n label: Category\n - key: progress\n label: Progress\n align: right\n - key: status\n label: Status\n rows:\n - title: Calculus I\n instructor: Dr. Noether\n category: Math\n progress: 72%\n status: In progress\n - title: Modern History\n instructor: Prof. Zinn\n category: Humanities\n progress: 40%\n status: In progress\n - title: Intro to Chemistry\n instructor: Dr. Curie\n category: Science\n progress: 15%\n status: In progress\n - title: Microeconomics\n instructor: Dr. Smith\n category: Economics\n progress: 100%\n status: Completed\n - title: Linear Algebra\n instructor: Dr. Strang\n category: Math\n progress: 100%\n status: Completed\n - title: Creative Writing\n instructor: Prof. Woolf\n category: Humanities\n progress: 0%\n status: Not started\n - id: lessons\n path: /lessons\n title: Learn — Calculus I\n state:\n selectedId: l-9\n blocks:\n - type: PageLayout\n props:\n title: Lumen LMS\n variant: sidebar\n collapsible: none\n slots:\n headerActions:\n - type: Button\n props:\n label: Mark complete\n size: sm\n sidebar:\n - type: PageSiderMenu\n props:\n title: Learn — Calculus I\n children:\n - type: MenuLink\n props:\n label: Dashboard\n href: /\n icon: ▦\n - type: MenuLink\n props:\n label: Courses\n href: /courses\n icon: ◫\n - type: MenuLink\n props:\n label: Lessons\n href: /lessons\n icon: ◧\n active: true\n - type: MenuLink\n props:\n label: Grades\n href: /grades\n icon: ◔\n children:\n - type: Breadcrumb\n props:\n items:\n - label: Courses\n href: /courses\n - label: Calculus I\n href: /lessons\n - label: Lesson 9 — The Chain Rule\n - type: SplitMasterDetail\n props:\n selectKey: selectedId\n items:\n - id: l-7\n title: 7 · The Product Rule\n subtitle: Completed · 12 min\n - id: l-8\n title: 8 · The Quotient Rule\n subtitle: Completed · 10 min\n - id: l-9\n title: 9 · The Chain Rule\n subtitle: In progress · 18 min\n - id: l-10\n title: 10 · Implicit Differentiation\n subtitle: Locked · 15 min\n slots:\n detail:\n - type: Card\n props:\n title: Lesson 9 — The Chain Rule\n description: Calculus I · Module 3 · 18 min\n slots:\n actions:\n - type: BadgeGroup\n props:\n items:\n - label: In progress\n tone: warning\n - label: Video + reading\n tone: info\n children:\n - type: KeyValueGrid\n props:\n cols: \"3\"\n items:\n - key: Duration\n value: 18 min\n - key: Difficulty\n value: Intermediate\n - key: Prerequisite\n value: Product Rule\n - type: Divider\n - type: Markdown\n props:\n content: >\n ## The Chain Rule\n\n\n The **chain rule** lets you differentiate a\n *composition*\n\n of functions. If `y = f(g(x))`, then:\n\n\n - Differentiate the **outer** function, keeping the\n inner intact.\n\n - Multiply by the derivative of the **inner**\n function.\n\n\n Formally, `dy/dx = f'(g(x)) · g'(x)`.\n\n\n ### Worked example\n\n\n For `y = (3x + 1)^5`, the outer is `u^5` and the inner\n is\n\n `3x + 1`, so `dy/dx = 5(3x + 1)^4 · 3 = 15(3x + 1)^4`.\n - type: Toast\n props:\n level: info\n title: Up next\n message: Finish the practice set to unlock Implicit Differentiation.\n - id: grades\n path: /grades\n title: Learn — Grades\n blocks:\n - type: PageLayout\n props:\n title: Lumen LMS\n variant: sidebar\n collapsible: none\n slots:\n headerActions:\n - type: Button\n props:\n label: Export transcript\n size: sm\n variant: outline\n sidebar:\n - type: PageSiderMenu\n props:\n title: Learn — Grades\n children:\n - type: MenuLink\n props:\n label: Dashboard\n href: /\n icon: ▦\n - type: MenuLink\n props:\n label: Courses\n href: /courses\n icon: ◫\n - type: MenuLink\n props:\n label: Lessons\n href: /lessons\n icon: ◧\n - type: MenuLink\n props:\n label: Grades\n href: /grades\n icon: ◔\n active: true\n children:\n - type: Box\n props:\n className: mb-2\n children:\n - type: Heading\n props:\n level: 2\n text: Grades & transcript\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: Spring term · GPA updated nightly\n - type: StatGrid\n props:\n cols: \"4\"\n items:\n - label: GPA\n value: \"3.74\"\n change: \"+0.08\"\n trend: up\n - label: Credits earned\n value: \"48\"\n change: \"+6\"\n trend: up\n - label: Assignments graded\n value: 92%\n - label: Pending review\n value: \"3\"\n change: \"-2\"\n trend: down\n - type: Card\n props:\n title: Course grades\n children:\n - type: Table\n props:\n columns:\n - key: course\n label: Course\n - key: assignments\n label: Assignments\n align: center\n - key: average\n label: Average\n align: right\n - key: grade\n label: Grade\n align: right\n rows:\n - course: Calculus I\n assignments: 9 / 12\n average: 88%\n grade: B+\n - course: Modern History\n assignments: 5 / 10\n average: 91%\n grade: A-\n - course: Intro to Chemistry\n assignments: 2 / 8\n average: 76%\n grade: C+\n - course: Microeconomics\n assignments: 12 / 12\n average: 95%\n grade: A\n - course: Linear Algebra\n assignments: 10 / 10\n average: 93%\n grade: A\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 - id: chat-knowledge\n path: /chat-knowledge\n title: Knowledge questions\n blocks:\n - id: chat-knowledge-surface\n type: ChatWorkspace\n props:\n bindingId: chat\n variant: knowledge\n title: Knowledge questions\n showSuggestions: true\n previewState: ready\ncomposition:\n schema: uibot.solution-composition.v1\n pages:\n - resourceId: template:document-reading\n version: 0.20.0\n sourceHash: 62d69d371c33ec8cc79716059c740dc54ca323b6bb29385bab1a7077a5951d60\n sourcePageId: document-reading\n targetPageId: document-reading\n baseline:\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 bindings:\n paths: {}\n connections: {}\n layout: source\n - resourceId: template:chat-knowledge\n version: 0.20.0\n sourceHash: 76c7dae129f44979baeca7908aebca700d020c23f7798c1aa0be54da95967f61\n sourcePageId: chat-knowledge\n targetPageId: chat-knowledge\n baseline:\n id: chat-knowledge\n path: /chat-knowledge\n title: Knowledge questions\n blocks:\n - id: chat-knowledge-surface\n type: ChatWorkspace\n props:\n bindingId: chat\n variant: knowledge\n title: Knowledge questions\n showSuggestions: true\n previewState: ready\n bindings:\n paths: {}\n connections: {}\n layout: source\n",
|
|
23
|
+
"type": "registry:lib"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "lib/uibot/templates/education-workspace.uibot.json",
|
|
27
|
+
"target": "lib/uibot/templates/education-workspace.uibot.json",
|
|
28
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"education-workspace\",\n \"channel\": \"public\",\n \"template\": {\n \"file\": \"education-workspace.uibot.yaml\",\n \"contract\": {\n \"name\": \"education-workspace\",\n \"description\": \"Learning, reading & questions: fixed-version pages composed into one exportable Spec.\",\n \"level\": \"L5\",\n \"category\": \"app\",\n \"keywords\": [\n \"education-workspace\",\n \"教育:学习、阅读与知识问答\",\n \"Learning, reading & questions\",\n \"documents\",\n \"chat\",\n \"reading\",\n \"knowledge\"\n ],\n \"composedFrom\": [\n \"PageLayout\",\n \"Box\",\n \"Heading\",\n \"Paragraph\",\n \"StatGrid\",\n \"Grid\",\n \"Card\",\n \"TrendChart\",\n \"TimelineList\",\n \"BadgeGroup\",\n \"Button\",\n \"PageSiderMenu\",\n \"MenuLink\",\n \"SearchableTable\",\n \"Breadcrumb\",\n \"SplitMasterDetail\",\n \"KeyValueGrid\",\n \"Divider\",\n \"Markdown\",\n \"Toast\",\n \"Table\",\n \"DocumentWorkspace\",\n \"ChatWorkspace\"\n ]\n }\n }\n}\n",
|
|
29
|
+
"type": "registry:lib"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"meta": {
|
|
33
|
+
"uibot": {
|
|
34
|
+
"schema": "uibot.registry.item.v1",
|
|
35
|
+
"item": "education-workspace",
|
|
36
|
+
"channel": "public",
|
|
37
|
+
"template": {
|
|
38
|
+
"file": "education-workspace.uibot.yaml",
|
|
39
|
+
"contract": {
|
|
40
|
+
"name": "education-workspace",
|
|
41
|
+
"description": "Learning, reading & questions: fixed-version pages composed into one exportable Spec.",
|
|
42
|
+
"level": "L5",
|
|
43
|
+
"category": "app",
|
|
44
|
+
"keywords": [
|
|
45
|
+
"education-workspace",
|
|
46
|
+
"教育:学习、阅读与知识问答",
|
|
47
|
+
"Learning, reading & questions",
|
|
48
|
+
"documents",
|
|
49
|
+
"chat",
|
|
50
|
+
"reading",
|
|
51
|
+
"knowledge"
|
|
52
|
+
],
|
|
53
|
+
"composedFrom": [
|
|
54
|
+
"PageLayout",
|
|
55
|
+
"Box",
|
|
56
|
+
"Heading",
|
|
57
|
+
"Paragraph",
|
|
58
|
+
"StatGrid",
|
|
59
|
+
"Grid",
|
|
60
|
+
"Card",
|
|
61
|
+
"TrendChart",
|
|
62
|
+
"TimelineList",
|
|
63
|
+
"BadgeGroup",
|
|
64
|
+
"Button",
|
|
65
|
+
"PageSiderMenu",
|
|
66
|
+
"MenuLink",
|
|
67
|
+
"SearchableTable",
|
|
68
|
+
"Breadcrumb",
|
|
69
|
+
"SplitMasterDetail",
|
|
70
|
+
"KeyValueGrid",
|
|
71
|
+
"Divider",
|
|
72
|
+
"Markdown",
|
|
73
|
+
"Toast",
|
|
74
|
+
"Table",
|
|
75
|
+
"DocumentWorkspace",
|
|
76
|
+
"ChatWorkspace"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "feedback",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"description": "Standalone action button. Six visual variants and five sizes. Does not submit forms — use Form.Submit for that.",
|
|
6
|
+
"dependencies": [
|
|
7
|
+
"react@19.3.0",
|
|
8
|
+
"radix-ui@1.4.3"
|
|
9
|
+
],
|
|
10
|
+
"registryDependencies": [
|
|
11
|
+
"@uibot/uibot-base"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "components/uibot/feedback.tsx",
|
|
16
|
+
"target": "components/uibot/feedback.tsx",
|
|
17
|
+
"content": "import { useCallback, useEffect, useId, useState, useSyncExternalStore } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport type { RendererComponent } from \"@/lib/uibot-renderer\";\nimport { emit } from \"./interaction\";\nimport { LiveConfirmationDialog } from \"./overlay\";\n\nconst BTN_BASE =\n \"uibot-button inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50\";\n\nconst BTN_VARIANTS: Record<string, string> = {\n default: \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive: \"bg-destructive text-white shadow hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-muted text-foreground shadow-sm hover:bg-muted/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n};\n\nconst BTN_SIZES: Record<string, string> = {\n xs: \"h-6 px-2 text-xs rounded\",\n sm: \"h-8 px-3\",\n default: \"h-9 px-4 py-2\",\n lg: \"h-10 px-6 text-base\",\n icon: \"size-9\",\n};\n\n/** Action button */\nexport const Button: RendererComponent = (props, ctx) => {\n const variant = typeof props[\"variant\"] === \"string\" ? props[\"variant\"] : \"default\";\n const size = typeof props[\"size\"] === \"string\" ? props[\"size\"] : \"default\";\n const full = props[\"full\"] === true ? \"w-full\" : \"\";\n const children = ctx.children as ReactNode[];\n type ActionChain = Parameters<NonNullable<typeof ctx.dispatch>>[0];\n const onClick =\n (ctx.element as { events?: Record<string, ActionChain> }).events?.[\"onClick\"] ?? [];\n\n return (\n <button\n type={props[\"type\"] === \"submit\" ? \"submit\" : \"button\"}\n disabled={props[\"disabled\"] === true}\n aria-label={typeof props[\"ariaLabel\"] === \"string\" ? props[\"ariaLabel\"] : undefined}\n className={cn(\n BTN_BASE,\n BTN_VARIANTS[variant] ?? BTN_VARIANTS[\"default\"]!,\n BTN_SIZES[size] ?? BTN_SIZES[\"default\"]!,\n full,\n )}\n data-uibot-type=\"Button\"\n data-variant={variant}\n onClick={\n onClick.length > 0\n ? (event) =>\n void ctx.dispatch?.(onClick, {\n event: {\n type: \"click\",\n ...(event.currentTarget.name ? { name: event.currentTarget.name } : {}),\n },\n })\n : undefined\n }\n >\n {children.length > 0 ? children : typeof props[\"label\"] === \"string\" ? props[\"label\"] : \"\"}\n </button>\n );\n};\n\nconst TOAST_VARIANTS: Record<string, { bar: string; icon: string; label: string }> = {\n info: { bar: \"bg-blue-500\", icon: \"ℹ\", label: \"Info\" },\n success: { bar: \"bg-green-500\", icon: \"✓\", label: \"Success\" },\n warning: { bar: \"bg-yellow-500\", icon: \"⚠\", label: \"Warning\" },\n error: { bar: \"bg-destructive\", icon: \"✕\", label: \"Error\" },\n};\n\n/** Floating toasts share the top-right corner; each takes the next slot below the previous one. */\nconst floatingToasts = { ids: [] as string[], listeners: new Set<() => void>() };\n\nfunction notifyFloatingToasts() {\n for (const listener of floatingToasts.listeners) listener();\n}\n\nfunction useFloatingSlot(id: string, active: boolean): number {\n useEffect(() => {\n if (!active) return;\n floatingToasts.ids.push(id);\n notifyFloatingToasts();\n return () => {\n floatingToasts.ids = floatingToasts.ids.filter((candidate) => candidate !== id);\n notifyFloatingToasts();\n };\n }, [id, active]);\n const subscribe = useCallback((listener: () => void) => {\n floatingToasts.listeners.add(listener);\n return () => {\n floatingToasts.listeners.delete(listener);\n };\n }, []);\n return useSyncExternalStore(\n subscribe,\n () => Math.max(0, floatingToasts.ids.indexOf(id)),\n () => 0,\n );\n}\n\n/** Slot height for stacked floating toasts: a short notice (title plus up to two lines). */\nconst FLOATING_SLOT_REM = 5.5;\n\nfunction ToastView({ props }: { props: Record<string, unknown> }) {\n const level = typeof props[\"level\"] === \"string\" ? props[\"level\"] : \"info\";\n const v = TOAST_VARIANTS[level] ?? TOAST_VARIANTS[\"info\"]!;\n const title = typeof props[\"title\"] === \"string\" ? props[\"title\"] : v.label;\n const message = typeof props[\"message\"] === \"string\" ? props[\"message\"] : \"\";\n const closeable = props[\"closeable\"] !== false;\n const floating = props[\"placement\"] === \"top-right\";\n const duration =\n typeof props[\"duration\"] === \"number\" && props[\"duration\"] > 0 ? props[\"duration\"] : 0;\n const [open, setOpen] = useState(true);\n const id = useId();\n const slot = useFloatingSlot(id, floating && open);\n\n useEffect(() => {\n if (!open || duration === 0) return;\n const timer = setTimeout(() => setOpen(false), duration);\n return () => clearTimeout(timer);\n }, [open, duration]);\n\n if (!open) return null;\n return (\n <div\n role={floating && level !== \"error\" ? \"status\" : \"alert\"}\n aria-live={floating && level === \"error\" ? \"assertive\" : \"polite\"}\n className={cn(\n \"uibot-toast flex items-start gap-3 overflow-hidden rounded-lg border bg-background p-4\",\n floating\n ? \"uibot-toast-floating fixed right-4 z-50 w-[min(24rem,calc(100vw-2rem))] shadow-lg\"\n : \"relative shadow-sm\",\n )}\n style={floating ? { top: `${1 + slot * FLOATING_SLOT_REM}rem` } : undefined}\n data-uibot-type=\"Toast\"\n data-placement={floating ? \"top-right\" : \"inline\"}\n >\n <div className={cn(\"absolute left-0 top-0 h-full w-1\", v.bar)} aria-hidden=\"true\" />\n <span className=\"mt-0.5 shrink-0 text-sm leading-none\" aria-hidden=\"true\">\n {v.icon}\n </span>\n <div className=\"min-w-0 flex-1 space-y-1\">\n <p className=\"text-sm font-semibold\">{title}</p>\n {message && (\n <p className={cn(\"text-sm text-muted-foreground\", floating && \"line-clamp-2\")}>\n {message}\n </p>\n )}\n </div>\n {closeable && (\n <button\n type=\"button\"\n className=\"shrink-0 rounded p-0.5 text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50\"\n aria-label=\"Dismiss\"\n onClick={() => setOpen(false)}\n >\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 aria-hidden=\"true\"\n >\n <line x1=\"2\" y1=\"2\" x2=\"12\" y2=\"12\" />\n <line x1=\"12\" y1=\"2\" x2=\"2\" y2=\"12\" />\n </svg>\n </button>\n )}\n </div>\n );\n}\n\n/**\n * Alert banner. `placement: \"top-right\"` makes it a floating, dismissible notice (optionally\n * auto-dismissed after `duration` ms) instead of an inline banner.\n */\nexport const Toast: RendererComponent = (props) => <ToastView props={props} />;\n\n/** Controlled confirmation intent; omitted open retains the inline composition. */\nexport const Dialog: RendererComponent = (props, ctx) => {\n const confirmVariant =\n typeof props[\"confirmVariant\"] === \"string\" ? props[\"confirmVariant\"] : \"default\";\n\n const pending = props[\"pending\"] === true;\n const actions = (\n <div key=\"dialog-actions\" className=\"flex items-center justify-end gap-2\">\n {typeof props[\"cancelLabel\"] === \"string\" && (\n <button\n type=\"button\"\n disabled={pending}\n className={cn(BTN_BASE, BTN_VARIANTS[\"outline\"]!, BTN_SIZES[\"sm\"]!)}\n onClick={() => {\n if (!pending) emit(ctx, \"onCancel\", { action: \"cancel\" }, \"cancel\");\n }}\n >\n {props[\"cancelLabel\"]}\n </button>\n )}\n {typeof props[\"confirmLabel\"] === \"string\" && (\n <button\n type=\"button\"\n disabled={pending}\n className={cn(\n BTN_BASE,\n BTN_VARIANTS[confirmVariant] ?? BTN_VARIANTS[\"default\"]!,\n BTN_SIZES[\"sm\"]!,\n )}\n onClick={() => {\n if (!pending) emit(ctx, \"onConfirm\", { action: \"confirm\" }, \"confirm\");\n }}\n >\n {props[\"confirmLabel\"]}\n </button>\n )}\n </div>\n );\n const hasActions =\n typeof props[\"cancelLabel\"] === \"string\" || typeof props[\"confirmLabel\"] === \"string\";\n if (typeof props[\"open\"] === \"boolean\")\n return LiveConfirmationDialog(props, {\n ...ctx,\n slots: { ...ctx.slots, ...(hasActions ? { footer: [actions] } : {}) },\n });\n return (\n <div\n role=\"group\"\n aria-busy={pending || undefined}\n aria-label={typeof props[\"title\"] === \"string\" ? props[\"title\"] : \"Dialog\"}\n className=\"uibot-dialog\"\n data-uibot-type=\"Dialog\"\n >\n <div className=\"bg-background text-foreground mx-auto w-full max-w-sm rounded-xl border p-6 shadow-xl\">\n {typeof props[\"title\"] === \"string\" && (\n <h2 className=\"text-lg font-semibold tracking-tight\">{props[\"title\"]}</h2>\n )}\n {typeof props[\"description\"] === \"string\" && (\n <p className=\"mt-2 text-sm text-muted-foreground\">{props[\"description\"]}</p>\n )}\n {ctx.children && (ctx.children as ReactNode[]).length > 0 && (\n <div className=\"mt-4\">{ctx.children as ReactNode[]}</div>\n )}\n {hasActions && <div className=\"mt-5\">{actions}</div>}\n </div>\n </div>\n );\n};\n\n/** Loading skeleton placeholder */\nexport const Skeleton: RendererComponent = (props) => {\n const lines = typeof props[\"lines\"] === \"number\" ? Math.max(1, props[\"lines\"]) : 3;\n const type = typeof props[\"type\"] === \"string\" ? props[\"type\"] : \"lines\";\n\n if (type === \"card\") {\n return (\n <div\n className=\"uibot-skeleton animate-pulse rounded-xl border bg-card p-5\"\n data-uibot-type=\"Skeleton\"\n aria-busy=\"true\"\n aria-label=\"Loading\"\n >\n <div className=\"flex items-center gap-3\">\n <div className=\"h-10 w-10 rounded-full bg-muted\" />\n <div className=\"flex-1 space-y-2\">\n <div className=\"h-3.5 w-2/3 rounded bg-muted\" />\n <div className=\"h-3 w-1/2 rounded bg-muted\" />\n </div>\n </div>\n <div className=\"mt-4 space-y-2\">\n <div className=\"h-3 w-full rounded bg-muted\" />\n <div className=\"h-3 w-full rounded bg-muted\" />\n <div className=\"h-3 w-3/4 rounded bg-muted\" />\n </div>\n </div>\n );\n }\n\n if (type === \"table\") {\n return (\n <div\n className=\"uibot-skeleton animate-pulse rounded-lg border\"\n data-uibot-type=\"Skeleton\"\n aria-busy=\"true\"\n aria-label=\"Loading\"\n >\n <div className=\"border-b bg-muted/50 px-4 py-3\">\n <div className=\"h-3 w-1/4 rounded bg-muted\" />\n </div>\n {Array.from({ length: lines }, (_, i) => (\n <div key={i} className=\"flex gap-4 border-b px-4 py-3 last:border-0\">\n <div className=\"h-3 w-1/4 rounded bg-muted\" />\n <div className=\"h-3 w-1/3 rounded bg-muted\" />\n <div className=\"h-3 w-1/5 rounded bg-muted\" />\n </div>\n ))}\n </div>\n );\n }\n\n return (\n <div\n className=\"uibot-skeleton animate-pulse space-y-2.5\"\n data-uibot-type=\"Skeleton\"\n aria-busy=\"true\"\n aria-label=\"Loading\"\n >\n {Array.from({ length: lines }, (_, i) => (\n <div\n key={i}\n className={cn(\n \"h-3.5 rounded-md bg-muted\",\n i === lines - 1 ? \"w-3/4\" : i % 3 === 1 ? \"w-5/6\" : \"w-full\",\n )}\n />\n ))}\n </div>\n );\n};\n",
|
|
18
|
+
"type": "registry:ui"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "components/uibot/interaction.ts",
|
|
22
|
+
"target": "components/uibot/interaction.ts",
|
|
23
|
+
"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",
|
|
24
|
+
"type": "registry:ui"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "components/uibot/overlay.tsx",
|
|
28
|
+
"target": "components/uibot/overlay.tsx",
|
|
29
|
+
"content": "import { useEffect, useId, useRef, type ReactNode } from \"react\";\nimport type { RendererComponent } from \"@/lib/uibot-renderer\";\nimport { emit, text, type BlockContext } from \"./interaction\";\nimport { containPreviewNavigationDialog } from \"./preview-scope\";\nimport { ScrollArea } from \"./scroll-area\";\n\nfunction useNativeDialogLifecycle(\n ref: { current: HTMLDialogElement | null },\n open: boolean,\n triggerRef?: { current: HTMLElement | null },\n containNavigation = false,\n) {\n useEffect(() => {\n const dialog = ref.current;\n if (!dialog || !open) return;\n const trigger = triggerRef\n ? triggerRef.current\n : document.activeElement instanceof HTMLElement\n ? document.activeElement\n : null;\n const releaseBounds = containNavigation ? containPreviewNavigationDialog(dialog) : () => {};\n dialog.showModal();\n return () => {\n if (dialog.open) dialog.close();\n releaseBounds();\n if (trigger?.isConnected) trigger.focus();\n };\n }, [open, ref, triggerRef, containNavigation]);\n}\n\nfunction Overlay({\n props,\n ctx,\n drawer,\n blockType,\n}: {\n props: Record<string, unknown>;\n ctx: BlockContext;\n drawer: boolean;\n blockType?: \"Dialog\";\n}) {\n const ref = useRef<HTMLDialogElement>(null);\n const titleId = useId(),\n descriptionId = useId();\n const open = props.open === true;\n const close = () => emit(ctx, \"onClose\", { open: false }, false);\n useNativeDialogLifecycle(ref, open);\n if (!open) return null;\n return (\n <dialog\n ref={ref}\n aria-labelledby={titleId}\n aria-describedby={props.description ? descriptionId : undefined}\n aria-busy={props.pending === true || undefined}\n data-uibot-type={blockType ?? (drawer ? \"Drawer\" : \"Modal\")}\n className={`uibot-overlay overflow-hidden bg-background text-foreground p-0 shadow-xl backdrop:bg-black/50 ${drawer ? (props.placement === \"responsive\" ? \"fixed inset-x-0 top-auto bottom-0 m-0 h-[90dvh] max-h-[90dvh] w-full max-w-none rounded-t-xl border sm:inset-y-0 sm:start-auto sm:end-0 sm:h-dvh sm:max-h-dvh sm:max-w-md sm:rounded-none sm:border-s\" : \"fixed inset-y-0 start-auto end-0 m-0 h-dvh max-h-dvh w-full max-w-md border-s\") : \"m-auto w-[calc(100%-2rem)] max-w-lg rounded-xl border\"}`}\n onCancel={(e) => {\n e.preventDefault();\n if (props.pending !== true) close();\n }}\n onClick={(e) => {\n if (e.target === e.currentTarget && props.pending !== true) {\n const r = e.currentTarget.getBoundingClientRect();\n if (\n e.clientX < r.left ||\n e.clientX > r.right ||\n e.clientY < r.top ||\n e.clientY > r.bottom\n )\n close();\n }\n }}\n >\n <div className=\"flex h-full max-h-dvh flex-col\">\n <header className=\"flex items-start justify-between gap-4 border-b p-6\">\n <div>\n <h2 id={titleId} className=\"text-lg font-semibold\">\n {text(props.title, drawer ? \"Edit record\" : \"Confirm\")}\n </h2>\n {Boolean(props.description) && (\n <p id={descriptionId} className=\"mt-1 text-sm text-muted-foreground\">\n {text(props.description)}\n </p>\n )}\n </div>\n <button\n type=\"button\"\n disabled={props.pending === true}\n className=\"rounded px-2 py-1 text-sm hover:bg-muted focus-visible:ring-2\"\n aria-label=\"Close dialog\"\n onClick={close}\n >\n Close\n </button>\n </header>\n <ScrollArea\n className=\"min-h-0 flex-1\"\n viewportProps={{ className: \"p-6\", \"aria-label\": text(props.title, \"Dialog content\") }}\n >\n {ctx.children as ReactNode[]}\n </ScrollArea>\n {ctx.slots.footer && (\n <footer className=\"flex justify-end gap-2 border-t p-6\">\n {ctx.slots.footer as ReactNode[]}\n </footer>\n )}\n </div>\n </dialog>\n );\n}\nexport const LiveDrawer: RendererComponent = (props, ctx) => (\n <Overlay props={props} ctx={ctx} drawer />\n);\nexport const LiveModal: RendererComponent = (props, ctx) => (\n <Overlay props={props} ctx={ctx} drawer={false} />\n);\nexport const LiveConfirmationDialog: RendererComponent = (props, ctx) => (\n <Overlay props={props} ctx={ctx} drawer={false} blockType=\"Dialog\" />\n);\n\n/** Internal mobile navigation drawer shared by renderer blocks, not a Spec component. */\nexport function SidebarDrawer({\n id,\n open,\n onClose,\n triggerRef,\n children,\n}: {\n id: string;\n open: boolean;\n onClose: () => void;\n triggerRef: { current: HTMLButtonElement | null };\n children: ReactNode;\n}) {\n const ref = useRef<HTMLDialogElement>(null);\n useNativeDialogLifecycle(ref, open, triggerRef, true);\n\n if (!open) return null;\n return (\n <dialog\n id={id}\n ref={ref}\n aria-label=\"Navigation\"\n className=\"fixed inset-y-0 start-0 z-50 m-0 h-dvh max-h-dvh w-72 max-w-[85vw] border-r bg-background p-0 text-foreground shadow-xl backdrop:bg-black/50\"\n onCancel={(event) => {\n event.preventDefault();\n onClose();\n }}\n onClick={(event) => {\n if (event.target === event.currentTarget) {\n const bounds = event.currentTarget.getBoundingClientRect();\n if (\n event.clientX < bounds.left ||\n event.clientX > bounds.right ||\n event.clientY < bounds.top ||\n event.clientY > bounds.bottom\n )\n onClose();\n }\n if (\n event.target instanceof Element &&\n event.target.closest('a, button[data-uibot-type=\"MenuLink\"]') &&\n !event.metaKey &&\n !event.ctrlKey &&\n !event.shiftKey &&\n !event.altKey &&\n event.button === 0\n )\n onClose();\n }}\n >\n <button\n type=\"button\"\n className=\"m-3 rounded border px-3 py-2 text-sm focus-visible:ring-2\"\n aria-label=\"Close navigation\"\n onClick={onClose}\n >\n Close\n </button>\n <ScrollArea\n style={{ height: \"calc(100% - 4rem)\" }}\n viewportProps={{ \"aria-label\": \"Navigation links\" }}\n >\n {children}\n </ScrollArea>\n </dialog>\n );\n}\n",
|
|
30
|
+
"type": "registry:ui"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "components/uibot/preview-scope.ts",
|
|
34
|
+
"target": "components/uibot/preview-scope.ts",
|
|
35
|
+
"content": "/**\n * Page frames (`PageLayout`) fill the viewport so only their main area scrolls. Hosts that embed a\n * rendered page in a smaller pane mark the pane with `data-uibot-preview-scope`; inside it the frame\n * fills the pane instead of the viewport: wrappers between the pane and the frame become a flex column\n * chain, so a pane that is a flex column with a definite height hands the frame exactly the space\n * left under any sibling (such as a notice strip). Without such a pane the frame falls back to\n * `height:100%`, and to content height when that is not definite either. The pane also becomes the\n * containing block for fixed-position content such as floating toasts. Native modal navigation\n * escapes that containment and uses containPreviewNavigationDialog for its visible bounds.\n */\nexport const PREVIEW_SCOPE_CSS =\n \"[data-uibot-preview-dialog]::backdrop{clip-path:inset(var(--uibot-preview-backdrop-inset))}[data-uibot-preview-scope]{contain:layout}[data-uibot-preview-scope] .uibot-admin,[data-uibot-preview-scope] .uibot-page-layout{height:100%;min-height:0;flex:1 1 0}[data-uibot-preview-scope] div:has(.uibot-admin),[data-uibot-preview-scope] div:has(.uibot-page-layout){display:flex;flex-direction:column;min-height:0;flex:1 1 0}\";\n\n/**\n * shadcn/ui Scroll Area look for every scroll container inside a page frame (content area, sidebar,\n * table wrappers, dialogs): a slim 10px track with a rounded, theme-aware thumb. This styles the\n * native scrollbar so it matches shadcn's `ScrollArea`; it does not load Radix.\n */\nexport const SCROLLBAR_CSS =\n \".uibot-admin,.uibot-admin *,.uibot-page-layout,.uibot-page-layout *{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,currentColor 28%,transparent) transparent}.uibot-admin ::-webkit-scrollbar,.uibot-page-layout ::-webkit-scrollbar{width:10px;height:10px}.uibot-admin ::-webkit-scrollbar-track,.uibot-page-layout ::-webkit-scrollbar-track{background:transparent}.uibot-admin ::-webkit-scrollbar-thumb,.uibot-page-layout ::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:9999px;background:color-mix(in srgb,currentColor 28%,transparent);background-clip:padding-box}.uibot-admin ::-webkit-scrollbar-thumb:hover,.uibot-page-layout ::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,currentColor 45%,transparent);background-clip:padding-box}.uibot-admin ::-webkit-scrollbar-corner,.uibot-page-layout ::-webkit-scrollbar-corner{background:transparent}\";\n\n/** Native modal dialogs escape layout containment; navigation stays in its host preview. */\nexport function containPreviewNavigationDialog(dialog: HTMLDialogElement, inset = 0): () => void {\n const scope = dialog.closest<HTMLElement>(\"[data-uibot-preview-scope]\");\n if (!scope) return () => {};\n const originalStyle = dialog.getAttribute(\"style\");\n const originalVisibility = dialog.style.visibility;\n const originalMarker = dialog.getAttribute(\"data-uibot-preview-dialog\");\n dialog.setAttribute(\"data-uibot-preview-dialog\", \"\");\n let active = true;\n const sync = () => {\n if (!active) return;\n const rect = scope.getBoundingClientRect();\n const left = Math.max(0, rect.left),\n top = Math.max(0, rect.top);\n const right = Math.min(window.innerWidth, rect.right);\n const bottom = Math.min(window.innerHeight, rect.bottom);\n const width = right - left,\n height = bottom - top;\n if (width <= 0 || height <= 0) {\n dialog.style.visibility = \"hidden\";\n dialog.style.setProperty(\"--uibot-preview-backdrop-inset\", \"100% 100% 0px 0px\");\n return;\n }\n dialog.style.visibility = originalVisibility;\n const gap = Math.min(inset, width / 4, height / 4);\n const maxWidth = Math.max(0, Math.min(width * 0.85, width - gap * 2));\n const rtl = getComputedStyle(dialog).direction === \"rtl\";\n Object.assign(dialog.style, {\n position: \"fixed\",\n top: `${top + gap}px`,\n bottom: \"auto\",\n left: rtl ? \"auto\" : `${left + gap}px`,\n right: rtl ? `${window.innerWidth - right + gap}px` : \"auto\",\n height: `${height - gap * 2}px`,\n maxHeight: `${height - gap * 2}px`,\n maxWidth: `${maxWidth}px`,\n margin: \"0px\",\n });\n dialog.style.setProperty(\n \"--uibot-preview-backdrop-inset\",\n `${top}px ${window.innerWidth - right}px ${window.innerHeight - bottom}px ${left}px`,\n );\n };\n sync();\n const observer = typeof ResizeObserver === \"undefined\" ? undefined : new ResizeObserver(sync);\n observer?.observe(scope);\n window.addEventListener(\"resize\", sync);\n window.addEventListener(\"scroll\", sync, true);\n return () => {\n active = false;\n observer?.disconnect();\n window.removeEventListener(\"resize\", sync);\n window.removeEventListener(\"scroll\", sync, true);\n if (originalStyle === null) dialog.removeAttribute(\"style\");\n else dialog.setAttribute(\"style\", originalStyle);\n if (originalMarker === null) dialog.removeAttribute(\"data-uibot-preview-dialog\");\n else dialog.setAttribute(\"data-uibot-preview-dialog\", originalMarker);\n };\n}\n",
|
|
36
|
+
"type": "registry:ui"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "components/uibot/scroll-area.tsx",
|
|
40
|
+
"target": "components/uibot/scroll-area.tsx",
|
|
41
|
+
"content": "// Adapted from shadcn/ui Scroll Area (MIT).\nimport type { ComponentProps } from \"react\";\nimport { ScrollArea as Primitive } from \"radix-ui\";\n\nconst styles = `\n.uibot-scroll-area{position:relative;min-width:0;min-height:0;overflow:hidden}\n.uibot-scroll-viewport{width:100%;height:100%;max-height:inherit;border-radius:inherit;outline:none}\n.uibot-scroll-viewport:focus-visible{outline:2px solid var(--ring,#94a3b8);outline-offset:-2px}\n.uibot-scroll-viewport>div{display:block!important;min-width:100%}\n.uibot-scroll-area[data-fill-content=true]>.uibot-scroll-viewport>div{display:flex!important;flex-direction:column;min-height:100%}\n.uibot-scroll-area[data-scrollbars=horizontal]>.uibot-scroll-viewport{height:auto}\n.uibot-scrollbar{display:flex;touch-action:none;user-select:none;padding:1px;z-index:20}\n.uibot-scrollbar[data-orientation=vertical]{width:10px;border-inline-start:1px solid transparent}\n.uibot-scrollbar[data-orientation=horizontal]{height:10px;flex-direction:column;border-top:1px solid transparent}\n.uibot-scroll-thumb{position:relative;flex:1;border-radius:9999px;background:var(--nui-border,var(--border,#d4d4d8))}\n.uibot-scroll-thumb:hover,.uibot-scrollbar[data-state=visible]:active .uibot-scroll-thumb{background:var(--muted-foreground,#71717a)}\n`;\n\n/** Shared presentation primitive; refs and scroll events belong to the actual viewport. */\nexport function ScrollArea({\n children,\n className,\n scrollbars = \"vertical\",\n viewportProps,\n fillContent = false,\n ...props\n}: ComponentProps<typeof Primitive.Root> & {\n scrollbars?: \"vertical\" | \"horizontal\" | \"both\";\n viewportProps?: ComponentProps<typeof Primitive.Viewport>;\n fillContent?: boolean;\n}) {\n const { className: viewportClassName, ...viewportRest } = viewportProps ?? {};\n return (\n <Primitive.Root\n data-slot=\"scroll-area\"\n data-scrollbars={scrollbars}\n data-fill-content={fillContent}\n className={`uibot-scroll-area ${className ?? \"\"}`}\n type=\"auto\"\n {...props}\n >\n <style>{styles}</style>\n <Primitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className={`uibot-scroll-viewport ${viewportClassName ?? \"\"}`}\n tabIndex={0}\n {...viewportRest}\n >\n {children}\n </Primitive.Viewport>\n {scrollbars !== \"horizontal\" && <ScrollBar />}\n {scrollbars !== \"vertical\" && <ScrollBar orientation=\"horizontal\" />}\n <Primitive.Corner />\n </Primitive.Root>\n );\n}\n\nexport function ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: ComponentProps<typeof Primitive.Scrollbar>) {\n return (\n <Primitive.Scrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={`uibot-scrollbar ${className ?? \"\"}`}\n {...props}\n >\n <Primitive.Thumb data-slot=\"scroll-area-thumb\" className=\"uibot-scroll-thumb\" />\n </Primitive.Scrollbar>\n );\n}\n",
|
|
42
|
+
"type": "registry:ui"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "components/uibot/feedback.uibot.json",
|
|
46
|
+
"target": "components/uibot/feedback.uibot.json",
|
|
47
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"feedback\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"Button\",\n \"export\": \"Button\",\n \"module\": \"feedback.tsx\",\n \"catalog\": {\n \"name\": \"Button\",\n \"description\": \"Standalone action button. Six visual variants and five sizes. Does not submit forms — use Form.Submit for that.\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"button\",\n \"action\"\n ],\n \"props\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"enum\": [\n \"default\",\n \"destructive\",\n \"outline\",\n \"secondary\",\n \"ghost\",\n \"link\"\n ],\n \"default\": \"default\"\n },\n \"size\": {\n \"type\": \"string\",\n \"enum\": [\n \"xs\",\n \"sm\",\n \"default\",\n \"lg\",\n \"icon\"\n ],\n \"default\": \"default\"\n },\n \"full\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n },\n \"events\": {\n \"onClick\": {\n \"description\": \"Runs with a plain click payload.\"\n }\n },\n \"usageScenarios\": [\n \"Primary CTA on a hero section\",\n \"Row of outline action buttons in a Card actions slot\",\n \"Ghost icon button in a toolbar\"\n ],\n \"constraints\": [\n \"Use Form.Submit, not Button[type=submit], inside a Form\",\n \"Do not place more than 3 primary (default) buttons on the same view\"\n ]\n }\n },\n {\n \"name\": \"Dialog\",\n \"export\": \"Dialog\",\n \"module\": \"feedback.tsx\",\n \"catalog\": {\n \"name\": \"Dialog\",\n \"description\": \"Confirmation with explicit action intents. Boolean open uses a native modal; omitted open keeps an inline composition.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"dialog\",\n \"modal\",\n \"confirm\"\n ],\n \"props\": {\n \"open\": {\n \"type\": \"boolean\",\n \"description\": \"Omit for inline.\"\n },\n \"pending\": {\n \"type\": \"boolean\",\n \"description\": \"Lock actions/dismissal.\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"cancelLabel\": {\n \"type\": \"string\"\n },\n \"confirmLabel\": {\n \"type\": \"string\"\n },\n \"confirmVariant\": {\n \"type\": \"string\",\n \"enum\": [\n \"default\",\n \"destructive\",\n \"outline\"\n ],\n \"default\": \"default\"\n }\n },\n \"events\": {\n \"onConfirm\": {\n \"description\": \"value=values.action=confirm.\"\n },\n \"onCancel\": {\n \"description\": \"value=values.action=cancel.\"\n },\n \"onClose\": {\n \"description\": \"Dismiss: value=values.open=false.\"\n }\n },\n \"usageScenarios\": [\n \"Delete confirmation prompt\",\n \"Unsaved changes warning before navigation\"\n ],\n \"constraints\": [\n \"Host owns open/pending and persistence; no automatic close/write/retry.\"\n ]\n }\n },\n {\n \"name\": \"Skeleton\",\n \"export\": \"Skeleton\",\n \"module\": \"feedback.tsx\",\n \"catalog\": {\n \"name\": \"Skeleton\",\n \"description\": \"Animated loading placeholder. Three presets: lines (text), card (avatar + lines), table (header + rows).\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"skeleton\",\n \"loading\",\n \"placeholder\"\n ],\n \"props\": {\n \"lines\": {\n \"type\": \"integer\",\n \"default\": 3,\n \"description\": \"Number of skeleton rows (for lines and table types)\"\n },\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\n \"lines\",\n \"card\",\n \"table\"\n ],\n \"default\": \"lines\"\n }\n },\n \"usageScenarios\": [\n \"Loading state while fetching table data\",\n \"Card placeholder during profile load\"\n ],\n \"constraints\": [\n \"Replace with real content once data loads; do not keep Skeleton visible indefinitely\"\n ]\n }\n },\n {\n \"name\": \"Toast\",\n \"export\": \"Toast\",\n \"module\": \"feedback.tsx\",\n \"catalog\": {\n \"name\": \"Toast\",\n \"description\": \"Alert banner (info, success, warning, error); placement top-right floats it as a dismissible corner notice.\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"toast\",\n \"alert\",\n \"notification\"\n ],\n \"props\": {\n \"message\": {\n \"type\": \"string\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"level\": {\n \"type\": \"string\",\n \"enum\": [\n \"info\",\n \"success\",\n \"warning\",\n \"error\"\n ],\n \"default\": \"info\"\n },\n \"closeable\": {\n \"type\": \"boolean\",\n \"default\": true\n },\n \"placement\": {\n \"type\": \"string\",\n \"enum\": [\n \"inline\",\n \"top-right\"\n ],\n \"default\": \"inline\"\n },\n \"duration\": {\n \"type\": \"number\",\n \"description\": \"Auto-dismiss after ms\"\n }\n },\n \"usageScenarios\": [\n \"Transient success message after form submit\",\n \"Contextual inline data notice\"\n ],\n \"constraints\": [\n \"Floating notices must auto-dismiss; keep persistent disclosure inline, clear of navigation and controls\"\n ]\n }\n }\n ]\n}\n",
|
|
48
|
+
"type": "registry:ui"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"meta": {
|
|
52
|
+
"category": "primitive",
|
|
53
|
+
"level": "L1",
|
|
54
|
+
"props": {
|
|
55
|
+
"label": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"variant": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"enum": [
|
|
61
|
+
"default",
|
|
62
|
+
"destructive",
|
|
63
|
+
"outline",
|
|
64
|
+
"secondary",
|
|
65
|
+
"ghost",
|
|
66
|
+
"link"
|
|
67
|
+
],
|
|
68
|
+
"default": "default"
|
|
69
|
+
},
|
|
70
|
+
"size": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"enum": [
|
|
73
|
+
"xs",
|
|
74
|
+
"sm",
|
|
75
|
+
"default",
|
|
76
|
+
"lg",
|
|
77
|
+
"icon"
|
|
78
|
+
],
|
|
79
|
+
"default": "default"
|
|
80
|
+
},
|
|
81
|
+
"full": {
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"default": false
|
|
84
|
+
},
|
|
85
|
+
"disabled": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"default": false
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"events": {
|
|
91
|
+
"onClick": {
|
|
92
|
+
"description": "Runs with a plain click payload."
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"scenarios": [
|
|
96
|
+
"Primary CTA on a hero section",
|
|
97
|
+
"Row of outline action buttons in a Card actions slot",
|
|
98
|
+
"Ghost icon button in a toolbar"
|
|
99
|
+
],
|
|
100
|
+
"constraints": [
|
|
101
|
+
"Use Form.Submit, not Button[type=submit], inside a Form",
|
|
102
|
+
"Do not place more than 3 primary (default) buttons on the same view"
|
|
103
|
+
],
|
|
104
|
+
"provides": [
|
|
105
|
+
"Button",
|
|
106
|
+
"Toast",
|
|
107
|
+
"Dialog",
|
|
108
|
+
"Skeleton"
|
|
109
|
+
],
|
|
110
|
+
"uibot": {
|
|
111
|
+
"schema": "uibot.registry.item.v1",
|
|
112
|
+
"item": "feedback",
|
|
113
|
+
"channel": "public",
|
|
114
|
+
"components": [
|
|
115
|
+
{
|
|
116
|
+
"name": "Button",
|
|
117
|
+
"export": "Button",
|
|
118
|
+
"module": "feedback.tsx",
|
|
119
|
+
"catalog": {
|
|
120
|
+
"name": "Button",
|
|
121
|
+
"description": "Standalone action button. Six visual variants and five sizes. Does not submit forms — use Form.Submit for that.",
|
|
122
|
+
"category": "primitive",
|
|
123
|
+
"level": "L1",
|
|
124
|
+
"tags": [
|
|
125
|
+
"button",
|
|
126
|
+
"action"
|
|
127
|
+
],
|
|
128
|
+
"props": {
|
|
129
|
+
"label": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
},
|
|
132
|
+
"variant": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"enum": [
|
|
135
|
+
"default",
|
|
136
|
+
"destructive",
|
|
137
|
+
"outline",
|
|
138
|
+
"secondary",
|
|
139
|
+
"ghost",
|
|
140
|
+
"link"
|
|
141
|
+
],
|
|
142
|
+
"default": "default"
|
|
143
|
+
},
|
|
144
|
+
"size": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"enum": [
|
|
147
|
+
"xs",
|
|
148
|
+
"sm",
|
|
149
|
+
"default",
|
|
150
|
+
"lg",
|
|
151
|
+
"icon"
|
|
152
|
+
],
|
|
153
|
+
"default": "default"
|
|
154
|
+
},
|
|
155
|
+
"full": {
|
|
156
|
+
"type": "boolean",
|
|
157
|
+
"default": false
|
|
158
|
+
},
|
|
159
|
+
"disabled": {
|
|
160
|
+
"type": "boolean",
|
|
161
|
+
"default": false
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"events": {
|
|
165
|
+
"onClick": {
|
|
166
|
+
"description": "Runs with a plain click payload."
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"usageScenarios": [
|
|
170
|
+
"Primary CTA on a hero section",
|
|
171
|
+
"Row of outline action buttons in a Card actions slot",
|
|
172
|
+
"Ghost icon button in a toolbar"
|
|
173
|
+
],
|
|
174
|
+
"constraints": [
|
|
175
|
+
"Use Form.Submit, not Button[type=submit], inside a Form",
|
|
176
|
+
"Do not place more than 3 primary (default) buttons on the same view"
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"name": "Dialog",
|
|
182
|
+
"export": "Dialog",
|
|
183
|
+
"module": "feedback.tsx",
|
|
184
|
+
"catalog": {
|
|
185
|
+
"name": "Dialog",
|
|
186
|
+
"description": "Confirmation with explicit action intents. Boolean open uses a native modal; omitted open keeps an inline composition.",
|
|
187
|
+
"category": "composite",
|
|
188
|
+
"level": "L2",
|
|
189
|
+
"tags": [
|
|
190
|
+
"dialog",
|
|
191
|
+
"modal",
|
|
192
|
+
"confirm"
|
|
193
|
+
],
|
|
194
|
+
"props": {
|
|
195
|
+
"open": {
|
|
196
|
+
"type": "boolean",
|
|
197
|
+
"description": "Omit for inline."
|
|
198
|
+
},
|
|
199
|
+
"pending": {
|
|
200
|
+
"type": "boolean",
|
|
201
|
+
"description": "Lock actions/dismissal."
|
|
202
|
+
},
|
|
203
|
+
"title": {
|
|
204
|
+
"type": "string"
|
|
205
|
+
},
|
|
206
|
+
"description": {
|
|
207
|
+
"type": "string"
|
|
208
|
+
},
|
|
209
|
+
"cancelLabel": {
|
|
210
|
+
"type": "string"
|
|
211
|
+
},
|
|
212
|
+
"confirmLabel": {
|
|
213
|
+
"type": "string"
|
|
214
|
+
},
|
|
215
|
+
"confirmVariant": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"enum": [
|
|
218
|
+
"default",
|
|
219
|
+
"destructive",
|
|
220
|
+
"outline"
|
|
221
|
+
],
|
|
222
|
+
"default": "default"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"events": {
|
|
226
|
+
"onConfirm": {
|
|
227
|
+
"description": "value=values.action=confirm."
|
|
228
|
+
},
|
|
229
|
+
"onCancel": {
|
|
230
|
+
"description": "value=values.action=cancel."
|
|
231
|
+
},
|
|
232
|
+
"onClose": {
|
|
233
|
+
"description": "Dismiss: value=values.open=false."
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"usageScenarios": [
|
|
237
|
+
"Delete confirmation prompt",
|
|
238
|
+
"Unsaved changes warning before navigation"
|
|
239
|
+
],
|
|
240
|
+
"constraints": [
|
|
241
|
+
"Host owns open/pending and persistence; no automatic close/write/retry."
|
|
242
|
+
]
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "Skeleton",
|
|
247
|
+
"export": "Skeleton",
|
|
248
|
+
"module": "feedback.tsx",
|
|
249
|
+
"catalog": {
|
|
250
|
+
"name": "Skeleton",
|
|
251
|
+
"description": "Animated loading placeholder. Three presets: lines (text), card (avatar + lines), table (header + rows).",
|
|
252
|
+
"category": "primitive",
|
|
253
|
+
"level": "L1",
|
|
254
|
+
"tags": [
|
|
255
|
+
"skeleton",
|
|
256
|
+
"loading",
|
|
257
|
+
"placeholder"
|
|
258
|
+
],
|
|
259
|
+
"props": {
|
|
260
|
+
"lines": {
|
|
261
|
+
"type": "integer",
|
|
262
|
+
"default": 3,
|
|
263
|
+
"description": "Number of skeleton rows (for lines and table types)"
|
|
264
|
+
},
|
|
265
|
+
"type": {
|
|
266
|
+
"type": "string",
|
|
267
|
+
"enum": [
|
|
268
|
+
"lines",
|
|
269
|
+
"card",
|
|
270
|
+
"table"
|
|
271
|
+
],
|
|
272
|
+
"default": "lines"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"usageScenarios": [
|
|
276
|
+
"Loading state while fetching table data",
|
|
277
|
+
"Card placeholder during profile load"
|
|
278
|
+
],
|
|
279
|
+
"constraints": [
|
|
280
|
+
"Replace with real content once data loads; do not keep Skeleton visible indefinitely"
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"name": "Toast",
|
|
286
|
+
"export": "Toast",
|
|
287
|
+
"module": "feedback.tsx",
|
|
288
|
+
"catalog": {
|
|
289
|
+
"name": "Toast",
|
|
290
|
+
"description": "Alert banner (info, success, warning, error); placement top-right floats it as a dismissible corner notice.",
|
|
291
|
+
"category": "primitive",
|
|
292
|
+
"level": "L1",
|
|
293
|
+
"tags": [
|
|
294
|
+
"toast",
|
|
295
|
+
"alert",
|
|
296
|
+
"notification"
|
|
297
|
+
],
|
|
298
|
+
"props": {
|
|
299
|
+
"message": {
|
|
300
|
+
"type": "string"
|
|
301
|
+
},
|
|
302
|
+
"title": {
|
|
303
|
+
"type": "string"
|
|
304
|
+
},
|
|
305
|
+
"level": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"enum": [
|
|
308
|
+
"info",
|
|
309
|
+
"success",
|
|
310
|
+
"warning",
|
|
311
|
+
"error"
|
|
312
|
+
],
|
|
313
|
+
"default": "info"
|
|
314
|
+
},
|
|
315
|
+
"closeable": {
|
|
316
|
+
"type": "boolean",
|
|
317
|
+
"default": true
|
|
318
|
+
},
|
|
319
|
+
"placement": {
|
|
320
|
+
"type": "string",
|
|
321
|
+
"enum": [
|
|
322
|
+
"inline",
|
|
323
|
+
"top-right"
|
|
324
|
+
],
|
|
325
|
+
"default": "inline"
|
|
326
|
+
},
|
|
327
|
+
"duration": {
|
|
328
|
+
"type": "number",
|
|
329
|
+
"description": "Auto-dismiss after ms"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"usageScenarios": [
|
|
333
|
+
"Transient success message after form submit",
|
|
334
|
+
"Contextual inline data notice"
|
|
335
|
+
],
|
|
336
|
+
"constraints": [
|
|
337
|
+
"Floating notices must auto-dismiss; keep persistent disclosure inline, clear of navigation and controls"
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|