mycontext-cli 2.0.26 → 2.0.28
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 +36 -355
- package/dist/agents/implementations/CodeGenSubAgent.d.ts.map +1 -1
- package/dist/agents/implementations/CodeGenSubAgent.js +67 -14
- package/dist/agents/implementations/CodeGenSubAgent.js.map +1 -1
- package/dist/agents/implementations/DesignPipelineAgent.d.ts +80 -0
- package/dist/agents/implementations/DesignPipelineAgent.d.ts.map +1 -0
- package/dist/agents/implementations/DesignPipelineAgent.js +1406 -0
- package/dist/agents/implementations/DesignPipelineAgent.js.map +1 -0
- package/dist/agents/implementations/FeatureAssemblyAgent.d.ts +67 -0
- package/dist/agents/implementations/FeatureAssemblyAgent.d.ts.map +1 -0
- package/dist/agents/implementations/FeatureAssemblyAgent.js +564 -0
- package/dist/agents/implementations/FeatureAssemblyAgent.js.map +1 -0
- package/dist/agents/implementations/PromptConstructorAgent.d.ts +10 -0
- package/dist/agents/implementations/PromptConstructorAgent.d.ts.map +1 -1
- package/dist/agents/implementations/PromptConstructorAgent.js +172 -12
- package/dist/agents/implementations/PromptConstructorAgent.js.map +1 -1
- package/dist/agents/implementations/RoleBasedGenerator.d.ts +52 -0
- package/dist/agents/implementations/RoleBasedGenerator.d.ts.map +1 -0
- package/dist/agents/implementations/RoleBasedGenerator.js +370 -0
- package/dist/agents/implementations/RoleBasedGenerator.js.map +1 -0
- package/dist/cli.js +65 -0
- package/dist/cli.js.map +1 -1
- package/dist/clients/ClaudeSDKClient.d.ts +48 -0
- package/dist/clients/ClaudeSDKClient.d.ts.map +1 -0
- package/dist/clients/ClaudeSDKClient.js +158 -0
- package/dist/clients/ClaudeSDKClient.js.map +1 -0
- package/dist/clients/MyContextAIClient.d.ts +73 -0
- package/dist/clients/MyContextAIClient.d.ts.map +1 -0
- package/dist/clients/MyContextAIClient.js +280 -0
- package/dist/clients/MyContextAIClient.js.map +1 -0
- package/dist/clients/ProviderChain.d.ts +87 -0
- package/dist/clients/ProviderChain.d.ts.map +1 -0
- package/dist/clients/ProviderChain.js +246 -0
- package/dist/clients/ProviderChain.js.map +1 -0
- package/dist/clients/XAIClient.d.ts +48 -0
- package/dist/clients/XAIClient.d.ts.map +1 -0
- package/dist/clients/XAIClient.js +152 -0
- package/dist/clients/XAIClient.js.map +1 -0
- package/dist/commands/assemble-features.d.ts +40 -0
- package/dist/commands/assemble-features.d.ts.map +1 -0
- package/dist/commands/assemble-features.js +383 -0
- package/dist/commands/assemble-features.js.map +1 -0
- package/dist/commands/clone-starter.d.ts +32 -0
- package/dist/commands/clone-starter.d.ts.map +1 -0
- package/dist/commands/clone-starter.js +218 -0
- package/dist/commands/clone-starter.js.map +1 -0
- package/dist/commands/design-analyze.d.ts +46 -0
- package/dist/commands/design-analyze.d.ts.map +1 -0
- package/dist/commands/design-analyze.js +232 -0
- package/dist/commands/design-analyze.js.map +1 -0
- package/dist/commands/generate-components.d.ts +1 -0
- package/dist/commands/generate-components.d.ts.map +1 -1
- package/dist/commands/generate-components.js +42 -9
- package/dist/commands/generate-components.js.map +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +34 -1
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/setup-complete.d.ts.map +1 -1
- package/dist/commands/setup-complete.js +38 -2
- package/dist/commands/setup-complete.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +86 -7
- package/dist/commands/workflow.js.map +1 -1
- package/dist/config/intent-dictionary.json +3700 -0
- package/dist/package.json +3 -1
- package/dist/services/IntentEnricher.d.ts +61 -0
- package/dist/services/IntentEnricher.d.ts.map +1 -0
- package/dist/services/IntentEnricher.js +318 -0
- package/dist/services/IntentEnricher.js.map +1 -0
- package/dist/services/IntentValidator.d.ts +114 -0
- package/dist/services/IntentValidator.d.ts.map +1 -0
- package/dist/services/IntentValidator.js +680 -0
- package/dist/services/IntentValidator.js.map +1 -0
- package/dist/types/design-pipeline.d.ts +300 -0
- package/dist/types/design-pipeline.d.ts.map +1 -0
- package/dist/types/design-pipeline.js +9 -0
- package/dist/types/design-pipeline.js.map +1 -0
- package/dist/types/feature-bundle.d.ts +239 -0
- package/dist/types/feature-bundle.d.ts.map +1 -0
- package/dist/types/feature-bundle.js +9 -0
- package/dist/types/feature-bundle.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/intent-dictionary.d.ts +525 -0
- package/dist/types/intent-dictionary.d.ts.map +1 -0
- package/dist/types/intent-dictionary.js +11 -0
- package/dist/types/intent-dictionary.js.map +1 -0
- package/dist/types/role-permissions.d.ts +167 -0
- package/dist/types/role-permissions.d.ts.map +1 -0
- package/dist/types/role-permissions.js +9 -0
- package/dist/types/role-permissions.js.map +1 -0
- package/dist/utils/contextEnricher.d.ts +41 -0
- package/dist/utils/contextEnricher.d.ts.map +1 -0
- package/dist/utils/contextEnricher.js +327 -0
- package/dist/utils/contextEnricher.js.map +1 -0
- package/dist/utils/designFallbacks.d.ts +48 -0
- package/dist/utils/designFallbacks.d.ts.map +1 -0
- package/dist/utils/designFallbacks.js +885 -0
- package/dist/utils/designFallbacks.js.map +1 -0
- package/dist/utils/designManifestManager.d.ts +89 -0
- package/dist/utils/designManifestManager.d.ts.map +1 -0
- package/dist/utils/designManifestManager.js +533 -0
- package/dist/utils/designManifestManager.js.map +1 -0
- package/dist/utils/designPipelineStateManager.d.ts +63 -0
- package/dist/utils/designPipelineStateManager.d.ts.map +1 -0
- package/dist/utils/designPipelineStateManager.js +174 -0
- package/dist/utils/designPipelineStateManager.js.map +1 -0
- package/dist/utils/envExampleGenerator.d.ts.map +1 -1
- package/dist/utils/envExampleGenerator.js +35 -171
- package/dist/utils/envExampleGenerator.js.map +1 -1
- package/dist/utils/featureBundleManager.d.ts +90 -0
- package/dist/utils/featureBundleManager.d.ts.map +1 -0
- package/dist/utils/featureBundleManager.js +340 -0
- package/dist/utils/featureBundleManager.js.map +1 -0
- package/dist/utils/githubCloner.d.ts +93 -0
- package/dist/utils/githubCloner.d.ts.map +1 -0
- package/dist/utils/githubCloner.js +305 -0
- package/dist/utils/githubCloner.js.map +1 -0
- package/dist/utils/rolePermissionMapper.d.ts +89 -0
- package/dist/utils/rolePermissionMapper.d.ts.map +1 -0
- package/dist/utils/rolePermissionMapper.js +337 -0
- package/dist/utils/rolePermissionMapper.js.map +1 -0
- package/dist/utils/unifiedDesignContextLoader.d.ts +76 -0
- package/dist/utils/unifiedDesignContextLoader.d.ts.map +1 -0
- package/dist/utils/unifiedDesignContextLoader.js +344 -0
- package/dist/utils/unifiedDesignContextLoader.js.map +1 -0
- package/package.json +3 -1
|
@@ -0,0 +1,885 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DesignFallbacks = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Design Fallbacks
|
|
6
|
+
*
|
|
7
|
+
* Rule-based extractors and templates for when AI generation fails.
|
|
8
|
+
* Ensures the design pipeline always produces usable output.
|
|
9
|
+
*/
|
|
10
|
+
class DesignFallbacks {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.templates = new Map();
|
|
13
|
+
this.initializeTemplates();
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Extract colors from brand context
|
|
17
|
+
*/
|
|
18
|
+
extractColorsFromBrand(brand) {
|
|
19
|
+
try {
|
|
20
|
+
const colors = {};
|
|
21
|
+
// Look for hex colors in brand text
|
|
22
|
+
const hexMatches = brand.match(/#[0-9A-Fa-f]{6}/g);
|
|
23
|
+
if (hexMatches) {
|
|
24
|
+
colors.primary = hexMatches[0];
|
|
25
|
+
if (hexMatches.length > 1) {
|
|
26
|
+
colors.secondary = hexMatches[1] || "#64748B";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
// Look for color names
|
|
30
|
+
const colorKeywords = {
|
|
31
|
+
blue: "#3B82F6",
|
|
32
|
+
green: "#10B981",
|
|
33
|
+
red: "#EF4444",
|
|
34
|
+
yellow: "#F59E0B",
|
|
35
|
+
purple: "#8B5CF6",
|
|
36
|
+
gray: "#6B7280",
|
|
37
|
+
black: "#000000",
|
|
38
|
+
white: "#FFFFFF",
|
|
39
|
+
};
|
|
40
|
+
for (const [keyword, hex] of Object.entries(colorKeywords)) {
|
|
41
|
+
if (brand.toLowerCase().includes(keyword)) {
|
|
42
|
+
if (!colors.primary)
|
|
43
|
+
colors.primary = hex;
|
|
44
|
+
else if (!colors.secondary)
|
|
45
|
+
colors.secondary = hex;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// Generate complementary colors if we found a primary
|
|
49
|
+
if (colors.primary && !colors.secondary) {
|
|
50
|
+
colors.secondary = this.generateComplementaryColor(colors.primary);
|
|
51
|
+
}
|
|
52
|
+
// Add standard colors
|
|
53
|
+
colors.background = "#FFFFFF";
|
|
54
|
+
colors.surface = "#F8FAFC";
|
|
55
|
+
colors.text = "#0F172A";
|
|
56
|
+
colors.text_muted = "#64748B";
|
|
57
|
+
colors.border = "#E2E8F0";
|
|
58
|
+
return {
|
|
59
|
+
success: true,
|
|
60
|
+
data: colors,
|
|
61
|
+
confidence: 0.7,
|
|
62
|
+
method: "rule_based",
|
|
63
|
+
warnings: [],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
return {
|
|
68
|
+
success: false,
|
|
69
|
+
data: this.getDefaultColors(),
|
|
70
|
+
confidence: 0.3,
|
|
71
|
+
method: "default",
|
|
72
|
+
warnings: ["Failed to extract colors from brand"],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Infer typography from project context
|
|
78
|
+
*/
|
|
79
|
+
inferTypography(summary) {
|
|
80
|
+
try {
|
|
81
|
+
const isDataFocused = summary.key_features.some((f) => f.toLowerCase().includes("dashboard") ||
|
|
82
|
+
f.toLowerCase().includes("analytics") ||
|
|
83
|
+
f.toLowerCase().includes("data"));
|
|
84
|
+
const isConsumer = summary.key_features.some((f) => f.toLowerCase().includes("social") ||
|
|
85
|
+
f.toLowerCase().includes("community") ||
|
|
86
|
+
f.toLowerCase().includes("mobile"));
|
|
87
|
+
let fontFamilies;
|
|
88
|
+
if (isDataFocused) {
|
|
89
|
+
fontFamilies = {
|
|
90
|
+
heading: "Inter",
|
|
91
|
+
body: "Inter",
|
|
92
|
+
mono: "JetBrains Mono",
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
else if (isConsumer) {
|
|
96
|
+
fontFamilies = {
|
|
97
|
+
heading: "Poppins",
|
|
98
|
+
body: "Inter",
|
|
99
|
+
mono: "Fira Code",
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
fontFamilies = {
|
|
104
|
+
heading: "Inter",
|
|
105
|
+
body: "Inter",
|
|
106
|
+
mono: "JetBrains Mono",
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
const scale = {
|
|
110
|
+
xs: "12px",
|
|
111
|
+
sm: "14px",
|
|
112
|
+
md: "16px",
|
|
113
|
+
lg: "18px",
|
|
114
|
+
xl: "20px",
|
|
115
|
+
"2xl": "24px",
|
|
116
|
+
"3xl": "30px",
|
|
117
|
+
"4xl": "36px",
|
|
118
|
+
};
|
|
119
|
+
const weights = {
|
|
120
|
+
normal: "400",
|
|
121
|
+
medium: "500",
|
|
122
|
+
semibold: "600",
|
|
123
|
+
bold: "700",
|
|
124
|
+
};
|
|
125
|
+
return {
|
|
126
|
+
success: true,
|
|
127
|
+
data: { font_families: fontFamilies, scale, weights },
|
|
128
|
+
confidence: 0.8,
|
|
129
|
+
method: "rule_based",
|
|
130
|
+
warnings: [],
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
return {
|
|
135
|
+
success: false,
|
|
136
|
+
data: this.getDefaultTypography(),
|
|
137
|
+
confidence: 0.5,
|
|
138
|
+
method: "default",
|
|
139
|
+
warnings: ["Failed to infer typography"],
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Generate default design tokens
|
|
145
|
+
*/
|
|
146
|
+
generateDefaultTokens(projectType = "web") {
|
|
147
|
+
try {
|
|
148
|
+
const template = this.templates.get(projectType) || this.templates.get("web");
|
|
149
|
+
if (template?.phases.visual_system) {
|
|
150
|
+
return {
|
|
151
|
+
success: true,
|
|
152
|
+
data: template.phases.visual_system,
|
|
153
|
+
confidence: 0.9,
|
|
154
|
+
method: "template_based",
|
|
155
|
+
warnings: [],
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
// Fallback to basic tokens
|
|
159
|
+
const tokens = {
|
|
160
|
+
colors: this.getDefaultColors(),
|
|
161
|
+
typography: this.getDefaultTypography(),
|
|
162
|
+
spacing: this.getDefaultSpacing(),
|
|
163
|
+
radii: this.getDefaultRadii(),
|
|
164
|
+
shadows: this.getDefaultShadows(),
|
|
165
|
+
motion: this.getDefaultMotion(),
|
|
166
|
+
breakpoints: this.getDefaultBreakpoints(),
|
|
167
|
+
};
|
|
168
|
+
return {
|
|
169
|
+
success: true,
|
|
170
|
+
data: tokens,
|
|
171
|
+
confidence: 0.6,
|
|
172
|
+
method: "default",
|
|
173
|
+
warnings: [],
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
catch (error) {
|
|
177
|
+
return {
|
|
178
|
+
success: false,
|
|
179
|
+
data: this.getDefaultTokens(),
|
|
180
|
+
confidence: 0.3,
|
|
181
|
+
method: "default",
|
|
182
|
+
warnings: ["Failed to generate default tokens"],
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Map common design patterns
|
|
188
|
+
*/
|
|
189
|
+
mapCommonPatterns(summary) {
|
|
190
|
+
try {
|
|
191
|
+
const patterns = [];
|
|
192
|
+
const components = [];
|
|
193
|
+
const screens = [];
|
|
194
|
+
// Dashboard patterns
|
|
195
|
+
if (summary.key_features.some((f) => f.toLowerCase().includes("dashboard"))) {
|
|
196
|
+
patterns.push("card-based layout", "data visualization", "sidebar navigation");
|
|
197
|
+
components.push(this.createComponent("MetricCard", "display", "Display key metrics"), this.createComponent("DataTable", "display", "Tabular data display"), this.createComponent("Chart", "display", "Data visualization"));
|
|
198
|
+
screens.push({
|
|
199
|
+
name: "Dashboard",
|
|
200
|
+
description: "Main dashboard with metrics and charts",
|
|
201
|
+
purpose: "Overview of key data",
|
|
202
|
+
components: ["MetricCard", "DataTable", "Chart"],
|
|
203
|
+
layout_type: "dashboard",
|
|
204
|
+
navigation_flow: ["Settings", "Details"],
|
|
205
|
+
user_journey_position: "main",
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
// E-commerce patterns
|
|
209
|
+
if (summary.key_features.some((f) => f.toLowerCase().includes("shop") ||
|
|
210
|
+
f.toLowerCase().includes("product"))) {
|
|
211
|
+
patterns.push("product grid", "shopping cart", "checkout flow");
|
|
212
|
+
components.push(this.createComponent("ProductCard", "display", "Product information display"), this.createComponent("Cart", "display", "Shopping cart component"), this.createComponent("CheckoutForm", "form", "Payment and shipping form"));
|
|
213
|
+
screens.push({
|
|
214
|
+
name: "ProductList",
|
|
215
|
+
description: "Product catalog page",
|
|
216
|
+
purpose: "Browse and select products",
|
|
217
|
+
components: ["ProductCard"],
|
|
218
|
+
layout_type: "grid",
|
|
219
|
+
navigation_flow: ["ProductDetail", "Cart"],
|
|
220
|
+
user_journey_position: "main",
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
// Form patterns
|
|
224
|
+
if (summary.key_features.some((f) => f.toLowerCase().includes("form") ||
|
|
225
|
+
f.toLowerCase().includes("input"))) {
|
|
226
|
+
patterns.push("progressive disclosure", "validation feedback", "step-by-step flow");
|
|
227
|
+
components.push(this.createComponent("Input", "form", "Text input field"), this.createComponent("Button", "form", "Action button"), this.createComponent("FormField", "form", "Form field wrapper"));
|
|
228
|
+
}
|
|
229
|
+
// Default patterns if none detected
|
|
230
|
+
if (patterns.length === 0) {
|
|
231
|
+
patterns.push("card-based layout", "responsive grid", "progressive disclosure");
|
|
232
|
+
components.push(this.createComponent("Card", "display", "Content container"), this.createComponent("Button", "form", "Action button"), this.createComponent("Input", "form", "Text input field"));
|
|
233
|
+
screens.push({
|
|
234
|
+
name: "Home",
|
|
235
|
+
description: "Main landing page",
|
|
236
|
+
purpose: "Welcome and navigation",
|
|
237
|
+
components: ["Card", "Button"],
|
|
238
|
+
layout_type: "single_column",
|
|
239
|
+
navigation_flow: ["Settings"],
|
|
240
|
+
user_journey_position: "entry",
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
const hierarchy = {
|
|
244
|
+
screens,
|
|
245
|
+
components,
|
|
246
|
+
design_patterns: patterns,
|
|
247
|
+
interaction_flows: [
|
|
248
|
+
"user onboarding",
|
|
249
|
+
"primary task completion",
|
|
250
|
+
"error recovery",
|
|
251
|
+
],
|
|
252
|
+
state_management: ["React hooks", "local storage"],
|
|
253
|
+
data_flow: ["Unidirectional data flow with props and callbacks"],
|
|
254
|
+
};
|
|
255
|
+
return {
|
|
256
|
+
success: true,
|
|
257
|
+
data: hierarchy,
|
|
258
|
+
confidence: 0.7,
|
|
259
|
+
method: "rule_based",
|
|
260
|
+
warnings: [],
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
catch (error) {
|
|
264
|
+
return {
|
|
265
|
+
success: false,
|
|
266
|
+
data: this.getDefaultHierarchy(),
|
|
267
|
+
confidence: 0.4,
|
|
268
|
+
method: "default",
|
|
269
|
+
warnings: ["Failed to map common patterns"],
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Get template by project type
|
|
275
|
+
*/
|
|
276
|
+
getTemplate(projectType) {
|
|
277
|
+
return this.templates.get(projectType) || null;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* List available templates
|
|
281
|
+
*/
|
|
282
|
+
getAvailableTemplates() {
|
|
283
|
+
return Array.from(this.templates.keys());
|
|
284
|
+
}
|
|
285
|
+
// ============================================================================
|
|
286
|
+
// PRIVATE HELPER METHODS
|
|
287
|
+
// ============================================================================
|
|
288
|
+
initializeTemplates() {
|
|
289
|
+
// Dashboard template
|
|
290
|
+
this.templates.set("dashboard", {
|
|
291
|
+
name: "Dashboard",
|
|
292
|
+
description: "Data-focused, minimal design system",
|
|
293
|
+
category: "dashboard",
|
|
294
|
+
phases: {
|
|
295
|
+
design_brief: {
|
|
296
|
+
theme: "light",
|
|
297
|
+
inspiration_sources: [
|
|
298
|
+
{ name: "Linear", style: "minimal, data-focused, clean" },
|
|
299
|
+
{ name: "Vercel", style: "modern, professional, subtle" },
|
|
300
|
+
],
|
|
301
|
+
blended_style: "Clean, minimal interface optimized for data consumption",
|
|
302
|
+
primary_color: "#3B82F6",
|
|
303
|
+
support_colors: ["#F8FAFC", "#1E293B", "#64748B", "#E2E8F0"],
|
|
304
|
+
typography: {
|
|
305
|
+
heading: "Inter",
|
|
306
|
+
body: "Inter",
|
|
307
|
+
mono: "JetBrains Mono",
|
|
308
|
+
},
|
|
309
|
+
ui_principles: ["clarity", "data-first", "minimal", "performance"],
|
|
310
|
+
motion_style: "subtle, purposeful",
|
|
311
|
+
personality_keywords: ["professional", "clean", "data-focused"],
|
|
312
|
+
emotional_tone: "confident and analytical",
|
|
313
|
+
target_audience: "data professionals",
|
|
314
|
+
accessibility_focus: ["high contrast", "keyboard navigation"],
|
|
315
|
+
},
|
|
316
|
+
visual_system: {
|
|
317
|
+
colors: {
|
|
318
|
+
primary: "#3B82F6",
|
|
319
|
+
secondary: "#64748B",
|
|
320
|
+
accent: "#10B981",
|
|
321
|
+
background: "#FFFFFF",
|
|
322
|
+
surface: "#F8FAFC",
|
|
323
|
+
text: "#0F172A",
|
|
324
|
+
text_muted: "#64748B",
|
|
325
|
+
border: "#E2E8F0",
|
|
326
|
+
success: "#10B981",
|
|
327
|
+
warning: "#F59E0B",
|
|
328
|
+
error: "#EF4444",
|
|
329
|
+
info: "#3B82F6",
|
|
330
|
+
},
|
|
331
|
+
typography: {
|
|
332
|
+
font_families: {
|
|
333
|
+
heading: "Inter",
|
|
334
|
+
body: "Inter",
|
|
335
|
+
mono: "JetBrains Mono",
|
|
336
|
+
},
|
|
337
|
+
scale: {
|
|
338
|
+
xs: "12px",
|
|
339
|
+
sm: "14px",
|
|
340
|
+
md: "16px",
|
|
341
|
+
lg: "18px",
|
|
342
|
+
xl: "20px",
|
|
343
|
+
"2xl": "24px",
|
|
344
|
+
"3xl": "30px",
|
|
345
|
+
"4xl": "36px",
|
|
346
|
+
},
|
|
347
|
+
weights: {
|
|
348
|
+
normal: "400",
|
|
349
|
+
medium: "500",
|
|
350
|
+
semibold: "600",
|
|
351
|
+
bold: "700",
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
spacing: {
|
|
355
|
+
xs: "4px",
|
|
356
|
+
sm: "8px",
|
|
357
|
+
md: "16px",
|
|
358
|
+
lg: "24px",
|
|
359
|
+
xl: "32px",
|
|
360
|
+
"2xl": "48px",
|
|
361
|
+
"3xl": "64px",
|
|
362
|
+
"4xl": "96px",
|
|
363
|
+
},
|
|
364
|
+
radii: {
|
|
365
|
+
none: "0px",
|
|
366
|
+
sm: "4px",
|
|
367
|
+
md: "8px",
|
|
368
|
+
lg: "12px",
|
|
369
|
+
xl: "16px",
|
|
370
|
+
full: "9999px",
|
|
371
|
+
},
|
|
372
|
+
shadows: {
|
|
373
|
+
sm: "0 1px 2px rgba(0,0,0,0.05)",
|
|
374
|
+
md: "0 4px 6px rgba(0,0,0,0.1)",
|
|
375
|
+
lg: "0 10px 15px rgba(0,0,0,0.1)",
|
|
376
|
+
xl: "0 20px 25px rgba(0,0,0,0.1)",
|
|
377
|
+
},
|
|
378
|
+
motion: {
|
|
379
|
+
duration: { fast: "150ms", normal: "300ms", slow: "500ms" },
|
|
380
|
+
easing: {
|
|
381
|
+
linear: "linear",
|
|
382
|
+
ease_in: "cubic-bezier(0.4,0,1,1)",
|
|
383
|
+
ease_out: "cubic-bezier(0,0,0.2,1)",
|
|
384
|
+
ease_in_out: "cubic-bezier(0.4,0,0.2,1)",
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
breakpoints: { sm: "640px", md: "768px", lg: "1024px", xl: "1280px" },
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
use_cases: ["Analytics dashboards", "Admin panels", "Data visualization"],
|
|
391
|
+
complexity: "medium",
|
|
392
|
+
});
|
|
393
|
+
// E-commerce template
|
|
394
|
+
this.templates.set("ecommerce", {
|
|
395
|
+
name: "E-commerce",
|
|
396
|
+
description: "Product-focused, conversion-optimized design system",
|
|
397
|
+
category: "ecommerce",
|
|
398
|
+
phases: {
|
|
399
|
+
design_brief: {
|
|
400
|
+
theme: "light",
|
|
401
|
+
inspiration_sources: [
|
|
402
|
+
{ name: "Shopify", style: "conversion-focused, product-centric" },
|
|
403
|
+
{ name: "Stripe", style: "clean, trustworthy, professional" },
|
|
404
|
+
],
|
|
405
|
+
blended_style: "Conversion-optimized interface with strong product focus",
|
|
406
|
+
primary_color: "#2563EB",
|
|
407
|
+
support_colors: ["#F8FAFC", "#1E293B", "#64748B", "#E2E8F0"],
|
|
408
|
+
typography: {
|
|
409
|
+
heading: "Inter",
|
|
410
|
+
body: "Inter",
|
|
411
|
+
mono: "JetBrains Mono",
|
|
412
|
+
},
|
|
413
|
+
ui_principles: ["conversion", "trust", "clarity", "accessibility"],
|
|
414
|
+
motion_style: "smooth, engaging",
|
|
415
|
+
personality_keywords: ["trustworthy", "engaging", "professional"],
|
|
416
|
+
emotional_tone: "confident and welcoming",
|
|
417
|
+
target_audience: "online shoppers",
|
|
418
|
+
accessibility_focus: [
|
|
419
|
+
"high contrast",
|
|
420
|
+
"keyboard navigation",
|
|
421
|
+
"screen reader support",
|
|
422
|
+
],
|
|
423
|
+
},
|
|
424
|
+
visual_system: {
|
|
425
|
+
colors: {
|
|
426
|
+
primary: "#2563EB",
|
|
427
|
+
secondary: "#64748B",
|
|
428
|
+
accent: "#10B981",
|
|
429
|
+
background: "#FFFFFF",
|
|
430
|
+
surface: "#F8FAFC",
|
|
431
|
+
text: "#0F172A",
|
|
432
|
+
text_muted: "#64748B",
|
|
433
|
+
border: "#E2E8F0",
|
|
434
|
+
success: "#10B981",
|
|
435
|
+
warning: "#F59E0B",
|
|
436
|
+
error: "#EF4444",
|
|
437
|
+
info: "#3B82F6",
|
|
438
|
+
},
|
|
439
|
+
typography: {
|
|
440
|
+
font_families: {
|
|
441
|
+
heading: "Inter",
|
|
442
|
+
body: "Inter",
|
|
443
|
+
mono: "JetBrains Mono",
|
|
444
|
+
},
|
|
445
|
+
scale: {
|
|
446
|
+
xs: "12px",
|
|
447
|
+
sm: "14px",
|
|
448
|
+
md: "16px",
|
|
449
|
+
lg: "18px",
|
|
450
|
+
xl: "20px",
|
|
451
|
+
"2xl": "24px",
|
|
452
|
+
"3xl": "30px",
|
|
453
|
+
"4xl": "36px",
|
|
454
|
+
},
|
|
455
|
+
weights: {
|
|
456
|
+
normal: "400",
|
|
457
|
+
medium: "500",
|
|
458
|
+
semibold: "600",
|
|
459
|
+
bold: "700",
|
|
460
|
+
},
|
|
461
|
+
},
|
|
462
|
+
spacing: {
|
|
463
|
+
xs: "4px",
|
|
464
|
+
sm: "8px",
|
|
465
|
+
md: "16px",
|
|
466
|
+
lg: "24px",
|
|
467
|
+
xl: "32px",
|
|
468
|
+
"2xl": "48px",
|
|
469
|
+
"3xl": "64px",
|
|
470
|
+
"4xl": "96px",
|
|
471
|
+
},
|
|
472
|
+
radii: {
|
|
473
|
+
none: "0px",
|
|
474
|
+
sm: "4px",
|
|
475
|
+
md: "8px",
|
|
476
|
+
lg: "12px",
|
|
477
|
+
xl: "16px",
|
|
478
|
+
full: "9999px",
|
|
479
|
+
},
|
|
480
|
+
shadows: {
|
|
481
|
+
sm: "0 1px 2px rgba(0,0,0,0.05)",
|
|
482
|
+
md: "0 4px 6px rgba(0,0,0,0.1)",
|
|
483
|
+
lg: "0 10px 15px rgba(0,0,0,0.1)",
|
|
484
|
+
xl: "0 20px 25px rgba(0,0,0,0.1)",
|
|
485
|
+
},
|
|
486
|
+
motion: {
|
|
487
|
+
duration: { fast: "150ms", normal: "300ms", slow: "500ms" },
|
|
488
|
+
easing: {
|
|
489
|
+
linear: "linear",
|
|
490
|
+
ease_in: "cubic-bezier(0.4,0,1,1)",
|
|
491
|
+
ease_out: "cubic-bezier(0,0,0.2,1)",
|
|
492
|
+
ease_in_out: "cubic-bezier(0.4,0,0.2,1)",
|
|
493
|
+
},
|
|
494
|
+
},
|
|
495
|
+
breakpoints: { sm: "640px", md: "768px", lg: "1024px", xl: "1280px" },
|
|
496
|
+
},
|
|
497
|
+
},
|
|
498
|
+
use_cases: ["Online stores", "Product catalogs", "Marketplace platforms"],
|
|
499
|
+
complexity: "high",
|
|
500
|
+
});
|
|
501
|
+
// Mobile PWA template
|
|
502
|
+
this.templates.set("mobile", {
|
|
503
|
+
name: "Mobile PWA",
|
|
504
|
+
description: "Touch-first, bold design system",
|
|
505
|
+
category: "mobile",
|
|
506
|
+
phases: {
|
|
507
|
+
design_brief: {
|
|
508
|
+
theme: "light",
|
|
509
|
+
inspiration_sources: [
|
|
510
|
+
{ name: "iOS", style: "clean, touch-optimized, intuitive" },
|
|
511
|
+
{ name: "Material Design", style: "bold, accessible, consistent" },
|
|
512
|
+
],
|
|
513
|
+
blended_style: "Touch-optimized interface with bold, accessible design",
|
|
514
|
+
primary_color: "#6366F1",
|
|
515
|
+
support_colors: ["#F8FAFC", "#1E293B", "#64748B", "#E2E8F0"],
|
|
516
|
+
typography: {
|
|
517
|
+
heading: "Inter",
|
|
518
|
+
body: "Inter",
|
|
519
|
+
mono: "JetBrains Mono",
|
|
520
|
+
},
|
|
521
|
+
ui_principles: [
|
|
522
|
+
"touch-first",
|
|
523
|
+
"accessibility",
|
|
524
|
+
"performance",
|
|
525
|
+
"engagement",
|
|
526
|
+
],
|
|
527
|
+
motion_style: "smooth, responsive",
|
|
528
|
+
personality_keywords: ["engaging", "intuitive", "modern"],
|
|
529
|
+
emotional_tone: "energetic and approachable",
|
|
530
|
+
target_audience: "mobile users",
|
|
531
|
+
accessibility_focus: [
|
|
532
|
+
"touch targets",
|
|
533
|
+
"high contrast",
|
|
534
|
+
"screen reader support",
|
|
535
|
+
],
|
|
536
|
+
},
|
|
537
|
+
visual_system: {
|
|
538
|
+
colors: {
|
|
539
|
+
primary: "#6366F1",
|
|
540
|
+
secondary: "#64748B",
|
|
541
|
+
accent: "#10B981",
|
|
542
|
+
background: "#FFFFFF",
|
|
543
|
+
surface: "#F8FAFC",
|
|
544
|
+
text: "#0F172A",
|
|
545
|
+
text_muted: "#64748B",
|
|
546
|
+
border: "#E2E8F0",
|
|
547
|
+
success: "#10B981",
|
|
548
|
+
warning: "#F59E0B",
|
|
549
|
+
error: "#EF4444",
|
|
550
|
+
info: "#3B82F6",
|
|
551
|
+
},
|
|
552
|
+
typography: {
|
|
553
|
+
font_families: {
|
|
554
|
+
heading: "Inter",
|
|
555
|
+
body: "Inter",
|
|
556
|
+
mono: "JetBrains Mono",
|
|
557
|
+
},
|
|
558
|
+
scale: {
|
|
559
|
+
xs: "14px",
|
|
560
|
+
sm: "16px",
|
|
561
|
+
md: "18px",
|
|
562
|
+
lg: "20px",
|
|
563
|
+
xl: "22px",
|
|
564
|
+
"2xl": "24px",
|
|
565
|
+
"3xl": "28px",
|
|
566
|
+
"4xl": "32px",
|
|
567
|
+
},
|
|
568
|
+
weights: {
|
|
569
|
+
normal: "400",
|
|
570
|
+
medium: "500",
|
|
571
|
+
semibold: "600",
|
|
572
|
+
bold: "700",
|
|
573
|
+
},
|
|
574
|
+
},
|
|
575
|
+
spacing: {
|
|
576
|
+
xs: "8px",
|
|
577
|
+
sm: "12px",
|
|
578
|
+
md: "16px",
|
|
579
|
+
lg: "20px",
|
|
580
|
+
xl: "24px",
|
|
581
|
+
"2xl": "32px",
|
|
582
|
+
"3xl": "40px",
|
|
583
|
+
"4xl": "48px",
|
|
584
|
+
},
|
|
585
|
+
radii: {
|
|
586
|
+
none: "0px",
|
|
587
|
+
sm: "6px",
|
|
588
|
+
md: "8px",
|
|
589
|
+
lg: "12px",
|
|
590
|
+
xl: "16px",
|
|
591
|
+
full: "9999px",
|
|
592
|
+
},
|
|
593
|
+
shadows: {
|
|
594
|
+
sm: "0 2px 4px rgba(0,0,0,0.1)",
|
|
595
|
+
md: "0 4px 8px rgba(0,0,0,0.1)",
|
|
596
|
+
lg: "0 8px 16px rgba(0,0,0,0.1)",
|
|
597
|
+
xl: "0 16px 32px rgba(0,0,0,0.1)",
|
|
598
|
+
},
|
|
599
|
+
motion: {
|
|
600
|
+
duration: { fast: "200ms", normal: "300ms", slow: "400ms" },
|
|
601
|
+
easing: {
|
|
602
|
+
linear: "linear",
|
|
603
|
+
ease_in: "cubic-bezier(0.4,0,1,1)",
|
|
604
|
+
ease_out: "cubic-bezier(0,0,0.2,1)",
|
|
605
|
+
ease_in_out: "cubic-bezier(0.4,0,0.2,1)",
|
|
606
|
+
},
|
|
607
|
+
},
|
|
608
|
+
breakpoints: { sm: "640px", md: "768px", lg: "1024px", xl: "1280px" },
|
|
609
|
+
},
|
|
610
|
+
},
|
|
611
|
+
use_cases: ["Mobile apps", "PWAs", "Touch interfaces"],
|
|
612
|
+
complexity: "medium",
|
|
613
|
+
});
|
|
614
|
+
// Default web template
|
|
615
|
+
this.templates.set("web", {
|
|
616
|
+
name: "Web Application",
|
|
617
|
+
description: "General purpose web application design system",
|
|
618
|
+
category: "custom",
|
|
619
|
+
phases: {
|
|
620
|
+
design_brief: {
|
|
621
|
+
theme: "light",
|
|
622
|
+
inspiration_sources: [
|
|
623
|
+
{ name: "Tailwind UI", style: "utility-first, component-based" },
|
|
624
|
+
{ name: "shadcn/ui", style: "accessible, customizable, modern" },
|
|
625
|
+
],
|
|
626
|
+
blended_style: "Modern, accessible web interface with utility-first approach",
|
|
627
|
+
primary_color: "#3B82F6",
|
|
628
|
+
support_colors: ["#F8FAFC", "#1E293B", "#64748B", "#E2E8F0"],
|
|
629
|
+
typography: {
|
|
630
|
+
heading: "Inter",
|
|
631
|
+
body: "Inter",
|
|
632
|
+
mono: "JetBrains Mono",
|
|
633
|
+
},
|
|
634
|
+
ui_principles: [
|
|
635
|
+
"accessibility",
|
|
636
|
+
"consistency",
|
|
637
|
+
"performance",
|
|
638
|
+
"maintainability",
|
|
639
|
+
],
|
|
640
|
+
motion_style: "smooth, purposeful",
|
|
641
|
+
personality_keywords: ["professional", "clean", "reliable"],
|
|
642
|
+
emotional_tone: "confident and trustworthy",
|
|
643
|
+
target_audience: "general web users",
|
|
644
|
+
accessibility_focus: [
|
|
645
|
+
"WCAG 2.1 AA",
|
|
646
|
+
"keyboard navigation",
|
|
647
|
+
"screen reader support",
|
|
648
|
+
],
|
|
649
|
+
},
|
|
650
|
+
visual_system: {
|
|
651
|
+
colors: {
|
|
652
|
+
primary: "#3B82F6",
|
|
653
|
+
secondary: "#64748B",
|
|
654
|
+
accent: "#10B981",
|
|
655
|
+
background: "#FFFFFF",
|
|
656
|
+
surface: "#F8FAFC",
|
|
657
|
+
text: "#0F172A",
|
|
658
|
+
text_muted: "#64748B",
|
|
659
|
+
border: "#E2E8F0",
|
|
660
|
+
success: "#10B981",
|
|
661
|
+
warning: "#F59E0B",
|
|
662
|
+
error: "#EF4444",
|
|
663
|
+
info: "#3B82F6",
|
|
664
|
+
},
|
|
665
|
+
typography: {
|
|
666
|
+
font_families: {
|
|
667
|
+
heading: "Inter",
|
|
668
|
+
body: "Inter",
|
|
669
|
+
mono: "JetBrains Mono",
|
|
670
|
+
},
|
|
671
|
+
scale: {
|
|
672
|
+
xs: "12px",
|
|
673
|
+
sm: "14px",
|
|
674
|
+
md: "16px",
|
|
675
|
+
lg: "18px",
|
|
676
|
+
xl: "20px",
|
|
677
|
+
"2xl": "24px",
|
|
678
|
+
"3xl": "30px",
|
|
679
|
+
"4xl": "36px",
|
|
680
|
+
},
|
|
681
|
+
weights: {
|
|
682
|
+
normal: "400",
|
|
683
|
+
medium: "500",
|
|
684
|
+
semibold: "600",
|
|
685
|
+
bold: "700",
|
|
686
|
+
},
|
|
687
|
+
},
|
|
688
|
+
spacing: {
|
|
689
|
+
xs: "4px",
|
|
690
|
+
sm: "8px",
|
|
691
|
+
md: "16px",
|
|
692
|
+
lg: "24px",
|
|
693
|
+
xl: "32px",
|
|
694
|
+
"2xl": "48px",
|
|
695
|
+
"3xl": "64px",
|
|
696
|
+
"4xl": "96px",
|
|
697
|
+
},
|
|
698
|
+
radii: {
|
|
699
|
+
none: "0px",
|
|
700
|
+
sm: "4px",
|
|
701
|
+
md: "8px",
|
|
702
|
+
lg: "12px",
|
|
703
|
+
xl: "16px",
|
|
704
|
+
full: "9999px",
|
|
705
|
+
},
|
|
706
|
+
shadows: {
|
|
707
|
+
sm: "0 1px 2px rgba(0,0,0,0.05)",
|
|
708
|
+
md: "0 4px 6px rgba(0,0,0,0.1)",
|
|
709
|
+
lg: "0 10px 15px rgba(0,0,0,0.1)",
|
|
710
|
+
xl: "0 20px 25px rgba(0,0,0,0.1)",
|
|
711
|
+
},
|
|
712
|
+
motion: {
|
|
713
|
+
duration: { fast: "150ms", normal: "300ms", slow: "500ms" },
|
|
714
|
+
easing: {
|
|
715
|
+
linear: "linear",
|
|
716
|
+
ease_in: "cubic-bezier(0.4,0,1,1)",
|
|
717
|
+
ease_out: "cubic-bezier(0,0,0.2,1)",
|
|
718
|
+
ease_in_out: "cubic-bezier(0.4,0,0.2,1)",
|
|
719
|
+
},
|
|
720
|
+
},
|
|
721
|
+
breakpoints: { sm: "640px", md: "768px", lg: "1024px", xl: "1280px" },
|
|
722
|
+
},
|
|
723
|
+
},
|
|
724
|
+
use_cases: ["Web applications", "SaaS platforms", "General websites"],
|
|
725
|
+
complexity: "low",
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
createComponent(name, type, description) {
|
|
729
|
+
return {
|
|
730
|
+
name,
|
|
731
|
+
description,
|
|
732
|
+
type,
|
|
733
|
+
props: [
|
|
734
|
+
{
|
|
735
|
+
name: "children",
|
|
736
|
+
type: "ReactNode",
|
|
737
|
+
required: false,
|
|
738
|
+
description: "Component content",
|
|
739
|
+
},
|
|
740
|
+
],
|
|
741
|
+
interactions: ["click", "hover"],
|
|
742
|
+
states: ["default", "loading", "disabled"],
|
|
743
|
+
accessibility_requirements: ["aria-label", "keyboard navigation"],
|
|
744
|
+
responsive_behavior: "Responsive design",
|
|
745
|
+
related_components: [],
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
generateComplementaryColor(hex) {
|
|
749
|
+
// Simple complementary color generation
|
|
750
|
+
const colorMap = {
|
|
751
|
+
"#3B82F6": "#F59E0B", // Blue -> Orange
|
|
752
|
+
"#10B981": "#EF4444", // Green -> Red
|
|
753
|
+
"#EF4444": "#10B981", // Red -> Green
|
|
754
|
+
"#F59E0B": "#3B82F6", // Orange -> Blue
|
|
755
|
+
"#8B5CF6": "#F59E0B", // Purple -> Orange
|
|
756
|
+
"#6366F1": "#10B981", // Indigo -> Green
|
|
757
|
+
};
|
|
758
|
+
return colorMap[hex] || "#64748B";
|
|
759
|
+
}
|
|
760
|
+
getDefaultColors() {
|
|
761
|
+
return {
|
|
762
|
+
primary: "#3B82F6",
|
|
763
|
+
secondary: "#64748B",
|
|
764
|
+
accent: "#10B981",
|
|
765
|
+
background: "#FFFFFF",
|
|
766
|
+
surface: "#F8FAFC",
|
|
767
|
+
text: "#0F172A",
|
|
768
|
+
text_muted: "#64748B",
|
|
769
|
+
border: "#E2E8F0",
|
|
770
|
+
success: "#10B981",
|
|
771
|
+
warning: "#F59E0B",
|
|
772
|
+
error: "#EF4444",
|
|
773
|
+
info: "#3B82F6",
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
getDefaultTypography() {
|
|
777
|
+
return {
|
|
778
|
+
font_families: {
|
|
779
|
+
heading: "Inter",
|
|
780
|
+
body: "Inter",
|
|
781
|
+
mono: "JetBrains Mono",
|
|
782
|
+
},
|
|
783
|
+
scale: {
|
|
784
|
+
xs: "12px",
|
|
785
|
+
sm: "14px",
|
|
786
|
+
md: "16px",
|
|
787
|
+
lg: "18px",
|
|
788
|
+
xl: "20px",
|
|
789
|
+
"2xl": "24px",
|
|
790
|
+
"3xl": "30px",
|
|
791
|
+
"4xl": "36px",
|
|
792
|
+
},
|
|
793
|
+
weights: { normal: "400", medium: "500", semibold: "600", bold: "700" },
|
|
794
|
+
};
|
|
795
|
+
}
|
|
796
|
+
getDefaultSpacing() {
|
|
797
|
+
return {
|
|
798
|
+
xs: "4px",
|
|
799
|
+
sm: "8px",
|
|
800
|
+
md: "16px",
|
|
801
|
+
lg: "24px",
|
|
802
|
+
xl: "32px",
|
|
803
|
+
"2xl": "48px",
|
|
804
|
+
"3xl": "64px",
|
|
805
|
+
"4xl": "96px",
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
getDefaultRadii() {
|
|
809
|
+
return {
|
|
810
|
+
none: "0px",
|
|
811
|
+
sm: "4px",
|
|
812
|
+
md: "8px",
|
|
813
|
+
lg: "12px",
|
|
814
|
+
xl: "16px",
|
|
815
|
+
full: "9999px",
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
getDefaultShadows() {
|
|
819
|
+
return {
|
|
820
|
+
sm: "0 1px 2px rgba(0,0,0,0.05)",
|
|
821
|
+
md: "0 4px 6px rgba(0,0,0,0.1)",
|
|
822
|
+
lg: "0 10px 15px rgba(0,0,0,0.1)",
|
|
823
|
+
xl: "0 20px 25px rgba(0,0,0,0.1)",
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
getDefaultMotion() {
|
|
827
|
+
return {
|
|
828
|
+
duration: { fast: "150ms", normal: "300ms", slow: "500ms" },
|
|
829
|
+
easing: {
|
|
830
|
+
linear: "linear",
|
|
831
|
+
ease_in: "cubic-bezier(0.4,0,1,1)",
|
|
832
|
+
ease_out: "cubic-bezier(0,0,0.2,1)",
|
|
833
|
+
ease_in_out: "cubic-bezier(0.4,0,0.2,1)",
|
|
834
|
+
},
|
|
835
|
+
};
|
|
836
|
+
}
|
|
837
|
+
getDefaultBreakpoints() {
|
|
838
|
+
return { sm: "640px", md: "768px", lg: "1024px", xl: "1280px" };
|
|
839
|
+
}
|
|
840
|
+
getDefaultTokens() {
|
|
841
|
+
return {
|
|
842
|
+
colors: this.getDefaultColors(),
|
|
843
|
+
typography: this.getDefaultTypography(),
|
|
844
|
+
spacing: this.getDefaultSpacing(),
|
|
845
|
+
radii: this.getDefaultRadii(),
|
|
846
|
+
shadows: this.getDefaultShadows(),
|
|
847
|
+
motion: this.getDefaultMotion(),
|
|
848
|
+
breakpoints: this.getDefaultBreakpoints(),
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
getDefaultHierarchy() {
|
|
852
|
+
return {
|
|
853
|
+
screens: [
|
|
854
|
+
{
|
|
855
|
+
name: "Home",
|
|
856
|
+
description: "Main landing page",
|
|
857
|
+
purpose: "Welcome and navigation",
|
|
858
|
+
components: ["Card", "Button"],
|
|
859
|
+
layout_type: "single_column",
|
|
860
|
+
navigation_flow: ["Settings"],
|
|
861
|
+
user_journey_position: "entry",
|
|
862
|
+
},
|
|
863
|
+
],
|
|
864
|
+
components: [
|
|
865
|
+
this.createComponent("Card", "display", "Content container"),
|
|
866
|
+
this.createComponent("Button", "form", "Action button"),
|
|
867
|
+
this.createComponent("Input", "form", "Text input field"),
|
|
868
|
+
],
|
|
869
|
+
design_patterns: [
|
|
870
|
+
"card-based layout",
|
|
871
|
+
"responsive grid",
|
|
872
|
+
"progressive disclosure",
|
|
873
|
+
],
|
|
874
|
+
interaction_flows: [
|
|
875
|
+
"user onboarding",
|
|
876
|
+
"primary task completion",
|
|
877
|
+
"error recovery",
|
|
878
|
+
],
|
|
879
|
+
state_management: ["React hooks", "local storage"],
|
|
880
|
+
data_flow: ["Unidirectional data flow with props and callbacks"],
|
|
881
|
+
};
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
exports.DesignFallbacks = DesignFallbacks;
|
|
885
|
+
//# sourceMappingURL=designFallbacks.js.map
|