sparkdesign 0.4.6 → 0.4.7
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/AI_README.md +60 -0
- package/README.md +1 -1
- package/cli/dist/commands/add.js +1 -1
- package/cli/dist/commands/init.js +1 -1
- package/cli/registry/AGENTS.md +9 -2
- package/cli/registry/agent-manifest.json +794 -0
- package/cli/registry/basic/alert.tsx +76 -0
- package/cli/registry/basic/aspect-ratio.tsx +8 -0
- package/cli/registry/basic/breadcrumb.tsx +117 -0
- package/cli/registry/basic/button-group.tsx +79 -0
- package/cli/registry/basic/button.tsx +1 -1
- package/cli/registry/basic/calendar.tsx +221 -0
- package/cli/registry/basic/card.tsx +103 -0
- package/cli/registry/basic/carousel.tsx +241 -0
- package/cli/registry/basic/chart.tsx +372 -0
- package/cli/registry/basic/checkbox.tsx +42 -0
- package/cli/registry/basic/collapsible-card.tsx +2 -2
- package/cli/registry/basic/combobox.tsx +75 -0
- package/cli/registry/basic/command.tsx +184 -0
- package/cli/registry/basic/context-menu.tsx +239 -0
- package/cli/registry/basic/data-table.tsx +73 -0
- package/cli/registry/basic/date-picker.tsx +13 -0
- package/cli/registry/basic/dialog.tsx +169 -0
- package/cli/registry/basic/direction.tsx +25 -0
- package/cli/registry/basic/drawer.tsx +164 -0
- package/cli/registry/basic/dropdown-menu.tsx +0 -4
- package/cli/registry/basic/empty.tsx +104 -0
- package/cli/registry/basic/field.tsx +248 -0
- package/cli/registry/basic/hover-card.tsx +58 -0
- package/cli/registry/basic/input-group.tsx +168 -0
- package/cli/registry/basic/input-otp.tsx +75 -0
- package/cli/registry/basic/input.tsx +27 -0
- package/cli/registry/basic/item.tsx +204 -0
- package/cli/registry/basic/label.tsx +24 -0
- package/cli/registry/basic/menubar.tsx +274 -0
- package/cli/registry/basic/native-select.tsx +62 -0
- package/cli/registry/basic/navigation-menu.tsx +168 -0
- package/cli/registry/basic/popover.tsx +59 -0
- package/cli/registry/basic/scroll-area.tsx +58 -0
- package/cli/registry/basic/select.tsx +2 -1
- package/cli/registry/basic/separator.tsx +26 -0
- package/cli/registry/basic/sheet.tsx +18 -0
- package/cli/registry/basic/textarea.tsx +25 -0
- package/cli/registry/basic/toggle.tsx +1 -1
- package/cli/registry/basic/typography.tsx +1 -1
- package/cli/registry/chat/chat-input/chat-input-textarea.tsx +1 -1
- package/cli/registry/chat/chat-input/compound.tsx +4 -3
- package/cli/registry/chat/chat-input/context.tsx +4 -1
- package/cli/registry/chat/code-block-part.tsx +1 -1
- package/cli/registry/chat/conversation-anchor-nav.tsx +349 -0
- package/cli/registry/chat/file-attachment.tsx +2 -1
- package/cli/registry/chat/file-review-part.tsx +21 -21
- package/cli/registry/chat/markdown.tsx +2 -2
- package/cli/registry/chat/queue-indicator.tsx +1 -0
- package/cli/registry/chat/streaming-markdown-block.tsx +12 -8
- package/cli/registry/chat/tool-invocation-card.tsx +4 -1
- package/cli/registry/lib/file-icon-maps.ts +22 -22
- package/cli/registry/meta.json +518 -0
- package/cli/registry/tokens/ontology.json +404 -0
- package/cli/registry/tokens/scale/presets/compact.css +16 -5
- package/cli/registry/tokens/scale/presets/dense.css +13 -2
- package/cli/registry/tokens/scale/presets/sharp.css +18 -6
- package/cli/registry/tokens/scale/presets/soft.css +23 -1
- package/dist/registry/basic/alert.d.ts +24 -0
- package/dist/registry/basic/aspect-ratio.d.ts +16 -0
- package/dist/registry/basic/breadcrumb.d.ts +24 -0
- package/dist/registry/basic/button-group.d.ts +26 -0
- package/dist/registry/basic/button.d.ts +1 -1
- package/dist/registry/basic/calendar.d.ts +22 -0
- package/dist/registry/basic/card.d.ts +27 -0
- package/dist/registry/basic/carousel.d.ts +19 -0
- package/dist/registry/basic/chart.d.ts +55 -0
- package/dist/registry/basic/checkbox.d.ts +21 -0
- package/dist/registry/basic/combobox.d.ts +26 -0
- package/dist/registry/basic/command.d.ts +18 -0
- package/dist/registry/basic/context-menu.d.ts +44 -0
- package/dist/registry/basic/data-table.d.ts +26 -0
- package/dist/registry/basic/date-picker.d.ts +18 -0
- package/dist/registry/basic/dialog.d.ts +39 -0
- package/dist/registry/basic/direction.d.ts +19 -0
- package/dist/registry/basic/drawer.d.ts +37 -0
- package/dist/registry/basic/empty.d.ts +22 -0
- package/dist/registry/basic/field.d.ts +24 -0
- package/dist/registry/basic/hover-card.d.ts +22 -0
- package/dist/registry/basic/input-group.d.ts +27 -0
- package/dist/registry/basic/input-otp.d.ts +22 -0
- package/dist/registry/basic/input.d.ts +15 -0
- package/dist/registry/basic/item.d.ts +34 -0
- package/dist/registry/basic/label.d.ts +16 -0
- package/dist/registry/basic/menubar.d.ts +37 -0
- package/dist/registry/basic/native-select.d.ts +18 -0
- package/dist/registry/basic/navigation-menu.d.ts +25 -0
- package/dist/registry/basic/popover.d.ts +23 -0
- package/dist/registry/basic/scroll-area.d.ts +5 -0
- package/dist/registry/basic/separator.d.ts +16 -0
- package/dist/registry/basic/sheet.d.ts +13 -0
- package/dist/registry/basic/textarea.d.ts +15 -0
- package/dist/registry/basic/toggle.d.ts +1 -1
- package/dist/registry/chat/chat-input/context.d.ts +3 -1
- package/dist/registry/chat/conversation-anchor-nav.d.ts +72 -0
- package/dist/registry/chat/tool-invocation-card.d.ts +2 -0
- package/dist/scale/presets/compact.css +16 -5
- package/dist/scale/presets/dense.css +13 -2
- package/dist/scale/presets/sharp.css +18 -6
- package/dist/scale/presets/soft.css +23 -1
- package/dist/spark-design.cjs.js +40 -36
- package/dist/spark-design.es.js +8647 -8657
- package/dist/sparkdesign.css +1 -1
- package/dist/src/components/basic/Alert/index.d.ts +13 -0
- package/dist/src/components/basic/AspectRatio/index.d.ts +13 -0
- package/dist/src/components/basic/Breadcrumb/index.d.ts +12 -0
- package/dist/src/components/basic/ButtonGroup/index.d.ts +13 -0
- package/dist/src/components/basic/Calendar/index.d.ts +13 -0
- package/dist/src/components/basic/Card/index.d.ts +13 -0
- package/dist/src/components/basic/Carousel/index.d.ts +12 -0
- package/dist/src/components/basic/Chart/index.d.ts +13 -0
- package/dist/src/components/basic/Checkbox/index.d.ts +13 -0
- package/dist/src/components/basic/Combobox/index.d.ts +13 -0
- package/dist/src/components/basic/Command/index.d.ts +12 -0
- package/dist/src/components/basic/ContextMenu/index.d.ts +19 -0
- package/dist/src/components/basic/DataTable/index.d.ts +13 -0
- package/dist/src/components/basic/DatePicker/index.d.ts +13 -0
- package/dist/src/components/basic/Dialog/index.d.ts +16 -0
- package/dist/src/components/basic/Direction/index.d.ts +13 -0
- package/dist/src/components/basic/Drawer/index.d.ts +16 -0
- package/dist/src/components/basic/Empty/index.d.ts +12 -0
- package/dist/src/components/basic/Field/index.d.ts +12 -0
- package/dist/src/components/basic/HoverCard/index.d.ts +16 -0
- package/dist/src/components/basic/Input/index.d.ts +13 -0
- package/dist/src/components/basic/InputGroup/index.d.ts +12 -0
- package/dist/src/components/basic/InputOTP/index.d.ts +12 -0
- package/dist/src/components/basic/Item/index.d.ts +12 -0
- package/dist/src/components/basic/Label/index.d.ts +13 -0
- package/dist/src/components/basic/Menubar/index.d.ts +12 -0
- package/dist/src/components/basic/NativeSelect/index.d.ts +12 -0
- package/dist/src/components/basic/NavigationMenu/index.d.ts +12 -0
- package/dist/src/components/basic/Popover/index.d.ts +16 -0
- package/dist/src/components/basic/ScrollArea/index.d.ts +12 -0
- package/dist/src/components/basic/Separator/index.d.ts +13 -0
- package/dist/src/components/basic/Sheet/index.d.ts +13 -0
- package/dist/src/components/basic/Textarea/index.d.ts +13 -0
- package/dist/src/components/chat/ConversationAnchorNav/index.d.ts +13 -0
- package/dist/src/components/chat/StreamingMarkdownBlock/index.d.ts +13 -0
- package/dist/src/components/index.d.ts +57 -0
- package/dist/tokens/AGENTS.md +1 -0
- package/dist/tokens/scale/presets/compact.css +16 -5
- package/dist/tokens/scale/presets/dense.css +13 -2
- package/dist/tokens/scale/presets/sharp.css +18 -6
- package/dist/tokens/scale/presets/soft.css +23 -1
- package/docs/agent/component-selection.md +60 -0
- package/docs/agent/token-ontology.md +37 -0
- package/package.json +31 -5
- package/registry/agent-manifest.json +794 -0
- package/registry/tokens/ontology.json +404 -0
- package/dist/_basePickBy-DnQN8w3y.js +0 -151
- package/dist/_basePickBy-a-kPMlkg.cjs +0 -1
- package/dist/_baseUniq-B-N2NQ50.js +0 -614
- package/dist/_baseUniq-Cc_zbSif.cjs +0 -1
- package/dist/arc-BQBhijZ6.js +0 -83
- package/dist/arc-mWQt0Yph.cjs +0 -1
- package/dist/architectureDiagram-VXUJARFQ-BMZEucno.cjs +0 -36
- package/dist/architectureDiagram-VXUJARFQ-DTdjD3Bp.js +0 -4661
- package/dist/blockDiagram-VD42YOAC-CzHn0yob.js +0 -2256
- package/dist/blockDiagram-VD42YOAC-DDxdHAlz.cjs +0 -122
- package/dist/c4Diagram-YG6GDRKO-4Gz0I4gj.cjs +0 -10
- package/dist/c4Diagram-YG6GDRKO-BIy--yVN.js +0 -1580
- package/dist/channel-BQn0o8bs.js +0 -5
- package/dist/channel-DaN7XniJ.cjs +0 -1
- package/dist/chunk-4BX2VUAB-BlQFTQqz.cjs +0 -1
- package/dist/chunk-4BX2VUAB-Czitj3Kc.js +0 -8
- package/dist/chunk-55IACEB6-DXacNZbO.js +0 -8
- package/dist/chunk-55IACEB6-DnDxpye9.cjs +0 -1
- package/dist/chunk-B4BG7PRW-CBdN0q_V.js +0 -1375
- package/dist/chunk-B4BG7PRW-DbGvUkGO.cjs +0 -165
- package/dist/chunk-DI55MBZ5-D1YJMs6x.cjs +0 -220
- package/dist/chunk-DI55MBZ5-NCQTvayw.js +0 -1370
- package/dist/chunk-FMBD7UC4-CsGMbrtr.js +0 -19
- package/dist/chunk-FMBD7UC4-Di7cUUh5.cjs +0 -15
- package/dist/chunk-QN33PNHL-0j5LC8Lm.cjs +0 -1
- package/dist/chunk-QN33PNHL-3GERZBRm.js +0 -19
- package/dist/chunk-QZHKN3VN-AVEY9ImQ.js +0 -15
- package/dist/chunk-QZHKN3VN-s8Z0a8mc.cjs +0 -1
- package/dist/chunk-TZMSLE5B-CAf87HPt.cjs +0 -1
- package/dist/chunk-TZMSLE5B-sbiflal0.js +0 -64
- package/dist/classDiagram-2ON5EDUG-Ct9JLIN2.cjs +0 -1
- package/dist/classDiagram-2ON5EDUG-Dzfrft3a.js +0 -16
- package/dist/classDiagram-v2-WZHVMYZB-Ct9JLIN2.cjs +0 -1
- package/dist/classDiagram-v2-WZHVMYZB-Dzfrft3a.js +0 -16
- package/dist/clone-Cde_NQ8V.js +0 -8
- package/dist/clone-DCNjWuM2.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-0uLijMro.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-Bb08N431.js +0 -2608
- package/dist/cytoscape.esm-CNUX3VTg.cjs +0 -321
- package/dist/cytoscape.esm-Cvf3sx9F.js +0 -18704
- package/dist/dagre-6UL2VRFP-CY_Wz5Zd.js +0 -444
- package/dist/dagre-6UL2VRFP-Dxe7_qZc.cjs +0 -4
- package/dist/defaultLocale-BgPVtth8.js +0 -171
- package/dist/defaultLocale-C4wbwF1n.cjs +0 -1
- package/dist/diagram-PSM6KHXK-D2bdb7MT.js +0 -531
- package/dist/diagram-PSM6KHXK-YF69SUjY.cjs +0 -24
- package/dist/diagram-QEK2KX5R-BpUSoh0-.js +0 -217
- package/dist/diagram-QEK2KX5R-DZPGteon.cjs +0 -43
- package/dist/diagram-S2PKOQOG-ht-zdvFG.cjs +0 -24
- package/dist/diagram-S2PKOQOG-zFeLJ50Z.js +0 -142
- package/dist/erDiagram-Q2GNP2WA-B38iJ6ts.js +0 -841
- package/dist/erDiagram-Q2GNP2WA-RgS80DDU.cjs +0 -60
- package/dist/flowDiagram-NV44I4VS-BHilOs2p.cjs +0 -162
- package/dist/flowDiagram-NV44I4VS-BrBJcoce.js +0 -1620
- package/dist/ganttDiagram-JELNMOA3-pZiJeFio.cjs +0 -267
- package/dist/ganttDiagram-JELNMOA3-tw6FhkWJ.js +0 -2670
- package/dist/gitGraphDiagram-V2S2FVAM-BWn5uIK5.js +0 -699
- package/dist/gitGraphDiagram-V2S2FVAM-DKKeG-9R.cjs +0 -65
- package/dist/graph-DIbblrZP.cjs +0 -1
- package/dist/graph-DPcK91G3.js +0 -247
- package/dist/infoDiagram-HS3SLOUP-B8gwwhct.cjs +0 -2
- package/dist/infoDiagram-HS3SLOUP-D47PNcP_.js +0 -24
- package/dist/init-CHZsXQcr.cjs +0 -1
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/journeyDiagram-XKPGCS4Q-BG3cfhyU.js +0 -834
- package/dist/journeyDiagram-XKPGCS4Q-D8DVLJof.cjs +0 -139
- package/dist/kanban-definition-3W4ZIXB7-4OCnEouP.cjs +0 -89
- package/dist/kanban-definition-3W4ZIXB7-CWi_ssF9.js +0 -719
- package/dist/layout-Byuh8f-J.cjs +0 -1
- package/dist/layout-CdLdvj1j.js +0 -1335
- package/dist/linear-C2Q_PI9B.js +0 -259
- package/dist/linear-C69aPBW1.cjs +0 -1
- package/dist/mermaid.core-DBwAx_jp.cjs +0 -249
- package/dist/mermaid.core-gFR0XUlD.js +0 -15300
- package/dist/mindmap-definition-VGOIOE7T-8P7obVV4.cjs +0 -68
- package/dist/mindmap-definition-VGOIOE7T-DnOa7WJ9.js +0 -784
- package/dist/ordinal-B6-f3MAq.js +0 -61
- package/dist/ordinal-CagbB1m8.cjs +0 -1
- package/dist/pieDiagram-ADFJNKIX-5NAlvhMo.js +0 -161
- package/dist/pieDiagram-ADFJNKIX-CQBG4yR9.cjs +0 -30
- package/dist/quadrantDiagram-AYHSOK5B-Oe4y7RZ0.cjs +0 -7
- package/dist/quadrantDiagram-AYHSOK5B-rh2DPEP1.js +0 -1022
- package/dist/requirementDiagram-UZGBJVZJ-DcWaCuXr.js +0 -850
- package/dist/requirementDiagram-UZGBJVZJ-gfdlrFiq.cjs +0 -64
- package/dist/sankeyDiagram-TZEHDZUN-CQIKFwD0.js +0 -810
- package/dist/sankeyDiagram-TZEHDZUN-DvPtzQvC.cjs +0 -10
- package/dist/sequenceDiagram-WL72ISMW-BNrsMagL.cjs +0 -145
- package/dist/sequenceDiagram-WL72ISMW-iCX3ckKx.js +0 -2511
- package/dist/stateDiagram-FKZM4ZOC-DBvJ_eeL.cjs +0 -1
- package/dist/stateDiagram-FKZM4ZOC-ZVsJlaHJ.js +0 -263
- package/dist/stateDiagram-v2-4FDKWEC3-CB_nTHcE.js +0 -16
- package/dist/stateDiagram-v2-4FDKWEC3-Xkx17v6T.cjs +0 -1
- package/dist/timeline-definition-IT6M3QCI-BmGkYQiz.cjs +0 -61
- package/dist/timeline-definition-IT6M3QCI-Ck8zTt6w.js +0 -795
- package/dist/treemap-GDKQZRPO-B9sfERx8.js +0 -17922
- package/dist/treemap-GDKQZRPO-BVfJRs0Z.cjs +0 -160
- package/dist/xychartDiagram-PRI3JC2R-By_S8NzN.js +0 -1340
- package/dist/xychartDiagram-PRI3JC2R-CNfDrGxM.cjs +0 -7
|
@@ -0,0 +1,794 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "0.1.0",
|
|
3
|
+
"library": {
|
|
4
|
+
"name": "sparkdesign",
|
|
5
|
+
"versionSource": "package.json",
|
|
6
|
+
"agentContract": "Use this manifest to choose components by intent, constraints, and composition rules before reading source code.",
|
|
7
|
+
"defaultConsumption": "cli",
|
|
8
|
+
"consumptionModes": {
|
|
9
|
+
"cli": {
|
|
10
|
+
"when": "Business applications that should own and customize copied component source.",
|
|
11
|
+
"init": "npx sparkdesign@latest init",
|
|
12
|
+
"add": "npx sparkdesign@latest add <component>"
|
|
13
|
+
},
|
|
14
|
+
"package": {
|
|
15
|
+
"when": "Fast prototypes, showcase usage, or projects that explicitly install the package runtime.",
|
|
16
|
+
"install": "npm install sparkdesign",
|
|
17
|
+
"styleImport": "import 'sparkdesign/style'"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"globalRules": [
|
|
22
|
+
"Prefer existing Spark components over creating visually similar one-off UI.",
|
|
23
|
+
"Use design tokens and semantic utility classes; do not hard-code hex colors, ad-hoc radii, or arbitrary shadows in product UI.",
|
|
24
|
+
"For portaled UI, preserve data-theme and data-style inheritance through ThemeStyleProvider or component wrappers.",
|
|
25
|
+
"Choose chat components only for conversational, agentic, tool, file, or reasoning flows; use basic components for product UI primitives.",
|
|
26
|
+
"Read antiPatterns before composing a component into a generated screen."
|
|
27
|
+
],
|
|
28
|
+
"tokenRules": {
|
|
29
|
+
"color": {
|
|
30
|
+
"preferred": [
|
|
31
|
+
"text-text",
|
|
32
|
+
"text-text-secondary",
|
|
33
|
+
"text-text-tertiary",
|
|
34
|
+
"bg-bg-base",
|
|
35
|
+
"bg-bg-elevated",
|
|
36
|
+
"bg-fill-secondary",
|
|
37
|
+
"border-border",
|
|
38
|
+
"bg-primary",
|
|
39
|
+
"text-primary-foreground"
|
|
40
|
+
],
|
|
41
|
+
"forbidden": [
|
|
42
|
+
"hard-coded hex colors",
|
|
43
|
+
"raw rgb/rgba values unless binding to a tokenized CSS variable",
|
|
44
|
+
"semantic misuse such as destructive colors for neutral emphasis"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"spacing": {
|
|
48
|
+
"preferred": [
|
|
49
|
+
"gap-*",
|
|
50
|
+
"p-*",
|
|
51
|
+
"px-*",
|
|
52
|
+
"py-*",
|
|
53
|
+
"var(--spacing-*)"
|
|
54
|
+
],
|
|
55
|
+
"forbidden": [
|
|
56
|
+
"pixel-perfect arbitrary spacing without a component-specific reason",
|
|
57
|
+
"layout rhythm that changes across sibling components"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"motion": {
|
|
61
|
+
"preferred": [
|
|
62
|
+
"short functional transitions for feedback",
|
|
63
|
+
"Framer Motion only when state transition clarity improves"
|
|
64
|
+
],
|
|
65
|
+
"forbidden": [
|
|
66
|
+
"decorative motion that delays task completion",
|
|
67
|
+
"motion without reduced-motion consideration for complex scenes"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"components": {
|
|
72
|
+
"alert": {
|
|
73
|
+
"id": "alert",
|
|
74
|
+
"name": "Alert",
|
|
75
|
+
"category": "basic",
|
|
76
|
+
"status": "stable",
|
|
77
|
+
"intent": "Inline callout for contextual status, warnings, or explanatory feedback inside page flow.",
|
|
78
|
+
"packageImport": "import { Alert, AlertTitle, AlertDescription } from 'sparkdesign'",
|
|
79
|
+
"cliAdd": "npx sparkdesign@latest add alert",
|
|
80
|
+
"slots": [
|
|
81
|
+
"Alert",
|
|
82
|
+
"AlertTitle",
|
|
83
|
+
"AlertDescription",
|
|
84
|
+
"leading icon"
|
|
85
|
+
],
|
|
86
|
+
"states": [
|
|
87
|
+
"default",
|
|
88
|
+
"info",
|
|
89
|
+
"success",
|
|
90
|
+
"warning",
|
|
91
|
+
"destructive"
|
|
92
|
+
],
|
|
93
|
+
"a11y": [
|
|
94
|
+
"Use semantic text content, not icon-only alerts.",
|
|
95
|
+
"Use destructive only for high-impact errors or irreversible risk.",
|
|
96
|
+
"Keep title and description concise so screen reader output stays useful."
|
|
97
|
+
],
|
|
98
|
+
"composition": [
|
|
99
|
+
"Card",
|
|
100
|
+
"Form",
|
|
101
|
+
"PermissionCard",
|
|
102
|
+
"ChatInput"
|
|
103
|
+
],
|
|
104
|
+
"antiPatterns": [
|
|
105
|
+
"Do not use Alert as a toast replacement for transient feedback.",
|
|
106
|
+
"Do not stack multiple alerts when one grouped message is clearer."
|
|
107
|
+
],
|
|
108
|
+
"agentHints": [
|
|
109
|
+
"Choose Alert when the message belongs in the layout and should remain visible.",
|
|
110
|
+
"Prefer Toast for ephemeral success notifications."
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"button": {
|
|
114
|
+
"id": "button",
|
|
115
|
+
"name": "Button",
|
|
116
|
+
"category": "basic",
|
|
117
|
+
"status": "stable",
|
|
118
|
+
"intent": "Primary, secondary, ghost, or destructive action trigger with tokenized sizing and interaction states.",
|
|
119
|
+
"packageImport": "import { Button } from 'sparkdesign'",
|
|
120
|
+
"cliAdd": "npx sparkdesign@latest add button",
|
|
121
|
+
"slots": [
|
|
122
|
+
"label",
|
|
123
|
+
"leading icon",
|
|
124
|
+
"trailing icon"
|
|
125
|
+
],
|
|
126
|
+
"states": [
|
|
127
|
+
"default",
|
|
128
|
+
"hover",
|
|
129
|
+
"focus-visible",
|
|
130
|
+
"disabled",
|
|
131
|
+
"loading by composition"
|
|
132
|
+
],
|
|
133
|
+
"a11y": [
|
|
134
|
+
"Use a visible label or aria-label for icon-only actions.",
|
|
135
|
+
"Keep destructive actions visually and semantically explicit.",
|
|
136
|
+
"Do not disable without preserving an explanation nearby when the reason is unclear."
|
|
137
|
+
],
|
|
138
|
+
"composition": [
|
|
139
|
+
"DialogTrigger",
|
|
140
|
+
"DropdownMenuTrigger",
|
|
141
|
+
"Tooltip",
|
|
142
|
+
"ChatInputActions",
|
|
143
|
+
"PermissionCard"
|
|
144
|
+
],
|
|
145
|
+
"antiPatterns": [
|
|
146
|
+
"Do not use links styled as buttons for navigation unless the semantic element remains an anchor.",
|
|
147
|
+
"Do not place multiple primary buttons in the same decision group."
|
|
148
|
+
],
|
|
149
|
+
"agentHints": [
|
|
150
|
+
"Use one primary action per surface.",
|
|
151
|
+
"Pair dangerous actions with AlertDialog or PermissionCard."
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"card": {
|
|
155
|
+
"id": "card",
|
|
156
|
+
"name": "Card",
|
|
157
|
+
"category": "basic",
|
|
158
|
+
"status": "stable",
|
|
159
|
+
"intent": "Bounded surface for grouped content, settings, forms, summaries, or preview blocks.",
|
|
160
|
+
"packageImport": "import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from 'sparkdesign'",
|
|
161
|
+
"cliAdd": "npx sparkdesign@latest add card",
|
|
162
|
+
"slots": [
|
|
163
|
+
"Card",
|
|
164
|
+
"CardHeader",
|
|
165
|
+
"CardTitle",
|
|
166
|
+
"CardDescription",
|
|
167
|
+
"CardAction",
|
|
168
|
+
"CardContent",
|
|
169
|
+
"CardFooter"
|
|
170
|
+
],
|
|
171
|
+
"states": [
|
|
172
|
+
"static",
|
|
173
|
+
"interactive by composition",
|
|
174
|
+
"empty",
|
|
175
|
+
"loading by composition"
|
|
176
|
+
],
|
|
177
|
+
"a11y": [
|
|
178
|
+
"Use heading hierarchy intentionally inside CardTitle.",
|
|
179
|
+
"Avoid making the full card clickable when nested controls exist.",
|
|
180
|
+
"Keep focus order aligned with visual order."
|
|
181
|
+
],
|
|
182
|
+
"composition": [
|
|
183
|
+
"Button",
|
|
184
|
+
"Alert",
|
|
185
|
+
"Input",
|
|
186
|
+
"Textarea",
|
|
187
|
+
"Skeleton",
|
|
188
|
+
"Badge"
|
|
189
|
+
],
|
|
190
|
+
"antiPatterns": [
|
|
191
|
+
"Do not use Card only to add decoration around unrelated content.",
|
|
192
|
+
"Do not nest cards more than one level deep unless the information architecture requires it."
|
|
193
|
+
],
|
|
194
|
+
"agentHints": [
|
|
195
|
+
"Use Card to create scan-friendly groups, not as the default wrapper for every element."
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
"chat-input": {
|
|
199
|
+
"id": "chat-input",
|
|
200
|
+
"name": "ChatInput",
|
|
201
|
+
"category": "chat",
|
|
202
|
+
"status": "stable",
|
|
203
|
+
"intent": "Agent prompt composer with attachments, actions, model/status affordances, and send behavior.",
|
|
204
|
+
"packageImport": "import { ChatInput } from 'sparkdesign'",
|
|
205
|
+
"cliAdd": "npx sparkdesign@latest add chat-input",
|
|
206
|
+
"slots": [
|
|
207
|
+
"ChatInputRoot",
|
|
208
|
+
"ChatInputAbove",
|
|
209
|
+
"ChatInputBox",
|
|
210
|
+
"ChatInputAttachments",
|
|
211
|
+
"ChatInputInput",
|
|
212
|
+
"ChatInputActions",
|
|
213
|
+
"ChatInputActionsLeft",
|
|
214
|
+
"ChatInputActionsRight",
|
|
215
|
+
"ChatInputSendButton",
|
|
216
|
+
"ChatInputFooterLeft"
|
|
217
|
+
],
|
|
218
|
+
"states": [
|
|
219
|
+
"idle",
|
|
220
|
+
"focused",
|
|
221
|
+
"composing",
|
|
222
|
+
"disabled",
|
|
223
|
+
"streaming",
|
|
224
|
+
"attachments-present",
|
|
225
|
+
"permission-required"
|
|
226
|
+
],
|
|
227
|
+
"a11y": [
|
|
228
|
+
"Preserve textarea semantics and keyboard submission behavior.",
|
|
229
|
+
"Keep send action reachable by keyboard.",
|
|
230
|
+
"Expose attachment removal with accessible labels.",
|
|
231
|
+
"Do not hide status text from assistive technology when it communicates task state."
|
|
232
|
+
],
|
|
233
|
+
"composition": [
|
|
234
|
+
"SendButton",
|
|
235
|
+
"FileAttachment",
|
|
236
|
+
"ImageAttachment",
|
|
237
|
+
"GenerationStatusBar",
|
|
238
|
+
"PermissionCard",
|
|
239
|
+
"Tooltip"
|
|
240
|
+
],
|
|
241
|
+
"antiPatterns": [
|
|
242
|
+
"Do not use ChatInput as a generic form textarea.",
|
|
243
|
+
"Do not hard-code model labels or footer actions into the component when they are product state.",
|
|
244
|
+
"Do not place unrelated navigation controls inside ChatInputActions."
|
|
245
|
+
],
|
|
246
|
+
"agentHints": [
|
|
247
|
+
"Choose ChatInput for conversational or agent command entry.",
|
|
248
|
+
"Use the compound API when the generated layout needs custom action placement."
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
"dialog": {
|
|
252
|
+
"id": "dialog",
|
|
253
|
+
"name": "Dialog",
|
|
254
|
+
"category": "basic",
|
|
255
|
+
"status": "stable",
|
|
256
|
+
"intent": "Focused modal surface for short tasks, confirmations, or contextual forms that block background interaction.",
|
|
257
|
+
"packageImport": "import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription } from 'sparkdesign'",
|
|
258
|
+
"cliAdd": "npx sparkdesign@latest add dialog",
|
|
259
|
+
"slots": [
|
|
260
|
+
"Dialog",
|
|
261
|
+
"DialogTrigger",
|
|
262
|
+
"DialogPortal",
|
|
263
|
+
"DialogOverlay",
|
|
264
|
+
"DialogContent",
|
|
265
|
+
"DialogHeader",
|
|
266
|
+
"DialogFooter",
|
|
267
|
+
"DialogTitle",
|
|
268
|
+
"DialogDescription",
|
|
269
|
+
"DialogClose"
|
|
270
|
+
],
|
|
271
|
+
"states": [
|
|
272
|
+
"open",
|
|
273
|
+
"closed",
|
|
274
|
+
"focus-trapped",
|
|
275
|
+
"dismissible",
|
|
276
|
+
"non-dismissible by composition"
|
|
277
|
+
],
|
|
278
|
+
"a11y": [
|
|
279
|
+
"Provide DialogTitle for every DialogContent.",
|
|
280
|
+
"Use DialogDescription when title alone does not explain the task.",
|
|
281
|
+
"Keep keyboard focus trapped while open.",
|
|
282
|
+
"Return focus to the trigger after close."
|
|
283
|
+
],
|
|
284
|
+
"composition": [
|
|
285
|
+
"Button",
|
|
286
|
+
"Input",
|
|
287
|
+
"Textarea",
|
|
288
|
+
"Alert",
|
|
289
|
+
"Card"
|
|
290
|
+
],
|
|
291
|
+
"antiPatterns": [
|
|
292
|
+
"Do not use Dialog for long multi-step workflows that need persistent navigation.",
|
|
293
|
+
"Do not nest Dialog inside Dialog unless no simpler flow exists.",
|
|
294
|
+
"Do not use Dialog for passive information that can live inline."
|
|
295
|
+
],
|
|
296
|
+
"agentHints": [
|
|
297
|
+
"Choose Dialog when the user must complete or dismiss a focused task before continuing.",
|
|
298
|
+
"Use AlertDialog for destructive confirmation flows."
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
"drawer": {
|
|
302
|
+
"id": "drawer",
|
|
303
|
+
"name": "Drawer",
|
|
304
|
+
"category": "basic",
|
|
305
|
+
"status": "stable",
|
|
306
|
+
"intent": "Side sheet for contextual settings, details, filters, or secondary tasks that should preserve the underlying page context.",
|
|
307
|
+
"packageImport": "import { Drawer, DrawerTrigger, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, DrawerFooter } from 'sparkdesign'",
|
|
308
|
+
"cliAdd": "npx sparkdesign@latest add drawer",
|
|
309
|
+
"slots": [
|
|
310
|
+
"Drawer",
|
|
311
|
+
"DrawerTrigger",
|
|
312
|
+
"DrawerPortal",
|
|
313
|
+
"DrawerOverlay",
|
|
314
|
+
"DrawerContent",
|
|
315
|
+
"DrawerHeader",
|
|
316
|
+
"DrawerFooter",
|
|
317
|
+
"DrawerTitle",
|
|
318
|
+
"DrawerDescription",
|
|
319
|
+
"DrawerClose"
|
|
320
|
+
],
|
|
321
|
+
"states": [
|
|
322
|
+
"open",
|
|
323
|
+
"closed",
|
|
324
|
+
"focus-trapped",
|
|
325
|
+
"dismissible",
|
|
326
|
+
"side-top",
|
|
327
|
+
"side-right",
|
|
328
|
+
"side-bottom",
|
|
329
|
+
"side-left"
|
|
330
|
+
],
|
|
331
|
+
"a11y": [
|
|
332
|
+
"Provide DrawerTitle for every DrawerContent.",
|
|
333
|
+
"Use DrawerDescription when the title does not fully explain the task.",
|
|
334
|
+
"Keep keyboard focus inside the drawer while open.",
|
|
335
|
+
"Return focus to the trigger after close."
|
|
336
|
+
],
|
|
337
|
+
"composition": [
|
|
338
|
+
"Button",
|
|
339
|
+
"Card",
|
|
340
|
+
"Alert",
|
|
341
|
+
"ChatInput",
|
|
342
|
+
"PermissionCard"
|
|
343
|
+
],
|
|
344
|
+
"antiPatterns": [
|
|
345
|
+
"Do not use Drawer for destructive confirmations that require explicit acknowledgement; use AlertDialog.",
|
|
346
|
+
"Do not use Drawer for primary app navigation unless the product pattern explicitly calls for a side panel.",
|
|
347
|
+
"Do not place long multi-page workflows in a drawer."
|
|
348
|
+
],
|
|
349
|
+
"agentHints": [
|
|
350
|
+
"Choose Drawer when the user should keep page context while editing settings or inspecting details.",
|
|
351
|
+
"Prefer side=right for settings and details; use bottom mainly for compact/mobile task surfaces."
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
"file-review-part": {
|
|
355
|
+
"id": "file-review-part",
|
|
356
|
+
"name": "FileReviewPart",
|
|
357
|
+
"category": "chat",
|
|
358
|
+
"status": "stable",
|
|
359
|
+
"intent": "Structured review surface for files changed, inspected, or proposed by an agent.",
|
|
360
|
+
"packageImport": "import { FileReviewPart } from 'sparkdesign'",
|
|
361
|
+
"cliAdd": "npx sparkdesign@latest add file-review-part",
|
|
362
|
+
"slots": [
|
|
363
|
+
"summary",
|
|
364
|
+
"file list",
|
|
365
|
+
"file icon",
|
|
366
|
+
"status",
|
|
367
|
+
"approve action",
|
|
368
|
+
"request changes action"
|
|
369
|
+
],
|
|
370
|
+
"states": [
|
|
371
|
+
"pending",
|
|
372
|
+
"approved",
|
|
373
|
+
"changes-requested",
|
|
374
|
+
"expanded",
|
|
375
|
+
"collapsed",
|
|
376
|
+
"empty"
|
|
377
|
+
],
|
|
378
|
+
"a11y": [
|
|
379
|
+
"Expose file names as readable text, not only icons.",
|
|
380
|
+
"Keep approval and request-changes actions keyboard reachable.",
|
|
381
|
+
"Do not rely on file icon color as the only file type signal."
|
|
382
|
+
],
|
|
383
|
+
"composition": [
|
|
384
|
+
"Response",
|
|
385
|
+
"ToolInvocationCard",
|
|
386
|
+
"PermissionCard",
|
|
387
|
+
"Button",
|
|
388
|
+
"Alert"
|
|
389
|
+
],
|
|
390
|
+
"antiPatterns": [
|
|
391
|
+
"Do not use FileReviewPart for static file attachments; use FileAttachment or FileCard.",
|
|
392
|
+
"Do not hide risky file changes behind a collapsed-only summary.",
|
|
393
|
+
"Do not use for generic table data."
|
|
394
|
+
],
|
|
395
|
+
"agentHints": [
|
|
396
|
+
"Use when an agent proposes or reviews file changes.",
|
|
397
|
+
"Pair with PermissionCard when applying changes needs explicit approval."
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
"markdown": {
|
|
401
|
+
"id": "markdown",
|
|
402
|
+
"name": "MarkdownBody",
|
|
403
|
+
"category": "chat",
|
|
404
|
+
"status": "stable",
|
|
405
|
+
"intent": "Tokenized Markdown renderer for assistant responses, documentation snippets, math, and structured generated text.",
|
|
406
|
+
"packageImport": "import { MarkdownBody } from 'sparkdesign'",
|
|
407
|
+
"cliAdd": "npx sparkdesign@latest add markdown",
|
|
408
|
+
"slots": [
|
|
409
|
+
"MarkdownBody",
|
|
410
|
+
"paragraph",
|
|
411
|
+
"heading",
|
|
412
|
+
"list",
|
|
413
|
+
"table",
|
|
414
|
+
"code",
|
|
415
|
+
"math"
|
|
416
|
+
],
|
|
417
|
+
"states": [
|
|
418
|
+
"static",
|
|
419
|
+
"rich-content",
|
|
420
|
+
"code-heavy",
|
|
421
|
+
"math-heavy",
|
|
422
|
+
"empty"
|
|
423
|
+
],
|
|
424
|
+
"a11y": [
|
|
425
|
+
"Preserve semantic Markdown structure.",
|
|
426
|
+
"Avoid rendering untrusted HTML.",
|
|
427
|
+
"Ensure tables remain readable on narrow screens."
|
|
428
|
+
],
|
|
429
|
+
"composition": [
|
|
430
|
+
"Response",
|
|
431
|
+
"StreamingMarkdownBlock",
|
|
432
|
+
"CodeBlockPart",
|
|
433
|
+
"Typography"
|
|
434
|
+
],
|
|
435
|
+
"antiPatterns": [
|
|
436
|
+
"Do not use MarkdownBody for arbitrary user-authored HTML.",
|
|
437
|
+
"Do not wrap every short label or UI copy in MarkdownBody."
|
|
438
|
+
],
|
|
439
|
+
"agentHints": [
|
|
440
|
+
"Use MarkdownBody for assistant-generated rich text.",
|
|
441
|
+
"Use plain Typography components for static product copy."
|
|
442
|
+
]
|
|
443
|
+
},
|
|
444
|
+
"permission-card": {
|
|
445
|
+
"id": "permission-card",
|
|
446
|
+
"name": "PermissionCard",
|
|
447
|
+
"category": "chat",
|
|
448
|
+
"status": "stable",
|
|
449
|
+
"intent": "Inline permission request surface for agent actions that need explicit user approval.",
|
|
450
|
+
"packageImport": "import { PermissionCard } from 'sparkdesign'",
|
|
451
|
+
"cliAdd": "npx sparkdesign@latest add permission-card",
|
|
452
|
+
"slots": [
|
|
453
|
+
"title",
|
|
454
|
+
"description",
|
|
455
|
+
"metadata",
|
|
456
|
+
"primary action",
|
|
457
|
+
"secondary action"
|
|
458
|
+
],
|
|
459
|
+
"states": [
|
|
460
|
+
"pending",
|
|
461
|
+
"approved",
|
|
462
|
+
"denied",
|
|
463
|
+
"loading",
|
|
464
|
+
"expired"
|
|
465
|
+
],
|
|
466
|
+
"a11y": [
|
|
467
|
+
"Make the requested permission explicit in text, not only button labels.",
|
|
468
|
+
"Keep approve and deny actions both keyboard reachable.",
|
|
469
|
+
"Use clear status text after the decision changes."
|
|
470
|
+
],
|
|
471
|
+
"composition": [
|
|
472
|
+
"Button",
|
|
473
|
+
"Alert",
|
|
474
|
+
"ToolInvocationCard",
|
|
475
|
+
"ChatInput"
|
|
476
|
+
],
|
|
477
|
+
"antiPatterns": [
|
|
478
|
+
"Do not auto-approve risky tool actions.",
|
|
479
|
+
"Do not hide denial or cancel actions.",
|
|
480
|
+
"Do not use PermissionCard for ordinary form confirmation."
|
|
481
|
+
],
|
|
482
|
+
"agentHints": [
|
|
483
|
+
"Use for file, shell, network, credential, or external side-effect approvals.",
|
|
484
|
+
"Pair with ToolInvocationCard when the approval unlocks a visible tool run."
|
|
485
|
+
]
|
|
486
|
+
},
|
|
487
|
+
"response": {
|
|
488
|
+
"id": "response",
|
|
489
|
+
"name": "Response",
|
|
490
|
+
"category": "chat",
|
|
491
|
+
"status": "stable",
|
|
492
|
+
"intent": "Structured assistant response renderer for answer text, reasoning, tool calls, files, tasks, and generated artifacts.",
|
|
493
|
+
"packageImport": "import { Response } from 'sparkdesign'",
|
|
494
|
+
"cliAdd": "npx sparkdesign@latest add response",
|
|
495
|
+
"slots": [
|
|
496
|
+
"message",
|
|
497
|
+
"round",
|
|
498
|
+
"step",
|
|
499
|
+
"markdown",
|
|
500
|
+
"reasoning",
|
|
501
|
+
"tool invocation",
|
|
502
|
+
"file review",
|
|
503
|
+
"task",
|
|
504
|
+
"plan"
|
|
505
|
+
],
|
|
506
|
+
"states": [
|
|
507
|
+
"streaming",
|
|
508
|
+
"complete",
|
|
509
|
+
"error",
|
|
510
|
+
"empty",
|
|
511
|
+
"tool-running",
|
|
512
|
+
"tool-complete"
|
|
513
|
+
],
|
|
514
|
+
"a11y": [
|
|
515
|
+
"Expose streaming updates without causing excessive announcements.",
|
|
516
|
+
"Keep generated code and tool output keyboard selectable.",
|
|
517
|
+
"Preserve logical order for reasoning, tool, and answer sections."
|
|
518
|
+
],
|
|
519
|
+
"composition": [
|
|
520
|
+
"MarkdownBody",
|
|
521
|
+
"StreamingMarkdownBlock",
|
|
522
|
+
"ReasoningStep",
|
|
523
|
+
"ToolInvocationCard",
|
|
524
|
+
"FileReviewPart",
|
|
525
|
+
"TaskPart",
|
|
526
|
+
"PlanPart",
|
|
527
|
+
"CodeBlockPart"
|
|
528
|
+
],
|
|
529
|
+
"antiPatterns": [
|
|
530
|
+
"Do not use Response for user-authored messages.",
|
|
531
|
+
"Do not flatten tool calls into plain Markdown when structured components exist.",
|
|
532
|
+
"Do not hide error or partial states during long-running agent work."
|
|
533
|
+
],
|
|
534
|
+
"agentHints": [
|
|
535
|
+
"Choose Response as the default output surface for assistant messages.",
|
|
536
|
+
"Use UserMessage for human-authored chat bubbles."
|
|
537
|
+
]
|
|
538
|
+
},
|
|
539
|
+
"tool-invocation-card": {
|
|
540
|
+
"id": "tool-invocation-card",
|
|
541
|
+
"name": "ToolInvocationCard",
|
|
542
|
+
"category": "chat",
|
|
543
|
+
"status": "stable",
|
|
544
|
+
"intent": "Compact disclosure card for agent tool calls, their status, inputs, and outputs.",
|
|
545
|
+
"packageImport": "import { ToolInvocationCard } from 'sparkdesign'",
|
|
546
|
+
"cliAdd": "npx sparkdesign@latest add tool-invocation-card",
|
|
547
|
+
"slots": [
|
|
548
|
+
"tool icon",
|
|
549
|
+
"tool name",
|
|
550
|
+
"status",
|
|
551
|
+
"summary",
|
|
552
|
+
"details",
|
|
553
|
+
"output"
|
|
554
|
+
],
|
|
555
|
+
"states": [
|
|
556
|
+
"queued",
|
|
557
|
+
"running",
|
|
558
|
+
"success",
|
|
559
|
+
"error",
|
|
560
|
+
"cancelled",
|
|
561
|
+
"expanded",
|
|
562
|
+
"collapsed"
|
|
563
|
+
],
|
|
564
|
+
"a11y": [
|
|
565
|
+
"Expose status changes as readable text.",
|
|
566
|
+
"Keep disclosure controls keyboard reachable.",
|
|
567
|
+
"Do not rely on color alone for success or error status."
|
|
568
|
+
],
|
|
569
|
+
"composition": [
|
|
570
|
+
"Response",
|
|
571
|
+
"PermissionCard",
|
|
572
|
+
"CodeBlockPart",
|
|
573
|
+
"TerminalCodeBlockPart",
|
|
574
|
+
"Alert"
|
|
575
|
+
],
|
|
576
|
+
"antiPatterns": [
|
|
577
|
+
"Do not dump large logs directly into the collapsed summary.",
|
|
578
|
+
"Do not mark a tool as successful before its output is available.",
|
|
579
|
+
"Do not use for static documentation sections."
|
|
580
|
+
],
|
|
581
|
+
"agentHints": [
|
|
582
|
+
"Use for shell, browser, file, search, MCP, or external tool activity.",
|
|
583
|
+
"Pair with PermissionCard for actions that need explicit approval."
|
|
584
|
+
]
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
"recipes": {
|
|
588
|
+
"assistant-composer": {
|
|
589
|
+
"id": "assistant-composer",
|
|
590
|
+
"intent": "Build the bottom or inline prompt entry area for an AI assistant.",
|
|
591
|
+
"useWhen": [
|
|
592
|
+
"The user needs to send prompts, files, or instructions to an agent.",
|
|
593
|
+
"The UI needs model/status/action controls around a prompt textarea."
|
|
594
|
+
],
|
|
595
|
+
"components": [
|
|
596
|
+
"chat-input",
|
|
597
|
+
"button",
|
|
598
|
+
"permission-card",
|
|
599
|
+
"alert"
|
|
600
|
+
],
|
|
601
|
+
"layout": [
|
|
602
|
+
"Place ChatInput at the primary interaction point.",
|
|
603
|
+
"Keep secondary actions in ChatInputActionsLeft and submit in ChatInputActionsRight.",
|
|
604
|
+
"Render blocking permission needs above the input, not hidden in a menu."
|
|
605
|
+
],
|
|
606
|
+
"accessibility": [
|
|
607
|
+
"Keyboard users must be able to compose, attach, and submit without pointer input.",
|
|
608
|
+
"Status or permission text must remain readable by assistive technology."
|
|
609
|
+
],
|
|
610
|
+
"antiPatterns": [
|
|
611
|
+
"Do not turn ChatInput into a general settings form.",
|
|
612
|
+
"Do not hide send behind a dropdown."
|
|
613
|
+
]
|
|
614
|
+
},
|
|
615
|
+
"assistant-response-stream": {
|
|
616
|
+
"id": "assistant-response-stream",
|
|
617
|
+
"intent": "Render assistant output with structured reasoning, tools, and generated text.",
|
|
618
|
+
"useWhen": [
|
|
619
|
+
"The UI displays AI-generated answers.",
|
|
620
|
+
"The response may include tool calls, code, files, tasks, plans, or Markdown."
|
|
621
|
+
],
|
|
622
|
+
"components": [
|
|
623
|
+
"response",
|
|
624
|
+
"markdown",
|
|
625
|
+
"tool-invocation-card",
|
|
626
|
+
"permission-card",
|
|
627
|
+
"alert"
|
|
628
|
+
],
|
|
629
|
+
"layout": [
|
|
630
|
+
"Use Response as the parent renderer for assistant output.",
|
|
631
|
+
"Use ToolInvocationCard for each tool step rather than plain text logs.",
|
|
632
|
+
"Use Alert for inline errors that belong to the response."
|
|
633
|
+
],
|
|
634
|
+
"accessibility": [
|
|
635
|
+
"Keep response sections in chronological order.",
|
|
636
|
+
"Avoid excessive live-region announcements during token streaming."
|
|
637
|
+
],
|
|
638
|
+
"antiPatterns": [
|
|
639
|
+
"Do not collapse all structured output into Markdown.",
|
|
640
|
+
"Do not hide failed tool states."
|
|
641
|
+
]
|
|
642
|
+
},
|
|
643
|
+
"focused-task-modal": {
|
|
644
|
+
"id": "focused-task-modal",
|
|
645
|
+
"intent": "Collect or confirm a short, focused task without navigating away.",
|
|
646
|
+
"useWhen": [
|
|
647
|
+
"The user must complete or dismiss a blocking task.",
|
|
648
|
+
"The content fits in a compact modal with a clear title and action row."
|
|
649
|
+
],
|
|
650
|
+
"components": [
|
|
651
|
+
"dialog",
|
|
652
|
+
"button",
|
|
653
|
+
"card",
|
|
654
|
+
"alert"
|
|
655
|
+
],
|
|
656
|
+
"layout": [
|
|
657
|
+
"Use DialogContent with DialogHeader, DialogTitle, optional DialogDescription, and DialogFooter.",
|
|
658
|
+
"Use one primary action and one secondary dismissal action.",
|
|
659
|
+
"Place validation or risk messages inline with Alert."
|
|
660
|
+
],
|
|
661
|
+
"accessibility": [
|
|
662
|
+
"Always provide DialogTitle.",
|
|
663
|
+
"Return focus to the trigger after close.",
|
|
664
|
+
"Do not remove Escape behavior unless there is a clear safety reason."
|
|
665
|
+
],
|
|
666
|
+
"antiPatterns": [
|
|
667
|
+
"Do not use Dialog for long workflows that need persistent navigation.",
|
|
668
|
+
"Do not nest modals."
|
|
669
|
+
]
|
|
670
|
+
},
|
|
671
|
+
"settings-drawer": {
|
|
672
|
+
"id": "settings-drawer",
|
|
673
|
+
"intent": "Expose contextual settings or detail editing while preserving the underlying page.",
|
|
674
|
+
"useWhen": [
|
|
675
|
+
"The user needs to adjust settings without leaving the current workflow.",
|
|
676
|
+
"The task is secondary to the page but benefits from a persistent side surface.",
|
|
677
|
+
"The content fits in a single panel with a clear title and action footer."
|
|
678
|
+
],
|
|
679
|
+
"components": [
|
|
680
|
+
"drawer",
|
|
681
|
+
"button",
|
|
682
|
+
"card",
|
|
683
|
+
"alert"
|
|
684
|
+
],
|
|
685
|
+
"layout": [
|
|
686
|
+
"Use DrawerContent with DrawerHeader, DrawerTitle, optional DrawerDescription, content sections, and DrawerFooter.",
|
|
687
|
+
"Group dense settings inside Card or clear section blocks.",
|
|
688
|
+
"Place save/cancel actions in DrawerFooter and keep the primary action singular."
|
|
689
|
+
],
|
|
690
|
+
"accessibility": [
|
|
691
|
+
"Always provide DrawerTitle.",
|
|
692
|
+
"Keep focus trapped while the drawer is open.",
|
|
693
|
+
"Return focus to DrawerTrigger after close."
|
|
694
|
+
],
|
|
695
|
+
"antiPatterns": [
|
|
696
|
+
"Do not use Drawer for destructive confirmations.",
|
|
697
|
+
"Do not put full application navigation in a contextual settings drawer.",
|
|
698
|
+
"Do not create nested drawers."
|
|
699
|
+
]
|
|
700
|
+
},
|
|
701
|
+
"tool-approval-flow": {
|
|
702
|
+
"id": "tool-approval-flow",
|
|
703
|
+
"intent": "Request explicit user approval before an agent performs a risky or external side-effecting tool action.",
|
|
704
|
+
"useWhen": [
|
|
705
|
+
"The agent wants to run shell, browser, file, network, credential, or external integration actions.",
|
|
706
|
+
"The user must understand and approve the consequence before execution.",
|
|
707
|
+
"The approval unlocks a visible tool run."
|
|
708
|
+
],
|
|
709
|
+
"components": [
|
|
710
|
+
"permission-card",
|
|
711
|
+
"tool-invocation-card",
|
|
712
|
+
"response",
|
|
713
|
+
"button",
|
|
714
|
+
"alert"
|
|
715
|
+
],
|
|
716
|
+
"layout": [
|
|
717
|
+
"Render PermissionCard before the tool starts.",
|
|
718
|
+
"Render ToolInvocationCard after approval to show queued, running, success, or error state.",
|
|
719
|
+
"Use Alert for risks, denials, or failed preconditions."
|
|
720
|
+
],
|
|
721
|
+
"accessibility": [
|
|
722
|
+
"Make approve and deny choices both keyboard reachable.",
|
|
723
|
+
"Expose the requested permission and consequence as readable text.",
|
|
724
|
+
"Do not rely on color alone for risk or status."
|
|
725
|
+
],
|
|
726
|
+
"antiPatterns": [
|
|
727
|
+
"Do not auto-approve risky actions.",
|
|
728
|
+
"Do not hide the deny path.",
|
|
729
|
+
"Do not show a successful tool state before output exists."
|
|
730
|
+
]
|
|
731
|
+
},
|
|
732
|
+
"file-review-flow": {
|
|
733
|
+
"id": "file-review-flow",
|
|
734
|
+
"intent": "Present agent-proposed file changes for review, approval, or requested revisions.",
|
|
735
|
+
"useWhen": [
|
|
736
|
+
"The assistant has inspected, generated, or modified files.",
|
|
737
|
+
"The user needs a concise review surface before accepting changes.",
|
|
738
|
+
"The flow includes file-specific status or approval decisions."
|
|
739
|
+
],
|
|
740
|
+
"components": [
|
|
741
|
+
"file-review-part",
|
|
742
|
+
"permission-card",
|
|
743
|
+
"tool-invocation-card",
|
|
744
|
+
"response",
|
|
745
|
+
"alert"
|
|
746
|
+
],
|
|
747
|
+
"layout": [
|
|
748
|
+
"Use FileReviewPart for the file list and review actions.",
|
|
749
|
+
"Use ToolInvocationCard for the underlying file operation when visible provenance matters.",
|
|
750
|
+
"Use PermissionCard when applying or committing file changes requires approval."
|
|
751
|
+
],
|
|
752
|
+
"accessibility": [
|
|
753
|
+
"Keep file names and review status available as text.",
|
|
754
|
+
"Make approve and request-changes actions keyboard reachable.",
|
|
755
|
+
"Preserve chronological order between tool execution and review result."
|
|
756
|
+
],
|
|
757
|
+
"antiPatterns": [
|
|
758
|
+
"Do not replace file review with a plain Markdown bullet list when actions are needed.",
|
|
759
|
+
"Do not hide changed files in a collapsed-only summary.",
|
|
760
|
+
"Do not use FileReviewPart for unrelated data tables."
|
|
761
|
+
]
|
|
762
|
+
},
|
|
763
|
+
"empty-state-with-prompts": {
|
|
764
|
+
"id": "empty-state-with-prompts",
|
|
765
|
+
"intent": "Help users start an AI or product workflow from an empty state with clear prompts and one primary action.",
|
|
766
|
+
"useWhen": [
|
|
767
|
+
"A page, panel, or chat has no user content yet.",
|
|
768
|
+
"The product should suggest next actions instead of showing a blank surface.",
|
|
769
|
+
"The recommended action can be expressed as a prompt or compact action set."
|
|
770
|
+
],
|
|
771
|
+
"components": [
|
|
772
|
+
"card",
|
|
773
|
+
"button",
|
|
774
|
+
"chat-input",
|
|
775
|
+
"alert"
|
|
776
|
+
],
|
|
777
|
+
"layout": [
|
|
778
|
+
"Use Card for the empty-state container when the state belongs inside a page section.",
|
|
779
|
+
"Use one primary Button for the most important setup action.",
|
|
780
|
+
"Use ChatInput when the best next step is a natural-language prompt."
|
|
781
|
+
],
|
|
782
|
+
"accessibility": [
|
|
783
|
+
"Use a real heading or clear title text.",
|
|
784
|
+
"Ensure prompt suggestions are reachable by keyboard.",
|
|
785
|
+
"Avoid placeholder-only instructions."
|
|
786
|
+
],
|
|
787
|
+
"antiPatterns": [
|
|
788
|
+
"Do not show more than a small set of competing starting actions.",
|
|
789
|
+
"Do not use decorative illustration as the only explanation.",
|
|
790
|
+
"Do not use ChatInput if the flow is a deterministic form task."
|
|
791
|
+
]
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|