@takazudo/zudo-sg 0.1.0 → 0.1.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 +40 -0
- package/README.md +8 -6
- package/package.json +5 -5
- package/routes-src/_chrome.tsx +8 -7
- package/routes-src/_preview-app.tsx +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,46 @@ 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.1.2] - 2026-09-19
|
|
8
|
+
|
|
9
|
+
A toolchain-only release. The engine is built and verified against
|
|
10
|
+
`@takazudo/zfb` 2.19.0, but its published requirements are unchanged, so
|
|
11
|
+
upgrading from 0.1.1 needs no action from adopters.
|
|
12
|
+
|
|
13
|
+
### Other Changes
|
|
14
|
+
|
|
15
|
+
- Moved the development toolchain to the `@takazudo/zfb` 2.19.0 family
|
|
16
|
+
(`zfb`, `zfb-runtime`, `zfb-md-wasm`). The release adds an opt-in build
|
|
17
|
+
debugging flag and an internal dependency bump; it changes no API the engine
|
|
18
|
+
consumes.
|
|
19
|
+
- **The `@takazudo/zfb` peer floor stays `^2.18.0`.** It was raised to
|
|
20
|
+
`^2.18.0` only because `@takazudo/zudo-doc` 5.25.0's own floor forced it, and
|
|
21
|
+
that floor has not moved. Raising it again for a release the engine does not
|
|
22
|
+
depend on would bind adopters to a newer zfb for no benefit, so hosts on zfb
|
|
23
|
+
2.18.x remain supported.
|
|
24
|
+
- Verified by the foreign-install check, which installs the package outside the
|
|
25
|
+
workspace under strict peer resolution with no peer auto-install, and by the
|
|
26
|
+
seedless dev-server regression guard for injected-route island and CSS
|
|
27
|
+
discovery, both run against zfb 2.19.0.
|
|
28
|
+
|
|
29
|
+
## [0.1.1] - 2026-09-17
|
|
30
|
+
|
|
31
|
+
Updates the styleguide engine to use zudo-doc's native sidebar integration
|
|
32
|
+
and zfb's package-route island discovery.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- Raised the `@takazudo/zfb` peer floor to `^2.18.0` and the
|
|
37
|
+
`@takazudo/zudo-doc` peer floor to `^5.25.0` (matching exact
|
|
38
|
+
`devDependencies` pins). This is forced, not elective: zudo-doc 5.25.0
|
|
39
|
+
raised its own `@takazudo/zfb` peer floor to `^2.18.0`, so the engine's
|
|
40
|
+
floor must follow to keep resolving against it.
|
|
41
|
+
- Pass the component navigation tree through zudo-doc's native `sidebarNodes`
|
|
42
|
+
header prop, removing the need for a host-bound Header workaround.
|
|
43
|
+
- Document that zfb 2.18.0 discovers engine islands from injected routes during
|
|
44
|
+
development. The `@takazudo/zudo-sg/islands` entry point remains available
|
|
45
|
+
for API compatibility, but hosts no longer need it as a dev-hydration seed.
|
|
46
|
+
|
|
7
47
|
## [0.1.0] - 2026-09-15
|
|
8
48
|
|
|
9
49
|
Initial release of `@takazudo/zudo-sg`, the installable styleguide engine
|
package/README.md
CHANGED
|
@@ -41,10 +41,10 @@ enable them later).
|
|
|
41
41
|
## Installation
|
|
42
42
|
|
|
43
43
|
```sh
|
|
44
|
-
pnpm add @takazudo/zudo-sg@latest @takazudo/zfb@^2.
|
|
44
|
+
pnpm add @takazudo/zudo-sg@latest @takazudo/zfb@^2.18.0 @takazudo/zfb-md-wasm@^2.18.0 @takazudo/zfb-runtime@^2.18.0 @takazudo/zudo-doc@^5.25.0 @takazudo/zdtp@^0.8.0 diff@^8.0.4 katex@^0.16.38 preact@^10.29.1 preact-render-to-string@^6.6.6 tailwindcss@^4.2.0 zod@^4.3.6
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
The engine peers are `@takazudo/zfb ^2.
|
|
47
|
+
The engine peers are `@takazudo/zfb ^2.18.0`, `@takazudo/zudo-doc ^5.25.0`,
|
|
48
48
|
`@takazudo/zdtp ^0.8.0`, and `preact ^10.29.1`. `@takazudo/zdtp` is required:
|
|
49
49
|
the injected `/tokens` route imports its dashboard at build time. The
|
|
50
50
|
`@takazudo/zfb-md-wasm`, `@takazudo/zfb-runtime`, `diff`, `katex`, and `zod`
|
|
@@ -80,10 +80,12 @@ export default defineConfig(
|
|
|
80
80
|
|
|
81
81
|
`withZudoSg` merges the engine's plugins and collections after the zudo-doc
|
|
82
82
|
preset's own. The engine requires `packageOwnedRoutes: true` on the host (its
|
|
83
|
-
routes import zudo-doc's route-context virtual modules)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
routes import zudo-doc's route-context virtual modules). On the engine's zfb
|
|
84
|
+
peer floor (≥ 2.18.0) nothing else is needed: `zfb dev` seeds its island
|
|
85
|
+
scanner from the injected routes. `@takazudo/zudo-sg/islands` remains
|
|
86
|
+
exported as a side-effect module that statically imports every engine
|
|
87
|
+
island — importing it once from a host `pages/` file is optional and
|
|
88
|
+
harmless (it was required on zfb < 2.18.0).
|
|
87
89
|
|
|
88
90
|
Full option shape, virtual modules, and every locked constant:
|
|
89
91
|
`docs/adr/styleguide-engine.md` in this repository.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takazudo/zudo-sg",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.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",
|
|
@@ -138,15 +138,15 @@
|
|
|
138
138
|
"@tailwindcss/oxide": "^4.2.0"
|
|
139
139
|
},
|
|
140
140
|
"peerDependencies": {
|
|
141
|
-
"@takazudo/zfb": "^2.
|
|
141
|
+
"@takazudo/zfb": "^2.18.0",
|
|
142
142
|
"@takazudo/zdtp": "^0.8.0",
|
|
143
|
-
"@takazudo/zudo-doc": "^5.
|
|
143
|
+
"@takazudo/zudo-doc": "^5.25.0",
|
|
144
144
|
"preact": "^10.29.1"
|
|
145
145
|
},
|
|
146
146
|
"devDependencies": {
|
|
147
147
|
"@takazudo/zdtp": "0.8.0",
|
|
148
|
-
"@takazudo/zfb": "2.
|
|
149
|
-
"@takazudo/zudo-doc": "5.
|
|
148
|
+
"@takazudo/zfb": "2.19.0",
|
|
149
|
+
"@takazudo/zudo-doc": "5.25.0",
|
|
150
150
|
"@testing-library/jest-dom": "^6.9.1",
|
|
151
151
|
"@testing-library/preact": "^3.2.4",
|
|
152
152
|
"@types/culori": "^4.0.1",
|
package/routes-src/_chrome.tsx
CHANGED
|
@@ -52,15 +52,16 @@ type ChromeProps = Pick<
|
|
|
52
52
|
export function chromeProps({ pageTitle, path, extraHead, activeSlug, hideSidebar = false }: ChromeSlotOptions): ChromeProps {
|
|
53
53
|
const { HeadWithDefaults, HeaderWithDefaults, FooterWithDefaults, BodyEndIslands } = chrome;
|
|
54
54
|
const head = <HeadWithDefaults title={pageTitle} />;
|
|
55
|
-
// `
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
|
|
55
|
+
// `sidebarNodes` (zudo-doc >= 5.25.0, zudolab/zudo-doc#4212) hands the
|
|
56
|
+
// registry-built tree straight to the mobile drawer, so the engine routes get
|
|
57
|
+
// the component tree without the host having to bind a replacement `Header`.
|
|
58
|
+
// The array form is passed to `SidebarToggle` verbatim — no default build, no
|
|
59
|
+
// version-href remapping — which is what these non-docs routes need.
|
|
60
|
+
const headerProps: Parameters<typeof HeaderWithDefaults>[0] = {
|
|
60
61
|
lang: locale,
|
|
61
62
|
currentPath: withBase(path),
|
|
62
|
-
...(hideSidebar ? {} : {
|
|
63
|
-
}
|
|
63
|
+
...(hideSidebar ? {} : { sidebarNodes: navNodes, currentSlug: activeSlug }),
|
|
64
|
+
};
|
|
64
65
|
return {
|
|
65
66
|
title: composeMetaTitle(pageTitle),
|
|
66
67
|
lang: locale,
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
// wrapper takes NO props and imports the registry in-bundle (through
|
|
10
10
|
// `_registry.ts` → `virtual:zudo-sg-registry`), which puts every story closure
|
|
11
11
|
// into the islands chunk. `components-preview.tsx` imports it statically so
|
|
12
|
-
// `zfb build` registers it; `@takazudo/zudo-sg/islands` imports it too
|
|
13
|
-
//
|
|
12
|
+
// `zfb build` registers it; `@takazudo/zudo-sg/islands` imports it too (the
|
|
13
|
+
// kept-for-API seed; zfb ≥ 2.18.0 registers it from the route entrypoint in
|
|
14
|
+
// dev as well — ADR finding 4 amendment).
|
|
14
15
|
//
|
|
15
16
|
// The design-token bridge receiver is installed here, not inside PreviewApp,
|
|
16
17
|
// so the engine's preview component stays free of the token-tweak feature.
|