@utopia-studio-design/design-system-cli 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +23 -0
  2. package/bin/utopia-ds-mcp.mjs +9 -2
  3. package/bin/utopia-ds.mjs +115 -7
  4. package/data/blocks/activity-feed/ActivityFeedBlock.tsx +255 -0
  5. package/data/blocks/activity-feed/README.md +16 -0
  6. package/data/blocks/activity-feed/activity-feed-contract.ts +96 -0
  7. package/data/blocks/activity-feed/activity-feed-fixture.ts +22 -0
  8. package/data/blocks/activity-feed/activity-feed.css +154 -0
  9. package/data/blocks/agent-status/AgentStatusBlock.tsx +313 -0
  10. package/data/blocks/agent-status/README.md +15 -0
  11. package/data/blocks/agent-status/agent-status-contract.ts +133 -0
  12. package/data/blocks/agent-status/agent-status-fixture.ts +79 -0
  13. package/data/blocks/agent-status/agent-status.css +216 -0
  14. package/data/blocks/analytics-dashboard/AnalyticsDashboardBlocks.tsx +107 -0
  15. package/data/blocks/analytics-dashboard/AnalyticsMetricBlocks.tsx +87 -0
  16. package/data/blocks/analytics-dashboard/README.md +17 -0
  17. package/data/blocks/analytics-dashboard/analytics-dashboard.css +92 -0
  18. package/data/blocks/calendar-application/CalendarApplicationBlocks.tsx +519 -0
  19. package/data/blocks/calendar-application/README.md +20 -0
  20. package/data/blocks/calendar-application/calendar-application.css +216 -0
  21. package/data/blocks/calendar-application/calendar-localization.ts +90 -0
  22. package/data/blocks/calendar-application/calendar-panel-contract.ts +72 -0
  23. package/data/blocks/dashboard-composer/CeramicPuckAdapter.tsx +380 -0
  24. package/data/blocks/dashboard-composer/DashboardComposerBlocks.tsx +337 -0
  25. package/data/blocks/dashboard-composer/README.md +16 -0
  26. package/data/blocks/dashboard-composer/RegistryDataBlocks.tsx +238 -0
  27. package/data/blocks/dashboard-composer/dashboard-composer.css +328 -0
  28. package/data/blocks/database-workspace/DatabaseWorkspaceBlocks.tsx +240 -0
  29. package/data/blocks/database-workspace/README.md +9 -0
  30. package/data/blocks/database-workspace/database-workspace.css +107 -0
  31. package/data/blocks/interaction-workbench/InteractionWorkbench.tsx +271 -0
  32. package/data/blocks/interaction-workbench/README.md +9 -0
  33. package/data/blocks/interaction-workbench/interaction-workbench.css +226 -0
  34. package/data/docs/calendar.md +164 -0
  35. package/data/docs/charts.md +95 -0
  36. package/data/docs/composition-registry.md +174 -0
  37. package/data/docs/dashboard-composer.md +94 -0
  38. package/data/docs/database.md +68 -0
  39. package/data/docs/examples/dashboard-layout.v1.json +65 -0
  40. package/data/docs/foundations.md +2 -1
  41. package/data/docs/interaction-foundation.md +109 -0
  42. package/data/docs/observability.md +165 -0
  43. package/data/docs/quick-start-ai.md +55 -1
  44. package/data/manifests/blocks.json +392 -0
  45. package/data/manifests/catalog.json +7 -4
  46. package/data/manifests/components.json +191 -3
  47. package/data/manifests/composition-registry.json +427 -0
  48. package/data/manifests/motion-profiles.json +1 -1
  49. package/data/manifests/patterns.json +113 -1
  50. package/data/manifests/templates.json +346 -0
  51. package/data/manifests/theme-renacore.json +142 -0
  52. package/data/manifests/themes.json +314 -28
  53. package/data/templates/analytics-dashboard/AnalyticsDashboardBlocks.tsx +107 -0
  54. package/data/templates/analytics-dashboard/AnalyticsMetricBlocks.tsx +87 -0
  55. package/data/templates/analytics-dashboard/README.md +6 -0
  56. package/data/templates/analytics-dashboard/analytics-dashboard.css +92 -0
  57. package/data/templates/analytics-dashboard/index.html +13 -0
  58. package/data/templates/analytics-dashboard/main.tsx +196 -0
  59. package/data/templates/analytics-dashboard/styles.css +120 -0
  60. package/data/templates/analytics-dashboard/template.manifest.json +17 -0
  61. package/data/templates/calendar-application/CalendarApplicationBlocks.tsx +519 -0
  62. package/data/templates/calendar-application/README.md +10 -0
  63. package/data/templates/calendar-application/calendar-application.css +216 -0
  64. package/data/templates/calendar-application/calendar-localization.ts +90 -0
  65. package/data/templates/calendar-application/index.html +14 -0
  66. package/data/templates/calendar-application/main.tsx +409 -0
  67. package/data/templates/calendar-application/styles.css +248 -0
  68. package/data/templates/calendar-application/template.manifest.json +27 -0
  69. package/data/templates/composition-registry-lab/README.md +9 -0
  70. package/data/templates/composition-registry-lab/index.html +14 -0
  71. package/data/templates/composition-registry-lab/main.tsx +217 -0
  72. package/data/templates/composition-registry-lab/sample-layout.json +63 -0
  73. package/data/templates/composition-registry-lab/styles.css +343 -0
  74. package/data/templates/composition-registry-lab/template.manifest.json +34 -0
  75. package/data/templates/dashboard-composer/ActivityFeedBlock.tsx +255 -0
  76. package/data/templates/dashboard-composer/AgentStatusBlock.tsx +313 -0
  77. package/data/templates/dashboard-composer/AnalyticsDashboardBlocks.tsx +107 -0
  78. package/data/templates/dashboard-composer/AnalyticsMetricBlocks.tsx +87 -0
  79. package/data/templates/dashboard-composer/CalendarApplicationBlocks.tsx +519 -0
  80. package/data/templates/dashboard-composer/CeramicPuckAdapter.tsx +380 -0
  81. package/data/templates/dashboard-composer/DashboardComposerBlocks.tsx +337 -0
  82. package/data/templates/dashboard-composer/DatabaseWorkspaceBlocks.tsx +240 -0
  83. package/data/templates/dashboard-composer/README.md +53 -0
  84. package/data/templates/dashboard-composer/RegistryDataBlocks.tsx +238 -0
  85. package/data/templates/dashboard-composer/activity-feed-contract.ts +96 -0
  86. package/data/templates/dashboard-composer/activity-feed-fixture.ts +22 -0
  87. package/data/templates/dashboard-composer/activity-feed.css +154 -0
  88. package/data/templates/dashboard-composer/agent-status-contract.ts +133 -0
  89. package/data/templates/dashboard-composer/agent-status-fixture.ts +79 -0
  90. package/data/templates/dashboard-composer/agent-status-lab/index.html +19 -0
  91. package/data/templates/dashboard-composer/agent-status-lab/main.tsx +151 -0
  92. package/data/templates/dashboard-composer/agent-status-lab/styles.css +139 -0
  93. package/data/templates/dashboard-composer/agent-status.css +216 -0
  94. package/data/templates/dashboard-composer/analytics-dashboard.css +92 -0
  95. package/data/templates/dashboard-composer/calendar-application.css +216 -0
  96. package/data/templates/dashboard-composer/calendar-localization.ts +90 -0
  97. package/data/templates/dashboard-composer/calendar-panel-contract.ts +72 -0
  98. package/data/templates/dashboard-composer/dashboard-composer.css +328 -0
  99. package/data/templates/dashboard-composer/database-workspace.css +107 -0
  100. package/data/templates/dashboard-composer/index.html +14 -0
  101. package/data/templates/dashboard-composer/main.tsx +550 -0
  102. package/data/templates/dashboard-composer/sample-layout.json +147 -0
  103. package/data/templates/dashboard-composer/styles.css +198 -0
  104. package/data/templates/dashboard-composer/template.manifest.json +34 -0
  105. package/data/templates/dashboard-composer/visual-editor/PuckEditorSurface.tsx +132 -0
  106. package/data/templates/dashboard-composer/visual-editor/VisualEditorApp.tsx +343 -0
  107. package/data/templates/dashboard-composer/visual-editor/index.html +17 -0
  108. package/data/templates/dashboard-composer/visual-editor/main.tsx +95 -0
  109. package/data/templates/dashboard-composer/visual-editor/styles.css +310 -0
  110. package/data/templates/database-workspace/DatabaseWorkspaceBlocks.tsx +240 -0
  111. package/data/templates/database-workspace/README.md +5 -0
  112. package/data/templates/database-workspace/database-workspace.css +107 -0
  113. package/data/templates/database-workspace/index.html +14 -0
  114. package/data/templates/database-workspace/main.tsx +247 -0
  115. package/data/templates/database-workspace/styles.css +121 -0
  116. package/data/templates/database-workspace/template.manifest.json +19 -0
  117. package/data/templates/interaction-lab/InteractionWorkbench.tsx +271 -0
  118. package/data/templates/interaction-lab/README.md +7 -0
  119. package/data/templates/interaction-lab/index.html +14 -0
  120. package/data/templates/interaction-lab/interaction-workbench.css +226 -0
  121. package/data/templates/interaction-lab/main.tsx +104 -0
  122. package/data/templates/interaction-lab/styles.css +224 -0
  123. package/data/templates/interaction-lab/template.manifest.json +36 -0
  124. package/lib/api.mjs +72 -5
  125. package/lib/composition-runtime.mjs +382 -0
  126. package/lib/telemetry.mjs +74 -0
  127. package/package.json +4 -1
@@ -671,7 +671,7 @@
671
671
  "sourcePath": "packages/design-system/src/components/Button.tsx",
672
672
  "shadcnFoundation": [
673
673
  "button",
674
- "Slot",
674
+ "single-element asChild composition",
675
675
  "cva"
676
676
  ],
677
677
  "fallbackToShadcn": "button",
@@ -709,6 +709,7 @@
709
709
  "New button colors",
710
710
  "Gradient states",
711
711
  "Unlabeled icon-only buttons",
712
+ "Fragments or multiple root children inside Button asChild",
712
713
  "Left/right-only layout rules",
713
714
  "Utopia brand primitives inside reusable component logic",
714
715
  "Motion that bypasses MotionProvider or prefers-reduced-motion"
@@ -718,7 +719,10 @@
718
719
  "motion": "Optional boolean. Defaults to the MotionProvider policy and disables this component pattern when false.",
719
720
  "contentAlign": "Use 'start' for leading-aligned labels, 'center' for the default action layout, or 'between' to pin endContent to the logical inline end.",
720
721
  "startContent": "Optional leading icon or content slot with package-owned alignment.",
721
- "endContent": "Optional trailing content slot. With contentAlign='between', it remains pinned while the label truncates."
722
+ "endContent": "Optional trailing content slot. With contentAlign='between', it remains pinned while the label truncates.",
723
+ "asChild": "Use with exactly one non-Fragment anchor or framework Link that forwards ref, className, events, children, and accessibility props to one interactive element. Button preserves the child href, target, aria attributes, className, and ref while composing its internal slots inside that element.",
724
+ "disabled": "Native buttons receive disabled. With asChild, disabled links keep href, receive aria-disabled=true and tabIndex=-1, and block click activation without receiving a disabled attribute.",
725
+ "loading": "Shows the spinner/loadingText and sets aria-busy. Native buttons are disabled; asChild links use the same aria-disabled, tabIndex, and activation-blocking contract as disabled."
722
726
  }
723
727
  }
724
728
  },
@@ -776,8 +780,9 @@
776
780
  "label",
777
781
  "children",
778
782
  "ButtonGroupSeparator.orientation",
779
- "ButtonGroupText.asChild"
783
+ "ButtonGroupText.asChild"
780
784
  ],
785
+ "composition": "ButtonGroupText.asChild accepts exactly one text-compatible consumer element and preserves it as the semantic root while applying the group text class and props.",
781
786
  "shadcnReferencePatterns": [
782
787
  "button group",
783
788
  "button group with dropdown menu",
@@ -848,6 +853,8 @@
848
853
  "defaultSelectedDate": "Initial selected date for uncontrolled usage.",
849
854
  "onSelect": "Called with a Date when an enabled day is selected.",
850
855
  "onMonthChange": "Called when previous/next or month/year controls change the visible month.",
856
+ "locale": "BCP 47 locale used for month/day labels, direction, and default numeral selection.",
857
+ "numberingSystem": "Optional react-day-picker numeral system override. Defaults to the locale-resolved numbering system.",
851
858
  "weekStartsOn": "Use product locale requirements. 0 is Sunday, 1 Monday, 6 Saturday.",
852
859
  "disabledDates": "Product-owned predicate for disabled days."
853
860
  },
@@ -1015,6 +1022,62 @@
1015
1022
  "Utopia brand primitives inside reusable component logic"
1016
1023
  ]
1017
1024
  },
1025
+ {
1026
+ "name": "Chart Root",
1027
+ "category": "Data Display",
1028
+ "status": "available",
1029
+ "packageImport": "import { ChartRoot, ChartDataTable, ChartLegendList, ChartResponsiveContainer, ChartTooltipPanel, RechartsChartRenderer } from '@utopia-studio-design/design-system/Charts';",
1030
+ "sourcePath": "packages/design-system/src/components/Charts.tsx",
1031
+ "shadcnFoundation": [
1032
+ "shadcn/ui chart composition",
1033
+ "Recharts adapter boundary",
1034
+ "Ceramic interaction foundation",
1035
+ "semantic visualization token contract"
1036
+ ],
1037
+ "fallbackToShadcn": "chart",
1038
+ "requiredTokens": [
1039
+ "--visualization-series-1",
1040
+ "--visualization-series-2",
1041
+ "--visualization-positive",
1042
+ "--visualization-negative",
1043
+ "--visualization-neutral",
1044
+ "--visualization-forecast",
1045
+ "--visualization-benchmark",
1046
+ "--visualization-grid",
1047
+ "--interaction-selection-surface",
1048
+ "--interaction-selection-border"
1049
+ ],
1050
+ "useWhen": [
1051
+ "Application analytics need Line, Bar, Area, Stacked, Scatter, or Donut families",
1052
+ "Charts need controlled series visibility and keyboard point exploration",
1053
+ "Loading, empty, error, partial, and ready data states must remain explicit",
1054
+ "A semantic data table is required as the exact-value alternative"
1055
+ ],
1056
+ "avoidWhen": [
1057
+ "A small decorative bar scaffold is sufficient",
1058
+ "The chart lacks an accessible summary or stable series IDs",
1059
+ "Renderer-specific styling must bypass Ceramic tokens"
1060
+ ],
1061
+ "neverInvent": [
1062
+ "Raw series colors",
1063
+ "Color-only series identity",
1064
+ "Missing values represented as zero",
1065
+ "SVG-only interaction without a keyboard and table alternative",
1066
+ "Left/right-only keyboard behavior",
1067
+ "Utopia brand primitives inside reusable component logic"
1068
+ ],
1069
+ "ai": {
1070
+ "props": {
1071
+ "type": "'line' | 'bar' | 'area' | 'stacked' | 'scatter' | 'donut'",
1072
+ "state": "'loading' | 'empty' | 'error' | 'partial' | 'ready'",
1073
+ "renderer": "Optional tree-shakeable adapter implementing ChartRendererProps.",
1074
+ "direction": "'ltr' | 'rtl'. Changes chronological rendering and logical Arrow key exploration.",
1075
+ "showDataTable": "boolean. Renders the exact-value semantic table alternative."
1076
+ },
1077
+ "arabicFriendly": "Chart Root inherits localized labels and formatters from the consumer, mirrors chronological start and logical keyboard exploration under RTL, and keeps numbers formatted by the supplied locale.",
1078
+ "cli": "npm run ds -- component \"Chart Root\" --dense"
1079
+ }
1080
+ },
1018
1081
  {
1019
1082
  "name": "Assistant Panel",
1020
1083
  "category": "Chat",
@@ -2290,6 +2353,127 @@
2290
2353
  "Utopia brand primitives inside reusable component logic"
2291
2354
  ]
2292
2355
  },
2356
+ {
2357
+ "name": "Scheduler Root",
2358
+ "category": "Data Display",
2359
+ "status": "available",
2360
+ "packageImport": "import { SchedulerRoot, MonthView, WeekView, DayView, AgendaView, TimeGrid, AllDayLane, EventCard, DateNavigator } from '@utopia-studio-design/design-system/Calendar';",
2361
+ "sourcePath": "packages/design-system/src/components/Calendar.tsx",
2362
+ "shadcnFoundation": [
2363
+ "shadcn/ui Calendar through the Ceramic react-day-picker Calendar",
2364
+ "Ceramic Button, IconButton, and ButtonGroup composition",
2365
+ "Radix Select through the Ceramic Select family",
2366
+ "Ceramic interaction foundation",
2367
+ "application scheduler",
2368
+ "controlled persistence adapter"
2369
+ ],
2370
+ "fallbackToShadcn": "calendar, button group, select, sheet",
2371
+ "requiredTokens": [
2372
+ "--background",
2373
+ "--surface",
2374
+ "--popover-surface",
2375
+ "--foreground",
2376
+ "--muted-foreground",
2377
+ "--border",
2378
+ "--ring",
2379
+ "--interaction-selection-surface",
2380
+ "--interaction-selection-border",
2381
+ "--success",
2382
+ "--warning",
2383
+ "--destructive"
2384
+ ],
2385
+ "useWhen": [
2386
+ "A product needs event or resource scheduling rather than date selection",
2387
+ "Month, Week, Day, and Agenda views share controlled events",
2388
+ "Recurrence, overlap, conflict, permissions, and timezone display need one contract"
2389
+ ],
2390
+ "avoidWhen": [
2391
+ "A date picker or single-date Calendar is sufficient",
2392
+ "Product persistence or authorization would be owned by the component package",
2393
+ "Pointer drag would be the only way to move or resize an event"
2394
+ ],
2395
+ "neverInvent": [
2396
+ "Raw event colors",
2397
+ "Persistence or authorization inside SchedulerRoot",
2398
+ "Mouse-only move or resize behavior",
2399
+ "Hidden timezone conversion",
2400
+ "Left/right-only layout rules",
2401
+ "Utopia brand primitives inside reusable component logic"
2402
+ ],
2403
+ "ai": {
2404
+ "props": {
2405
+ "events": "Controlled SchedulerEvent records with stable IDs and ISO instants.",
2406
+ "timezone": "IANA timezone used for displayed date and time; stored instants remain unchanged.",
2407
+ "view": "Controlled month, week, day, or agenda view.",
2408
+ "adapter": "Optional controlled mutation adapter. Ceramic provides optimistic UI and rollback but never owns persistence.",
2409
+ "permissions": "Explicit create, edit, move, resize, duplicate, and delete capabilities.",
2410
+ "direction": "Optional ltr or rtl override. When omitted, direction is derived from locale.",
2411
+ "locale": "BCP 47 locale used for labels, dates, numerals, week information, and automatic direction.",
2412
+ "weekStartsOn": "Optional JS weekday override. Defaults to Intl.Locale week information.",
2413
+ "weekendDays": "Optional JS weekday list. Defaults to Intl.Locale weekend information.",
2414
+ "calendarSystem": "Primary display calendar. Event placement remains based on Gregorian instants.",
2415
+ "secondaryCalendar": "Optional secondary display calendar such as islamic-umalqura.",
2416
+ "labels": "Product-localized visible and accessibility copy. Use labels.monthGrid for the ARIA month grid, labels.compactView for shorter mobile view names, labels.compactMore for narrow month-cell overflow counts, and labels.selectDate for date actions."
2417
+ },
2418
+ "arabicFriendly": "Event titles and accessibility copy are product-localized; logical placement and navigation mirror in RTL, while dates, times, and numerals use the supplied locale and timezone."
2419
+ }
2420
+ },
2421
+ {
2422
+ "name": "Database Root",
2423
+ "category": "Data Display",
2424
+ "status": "available",
2425
+ "packageImport": "import { DatabaseRoot, DataGrid, DatabasePropertyCell } from '@utopia-studio-design/design-system/Database';",
2426
+ "sourcePath": "packages/design-system/src/components/Database.tsx",
2427
+ "shadcnFoundation": [
2428
+ "data table and form composition",
2429
+ "Ceramic interaction foundation",
2430
+ "schema-driven record grid",
2431
+ "controlled persistence adapter"
2432
+ ],
2433
+ "fallbackToShadcn": "data-table",
2434
+ "requiredTokens": [
2435
+ "--background",
2436
+ "--surface",
2437
+ "--surface-elevated",
2438
+ "--foreground",
2439
+ "--muted-foreground",
2440
+ "--border",
2441
+ "--input",
2442
+ "--ring",
2443
+ "--interaction-selection-surface",
2444
+ "--interaction-selection-border"
2445
+ ],
2446
+ "useWhen": [
2447
+ "A product needs schema-driven editable records and saved views",
2448
+ "Large datasets need virtualized grid navigation and controlled persistence",
2449
+ "A dense desktop grid must transform into mobile record details"
2450
+ ],
2451
+ "avoidWhen": [
2452
+ "A read-only Table or lightweight DataTable is sufficient",
2453
+ "Product persistence or authorization would be owned by the component package",
2454
+ "Arbitrary cell CSS is required instead of registered property types"
2455
+ ],
2456
+ "neverInvent": [
2457
+ "Raw property colors",
2458
+ "Persistence or authorization inside DatabaseRoot",
2459
+ "Mouse-only resize, reorder, or editing behavior",
2460
+ "Page-level horizontal overflow",
2461
+ "Left/right-only layout rules",
2462
+ "Utopia brand primitives inside reusable component logic"
2463
+ ],
2464
+ "ai": {
2465
+ "props": {
2466
+ "schema": "DatabaseSchema with stable property IDs and text, number, select, multi-select, date, person, checkbox, or URL property types.",
2467
+ "records": "Controlled records with stable IDs and property values.",
2468
+ "density": "compact, default, or comfortable. Density changes desktop row height without changing mobile record semantics.",
2469
+ "query": "Semantic filters, sorts, and grouping; saved view state stays product-controlled.",
2470
+ "adapter": "Optional controlled mutation adapter. Ceramic applies optimistic UI and rollback but never owns persistence.",
2471
+ "permissions": "Explicit edit, resize, reorder, and bulk-action capabilities.",
2472
+ "direction": "ltr or rtl. Logical grid navigation and inline placement follow direction."
2473
+ },
2474
+ "arabicFriendly": "Property labels and values are supplied by the product; grid arrows follow logical inline direction, dates and numbers use the supplied locale, and the mobile record-detail transformation preserves property order."
2475
+ }
2476
+ },
2293
2477
  {
2294
2478
  "name": "Data Table",
2295
2479
  "category": "Data Display",
@@ -4671,6 +4855,7 @@
4671
4855
  "shadcnFoundation": [
4672
4856
  "toggle",
4673
4857
  "Radix Toggle",
4858
+ "Slottable single-button asChild composition",
4674
4859
  "cva"
4675
4860
  ],
4676
4861
  "fallbackToShadcn": "shadcn/ui toggle",
@@ -4697,6 +4882,7 @@
4697
4882
  "neverInvent": [
4698
4883
  "New pressed colors",
4699
4884
  "Checkbox behavior",
4885
+ "Fragments, multiple roots, anchors, or navigation links inside ToggleButton asChild",
4700
4886
  "Left/right-only state names",
4701
4887
  "Utopia brand primitives inside reusable component logic"
4702
4888
  ],
@@ -4711,9 +4897,11 @@
4711
4897
  "isIconOnly",
4712
4898
  "isDisabled",
4713
4899
  "isLoading",
4900
+ "asChild",
4714
4901
  "variant",
4715
4902
  "size"
4716
4903
  ],
4904
+ "composition": "ToggleButton.asChild requires exactly one non-Fragment button-compatible component that forwards ref, className, events, children, disabled, and accessibility props to one button. Ceramic keeps spinner, icon, pressed icon, and label slots inside that root.",
4717
4905
  "arabicFriendly": [
4718
4906
  "Use logical start/end language for labels and adjacent content.",
4719
4907
  "In RTL, keep persistent pressed state behavior identical; only directional layout and directional icons may mirror.",