create-zudo-sg 0.1.1 → 0.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/CHANGELOG.md +36 -0
- package/README.md +27 -0
- package/package.json +1 -1
- package/templates/default/package.json +1 -1
- package/templates/default/pages/index.tsx +20 -3
- package/templates/default/pnpm-workspace.yaml +1 -1
- package/templates/default/src/styles/global.css +10 -0
- package/templates/default/src/styles/ui-tokens.css +11 -2
- package/templates/default/zfb.config.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,42 @@ All notable changes to `create-zudo-sg` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on Keep a Changelog.
|
|
6
6
|
|
|
7
|
+
## [0.1.3] - 2026-09-21
|
|
8
|
+
|
|
9
|
+
Stops fresh starters from requesting favicons they never shipped, and moves
|
|
10
|
+
them onto the engine's new chrome token namespace.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Set the starter's favicon to the self-contained inline icon instead of
|
|
15
|
+
advertising four `/favicon*` files the template does not create, which made a
|
|
16
|
+
clean build log four missing-asset errors on first load.
|
|
17
|
+
- Verify after every packed build that each local head asset a generated page
|
|
18
|
+
links to actually exists, so a reintroduced missing icon or stylesheet fails
|
|
19
|
+
the release gate rather than the adopter's browser console.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Update the starter engine range to `@takazudo/zudo-sg ^0.3.0`, which reads its
|
|
24
|
+
chrome colors from the `--sg-*` namespace. The starter's own stylesheet now
|
|
25
|
+
sets those roles explicitly, so the catalog chrome renders correctly whatever
|
|
26
|
+
order a project imports its component theme in.
|
|
27
|
+
|
|
28
|
+
## [0.1.2] - 2026-09-20
|
|
29
|
+
|
|
30
|
+
Gives fresh starter projects a styled homepage and usable default navigation.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- Style the host-owned homepage with token-based typography, spacing, and
|
|
35
|
+
clearly visible links to Components and Design Tokens after Tailwind preflight.
|
|
36
|
+
- Verify the packed starter's homepage markup and generated utility CSS.
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- Update the starter engine range to `@takazudo/zudo-sg ^0.2.2`, which supplies
|
|
41
|
+
default header navigation and search controls for minimally configured hosts.
|
|
42
|
+
|
|
7
43
|
## [0.1.1] - 2026-09-20
|
|
8
44
|
|
|
9
45
|
Hardens fresh starter projects and aligns them with `@takazudo/zudo-sg 0.2.1`.
|
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ The template is a minimal host, not a copy of this repository's full site. It
|
|
|
50
50
|
contains:
|
|
51
51
|
|
|
52
52
|
- `zfb.config.ts` composing `zudoDoc()` and `withZudoSg()` with a root base.
|
|
53
|
+
- `zfb.config.ts` uses an inline `favicon: "auto"`; replace it with a path or `FaviconConfig` when adding real icons under `public/`.
|
|
53
54
|
- `zudo-sg.config.mjs` with a local `ui/` components root, registry output,
|
|
54
55
|
preview stylesheet, category order, and token-manifest inputs.
|
|
55
56
|
- `pages/index.tsx` and an optional `pages/lib/_zudo-sg-islands.ts` import
|
|
@@ -100,6 +101,32 @@ host defines consumer-only color tokens before zudo-doc's theme, replace
|
|
|
100
101
|
omits the color-token reset; tokens defined by both stylesheets still follow
|
|
101
102
|
source order.
|
|
102
103
|
|
|
104
|
+
### Three token worlds and engine overrides
|
|
105
|
+
|
|
106
|
+
The generated host has three color-token worlds: zudo-doc's `--zd-*` roles for the
|
|
107
|
+
documentation shell, zudo-sg's raw `--sg-*` roles for catalog chrome, and the host
|
|
108
|
+
component library's own `@theme` color tokens (usually `--color-*`) for previewed
|
|
109
|
+
components. Keep the engine and component-library roles separate.
|
|
110
|
+
|
|
111
|
+
The engine defaults are plain `--sg-*` properties under `:where(:root)`, so zudo-doc's
|
|
112
|
+
`theme.css` `--color-*` reset cannot erase them. Retheme engine chrome with an ordinary,
|
|
113
|
+
unlayered override in any import position:
|
|
114
|
+
|
|
115
|
+
```css
|
|
116
|
+
:root {
|
|
117
|
+
--sg-border: oklch(0.72 0.02 65);
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
If the host previously used bare `--color-border` to style engine chrome, migrate that
|
|
122
|
+
declaration to `--sg-border` (and migrate each other chrome role to its corresponding
|
|
123
|
+
`--sg-*` role). `--color-border` can still style the host's own components. The
|
|
124
|
+
order-proof engine hook does not change the import-order contract for those host-owned
|
|
125
|
+
`@theme` colors: import `theme.css` before them, or deliberately use
|
|
126
|
+
`theme-no-reset.css` when their earlier declaration must be preserved. This is the
|
|
127
|
+
zudo-doc namespace contract for host-owned color tokens; the engine's raw `--sg-*`
|
|
128
|
+
namespace is separate.
|
|
129
|
+
|
|
103
130
|
The preview document uses `src/styles/preview-entry.css` independently. Add
|
|
104
131
|
your component package's styles and source scan there too when previews need
|
|
105
132
|
them; its `@source` paths are relative to that stylesheet. Keep dashboard and
|
package/package.json
CHANGED
|
@@ -12,11 +12,28 @@ export default function IndexPage(): JSX.Element {
|
|
|
12
12
|
<html lang="en">
|
|
13
13
|
<head>
|
|
14
14
|
<meta charSet="utf-8" />
|
|
15
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
15
16
|
<title>Styleguide starter</title>
|
|
16
17
|
</head>
|
|
17
|
-
<body>
|
|
18
|
-
<
|
|
19
|
-
|
|
18
|
+
<body class="min-h-screen bg-bg font-sans text-base leading-normal text-fg">
|
|
19
|
+
<main class="mx-auto flex max-w-[48rem] flex-col gap-vsp-lg px-hsp-lg py-vsp-2xl">
|
|
20
|
+
<h1 data-host-index class="text-2xl font-bold leading-tight">Styleguide starter</h1>
|
|
21
|
+
<p class="text-muted">Explore your components, their stories, and the design tokens that bring them together.</p>
|
|
22
|
+
<nav aria-label="Styleguide" class="flex flex-wrap gap-hsp-md">
|
|
23
|
+
<a
|
|
24
|
+
href="/components"
|
|
25
|
+
class="inline-flex px-hsp-sm py-vsp-sm font-semibold text-accent underline hover:text-accent-hover focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus"
|
|
26
|
+
>
|
|
27
|
+
Components
|
|
28
|
+
</a>
|
|
29
|
+
<a
|
|
30
|
+
href="/tokens"
|
|
31
|
+
class="inline-flex px-hsp-sm py-vsp-sm font-semibold text-accent underline hover:text-accent-hover focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus"
|
|
32
|
+
>
|
|
33
|
+
Design Tokens
|
|
34
|
+
</a>
|
|
35
|
+
</nav>
|
|
36
|
+
</main>
|
|
20
37
|
</body>
|
|
21
38
|
</html>
|
|
22
39
|
);
|
|
@@ -21,6 +21,16 @@
|
|
|
21
21
|
@import "@takazudo/zudo-sg/styles.css";
|
|
22
22
|
@import "@takazudo/zudo-sg/safelist.css";
|
|
23
23
|
|
|
24
|
+
/* The engine chrome owns raw --sg-* tokens and no longer needs the host's
|
|
25
|
+
* bare --color-* values. To theme chrome intentionally, add an unlayered
|
|
26
|
+
* override after these imports, for example:
|
|
27
|
+
*
|
|
28
|
+
* :root {
|
|
29
|
+
* --sg-border: #94a3b8;
|
|
30
|
+
* --sg-accent: #7c3aed;
|
|
31
|
+
* }
|
|
32
|
+
*/
|
|
33
|
+
|
|
24
34
|
/* zfb resolves these global-entry globs from the project root.
|
|
25
35
|
* Add your component package's @source here; package chrome uses the safelists. */
|
|
26
36
|
@source "pages/**/*.{tsx,ts,jsx,js}";
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
/* Self-contained input for the packed gen-token-manifest CLI. The current
|
|
2
|
-
* generator requires this complete vocabulary; none comes from demo-ui
|
|
3
|
-
* the workspace. The
|
|
2
|
+
* generator requires this complete host vocabulary; none comes from demo-ui
|
|
3
|
+
* or the workspace. The engine chrome owns raw --sg-* tokens and no longer
|
|
4
|
+
* depends on these bare --color-* values. Keep the vocabulary for host
|
|
5
|
+
* components and the manifest; override chrome separately in global.css, e.g.:
|
|
6
|
+
*
|
|
7
|
+
* :root {
|
|
8
|
+
* --sg-border: #94a3b8;
|
|
9
|
+
* --sg-accent: #7c3aed;
|
|
10
|
+
* }
|
|
11
|
+
*
|
|
12
|
+
* The Button/Card still use only the original five tokens. */
|
|
4
13
|
:root {
|
|
5
14
|
--palette-neutral-0: #ffffff;
|
|
6
15
|
--palette-neutral-1: #e2e8f0;
|
|
@@ -15,6 +15,8 @@ export default defineConfig(
|
|
|
15
15
|
siteName: "Styleguide Starter",
|
|
16
16
|
base: "/",
|
|
17
17
|
port: 4397,
|
|
18
|
+
// The starter ships no public/ icons; replace "auto" with a path or FaviconConfig once real icons exist.
|
|
19
|
+
favicon: "auto",
|
|
18
20
|
// No mermaid diagrams anywhere in this starter's one seed doc; turned
|
|
19
21
|
// off rather than leaving the default on to keep the dependency set
|
|
20
22
|
// minimal (see package.json).
|