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
|
@@ -49,14 +49,25 @@
|
|
|
49
49
|
/* ChatInput 特殊配置 */
|
|
50
50
|
--chat-status-overlap: 4px;
|
|
51
51
|
|
|
52
|
-
/* Font Size (
|
|
53
|
-
--font-size-
|
|
52
|
+
/* Font Size (信息密集:主力 text-sm 也压缩) */
|
|
53
|
+
--font-size-xs: 11px;
|
|
54
|
+
--font-size-xs--line-height: 14px;
|
|
55
|
+
--font-size-sm: 12px;
|
|
56
|
+
--font-size-sm--line-height: 16px;
|
|
57
|
+
--font-size-base: 13px;
|
|
58
|
+
--font-size-base--line-height: 18px;
|
|
54
59
|
--font-size-lg: 14px;
|
|
60
|
+
--font-size-lg--line-height: 20px;
|
|
55
61
|
--font-size-xl: 14px;
|
|
62
|
+
--font-size-xl--line-height: 20px;
|
|
56
63
|
--font-size-2xl: 16px;
|
|
64
|
+
--font-size-2xl--line-height: 22px;
|
|
57
65
|
--font-size-3xl: 18px;
|
|
66
|
+
--font-size-3xl--line-height: 24px;
|
|
58
67
|
--font-size-4xl: 22px;
|
|
68
|
+
--font-size-4xl--line-height: 28px;
|
|
59
69
|
--font-size-5xl: 28px;
|
|
70
|
+
--font-size-5xl--line-height: 32px;
|
|
60
71
|
--font-size-6xl: 36px;
|
|
61
72
|
--font-size-7xl: 44px;
|
|
62
73
|
--font-size-8xl: 56px;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/* ============================================
|
|
2
2
|
* Preset: Sharp - 锐利风格
|
|
3
|
-
* 几何精度,无圆角 + 等宽字体
|
|
3
|
+
* 几何精度,无圆角 + 等宽字体 + 硬朗节奏
|
|
4
4
|
* ============================================ */
|
|
5
5
|
|
|
6
6
|
[data-style="sharp"] {
|
|
7
|
-
/* Spacing (
|
|
7
|
+
/* Spacing (方正、克制,少量压缩) */
|
|
8
8
|
--spacing-3: 10px;
|
|
9
9
|
--spacing-4: 14px;
|
|
10
|
+
--spacing-5: 18px;
|
|
11
|
+
--spacing-6: 22px;
|
|
10
12
|
--spacing-9: 32px;
|
|
11
13
|
--spacing-11: 40px;
|
|
12
14
|
|
|
@@ -25,13 +27,23 @@
|
|
|
25
27
|
--font-sans: var(--config-font-mono);
|
|
26
28
|
font-family: var(--font-sans);
|
|
27
29
|
|
|
28
|
-
/* Font Size (
|
|
29
|
-
--font-size-
|
|
30
|
-
--font-size-
|
|
31
|
-
--font-size-
|
|
30
|
+
/* Font Size (工程感:略紧、等宽、层级清楚) */
|
|
31
|
+
--font-size-xs: 12px;
|
|
32
|
+
--font-size-xs--line-height: 16px;
|
|
33
|
+
--font-size-sm: 13px;
|
|
34
|
+
--font-size-sm--line-height: 18px;
|
|
35
|
+
--font-size-base: 14px;
|
|
36
|
+
--font-size-base--line-height: 20px;
|
|
37
|
+
--font-size-lg: 15px;
|
|
38
|
+
--font-size-lg--line-height: 22px;
|
|
39
|
+
--font-size-xl: 17px;
|
|
40
|
+
--font-size-xl--line-height: 24px;
|
|
32
41
|
--font-size-2xl: 18px;
|
|
42
|
+
--font-size-2xl--line-height: 24px;
|
|
33
43
|
--font-size-3xl: 22px;
|
|
44
|
+
--font-size-3xl--line-height: 28px;
|
|
34
45
|
--font-size-4xl: 28px;
|
|
46
|
+
--font-size-4xl--line-height: 32px;
|
|
35
47
|
--font-size-5xl: 34px;
|
|
36
48
|
--font-size-6xl: 44px;
|
|
37
49
|
--font-size-7xl: 56px;
|
|
@@ -4,7 +4,17 @@
|
|
|
4
4
|
* ============================================ */
|
|
5
5
|
|
|
6
6
|
[data-style="soft"] {
|
|
7
|
-
/*
|
|
7
|
+
/* Spacing (舒展留白) */
|
|
8
|
+
--spacing-3: 14px;
|
|
9
|
+
--spacing-4: 18px;
|
|
10
|
+
--spacing-5: 24px;
|
|
11
|
+
--spacing-6: 28px;
|
|
12
|
+
--spacing-8: 36px;
|
|
13
|
+
--spacing-9: 40px;
|
|
14
|
+
--spacing-11: 48px;
|
|
15
|
+
--spacing-12: 56px;
|
|
16
|
+
|
|
17
|
+
/* Radius (大圆角) */
|
|
8
18
|
--radius-sm: 8px;
|
|
9
19
|
--radius-DEFAULT: 12px;
|
|
10
20
|
--radius-md: 12px;
|
|
@@ -13,4 +23,16 @@
|
|
|
13
23
|
--radius-2xl: 24px;
|
|
14
24
|
--radius-3xl: 28px;
|
|
15
25
|
--radius: var(--radius-DEFAULT);
|
|
26
|
+
|
|
27
|
+
/* Font Size (阅读舒适,行高更松) */
|
|
28
|
+
--font-size-sm: 14px;
|
|
29
|
+
--font-size-sm--line-height: 22px;
|
|
30
|
+
--font-size-base: 15px;
|
|
31
|
+
--font-size-base--line-height: 24px;
|
|
32
|
+
--font-size-lg: 17px;
|
|
33
|
+
--font-size-lg--line-height: 26px;
|
|
34
|
+
--font-size-xl: 20px;
|
|
35
|
+
--font-size-xl--line-height: 28px;
|
|
36
|
+
--font-size-2xl: 22px;
|
|
37
|
+
--font-size-2xl--line-height: 30px;
|
|
16
38
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Agent Component Selection
|
|
2
|
+
|
|
3
|
+
This guide is the human-readable companion to `registry/agent-manifest.json`.
|
|
4
|
+
Agents should read the manifest first, then source files only when implementation
|
|
5
|
+
details are needed.
|
|
6
|
+
|
|
7
|
+
## Entry Points
|
|
8
|
+
|
|
9
|
+
- `sparkdesign/agent-manifest.json` — package export for agent-facing component semantics.
|
|
10
|
+
- `registry/agent-manifest.json` — source of truth in this repository.
|
|
11
|
+
- `npm run check:agent-manifest` — validates required semantic fields and recipe references.
|
|
12
|
+
|
|
13
|
+
## Decision Order
|
|
14
|
+
|
|
15
|
+
1. Choose by `intent`, not by component name similarity.
|
|
16
|
+
2. Check `antiPatterns` before composing a component into a generated screen.
|
|
17
|
+
3. Prefer `recipes` for common agent workflows before inventing a new layout.
|
|
18
|
+
4. Use `cliAdd` when the target app should own copied component source.
|
|
19
|
+
5. Use `packageImport` only when the app already consumes `sparkdesign` as a package.
|
|
20
|
+
|
|
21
|
+
## Current High-Confidence Coverage
|
|
22
|
+
|
|
23
|
+
The first manifest version covers the components most likely to be selected by
|
|
24
|
+
design/coding agents:
|
|
25
|
+
|
|
26
|
+
- `button`
|
|
27
|
+
- `alert`
|
|
28
|
+
- `card`
|
|
29
|
+
- `dialog`
|
|
30
|
+
- `drawer`
|
|
31
|
+
- `file-review-part`
|
|
32
|
+
- `chat-input`
|
|
33
|
+
- `response`
|
|
34
|
+
- `markdown`
|
|
35
|
+
- `permission-card`
|
|
36
|
+
- `tool-invocation-card`
|
|
37
|
+
|
|
38
|
+
## Recipe Usage
|
|
39
|
+
|
|
40
|
+
Recipes are intended to prevent agents from flattening rich AI interfaces into
|
|
41
|
+
generic cards and Markdown.
|
|
42
|
+
|
|
43
|
+
- `assistant-composer` — prompt entry, attachments, send, and permissions.
|
|
44
|
+
- `assistant-response-stream` — generated answer, tools, Markdown, and errors.
|
|
45
|
+
- `focused-task-modal` — compact blocking task or confirmation flow.
|
|
46
|
+
- `settings-drawer` — contextual settings/details while preserving page context.
|
|
47
|
+
- `tool-approval-flow` — explicit approval before risky agent tool actions.
|
|
48
|
+
- `file-review-flow` — agent file changes, review decisions, and approval.
|
|
49
|
+
- `empty-state-with-prompts` — empty states that guide users into AI workflows.
|
|
50
|
+
|
|
51
|
+
## Maintenance Rule
|
|
52
|
+
|
|
53
|
+
When adding a component to the manifest:
|
|
54
|
+
|
|
55
|
+
1. Confirm the component exists in `registry/meta.json`.
|
|
56
|
+
2. Fill `intent`, `slots`, `states`, `a11y`, `composition`, `antiPatterns`, and `agentHints`.
|
|
57
|
+
3. Ensure `packageImport` uses names exported by `src/components/index.ts`.
|
|
58
|
+
4. Ensure `cliAdd` installs the same component id as the manifest key.
|
|
59
|
+
5. Add or update recipes if the component changes how agents should compose screens.
|
|
60
|
+
6. Run `npm run check:agent-manifest`.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Agent Token Ontology
|
|
2
|
+
|
|
3
|
+
`registry/tokens/ontology.json` is the machine-readable companion to Spark
|
|
4
|
+
Design token CSS. It explains what token families mean, where agents should use
|
|
5
|
+
them, and which patterns are forbidden.
|
|
6
|
+
|
|
7
|
+
## Package Entry
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import ontology from 'sparkdesign/token-ontology.json'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Use this before inventing custom colors, spacing, radii, or motion values.
|
|
14
|
+
|
|
15
|
+
## Selection Order
|
|
16
|
+
|
|
17
|
+
1. Pick the correct axis: `data-theme` for color, `data-style` for layout rhythm.
|
|
18
|
+
2. Pick a token family by intent, not by visual resemblance.
|
|
19
|
+
3. Check `avoidFor` and `agentRules` before using a family.
|
|
20
|
+
4. Use existing semantic utilities or `var(--token-name)` bindings.
|
|
21
|
+
5. Do not hard-code hex, raw rgba overlays, arbitrary radii, or one-off spacing.
|
|
22
|
+
|
|
23
|
+
## Agent Defaults
|
|
24
|
+
|
|
25
|
+
- Use `data-theme="light"` and `data-style="neutral"` when no preference is known.
|
|
26
|
+
- Use `compact` or `dense` only for data-heavy surfaces.
|
|
27
|
+
- Use `soft` for airy onboarding or approachable product surfaces.
|
|
28
|
+
- Use `sharp` only when square geometry is an explicit visual direction.
|
|
29
|
+
- Use semantic color families for status; do not repurpose accent colors for errors or warnings.
|
|
30
|
+
|
|
31
|
+
## Maintenance
|
|
32
|
+
|
|
33
|
+
When token CSS changes the public semantic surface:
|
|
34
|
+
|
|
35
|
+
1. Update `registry/tokens/ontology.json`.
|
|
36
|
+
2. Run `npm run check:token-ontology`.
|
|
37
|
+
3. Update this document if the agent decision model changes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sparkdesign",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Modern React Design System with dual-dimension theme system",
|
|
6
6
|
"keywords": [
|
|
@@ -30,14 +30,20 @@
|
|
|
30
30
|
"./scale.css": "./dist/scale.css",
|
|
31
31
|
"./katex.css": "./dist/katex.css",
|
|
32
32
|
"./theme-base.css": "./dist/theme-base.css",
|
|
33
|
+
"./agent-manifest.json": "./registry/agent-manifest.json",
|
|
34
|
+
"./token-ontology.json": "./registry/tokens/ontology.json",
|
|
33
35
|
"./tokens/*": "./dist/tokens/*",
|
|
34
36
|
"./themes/*": "./dist/themes/*",
|
|
35
37
|
"./scale/*": "./dist/scale/*"
|
|
36
38
|
},
|
|
37
39
|
"files": [
|
|
40
|
+
"AI_README.md",
|
|
38
41
|
"dist",
|
|
39
42
|
"cli/dist",
|
|
40
|
-
"cli/registry"
|
|
43
|
+
"cli/registry",
|
|
44
|
+
"docs/agent",
|
|
45
|
+
"registry/agent-manifest.json",
|
|
46
|
+
"registry/tokens/ontology.json"
|
|
41
47
|
],
|
|
42
48
|
"sideEffects": [
|
|
43
49
|
"*.css",
|
|
@@ -49,9 +55,12 @@
|
|
|
49
55
|
"i18n:p3-en": "node scripts/translate-p3-headers-en.mjs",
|
|
50
56
|
"gen:registry-meta": "node scripts/generate-registry-meta.mjs",
|
|
51
57
|
"check:registry-meta": "node scripts/generate-registry-meta.mjs --check && node scripts/validate-registry-meta.mjs registry && node scripts/validate-registry-meta.mjs cli",
|
|
58
|
+
"check:agent-manifest": "node scripts/validate-agent-manifest.mjs",
|
|
59
|
+
"check:token-ontology": "node scripts/validate-token-ontology.mjs",
|
|
60
|
+
"check:token-antipatterns": "node scripts/check-token-antipatterns.mjs",
|
|
52
61
|
"check:registry": "node scripts/check-registry-sync.mjs",
|
|
53
|
-
|
|
54
|
-
|
|
62
|
+
"check:showcase": "node scripts/check-showcase-sync.mjs",
|
|
63
|
+
"gen:demo": "node scripts/gen-demo.mjs",
|
|
55
64
|
"build": "vite build && npx @tailwindcss/cli -i src/lib.css -o dist/sparkdesign.css --minify && tsc -p tsconfig.lib.json && npm run build:cli",
|
|
56
65
|
"build:cli": "cd cli && npm run build",
|
|
57
66
|
"build:css": "npx @tailwindcss/cli -i src/lib.css -o dist/sparkdesign.css --minify",
|
|
@@ -70,7 +79,7 @@
|
|
|
70
79
|
"test:smoke:vite": "node scripts/smoke-test-cli.mjs vite",
|
|
71
80
|
"test:smoke:next": "node scripts/smoke-test-cli.mjs nextjs",
|
|
72
81
|
"test:smoke:add": "node scripts/smoke-test-cli.mjs pure-add",
|
|
73
|
-
"prepublishOnly": "node scripts/generate-registry-meta.mjs && npm run build && node scripts/sync-registry-to-cli.mjs && npm run check:registry-meta"
|
|
82
|
+
"prepublishOnly": "node scripts/generate-registry-meta.mjs && npm run check:agent-manifest && npm run check:token-ontology && npm run check:token-antipatterns && npm run build && node scripts/sync-registry-to-cli.mjs && npm run check:registry-meta"
|
|
74
83
|
},
|
|
75
84
|
"peerDependencies": {
|
|
76
85
|
"react": ">=18.0.0",
|
|
@@ -82,12 +91,20 @@
|
|
|
82
91
|
"dependencies": {
|
|
83
92
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
84
93
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
94
|
+
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
85
95
|
"@radix-ui/react-avatar": "^1.1.11",
|
|
96
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
86
97
|
"@radix-ui/react-collapsible": "^1.1.12",
|
|
98
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
99
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
87
100
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
101
|
+
"@radix-ui/react-hover-card": "^1.1.15",
|
|
102
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
103
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
88
104
|
"@radix-ui/react-progress": "^1.1.8",
|
|
89
105
|
"@radix-ui/react-radio-group": "^1.3.8",
|
|
90
106
|
"@radix-ui/react-select": "^2.2.6",
|
|
107
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
91
108
|
"@radix-ui/react-slider": "^1.3.6",
|
|
92
109
|
"@radix-ui/react-switch": "^1.2.6",
|
|
93
110
|
"@radix-ui/react-tabs": "^1.1.2",
|
|
@@ -98,20 +115,27 @@
|
|
|
98
115
|
"chalk": "^5.3.0",
|
|
99
116
|
"class-variance-authority": "^0.7.1",
|
|
100
117
|
"clsx": "^2.1.1",
|
|
118
|
+
"cmdk": "^1.1.1",
|
|
101
119
|
"commander": "^12.1.0",
|
|
102
120
|
"diff": "^7.0.0",
|
|
121
|
+
"embla-carousel-react": "^8.6.0",
|
|
103
122
|
"execa": "^9.5.2",
|
|
104
123
|
"framer-motion": "^12.34.0",
|
|
105
124
|
"fs-extra": "^11.2.0",
|
|
106
125
|
"i18next": "^25.8.7",
|
|
126
|
+
"input-otp": "^1.4.2",
|
|
107
127
|
"katex": "^0.16.28",
|
|
108
128
|
"lottie-react": "^2.4.1",
|
|
129
|
+
"lucide-react": "^1.8.0",
|
|
109
130
|
"ora": "^8.1.1",
|
|
110
131
|
"prism-react-renderer": "^2.4.1",
|
|
111
132
|
"prompts": "^2.4.2",
|
|
133
|
+
"radix-ui": "^1.4.3",
|
|
134
|
+
"react-day-picker": "^9.14.0",
|
|
112
135
|
"react-i18next": "^16.5.4",
|
|
113
136
|
"react-markdown": "^10.1.0",
|
|
114
137
|
"react-resizable-panels": "^4.6.2",
|
|
138
|
+
"recharts": "^3.8.1",
|
|
115
139
|
"rehype-katex": "^7.0.1",
|
|
116
140
|
"remark-gfm": "^4.0.1",
|
|
117
141
|
"remark-math": "^6.0.0",
|
|
@@ -128,6 +152,8 @@
|
|
|
128
152
|
"@size-limit/file": "^12.0.0",
|
|
129
153
|
"@tailwindcss/cli": "^4.1.18",
|
|
130
154
|
"@tailwindcss/vite": "^4.1.18",
|
|
155
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
156
|
+
"@testing-library/react": "^16.3.2",
|
|
131
157
|
"@types/node": "^24.10.13",
|
|
132
158
|
"@types/react": "^19.2.7",
|
|
133
159
|
"@types/react-dom": "^19.2.3",
|