@iksnerd/blazon 0.1.1 → 0.2.0
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/README.md +3 -3
- package/dist/chunks/{site-builder-CPfjBOmR.js → site-builder-BtGOvjBC.js} +2331 -2633
- package/dist/cli/commands/tokens.d.ts +4 -0
- package/dist/cli/commands/tokens.d.ts.map +1 -1
- package/dist/cli/handlers/brand.d.ts +1 -1
- package/dist/cli/handlers/index.d.ts +2 -2
- package/dist/cli/index.js +915 -941
- package/dist/core/brand/export.d.ts +2 -9
- package/dist/core/brand/export.d.ts.map +1 -1
- package/dist/core/brand/schema.d.ts +0 -58
- package/dist/core/brand/schema.d.ts.map +1 -1
- package/dist/core/brand-theme.d.ts +0 -2
- package/dist/core/brand-theme.d.ts.map +1 -1
- package/dist/core/checker/catalogue.d.ts +2 -2
- package/dist/core/checker/contrast.d.ts +1 -1
- package/dist/core/checker/variables.d.ts +2 -2
- package/dist/core/checker/variables.d.ts.map +1 -1
- package/dist/core/config/removed-keys.d.ts +6 -0
- package/dist/core/config/removed-keys.d.ts.map +1 -0
- package/dist/core/config/validate.d.ts +1 -1
- package/dist/core/config/validate.d.ts.map +1 -1
- package/dist/core/emit.d.ts +1 -3
- package/dist/core/emit.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/operations/list.d.ts.map +1 -1
- package/dist/core/plugin-name.d.ts +1 -1
- package/dist/core/read/token.d.ts +1 -6
- package/dist/core/read/token.d.ts.map +1 -1
- package/dist/index.js +33 -33
- package/dist/plugins/roles/integrate.d.ts +5 -2
- package/dist/plugins/roles/integrate.d.ts.map +1 -1
- package/dist/plugins/roles/roles.d.ts +5 -2
- package/dist/plugins/roles/roles.d.ts.map +1 -1
- package/dist/plugins/wire/profile.d.ts +5 -0
- package/dist/plugins/wire/profile.d.ts.map +1 -1
- package/dist/types/config.d.ts +1 -3
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/theme.d.ts +0 -3
- package/dist/types/theme.d.ts.map +1 -1
- package/dist/ui/assets/{index-D0WCUmtA.css → index-DluSqfla.css} +1 -1
- package/dist/ui/index.html +2 -2
- package/package.json +1 -1
- package/plugins/blazon.brand-deck/bin/blazon-blazon.brand-deck./360/237/224/214 +24 -2
- package/plugins/blazon.copy/bin/blazon-blazon.copy./360/237/224/214 +25 -3
- package/plugins/blazon.favicons/bin/blazon-blazon.favicons./360/237/224/214 +26 -3
- package/plugins/blazon.logo-geometry/bin/blazon-blazon.logo-geometry./360/237/224/214 +37 -8
- package/plugins/blazon.logo-kit/bin/blazon-blazon.logo-kit./360/237/224/214 +37 -8
- package/plugins/blazon.office-template/bin/blazon-blazon.office-template./360/237/224/214 +37 -8
- package/plugins/blazon.platform-tokens/bin/blazon-blazon.platform-tokens./360/237/224/214 +37 -9
- package/plugins/blazon.press-kit/bin/blazon-blazon.press-kit./360/237/224/214 +37 -8
- package/plugins/blazon.print-book/bin/blazon-blazon.print-book./360/237/224/214 +36 -7
- package/plugins/blazon.shadcn/README.md +27 -0
- package/plugins/blazon.shadcn/bin/blazon-blazon.shadcn./360/237/224/214 +8273 -0
- package/plugins/blazon.shadcn/package.json +3 -0
- package/plugins/blazon.social-cards/bin/blazon-blazon.social-cards./360/237/224/214 +37 -8
- package/plugins/blazon.tailwind/README.md +23 -0
- package/plugins/blazon.tailwind/bin/blazon-blazon.tailwind./360/237/224/214 +420 -0
- package/plugins/blazon.tailwind/package.json +3 -0
- package/plugins/shipped.lock +24 -10
- package/template/AGENTS.md +1 -1
- package/template/blazon.json +0 -10
- package/template/docs/12-web.md +2 -2
- package/dist/core/tokens/formatters/tailwind.d.ts +0 -37
- package/dist/core/tokens/formatters/tailwind.d.ts.map +0 -1
- package/dist/core/tokens/shadcn.d.ts +0 -43
- package/dist/core/tokens/shadcn.d.ts.map +0 -1
- /package/dist/ui/assets/{index-DhSc0Zxv.js → index-CLKH0m9J.js} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# blazon.shadcn
|
|
2
|
+
|
|
3
|
+
The plugin blazon ships to write which token each shadcn/ui variable takes, and those variables as CSS. It fills the `build` role and needs only Node: no browser. It reads `brand.json` through the plugin protocol and nothing else, and it reads no site, so `blazon tokens` runs it as well as `blazon build`. Blazon's core knows no UI library by name.
|
|
4
|
+
|
|
5
|
+
The source is `src/shipped/shadcn/`, and `npm run build:plugins` bundles it, with the blazon code it uses, into `bin/blazon-blazon.shadcn.🔌`, the one file that holds the plugin's code and that `plugins/shipped.lock` pins. It loads nothing from `node_modules`. The manual's plugins chapter says what to put in the config, and chapter 19 how to use the files.
|
|
6
|
+
|
|
7
|
+
## What it writes
|
|
8
|
+
|
|
9
|
+
To `<tokensOutDir>/blazon.shadcn/` (`dist/tokens/blazon.shadcn/`):
|
|
10
|
+
|
|
11
|
+
| File | Holds |
|
|
12
|
+
|---|---|
|
|
13
|
+
| `shadcn.json` | For each shadcn variable blazon supplies, the token it takes, its value in the default context and where the pick came from (`theme` or `config`); `unsupplied`, the variables nothing supplies; and, when the brand declares contrast `pairs`, `pairs`, each shadcn text-on-surface pair with whether a rule covers its two tokens |
|
|
14
|
+
| `shadcn.css` | A `:root` block with each supplied variable, and a block under the selector of each other context for the variables that context changes |
|
|
15
|
+
|
|
16
|
+
A variable takes its value from the theme role it reads (`background` for `--background`, `accent` for `--primary`, and so on, the same picks the brand book's own components use), or from the token the `variables` option names for it. `destructive` and `chart-1` to `chart-5` have no role, so only the option fills them.
|
|
17
|
+
|
|
18
|
+
## Options
|
|
19
|
+
|
|
20
|
+
`variables`: an object of shadcn variable names (without the leading dashes) to token paths. A pick wins over the role.
|
|
21
|
+
|
|
22
|
+
## Findings
|
|
23
|
+
|
|
24
|
+
| Code | Severity | When |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `blazon.shadcn/token-missing` | error | A pick in `variables` names a path that is not a token; the variable falls back to its role |
|
|
27
|
+
| `blazon.shadcn/option-invalid` | error | An option is not one of the above, or `variables` names a variable shadcn does not have |
|