@takazudo/zudo-sg 0.9.0 → 0.9.2

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,36 @@ 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.9.2] - 2026-11-11
8
+
9
+ This release raises the engine's tested peer floors to the published
10
+ zudo-doc 10.0.3 and zdtp 0.9.4 patches. Those tarballs are pin, peer, and
11
+ declaration changes, with no engine product-code change.
12
+
13
+ ### Other Changes
14
+
15
+ - The `@takazudo/zudo-doc` peer is now `^10.0.3` (was `^10.0.1`).
16
+ - The `@takazudo/zdtp` peer is now `^0.9.4` (was `^0.9.3`).
17
+
18
+ ## [0.9.1] - 2026-11-11
19
+
20
+ This release fixes first-paint theme packs on host pages and engine catalog
21
+ routes, and raises the zudo-doc peer floor to the published 10.0.1 patch.
22
+
23
+ ### Bug Fixes
24
+
25
+ - Host pages and engine catalog routes server-render the configured theme pack
26
+ (`data-theme-pack` plus the theme-pack bootstrap), so a first load of `/`,
27
+ `/docs/versions`, and the catalog no longer paints Classic when the host
28
+ selected another pack.
29
+
30
+ ### Other Changes
31
+
32
+ - The `@takazudo/zudo-doc` peer is now `^10.0.1` (was `^10.0.0`).
33
+ - Engine tooling moves to Vite 8.3.7, Vitest 5.1.0, and happy-dom 21.0.4.
34
+ - Remaining Dependabot and package bumps land with this release; MSW stays at
35
+ 2.15.0 so the site bundle keeps resolving.
36
+
7
37
  ## [0.9.0] - 2026-11-10
8
38
 
9
39
  This release moves the engine onto zfb 6 and zudo-doc 10. The engine's public
package/README.md CHANGED
@@ -132,11 +132,11 @@ output as drift and never writes it.
132
132
  ## Installation
133
133
 
134
134
  ```sh
135
- pnpm add @takazudo/zudo-sg@latest @takazudo/zfb@^6.0.1 @takazudo/zfb-md-wasm@^6.0.1 @takazudo/zfb-runtime@^6.0.1 @takazudo/zudo-doc@^10.0.0 @takazudo/zdtp@^0.9.3 diff@^8.0.4 katex@^0.19.0 zod@^4.3.6
135
+ pnpm add @takazudo/zudo-sg@latest @takazudo/zfb@^6.0.1 @takazudo/zfb-md-wasm@^6.0.1 @takazudo/zfb-runtime@^6.0.1 @takazudo/zudo-doc@^10.0.3 @takazudo/zdtp@^0.9.4 diff@^8.0.4 katex@^0.19.1 zod@^4.3.6
136
136
  ```
137
137
 
138
- The engine peers are `@takazudo/zfb ^6.0.1`, `@takazudo/zudo-doc ^10.0.0`,
139
- and `@takazudo/zdtp ^0.9.3`. zfb 6 and zudo-doc 10 require Node.js 24, and
138
+ The engine peers are `@takazudo/zfb ^6.0.1`, `@takazudo/zudo-doc ^10.0.3`,
139
+ and `@takazudo/zdtp ^0.9.4`. zfb 6 and zudo-doc 10 require Node.js 24, and
140
140
  zudo-doc requires KaTeX `^0.18.2 || ^0.19.0`. The former zudo-doc 6.2.0 /
141
141
  Node.js 22 option was retired with zfb 5. `@takazudo/zdtp` is required:
142
142
  the injected `/tokens` route loads its dashboard through the engine-owned
@@ -53,6 +53,12 @@ export interface StyleguideLayoutProps {
53
53
  enableClientRouter: boolean;
54
54
  /** Mirrors the host's `settings.noindex`. */
55
55
  noindex: boolean;
56
+ /**
57
+ * Build-static `<html data-theme-pack>` value. Engine routes compute it
58
+ * with `resolveThemePackSsrSlug` and pass it through `chromeProps`.
59
+ * Omitted when the theme-pack registry was not threaded.
60
+ */
61
+ dataThemePack?: string;
56
62
  children: Child;
57
63
  }
58
- export declare function StyleguideLayout({ title, activeSlug, lang, hideSidebar, head, header, footer, bodyEnd, codePanel, contentWide, navNodes, sidebarToggle, enableClientRouter, noindex, children, }: StyleguideLayoutProps): JSX.Element;
64
+ export declare function StyleguideLayout({ title, activeSlug, lang, hideSidebar, head, header, footer, bodyEnd, codePanel, contentWide, navNodes, sidebarToggle, enableClientRouter, noindex, dataThemePack, children, }: StyleguideLayoutProps): JSX.Element;
@@ -22,6 +22,7 @@ function StyleguideLayout({
22
22
  sidebarToggle,
23
23
  enableClientRouter,
24
24
  noindex,
25
+ dataThemePack,
25
26
  children
26
27
  }) {
27
28
  const showCodePanel = Boolean(codePanel);
@@ -45,6 +46,7 @@ function StyleguideLayout({
45
46
  title,
46
47
  enableClientRouter,
47
48
  head: composedHead,
49
+ dataThemePack,
48
50
  lang,
49
51
  noindex,
50
52
  hideSidebar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takazudo/zudo-sg",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
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",
@@ -152,29 +152,29 @@
152
152
  "@codemirror/lang-javascript": "^6.0.0",
153
153
  "@codemirror/language": "^6.13.1",
154
154
  "@codemirror/state": "^6.7.6",
155
- "@codemirror/view": "^6.43.14",
155
+ "@codemirror/view": "^6.43.15",
156
156
  "@lezer/highlight": "^1.2.5",
157
- "postcss": "^8.5.28"
157
+ "postcss": "^8.5.32"
158
158
  },
159
159
  "peerDependencies": {
160
160
  "@takazudo/zfb": "^6.0.1",
161
- "@takazudo/zdtp": "^0.9.3",
162
- "@takazudo/zudo-doc": "^10.0.0"
161
+ "@takazudo/zdtp": "^0.9.4",
162
+ "@takazudo/zudo-doc": "^10.0.3"
163
163
  },
164
164
  "devDependencies": {
165
- "@takazudo/zdtp": "0.9.3",
165
+ "@takazudo/zdtp": "0.9.4",
166
166
  "@takazudo/zfb": "6.0.1",
167
- "@takazudo/zudo-doc": "10.0.0",
167
+ "@takazudo/zudo-doc": "10.0.3",
168
168
  "@testing-library/jest-dom": "^7.0.1",
169
169
  "@types/culori": "^4.0.1",
170
- "@types/node": "^22.20.5",
170
+ "@types/node": "^24.19.2",
171
171
  "culori": "^4.0.2",
172
- "happy-dom": "20.14.6",
173
- "tsup": "^8.5.0",
172
+ "happy-dom": "21.0.4",
173
+ "tsup": "^9.0.0",
174
174
  "@typescript/native": "npm:typescript@^7.0.2",
175
175
  "typescript": "npm:@typescript/typescript6@^6.0.2",
176
- "vite": "7.3.5",
177
- "vitest": "4.1.11"
176
+ "vite": "8.3.7",
177
+ "vitest": "5.1.0"
178
178
  },
179
179
  "scripts": {
180
180
  "build": "tsup && tsc -p tsconfig.build.json",
@@ -13,6 +13,7 @@ import { routeContext } from "virtual:zudo-doc-route-context";
13
13
  import { chromeBindings } from "virtual:zudo-doc-chrome-bindings";
14
14
  import { createRouteContext, type RouteContextPayload } from "@takazudo/zudo-doc/route-context";
15
15
  import { createChrome } from "@takazudo/zudo-doc/chrome";
16
+ import { resolveThemePackSsrSlug } from "@takazudo/zudo-doc/theme";
16
17
  import type { StyleguideLayoutProps } from "@takazudo/zudo-sg/chrome";
17
18
  import { buildNavNodes } from "@takazudo/zudo-sg/registry";
18
19
  import { ctx, withBase } from "./_context.js";
@@ -25,6 +26,14 @@ export const locale = routeCtx.defaultLocale;
25
26
  const chrome = createChrome(routeCtx, chromeBindings);
26
27
  export const { composeMetaTitle } = chrome;
27
28
 
29
+ // Same SSR slug the package doc routes stamp on `<html>`. `?? null` keeps a
30
+ // missing registry inert — the chrome unit stub omits the field, and
31
+ // `resolveThemePackSsrSlug` only treats `null` as "feature off".
32
+ export const themePackSsrSlug = resolveThemePackSsrSlug(
33
+ routeCtx.themePackRegistry ?? null,
34
+ routeCtx.settings,
35
+ );
36
+
28
37
  /** The styleguide sidebar tree, built once and shared by every engine route. */
29
38
  export const navNodes = buildNavNodes(registry, { withBase, routes: ctx.routes });
30
39
 
@@ -43,7 +52,7 @@ export interface ChromeSlotOptions {
43
52
 
44
53
  type ChromeProps = Pick<
45
54
  StyleguideLayoutProps,
46
- "title" | "lang" | "head" | "header" | "footer" | "bodyEnd" | "navNodes" | "sidebarToggle" | "enableClientRouter" | "noindex"
55
+ "title" | "lang" | "head" | "header" | "footer" | "bodyEnd" | "navNodes" | "sidebarToggle" | "enableClientRouter" | "noindex" | "dataThemePack"
47
56
  >;
48
57
 
49
58
  /** Every StyleguideLayout prop that comes from the doc chrome and the site settings. */
@@ -90,5 +99,6 @@ export function chromeProps({ pageTitle, path, extraHead, activeSlug, hideSideba
90
99
  sidebarToggle: Boolean(settings.sidebarToggle),
91
100
  enableClientRouter: Boolean(settings.dynamicPageTransition),
92
101
  noindex: Boolean(settings.noindex),
102
+ dataThemePack: themePackSsrSlug,
93
103
  };
94
104
  }