@iksnerd/blazon 0.3.3 → 0.5.1

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.
Files changed (121) hide show
  1. package/CHANGELOG.md +375 -0
  2. package/dist/chunks/{site-builder-DlaZeZHi.js → site-builder-C8g2sfUv.js} +3471 -3650
  3. package/dist/cli/commands/approvals.d.ts +1 -1
  4. package/dist/cli/commands/approvals.d.ts.map +1 -1
  5. package/dist/cli/commands/mcp-check.d.ts +7 -4
  6. package/dist/cli/commands/mcp-check.d.ts.map +1 -1
  7. package/dist/cli/errors.d.ts +3 -1
  8. package/dist/cli/errors.d.ts.map +1 -1
  9. package/dist/cli/folder-first.d.ts +7 -0
  10. package/dist/cli/folder-first.d.ts.map +1 -0
  11. package/dist/cli/handlers/can.d.ts +1 -1
  12. package/dist/cli/handlers/can.d.ts.map +1 -1
  13. package/dist/cli/handlers/list.d.ts.map +1 -1
  14. package/dist/cli/index.js +1384 -1033
  15. package/dist/cli/json.d.ts +3 -2
  16. package/dist/cli/json.d.ts.map +1 -1
  17. package/dist/cli/operations.d.ts +1 -1
  18. package/dist/cli/operations.d.ts.map +1 -1
  19. package/dist/cli/read.d.ts +4 -1
  20. package/dist/cli/read.d.ts.map +1 -1
  21. package/dist/cli/where.d.ts +2 -0
  22. package/dist/cli/where.d.ts.map +1 -1
  23. package/dist/core/assets/representations.d.ts +44 -0
  24. package/dist/core/assets/representations.d.ts.map +1 -0
  25. package/dist/core/assets/scanner.d.ts.map +1 -1
  26. package/dist/core/assets/sidecar.d.ts.map +1 -1
  27. package/dist/core/blazon-pin.d.ts +19 -1
  28. package/dist/core/blazon-pin.d.ts.map +1 -1
  29. package/dist/core/brand/export.d.ts +13 -5
  30. package/dist/core/brand/export.d.ts.map +1 -1
  31. package/dist/core/brand/schema.d.ts +68 -0
  32. package/dist/core/brand/schema.d.ts.map +1 -1
  33. package/dist/core/checker/approvals.d.ts +5 -0
  34. package/dist/core/checker/approvals.d.ts.map +1 -1
  35. package/dist/core/checker/catalogue.d.ts +37 -7
  36. package/dist/core/checker/catalogue.d.ts.map +1 -1
  37. package/dist/core/checker/font-meta.d.ts.map +1 -1
  38. package/dist/core/checker/index.d.ts +5 -0
  39. package/dist/core/checker/index.d.ts.map +1 -1
  40. package/dist/core/checker/review.d.ts +19 -1
  41. package/dist/core/checker/review.d.ts.map +1 -1
  42. package/dist/core/docs/directives.d.ts +10 -0
  43. package/dist/core/docs/directives.d.ts.map +1 -1
  44. package/dist/core/docs/parser.d.ts.map +1 -1
  45. package/dist/core/font-roles.d.ts +11 -0
  46. package/dist/core/font-roles.d.ts.map +1 -0
  47. package/dist/core/index.d.ts.map +1 -1
  48. package/dist/core/init/from-site/fonts.d.ts.map +1 -1
  49. package/dist/core/logo/colorways.d.ts +29 -0
  50. package/dist/core/logo/colorways.d.ts.map +1 -0
  51. package/dist/core/logo/misuse.d.ts +18 -0
  52. package/dist/core/logo/misuse.d.ts.map +1 -0
  53. package/dist/core/mcp-config.d.ts +7 -0
  54. package/dist/core/mcp-config.d.ts.map +1 -1
  55. package/dist/core/operations/check.d.ts +1 -1
  56. package/dist/core/operations/check.d.ts.map +1 -1
  57. package/dist/core/operations/index.d.ts +1 -1
  58. package/dist/core/operations/index.d.ts.map +1 -1
  59. package/dist/core/operations/limits.d.ts +2 -0
  60. package/dist/core/operations/limits.d.ts.map +1 -1
  61. package/dist/core/operations/list.d.ts.map +1 -1
  62. package/dist/core/operations/types.d.ts +13 -0
  63. package/dist/core/operations/types.d.ts.map +1 -1
  64. package/dist/core/preflight.d.ts.map +1 -1
  65. package/dist/core/read/can.d.ts +14 -3
  66. package/dist/core/read/can.d.ts.map +1 -1
  67. package/dist/core/read/fonts.d.ts +2 -6
  68. package/dist/core/read/fonts.d.ts.map +1 -1
  69. package/dist/core/read/index.d.ts +3 -2
  70. package/dist/core/read/index.d.ts.map +1 -1
  71. package/dist/core/read/list.d.ts +15 -1
  72. package/dist/core/read/list.d.ts.map +1 -1
  73. package/dist/core/read/logo.d.ts +3 -3
  74. package/dist/core/read/logo.d.ts.map +1 -1
  75. package/dist/core/read/lookup.d.ts +2 -2
  76. package/dist/core/read/lookup.d.ts.map +1 -1
  77. package/dist/core/read/theme.d.ts +8 -0
  78. package/dist/core/read/theme.d.ts.map +1 -0
  79. package/dist/core/read/token.d.ts +6 -2
  80. package/dist/core/read/token.d.ts.map +1 -1
  81. package/dist/core/tokens/alias.d.ts +5 -3
  82. package/dist/core/tokens/alias.d.ts.map +1 -1
  83. package/dist/core/tokens/contexts.d.ts +11 -3
  84. package/dist/core/tokens/contexts.d.ts.map +1 -1
  85. package/dist/core/tokens/formatters/json.d.ts +4 -1
  86. package/dist/core/tokens/formatters/json.d.ts.map +1 -1
  87. package/dist/core/tokens/key-lines.d.ts.map +1 -1
  88. package/dist/core/tokens/merge.d.ts.map +1 -1
  89. package/dist/core/tokens/resolver/compile.d.ts.map +1 -1
  90. package/dist/core/tokens/resolver/parse.d.ts.map +1 -1
  91. package/dist/core/tokens/resolver/sources.d.ts.map +1 -1
  92. package/dist/core/tokens/walk.d.ts.map +1 -1
  93. package/dist/index.js +34 -34
  94. package/dist/plugins/host/call.d.ts.map +1 -1
  95. package/dist/plugins/roles/roles.d.ts.map +1 -1
  96. package/dist/server/plugin.d.ts.map +1 -1
  97. package/dist/types/assets.d.ts +19 -1
  98. package/dist/types/assets.d.ts.map +1 -1
  99. package/dist/types/parsed.d.ts +8 -0
  100. package/dist/types/parsed.d.ts.map +1 -1
  101. package/dist/types/tokens.d.ts +12 -0
  102. package/dist/types/tokens.d.ts.map +1 -1
  103. package/dist/ui/assets/index-b4HhGGrn.js +82 -0
  104. package/dist/ui/assets/index-pE1ku5gt.css +2 -0
  105. package/dist/ui/index.html +2 -2
  106. package/mcp/dist/index.js +358 -45
  107. package/package.json +3 -2
  108. package/plugins/blazon.brand-deck/README.md +1 -1
  109. package/plugins/blazon.brand-deck/bin/blazon-blazon.brand-deck./360/237/224/214 +106 -13
  110. package/plugins/blazon.favicons/bin/blazon-blazon.favicons./360/237/224/214 +120 -12
  111. package/plugins/blazon.logo-geometry/bin/blazon-blazon.logo-geometry./360/237/224/214 +45 -1
  112. package/plugins/blazon.logo-kit/bin/blazon-blazon.logo-kit./360/237/224/214 +45 -1
  113. package/plugins/blazon.office-template/bin/blazon-blazon.office-template./360/237/224/214 +66 -3
  114. package/plugins/blazon.platform-tokens/README.md +1 -1
  115. package/plugins/blazon.press-kit/README.md +17 -9
  116. package/plugins/blazon.press-kit/bin/blazon-blazon.press-kit./360/237/224/214 +621 -101
  117. package/plugins/blazon.print-book/README.md +16 -1
  118. package/plugins/blazon.social-cards/bin/blazon-blazon.social-cards./360/237/224/214 +59 -3
  119. package/plugins/shipped.lock +9 -9
  120. package/dist/ui/assets/index-Biy1hkeq.css +0 -2
  121. package/dist/ui/assets/index-dkJG6W9p.js +0 -82
@@ -1,6 +1,6 @@
1
1
  # blazon.press-kit
2
2
 
3
- The plugin blazon ships to pack what an outsider needs from a brand: the logos that are ready to share, the colors, the fonts, the boilerplate and a one-page PDF, in one folder and one zip. It fills the `build` role. Everything but the PDF needs only Node; the PDF needs a Chrome (`BLAZON_CHROME` names one, else the Google Chrome installed on the computer), and without one the plugin writes the rest and says so in a finding.
3
+ The plugin blazon ships to pack what an outsider needs from a brand: the logos that are ready to share, the colors, the fonts, the boilerplate, the contact, the terms of use, a web page and a one-page PDF, in one folder and one zip. It fills the `build` role. Everything but the PDF needs only Node; the PDF needs a Chrome (`BLAZON_CHROME` names one, else the Google Chrome installed on the computer), and without one the plugin writes the rest and says so in a finding.
4
4
 
5
5
  The source is `src/shipped/press-kit/`, and `npm run build` (`npm run build:plugins`) bundles it, with the blazon code it uses, into `bin/blazon-blazon.press-kit.🔌`, the one file that holds the plugin's code and that `plugins/shipped.lock` pins. The program loads `playwright-core` and `pdf-lib` from `node_modules` when it runs; that is outside the pin. The zip writer is `src/shipped/shared/zip.ts`, which `blazon.office-template` uses too. The manual's plugins chapter says what to put in the config, what the plugin writes and what each finding means.
6
6
 
@@ -10,9 +10,10 @@ The source is `src/shipped/press-kit/`, and `npm run build` (`npm run build:plug
10
10
  |---|---|
11
11
  | `logos/` | Assets that are logos (the `logos` category, or the files `logo.onLight` and `logo.onDark` name), as they are, in a folder for each background their sidecars name |
12
12
  | `colors/` | The color tokens that are not aliases, as JSON, CSS and text; CMYK, Pantone and RAL only where a token states them |
13
- | `fonts.txt` | The brand's fonts: the front family of `fontDisplay`, `fontBody` and each font token, and the families the font stylesheets load, unless it is a system font nothing loads (then it is a fallback); the source and license only where a font token states them (its `font` extension) or the data has them, else the license file blazon found beside the family's font files (`License file:` with its path), else `not stated`. The fallbacks are one last line, `Fallback fonts, not shipped` |
14
- | `about.txt` | `brand.title`, then the `company` option's description, else `brand.description` (without either, a line saying none is set), then the company's boilerplate and facts and the `note` |
15
- | `press-kit.pdf` | The title, the description (the company's when the option gives one), the boilerplate, the facts, the note, up to ten colors and one logo, drawn in Chrome |
13
+ | `fonts.txt` | The brand's fonts: the front family of `fontDisplay`, `fontBody` and each font token, and the families the font stylesheets load, unless it is a system font nothing loads (then it is a fallback); a `Role:`, `Why:` and, for a fallback, `Stands in for:` line where a font token states them; the source and license only where a font token states them (its `font` extension) or the data has them, else the license file blazon found beside the family's font files (`License file:` with its path), else `not stated`. The fallbacks are one last line, `Fallback fonts, not shipped` |
14
+ | `index.html` | The whole kit as one static page for a browser, at the root of the folder and the zip: inline CSS, no script, no remote font or image, the logos by relative paths, every brand text escaped. Sections, only those with data: name and description, About, Facts, Contact, Logos (with the rules the sidecars state), Colors, Fonts, Terms of use, Note. Always written; it has no option |
15
+ | `about.txt` | `brand.title`, then the `company` option's description, else `brand.description` (without either, a line saying none is set), then the company's boilerplate, facts and contact, the `terms` and the `note` |
16
+ | `press-kit.pdf` | The title, the description (the company's when the option gives one), the boilerplate, the facts, the contact, a short block of the terms, the note, up to ten colors and one logo, drawn in Chrome |
16
17
 
17
18
  A logo marked `needs-review`, and a generated logo with no `review`, are left out, with a finding for each. A color token marked `needs-review` is left out too, unless the `unreviewed` option is `true`, which includes it labelled as unreviewed.
18
19
 
@@ -26,13 +27,15 @@ Every option is plain data in the plugin's `options` in `blazon.json`. A wrong o
26
27
  | `pdf` | boolean | `true` | `false` writes no PDF and needs no browser |
27
28
  | `unreviewed` | boolean | `false` | `true` includes the colors marked `needs-review`, labelled as unreviewed |
28
29
  | `logos` | list of asset ids | every logo | The logos to include; one that is not ready stays out |
29
- | `company` | object | none | The company behind the brand, for a brand whose own title and description are a book's. Keys: `description`, `boilerplate`, `facts` |
30
+ | `company` | object | none | The company behind the brand, for a brand whose own title and description are a book's. Keys: `description`, `boilerplate`, `facts`, `contact` |
30
31
  | `company.description` | string, up to 1000 characters | none | Replaces `brand.description` in `about.txt` and the PDF when given |
31
32
  | `company.boilerplate` | string, up to 2000 characters | none | One text printed after the description in `about.txt` and the PDF; blank lines make paragraphs |
32
33
  | `company.facts` | list of up to 20 `{ "label", "value" }` | none | Labelled lines in the order given, such as the legal name and the registration number. A label is up to 60 characters and a value up to 300, each on one line |
34
+ | `company.contact` | object | none | Who a journalist writes to. Keys, all optional but at least one: `name` and `role` (up to 80 characters), `email` (one `@`, no spaces, up to 120), `phone` (up to 40), `url` (http or https, up to 300); each on one line. Printed as a `Contact:` block in `about.txt`, and in the PDF and `index.html` |
35
+ | `terms` | object | none | What a recipient may do with the logos, in the brand's own words: blazon writes no template. Keys, at least one: `text` (up to 1000 characters, may span lines) and `url` (http or https, up to 300). Printed as `Terms of use:` in `about.txt`, as `Terms of use: see about.txt` in `README.txt`, and in the PDF and `index.html` |
33
36
  | `note` | string, up to 280 characters, one line | none | Printed as `Note: ...` in `README.txt`, `about.txt`, `colors/colors.txt` and the PDF, such as that the colors are not yet approved |
34
37
 
35
- With none of `company` and `note` the files are the bytes they were before, apart from the fixes in the next section.
38
+ With no `company.contact` and no `terms` the files are the bytes they were before, apart from the new `index.html` (and its line in `README.txt`) and the fixes in the next section.
36
39
 
37
40
  ```json
38
41
  {
@@ -49,7 +52,12 @@ With none of `company` and `note` the files are the bytes they were before, apar
49
52
  { "label": "Legal name", "value": "Acme Ltd" },
50
53
  { "label": "Registered address", "value": "1 Example Street, London" },
51
54
  { "label": "Registration number", "value": "01234567" }
52
- ]
55
+ ],
56
+ "contact": { "name": "Ada Example", "role": "Head of press", "email": "press@acme.example", "phone": "+44 20 7946 0000", "url": "https://acme.example/press" }
57
+ },
58
+ "terms": {
59
+ "text": "Use the logos as supplied, on the backgrounds they are made for.\nDo not recolor, stretch or redraw them.\nAsk before using them in advertising.",
60
+ "url": "https://acme.example/terms"
53
61
  },
54
62
  "note": "The colours are proposed and not yet approved."
55
63
  }
@@ -58,11 +66,11 @@ With none of `company` and `note` the files are the bytes they were before, apar
58
66
  }
59
67
  ```
60
68
 
61
- That entry was run on `examples/blazon`; `about.txt` then reads the company description, the boilerplate, the three facts and `Note: The colours are proposed and not yet approved.`, each in its own paragraph.
69
+ That entry was run on `examples/blazon`; `about.txt` then reads the company description, the boilerplate, the three facts, a `Contact:` block, a `Terms of use:` block and `Note: The colours are proposed and not yet approved.`, each in its own paragraph, and `index.html` shows the same in a browser.
62
70
 
63
71
  ## Fonts and swatches
64
72
 
65
- - A family is a brand font when it is at the front of a font stack and is not a system font, or when a stylesheet or font file of the brand loads it, or when its font token states a source or license. The same families blazon treats as system fonts everywhere (`blazon fonts`) are fallbacks, and so is every family after the first in a stack. They are not listed as fonts with `License: not stated`; `fonts.txt` ends with one line, `Fallback fonts, not shipped: ...`. A stack with no brand font writes no `fonts.txt`.
73
+ - A family is a brand font when it is at the front of a font stack and is not a system font, or when a stylesheet or font file of the brand loads it, or when its font token states a source, license or role. The same families blazon treats as system fonts everywhere (`blazon fonts`) are fallbacks, and so is every family after the first in a stack. They are not listed as fonts with `License: not stated`; `fonts.txt` ends with one line, `Fallback fonts, not shipped: ...`. A stack with no brand font writes no `fonts.txt`.
66
74
  - The license comes from the font token (`license`, `licenseUrl`, `source` of its `dev.blazon` `font`), then from the license file beside the family's font files (`OFL.txt`, `LICENSE`, `LICENCE`, `COPYING`), which blazon reads into `brand.json` as `theme.fontLicenses`: the plugin is given the brand and the built site, not the project folder, so it never opens the file itself. It prints `License file:` with the project path and, as `License:`, an `SPDX-License-Identifier:` line or the first short line that is not a copyright notice (`see <path>` when none). The kit copies no font and no license text.
67
75
  - The PDF draws up to ten colors. A color belongs to the group named by the path before its last segment (`color.blue.500` is step `500` of `color.blue`). Groups run in the order their first color appears in the brand, each group's steps together, a group goes in whole, and the walk stops at the first group that does not fit in the places left (the first group alone is cut at ten). A swatch reads `blue 500`; a color straight under `color` keeps its short description, else its last segment.
68
76
  - `README.txt` aligns its descriptions two spaces after the longest file name, or at column 16 when the names are shorter.