@takazudo/zudo-sg 0.2.0 → 0.2.1

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/CHANGELOG.md CHANGED
@@ -4,6 +4,27 @@ All notable changes to `@takazudo/zudo-sg` are documented in this file.
4
4
 
5
5
  The format is based on Keep a Changelog, and release notes are generated from the changelog MDX pages.
6
6
 
7
+ ## [0.2.1] - 2026-09-20
8
+
9
+ This release removes host-specific assumptions from generated registries and
10
+ token manifests, while making first-time registry generation self-starting.
11
+
12
+ ### Bug Fixes
13
+
14
+ - Generated registries now import the engine-owned `StoryModule` type instead
15
+ of depending on the repository's demo UI package.
16
+ - Token manifests preserve each CSS input's configured import specifier, so
17
+ generated output remains valid when a host uses relative or package paths.
18
+ - `gen-registry` now creates a missing or whitespace-only output file and its
19
+ parent directories. Existing non-empty files without generated markers are
20
+ still protected from overwrite.
21
+
22
+ ### Other Changes
23
+
24
+ - Raised the engine peer floors to `@takazudo/zfb ^2.20.0` and
25
+ `@takazudo/zudo-doc ^5.26.2`.
26
+ - Expanded foreign-host and initializer verification around generated output.
27
+
7
28
  ## [0.2.0] - 2026-09-20
8
29
 
9
30
  A requirements release. The engine's code is unchanged, but its published peer
package/README.md CHANGED
@@ -51,18 +51,23 @@ pnpm gen-token-manifest
51
51
  pnpm dev
52
52
  ```
53
53
 
54
- The initializer is available from its first npm release; nothing is published
55
- by this epic. It copies a private starter with three example Preact components,
56
- stories, token CSS, a preview entry, and the zfb/zudo-doc composition already
57
- wired. The CLI prints the same next steps after scaffolding.
54
+ It copies a private starter with three example Preact components, stories,
55
+ token CSS, a preview entry, and the zfb/zudo-doc composition already wired.
56
+ The CLI prints the same next steps after scaffolding.
57
+
58
+ `gen-registry` bootstraps a missing or whitespace-only `registryOut` and its
59
+ parent directories, so a new host does not need to create a marker-only seed
60
+ file by hand. A non-empty registry without generated markers is rejected to
61
+ protect hand-authored content. `gen-registry --check` reports missing or empty
62
+ output as drift and never writes it.
58
63
 
59
64
  ## Installation
60
65
 
61
66
  ```sh
62
- pnpm add @takazudo/zudo-sg@latest @takazudo/zfb@^2.19.0 @takazudo/zfb-md-wasm@^2.19.0 @takazudo/zfb-runtime@^2.19.0 @takazudo/zudo-doc@^5.26.0 @takazudo/zdtp@^0.8.0 diff@^8.0.4 katex@^0.16.38 preact@^10.29.8 preact-render-to-string@^6.6.6 tailwindcss@^4.2.0 zod@^4.3.6
67
+ pnpm add @takazudo/zudo-sg@latest @takazudo/zfb@^2.20.0 @takazudo/zfb-md-wasm@^2.20.0 @takazudo/zfb-runtime@^2.20.0 @takazudo/zudo-doc@^5.26.2 @takazudo/zdtp@^0.8.0 diff@^8.0.4 katex@^0.16.38 preact@^10.29.8 preact-render-to-string@^6.6.6 tailwindcss@^4.2.0 zod@^4.3.6
63
68
  ```
64
69
 
65
- The engine peers are `@takazudo/zfb ^2.19.0`, `@takazudo/zudo-doc ^5.26.0`,
70
+ The engine peers are `@takazudo/zfb ^2.20.0`, `@takazudo/zudo-doc ^5.26.2`,
66
71
  `@takazudo/zdtp ^0.8.0`, and `preact ^10.29.8`. `@takazudo/zdtp` is required:
67
72
  the injected `/tokens` route imports its dashboard at build time. The
68
73
  `@takazudo/zfb-md-wasm`, `@takazudo/zfb-runtime`, `diff`, `katex`, and `zod`
@@ -95,7 +100,7 @@ export default defineConfig(
95
100
  {
96
101
  componentsRoots: [{ dir: "./src/components", importBase: "@/components" }],
97
102
  registryOut: "./src/styleguide/sg-registry.ts",
98
- uiPackageName: "@your-scope/ui",
103
+ uiPackageName: "@your-scope/ui", // optional: usage snippets and catalog labels
99
104
  previewStyles: "./src/styles/preview-entry.css",
100
105
  },
101
106
  ),
@@ -111,9 +116,62 @@ exported as a side-effect module that statically imports every engine
111
116
  island — importing it once from a host `pages/` file is optional and
112
117
  harmless (it was required on zfb < 2.18.0).
113
118
 
119
+ `uiPackageName` is optional. When set, it names the package used in generated
120
+ usage snippets and catalog labels; when omitted, scaffolded usage snippets
121
+ import the component from its own relative module. The generated registry's
122
+ `StoryModule` type always comes from `@takazudo/zudo-sg/stories`.
123
+
114
124
  Full option shape, virtual modules, and every locked constant:
115
125
  `docs/adr/styleguide-engine.md` in this repository.
116
126
 
127
+ ### Host styles
128
+
129
+ Add `src/styles/global.css` to the host; zfb discovers it automatically
130
+ (`styles/global.css` takes precedence if both exist). The initializer ships
131
+ this entry already. Use this import order, replacing `ui-tokens.css` with
132
+ your own token stylesheet as needed:
133
+
134
+ ```css
135
+ @layer zd-preflight, zd-flow;
136
+ /* One element reset: theme.css resets color tokens, not elements. */
137
+ @import "tailwindcss/preflight" layer(zd-preflight);
138
+ @import "tailwindcss/utilities";
139
+ @import "@takazudo/zudo-doc/theme.css";
140
+ @import "./ui-tokens.css";
141
+ /* Add your component package stylesheet here. */
142
+ @import "@takazudo/zudo-doc/safelist.css";
143
+ @import "@takazudo/zudo-doc/content.css";
144
+ @import "@takazudo/zudo-doc/features.css";
145
+ @import "@takazudo/zudo-doc/page-loading.css";
146
+ @import "@takazudo/zdtp/dashboard/styles.css";
147
+ @import "@takazudo/zudo-sg/styles.css";
148
+ @import "@takazudo/zudo-sg/safelist.css";
149
+
150
+ /* zfb global-entry paths are project-root-relative; add your UI package here. */
151
+ @source "pages/**/*.{tsx,ts,jsx,js}";
152
+ @source "ui/**/*.{tsx,ts,jsx,js,mdx,md}";
153
+ @source "src/content/**/*.{mdx,md}";
154
+ ```
155
+
156
+ The zudo-doc theme supplies framework defaults, including the breakpoints
157
+ needed by responsive sidebar utilities. Its color-token reset precedes your
158
+ tokens so they survive. Use `theme-no-reset.css` instead to preserve
159
+ consumer-only color tokens imported earlier; tokens defined by both
160
+ stylesheets still follow source order. Do not import both variants or add
161
+ another preflight/full `tailwindcss` import. A host that already defines the
162
+ full zudo-doc token contract can keep its own theme.
163
+
164
+ Keep utilities and engine styles unlayered. The `zd-flow` layer must beat
165
+ preflight's margin reset while allowing utility margins to win, and catalog
166
+ chrome overrides must compete with utilities. The zdtp dashboard stylesheet
167
+ belongs after zudo-doc content CSS so dashboard rules win ties with prose.
168
+ Safelists cover package chrome; your `@source` globs cover consumer code.
169
+
170
+ Add the component package's CSS and source scan to your `previewStyles` entry
171
+ as well; that standalone entry compiles separately and resolves `@source`
172
+ paths relative to its stylesheet. Dashboard and catalog CSS stay in the
173
+ host entry.
174
+
117
175
  ## Release scheme
118
176
 
119
177
  Stable only. `v*.*.*` tags publish to the npm `latest` dist-tag — there is no
@@ -25,8 +25,8 @@ export interface ZudoSgConfig {
25
25
  * `computeCategoryOrder`).
26
26
  */
27
27
  categoryOrder: string[];
28
- /** npm package name components/stories are imported from in generated usage snippets. */
29
- uiPackageName: string;
28
+ /** npm package name components are imported from in generated usage snippets and catalog labels. */
29
+ uiPackageName?: string;
30
30
  /**
31
31
  * Project-root-relative path to the barrel file `new-component` inserts an
32
32
  * export into, or `null` for a project with no barrel-file convention.
@@ -13,7 +13,7 @@ export interface RegistryEntry extends DiscoveredStory {
13
13
  * `StoryModule` import, one `import * as <name>` per story, and the
14
14
  * `storyModules` + `storyExportOrder` maps.
15
15
  */
16
- export declare function buildRegistryBlock(entries: RegistryEntry[], uiPackageName: string): string;
16
+ export declare function buildRegistryBlock(entries: RegistryEntry[]): string;
17
17
  /**
18
18
  * Build the generated block for a components root's secondary
19
19
  * `story-modules.ts` fixture: one `import * as <name>` per story (relative,
@@ -1,9 +1,9 @@
1
1
  const BEGIN_MARKER = "GENERATED:SG_REGISTRY_BEGIN";
2
2
  const END_MARKER = "GENERATED:SG_REGISTRY_END";
3
- function buildRegistryBlock(entries, uiPackageName) {
3
+ function buildRegistryBlock(entries) {
4
4
  const lines = [];
5
- lines.push(`// ${BEGIN_MARKER} \u2014 do not hand-edit; run \`pnpm gen:sg-registry\`.`);
6
- lines.push(`import type { StoryModule } from "${uiPackageName}";`);
5
+ lines.push(`// ${BEGIN_MARKER} \u2014 do not hand-edit; run \`zudo-sg gen-registry\`.`);
6
+ lines.push(`import type { StoryModule } from "@takazudo/zudo-sg/stories";`);
7
7
  lines.push(``);
8
8
  for (const e of entries) {
9
9
  lines.push(`import * as ${e.importName} from "${e.importSpecifier}";`);
@@ -41,7 +41,7 @@ function buildRegistryBlock(entries, uiPackageName) {
41
41
  }
42
42
  function buildStoryModulesBlock(entries, relativeImportPrefix) {
43
43
  const lines = [];
44
- lines.push(`// ${BEGIN_MARKER} \u2014 do not hand-edit; run \`pnpm gen:sg-registry\`.`);
44
+ lines.push(`// ${BEGIN_MARKER} \u2014 do not hand-edit; run \`zudo-sg gen-registry\`.`);
45
45
  for (const e of entries) {
46
46
  lines.push(`import * as ${e.importName} from "${relativeImportPrefix}/${e.relDirStem}.stories";`);
47
47
  }
@@ -1,4 +1,4 @@
1
- import { existsSync, readFileSync, writeFileSync } from "node:fs";
1
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
2
  import { dirname, relative, resolve } from "node:path";
3
3
  import {
4
4
  buildRegistryBlock,
@@ -25,12 +25,17 @@ function runGenRegistry(projectRoot, config, options = {}) {
25
25
  const allEntries = perRootEntries.flatMap((r) => r.entries).sort((a, b) => a.mapKey.localeCompare(b.mapKey));
26
26
  assertUniqueImportNames(allEntries);
27
27
  const registryPath = resolve(projectRoot, config.registryOut);
28
- const registrySrc = readFileSync(registryPath, "utf8");
29
- const nextRegistry = replaceBlock(
30
- registrySrc,
31
- buildRegistryBlock(allEntries, config.uiPackageName),
32
- registryPath
33
- );
28
+ let registrySrc = "";
29
+ let bootstrapRegistry = false;
30
+ try {
31
+ registrySrc = readFileSync(registryPath, "utf8");
32
+ bootstrapRegistry = registrySrc.trim().length === 0;
33
+ } catch (error) {
34
+ if (!isErrorCode(error, "ENOENT")) throw error;
35
+ bootstrapRegistry = true;
36
+ }
37
+ const registryBlock = buildRegistryBlock(allEntries);
38
+ const nextRegistry = bootstrapRegistry ? registryBlock : replaceBlock(registrySrc, registryBlock, registryPath);
34
39
  const targets = [
35
40
  { path: registryPath, before: registrySrc, after: nextRegistry }
36
41
  ];
@@ -54,14 +59,22 @@ function runGenRegistry(projectRoot, config, options = {}) {
54
59
  }
55
60
  return { entryCount: allEntries.length, changed: [] };
56
61
  }
57
- for (const t of changed) writeFileSync(t.path, t.after);
62
+ for (const t of changed) {
63
+ if (t.path === registryPath && bootstrapRegistry) {
64
+ mkdirSync(dirname(t.path), { recursive: true });
65
+ }
66
+ writeFileSync(t.path, t.after);
67
+ }
58
68
  return { entryCount: allEntries.length, changed: changed.map((t) => t.path) };
59
69
  }
70
+ function isErrorCode(error, code) {
71
+ return typeof error === "object" && error !== null && "code" in error && error.code === code;
72
+ }
60
73
  class SgRegistryDriftError extends Error {
61
74
  constructor(driftedPaths) {
62
75
  super(`sg-registry codegen drift detected:
63
76
  ${driftedPaths.map((p) => ` - ${p}`).join("\n")}
64
- Run \`pnpm gen:sg-registry\` and commit the result.`);
77
+ Run \`zudo-sg gen-registry\` and commit the result.`);
65
78
  this.driftedPaths = driftedPaths;
66
79
  this.name = "SgRegistryDriftError";
67
80
  }
@@ -33,7 +33,7 @@ export interface StoriesTemplateArgs {
33
33
  pascalName: string;
34
34
  kebabName: string;
35
35
  category: string;
36
- uiPackageName: string;
36
+ uiPackageName?: string;
37
37
  nested?: boolean;
38
38
  }
39
39
  /**
@@ -67,6 +67,7 @@ function storiesTemplate({
67
67
  uiPackageName,
68
68
  nested = false
69
69
  }) {
70
+ const usageImport = uiPackageName ?? `./${kebabName}`;
70
71
  const lines = [
71
72
  `import type { StoryMeta, Story } from "${nested ? "../../stories/types" : "../stories/types"}";`,
72
73
  `import { ${pascalName}, type ${pascalName}Props } from "./${kebabName}";`,
@@ -75,7 +76,7 @@ function storiesTemplate({
75
76
  ` title: "${pascalName}", // TODO: human-friendly display name, if different`,
76
77
  ` category: "${category}",`,
77
78
  ` description: "TODO: one-sentence description of ${pascalName}.",`,
78
- ` usage: \`import { ${pascalName} } from "${uiPackageName}";`,
79
+ ` usage: \`import { ${pascalName} } from "${usageImport}";`,
79
80
  ``,
80
81
  `<${pascalName}>Content</${pascalName}>\`,`,
81
82
  `};`,
@@ -5,7 +5,7 @@ class TokenManifestDriftError extends Error {
5
5
  constructor(manifestOut) {
6
6
  super(
7
7
  `Token manifest drift detected: ${manifestOut} is out of date.
8
- Run \`pnpm gen:token-manifest\` and commit the result.`
8
+ Run \`zudo-sg gen-token-manifest\` and commit the result.`
9
9
  );
10
10
  this.name = "TokenManifestDriftError";
11
11
  }
@@ -25,7 +25,7 @@ function runGenTokenManifest(projectRoot, config, options = {}) {
25
25
  const tokensCss = readFileSync(resolve(projectRoot, tokensCssPath), "utf8");
26
26
  const colorsCss = readFileSync(resolve(projectRoot, colorsCssPath), "utf8");
27
27
  const manifest = buildUiTokenManifest({ tokensCss, colorsCss });
28
- const next = renderUiTokenManifestFile(manifest);
28
+ const next = renderUiTokenManifestFile(manifest, { tokensCssPath, colorsCssPath });
29
29
  const tokenCount = manifest.paletteColors.length + manifest.colorTokens.length + manifest.spacingTokens.length + manifest.fontTokens.length + manifest.sizeTokens.length;
30
30
  const manifestPath = resolve(projectRoot, tokens.manifestOut);
31
31
  let current;
@@ -64,6 +64,12 @@ export interface UiTokenManifest {
64
64
  fontTokens: BuiltToken[];
65
65
  sizeTokens: BuiltToken[];
66
66
  }
67
+ export interface TokenManifestProvenance {
68
+ /** Project-root-relative path configured for spacing/font/size tokens. */
69
+ tokensCssPath: string;
70
+ /** Project-root-relative path configured for palette/semantic color tokens. */
71
+ colorsCssPath: string;
72
+ }
67
73
  /**
68
74
  * Parse `tokensCss` (the components root's main tokens file) and
69
75
  * `colorsCss` (its colors file) and build the full manifest data — the same
@@ -75,4 +81,4 @@ export declare function buildUiTokenManifest({ tokensCss, colorsCss }: {
75
81
  colorsCss: string;
76
82
  }): UiTokenManifest;
77
83
  /** Render the full generated manifest `.ts` source. */
78
- export declare function renderUiTokenManifestFile(manifest: UiTokenManifest): string;
84
+ export declare function renderUiTokenManifestFile(manifest: UiTokenManifest, provenance: TokenManifestProvenance): string;
@@ -195,6 +195,9 @@ function buildUiTokenManifest({ tokensCss, colorsCss }) {
195
195
  function jsStringLiteral(value) {
196
196
  return JSON.stringify(value);
197
197
  }
198
+ function normalizeProvenancePath(path) {
199
+ return path.replace(/\\/g, "/").replace(/^\.\//, "");
200
+ }
198
201
  function renderTokenDefObject(token, indent) {
199
202
  const pad = " ".repeat(indent);
200
203
  const fields = [
@@ -225,20 +228,23 @@ ${pad}},`;
225
228
  function renderPaletteEntry(entry) {
226
229
  return ` { name: ${jsStringLiteral(entry.name)}, value: ${jsStringLiteral(entry.value)} },`;
227
230
  }
228
- function renderUiTokenManifestFile(manifest) {
231
+ function renderUiTokenManifestFile(manifest, provenance) {
232
+ const tokensCssPath = normalizeProvenancePath(provenance.tokensCssPath);
233
+ const colorsCssPath = normalizeProvenancePath(provenance.colorsCssPath);
234
+ const sourceOfTruth = tokensCssPath === colorsCssPath ? `\`${tokensCssPath}\`` : `\`${tokensCssPath}\` and \`${colorsCssPath}\``;
229
235
  const paletteLines = manifest.paletteColors.map(renderPaletteEntry).join("\n");
230
236
  const colorLines = manifest.colorTokens.map((t) => renderTokenDefObject(t, 2)).join("\n");
231
237
  const spacingLines = manifest.spacingTokens.map((t) => renderTokenDefObject(t, 2)).join("\n");
232
238
  const fontLines = manifest.fontTokens.map((t) => renderTokenDefObject(t, 2)).join("\n");
233
239
  const sizeLines = manifest.sizeTokens.map((t) => renderTokenDefObject(t, 2)).join("\n");
234
240
  return `/**
235
- * Design-token manifest for @zudo-sg/demo-ui target-website tokens.
241
+ * Design-token manifest for configured UI tokens.
236
242
  *
237
- * GENERATED \u2014 do not hand-edit. Run \`pnpm gen:token-manifest\` after changing
238
- * packages/demo-ui/styles/tokens.css or packages/demo-ui/styles/colors.css, then commit
239
- * the regenerated output. \`pnpm check:token-manifest\` fails on drift.
243
+ * GENERATED \u2014 do not hand-edit. Run \`zudo-sg gen-token-manifest\` after changing
244
+ * either configured source file, then commit the regenerated output.
245
+ * \`zudo-sg gen-token-manifest --check\` fails on drift.
240
246
  *
241
- * Source of truth: packages/demo-ui/styles/tokens.css and packages/demo-ui/styles/colors.css,
247
+ * Source of truth: ${sourceOfTruth},
242
248
  * parsed by the \`zudo-sg gen-token-manifest\` CLI command
243
249
  * (@takazudo/zudo-sg's src/cli/token-manifest/ui-token-manifest.ts). Only
244
250
  * \`default\` values are derived from the CSS; \`group\`/\`step\`/\`unit\`/
@@ -256,7 +262,7 @@ const FONT_WEIGHT_OPTIONS = [
256
262
  ] as const;
257
263
 
258
264
  /**
259
- * Tier-1 raw palette colors from \`packages/demo-ui/styles/colors.css\` (the \`:root\`
265
+ * Tier-1 raw palette colors from \`${colorsCssPath}\` (the \`:root\`
260
266
  * \`--palette-{group}-{step-or-role}\` block). This is the raw material beneath the
261
267
  * semantic \`--color-*\` tokens in UI_COLOR_TOKENS below \u2014 same three-tier
262
268
  * model the doc-chrome panel exposes via \`--palette-*\` ramps and \`--zd-*\`
@@ -274,7 +280,7 @@ const FONT_WEIGHT_OPTIONS = [
274
280
  export interface UiPaletteColor {
275
281
  /** Palette key without the \`--palette-\` prefix, e.g. "neutral-2". */
276
282
  name: string;
277
- /** Raw oklch value, from colors.css. */
283
+ /** Raw oklch value, from \`${colorsCssPath}\`. */
278
284
  value: string;
279
285
  }
280
286
 
@@ -283,7 +289,7 @@ ${paletteLines}
283
289
  ];
284
290
 
285
291
  /**
286
- * Color tokens from \`packages/demo-ui/styles/colors.css\`.
292
+ * Color tokens from \`${colorsCssPath}\`.
287
293
  *
288
294
  * All values use light-dark() for dual-scheme support. Defaults here are
289
295
  * the full CSS declarations including both light and dark sides.
@@ -297,7 +303,7 @@ ${colorLines}
297
303
  ];
298
304
 
299
305
  /**
300
- * Spacing tokens from \`packages/demo-ui/styles/tokens.css\`.
306
+ * Spacing tokens from \`${tokensCssPath}\`.
301
307
  *
302
308
  * Coverage: ${manifest.spacingTokens.length} tokens total.
303
309
  */
@@ -306,7 +312,7 @@ ${spacingLines}
306
312
  ];
307
313
 
308
314
  /**
309
- * Font tokens from \`packages/demo-ui/styles/tokens.css\`.
315
+ * Font tokens from \`${tokensCssPath}\`.
310
316
  *
311
317
  * Coverage: ${manifest.fontTokens.length} tokens total.
312
318
  */
@@ -315,7 +321,7 @@ ${fontLines}
315
321
  ];
316
322
 
317
323
  /**
318
- * Size tokens from \`packages/demo-ui/styles/tokens.css\`.
324
+ * Size tokens from \`${tokensCssPath}\`.
319
325
  *
320
326
  * Coverage: ${manifest.sizeTokens.length} tokens total.
321
327
  * \`--radius-full\` carries a pill toggle (sentinel 9999px).
package/dist/safelist.css CHANGED
@@ -1,2 +1,2 @@
1
1
  /* generated by gen-safelist.mjs — do not edit by hand */
2
- @source inline("-components [--check] [--nested] [--skip-barrel] [data-sg-card] [data-sg-catalog] [data-sg-empty] [data-sg-section] [data-sg-tile] [options] [slug] [zudo-sg] a accent accent-0 accent-1 accent-2 accent-3 accent/state across add adjusted after alias allow-forms allow-same-origin allow-scripts alphabetical alphabetically already always among an and any anything appear application/json apply-css-vars are aria-activedescendant aria-controls aria-describedby aria-details aria-expanded aria-hidden aria-label aria-labelledby aria-live aria-orientation aria-owns aria-pressed aria-selected array as aside assumes at authored back bar barrel barrel-export base be because before below beneath bg bg-accent bg-bg bg-surface bg-surface-2 block body bogus boolean border border-accent border-b border-border border-border-strong border-t border-transparent both build builds but button by cache-control cannot canvas carries cascading catalog categories category caution change changing check:token-manifest checkbox children circle clamp classes clear-css-vars clickable client code codegen collapsing collection color colors command commit compact compare compile compiled component components components2026 config configured confirm const contain content-type copy count counts css cursor-pointer custom-property cx danger dark dashboard dashboards data-category data-copied data-keywords data-name data-sg-card data-sg-catalog data-sg-catalog-intro data-sg-code-panel-hidden data-sg-code-panel-resizer data-sg-empty data-sg-injected-css data-sg-preview-css data-sg-preview-doc data-sg-preview-loading data-sg-preview-scope data-sg-section data-sg-stage-grid data-sg-tile data-sg-tile-size data-sg-variant-root data-theme data-zudo-sg-tokens-empty date declaration declarations declared default defaults demo derive derived describe description descriptors design design-token desktop detail dev different differs digit directories directory disabled discovered display div do doc doc-chrome drift driven dual-scheme each edit editing edits el element else empty en endpoint engine entry entrypoint equivalent every exists expected export exported exports exposes expressions failed fails family fg file files filled find first first-authored fixed flag flex flex-1 flex-col flex-wrap focus-visible:-outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-focus focus-visible:outline-offset-2 follow follows font font-bold font-family font-medium font-semibold font-size font-size-lh font-weight for form found frame frames free-form from frost full function g gap-hsp-2xs gap-hsp-3xs gap-hsp-md gap-hsp-sm gap-hsp-xs gap-vsp-2xs gap-vsp-lg gap-vsp-md gap-x-hsp-xl gap-y-vsp-xl gate gen-registry gen-token-manifest gen:sg-registry gen:token-manifest generated give glob-relative grid grid-cols-1 grid-cols-[repeat(auto-fit,minmax(min(18rem,100%),1fr))] group guards h-[1.5rem] h-full h1 h2 h3 hand handle hands has have head header headers height here hex hidden hold host hover:text-fg hsp html human-friendly identifier identifiers if iframe iframes import important in include including inert info init inject inline-block inline-flex input inserting inserts inside installed instead interface into intro inventory is isolated it items-center items-start its itself justify-between kebab-case keeps key key-enumeration keyboard keydown keyed known label large layout lazy leading leading-normal left length lh light like line line-beauty-accent line-beauty-accent-dark line-beauty-hover line-beauty-hover-dark line-height line-laser-accent line-laser-accent-dark line-laser-hover line-laser-hover-dark line-meeting-accent line-meeting-accent-dark line-meeting-hover line-meeting-hover-dark line-process-accent line-process-accent-dark line-process-hover line-process-hover-dark line-vacuum-accent line-vacuum-accent-dark line-vacuum-hover line-vacuum-hover-dark link lint:tokens list listed lists live load loading m-0 m21 makes manifest marker markers match matching material max-w-[56rem] may mb-vsp-2xs mb-vsp-lg mb-vsp-sm mb-vsp-xl message meta metadata min-h-0 mirroring missing mobile mode mode-dependent mode-independent model module ms-auto mt-vsp-2xs mt-vsp-3xs mt-vsp-xl mt-vsp-xs must mx-auto name name/value named named-export namespace navigation needs neutral-0 neutral-1 neutral-2 neutral-3 never new new-component new:component no no-store node:crypto node:fs node:fs/promises node:module node:path node:url noindex non-empty none not note nowhere number object of off oklch on once one one-sentence only option options opts or order other out outline-none overflow-auto overflow-hidden overflow-x-auto overriding p p-hsp-2xs p-hsp-md p-hsp-sm pages pairs palette palette- panel panels parse parsed parser pass passes path per-element per-variant pick pill placeholders plain plugin plugins pnpm polite polyline postcss pre preact-render-to-string preact/hooks preact/jsx-runtime presentation preview previews primary property pt-vsp-xl pushes px px-hsp-2xs px-hsp-md px-hsp-sm px-hsp-xs py-vsp-2xs py-vsp-3xs py-vsp-xs radius rail ramp ramps range raw re-executed re-run read-only readonly ready real recover rect reference references regenerated region registration relative rem rem-aware rem-based rename renamed/removed render rendered renders replace required requires resolve resolved return returns rhythm robots root-absolute round rounded rounded-full rounded-md rounded-sm route router routes routes-src rows run runtime s same saved scaffold scaffolds screen scrim script search secondary section segment segments select semantic separator settings sg-catalog-tile-size sg-chip sg-chip-row sg-code-panel sg-code-panel-hidden sg-code-panel-resizer sg-code-panel-width sg-copy-btn sg-filter sg-filter-row sg-gallery-section sg-grid sg-injected- sg-preview-design-token-panel-modal sg-preview-design-tokens sg-preview-design-tokens/v1 sg-preview-tweak sg-registry sg-search-clear sg-search-field sg-search-input sg-seg sg-seg-btn sg-thumb sg-thumb-inner sg-thumb-note sg-tile sg-tile-count sg-tile-desc sg-tile-meta sg-tile-title sg-workbench-toolbar sg:height sg:ready sgt- shadow shape shared show shown shrink-0 sidebar sidebar- single-axis site size skipped skips slug so solid sorts source spacing span spec specimen stacked starting state state-danger state-danger-dark state-info state-info-dark state-success state-success-dark state-warning state-warning-dark stay step still story string strings stroke-linecap stroke-linejoin stroke-width style stylesheet supported surface surfaces svg swaps swatch tab tablet tablist tabs tabular-nums target-website text text-2xl text-accent text-caption text-fg text-heading text-muted text-on-accent text-right text-sm text-small text-xl text-xs text/icons textarea that the their them theme then these this three-tier tier tile time tip title to toggle toggle-design-token-panel toggle-preview-token-panel token tokens total tracking-wide transition-colors true tsx tweaks twice two type typechecks ui- ui-color ui-defaults-dark ui-defaults-light ui-defaults-shared undefined under underline underline-offset-2 unknown unwired up uppercase us use used uses utf-8 utf8 valid value values var variant variants vertical via viewport views virtual:zudo-doc-chrome-bindings virtual:zudo-doc-route-context virtual:zudo-sg-context virtual:zudo-sg-preview-token-panel virtual:zudo-sg-registry virtual:zudo-sg-tokens visible visit vs vsp w-[2.5rem] w-[5rem] warning was weight were what when which while whole whose will window with without would written yield you your zd-content zdtp-preview-prehydrate zfb zudo-doc zudo-doc-sidebar-width zudo-sg zudo-sg-token-tweak-bridge");
2
+ @source inline("-components [--check] [--nested] [--skip-barrel] [data-sg-card] [data-sg-catalog] [data-sg-empty] [data-sg-section] [data-sg-tile] [options] [slug] [zudo-sg] a accent accent-0 accent-1 accent-2 accent-3 accent/state across add adjusted after alias allow-forms allow-same-origin allow-scripts alphabetical alphabetically already always among an and any anything appear application/json apply-css-vars are aria-activedescendant aria-controls aria-describedby aria-details aria-expanded aria-hidden aria-label aria-labelledby aria-live aria-orientation aria-owns aria-pressed aria-selected array as aside assumes at authored back bar barrel barrel-export base be because before below beneath bg bg-accent bg-bg bg-surface bg-surface-2 block body bogus boolean border border-accent border-b border-border border-border-strong border-t border-transparent both build builds but button by cache-control cannot canvas carries cascading catalog categories category caution change changing checkbox children circle clamp classes clear-css-vars clickable client code codegen collapsing collection color colors command commit compact compare compile compiled component components components2026 config configured confirm const contain content-type copy count counts css cursor-pointer custom-property cx danger dark dashboard dashboards data-category data-copied data-keywords data-name data-sg-card data-sg-catalog data-sg-catalog-intro data-sg-code-panel-hidden data-sg-code-panel-resizer data-sg-empty data-sg-injected-css data-sg-preview-css data-sg-preview-doc data-sg-preview-loading data-sg-preview-scope data-sg-section data-sg-stage-grid data-sg-tile data-sg-tile-size data-sg-variant-root data-theme data-zudo-sg-tokens-empty date declaration declarations declared default defaults demo derive derived describe description descriptors design design-token desktop detail dev different differs digit directories directory disabled discovered display div do doc doc-chrome drift driven dual-scheme each edit editing edits either el element else empty en endpoint engine entry entrypoint equivalent every exists expected export exported exports exposes expressions failed fails family fg file files filled find first first-authored fixed flag flex flex-1 flex-col flex-wrap focus-visible:-outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-focus focus-visible:outline-offset-2 follow follows font font-bold font-family font-medium font-semibold font-size font-size-lh font-weight for form found frame frames free-form from frost full function g gap-hsp-2xs gap-hsp-3xs gap-hsp-md gap-hsp-sm gap-hsp-xs gap-vsp-2xs gap-vsp-lg gap-vsp-md gap-x-hsp-xl gap-y-vsp-xl gate gen-registry gen-token-manifest gen:sg-registry generated give glob-relative grid grid-cols-1 grid-cols-[repeat(auto-fit,minmax(min(18rem,100%),1fr))] group guards h-[1.5rem] h-full h1 h2 h3 hand handle hands has have head header headers height here hex hidden hold host hover:text-fg hsp html human-friendly identifier identifiers if iframe iframes import important in include including inert info init inject inline-block inline-flex input inserting inserts inside installed instead interface into intro inventory is isolated it items-center items-start its itself justify-between kebab-case keeps key key-enumeration keyboard keydown keyed known label large layout lazy leading leading-normal left length lh light like line line-beauty-accent line-beauty-accent-dark line-beauty-hover line-beauty-hover-dark line-height line-laser-accent line-laser-accent-dark line-laser-hover line-laser-hover-dark line-meeting-accent line-meeting-accent-dark line-meeting-hover line-meeting-hover-dark line-process-accent line-process-accent-dark line-process-hover line-process-hover-dark line-vacuum-accent line-vacuum-accent-dark line-vacuum-hover line-vacuum-hover-dark link lint:tokens list listed lists live load loading m-0 m21 makes manifest marker markers match matching material max-w-[56rem] may mb-vsp-2xs mb-vsp-lg mb-vsp-sm mb-vsp-xl message meta metadata min-h-0 mirroring missing mobile mode mode-dependent mode-independent model module ms-auto mt-vsp-2xs mt-vsp-3xs mt-vsp-xl mt-vsp-xs must mx-auto name name/value named named-export namespace navigation needs neutral-0 neutral-1 neutral-2 neutral-3 never new new-component new:component no no-store node:crypto node:fs node:fs/promises node:module node:path node:url noindex non-empty none not note nowhere number object of off oklch on once one one-sentence only option options opts or order other out outline-none overflow-auto overflow-hidden overflow-x-auto overriding p p-hsp-2xs p-hsp-md p-hsp-sm pages pairs palette palette- panel panels parse parsed parser pass passes path per-element per-variant pick pill placeholders plain plugin plugins pnpm polite polyline postcss pre preact-render-to-string preact/hooks preact/jsx-runtime presentation preview previews primary property pt-vsp-xl pushes px px-hsp-2xs px-hsp-md px-hsp-sm px-hsp-xs py-vsp-2xs py-vsp-3xs py-vsp-xs radius rail ramp ramps range raw re-executed re-run read-only readonly ready real recover rect reference references regenerated region registration relative rem rem-aware rem-based rename renamed/removed render rendered renders replace required requires resolve resolved return returns rhythm robots root-absolute round rounded rounded-full rounded-md rounded-sm route router routes routes-src rows run runtime s same saved scaffold scaffolds screen scrim script search secondary section segment segments select semantic separator settings sg-catalog-tile-size sg-chip sg-chip-row sg-code-panel sg-code-panel-hidden sg-code-panel-resizer sg-code-panel-width sg-copy-btn sg-filter sg-filter-row sg-gallery-section sg-grid sg-injected- sg-preview-design-token-panel-modal sg-preview-design-tokens sg-preview-design-tokens/v1 sg-preview-tweak sg-registry sg-search-clear sg-search-field sg-search-input sg-seg sg-seg-btn sg-thumb sg-thumb-inner sg-thumb-note sg-tile sg-tile-count sg-tile-desc sg-tile-meta sg-tile-title sg-workbench-toolbar sg:height sg:ready sgt- shadow shape shared show shown shrink-0 sidebar sidebar- single-axis site size skipped skips slug so solid sorts source spacing span spec specimen stacked starting state state-danger state-danger-dark state-info state-info-dark state-success state-success-dark state-warning state-warning-dark stay step still story string strings stroke-linecap stroke-linejoin stroke-width style stylesheet supported surface surfaces svg swaps swatch tab tablet tablist tabs tabular-nums text text-2xl text-accent text-caption text-fg text-heading text-muted text-on-accent text-right text-sm text-small text-xl text-xs text/icons textarea that the their them theme then these this three-tier tier tile time tip title to toggle toggle-design-token-panel toggle-preview-token-panel token tokens total tracking-wide transition-colors true tsx tweaks twice two type typechecks ui- ui-color ui-defaults-dark ui-defaults-light ui-defaults-shared undefined under underline underline-offset-2 unknown unwired up uppercase us use used uses utf-8 utf8 valid value values var variant variants vertical via viewport views virtual:zudo-doc-chrome-bindings virtual:zudo-doc-route-context virtual:zudo-sg-context virtual:zudo-sg-preview-token-panel virtual:zudo-sg-registry virtual:zudo-sg-tokens visible visit vs vsp w-[2.5rem] w-[5rem] warning was weight were what when which while whole whose will window with without would written yield you your zd-content zdtp-preview-prehydrate zfb zudo-doc zudo-doc-sidebar-width zudo-sg zudo-sg-token-tweak-bridge");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takazudo/zudo-sg",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "zudo-sg styleguide engine — story registry, catalog routes and preview machinery for zfb + zudo-doc hosts.",
6
6
  "license": "MIT",
@@ -138,15 +138,15 @@
138
138
  "@tailwindcss/oxide": "^4.2.0"
139
139
  },
140
140
  "peerDependencies": {
141
- "@takazudo/zfb": "^2.19.0",
141
+ "@takazudo/zfb": "^2.20.0",
142
142
  "@takazudo/zdtp": "^0.8.0",
143
- "@takazudo/zudo-doc": "^5.26.0",
143
+ "@takazudo/zudo-doc": "^5.26.2",
144
144
  "preact": "^10.29.8"
145
145
  },
146
146
  "devDependencies": {
147
147
  "@takazudo/zdtp": "0.8.0",
148
- "@takazudo/zfb": "2.19.0",
149
- "@takazudo/zudo-doc": "5.26.0",
148
+ "@takazudo/zfb": "2.20.0",
149
+ "@takazudo/zudo-doc": "5.26.2",
150
150
  "@testing-library/jest-dom": "^6.9.1",
151
151
  "@testing-library/preact": "^3.2.4",
152
152
  "@types/culori": "^4.0.1",