@uibot/cli 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 +50 -0
- package/dist/app-host-template.json +1 -0
- package/dist/app-scaffold.d.ts +15 -0
- package/dist/cli.js +210 -141
- package/dist/commands/agent-skills.d.ts +1 -0
- package/dist/commands/app.d.ts +10 -0
- package/dist/commands/logo.d.ts +1 -0
- package/dist/commands/resource.d.ts +1 -0
- package/dist/distribution-snapshot.d.ts +38 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12446 -214
- package/dist/resource-runtime.d.ts +1 -0
- package/dist/resources/agent-kit/manifest.json +245 -0
- package/dist/resources/agent-kit/prompt-admin/en.md +17 -0
- package/dist/resources/agent-kit/prompt-admin/zh.md +17 -0
- package/dist/resources/agent-kit/prompt-auth/en.md +17 -0
- package/dist/resources/agent-kit/prompt-auth/zh.md +17 -0
- package/dist/resources/agent-kit/prompt-chat/en.md +17 -0
- package/dist/resources/agent-kit/prompt-chat/zh.md +17 -0
- package/dist/resources/agent-kit/prompt-data/en.md +17 -0
- package/dist/resources/agent-kit/prompt-data/zh.md +17 -0
- package/dist/resources/agent-kit/prompt-documents/en.md +17 -0
- package/dist/resources/agent-kit/prompt-documents/zh.md +17 -0
- package/dist/resources/agent-kit/prompt-industry/en.md +17 -0
- package/dist/resources/agent-kit/prompt-industry/zh.md +17 -0
- package/dist/resources/agent-kit/recipe-admin-workbench/en.md +31 -0
- package/dist/resources/agent-kit/recipe-admin-workbench/zh.md +31 -0
- package/dist/resources/agent-kit/recipe-auth-flow/en.md +56 -0
- package/dist/resources/agent-kit/recipe-auth-flow/zh.md +56 -0
- package/dist/resources/agent-kit/recipe-knowledge-desk/en.md +20 -0
- package/dist/resources/agent-kit/recipe-knowledge-desk/zh.md +20 -0
- package/dist/resources/agent-kit/uibot-data-workbench/en.md +28 -0
- package/dist/resources/agent-kit/uibot-data-workbench/zh.md +28 -0
- package/dist/resources/agent-kit/uibot-knowledge-interface/en.md +26 -0
- package/dist/resources/agent-kit/uibot-knowledge-interface/zh.md +26 -0
- package/dist/resources/agent-kit/uibot-logo/en.md +20 -0
- package/dist/resources/agent-kit/uibot-logo/zh.md +20 -0
- package/dist/resources/agent-kit/uibot-resources/en.md +40 -0
- package/dist/resources/agent-kit/uibot-resources/zh.md +40 -0
- package/dist/resources/bundle.json +1 -1
- package/dist/shells/shadcn-admin-shell.yaml +5 -4
- 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/dist/templates/auth.yaml +84 -67
- package/dist/templates/shadcn-admin.yaml +12210 -122
- package/package.json +12 -9
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "charts",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"description": "SVG line/area chart: shared axes, pointer/keyboard values and crosshair. Alias: LineChart.",
|
|
6
|
+
"dependencies": [
|
|
7
|
+
"react@19.3.0"
|
|
8
|
+
],
|
|
9
|
+
"registryDependencies": [
|
|
10
|
+
"@uibot/uibot-base"
|
|
11
|
+
],
|
|
12
|
+
"files": [
|
|
13
|
+
{
|
|
14
|
+
"path": "components/uibot/charts.tsx",
|
|
15
|
+
"target": "components/uibot/charts.tsx",
|
|
16
|
+
"content": "import { useId, useState, type KeyboardEvent, type PointerEvent } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport type { RendererComponent } from \"@/lib/uibot-renderer\";\n\ninterface Series {\n name?: string;\n points: number[];\n area?: boolean;\n}\nfunction parseSeries(raw: unknown): Series[] {\n if (!Array.isArray(raw)) return [];\n return raw\n .map((s) => {\n if (!s || typeof s !== \"object\") return null;\n const rec = s as Record<string, unknown>;\n const points = Array.isArray(rec.points)\n ? rec.points.map((p) => {\n const value = Number(p);\n return Number.isFinite(value) ? value : 0;\n })\n : [];\n return {\n name: typeof rec.name === \"string\" ? rec.name : undefined,\n points,\n area: rec.area === true,\n } as Series;\n })\n .filter((s): s is Series => s !== null && s.points.length > 0);\n}\nconst PAD = 8;\nconst STROKE = [\"text-primary\", \"text-sky-500\", \"text-emerald-500\", \"text-amber-500\"];\n\n/** Small SVG charts share one time axis and vertical scale. Inspection is local. */\nfunction TrendChartView({ props }: { props: Record<string, unknown> }) {\n const [inspection, setInspection] = useState<{ index: number; keyboard: boolean } | null>(null);\n const tooltipId = useId();\n const instructionsId = useId();\n const series = parseSeries(props.series);\n const title = typeof props.title === \"string\" ? props.title : \"\";\n const w = typeof props.width === \"number\" ? Math.max(32, props.width) : 480;\n const h = typeof props.height === \"number\" ? Math.max(32, props.height) : 160;\n const labels = Array.isArray(props.labels) ? props.labels.map(String) : [];\n const plain = props.variant === \"plain\";\n const count = Math.max(0, ...series.map((s) => s.points.length));\n const all = series.flatMap((s) => s.points);\n const min = all.length ? Math.min(...all) : 0;\n const max = all.length ? Math.max(...all) : 1;\n const pointX = (i: number) => PAD + (count > 1 ? i / (count - 1) : 0) * (w - PAD * 2);\n const pointY = (value: number) => PAD + (h - PAD * 2) * (1 - (value - min) / (max - min || 1));\n const index = inspection?.index ?? null;\n const inspectPointer = (event: PointerEvent<SVGSVGElement>) => {\n const rect = event.currentTarget.getBoundingClientRect();\n if (!rect.width) return;\n const position = (((event.clientX - rect.left) / rect.width) * w - PAD) / (w - PAD * 2);\n setInspection({\n index: Math.max(0, Math.min(count - 1, Math.round(position * (count - 1)))),\n keyboard: false,\n });\n };\n const inspectKey = (event: KeyboardEvent<SVGSVGElement>) => {\n if (event.key === \"Escape\") {\n setInspection(null);\n return;\n }\n let next: number;\n if (event.key === \"Home\") next = 0;\n else if (event.key === \"End\") next = count - 1;\n else if (event.key === \"ArrowLeft\") next = (index ?? 1) - 1;\n else if (event.key === \"ArrowRight\") next = (index ?? -1) + 1;\n else return;\n event.preventDefault();\n setInspection({ index: Math.max(0, Math.min(count - 1, next)), keyboard: true });\n };\n return (\n <div\n className={cn(\n \"uibot-trendchart min-w-0\",\n !plain && \"bg-card text-card-foreground rounded-xl border p-4 shadow-sm\",\n )}\n data-uibot-type=\"TrendChart\"\n >\n {title && <h3 className={plain ? \"sr-only\" : \"mb-2 text-sm font-medium\"}>{title}</h3>}\n {series.length === 0 ? (\n <p className=\"py-6 text-center text-sm text-muted-foreground\">No data</p>\n ) : (\n <div className=\"relative\">\n <span id={instructionsId} className=\"sr-only\">\n Use Left and Right arrows to inspect values, Home and End to jump, and Escape to\n dismiss.\n </span>\n <svg\n viewBox={`0 0 ${w} ${h}`}\n className=\"h-auto w-full rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n style={plain ? { height: h } : undefined}\n role=\"img\"\n aria-label={title || \"Trend chart\"}\n preserveAspectRatio=\"none\"\n tabIndex={0}\n onPointerMove={inspectPointer}\n onPointerDown={inspectPointer}\n onPointerLeave={() => {\n if (!inspection?.keyboard) setInspection(null);\n }}\n onPointerCancel={() => setInspection(null)}\n onFocus={() => setInspection((current) => current ?? { index: 0, keyboard: true })}\n onBlur={() => setInspection(null)}\n onKeyDown={inspectKey}\n aria-describedby={`${instructionsId}${index === null ? \"\" : ` ${tooltipId}`}`}\n >\n {[0, 0.25, 0.5, 0.75, 1].map((t) => (\n <line\n key={t}\n x1={PAD}\n x2={w - PAD}\n y1={PAD + (h - PAD * 2) * t}\n y2={PAD + (h - PAD * 2) * t}\n className=\"text-border\"\n stroke=\"currentColor\"\n strokeWidth={0.5}\n />\n ))}\n {series.map((s, i) => {\n const pts = s.points\n .map((value, j) => `${pointX(j).toFixed(1)},${pointY(value).toFixed(1)}`)\n .join(\" \");\n return (\n <g key={i} className={STROKE[i % STROKE.length]}>\n {s.area && (\n <polygon\n fill=\"currentColor\"\n fillOpacity={0.12}\n points={`${PAD},${h - PAD} ${pts} ${pointX(s.points.length - 1)},${h - PAD}`}\n />\n )}\n <polyline\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n points={pts}\n />\n </g>\n );\n })}\n {index !== null && (\n <g aria-hidden=\"true\" pointerEvents=\"none\">\n <line\n x1={pointX(index)}\n x2={pointX(index)}\n y1={PAD}\n y2={h - PAD}\n className=\"text-muted-foreground\"\n stroke=\"currentColor\"\n strokeWidth={1}\n strokeDasharray=\"4 4\"\n vectorEffect=\"non-scaling-stroke\"\n />\n {series.map((s, i) =>\n s.points[index] === undefined ? null : (\n <circle\n key={i}\n data-chart-point=\"active\"\n cx={pointX(index)}\n cy={pointY(s.points[index] ?? 0)}\n r={4}\n className={STROKE[i % STROKE.length]}\n fill=\"currentColor\"\n stroke=\"var(--background)\"\n strokeWidth={2}\n vectorEffect=\"non-scaling-stroke\"\n />\n ),\n )}\n </g>\n )}\n </svg>\n {index !== null && (\n <div\n id={tooltipId}\n role=\"tooltip\"\n aria-live={inspection?.keyboard ? \"polite\" : \"off\"}\n className=\"pointer-events-none absolute top-3 z-10 min-w-36 rounded-lg border bg-popover px-3 py-2.5 text-xs text-popover-foreground shadow-md\"\n style={{\n ...(index < count / 2 ? { right: 12 } : { left: 12 }),\n maxWidth: \"calc(100% - 24px)\",\n }}\n >\n <div className=\"mb-2 font-medium\">{labels[index] ?? `Point ${index + 1}`}</div>\n <div className=\"space-y-1.5\">\n {series.map((s, i) =>\n s.points[index] === undefined ? null : (\n <div key={i} className=\"flex items-center gap-2\">\n <span\n className={cn(\n \"h-2 w-2 shrink-0 rounded-sm bg-current\",\n STROKE[i % STROKE.length],\n )}\n aria-hidden=\"true\"\n />\n <span className=\"text-muted-foreground\">{s.name ?? `Series ${i + 1}`}</span>\n <span className=\"ms-auto ps-3 font-medium tabular-nums\">\n {s.points[index]?.toLocaleString(\"en-US\")}\n </span>\n </div>\n ),\n )}\n </div>\n </div>\n )}\n </div>\n )}\n {labels.length > 0 && series.length > 0 && (\n <div\n className=\"mt-2 flex justify-between gap-2 text-xs text-muted-foreground\"\n aria-hidden=\"true\"\n >\n {labels\n .filter(\n (_, i) =>\n i < count &&\n (i === 0 || i === count - 1 || i % Math.max(1, Math.ceil(count / 5)) === 0),\n )\n .map((label, i) => (\n <span key={i}>{label}</span>\n ))}\n </div>\n )}\n {series.some((s) => s.name) && (\n <ul className=\"mt-3 flex flex-wrap gap-4\">\n {series.map((s, i) => (\n <li key={i} className=\"flex items-center gap-1.5 text-xs text-muted-foreground\">\n <span className={cn(\"h-2 w-2 rounded-full bg-current\", STROKE[i % STROKE.length])} />\n {s.name ?? `Series ${i + 1}`}\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n}\nexport const TrendChart: RendererComponent = (props) => (\n <TrendChartView key={JSON.stringify([props.series, props.labels])} props={props} />\n);\n/** Alias for specs that prefer the LineChart name. */\nexport const LineChart = TrendChart;\n",
|
|
17
|
+
"type": "registry:ui"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"path": "components/uibot/charts.uibot.json",
|
|
21
|
+
"target": "components/uibot/charts.uibot.json",
|
|
22
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"charts\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"LineChart\",\n \"export\": \"LineChart\",\n \"module\": \"charts.tsx\",\n \"catalog\": {\n \"name\": \"LineChart\",\n \"description\": \"Alias of TrendChart, including pointer/keyboard inspection.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"chart\",\n \"line\",\n \"svg\"\n ],\n \"props\": {\n \"variant\": {\n \"type\": \"string\",\n \"enum\": [\n \"card\",\n \"plain\"\n ],\n \"default\": \"card\"\n },\n \"labels\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"series\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"points\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"number\"\n }\n },\n \"area\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n }\n },\n \"width\": {\n \"type\": \"integer\",\n \"default\": 480\n },\n \"height\": {\n \"type\": \"integer\",\n \"default\": 160\n }\n },\n \"usageScenarios\": [\n \"Same as TrendChart; use whichever name reads better in the spec\"\n ],\n \"constraints\": [\n \"Same as TrendChart\"\n ]\n }\n },\n {\n \"name\": \"TrendChart\",\n \"export\": \"TrendChart\",\n \"module\": \"charts.tsx\",\n \"catalog\": {\n \"name\": \"TrendChart\",\n \"description\": \"SVG line/area chart: shared axes, pointer/keyboard values and crosshair. Alias: LineChart.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"chart\",\n \"trend\",\n \"line\",\n \"svg\"\n ],\n \"props\": {\n \"variant\": {\n \"type\": \"string\",\n \"enum\": [\n \"card\",\n \"plain\"\n ],\n \"default\": \"card\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"series\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"points\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"number\"\n }\n },\n \"area\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n }\n },\n \"labels\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"width\": {\n \"type\": \"integer\",\n \"default\": 480\n },\n \"height\": {\n \"type\": \"integer\",\n \"default\": 160\n }\n },\n \"usageScenarios\": [\n \"Evolution score trend over versions\",\n \"Daily active users line chart\"\n ],\n \"constraints\": [\n \"Max ~200 points/series\"\n ]\n }\n }\n ]\n}\n",
|
|
23
|
+
"type": "registry:ui"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"meta": {
|
|
27
|
+
"category": "composite",
|
|
28
|
+
"level": "L2",
|
|
29
|
+
"props": {
|
|
30
|
+
"variant": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": [
|
|
33
|
+
"card",
|
|
34
|
+
"plain"
|
|
35
|
+
],
|
|
36
|
+
"default": "card"
|
|
37
|
+
},
|
|
38
|
+
"title": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"series": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"items": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"properties": {
|
|
46
|
+
"name": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"points": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "number"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"area": {
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"default": false
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"labels": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": {
|
|
65
|
+
"type": "string"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"width": {
|
|
69
|
+
"type": "integer",
|
|
70
|
+
"default": 480
|
|
71
|
+
},
|
|
72
|
+
"height": {
|
|
73
|
+
"type": "integer",
|
|
74
|
+
"default": 160
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"scenarios": [
|
|
78
|
+
"Evolution score trend over versions",
|
|
79
|
+
"Daily active users line chart"
|
|
80
|
+
],
|
|
81
|
+
"constraints": [
|
|
82
|
+
"Max ~200 points/series"
|
|
83
|
+
],
|
|
84
|
+
"provides": [
|
|
85
|
+
"TrendChart",
|
|
86
|
+
"LineChart"
|
|
87
|
+
],
|
|
88
|
+
"uibot": {
|
|
89
|
+
"schema": "uibot.registry.item.v1",
|
|
90
|
+
"item": "charts",
|
|
91
|
+
"channel": "public",
|
|
92
|
+
"components": [
|
|
93
|
+
{
|
|
94
|
+
"name": "LineChart",
|
|
95
|
+
"export": "LineChart",
|
|
96
|
+
"module": "charts.tsx",
|
|
97
|
+
"catalog": {
|
|
98
|
+
"name": "LineChart",
|
|
99
|
+
"description": "Alias of TrendChart, including pointer/keyboard inspection.",
|
|
100
|
+
"category": "composite",
|
|
101
|
+
"level": "L2",
|
|
102
|
+
"tags": [
|
|
103
|
+
"chart",
|
|
104
|
+
"line",
|
|
105
|
+
"svg"
|
|
106
|
+
],
|
|
107
|
+
"props": {
|
|
108
|
+
"variant": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"enum": [
|
|
111
|
+
"card",
|
|
112
|
+
"plain"
|
|
113
|
+
],
|
|
114
|
+
"default": "card"
|
|
115
|
+
},
|
|
116
|
+
"labels": {
|
|
117
|
+
"type": "array",
|
|
118
|
+
"items": {
|
|
119
|
+
"type": "string"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"title": {
|
|
123
|
+
"type": "string"
|
|
124
|
+
},
|
|
125
|
+
"series": {
|
|
126
|
+
"type": "array",
|
|
127
|
+
"items": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"properties": {
|
|
130
|
+
"name": {
|
|
131
|
+
"type": "string"
|
|
132
|
+
},
|
|
133
|
+
"points": {
|
|
134
|
+
"type": "array",
|
|
135
|
+
"items": {
|
|
136
|
+
"type": "number"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"area": {
|
|
140
|
+
"type": "boolean",
|
|
141
|
+
"default": false
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"width": {
|
|
147
|
+
"type": "integer",
|
|
148
|
+
"default": 480
|
|
149
|
+
},
|
|
150
|
+
"height": {
|
|
151
|
+
"type": "integer",
|
|
152
|
+
"default": 160
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"usageScenarios": [
|
|
156
|
+
"Same as TrendChart; use whichever name reads better in the spec"
|
|
157
|
+
],
|
|
158
|
+
"constraints": [
|
|
159
|
+
"Same as TrendChart"
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "TrendChart",
|
|
165
|
+
"export": "TrendChart",
|
|
166
|
+
"module": "charts.tsx",
|
|
167
|
+
"catalog": {
|
|
168
|
+
"name": "TrendChart",
|
|
169
|
+
"description": "SVG line/area chart: shared axes, pointer/keyboard values and crosshair. Alias: LineChart.",
|
|
170
|
+
"category": "composite",
|
|
171
|
+
"level": "L2",
|
|
172
|
+
"tags": [
|
|
173
|
+
"chart",
|
|
174
|
+
"trend",
|
|
175
|
+
"line",
|
|
176
|
+
"svg"
|
|
177
|
+
],
|
|
178
|
+
"props": {
|
|
179
|
+
"variant": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"enum": [
|
|
182
|
+
"card",
|
|
183
|
+
"plain"
|
|
184
|
+
],
|
|
185
|
+
"default": "card"
|
|
186
|
+
},
|
|
187
|
+
"title": {
|
|
188
|
+
"type": "string"
|
|
189
|
+
},
|
|
190
|
+
"series": {
|
|
191
|
+
"type": "array",
|
|
192
|
+
"items": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"properties": {
|
|
195
|
+
"name": {
|
|
196
|
+
"type": "string"
|
|
197
|
+
},
|
|
198
|
+
"points": {
|
|
199
|
+
"type": "array",
|
|
200
|
+
"items": {
|
|
201
|
+
"type": "number"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"area": {
|
|
205
|
+
"type": "boolean",
|
|
206
|
+
"default": false
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"labels": {
|
|
212
|
+
"type": "array",
|
|
213
|
+
"items": {
|
|
214
|
+
"type": "string"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"width": {
|
|
218
|
+
"type": "integer",
|
|
219
|
+
"default": 480
|
|
220
|
+
},
|
|
221
|
+
"height": {
|
|
222
|
+
"type": "integer",
|
|
223
|
+
"default": 160
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"usageScenarios": [
|
|
227
|
+
"Evolution score trend over versions",
|
|
228
|
+
"Daily active users line chart"
|
|
229
|
+
],
|
|
230
|
+
"constraints": [
|
|
231
|
+
"Max ~200 points/series"
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "chat-artifact",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Chat beside your work: shared message rendering, composer, local streaming demonstration and explicit host transport.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"@uibot/chat-workspace"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "lib/uibot/templates/chat-artifact.uibot.yaml",
|
|
12
|
+
"target": "lib/uibot/templates/chat-artifact.uibot.yaml",
|
|
13
|
+
"content": "version: \"2.0\"\npages:\n - id: chat-artifact\n path: /chat-artifact\n title: Chat beside your work\n blocks:\n - id: chat-artifact-surface\n type: ChatWorkspace\n props:\n bindingId: chat\n variant: artifact\n title: Chat beside your work\n showSuggestions: true\n previewState: ready\n",
|
|
14
|
+
"type": "registry:lib"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "lib/uibot/templates/chat-artifact.uibot.json",
|
|
18
|
+
"target": "lib/uibot/templates/chat-artifact.uibot.json",
|
|
19
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"chat-artifact\",\n \"channel\": \"public\",\n \"template\": {\n \"file\": \"chat-artifact.uibot.yaml\",\n \"contract\": {\n \"name\": \"chat-artifact\",\n \"description\": \"Chat beside your work: shared message rendering, composer, local streaming demonstration and explicit host transport.\",\n \"level\": \"L4\",\n \"category\": \"page\",\n \"keywords\": [\n \"chat-artifact\",\n \"聊天与作品双栏\",\n \"Chat beside your work\",\n \"chat\",\n \"artifact\"\n ],\n \"composedFrom\": [\n \"ChatWorkspace\"\n ]\n }\n }\n}\n",
|
|
20
|
+
"type": "registry:lib"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"meta": {
|
|
24
|
+
"uibot": {
|
|
25
|
+
"schema": "uibot.registry.item.v1",
|
|
26
|
+
"item": "chat-artifact",
|
|
27
|
+
"channel": "public",
|
|
28
|
+
"template": {
|
|
29
|
+
"file": "chat-artifact.uibot.yaml",
|
|
30
|
+
"contract": {
|
|
31
|
+
"name": "chat-artifact",
|
|
32
|
+
"description": "Chat beside your work: shared message rendering, composer, local streaming demonstration and explicit host transport.",
|
|
33
|
+
"level": "L4",
|
|
34
|
+
"category": "page",
|
|
35
|
+
"keywords": [
|
|
36
|
+
"chat-artifact",
|
|
37
|
+
"聊天与作品双栏",
|
|
38
|
+
"Chat beside your work",
|
|
39
|
+
"chat",
|
|
40
|
+
"artifact"
|
|
41
|
+
],
|
|
42
|
+
"composedFrom": [
|
|
43
|
+
"ChatWorkspace"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "chat-focused",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Focused conversation: shared message rendering, composer, local streaming demonstration and explicit host transport.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"@uibot/chat-workspace"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "lib/uibot/templates/chat-focused.uibot.yaml",
|
|
12
|
+
"target": "lib/uibot/templates/chat-focused.uibot.yaml",
|
|
13
|
+
"content": "version: \"2.0\"\npages:\n - id: chat-focused\n path: /chat-focused\n title: Focused conversation\n blocks:\n - id: chat-focused-surface\n type: ChatWorkspace\n props:\n bindingId: chat\n variant: focused\n title: Focused conversation\n showSuggestions: true\n previewState: ready\n",
|
|
14
|
+
"type": "registry:lib"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "lib/uibot/templates/chat-focused.uibot.json",
|
|
18
|
+
"target": "lib/uibot/templates/chat-focused.uibot.json",
|
|
19
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"chat-focused\",\n \"channel\": \"public\",\n \"template\": {\n \"file\": \"chat-focused.uibot.yaml\",\n \"contract\": {\n \"name\": \"chat-focused\",\n \"description\": \"Focused conversation: shared message rendering, composer, local streaming demonstration and explicit host transport.\",\n \"level\": \"L4\",\n \"category\": \"page\",\n \"keywords\": [\n \"chat-focused\",\n \"专注单会话\",\n \"Focused conversation\",\n \"chat\",\n \"focused\"\n ],\n \"composedFrom\": [\n \"ChatWorkspace\"\n ]\n }\n }\n}\n",
|
|
20
|
+
"type": "registry:lib"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"meta": {
|
|
24
|
+
"uibot": {
|
|
25
|
+
"schema": "uibot.registry.item.v1",
|
|
26
|
+
"item": "chat-focused",
|
|
27
|
+
"channel": "public",
|
|
28
|
+
"template": {
|
|
29
|
+
"file": "chat-focused.uibot.yaml",
|
|
30
|
+
"contract": {
|
|
31
|
+
"name": "chat-focused",
|
|
32
|
+
"description": "Focused conversation: shared message rendering, composer, local streaming demonstration and explicit host transport.",
|
|
33
|
+
"level": "L4",
|
|
34
|
+
"category": "page",
|
|
35
|
+
"keywords": [
|
|
36
|
+
"chat-focused",
|
|
37
|
+
"专注单会话",
|
|
38
|
+
"Focused conversation",
|
|
39
|
+
"chat",
|
|
40
|
+
"focused"
|
|
41
|
+
],
|
|
42
|
+
"composedFrom": [
|
|
43
|
+
"ChatWorkspace"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "chat-history",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Conversation workspace: shared message rendering, composer, local streaming demonstration and explicit host transport.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"@uibot/chat-workspace"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "lib/uibot/templates/chat-history.uibot.yaml",
|
|
12
|
+
"target": "lib/uibot/templates/chat-history.uibot.yaml",
|
|
13
|
+
"content": "version: \"2.0\"\npages:\n - id: chat-history\n path: /chat-history\n title: Conversation workspace\n blocks:\n - id: chat-history-surface\n type: ChatWorkspace\n props:\n bindingId: chat\n variant: history\n title: Conversation workspace\n showSuggestions: true\n previewState: ready\n",
|
|
14
|
+
"type": "registry:lib"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "lib/uibot/templates/chat-history.uibot.json",
|
|
18
|
+
"target": "lib/uibot/templates/chat-history.uibot.json",
|
|
19
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"chat-history\",\n \"channel\": \"public\",\n \"template\": {\n \"file\": \"chat-history.uibot.yaml\",\n \"contract\": {\n \"name\": \"chat-history\",\n \"description\": \"Conversation workspace: shared message rendering, composer, local streaming demonstration and explicit host transport.\",\n \"level\": \"L4\",\n \"category\": \"page\",\n \"keywords\": [\n \"chat-history\",\n \"历史会话助手\",\n \"Conversation workspace\",\n \"chat\",\n \"history\"\n ],\n \"composedFrom\": [\n \"ChatWorkspace\"\n ]\n }\n }\n}\n",
|
|
20
|
+
"type": "registry:lib"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"meta": {
|
|
24
|
+
"uibot": {
|
|
25
|
+
"schema": "uibot.registry.item.v1",
|
|
26
|
+
"item": "chat-history",
|
|
27
|
+
"channel": "public",
|
|
28
|
+
"template": {
|
|
29
|
+
"file": "chat-history.uibot.yaml",
|
|
30
|
+
"contract": {
|
|
31
|
+
"name": "chat-history",
|
|
32
|
+
"description": "Conversation workspace: shared message rendering, composer, local streaming demonstration and explicit host transport.",
|
|
33
|
+
"level": "L4",
|
|
34
|
+
"category": "page",
|
|
35
|
+
"keywords": [
|
|
36
|
+
"chat-history",
|
|
37
|
+
"历史会话助手",
|
|
38
|
+
"Conversation workspace",
|
|
39
|
+
"chat",
|
|
40
|
+
"history"
|
|
41
|
+
],
|
|
42
|
+
"composedFrom": [
|
|
43
|
+
"ChatWorkspace"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "chat-knowledge",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Knowledge questions: shared message rendering, composer, local streaming demonstration and explicit host transport.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"@uibot/chat-workspace"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "lib/uibot/templates/chat-knowledge.uibot.yaml",
|
|
12
|
+
"target": "lib/uibot/templates/chat-knowledge.uibot.yaml",
|
|
13
|
+
"content": "version: \"2.0\"\npages:\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",
|
|
14
|
+
"type": "registry:lib"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "lib/uibot/templates/chat-knowledge.uibot.json",
|
|
18
|
+
"target": "lib/uibot/templates/chat-knowledge.uibot.json",
|
|
19
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"chat-knowledge\",\n \"channel\": \"public\",\n \"template\": {\n \"file\": \"chat-knowledge.uibot.yaml\",\n \"contract\": {\n \"name\": \"chat-knowledge\",\n \"description\": \"Knowledge questions: shared message rendering, composer, local streaming demonstration and explicit host transport.\",\n \"level\": \"L4\",\n \"category\": \"page\",\n \"keywords\": [\n \"chat-knowledge\",\n \"引用型知识问答\",\n \"Knowledge questions\",\n \"chat\",\n \"knowledge\"\n ],\n \"composedFrom\": [\n \"ChatWorkspace\"\n ]\n }\n }\n}\n",
|
|
20
|
+
"type": "registry:lib"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"meta": {
|
|
24
|
+
"uibot": {
|
|
25
|
+
"schema": "uibot.registry.item.v1",
|
|
26
|
+
"item": "chat-knowledge",
|
|
27
|
+
"channel": "public",
|
|
28
|
+
"template": {
|
|
29
|
+
"file": "chat-knowledge.uibot.yaml",
|
|
30
|
+
"contract": {
|
|
31
|
+
"name": "chat-knowledge",
|
|
32
|
+
"description": "Knowledge questions: shared message rendering, composer, local streaming demonstration and explicit host transport.",
|
|
33
|
+
"level": "L4",
|
|
34
|
+
"category": "page",
|
|
35
|
+
"keywords": [
|
|
36
|
+
"chat-knowledge",
|
|
37
|
+
"引用型知识问答",
|
|
38
|
+
"Knowledge questions",
|
|
39
|
+
"chat",
|
|
40
|
+
"knowledge"
|
|
41
|
+
],
|
|
42
|
+
"composedFrom": [
|
|
43
|
+
"ChatWorkspace"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "chat-support",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Support conversations: shared message rendering, composer, local streaming demonstration and explicit host transport.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"@uibot/chat-workspace"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "lib/uibot/templates/chat-support.uibot.yaml",
|
|
12
|
+
"target": "lib/uibot/templates/chat-support.uibot.yaml",
|
|
13
|
+
"content": "version: \"2.0\"\npages:\n - id: chat-support\n path: /chat-support\n title: Support conversations\n blocks:\n - id: chat-support-surface\n type: ChatWorkspace\n props:\n bindingId: chat\n variant: support\n title: Support conversations\n showSuggestions: true\n previewState: ready\n",
|
|
14
|
+
"type": "registry:lib"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "lib/uibot/templates/chat-support.uibot.json",
|
|
18
|
+
"target": "lib/uibot/templates/chat-support.uibot.json",
|
|
19
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"chat-support\",\n \"channel\": \"public\",\n \"template\": {\n \"file\": \"chat-support.uibot.yaml\",\n \"contract\": {\n \"name\": \"chat-support\",\n \"description\": \"Support conversations: shared message rendering, composer, local streaming demonstration and explicit host transport.\",\n \"level\": \"L4\",\n \"category\": \"page\",\n \"keywords\": [\n \"chat-support\",\n \"客服会话工作台\",\n \"Support conversations\",\n \"chat\",\n \"support\"\n ],\n \"composedFrom\": [\n \"ChatWorkspace\"\n ]\n }\n }\n}\n",
|
|
20
|
+
"type": "registry:lib"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"meta": {
|
|
24
|
+
"uibot": {
|
|
25
|
+
"schema": "uibot.registry.item.v1",
|
|
26
|
+
"item": "chat-support",
|
|
27
|
+
"channel": "public",
|
|
28
|
+
"template": {
|
|
29
|
+
"file": "chat-support.uibot.yaml",
|
|
30
|
+
"contract": {
|
|
31
|
+
"name": "chat-support",
|
|
32
|
+
"description": "Support conversations: shared message rendering, composer, local streaming demonstration and explicit host transport.",
|
|
33
|
+
"level": "L4",
|
|
34
|
+
"category": "page",
|
|
35
|
+
"keywords": [
|
|
36
|
+
"chat-support",
|
|
37
|
+
"客服会话工作台",
|
|
38
|
+
"Support conversations",
|
|
39
|
+
"chat",
|
|
40
|
+
"support"
|
|
41
|
+
],
|
|
42
|
+
"composedFrom": [
|
|
43
|
+
"ChatWorkspace"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "chat-workspace",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"description": "Interactive chat over a host-owned transport; optional isolated local demonstration.",
|
|
6
|
+
"dependencies": [
|
|
7
|
+
"react@19.3.0",
|
|
8
|
+
"@uibot/ai-chat@0.20.0"
|
|
9
|
+
],
|
|
10
|
+
"registryDependencies": [
|
|
11
|
+
"@uibot/uibot-base"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "components/uibot/chat-workspace.tsx",
|
|
16
|
+
"target": "components/uibot/chat-workspace.tsx",
|
|
17
|
+
"content": "import { createElement } from \"react\";\nimport { ChatWorkspace as View } from \"@uibot/ai-chat/spec\";\nexport function ChatWorkspace(props: Record<string, unknown>) {\n return createElement(View, props);\n}\n",
|
|
18
|
+
"type": "registry:ui"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "components/uibot/chat-workspace.uibot.json",
|
|
22
|
+
"target": "components/uibot/chat-workspace.uibot.json",
|
|
23
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"chat-workspace\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"ChatWorkspace\",\n \"export\": \"ChatWorkspace\",\n \"module\": \"chat-workspace.tsx\",\n \"catalog\": {\n \"name\": \"ChatWorkspace\",\n \"description\": \"Interactive chat over a host-owned transport; optional isolated local demonstration.\",\n \"category\": \"feature\",\n \"level\": \"L2\",\n \"props\": {\n \"bindingId\": {\n \"type\": \"string\",\n \"default\": \"chat\"\n },\n \"variant\": {\n \"enum\": [\n \"focused\",\n \"history\",\n \"knowledge\",\n \"support\",\n \"artifact\",\n \"copilot\"\n ],\n \"default\": \"focused\"\n },\n \"title\": {\n \"type\": \"string\",\n \"default\": \"Assistant\"\n },\n \"showSuggestions\": {\n \"type\": \"boolean\",\n \"default\": true\n },\n \"previewState\": {\n \"enum\": [\n \"ready\",\n \"empty\",\n \"loading\",\n \"error\",\n \"readonly\"\n ],\n \"default\": \"ready\"\n }\n },\n \"events\": {},\n \"constraints\": [\n \"The host must authorize the binding and inject a transport. Demo responses are local fixtures, never model results.\"\n ],\n \"tags\": [\n \"interactive\",\n \"chat\",\n \"assistant\",\n \"knowledge\"\n ]\n }\n }\n ]\n}\n",
|
|
24
|
+
"type": "registry:ui"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"meta": {
|
|
28
|
+
"category": "feature",
|
|
29
|
+
"level": "L2",
|
|
30
|
+
"props": {
|
|
31
|
+
"bindingId": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"default": "chat"
|
|
34
|
+
},
|
|
35
|
+
"variant": {
|
|
36
|
+
"enum": [
|
|
37
|
+
"focused",
|
|
38
|
+
"history",
|
|
39
|
+
"knowledge",
|
|
40
|
+
"support",
|
|
41
|
+
"artifact",
|
|
42
|
+
"copilot"
|
|
43
|
+
],
|
|
44
|
+
"default": "focused"
|
|
45
|
+
},
|
|
46
|
+
"title": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"default": "Assistant"
|
|
49
|
+
},
|
|
50
|
+
"showSuggestions": {
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"default": true
|
|
53
|
+
},
|
|
54
|
+
"previewState": {
|
|
55
|
+
"enum": [
|
|
56
|
+
"ready",
|
|
57
|
+
"empty",
|
|
58
|
+
"loading",
|
|
59
|
+
"error",
|
|
60
|
+
"readonly"
|
|
61
|
+
],
|
|
62
|
+
"default": "ready"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"events": {},
|
|
66
|
+
"constraints": [
|
|
67
|
+
"The host must authorize the binding and inject a transport. Demo responses are local fixtures, never model results."
|
|
68
|
+
],
|
|
69
|
+
"provides": [
|
|
70
|
+
"ChatWorkspace"
|
|
71
|
+
],
|
|
72
|
+
"uibot": {
|
|
73
|
+
"schema": "uibot.registry.item.v1",
|
|
74
|
+
"item": "chat-workspace",
|
|
75
|
+
"channel": "public",
|
|
76
|
+
"components": [
|
|
77
|
+
{
|
|
78
|
+
"name": "ChatWorkspace",
|
|
79
|
+
"export": "ChatWorkspace",
|
|
80
|
+
"module": "chat-workspace.tsx",
|
|
81
|
+
"catalog": {
|
|
82
|
+
"name": "ChatWorkspace",
|
|
83
|
+
"description": "Interactive chat over a host-owned transport; optional isolated local demonstration.",
|
|
84
|
+
"category": "feature",
|
|
85
|
+
"level": "L2",
|
|
86
|
+
"props": {
|
|
87
|
+
"bindingId": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"default": "chat"
|
|
90
|
+
},
|
|
91
|
+
"variant": {
|
|
92
|
+
"enum": [
|
|
93
|
+
"focused",
|
|
94
|
+
"history",
|
|
95
|
+
"knowledge",
|
|
96
|
+
"support",
|
|
97
|
+
"artifact",
|
|
98
|
+
"copilot"
|
|
99
|
+
],
|
|
100
|
+
"default": "focused"
|
|
101
|
+
},
|
|
102
|
+
"title": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"default": "Assistant"
|
|
105
|
+
},
|
|
106
|
+
"showSuggestions": {
|
|
107
|
+
"type": "boolean",
|
|
108
|
+
"default": true
|
|
109
|
+
},
|
|
110
|
+
"previewState": {
|
|
111
|
+
"enum": [
|
|
112
|
+
"ready",
|
|
113
|
+
"empty",
|
|
114
|
+
"loading",
|
|
115
|
+
"error",
|
|
116
|
+
"readonly"
|
|
117
|
+
],
|
|
118
|
+
"default": "ready"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"events": {},
|
|
122
|
+
"constraints": [
|
|
123
|
+
"The host must authorize the binding and inject a transport. Demo responses are local fixtures, never model results."
|
|
124
|
+
],
|
|
125
|
+
"tags": [
|
|
126
|
+
"interactive",
|
|
127
|
+
"chat",
|
|
128
|
+
"assistant",
|
|
129
|
+
"knowledge"
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|