@utopia-studio-design/design-system-cli 0.4.1 → 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 (125) hide show
  1. package/README.md +23 -0
  2. package/bin/utopia-ds-mcp.mjs +9 -2
  3. package/bin/utopia-ds.mjs +106 -8
  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 +1 -1
  41. package/data/docs/interaction-foundation.md +109 -0
  42. package/data/docs/quick-start-ai.md +23 -1
  43. package/data/manifests/blocks.json +392 -0
  44. package/data/manifests/catalog.json +7 -4
  45. package/data/manifests/components.json +179 -0
  46. package/data/manifests/composition-registry.json +427 -0
  47. package/data/manifests/motion-profiles.json +1 -1
  48. package/data/manifests/patterns.json +113 -1
  49. package/data/manifests/templates.json +346 -0
  50. package/data/manifests/theme-renacore.json +142 -0
  51. package/data/manifests/themes.json +314 -28
  52. package/data/templates/analytics-dashboard/AnalyticsDashboardBlocks.tsx +107 -0
  53. package/data/templates/analytics-dashboard/AnalyticsMetricBlocks.tsx +87 -0
  54. package/data/templates/analytics-dashboard/README.md +6 -0
  55. package/data/templates/analytics-dashboard/analytics-dashboard.css +92 -0
  56. package/data/templates/analytics-dashboard/index.html +13 -0
  57. package/data/templates/analytics-dashboard/main.tsx +196 -0
  58. package/data/templates/analytics-dashboard/styles.css +120 -0
  59. package/data/templates/analytics-dashboard/template.manifest.json +17 -0
  60. package/data/templates/calendar-application/CalendarApplicationBlocks.tsx +519 -0
  61. package/data/templates/calendar-application/README.md +10 -0
  62. package/data/templates/calendar-application/calendar-application.css +216 -0
  63. package/data/templates/calendar-application/calendar-localization.ts +90 -0
  64. package/data/templates/calendar-application/index.html +14 -0
  65. package/data/templates/calendar-application/main.tsx +409 -0
  66. package/data/templates/calendar-application/styles.css +248 -0
  67. package/data/templates/calendar-application/template.manifest.json +27 -0
  68. package/data/templates/composition-registry-lab/README.md +9 -0
  69. package/data/templates/composition-registry-lab/index.html +14 -0
  70. package/data/templates/composition-registry-lab/main.tsx +217 -0
  71. package/data/templates/composition-registry-lab/sample-layout.json +63 -0
  72. package/data/templates/composition-registry-lab/styles.css +343 -0
  73. package/data/templates/composition-registry-lab/template.manifest.json +34 -0
  74. package/data/templates/dashboard-composer/ActivityFeedBlock.tsx +255 -0
  75. package/data/templates/dashboard-composer/AgentStatusBlock.tsx +313 -0
  76. package/data/templates/dashboard-composer/AnalyticsDashboardBlocks.tsx +107 -0
  77. package/data/templates/dashboard-composer/AnalyticsMetricBlocks.tsx +87 -0
  78. package/data/templates/dashboard-composer/CalendarApplicationBlocks.tsx +519 -0
  79. package/data/templates/dashboard-composer/CeramicPuckAdapter.tsx +380 -0
  80. package/data/templates/dashboard-composer/DashboardComposerBlocks.tsx +337 -0
  81. package/data/templates/dashboard-composer/DatabaseWorkspaceBlocks.tsx +240 -0
  82. package/data/templates/dashboard-composer/README.md +53 -0
  83. package/data/templates/dashboard-composer/RegistryDataBlocks.tsx +238 -0
  84. package/data/templates/dashboard-composer/activity-feed-contract.ts +96 -0
  85. package/data/templates/dashboard-composer/activity-feed-fixture.ts +22 -0
  86. package/data/templates/dashboard-composer/activity-feed.css +154 -0
  87. package/data/templates/dashboard-composer/agent-status-contract.ts +133 -0
  88. package/data/templates/dashboard-composer/agent-status-fixture.ts +79 -0
  89. package/data/templates/dashboard-composer/agent-status-lab/index.html +19 -0
  90. package/data/templates/dashboard-composer/agent-status-lab/main.tsx +151 -0
  91. package/data/templates/dashboard-composer/agent-status-lab/styles.css +139 -0
  92. package/data/templates/dashboard-composer/agent-status.css +216 -0
  93. package/data/templates/dashboard-composer/analytics-dashboard.css +92 -0
  94. package/data/templates/dashboard-composer/calendar-application.css +216 -0
  95. package/data/templates/dashboard-composer/calendar-localization.ts +90 -0
  96. package/data/templates/dashboard-composer/calendar-panel-contract.ts +72 -0
  97. package/data/templates/dashboard-composer/dashboard-composer.css +328 -0
  98. package/data/templates/dashboard-composer/database-workspace.css +107 -0
  99. package/data/templates/dashboard-composer/index.html +14 -0
  100. package/data/templates/dashboard-composer/main.tsx +550 -0
  101. package/data/templates/dashboard-composer/sample-layout.json +147 -0
  102. package/data/templates/dashboard-composer/styles.css +198 -0
  103. package/data/templates/dashboard-composer/template.manifest.json +34 -0
  104. package/data/templates/dashboard-composer/visual-editor/PuckEditorSurface.tsx +132 -0
  105. package/data/templates/dashboard-composer/visual-editor/VisualEditorApp.tsx +343 -0
  106. package/data/templates/dashboard-composer/visual-editor/index.html +17 -0
  107. package/data/templates/dashboard-composer/visual-editor/main.tsx +95 -0
  108. package/data/templates/dashboard-composer/visual-editor/styles.css +310 -0
  109. package/data/templates/database-workspace/DatabaseWorkspaceBlocks.tsx +240 -0
  110. package/data/templates/database-workspace/README.md +5 -0
  111. package/data/templates/database-workspace/database-workspace.css +107 -0
  112. package/data/templates/database-workspace/index.html +14 -0
  113. package/data/templates/database-workspace/main.tsx +247 -0
  114. package/data/templates/database-workspace/styles.css +121 -0
  115. package/data/templates/database-workspace/template.manifest.json +19 -0
  116. package/data/templates/interaction-lab/InteractionWorkbench.tsx +271 -0
  117. package/data/templates/interaction-lab/README.md +7 -0
  118. package/data/templates/interaction-lab/index.html +14 -0
  119. package/data/templates/interaction-lab/interaction-workbench.css +226 -0
  120. package/data/templates/interaction-lab/main.tsx +104 -0
  121. package/data/templates/interaction-lab/styles.css +224 -0
  122. package/data/templates/interaction-lab/template.manifest.json +36 -0
  123. package/lib/api.mjs +72 -5
  124. package/lib/composition-runtime.mjs +382 -0
  125. package/package.json +4 -1
@@ -100,8 +100,18 @@
100
100
  "locked": true,
101
101
  "role": "default brand theme",
102
102
  "description": "The default Ceramic theme for The Utopia Studio. It maps semantic roles to Special Black, White, Brick Red, Light Grey, TWK Lausanne, IBM Plex Sans Arabic, square geometry, and border-led depth.",
103
- "bestFor": ["The Utopia Studio products", "Ceramic documentation", "brand-led editorial and operational surfaces"],
104
- "principles": ["architectural hierarchy", "square geometry", "restrained Brick Red emphasis", "border-led elevation", "bilingual Latin and Arabic typography"],
103
+ "bestFor": [
104
+ "The Utopia Studio products",
105
+ "Ceramic documentation",
106
+ "brand-led editorial and operational surfaces"
107
+ ],
108
+ "principles": [
109
+ "architectural hierarchy",
110
+ "square geometry",
111
+ "restrained Brick Red emphasis",
112
+ "border-led elevation",
113
+ "bilingual Latin and Arabic typography"
114
+ ],
105
115
  "brandAsset": {
106
116
  "kind": "wordmark",
107
117
  "src": "/brand/the-utopia-studio-wordmark.avif",
@@ -113,8 +123,18 @@
113
123
  "name": "ثيم The Utopia Studio الافتراضي",
114
124
  "role": "ثيم العلامة الافتراضي",
115
125
  "description": "الثيم الافتراضي لـ Ceramic وThe Utopia Studio. يربط الأدوار الدلالية بألوان العلامة وخطي TWK Lausanne وIBM Plex Sans Arabic والهندسة المربعة والعمق المعتمد على الحدود.",
116
- "bestFor": ["منتجات The Utopia Studio", "توثيق Ceramic", "الأسطح التحريرية والتشغيلية المرتبطة بالعلامة"],
117
- "principles": ["تسلسل معماري", "هندسة مربعة", "إبراز مقيد بلون Brick Red", "ارتفاع يعتمد على الحدود", "طباعة ثنائية للاتينية والعربية"],
126
+ "bestFor": [
127
+ "منتجات The Utopia Studio",
128
+ "توثيق Ceramic",
129
+ "الأسطح التحريرية والتشغيلية المرتبطة بالعلامة"
130
+ ],
131
+ "principles": [
132
+ "تسلسل معماري",
133
+ "هندسة مربعة",
134
+ "إبراز مقيد بلون Brick Red",
135
+ "ارتفاع يعتمد على الحدود",
136
+ "طباعة ثنائية للاتينية والعربية"
137
+ ],
118
138
  "brandAssetUsage": "يمكن للعلامة النصية تعريف الأسطح التابعة لـ The Utopia Studio، لكنها ليست أصلا مطلوبا لمكونات الجوهر."
119
139
  }
120
140
  },
@@ -188,8 +208,17 @@
188
208
  "locked": false,
189
209
  "role": "brand theme",
190
210
  "description": "Dark Blue, Ocean Blue, Charcoal Blue, Timid White. Manrope drives product UI and default headings; Clash Grotesk is marketing-only.",
191
- "bestFor": ["Dextrum product UI", "technical sales surfaces", "data-heavy operational workflows"],
192
- "principles": ["calm technical hierarchy", "blue-led product surfaces", "Manrope product typography", "Lucide icon system"],
211
+ "bestFor": [
212
+ "Dextrum product UI",
213
+ "technical sales surfaces",
214
+ "data-heavy operational workflows"
215
+ ],
216
+ "principles": [
217
+ "calm technical hierarchy",
218
+ "blue-led product surfaces",
219
+ "Manrope product typography",
220
+ "Lucide icon system"
221
+ ],
193
222
  "brandAsset": {
194
223
  "kind": "logo",
195
224
  "src": "/brand/dextrum-logo.svg",
@@ -201,8 +230,17 @@
201
230
  "name": "Dextrum",
202
231
  "role": "ثيم علامة",
203
232
  "description": "ثيم تقني بأزرق داكن وأزرق محيطي وأبيض هادئ. يستخدم Manrope لواجهة المنتج وClash Grotesk للتسويق فقط.",
204
- "bestFor": ["واجهات منتج Dextrum", "أسطح المبيعات التقنية", "سير العمل التشغيلي كثيف البيانات"],
205
- "principles": ["تسلسل تقني هادئ", "أسطح منتج يقودها الأزرق", "طباعة منتج بخط Manrope", "نظام أيقونات Lucide"],
233
+ "bestFor": [
234
+ "واجهات منتج Dextrum",
235
+ "أسطح المبيعات التقنية",
236
+ "سير العمل التشغيلي كثيف البيانات"
237
+ ],
238
+ "principles": [
239
+ "تسلسل تقني هادئ",
240
+ "أسطح منتج يقودها الأزرق",
241
+ "طباعة منتج بخط Manrope",
242
+ "نظام أيقونات Lucide"
243
+ ],
206
244
  "brandAssetUsage": "يستخدم الشعار فقط على الأسطح التابعة لعلامة Dextrum."
207
245
  }
208
246
  },
@@ -278,15 +316,35 @@
278
316
  "locked": false,
279
317
  "role": "brand theme",
280
318
  "description": "Near-black surfaces with warm gold accents, restrained detector lime, domain assurance states, and Hanken Grotesk for product UI. Brand and color mode are selected independently.",
281
- "bestFor": ["Barrier Intelligence product UI", "risk and intelligence workflows", "high-contrast analytical products"],
282
- "principles": ["near-black hierarchy", "warm gold emphasis", "dense analytical surfaces", "Lucide icon system", "independent brand and color mode", "restrained detector and assurance signals"],
319
+ "bestFor": [
320
+ "Barrier Intelligence product UI",
321
+ "risk and intelligence workflows",
322
+ "high-contrast analytical products"
323
+ ],
324
+ "principles": [
325
+ "near-black hierarchy",
326
+ "warm gold emphasis",
327
+ "dense analytical surfaces",
328
+ "Lucide icon system",
329
+ "independent brand and color mode",
330
+ "restrained detector and assurance signals"
331
+ ],
283
332
  "translations": {
284
333
  "ar": {
285
334
  "name": "Barrier Intelligence",
286
335
  "role": "ثيم علامة",
287
336
  "description": "ثيم بأسطح شبه سوداء ولمسات ذهبية دافئة وتسلسل حبر واضح وخط Hanken Grotesk لواجهة المنتج.",
288
- "bestFor": ["واجهات Barrier Intelligence", "سير عمل المخاطر والاستخبارات", "المنتجات التحليلية عالية التباين"],
289
- "principles": ["تسلسل شبه أسود", "إبراز ذهبي دافئ", "أسطح تحليلية كثيفة", "نظام أيقونات Lucide"],
337
+ "bestFor": [
338
+ "واجهات Barrier Intelligence",
339
+ "سير عمل المخاطر والاستخبارات",
340
+ "المنتجات التحليلية عالية التباين"
341
+ ],
342
+ "principles": [
343
+ "تسلسل شبه أسود",
344
+ "إبراز ذهبي دافئ",
345
+ "أسطح تحليلية كثيفة",
346
+ "نظام أيقونات Lucide"
347
+ ],
290
348
  "brandAssetUsage": "تبقى أصول العلامة خارج شريط هيكل Ceramic."
291
349
  }
292
350
  },
@@ -369,6 +427,114 @@
369
427
  "--modal-surface": "#141414",
370
428
  "--popover-surface": "#141414"
371
429
  }
430
+ },
431
+ {
432
+ "id": "renacore",
433
+ "name": "Renacore",
434
+ "shortName": "Renacore",
435
+ "locked": false,
436
+ "role": "brand theme",
437
+ "description": "A calm, precise operational theme for critical energy infrastructure, built from a white product canvas, muted grey structure, and restrained Renacore Teal active states.",
438
+ "motionProfile": "precise",
439
+ "bestFor": [
440
+ "Renacore marketing websites",
441
+ "predictive-intelligence product interfaces",
442
+ "energy infrastructure dashboards"
443
+ ],
444
+ "principles": [
445
+ "quiet",
446
+ "precise",
447
+ "utilitarian",
448
+ "operational"
449
+ ],
450
+ "translations": {
451
+ "ar": {
452
+ "name": "Renacore",
453
+ "role": "ثيم علامة",
454
+ "description": "ثيم تشغيلي هادئ ودقيق للبنية التحتية الحرجة للطاقة، مبني على مساحة بيضاء وهيكل رمادي وإشارات نشطة بلون Renacore Teal.",
455
+ "bestFor": [
456
+ "مواقع Renacore",
457
+ "واجهات الذكاء التنبؤي",
458
+ "لوحات معلومات البنية التحتية للطاقة"
459
+ ],
460
+ "principles": [
461
+ "هادئ",
462
+ "دقيق",
463
+ "عملي",
464
+ "تشغيلي"
465
+ ]
466
+ }
467
+ },
468
+ "brandAsset": {
469
+ "type": "image",
470
+ "src": "/brand/renacore-mark.svg",
471
+ "alt": "Renacore",
472
+ "usage": "Use the eight-part mark for Renacore identity moments. Do not repeat it as a generic interface icon."
473
+ },
474
+ "policyManifest": "packages/design-system/src/manifests/theme-renacore.json",
475
+ "css": "packages/design-system/src/themes/renacore.css",
476
+ "iconSystem": "lucide",
477
+ "values": {
478
+ "--background": "#FFFFFF",
479
+ "--foreground": "#000000",
480
+ "--card": "#F2F2F2",
481
+ "--card-foreground": "#000000",
482
+ "--primary": "#12414B",
483
+ "--primary-foreground": "#FFFFFF",
484
+ "--secondary": "#F2F2F2",
485
+ "--secondary-foreground": "#12414B",
486
+ "--muted": "#F2F2F2",
487
+ "--muted-foreground": "#666666",
488
+ "--border": "#F2F2F2",
489
+ "--input": "#D8D8D8",
490
+ "--ring": "#12414B",
491
+ "--radius": "8px",
492
+ "--radius-control": "6px",
493
+ "--radius-surface": "12px",
494
+ "--radius-chat-bubble": "14px",
495
+ "--radius-chat-composer": "16px",
496
+ "--radius-chat-token": "8px",
497
+ "--shadow-control": "none",
498
+ "--motion-duration-press": "120ms",
499
+ "--motion-duration-page": "300ms",
500
+ "--motion-duration-expand": "260ms",
501
+ "--motion-duration-reveal": "520ms",
502
+ "--motion-duration-icon": "360ms",
503
+ "--motion-ease-standard": "cubic-bezier(0.2, 0, 0, 1)",
504
+ "--motion-ease-emphasized": "cubic-bezier(0.16, 1, 0.3, 1)",
505
+ "--motion-ease-icon": "cubic-bezier(0.16, 1, 0.3, 1)",
506
+ "--motion-press-scale": "0.985",
507
+ "--motion-distance-page": "6px",
508
+ "--motion-distance-reveal": "14px",
509
+ "--font-sans": "Host Grotesk",
510
+ "--font-display": "Host Grotesk",
511
+ "--font-ui-support": "Host Grotesk",
512
+ "--font-marketing-display": "Host Grotesk",
513
+ "--font-arabic": "IBM Plex Sans Arabic",
514
+ "--font-arabic-body": "IBM Plex Sans Arabic",
515
+ "--font-arabic-display": "IBM Plex Sans Arabic",
516
+ "--font-weight-arabic-body": "400",
517
+ "--font-weight-arabic-display": "500",
518
+ "--font-size-display": "clamp(3rem, 7vw, 6.75rem)",
519
+ "--font-size-arabic-body": "16px",
520
+ "--font-size-arabic-body-lg": "18px",
521
+ "--font-size-arabic-display": "clamp(3rem, 7.1vw, 6.8rem)",
522
+ "--line-height-arabic": "1.75",
523
+ "--line-height-arabic-body": "1.75",
524
+ "--line-height-arabic-display": "1.12",
525
+ "--tracking-arabic": "0",
526
+ "--tracking-arabic-display": "0",
527
+ "--sidebar-width": "17rem",
528
+ "--control-height-sm": "2.125rem",
529
+ "--sidebar-width-collapsed": "4rem",
530
+ "--sidebar-min-block-size": "30rem",
531
+ "--sidebar-rail-size": "8px",
532
+ "--button-height": "42px",
533
+ "--card-padding": "24px",
534
+ "--overlay": "rgb(0 0 0 / 65%)",
535
+ "--modal-surface": "#FFFFFF",
536
+ "--popover-surface": "#FFFFFF"
537
+ }
372
538
  }
373
539
  ],
374
540
  "plannedThemeSlots": [
@@ -377,44 +543,164 @@
377
543
  "name": "Venture Proof",
378
544
  "status": "planned",
379
545
  "purpose": "Portfolio and company proof surfaces.",
380
- "audience": ["venture studios", "portfolios", "company profiles"],
546
+ "audience": [
547
+ "venture studios",
548
+ "portfolios",
549
+ "company profiles"
550
+ ],
381
551
  "visualDirection": "Editorial proof hierarchy with strong media, concise evidence, and calm navigation.",
382
- "semanticExtensions": ["--proof-accent", "--proof-media-surface", "--proof-metric-foreground"],
383
- "requiredValidation": ["case-study density", "mixed media ratios", "Arabic company profiles", "LTR and RTL carousels"],
384
- "translations": { "ar": { "name": "إثبات المشاريع", "purpose": "أسطح للمحافظ وإثبات الشركات.", "audience": ["استوديوهات المشاريع", "المحافظ", "ملفات الشركات"], "visualDirection": "تسلسل تحريري للأدلة مع وسائط قوية وأدلة مختصرة وتنقل هادئ.", "requiredValidation": ["كثافة دراسات الحالة", "نسب الوسائط المختلطة", "ملفات شركات عربية", "عارضات شرائح LTR وRTL"] } }
552
+ "semanticExtensions": [
553
+ "--proof-accent",
554
+ "--proof-media-surface",
555
+ "--proof-metric-foreground"
556
+ ],
557
+ "requiredValidation": [
558
+ "case-study density",
559
+ "mixed media ratios",
560
+ "Arabic company profiles",
561
+ "LTR and RTL carousels"
562
+ ],
563
+ "translations": {
564
+ "ar": {
565
+ "name": "إثبات المشاريع",
566
+ "purpose": "أسطح للمحافظ وإثبات الشركات.",
567
+ "audience": [
568
+ "استوديوهات المشاريع",
569
+ "المحافظ",
570
+ "ملفات الشركات"
571
+ ],
572
+ "visualDirection": "تسلسل تحريري للأدلة مع وسائط قوية وأدلة مختصرة وتنقل هادئ.",
573
+ "requiredValidation": [
574
+ "كثافة دراسات الحالة",
575
+ "نسب الوسائط المختلطة",
576
+ "ملفات شركات عربية",
577
+ "عارضات شرائح LTR وRTL"
578
+ ]
579
+ }
580
+ }
385
581
  },
386
582
  {
387
583
  "id": "operator",
388
584
  "name": "Operator Console",
389
585
  "status": "planned",
390
586
  "purpose": "Dense product and internal tool interfaces.",
391
- "audience": ["operators", "internal tools", "admin products"],
587
+ "audience": [
588
+ "operators",
589
+ "internal tools",
590
+ "admin products"
591
+ ],
392
592
  "visualDirection": "High-density operational hierarchy with compact controls and clear exception states.",
393
- "semanticExtensions": ["--operator-density", "--operator-row-height", "--operator-exception"],
394
- "requiredValidation": ["dense tables", "keyboard navigation", "Arabic filters", "RTL side navigation"],
395
- "translations": { "ar": { "name": "وحدة المشغّل", "purpose": "واجهات كثيفة للمنتجات والأدوات الداخلية.", "audience": ["المشغّلون", "الأدوات الداخلية", "منتجات الإدارة"], "visualDirection": "تسلسل تشغيلي عالي الكثافة مع عناصر تحكم مختصرة وحالات استثناء واضحة.", "requiredValidation": ["الجداول الكثيفة", "التنقل بلوحة المفاتيح", "مرشحات عربية", "تنقل جانبي RTL"] } }
593
+ "semanticExtensions": [
594
+ "--operator-density",
595
+ "--operator-row-height",
596
+ "--operator-exception"
597
+ ],
598
+ "requiredValidation": [
599
+ "dense tables",
600
+ "keyboard navigation",
601
+ "Arabic filters",
602
+ "RTL side navigation"
603
+ ],
604
+ "translations": {
605
+ "ar": {
606
+ "name": "وحدة المشغّل",
607
+ "purpose": "واجهات كثيفة للمنتجات والأدوات الداخلية.",
608
+ "audience": [
609
+ "المشغّلون",
610
+ "الأدوات الداخلية",
611
+ "منتجات الإدارة"
612
+ ],
613
+ "visualDirection": "تسلسل تشغيلي عالي الكثافة مع عناصر تحكم مختصرة وحالات استثناء واضحة.",
614
+ "requiredValidation": [
615
+ "الجداول الكثيفة",
616
+ "التنقل بلوحة المفاتيح",
617
+ "مرشحات عربية",
618
+ "تنقل جانبي RTL"
619
+ ]
620
+ }
621
+ }
396
622
  },
397
623
  {
398
624
  "id": "editorial",
399
625
  "name": "Editorial Resource",
400
626
  "status": "planned",
401
627
  "purpose": "Resource articles and technical guides.",
402
- "audience": ["documentation teams", "research publishers", "technical resources"],
628
+ "audience": [
629
+ "documentation teams",
630
+ "research publishers",
631
+ "technical resources"
632
+ ],
403
633
  "visualDirection": "Reading-first typography with restrained navigation, annotations, code, and media.",
404
- "semanticExtensions": ["--editorial-measure", "--editorial-note", "--editorial-code-surface"],
405
- "requiredValidation": ["long-form reading", "code overflow", "Arabic article rhythm", "bilingual tables of contents"],
406
- "translations": { "ar": { "name": "المورد التحريري", "purpose": "مقالات الموارد والأدلة التقنية.", "audience": ["فرق التوثيق", "ناشرو الأبحاث", "الموارد التقنية"], "visualDirection": "طباعة تضع القراءة أولا مع تنقل هادئ وملاحظات وكود ووسائط.", "requiredValidation": ["قراءة المحتوى الطويل", "تجاوز الكود", "إيقاع المقال العربي", "جداول محتويات ثنائية اللغة"] } }
634
+ "semanticExtensions": [
635
+ "--editorial-measure",
636
+ "--editorial-note",
637
+ "--editorial-code-surface"
638
+ ],
639
+ "requiredValidation": [
640
+ "long-form reading",
641
+ "code overflow",
642
+ "Arabic article rhythm",
643
+ "bilingual tables of contents"
644
+ ],
645
+ "translations": {
646
+ "ar": {
647
+ "name": "المورد التحريري",
648
+ "purpose": "مقالات الموارد والأدلة التقنية.",
649
+ "audience": [
650
+ "فرق التوثيق",
651
+ "ناشرو الأبحاث",
652
+ "الموارد التقنية"
653
+ ],
654
+ "visualDirection": "طباعة تضع القراءة أولا مع تنقل هادئ وملاحظات وكود ووسائط.",
655
+ "requiredValidation": [
656
+ "قراءة المحتوى الطويل",
657
+ "تجاوز الكود",
658
+ "إيقاع المقال العربي",
659
+ "جداول محتويات ثنائية اللغة"
660
+ ]
661
+ }
662
+ }
407
663
  },
408
664
  {
409
665
  "id": "application",
410
666
  "name": "Application Flow",
411
667
  "status": "planned",
412
668
  "purpose": "Forms, eligibility, conversion, and onboarding flows.",
413
- "audience": ["applications", "onboarding", "eligibility and conversion flows"],
669
+ "audience": [
670
+ "applications",
671
+ "onboarding",
672
+ "eligibility and conversion flows"
673
+ ],
414
674
  "visualDirection": "Trustworthy step-by-step interaction with strong progress, validation, and recovery states.",
415
- "semanticExtensions": ["--flow-progress", "--flow-validation", "--flow-review-surface"],
416
- "requiredValidation": ["multi-step recovery", "localized validation", "Arabic forms", "RTL progress order"],
417
- "translations": { "ar": { "name": "مسار التقديم", "purpose": "النماذج والأهلية والتحويل ومسارات الانضمام.", "audience": ["طلبات التقديم", "الانضمام", "مسارات الأهلية والتحويل"], "visualDirection": "تفاعل موثوق خطوة بخطوة مع حالات واضحة للتقدم والتحقق والاستعادة.", "requiredValidation": ["استعادة المسارات متعددة الخطوات", "تحقق موضّع", "نماذج عربية", "ترتيب تقدم RTL"] } }
675
+ "semanticExtensions": [
676
+ "--flow-progress",
677
+ "--flow-validation",
678
+ "--flow-review-surface"
679
+ ],
680
+ "requiredValidation": [
681
+ "multi-step recovery",
682
+ "localized validation",
683
+ "Arabic forms",
684
+ "RTL progress order"
685
+ ],
686
+ "translations": {
687
+ "ar": {
688
+ "name": "مسار التقديم",
689
+ "purpose": "النماذج والأهلية والتحويل ومسارات الانضمام.",
690
+ "audience": [
691
+ "طلبات التقديم",
692
+ "الانضمام",
693
+ "مسارات الأهلية والتحويل"
694
+ ],
695
+ "visualDirection": "تفاعل موثوق خطوة بخطوة مع حالات واضحة للتقدم والتحقق والاستعادة.",
696
+ "requiredValidation": [
697
+ "استعادة المسارات متعددة الخطوات",
698
+ "تحقق موضّع",
699
+ "نماذج عربية",
700
+ "ترتيب تقدم RTL"
701
+ ]
702
+ }
703
+ }
418
704
  }
419
705
  ],
420
706
  "arabicFriendly": {
@@ -0,0 +1,107 @@
1
+ import * as React from 'react'
2
+ import { Button } from '@utopia-studio-design/design-system/Button'
3
+ import {
4
+ ChartRoot,
5
+ type ChartAnnotationDefinition,
6
+ type ChartDatum,
7
+ type ChartSeriesDefinition,
8
+ type ChartState,
9
+ type ChartType,
10
+ } from '@utopia-studio-design/design-system/Charts'
11
+ import './analytics-dashboard.css'
12
+
13
+ export {
14
+ KPIGrid,
15
+ type KPIGridProps,
16
+ type MetricDefinition,
17
+ } from './AnalyticsMetricBlocks'
18
+
19
+ export interface AnalyticsChartCardProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
20
+ annotations?: ChartAnnotationDefinition[]
21
+ data: ChartDatum[]
22
+ description?: React.ReactNode
23
+ direction?: 'ltr' | 'rtl'
24
+ series: ChartSeriesDefinition[]
25
+ showDataTable?: boolean
26
+ state?: ChartState
27
+ title: React.ReactNode
28
+ type?: ChartType
29
+ }
30
+
31
+ export function AnalyticsChartCard({
32
+ annotations = [],
33
+ data,
34
+ description,
35
+ direction,
36
+ series,
37
+ showDataTable,
38
+ state,
39
+ title,
40
+ type,
41
+ ...props
42
+ }: AnalyticsChartCardProps) {
43
+ return (
44
+ <ChartRoot
45
+ accessibleSummary={`${String(title)} across ${data.length} periods. Use the chart explorer or data table for exact values.`}
46
+ annotations={annotations}
47
+ axis={{ showGrid: true }}
48
+ data={data}
49
+ description={description}
50
+ direction={direction}
51
+ series={series}
52
+ showDataTable={showDataTable}
53
+ state={state}
54
+ title={title}
55
+ type={type}
56
+ {...props}
57
+ />
58
+ )
59
+ }
60
+
61
+ export interface ComparisonChartPanelProps extends AnalyticsChartCardProps {
62
+ benchmarkLabel?: string
63
+ benchmarkValue?: number
64
+ }
65
+
66
+ export function ComparisonChartPanel({
67
+ benchmarkLabel = 'Target',
68
+ benchmarkValue,
69
+ annotations = [],
70
+ ...props
71
+ }: ComparisonChartPanelProps) {
72
+ const nextAnnotations = benchmarkValue === undefined
73
+ ? annotations
74
+ : [
75
+ ...annotations,
76
+ { id: 'benchmark', label: benchmarkLabel, value: benchmarkValue, tone: 'neutral' as const },
77
+ ]
78
+ return <AnalyticsChartCard annotations={nextAnnotations} {...props} />
79
+ }
80
+
81
+ export function ChartWithDataTable(props: AnalyticsChartCardProps) {
82
+ return <AnalyticsChartCard {...props} showDataTable />
83
+ }
84
+
85
+ export interface AnalyticsDashboardHeaderProps extends React.HTMLAttributes<HTMLElement> {
86
+ onRefresh?: () => void
87
+ periodLabel: string
88
+ title: string
89
+ }
90
+
91
+ export function AnalyticsDashboardHeader({
92
+ onRefresh,
93
+ periodLabel,
94
+ title,
95
+ ...props
96
+ }: AnalyticsDashboardHeaderProps) {
97
+ return (
98
+ <header className="ceramic-analytics-header" {...props}>
99
+ <div>
100
+ <span>Analytics dashboard</span>
101
+ <h1>{title}</h1>
102
+ <p>{periodLabel}</p>
103
+ </div>
104
+ <Button variant="outline" onClick={onRefresh}>Refresh data</Button>
105
+ </header>
106
+ )
107
+ }
@@ -0,0 +1,87 @@
1
+ import * as React from 'react'
2
+ import { Badge } from '@utopia-studio-design/design-system/Badge'
3
+ import type { ChartState } from '@utopia-studio-design/design-system/Charts'
4
+ import './analytics-dashboard.css'
5
+
6
+ export interface MetricDefinition {
7
+ change?: number
8
+ changeLabel?: string
9
+ format?: 'number' | 'percent' | 'currency'
10
+ id: string
11
+ label: string
12
+ value: number
13
+ }
14
+
15
+ export interface KPIGridProps extends React.HTMLAttributes<HTMLDivElement> {
16
+ currency?: string
17
+ density?: 'compact' | 'default' | 'comfortable'
18
+ locale?: string
19
+ metrics: MetricDefinition[]
20
+ state?: ChartState
21
+ }
22
+
23
+ export function KPIGrid({
24
+ className,
25
+ currency = 'USD',
26
+ density = 'default',
27
+ locale,
28
+ metrics,
29
+ state = metrics.length === 0 ? 'empty' : 'ready',
30
+ ...props
31
+ }: KPIGridProps) {
32
+ const formatMetric = (metric: MetricDefinition) => {
33
+ if (metric.format === 'percent') {
34
+ return new Intl.NumberFormat(locale, { style: 'percent', maximumFractionDigits: 1 }).format(metric.value)
35
+ }
36
+ if (metric.format === 'currency') {
37
+ return new Intl.NumberFormat(locale, {
38
+ style: 'currency',
39
+ currency,
40
+ notation: 'compact',
41
+ maximumFractionDigits: 1,
42
+ }).format(metric.value)
43
+ }
44
+ return new Intl.NumberFormat(locale, { notation: 'compact', maximumFractionDigits: 1 }).format(metric.value)
45
+ }
46
+
47
+ return (
48
+ <section
49
+ aria-busy={state === 'loading'}
50
+ aria-label="Key performance indicators"
51
+ className={['ceramic-kpi-grid', className].filter(Boolean).join(' ')}
52
+ data-density={density}
53
+ data-state={state}
54
+ {...props}
55
+ >
56
+ {state === 'loading' ? (
57
+ <>
58
+ {[0, 1, 2].map((item) => <span aria-hidden="true" className="ceramic-kpi-skeleton" key={item} />)}
59
+ <span className="uds-visually-hidden" role="status">Loading metrics…</span>
60
+ </>
61
+ ) : null}
62
+ {state === 'empty' ? (
63
+ <div className="ceramic-kpi-state" role="status">
64
+ <strong>No metrics available</strong>
65
+ <span>Choose another period or data source.</span>
66
+ </div>
67
+ ) : null}
68
+ {state === 'error' ? (
69
+ <div className="ceramic-kpi-state" role="alert">
70
+ <strong>Metrics unavailable</strong>
71
+ <span>Reconnect the data source and try again.</span>
72
+ </div>
73
+ ) : null}
74
+ {state === 'ready' || state === 'partial' ? metrics.map((metric) => (
75
+ <article className="ceramic-kpi" key={metric.id}>
76
+ <span>{metric.label}</span>
77
+ <strong>{formatMetric(metric)}</strong>
78
+ {metric.change !== undefined ? (
79
+ <Badge variant="outline">
80
+ {metric.change > 0 ? '+' : ''}{metric.change.toFixed(1)}% {metric.changeLabel ?? 'vs previous'}
81
+ </Badge>
82
+ ) : <span className="ceramic-kpi-unavailable">No comparison</span>}
83
+ </article>
84
+ )) : null}
85
+ </section>
86
+ )
87
+ }
@@ -0,0 +1,6 @@
1
+ # Ceramic analytics dashboard
2
+
3
+ Runnable integration template for the Ceramic Charts system. It demonstrates all
4
+ chart families, governed data states, semantic series, keyboard exploration,
5
+ RTL, light/dark modes, benchmark annotations, KPI blocks, and an accessible data
6
+ table alternative.