@utopia-studio-design/design-system-cli 0.3.3 → 0.4.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 +1 -1
- package/bin/utopia-ds.mjs +25 -2
- package/data/docs/foundations.md +28 -0
- package/data/docs/guide.md +22 -0
- package/data/docs/quick-start-ai.md +2 -2
- package/data/manifests/catalog.json +16 -0
- package/data/manifests/components.json +315 -3
- package/lib/api.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ The same structured API powers terminal output, JSON automation, generated agent
|
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
npm install -D @utopia-studio-design/design-system-cli
|
|
7
|
-
npx utopia-ds init
|
|
7
|
+
npx utopia-ds init . --theme utopia-default --yes
|
|
8
8
|
npx utopia-ds search "Arabic data table" --json
|
|
9
9
|
npx utopia-ds component DataTable --json
|
|
10
10
|
npx utopia-ds template template-saas-solution-homepage --copy ./saas-website
|
package/bin/utopia-ds.mjs
CHANGED
|
@@ -11,10 +11,24 @@ import { createTemplateSubmissionUrl, validateTemplateSubmission } from '../lib/
|
|
|
11
11
|
const args = process.argv.slice(2)
|
|
12
12
|
const command = args.find((arg) => !arg.startsWith('--')) ?? 'help'
|
|
13
13
|
const commandIndex = args.indexOf(command)
|
|
14
|
-
const
|
|
14
|
+
const optionsWithValues = new Set(['--copy', '--theme'])
|
|
15
|
+
const values = commandIndex >= 0 ? positionalValues(args.slice(commandIndex + 1)) : []
|
|
15
16
|
const json = args.includes('--json')
|
|
16
17
|
const dense = args.includes('--dense')
|
|
17
18
|
|
|
19
|
+
function positionalValues(input) {
|
|
20
|
+
const positionals = []
|
|
21
|
+
for (let index = 0; index < input.length; index += 1) {
|
|
22
|
+
const argument = input[index]
|
|
23
|
+
if (optionsWithValues.has(argument)) {
|
|
24
|
+
index += 1
|
|
25
|
+
continue
|
|
26
|
+
}
|
|
27
|
+
if (!argument.startsWith('--')) positionals.push(argument)
|
|
28
|
+
}
|
|
29
|
+
return positionals
|
|
30
|
+
}
|
|
31
|
+
|
|
18
32
|
function output(type, data, format = null) {
|
|
19
33
|
if (json) return console.log(JSON.stringify(envelope(type, data), null, 2))
|
|
20
34
|
if (format) return console.log(format(data, dense))
|
|
@@ -29,7 +43,13 @@ function fail(message, code = 'ERR_INPUT', suggestions = []) {
|
|
|
29
43
|
|
|
30
44
|
function argAfter(flag, fallback) {
|
|
31
45
|
const index = args.indexOf(flag)
|
|
32
|
-
|
|
46
|
+
if (index < 0) return fallback
|
|
47
|
+
const value = args[index + 1]
|
|
48
|
+
if (!value || value.startsWith('--')) {
|
|
49
|
+
fail(`${flag} requires a value.`, 'ERR_ARGUMENT')
|
|
50
|
+
return null
|
|
51
|
+
}
|
|
52
|
+
return value
|
|
33
53
|
}
|
|
34
54
|
|
|
35
55
|
function help() {
|
|
@@ -150,6 +170,7 @@ function scaffoldTheme() {
|
|
|
150
170
|
function init() {
|
|
151
171
|
const target = resolve(values[0] ?? process.cwd())
|
|
152
172
|
const theme = argAfter('--theme', 'utopia-default')
|
|
173
|
+
if (!theme) return
|
|
153
174
|
if (!getTheme(theme)) return fail(`Unknown theme "${theme}".`, 'ERR_THEME', listThemes().map((item) => item.id))
|
|
154
175
|
const pkgPath = join(target, 'package.json')
|
|
155
176
|
if (!existsSync(pkgPath)) return fail(`No package.json found in ${target}.`, 'ERR_PROJECT')
|
|
@@ -186,8 +207,10 @@ function runMcp() {
|
|
|
186
207
|
function copyTemplateProject(entry) {
|
|
187
208
|
if (!entry.bundlePath) return fail(`Template "${entry.id}" is a blueprint contract and has no runnable bundle.`, 'ERR_TEMPLATE_BUNDLE')
|
|
188
209
|
const requestedTarget = argAfter('--copy', entry.id.replace(/^template-/, ''))
|
|
210
|
+
if (!requestedTarget) return
|
|
189
211
|
const target = resolve(requestedTarget)
|
|
190
212
|
const theme = argAfter('--theme', 'utopia-default')
|
|
213
|
+
if (!theme) return
|
|
191
214
|
if (!getTheme(theme)) return fail(`Unknown theme "${theme}".`, 'ERR_THEME', listThemes().map((item) => item.id))
|
|
192
215
|
if (existsSync(target) && !args.includes('--force')) return fail(`Target already exists: ${target}. Pass --force to overwrite it.`, 'ERR_TARGET_EXISTS')
|
|
193
216
|
const source = resolve(dirname(new URL(import.meta.url).pathname), '..', 'data', entry.bundlePath)
|
package/data/docs/foundations.md
CHANGED
|
@@ -121,9 +121,37 @@ The engine-neutral registry is published as `manifests/motion-profiles.json`. It
|
|
|
121
121
|
- Core owns icon slots, icon-only controls, labels, and accessibility.
|
|
122
122
|
- Theme manifests own icon philosophy and icon style.
|
|
123
123
|
- Use `lucide-react` as the default shadcn/ui icon baseline for examples and previews.
|
|
124
|
+
- Use `PhosphorIcon` when a product selects the Phosphor family. Import individual
|
|
125
|
+
`*Icon` exports from `@phosphor-icons/react` so bundlers can tree-shake unused icons.
|
|
126
|
+
- `PhosphorIcon` uses `currentColor` and `--icon-size-xs|sm|md`; do not pass raw
|
|
127
|
+
color or pixel sizes.
|
|
128
|
+
- Mark visual-only icons with `decorative`. Give meaningful standalone icons a
|
|
129
|
+
localized `label`. Put interactive icons inside `IconButton` and label the button.
|
|
124
130
|
- Mirror arrows and chevrons when they mean previous/next, open/close, or inline movement.
|
|
125
131
|
- Do not mirror direction-neutral icons such as settings, add, download, home, camera, or panel icons unless a theme says otherwise.
|
|
126
132
|
|
|
133
|
+
```tsx
|
|
134
|
+
import { ArrowRightIcon, HouseIcon } from '@phosphor-icons/react'
|
|
135
|
+
import { PhosphorIcon } from '@utopia-studio-design/design-system/PhosphorIcon'
|
|
136
|
+
|
|
137
|
+
export function IconExamples() {
|
|
138
|
+
return (
|
|
139
|
+
<>
|
|
140
|
+
<PhosphorIcon decorative icon={HouseIcon} size="sm" />
|
|
141
|
+
<PhosphorIcon
|
|
142
|
+
direction="directional"
|
|
143
|
+
icon={ArrowRightIcon}
|
|
144
|
+
label="Continue"
|
|
145
|
+
/>
|
|
146
|
+
</>
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Phosphor is an additional supported family, not a silent replacement for
|
|
152
|
+
Lucide-based component internals. Breadcrumb separators and existing Ceramic
|
|
153
|
+
navigation defaults keep their documented icon contracts.
|
|
154
|
+
|
|
127
155
|
## Illustration Contract
|
|
128
156
|
|
|
129
157
|
- Illustrations are theme and product media, not core component requirements.
|
package/data/docs/guide.md
CHANGED
|
@@ -87,6 +87,28 @@ import {
|
|
|
87
87
|
- `BreadcrumbSeparator` provides an RTL-aware Lucide `ChevronRight` by default. Breadcrumb does not add a home icon.
|
|
88
88
|
- Breadcrumb links own their no-underline treatment and compact typography, so consumer-level anchor styles do not require an override.
|
|
89
89
|
|
|
90
|
+
## Phosphor Icon Composition
|
|
91
|
+
|
|
92
|
+
Phosphor is an optional supported icon family. It does not replace Lucide-based
|
|
93
|
+
defaults inside existing Ceramic components.
|
|
94
|
+
|
|
95
|
+
```tsx
|
|
96
|
+
import { GearIcon } from '@phosphor-icons/react'
|
|
97
|
+
import { IconButton } from '@utopia-studio-design/design-system/IconButton'
|
|
98
|
+
import { PhosphorIcon } from '@utopia-studio-design/design-system/PhosphorIcon'
|
|
99
|
+
|
|
100
|
+
<IconButton label="Settings">
|
|
101
|
+
<PhosphorIcon decorative icon={GearIcon} size="sm" />
|
|
102
|
+
</IconButton>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
- Install `@phosphor-icons/react` in an application that imports Phosphor icons directly.
|
|
106
|
+
- Import named `*Icon` exports so unused icons can be removed from the bundle.
|
|
107
|
+
- Use `decorative` when the surrounding control or text already supplies the accessible name.
|
|
108
|
+
- Use `label` for a meaningful standalone icon.
|
|
109
|
+
- Set `direction="directional"` only for arrows, chevrons, and other meanings that follow reading direction.
|
|
110
|
+
- Keep color inherited and select `xs`, `sm`, or `md`; do not pass raw color or pixel size values.
|
|
111
|
+
|
|
90
112
|
## AI Rule
|
|
91
113
|
|
|
92
114
|
Before generating UI, read:
|
|
@@ -5,7 +5,7 @@ Ceramic follows the Astryx principle that humans, coding agents, build tools, an
|
|
|
5
5
|
## Paste This Into Your AI
|
|
6
6
|
|
|
7
7
|
```text
|
|
8
|
-
Install @utopia-studio-design/design-system and @utopia-studio-design/design-system-cli. Run `npx utopia-ds init --theme utopia-default`. Read the generated AGENTS.md and active theme config. Before editing UI, run `npx utopia-ds manifest --json`, search for the intended pattern, inspect its component or template contract, and read the Arabic-friendly guide when the product supports Arabic or RTL. Do not invent props, imports, tokens, or localized copy.
|
|
8
|
+
Install @utopia-studio-design/design-system and @utopia-studio-design/design-system-cli. Run `npx utopia-ds init . --theme utopia-default --yes`. Read the generated AGENTS.md and active theme config. Before editing UI, run `npx utopia-ds manifest --json`, search for the intended pattern, inspect its component or template contract, and read the Arabic-friendly guide when the product supports Arabic or RTL. Do not invent props, imports, tokens, or localized copy.
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Install
|
|
@@ -13,7 +13,7 @@ Install @utopia-studio-design/design-system and @utopia-studio-design/design-sys
|
|
|
13
13
|
```sh
|
|
14
14
|
npm install @utopia-studio-design/design-system
|
|
15
15
|
npm install -D @utopia-studio-design/design-system-cli
|
|
16
|
-
npx utopia-ds init --theme utopia-default
|
|
16
|
+
npx utopia-ds init . --theme utopia-default --yes
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
The init command creates:
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"Card",
|
|
72
72
|
"Hover Card",
|
|
73
73
|
"Popover",
|
|
74
|
+
"Tool Connector Block",
|
|
74
75
|
"Tooltip"
|
|
75
76
|
]
|
|
76
77
|
},
|
|
@@ -98,6 +99,7 @@
|
|
|
98
99
|
"id": "chat",
|
|
99
100
|
"label": "Chat",
|
|
100
101
|
"items": [
|
|
102
|
+
"Assistant Panel",
|
|
101
103
|
"Chat Composer",
|
|
102
104
|
"Chat Composer Drawer",
|
|
103
105
|
"Chat Composer Input",
|
|
@@ -133,6 +135,7 @@
|
|
|
133
135
|
"Navigation Menu",
|
|
134
136
|
"Pagination",
|
|
135
137
|
"Sidebar",
|
|
138
|
+
"Sidebar Block Type 1",
|
|
136
139
|
"Side Nav",
|
|
137
140
|
"Side Nav Collapse Button",
|
|
138
141
|
"Side Nav Heading",
|
|
@@ -174,6 +177,13 @@
|
|
|
174
177
|
"Separator"
|
|
175
178
|
]
|
|
176
179
|
},
|
|
180
|
+
{
|
|
181
|
+
"id": "utilities",
|
|
182
|
+
"label": "Utilities",
|
|
183
|
+
"items": [
|
|
184
|
+
"Phosphor Icon"
|
|
185
|
+
]
|
|
186
|
+
},
|
|
177
187
|
{
|
|
178
188
|
"id": "data",
|
|
179
189
|
"label": "Data Display",
|
|
@@ -249,6 +259,7 @@
|
|
|
249
259
|
"Card",
|
|
250
260
|
"Carousel",
|
|
251
261
|
"Chart",
|
|
262
|
+
"Assistant Panel",
|
|
252
263
|
"Chat Composer",
|
|
253
264
|
"Chat Composer Drawer",
|
|
254
265
|
"Chat Composer Input",
|
|
@@ -289,6 +300,7 @@
|
|
|
289
300
|
"Native Select",
|
|
290
301
|
"Navigation Menu",
|
|
291
302
|
"Pagination",
|
|
303
|
+
"Phosphor Icon",
|
|
292
304
|
"Popover",
|
|
293
305
|
"Progress",
|
|
294
306
|
"Radio Group",
|
|
@@ -307,6 +319,7 @@
|
|
|
307
319
|
"Textarea",
|
|
308
320
|
"Toggle Button",
|
|
309
321
|
"Toggle Button Group",
|
|
322
|
+
"Tool Connector Block",
|
|
310
323
|
"Tooltip",
|
|
311
324
|
"Typography",
|
|
312
325
|
"Utopia Wordmark Loader"
|
|
@@ -327,6 +340,7 @@
|
|
|
327
340
|
"Card",
|
|
328
341
|
"Carousel",
|
|
329
342
|
"Chart",
|
|
343
|
+
"Assistant Panel",
|
|
330
344
|
"Chat Composer",
|
|
331
345
|
"Chat Composer Drawer",
|
|
332
346
|
"Chat Composer Input",
|
|
@@ -367,6 +381,7 @@
|
|
|
367
381
|
"Native Select",
|
|
368
382
|
"Navigation Menu",
|
|
369
383
|
"Pagination",
|
|
384
|
+
"Phosphor Icon",
|
|
370
385
|
"Popover",
|
|
371
386
|
"Progress",
|
|
372
387
|
"Radio Group",
|
|
@@ -385,6 +400,7 @@
|
|
|
385
400
|
"Textarea",
|
|
386
401
|
"Toggle Button",
|
|
387
402
|
"Toggle Button Group",
|
|
403
|
+
"Tool Connector Block",
|
|
388
404
|
"Tooltip",
|
|
389
405
|
"Typography",
|
|
390
406
|
"Utopia Wordmark Loader"
|
|
@@ -1015,6 +1015,86 @@
|
|
|
1015
1015
|
"Utopia brand primitives inside reusable component logic"
|
|
1016
1016
|
]
|
|
1017
1017
|
},
|
|
1018
|
+
{
|
|
1019
|
+
"name": "Assistant Panel",
|
|
1020
|
+
"category": "Chat",
|
|
1021
|
+
"status": "available",
|
|
1022
|
+
"packageImport": "import { AssistantPanel, AssistantPanelActions, AssistantPanelBody, AssistantPanelClose, AssistantPanelDescription, AssistantPanelEmptyState, AssistantPanelFooter, AssistantPanelHeader, AssistantPanelHeading, AssistantPanelTitle } from '@utopia-studio-design/design-system/AssistantPanel';",
|
|
1023
|
+
"sourcePath": "packages/design-system/src/components/AssistantPanel.tsx",
|
|
1024
|
+
"shadcnFoundation": [
|
|
1025
|
+
"sidebar composition",
|
|
1026
|
+
"sheet visual anatomy without dialog behavior",
|
|
1027
|
+
"scrollable content and sticky composer regions",
|
|
1028
|
+
"semantic Utopia wrapper"
|
|
1029
|
+
],
|
|
1030
|
+
"fallbackToShadcn": "sidebar + resizable + message",
|
|
1031
|
+
"requiredTokens": [
|
|
1032
|
+
"--background",
|
|
1033
|
+
"--surface",
|
|
1034
|
+
"--foreground",
|
|
1035
|
+
"--foreground-muted",
|
|
1036
|
+
"--border",
|
|
1037
|
+
"--primary",
|
|
1038
|
+
"--space-1",
|
|
1039
|
+
"--space-2",
|
|
1040
|
+
"--space-3",
|
|
1041
|
+
"--space-4",
|
|
1042
|
+
"--space-6",
|
|
1043
|
+
"--space-8",
|
|
1044
|
+
"--space-12",
|
|
1045
|
+
"--space-16",
|
|
1046
|
+
"--font-size-supporting",
|
|
1047
|
+
"--font-size-small",
|
|
1048
|
+
"--font-size-body",
|
|
1049
|
+
"--font-weight-strong",
|
|
1050
|
+
"--line-height-supporting",
|
|
1051
|
+
"--line-height-body",
|
|
1052
|
+
"--line-height-tight",
|
|
1053
|
+
"--tracking-heading",
|
|
1054
|
+
"--icon-size-sm",
|
|
1055
|
+
"--icon-size-md",
|
|
1056
|
+
"--border-width-hairline"
|
|
1057
|
+
],
|
|
1058
|
+
"useWhen": [
|
|
1059
|
+
"An assistant, inspector, or contextual workflow must remain visible beside the primary workspace",
|
|
1060
|
+
"The product needs a non-modal panel with fixed header and footer plus independently scrolling content",
|
|
1061
|
+
"Chat primitives need a reusable application frame rather than page-local panel styling"
|
|
1062
|
+
],
|
|
1063
|
+
"avoidWhen": [
|
|
1064
|
+
"The panel must block the page or trap focus; use Sheet or Dialog",
|
|
1065
|
+
"A temporary mobile action sheet is required; use Drawer",
|
|
1066
|
+
"The content is primary navigation; use Sidebar"
|
|
1067
|
+
],
|
|
1068
|
+
"neverInvent": [
|
|
1069
|
+
"Overlay or focus-trap behavior",
|
|
1070
|
+
"Raw shadcn theme colors",
|
|
1071
|
+
"Product-specific assistant copy",
|
|
1072
|
+
"Left/right-only layout rules",
|
|
1073
|
+
"Utopia brand primitives inside reusable component logic"
|
|
1074
|
+
],
|
|
1075
|
+
"ai": {
|
|
1076
|
+
"parts": [
|
|
1077
|
+
"AssistantPanel",
|
|
1078
|
+
"AssistantPanelHeader",
|
|
1079
|
+
"AssistantPanelHeading",
|
|
1080
|
+
"AssistantPanelTitle",
|
|
1081
|
+
"AssistantPanelDescription",
|
|
1082
|
+
"AssistantPanelActions",
|
|
1083
|
+
"AssistantPanelClose",
|
|
1084
|
+
"AssistantPanelBody",
|
|
1085
|
+
"AssistantPanelEmptyState",
|
|
1086
|
+
"AssistantPanelFooter"
|
|
1087
|
+
],
|
|
1088
|
+
"props": {
|
|
1089
|
+
"AssistantPanel.header": "Compose AssistantPanelHeader or another product-owned header region.",
|
|
1090
|
+
"AssistantPanel.body": "Compose AssistantPanelBody, usually containing ChatMessageList or task context.",
|
|
1091
|
+
"AssistantPanel.footer": "Compose AssistantPanelFooter with ChatComposer or product actions.",
|
|
1092
|
+
"AssistantPanelClose.label": "Required localized accessible label for the icon-only close action.",
|
|
1093
|
+
"AssistantPanelEmptyState": "Supply product-owned title, description, optional icon, and actions."
|
|
1094
|
+
},
|
|
1095
|
+
"arabicFriendly": "The panel uses logical inline borders and spacing, inherits document direction, and does not encode left or right docking. Product copy and close labels must be localized by the consumer."
|
|
1096
|
+
}
|
|
1097
|
+
},
|
|
1018
1098
|
{
|
|
1019
1099
|
"name": "Chat Composer",
|
|
1020
1100
|
"category": "Chat",
|
|
@@ -1076,6 +1156,86 @@
|
|
|
1076
1156
|
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1077
1157
|
}
|
|
1078
1158
|
},
|
|
1159
|
+
{
|
|
1160
|
+
"name": "Tool Connector Block",
|
|
1161
|
+
"category": "Surface",
|
|
1162
|
+
"status": "available",
|
|
1163
|
+
"packageImport": "import { ToolConnectorBlock, ToolConnectorItem, ToolConnectorList, ToolConnectorSection } from '@utopia-studio-design/design-system/ToolConnector';",
|
|
1164
|
+
"sourcePath": "packages/design-system/src/components/ToolConnector.tsx",
|
|
1165
|
+
"shadcnFoundation": [
|
|
1166
|
+
"item",
|
|
1167
|
+
"badge",
|
|
1168
|
+
"collapsible disclosure",
|
|
1169
|
+
"settings and integration list composition",
|
|
1170
|
+
"semantic Utopia wrapper"
|
|
1171
|
+
],
|
|
1172
|
+
"fallbackToShadcn": "item + badge + collapsible",
|
|
1173
|
+
"requiredTokens": [
|
|
1174
|
+
"--surface",
|
|
1175
|
+
"--surface-hover",
|
|
1176
|
+
"--foreground",
|
|
1177
|
+
"--muted-foreground",
|
|
1178
|
+
"--border",
|
|
1179
|
+
"--primary",
|
|
1180
|
+
"--focus-ring",
|
|
1181
|
+
"--radius-surface",
|
|
1182
|
+
"--radius-control",
|
|
1183
|
+
"--space-1",
|
|
1184
|
+
"--space-3",
|
|
1185
|
+
"--space-4",
|
|
1186
|
+
"--space-6",
|
|
1187
|
+
"--space-8",
|
|
1188
|
+
"--space-16",
|
|
1189
|
+
"--font-size-supporting",
|
|
1190
|
+
"--font-size-small",
|
|
1191
|
+
"--font-weight-medium",
|
|
1192
|
+
"--font-weight-strong",
|
|
1193
|
+
"--line-height-supporting",
|
|
1194
|
+
"--line-height-tight",
|
|
1195
|
+
"--icon-size-sm",
|
|
1196
|
+
"--button-height-sm",
|
|
1197
|
+
"--border-width-hairline",
|
|
1198
|
+
"--duration-fast",
|
|
1199
|
+
"--ease-standard"
|
|
1200
|
+
],
|
|
1201
|
+
"useWhen": [
|
|
1202
|
+
"A settings surface must list external tools, services, or data connectors with status and a clear next action",
|
|
1203
|
+
"Connected and available integrations need compact scan-friendly grouping",
|
|
1204
|
+
"A connector needs optional inline setup or management details without navigating away"
|
|
1205
|
+
],
|
|
1206
|
+
"avoidWhen": [
|
|
1207
|
+
"The product needs a searchable marketplace with hundreds of integrations; use a dedicated page with filters",
|
|
1208
|
+
"The row is primary navigation rather than an integration action",
|
|
1209
|
+
"Irreversible disconnect confirmation is required; compose Alert Dialog in the consumer"
|
|
1210
|
+
],
|
|
1211
|
+
"neverInvent": [
|
|
1212
|
+
"Third-party connection state or account identity",
|
|
1213
|
+
"Raw brand colors for external services",
|
|
1214
|
+
"Product-specific OAuth or disconnect logic",
|
|
1215
|
+
"Left/right-only layout rules",
|
|
1216
|
+
"Utopia brand primitives inside reusable component logic"
|
|
1217
|
+
],
|
|
1218
|
+
"ai": {
|
|
1219
|
+
"parts": [
|
|
1220
|
+
"ToolConnectorBlock",
|
|
1221
|
+
"ToolConnectorSection",
|
|
1222
|
+
"ToolConnectorList",
|
|
1223
|
+
"ToolConnectorItem"
|
|
1224
|
+
],
|
|
1225
|
+
"props": {
|
|
1226
|
+
"ToolConnectorSection.title": "Required localized group label such as Connected or Available tools.",
|
|
1227
|
+
"ToolConnectorSection.description": "Optional concise explanation of the group.",
|
|
1228
|
+
"ToolConnectorItem.icon": "Optional app-owned or design-system icon. Do not synthesize third-party logos.",
|
|
1229
|
+
"ToolConnectorItem.title": "Required factual connector name.",
|
|
1230
|
+
"ToolConnectorItem.description": "Required concise capability description.",
|
|
1231
|
+
"ToolConnectorItem.status": "Optional short status rendered with Badge; use semantic statusVariant.",
|
|
1232
|
+
"ToolConnectorItem.actionLabel": "Required explicit action such as Connect, Manage, Open, or Add link.",
|
|
1233
|
+
"ToolConnectorItem.detail": "Optional consumer-owned setup or management content.",
|
|
1234
|
+
"ToolConnectorItem.expanded": "Controls inline detail visibility; state remains consumer-owned."
|
|
1235
|
+
},
|
|
1236
|
+
"arabicFriendly": "The block uses logical spacing and inline alignment, keeps actions at inline-end, wraps to a compact mobile layout, and requires localized labels and status copy from the consumer."
|
|
1237
|
+
}
|
|
1238
|
+
},
|
|
1079
1239
|
{
|
|
1080
1240
|
"name": "Chat Composer Drawer",
|
|
1081
1241
|
"category": "Chat",
|
|
@@ -2159,7 +2319,8 @@
|
|
|
2159
2319
|
"useWhen": [
|
|
2160
2320
|
"Structured tabular data with headers and comparable rows",
|
|
2161
2321
|
"AI-generated admin/product views that need accessible table semantics",
|
|
2162
|
-
"Arabic-friendly data displays that must preserve table meaning in dir='rtl'"
|
|
2322
|
+
"Arabic-friendly data displays that must preserve table meaning in dir='rtl'",
|
|
2323
|
+
"Responsive dashboards where wide tables must scroll inside the component instead of expanding the page"
|
|
2163
2324
|
],
|
|
2164
2325
|
"avoidWhen": [
|
|
2165
2326
|
"Card lists are easier to scan",
|
|
@@ -2170,7 +2331,14 @@
|
|
|
2170
2331
|
"Raw shadcn theme colors",
|
|
2171
2332
|
"Left/right-only layout rules",
|
|
2172
2333
|
"Utopia brand primitives inside reusable component logic"
|
|
2173
|
-
]
|
|
2334
|
+
],
|
|
2335
|
+
"ai": {
|
|
2336
|
+
"props": {
|
|
2337
|
+
"DataTableShell": "Full-width bounded shell with min-inline-size: 0 and component-owned horizontal scrolling. Place DataTableToolbar, DataTable, and DataTableFooter inside it.",
|
|
2338
|
+
"DataTable": "Semantic table content may exceed the available inline size; its nearest DataTableShell owns horizontal overflow."
|
|
2339
|
+
},
|
|
2340
|
+
"responsive": "Keep DataTableShell inside a min-inline-size: 0 grid or flex child. The shell prevents intrinsic table width from creating page-level horizontal scrolling."
|
|
2341
|
+
}
|
|
2174
2342
|
},
|
|
2175
2343
|
{
|
|
2176
2344
|
"name": "Date Picker",
|
|
@@ -2636,6 +2804,65 @@
|
|
|
2636
2804
|
]
|
|
2637
2805
|
}
|
|
2638
2806
|
},
|
|
2807
|
+
{
|
|
2808
|
+
"name": "Phosphor Icon",
|
|
2809
|
+
"category": "Utilities",
|
|
2810
|
+
"status": "available",
|
|
2811
|
+
"packageImport": "import { PhosphorIcon } from '@utopia-studio-design/design-system/PhosphorIcon';",
|
|
2812
|
+
"sourcePath": "packages/design-system/src/components/PhosphorIcon.tsx",
|
|
2813
|
+
"shadcnFoundation": [
|
|
2814
|
+
"@phosphor-icons/react",
|
|
2815
|
+
"named icon imports",
|
|
2816
|
+
"semantic icon size tokens",
|
|
2817
|
+
"currentColor"
|
|
2818
|
+
],
|
|
2819
|
+
"fallbackToShadcn": "lucide-react icon composed through the same semantic slot",
|
|
2820
|
+
"requiredTokens": [
|
|
2821
|
+
"--icon-size-xs",
|
|
2822
|
+
"--icon-size-sm",
|
|
2823
|
+
"--icon-size-md"
|
|
2824
|
+
],
|
|
2825
|
+
"useWhen": [
|
|
2826
|
+
"A product selects the Phosphor icon family",
|
|
2827
|
+
"Ceramic must own icon sizing, accessibility, and RTL behavior",
|
|
2828
|
+
"A named Phosphor icon is imported directly for tree-shaking"
|
|
2829
|
+
],
|
|
2830
|
+
"avoidWhen": [
|
|
2831
|
+
"The icon itself is interactive; compose it inside IconButton",
|
|
2832
|
+
"An existing Ceramic component already owns its Lucide-based icon contract",
|
|
2833
|
+
"Replacing Breadcrumb or Navigation defaults without a component-specific decision"
|
|
2834
|
+
],
|
|
2835
|
+
"neverInvent": [
|
|
2836
|
+
"Raw SVG paths copied into product code",
|
|
2837
|
+
"Raw color or pixel icon sizes",
|
|
2838
|
+
"Unlabeled meaningful standalone icons",
|
|
2839
|
+
"Mirroring direction-neutral icons",
|
|
2840
|
+
"Namespace imports that prevent per-icon tree-shaking",
|
|
2841
|
+
"Left/right-only layout rules",
|
|
2842
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2843
|
+
],
|
|
2844
|
+
"ai": {
|
|
2845
|
+
"props": [
|
|
2846
|
+
"icon",
|
|
2847
|
+
"size",
|
|
2848
|
+
"weight",
|
|
2849
|
+
"decorative",
|
|
2850
|
+
"label",
|
|
2851
|
+
"direction"
|
|
2852
|
+
],
|
|
2853
|
+
"rules": [
|
|
2854
|
+
"Import individual *Icon exports from @phosphor-icons/react.",
|
|
2855
|
+
"Use decorative for visual-only icons and a localized label for meaningful standalone icons.",
|
|
2856
|
+
"Use direction=\"directional\" only when the icon meaning follows reading direction.",
|
|
2857
|
+
"Color is inherited through currentColor and size comes from Ceramic semantic tokens."
|
|
2858
|
+
],
|
|
2859
|
+
"arabicFriendly": [
|
|
2860
|
+
"Directional arrows and chevrons mirror when the wrapper is inside dir=\"rtl\".",
|
|
2861
|
+
"Home, settings, search, download, and other direction-neutral icons do not mirror.",
|
|
2862
|
+
"Use localized accessible labels supplied by the product."
|
|
2863
|
+
]
|
|
2864
|
+
}
|
|
2865
|
+
},
|
|
2639
2866
|
{
|
|
2640
2867
|
"name": "Input",
|
|
2641
2868
|
"category": "Forms",
|
|
@@ -4024,6 +4251,89 @@
|
|
|
4024
4251
|
"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."
|
|
4025
4252
|
}
|
|
4026
4253
|
},
|
|
4254
|
+
{
|
|
4255
|
+
"name": "Sidebar Block Type 1",
|
|
4256
|
+
"category": "Navigation",
|
|
4257
|
+
"status": "available",
|
|
4258
|
+
"packageImport": "import { SidebarBlockType1, SidebarBlockType1Trigger, SidebarBlockType1Workspace } from '@utopia-studio-design/design-system/Sidebar';",
|
|
4259
|
+
"sourcePath": "packages/design-system/src/components/Sidebar.tsx",
|
|
4260
|
+
"shadcnFoundation": [
|
|
4261
|
+
"sidebar",
|
|
4262
|
+
"button",
|
|
4263
|
+
"off-canvas navigation",
|
|
4264
|
+
"semantic Utopia application block"
|
|
4265
|
+
],
|
|
4266
|
+
"fallbackToShadcn": "sidebar",
|
|
4267
|
+
"requiredTokens": [
|
|
4268
|
+
"--background",
|
|
4269
|
+
"--foreground",
|
|
4270
|
+
"--border",
|
|
4271
|
+
"--primary",
|
|
4272
|
+
"--muted-foreground",
|
|
4273
|
+
"--surface-hover",
|
|
4274
|
+
"--radius-control",
|
|
4275
|
+
"--sidebar-width",
|
|
4276
|
+
"--sidebar-width-collapsed",
|
|
4277
|
+
"--sidebar-min-block-size",
|
|
4278
|
+
"--nav-item-height",
|
|
4279
|
+
"--button-height-sm",
|
|
4280
|
+
"--icon-size-sm",
|
|
4281
|
+
"--space-1",
|
|
4282
|
+
"--space-2",
|
|
4283
|
+
"--space-3",
|
|
4284
|
+
"--space-4",
|
|
4285
|
+
"--space-6",
|
|
4286
|
+
"--space-12",
|
|
4287
|
+
"--space-16",
|
|
4288
|
+
"--border-width-hairline",
|
|
4289
|
+
"--border-width-strong"
|
|
4290
|
+
],
|
|
4291
|
+
"useWhen": [
|
|
4292
|
+
"A clean application sidebar needs an expanded text-first navigation and icon-only desktop collapse",
|
|
4293
|
+
"The same navigation must become a mobile off-canvas panel with a compact ghost hamburger trigger",
|
|
4294
|
+
"Brand, grouped navigation, and an optional bottom-pinned workspace/details action should share one production-ready composition",
|
|
4295
|
+
"A product needs a standard Sidebar block without copying page-local layout CSS"
|
|
4296
|
+
],
|
|
4297
|
+
"avoidWhen": [
|
|
4298
|
+
"A documentation tree should use Side Nav",
|
|
4299
|
+
"Product routing, workspace data, dialog content, or brand artwork would be hardcoded into the design-system block",
|
|
4300
|
+
"A temporary supplemental surface should use Sheet or Drawer"
|
|
4301
|
+
],
|
|
4302
|
+
"neverInvent": [
|
|
4303
|
+
"Product-specific menu destinations",
|
|
4304
|
+
"Workspace names, user names, or organization data",
|
|
4305
|
+
"Raw colors, spacing, or icon sizes",
|
|
4306
|
+
"Left/right-only layout rules",
|
|
4307
|
+
"Utopia brand primitives inside reusable component logic",
|
|
4308
|
+
"A switcher chevron when no switching action exists",
|
|
4309
|
+
"Desktop collapse controls on mobile"
|
|
4310
|
+
],
|
|
4311
|
+
"ai": {
|
|
4312
|
+
"parts": [
|
|
4313
|
+
"SidebarProvider",
|
|
4314
|
+
"SidebarBlockType1",
|
|
4315
|
+
"SidebarBlockType1Trigger",
|
|
4316
|
+
"SidebarBlockType1Workspace",
|
|
4317
|
+
"SidebarGroup",
|
|
4318
|
+
"SidebarGroupLabel",
|
|
4319
|
+
"SidebarMenu",
|
|
4320
|
+
"SidebarMenuItem",
|
|
4321
|
+
"SidebarMenuButton",
|
|
4322
|
+
"NavigationIcon"
|
|
4323
|
+
],
|
|
4324
|
+
"props": {
|
|
4325
|
+
"SidebarBlockType1.brand": "Required app-owned brand node shown only in the expanded sidebar.",
|
|
4326
|
+
"SidebarBlockType1.collapsedIcon": "Optional app-owned compact mark shown in the collapsed desktop trigger; hover reveals the panel icon.",
|
|
4327
|
+
"SidebarBlockType1.children": "Grouped Sidebar navigation primitives. Product routing remains consumer-owned.",
|
|
4328
|
+
"SidebarBlockType1.footer": "Optional bottom-pinned action, commonly SidebarBlockType1Workspace composed with DialogTrigger asChild.",
|
|
4329
|
+
"SidebarBlockType1Trigger": "Use in both the sidebar header and a mobile topbar. It chooses desktop panel control or mobile hamburger from SidebarProvider state.",
|
|
4330
|
+
"SidebarBlockType1Workspace.label": "Required factual workspace label. Keep detailed metadata in the consumer-owned dialog.",
|
|
4331
|
+
"SidebarBlockType1Workspace.description": "Optional short metadata only; omit when it would truncate into low-value ellipsis."
|
|
4332
|
+
},
|
|
4333
|
+
"usage": "Wrap the application shell in SidebarProvider. Render SidebarBlockType1 with localized labels and app-owned brand/navigation/footer slots. Use SidebarBlockType1Trigger in the mobile topbar so the menu remains visible when the off-canvas sidebar is closed.",
|
|
4334
|
+
"arabicFriendly": "All alignment and off-canvas positioning use logical properties. Provide localized trigger, overlay, group, item, and workspace labels. The hamburger and panel icons are direction-neutral."
|
|
4335
|
+
}
|
|
4336
|
+
},
|
|
4027
4337
|
{
|
|
4028
4338
|
"name": "Slider",
|
|
4029
4339
|
"category": "Forms",
|
|
@@ -4268,7 +4578,8 @@
|
|
|
4268
4578
|
"useWhen": [
|
|
4269
4579
|
"Peer views",
|
|
4270
4580
|
"Same-context panels",
|
|
4271
|
-
"Keyboard-switchable content sections"
|
|
4581
|
+
"Keyboard-switchable content sections",
|
|
4582
|
+
"Full-width application workspaces when layout='fluid'"
|
|
4272
4583
|
],
|
|
4273
4584
|
"avoidWhen": [
|
|
4274
4585
|
"Page navigation",
|
|
@@ -4282,6 +4593,7 @@
|
|
|
4282
4593
|
],
|
|
4283
4594
|
"ai": {
|
|
4284
4595
|
"props": {
|
|
4596
|
+
"layout": "Use 'contained' for compact content panels (the default 42rem measure) or 'fluid' for dashboards and application workspaces that should fill the available inline size.",
|
|
4285
4597
|
"motion": "Optional boolean. Defaults to the MotionProvider policy and disables this component pattern when false."
|
|
4286
4598
|
}
|
|
4287
4599
|
}
|
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.
|
|
11
|
+
export const cliVersion = '0.4.0'
|
|
12
12
|
export const mcpLaunch = {
|
|
13
13
|
command: 'npx',
|
|
14
14
|
args: ['-y', '--package', '@utopia-studio-design/design-system-cli', 'utopia-ds', 'mcp'],
|