@iksnerd/blazon 0.1.0 → 0.1.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.
- package/README.md +11 -16
- package/dist/chunks/{site-builder-vpzUWoiA.js → site-builder-CPfjBOmR.js} +1312 -1285
- package/dist/cli/index.js +1 -1
- package/dist/core/checker/catalogue.d.ts +16 -0
- package/dist/core/checker/catalogue.d.ts.map +1 -1
- package/dist/core/docs/directives.d.ts +9 -0
- package/dist/core/docs/directives.d.ts.map +1 -1
- package/dist/core/docs/parser.d.ts.map +1 -1
- package/dist/core/tokens/walk.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins/roles/roles.d.ts +4 -0
- package/dist/plugins/roles/roles.d.ts.map +1 -1
- package/dist/ui/assets/{index-DluSqfla.css → index-D0WCUmtA.css} +1 -1
- package/dist/ui/assets/{index-BdbihVvH.js → index-DhSc0Zxv.js} +45 -47
- package/dist/ui/index.html +2 -2
- package/package.json +1 -1
- package/plugins/blazon.print-book/README.md +3 -1
- package/plugins/blazon.print-book/bin/blazon-blazon.print-book./360/237/224/214 +7 -1
- package/plugins/shipped.lock +1 -1
- package/template/docs/01-principles.md +1 -1
package/dist/ui/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Brand Book</title>
|
|
7
7
|
<link rel="icon" href="data:," />
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-DhSc0Zxv.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="./assets/index-D0WCUmtA.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -17,7 +17,9 @@ A slide whose content is taller than a slide even drawn at half size is cut off
|
|
|
17
17
|
| `{ "preset": "reference" }` | `index.html#print/reference` | `brand-book-reference.pdf`, `.pptx` |
|
|
18
18
|
| `{ "pages": ["doc/logo", "tokens/colors"] }` | `index.html#print/pages=doc/logo,tokens/colors` | `brand-book-pages.pdf`, `.pptx` |
|
|
19
19
|
|
|
20
|
-
Two optional strings go with any of these: `title` (at most 120 characters) replaces the brand title in the cover heading and in the footers, and `subtitle` (at most 200) replaces the line under the cover heading. They reach the page as `?title=...&subtitle=...` after the hash, percent-encoded.
|
|
20
|
+
Two optional strings go with any of these: `title` (at most 120 characters) replaces the brand title in the cover heading and in the footers, and `subtitle` (at most 200) replaces the line under the cover heading. They reach the page as `?title=...&subtitle=...` after the hash, percent-encoded.
|
|
21
|
+
|
|
22
|
+
One more option, `layout`, is `"compact"` (the default) or `"roomy"`. `compact` lets a figure share a slide by drawing its pictures down to 60% of their height, and sets the prose and sections tighter, so the book runs on fewer slides. `roomy` draws every picture whole and sets the text looser. Only `roomy` is put in the hash, as `layout=roomy`, and the page says which layout it used in `window.__blazonPrint.layout`. Any other value, and any other option, is refused.
|
|
21
23
|
|
|
22
24
|
It exits `2` with the reason and writes nothing when the request or its options are wrong, when `site_dir` has no `index.html`, when it finds no browser, and when the page does not say it is ready in time.
|
|
23
25
|
|
|
@@ -9007,8 +9007,11 @@ var OPTIONS = [
|
|
|
9007
9007
|
"preset",
|
|
9008
9008
|
"pages",
|
|
9009
9009
|
"title",
|
|
9010
|
-
"subtitle"
|
|
9010
|
+
"subtitle",
|
|
9011
|
+
"layout"
|
|
9011
9012
|
];
|
|
9013
|
+
/** The layouts the viewer's print page spaces a book in; the first is the default and is not put in the hash */
|
|
9014
|
+
var LAYOUTS = ["compact", "roomy"];
|
|
9012
9015
|
/** The longest title and subtitle: the cover sets the title at 96 px and the footer has one line */
|
|
9013
9016
|
var LIMITS = {
|
|
9014
9017
|
title: 120,
|
|
@@ -9033,6 +9036,9 @@ function page(options) {
|
|
|
9033
9036
|
const value = text(options, key);
|
|
9034
9037
|
return value === void 0 ? [] : [`${key}=${encodeURIComponent(value)}`];
|
|
9035
9038
|
});
|
|
9039
|
+
const layout = options.layout;
|
|
9040
|
+
if (layout !== void 0 && (typeof layout !== "string" || !LAYOUTS.includes(layout))) throw new OptionError(`layout must be ${LAYOUTS.join(" or ")}`);
|
|
9041
|
+
if (layout !== void 0 && layout !== LAYOUTS[0]) query.push(`layout=${layout}`);
|
|
9036
9042
|
return query.length === 0 ? chosen : {
|
|
9037
9043
|
...chosen,
|
|
9038
9044
|
hash: `${chosen.hash}?${query.join("&")}`
|
package/plugins/shipped.lock
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"kind": "tree",
|
|
62
62
|
"path": "blazon.print-book",
|
|
63
63
|
"entry": "bin/blazon-blazon.print-book.🔌",
|
|
64
|
-
"digest": "t1:
|
|
64
|
+
"digest": "t1:61ab8d3a0bd5dadd04b6557271bb96d3e9578cc79938b09de777c0e498d89b08",
|
|
65
65
|
"source": "computed"
|
|
66
66
|
},
|
|
67
67
|
"blazon.social-cards": {
|
|
@@ -28,7 +28,7 @@ The brand and the build come from the same files. A build that breaks the brand'
|
|
|
28
28
|
| Readable from any language | `blazon build` also writes `brand.json`: the tokens with their rules, the pages, the assets and the findings, with a JSON Schema. |
|
|
29
29
|
| Open to plugins | A plugin is a program in any language. blazon ships ten, and a config names one to turn it on. |
|
|
30
30
|
|
|
31
|
-
blazon is
|
|
31
|
+
blazon is at version 0.1.0 and on npm as `@iksnerd/blazon`. The attributes above describe what is built today.
|
|
32
32
|
|
|
33
33
|
## Exposed structure
|
|
34
34
|
|