mirror of
https://github.com/hanzoai/hanzo.industries.git
synced 2026-10-30 14:39:32 +00:00
8.0.47 deletes the `@font-face` pair from `dist/styles.css` and `dist/theme.css`. They were a duplicate of @hanzo/design's, pointing at `./assets/fonts/*.woff2` that @hanzo/ui has never shipped — which webpack, unlike Vite, compiles into a throwing module. Removing the duplicate leaves @hanzo/design the one owner of the faces and makes the sheets safe for a Next app to import. So the host declares the faces, and this app now delivers both halves: @import '@hanzo/design/tokens/fonts.css' the two variable woff2, self-hosted @import '@hanzo/ui/styles.css' the tokens AND the component classes Neither is optional and both fail silently. Without the first, every surface renders in `ui-sans-serif, system-ui` with a green build. Without the second, a Button's gui atomic classes name rules that do not exist. @hanzo/design's own `styles.css` is deliberately NOT imported next to ui's: their token blocks are byte-identical, 257 of 257 values, so importing both delivers every token twice. `gui-css-check` runs as `postbuild` because that second failure has no other witness — it reads every class in the rendered markup against every selector in every delivered sheet, linked and inline, and fails the build on a miss. It found three groups. The `btn-*` and `SelectTrigger` handles are @hanzo/ui's own (`buttonVariants`: "a stable class handle for hosts that hook buttons from CSS … styling lives in the tokens"), the same contract as the `hanzo-button` names css-check already allows by default — 8.0.47 renamed them and gui 8.0.2's list has not caught up. The third is /install's literal installer text, which quotes another origin's markup. All three are allowed in `gui-css-check.json`, each with the source that emits it, because an allowance without one is a shrug. Also drops `css-modules.d.ts`, which declared `*.css` a second time — `css.d.ts` already did, and one of them was always going to rot. Co-authored-by: Hanzo Dev <[email protected]>
12 lines
1.6 KiB
JSON
12 lines
1.6 KiB
JSON
{
|
|
"allow": ["btn", "btn-*", "SelectTrigger", "\"*"],
|
|
|
|
"why": {
|
|
"btn, btn-*": "@hanzo/ui 8.0.47, dist/backends/gui/button.js:132 — `buttonVariants` is documented there as 'A stable class handle for hosts that hook buttons from CSS. Styling lives in the tokens; this only names the variant and size.' The look is the gui atomic classes on the SAME element (_bg-color2, _minH-32px, _pr-c-space-3 …). This is the same contract as `hanzo-button` / `hanzo-button--*`, which css-check.mjs already allows by default; 8.0.47 renamed the handles to the `btn-` namespace and gui 8.0.2's built-in list has not caught up. Defining a local `.btn` rule would fight the tokens, not complete them.",
|
|
|
|
"SelectTrigger": "@hanzo/gui's component-name handle, emitted for @hanzo/ui's Select.Trigger (dist/backends/gui/select.js:23, which sets no className of its own). It lands last in the class list behind the gui atomics that style the control — the same family as `is_ListItem` / `is_View`, which css-check allows by default.",
|
|
|
|
"\"*": "NOT class names. /install renders an installer script as literal text inside a <pre>, and that text contains an HTML document of its own — `<body class=\"bg-background …\">` — for the stylesheet at https://hanzo.sh, a different origin. React does not escape `\"` in a text node, so the check's class-attribute scan reads those quoted runs as markup and reports the first token of each with its opening quote still attached. A real class token cannot begin with `\"`: the attribute parser would have consumed it. So this pattern cannot mask a genuine miss, and it is scoped to the one shape that only text produces."
|
|
}
|
|
}
|