@utopia-studio-design/design-system-cli 0.3.1 → 0.3.3

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.
@@ -23,6 +23,70 @@ Guide pages are the operating layer of Ceramic. They define how humans and AI ag
23
23
  - Guide pages must not put Utopia Default visual philosophy into reusable core rules.
24
24
  - Guide pages must link AI agents back to manifests, package exports, foundations, and Arabic-friendly rules.
25
25
 
26
+ ## Navigation Composition
27
+
28
+ Ceramic owns the visual primitives for standard product navigation. Consumers provide route labels and destinations, while the design system provides icons, collapsed behavior, tooltips, current-state treatment, and surface-aware Breadcrumb colors.
29
+
30
+ ```tsx
31
+ import {
32
+ Breadcrumb,
33
+ BreadcrumbItem,
34
+ BreadcrumbLink,
35
+ BreadcrumbList,
36
+ BreadcrumbPage,
37
+ BreadcrumbSeparator,
38
+ NavigationIcon,
39
+ PanelIcon,
40
+ SideNavCollapseButton,
41
+ } from '@utopia-studio-design/design-system/Navigation'
42
+ import {
43
+ SidebarMenuButton,
44
+ SidebarMenuItem,
45
+ } from '@utopia-studio-design/design-system/Sidebar'
46
+
47
+ <SideNavCollapseButton aria-expanded={!collapsed} aria-label="Collapse navigation">
48
+ <PanelIcon />
49
+ </SideNavCollapseButton>
50
+
51
+ <SidebarMenuItem>
52
+ <SidebarMenuButton activeVariant="both" isActive tooltip="Projects">
53
+ <NavigationIcon name="projects" />
54
+ <span>Projects</span>
55
+ </SidebarMenuButton>
56
+ </SidebarMenuItem>
57
+
58
+ <Breadcrumb aria-label="Current location">
59
+ <BreadcrumbList>
60
+ <BreadcrumbItem>
61
+ <BreadcrumbLink href="/dashboard">Dashboard</BreadcrumbLink>
62
+ </BreadcrumbItem>
63
+ <BreadcrumbSeparator />
64
+ <BreadcrumbItem>
65
+ <BreadcrumbPage>Sessions</BreadcrumbPage>
66
+ </BreadcrumbItem>
67
+ </BreadcrumbList>
68
+ </Breadcrumb>
69
+
70
+ <div style={{ background: 'var(--surface-inverse)' }}>
71
+ <Breadcrumb aria-label="Current location" variant="inverse">
72
+ <BreadcrumbList>
73
+ <BreadcrumbItem>
74
+ <BreadcrumbPage>Co-Build Hub</BreadcrumbPage>
75
+ </BreadcrumbItem>
76
+ </BreadcrumbList>
77
+ </Breadcrumb>
78
+ </div>
79
+ ```
80
+
81
+ - Use `NavigationIcon` instead of an app-owned icon package or raw SVG for standard destinations.
82
+ - Keep `tooltip` on collapsed Sidebar items; it also supplies an accessible name when no explicit `aria-label` is provided.
83
+ - Use `activeVariant="indicator"` or `"both"` when current navigation needs the logical inline-start accent. The default `"background"` variant remains backward compatible.
84
+ - `isActive` supplies `aria-current="page"` unless the consumer explicitly provides another valid value.
85
+ - Use `Breadcrumb variant="inverse"` on `--surface-inverse`; do not remap `--foreground` or add component selectors in the consuming app.
86
+ - Compose separators only between path items. Never render a separator before the first item.
87
+ - `BreadcrumbSeparator` provides an RTL-aware Lucide `ChevronRight` by default. Breadcrumb does not add a home icon.
88
+ - Breadcrumb links own their no-underline treatment and compact typography, so consumer-level anchor styles do not require an override.
89
+
26
90
  ## AI Rule
27
91
 
28
92
  Before generating UI, read:
@@ -481,9 +481,17 @@
481
481
  "--foreground",
482
482
  "--muted-foreground",
483
483
  "--foreground-subtle",
484
+ "--inverse-foreground",
485
+ "--inverse-foreground-muted",
486
+ "--inverse-foreground-subtle",
487
+ "--inverse-hover",
488
+ "--inverse-focus-ring",
484
489
  "--surface-hover",
485
490
  "--radius-control",
486
491
  "--space-2",
492
+ "--font-size-small",
493
+ "--line-height-supporting",
494
+ "--icon-size-xs",
487
495
  "--control-height-sm",
488
496
  "--duration-fast",
489
497
  "--ease-standard",
@@ -493,7 +501,8 @@
493
501
  "useWhen": [
494
502
  "A deep page needs parent-page context",
495
503
  "Users need to understand where the current resource sits in a hierarchy",
496
- "A long path may need collapsed middle items or an overflow menu"
504
+ "A long path may need collapsed middle items or an overflow menu",
505
+ "A top bar on --surface-inverse needs Ceramic-owned link, separator, current-page, hover, and focus colors"
497
506
  ],
498
507
  "avoidWhen": [
499
508
  "Primary navigation is needed; use Top Nav, Side Nav, or Navigation Menu",
@@ -508,14 +517,21 @@
508
517
  "ai": {
509
518
  "props": {
510
519
  "aria-label": "Required localized label for the breadcrumb navigation landmark.",
520
+ "variant": "Use default for ordinary surfaces and inverse when the Breadcrumb is placed on --surface-inverse.",
511
521
  "Breadcrumb": "Root nav landmark. Keep aria-label descriptive and localized when needed.",
512
522
  "BreadcrumbList": "Ordered list wrapper for breadcrumb items and separators.",
513
523
  "BreadcrumbItem": "List item wrapper for link, current page, or collapsed menu trigger.",
514
- "BreadcrumbLink": "Clickable ancestor link. Use a router link only through composition.",
524
+ "BreadcrumbLink": "Clickable ancestor link with no underline, including when a consumer applies a global anchor underline. Use a router link only through composition.",
515
525
  "BreadcrumbPage": "Current page label with aria-current=page.",
516
- "BreadcrumbSeparator": "Visual separator. Use non-directional slash by default or mirror directional chevrons in RTL.",
526
+ "BreadcrumbSeparator": "Visual separator with an aria-hidden Lucide ChevronRight by default. It mirrors automatically in RTL.",
517
527
  "BreadcrumbEllipsis": "Collapsed middle path indicator. Pair with a menu when hidden parents need discovery."
518
528
  },
529
+ "rules": [
530
+ "Compose BreadcrumbSeparator only between items, never before the first item.",
531
+ "Do not add a home icon unless the product explicitly supplies one as item content.",
532
+ "Default Breadcrumb hover changes foreground only; inverse hover may use the inverse surface hover role.",
533
+ "Use the compact typography and alignment supplied by Ceramic instead of product CSS overrides."
534
+ ],
519
535
  "arabicFriendly": "Breadcrumb order, separator spacing, dropdown alignment, and focus rings must follow dir=\"rtl\" using logical properties. Arabic labels must come from localization."
520
536
  }
521
537
  },
@@ -559,7 +575,7 @@
559
575
  "BreadcrumbItem": "List item wrapper for a breadcrumb link, current page, separator, or collapsed menu trigger.",
560
576
  "BreadcrumbLink": "Clickable ancestor path segment. Compose with a router link when needed.",
561
577
  "BreadcrumbPage": "Current page path segment. It owns aria-current=page.",
562
- "BreadcrumbSeparator": "Visual hierarchy separator. Keep spacing logical and mirror directional separators in RTL."
578
+ "BreadcrumbSeparator": "Visual hierarchy separator with an aria-hidden Lucide ChevronRight by default. Keep spacing logical; it mirrors automatically in RTL."
563
579
  },
564
580
  "arabicFriendly": "Breadcrumb Item must preserve DOM order, logical spacing, current-page semantics, and mixed-script labels in dir=\"rtl\". Use localized path labels."
565
581
  }
@@ -3624,7 +3640,7 @@
3624
3640
  "name": "Side Nav",
3625
3641
  "category": "Navigation",
3626
3642
  "status": "available",
3627
- "packageImport": "import { PanelIcon, SideNav, SideNavAccount, SideNavAuxiliary, SideNavCollapseButton, SideNavCommand, SideNavContent, SideNavFooter, SideNavHeader, SideNavHeading, SideNavItem, SideNavMain, SideNavNestedGroup, SideNavNestedItems, SideNavSearch, SideNavSection, SideNavStatus, SideNavWorkspaceSwitcher } from '@utopia-studio-design/design-system/Navigation';",
3643
+ "packageImport": "import { NavigationIcon, PanelIcon, SideNav, SideNavAccount, SideNavAuxiliary, SideNavCollapseButton, SideNavCommand, SideNavContent, SideNavFooter, SideNavHeader, SideNavHeading, SideNavItem, SideNavMain, SideNavNestedGroup, SideNavNestedItems, SideNavSearch, SideNavSection, SideNavStatus, SideNavWorkspaceSwitcher } from '@utopia-studio-design/design-system/Navigation';",
3628
3644
  "sourcePath": "packages/design-system/src/components/Navigation.tsx",
3629
3645
  "shadcnFoundation": [
3630
3646
  "sidebar",
@@ -3683,6 +3699,7 @@
3683
3699
  "SideNavSearch": "Package-owned search field for filtering navigation lists without local input styling.",
3684
3700
  "SideNavNestedGroup": "Groups a parent SideNavItem and its nested child collection.",
3685
3701
  "SideNavNestedItems": "Indented child item collection using logical inline-start spacing and border.",
3702
+ "NavigationIcon": "Official Ceramic destination icon set. Use names such as dashboard, projects, tasks, inbox, files, analytics, team, settings, and help without importing an app icon package.",
3686
3703
  "PanelIcon": "Direction-neutral icon exported for SideNavCollapseButton examples. Prefer it over directional arrows unless the directional icon has an RTL mirror rule."
3687
3704
  },
3688
3705
  "arabicFriendly": "Use logical start/end spacing in nested items and let document direction control order. Closed disclosure indicators rotate toward the inline start in LTR and RTL. Preserve scroll position when the side nav collapses and expands, and do not use left/right naming in generated side navigation layouts."
@@ -3948,6 +3965,8 @@
3948
3965
  "--foreground",
3949
3966
  "--border",
3950
3967
  "--surface-hover",
3968
+ "--primary",
3969
+ "--font-size-supporting",
3951
3970
  "--popover-surface",
3952
3971
  "--radius-control",
3953
3972
  "--radius-surface",
@@ -3997,6 +4016,11 @@
3997
4016
  "SidebarTrigger",
3998
4017
  "useSidebar"
3999
4018
  ],
4019
+ "props": {
4020
+ "SidebarMenuButton.activeVariant": "Use background for backward compatibility, indicator for a logical inline-start current marker, or both for the marker plus background.",
4021
+ "SidebarMenuButton.isActive": "Marks the item active and supplies aria-current=page unless the consumer provides another aria-current value.",
4022
+ "SidebarMenuButton.tooltip": "Provides collapsed hover/focus help and an accessible name when aria-label is omitted."
4023
+ },
4000
4024
  "arabicFriendly": "Use dir=rtl at the shell boundary and provide localized collapseLabel, expandLabel, overlay labels, rail labels, and tooltip strings. Logical borders, alignment, off-canvas motion, submenus, and badges mirror without changing the component API."
4001
4025
  }
4002
4026
  },
package/lib/api.mjs CHANGED
@@ -8,7 +8,7 @@ const packagedDataRoot = join(packageRoot, 'data')
8
8
  const hasWorkspaceSource = existsSync(join(workspaceRoot, 'packages/design-system/src/manifests/components.json'))
9
9
 
10
10
  export const apiVersion = 1
11
- export const cliVersion = '0.3.1'
11
+ export const cliVersion = '0.3.3'
12
12
  export const mcpLaunch = {
13
13
  command: 'npx',
14
14
  args: ['-y', '--package', '@utopia-studio-design/design-system-cli', 'utopia-ds', 'mcp'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utopia-studio-design/design-system-cli",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "AI-readable CLI and MCP server for Ceramic Design System",
5
5
  "type": "module",
6
6
  "license": "MIT",