@raketa-cloud/design-cli 1.1.2 → 1.1.3

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 CHANGED
@@ -52,6 +52,7 @@ The disposable `.design/.preset/` cache is ignored by its own ignore file. Insta
52
52
  For live preset development, set `DESIGN_PRESET_DIR` to a local checkout and run generate or serve. Changes to that checkout are visible through the runtime link and showcase. This override is forbidden when `CI` is set. Restart the showcase after changing the checkout location.
53
53
 
54
54
  Token JSON objects merge recursively; arrays replace wholesale. Local component and layout pattern directories replace the entire matching preset pattern. Additional local component CSS follows preset CSS. `tokenOverrides` maps `:root` and `.dark` to existing CSS variable names and values; unknown names are rejected. For example: `"tokenOverrides": { ":root": { "--color-action": "#123456" } }`. Not every valid CSS color expression can be rendered in catalog swatches; inspect the actual preview and generated CSS.
55
+ The showcase uses the host's `_theme_preview.html` when present, otherwise the preset's; if neither exists it displays a placeholder.
55
56
 
56
57
  Preset repositories, previews and runtime JavaScript are trusted inputs. The installer does not invoke preset install scripts, but Git uses your configuration and credentials, including any configured checkout filters. Using preset CSS, JavaScript or Tailwind plugins can execute or load untrusted content. Review changes and test framework integration separately.
57
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raketa-cloud/design-cli",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "CLI for building and previewing local design systems",
5
5
  "repository": {
6
6
  "type": "git",
@@ -200,7 +200,8 @@ function themePreview(name, details, snippet) {
200
200
  }
201
201
  async function showcase() {
202
202
  const data = await catalog(await loadConfig());
203
- const [components, layouts, assets, name, fontsLink, snippet] = await Promise.all([exampleIndex('components'), exampleIndex('layouts'), assetIndex(), designName(), optionalFontsLink(), readFile(join(root, '_theme_preview.html'), 'utf8').catch(error => { if (error.code === 'ENOENT') return null; throw error; })]);
203
+ const [components, layouts, assets, name, fontsLink, snippetPath] = await Promise.all([exampleIndex('components'), exampleIndex('layouts'), assetIndex(), designName(), optionalFontsLink(), overlayPath(await loadConfig(), '_theme_preview.html')]);
204
+ const snippet = snippetPath ? await readFile(snippetPath, 'utf8') : null;
204
205
  const themeSets = Object.entries(resolveThemeDetails(data));
205
206
  const themes = snippet === null ? '<p class="empty">Add _theme_preview.html to preview themes.</p>' : '<div class="theme-previews">' + themeSets.map(([name, details]) => themePreview(name === 'light' ? 'Default' : name, details, snippet)).join('') + '</div>';
206
207
  const typography = typographyPreview(data);