pulpweaver4 0.0.88 → 0.0.185

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 (540) hide show
  1. package/dist/ast/djot.d.ts +2 -1
  2. package/dist/ast/djot.js +31 -2
  3. package/dist/ast/djot.js.map +1 -1
  4. package/dist/ast/index.d.ts +1 -0
  5. package/dist/ast/index.js +1 -0
  6. package/dist/ast/index.js.map +1 -1
  7. package/dist/ast/nodes.d.ts +72 -9
  8. package/dist/ast/nodes.js +8 -0
  9. package/dist/ast/nodes.js.map +1 -1
  10. package/dist/ast/table.d.ts +27 -0
  11. package/dist/ast/table.js +32 -0
  12. package/dist/ast/table.js.map +1 -0
  13. package/dist/browser.js +2420 -0
  14. package/dist/citations/book.d.ts +2 -0
  15. package/dist/citations/book.js +17 -6
  16. package/dist/citations/book.js.map +1 -1
  17. package/dist/citations/collect.d.ts +5 -1
  18. package/dist/citations/collect.js +5 -1
  19. package/dist/citations/collect.js.map +1 -1
  20. package/dist/citations/index.d.ts +1 -1
  21. package/dist/citations/index.js +1 -1
  22. package/dist/citations/index.js.map +1 -1
  23. package/dist/citations/notes.js +54 -11
  24. package/dist/citations/notes.js.map +1 -1
  25. package/dist/citations/positions.js +4 -4
  26. package/dist/citations/positions.js.map +1 -1
  27. package/dist/citations/project.d.ts +12 -2
  28. package/dist/citations/project.js +21 -7
  29. package/dist/citations/project.js.map +1 -1
  30. package/dist/colour/images.d.ts +11 -2
  31. package/dist/colour/images.js +53 -3
  32. package/dist/colour/images.js.map +1 -1
  33. package/dist/colour/ink-limit.d.ts +2 -2
  34. package/dist/colour/ink-limit.js +6 -0
  35. package/dist/colour/ink-limit.js.map +1 -1
  36. package/dist/colour/intents.d.ts +10 -0
  37. package/dist/colour/intents.js +10 -0
  38. package/dist/colour/intents.js.map +1 -1
  39. package/dist/colour/previews.d.ts +8 -4
  40. package/dist/colour/previews.js +11 -8
  41. package/dist/colour/previews.js.map +1 -1
  42. package/dist/config/config.d.ts +99 -6
  43. package/dist/config/config.js +217 -6
  44. package/dist/config/config.js.map +1 -1
  45. package/dist/config/project-schema.d.ts +0 -8
  46. package/dist/config/project-schema.js +221 -12
  47. package/dist/config/project-schema.js.map +1 -1
  48. package/dist/config/schema.js +10 -0
  49. package/dist/config/schema.js.map +1 -1
  50. package/dist/config/secrets.d.ts +11 -0
  51. package/dist/config/secrets.js +19 -0
  52. package/dist/config/secrets.js.map +1 -0
  53. package/dist/csl/processor.d.ts +3 -1
  54. package/dist/csl/processor.js +19 -13
  55. package/dist/csl/processor.js.map +1 -1
  56. package/dist/csl/project.d.ts +19 -4
  57. package/dist/csl/project.js +31 -11
  58. package/dist/csl/project.js.map +1 -1
  59. package/dist/djot/djot.js/src/ast.d.ts +4 -1
  60. package/dist/djot/djot.js/src/ast.js +8 -1
  61. package/dist/djot/djot.js/src/ast.js.map +1 -1
  62. package/dist/djot/djot.js/src/djot-renderer.js +3 -3
  63. package/dist/djot/djot.js/src/djot-renderer.js.map +1 -1
  64. package/dist/djot/djot.js/src/html.js +2 -1
  65. package/dist/djot/djot.js/src/html.js.map +1 -1
  66. package/dist/djot/djot.js/src/inline.d.ts +1 -1
  67. package/dist/djot/djot.js/src/inline.js +25 -12
  68. package/dist/djot/djot.js/src/inline.js.map +1 -1
  69. package/dist/djot/djot.js/src/pandoc.js +81 -11
  70. package/dist/djot/djot.js/src/pandoc.js.map +1 -1
  71. package/dist/djot/djot.js/src/parse.js +12 -3
  72. package/dist/djot/djot.js/src/parse.js.map +1 -1
  73. package/dist/fonts/index.d.ts +1 -1
  74. package/dist/fonts/index.js +1 -1
  75. package/dist/fonts/index.js.map +1 -1
  76. package/dist/fonts/lint.d.ts +51 -0
  77. package/dist/fonts/lint.js +101 -16
  78. package/dist/fonts/lint.js.map +1 -1
  79. package/dist/fonts/walk.d.ts +13 -0
  80. package/dist/fonts/walk.js +50 -33
  81. package/dist/fonts/walk.js.map +1 -1
  82. package/dist/html/css.d.ts +4 -0
  83. package/dist/html/css.js +11 -3
  84. package/dist/html/css.js.map +1 -1
  85. package/dist/html/dom.d.ts +6 -1
  86. package/dist/html/dom.js +28 -6
  87. package/dist/html/dom.js.map +1 -1
  88. package/dist/html/generated.d.ts +17 -0
  89. package/dist/html/generated.js +21 -0
  90. package/dist/html/generated.js.map +1 -0
  91. package/dist/html/images.d.ts +18 -0
  92. package/dist/html/images.js +49 -2
  93. package/dist/html/images.js.map +1 -1
  94. package/dist/html/index.d.ts +1 -0
  95. package/dist/html/index.js +1 -0
  96. package/dist/html/index.js.map +1 -1
  97. package/dist/html/render.d.ts +5 -4
  98. package/dist/html/render.js +34 -9
  99. package/dist/html/render.js.map +1 -1
  100. package/dist/hyphenation/exceptions.d.ts +5 -0
  101. package/dist/hyphenation/exceptions.js +11 -0
  102. package/dist/hyphenation/exceptions.js.map +1 -1
  103. package/dist/hyphenation/index.d.ts +1 -1
  104. package/dist/hyphenation/index.js +1 -1
  105. package/dist/hyphenation/index.js.map +1 -1
  106. package/dist/import/convert.d.ts +21 -0
  107. package/dist/import/convert.js +65 -0
  108. package/dist/import/convert.js.map +1 -0
  109. package/dist/incremental/cache.d.ts +59 -0
  110. package/dist/incremental/cache.js +64 -0
  111. package/dist/incremental/cache.js.map +1 -0
  112. package/dist/incremental/index.d.ts +3 -0
  113. package/dist/incremental/index.js +4 -0
  114. package/dist/incremental/index.js.map +1 -0
  115. package/dist/incremental/keys.d.ts +27 -0
  116. package/dist/incremental/keys.js +89 -0
  117. package/dist/incremental/keys.js.map +1 -0
  118. package/dist/incremental/session.d.ts +180 -0
  119. package/dist/incremental/session.js +401 -0
  120. package/dist/incremental/session.js.map +1 -0
  121. package/dist/index.d.ts +6 -0
  122. package/dist/index.js +6 -0
  123. package/dist/index.js.map +1 -1
  124. package/dist/indexes/layout.d.ts +8 -2
  125. package/dist/indexes/layout.js +6 -4
  126. package/dist/indexes/layout.js.map +1 -1
  127. package/dist/layout/cache.d.ts +174 -0
  128. package/dist/layout/cache.js +150 -0
  129. package/dist/layout/cache.js.map +1 -0
  130. package/dist/layout/converge.d.ts +28 -0
  131. package/dist/layout/converge.js +102 -9
  132. package/dist/layout/converge.js.map +1 -1
  133. package/dist/layout/counters.d.ts +4 -0
  134. package/dist/layout/counters.js +15 -0
  135. package/dist/layout/counters.js.map +1 -1
  136. package/dist/layout/index.d.ts +5 -2
  137. package/dist/layout/index.js +3 -0
  138. package/dist/layout/index.js.map +1 -1
  139. package/dist/layout/lists.d.ts +52 -3
  140. package/dist/layout/lists.js +513 -46
  141. package/dist/layout/lists.js.map +1 -1
  142. package/dist/layout/lookahead.d.ts +151 -0
  143. package/dist/layout/lookahead.js +581 -0
  144. package/dist/layout/lookahead.js.map +1 -0
  145. package/dist/layout/margin-boxes.d.ts +11 -1
  146. package/dist/layout/margin-boxes.js +24 -1
  147. package/dist/layout/margin-boxes.js.map +1 -1
  148. package/dist/layout/page-box.d.ts +2 -0
  149. package/dist/layout/page-box.js +6 -4
  150. package/dist/layout/page-box.js.map +1 -1
  151. package/dist/layout/page-rules.d.ts +8 -1
  152. package/dist/layout/page-rules.js +46 -2
  153. package/dist/layout/page-rules.js.map +1 -1
  154. package/dist/layout/page.js +4 -2
  155. package/dist/layout/page.js.map +1 -1
  156. package/dist/layout/pagebuilder.d.ts +248 -3
  157. package/dist/layout/pagebuilder.js +512 -19
  158. package/dist/layout/pagebuilder.js.map +1 -1
  159. package/dist/layout/pages.d.ts +116 -3
  160. package/dist/layout/pages.js +1396 -162
  161. package/dist/layout/pages.js.map +1 -1
  162. package/dist/layout/paragraph.d.ts +14 -0
  163. package/dist/layout/paragraph.js +304 -31
  164. package/dist/layout/paragraph.js.map +1 -1
  165. package/dist/layout/pre.js +4 -0
  166. package/dist/layout/pre.js.map +1 -1
  167. package/dist/layout/protrusion.d.ts +26 -0
  168. package/dist/layout/protrusion.js +39 -0
  169. package/dist/layout/protrusion.js.map +1 -0
  170. package/dist/layout/ranges.d.ts +2 -0
  171. package/dist/layout/ranges.js +22 -0
  172. package/dist/layout/ranges.js.map +1 -0
  173. package/dist/layout/region.d.ts +2 -1
  174. package/dist/layout/region.js +9 -5
  175. package/dist/layout/region.js.map +1 -1
  176. package/dist/layout/templates.d.ts +71 -0
  177. package/dist/layout/templates.js +290 -0
  178. package/dist/layout/templates.js.map +1 -0
  179. package/dist/layout/vlist.d.ts +3 -3
  180. package/dist/linebreak/items.d.ts +27 -2
  181. package/dist/linebreak/items.js +10 -3
  182. package/dist/linebreak/items.js.map +1 -1
  183. package/dist/linebreak/knuth-plass.d.ts +20 -0
  184. package/dist/linebreak/knuth-plass.js +68 -16
  185. package/dist/linebreak/knuth-plass.js.map +1 -1
  186. package/dist/lint/book.d.ts +13 -0
  187. package/dist/lint/book.js +52 -0
  188. package/dist/lint/book.js.map +1 -0
  189. package/dist/lint/config.d.ts +9 -0
  190. package/dist/lint/config.js +40 -6
  191. package/dist/lint/config.js.map +1 -1
  192. package/dist/lint/linter.js +1 -0
  193. package/dist/lint/linter.js.map +1 -1
  194. package/dist/lint/project.js +1 -1
  195. package/dist/lint/project.js.map +1 -1
  196. package/dist/lint/rules/layout.d.ts +3 -1
  197. package/dist/lint/rules/layout.js +8 -6
  198. package/dist/lint/rules/layout.js.map +1 -1
  199. package/dist/lint/rules/source.d.ts +3 -1
  200. package/dist/lint/rules/source.js +9 -4
  201. package/dist/lint/rules/source.js.map +1 -1
  202. package/dist/lint/testing.js +1 -0
  203. package/dist/lint/testing.js.map +1 -1
  204. package/dist/measure/bidi-data.d.ts +14 -0
  205. package/dist/measure/bidi-data.js +69 -0
  206. package/dist/measure/bidi-data.js.map +1 -0
  207. package/dist/measure/bidi.d.ts +70 -0
  208. package/dist/measure/bidi.js +225 -0
  209. package/dist/measure/bidi.js.map +1 -0
  210. package/dist/measure/css.d.ts +5 -0
  211. package/dist/measure/css.js +2 -0
  212. package/dist/measure/css.js.map +1 -1
  213. package/dist/measure/measurer.d.ts +36 -2
  214. package/dist/measure/measurer.js +220 -22
  215. package/dist/measure/measurer.js.map +1 -1
  216. package/dist/measure/model.d.ts +20 -2
  217. package/dist/measure/model.js +13 -6
  218. package/dist/measure/model.js.map +1 -1
  219. package/dist/measure/script-data.d.ts +6 -0
  220. package/dist/measure/script-data.js +34 -0
  221. package/dist/measure/script-data.js.map +1 -0
  222. package/dist/measure/scripts.d.ts +36 -0
  223. package/dist/measure/scripts.js +293 -0
  224. package/dist/measure/scripts.js.map +1 -0
  225. package/dist/output/output.d.ts +35 -3
  226. package/dist/output/output.js +26 -4
  227. package/dist/output/output.js.map +1 -1
  228. package/dist/paint/backgrounds.js +7 -20
  229. package/dist/paint/backgrounds.js.map +1 -1
  230. package/dist/paint/blend.d.ts +33 -13
  231. package/dist/paint/blend.js +73 -21
  232. package/dist/paint/blend.js.map +1 -1
  233. package/dist/paint/cache.d.ts +80 -0
  234. package/dist/paint/cache.js +537 -0
  235. package/dist/paint/cache.js.map +1 -0
  236. package/dist/paint/canvas.d.ts +4 -13
  237. package/dist/paint/canvas.js +45 -5
  238. package/dist/paint/canvas.js.map +1 -1
  239. package/dist/paint/context.d.ts +2 -0
  240. package/dist/paint/emphasis.js +1 -1
  241. package/dist/paint/emphasis.js.map +1 -1
  242. package/dist/paint/flatten.d.ts +24 -2
  243. package/dist/paint/flatten.js +55 -12
  244. package/dist/paint/flatten.js.map +1 -1
  245. package/dist/paint/forms.d.ts +64 -0
  246. package/dist/paint/forms.js +319 -0
  247. package/dist/paint/forms.js.map +1 -0
  248. package/dist/paint/images.d.ts +4 -1
  249. package/dist/paint/images.js +13 -2
  250. package/dist/paint/images.js.map +1 -1
  251. package/dist/paint/layers.d.ts +64 -0
  252. package/dist/paint/layers.js +137 -0
  253. package/dist/paint/layers.js.map +1 -0
  254. package/dist/paint/painter.d.ts +19 -6
  255. package/dist/paint/painter.js +15 -135
  256. package/dist/paint/painter.js.map +1 -1
  257. package/dist/paint/stacking.d.ts +1 -1
  258. package/dist/paint/stacking.js +9 -2
  259. package/dist/paint/stacking.js.map +1 -1
  260. package/dist/paint/text.d.ts +14 -3
  261. package/dist/paint/text.js +25 -4
  262. package/dist/paint/text.js.map +1 -1
  263. package/dist/paint/vertical.js +2 -2
  264. package/dist/paint/vertical.js.map +1 -1
  265. package/dist/pdf/encoded.d.ts +16 -0
  266. package/dist/pdf/encoded.js +35 -0
  267. package/dist/pdf/encoded.js.map +1 -0
  268. package/dist/pdf/include/colour.d.ts +105 -0
  269. package/dist/pdf/include/colour.js +349 -0
  270. package/dist/pdf/include/colour.js.map +1 -0
  271. package/dist/pdf/include/functions.d.ts +17 -0
  272. package/dist/pdf/include/functions.js +389 -0
  273. package/dist/pdf/include/functions.js.map +1 -0
  274. package/dist/pdf/include/pages.d.ts +14 -0
  275. package/dist/pdf/include/pages.js +27 -0
  276. package/dist/pdf/include/pages.js.map +1 -0
  277. package/dist/pdf/include/pdfjs/LICENSE +177 -0
  278. package/dist/pdf/include/pdfjs/pdf.min.mjs +27 -0
  279. package/dist/pdf/include/pdfjs/pdf.worker.min.mjs +27 -0
  280. package/dist/pdf/include/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
  281. package/dist/pdf/include/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
  282. package/dist/pdf/include/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
  283. package/dist/pdf/include/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
  284. package/dist/pdf/include/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
  285. package/dist/pdf/include/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
  286. package/dist/pdf/include/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
  287. package/dist/pdf/include/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
  288. package/dist/pdf/include/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
  289. package/dist/pdf/include/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
  290. package/dist/pdf/include/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
  291. package/dist/pdf/include/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
  292. package/dist/pdf/include/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
  293. package/dist/pdf/include/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
  294. package/dist/pdf/include/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
  295. package/dist/pdf/include/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
  296. package/dist/pdf/include/pdfjs/wasm/LICENSE_JBIG2 +196 -0
  297. package/dist/pdf/include/pdfjs/wasm/LICENSE_OPENJPEG +39 -0
  298. package/dist/pdf/include/pdfjs/wasm/LICENSE_PDFJS_JBIG2 +13 -0
  299. package/dist/pdf/include/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
  300. package/dist/pdf/include/pdfjs/wasm/LICENSE_PDFJS_QCMS +19 -0
  301. package/dist/pdf/include/pdfjs/wasm/LICENSE_QCMS +21 -0
  302. package/dist/pdf/include/pdfjs/wasm/jbig2.wasm +0 -0
  303. package/dist/pdf/include/pdfjs/wasm/openjpeg.wasm +0 -0
  304. package/dist/pdf/include/pdfjs/wasm/qcms_bg.wasm +0 -0
  305. package/dist/pdf/include/pdfjs/wasm/quickjs-eval.wasm +0 -0
  306. package/dist/pdf/include/prepare.d.ts +58 -0
  307. package/dist/pdf/include/prepare.js +266 -0
  308. package/dist/pdf/include/prepare.js.map +1 -0
  309. package/dist/pdf/include/preview.d.ts +38 -0
  310. package/dist/pdf/include/preview.js +101 -0
  311. package/dist/pdf/include/preview.js.map +1 -0
  312. package/dist/pdf/include/rewrite.d.ts +57 -0
  313. package/dist/pdf/include/rewrite.js +803 -0
  314. package/dist/pdf/include/rewrite.js.map +1 -0
  315. package/dist/pdf/include/serialize.d.ts +32 -0
  316. package/dist/pdf/include/serialize.js +158 -0
  317. package/dist/pdf/include/serialize.js.map +1 -0
  318. package/dist/pdf/include/testing.d.ts +26 -0
  319. package/dist/pdf/include/testing.js +50 -0
  320. package/dist/pdf/include/testing.js.map +1 -0
  321. package/dist/pdf/index.d.ts +1 -0
  322. package/dist/pdf/index.js +1 -0
  323. package/dist/pdf/index.js.map +1 -1
  324. package/dist/pdf/structure/annotations.d.ts +33 -0
  325. package/dist/pdf/structure/annotations.js +112 -0
  326. package/dist/pdf/structure/annotations.js.map +1 -0
  327. package/dist/pdf/structure/forms.d.ts +10 -0
  328. package/dist/pdf/structure/forms.js +46 -0
  329. package/dist/pdf/structure/forms.js.map +1 -0
  330. package/dist/pdf/structure/index.d.ts +41 -5
  331. package/dist/pdf/structure/index.js +40 -5
  332. package/dist/pdf/structure/index.js.map +1 -1
  333. package/dist/pdf/structure/links.d.ts +2 -0
  334. package/dist/pdf/structure/links.js +1 -1
  335. package/dist/pdf/structure/links.js.map +1 -1
  336. package/dist/pdf/structure/presentation.d.ts +28 -0
  337. package/dist/pdf/structure/presentation.js +79 -0
  338. package/dist/pdf/structure/presentation.js.map +1 -0
  339. package/dist/pdf/structure/tags.d.ts +34 -2
  340. package/dist/pdf/structure/tags.js +117 -14
  341. package/dist/pdf/structure/tags.js.map +1 -1
  342. package/dist/pdf/types.d.ts +378 -15
  343. package/dist/pdf/wasm/pulpweaver4_pdf.d.ts +44 -2
  344. package/dist/pdf/wasm/pulpweaver4_pdf.js +191 -2
  345. package/dist/pdf/wasm/pulpweaver4_pdf_bg.wasm +0 -0
  346. package/dist/pdf/writer.d.ts +13 -1
  347. package/dist/pdf/writer.js +26 -1
  348. package/dist/pdf/writer.js.map +1 -1
  349. package/dist/plugin/define.d.ts +200 -15
  350. package/dist/plugin/define.js +124 -15
  351. package/dist/plugin/define.js.map +1 -1
  352. package/dist/plugin/failure.d.ts +1 -1
  353. package/dist/plugin/index.d.ts +5 -4
  354. package/dist/plugin/index.js +5 -4
  355. package/dist/plugin/index.js.map +1 -1
  356. package/dist/plugin/reference.d.ts +38 -0
  357. package/dist/plugin/reference.js +287 -0
  358. package/dist/plugin/reference.js.map +1 -0
  359. package/dist/plugin/register.d.ts +39 -7
  360. package/dist/plugin/register.js +83 -2
  361. package/dist/plugin/register.js.map +1 -1
  362. package/dist/preflight/index.d.ts +1 -1
  363. package/dist/preflight/index.js +1 -1
  364. package/dist/preflight/index.js.map +1 -1
  365. package/dist/preflight/pdfx.d.ts +35 -0
  366. package/dist/preflight/pdfx.js +37 -4
  367. package/dist/preflight/pdfx.js.map +1 -1
  368. package/dist/preflight/reader.d.ts +10 -3
  369. package/dist/preflight/reader.js +86 -5
  370. package/dist/preflight/reader.js.map +1 -1
  371. package/dist/print/impose.d.ts +66 -0
  372. package/dist/print/impose.js +331 -0
  373. package/dist/print/impose.js.map +1 -0
  374. package/dist/print/output.js +426 -60
  375. package/dist/print/output.js.map +1 -1
  376. package/dist/problem.js +4 -3
  377. package/dist/problem.js.map +1 -1
  378. package/dist/profile/index.d.ts +1 -0
  379. package/dist/profile/index.js +1 -0
  380. package/dist/profile/index.js.map +1 -1
  381. package/dist/profile/lint.d.ts +1 -1
  382. package/dist/profile/lint.js +29 -1
  383. package/dist/profile/lint.js.map +1 -1
  384. package/dist/profile/list-table.d.ts +51 -0
  385. package/dist/profile/list-table.js +137 -0
  386. package/dist/profile/list-table.js.map +1 -0
  387. package/dist/profile/metadata.js +3 -0
  388. package/dist/profile/metadata.js.map +1 -1
  389. package/dist/profile/profile.d.ts +3 -0
  390. package/dist/profile/profile.js +9 -1
  391. package/dist/profile/profile.js.map +1 -1
  392. package/dist/project.js +3 -0
  393. package/dist/project.js.map +1 -1
  394. package/dist/qpdf/index.d.ts +2 -0
  395. package/dist/qpdf/index.js +3 -0
  396. package/dist/qpdf/index.js.map +1 -0
  397. package/dist/qpdf/qpdf.d.ts +125 -0
  398. package/dist/qpdf/qpdf.js +205 -0
  399. package/dist/qpdf/qpdf.js.map +1 -0
  400. package/dist/qpdf/testing.d.ts +12 -0
  401. package/dist/qpdf/testing.js +9 -0
  402. package/dist/qpdf/testing.js.map +1 -0
  403. package/dist/qpdf/wasm/LICENSE-qpdf +202 -0
  404. package/dist/qpdf/wasm/LICENSE-zlib +22 -0
  405. package/dist/qpdf/wasm/NOTICE-qpdf.md +42 -0
  406. package/dist/qpdf/wasm/qpdf.wasm +0 -0
  407. package/dist/render/index.d.ts +3 -0
  408. package/dist/render/index.js +2 -0
  409. package/dist/render/index.js.map +1 -0
  410. package/dist/render/render.d.ts +98 -0
  411. package/dist/render/render.js +243 -0
  412. package/dist/render/render.js.map +1 -0
  413. package/dist/reproducible/clock.d.ts +4 -5
  414. package/dist/reproducible/clock.js +4 -5
  415. package/dist/reproducible/clock.js.map +1 -1
  416. package/dist/spike/spike-page.chromium.json +4 -4
  417. package/dist/style/colours.d.ts +7 -2
  418. package/dist/style/colours.js +24 -2
  419. package/dist/style/colours.js.map +1 -1
  420. package/dist/style/compile.js +1 -1
  421. package/dist/style/compile.js.map +1 -1
  422. package/dist/style/defaults.d.ts +9 -3
  423. package/dist/style/defaults.js +14 -2
  424. package/dist/style/defaults.js.map +1 -1
  425. package/dist/style/gcpm.d.ts +1 -1
  426. package/dist/style/gcpm.js +17 -5
  427. package/dist/style/gcpm.js.map +1 -1
  428. package/dist/style/properties.js +84 -0
  429. package/dist/style/properties.js.map +1 -1
  430. package/dist/test/book.d.ts +22 -2
  431. package/dist/test/book.js +35 -2
  432. package/dist/test/book.js.map +1 -1
  433. package/dist/test/build.d.ts +23 -0
  434. package/dist/test/build.js +86 -33
  435. package/dist/test/build.js.map +1 -1
  436. package/dist/test/layout.js +132 -22
  437. package/dist/test/layout.js.map +1 -1
  438. package/dist/test/limits.d.ts +8 -0
  439. package/dist/test/limits.js +9 -0
  440. package/dist/test/limits.js.map +1 -0
  441. package/dist/test/pipeline.d.ts +26 -0
  442. package/dist/test/pipeline.js +4 -2
  443. package/dist/test/pipeline.js.map +1 -1
  444. package/dist/test/render.d.ts +26 -3
  445. package/dist/test/render.js +151 -23
  446. package/dist/test/render.js.map +1 -1
  447. package/dist/test/runner.d.ts +6 -3
  448. package/dist/test/runner.js +172 -105
  449. package/dist/test/runner.js.map +1 -1
  450. package/dist/test/text.js +2 -2
  451. package/dist/test/text.js.map +1 -1
  452. package/dist/text/output.js +2 -2
  453. package/dist/text/output.js.map +1 -1
  454. package/dist/text/render.d.ts +4 -3
  455. package/dist/text/render.js +128 -6
  456. package/dist/text/render.js.map +1 -1
  457. package/dist/transform/index.d.ts +1 -1
  458. package/dist/transform/index.js +1 -1
  459. package/dist/transform/index.js.map +1 -1
  460. package/dist/transform/run.d.ts +2 -0
  461. package/dist/transform/run.js +32 -16
  462. package/dist/transform/run.js.map +1 -1
  463. package/dist/web/output.js +116 -10
  464. package/dist/web/output.js.map +1 -1
  465. package/dist/web/runtime/justify.js.txt +2 -2
  466. package/dist/web/site.d.ts +2 -0
  467. package/dist/web/site.js +8 -1
  468. package/dist/web/site.js.map +1 -1
  469. package/docs/README.md +6 -1
  470. package/docs/manual/chapters/front.dj +34 -0
  471. package/docs/manual/chapters/guides/citations.dj +426 -0
  472. package/docs/manual/chapters/guides/colour-and-prepress.dj +261 -0
  473. package/docs/manual/chapters/guides/editions.dj +329 -0
  474. package/docs/manual/chapters/guides/in-a-web-page.dj +143 -0
  475. package/docs/manual/chapters/guides/lines-and-pages.dj +681 -0
  476. package/docs/manual/chapters/guides/lint-rules.dj +355 -0
  477. package/docs/manual/chapters/guides/pdfs.dj +501 -0
  478. package/docs/manual/chapters/guides/plugins.dj +425 -0
  479. package/docs/manual/chapters/guides/testing.dj +264 -0
  480. package/docs/manual/chapters/guides/writing-in-djot.dj +537 -0
  481. package/docs/manual/chapters/start/for-latex-users.dj +256 -0
  482. package/docs/manual/chapters/start/getting-started.dj +167 -0
  483. package/docs/manual/chapters/start/your-first-book.dj +426 -0
  484. package/docs/manual/fonts/CrimsonPro-Italic-VF.ttf +0 -0
  485. package/docs/manual/fonts/CrimsonPro-VF.ttf +0 -0
  486. package/docs/manual/fonts/JetBrainsMono-Regular.otf +0 -0
  487. package/docs/manual/fonts/NotoSansSymbols2-Boxes.ttf +0 -0
  488. package/docs/manual/fonts/OFL.txt +95 -0
  489. package/docs/manual/pulpweaver4.toml +39 -0
  490. package/docs/manual/styles/manual.css +137 -0
  491. package/docs/reference/css-properties/index.md +9 -0
  492. package/docs/reference/css-properties/pw-expansion.md +31 -0
  493. package/docs/reference/css-properties/pw-flow-into.md +31 -0
  494. package/docs/reference/css-properties/pw-knockout.md +26 -0
  495. package/docs/reference/css-properties/pw-layer.md +24 -0
  496. package/docs/reference/css-properties/pw-page-breaking.md +30 -0
  497. package/docs/reference/css-properties/pw-page-duration.md +28 -0
  498. package/docs/reference/css-properties/pw-page-rotate.md +29 -0
  499. package/docs/reference/css-properties/pw-page-transition.md +29 -0
  500. package/docs/reference/css-properties/pw-protrusion.md +31 -0
  501. package/docs/reference/lint-rules/ibid-across-page.md +2 -2
  502. package/docs/reference/lint-rules/unused-entry.md +3 -1
  503. package/docs/reference/plugin-api/capabilities.md +2 -2
  504. package/docs/reference/plugin-api/claim-kind.md +1 -1
  505. package/docs/reference/plugin-api/combine-exceptions.md +19 -0
  506. package/docs/reference/plugin-api/element-break-context.md +34 -0
  507. package/docs/reference/plugin-api/element-break-item.md +24 -0
  508. package/docs/reference/plugin-api/element-breaker.md +24 -0
  509. package/docs/reference/plugin-api/flow-definition.md +30 -0
  510. package/docs/reference/plugin-api/generated-reference.md +32 -0
  511. package/docs/reference/plugin-api/index-definition.md +32 -0
  512. package/docs/reference/plugin-api/index-titles.md +18 -0
  513. package/docs/reference/plugin-api/index.md +27 -3
  514. package/docs/reference/plugin-api/insert-class-definition.md +46 -0
  515. package/docs/reference/plugin-api/insert-placement.md +22 -0
  516. package/docs/reference/plugin-api/insert-placements.md +18 -0
  517. package/docs/reference/plugin-api/layout-definition.md +9 -5
  518. package/docs/reference/plugin-api/layout-slot.md +6 -16
  519. package/docs/reference/plugin-api/lint-context.md +3 -1
  520. package/docs/reference/plugin-api/lint-definition.md +1 -1
  521. package/docs/reference/plugin-api/lint-edition.md +2 -0
  522. package/docs/reference/plugin-api/page-builder-event.md +22 -0
  523. package/docs/reference/plugin-api/page-builder-hook.md +7 -3
  524. package/docs/reference/plugin-api/page-builder-page-event.md +30 -0
  525. package/docs/reference/plugin-api/page-template-definition.md +34 -0
  526. package/docs/reference/plugin-api/page-template-region-definition.md +46 -0
  527. package/docs/reference/plugin-api/plugin-definition.md +5 -1
  528. package/docs/reference/plugin-api/plugin-reference-options.md +32 -0
  529. package/docs/reference/plugin-api/plugin-reference.md +22 -0
  530. package/docs/reference/plugin-api/plugin-registry.md +15 -5
  531. package/docs/reference/plugin-api/plugin-stage.md +1 -1
  532. package/docs/reference/plugin-api/plugin.md +9 -2
  533. package/docs/reference/plugin-api/reference-page.md +34 -0
  534. package/docs/reference/plugin-api/render-reference-page.md +18 -0
  535. package/docs/reference/plugin-api/renderers.md +1 -1
  536. package/docs/reference/pulpweaver4-toml/editions.md +253 -2
  537. package/docs/reference/pulpweaver4-toml/index.md +57 -1
  538. package/docs/reference/pulpweaver4-toml/inks.md +15 -4
  539. package/docs/reference/pulpweaver4-toml/lint.md +1 -1
  540. package/package.json +5 -1
@@ -0,0 +1,32 @@
1
+ ---
2
+ title: "GeneratedReference"
3
+ description: "Interface in pulpweaver4’s plugin API: A plugin's reference: its pages, and what its definition leaves undocumented."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ Interface · [Documenting a plugin](index.md#documenting-a-plugin)
9
+
10
+ ```ts
11
+ interface GeneratedReference {
12
+ readonly pages: readonly ReferencePage[]
13
+ readonly problems: readonly string[]
14
+ }
15
+ ```
16
+
17
+ A plugin's reference: its pages, and what its definition leaves undocumented.
18
+
19
+ ## Members
20
+
21
+ | Member | What it is |
22
+ | --- | --- |
23
+ | `pages` | The pages, the index (`reference/index.md`) first. |
24
+ | `problems` | Each thing without a description, a sentence naming it; empty when everything is documented. |
25
+
26
+ ## Uses
27
+
28
+ [`ReferencePage`](reference-page.md)
29
+
30
+ ## Used by
31
+
32
+ [`pluginReference`](plugin-reference.md)
@@ -0,0 +1,32 @@
1
+ ---
2
+ title: "IndexDefinition"
3
+ description: "Interface in pulpweaver4’s plugin API: an index a plugin makes, by putting indexTerms with its name in the manuscript (scripture): the plugin owns the name, and says how the book and its tests refer to it."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ Interface · [Defining a plugin](index.md#defining-a-plugin)
9
+
10
+ ```ts
11
+ interface IndexDefinition {
12
+ readonly description?: string
13
+ readonly title?: string
14
+ lookup?(written: string): string | undefined
15
+ }
16
+ ```
17
+
18
+ An index a plugin makes, by putting `indexTerm`s with its name in the
19
+ manuscript (`scripture`): the plugin owns the name, and says how the book
20
+ and its tests refer to it.
21
+
22
+ ## Members
23
+
24
+ | Member | What it is |
25
+ | --- | --- |
26
+ | `description` | What it indexes, for the docs and messages. |
27
+ | `title` | Its heading, where a `::: index` block places it with no `title` of its own and opens no section: `Scripture index`. |
28
+ | `lookup` | The term of the entry a test names as written (`1Ti 5:18` for `1 Timothy!5:18`), for `book.index(name).entry(…)`; undefined for one it can't read. An entry is found by its own term first. |
29
+
30
+ ## Used by
31
+
32
+ [`Plugin`](plugin.md) · [`PluginDefinition`](plugin-definition.md) · [`PluginRegistry`](plugin-registry.md)
@@ -0,0 +1,18 @@
1
+ ---
2
+ title: "indexTitles"
3
+ description: "Function in pulpweaver4’s plugin API: the headings the plugins give their indexes, by name, as the core's index transform takes them (IndexOptions.titles)."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ Function · [Registering plugins](index.md#registering-plugins)
9
+
10
+ ```ts
11
+ function indexTitles(registry: PluginRegistry): Record<string, string>
12
+ ```
13
+
14
+ The headings the plugins give their indexes, by name, as the core's `index` transform takes them (`IndexOptions.titles`).
15
+
16
+ ## Uses
17
+
18
+ [`PluginRegistry`](plugin-registry.md)
@@ -25,9 +25,10 @@ export default definePlugin({
25
25
 
26
26
  | Name | Kind | What it is |
27
27
  | --- | --- | --- |
28
- | [`CAPABILITIES`](capabilities.md) | Constant | What a plugin may ask for besides the project's files, for running untrusted plugins later in a worker. |
28
+ | [`CAPABILITIES`](capabilities.md) | Constant | What a plugin may ask for besides the project's files. |
29
29
  | [`definePlugin`](define-plugin.md) | Function | Checks a plugin and puts it in one shape. |
30
30
  | [`defineRule`](define-rule.md) | Function | Checks a lint rule. |
31
+ | [`INSERT_PLACEMENTS`](insert-placements.md) | Constant | Where on a page a plugin's insert class (`float: <name>`) places its material. |
31
32
  | [`PLUGIN_API`](plugin-api.md) | Constant | The plugin API version this core speaks. |
32
33
  | [`PluginError`](plugin-error.md) | Class | A plugin that can't be defined: a wrong `api`, a malformed stage, a bad name. |
33
34
  | [`RENDER_FORMATS`](render-formats.md) | Constant | The formats a plugin renders its nodes into. |
@@ -36,8 +37,15 @@ export default definePlugin({
36
37
  | [`Capability`](capability.md) | Type | A capability a plugin `needs`: `fs`, files beyond the project's, or `net`, the network. |
37
38
  | [`CommandContext`](command-context.md) | Interface | What a plugin's command is given as it runs. |
38
39
  | [`CommandDefinition`](command-definition.md) | Interface | A `pw <command>` a plugin adds. |
40
+ | [`ElementBreaker`](element-breaker.md) | Type | Breaks a claimed element into the vertical list the page builder consumes. |
41
+ | [`ElementBreakContext`](element-break-context.md) | Interface | What an element breaker is told: the element's measure, the edition's fonts (and their HarfBuzz measurer, `fonts.measurer`) and, when the build has one, its hyphenator. |
42
+ | [`ElementBreakItem`](element-break-item.md) | Type | One item of the vertical list an element breaker hands the page builder, as a paragraph's lines do: a box (one line, already in the element), glue, or a penalty. |
43
+ | [`FlowDefinition`](flow-definition.md) | Interface | A plugin's named flow: content moved out of the main text into its own `PageBuilder` stream. |
44
+ | [`IndexDefinition`](index-definition.md) | Interface | An index a plugin makes, by putting `indexTerm`s with its name in the manuscript (`scripture`): the plugin owns the name, and says how the book and its tests refer to it. |
45
+ | [`InsertClassDefinition`](insert-class-definition.md) | Interface | A plugin's insert class (`float: <name>`): TeX's insert registers and the region on the page where it is placed. |
46
+ | [`InsertPlacement`](insert-placement.md) | Type | Placement region for a plugin's insert class: top, bottom, or a page margin. |
39
47
  | [`LayoutDefinition`](layout-definition.md) | Interface | A plugin's layout stage: what it tells the line and page breakers. |
40
- | [`LayoutSlot`](layout-slot.md) | Interface | An insert class, a page template or a flow: their shapes are the page builder's (#23). |
48
+ | [`LayoutSlot`](layout-slot.md) | Type | An insert class, a page template or a flow slot in `layout`. |
41
49
  | [`LineBreaker`](line-breaker.md) | Type | Breaks lines for an element or a language (CJK, ragged right), as the core's Knuth–Plass breaker does. |
42
50
  | [`LintContext`](lint-context.md) | Interface | What a rule's check is given; which parts it has depends on its level. |
43
51
  | [`LintDefinition`](lint-definition.md) | Interface | A plugin's lint stage, when it has presets as well as rules. |
@@ -49,7 +57,11 @@ export default definePlugin({
49
57
  | [`TextEdit`](text-edit.md) | Interface | A change to a source file: the text a position covers, replaced. |
50
58
  | [`NodeClaim`](node-claim.md) | Interface | A block or inline a plugin claims, and the attributes the build checks it for. |
51
59
  | [`OutputDefinition`](output-definition.md) | Interface | An output a plugin writes, by the name an edition's `output` gives: the core's `Output`, less its name. |
52
- | [`PageBuilderHook`](page-builder-hook.md) | Type | Called by the page builder at its events (sidenotes); its shape is the page builder's (#23). |
60
+ | [`PageBuilderEvent`](page-builder-event.md) | Type | An event observed by a plugin's `layout.pageBuilder` hook. |
61
+ | [`PageBuilderHook`](page-builder-hook.md) | Type | Called by the page builder after each page is laid out (read-only observation). |
62
+ | [`PageBuilderPageEvent`](page-builder-page-event.md) | Interface | Event fired after each page is laid out, in read-only order so hook order cannot affect layout. |
63
+ | [`PageTemplateDefinition`](page-template-definition.md) | Interface | A plugin's page template: an `@page` selector and the regions dividing its text area. |
64
+ | [`PageTemplateRegionDefinition`](page-template-region-definition.md) | Interface | One region of a plugin's page template (`@region <name>`). |
53
65
  | [`PenaltyRule`](penalty-rule.md) | Interface | Penalties a plugin adds at breaks by an element: before it, after it, or at every break inside it. |
54
66
  | [`Plugin`](plugin.md) | Interface | A plugin, checked and in one shape: what [`definePlugin`](define-plugin.md) returns and the registry reads. |
55
67
  | [`PluginDefinition`](plugin-definition.md) | Interface | A plugin as its module writes it. |
@@ -65,9 +77,11 @@ export default definePlugin({
65
77
 
66
78
  | Name | Kind | What it is |
67
79
  | --- | --- | --- |
80
+ | [`combineExceptions`](combine-exceptions.md) | Function | Hyphenation exceptions from the project's file and from plugins, as one list: a word the project lists, for any language, is the project's alone; a word several plugins give for one language breaks only where every one of them lets it, as a forbidden break stays forbidden. |
68
81
  | [`combinePenalties`](combine-penalties.md) | Function | Penalties from several plugins at one break: they add up, a forbidden break (10000 or more) stays forbidden, and otherwise a forced one (−10000 or less) stays forced. |
69
82
  | [`CORE_CLAIMS`](core-claims.md) | Constant | The names the core owns, which no plugin may claim. |
70
83
  | [`EMPTY_REGISTRY`](empty-registry.md) | Constant | A registry with no plugins. (Last, after the class it needs.) |
84
+ | [`indexTitles`](index-titles.md) | Function | The headings the plugins give their indexes, by name, as the core's `index` transform takes them (`IndexOptions.titles`). |
71
85
  | [`pluginScope`](plugin-scope.md) | Function | The selector of the elements a plugin renders, which its stylesheet is scoped to: the HTML renderer (#19) marks each with `data-pw-plugin`. |
72
86
  | [`registerPlugins`](register-plugins.md) | Function | Registers the plugins, in whatever order they come, and returns what they contribute and the problems with them as a set. |
73
87
  | [`ClaimKind`](claim-kind.md) | Type | What claims a name: the kinds of duplicate claim. |
@@ -121,3 +135,13 @@ export default definePlugin({
121
135
  | [`FailedOn`](failed-on.md) | Interface | What a plugin was working on when it threw, for the message and the problem's place. |
122
136
  | [`PluginStage`](plugin-stage.md) | Type | The stages a plugin's code runs in, as messages name them. |
123
137
  | [`PluginThrewProblem`](plugin-threw-problem.md) | Interface | A problem a plugin's throw became: its plugin and stage, for the problems panel to group by. |
138
+
139
+ ## Documenting a plugin
140
+
141
+ | Name | Kind | What it is |
142
+ | --- | --- | --- |
143
+ | [`pluginReference`](plugin-reference.md) | Function | A plugin's reference, from its definition (what [`definePlugin`](define-plugin.md) returns): an index with its outputs, blocks and spans, rules, presets, matchers and indexes; a page of its options; a page of its blocks' and spans' attributes; and a page for each lint rule. |
144
+ | [`renderReferencePage`](render-reference-page.md) | Function | The file a page is written as: Starlight's frontmatter, a note that it is generated by `generator`, and its body. |
145
+ | [`GeneratedReference`](generated-reference.md) | Interface | A plugin's reference: its pages, and what its definition leaves undocumented. |
146
+ | [`PluginReferenceOptions`](plugin-reference-options.md) | Interface | What a plugin's reference says beyond what its definition declares. |
147
+ | [`ReferencePage`](reference-page.md) | Interface | A page of a plugin's reference, as its package ships it in `docs/`. |
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: "InsertClassDefinition"
3
+ description: "Interface in pulpweaver4’s plugin API: A plugin's insert class (float: <name>): TeX's insert registers and the region on the page where it is placed."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ Interface · [Defining a plugin](index.md#defining-a-plugin)
9
+
10
+ ```ts
11
+ interface InsertClassDefinition {
12
+ readonly description?: string
13
+ readonly region?: InsertPlacement
14
+ readonly width?: string
15
+ readonly gap?: string
16
+ readonly skip?: string
17
+ readonly maxHeight?: string
18
+ readonly floatingPenalty?: number
19
+ readonly splitTopSkip?: string
20
+ readonly splitMaxDepth?: string
21
+ }
22
+ ```
23
+
24
+ A plugin's insert class (`float: <name>`): TeX's insert registers and the region on the page where it is placed.
25
+
26
+ ## Members
27
+
28
+ | Member | What it is |
29
+ | --- | --- |
30
+ | `description` | What it is, for the docs and messages. |
31
+ | `region` | Where on the page its material goes: default `'margin-outer'`. |
32
+ | `width` | Width of a margin region (`margin-*`), as a CSS length (`1.5in`, `100px`); defaults to the margin less `gap`. |
33
+ | `gap` | Gap between a margin region and the text area, as a CSS length (`12pt`); defaults to `12pt`. |
34
+ | `skip` | Space above the class's material when a page has one (TeX's `\skip`), as glue (`12pt plus 4pt minus 4pt`). |
35
+ | `maxHeight` | The most of the class one page holds (TeX's `\dimen`), as a CSS length; defaults to the page's text height. |
36
+ | `floatingPenalty` | Penalty per insert held over after a split (TeX's `\floatingpenalty`): an integer, default `0`. |
37
+ | `splitTopSkip` | Space above a split insert's remainder (TeX's `\splittopskip`), as glue; default `0px`. |
38
+ | `splitMaxDepth` | Deepest a split insert's last box may be (TeX's `\splitmaxdepth`), as a CSS length; default `0px`. |
39
+
40
+ ## Uses
41
+
42
+ [`InsertPlacement`](insert-placement.md)
43
+
44
+ ## Used by
45
+
46
+ [`LayoutDefinition`](layout-definition.md) · [`LayoutSlot`](layout-slot.md) · [`PluginRegistry`](plugin-registry.md)
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: "InsertPlacement"
3
+ description: "Type in pulpweaver4’s plugin API: placement region for a plugin's insert class: top, bottom, or a page margin."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ Type · [Defining a plugin](index.md#defining-a-plugin)
9
+
10
+ ```ts
11
+ type InsertPlacement = (typeof INSERT_PLACEMENTS)[number]
12
+ ```
13
+
14
+ Placement region for a plugin's insert class: top, bottom, or a page margin.
15
+
16
+ ## Uses
17
+
18
+ [`INSERT_PLACEMENTS`](insert-placements.md)
19
+
20
+ ## Used by
21
+
22
+ [`InsertClassDefinition`](insert-class-definition.md)
@@ -0,0 +1,18 @@
1
+ ---
2
+ title: "INSERT_PLACEMENTS"
3
+ description: "Constant in pulpweaver4’s plugin API: where on a page a plugin's insert class (float: <name>) places its material."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ Constant · [Defining a plugin](index.md#defining-a-plugin)
9
+
10
+ ```ts
11
+ const INSERT_PLACEMENTS: readonly ["top", "bottom", "margin-left", "margin-right", "margin-outer", "margin-inner"]
12
+ ```
13
+
14
+ Where on a page a plugin's insert class (`float: <name>`) places its material.
15
+
16
+ ## Used by
17
+
18
+ [`InsertPlacement`](insert-placement.md)
@@ -11,11 +11,13 @@ Interface · [Defining a plugin](index.md#defining-a-plugin)
11
11
  interface LayoutDefinition {
12
12
  readonly penalties?: readonly PenaltyRule[]
13
13
  readonly boxes?: readonly string[]
14
- readonly inserts?: Readonly<Record<string, LayoutSlot>>
14
+ readonly inserts?: Readonly<Record<string, InsertClassDefinition>>
15
15
  readonly lineBreakers?: { readonly languages?: Readonly<Record<string, LineBreaker>>; readonly elements?: Readonly<Record<string, LineBreaker>> }
16
- readonly pageTemplates?: Readonly<Record<string, LayoutSlot>>
17
- readonly flows?: Readonly<Record<string, LayoutSlot>>
16
+ readonly elementBreakers?: Readonly<Record<string, ElementBreaker>>
17
+ readonly pageTemplates?: Readonly<Record<string, PageTemplateDefinition>>
18
+ readonly flows?: Readonly<Record<string, FlowDefinition>>
18
19
  readonly pageBuilder?: PageBuilderHook
20
+ readonly resolvers?: readonly PageResolver[]
19
21
  }
20
22
  ```
21
23
 
@@ -29,13 +31,15 @@ A plugin's layout stage: what it tells the line and page breakers.
29
31
  | `boxes` | Selectors of elements laid out as one box, never broken. These add up across plugins. |
30
32
  | `inserts` | Insert classes (`float: <name>`), by name. |
31
33
  | `lineBreakers` | Line breakers, by language tag (`ja`) or by selector. |
34
+ | `elementBreakers` | Element breakers, by CSS selector. The one that claims an element breaks it into boxes, glue and penalties for the page builder, as the paragraph builder does for text. One selector has one owner. |
32
35
  | `pageTemplates` | Page templates, by name: a page's regions and what flows into them. |
33
36
  | `flows` | Flows, by name: content set apart from the main text, such as a parallel translation. |
34
- | `pageBuilder` | Called by the page builder at its events, such as for sidenotes. |
37
+ | `pageBuilder` | Called by the page builder after each page is laid out. |
38
+ | `resolvers` | What it fills in from the pages, in a print edition's converging layout: each is given the pages just laid out and the book's HTML, changes the HTML, and returns the elements it changed (none once they have settled), as the core's page references and indexes do. A link it adds (`a[href]`) is keyed after its nearest keyed ancestor, so a tagged PDF has it as a `Link` (#181). |
35
39
 
36
40
  ## Uses
37
41
 
38
- [`LayoutSlot`](layout-slot.md) · [`LineBreaker`](line-breaker.md) · [`PageBuilderHook`](page-builder-hook.md) · [`PenaltyRule`](penalty-rule.md)
42
+ [`ElementBreaker`](element-breaker.md) · [`FlowDefinition`](flow-definition.md) · [`InsertClassDefinition`](insert-class-definition.md) · [`LineBreaker`](line-breaker.md) · [`PageBuilderHook`](page-builder-hook.md) · [`PageTemplateDefinition`](page-template-definition.md) · [`PenaltyRule`](penalty-rule.md)
39
43
 
40
44
  ## Used by
41
45
 
@@ -1,28 +1,18 @@
1
1
  ---
2
2
  title: "LayoutSlot"
3
- description: "Interface in pulpweaver4’s plugin API: an insert class, a page template or a flow: their shapes are the page builder's (#23)."
3
+ description: "Type in pulpweaver4’s plugin API: an insert class, a page template or a flow slot in layout."
4
4
  ---
5
5
 
6
6
  <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
7
 
8
- Interface · [Defining a plugin](index.md#defining-a-plugin)
8
+ Type · [Defining a plugin](index.md#defining-a-plugin)
9
9
 
10
10
  ```ts
11
- interface LayoutSlot {
12
- readonly description?: string
13
- readonly [key: string]: unknown
14
- }
11
+ type LayoutSlot = InsertClassDefinition | PageTemplateDefinition | FlowDefinition
15
12
  ```
16
13
 
17
- An insert class, a page template or a flow: their shapes are the page builder's (#23).
14
+ An insert class, a page template or a flow slot in `layout`.
18
15
 
19
- ## Members
16
+ ## Uses
20
17
 
21
- | Member | What it is |
22
- | --- | --- |
23
- | `description` | What it is, for the docs and messages. |
24
- | `[index]` | The rest of its definition, in the page builder's shape. |
25
-
26
- ## Used by
27
-
28
- [`LayoutDefinition`](layout-definition.md) · [`PluginRegistry`](plugin-registry.md)
18
+ [`FlowDefinition`](flow-definition.md) · [`InsertClassDefinition`](insert-class-definition.md) · [`PageTemplateDefinition`](page-template-definition.md)
@@ -16,6 +16,7 @@ interface LintContext {
16
16
  readonly edition?: LintEdition
17
17
  readonly sources?: ReadonlyMap<string, string>
18
18
  readonly bibliographies?: readonly Bibliography[]
19
+ readonly formatRenderers?: ReadonlyMap<string, Renderers>
19
20
  locate?(at: Target | Text): Position | undefined
20
21
  report(at: Target | Position, message: string, fix?: string | LintFix): void
21
22
  }
@@ -36,12 +37,13 @@ as `ast`, `options` and `report`.
36
37
  | `edition` | The edition linted, as `pulpweaver4.toml` gives it. |
37
38
  | `sources` | The source files, by path, as they were read: what a fix edits. |
38
39
  | `bibliographies` | The project's bibliographies, read, for rules about citations. |
40
+ | `formatRenderers` | The plugins' renderers for their blocks and inlines in every format, by name, as an output is given them: for rules about what an edition can render, such as a node with no reStructuredText rendering. |
39
41
  | `locate` | The source position of a node, an element or a text of the HTML or the pages. |
40
42
  | `report` | Reports a problem at a node, an element or a source position. The third argument is how to fix it, in words, or with a source rule's edits, which `pw lint --fix` applies, and a `code` more particular than the rule's name. |
41
43
 
42
44
  ## Uses
43
45
 
44
- [`LintEdition`](lint-edition.md) · [`LintFix`](lint-fix.md)
46
+ [`LintEdition`](lint-edition.md) · [`LintFix`](lint-fix.md) · [`Renderers`](renderers.md)
45
47
 
46
48
  ## Used by
47
49
 
@@ -21,7 +21,7 @@ A plugin's lint stage, when it has presets as well as rules.
21
21
  | Member | What it is |
22
22
  | --- | --- |
23
23
  | `rules` | Its rules. |
24
- | `presets` | By name, `<name>` or `<plugin>/<name>`. |
24
+ | `presets` | By name, `<name>` or `<plugin>/<name>`. One named `recommended` comes with the core's `recommended`: a project or edition whose presets reach that extends `<plugin>/recommended` too, without naming it, so put there the rules every project using the plugin wants. It has no order among the presets it joins, so it must set any rule a core preset sets as that one does (or the build reports `lint-preset-conflict`), and a project's own `rules` still decide over it. |
25
25
 
26
26
  ## Uses
27
27
 
@@ -16,6 +16,7 @@ interface LintEdition {
16
16
  readonly outputIntent?: string
17
17
  readonly pdfStandards?: readonly string[]
18
18
  readonly impose?: 'booklet'
19
+ readonly citations?: { readonly style?: string, readonly ibid: 'page' | 'spread' }
19
20
  }
20
21
  ```
21
22
 
@@ -32,6 +33,7 @@ An edition, as the linter tells a rule of it.
32
33
  | `outputIntent` | A standard output intent's name, or a printer's profile's path. |
33
34
  | `pdfStandards` | The PDF standards it claims (`PDF/X-4`), none if it claims none. |
34
35
  | `impose` | How its pages are imposed, if they are. |
36
+ | `citations` | Its citations' style (`citation-style`, its own or the book's; absent for the default) and what an ibid may not point across in print (`citation-ibid`). |
35
37
 
36
38
  ## Used by
37
39
 
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: "PageBuilderEvent"
3
+ description: "Type in pulpweaver4’s plugin API: an event observed by a plugin's layout.pageBuilder hook."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ Type · [Defining a plugin](index.md#defining-a-plugin)
9
+
10
+ ```ts
11
+ type PageBuilderEvent = PageBuilderPageEvent
12
+ ```
13
+
14
+ An event observed by a plugin's `layout.pageBuilder` hook.
15
+
16
+ ## Uses
17
+
18
+ [`PageBuilderPageEvent`](page-builder-page-event.md)
19
+
20
+ ## Used by
21
+
22
+ [`PageBuilderHook`](page-builder-hook.md)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "PageBuilderHook"
3
- description: "Type in pulpweaver4’s plugin API: called by the page builder at its events (sidenotes); its shape is the page builder's (#23)."
3
+ description: "Type in pulpweaver4’s plugin API: called by the page builder after each page is laid out (read-only observation)."
4
4
  ---
5
5
 
6
6
  <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
@@ -8,10 +8,14 @@ description: "Type in pulpweaver4’s plugin API: called by the page builder at
8
8
  Type · [Defining a plugin](index.md#defining-a-plugin)
9
9
 
10
10
  ```ts
11
- type PageBuilderHook = (event: { readonly type: string; readonly [key: string]: unknown }, ctx: { readonly plugin: string }) => void
11
+ type PageBuilderHook = (event: PageBuilderEvent, ctx: { readonly plugin: string }) => void
12
12
  ```
13
13
 
14
- Called by the page builder at its events (sidenotes); its shape is the page builder's (#23).
14
+ Called by the page builder after each page is laid out (read-only observation).
15
+
16
+ ## Uses
17
+
18
+ [`PageBuilderEvent`](page-builder-event.md)
15
19
 
16
20
  ## Used by
17
21
 
@@ -0,0 +1,30 @@
1
+ ---
2
+ title: "PageBuilderPageEvent"
3
+ description: "Interface in pulpweaver4’s plugin API: event fired after each page is laid out, in read-only order so hook order cannot affect layout."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ Interface · [Defining a plugin](index.md#defining-a-plugin)
9
+
10
+ ```ts
11
+ interface PageBuilderPageEvent {
12
+ readonly type: 'page'
13
+ readonly page: LaidPage
14
+ readonly pages: readonly LaidPage[]
15
+ }
16
+ ```
17
+
18
+ Event fired after each page is laid out, in read-only order so hook order cannot affect layout.
19
+
20
+ ## Members
21
+
22
+ | Member | What it is |
23
+ | --- | --- |
24
+ | `type` | Event kind: `'page'`, fired after a page is finalized. |
25
+ | `page` | The page just laid out. |
26
+ | `pages` | Every page laid out so far, ending with `page`. |
27
+
28
+ ## Used by
29
+
30
+ [`PageBuilderEvent`](page-builder-event.md)
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: "PageTemplateDefinition"
3
+ description: "Interface in pulpweaver4’s plugin API: A plugin's page template: an @page selector and the regions dividing its text area."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ Interface · [Defining a plugin](index.md#defining-a-plugin)
9
+
10
+ ```ts
11
+ interface PageTemplateDefinition {
12
+ readonly description?: string
13
+ readonly selector?: string
14
+ readonly regions?: readonly PageTemplateRegionDefinition[]
15
+ }
16
+ ```
17
+
18
+ A plugin's page template: an `@page` selector and the regions dividing its text area.
19
+
20
+ ## Members
21
+
22
+ | Member | What it is |
23
+ | --- | --- |
24
+ | `description` | What it is, for the docs and messages. |
25
+ | `selector` | The `@page` selector it applies to (`''` for all pages, `':left'`, `'split'`); defaults to the template's name. |
26
+ | `regions` | The regions dividing the page's text area. |
27
+
28
+ ## Uses
29
+
30
+ [`PageTemplateRegionDefinition`](page-template-region-definition.md)
31
+
32
+ ## Used by
33
+
34
+ [`LayoutDefinition`](layout-definition.md) · [`LayoutSlot`](layout-slot.md) · [`PluginRegistry`](plugin-registry.md)
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: "PageTemplateRegionDefinition"
3
+ description: "Interface in pulpweaver4’s plugin API: one region of a plugin's page template (@region <name>)."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ Interface · [Defining a plugin](index.md#defining-a-plugin)
9
+
10
+ ```ts
11
+ interface PageTemplateRegionDefinition {
12
+ readonly name: string
13
+ readonly flow?: string
14
+ readonly top?: string
15
+ readonly right?: string
16
+ readonly bottom?: string
17
+ readonly left?: string
18
+ readonly width?: string
19
+ readonly height?: string
20
+ readonly columns?: number
21
+ readonly columnGap?: string
22
+ readonly columnFill?: 'balance' | 'auto'
23
+ }
24
+ ```
25
+
26
+ One region of a plugin's page template (`@region <name>`).
27
+
28
+ ## Members
29
+
30
+ | Member | What it is |
31
+ | --- | --- |
32
+ | `name` | The region's name (`@region <name>`), lowercase letters, digits and hyphens. |
33
+ | `flow` | Flow feeding this region (`main` if omitted). |
34
+ | `top` | Distance from the top of the page's text area, as a CSS length, percentage or `calc()`. |
35
+ | `right` | Distance from the right of the page's text area, as a CSS length, percentage or `calc()`. |
36
+ | `bottom` | Distance from the bottom of the page's text area, as a CSS length, percentage or `calc()`. |
37
+ | `left` | Distance from the left of the page's text area, as a CSS length, percentage or `calc()`. |
38
+ | `width` | Region width, as a CSS length, percentage or `calc()`. |
39
+ | `height` | Region height, as a CSS length, percentage or `calc()`. |
40
+ | `columns` | Number of balanced or auto-filled columns inside this region. |
41
+ | `columnGap` | Gap between columns inside this region, as a CSS length. |
42
+ | `columnFill` | Whether the last page of columns in this region balances (`'balance'`, default) or fills sequentially (`'auto'`). |
43
+
44
+ ## Used by
45
+
46
+ [`PageTemplateDefinition`](page-template-definition.md)
@@ -28,6 +28,8 @@ interface PluginDefinition {
28
28
  readonly matchers?: Readonly<Record<string, RawMatcherFn>>
29
29
  readonly assets?: Readonly<Record<string, AssetProcessor>>
30
30
  readonly commands?: Readonly<Record<string, CommandDefinition>>
31
+ readonly indexes?: Readonly<Record<string, IndexDefinition>>
32
+ readonly hyphenation?: readonly (string | HyphenationException)[]
31
33
  }
32
34
  ```
33
35
 
@@ -56,10 +58,12 @@ A plugin as its module writes it.
56
58
  | `matchers` | `expect` matchers for tests, by name. |
57
59
  | `assets` | Asset processors by file extension (`svg`). |
58
60
  | `commands` | `pw <command>`s, by name. |
61
+ | `indexes` | Indexes it makes, by name (`scripture`): what a `::: index {name=…}` block heads it with, and how a test names its entries. |
62
+ | `hyphenation` | Hyphenation exceptions, as the project's `hyphenation.txt` writes them: a word with a hyphen wherever it may break (`Mel-chiz-e-dek`), for every language, or `{ word, lang }` for one language and those under it. The project's own file has the last word on any word it lists. |
59
63
 
60
64
  ## Uses
61
65
 
62
- [`AssetProcessor`](asset-processor.md) · [`Capability`](capability.md) · [`CommandDefinition`](command-definition.md) · [`LayoutDefinition`](layout-definition.md) · [`LintDefinition`](lint-definition.md) · [`LintRule`](lint-rule.md) · [`NodeClaim`](node-claim.md) · [`OutputDefinition`](output-definition.md) · [`Reader`](reader.md) · [`RendererSet`](renderer-set.md) · [`StyleSource`](style-source.md)
66
+ [`AssetProcessor`](asset-processor.md) · [`Capability`](capability.md) · [`CommandDefinition`](command-definition.md) · [`IndexDefinition`](index-definition.md) · [`LayoutDefinition`](layout-definition.md) · [`LintDefinition`](lint-definition.md) · [`LintRule`](lint-rule.md) · [`NodeClaim`](node-claim.md) · [`OutputDefinition`](output-definition.md) · [`Reader`](reader.md) · [`RendererSet`](renderer-set.md) · [`StyleSource`](style-source.md)
63
67
 
64
68
  ## Used by
65
69
 
@@ -0,0 +1,32 @@
1
+ ---
2
+ title: "PluginReferenceOptions"
3
+ description: "Interface in pulpweaver4’s plugin API: what a plugin's reference says beyond what its definition declares."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ Interface · [Documenting a plugin](index.md#documenting-a-plugin)
9
+
10
+ ```ts
11
+ interface PluginReferenceOptions {
12
+ readonly matchers?: Readonly<Record<string, string>>
13
+ readonly pages?: readonly ReferencePage[]
14
+ }
15
+ ```
16
+
17
+ What a plugin's reference says beyond what its definition declares.
18
+
19
+ ## Members
20
+
21
+ | Member | What it is |
22
+ | --- | --- |
23
+ | `matchers` | Its matchers' descriptions, by name, a sentence each: a matcher is a function, which carries none. |
24
+ | `pages` | Pages of its own (`reference/books.md`), listed on the index after the generated ones. |
25
+
26
+ ## Uses
27
+
28
+ [`ReferencePage`](reference-page.md)
29
+
30
+ ## Used by
31
+
32
+ [`pluginReference`](plugin-reference.md)
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: "pluginReference"
3
+ description: "Function in pulpweaver4’s plugin API: A plugin's reference, from its definition (what definePlugin returns): an index with its outputs, blocks and spans, rules, presets, matchers and indexes; a page of its options; a page of its blocks' and spans' attributes; and a page for each lint rule."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ Function · [Documenting a plugin](index.md#documenting-a-plugin)
9
+
10
+ ```ts
11
+ function pluginReference(plugin: Plugin, options: PluginReferenceOptions = {}): GeneratedReference
12
+ ```
13
+
14
+ A plugin's reference, from its definition (what [`definePlugin`](define-plugin.md) returns):
15
+ an index with its outputs, blocks and spans, rules, presets, matchers and
16
+ indexes; a page of its options; a page of its blocks' and spans'
17
+ attributes; and a page for each lint rule. Anything without a description
18
+ is listed in `problems`, which a plugin's release should fail on.
19
+
20
+ ## Uses
21
+
22
+ [`Plugin`](plugin.md) · [`GeneratedReference`](generated-reference.md) · [`PluginReferenceOptions`](plugin-reference-options.md)