synthesisui 0.1.19 → 0.1.21
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/dist/commands/use.js +14 -3
- package/package.json +1 -1
package/dist/commands/use.js
CHANGED
|
@@ -70,16 +70,27 @@ export async function use(slug, intent, opts) {
|
|
|
70
70
|
"Read these files in the project first (highest authority first):",
|
|
71
71
|
...readFirst,
|
|
72
72
|
"",
|
|
73
|
-
|
|
73
|
+
`Follow this contract (target framework: ${config.target}):`,
|
|
74
|
+
`- First check whether this refers to UI that already exists in the project (search ` +
|
|
75
|
+
`\`${config.componentsDir}/\` and \`${config.pagesDir}/\`). If it does, modify only what's ` +
|
|
76
|
+
`needed and keep the rest of the file intact and on-system. If it doesn't, build it new - ` +
|
|
77
|
+
`components in \`${config.componentsDir}/\`, pages in \`${config.pagesDir}/\`.`,
|
|
74
78
|
`- Scope the markup with \`data-ds="${slug}"\` (or rely on it at the app root).`,
|
|
75
79
|
stylingRule,
|
|
76
|
-
`- Target framework: ${config.target}. Put new components in \`${config.componentsDir}/\` ` +
|
|
77
|
-
`and pages in \`${config.pagesDir}/\`.`,
|
|
78
80
|
config.target === "next"
|
|
79
81
|
? '- Make sure `tokens.css` + `theme.css` are imported in the global CSS (see the GUIDE\'s "How to apply").'
|
|
80
82
|
: '- Make sure `tokens.css` is imported in the global CSS (see the GUIDE\'s "How to apply").',
|
|
81
83
|
"- Wire the behavior yourself (open/close, focus, routing) - the system ships the looks, not the JS.",
|
|
82
84
|
"",
|
|
85
|
+
"Composition (make it look composed, not just correct):",
|
|
86
|
+
config.target === "next"
|
|
87
|
+
? "- Cap page content with a max-width container and center it - this DS ships `max-w-app` for " +
|
|
88
|
+
"dashboards/wide UI and `max-w-prose` for text columns. Don't stretch content edge-to-edge."
|
|
89
|
+
: "- Cap page content with a max-width container and center it (don't stretch edge-to-edge): a " +
|
|
90
|
+
"wide width for dashboards, a ~70ch column for text.",
|
|
91
|
+
"- Give the page a complete, intentional layout: clear vertical rhythm, sensible density and " +
|
|
92
|
+
"grouped sections. Never leave a single thin row floating on an empty screen.",
|
|
93
|
+
"",
|
|
83
94
|
"Deliver senior-level, production-quality code: clean structure, accessible (ARIA + keyboard), and responsive.",
|
|
84
95
|
].join("\n");
|
|
85
96
|
// Framing lines go to stderr so `synthesisui use … | pbcopy` copies only the
|