sdtk-design-kit 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -9
- package/package.json +1 -1
- package/src/commands/handoff.js +83 -8
- package/src/commands/help.js +17 -6
- package/src/commands/prototype.js +503 -0
- package/src/commands/review.js +56 -4
- package/src/commands/start.js +97 -11
- package/src/commands/status.js +42 -2
- package/src/commands/system.js +49 -19
- package/src/index.js +4 -0
- package/src/lib/design-input-contract.js +423 -0
- package/src/lib/design-paths.js +9 -0
- package/src/lib/design-profiles.js +58 -0
- package/src/lib/domain-profile.js +108 -0
- package/src/lib/style-presets.js +150 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const { ValidationError } = require("./errors");
|
|
4
|
+
|
|
5
|
+
const DEFAULT_STYLE = "minimal-saas";
|
|
6
|
+
|
|
7
|
+
const STYLE_PRESETS = {
|
|
8
|
+
"minimal-saas": {
|
|
9
|
+
label: "Minimal SaaS",
|
|
10
|
+
summary: "Clean solo-founder SaaS default with practical hierarchy, quiet surfaces, and low-decoration components.",
|
|
11
|
+
typography: [
|
|
12
|
+
"Use system UI, Segoe UI, Roboto, Helvetica, Arial, sans-serif.",
|
|
13
|
+
"Use a clear 32/24/18/15/13px hierarchy for page, section, card, body, and label text.",
|
|
14
|
+
"Keep letter spacing at 0 except optional uppercase micro-labels at 0.04em.",
|
|
15
|
+
],
|
|
16
|
+
colors: [
|
|
17
|
+
"`color-bg`: #F7F8FA for the application background.",
|
|
18
|
+
"`color-surface`: #FFFFFF for panels, forms, and lists.",
|
|
19
|
+
"`color-text`: #1F2933 for primary text.",
|
|
20
|
+
"`color-muted`: #667085 for secondary text.",
|
|
21
|
+
"`color-primary`: #2563EB for the main CTA and selected states.",
|
|
22
|
+
"`color-success`: #0F8A5F, `color-warning`: #B7791F, `color-danger`: #B42318.",
|
|
23
|
+
"`color-border`: #D9DEE7 for quiet dividers and input borders.",
|
|
24
|
+
],
|
|
25
|
+
surface: "Use white cards on a soft gray page. Prefer borders over shadows and keep radius at 8px or less.",
|
|
26
|
+
density: "Use medium density: 16px form/list gaps, 24px section gaps, and compact repeated cards.",
|
|
27
|
+
cta: "One filled primary CTA per screen; secondary actions should be outlined or text-only.",
|
|
28
|
+
dashboard: "Use 3-4 summary cards, a simple list/table, status pills with text, and an obvious empty state.",
|
|
29
|
+
mobile: "Collapse grids to one column under 760px and keep controls at least 44px tall.",
|
|
30
|
+
accessibility: "Prioritize contrast, visible focus, labeled inputs, and text labels for status.",
|
|
31
|
+
components: [
|
|
32
|
+
"Metric card: label, value, short delta.",
|
|
33
|
+
"Lead card/table row: status, name, next action, note metadata.",
|
|
34
|
+
"Form row: label, input, helper or inline error.",
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
"premium-dashboard": {
|
|
38
|
+
label: "Premium Dashboard",
|
|
39
|
+
summary: "Dashboard-first MVP style with stronger density, metrics, cards, tables, and command surfaces.",
|
|
40
|
+
typography: [
|
|
41
|
+
"Use Inter-like system sans with tabular numerals for metrics.",
|
|
42
|
+
"Use a 34/24/18/14/12px hierarchy with heavier labels and compact metadata.",
|
|
43
|
+
"Reserve monospace only for technical IDs, timestamps, or compact metric labels.",
|
|
44
|
+
],
|
|
45
|
+
colors: [
|
|
46
|
+
"`color-bg`: #0B1020 for a deep operational shell or #F5F7FB for light dashboards.",
|
|
47
|
+
"`color-surface`: #FFFFFF for light cards or #111827 for dark panels.",
|
|
48
|
+
"`color-text`: #111827 on light surfaces and #F8FAFC on dark surfaces.",
|
|
49
|
+
"`color-muted`: #64748B for secondary text.",
|
|
50
|
+
"`color-primary`: #0F766E for primary actions and active states.",
|
|
51
|
+
"`color-accent`: #2563EB for one chart or selected metric highlight.",
|
|
52
|
+
"`color-border`: #D8E0EA for light mode or rgba(255,255,255,0.10) for dark panels.",
|
|
53
|
+
],
|
|
54
|
+
surface: "Use a structured dashboard shell with cards, tables, and status surfaces. Shadows can be slightly stronger but must stay functional.",
|
|
55
|
+
density: "Use higher density: 12px row gaps, 14-16px card padding, aligned KPI tracks, and scannable table rows.",
|
|
56
|
+
cta: "Primary CTA should be compact and task-oriented, such as Add lead or Review pipeline.",
|
|
57
|
+
dashboard: "Lead with 4 KPI cards, then a pipeline/list region. Keep status, follow-up, and note snippets visible without opening details.",
|
|
58
|
+
mobile: "Stack metric cards into two columns then one column; avoid horizontal scrolling for core lead data.",
|
|
59
|
+
accessibility: "Status color must always pair with text. Keep focus rings visible on dense controls.",
|
|
60
|
+
components: [
|
|
61
|
+
"KPI card: label, value, trend, comparison.",
|
|
62
|
+
"Pipeline panel: status pill, count, next action.",
|
|
63
|
+
"Command surface: compact primary action plus one secondary filter/control.",
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
"bold-founder": {
|
|
67
|
+
label: "Bold Founder",
|
|
68
|
+
summary: "High-contrast launch style for marketing-heavy MVPs with decisive type and CTA hierarchy.",
|
|
69
|
+
typography: [
|
|
70
|
+
"Use a heavy display face fallback stack: Impact, Arial Black, Inter, system-ui.",
|
|
71
|
+
"Use a 56/36/24/16/13px hierarchy and keep body copy short.",
|
|
72
|
+
"Use uppercase labels sparingly for proof points and section markers.",
|
|
73
|
+
],
|
|
74
|
+
colors: [
|
|
75
|
+
"`color-bg`: #111111 for dark launch sections or #FFF7ED for high-contrast light sections.",
|
|
76
|
+
"`color-surface`: #FFFFFF or #18181B for framed proof blocks.",
|
|
77
|
+
"`color-text`: #FAFAFA on dark and #111827 on light.",
|
|
78
|
+
"`color-muted`: #A1A1AA for secondary text.",
|
|
79
|
+
"`color-primary`: #F97316 for the main CTA.",
|
|
80
|
+
"`color-accent`: #22C55E for one success/proof highlight.",
|
|
81
|
+
"`color-border`: #27272A or #111827 for strong edges.",
|
|
82
|
+
],
|
|
83
|
+
surface: "Use bold framed sections, hard borders, and clear contrast. Avoid decorative clutter.",
|
|
84
|
+
density: "Use lower density in hero areas, then compact proof cards and feature rows.",
|
|
85
|
+
cta: "CTA should be visually dominant, direct, and above the fold.",
|
|
86
|
+
dashboard: "If a dashboard is needed, use bold stat cards and clear status blocks rather than subtle utility chrome.",
|
|
87
|
+
mobile: "Reduce hero type, keep CTA full-width, and stack proof points in a single column.",
|
|
88
|
+
accessibility: "High contrast is required; do not use accent-only meaning.",
|
|
89
|
+
components: [
|
|
90
|
+
"Hero lockup: large headline, short proof line, primary CTA.",
|
|
91
|
+
"Proof card: metric, label, customer-facing implication.",
|
|
92
|
+
"Status badge: strong text label plus color.",
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
"warm-editorial": {
|
|
96
|
+
label: "Warm Editorial",
|
|
97
|
+
summary: "Softer consultant/service-product style with restrained serif-led hierarchy and warm surfaces.",
|
|
98
|
+
typography: [
|
|
99
|
+
"Use Georgia, Charter, or Times New Roman for display; use system sans for UI labels and forms.",
|
|
100
|
+
"Use a 44/30/22/16/13px hierarchy with generous line-height for reading.",
|
|
101
|
+
"Use serif display for promise, stats, and narrative sections; keep forms sans and literal.",
|
|
102
|
+
],
|
|
103
|
+
colors: [
|
|
104
|
+
"`color-bg`: #FAF7F2 warm off-white.",
|
|
105
|
+
"`color-surface`: #FFFFFF for elevated content.",
|
|
106
|
+
"`color-text`: #1C1A17 near-black.",
|
|
107
|
+
"`color-muted`: #8A817A for metadata and secondary copy.",
|
|
108
|
+
"`color-primary`: #C0512F terracotta for primary CTA.",
|
|
109
|
+
"`color-accent`: #2F5B4F forest for tags and section dividers.",
|
|
110
|
+
"`color-border`: rgba(47,91,79,0.16) for restrained structure.",
|
|
111
|
+
],
|
|
112
|
+
surface: "Use warm paper backgrounds, restrained cards, and minimal shadows.",
|
|
113
|
+
density: "Use generous spacing for landing and onboarding, then moderate density for dashboard cards.",
|
|
114
|
+
cta: "Primary CTA uses terracotta fill; secondary actions stay outlined.",
|
|
115
|
+
dashboard: "Use readable cards and notes-first presentation for relationship-led work, not heavy analytics chrome.",
|
|
116
|
+
mobile: "Keep reading width narrow, stack cards, and reduce vertical spacing by about one third.",
|
|
117
|
+
accessibility: "Warm palettes still need contrast checks; avoid low-contrast tan-on-cream labels.",
|
|
118
|
+
components: [
|
|
119
|
+
"Editorial hero: serif headline, concise support copy, terracotta CTA.",
|
|
120
|
+
"Relationship card: lead, latest note, next follow-up.",
|
|
121
|
+
"Tag row: forest-accent labels with readable text.",
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
function availableStyleNames() {
|
|
127
|
+
return Object.keys(STYLE_PRESETS);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function resolveStyleName(style) {
|
|
131
|
+
const normalized = String(style || DEFAULT_STYLE).trim().toLowerCase();
|
|
132
|
+
if (STYLE_PRESETS[normalized]) {
|
|
133
|
+
return normalized;
|
|
134
|
+
}
|
|
135
|
+
throw new ValidationError(
|
|
136
|
+
`Unsupported --style "${style}". Supported styles: ${availableStyleNames().join(", ")}. No project files were changed.`
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function getStylePreset(style) {
|
|
141
|
+
return STYLE_PRESETS[resolveStyleName(style)];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
module.exports = {
|
|
145
|
+
DEFAULT_STYLE,
|
|
146
|
+
STYLE_PRESETS,
|
|
147
|
+
availableStyleNames,
|
|
148
|
+
getStylePreset,
|
|
149
|
+
resolveStyleName,
|
|
150
|
+
};
|