pulpweaver4 0.0.91 → 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.
- package/dist/ast/djot.js +23 -0
- package/dist/ast/djot.js.map +1 -1
- package/dist/ast/index.d.ts +1 -0
- package/dist/ast/index.js +1 -0
- package/dist/ast/index.js.map +1 -1
- package/dist/ast/nodes.d.ts +59 -5
- package/dist/ast/nodes.js.map +1 -1
- package/dist/ast/table.d.ts +27 -0
- package/dist/ast/table.js +32 -0
- package/dist/ast/table.js.map +1 -0
- package/dist/browser.js +2420 -0
- package/dist/citations/index.d.ts +1 -1
- package/dist/citations/index.js +1 -1
- package/dist/citations/index.js.map +1 -1
- package/dist/citations/project.d.ts +12 -2
- package/dist/citations/project.js +21 -7
- package/dist/citations/project.js.map +1 -1
- package/dist/colour/images.d.ts +11 -2
- package/dist/colour/images.js +53 -3
- package/dist/colour/images.js.map +1 -1
- package/dist/colour/ink-limit.d.ts +2 -2
- package/dist/colour/ink-limit.js +6 -0
- package/dist/colour/ink-limit.js.map +1 -1
- package/dist/colour/previews.d.ts +8 -4
- package/dist/colour/previews.js +11 -8
- package/dist/colour/previews.js.map +1 -1
- package/dist/config/config.d.ts +91 -3
- package/dist/config/config.js +200 -3
- package/dist/config/config.js.map +1 -1
- package/dist/config/project-schema.d.ts +0 -8
- package/dist/config/project-schema.js +207 -12
- package/dist/config/project-schema.js.map +1 -1
- package/dist/config/schema.js +10 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/config/secrets.d.ts +11 -0
- package/dist/config/secrets.js +19 -0
- package/dist/config/secrets.js.map +1 -0
- package/dist/csl/project.d.ts +19 -4
- package/dist/csl/project.js +23 -10
- package/dist/csl/project.js.map +1 -1
- package/dist/fonts/index.d.ts +1 -1
- package/dist/fonts/index.js +1 -1
- package/dist/fonts/index.js.map +1 -1
- package/dist/fonts/lint.d.ts +51 -0
- package/dist/fonts/lint.js +101 -16
- package/dist/fonts/lint.js.map +1 -1
- package/dist/fonts/walk.d.ts +13 -0
- package/dist/fonts/walk.js +50 -33
- package/dist/fonts/walk.js.map +1 -1
- package/dist/html/css.d.ts +4 -0
- package/dist/html/css.js +11 -3
- package/dist/html/css.js.map +1 -1
- package/dist/html/dom.d.ts +6 -1
- package/dist/html/dom.js +28 -6
- package/dist/html/dom.js.map +1 -1
- package/dist/html/generated.d.ts +17 -0
- package/dist/html/generated.js +21 -0
- package/dist/html/generated.js.map +1 -0
- package/dist/html/images.d.ts +18 -0
- package/dist/html/images.js +49 -2
- package/dist/html/images.js.map +1 -1
- package/dist/html/index.d.ts +1 -0
- package/dist/html/index.js +1 -0
- package/dist/html/index.js.map +1 -1
- package/dist/html/render.d.ts +5 -4
- package/dist/html/render.js +24 -6
- package/dist/html/render.js.map +1 -1
- package/dist/hyphenation/exceptions.d.ts +5 -0
- package/dist/hyphenation/exceptions.js +11 -0
- package/dist/hyphenation/exceptions.js.map +1 -1
- package/dist/hyphenation/index.d.ts +1 -1
- package/dist/hyphenation/index.js +1 -1
- package/dist/hyphenation/index.js.map +1 -1
- package/dist/import/convert.d.ts +21 -0
- package/dist/import/convert.js +65 -0
- package/dist/import/convert.js.map +1 -0
- package/dist/incremental/cache.d.ts +59 -0
- package/dist/incremental/cache.js +64 -0
- package/dist/incremental/cache.js.map +1 -0
- package/dist/incremental/index.d.ts +3 -0
- package/dist/incremental/index.js +4 -0
- package/dist/incremental/index.js.map +1 -0
- package/dist/incremental/keys.d.ts +27 -0
- package/dist/incremental/keys.js +89 -0
- package/dist/incremental/keys.js.map +1 -0
- package/dist/incremental/session.d.ts +180 -0
- package/dist/incremental/session.js +401 -0
- package/dist/incremental/session.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/indexes/layout.d.ts +8 -2
- package/dist/indexes/layout.js +6 -4
- package/dist/indexes/layout.js.map +1 -1
- package/dist/layout/cache.d.ts +174 -0
- package/dist/layout/cache.js +150 -0
- package/dist/layout/cache.js.map +1 -0
- package/dist/layout/converge.d.ts +28 -0
- package/dist/layout/converge.js +102 -9
- package/dist/layout/converge.js.map +1 -1
- package/dist/layout/counters.d.ts +4 -0
- package/dist/layout/counters.js +15 -0
- package/dist/layout/counters.js.map +1 -1
- package/dist/layout/index.d.ts +5 -2
- package/dist/layout/index.js +3 -0
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/lists.d.ts +52 -3
- package/dist/layout/lists.js +513 -46
- package/dist/layout/lists.js.map +1 -1
- package/dist/layout/lookahead.d.ts +151 -0
- package/dist/layout/lookahead.js +581 -0
- package/dist/layout/lookahead.js.map +1 -0
- package/dist/layout/margin-boxes.d.ts +11 -1
- package/dist/layout/margin-boxes.js +24 -1
- package/dist/layout/margin-boxes.js.map +1 -1
- package/dist/layout/page-rules.d.ts +6 -1
- package/dist/layout/page-rules.js +42 -1
- package/dist/layout/page-rules.js.map +1 -1
- package/dist/layout/page.js +4 -2
- package/dist/layout/page.js.map +1 -1
- package/dist/layout/pagebuilder.d.ts +248 -3
- package/dist/layout/pagebuilder.js +512 -19
- package/dist/layout/pagebuilder.js.map +1 -1
- package/dist/layout/pages.d.ts +108 -1
- package/dist/layout/pages.js +1362 -159
- package/dist/layout/pages.js.map +1 -1
- package/dist/layout/paragraph.d.ts +14 -0
- package/dist/layout/paragraph.js +304 -31
- package/dist/layout/paragraph.js.map +1 -1
- package/dist/layout/pre.js +4 -0
- package/dist/layout/pre.js.map +1 -1
- package/dist/layout/protrusion.d.ts +26 -0
- package/dist/layout/protrusion.js +39 -0
- package/dist/layout/protrusion.js.map +1 -0
- package/dist/layout/ranges.d.ts +2 -0
- package/dist/layout/ranges.js +22 -0
- package/dist/layout/ranges.js.map +1 -0
- package/dist/layout/region.d.ts +2 -1
- package/dist/layout/region.js +9 -5
- package/dist/layout/region.js.map +1 -1
- package/dist/layout/templates.d.ts +71 -0
- package/dist/layout/templates.js +290 -0
- package/dist/layout/templates.js.map +1 -0
- package/dist/layout/vlist.d.ts +3 -3
- package/dist/linebreak/items.d.ts +27 -2
- package/dist/linebreak/items.js +10 -3
- package/dist/linebreak/items.js.map +1 -1
- package/dist/linebreak/knuth-plass.d.ts +20 -0
- package/dist/linebreak/knuth-plass.js +68 -16
- package/dist/linebreak/knuth-plass.js.map +1 -1
- package/dist/lint/book.d.ts +13 -0
- package/dist/lint/book.js +52 -0
- package/dist/lint/book.js.map +1 -0
- package/dist/lint/config.d.ts +9 -0
- package/dist/lint/config.js +40 -6
- package/dist/lint/config.js.map +1 -1
- package/dist/lint/linter.js +1 -0
- package/dist/lint/linter.js.map +1 -1
- package/dist/lint/project.js +1 -1
- package/dist/lint/project.js.map +1 -1
- package/dist/lint/rules/layout.d.ts +3 -1
- package/dist/lint/rules/layout.js +8 -6
- package/dist/lint/rules/layout.js.map +1 -1
- package/dist/lint/rules/source.js +1 -1
- package/dist/lint/rules/source.js.map +1 -1
- package/dist/lint/testing.js +1 -0
- package/dist/lint/testing.js.map +1 -1
- package/dist/measure/bidi-data.d.ts +14 -0
- package/dist/measure/bidi-data.js +69 -0
- package/dist/measure/bidi-data.js.map +1 -0
- package/dist/measure/bidi.d.ts +70 -0
- package/dist/measure/bidi.js +225 -0
- package/dist/measure/bidi.js.map +1 -0
- package/dist/measure/css.d.ts +5 -0
- package/dist/measure/css.js +2 -0
- package/dist/measure/css.js.map +1 -1
- package/dist/measure/measurer.d.ts +36 -2
- package/dist/measure/measurer.js +220 -22
- package/dist/measure/measurer.js.map +1 -1
- package/dist/measure/model.d.ts +20 -2
- package/dist/measure/model.js +13 -6
- package/dist/measure/model.js.map +1 -1
- package/dist/measure/script-data.d.ts +6 -0
- package/dist/measure/script-data.js +34 -0
- package/dist/measure/script-data.js.map +1 -0
- package/dist/measure/scripts.d.ts +36 -0
- package/dist/measure/scripts.js +293 -0
- package/dist/measure/scripts.js.map +1 -0
- package/dist/output/output.d.ts +35 -3
- package/dist/output/output.js +26 -4
- package/dist/output/output.js.map +1 -1
- package/dist/paint/backgrounds.js +7 -20
- package/dist/paint/backgrounds.js.map +1 -1
- package/dist/paint/blend.d.ts +33 -13
- package/dist/paint/blend.js +73 -21
- package/dist/paint/blend.js.map +1 -1
- package/dist/paint/cache.d.ts +80 -0
- package/dist/paint/cache.js +537 -0
- package/dist/paint/cache.js.map +1 -0
- package/dist/paint/canvas.d.ts +4 -13
- package/dist/paint/canvas.js +45 -5
- package/dist/paint/canvas.js.map +1 -1
- package/dist/paint/context.d.ts +2 -0
- package/dist/paint/emphasis.js +1 -1
- package/dist/paint/emphasis.js.map +1 -1
- package/dist/paint/flatten.d.ts +24 -2
- package/dist/paint/flatten.js +55 -12
- package/dist/paint/flatten.js.map +1 -1
- package/dist/paint/forms.d.ts +64 -0
- package/dist/paint/forms.js +319 -0
- package/dist/paint/forms.js.map +1 -0
- package/dist/paint/images.d.ts +4 -1
- package/dist/paint/images.js +13 -2
- package/dist/paint/images.js.map +1 -1
- package/dist/paint/layers.d.ts +64 -0
- package/dist/paint/layers.js +137 -0
- package/dist/paint/layers.js.map +1 -0
- package/dist/paint/painter.d.ts +19 -6
- package/dist/paint/painter.js +15 -135
- package/dist/paint/painter.js.map +1 -1
- package/dist/paint/stacking.d.ts +1 -1
- package/dist/paint/stacking.js +9 -2
- package/dist/paint/stacking.js.map +1 -1
- package/dist/paint/text.d.ts +14 -3
- package/dist/paint/text.js +25 -4
- package/dist/paint/text.js.map +1 -1
- package/dist/paint/vertical.js +2 -2
- package/dist/paint/vertical.js.map +1 -1
- package/dist/pdf/encoded.d.ts +16 -0
- package/dist/pdf/encoded.js +35 -0
- package/dist/pdf/encoded.js.map +1 -0
- package/dist/pdf/include/colour.d.ts +105 -0
- package/dist/pdf/include/colour.js +349 -0
- package/dist/pdf/include/colour.js.map +1 -0
- package/dist/pdf/include/functions.d.ts +17 -0
- package/dist/pdf/include/functions.js +389 -0
- package/dist/pdf/include/functions.js.map +1 -0
- package/dist/pdf/include/pages.d.ts +14 -0
- package/dist/pdf/include/pages.js +27 -0
- package/dist/pdf/include/pages.js.map +1 -0
- package/dist/pdf/include/pdfjs/LICENSE +177 -0
- package/dist/pdf/include/pdfjs/pdf.min.mjs +27 -0
- package/dist/pdf/include/pdfjs/pdf.worker.min.mjs +27 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
- package/dist/pdf/include/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
- package/dist/pdf/include/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/dist/pdf/include/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/dist/pdf/include/pdfjs/wasm/LICENSE_JBIG2 +196 -0
- package/dist/pdf/include/pdfjs/wasm/LICENSE_OPENJPEG +39 -0
- package/dist/pdf/include/pdfjs/wasm/LICENSE_PDFJS_JBIG2 +13 -0
- package/dist/pdf/include/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
- package/dist/pdf/include/pdfjs/wasm/LICENSE_PDFJS_QCMS +19 -0
- package/dist/pdf/include/pdfjs/wasm/LICENSE_QCMS +21 -0
- package/dist/pdf/include/pdfjs/wasm/jbig2.wasm +0 -0
- package/dist/pdf/include/pdfjs/wasm/openjpeg.wasm +0 -0
- package/dist/pdf/include/pdfjs/wasm/qcms_bg.wasm +0 -0
- package/dist/pdf/include/pdfjs/wasm/quickjs-eval.wasm +0 -0
- package/dist/pdf/include/prepare.d.ts +58 -0
- package/dist/pdf/include/prepare.js +266 -0
- package/dist/pdf/include/prepare.js.map +1 -0
- package/dist/pdf/include/preview.d.ts +38 -0
- package/dist/pdf/include/preview.js +101 -0
- package/dist/pdf/include/preview.js.map +1 -0
- package/dist/pdf/include/rewrite.d.ts +57 -0
- package/dist/pdf/include/rewrite.js +803 -0
- package/dist/pdf/include/rewrite.js.map +1 -0
- package/dist/pdf/include/serialize.d.ts +32 -0
- package/dist/pdf/include/serialize.js +158 -0
- package/dist/pdf/include/serialize.js.map +1 -0
- package/dist/pdf/include/testing.d.ts +26 -0
- package/dist/pdf/include/testing.js +50 -0
- package/dist/pdf/include/testing.js.map +1 -0
- package/dist/pdf/index.d.ts +1 -0
- package/dist/pdf/index.js +1 -0
- package/dist/pdf/index.js.map +1 -1
- package/dist/pdf/structure/annotations.d.ts +33 -0
- package/dist/pdf/structure/annotations.js +112 -0
- package/dist/pdf/structure/annotations.js.map +1 -0
- package/dist/pdf/structure/forms.d.ts +10 -0
- package/dist/pdf/structure/forms.js +46 -0
- package/dist/pdf/structure/forms.js.map +1 -0
- package/dist/pdf/structure/index.d.ts +41 -5
- package/dist/pdf/structure/index.js +40 -5
- package/dist/pdf/structure/index.js.map +1 -1
- package/dist/pdf/structure/links.d.ts +2 -0
- package/dist/pdf/structure/links.js +1 -1
- package/dist/pdf/structure/links.js.map +1 -1
- package/dist/pdf/structure/presentation.d.ts +28 -0
- package/dist/pdf/structure/presentation.js +79 -0
- package/dist/pdf/structure/presentation.js.map +1 -0
- package/dist/pdf/structure/tags.d.ts +34 -2
- package/dist/pdf/structure/tags.js +117 -14
- package/dist/pdf/structure/tags.js.map +1 -1
- package/dist/pdf/types.d.ts +357 -11
- package/dist/pdf/wasm/pulpweaver4_pdf.d.ts +44 -2
- package/dist/pdf/wasm/pulpweaver4_pdf.js +191 -2
- package/dist/pdf/wasm/pulpweaver4_pdf_bg.wasm +0 -0
- package/dist/pdf/writer.d.ts +13 -1
- package/dist/pdf/writer.js +26 -1
- package/dist/pdf/writer.js.map +1 -1
- package/dist/plugin/define.d.ts +200 -15
- package/dist/plugin/define.js +124 -15
- package/dist/plugin/define.js.map +1 -1
- package/dist/plugin/failure.d.ts +1 -1
- package/dist/plugin/index.d.ts +5 -4
- package/dist/plugin/index.js +5 -4
- package/dist/plugin/index.js.map +1 -1
- package/dist/plugin/reference.d.ts +38 -0
- package/dist/plugin/reference.js +287 -0
- package/dist/plugin/reference.js.map +1 -0
- package/dist/plugin/register.d.ts +39 -7
- package/dist/plugin/register.js +83 -2
- package/dist/plugin/register.js.map +1 -1
- package/dist/preflight/index.d.ts +1 -1
- package/dist/preflight/index.js +1 -1
- package/dist/preflight/index.js.map +1 -1
- package/dist/preflight/pdfx.d.ts +35 -0
- package/dist/preflight/pdfx.js +33 -2
- package/dist/preflight/pdfx.js.map +1 -1
- package/dist/preflight/reader.d.ts +10 -3
- package/dist/preflight/reader.js +86 -5
- package/dist/preflight/reader.js.map +1 -1
- package/dist/print/impose.d.ts +66 -0
- package/dist/print/impose.js +331 -0
- package/dist/print/impose.js.map +1 -0
- package/dist/print/output.js +400 -50
- package/dist/print/output.js.map +1 -1
- package/dist/problem.js +4 -3
- package/dist/problem.js.map +1 -1
- package/dist/profile/index.d.ts +1 -0
- package/dist/profile/index.js +1 -0
- package/dist/profile/index.js.map +1 -1
- package/dist/profile/lint.d.ts +1 -1
- package/dist/profile/lint.js +29 -1
- package/dist/profile/lint.js.map +1 -1
- package/dist/profile/list-table.d.ts +51 -0
- package/dist/profile/list-table.js +137 -0
- package/dist/profile/list-table.js.map +1 -0
- package/dist/profile/metadata.js +3 -0
- package/dist/profile/metadata.js.map +1 -1
- package/dist/profile/profile.d.ts +3 -0
- package/dist/profile/profile.js +9 -1
- package/dist/profile/profile.js.map +1 -1
- package/dist/project.js +3 -0
- package/dist/project.js.map +1 -1
- package/dist/qpdf/index.d.ts +2 -0
- package/dist/qpdf/index.js +3 -0
- package/dist/qpdf/index.js.map +1 -0
- package/dist/qpdf/qpdf.d.ts +125 -0
- package/dist/qpdf/qpdf.js +205 -0
- package/dist/qpdf/qpdf.js.map +1 -0
- package/dist/qpdf/testing.d.ts +12 -0
- package/dist/qpdf/testing.js +9 -0
- package/dist/qpdf/testing.js.map +1 -0
- package/dist/qpdf/wasm/LICENSE-qpdf +202 -0
- package/dist/qpdf/wasm/LICENSE-zlib +22 -0
- package/dist/qpdf/wasm/NOTICE-qpdf.md +42 -0
- package/dist/qpdf/wasm/qpdf.wasm +0 -0
- package/dist/render/index.d.ts +3 -0
- package/dist/render/index.js +2 -0
- package/dist/render/index.js.map +1 -0
- package/dist/render/render.d.ts +98 -0
- package/dist/render/render.js +243 -0
- package/dist/render/render.js.map +1 -0
- package/dist/reproducible/clock.d.ts +4 -5
- package/dist/reproducible/clock.js +4 -5
- package/dist/reproducible/clock.js.map +1 -1
- package/dist/spike/spike-page.chromium.json +4 -4
- package/dist/style/colours.d.ts +7 -2
- package/dist/style/colours.js +24 -2
- package/dist/style/colours.js.map +1 -1
- package/dist/style/compile.js +1 -1
- package/dist/style/compile.js.map +1 -1
- package/dist/style/defaults.d.ts +9 -3
- package/dist/style/defaults.js +14 -2
- package/dist/style/defaults.js.map +1 -1
- package/dist/style/gcpm.d.ts +1 -1
- package/dist/style/gcpm.js +17 -5
- package/dist/style/gcpm.js.map +1 -1
- package/dist/style/properties.js +84 -0
- package/dist/style/properties.js.map +1 -1
- package/dist/test/book.d.ts +22 -2
- package/dist/test/book.js +35 -2
- package/dist/test/book.js.map +1 -1
- package/dist/test/build.d.ts +23 -0
- package/dist/test/build.js +86 -33
- package/dist/test/build.js.map +1 -1
- package/dist/test/layout.js +128 -19
- package/dist/test/layout.js.map +1 -1
- package/dist/test/limits.d.ts +8 -0
- package/dist/test/limits.js +9 -0
- package/dist/test/limits.js.map +1 -0
- package/dist/test/pipeline.d.ts +23 -0
- package/dist/test/pipeline.js.map +1 -1
- package/dist/test/render.d.ts +26 -3
- package/dist/test/render.js +151 -23
- package/dist/test/render.js.map +1 -1
- package/dist/test/runner.d.ts +6 -3
- package/dist/test/runner.js +172 -105
- package/dist/test/runner.js.map +1 -1
- package/dist/test/text.js +2 -2
- package/dist/test/text.js.map +1 -1
- package/dist/text/output.js +2 -2
- package/dist/text/output.js.map +1 -1
- package/dist/text/render.d.ts +4 -3
- package/dist/text/render.js +126 -4
- package/dist/text/render.js.map +1 -1
- package/dist/transform/index.d.ts +1 -1
- package/dist/transform/index.js +1 -1
- package/dist/transform/index.js.map +1 -1
- package/dist/transform/run.d.ts +2 -0
- package/dist/transform/run.js +32 -16
- package/dist/transform/run.js.map +1 -1
- package/dist/web/output.js +116 -10
- package/dist/web/output.js.map +1 -1
- package/dist/web/runtime/justify.js.txt +2 -2
- package/dist/web/site.d.ts +2 -0
- package/dist/web/site.js +8 -1
- package/dist/web/site.js.map +1 -1
- package/docs/README.md +6 -1
- package/docs/manual/chapters/front.dj +34 -0
- package/docs/manual/chapters/guides/citations.dj +426 -0
- package/docs/manual/chapters/guides/colour-and-prepress.dj +261 -0
- package/docs/manual/chapters/guides/editions.dj +329 -0
- package/docs/manual/chapters/guides/in-a-web-page.dj +143 -0
- package/docs/manual/chapters/guides/lines-and-pages.dj +681 -0
- package/docs/manual/chapters/guides/lint-rules.dj +355 -0
- package/docs/manual/chapters/guides/pdfs.dj +501 -0
- package/docs/manual/chapters/guides/plugins.dj +425 -0
- package/docs/manual/chapters/guides/testing.dj +264 -0
- package/docs/manual/chapters/guides/writing-in-djot.dj +537 -0
- package/docs/manual/chapters/start/for-latex-users.dj +256 -0
- package/docs/manual/chapters/start/getting-started.dj +167 -0
- package/docs/manual/chapters/start/your-first-book.dj +426 -0
- package/docs/manual/fonts/CrimsonPro-Italic-VF.ttf +0 -0
- package/docs/manual/fonts/CrimsonPro-VF.ttf +0 -0
- package/docs/manual/fonts/JetBrainsMono-Regular.otf +0 -0
- package/docs/manual/fonts/NotoSansSymbols2-Boxes.ttf +0 -0
- package/docs/manual/fonts/OFL.txt +95 -0
- package/docs/manual/pulpweaver4.toml +39 -0
- package/docs/manual/styles/manual.css +137 -0
- package/docs/reference/css-properties/index.md +9 -0
- package/docs/reference/css-properties/pw-expansion.md +31 -0
- package/docs/reference/css-properties/pw-flow-into.md +31 -0
- package/docs/reference/css-properties/pw-knockout.md +26 -0
- package/docs/reference/css-properties/pw-layer.md +24 -0
- package/docs/reference/css-properties/pw-page-breaking.md +30 -0
- package/docs/reference/css-properties/pw-page-duration.md +28 -0
- package/docs/reference/css-properties/pw-page-rotate.md +29 -0
- package/docs/reference/css-properties/pw-page-transition.md +29 -0
- package/docs/reference/css-properties/pw-protrusion.md +31 -0
- package/docs/reference/lint-rules/ibid-across-page.md +2 -2
- package/docs/reference/plugin-api/capabilities.md +2 -2
- package/docs/reference/plugin-api/claim-kind.md +1 -1
- package/docs/reference/plugin-api/combine-exceptions.md +19 -0
- package/docs/reference/plugin-api/element-break-context.md +34 -0
- package/docs/reference/plugin-api/element-break-item.md +24 -0
- package/docs/reference/plugin-api/element-breaker.md +24 -0
- package/docs/reference/plugin-api/flow-definition.md +30 -0
- package/docs/reference/plugin-api/generated-reference.md +32 -0
- package/docs/reference/plugin-api/index-definition.md +32 -0
- package/docs/reference/plugin-api/index-titles.md +18 -0
- package/docs/reference/plugin-api/index.md +27 -3
- package/docs/reference/plugin-api/insert-class-definition.md +46 -0
- package/docs/reference/plugin-api/insert-placement.md +22 -0
- package/docs/reference/plugin-api/insert-placements.md +18 -0
- package/docs/reference/plugin-api/layout-definition.md +9 -5
- package/docs/reference/plugin-api/layout-slot.md +6 -16
- package/docs/reference/plugin-api/lint-context.md +3 -1
- package/docs/reference/plugin-api/lint-definition.md +1 -1
- package/docs/reference/plugin-api/lint-edition.md +2 -0
- package/docs/reference/plugin-api/page-builder-event.md +22 -0
- package/docs/reference/plugin-api/page-builder-hook.md +7 -3
- package/docs/reference/plugin-api/page-builder-page-event.md +30 -0
- package/docs/reference/plugin-api/page-template-definition.md +34 -0
- package/docs/reference/plugin-api/page-template-region-definition.md +46 -0
- package/docs/reference/plugin-api/plugin-definition.md +5 -1
- package/docs/reference/plugin-api/plugin-reference-options.md +32 -0
- package/docs/reference/plugin-api/plugin-reference.md +22 -0
- package/docs/reference/plugin-api/plugin-registry.md +15 -5
- package/docs/reference/plugin-api/plugin-stage.md +1 -1
- package/docs/reference/plugin-api/plugin.md +9 -2
- package/docs/reference/plugin-api/reference-page.md +34 -0
- package/docs/reference/plugin-api/render-reference-page.md +18 -0
- package/docs/reference/plugin-api/renderers.md +1 -1
- package/docs/reference/pulpweaver4-toml/editions.md +239 -2
- package/docs/reference/pulpweaver4-toml/index.md +44 -1
- package/docs/reference/pulpweaver4-toml/inks.md +15 -4
- package/docs/reference/pulpweaver4-toml/lint.md +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Page templates, regions and column splitting
|
|
3
|
+
* (https://plans.inkylabs.com/pulpweaver#minipages-flows-and-page-templates):
|
|
4
|
+
* a page template divides a page's text area (`.pw-area`) into regions
|
|
5
|
+
* defined by `@region <name>` rules inside `@page`, each fed by a flow
|
|
6
|
+
* (`flow-from: <name>`, defaulting to `main`). Columns are regions too:
|
|
7
|
+
* a `@region` with `columns` or `column-count` expands into side-by-side
|
|
8
|
+
* column regions fed by the same flow, and both multi-column `@region`s
|
|
9
|
+
* and multi-column elements in normal flow share {@link splitColumns}.
|
|
10
|
+
*/
|
|
11
|
+
import { badness } from '../linebreak/knuth-plass.js';
|
|
12
|
+
import { pluginLayer } from '../style/compile.js';
|
|
13
|
+
import { parseLength } from './glue.js';
|
|
14
|
+
import { valueOf } from './page-rules.js';
|
|
15
|
+
import { natural, pruneTop, vertBreak } from './pagebuilder.js';
|
|
16
|
+
/** The default flow's name: what stays in the document without `flow-into`. */
|
|
17
|
+
export const DEFAULT_FLOW = 'main';
|
|
18
|
+
/** px to TeX's sp: 1px is 0.75pt. */
|
|
19
|
+
const SP_PER_PX = 49152;
|
|
20
|
+
const ZERO = { width: 0, stretch: 0, shrink: 0 };
|
|
21
|
+
const EPSILON = 1e-6;
|
|
22
|
+
const GEOMETRY_PROPS = new Set([
|
|
23
|
+
'flow-from', 'top', 'right', 'bottom', 'left', 'width', 'height',
|
|
24
|
+
'columns', 'column-count', 'column-gap', 'column-fill',
|
|
25
|
+
]);
|
|
26
|
+
/**
|
|
27
|
+
* Resolves a page's `@region` rules into positioned {@link RegionBox}es
|
|
28
|
+
* inside the page's text area. Returns an empty array when the page has no
|
|
29
|
+
* `@region` rules (meaning the default single region fed by `main`), or
|
|
30
|
+
* when every region is disabled with `flow-from: none`.
|
|
31
|
+
*/
|
|
32
|
+
export function pageRegions(style, box, rootFontSize = 16) {
|
|
33
|
+
if (style.regions.size === 0)
|
|
34
|
+
return [];
|
|
35
|
+
const areaW = Math.max(0, box.width - box.margin.left - box.margin.right);
|
|
36
|
+
const areaH = Math.max(0, box.height - box.margin.top - box.margin.bottom);
|
|
37
|
+
const fs = valueOf(style.page, 'font-size');
|
|
38
|
+
const pageEm = (fs && resolveLength(fs, rootFontSize, rootFontSize)) || rootFontSize;
|
|
39
|
+
const out = [];
|
|
40
|
+
for (const [name, decls] of style.regions) {
|
|
41
|
+
const flowFrom = valueOf(decls, 'flow-from')?.trim();
|
|
42
|
+
if (flowFrom?.toLowerCase() === 'none')
|
|
43
|
+
continue;
|
|
44
|
+
const flow = !flowFrom || flowFrom.toLowerCase() === 'default' ? DEFAULT_FLOW : flowFrom;
|
|
45
|
+
const rfs = valueOf(decls, 'font-size');
|
|
46
|
+
const em = (rfs && resolveLength(rfs, pageEm, rootFontSize)) || pageEm;
|
|
47
|
+
const len = (prop, base) => {
|
|
48
|
+
const v = valueOf(decls, prop);
|
|
49
|
+
return v === undefined || v.toLowerCase() === 'auto' ? undefined : resolveLength(v, em, rootFontSize, base);
|
|
50
|
+
};
|
|
51
|
+
const l = len('left', areaW);
|
|
52
|
+
const r = len('right', areaW);
|
|
53
|
+
const w = len('width', areaW);
|
|
54
|
+
let left;
|
|
55
|
+
let width;
|
|
56
|
+
if (l !== undefined && w !== undefined) {
|
|
57
|
+
left = l;
|
|
58
|
+
width = w;
|
|
59
|
+
}
|
|
60
|
+
else if (r !== undefined && w !== undefined) {
|
|
61
|
+
left = areaW - r - w;
|
|
62
|
+
width = w;
|
|
63
|
+
}
|
|
64
|
+
else if (l !== undefined && r !== undefined) {
|
|
65
|
+
left = l;
|
|
66
|
+
width = Math.max(0, areaW - l - r);
|
|
67
|
+
}
|
|
68
|
+
else if (l !== undefined) {
|
|
69
|
+
left = l;
|
|
70
|
+
width = Math.max(0, areaW - l);
|
|
71
|
+
}
|
|
72
|
+
else if (r !== undefined) {
|
|
73
|
+
left = 0;
|
|
74
|
+
width = Math.max(0, areaW - r);
|
|
75
|
+
}
|
|
76
|
+
else if (w !== undefined) {
|
|
77
|
+
left = 0;
|
|
78
|
+
width = w;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
left = 0;
|
|
82
|
+
width = areaW;
|
|
83
|
+
}
|
|
84
|
+
const t = len('top', areaH);
|
|
85
|
+
const b = len('bottom', areaH);
|
|
86
|
+
const h = len('height', areaH);
|
|
87
|
+
let top;
|
|
88
|
+
let height;
|
|
89
|
+
if (t !== undefined && h !== undefined) {
|
|
90
|
+
top = t;
|
|
91
|
+
height = h;
|
|
92
|
+
}
|
|
93
|
+
else if (b !== undefined && h !== undefined) {
|
|
94
|
+
top = areaH - b - h;
|
|
95
|
+
height = h;
|
|
96
|
+
}
|
|
97
|
+
else if (t !== undefined && b !== undefined) {
|
|
98
|
+
top = t;
|
|
99
|
+
height = Math.max(0, areaH - t - b);
|
|
100
|
+
}
|
|
101
|
+
else if (t !== undefined) {
|
|
102
|
+
top = t;
|
|
103
|
+
height = Math.max(0, areaH - t);
|
|
104
|
+
}
|
|
105
|
+
else if (b !== undefined) {
|
|
106
|
+
top = 0;
|
|
107
|
+
height = Math.max(0, areaH - b);
|
|
108
|
+
}
|
|
109
|
+
else if (h !== undefined) {
|
|
110
|
+
top = 0;
|
|
111
|
+
height = h;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
top = 0;
|
|
115
|
+
height = areaH;
|
|
116
|
+
}
|
|
117
|
+
const extra = decls.filter((d) => !GEOMETRY_PROPS.has(d.prop));
|
|
118
|
+
const cols = regionColumnCount(decls);
|
|
119
|
+
if (cols > 1) {
|
|
120
|
+
const gapVal = valueOf(decls, 'column-gap');
|
|
121
|
+
const gap = !gapVal || gapVal.toLowerCase() === 'normal' ? em : (resolveLength(gapVal, em, rootFontSize, width) ?? em);
|
|
122
|
+
const colW = Math.max(0, (width - gap * (cols - 1)) / cols);
|
|
123
|
+
const balance = valueOf(decls, 'column-fill')?.trim().toLowerCase() !== 'auto';
|
|
124
|
+
for (let c = 0; c < cols; c++) {
|
|
125
|
+
out.push({
|
|
126
|
+
name: `${name}-${c + 1}`,
|
|
127
|
+
flow,
|
|
128
|
+
left: left + c * (colW + gap),
|
|
129
|
+
top,
|
|
130
|
+
width: colW,
|
|
131
|
+
height,
|
|
132
|
+
declarations: extra,
|
|
133
|
+
column: { group: name, index: c, count: cols, gap, balance },
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
out.push({ name, flow, left, top, width, height, declarations: extra });
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return out;
|
|
142
|
+
}
|
|
143
|
+
/** Column count from `column-count` or `columns` in a `@region` rule. */
|
|
144
|
+
function regionColumnCount(decls) {
|
|
145
|
+
const count = valueOf(decls, 'column-count');
|
|
146
|
+
if (count && /^\d+$/.test(count.trim()))
|
|
147
|
+
return Math.max(1, Number.parseInt(count.trim(), 10));
|
|
148
|
+
const cols = valueOf(decls, 'columns');
|
|
149
|
+
if (cols) {
|
|
150
|
+
for (const part of cols.trim().split(/\s+/)) {
|
|
151
|
+
if (/^\d+$/.test(part))
|
|
152
|
+
return Math.max(1, Number.parseInt(part, 10));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return 1;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Resolves a CSS length, percentage of `base`, or simple additive `calc(a ± b)`
|
|
159
|
+
* into px; undefined if it can't be resolved.
|
|
160
|
+
*/
|
|
161
|
+
export function resolveLength(value, em, rem, base) {
|
|
162
|
+
const v = value.trim().toLowerCase();
|
|
163
|
+
const calc = /^calc\(\s*(.+)\s*\)$/.exec(v);
|
|
164
|
+
if (calc)
|
|
165
|
+
return evalCalc(calc[1], em, rem, base);
|
|
166
|
+
return atomicLength(v, em, rem, base);
|
|
167
|
+
}
|
|
168
|
+
function evalCalc(expr, em, rem, base) {
|
|
169
|
+
// Split on top-level `+` or `-` surrounded by whitespace (CSS calc syntax).
|
|
170
|
+
const tokens = expr.split(/\s+([+-])\s+/);
|
|
171
|
+
let total = atomicLength(tokens[0].trim(), em, rem, base);
|
|
172
|
+
if (total === undefined)
|
|
173
|
+
return undefined;
|
|
174
|
+
for (let i = 1; i + 1 < tokens.length; i += 2) {
|
|
175
|
+
const rhs = atomicLength(tokens[i + 1].trim(), em, rem, base);
|
|
176
|
+
if (rhs === undefined)
|
|
177
|
+
return undefined;
|
|
178
|
+
total = tokens[i] === '+' ? total + rhs : total - rhs;
|
|
179
|
+
}
|
|
180
|
+
return total;
|
|
181
|
+
}
|
|
182
|
+
function atomicLength(v, em, rem, base) {
|
|
183
|
+
const pct = /^(-?(?:\d+\.?\d*|\.\d+))%$/.exec(v);
|
|
184
|
+
if (pct)
|
|
185
|
+
return base === undefined ? undefined : (Number(pct[1]) / 100) * base;
|
|
186
|
+
const r = /^(-?(?:\d+\.?\d*|\.\d+))rem$/.exec(v);
|
|
187
|
+
if (r)
|
|
188
|
+
return Number(r[1]) * rem;
|
|
189
|
+
try {
|
|
190
|
+
return parseLength(v, em);
|
|
191
|
+
}
|
|
192
|
+
catch {
|
|
193
|
+
return undefined;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Splits a vertical list into `count` columns of height `h`, returning each
|
|
198
|
+
* column's items and whatever remains. Shared by multi-column elements in
|
|
199
|
+
* normal flow (`ColumnsBox`) and multi-column `@region`s.
|
|
200
|
+
*/
|
|
201
|
+
export function splitColumns(list, count, h) {
|
|
202
|
+
const sp = (t, s) => badness(Math.round(t * SP_PER_PX), Math.round(s * SP_PER_PX));
|
|
203
|
+
const columns = [];
|
|
204
|
+
let rest = list;
|
|
205
|
+
for (let c = 0; c < count; c++) {
|
|
206
|
+
if (!rest.some((p) => p.type === 'box')) {
|
|
207
|
+
columns.push([]);
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
const at = vertBreak(rest, h, 0, sp).at;
|
|
211
|
+
columns.push(at === undefined ? [...rest] : rest.slice(0, at));
|
|
212
|
+
rest = at === undefined ? [] : pruneTop(rest.slice(at), ZERO);
|
|
213
|
+
}
|
|
214
|
+
return { columns, rest };
|
|
215
|
+
}
|
|
216
|
+
/** Whether `list` fits into `count` columns of height `h` with no column overfull and nothing left over. */
|
|
217
|
+
export function columnsFit(list, count, h) {
|
|
218
|
+
const { columns, rest } = splitColumns(list, count, h);
|
|
219
|
+
return !rest.some((p) => p.type === 'box') && columns.every((c) => natural(c) <= h + EPSILON);
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Finds the shortest column height `<= maxHeight` that fits `list` into
|
|
223
|
+
* `count` balanced columns, or `undefined` if `list` does not fit within
|
|
224
|
+
* `maxHeight`.
|
|
225
|
+
*/
|
|
226
|
+
export function balancedColumnHeight(list, count, maxHeight) {
|
|
227
|
+
if (!columnsFit(list, count, maxHeight))
|
|
228
|
+
return undefined;
|
|
229
|
+
let lo = natural(list) / count;
|
|
230
|
+
let hi = maxHeight;
|
|
231
|
+
if (columnsFit(list, count, lo))
|
|
232
|
+
return lo;
|
|
233
|
+
for (let n = 0; n < 30 && hi - lo > 1 / 64; n++) {
|
|
234
|
+
const mid = (lo + hi) / 2;
|
|
235
|
+
if (columnsFit(list, count, mid))
|
|
236
|
+
hi = mid;
|
|
237
|
+
else
|
|
238
|
+
lo = mid;
|
|
239
|
+
}
|
|
240
|
+
return hi;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Serializes plugin-registered `layout.pageTemplates` into `@layer pw.plugins.<plugin>`
|
|
244
|
+
* `@page` / `@region` CSS rules so they cascade identically to stylesheet rules
|
|
245
|
+
* (in plugin-name order, below unlayered author rules).
|
|
246
|
+
*/
|
|
247
|
+
export function pluginTemplatesCss(templates) {
|
|
248
|
+
if (templates.size === 0)
|
|
249
|
+
return '';
|
|
250
|
+
const byPlugin = new Map();
|
|
251
|
+
for (const [name, { plugin, definition }] of templates) {
|
|
252
|
+
const regions = definition.regions ?? [];
|
|
253
|
+
if (regions.length === 0)
|
|
254
|
+
continue;
|
|
255
|
+
const selector = definition.selector !== undefined ? definition.selector.trim() : name;
|
|
256
|
+
const blocks = regions.map((r) => {
|
|
257
|
+
const decls = [];
|
|
258
|
+
if (r.flow !== undefined)
|
|
259
|
+
decls.push(`flow-from: ${r.flow};`);
|
|
260
|
+
if (r.top !== undefined)
|
|
261
|
+
decls.push(`top: ${r.top};`);
|
|
262
|
+
if (r.right !== undefined)
|
|
263
|
+
decls.push(`right: ${r.right};`);
|
|
264
|
+
if (r.bottom !== undefined)
|
|
265
|
+
decls.push(`bottom: ${r.bottom};`);
|
|
266
|
+
if (r.left !== undefined)
|
|
267
|
+
decls.push(`left: ${r.left};`);
|
|
268
|
+
if (r.width !== undefined)
|
|
269
|
+
decls.push(`width: ${r.width};`);
|
|
270
|
+
if (r.height !== undefined)
|
|
271
|
+
decls.push(`height: ${r.height};`);
|
|
272
|
+
if (r.columns !== undefined)
|
|
273
|
+
decls.push(`column-count: ${r.columns};`);
|
|
274
|
+
if (r.columnGap !== undefined)
|
|
275
|
+
decls.push(`column-gap: ${r.columnGap};`);
|
|
276
|
+
if (r.columnFill !== undefined)
|
|
277
|
+
decls.push(`column-fill: ${r.columnFill};`);
|
|
278
|
+
return `@region ${r.name} { ${decls.join(' ')} }`;
|
|
279
|
+
});
|
|
280
|
+
const rule = `@page${selector ? ` ${selector}` : ''} { ${blocks.join(' ')} }`;
|
|
281
|
+
byPlugin.set(plugin, [...(byPlugin.get(plugin) ?? []), rule]);
|
|
282
|
+
}
|
|
283
|
+
if (byPlugin.size === 0)
|
|
284
|
+
return '';
|
|
285
|
+
const plugins = [...byPlugin.keys()].sort();
|
|
286
|
+
const order = `@layer ${plugins.map(pluginLayer).join(', ')};`;
|
|
287
|
+
const layers = plugins.map((p) => `@layer ${pluginLayer(p)} {\n${byPlugin.get(p).join('\n')}\n}`);
|
|
288
|
+
return `${order}\n${layers.join('\n')}`;
|
|
289
|
+
}
|
|
290
|
+
//# sourceMappingURL=templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/layout/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC,OAAO,EAAuC,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EAAiB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE9E,+EAA+E;AAC/E,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAA;AAElC,qC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AAC,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAClG,OAAO,GAAG,KAAK,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAA;AACzC,CAAC"}
|
package/dist/layout/vlist.d.ts
CHANGED
|
@@ -175,11 +175,11 @@ export interface VPenalty {
|
|
|
175
175
|
/** A forced break that must start a left (verso) or right (recto) page. */
|
|
176
176
|
readonly side?: 'left' | 'right';
|
|
177
177
|
}
|
|
178
|
-
/** What floats out of the flow: a footnote,
|
|
178
|
+
/** What floats out of the flow: a footnote, a top or bottom float, or a plugin-defined insert class (`float: <name>`). */
|
|
179
179
|
export interface VInsert {
|
|
180
180
|
readonly type: 'insert';
|
|
181
|
-
/** Which insertion class, as TeX's `\insert` numbers them. */
|
|
182
|
-
readonly class:
|
|
181
|
+
/** Which insertion class, as TeX's `\insert` numbers them: `footnote`, `top`, `bottom`, or a plugin's class name. */
|
|
182
|
+
readonly class: string;
|
|
183
183
|
/** The element floated: the note, the figure. It waits in `.pw-held`. */
|
|
184
184
|
readonly element: HTMLElement;
|
|
185
185
|
/** Its own vertical list, laid out at the flow's measure. */
|
|
@@ -16,6 +16,19 @@ export type GlueOrder = 0 | 1 | 2 | 3;
|
|
|
16
16
|
export interface Box {
|
|
17
17
|
readonly type: 'box';
|
|
18
18
|
readonly width: number;
|
|
19
|
+
/**
|
|
20
|
+
* How far the box's first glyph may hang into the left margin, in the
|
|
21
|
+
* same unit as `width`. Only the box that starts a line uses it.
|
|
22
|
+
* Absent is 0, which leaves the line as TeX's.
|
|
23
|
+
*/
|
|
24
|
+
readonly leftHang?: number;
|
|
25
|
+
/** How far the box's last glyph may hang into the right margin, when the line ends at this box. */
|
|
26
|
+
readonly rightHang?: number;
|
|
27
|
+
/**
|
|
28
|
+
* How much of `width` font expansion may scale: the glyph advances, not
|
|
29
|
+
* glue and not an image. Absent is 0.
|
|
30
|
+
*/
|
|
31
|
+
readonly expand?: number;
|
|
19
32
|
}
|
|
20
33
|
/** Space that can stretch and shrink, such as a word space. Shrink is always finite, as TeX requires in a paragraph. */
|
|
21
34
|
export interface Glue {
|
|
@@ -42,13 +55,25 @@ export interface Penalty {
|
|
|
42
55
|
* and soft hyphens are not automatic.
|
|
43
56
|
*/
|
|
44
57
|
readonly auto?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* How far the hyphen inserted at this break may hang into the right
|
|
60
|
+
* margin. Used instead of the previous box's {@link Box.rightHang} when
|
|
61
|
+
* set, so an inserted hyphen hangs and the letter before it does not.
|
|
62
|
+
*/
|
|
63
|
+
readonly rightHang?: number;
|
|
64
|
+
/** How much of the inserted hyphen font expansion may scale. The penalty's `width` (a kerning change) is not expandable. */
|
|
65
|
+
readonly expand?: number;
|
|
45
66
|
}
|
|
46
67
|
/** One item of a paragraph's list. */
|
|
47
68
|
export type Item = Box | Glue | Penalty;
|
|
48
69
|
/** A glue specification without the item tag: `\leftskip`, `\rightskip`, `\parfillskip`. */
|
|
49
70
|
export type GlueSpec = Omit<Glue, 'type'>;
|
|
50
|
-
/** A box `width` wide. */
|
|
51
|
-
export declare function box(width: number
|
|
71
|
+
/** A box `width` wide. Hangs and `expand` are attached only when non-zero, so a plain box is unchanged. */
|
|
72
|
+
export declare function box(width: number, micro?: {
|
|
73
|
+
leftHang?: number;
|
|
74
|
+
rightHang?: number;
|
|
75
|
+
expand?: number;
|
|
76
|
+
}): Box;
|
|
52
77
|
/** Glue: `width plus stretch minus shrink`, with stretch of the given order. */
|
|
53
78
|
export declare function glue(width: number, stretch?: number, shrink?: number, stretchOrder?: GlueOrder): Glue;
|
|
54
79
|
/** A penalty of `penalty`, `width` wide if broken at; `flagged` marks a hyphen. */
|
package/dist/linebreak/items.js
CHANGED
|
@@ -7,9 +7,16 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/** A penalty at or above this never breaks; at or below its negation, always breaks. */
|
|
9
9
|
export const INFINITE_PENALTY = 10000;
|
|
10
|
-
/** A box `width` wide. */
|
|
11
|
-
export function box(width) {
|
|
12
|
-
|
|
10
|
+
/** A box `width` wide. Hangs and `expand` are attached only when non-zero, so a plain box is unchanged. */
|
|
11
|
+
export function box(width, micro) {
|
|
12
|
+
const extra = {};
|
|
13
|
+
if (micro?.leftHang)
|
|
14
|
+
extra.leftHang = micro.leftHang;
|
|
15
|
+
if (micro?.rightHang)
|
|
16
|
+
extra.rightHang = micro.rightHang;
|
|
17
|
+
if (micro?.expand)
|
|
18
|
+
extra.expand = micro.expand;
|
|
19
|
+
return { type: 'box', width, ...extra };
|
|
13
20
|
}
|
|
14
21
|
/** Glue: `width plus stretch minus shrink`, with stretch of the given order. */
|
|
15
22
|
export function glue(width, stretch = 0, shrink = 0, stretchOrder = 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"items.js","sourceRoot":"","sources":["../../src/linebreak/items.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,wFAAwF;AACxF,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"items.js","sourceRoot":"","sources":["../../src/linebreak/items.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,wFAAwF;AACxF,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAA;AAqErC,2GAA2G;AAC3G,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,KAAkE;IACnG,MAAM,KAAK,GAA+D,EAAE,CAAA;IAC5E,IAAI,KAAK,EAAE,QAAQ;QAAE,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;IACpD,IAAI,KAAK,EAAE,SAAS;QAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;IACvD,IAAI,KAAK,EAAE,MAAM;QAAE,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAA;IAC9C,OAAO,EAAE,IAAI,EAAE,KAAK,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AAC,KAAK,EAAE,CAAA;IAC9E,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAA;IACjG,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -47,6 +47,14 @@ export interface LineBreakParameters {
|
|
|
47
47
|
readonly rightSkip: GlueSpec;
|
|
48
48
|
/** Lines with badness above this are reported underfull: `\hbadness`, default 1000. It doesn't change the breaks. */
|
|
49
49
|
readonly hbadness: number;
|
|
50
|
+
/**
|
|
51
|
+
* How far a line's glyphs may widen or narrow, as a fraction of their
|
|
52
|
+
* expandable width (pdfTeX's `\pdffontexpand`, one limit both ways).
|
|
53
|
+
* Added to the line's finite stretch and shrink, in the break and in the
|
|
54
|
+
* packing, so the badness can fall. 0, the default, leaves the breaks as
|
|
55
|
+
* TeX's. The fraction a line actually uses is {@link Line.expansion}.
|
|
56
|
+
*/
|
|
57
|
+
readonly expansion: number;
|
|
50
58
|
}
|
|
51
59
|
/** TeX's defaults (plain TeX's, where INITEX's are zero). */
|
|
52
60
|
export declare const DEFAULT_PARAMETERS: LineBreakParameters;
|
|
@@ -87,6 +95,18 @@ export interface Line {
|
|
|
87
95
|
readonly overfull: number;
|
|
88
96
|
/** Stretched past `hbadness` (TeX's "Underfull \hbox"). */
|
|
89
97
|
readonly underfull: boolean;
|
|
98
|
+
/** How far the line's first glyph hangs into the left margin. 0 when protrusion is off. */
|
|
99
|
+
readonly leftHang: number;
|
|
100
|
+
/** How far the line's last glyph hangs into the right margin. 0 when protrusion is off. */
|
|
101
|
+
readonly rightHang: number;
|
|
102
|
+
/**
|
|
103
|
+
* The fraction the line's glyphs are widened (positive) or narrowed by:
|
|
104
|
+
* {@link LineBreakParameters.expansion} times the glue ratio when the
|
|
105
|
+
* glue is finite, so the glyphs and the glue share the shortfall; 0 when
|
|
106
|
+
* infinite glue absorbs it or nothing on the line expands; the full
|
|
107
|
+
* limit, negative, when the line is overfull at full shrink.
|
|
108
|
+
*/
|
|
109
|
+
readonly expansion: number;
|
|
90
110
|
}
|
|
91
111
|
/** The pass that found the breaks: TeX's three, or `given` when they were chosen elsewhere ({@link setLines}). */
|
|
92
112
|
export type Pass = 'first' | 'second' | 'emergency' | 'given';
|
|
@@ -16,6 +16,7 @@ export const DEFAULT_PARAMETERS = {
|
|
|
16
16
|
leftSkip: { width: 0, stretch: 0, shrink: 0 },
|
|
17
17
|
rightSkip: { width: 0, stretch: 0, shrink: 0 },
|
|
18
18
|
hbadness: 1000,
|
|
19
|
+
expansion: 0,
|
|
19
20
|
};
|
|
20
21
|
/** TeX's `awful_bad`: demerits worse than any real ones. */
|
|
21
22
|
const AWFUL_BAD = 0x3fffffff;
|
|
@@ -43,16 +44,19 @@ export function badness(t, s) {
|
|
|
43
44
|
return INFINITE_BADNESS;
|
|
44
45
|
return Math.floor((r * r * r + 0x20000) / 0x40000);
|
|
45
46
|
}
|
|
46
|
-
/** Running sums of the
|
|
47
|
+
/** Running sums of the widths TeX tracks, plus the expandable glyph width. */
|
|
47
48
|
class Sums {
|
|
48
49
|
width;
|
|
49
50
|
stretch;
|
|
50
51
|
shrink;
|
|
52
|
+
/** Glyph advances font expansion may scale. Glue and penalties are not included; a hyphen's is added at the break. */
|
|
53
|
+
expand;
|
|
51
54
|
constructor(items) {
|
|
52
55
|
const n = items.length + 1;
|
|
53
56
|
this.width = new Float64Array(n);
|
|
54
57
|
this.stretch = [new Float64Array(n), new Float64Array(n), new Float64Array(n), new Float64Array(n)];
|
|
55
58
|
this.shrink = new Float64Array(n);
|
|
59
|
+
this.expand = new Float64Array(n);
|
|
56
60
|
for (let i = 0; i < items.length; i++) {
|
|
57
61
|
const item = items[i];
|
|
58
62
|
this.width[i + 1] = this.width[i] + (item.type === 'penalty' ? 0 : item.width);
|
|
@@ -61,9 +65,33 @@ class Sums {
|
|
|
61
65
|
this.stretch[o][i + 1] = this.stretch[o][i] + add;
|
|
62
66
|
}
|
|
63
67
|
this.shrink[i + 1] = this.shrink[i] + (item.type === 'glue' ? item.shrink : 0);
|
|
68
|
+
this.expand[i + 1] = this.expand[i] + (item.type === 'box' ? item.expand ?? 0 : 0);
|
|
64
69
|
}
|
|
65
70
|
}
|
|
66
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* The hangs at the edges of the line from `start` to a break at `at`.
|
|
74
|
+
* An inserted hyphen's hang is the penalty's; otherwise the last box's.
|
|
75
|
+
* Both are 0 when the items carry none, and the measure is then TeX's.
|
|
76
|
+
*/
|
|
77
|
+
function edgeHangs(items, start, at) {
|
|
78
|
+
const first = items[start];
|
|
79
|
+
const left = first?.type === 'box' ? first.leftHang ?? 0 : 0;
|
|
80
|
+
const brk = items[at];
|
|
81
|
+
if (brk?.type === 'penalty' && (brk.rightHang ?? 0) !== 0)
|
|
82
|
+
return { left, right: brk.rightHang ?? 0 };
|
|
83
|
+
let i = at - 1;
|
|
84
|
+
while (i > start && items[i]?.type !== 'box')
|
|
85
|
+
i--;
|
|
86
|
+
const last = i >= start ? items[i] : undefined;
|
|
87
|
+
return { left, right: last?.type === 'box' ? last.rightHang ?? 0 : 0 };
|
|
88
|
+
}
|
|
89
|
+
/** Glyph advances the line may scale, including an inserted hyphen's own advance. */
|
|
90
|
+
function expandable(sums, items, start, at) {
|
|
91
|
+
const brk = items[at];
|
|
92
|
+
const extra = brk?.type === 'penalty' ? brk.expand ?? 0 : 0;
|
|
93
|
+
return sums.expand[at] - sums.expand[start] + extra;
|
|
94
|
+
}
|
|
67
95
|
function lineWidths(measure) {
|
|
68
96
|
if (typeof measure === 'number')
|
|
69
97
|
return { width: () => measure, lastSpecialLine: 0 };
|
|
@@ -109,7 +137,7 @@ export function setLines(items, breaks, options) {
|
|
|
109
137
|
previous = { serial: ++serial, at, previous, fitness: Fitness.Decent, total: 0 };
|
|
110
138
|
}
|
|
111
139
|
const best = { start: 0, line: serial + 1, fitness: Fitness.Decent, hyphenated: false, total: 0, passive: previous };
|
|
112
|
-
return finish(items, new Sums(items), nextStarts(items), best, lineWidths(options.measure).width, params.hbadness, backgroundOf(params), 'given', 0, undefined);
|
|
140
|
+
return finish(items, new Sums(items), nextStarts(items), best, lineWidths(options.measure).width, params.hbadness, params.expansion, backgroundOf(params), 'given', 0, undefined);
|
|
113
141
|
}
|
|
114
142
|
/**
|
|
115
143
|
* Breaks a paragraph into lines. The list must end with a forced break
|
|
@@ -232,15 +260,21 @@ export function breakLines(items, options) {
|
|
|
232
260
|
}
|
|
233
261
|
if (!r)
|
|
234
262
|
return;
|
|
235
|
-
// §851: the line from r to here.
|
|
263
|
+
// §851: the line from r to here. Protrusion widens the measure by
|
|
264
|
+
// the edge hangs; font expansion adds to the finite stretch and
|
|
265
|
+
// shrink (unlike emergency stretch, which is only for feasibility).
|
|
266
|
+
// Both are 0 unless the items and the parameters ask, and then the
|
|
267
|
+
// arithmetic is TeX's.
|
|
236
268
|
const s = r.start;
|
|
237
269
|
const width = sums.width[at] - sums.width[s] + background.width + extra;
|
|
238
|
-
const
|
|
270
|
+
const hangs = edgeHangs(items, s, at);
|
|
271
|
+
const fontFlex = params.expansion > 0 ? expandable(sums, items, s, at) * params.expansion : 0;
|
|
272
|
+
const stretch = sums.stretch[0][at] - sums.stretch[0][s] + background.stretch[0] + emergency + fontFlex;
|
|
239
273
|
const infinite = sums.stretch[1][at] - sums.stretch[1][s] + background.stretch[1] !== 0 ||
|
|
240
274
|
sums.stretch[2][at] - sums.stretch[2][s] + background.stretch[2] !== 0 ||
|
|
241
275
|
sums.stretch[3][at] - sums.stretch[3][s] + background.stretch[3] !== 0;
|
|
242
|
-
const shrink = sums.shrink[at] - sums.shrink[s] + background.shrink;
|
|
243
|
-
const shortfall = lineWidth - width;
|
|
276
|
+
const shrink = sums.shrink[at] - sums.shrink[s] + background.shrink + fontFlex;
|
|
277
|
+
const shortfall = lineWidth + hangs.left + hangs.right - width;
|
|
244
278
|
let b;
|
|
245
279
|
let fit;
|
|
246
280
|
if (shortfall > 0) {
|
|
@@ -361,7 +395,7 @@ export function breakLines(items, options) {
|
|
|
361
395
|
}
|
|
362
396
|
}
|
|
363
397
|
if (actual === params.looseness || finalPass) {
|
|
364
|
-
return finish(items, sums, nextStart, best, measureOf, params.hbadness, background, pass, actual, trace);
|
|
398
|
+
return finish(items, sums, nextStart, best, measureOf, params.hbadness, params.expansion, background, pass, actual, trace);
|
|
365
399
|
}
|
|
366
400
|
}
|
|
367
401
|
if (!secondPass) {
|
|
@@ -387,7 +421,7 @@ function definedOnly(options) {
|
|
|
387
421
|
return out;
|
|
388
422
|
}
|
|
389
423
|
/** The chosen breaks as lines, each packed as TeX's hpack would (§649–667). */
|
|
390
|
-
function finish(items, sums, nextStart, best, measureOf, hbadness, background, pass, looseness, trace) {
|
|
424
|
+
function finish(items, sums, nextStart, best, measureOf, hbadness, expansionLimit, background, pass, looseness, trace) {
|
|
391
425
|
const chain = [];
|
|
392
426
|
for (let p = best.passive; p; p = p.previous)
|
|
393
427
|
chain.push(p);
|
|
@@ -404,30 +438,45 @@ function finish(items, sums, nextStart, best, measureOf, hbadness, background, p
|
|
|
404
438
|
const stretchBy = sums.stretch.map((sum, o) => sum[at] - sum[start] + background.stretch[o]);
|
|
405
439
|
const shrink = sums.shrink[at] - sums.shrink[start] + background.shrink;
|
|
406
440
|
const measure = measureOf(index + 1);
|
|
407
|
-
const
|
|
441
|
+
const hangs = edgeHangs(items, start, at);
|
|
442
|
+
// Font expansion is real glue's partner: it shares the shortfall, in
|
|
443
|
+
// the packing as in the break. Emergency stretch does not, and stays
|
|
444
|
+
// out. `stretch` and `shrink` stay the glue's, so a line with no
|
|
445
|
+
// expansion reports TeX's numbers.
|
|
446
|
+
const flex = expansionLimit > 0 ? expandable(sums, items, start, at) * expansionLimit : 0;
|
|
447
|
+
const x = measure + hangs.left + hangs.right - width;
|
|
408
448
|
let ratio = 0;
|
|
409
449
|
let glueOrder = 0;
|
|
410
450
|
let lineBadness = 0;
|
|
411
451
|
let overfull = 0;
|
|
412
452
|
let underfull = false;
|
|
453
|
+
let expansion = 0;
|
|
413
454
|
if (x > 0) {
|
|
414
455
|
glueOrder = stretchBy[3] !== 0 ? 3 : stretchBy[2] !== 0 ? 2 : stretchBy[1] !== 0 ? 1 : 0;
|
|
415
|
-
const total = stretchBy[glueOrder];
|
|
416
|
-
ratio = total !== 0 ? x / total : 0;
|
|
417
456
|
if (glueOrder === 0) {
|
|
457
|
+
const total = stretchBy[0] + flex;
|
|
458
|
+
ratio = total !== 0 ? x / total : 0;
|
|
418
459
|
lineBadness = badness(x, total);
|
|
419
460
|
underfull = lineBadness > hbadness;
|
|
461
|
+
expansion = flex > 0 ? ratio * expansionLimit : 0;
|
|
462
|
+
}
|
|
463
|
+
else {
|
|
464
|
+
const total = stretchBy[glueOrder];
|
|
465
|
+
ratio = total !== 0 ? x / total : 0;
|
|
420
466
|
}
|
|
421
467
|
}
|
|
422
468
|
else if (x < 0) {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
469
|
+
const shrinkTotal = shrink + flex;
|
|
470
|
+
if (shrinkTotal < -x) {
|
|
471
|
+
overfull = -x - shrinkTotal;
|
|
472
|
+
ratio = shrinkTotal > 0 ? -1 : 0;
|
|
426
473
|
lineBadness = 1000000;
|
|
474
|
+
expansion = flex > 0 ? -expansionLimit : 0;
|
|
427
475
|
}
|
|
428
476
|
else {
|
|
429
|
-
ratio = x /
|
|
430
|
-
lineBadness = badness(-x,
|
|
477
|
+
ratio = shrinkTotal !== 0 ? x / shrinkTotal : 0;
|
|
478
|
+
lineBadness = badness(-x, shrinkTotal);
|
|
479
|
+
expansion = flex > 0 ? ratio * expansionLimit : 0;
|
|
431
480
|
}
|
|
432
481
|
}
|
|
433
482
|
lines.push({
|
|
@@ -445,6 +494,9 @@ function finish(items, sums, nextStart, best, measureOf, hbadness, background, p
|
|
|
445
494
|
hyphenated: at !== final && item.type === 'penalty' && item.flagged,
|
|
446
495
|
overfull,
|
|
447
496
|
underfull,
|
|
497
|
+
leftHang: hangs.left,
|
|
498
|
+
rightHang: hangs.right,
|
|
499
|
+
expansion,
|
|
448
500
|
});
|
|
449
501
|
previousTotal = p.total;
|
|
450
502
|
start = nextStart[at];
|