gutterpress 0.10.11-alpha.1 → 0.11.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.
Files changed (35) hide show
  1. package/README.md +1 -1
  2. package/dist/{README-7x5akcns.md → README-3nj919rm.md} +10 -8
  3. package/dist/{README-3zk4tgnj.md → README-8b33qbjw.md} +14 -21
  4. package/dist/api/index.js +2 -2
  5. package/dist/{audit-4qngz16q.js → audit-xcreaxvj.js} +4 -4
  6. package/dist/{build-4b6a3r3c.js → build-j433exnc.js} +4 -4
  7. package/dist/{cli-wthscqa9.js → cli-9a60c9wn.js} +1 -1
  8. package/dist/{cli-8x25pp3t.js → cli-r0ycvdr9.js} +1 -1
  9. package/dist/{cli-k8f9eb12.js → cli-sekhwex4.js} +5 -5
  10. package/dist/{cli-s6m6d0hx.js → cli-xa9y4np2.js} +1426 -1405
  11. package/dist/cli.js +14 -14
  12. package/dist/{doctor-wak7vkne.js → doctor-mmgg0p64.js} +2 -2
  13. package/dist/{engine-qtmvaqt7.js → engine-cbc17ne4.js} +1 -1
  14. package/dist/{engine-pt2acjb5.js → engine-w5ed5hmb.js} +2 -2
  15. package/dist/{ext-ycymqtym.js → ext-2vjqcmsh.js} +4 -4
  16. package/dist/{index-a0e2253t.js → index-12pvhbyz.js} +1 -1
  17. package/dist/{index-5dgxeevv.js → index-6n15e1ze.js} +5 -5
  18. package/dist/{index-fcfae175.js → index-g6t4qdzm.js} +1764 -1748
  19. package/dist/index.js +3 -3
  20. package/dist/lib/markdown/index.d.ts +8 -16
  21. package/dist/lib/markdown/plugins.d.ts +9 -4
  22. package/dist/lib/markdown/renderer.d.ts +18 -0
  23. package/dist/lib/project-scaffold.d.ts +1 -1
  24. package/dist/{lint-5ec2zvh6.js → lint-485wgyn0.js} +4 -4
  25. package/dist/{new-rqc70kz0.js → new-nayk48pr.js} +4 -4
  26. package/dist/plugin-spbcem4j.css +103 -0
  27. package/dist/{plugin.test.js-k2r87k04.tpl → plugin.test.js-nw7c84s6.tpl} +5 -6
  28. package/dist/{preflight-pgpxc47d.js → preflight-wf4j4vs6.js} +4 -4
  29. package/dist/{preview-deqn53f6.js → preview-ke5fyhtt.js} +4 -4
  30. package/dist/{publish-h4gyyja7.js → publish-prnv6hf1.js} +4 -4
  31. package/dist/render.js +1 -1
  32. package/dist/{tokens-2sracx1w.css → tokens-7984461t.css} +8 -8
  33. package/dist/{validate-m3782gev.js → validate-98fk1yqg.js} +4 -4
  34. package/package.json +1 -1
  35. package/dist/plugin-m2w7g47v.css +0 -114
package/README.md CHANGED
@@ -537,7 +537,7 @@ An extension folder (or npm package) describes itself in its **`package.json`**
537
537
 
538
538
  `main` is the markdown-it plugin — npm's own convention — so a plain markdown-it plugin package needs nothing else at all. A look needs only `gutterpress.styles` (an ordered list, relative to the folder); a component library carries both. `gutterpress.markdown` exists for the one case `main` can't express: a package whose `main` is not the plugin. Folders still carrying the removed `gutterpress.json` or `theme.json` fail to load with a message showing the package.json that replaces them.
539
539
 
540
- Order is load order: a later entry's markdown runs after earlier entries' (and sees their output) and its CSS wins ties; the project's own `styles:` always load after every extension. There is no `priority` and no `path:`/`name:` wrapper — a manifest still carrying `plugins:` fails with a message that prints the same entries rewritten as `extensions:`. The `engine:` and `engineStyles:` keys are gone too (there is one engine; move any `engineStyles` entries to the end of `styles:`).
540
+ Order is load order: a later entry's markdown runs after earlier entries' (and sees their output) and its CSS wins ties — each extension's stylesheets are wrapped in their own cascade layer (`@layer ext.<name>`), declared in list order, so this holds however an extension writes its CSS; the project's own `styles:` stay unlayered and load after every extension, beating all of them at any specificity. There is no `priority` and no `path:`/`name:` wrapper — a manifest still carrying `plugins:` fails with a message that prints the same entries rewritten as `extensions:`. The `engine:` and `engineStyles:` keys are gone too (there is one engine; move any `engineStyles` entries to the end of `styles:`).
541
541
 
542
542
  Pinned npm packages and their runtime dependencies live under `plugins/npm/`,
543
543
  with a receipt that records the exact graph and hashes the complete tree. They
@@ -134,14 +134,16 @@ settled by that one line rather than by which sheet `package.json`'s
134
134
  `gutterpress.styles` lists last, so splitting a sheet or reordering that list
135
135
  can no longer silently flip who wins.
136
136
 
137
- The trap, and it catches everyone once: a rule left OUTSIDE all the layers is
138
- fully unlayered, and unlayered CSS beats layered CSS at any specificity. So
139
- one stray rule at the bottom of `components.css` will out-rank every rule in
140
- `book.css`. Adopt the convention for a whole sheet at a time.
141
-
142
- These layers are unlayered relative to Gutterpress core (which uses
143
- `gp.marker` and `gp.vocab`), so every rule here still beats core exactly as it
144
- did before layers existed.
137
+ The trap, and it catches everyone once: a rule left OUTSIDE all the layers
138
+ beats every layered rule in the theme at any specificity. So one stray rule
139
+ at the bottom of `components.css` will out-rank every rule in `book.css`.
140
+ Adopt the convention for a whole sheet at a time.
141
+
142
+ Gutterpress wraps the whole theme in a cascade layer of its own
143
+ (`ext.<name>`), after core's `gp.marker`/`gp.vocab` and before the book's own
144
+ `styles:`. These layers nest inside it: they settle ties between the theme's
145
+ own files, every one of them beats core, and the book's own rules beat every
146
+ one of them.
145
147
 
146
148
  ### 3. Authors write semantic markdown
147
149
 
@@ -110,27 +110,20 @@ Marker names are global across every plugin a book loads. Two plugins
110
110
  declaring `@callout` is a hard load error naming both — which is a good
111
111
  outcome, and another reason to prefix.
112
112
 
113
- ### 5. Put your CSS in your own cascade layer
114
-
115
- `styles/plugin.css` wraps everything in `@layer {{SLUG}}`.
116
-
117
- Extension CSS lands in the book in `extensions:` list order, and always before
118
- the book's own `styles:`. In CSS an unlayered rule beats a layered one at any
119
- specificity. So an unlayered plugin sheet outranks every rule in a book whose
120
- look uses the recommended
121
- `@layer tokens, base, components, templates, pages, book;` convention — the
122
- author edits their CSS and nothing happens.
123
-
124
- Inside a layer, the book's own unlayered `styles:` always beat you, which is
125
- right. Against the LOOK's layers, position decides: a layer sorts by where it
126
- is first declared, so with this plugin listed above the look in `extensions:`
127
- its layer sorts first and is the weakest thing in the book — the right place
128
- for a plugin to sit. Listed below the look, its component rules win ties over
129
- the look's layered rules instead. Either way the author moves one line to
130
- change it; that is the whole point of the list.
131
-
132
- Adopt it for the whole file: a rule left outside the layer is unlayered and
133
- beats everything inside it, including your own.
113
+ ### 5. Leave the cascade to Gutterpress
114
+
115
+ Gutterpress wraps every extension's CSS in a cascade layer of its own
116
+ (`@layer ext.<name>`), in `extensions:` list order, before the book's own
117
+ `styles:`. So `styles/plugin.css` needs no `@layer` of its own: the book's
118
+ unlayered `styles:` always beat you, at any specificity, which is right — a
119
+ plugin should be the easiest thing in the book to override — and against a
120
+ look, position decides. Listed above the look, this plugin's layer sorts first
121
+ and the look wins ties; listed below it, the plugin's component rules win.
122
+ Either way the author moves one line to change it; that is the whole point of
123
+ the list.
124
+
125
+ If you do declare layers inside this sheet, they nest inside your extension's
126
+ layer and only settle ties between your own rules.
134
127
 
135
128
  ## Theming: the token pattern
136
129
 
package/dist/api/index.js CHANGED
@@ -124,12 +124,12 @@ import {
124
124
  syncProject,
125
125
  testRemoteAccess,
126
126
  validateProjectExtensions
127
- } from "../index-fcfae175.js";
127
+ } from "../index-g6t4qdzm.js";
128
128
  import {
129
129
  BuildError,
130
130
  DEFAULT_PRINT_OPTS,
131
131
  readyProbeExpr
132
- } from "../index-5dgxeevv.js";
132
+ } from "../index-6n15e1ze.js";
133
133
  import {
134
134
  AUTO_SNAPSHOT_MESSAGE,
135
135
  HISTORY_PAGE_LIMIT,
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  executeAndReport
3
- } from "./cli-s6m6d0hx.js";
3
+ } from "./cli-xa9y4np2.js";
4
4
  import {
5
5
  log
6
- } from "./cli-8x25pp3t.js";
6
+ } from "./cli-r0ycvdr9.js";
7
7
  import {
8
8
  UsageError,
9
9
  rejectExtraPositionals,
10
10
  rejectUnknownFlags
11
- } from "./cli-wthscqa9.js";
12
- import"./cli-k8f9eb12.js";
11
+ } from "./cli-9a60c9wn.js";
12
+ import"./cli-sekhwex4.js";
13
13
  import"./cli-c41yr7he.js";
14
14
  import {
15
15
  EXIT_CODES
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  runBuild,
3
3
  splitOutPath
4
- } from "./cli-s6m6d0hx.js";
4
+ } from "./cli-xa9y4np2.js";
5
5
  import {
6
6
  log
7
- } from "./cli-8x25pp3t.js";
7
+ } from "./cli-r0ycvdr9.js";
8
8
  import {
9
9
  UsageError,
10
10
  parseFormat,
11
11
  parsePdfxFlavor,
12
12
  rejectExtraPositionals,
13
13
  rejectUnknownFlags
14
- } from "./cli-wthscqa9.js";
15
- import"./cli-k8f9eb12.js";
14
+ } from "./cli-9a60c9wn.js";
15
+ import"./cli-sekhwex4.js";
16
16
  import"./cli-c41yr7he.js";
17
17
  import {
18
18
  BuildError
@@ -4,7 +4,7 @@ import {
4
4
  // package.json
5
5
  var package_default = {
6
6
  name: "gutterpress",
7
- version: "0.10.11-alpha.1",
7
+ version: "0.11.0",
8
8
  description: "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
9
9
  author: "itlackey",
10
10
  license: "MPL-2.0",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "./cli-wthscqa9.js";
3
+ } from "./cli-9a60c9wn.js";
4
4
  import {
5
5
  execCapture,
6
6
  findTool,
@@ -1472,13 +1472,13 @@ var chapter_01_default3 = "./chapter-01-6fn9pvd0.md";
1472
1472
  var package_default = "./package-9rv69pxm.json";
1473
1473
 
1474
1474
  // src/assets/extension-templates/plugin/README.md
1475
- var README_default = "./README-3zk4tgnj.md";
1475
+ var README_default = "./README-8b33qbjw.md";
1476
1476
 
1477
1477
  // src/assets/extension-templates/plugin/plugin.js.tpl
1478
1478
  var plugin_js_default = "./plugin.js-aszz0zgh.tpl";
1479
1479
 
1480
1480
  // src/assets/extension-templates/plugin/styles/plugin.css
1481
- var plugin_default = "./plugin-m2w7g47v.css";
1481
+ var plugin_default = "./plugin-spbcem4j.css";
1482
1482
 
1483
1483
  // src/assets/extension-templates/plugin/snippets/term-box.md
1484
1484
  var term_box_default = "./term-box-4y0w7y32.md";
@@ -1490,13 +1490,13 @@ var fixture_default = "./fixture-2qnyqgb5.md";
1490
1490
  var expected_default = "./expected-ycmacem8.html";
1491
1491
 
1492
1492
  // src/assets/extension-templates/plugin/test/plugin.test.js.tpl
1493
- var plugin_test_js_default = "./plugin.test.js-k2r87k04.tpl";
1493
+ var plugin_test_js_default = "./plugin.test.js-nw7c84s6.tpl";
1494
1494
 
1495
1495
  // src/assets/extension-templates/theme/package.json
1496
1496
  var package_default2 = "./package-aenwjew3.json";
1497
1497
 
1498
1498
  // src/assets/extension-templates/theme/README.md
1499
- var README_default2 = "./README-7x5akcns.md";
1499
+ var README_default2 = "./README-3nj919rm.md";
1500
1500
 
1501
1501
  // src/assets/extension-templates/theme/components.yaml
1502
1502
  var components_default = "./components-dhgv2sm7.yaml";
@@ -1505,7 +1505,7 @@ var components_default = "./components-dhgv2sm7.yaml";
1505
1505
  var callout_default = "./callout-hv56m16h.md";
1506
1506
 
1507
1507
  // src/assets/extension-templates/theme/styles/tokens.css
1508
- var tokens_default = "./tokens-2sracx1w.css";
1508
+ var tokens_default = "./tokens-7984461t.css";
1509
1509
 
1510
1510
  // src/assets/extension-templates/theme/styles/base.css
1511
1511
  var base_default = "./base-ypqh9n7f.css";