gemini-design-mcp 3.12.4 → 3.12.6
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/build/prompts/system.js
CHANGED
|
@@ -245,7 +245,7 @@ Gut-check questions to ensure you're not shipping mediocrity:
|
|
|
245
245
|
|
|
246
246
|
**Code Quality**: Production-grade, functional, and clean. No placeholder content unless explicitly temporary.
|
|
247
247
|
|
|
248
|
-
**Styling**: Use
|
|
248
|
+
**Styling**: Use the styling approach specified in the tech stack or design system. Adapt to whatever CSS framework or methodology the project uses.
|
|
249
249
|
|
|
250
250
|
**Responsiveness**: Design for all viewports. Mobile should feel intentional, not cramped.
|
|
251
251
|
|
|
@@ -605,8 +605,8 @@ UTILISER EXACTEMENT :
|
|
|
605
605
|
// =============================================================================
|
|
606
606
|
export const DESIGN_SYSTEM_USAGE_INSTRUCTIONS = `
|
|
607
607
|
RÈGLE CRITIQUE - DESIGN SYSTEM OBLIGATOIRE:
|
|
608
|
-
Si un design system est fourni
|
|
609
|
-
- Copier EXACTEMENT les classes
|
|
608
|
+
Si un design system est fourni, tu DOIS :
|
|
609
|
+
- Copier EXACTEMENT les styles, classes, et patterns spécifiés
|
|
610
610
|
- NE JAMAIS inventer de nouvelles couleurs, paddings, ou border-radius
|
|
611
611
|
- Utiliser les composants définis (Button Primary, Input, Card, etc.)
|
|
612
612
|
- Respecter les tailles définies (sm/md/lg) sans les modifier
|
|
@@ -650,7 +650,7 @@ RÈGLES CRITIQUES:
|
|
|
650
650
|
(et ainsi de suite jusqu'à VIBE_5)
|
|
651
651
|
|
|
652
652
|
2. CHAQUE section doit être COMPLÈTE et auto-suffisante:
|
|
653
|
-
- Tous les styles
|
|
653
|
+
- Tous les styles inline (selon le tech stack)
|
|
654
654
|
- Extractible telle quelle sans modification
|
|
655
655
|
- Pas de dépendances sur d'autres sections
|
|
656
656
|
|
|
@@ -667,7 +667,7 @@ RÈGLES CRITIQUES:
|
|
|
667
667
|
- Border-radius différent
|
|
668
668
|
- Effets différents (shadows, gradients, etc.)
|
|
669
669
|
|
|
670
|
-
5. Inclure
|
|
670
|
+
5. Inclure TOUS les styles inline - AUCUNE variable externe, AUCUN fichier CSS séparé
|
|
671
671
|
|
|
672
672
|
OUTPUT: Une page React/HTML complète et fonctionnelle avec les 5 sections bien marquées. Le code doit être prêt à être sauvegardé et ouvert dans un navigateur.`;
|
|
673
673
|
|
|
@@ -9,15 +9,13 @@ export const createFrontendSchema = {
|
|
|
9
9
|
techStack: z.string().describe("The tech stack to use. Be specific. " +
|
|
10
10
|
"Examples: 'React + TypeScript + Tailwind CSS', 'Next.js 14 App Router + shadcn/ui', 'Vue 3 + Composition API + CSS Modules'"),
|
|
11
11
|
designSystem: z.string().describe("REQUIRED: Copy-paste the ENTIRE content of design-system.md here. " +
|
|
12
|
-
"This
|
|
13
|
-
"Do NOT summarize
|
|
14
|
-
context: z.string().describe("REQUIRED:
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"5) Package.json dependencies if relevant. " +
|
|
20
|
-
"The MORE context you provide, the BETTER the result will match your project."),
|
|
12
|
+
"This contains ALL visual/design information: colors, typography, spacing, components styling, etc. " +
|
|
13
|
+
"Do NOT summarize - paste the FULL file content as-is."),
|
|
14
|
+
context: z.string().describe("REQUIRED: Functional/business context for what you're creating. " +
|
|
15
|
+
"What is the PURPOSE of this page/component? What should it DO? " +
|
|
16
|
+
"Include: user flow, features needed, data it displays, actions it performs, " +
|
|
17
|
+
"how it fits in the app, business requirements. " +
|
|
18
|
+
"Do NOT include design/styling info here - that goes in designSystem."),
|
|
21
19
|
};
|
|
22
20
|
export async function createFrontend(params) {
|
|
23
21
|
const { request, techStack, designSystem, context } = params;
|
|
@@ -31,7 +29,7 @@ ${designSystem}
|
|
|
31
29
|
|
|
32
30
|
---
|
|
33
31
|
|
|
34
|
-
##
|
|
32
|
+
## FUNCTIONAL CONTEXT (what it should DO):
|
|
35
33
|
|
|
36
34
|
${context}
|
|
37
35
|
|
|
@@ -40,9 +38,9 @@ ${context}
|
|
|
40
38
|
TECH STACK: ${techStack}
|
|
41
39
|
|
|
42
40
|
CRITICAL RULES:
|
|
43
|
-
- Copy EXACTLY the
|
|
41
|
+
- Copy EXACTLY the styles, classes, colors, spacing, patterns from the design system above.
|
|
44
42
|
- NEVER invent new values. The new component must look EXACTLY like the design system.
|
|
45
|
-
-
|
|
43
|
+
- Implement the functional requirements from the context above.
|
|
46
44
|
|
|
47
45
|
Remember: Return a COMPLETE, functional file ready to use.`.trim();
|
|
48
46
|
|
|
@@ -12,7 +12,7 @@ export const generateVibesSchema = {
|
|
|
12
12
|
"Exemples: 'developers', 'enterprise clients', 'young consumers', 'creative professionals'"),
|
|
13
13
|
techStack: z.string().optional().describe("Tech stack pour la page de vibes. " +
|
|
14
14
|
"Default: 'React + TypeScript + Tailwind CSS'. " +
|
|
15
|
-
"Exemples: 'Next.js
|
|
15
|
+
"Exemples: 'Next.js', 'Vue 3', 'HTML + CSS', 'Svelte'"),
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export async function generateVibes(params) {
|
|
@@ -73,7 +73,7 @@ FORMAT DU design-system.md:
|
|
|
73
73
|
## Instructions d'utilisation
|
|
74
74
|
|
|
75
75
|
Pour tous les composants frontend:
|
|
76
|
-
- Copier EXACTEMENT les
|
|
76
|
+
- Copier EXACTEMENT les styles de ce code de référence
|
|
77
77
|
- Utiliser les mêmes couleurs, spacing, border-radius
|
|
78
78
|
- Maintenir la même direction esthétique
|
|
79
79
|
\`\`\`
|
|
@@ -11,15 +11,13 @@ export const modifyFrontendSchema = {
|
|
|
11
11
|
"Pass only the relevant component/element that needs redesigning. " +
|
|
12
12
|
"This helps Gemini focus on exactly what to change."),
|
|
13
13
|
designSystem: z.string().describe("REQUIRED: Copy-paste the ENTIRE content of design-system.md here. " +
|
|
14
|
-
"This
|
|
15
|
-
"Do NOT summarize
|
|
16
|
-
context: z.string().describe("REQUIRED:
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"5) Any utilities or helpers used. " +
|
|
22
|
-
"The MORE context you provide, the BETTER the modification will match your project."),
|
|
14
|
+
"This contains ALL visual/design information: colors, typography, spacing, components styling, etc. " +
|
|
15
|
+
"Do NOT summarize - paste the FULL file content as-is."),
|
|
16
|
+
context: z.string().describe("REQUIRED: Functional context for the modification. " +
|
|
17
|
+
"WHY are you making this change? What is the PURPOSE? " +
|
|
18
|
+
"Include: what the component should do after modification, user flow changes, " +
|
|
19
|
+
"new features or behaviors expected, business requirements. " +
|
|
20
|
+
"Do NOT include design/styling info here - that goes in designSystem."),
|
|
23
21
|
};
|
|
24
22
|
export async function modifyFrontend(params) {
|
|
25
23
|
const { modification, targetCode, designSystem, context } = params;
|
|
@@ -33,7 +31,7 @@ ${designSystem}
|
|
|
33
31
|
|
|
34
32
|
---
|
|
35
33
|
|
|
36
|
-
##
|
|
34
|
+
## FUNCTIONAL CONTEXT (why this modification):
|
|
37
35
|
|
|
38
36
|
${context}
|
|
39
37
|
|
|
@@ -47,9 +45,9 @@ ${targetCode}
|
|
|
47
45
|
MODIFICATION REQUESTED: ${modification}
|
|
48
46
|
|
|
49
47
|
CRITICAL RULES:
|
|
50
|
-
- Copy EXACTLY the
|
|
48
|
+
- Copy EXACTLY the styles, classes, colors, spacing, patterns from the design system above.
|
|
51
49
|
- NEVER invent new values. The modified code must look EXACTLY like the design system.
|
|
52
|
-
-
|
|
50
|
+
- Implement the functional requirements from the context above.
|
|
53
51
|
|
|
54
52
|
Remember: Return ONLY the find/replace block. ONE modification, surgical precision.`.trim();
|
|
55
53
|
|
|
@@ -11,15 +11,13 @@ export const snippetFrontendSchema = {
|
|
|
11
11
|
techStack: z.string().describe("The tech stack being used. " +
|
|
12
12
|
"Examples: 'React + TypeScript + Tailwind CSS', 'Vue 3 + Composition API'"),
|
|
13
13
|
designSystem: z.string().describe("REQUIRED: Copy-paste the ENTIRE content of design-system.md here. " +
|
|
14
|
-
"This
|
|
15
|
-
"Do NOT summarize
|
|
16
|
-
context: z.string().describe("REQUIRED:
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"5) Any utilities, hooks, or helpers used in the project. " +
|
|
22
|
-
"The MORE context you provide, the BETTER the snippet will integrate."),
|
|
14
|
+
"This contains ALL visual/design information: colors, typography, spacing, components styling, etc. " +
|
|
15
|
+
"Do NOT summarize - paste the FULL file content as-is."),
|
|
16
|
+
context: z.string().describe("REQUIRED: Functional context for this snippet. " +
|
|
17
|
+
"What is the PURPOSE of this snippet? What should it DO? " +
|
|
18
|
+
"Include: its role in the app, what data it handles, what actions it performs, " +
|
|
19
|
+
"how it interacts with other parts of the app, business requirements. " +
|
|
20
|
+
"Do NOT include design/styling info here - that goes in designSystem."),
|
|
23
21
|
insertionContext: z.string().describe("WHERE in the file this snippet will go. " +
|
|
24
22
|
"Example: 'Inside the Dashboard component, after the header section.'"),
|
|
25
23
|
};
|
|
@@ -35,7 +33,7 @@ ${designSystem}
|
|
|
35
33
|
|
|
36
34
|
---
|
|
37
35
|
|
|
38
|
-
##
|
|
36
|
+
## FUNCTIONAL CONTEXT (what this snippet should DO):
|
|
39
37
|
|
|
40
38
|
${context}
|
|
41
39
|
|
|
@@ -47,9 +45,9 @@ INSERTION CONTEXT:
|
|
|
47
45
|
${insertionContext}
|
|
48
46
|
|
|
49
47
|
CRITICAL RULES:
|
|
50
|
-
- Copy EXACTLY the
|
|
48
|
+
- Copy EXACTLY the styles, classes, colors, spacing, patterns from the design system above.
|
|
51
49
|
- NEVER invent new values. The snippet must look EXACTLY like the design system.
|
|
52
|
-
-
|
|
50
|
+
- Implement the functional requirements from the context above.
|
|
53
51
|
|
|
54
52
|
Generate a snippet that will integrate smoothly at this location.`.trim();
|
|
55
53
|
|