gutterpress 0.10.7 → 0.10.8

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 (59) hide show
  1. package/README.md +10 -3
  2. package/dist/README-aaqapam1.md +186 -0
  3. package/dist/README-mdq34cmb.md +155 -0
  4. package/dist/api/index.d.ts +6 -2
  5. package/dist/api/index.js +30 -2
  6. package/dist/{audit-19e2431j.js → audit-m3ce9pvq.js} +4 -4
  7. package/dist/base-ypqh9n7f.css +123 -0
  8. package/dist/book-ted3tzrp.css +58 -0
  9. package/dist/{build-gqqew2vr.js → build-qnecb3a1.js} +4 -4
  10. package/dist/callout-hv56m16h.md +7 -0
  11. package/dist/{cli-kzf64c2g.js → cli-1hx14cgk.js} +946 -401
  12. package/dist/{cli-s8q42x3r.js → cli-4vtgt2ng.js} +78 -2
  13. package/dist/{cli-h8ejbtyr.js → cli-vcv5ewqj.js} +1 -1
  14. package/dist/{cli-pvk2s9d7.js → cli-vxf151ea.js} +1 -1
  15. package/dist/cli.js +16 -16
  16. package/dist/components-0mmswvvm.yaml +51 -0
  17. package/dist/components-aam0fe2z.css +94 -0
  18. package/dist/{doctor-3ccz35yz.js → doctor-qvqye1wd.js} +2 -2
  19. package/dist/{engine-pb6h089e.js → engine-daad33qn.js} +1 -1
  20. package/dist/{engine-88mynx9a.js → engine-db8632w6.js} +2 -2
  21. package/dist/expected-ycmacem8.html +9 -0
  22. package/dist/fixture-2qnyqgb5.md +10 -0
  23. package/dist/gutterpress-m98e2w2d.json +8 -0
  24. package/dist/gutterpress-x2ycdsb8.json +17 -0
  25. package/dist/{index-837htyjy.js → index-9pbaznww.js} +78 -2
  26. package/dist/{index-r4ny4fyr.js → index-dfw8hn8q.js} +1147 -523
  27. package/dist/{index-a0xpm188.js → index-rpt4vtby.js} +1 -1
  28. package/dist/index.js +31 -3
  29. package/dist/lib/build-runner.d.ts +52 -0
  30. package/dist/lib/extension-manifest.d.ts +164 -0
  31. package/dist/lib/extension-scaffold.d.ts +65 -0
  32. package/dist/lib/lint-runner.d.ts +12 -0
  33. package/dist/lib/markdown/assemble.d.ts +12 -0
  34. package/dist/lib/markdown/markers.d.ts +20 -0
  35. package/dist/lib/markdown/plugins.d.ts +1 -1
  36. package/dist/lib/markdown/renderer.d.ts +99 -0
  37. package/dist/lib/snippets.d.ts +121 -5
  38. package/dist/lib/theme-import.d.ts +8 -4
  39. package/dist/lib/theme-manager.d.ts +52 -39
  40. package/dist/lib/validation-exec.d.ts +12 -0
  41. package/dist/{lint-mpz7vfc8.js → lint-3p1s8agk.js} +4 -4
  42. package/dist/{manifest.schema-kwnrwv8b.json → manifest.schema-1q35yxs9.json} +2 -2
  43. package/dist/{new-nbrpsw7t.js → new-xffarp40.js} +111 -6
  44. package/dist/package-rm9d2tht.json +29 -0
  45. package/dist/page-rules-nsj3aw42.css +128 -0
  46. package/dist/page-templates-7md4ev7d.css +60 -0
  47. package/dist/{plugin-gg5mk26h.js → plugin-b05ck7zd.js} +4 -4
  48. package/dist/plugin-m2w7g47v.css +114 -0
  49. package/dist/plugin.js-aszz0zgh.tpl +172 -0
  50. package/dist/plugin.test.js-mv0ghv5n.tpl +232 -0
  51. package/dist/{preflight-jnmd4mg2.js → preflight-z6xpty9w.js} +4 -4
  52. package/dist/{preview-hsr9d12d.js → preview-xa1n7why.js} +4 -4
  53. package/dist/{publish-pcrrn6fd.js → publish-zgmr99kd.js} +4 -4
  54. package/dist/render.js +275 -8
  55. package/dist/term-box-4y0w7y32.md +7 -0
  56. package/dist/{theme-6fa0yjzq.js → theme-m9dtxkhj.js} +4 -4
  57. package/dist/tokens-e4xk3x4v.css +86 -0
  58. package/dist/{validate-7n25fx0g.js → validate-43hqgzz5.js} +4 -4
  59. package/package.json +1 -1
@@ -0,0 +1,123 @@
1
+ /* ===========================================================================
2
+ * {{NAME}} — 2. BASE
3
+ *
4
+ * OWNS
5
+ * The element baseline: what a `p`, `h2`, `ul`, `table`, `blockquote` or
6
+ * `code` looks like when the author wrote plain markdown and opted into
7
+ * nothing. Every value comes from a token — this file decides which token
8
+ * an element uses, never what the value is.
9
+ *
10
+ * This is also where print hygiene for bare elements lives: widow/orphan
11
+ * control, heading break-after, table header repetition.
12
+ *
13
+ * MUST NOT CONTAIN
14
+ * - Component classes. A `.{{PREFIX}}callout` rule belongs in
15
+ * components.css even if it happens to style a paragraph.
16
+ * - Literal colours, sizes or families. If you find yourself typing `#333`
17
+ * here, the token is missing from tokens.css — add it there.
18
+ * - `@page` rules. Those are page-rules.css's.
19
+ *
20
+ * WHY BARE ELEMENT SELECTORS ARE FINE HERE — and only here. A theme IS the
21
+ * book's look, so styling `p` is its job. A PLUGIN styling `p` would leak its
22
+ * opinions into every book that installed it; that is the difference, and it
23
+ * is why components.css below is scoped to classes.
24
+ * ======================================================================== */
25
+
26
+ @layer base {
27
+ body {
28
+ background: var(--{{PREFIX}}paper);
29
+ color: var(--{{PREFIX}}ink);
30
+ font-family: var(--{{PREFIX}}font-body);
31
+ font-size: var(--{{PREFIX}}fs-body);
32
+ line-height: var(--{{PREFIX}}leading);
33
+ }
34
+
35
+ /* Long-form prose: first paragraph flush, the rest indented, no vertical
36
+ gaps. The book convention — not the web one. */
37
+ p {
38
+ margin: 0;
39
+ text-indent: 1.2em;
40
+ orphans: 2;
41
+ widows: 2;
42
+ }
43
+
44
+ h1 + p,
45
+ h2 + p,
46
+ h3 + p,
47
+ blockquote + p,
48
+ ul + p,
49
+ ol + p,
50
+ table + p,
51
+ figure + p {
52
+ text-indent: 0;
53
+ }
54
+
55
+ h1, h2, h3, h4 {
56
+ font-family: var(--{{PREFIX}}font-display);
57
+ color: var(--{{PREFIX}}ink);
58
+ line-height: 1.15;
59
+ /* A heading at the foot of a page with its text on the next one is the
60
+ single most common print defect in a markdown book. */
61
+ break-after: avoid;
62
+ break-inside: avoid;
63
+ }
64
+
65
+ h1 { font-size: var(--{{PREFIX}}fs-h1); margin: 0 0 var(--{{PREFIX}}space-4); }
66
+ h2 { font-size: var(--{{PREFIX}}fs-h2); margin: var(--{{PREFIX}}space-4) 0 var(--{{PREFIX}}space-2); }
67
+ h3 { font-size: var(--{{PREFIX}}fs-h3); margin: var(--{{PREFIX}}space-3) 0 var(--{{PREFIX}}space-1); }
68
+
69
+ ul, ol { margin: var(--{{PREFIX}}space-3) 0; padding-inline-start: 1.4em; }
70
+ li { margin-block: var(--{{PREFIX}}space-1); }
71
+
72
+ blockquote {
73
+ margin: var(--{{PREFIX}}space-3) 0;
74
+ padding-inline-start: var(--{{PREFIX}}space-3);
75
+ border-inline-start: 2px solid var(--{{PREFIX}}rule);
76
+ color: var(--{{PREFIX}}ink-soft);
77
+ font-style: italic;
78
+ }
79
+
80
+ code, pre {
81
+ font-family: var(--{{PREFIX}}font-mono);
82
+ font-size: var(--{{PREFIX}}fs-small);
83
+ }
84
+
85
+ pre {
86
+ background: color-mix(in srgb, var(--{{PREFIX}}rule) 30%, transparent);
87
+ padding: var(--{{PREFIX}}space-2);
88
+ /* Print has no horizontal scrollbar: a long line that cannot wrap is a
89
+ line the reader never sees. */
90
+ white-space: pre-wrap;
91
+ overflow-wrap: break-word;
92
+ break-inside: avoid;
93
+ }
94
+
95
+ table {
96
+ border-collapse: collapse;
97
+ width: 100%;
98
+ margin: var(--{{PREFIX}}space-3) 0;
99
+ font-size: var(--{{PREFIX}}fs-small);
100
+ }
101
+
102
+ th, td {
103
+ border-bottom: 1px solid var(--{{PREFIX}}rule);
104
+ padding: var(--{{PREFIX}}space-1) var(--{{PREFIX}}space-2);
105
+ text-align: start;
106
+ vertical-align: top;
107
+ }
108
+
109
+ /* Repeat the header on every page a long table spills onto. */
110
+ thead { display: table-header-group; }
111
+ tr { break-inside: avoid; }
112
+
113
+ img { max-width: 100%; height: auto; }
114
+
115
+ figure { margin: var(--{{PREFIX}}space-3) 0; break-inside: avoid; }
116
+ figcaption {
117
+ font-size: var(--{{PREFIX}}fs-small);
118
+ color: var(--{{PREFIX}}ink-soft);
119
+ margin-block-start: var(--{{PREFIX}}space-1);
120
+ }
121
+
122
+ a { color: inherit; text-decoration: none; }
123
+ }
@@ -0,0 +1,58 @@
1
+ /* ===========================================================================
2
+ * {{NAME}} — 6. BOOK
3
+ *
4
+ * OWNS
5
+ * This one book's deviations from the theme, and nothing else. Loads last,
6
+ * in the last layer, so anything here wins.
7
+ *
8
+ * The rules that belong here have a shape: a NATURAL SELECTOR CHAIN built
9
+ * from the document's own structure — a chapter id, a page template class,
10
+ * a section component class — that RESETS a component's public token.
11
+ *
12
+ * #ch-appendix { --{{PREFIX}}callout-accent: var(--{{PREFIX}}accent-warm); }
13
+ *
14
+ * That is the whole vocabulary. No new classes to invent, none to retype in
15
+ * the markdown, and the component's own rules stay untouched.
16
+ *
17
+ * MUST NOT CONTAIN
18
+ * - New components. If a second book would want it, it is a component and
19
+ * belongs in components.css.
20
+ * - Raw values in a selector chain. Always set the component's token, never
21
+ * `#ch-appendix .{{PREFIX}}callout { border-color: #7a1f1f; }`. The token
22
+ * is the seam; writing past it re-couples this book to the component's
23
+ * internals and the next change to the component breaks this book.
24
+ * - Per-element classes in the markdown to make a rule here match. If a
25
+ * rule cannot be reached from the document's own structure, the structure
26
+ * is the thing to fix.
27
+ *
28
+ * WHERE THIS FILE SITS. When this theme is applied to a book, Gutterpress
29
+ * copies the whole folder to `themes/<id>/` and wires its sheets into the
30
+ * manifest. A project may ALSO have its own `styles/book.css`, which loads
31
+ * after the theme entirely. Both are override layers; the difference is
32
+ * whether the override travels with the theme (here) or stays with the book
33
+ * (there). Put it here while you are still designing the theme, and move it
34
+ * out when you are sure it is only ever true of one book.
35
+ * ======================================================================== */
36
+
37
+ @layer book {
38
+ /* -------------------------------------------------------------------------
39
+ * A WORKED OVERRIDE — the third and last step of the token pattern.
40
+ *
41
+ * 1. tokens.css declared --{{PREFIX}}accent-warm at :root
42
+ * 2. components.css gave the callout --{{PREFIX}}callout-accent and
43
+ * consumed it bare
44
+ * 3. here one chapter resets it
45
+ *
46
+ * Every callout in that chapter — including ones written next year — picks
47
+ * up the new accent. No markdown changes. No new class. One rule.
48
+ *
49
+ * `#ch-appendix` is the id from `@chapter #ch-appendix` in the markdown, so
50
+ * this matches nothing until a chapter claims that id. Delete it, or point
51
+ * it at a chapter you actually have.
52
+ * ---------------------------------------------------------------------- */
53
+ #ch-appendix {
54
+ --{{PREFIX}}callout-accent: var(--{{PREFIX}}accent-warm);
55
+ }
56
+
57
+ /* Your book's overrides go here. */
58
+ }
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runBuild,
3
3
  splitOutPath
4
- } from "./cli-kzf64c2g.js";
4
+ } from "./cli-1hx14cgk.js";
5
5
  import {
6
6
  log
7
- } from "./cli-pvk2s9d7.js";
7
+ } from "./cli-vxf151ea.js";
8
8
  import {
9
9
  UsageError,
10
10
  parseEngine,
@@ -12,8 +12,8 @@ import {
12
12
  parsePdfxFlavor,
13
13
  rejectExtraPositionals,
14
14
  rejectUnknownFlags
15
- } from "./cli-h8ejbtyr.js";
16
- import"./cli-s8q42x3r.js";
15
+ } from "./cli-vcv5ewqj.js";
16
+ import"./cli-4vtgt2ng.js";
17
17
  import"./cli-c41yr7he.js";
18
18
  import {
19
19
  BuildError
@@ -0,0 +1,7 @@
1
+ @section .{{PREFIX}}callout
2
+
3
+ ### {{heading}}
4
+
5
+ {{body}}
6
+
7
+ @end-section