@dryui/mcp 0.1.2 → 0.1.4

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.
@@ -4440,7 +4440,7 @@ body { margin: 0; min-height: 100dvh; }
4440
4440
  },
4441
4441
  {
4442
4442
  name: "simple-content-page",
4443
- description: "Clean content page with constrained width and vertical rhythm. Use Container for max-width and Stack for vertical spacing. Suitable for blog posts, documentation, settings pages.",
4443
+ description: "Clean content page with constrained width and vertical rhythm. Use Container for max-width and CSS grid for vertical spacing. Suitable for blog posts, documentation, settings pages.",
4444
4444
  tags: ["page", "content", "simple", "blog", "docs", "article", "clean", "minimal"],
4445
4445
  components: ["Container"],
4446
4446
  snippet: `<!-- Simple content page — Container constrains width, grid provides rhythm -->
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema": "DolphinGraph",
3
- "generatedAt": "2026-04-07T21:02:38.014Z",
4
- "packageVersion": "0.1.4",
3
+ "generatedAt": "2026-04-07T22:06:54.170Z",
4
+ "packageVersion": "0.1.5",
5
5
  "summary": {
6
6
  "componentNodes": 292,
7
7
  "partNodes": 662,
@@ -4440,7 +4440,7 @@ body { margin: 0; min-height: 100dvh; }
4440
4440
  },
4441
4441
  {
4442
4442
  name: "simple-content-page",
4443
- description: "Clean content page with constrained width and vertical rhythm. Use Container for max-width and Stack for vertical spacing. Suitable for blog posts, documentation, settings pages.",
4443
+ description: "Clean content page with constrained width and vertical rhythm. Use Container for max-width and CSS grid for vertical spacing. Suitable for blog posts, documentation, settings pages.",
4444
4444
  tags: ["page", "content", "simple", "blog", "docs", "article", "clean", "minimal"],
4445
4445
  components: ["Container"],
4446
4446
  snippet: `<!-- Simple content page — Container constrains width, grid provides rhythm -->
@@ -3,7 +3,7 @@
3
3
  "version": 1,
4
4
  "package": {
5
5
  "name": "@dryui/ui",
6
- "version": "0.1.4"
6
+ "version": "0.1.5"
7
7
  },
8
8
  "counts": {
9
9
  "components": 144,
@@ -22341,7 +22341,7 @@
22341
22341
  },
22342
22342
  "simple-content-page": {
22343
22343
  "name": "simple-content-page",
22344
- "description": "Clean content page with constrained width and vertical rhythm. Use Container for max-width and Stack for vertical spacing. Suitable for blog posts, documentation, settings pages.",
22344
+ "description": "Clean content page with constrained width and vertical rhythm. Use Container for max-width and CSS grid for vertical spacing. Suitable for blog posts, documentation, settings pages.",
22345
22345
  "tags": [
22346
22346
  "page",
22347
22347
  "content",
package/dist/index.js CHANGED
@@ -8080,12 +8080,23 @@ function installCommand(packageManager) {
8080
8080
  return "npm install @dryui/ui";
8081
8081
  }
8082
8082
  }
8083
+ function buildThemeImportLines(spec) {
8084
+ return ` import '${spec.themeImports.default}';
8085
+ import '${spec.themeImports.dark}';`;
8086
+ }
8083
8087
  function buildThemeImportSnippet(spec) {
8088
+ return ["<script>", buildThemeImportLines(spec), "</script>"].join(`
8089
+ `);
8090
+ }
8091
+ function buildRootLayoutSnippet(spec) {
8084
8092
  return [
8085
- '<script lang="ts">',
8086
- ` import '${spec.themeImports.default}';`,
8087
- ` import '${spec.themeImports.dark}';`,
8088
- "</script>"
8093
+ "<script>",
8094
+ buildThemeImportLines(spec),
8095
+ "",
8096
+ " let { children } = $props();",
8097
+ "</script>",
8098
+ "",
8099
+ "{@render children()}"
8089
8100
  ].join(`
8090
8101
  `);
8091
8102
  }
@@ -8135,7 +8146,8 @@ function detectProject(spec, inputPath) {
8135
8146
  const themeImportFiles = rootLayout && importsAppCss(rootLayout) ? [rootLayout, appCss] : [rootLayout];
8136
8147
  const defaultImported = hasAnyImport(themeImportFiles, spec.themeImports.default);
8137
8148
  const darkImported = hasAnyImport(themeImportFiles, spec.themeImports.dark);
8138
- const stepsNeeded = Number(!dependencyNames.has("@dryui/ui")) + Number(!defaultImported) + Number(!darkImported) + Number(!(appHtml && hasThemeAuto(appHtml)));
8149
+ const themeAuto = appHtml ? hasThemeAuto(appHtml) : false;
8150
+ const stepsNeeded = Number(!dependencyNames.has("@dryui/ui")) + Number(!defaultImported) + Number(!darkImported) + Number(!themeAuto);
8139
8151
  const warnings = [];
8140
8152
  if (!packageJsonPath)
8141
8153
  warnings.push("No package.json found above the provided path.");
@@ -8161,7 +8173,7 @@ function detectProject(spec, inputPath) {
8161
8173
  theme: {
8162
8174
  defaultImported,
8163
8175
  darkImported,
8164
- themeAuto: hasThemeAuto(appHtml)
8176
+ themeAuto
8165
8177
  },
8166
8178
  warnings
8167
8179
  };
@@ -8193,7 +8205,7 @@ function planInstall(spec, inputPath) {
8193
8205
  kind: "edit-file",
8194
8206
  status: "pending",
8195
8207
  title: "Add theme imports to app.css",
8196
- description: "Ensure the app-level stylesheet imports both default and dark DryUI themes.",
8208
+ description: "Prepend the two @import lines from the snippet to the TOP of the existing src/app.css file, before any other CSS rules. Do not create a second file.",
8197
8209
  path: detection.files.appCss,
8198
8210
  snippet: buildThemeImportCssSnippet(spec)
8199
8211
  });
@@ -8203,16 +8215,16 @@ function planInstall(spec, inputPath) {
8203
8215
  kind: "create-file",
8204
8216
  status: "pending",
8205
8217
  title: "Create root layout with theme imports",
8206
- description: "Create src/routes/+layout.svelte and add the required DryUI theme imports.",
8218
+ description: "Create the file at the path below with the snippet as its full content. The file must include {@render children()} or pages will not render.",
8207
8219
  ...path ? { path } : {},
8208
- snippet: buildThemeImportSnippet(spec)
8220
+ snippet: buildRootLayoutSnippet(spec)
8209
8221
  });
8210
8222
  } else {
8211
8223
  steps.push({
8212
8224
  kind: "edit-file",
8213
8225
  status: "pending",
8214
8226
  title: "Add theme imports to the root layout",
8215
- description: "Ensure the root layout imports both default and dark DryUI themes.",
8227
+ description: "Add the two import lines from the snippet into the EXISTING <script> block in this file. Do not create a second <script> block. If no <script> block exists, add one at the top of the file.",
8216
8228
  path: detection.files.rootLayout,
8217
8229
  snippet: buildThemeImportSnippet(spec)
8218
8230
  });
@@ -8230,9 +8242,9 @@ function planInstall(spec, inputPath) {
8230
8242
  kind: "edit-file",
8231
8243
  status: "pending",
8232
8244
  title: "Set html theme mode to auto",
8233
- description: 'Add class="theme-auto" to the html element in src/app.html.',
8245
+ description: 'In src/app.html, find the opening <html> tag (e.g. <html lang="en">) and add class="theme-auto" to it, preserving any existing attributes. Result should be like <html lang="en" class="theme-auto">. Do NOT add a second <html> element.',
8234
8246
  path: detection.files.appHtml,
8235
- snippet: '<html class="theme-auto">'
8247
+ snippet: 'class="theme-auto"'
8236
8248
  });
8237
8249
  }
8238
8250
  if (steps.length === 0) {
@@ -30680,8 +30692,8 @@ var SERVER_INSTRUCTIONS = [
30680
30692
  '1. SET UP THE APP SHELL FIRST: Run `compose "app shell"` to get the root layout template.',
30681
30693
  ' Your +layout.svelte must import the theme CSS, and app.html needs <html class="theme-auto">.',
30682
30694
  "",
30683
- "2. PAGE LAYOUT: Use PageHeader.Root + Container + Stack for page structure.",
30684
- " This gives you a header, constrained content width, and vertical rhythm.",
30695
+ "2. PAGE LAYOUT: Use CSS grid for layout — not flexbox. Use Container for constrained content",
30696
+ " width. Use `@container` queries for responsive sizing (never `@media` for layout).",
30685
30697
  "",
30686
30698
  "3. CORRECT CSS TOKENS: Background is --dry-color-bg-base (not --dry-color-bg).",
30687
30699
  ' Text is --dry-color-text-strong (not --dry-color-text). See compose "app shell" for the full reset.',
@@ -30693,10 +30705,9 @@ var SERVER_INSTRUCTIONS = [
30693
30705
  " the compose tool are instructions for YOU, not content for the page. Never render them as",
30694
30706
  " visible text in the UI. Only use the code snippets from compose output.",
30695
30707
  "",
30696
- "6. USE DRYUI LAYOUT COMPONENTS, NOT CUSTOM CSS: Grid instead of `display: grid`, Flex instead",
30697
- " of `display: flex`, Stack instead of vertical flex. Use Field.Root + Label for form fields,",
30698
- " Button instead of raw `<button>`. Never write custom CSS for layout, spacing, or form",
30699
- " structure when a DryUI component exists."
30708
+ "6. USE DRYUI COMPONENTS FOR UI ELEMENTS: Use Field.Root + Label for form fields, Button instead",
30709
+ " of raw `<button>`, Separator instead of `<hr>`. Always call `info` or `compose` to check",
30710
+ " if a DryUI component exists before writing raw HTML."
30700
30711
  ].join(`
30701
30712
  `);
30702
30713
  var server = new McpServer({ name: "@dryui/mcp", version: version2 }, {
@@ -158,12 +158,23 @@ function installCommand(packageManager) {
158
158
  return "npm install @dryui/ui";
159
159
  }
160
160
  }
161
+ function buildThemeImportLines(spec) {
162
+ return ` import '${spec.themeImports.default}';
163
+ import '${spec.themeImports.dark}';`;
164
+ }
161
165
  function buildThemeImportSnippet(spec) {
166
+ return ["<script>", buildThemeImportLines(spec), "</script>"].join(`
167
+ `);
168
+ }
169
+ function buildRootLayoutSnippet(spec) {
162
170
  return [
163
- '<script lang="ts">',
164
- ` import '${spec.themeImports.default}';`,
165
- ` import '${spec.themeImports.dark}';`,
166
- "</script>"
171
+ "<script>",
172
+ buildThemeImportLines(spec),
173
+ "",
174
+ " let { children } = $props();",
175
+ "</script>",
176
+ "",
177
+ "{@render children()}"
167
178
  ].join(`
168
179
  `);
169
180
  }
@@ -213,7 +224,8 @@ function detectProject(spec, inputPath) {
213
224
  const themeImportFiles = rootLayout && importsAppCss(rootLayout) ? [rootLayout, appCss] : [rootLayout];
214
225
  const defaultImported = hasAnyImport(themeImportFiles, spec.themeImports.default);
215
226
  const darkImported = hasAnyImport(themeImportFiles, spec.themeImports.dark);
216
- const stepsNeeded = Number(!dependencyNames.has("@dryui/ui")) + Number(!defaultImported) + Number(!darkImported) + Number(!(appHtml && hasThemeAuto(appHtml)));
227
+ const themeAuto = appHtml ? hasThemeAuto(appHtml) : false;
228
+ const stepsNeeded = Number(!dependencyNames.has("@dryui/ui")) + Number(!defaultImported) + Number(!darkImported) + Number(!themeAuto);
217
229
  const warnings = [];
218
230
  if (!packageJsonPath)
219
231
  warnings.push("No package.json found above the provided path.");
@@ -239,7 +251,7 @@ function detectProject(spec, inputPath) {
239
251
  theme: {
240
252
  defaultImported,
241
253
  darkImported,
242
- themeAuto: hasThemeAuto(appHtml)
254
+ themeAuto
243
255
  },
244
256
  warnings
245
257
  };
@@ -271,7 +283,7 @@ function planInstall(spec, inputPath) {
271
283
  kind: "edit-file",
272
284
  status: "pending",
273
285
  title: "Add theme imports to app.css",
274
- description: "Ensure the app-level stylesheet imports both default and dark DryUI themes.",
286
+ description: "Prepend the two @import lines from the snippet to the TOP of the existing src/app.css file, before any other CSS rules. Do not create a second file.",
275
287
  path: detection.files.appCss,
276
288
  snippet: buildThemeImportCssSnippet(spec)
277
289
  });
@@ -281,16 +293,16 @@ function planInstall(spec, inputPath) {
281
293
  kind: "create-file",
282
294
  status: "pending",
283
295
  title: "Create root layout with theme imports",
284
- description: "Create src/routes/+layout.svelte and add the required DryUI theme imports.",
296
+ description: "Create the file at the path below with the snippet as its full content. The file must include {@render children()} or pages will not render.",
285
297
  ...path ? { path } : {},
286
- snippet: buildThemeImportSnippet(spec)
298
+ snippet: buildRootLayoutSnippet(spec)
287
299
  });
288
300
  } else {
289
301
  steps.push({
290
302
  kind: "edit-file",
291
303
  status: "pending",
292
304
  title: "Add theme imports to the root layout",
293
- description: "Ensure the root layout imports both default and dark DryUI themes.",
305
+ description: "Add the two import lines from the snippet into the EXISTING <script> block in this file. Do not create a second <script> block. If no <script> block exists, add one at the top of the file.",
294
306
  path: detection.files.rootLayout,
295
307
  snippet: buildThemeImportSnippet(spec)
296
308
  });
@@ -308,9 +320,9 @@ function planInstall(spec, inputPath) {
308
320
  kind: "edit-file",
309
321
  status: "pending",
310
322
  title: "Set html theme mode to auto",
311
- description: 'Add class="theme-auto" to the html element in src/app.html.',
323
+ description: 'In src/app.html, find the opening <html> tag (e.g. <html lang="en">) and add class="theme-auto" to it, preserving any existing attributes. Result should be like <html lang="en" class="theme-auto">. Do NOT add a second <html> element.',
312
324
  path: detection.files.appHtml,
313
- snippet: '<html class="theme-auto">'
325
+ snippet: 'class="theme-auto"'
314
326
  });
315
327
  }
316
328
  if (steps.length === 0) {
package/dist/spec.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.4",
2
+ "version": "0.1.5",
3
3
  "package": "@dryui/ui",
4
4
  "themeImports": {
5
5
  "default": "@dryui/ui/themes/default.css",
@@ -22197,7 +22197,7 @@
22197
22197
  },
22198
22198
  "simple-content-page": {
22199
22199
  "name": "simple-content-page",
22200
- "description": "Clean content page with constrained width and vertical rhythm. Use Container for max-width and Stack for vertical spacing. Suitable for blog posts, documentation, settings pages.",
22200
+ "description": "Clean content page with constrained width and vertical rhythm. Use Container for max-width and CSS grid for vertical spacing. Suitable for blog posts, documentation, settings pages.",
22201
22201
  "tags": [
22202
22202
  "page",
22203
22203
  "content",
@@ -1607,12 +1607,23 @@ function installCommand(packageManager) {
1607
1607
  return "npm install @dryui/ui";
1608
1608
  }
1609
1609
  }
1610
+ function buildThemeImportLines(spec) {
1611
+ return ` import '${spec.themeImports.default}';
1612
+ import '${spec.themeImports.dark}';`;
1613
+ }
1610
1614
  function buildThemeImportSnippet(spec) {
1615
+ return ["<script>", buildThemeImportLines(spec), "</script>"].join(`
1616
+ `);
1617
+ }
1618
+ function buildRootLayoutSnippet(spec) {
1611
1619
  return [
1612
- '<script lang="ts">',
1613
- ` import '${spec.themeImports.default}';`,
1614
- ` import '${spec.themeImports.dark}';`,
1615
- "</script>"
1620
+ "<script>",
1621
+ buildThemeImportLines(spec),
1622
+ "",
1623
+ " let { children } = $props();",
1624
+ "</script>",
1625
+ "",
1626
+ "{@render children()}"
1616
1627
  ].join(`
1617
1628
  `);
1618
1629
  }
@@ -1662,7 +1673,8 @@ function detectProject(spec, inputPath) {
1662
1673
  const themeImportFiles = rootLayout && importsAppCss(rootLayout) ? [rootLayout, appCss] : [rootLayout];
1663
1674
  const defaultImported = hasAnyImport(themeImportFiles, spec.themeImports.default);
1664
1675
  const darkImported = hasAnyImport(themeImportFiles, spec.themeImports.dark);
1665
- const stepsNeeded = Number(!dependencyNames.has("@dryui/ui")) + Number(!defaultImported) + Number(!darkImported) + Number(!(appHtml && hasThemeAuto(appHtml)));
1676
+ const themeAuto = appHtml ? hasThemeAuto(appHtml) : false;
1677
+ const stepsNeeded = Number(!dependencyNames.has("@dryui/ui")) + Number(!defaultImported) + Number(!darkImported) + Number(!themeAuto);
1666
1678
  const warnings = [];
1667
1679
  if (!packageJsonPath)
1668
1680
  warnings.push("No package.json found above the provided path.");
@@ -1688,7 +1700,7 @@ function detectProject(spec, inputPath) {
1688
1700
  theme: {
1689
1701
  defaultImported,
1690
1702
  darkImported,
1691
- themeAuto: hasThemeAuto(appHtml)
1703
+ themeAuto
1692
1704
  },
1693
1705
  warnings
1694
1706
  };
@@ -1720,7 +1732,7 @@ function planInstall(spec, inputPath) {
1720
1732
  kind: "edit-file",
1721
1733
  status: "pending",
1722
1734
  title: "Add theme imports to app.css",
1723
- description: "Ensure the app-level stylesheet imports both default and dark DryUI themes.",
1735
+ description: "Prepend the two @import lines from the snippet to the TOP of the existing src/app.css file, before any other CSS rules. Do not create a second file.",
1724
1736
  path: detection.files.appCss,
1725
1737
  snippet: buildThemeImportCssSnippet(spec)
1726
1738
  });
@@ -1730,16 +1742,16 @@ function planInstall(spec, inputPath) {
1730
1742
  kind: "create-file",
1731
1743
  status: "pending",
1732
1744
  title: "Create root layout with theme imports",
1733
- description: "Create src/routes/+layout.svelte and add the required DryUI theme imports.",
1745
+ description: "Create the file at the path below with the snippet as its full content. The file must include {@render children()} or pages will not render.",
1734
1746
  ...path ? { path } : {},
1735
- snippet: buildThemeImportSnippet(spec)
1747
+ snippet: buildRootLayoutSnippet(spec)
1736
1748
  });
1737
1749
  } else {
1738
1750
  steps.push({
1739
1751
  kind: "edit-file",
1740
1752
  status: "pending",
1741
1753
  title: "Add theme imports to the root layout",
1742
- description: "Ensure the root layout imports both default and dark DryUI themes.",
1754
+ description: "Add the two import lines from the snippet into the EXISTING <script> block in this file. Do not create a second <script> block. If no <script> block exists, add one at the top of the file.",
1743
1755
  path: detection.files.rootLayout,
1744
1756
  snippet: buildThemeImportSnippet(spec)
1745
1757
  });
@@ -1757,9 +1769,9 @@ function planInstall(spec, inputPath) {
1757
1769
  kind: "edit-file",
1758
1770
  status: "pending",
1759
1771
  title: "Set html theme mode to auto",
1760
- description: 'Add class="theme-auto" to the html element in src/app.html.',
1772
+ description: 'In src/app.html, find the opening <html> tag (e.g. <html lang="en">) and add class="theme-auto" to it, preserving any existing attributes. Result should be like <html lang="en" class="theme-auto">. Do NOT add a second <html> element.',
1761
1773
  path: detection.files.appHtml,
1762
- snippet: '<html class="theme-auto">'
1774
+ snippet: 'class="theme-auto"'
1763
1775
  });
1764
1776
  }
1765
1777
  if (steps.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dryui/mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "author": "Rob Balfre",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -71,9 +71,6 @@
71
71
  "files": [
72
72
  "dist"
73
73
  ],
74
- "publishConfig": {
75
- "access": "public"
76
- },
77
74
  "scripts": {
78
75
  "generate-spec": "bun src/generate-spec.ts",
79
76
  "generate-architecture": "bun src/generate-architecture.ts",