synthesisui 0.1.16 → 0.1.18
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/add.js +8 -1
- package/dist/guide.js +7 -4
- package/dist/index.js +14 -6
- package/package.json +1 -1
package/dist/commands/add.js
CHANGED
|
@@ -110,8 +110,15 @@ export async function add(slug, opts) {
|
|
|
110
110
|
}
|
|
111
111
|
console.log(` CLAUDE.md ${claudeMd.created ? "created" : "updated"} (${claudeMd.count} system(s) installed)`);
|
|
112
112
|
console.log("");
|
|
113
|
+
const hasTheme = cssArtifacts.includes("theme.css");
|
|
113
114
|
console.log("Next steps:");
|
|
114
|
-
console.log(
|
|
115
|
+
console.log(" • In your global CSS, import the system (use a path relative to that CSS file -");
|
|
116
|
+
console.log(" from `app/globals.css` in a Next App Router project that means a leading `../`):");
|
|
117
|
+
console.log(` @import "_synthesisui/ds/${payload.slug}/tokens.css";`);
|
|
118
|
+
if (hasTheme) {
|
|
119
|
+
console.log(` @import "_synthesisui/ds/${payload.slug}/theme.css"; /* Tailwind v4 utilities - required */`);
|
|
120
|
+
console.log(' (import `theme.css` after `tokens.css`, both after `@import "tailwindcss";`)');
|
|
121
|
+
}
|
|
115
122
|
console.log(` • scope your UI with data-ds="${payload.slug}"`);
|
|
116
123
|
console.log(` • details and rules in _synthesisui/ds/${payload.slug}/v${v}/GUIDE.md`);
|
|
117
124
|
}
|
package/dist/guide.js
CHANGED
|
@@ -130,7 +130,7 @@ place** - wire real data, split into components, swap the chart/icon/media place
|
|
|
130
130
|
? `**Read \`_synthesisui/ds/${slug}/rules.md\` FIRST and obey it above everything else** - it carries this system's accumulated, project-specific rules; on any conflict they win.`
|
|
131
131
|
: "",
|
|
132
132
|
hasPhilosophy
|
|
133
|
-
?
|
|
133
|
+
? `**${hasRules ? "Then read" : "Read"} \`_synthesisui/ds/${slug}/philosophy.md\`** - the mission, principles, voice and motion doctrine. Let it shape every screen you build.`
|
|
134
134
|
: "",
|
|
135
135
|
].filter(Boolean);
|
|
136
136
|
const rulesNote = readFirst.length > 0
|
|
@@ -159,11 +159,14 @@ ${meta.narrative}
|
|
|
159
159
|
${rulesNote}
|
|
160
160
|
## How to apply
|
|
161
161
|
|
|
162
|
-
1. Import the
|
|
162
|
+
1. Import the system once in your project's global CSS, using a path **relative to that CSS
|
|
163
|
+
file** - from \`app/globals.css\` in a Next App Router project that means a leading \`../\`:
|
|
163
164
|
\`\`\`css
|
|
164
|
-
@import "
|
|
165
|
+
@import "../_synthesisui/ds/${slug}/tokens.css";
|
|
165
166
|
\`\`\`
|
|
166
|
-
(
|
|
167
|
+
(drop the \`../\` if your global CSS sits at the project root.)${hasTailwind
|
|
168
|
+
? `\n **Using Tailwind (this project's default)? You also need \`theme.css\` right after \`tokens.css\` -\n without it the DS-backed utilities (\`bg-primary\`, \`p-md\`…) aren't generated and the UI renders\n unstyled. See "Styling with Tailwind v4" below for the full import block.**`
|
|
169
|
+
: ""}
|
|
167
170
|
|
|
168
171
|
2. Wrap the tree that should use the system with the scope attribute:
|
|
169
172
|
\`\`\`html
|
package/dist/index.js
CHANGED
|
@@ -52,14 +52,22 @@ function parseFlags(argv) {
|
|
|
52
52
|
flags.help = true;
|
|
53
53
|
}
|
|
54
54
|
else if (arg.startsWith("--")) {
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
const body = arg.slice(2);
|
|
56
|
+
const eq = body.indexOf("=");
|
|
57
|
+
if (eq !== -1) {
|
|
58
|
+
// `--key=value` form (e.g. --out=templates/page.tsx)
|
|
59
|
+
flags[body.slice(0, eq)] = body.slice(eq + 1);
|
|
60
60
|
}
|
|
61
61
|
else {
|
|
62
|
-
|
|
62
|
+
// `--key value` form
|
|
63
|
+
const next = argv[i + 1];
|
|
64
|
+
if (next !== undefined && !next.startsWith("--")) {
|
|
65
|
+
flags[body] = next;
|
|
66
|
+
i++;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
flags[body] = true;
|
|
70
|
+
}
|
|
63
71
|
}
|
|
64
72
|
}
|
|
65
73
|
else {
|