@conscia-labs/design-system 1.0.2 → 1.1.2

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.
@@ -0,0 +1,472 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "package": "@conscia-labs/design-system",
4
+ "version": "1.1.2",
5
+ "guide": "./AGENT_GUIDE.md",
6
+ "playground": "https://conscia-labs.github.io/design-system/",
7
+ "componentFamilies": [
8
+ {
9
+ "category": "Foundation",
10
+ "family": "Preferences and utilities",
11
+ "slug": "preferences-and-utilities",
12
+ "description": "Appearance, density, root preference helpers, and class composition.",
13
+ "route": "/foundation",
14
+ "exports": [
15
+ "applyConsciaPreferences",
16
+ "appearanceOptions",
17
+ "cn",
18
+ "densityOptions"
19
+ ]
20
+ },
21
+ {
22
+ "category": "Primitive",
23
+ "family": "Alert",
24
+ "slug": "alert",
25
+ "description": "Persistent semantic messages and announcements.",
26
+ "route": "/components/alert",
27
+ "exports": [
28
+ "Alert",
29
+ "AlertDescription",
30
+ "AlertTitle",
31
+ "alertVariants"
32
+ ]
33
+ },
34
+ {
35
+ "category": "Primitive",
36
+ "family": "Alert dialog",
37
+ "slug": "alert-dialog",
38
+ "description": "Confirmation for consequential actions.",
39
+ "route": "/components/alert-dialog",
40
+ "exports": [
41
+ "AlertDialog",
42
+ "AlertDialogAction",
43
+ "AlertDialogBody",
44
+ "AlertDialogCancel",
45
+ "AlertDialogClose",
46
+ "AlertDialogContent",
47
+ "AlertDialogDescription",
48
+ "AlertDialogFooter",
49
+ "AlertDialogHeader",
50
+ "AlertDialogOverlay",
51
+ "AlertDialogPortal",
52
+ "AlertDialogTitle",
53
+ "AlertDialogTrigger"
54
+ ]
55
+ },
56
+ {
57
+ "category": "Primitive",
58
+ "family": "Avatar",
59
+ "slug": "avatar",
60
+ "description": "People, identities, and compact groups.",
61
+ "route": "/components/avatar",
62
+ "exports": [
63
+ "Avatar",
64
+ "AvatarFallback",
65
+ "AvatarImage",
66
+ "AvatarGroup"
67
+ ]
68
+ },
69
+ {
70
+ "category": "Primitive",
71
+ "family": "Badge",
72
+ "slug": "badge",
73
+ "description": "Status and categorical labels.",
74
+ "route": "/components/badge",
75
+ "exports": [
76
+ "Badge",
77
+ "badgeVariants"
78
+ ]
79
+ },
80
+ {
81
+ "category": "Primitive",
82
+ "family": "Brand",
83
+ "slug": "brand",
84
+ "description": "Theme-aware Conscia identity marks.",
85
+ "route": "/components/brand",
86
+ "exports": [
87
+ "BrandIcon",
88
+ "BrandWordmark"
89
+ ]
90
+ },
91
+ {
92
+ "category": "Primitive",
93
+ "family": "Button",
94
+ "slug": "button",
95
+ "description": "Actions, icon actions, and pending actions.",
96
+ "route": "/components/button",
97
+ "exports": [
98
+ "Button",
99
+ "IconButton",
100
+ "LoadingButton",
101
+ "buttonVariants"
102
+ ]
103
+ },
104
+ {
105
+ "category": "Primitive",
106
+ "family": "Card",
107
+ "slug": "card",
108
+ "description": "General-purpose content surface anatomy.",
109
+ "route": "/components/card",
110
+ "exports": [
111
+ "Card",
112
+ "CardContent",
113
+ "CardDescription",
114
+ "CardFooter",
115
+ "CardHeader",
116
+ "CardTitle",
117
+ "cardVariants"
118
+ ]
119
+ },
120
+ {
121
+ "category": "Primitive",
122
+ "family": "Form controls",
123
+ "slug": "form-controls",
124
+ "description": "Labels, fields, inputs, selection, and boolean controls.",
125
+ "route": "/components/form-controls",
126
+ "exports": [
127
+ "Checkbox",
128
+ "Field",
129
+ "FieldDescription",
130
+ "FieldError",
131
+ "FieldGroup",
132
+ "FieldLabel",
133
+ "FormSelect",
134
+ "Input",
135
+ "Label",
136
+ "LabeledSwitch",
137
+ "SearchableSelect",
138
+ "Select",
139
+ "SelectContent",
140
+ "SelectGroup",
141
+ "SelectItem",
142
+ "SelectLabel",
143
+ "SelectScrollDownButton",
144
+ "SelectScrollUpButton",
145
+ "SelectSeparator",
146
+ "SelectTrigger",
147
+ "SelectValue",
148
+ "Switch",
149
+ "Textarea"
150
+ ]
151
+ },
152
+ {
153
+ "category": "Primitive",
154
+ "family": "Disclosure",
155
+ "slug": "disclosure",
156
+ "description": "Collapsible regions and tabbed interfaces.",
157
+ "route": "/components/disclosure",
158
+ "exports": [
159
+ "Collapsible",
160
+ "CollapsibleContent",
161
+ "CollapsibleTrigger",
162
+ "NavigationTab",
163
+ "NavigationTabs",
164
+ "NavigationTabsList",
165
+ "Tabs",
166
+ "TabsContent",
167
+ "TabsList",
168
+ "TabsTrigger"
169
+ ]
170
+ },
171
+ {
172
+ "category": "Primitive",
173
+ "family": "Menus and overlays",
174
+ "slug": "menus-and-overlays",
175
+ "description": "Dialogs, sheets, menus, popovers, and tooltips.",
176
+ "route": "/components/menus-and-overlays",
177
+ "exports": [
178
+ "Dialog",
179
+ "DialogBody",
180
+ "DialogClose",
181
+ "DialogContent",
182
+ "DialogDescription",
183
+ "DialogFooter",
184
+ "DialogHeader",
185
+ "DialogOverlay",
186
+ "DialogPortal",
187
+ "DialogTitle",
188
+ "DialogTrigger",
189
+ "DropdownMenu",
190
+ "DropdownMenuContent",
191
+ "DropdownMenuGroup",
192
+ "DropdownMenuItem",
193
+ "DropdownMenuLabel",
194
+ "DropdownMenuLinkItem",
195
+ "DropdownMenuSeparator",
196
+ "DropdownMenuSub",
197
+ "DropdownMenuSubContent",
198
+ "DropdownMenuSubTrigger",
199
+ "DropdownMenuTrigger",
200
+ "Popover",
201
+ "PopoverArrow",
202
+ "PopoverClose",
203
+ "PopoverContent",
204
+ "PopoverDescription",
205
+ "PopoverPositioner",
206
+ "PopoverPortal",
207
+ "PopoverTitle",
208
+ "PopoverTrigger",
209
+ "Sheet",
210
+ "SheetBody",
211
+ "SheetClose",
212
+ "SheetContent",
213
+ "SheetDescription",
214
+ "SheetFooter",
215
+ "SheetHeader",
216
+ "SheetOverlay",
217
+ "SheetPortal",
218
+ "SheetTitle",
219
+ "SheetTrigger",
220
+ "Tooltip",
221
+ "TooltipContent",
222
+ "TooltipProvider",
223
+ "TooltipTrigger"
224
+ ]
225
+ },
226
+ {
227
+ "category": "Primitive",
228
+ "family": "Table",
229
+ "slug": "table",
230
+ "description": "Semantic tabular anatomy for bounded datasets.",
231
+ "route": "/components/table",
232
+ "exports": [
233
+ "Table",
234
+ "TableBody",
235
+ "TableCaption",
236
+ "TableCell",
237
+ "TableFooter",
238
+ "TableHead",
239
+ "TableHeader",
240
+ "TableRow"
241
+ ]
242
+ },
243
+ {
244
+ "category": "Primitive",
245
+ "family": "Supporting primitives",
246
+ "slug": "supporting-primitives",
247
+ "description": "Filters, loading, separators, shortcuts, and toast feedback.",
248
+ "route": "/components/supporting-primitives",
249
+ "exports": [
250
+ "FilterChip",
251
+ "Separator",
252
+ "ShortcutHint",
253
+ "Skeleton",
254
+ "Spinner",
255
+ "Toast",
256
+ "ToastAction",
257
+ "ToastClose",
258
+ "ToastContent",
259
+ "ToastDescription",
260
+ "ToastProvider",
261
+ "ToastTitle",
262
+ "ToastViewport",
263
+ "useToast"
264
+ ]
265
+ },
266
+ {
267
+ "category": "Pattern",
268
+ "family": "Application shell",
269
+ "slug": "application-shell",
270
+ "description": "Integrated and split application chrome.",
271
+ "route": "/components/application-shell",
272
+ "exports": [
273
+ "AppHeader",
274
+ "AppHeaderActions",
275
+ "AppHeaderSearch",
276
+ "AppHeaderStart",
277
+ "AppShell",
278
+ "AppSidebar",
279
+ "AppSidebarContent",
280
+ "AppSidebarFooter",
281
+ "AppSidebarHeader",
282
+ "InspectorRegion",
283
+ "MainRegion",
284
+ "PageBoundary",
285
+ "PageContent",
286
+ "PageFrame",
287
+ "ProductIdentity",
288
+ "SidebarSeparator",
289
+ "SidebarSearch",
290
+ "SidebarTrigger",
291
+ "TopBar",
292
+ "useAppShell"
293
+ ]
294
+ },
295
+ {
296
+ "category": "Pattern",
297
+ "family": "Sidebar navigation",
298
+ "slug": "sidebar-navigation",
299
+ "description": "Static groups, leaf routes, and explicit submenus.",
300
+ "route": "/components/sidebar-navigation",
301
+ "exports": [
302
+ "NavigationGroup",
303
+ "NavigationItem",
304
+ "NavigationSubItem",
305
+ "NavigationSubList",
306
+ "SidebarNavigation"
307
+ ]
308
+ },
309
+ {
310
+ "category": "Pattern",
311
+ "family": "Page composition",
312
+ "slug": "page-composition",
313
+ "description": "Headers, toolbars, detail sections, and back links.",
314
+ "route": "/components/page-composition",
315
+ "exports": [
316
+ "DetailBackLink",
317
+ "DetailSection",
318
+ "DetailSections",
319
+ "KeyValueItem",
320
+ "KeyValueList",
321
+ "PageHeader",
322
+ "PageToolbar",
323
+ "ResourceSummary"
324
+ ]
325
+ },
326
+ {
327
+ "category": "Pattern",
328
+ "family": "Inventory and tables",
329
+ "slug": "inventory-and-tables",
330
+ "description": "Responsive data-heavy resource collections.",
331
+ "route": "/components/inventory-and-tables",
332
+ "exports": [
333
+ "DataTable",
334
+ "EntityTable",
335
+ "InventoryDesktop",
336
+ "InventoryMobile",
337
+ "InventorySurface",
338
+ "PaginationControls"
339
+ ]
340
+ },
341
+ {
342
+ "category": "Pattern",
343
+ "family": "Metrics and data panels",
344
+ "slug": "metrics-and-data-panels",
345
+ "description": "Operational summaries, trends, charts, and panel anatomy.",
346
+ "route": "/components/metrics-and-data-panels",
347
+ "exports": [
348
+ "DataPanel",
349
+ "DataPanelContent",
350
+ "DataPanelFooter",
351
+ "DataPanelHeader",
352
+ "MetricBand",
353
+ "MetricBandItem",
354
+ "MetricCard",
355
+ "MetricTrend",
356
+ "ValueMeter"
357
+ ]
358
+ },
359
+ {
360
+ "category": "Pattern",
361
+ "family": "Activity and attention",
362
+ "slug": "activity-and-attention",
363
+ "description": "Operational activity and persistent findings.",
364
+ "route": "/components/activity-and-attention",
365
+ "exports": [
366
+ "ActivityItem",
367
+ "ActivityList",
368
+ "AttentionItem",
369
+ "AttentionList"
370
+ ]
371
+ },
372
+ {
373
+ "category": "Pattern",
374
+ "family": "State and feedback",
375
+ "slug": "state-and-feedback",
376
+ "description": "Empty, loading, error, confirmation, and command states.",
377
+ "route": "/components/state-and-feedback",
378
+ "exports": [
379
+ "CommandPalette",
380
+ "ConfirmationDialog",
381
+ "ErrorState",
382
+ "LoadingRows",
383
+ "StateView"
384
+ ]
385
+ },
386
+ {
387
+ "category": "Pattern",
388
+ "family": "Filters and preferences",
389
+ "slug": "filters-and-preferences",
390
+ "description": "Applied filters and shared display preferences.",
391
+ "route": "/components/filters-and-preferences",
392
+ "exports": [
393
+ "AppearanceControl",
394
+ "DensityControl",
395
+ "DesignPreferenceControls",
396
+ "DesignSystemPreferenceSync",
397
+ "FilterBar",
398
+ "useConsciaPreferences"
399
+ ]
400
+ },
401
+ {
402
+ "category": "Pattern",
403
+ "family": "Workbench",
404
+ "slug": "workbench",
405
+ "description": "Multi-rail operational workspaces and resource rows.",
406
+ "route": "/components/workbench",
407
+ "exports": [
408
+ "IdentityRow",
409
+ "ResourceRow",
410
+ "ResourceRowContent",
411
+ "ResourceRowDescription",
412
+ "ResourceRowIcon",
413
+ "ResourceRowMeta",
414
+ "ResourceRowTitle",
415
+ "WorkbenchBackdrop",
416
+ "WorkbenchInspector",
417
+ "WorkbenchInspectorSection",
418
+ "WorkbenchMain",
419
+ "WorkbenchMobileToolbar",
420
+ "WorkbenchRail",
421
+ "WorkbenchSection",
422
+ "WorkbenchSectionHeader",
423
+ "WorkbenchShell"
424
+ ]
425
+ },
426
+ {
427
+ "category": "Pattern",
428
+ "family": "Content helpers",
429
+ "slug": "content-helpers",
430
+ "description": "Provider identity and copyable code examples.",
431
+ "route": "/components/content-helpers",
432
+ "exports": [
433
+ "CodeBlock",
434
+ "ProviderMark"
435
+ ]
436
+ },
437
+ {
438
+ "category": "Compatibility",
439
+ "family": "Conscia aliases",
440
+ "slug": "conscia-aliases",
441
+ "description": "Deprecated pre-v1 aliases retained for migration only.",
442
+ "route": "/components/conscia-aliases",
443
+ "exports": [
444
+ "ConsciaButton",
445
+ "ConsciaCard",
446
+ "ConsciaCardContent",
447
+ "ConsciaCardDescription",
448
+ "ConsciaCardFooter",
449
+ "ConsciaCardHeader",
450
+ "ConsciaCardTitle",
451
+ "ConsciaCheckbox",
452
+ "ConsciaFormSelect",
453
+ "ConsciaIconButton",
454
+ "ConsciaInput",
455
+ "ConsciaSelect",
456
+ "ConsciaSelectContent",
457
+ "ConsciaSelectGroup",
458
+ "ConsciaSelectItem",
459
+ "ConsciaSelectTrigger",
460
+ "ConsciaSelectValue",
461
+ "ConsciaSwitch",
462
+ "ConsciaTable",
463
+ "ConsciaTableBody",
464
+ "ConsciaTableCell",
465
+ "ConsciaTableHead",
466
+ "ConsciaTableHeader",
467
+ "ConsciaTableRow",
468
+ "ConsciaTextarea"
469
+ ]
470
+ }
471
+ ]
472
+ }
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { readFile, writeFile } from "node:fs/promises";
4
+ import { resolve } from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+
7
+ const startMarker = "<!-- conscia-design-system:start -->";
8
+ const endMarker = "<!-- conscia-design-system:end -->";
9
+ const defaultPlaygroundUrl = "https://conscia-labs.github.io/design-system/";
10
+
11
+ export function agentInstructionsBlock({
12
+ playgroundUrl = defaultPlaygroundUrl,
13
+ } = {}) {
14
+ return `${startMarker}
15
+ ## Conscia design system
16
+
17
+ - Use \`@conscia-labs/design-system\` for shared product UI.
18
+ - Before implementing or modifying UI, read \`node_modules/@conscia-labs/design-system/AGENT_GUIDE.md\`.
19
+ - Prefer published patterns over recreating the same workflow from primitives.
20
+ - Do not copy design-system components into this repository.
21
+ - Do not add Base UI, Radix, or shadcn replacements for behavior the package already provides.
22
+ - Keep routing, data access, permissions, validation, and business behavior in this application.
23
+ - Use the live visual reference at ${playgroundUrl}
24
+ ${endMarker}`;
25
+ }
26
+
27
+ export async function initAgentInstructions({
28
+ cwd = process.cwd(),
29
+ dryRun = false,
30
+ playgroundUrl = defaultPlaygroundUrl,
31
+ } = {}) {
32
+ const agentsPath = resolve(cwd, "AGENTS.md");
33
+ const block = agentInstructionsBlock({ playgroundUrl });
34
+ let existing = "";
35
+
36
+ try {
37
+ existing = await readFile(agentsPath, "utf8");
38
+ } catch (error) {
39
+ if (error?.code !== "ENOENT") throw error;
40
+ }
41
+
42
+ const newline = existing.includes("\r\n") ? "\r\n" : "\n";
43
+ const normalizedBlock = block.replaceAll("\n", newline);
44
+ const start = existing.indexOf(startMarker);
45
+ const end = existing.indexOf(endMarker);
46
+ let next;
47
+ let action;
48
+
49
+ if (start !== -1 && end !== -1 && end > start) {
50
+ next = `${existing.slice(0, start)}${normalizedBlock}${existing.slice(end + endMarker.length)}`;
51
+ action = next === existing ? "unchanged" : "updated";
52
+ } else {
53
+ const prefix = existing.trimEnd();
54
+ next = prefix ? `${prefix}${newline}${newline}${normalizedBlock}${newline}` : `${normalizedBlock}${newline}`;
55
+ action = "created";
56
+ }
57
+
58
+ if (!dryRun && next !== existing) await writeFile(agentsPath, next);
59
+
60
+ return { action, content: next, path: agentsPath };
61
+ }
62
+
63
+ function printHelp() {
64
+ console.log(`Conscia Design System
65
+
66
+ Usage:
67
+ conscia-design-system init-agents [--dry-run]
68
+
69
+ Commands:
70
+ init-agents Add or update the managed Conscia section in ./AGENTS.md.
71
+ `);
72
+ }
73
+
74
+ async function main() {
75
+ const [command, ...options] = process.argv.slice(2);
76
+
77
+ if (!command || command === "--help" || command === "-h") {
78
+ printHelp();
79
+ return;
80
+ }
81
+
82
+ if (command !== "init-agents") {
83
+ console.error(`Unknown command: ${command}`);
84
+ printHelp();
85
+ process.exitCode = 1;
86
+ return;
87
+ }
88
+
89
+ const unsupported = options.filter((option) => option !== "--dry-run");
90
+ if (unsupported.length > 0) {
91
+ console.error(`Unknown option: ${unsupported[0]}`);
92
+ process.exitCode = 1;
93
+ return;
94
+ }
95
+
96
+ const result = await initAgentInstructions({
97
+ dryRun: options.includes("--dry-run"),
98
+ });
99
+ console.log(
100
+ options.includes("--dry-run")
101
+ ? result.content
102
+ : `${result.action === "unchanged" ? "Kept" : "Updated"} ${result.path}`,
103
+ );
104
+ }
105
+
106
+ const entryPath = process.argv[1] ? resolve(process.argv[1]) : "";
107
+ if (entryPath === fileURLToPath(import.meta.url)) {
108
+ await main();
109
+ }