sparkdesign 0.4.6 → 0.4.8
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-dialog.tsx +3 -6
- 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 +19 -6
- package/cli/registry/basic/calendar.tsx +221 -0
- package/cli/registry/basic/card.tsx +115 -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 +4 -6
- package/cli/registry/basic/combobox.tsx +133 -0
- package/cli/registry/basic/command.tsx +184 -0
- package/cli/registry/basic/context-menu.tsx +238 -0
- package/cli/registry/basic/data-table.tsx +73 -0
- package/cli/registry/basic/date-picker.tsx +84 -0
- package/cli/registry/basic/dialog.tsx +164 -0
- package/cli/registry/basic/direction.tsx +25 -0
- package/cli/registry/basic/drawer.tsx +162 -0
- package/cli/registry/basic/dropdown-menu.tsx +2 -7
- package/cli/registry/basic/empty.tsx +104 -0
- package/cli/registry/basic/field.tsx +248 -0
- package/cli/registry/basic/hover-card.tsx +57 -0
- package/cli/registry/basic/icon-button.tsx +18 -11
- package/cli/registry/basic/input-group.tsx +168 -0
- package/cli/registry/basic/input-otp.tsx +75 -0
- package/cli/registry/basic/input.tsx +43 -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 +58 -0
- package/cli/registry/basic/scroll-area.tsx +58 -0
- package/cli/registry/basic/select.tsx +24 -3
- package/cli/registry/basic/separator.tsx +26 -0
- package/cli/registry/basic/sheet.tsx +18 -0
- package/cli/registry/basic/spinner.tsx +20 -5
- package/cli/registry/basic/textarea.tsx +43 -0
- package/cli/registry/basic/toggle.tsx +1 -1
- package/cli/registry/basic/tooltip.tsx +2 -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 +600 -15
- 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-dialog.d.ts +1 -1
- package/dist/registry/basic/alert.d.ts +24 -0
- package/dist/registry/basic/aspect-ratio.d.ts +16 -0
- package/dist/registry/basic/avatar.d.ts +1 -1
- 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 +3 -1
- package/dist/registry/basic/calendar.d.ts +22 -0
- package/dist/registry/basic/card.d.ts +32 -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 +37 -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 +27 -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/icon-button.d.ts +2 -1
- package/dist/registry/basic/input-group.d.ts +29 -0
- package/dist/registry/basic/input-otp.d.ts +22 -0
- package/dist/registry/basic/input.d.ts +20 -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/resizable.d.ts +48 -48
- package/dist/registry/basic/scroll-area.d.ts +5 -0
- package/dist/registry/basic/select.d.ts +7 -2
- package/dist/registry/basic/separator.d.ts +16 -0
- package/dist/registry/basic/sheet.d.ts +13 -0
- package/dist/registry/basic/spinner.d.ts +6 -2
- package/dist/registry/basic/tag.d.ts +1 -1
- package/dist/registry/basic/textarea.d.ts +21 -0
- 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/computed.css +11 -0
- package/dist/scale/config.css +11 -0
- package/dist/scale/presets/compact.css +23 -5
- package/dist/scale/presets/dense.css +20 -2
- package/dist/scale/presets/sharp.css +25 -6
- package/dist/scale/presets/soft.css +30 -1
- package/dist/spark-design.cjs.js +37 -33
- package/dist/spark-design.es.js +10324 -8950
- 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 +58 -1
- package/dist/src/lib/index.d.ts +1 -1
- package/dist/src/lib/motion.d.ts +79 -0
- package/dist/theme-base.css +22 -0
- package/dist/themes/dark-mint.css +6 -0
- package/dist/themes/dark-parchment.css +6 -0
- package/dist/themes/light-parchment.css +6 -0
- package/dist/tokens/AGENTS.md +1 -0
- package/dist/tokens/scale/computed.css +11 -0
- package/dist/tokens/scale/config.css +11 -0
- package/dist/tokens/scale/presets/compact.css +23 -5
- package/dist/tokens/scale/presets/dense.css +20 -2
- package/dist/tokens/scale/presets/sharp.css +25 -6
- package/dist/tokens/scale/presets/soft.css +30 -1
- package/dist/tokens/theme-base.css +22 -0
- package/dist/tokens/themes/dark-mint.css +6 -0
- package/dist/tokens/themes/dark-parchment.css +6 -0
- package/dist/tokens/themes/light-parchment.css +6 -0
- 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
package/dist/src/lib/motion.d.ts
CHANGED
|
@@ -20,3 +20,82 @@ export declare const MOTION_SPRING: {
|
|
|
20
20
|
readonly mass: 0.7;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
+
/** Overlay fade (dialog masks, backdrops) */
|
|
24
|
+
export declare const MOTION_FADE: {
|
|
25
|
+
readonly initial: {
|
|
26
|
+
readonly opacity: 0;
|
|
27
|
+
};
|
|
28
|
+
readonly animate: {
|
|
29
|
+
readonly opacity: 1;
|
|
30
|
+
};
|
|
31
|
+
readonly exit: {
|
|
32
|
+
readonly opacity: 0;
|
|
33
|
+
};
|
|
34
|
+
readonly transition: {
|
|
35
|
+
readonly duration: 0.15;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
/** Content slide-up (dialogs, alert-dialogs) */
|
|
39
|
+
export declare const MOTION_SLIDE_UP: {
|
|
40
|
+
readonly initial: {
|
|
41
|
+
readonly opacity: 0;
|
|
42
|
+
readonly y: 8;
|
|
43
|
+
};
|
|
44
|
+
readonly animate: {
|
|
45
|
+
readonly opacity: 1;
|
|
46
|
+
readonly y: 0;
|
|
47
|
+
};
|
|
48
|
+
readonly exit: {
|
|
49
|
+
readonly opacity: 0;
|
|
50
|
+
readonly y: 8;
|
|
51
|
+
};
|
|
52
|
+
readonly transition: {
|
|
53
|
+
readonly duration: 0.2;
|
|
54
|
+
readonly ease: readonly [0.16, 1, 0.3, 1];
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
/** Scale-in (tooltips, popovers, dropdowns, context menus, hover cards) */
|
|
58
|
+
export declare const MOTION_SCALE_IN: {
|
|
59
|
+
readonly initial: {
|
|
60
|
+
readonly opacity: 0;
|
|
61
|
+
readonly scale: 0.96;
|
|
62
|
+
};
|
|
63
|
+
readonly animate: {
|
|
64
|
+
readonly opacity: 1;
|
|
65
|
+
readonly scale: 1;
|
|
66
|
+
};
|
|
67
|
+
readonly exit: {
|
|
68
|
+
readonly opacity: 0;
|
|
69
|
+
readonly scale: 0.96;
|
|
70
|
+
};
|
|
71
|
+
readonly transition: {
|
|
72
|
+
readonly duration: 0.15;
|
|
73
|
+
readonly ease: readonly [0.16, 1, 0.3, 1];
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
/** Expand (collapsible sections, accordion-like reveals) */
|
|
77
|
+
export declare const MOTION_EXPAND: {
|
|
78
|
+
readonly initial: {
|
|
79
|
+
readonly opacity: 0;
|
|
80
|
+
readonly height: 0;
|
|
81
|
+
};
|
|
82
|
+
readonly animate: {
|
|
83
|
+
readonly opacity: 1;
|
|
84
|
+
readonly height: "auto";
|
|
85
|
+
};
|
|
86
|
+
readonly exit: {
|
|
87
|
+
readonly opacity: 0;
|
|
88
|
+
readonly height: 0;
|
|
89
|
+
};
|
|
90
|
+
readonly transition: {
|
|
91
|
+
readonly duration: 0.2;
|
|
92
|
+
readonly ease: readonly [0.2, 0.8, 0.2, 1];
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
/** Check if user prefers reduced motion (SSR-safe) */
|
|
96
|
+
export declare function getReducedMotion(): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Read the --motion-multiplier CSS variable from the DOM (SSR-safe).
|
|
99
|
+
* Presets override this value to make motion faster or slower.
|
|
100
|
+
*/
|
|
101
|
+
export declare function getMotionMultiplier(): number;
|
package/dist/theme-base.css
CHANGED
|
@@ -146,6 +146,14 @@
|
|
|
146
146
|
--color-shadow-tertiary: var(--token-color-shadow-tertiary);
|
|
147
147
|
--color-shadow-quaternary: var(--token-color-shadow-quaternary);
|
|
148
148
|
|
|
149
|
+
/* Elevation — 完整 box-shadow value token,Tailwind shadow-* 类自动消费 */
|
|
150
|
+
--shadow-xs: 0 1px 2px var(--color-shadow-primary);
|
|
151
|
+
--shadow-sm: 0 1px 3px var(--color-shadow-secondary), 0 1px 2px var(--color-shadow-primary);
|
|
152
|
+
--shadow-md: 0 4px 6px var(--color-shadow-secondary), 0 2px 4px var(--color-shadow-primary);
|
|
153
|
+
--shadow-lg: 0 10px 15px var(--color-shadow-tertiary), 0 4px 6px var(--color-shadow-secondary);
|
|
154
|
+
--shadow-xl: 0 20px 25px var(--color-shadow-tertiary), 0 8px 10px var(--color-shadow-secondary);
|
|
155
|
+
--shadow-2xl: 0 25px 50px var(--color-shadow-quaternary);
|
|
156
|
+
|
|
149
157
|
/* Semantic */
|
|
150
158
|
--color-link: var(--token-color-link);
|
|
151
159
|
--color-error: var(--token-color-error);
|
|
@@ -254,6 +262,20 @@
|
|
|
254
262
|
}
|
|
255
263
|
}
|
|
256
264
|
|
|
265
|
+
/* ============================================
|
|
266
|
+
Reduced motion — 全局无障碍
|
|
267
|
+
============================================ */
|
|
268
|
+
@media (prefers-reduced-motion: reduce) {
|
|
269
|
+
*,
|
|
270
|
+
*::before,
|
|
271
|
+
*::after {
|
|
272
|
+
animation-duration: 0.01ms !important;
|
|
273
|
+
animation-iteration-count: 1 !important;
|
|
274
|
+
transition-duration: 0.01ms !important;
|
|
275
|
+
scroll-behavior: auto !important;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
257
279
|
/* ============================================
|
|
258
280
|
Seti 文件图标字体(与 QodeChatPanel 一致;需将 qoder-seti.woff 置于 public/ 或根路径)
|
|
259
281
|
============================================ */
|
|
@@ -51,6 +51,12 @@
|
|
|
51
51
|
--token-color-bg-highlight: #d0d0d0;
|
|
52
52
|
--token-color-bg-highlight-hover: #e0e0e0;
|
|
53
53
|
|
|
54
|
+
/* --- Shadow (暗色需要更强的阴影以在深色背景上可见) --- */
|
|
55
|
+
--token-color-shadow-primary: rgba(0, 0, 0, 0.08);
|
|
56
|
+
--token-color-shadow-secondary: rgba(0, 0, 0, 0.14);
|
|
57
|
+
--token-color-shadow-tertiary: rgba(0, 0, 0, 0.22);
|
|
58
|
+
--token-color-shadow-quaternary: rgba(0, 0, 0, 0.30);
|
|
59
|
+
|
|
54
60
|
/* --- Semantic Colors --- */
|
|
55
61
|
--token-color-link: #8EE5A1;
|
|
56
62
|
--token-color-error: #FF4D4F;
|
|
@@ -51,6 +51,12 @@
|
|
|
51
51
|
--token-color-bg-highlight: #C9C4B8;
|
|
52
52
|
--token-color-bg-highlight-hover: #D4C9BC;
|
|
53
53
|
|
|
54
|
+
/* --- Shadow (暗色羊皮纸,需要更强的阴影) --- */
|
|
55
|
+
--token-color-shadow-primary: rgba(0, 0, 0, 0.08);
|
|
56
|
+
--token-color-shadow-secondary: rgba(0, 0, 0, 0.14);
|
|
57
|
+
--token-color-shadow-tertiary: rgba(0, 0, 0, 0.22);
|
|
58
|
+
--token-color-shadow-quaternary: rgba(0, 0, 0, 0.30);
|
|
59
|
+
|
|
54
60
|
/* --- Semantic Colors --- */
|
|
55
61
|
--token-color-link: #C4B8A8;
|
|
56
62
|
--token-color-error: #FF6B6B;
|
|
@@ -50,6 +50,12 @@
|
|
|
50
50
|
--token-color-bg-highlight: #202116;
|
|
51
51
|
--token-color-bg-highlight-hover: #2D2A22;
|
|
52
52
|
|
|
53
|
+
/* --- Shadow (暖色基底,匹配羊皮纸调性) --- */
|
|
54
|
+
--token-color-shadow-primary: rgba(30, 25, 15, 0.025);
|
|
55
|
+
--token-color-shadow-secondary: rgba(30, 25, 15, 0.045);
|
|
56
|
+
--token-color-shadow-tertiary: rgba(30, 25, 15, 0.07);
|
|
57
|
+
--token-color-shadow-quaternary: rgba(30, 25, 15, 0.09);
|
|
58
|
+
|
|
53
59
|
/* --- Semantic Colors --- */
|
|
54
60
|
--token-color-link: #5B4A3A;
|
|
55
61
|
--token-color-error: #FF4D4F;
|
package/dist/tokens/AGENTS.md
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
| Scale | `scale/`, `scale.css` (legacy) | Layout tokens (`data-style`) via config + computed + presets |
|
|
11
11
|
| Theme bridge | `theme-base.css`, `theme.css` (legacy) | Tailwind `@theme` mappings, shared motion, scrollbar helpers |
|
|
12
12
|
| Color packs | `themes/*.css` | Palette definitions (`--token-color-*`) |
|
|
13
|
+
| Agent ontology | `registry/tokens/ontology.json` | Machine-readable token intent, usage, and forbidden patterns |
|
|
13
14
|
| Utilities | `scrollbar-utility.css` | Scrollbar styling helpers |
|
|
14
15
|
|
|
15
16
|
---
|
|
@@ -100,4 +100,15 @@
|
|
|
100
100
|
--motion-ease-standard: var(--config-motion-ease-standard);
|
|
101
101
|
--motion-ease-emphasized: var(--config-motion-ease-emphasized);
|
|
102
102
|
--motion-ease-out: var(--config-motion-ease-out);
|
|
103
|
+
|
|
104
|
+
/* ============================================
|
|
105
|
+
Motion Multiplier (从配置映射)
|
|
106
|
+
============================================ */
|
|
107
|
+
--motion-multiplier: var(--config-motion-multiplier);
|
|
108
|
+
|
|
109
|
+
/* ============================================
|
|
110
|
+
Border Width (从配置映射)
|
|
111
|
+
============================================ */
|
|
112
|
+
--border-width: var(--config-border-width);
|
|
113
|
+
--border-width-thick: var(--config-border-width-thick);
|
|
103
114
|
}
|
|
@@ -102,6 +102,17 @@
|
|
|
102
102
|
--config-motion-ease-emphasized: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
103
103
|
--config-motion-ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
104
104
|
|
|
105
|
+
/* ============================================
|
|
106
|
+
Motion Multiplier (preset 可覆盖,<1 更快,>1 更慢)
|
|
107
|
+
============================================ */
|
|
108
|
+
--config-motion-multiplier: 1;
|
|
109
|
+
|
|
110
|
+
/* ============================================
|
|
111
|
+
Border Width 配置
|
|
112
|
+
============================================ */
|
|
113
|
+
--config-border-width: 1px;
|
|
114
|
+
--config-border-width-thick: 2px;
|
|
115
|
+
|
|
105
116
|
/* ============================================
|
|
106
117
|
Font Family 配置
|
|
107
118
|
============================================ */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* ============================================
|
|
2
2
|
* Preset: Compact - 紧凑风格
|
|
3
|
-
*
|
|
3
|
+
* 小幅压缩控件节奏,适合效率型工作台
|
|
4
4
|
* ============================================ */
|
|
5
5
|
|
|
6
6
|
[data-style="compact"] {
|
|
@@ -15,16 +15,34 @@
|
|
|
15
15
|
--radius-2xl: 12px;
|
|
16
16
|
--radius-3xl: 16px;
|
|
17
17
|
|
|
18
|
-
/* Font Size (
|
|
19
|
-
--font-size-
|
|
20
|
-
--font-size-
|
|
21
|
-
--font-size-
|
|
18
|
+
/* Font Size (略小但保持阅读舒适) */
|
|
19
|
+
--font-size-xs: 12px;
|
|
20
|
+
--font-size-xs--line-height: 16px;
|
|
21
|
+
--font-size-sm: 13px;
|
|
22
|
+
--font-size-sm--line-height: 18px;
|
|
23
|
+
--font-size-base: 14px;
|
|
24
|
+
--font-size-base--line-height: 20px;
|
|
25
|
+
--font-size-lg: 15px;
|
|
26
|
+
--font-size-lg--line-height: 22px;
|
|
27
|
+
--font-size-xl: 17px;
|
|
28
|
+
--font-size-xl--line-height: 24px;
|
|
22
29
|
--font-size-2xl: 18px;
|
|
30
|
+
--font-size-2xl--line-height: 24px;
|
|
23
31
|
--font-size-3xl: 22px;
|
|
32
|
+
--font-size-3xl--line-height: 28px;
|
|
24
33
|
--font-size-4xl: 28px;
|
|
34
|
+
--font-size-4xl--line-height: 32px;
|
|
25
35
|
--font-size-5xl: 34px;
|
|
36
|
+
--font-size-5xl--line-height: 36px;
|
|
26
37
|
--font-size-6xl: 44px;
|
|
27
38
|
--font-size-7xl: 56px;
|
|
28
39
|
--font-size-8xl: 64px;
|
|
29
40
|
--font-size-9xl: 88px;
|
|
41
|
+
|
|
42
|
+
/* Motion (略快) */
|
|
43
|
+
--motion-multiplier: 0.9;
|
|
44
|
+
|
|
45
|
+
/* Border */
|
|
46
|
+
--border-width: 1px;
|
|
47
|
+
--border-width-thick: 1px;
|
|
30
48
|
}
|
|
@@ -49,16 +49,34 @@
|
|
|
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;
|
|
63
74
|
--font-size-9xl: 72px;
|
|
75
|
+
|
|
76
|
+
/* Motion (快速) */
|
|
77
|
+
--motion-multiplier: 0.8;
|
|
78
|
+
|
|
79
|
+
/* Border (极细) */
|
|
80
|
+
--border-width: 1px;
|
|
81
|
+
--border-width-thick: 1px;
|
|
64
82
|
}
|
|
@@ -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,16 +27,33 @@
|
|
|
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;
|
|
38
50
|
--font-size-8xl: 64px;
|
|
39
51
|
--font-size-9xl: 88px;
|
|
52
|
+
|
|
53
|
+
/* Motion (机械精准,最快) */
|
|
54
|
+
--motion-multiplier: 0.75;
|
|
55
|
+
|
|
56
|
+
/* Border (几何硬边) */
|
|
57
|
+
--border-width: 1px;
|
|
58
|
+
--border-width-thick: 2px;
|
|
40
59
|
}
|
|
@@ -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,23 @@
|
|
|
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;
|
|
38
|
+
|
|
39
|
+
/* Motion (更舒缓) */
|
|
40
|
+
--motion-multiplier: 1.3;
|
|
41
|
+
|
|
42
|
+
/* Border (无边框面,靠阴影区分层级) */
|
|
43
|
+
--border-width: 0px;
|
|
44
|
+
--border-width-thick: 1px;
|
|
16
45
|
}
|
|
@@ -146,6 +146,14 @@
|
|
|
146
146
|
--color-shadow-tertiary: var(--token-color-shadow-tertiary);
|
|
147
147
|
--color-shadow-quaternary: var(--token-color-shadow-quaternary);
|
|
148
148
|
|
|
149
|
+
/* Elevation — 完整 box-shadow value token,Tailwind shadow-* 类自动消费 */
|
|
150
|
+
--shadow-xs: 0 1px 2px var(--color-shadow-primary);
|
|
151
|
+
--shadow-sm: 0 1px 3px var(--color-shadow-secondary), 0 1px 2px var(--color-shadow-primary);
|
|
152
|
+
--shadow-md: 0 4px 6px var(--color-shadow-secondary), 0 2px 4px var(--color-shadow-primary);
|
|
153
|
+
--shadow-lg: 0 10px 15px var(--color-shadow-tertiary), 0 4px 6px var(--color-shadow-secondary);
|
|
154
|
+
--shadow-xl: 0 20px 25px var(--color-shadow-tertiary), 0 8px 10px var(--color-shadow-secondary);
|
|
155
|
+
--shadow-2xl: 0 25px 50px var(--color-shadow-quaternary);
|
|
156
|
+
|
|
149
157
|
/* Semantic */
|
|
150
158
|
--color-link: var(--token-color-link);
|
|
151
159
|
--color-error: var(--token-color-error);
|
|
@@ -254,6 +262,20 @@
|
|
|
254
262
|
}
|
|
255
263
|
}
|
|
256
264
|
|
|
265
|
+
/* ============================================
|
|
266
|
+
Reduced motion — 全局无障碍
|
|
267
|
+
============================================ */
|
|
268
|
+
@media (prefers-reduced-motion: reduce) {
|
|
269
|
+
*,
|
|
270
|
+
*::before,
|
|
271
|
+
*::after {
|
|
272
|
+
animation-duration: 0.01ms !important;
|
|
273
|
+
animation-iteration-count: 1 !important;
|
|
274
|
+
transition-duration: 0.01ms !important;
|
|
275
|
+
scroll-behavior: auto !important;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
257
279
|
/* ============================================
|
|
258
280
|
Seti 文件图标字体(与 QodeChatPanel 一致;需将 qoder-seti.woff 置于 public/ 或根路径)
|
|
259
281
|
============================================ */
|
|
@@ -51,6 +51,12 @@
|
|
|
51
51
|
--token-color-bg-highlight: #d0d0d0;
|
|
52
52
|
--token-color-bg-highlight-hover: #e0e0e0;
|
|
53
53
|
|
|
54
|
+
/* --- Shadow (暗色需要更强的阴影以在深色背景上可见) --- */
|
|
55
|
+
--token-color-shadow-primary: rgba(0, 0, 0, 0.08);
|
|
56
|
+
--token-color-shadow-secondary: rgba(0, 0, 0, 0.14);
|
|
57
|
+
--token-color-shadow-tertiary: rgba(0, 0, 0, 0.22);
|
|
58
|
+
--token-color-shadow-quaternary: rgba(0, 0, 0, 0.30);
|
|
59
|
+
|
|
54
60
|
/* --- Semantic Colors --- */
|
|
55
61
|
--token-color-link: #8EE5A1;
|
|
56
62
|
--token-color-error: #FF4D4F;
|
|
@@ -51,6 +51,12 @@
|
|
|
51
51
|
--token-color-bg-highlight: #C9C4B8;
|
|
52
52
|
--token-color-bg-highlight-hover: #D4C9BC;
|
|
53
53
|
|
|
54
|
+
/* --- Shadow (暗色羊皮纸,需要更强的阴影) --- */
|
|
55
|
+
--token-color-shadow-primary: rgba(0, 0, 0, 0.08);
|
|
56
|
+
--token-color-shadow-secondary: rgba(0, 0, 0, 0.14);
|
|
57
|
+
--token-color-shadow-tertiary: rgba(0, 0, 0, 0.22);
|
|
58
|
+
--token-color-shadow-quaternary: rgba(0, 0, 0, 0.30);
|
|
59
|
+
|
|
54
60
|
/* --- Semantic Colors --- */
|
|
55
61
|
--token-color-link: #C4B8A8;
|
|
56
62
|
--token-color-error: #FF6B6B;
|
|
@@ -50,6 +50,12 @@
|
|
|
50
50
|
--token-color-bg-highlight: #202116;
|
|
51
51
|
--token-color-bg-highlight-hover: #2D2A22;
|
|
52
52
|
|
|
53
|
+
/* --- Shadow (暖色基底,匹配羊皮纸调性) --- */
|
|
54
|
+
--token-color-shadow-primary: rgba(30, 25, 15, 0.025);
|
|
55
|
+
--token-color-shadow-secondary: rgba(30, 25, 15, 0.045);
|
|
56
|
+
--token-color-shadow-tertiary: rgba(30, 25, 15, 0.07);
|
|
57
|
+
--token-color-shadow-quaternary: rgba(30, 25, 15, 0.09);
|
|
58
|
+
|
|
53
59
|
/* --- Semantic Colors --- */
|
|
54
60
|
--token-color-link: #5B4A3A;
|
|
55
61
|
--token-color-error: #FF4D4F;
|
|
@@ -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.8",
|
|
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",
|