@iksnerd/blazon 0.2.0 → 0.2.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/README.md CHANGED
@@ -157,7 +157,7 @@ A plugin whose manifest lists a variable that is set, and that the entry does no
157
157
  | [`blazon.press-kit`](docs/manual/14-shipped-plugins.md#blazonpress-kit) | A folder and zip for people outside the brand: logos, colors, fonts, a one-page PDF |
158
158
  | [`blazon.social-cards`](docs/manual/14-shipped-plugins.md#blazonsocial-cards) | Marketing images from the tokens and logo, checked for contrast |
159
159
 
160
- Several need Chrome for their PDF or PNG output; the manual says which. The starter's config enables `blazon.copy` with blazon's own rules, and leaves out the other plugins of blazon's own book (the deck, the social cards, the favicons, the logo kit, the press kit and the platform and Office files), because most need Chrome and a new book has no use for the kits yet; add one by name when you want it. To write your own, see [Writing a plugin](docs/manual/13-writing-a-plugin.md). A plugin can be pinned, so one that changed on disk does not run.
160
+ Several need Chrome for their PDF or PNG output; the manual says which. The starter's config lists `blazon.copy` with blazon's own rules, and `blazon.tailwind` and `blazon.shadcn`, which need only Node and write the Tailwind and shadcn/ui files. It leaves out the other plugins of blazon's own book (the deck, the social cards, the favicons, the logo kit, the press kit and the platform and Office files), because most need Chrome and a new book has no use for the kits yet; add one by name when you want it. To write your own, see [Writing a plugin](docs/manual/13-writing-a-plugin.md). A plugin can be pinned, so one that changed on disk does not run.
161
161
 
162
162
  ## Using the tokens
163
163
 
@@ -10042,7 +10042,11 @@ function Kh() {
10042
10042
  r = n;
10043
10043
  }
10044
10044
  }
10045
- var qh = ["blazon.copy"];
10045
+ var qh = [
10046
+ "blazon.copy",
10047
+ "blazon.tailwind",
10048
+ "blazon.shadcn"
10049
+ ];
10046
10050
  function Jh(e) {
10047
10051
  let t = JSON.parse(e);
10048
10052
  return Array.isArray(t.plugins) && (t.plugins = t.plugins.filter((e) => qh.includes(e.name))), `${JSON.stringify(t, null, 2)}\n`;
@@ -10318,7 +10322,7 @@ function Sg(e) {
10318
10322
  } : void 0;
10319
10323
  }
10320
10324
  function Cg(e = {
10321
- commit: "f21b3b01f44e7f52dcf688ff798f0afbe6e93648",
10325
+ commit: "4e4051bc9492c7b13f4f44649ccc3aba68c624b7",
10322
10326
  dirty: !1
10323
10327
  }, t) {
10324
10328
  if (e) return {
package/dist/cli/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { At as e, Bt as t, C as n, D as r, Dt as i, E as a, F as o, Ft as s, Gt as c, H as l, I as u, It as d, Jt as f, Lt as p, Mt as m, Nt as h, O as g, Ot as _, Qt as v, Rt as y, S as b, St as x, T as S, Tn as C, U as w, V as T, W as ee, Xt as te, Yt as ne, Zt as re, _ as ie, _t as ae, a as oe, an as se, b as ce, bt as le, c as ue, cn as E, d as de, dn as fe, dt as D, f as pe, fn as me, ft as he, g as ge, gt as _e, h as ve, ht as ye, i as be, in as xe, jt as Se, k as O, kt as Ce, l as we, ln as Te, m as Ee, mn as De, mt as Oe, nn as ke, on as Ae, p as je, pt as Me, qt as Ne, rn as Pe, s as Fe, sn as Ie, st as Le, t as Re, u as ze, un as Be, v as Ve, w as He, wn as Ue, wt as k, x as We, xt as Ge, y as Ke } from "../chunks/site-builder-BtGOvjBC.js";
1
+ import { At as e, Bt as t, C as n, D as r, Dt as i, E as a, F as o, Ft as s, Gt as c, H as l, I as u, It as d, Jt as f, Lt as p, Mt as m, Nt as h, O as g, Ot as _, Qt as v, Rt as y, S as b, St as x, T as S, Tn as C, U as w, V as T, W as ee, Xt as te, Yt as ne, Zt as re, _ as ie, _t as ae, a as oe, an as se, b as ce, bt as le, c as ue, cn as E, d as de, dn as fe, dt as D, f as pe, fn as me, ft as he, g as ge, gt as _e, h as ve, ht as ye, i as be, in as xe, jt as Se, k as O, kt as Ce, l as we, ln as Te, m as Ee, mn as De, mt as Oe, nn as ke, on as Ae, p as je, pt as Me, qt as Ne, rn as Pe, s as Fe, sn as Ie, st as Le, t as Re, u as ze, un as Be, v as Ve, w as He, wn as Ue, wt as k, x as We, xt as Ge, y as Ke } from "../chunks/site-builder-CsBH_ocA.js";
2
2
  import A from "node:path";
3
3
  import j from "node:fs";
4
4
  import { spawn as qe } from "node:child_process";
@@ -1 +1 @@
1
- {"version":3,"file":"starter.d.ts","sourceRoot":"","sources":["../../src/core/starter.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAWjD,qGAAqG;AACrG,wBAAgB,cAAc,IAAI,MAAM,CAWvC;AAKD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIpD;AAED,4DAA4D;AAC5D,wBAAgB,YAAY,CAAC,QAAQ,GAAE,MAAyB,GAAG,MAAM,EAAE,CAI1E;AAED,iJAAiJ;AACjJ,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAyB,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAepH;AA6BD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,QAAQ,GAAE,MAAyB,GAAG,OAAO,EAAE,CAiBpH;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,QAAQ,GAAE,MAAyB,GAAG,OAAO,EAAE,CAc1J"}
1
+ {"version":3,"file":"starter.d.ts","sourceRoot":"","sources":["../../src/core/starter.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAWjD,qGAAqG;AACrG,wBAAgB,cAAc,IAAI,MAAM,CAWvC;AAQD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIpD;AAED,4DAA4D;AAC5D,wBAAgB,YAAY,CAAC,QAAQ,GAAE,MAAyB,GAAG,MAAM,EAAE,CAI1E;AAED,iJAAiJ;AACjJ,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAyB,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAepH;AA6BD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,QAAQ,GAAE,MAAyB,GAAG,OAAO,EAAE,CAiBpH;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,QAAQ,GAAE,MAAyB,GAAG,OAAO,EAAE,CAc1J"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as e, $t as t, A as n, B as r, Bt as i, Cn as a, Ct as o, E as s, Et as c, G as l, H as u, Ht as d, J as f, Jt as p, K as m, Kt as h, L as g, M as _, N as v, O as y, P as b, Pt as x, Q as S, R as C, Sn as w, T, Tn as E, Tt as D, U as O, Ut as k, V as A, Vt as j, Wt as M, X as N, Y as P, Z as F, _n as I, at as L, bn as R, ct as z, dt as B, en as V, et as H, ft as U, gn as W, hn as G, i as K, it as q, j as J, lt as Y, n as X, nt as Z, o as Q, ot as $, pn as ee, q as te, qt as ne, r as re, rt as ie, st as ae, t as oe, tn as se, tt as ce, un as le, ut as ue, vn as de, vt as fe, w as pe, wn as me, xn as he, yn as ge, yt as _e, z as ve, zt as ye } from "./chunks/site-builder-BtGOvjBC.js";
1
+ import { $ as e, $t as t, A as n, B as r, Bt as i, Cn as a, Ct as o, E as s, Et as c, G as l, H as u, Ht as d, J as f, Jt as p, K as m, Kt as h, L as g, M as _, N as v, O as y, P as b, Pt as x, Q as S, R as C, Sn as w, T, Tn as E, Tt as D, U as O, Ut as k, V as A, Vt as j, Wt as M, X as N, Y as P, Z as F, _n as I, at as L, bn as R, ct as z, dt as B, en as V, et as H, ft as U, gn as W, hn as G, i as K, it as q, j as J, lt as Y, n as X, nt as Z, o as Q, ot as $, pn as ee, q as te, qt as ne, r as re, rt as ie, st as ae, t as oe, tn as se, tt as ce, un as le, ut as ue, vn as de, vt as fe, w as pe, wn as me, xn as he, yn as ge, yt as _e, z as ve, zt as ye } from "./chunks/site-builder-CsBH_ocA.js";
2
2
  // src/plugins/index.ts
3
3
  var be = /* @__PURE__ */ E({
4
4
  BASE_ENV: () => l,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iksnerd/blazon",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Brand book and design token compiler: DTCG tokens, brand rules checked by blazon check, a static brand book that wears the brand",
5
5
  "type": "module",
6
6
  "bin": {
@@ -44,6 +44,7 @@
44
44
  "typecheck": "node node_modules/typescript7/bin/tsc --noEmit && node scripts/typecheck-mcp.mjs",
45
45
  "lint": "eslint .",
46
46
  "lint:fix": "eslint . --fix",
47
+ "lint:files": "eslint --no-warn-ignored",
47
48
  "lint:py": "uvx ruff check scripts test/deck/python",
48
49
  "format": "prettier --write .",
49
50
  "format:check": "prettier --check .",
@@ -12,7 +12,7 @@ Run commands from the folder that holds this file, or pass the folder as the las
12
12
  2. For each finding, read `code`, `message`, `path`, `file`, `line` and `fix`, and edit the file it names. The `checks` chapter describes every code; look it up, do not guess.
13
13
  3. Check again until `counts.errors` is 0, then run `blazon build`.
14
14
 
15
- - Never edit `dist/`. `blazon tokens` writes `dist/tokens/` (`theme.css`, `tokens.ts`, `tokens.json`) and `blazon build` also writes the site to `dist/site/`; both overwrite it, and both stop on an error. `--no-plugins` builds without Google Chrome.
15
+ - Never edit `dist/`. `blazon tokens` writes `dist/tokens/` (`theme.css`, `typography.css`, `tokens.ts`, `tokens.json`, and the Tailwind and shadcn/ui files in `blazon.tailwind/` and `blazon.shadcn/`) and `blazon build` also writes the site to `dist/site/`; both overwrite it, and both stop on an error. `--no-plugins` builds without Google Chrome.
16
16
  - The brand lives in `tokens/` (DTCG JSON, `{ "$value": ..., "$type": ... }`, an alias is `"{color.ink.graphite}"`), `docs/` (numbered Markdown pages), `assets/` (images, each with a JSON sidecar of the same name: `mark.svg` and `mark.json`), `blazon.json` (title, theme, logo, plugins) and `blazon.resolver.json` (the token files that load, and the themes; a new token file is listed in `sets` there or it is not read; dark is `tokens/theme/dark.json`).
17
17
  - Safe to change: token values, pages, assets with their sidecars, and the title and theme in `blazon.json`. Everything under "Do not touch" needs the person.
18
18
  - `blazon dev` serves the book with live reload; `-p <port>` sets the port.
@@ -89,6 +89,24 @@
89
89
  "11-voice.md"
90
90
  ]
91
91
  }
92
+ },
93
+ {
94
+ "name": "blazon.tailwind"
95
+ },
96
+ {
97
+ "name": "blazon.shadcn",
98
+ "options": {
99
+ "variables": {
100
+ "ring": "text.primary",
101
+ "sidebar-ring": "text.primary",
102
+ "destructive": "text.primary",
103
+ "chart-1": "text.primary",
104
+ "chart-2": "text.muted",
105
+ "chart-3": "surface.canvas",
106
+ "chart-4": "rule.default",
107
+ "chart-5": "rule.quiet"
108
+ }
109
+ }
92
110
  }
93
111
  ]
94
112
  }
@@ -147,7 +147,7 @@ Three details give a page the brand's industrial look. Each uses only tokens, an
147
147
 
148
148
  ## Using shadcn/ui
149
149
 
150
- A shadcn/ui project takes its colors from the brand through the `blazon.shadcn` plugin, as the "Using shadcn/ui" section of `docs/manual/19-building-a-website.md` in the blazon source repository describes: `blazon tokens` writes `dist/tokens/blazon.shadcn/shadcn.css` and `shadcn.json`. Its components also hard-code `text-sm`, `h-8`, `rounded-xl`, `ring/10`, opacity blends such as `hover:bg-primary/80`, and 0.35s transitions. The brand takes none of them. A site overrides each in its own button and card components, using the rules on this page.
150
+ A shadcn/ui project takes its colors from the brand through the `blazon.shadcn` plugin. Run `blazon tokens` to write `dist/tokens/blazon.shadcn/shadcn.css` and `shadcn.json`. The "Using shadcn/ui" section of `docs/manual/19-building-a-website.md` in the blazon source repository describes both. Its components also hard-code `text-sm`, `h-8`, `rounded-xl`, `ring/10`, opacity blends such as `hover:bg-primary/80`, and 0.35s transitions. The brand takes none of them. A site overrides each in its own button and card components, using the rules on this page.
151
151
 
152
152
  The brand has no role for two groups of shadcn variables, so the `variables` option of `blazon.shadcn` in `blazon.json` maps them:
153
153