pulpweaver4 0.0.0-stage → 0.0.91
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.d.ts +124 -0
- package/dist/ast/djot.js +464 -0
- package/dist/ast/djot.js.map +1 -0
- package/dist/ast/index.d.ts +10 -0
- package/dist/ast/index.js +11 -0
- package/dist/ast/index.js.map +1 -0
- package/dist/ast/locator.d.ts +27 -0
- package/dist/ast/locator.js +77 -0
- package/dist/ast/locator.js.map +1 -0
- package/dist/ast/nodes.d.ts +543 -0
- package/dist/ast/nodes.js +56 -0
- package/dist/ast/nodes.js.map +1 -0
- package/dist/ast/position.d.ts +88 -0
- package/dist/ast/position.js +98 -0
- package/dist/ast/position.js.map +1 -0
- package/dist/ast/traverse.d.ts +12 -0
- package/dist/ast/traverse.js +37 -0
- package/dist/ast/traverse.js.map +1 -0
- package/dist/bibliography/biblatex.d.ts +13 -0
- package/dist/bibliography/biblatex.js +849 -0
- package/dist/bibliography/biblatex.js.map +1 -0
- package/dist/bibliography/bibtex.d.ts +39 -0
- package/dist/bibliography/bibtex.js +259 -0
- package/dist/bibliography/bibtex.js.map +1 -0
- package/dist/bibliography/csl.d.ts +9 -0
- package/dist/bibliography/csl.js +241 -0
- package/dist/bibliography/csl.js.map +1 -0
- package/dist/bibliography/dates.d.ts +33 -0
- package/dist/bibliography/dates.js +223 -0
- package/dist/bibliography/dates.js.map +1 -0
- package/dist/bibliography/index.d.ts +8 -0
- package/dist/bibliography/index.js +9 -0
- package/dist/bibliography/index.js.map +1 -0
- package/dist/bibliography/item.d.ts +142 -0
- package/dist/bibliography/item.js +181 -0
- package/dist/bibliography/item.js.map +1 -0
- package/dist/bibliography/latex.d.ts +21 -0
- package/dist/bibliography/latex.js +586 -0
- package/dist/bibliography/latex.js.map +1 -0
- package/dist/bibliography/names.d.ts +23 -0
- package/dist/bibliography/names.js +244 -0
- package/dist/bibliography/names.js.map +1 -0
- package/dist/bibliography/read.d.ts +24 -0
- package/dist/bibliography/read.js +50 -0
- package/dist/bibliography/read.js.map +1 -0
- package/dist/citations/book.d.ts +93 -0
- package/dist/citations/book.js +217 -0
- package/dist/citations/book.js.map +1 -0
- package/dist/citations/collect.d.ts +56 -0
- package/dist/citations/collect.js +129 -0
- package/dist/citations/collect.js.map +1 -0
- package/dist/citations/hast.d.ts +12 -0
- package/dist/citations/hast.js +49 -0
- package/dist/citations/hast.js.map +1 -0
- package/dist/citations/index.d.ts +14 -0
- package/dist/citations/index.js +15 -0
- package/dist/citations/index.js.map +1 -0
- package/dist/citations/lint.d.ts +70 -0
- package/dist/citations/lint.js +92 -0
- package/dist/citations/lint.js.map +1 -0
- package/dist/citations/notes.d.ts +11 -0
- package/dist/citations/notes.js +163 -0
- package/dist/citations/notes.js.map +1 -0
- package/dist/citations/positions.d.ts +34 -0
- package/dist/citations/positions.js +90 -0
- package/dist/citations/positions.js.map +1 -0
- package/dist/citations/project.d.ts +7 -0
- package/dist/citations/project.js +24 -0
- package/dist/citations/project.js.map +1 -0
- package/dist/colour/cmyk.d.ts +71 -0
- package/dist/colour/cmyk.js +210 -0
- package/dist/colour/cmyk.js.map +1 -0
- package/dist/colour/images.d.ts +36 -0
- package/dist/colour/images.js +106 -0
- package/dist/colour/images.js.map +1 -0
- package/dist/colour/index.d.ts +7 -0
- package/dist/colour/index.js +8 -0
- package/dist/colour/index.js.map +1 -0
- package/dist/colour/ink-limit.d.ts +68 -0
- package/dist/colour/ink-limit.js +109 -0
- package/dist/colour/ink-limit.js.map +1 -0
- package/dist/colour/intents.d.ts +145 -0
- package/dist/colour/intents.js +193 -0
- package/dist/colour/intents.js.map +1 -0
- package/dist/colour/lcms.d.ts +79 -0
- package/dist/colour/lcms.js +229 -0
- package/dist/colour/lcms.js.map +1 -0
- package/dist/colour/previews.d.ts +49 -0
- package/dist/colour/previews.js +116 -0
- package/dist/colour/previews.js.map +1 -0
- package/dist/colour/wasm/LICENSE-lcms2 +22 -0
- package/dist/colour/wasm/lcms2.wasm +0 -0
- package/dist/config/config.d.ts +114 -0
- package/dist/config/config.js +309 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/index.d.ts +6 -0
- package/dist/config/index.js +7 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/page.d.ts +42 -0
- package/dist/config/page.js +95 -0
- package/dist/config/page.js.map +1 -0
- package/dist/config/project-schema.d.ts +23 -0
- package/dist/config/project-schema.js +223 -0
- package/dist/config/project-schema.js.map +1 -0
- package/dist/config/schema.d.ts +68 -0
- package/dist/config/schema.js +333 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config/toml.d.ts +54 -0
- package/dist/config/toml.js +238 -0
- package/dist/config/toml.js.map +1 -0
- package/dist/contents/index.d.ts +8 -0
- package/dist/contents/index.js +9 -0
- package/dist/contents/index.js.map +1 -0
- package/dist/contents/transform.d.ts +64 -0
- package/dist/contents/transform.js +149 -0
- package/dist/contents/transform.js.map +1 -0
- package/dist/csl/affix.d.ts +16 -0
- package/dist/csl/affix.js +74 -0
- package/dist/csl/affix.js.map +1 -0
- package/dist/csl/data/chicago-author-date.d.ts +2 -0
- package/dist/csl/data/chicago-author-date.js +3 -0
- package/dist/csl/data/chicago-author-date.js.map +1 -0
- package/dist/csl/data/chicago-notes-bibliography.d.ts +2 -0
- package/dist/csl/data/chicago-notes-bibliography.js +3 -0
- package/dist/csl/data/chicago-notes-bibliography.js.map +1 -0
- package/dist/csl/data/locales-en-GB.d.ts +2 -0
- package/dist/csl/data/locales-en-GB.js +3 -0
- package/dist/csl/data/locales-en-GB.js.map +1 -0
- package/dist/csl/data/locales-en-US.d.ts +2 -0
- package/dist/csl/data/locales-en-US.js +3 -0
- package/dist/csl/data/locales-en-US.js.map +1 -0
- package/dist/csl/dates.d.ts +30 -0
- package/dist/csl/dates.js +223 -0
- package/dist/csl/dates.js.map +1 -0
- package/dist/csl/format.d.ts +29 -0
- package/dist/csl/format.js +157 -0
- package/dist/csl/format.js.map +1 -0
- package/dist/csl/index.d.ts +26 -0
- package/dist/csl/index.js +16 -0
- package/dist/csl/index.js.map +1 -0
- package/dist/csl/ir.d.ts +103 -0
- package/dist/csl/ir.js +549 -0
- package/dist/csl/ir.js.map +1 -0
- package/dist/csl/load.d.ts +98 -0
- package/dist/csl/load.js +163 -0
- package/dist/csl/load.js.map +1 -0
- package/dist/csl/locale.d.ts +90 -0
- package/dist/csl/locale.js +251 -0
- package/dist/csl/locale.js.map +1 -0
- package/dist/csl/names.d.ts +41 -0
- package/dist/csl/names.js +203 -0
- package/dist/csl/names.js.map +1 -0
- package/dist/csl/numbers.d.ts +48 -0
- package/dist/csl/numbers.js +170 -0
- package/dist/csl/numbers.js.map +1 -0
- package/dist/csl/processor.d.ts +179 -0
- package/dist/csl/processor.js +765 -0
- package/dist/csl/processor.js.map +1 -0
- package/dist/csl/project.d.ts +21 -0
- package/dist/csl/project.js +85 -0
- package/dist/csl/project.js.map +1 -0
- package/dist/csl/render.d.ts +130 -0
- package/dist/csl/render.js +748 -0
- package/dist/csl/render.js.map +1 -0
- package/dist/csl/style.d.ts +168 -0
- package/dist/csl/style.js +262 -0
- package/dist/csl/style.js.map +1 -0
- package/dist/csl/xml.d.ts +28 -0
- package/dist/csl/xml.js +162 -0
- package/dist/csl/xml.js.map +1 -0
- package/dist/djot/djot.js/LICENSE +20 -0
- package/dist/djot/djot.js/src/ast.d.ts +327 -0
- package/dist/djot/djot.js/src/ast.js +68 -0
- package/dist/djot/djot.js/src/ast.js.map +1 -0
- package/dist/djot/djot.js/src/attributes.d.ts +31 -0
- package/dist/djot/djot.js/src/attributes.js +300 -0
- package/dist/djot/djot.js/src/attributes.js.map +1 -0
- package/dist/djot/djot.js/src/block.d.ts +87 -0
- package/dist/djot/djot.js/src/block.js +1201 -0
- package/dist/djot/djot.js/src/block.js.map +1 -0
- package/dist/djot/djot.js/src/djot-renderer.d.ts +8 -0
- package/dist/djot/djot.js/src/djot-renderer.js +755 -0
- package/dist/djot/djot.js/src/djot-renderer.js.map +1 -0
- package/dist/djot/djot.js/src/event.d.ts +6 -0
- package/dist/djot/djot.js/src/event.js +2 -0
- package/dist/djot/djot.js/src/event.js.map +1 -0
- package/dist/djot/djot.js/src/filter.d.ts +13 -0
- package/dist/djot/djot.js/src/filter.js +159 -0
- package/dist/djot/djot.js/src/filter.js.map +1 -0
- package/dist/djot/djot.js/src/find.d.ts +7 -0
- package/dist/djot/djot.js/src/find.js +33 -0
- package/dist/djot/djot.js/src/find.js.map +1 -0
- package/dist/djot/djot.js/src/html.d.ts +40 -0
- package/dist/djot/djot.js/src/html.js +657 -0
- package/dist/djot/djot.js/src/html.js.map +1 -0
- package/dist/djot/djot.js/src/index.d.ts +9 -0
- package/dist/djot/djot.js/src/index.js +9 -0
- package/dist/djot/djot.js/src/index.js.map +1 -0
- package/dist/djot/djot.js/src/inline.d.ts +62 -0
- package/dist/djot/djot.js/src/inline.js +1032 -0
- package/dist/djot/djot.js/src/inline.js.map +1 -0
- package/dist/djot/djot.js/src/options.d.ts +13 -0
- package/dist/djot/djot.js/src/options.js +27 -0
- package/dist/djot/djot.js/src/options.js.map +1 -0
- package/dist/djot/djot.js/src/pandoc.d.ts +20 -0
- package/dist/djot/djot.js/src/pandoc.js +1110 -0
- package/dist/djot/djot.js/src/pandoc.js.map +1 -0
- package/dist/djot/djot.js/src/parse.d.ts +19 -0
- package/dist/djot/djot.js/src/parse.js +1445 -0
- package/dist/djot/djot.js/src/parse.js.map +1 -0
- package/dist/djot/djot.js/src/version.d.ts +1 -0
- package/dist/djot/djot.js/src/version.js +2 -0
- package/dist/djot/djot.js/src/version.js.map +1 -0
- package/dist/djot/index.d.ts +5 -0
- package/dist/djot/index.js +6 -0
- package/dist/djot/index.js.map +1 -0
- package/dist/djot/read.d.ts +57 -0
- package/dist/djot/read.js +146 -0
- package/dist/djot/read.js.map +1 -0
- package/dist/fonts/css.d.ts +82 -0
- package/dist/fonts/css.js +329 -0
- package/dist/fonts/css.js.map +1 -0
- package/dist/fonts/faces.d.ts +101 -0
- package/dist/fonts/faces.js +226 -0
- package/dist/fonts/faces.js.map +1 -0
- package/dist/fonts/index.d.ts +12 -0
- package/dist/fonts/index.js +13 -0
- package/dist/fonts/index.js.map +1 -0
- package/dist/fonts/lint.d.ts +58 -0
- package/dist/fonts/lint.js +209 -0
- package/dist/fonts/lint.js.map +1 -0
- package/dist/fonts/match.d.ts +36 -0
- package/dist/fonts/match.js +104 -0
- package/dist/fonts/match.js.map +1 -0
- package/dist/fonts/names.d.ts +9 -0
- package/dist/fonts/names.js +50 -0
- package/dist/fonts/names.js.map +1 -0
- package/dist/fonts/subset.d.ts +72 -0
- package/dist/fonts/subset.js +169 -0
- package/dist/fonts/subset.js.map +1 -0
- package/dist/fonts/walk.d.ts +33 -0
- package/dist/fonts/walk.js +120 -0
- package/dist/fonts/walk.js.map +1 -0
- package/dist/fonts/wasm/LICENSE-harfbuzzjs +19 -0
- package/dist/fonts/wasm/harfbuzz-subset.wasm +0 -0
- package/dist/html/check.d.ts +62 -0
- package/dist/html/check.js +186 -0
- package/dist/html/check.js.map +1 -0
- package/dist/html/counters.d.ts +32 -0
- package/dist/html/counters.js +72 -0
- package/dist/html/counters.js.map +1 -0
- package/dist/html/css.d.ts +33 -0
- package/dist/html/css.js +72 -0
- package/dist/html/css.js.map +1 -0
- package/dist/html/dom.d.ts +28 -0
- package/dist/html/dom.js +162 -0
- package/dist/html/dom.js.map +1 -0
- package/dist/html/editions.d.ts +26 -0
- package/dist/html/editions.js +57 -0
- package/dist/html/editions.js.map +1 -0
- package/dist/html/images.d.ts +13 -0
- package/dist/html/images.js +62 -0
- package/dist/html/images.js.map +1 -0
- package/dist/html/index.d.ts +14 -0
- package/dist/html/index.js +15 -0
- package/dist/html/index.js.map +1 -0
- package/dist/html/registry.d.ts +120 -0
- package/dist/html/registry.js +48 -0
- package/dist/html/registry.js.map +1 -0
- package/dist/html/render.d.ts +99 -0
- package/dist/html/render.js +694 -0
- package/dist/html/render.js.map +1 -0
- package/dist/hyphenation/NOTICE +429 -0
- package/dist/hyphenation/exceptions.d.ts +60 -0
- package/dist/hyphenation/exceptions.js +79 -0
- package/dist/hyphenation/exceptions.js.map +1 -0
- package/dist/hyphenation/hyphenator.d.ts +66 -0
- package/dist/hyphenation/hyphenator.js +245 -0
- package/dist/hyphenation/hyphenator.js.map +1 -0
- package/dist/hyphenation/index.d.ts +4 -0
- package/dist/hyphenation/index.js +5 -0
- package/dist/hyphenation/index.js.map +1 -0
- package/dist/hyphenation/languages.d.ts +20 -0
- package/dist/hyphenation/languages.js +75 -0
- package/dist/hyphenation/languages.js.map +1 -0
- package/dist/hyphenation/patterns/af.wasm +0 -0
- package/dist/hyphenation/patterns/as.wasm +0 -0
- package/dist/hyphenation/patterns/be.wasm +0 -0
- package/dist/hyphenation/patterns/bg.wasm +0 -0
- package/dist/hyphenation/patterns/bn.wasm +0 -0
- package/dist/hyphenation/patterns/ca.wasm +0 -0
- package/dist/hyphenation/patterns/cy.wasm +0 -0
- package/dist/hyphenation/patterns/da.wasm +0 -0
- package/dist/hyphenation/patterns/de.wasm +0 -0
- package/dist/hyphenation/patterns/el-monoton.wasm +0 -0
- package/dist/hyphenation/patterns/el-polyton.wasm +0 -0
- package/dist/hyphenation/patterns/en-gb.wasm +0 -0
- package/dist/hyphenation/patterns/en-us.wasm +0 -0
- package/dist/hyphenation/patterns/eo.wasm +0 -0
- package/dist/hyphenation/patterns/es.wasm +0 -0
- package/dist/hyphenation/patterns/et.wasm +0 -0
- package/dist/hyphenation/patterns/eu.wasm +0 -0
- package/dist/hyphenation/patterns/fi-x-school.wasm +0 -0
- package/dist/hyphenation/patterns/fr.wasm +0 -0
- package/dist/hyphenation/patterns/fur.wasm +0 -0
- package/dist/hyphenation/patterns/ga.wasm +0 -0
- package/dist/hyphenation/patterns/gl.wasm +0 -0
- package/dist/hyphenation/patterns/gu.wasm +0 -0
- package/dist/hyphenation/patterns/hi.wasm +0 -0
- package/dist/hyphenation/patterns/hr.wasm +0 -0
- package/dist/hyphenation/patterns/hsb.wasm +0 -0
- package/dist/hyphenation/patterns/ia.wasm +0 -0
- package/dist/hyphenation/patterns/is.wasm +0 -0
- package/dist/hyphenation/patterns/it.wasm +0 -0
- package/dist/hyphenation/patterns/ka.wasm +0 -0
- package/dist/hyphenation/patterns/kmr.wasm +0 -0
- package/dist/hyphenation/patterns/kn.wasm +0 -0
- package/dist/hyphenation/patterns/la.wasm +0 -0
- package/dist/hyphenation/patterns/lt.wasm +0 -0
- package/dist/hyphenation/patterns/ml.wasm +0 -0
- package/dist/hyphenation/patterns/mn-cyrl.wasm +0 -0
- package/dist/hyphenation/patterns/mr.wasm +0 -0
- package/dist/hyphenation/patterns/nb.wasm +0 -0
- package/dist/hyphenation/patterns/nl.wasm +0 -0
- package/dist/hyphenation/patterns/nn.wasm +0 -0
- package/dist/hyphenation/patterns/no.wasm +0 -0
- package/dist/hyphenation/patterns/oc.wasm +0 -0
- package/dist/hyphenation/patterns/or.wasm +0 -0
- package/dist/hyphenation/patterns/pa.wasm +0 -0
- package/dist/hyphenation/patterns/pi.wasm +0 -0
- package/dist/hyphenation/patterns/pl.wasm +0 -0
- package/dist/hyphenation/patterns/pms.wasm +0 -0
- package/dist/hyphenation/patterns/pt.wasm +0 -0
- package/dist/hyphenation/patterns/rm.wasm +0 -0
- package/dist/hyphenation/patterns/ru.wasm +0 -0
- package/dist/hyphenation/patterns/sh-cyrl.wasm +0 -0
- package/dist/hyphenation/patterns/sh-latn.wasm +0 -0
- package/dist/hyphenation/patterns/sk.wasm +0 -0
- package/dist/hyphenation/patterns/sl.wasm +0 -0
- package/dist/hyphenation/patterns/sq.wasm +0 -0
- package/dist/hyphenation/patterns/sv.wasm +0 -0
- package/dist/hyphenation/patterns/ta.wasm +0 -0
- package/dist/hyphenation/patterns/te.wasm +0 -0
- package/dist/hyphenation/patterns/th.wasm +0 -0
- package/dist/hyphenation/patterns/tk.wasm +0 -0
- package/dist/hyphenation/patterns/tr.wasm +0 -0
- package/dist/hyphenation/patterns/uk.wasm +0 -0
- package/dist/hyphenation/patterns/zh-latn-pinyin.wasm +0 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/dist/indexes/index.d.ts +10 -0
- package/dist/indexes/index.js +11 -0
- package/dist/indexes/index.js.map +1 -0
- package/dist/indexes/layout.d.ts +30 -0
- package/dist/indexes/layout.js +83 -0
- package/dist/indexes/layout.js.map +1 -0
- package/dist/indexes/locators.d.ts +33 -0
- package/dist/indexes/locators.js +51 -0
- package/dist/indexes/locators.js.map +1 -0
- package/dist/indexes/terms.d.ts +97 -0
- package/dist/indexes/terms.js +211 -0
- package/dist/indexes/terms.js.map +1 -0
- package/dist/indexes/transform.d.ts +90 -0
- package/dist/indexes/transform.js +154 -0
- package/dist/indexes/transform.js.map +1 -0
- package/dist/layout/calibrate.d.ts +12 -0
- package/dist/layout/calibrate.js +50 -0
- package/dist/layout/calibrate.js.map +1 -0
- package/dist/layout/converge.d.ts +31 -0
- package/dist/layout/converge.js +84 -0
- package/dist/layout/converge.js.map +1 -0
- package/dist/layout/counters.d.ts +16 -0
- package/dist/layout/counters.js +62 -0
- package/dist/layout/counters.js.map +1 -0
- package/dist/layout/first-letter.d.ts +34 -0
- package/dist/layout/first-letter.js +183 -0
- package/dist/layout/first-letter.js.map +1 -0
- package/dist/layout/fonts.d.ts +67 -0
- package/dist/layout/fonts.js +110 -0
- package/dist/layout/fonts.js.map +1 -0
- package/dist/layout/generated.d.ts +9 -0
- package/dist/layout/generated.js +83 -0
- package/dist/layout/generated.js.map +1 -0
- package/dist/layout/glue.d.ts +18 -0
- package/dist/layout/glue.js +48 -0
- package/dist/layout/glue.js.map +1 -0
- package/dist/layout/index.d.ts +17 -0
- package/dist/layout/index.js +18 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/layout/lists.d.ts +91 -0
- package/dist/layout/lists.js +1068 -0
- package/dist/layout/lists.js.map +1 -0
- package/dist/layout/margin-boxes.d.ts +114 -0
- package/dist/layout/margin-boxes.js +429 -0
- package/dist/layout/margin-boxes.js.map +1 -0
- package/dist/layout/minipage.d.ts +85 -0
- package/dist/layout/minipage.js +83 -0
- package/dist/layout/minipage.js.map +1 -0
- package/dist/layout/page-box.d.ts +34 -0
- package/dist/layout/page-box.js +112 -0
- package/dist/layout/page-box.js.map +1 -0
- package/dist/layout/page-rules.d.ts +49 -0
- package/dist/layout/page-rules.js +205 -0
- package/dist/layout/page-rules.js.map +1 -0
- package/dist/layout/page.d.ts +51 -0
- package/dist/layout/page.js +133 -0
- package/dist/layout/page.js.map +1 -0
- package/dist/layout/pagebuilder.d.ts +243 -0
- package/dist/layout/pagebuilder.js +591 -0
- package/dist/layout/pagebuilder.js.map +1 -0
- package/dist/layout/pages.d.ts +77 -0
- package/dist/layout/pages.js +772 -0
- package/dist/layout/pages.js.map +1 -0
- package/dist/layout/paragraph.d.ts +194 -0
- package/dist/layout/paragraph.js +1148 -0
- package/dist/layout/paragraph.js.map +1 -0
- package/dist/layout/pre.d.ts +8 -0
- package/dist/layout/pre.js +151 -0
- package/dist/layout/pre.js.map +1 -0
- package/dist/layout/region.d.ts +66 -0
- package/dist/layout/region.js +200 -0
- package/dist/layout/region.js.map +1 -0
- package/dist/layout/vlist.d.ts +218 -0
- package/dist/layout/vlist.js +72 -0
- package/dist/layout/vlist.js.map +1 -0
- package/dist/linebreak/items.d.ts +69 -0
- package/dist/linebreak/items.js +44 -0
- package/dist/linebreak/items.js.map +1 -0
- package/dist/linebreak/knuth-plass.d.ts +149 -0
- package/dist/linebreak/knuth-plass.js +461 -0
- package/dist/linebreak/knuth-plass.js.map +1 -0
- package/dist/lint/config.d.ts +48 -0
- package/dist/lint/config.js +185 -0
- package/dist/lint/config.js.map +1 -0
- package/dist/lint/context.d.ts +64 -0
- package/dist/lint/context.js +37 -0
- package/dist/lint/context.js.map +1 -0
- package/dist/lint/fix.d.ts +40 -0
- package/dist/lint/fix.js +86 -0
- package/dist/lint/fix.js.map +1 -0
- package/dist/lint/index.d.ts +14 -0
- package/dist/lint/index.js +15 -0
- package/dist/lint/index.js.map +1 -0
- package/dist/lint/linter.d.ts +59 -0
- package/dist/lint/linter.js +239 -0
- package/dist/lint/linter.js.map +1 -0
- package/dist/lint/presets.d.ts +20 -0
- package/dist/lint/presets.js +65 -0
- package/dist/lint/presets.js.map +1 -0
- package/dist/lint/project.d.ts +31 -0
- package/dist/lint/project.js +100 -0
- package/dist/lint/project.js.map +1 -0
- package/dist/lint/rules/html.d.ts +30 -0
- package/dist/lint/rules/html.js +163 -0
- package/dist/lint/rules/html.js.map +1 -0
- package/dist/lint/rules/layout.d.ts +42 -0
- package/dist/lint/rules/layout.js +428 -0
- package/dist/lint/rules/layout.js.map +1 -0
- package/dist/lint/rules/source.d.ts +67 -0
- package/dist/lint/rules/source.js +339 -0
- package/dist/lint/rules/source.js.map +1 -0
- package/dist/lint/testing.d.ts +7 -0
- package/dist/lint/testing.js +77 -0
- package/dist/lint/testing.js.map +1 -0
- package/dist/math/hast.d.ts +46 -0
- package/dist/math/hast.js +297 -0
- package/dist/math/hast.js.map +1 -0
- package/dist/math/index.d.ts +9 -0
- package/dist/math/index.js +10 -0
- package/dist/math/index.js.map +1 -0
- package/dist/math/mathjax/LICENSE-mathjax +202 -0
- package/dist/math/mathjax/LICENSE-speech-rule-engine +177 -0
- package/dist/math/mathjax/sre/af.json +146 -0
- package/dist/math/mathjax/sre/base.json +140 -0
- package/dist/math/mathjax/sre/ca.json +140 -0
- package/dist/math/mathjax/sre/da.json +140 -0
- package/dist/math/mathjax/sre/de.json +146 -0
- package/dist/math/mathjax/sre/en.json +158 -0
- package/dist/math/mathjax/sre/es.json +140 -0
- package/dist/math/mathjax/sre/euro.json +32 -0
- package/dist/math/mathjax/sre/fr.json +146 -0
- package/dist/math/mathjax/sre/hi.json +146 -0
- package/dist/math/mathjax/sre/it.json +146 -0
- package/dist/math/mathjax/sre/ko.json +146 -0
- package/dist/math/mathjax/sre/nb.json +146 -0
- package/dist/math/mathjax/sre/nemeth.json +125 -0
- package/dist/math/mathjax/sre/nn.json +146 -0
- package/dist/math/mathjax/sre/sv.json +146 -0
- package/dist/math/mathjax/svg/PUA.json +1 -0
- package/dist/math/mathjax/svg/accents-b-i.json +1 -0
- package/dist/math/mathjax/svg/accents.json +1 -0
- package/dist/math/mathjax/svg/arabic.json +1 -0
- package/dist/math/mathjax/svg/arrows.json +1 -0
- package/dist/math/mathjax/svg/braille-d.json +1 -0
- package/dist/math/mathjax/svg/braille.json +1 -0
- package/dist/math/mathjax/svg/calligraphic.json +1 -0
- package/dist/math/mathjax/svg/cherokee.json +1 -0
- package/dist/math/mathjax/svg/cyrillic-ss.json +1 -0
- package/dist/math/mathjax/svg/cyrillic.json +1 -0
- package/dist/math/mathjax/svg/devanagari.json +1 -0
- package/dist/math/mathjax/svg/double-struck.json +1 -0
- package/dist/math/mathjax/svg/fraktur.json +1 -0
- package/dist/math/mathjax/svg/greek-ss.json +1 -0
- package/dist/math/mathjax/svg/greek.json +1 -0
- package/dist/math/mathjax/svg/hebrew.json +1 -0
- package/dist/math/mathjax/svg/latin-b.json +1 -0
- package/dist/math/mathjax/svg/latin-bi.json +1 -0
- package/dist/math/mathjax/svg/latin-i.json +1 -0
- package/dist/math/mathjax/svg/latin.json +1 -0
- package/dist/math/mathjax/svg/marrows.json +1 -0
- package/dist/math/mathjax/svg/math.json +1 -0
- package/dist/math/mathjax/svg/monospace-ex.json +1 -0
- package/dist/math/mathjax/svg/monospace-l.json +1 -0
- package/dist/math/mathjax/svg/monospace.json +1 -0
- package/dist/math/mathjax/svg/mshapes.json +1 -0
- package/dist/math/mathjax/svg/phonetics-ss.json +1 -0
- package/dist/math/mathjax/svg/phonetics.json +1 -0
- package/dist/math/mathjax/svg/sans-serif-b.json +1 -0
- package/dist/math/mathjax/svg/sans-serif-bi.json +1 -0
- package/dist/math/mathjax/svg/sans-serif-ex.json +1 -0
- package/dist/math/mathjax/svg/sans-serif-i.json +1 -0
- package/dist/math/mathjax/svg/sans-serif-r.json +1 -0
- package/dist/math/mathjax/svg/sans-serif.json +1 -0
- package/dist/math/mathjax/svg/script.json +1 -0
- package/dist/math/mathjax/svg/shapes.json +1 -0
- package/dist/math/mathjax/svg/symbols-b-i.json +1 -0
- package/dist/math/mathjax/svg/symbols.json +1 -0
- package/dist/math/mathjax/svg/variants.json +1 -0
- package/dist/math/mathjax.d.ts +67 -0
- package/dist/math/mathjax.js +162 -0
- package/dist/math/mathjax.js.map +1 -0
- package/dist/math/speech.d.ts +27 -0
- package/dist/math/speech.js +87 -0
- package/dist/math/speech.js.map +1 -0
- package/dist/math/typeset.d.ts +75 -0
- package/dist/math/typeset.js +108 -0
- package/dist/math/typeset.js.map +1 -0
- package/dist/measure/css.d.ts +44 -0
- package/dist/measure/css.js +158 -0
- package/dist/measure/css.js.map +1 -0
- package/dist/measure/index.d.ts +3 -0
- package/dist/measure/index.js +4 -0
- package/dist/measure/index.js.map +1 -0
- package/dist/measure/measurer.d.ts +159 -0
- package/dist/measure/measurer.js +300 -0
- package/dist/measure/measurer.js.map +1 -0
- package/dist/measure/model.d.ts +46 -0
- package/dist/measure/model.js +47 -0
- package/dist/measure/model.js.map +1 -0
- package/dist/output/assets.d.ts +10 -0
- package/dist/output/assets.js +65 -0
- package/dist/output/assets.js.map +1 -0
- package/dist/output/index.d.ts +4 -0
- package/dist/output/index.js +5 -0
- package/dist/output/index.js.map +1 -0
- package/dist/output/output.d.ts +103 -0
- package/dist/output/output.js +86 -0
- package/dist/output/output.js.map +1 -0
- package/dist/output/stylesheets.d.ts +45 -0
- package/dist/output/stylesheets.js +50 -0
- package/dist/output/stylesheets.js.map +1 -0
- package/dist/paint/backgrounds.d.ts +56 -0
- package/dist/paint/backgrounds.js +261 -0
- package/dist/paint/backgrounds.js.map +1 -0
- package/dist/paint/blend.d.ts +61 -0
- package/dist/paint/blend.js +157 -0
- package/dist/paint/blend.js.map +1 -0
- package/dist/paint/border-image.d.ts +13 -0
- package/dist/paint/border-image.js +149 -0
- package/dist/paint/border-image.js.map +1 -0
- package/dist/paint/borders.d.ts +47 -0
- package/dist/paint/borders.js +329 -0
- package/dist/paint/borders.js.map +1 -0
- package/dist/paint/canvas.d.ts +52 -0
- package/dist/paint/canvas.js +274 -0
- package/dist/paint/canvas.js.map +1 -0
- package/dist/paint/colours.d.ts +55 -0
- package/dist/paint/colours.js +380 -0
- package/dist/paint/colours.js.map +1 -0
- package/dist/paint/columns.d.ts +11 -0
- package/dist/paint/columns.js +42 -0
- package/dist/paint/columns.js.map +1 -0
- package/dist/paint/context.d.ts +47 -0
- package/dist/paint/context.js +2 -0
- package/dist/paint/context.js.map +1 -0
- package/dist/paint/decoration.d.ts +97 -0
- package/dist/paint/decoration.js +280 -0
- package/dist/paint/decoration.js.map +1 -0
- package/dist/paint/effects.d.ts +64 -0
- package/dist/paint/effects.js +342 -0
- package/dist/paint/effects.js.map +1 -0
- package/dist/paint/emphasis.d.ts +13 -0
- package/dist/paint/emphasis.js +95 -0
- package/dist/paint/emphasis.js.map +1 -0
- package/dist/paint/flatten.d.ts +33 -0
- package/dist/paint/flatten.js +968 -0
- package/dist/paint/flatten.js.map +1 -0
- package/dist/paint/geometry.d.ts +62 -0
- package/dist/paint/geometry.js +170 -0
- package/dist/paint/geometry.js.map +1 -0
- package/dist/paint/gradients.d.ts +31 -0
- package/dist/paint/gradients.js +394 -0
- package/dist/paint/gradients.js.map +1 -0
- package/dist/paint/images.d.ts +17 -0
- package/dist/paint/images.js +80 -0
- package/dist/paint/images.js.map +1 -0
- package/dist/paint/lint.d.ts +46 -0
- package/dist/paint/lint.js +105 -0
- package/dist/paint/lint.js.map +1 -0
- package/dist/paint/overprint.d.ts +13 -0
- package/dist/paint/overprint.js +12 -0
- package/dist/paint/overprint.js.map +1 -0
- package/dist/paint/painter.d.ts +92 -0
- package/dist/paint/painter.js +281 -0
- package/dist/paint/painter.js.map +1 -0
- package/dist/paint/path.d.ts +9 -0
- package/dist/paint/path.js +173 -0
- package/dist/paint/path.js.map +1 -0
- package/dist/paint/raster.d.ts +32 -0
- package/dist/paint/raster.js +180 -0
- package/dist/paint/raster.js.map +1 -0
- package/dist/paint/shadows.d.ts +28 -0
- package/dist/paint/shadows.js +104 -0
- package/dist/paint/shadows.js.map +1 -0
- package/dist/paint/sources.d.ts +13 -0
- package/dist/paint/sources.js +17 -0
- package/dist/paint/sources.js.map +1 -0
- package/dist/paint/stacking.d.ts +75 -0
- package/dist/paint/stacking.js +327 -0
- package/dist/paint/stacking.js.map +1 -0
- package/dist/paint/svg-lint.d.ts +57 -0
- package/dist/paint/svg-lint.js +119 -0
- package/dist/paint/svg-lint.js.map +1 -0
- package/dist/paint/svg.d.ts +95 -0
- package/dist/paint/svg.js +728 -0
- package/dist/paint/svg.js.map +1 -0
- package/dist/paint/tables.d.ts +18 -0
- package/dist/paint/tables.js +178 -0
- package/dist/paint/tables.js.map +1 -0
- package/dist/paint/text-shadow.d.ts +26 -0
- package/dist/paint/text-shadow.js +187 -0
- package/dist/paint/text-shadow.js.map +1 -0
- package/dist/paint/text.d.ts +144 -0
- package/dist/paint/text.js +713 -0
- package/dist/paint/text.js.map +1 -0
- package/dist/paint/values.d.ts +24 -0
- package/dist/paint/values.js +160 -0
- package/dist/paint/values.js.map +1 -0
- package/dist/paint/vertical.d.ts +19 -0
- package/dist/paint/vertical.js +236 -0
- package/dist/paint/vertical.js.map +1 -0
- package/dist/pdf/index.d.ts +6 -0
- package/dist/pdf/index.js +7 -0
- package/dist/pdf/index.js.map +1 -0
- package/dist/pdf/pdfx.d.ts +30 -0
- package/dist/pdf/pdfx.js +18 -0
- package/dist/pdf/pdfx.js.map +1 -0
- package/dist/pdf/structure/index.d.ts +53 -0
- package/dist/pdf/structure/index.js +52 -0
- package/dist/pdf/structure/index.js.map +1 -0
- package/dist/pdf/structure/labels.d.ts +16 -0
- package/dist/pdf/structure/labels.js +45 -0
- package/dist/pdf/structure/labels.js.map +1 -0
- package/dist/pdf/structure/links.d.ts +49 -0
- package/dist/pdf/structure/links.js +136 -0
- package/dist/pdf/structure/links.js.map +1 -0
- package/dist/pdf/structure/tags.d.ts +79 -0
- package/dist/pdf/structure/tags.js +314 -0
- package/dist/pdf/structure/tags.js.map +1 -0
- package/dist/pdf/types.d.ts +551 -0
- package/dist/pdf/types.js +16 -0
- package/dist/pdf/types.js.map +1 -0
- package/dist/pdf/wasm/pulpweaver4_pdf.d.ts +41 -0
- package/dist/pdf/wasm/pulpweaver4_pdf.js +286 -0
- package/dist/pdf/wasm/pulpweaver4_pdf_bg.wasm +0 -0
- package/dist/pdf/writer.d.ts +41 -0
- package/dist/pdf/writer.js +78 -0
- package/dist/pdf/writer.js.map +1 -0
- package/dist/plugin/attributes.d.ts +10 -0
- package/dist/plugin/attributes.js +63 -0
- package/dist/plugin/attributes.js.map +1 -0
- package/dist/plugin/define.d.ts +425 -0
- package/dist/plugin/define.js +311 -0
- package/dist/plugin/define.js.map +1 -0
- package/dist/plugin/failure.d.ts +80 -0
- package/dist/plugin/failure.js +97 -0
- package/dist/plugin/failure.js.map +1 -0
- package/dist/plugin/index.d.ts +11 -0
- package/dist/plugin/index.js +12 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/load.d.ts +105 -0
- package/dist/plugin/load.js +197 -0
- package/dist/plugin/load.js.map +1 -0
- package/dist/plugin/register.d.ts +166 -0
- package/dist/plugin/register.js +306 -0
- package/dist/plugin/register.js.map +1 -0
- package/dist/plugin/render.d.ts +4 -0
- package/dist/plugin/render.js +28 -0
- package/dist/plugin/render.js.map +1 -0
- package/dist/preflight/index.d.ts +3 -0
- package/dist/preflight/index.js +4 -0
- package/dist/preflight/index.js.map +1 -0
- package/dist/preflight/pdfx.d.ts +440 -0
- package/dist/preflight/pdfx.js +1781 -0
- package/dist/preflight/pdfx.js.map +1 -0
- package/dist/preflight/reader.d.ts +126 -0
- package/dist/preflight/reader.js +832 -0
- package/dist/preflight/reader.js.map +1 -0
- package/dist/preflight/xmp.d.ts +30 -0
- package/dist/preflight/xmp.js +145 -0
- package/dist/preflight/xmp.js.map +1 -0
- package/dist/print/index.d.ts +2 -0
- package/dist/print/index.js +3 -0
- package/dist/print/index.js.map +1 -0
- package/dist/print/output.d.ts +5 -0
- package/dist/print/output.js +215 -0
- package/dist/print/output.js.map +1 -0
- package/dist/problem.d.ts +142 -0
- package/dist/problem.js +234 -0
- package/dist/problem.js.map +1 -0
- package/dist/profile/index.d.ts +10 -0
- package/dist/profile/index.js +11 -0
- package/dist/profile/index.js.map +1 -0
- package/dist/profile/lint.d.ts +69 -0
- package/dist/profile/lint.js +282 -0
- package/dist/profile/lint.js.map +1 -0
- package/dist/profile/metadata.d.ts +27 -0
- package/dist/profile/metadata.js +38 -0
- package/dist/profile/metadata.js.map +1 -0
- package/dist/profile/profile.d.ts +92 -0
- package/dist/profile/profile.js +282 -0
- package/dist/profile/profile.js.map +1 -0
- package/dist/project.d.ts +56 -0
- package/dist/project.js +137 -0
- package/dist/project.js.map +1 -0
- package/dist/reproducible/clock.d.ts +46 -0
- package/dist/reproducible/clock.js +173 -0
- package/dist/reproducible/clock.js.map +1 -0
- package/dist/reproducible/date.d.ts +42 -0
- package/dist/reproducible/date.js +82 -0
- package/dist/reproducible/date.js.map +1 -0
- package/dist/reproducible/index.d.ts +8 -0
- package/dist/reproducible/index.js +9 -0
- package/dist/reproducible/index.js.map +1 -0
- package/dist/spike/spike-page.chromium.json +330 -0
- package/dist/spike/spike.d.ts +75 -0
- package/dist/spike/spike.js +106 -0
- package/dist/spike/spike.js.map +1 -0
- package/dist/style/borders.d.ts +25 -0
- package/dist/style/borders.js +177 -0
- package/dist/style/borders.js.map +1 -0
- package/dist/style/colours.d.ts +34 -0
- package/dist/style/colours.js +138 -0
- package/dist/style/colours.js.map +1 -0
- package/dist/style/compile.d.ts +79 -0
- package/dist/style/compile.js +325 -0
- package/dist/style/compile.js.map +1 -0
- package/dist/style/defaults.d.ts +20 -0
- package/dist/style/defaults.js +45 -0
- package/dist/style/defaults.js.map +1 -0
- package/dist/style/gcpm.d.ts +22 -0
- package/dist/style/gcpm.js +86 -0
- package/dist/style/gcpm.js.map +1 -0
- package/dist/style/index.d.ts +4 -0
- package/dist/style/index.js +5 -0
- package/dist/style/index.js.map +1 -0
- package/dist/style/media.d.ts +22 -0
- package/dist/style/media.js +342 -0
- package/dist/style/media.js.map +1 -0
- package/dist/style/properties.d.ts +44 -0
- package/dist/style/properties.js +497 -0
- package/dist/style/properties.js.map +1 -0
- package/dist/style/scope.d.ts +6 -0
- package/dist/style/scope.js +134 -0
- package/dist/style/scope.js.map +1 -0
- package/dist/style/values.d.ts +45 -0
- package/dist/style/values.js +106 -0
- package/dist/style/values.js.map +1 -0
- package/dist/test/book.d.ts +180 -0
- package/dist/test/book.js +314 -0
- package/dist/test/book.js.map +1 -0
- package/dist/test/build.d.ts +58 -0
- package/dist/test/build.js +222 -0
- package/dist/test/build.js.map +1 -0
- package/dist/test/environment.d.ts +63 -0
- package/dist/test/environment.js +46 -0
- package/dist/test/environment.js.map +1 -0
- package/dist/test/index.d.ts +17 -0
- package/dist/test/index.js +18 -0
- package/dist/test/index.js.map +1 -0
- package/dist/test/indexes.d.ts +4 -0
- package/dist/test/indexes.js +48 -0
- package/dist/test/indexes.js.map +1 -0
- package/dist/test/layout.d.ts +8 -0
- package/dist/test/layout.js +121 -0
- package/dist/test/layout.js.map +1 -0
- package/dist/test/matchers.d.ts +80 -0
- package/dist/test/matchers.js +177 -0
- package/dist/test/matchers.js.map +1 -0
- package/dist/test/pipeline.d.ts +231 -0
- package/dist/test/pipeline.js +75 -0
- package/dist/test/pipeline.js.map +1 -0
- package/dist/test/plugins.d.ts +13 -0
- package/dist/test/plugins.js +22 -0
- package/dist/test/plugins.js.map +1 -0
- package/dist/test/render.d.ts +46 -0
- package/dist/test/render.js +149 -0
- package/dist/test/render.js.map +1 -0
- package/dist/test/runner.d.ts +61 -0
- package/dist/test/runner.js +256 -0
- package/dist/test/runner.js.map +1 -0
- package/dist/test/select.d.ts +54 -0
- package/dist/test/select.js +193 -0
- package/dist/test/select.js.map +1 -0
- package/dist/test/snapshot.d.ts +52 -0
- package/dist/test/snapshot.js +175 -0
- package/dist/test/snapshot.js.map +1 -0
- package/dist/test/text.d.ts +7 -0
- package/dist/test/text.js +46 -0
- package/dist/test/text.js.map +1 -0
- package/dist/test/vitest.d.ts +3 -0
- package/dist/test/vitest.js +39 -0
- package/dist/test/vitest.js.map +1 -0
- package/dist/text/index.d.ts +5 -0
- package/dist/text/index.js +6 -0
- package/dist/text/index.js.map +1 -0
- package/dist/text/output.d.ts +5 -0
- package/dist/text/output.js +39 -0
- package/dist/text/output.js.map +1 -0
- package/dist/text/render.d.ts +82 -0
- package/dist/text/render.js +583 -0
- package/dist/text/render.js.map +1 -0
- package/dist/text/width.d.ts +16 -0
- package/dist/text/width.js +90 -0
- package/dist/text/width.js.map +1 -0
- package/dist/text/wrap.d.ts +19 -0
- package/dist/text/wrap.js +151 -0
- package/dist/text/wrap.js.map +1 -0
- package/dist/transform/core.d.ts +19 -0
- package/dist/transform/core.js +22 -0
- package/dist/transform/core.js.map +1 -0
- package/dist/transform/index.d.ts +10 -0
- package/dist/transform/index.js +11 -0
- package/dist/transform/index.js.map +1 -0
- package/dist/transform/numbering.d.ts +47 -0
- package/dist/transform/numbering.js +142 -0
- package/dist/transform/numbering.js.map +1 -0
- package/dist/transform/references.d.ts +38 -0
- package/dist/transform/references.js +182 -0
- package/dist/transform/references.js.map +1 -0
- package/dist/transform/run.d.ts +32 -0
- package/dist/transform/run.js +210 -0
- package/dist/transform/run.js.map +1 -0
- package/dist/transform/store.d.ts +111 -0
- package/dist/transform/store.js +331 -0
- package/dist/transform/store.js.map +1 -0
- package/dist/transform/testing.d.ts +31 -0
- package/dist/transform/testing.js +76 -0
- package/dist/transform/testing.js.map +1 -0
- package/dist/transform/transform.d.ts +104 -0
- package/dist/transform/transform.js +89 -0
- package/dist/transform/transform.js.map +1 -0
- package/dist/vfs/fsa.d.ts +14 -0
- package/dist/vfs/fsa.js +123 -0
- package/dist/vfs/fsa.js.map +1 -0
- package/dist/vfs/index.d.ts +7 -0
- package/dist/vfs/index.js +8 -0
- package/dist/vfs/index.js.map +1 -0
- package/dist/vfs/memory.d.ts +15 -0
- package/dist/vfs/memory.js +101 -0
- package/dist/vfs/memory.js.map +1 -0
- package/dist/vfs/path.d.ts +30 -0
- package/dist/vfs/path.js +67 -0
- package/dist/vfs/path.js.map +1 -0
- package/dist/vfs/vfs.d.ts +66 -0
- package/dist/vfs/vfs.js +68 -0
- package/dist/vfs/vfs.js.map +1 -0
- package/dist/vfs/zip.d.ts +27 -0
- package/dist/vfs/zip.js +67 -0
- package/dist/vfs/zip.js.map +1 -0
- package/dist/web/css.d.ts +15 -0
- package/dist/web/css.js +80 -0
- package/dist/web/css.js.map +1 -0
- package/dist/web/hast.d.ts +44 -0
- package/dist/web/hast.js +175 -0
- package/dist/web/hast.js.map +1 -0
- package/dist/web/index.d.ts +11 -0
- package/dist/web/index.js +12 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web/justify-main.d.ts +1 -0
- package/dist/web/justify-main.js +38 -0
- package/dist/web/justify-main.js.map +1 -0
- package/dist/web/justify.d.ts +46 -0
- package/dist/web/justify.js +147 -0
- package/dist/web/justify.js.map +1 -0
- package/dist/web/output.d.ts +28 -0
- package/dist/web/output.js +251 -0
- package/dist/web/output.js.map +1 -0
- package/dist/web/runtime/LICENSE-harfbuzzjs.txt +19 -0
- package/dist/web/runtime/NOTICE-patterns.txt +429 -0
- package/dist/web/runtime/harfbuzz.wasm +0 -0
- package/dist/web/runtime/justify.js.txt +2 -0
- package/dist/web/site.d.ts +53 -0
- package/dist/web/site.js +219 -0
- package/dist/web/site.js.map +1 -0
- package/docs/README.md +16 -0
- package/docs/reference/css-properties/index.md +94 -0
- package/docs/reference/css-properties/pw-adj-demerits.md +22 -0
- package/docs/reference/css-properties/pw-border-bottom-width.md +24 -0
- package/docs/reference/css-properties/pw-border-left-width.md +24 -0
- package/docs/reference/css-properties/pw-border-right-width.md +24 -0
- package/docs/reference/css-properties/pw-border-top-width.md +24 -0
- package/docs/reference/css-properties/pw-box.md +28 -0
- package/docs/reference/css-properties/pw-broken-penalty.md +22 -0
- package/docs/reference/css-properties/pw-club-penalty.md +24 -0
- package/docs/reference/css-properties/pw-column-rule-width.md +23 -0
- package/docs/reference/css-properties/pw-content-after.md +31 -0
- package/docs/reference/css-properties/pw-content-before.md +31 -0
- package/docs/reference/css-properties/pw-double-hyphen-demerits.md +23 -0
- package/docs/reference/css-properties/pw-emergency-stretch.md +28 -0
- package/docs/reference/css-properties/pw-ex-hyphen-penalty.md +22 -0
- package/docs/reference/css-properties/pw-final-hyphen-demerits.md +22 -0
- package/docs/reference/css-properties/pw-float-skip.md +22 -0
- package/docs/reference/css-properties/pw-float.md +33 -0
- package/docs/reference/css-properties/pw-footnote-max-height.md +22 -0
- package/docs/reference/css-properties/pw-footnote-skip.md +23 -0
- package/docs/reference/css-properties/pw-hyphen-penalty.md +24 -0
- package/docs/reference/css-properties/pw-inter-line-penalty.md +24 -0
- package/docs/reference/css-properties/pw-leader-space.md +22 -0
- package/docs/reference/css-properties/pw-leader.md +29 -0
- package/docs/reference/css-properties/pw-left-hyphen-min.md +23 -0
- package/docs/reference/css-properties/pw-line-breaking.md +29 -0
- package/docs/reference/css-properties/pw-line-penalty.md +23 -0
- package/docs/reference/css-properties/pw-list-indent.md +18 -0
- package/docs/reference/css-properties/pw-looseness.md +30 -0
- package/docs/reference/css-properties/pw-max-depth.md +22 -0
- package/docs/reference/css-properties/pw-minipage-footnotes.md +23 -0
- package/docs/reference/css-properties/pw-orphans.md +24 -0
- package/docs/reference/css-properties/pw-outline-width.md +23 -0
- package/docs/reference/css-properties/pw-overprint.md +26 -0
- package/docs/reference/css-properties/pw-padding-bottom.md +22 -0
- package/docs/reference/css-properties/pw-padding-left.md +22 -0
- package/docs/reference/css-properties/pw-padding-right.md +22 -0
- package/docs/reference/css-properties/pw-padding-top.md +22 -0
- package/docs/reference/css-properties/pw-page-prefix.md +28 -0
- package/docs/reference/css-properties/pw-page.md +32 -0
- package/docs/reference/css-properties/pw-penalty-after.md +23 -0
- package/docs/reference/css-properties/pw-penalty-before.md +30 -0
- package/docs/reference/css-properties/pw-pretolerance.md +23 -0
- package/docs/reference/css-properties/pw-right-hyphen-min.md +22 -0
- package/docs/reference/css-properties/pw-running.md +23 -0
- package/docs/reference/css-properties/pw-site-background.md +21 -0
- package/docs/reference/css-properties/pw-site-link.md +17 -0
- package/docs/reference/css-properties/pw-site-measure.md +17 -0
- package/docs/reference/css-properties/pw-site-muted.md +21 -0
- package/docs/reference/css-properties/pw-site-rule.md +17 -0
- package/docs/reference/css-properties/pw-site-text.md +22 -0
- package/docs/reference/css-properties/pw-space-after.md +23 -0
- package/docs/reference/css-properties/pw-space-before.md +29 -0
- package/docs/reference/css-properties/pw-string-set.md +32 -0
- package/docs/reference/css-properties/pw-tolerance.md +33 -0
- package/docs/reference/css-properties/pw-top-skip.md +22 -0
- package/docs/reference/css-properties/pw-widow-penalty.md +32 -0
- package/docs/reference/css-properties/pw-widows.md +24 -0
- package/docs/reference/css-properties/pw-word-space.md +22 -0
- package/docs/reference/css-properties/pw-xspace.md +22 -0
- package/docs/reference/index.md +17 -0
- package/docs/reference/lint-rules/black-text.md +31 -0
- package/docs/reference/lint-rules/blank-page.md +35 -0
- package/docs/reference/lint-rules/chapter-verso.md +34 -0
- package/docs/reference/lint-rules/citation-in-heading.md +24 -0
- package/docs/reference/lint-rules/consecutive-hyphens.md +34 -0
- package/docs/reference/lint-rules/empty-link.md +32 -0
- package/docs/reference/lint-rules/figure-distance.md +34 -0
- package/docs/reference/lint-rules/fonts.md +24 -0
- package/docs/reference/lint-rules/generated-text.md +24 -0
- package/docs/reference/lint-rules/heading-levels.md +30 -0
- package/docs/reference/lint-rules/ibid-across-page.md +30 -0
- package/docs/reference/lint-rules/image-alt.md +30 -0
- package/docs/reference/lint-rules/image-resolution.md +34 -0
- package/docs/reference/lint-rules/index.md +120 -0
- package/docs/reference/lint-rules/ink-limit.md +30 -0
- package/docs/reference/lint-rules/missing-field.md +37 -0
- package/docs/reference/lint-rules/orphan.md +34 -0
- package/docs/reference/lint-rules/overfull-line.md +28 -0
- package/docs/reference/lint-rules/profile.md +24 -0
- package/docs/reference/lint-rules/raw-html.md +30 -0
- package/docs/reference/lint-rules/signature.md +34 -0
- package/docs/reference/lint-rules/straight-quotes.md +33 -0
- package/docs/reference/lint-rules/svg-use-css.md +24 -0
- package/docs/reference/lint-rules/underfull-line.md +35 -0
- package/docs/reference/lint-rules/unknown-citation.md +30 -0
- package/docs/reference/lint-rules/unknown-label.md +31 -0
- package/docs/reference/lint-rules/unpaintable.md +24 -0
- package/docs/reference/lint-rules/unplaced-index.md +31 -0
- package/docs/reference/lint-rules/unused-entry.md +38 -0
- package/docs/reference/lint-rules/widow.md +34 -0
- package/docs/reference/plugin-api/assert-no-errors.md +18 -0
- package/docs/reference/plugin-api/asset-processor.md +28 -0
- package/docs/reference/plugin-api/attribute-problem.md +26 -0
- package/docs/reference/plugin-api/attribute-type.md +18 -0
- package/docs/reference/plugin-api/capabilities.md +18 -0
- package/docs/reference/plugin-api/capability.md +22 -0
- package/docs/reference/plugin-api/check-attributes.md +18 -0
- package/docs/reference/plugin-api/claim-kind.md +20 -0
- package/docs/reference/plugin-api/combine-penalties.md +17 -0
- package/docs/reference/plugin-api/command-context.md +30 -0
- package/docs/reference/plugin-api/command-definition.md +34 -0
- package/docs/reference/plugin-api/core-claims.md +18 -0
- package/docs/reference/plugin-api/define-plugin.md +20 -0
- package/docs/reference/plugin-api/define-rule.md +19 -0
- package/docs/reference/plugin-api/describe-error.md +14 -0
- package/docs/reference/plugin-api/describe-node.md +14 -0
- package/docs/reference/plugin-api/empty-registry.md +18 -0
- package/docs/reference/plugin-api/failed-on.md +32 -0
- package/docs/reference/plugin-api/fails-as.md +18 -0
- package/docs/reference/plugin-api/import-plugins.md +20 -0
- package/docs/reference/plugin-api/import-text.md +14 -0
- package/docs/reference/plugin-api/index.md +123 -0
- package/docs/reference/plugin-api/layout-definition.md +42 -0
- package/docs/reference/plugin-api/layout-slot.md +28 -0
- package/docs/reference/plugin-api/line-breaker.md +18 -0
- package/docs/reference/plugin-api/lint-context.md +48 -0
- package/docs/reference/plugin-api/lint-definition.md +32 -0
- package/docs/reference/plugin-api/lint-edition.md +38 -0
- package/docs/reference/plugin-api/lint-fix.md +36 -0
- package/docs/reference/plugin-api/lint-level.md +20 -0
- package/docs/reference/plugin-api/lint-preset.md +30 -0
- package/docs/reference/plugin-api/lint-rule.md +42 -0
- package/docs/reference/plugin-api/load-failure.md +32 -0
- package/docs/reference/plugin-api/load-plugins-options.md +32 -0
- package/docs/reference/plugin-api/load-plugins.md +20 -0
- package/docs/reference/plugin-api/loaded-plugin.md +32 -0
- package/docs/reference/plugin-api/node-claim.md +34 -0
- package/docs/reference/plugin-api/output-definition.md +28 -0
- package/docs/reference/plugin-api/owned.md +28 -0
- package/docs/reference/plugin-api/page-builder-hook.md +18 -0
- package/docs/reference/plugin-api/penalty-rule.md +34 -0
- package/docs/reference/plugin-api/plugin-api.md +18 -0
- package/docs/reference/plugin-api/plugin-definition.md +66 -0
- package/docs/reference/plugin-api/plugin-error.md +22 -0
- package/docs/reference/plugin-api/plugin-failure.md +30 -0
- package/docs/reference/plugin-api/plugin-importer.md +34 -0
- package/docs/reference/plugin-api/plugin-problem.md +30 -0
- package/docs/reference/plugin-api/plugin-registry.md +83 -0
- package/docs/reference/plugin-api/plugin-scope.md +15 -0
- package/docs/reference/plugin-api/plugin-stage.md +18 -0
- package/docs/reference/plugin-api/plugin-threw-problem.md +34 -0
- package/docs/reference/plugin-api/plugin-threw.md +21 -0
- package/docs/reference/plugin-api/plugin.md +69 -0
- package/docs/reference/plugin-api/project-with-plugins.md +36 -0
- package/docs/reference/plugin-api/read-context.md +30 -0
- package/docs/reference/plugin-api/read-failure.md +18 -0
- package/docs/reference/plugin-api/read-plugin-styles.md +22 -0
- package/docs/reference/plugin-api/reader.md +22 -0
- package/docs/reference/plugin-api/register-options.md +28 -0
- package/docs/reference/plugin-api/register-plugins.md +20 -0
- package/docs/reference/plugin-api/render-format.md +18 -0
- package/docs/reference/plugin-api/render-formats.md +18 -0
- package/docs/reference/plugin-api/renderer-registry.md +18 -0
- package/docs/reference/plugin-api/renderer-set.md +34 -0
- package/docs/reference/plugin-api/renderers.md +34 -0
- package/docs/reference/plugin-api/specifier-kind.md +14 -0
- package/docs/reference/plugin-api/style-source.md +18 -0
- package/docs/reference/plugin-api/text-context.md +28 -0
- package/docs/reference/plugin-api/text-edit.md +28 -0
- package/docs/reference/plugin-api/text-renderer.md +24 -0
- package/docs/reference/plugin-api/try-plugin-async.md +18 -0
- package/docs/reference/plugin-api/try-plugin.md +20 -0
- package/docs/reference/pulpweaver4-toml/editions.md +208 -0
- package/docs/reference/pulpweaver4-toml/index.md +195 -0
- package/docs/reference/pulpweaver4-toml/inks.md +50 -0
- package/docs/reference/pulpweaver4-toml/lint.md +36 -0
- package/docs/reference/test-matchers/index.md +33 -0
- package/docs/reference/test-matchers/to-be-recto.md +20 -0
- package/docs/reference/test-matchers/to-cite.md +22 -0
- package/docs/reference/test-matchers/to-fit-on-one-page.md +20 -0
- package/docs/reference/test-matchers/to-have-no-overfull-lines.md +20 -0
- package/docs/reference/test-matchers/to-match-html-snapshot.md +20 -0
- package/docs/reference/test-matchers/to-match-page-snapshot.md +20 -0
- package/docs/reference/test-matchers/to-match-text-snapshot.md +21 -0
- package/docs/reference/test-matchers/to-start-page.md +20 -0
- package/package.json +75 -4
- package/README.md +0 -3
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { MemoryFS } from './memory.js';
|
|
2
|
+
import type { VFS } from './vfs.js';
|
|
3
|
+
/**
|
|
4
|
+
* A zip's contents as a file system, in memory: read whole when it is made,
|
|
5
|
+
* since an uploaded zip is a project's size, not a corpus's. It can be
|
|
6
|
+
* written to like any MemoryFS, and zipped again with `toZip`.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ZipFS extends MemoryFS {
|
|
9
|
+
constructor(zip?: Uint8Array);
|
|
10
|
+
/** This file system, or its directory `dir`, as a zip. */
|
|
11
|
+
toZip(dir?: string): Promise<Uint8Array>;
|
|
12
|
+
}
|
|
13
|
+
/** How to write a zip. */
|
|
14
|
+
export interface WriteZipOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Every entry's date, in milliseconds since 1970 UTC (the build's date,
|
|
17
|
+
* `epochMilliseconds(buildDate(…))`), so that the same files give the
|
|
18
|
+
* same zip: a build's outputs. Each file's own mtime otherwise.
|
|
19
|
+
*/
|
|
20
|
+
mtime?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Any file system's directory `dir` (the root by default) as a zip, its
|
|
24
|
+
* paths relative to `dir`, empty directories kept: a build's `dist/` to
|
|
25
|
+
* download, from OPFS or memory alike.
|
|
26
|
+
*/
|
|
27
|
+
export declare function writeZip(fs: VFS, dir?: string, options?: WriteZipOptions): Promise<Uint8Array>;
|
package/dist/vfs/zip.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zips: how a project reaches the browser app where the File System Access
|
|
3
|
+
* API is missing, and how a build's outputs leave it as one download. fflate
|
|
4
|
+
* (MIT) reads and writes them, in the page.
|
|
5
|
+
*/
|
|
6
|
+
import { unzipSync, zipSync } from 'fflate';
|
|
7
|
+
import { normalize, VFSError } from './path.js';
|
|
8
|
+
import { MemoryFS } from './memory.js';
|
|
9
|
+
/**
|
|
10
|
+
* A zip's contents as a file system, in memory: read whole when it is made,
|
|
11
|
+
* since an uploaded zip is a project's size, not a corpus's. It can be
|
|
12
|
+
* written to like any MemoryFS, and zipped again with `toZip`.
|
|
13
|
+
*/
|
|
14
|
+
export class ZipFS extends MemoryFS {
|
|
15
|
+
constructor(zip) {
|
|
16
|
+
super();
|
|
17
|
+
if (zip === undefined)
|
|
18
|
+
return;
|
|
19
|
+
const loaded = Date.now();
|
|
20
|
+
for (const [name, data] of Object.entries(unzipSync(zip))) {
|
|
21
|
+
// Some Windows zippers write backslashes; a zip's names are POSIX paths.
|
|
22
|
+
// normalize refuses an entry that climbs out of the root (a zip slip).
|
|
23
|
+
const path = normalize(name.replaceAll('\\', '/'));
|
|
24
|
+
if (path === '')
|
|
25
|
+
continue;
|
|
26
|
+
this.put(path, name.endsWith('/') || name.endsWith('\\') ? null : data, loaded);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** This file system, or its directory `dir`, as a zip. */
|
|
30
|
+
toZip(dir = '') {
|
|
31
|
+
return writeZip(this, dir);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Any file system's directory `dir` (the root by default) as a zip, its
|
|
36
|
+
* paths relative to `dir`, empty directories kept: a build's `dist/` to
|
|
37
|
+
* download, from OPFS or memory alike.
|
|
38
|
+
*/
|
|
39
|
+
export async function writeZip(fs, dir = '', options = {}) {
|
|
40
|
+
// A zip's dates start in 1980; an earlier one is the earliest it can hold.
|
|
41
|
+
const fixed = options.mtime === undefined ? undefined : Math.max(options.mtime, Date.UTC(1980, 0, 1, 12));
|
|
42
|
+
const tree = async (path) => {
|
|
43
|
+
const out = {};
|
|
44
|
+
for (const entry of await fs.readDir(path)) {
|
|
45
|
+
const child = path === '' ? entry.name : `${path}/${entry.name}`;
|
|
46
|
+
if (entry.kind === 'directory') {
|
|
47
|
+
out[entry.name] = await tree(child);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
const data = await fs.readFile(child);
|
|
51
|
+
if (fixed !== undefined) {
|
|
52
|
+
out[entry.name] = data;
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
const { mtime } = await fs.stat(child);
|
|
56
|
+
// An older or unknown mtime is left to fflate.
|
|
57
|
+
out[entry.name] = mtime !== undefined && mtime >= Date.UTC(1980, 0, 2) ? [data, { mtime }] : data;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return out;
|
|
61
|
+
};
|
|
62
|
+
const root = normalize(dir);
|
|
63
|
+
if ((await fs.stat(root)).kind !== 'directory')
|
|
64
|
+
throw new VFSError('ENOTDIR', dir);
|
|
65
|
+
return zipSync(await tree(root), fixed === undefined ? {} : { mtime: fixed });
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=zip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../src/vfs/zip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAiB,MAAM,QAAQ,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGtC;;;;GAIG;AACH,MAAM,OAAO,KAAM,SAAQ,QAAQ;IACjC,YAAY,GAAgB;QAC1B,KAAK,EAAE,CAAA;QACP,IAAI,GAAG,KAAK,SAAS;YAAE,OAAM;QAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;QACzB,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YAC1D,yEAAyE;YACzE,uEAAuE;YACvE,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;YAClD,IAAI,IAAI,KAAK,EAAE;gBAAE,SAAQ;YACzB,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;QACjF,CAAC;IACH,CAAC;IAED,0DAA0D;IAC1D,KAAK,CAAC,GAAG,GAAG,EAA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C,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,KAAK,SAAS,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;YACnG,CAAC;QACH,CAAC;QACD,OAAO,GAAG,CAAA;IACZ,CAAC,CAAA;IACD,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,CAAA;IAC3B,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW;QAAE,MAAM,IAAI,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,CAAA;IAClF,OAAO,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAA;AAC/E,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The web edition's own stylesheet, among the core's defaults (`@layer
|
|
3
|
+
* pw.defaults`), so the theme and the author can change any of it: a
|
|
4
|
+
* readable measure at any width, light and dark colours by
|
|
5
|
+
* `prefers-color-scheme`, footnote calls as buttons and notes as pop-overs,
|
|
6
|
+
* and the site's frame. A screen edition's media queries are the browser's
|
|
7
|
+
* to decide (`style/media.ts` resolves only custom media), so these stay
|
|
8
|
+
* live.
|
|
9
|
+
*
|
|
10
|
+
* Knuth–Plass justification on screen is optional: the web edition breaks
|
|
11
|
+
* lines with the browser (`--pw-line-breaking: browser`) unless a rule asks
|
|
12
|
+
* for `knuth-plass` on justified text, and then the site's script lays
|
|
13
|
+
* those paragraphs out with the engine (`justify.ts`).
|
|
14
|
+
*/
|
|
15
|
+
export declare const SITE_CSS = "\n:root {\n --pw-line-breaking: browser;\n color-scheme: light dark;\n --pw-site-text: #1f1d1a;\n --pw-site-background: #fdfcf9;\n --pw-site-muted: #67625a;\n --pw-site-rule: #d6d0c4;\n --pw-site-link: #2a5a8a;\n --pw-site-measure: 36em;\n}\n@media (prefers-color-scheme: dark) {\n :root {\n --pw-site-text: #e7e3db;\n --pw-site-background: #1a1917;\n --pw-site-muted: #a69f93;\n --pw-site-rule: #3e3a34;\n --pw-site-link: #92bbe6;\n }\n}\nhtml { text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }\nbody {\n margin: 0; color: var(--pw-site-text); background: var(--pw-site-background);\n font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1875rem); line-height: 1.5;\n}\n.pw-site { box-sizing: border-box; max-inline-size: calc(var(--pw-site-measure) + 2rem); margin-inline: auto; padding: 1.25rem 1rem 3rem; }\n.pw-site-header { margin-block-end: 2.5rem; font-size: 0.875em; }\n.pw-site-title { color: var(--pw-site-muted); text-decoration: none; }\n.pw-site :any-link { color: var(--pw-site-link); }\n.pw-site .pw-ref, .pw-site .pw-page-ref { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }\n.pw-site img, .pw-site svg, .pw-site video { max-inline-size: 100%; block-size: auto; }\n.pw-site pre { overflow-x: auto; }\n.pw-site table { border-collapse: collapse; }\n.pw-site-book-title { margin-block: 0 2rem; }\n.pw-site-contents ol { list-style: none; margin: 0; padding: 0; }\n.pw-site-contents li { margin-block: 0.4em; }\n.pw-site-pager {\n display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;\n margin-block-start: 3rem; padding-block-start: 1rem; border-block-start: 1px solid var(--pw-site-rule);\n}\n.pw-site-pager a { display: flex; flex-direction: column; max-inline-size: 48%; text-decoration: none; }\n.pw-site-pager a[rel~=\"next\"] { margin-inline-start: auto; text-align: end; }\n.pw-site-pager-label { font-size: 0.8em; color: var(--pw-site-muted); }\n/* Raised by position, not vertical-align, so its box has height to click without making its line taller. */\n.pw-footnote-call {\n position: relative; inset-block-start: -0.5em; margin: 0; padding: 0; border: 0; background: none; color: var(--pw-site-link);\n font: inherit; font-size: smaller; line-height: 1; vertical-align: baseline; cursor: pointer;\n}\n.pw-footnote-call:focus-visible { outline: 2px solid var(--pw-site-link); outline-offset: 1px; border-radius: 2px; }\n.pw-note > p { margin: 0 0 0.5em; }\n.pw-note > :last-child { margin-block-end: 0; }\n@supports selector(:popover-open) {\n .pw-note[popover]:not(:popover-open) { display: none; }\n .pw-note[popover] {\n position: fixed; inset: auto 0 0; box-sizing: border-box; inline-size: min(100%, 40rem); max-block-size: min(60vh, 28rem);\n margin: 0 auto; padding: 1rem 1.25rem 1.25rem; overflow: auto;\n border: 1px solid var(--pw-site-rule); border-block-end: 0; border-radius: 0.75rem 0.75rem 0 0;\n background: var(--pw-site-background); color: var(--pw-site-text); box-shadow: 0 -0.25rem 1.5rem rgb(0 0 0 / 0.2);\n font-size: 0.9375em; line-height: 1.45;\n }\n}\n@media print {\n .pw-site-header, .pw-site-pager { display: none; }\n}\n";
|
package/dist/web/css.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The web edition's own stylesheet, among the core's defaults (`@layer
|
|
3
|
+
* pw.defaults`), so the theme and the author can change any of it: a
|
|
4
|
+
* readable measure at any width, light and dark colours by
|
|
5
|
+
* `prefers-color-scheme`, footnote calls as buttons and notes as pop-overs,
|
|
6
|
+
* and the site's frame. A screen edition's media queries are the browser's
|
|
7
|
+
* to decide (`style/media.ts` resolves only custom media), so these stay
|
|
8
|
+
* live.
|
|
9
|
+
*
|
|
10
|
+
* Knuth–Plass justification on screen is optional: the web edition breaks
|
|
11
|
+
* lines with the browser (`--pw-line-breaking: browser`) unless a rule asks
|
|
12
|
+
* for `knuth-plass` on justified text, and then the site's script lays
|
|
13
|
+
* those paragraphs out with the engine (`justify.ts`).
|
|
14
|
+
*/
|
|
15
|
+
export const SITE_CSS = `
|
|
16
|
+
:root {
|
|
17
|
+
--pw-line-breaking: browser;
|
|
18
|
+
color-scheme: light dark;
|
|
19
|
+
--pw-site-text: #1f1d1a;
|
|
20
|
+
--pw-site-background: #fdfcf9;
|
|
21
|
+
--pw-site-muted: #67625a;
|
|
22
|
+
--pw-site-rule: #d6d0c4;
|
|
23
|
+
--pw-site-link: #2a5a8a;
|
|
24
|
+
--pw-site-measure: 36em;
|
|
25
|
+
}
|
|
26
|
+
@media (prefers-color-scheme: dark) {
|
|
27
|
+
:root {
|
|
28
|
+
--pw-site-text: #e7e3db;
|
|
29
|
+
--pw-site-background: #1a1917;
|
|
30
|
+
--pw-site-muted: #a69f93;
|
|
31
|
+
--pw-site-rule: #3e3a34;
|
|
32
|
+
--pw-site-link: #92bbe6;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
html { text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
|
|
36
|
+
body {
|
|
37
|
+
margin: 0; color: var(--pw-site-text); background: var(--pw-site-background);
|
|
38
|
+
font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1875rem); line-height: 1.5;
|
|
39
|
+
}
|
|
40
|
+
.pw-site { box-sizing: border-box; max-inline-size: calc(var(--pw-site-measure) + 2rem); margin-inline: auto; padding: 1.25rem 1rem 3rem; }
|
|
41
|
+
.pw-site-header { margin-block-end: 2.5rem; font-size: 0.875em; }
|
|
42
|
+
.pw-site-title { color: var(--pw-site-muted); text-decoration: none; }
|
|
43
|
+
.pw-site :any-link { color: var(--pw-site-link); }
|
|
44
|
+
.pw-site .pw-ref, .pw-site .pw-page-ref { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
|
|
45
|
+
.pw-site img, .pw-site svg, .pw-site video { max-inline-size: 100%; block-size: auto; }
|
|
46
|
+
.pw-site pre { overflow-x: auto; }
|
|
47
|
+
.pw-site table { border-collapse: collapse; }
|
|
48
|
+
.pw-site-book-title { margin-block: 0 2rem; }
|
|
49
|
+
.pw-site-contents ol { list-style: none; margin: 0; padding: 0; }
|
|
50
|
+
.pw-site-contents li { margin-block: 0.4em; }
|
|
51
|
+
.pw-site-pager {
|
|
52
|
+
display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
|
|
53
|
+
margin-block-start: 3rem; padding-block-start: 1rem; border-block-start: 1px solid var(--pw-site-rule);
|
|
54
|
+
}
|
|
55
|
+
.pw-site-pager a { display: flex; flex-direction: column; max-inline-size: 48%; text-decoration: none; }
|
|
56
|
+
.pw-site-pager a[rel~="next"] { margin-inline-start: auto; text-align: end; }
|
|
57
|
+
.pw-site-pager-label { font-size: 0.8em; color: var(--pw-site-muted); }
|
|
58
|
+
/* Raised by position, not vertical-align, so its box has height to click without making its line taller. */
|
|
59
|
+
.pw-footnote-call {
|
|
60
|
+
position: relative; inset-block-start: -0.5em; margin: 0; padding: 0; border: 0; background: none; color: var(--pw-site-link);
|
|
61
|
+
font: inherit; font-size: smaller; line-height: 1; vertical-align: baseline; cursor: pointer;
|
|
62
|
+
}
|
|
63
|
+
.pw-footnote-call:focus-visible { outline: 2px solid var(--pw-site-link); outline-offset: 1px; border-radius: 2px; }
|
|
64
|
+
.pw-note > p { margin: 0 0 0.5em; }
|
|
65
|
+
.pw-note > :last-child { margin-block-end: 0; }
|
|
66
|
+
@supports selector(:popover-open) {
|
|
67
|
+
.pw-note[popover]:not(:popover-open) { display: none; }
|
|
68
|
+
.pw-note[popover] {
|
|
69
|
+
position: fixed; inset: auto 0 0; box-sizing: border-box; inline-size: min(100%, 40rem); max-block-size: min(60vh, 28rem);
|
|
70
|
+
margin: 0 auto; padding: 1rem 1.25rem 1.25rem; overflow: auto;
|
|
71
|
+
border: 1px solid var(--pw-site-rule); border-block-end: 0; border-radius: 0.75rem 0.75rem 0 0;
|
|
72
|
+
background: var(--pw-site-background); color: var(--pw-site-text); box-shadow: 0 -0.25rem 1.5rem rgb(0 0 0 / 0.2);
|
|
73
|
+
font-size: 0.9375em; line-height: 1.45;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
@media print {
|
|
77
|
+
.pw-site-header, .pw-site-pager { display: none; }
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
//# sourceMappingURL=css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.js","sourceRoot":"","sources":["../../src/web/css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEvB,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The rendered HTML made into the web edition's
|
|
3
|
+
* (https://plans.inkylabs.com/pulpweaver#media-queries-and-editions):
|
|
4
|
+
* ordinary responsive HTML, in which footnotes become pop-overs and page
|
|
5
|
+
* references become links. The renderer's one document (`html/render.ts`) is
|
|
6
|
+
* shared with print, so the web edition changes its hast, in place, keeping
|
|
7
|
+
* every element the renderer made (and so its node and source position):
|
|
8
|
+
*
|
|
9
|
+
* - **A footnote call is a button that opens its note**, through the HTML
|
|
10
|
+
* `popover` attribute, which needs no script: `<button popovertarget>`. A
|
|
11
|
+
* browser without pop-overs shows the note as a block instead. The note
|
|
12
|
+
* moves from inside its line (where the page builder wants it) to just
|
|
13
|
+
* after the block that calls it, as a `div`, so a note of several
|
|
14
|
+
* paragraphs is valid HTML; a pop-over shows on top wherever it is, and
|
|
15
|
+
* tabbing from its call goes into it.
|
|
16
|
+
* - **A page reference is a link** whose text, with no page to name, is what
|
|
17
|
+
* a text reference to its label reads (“chapter 2”, a section's title).
|
|
18
|
+
* - **A table of contents is its links**, without the leaders and page
|
|
19
|
+
* numbers that print sets after each title.
|
|
20
|
+
*/
|
|
21
|
+
import type { Element, ElementContent, Root } from 'hast';
|
|
22
|
+
import { type ReferenceOptions } from '../transform/references.js';
|
|
23
|
+
import type { Manuscript } from '../transform/transform.js';
|
|
24
|
+
export interface WebHastOptions {
|
|
25
|
+
/** The book, for what page references read. */
|
|
26
|
+
manuscript: Manuscript;
|
|
27
|
+
/** A footnote call's accessible name, `{number}` standing for its number. Default `Note {number}`. */
|
|
28
|
+
noteLabel?: string;
|
|
29
|
+
/** What text references read, as the `link` transform was given it. */
|
|
30
|
+
references?: ReferenceOptions;
|
|
31
|
+
}
|
|
32
|
+
/** What a page reference reads when its label's node has no number or title: the section sign, “the passage at”. */
|
|
33
|
+
export declare const PAGE_REFERENCE_FALLBACK = "\u00A7";
|
|
34
|
+
/** Makes the rendered hast the web edition's: notes as pop-overs, page references as links. */
|
|
35
|
+
export declare function webHast(tree: Root, options: WebHastOptions): void;
|
|
36
|
+
/**
|
|
37
|
+
* Visits every element under `tree` in document order, with its ancestors
|
|
38
|
+
* (the root's element children have none); `false` skips its children.
|
|
39
|
+
*/
|
|
40
|
+
export declare function walk(tree: Root | Element, visit: (el: Element, path: readonly Element[]) => boolean | void): void;
|
|
41
|
+
/** Whether a hast element has a class. */
|
|
42
|
+
export declare function hasClass(el: Element, name: string): boolean;
|
|
43
|
+
/** The text in a hast element. */
|
|
44
|
+
export declare function textOf(node: ElementContent | Root): string;
|
package/dist/web/hast.js
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { LOCATOR_CLASS, LOCATOR_SEPARATOR, LOCATORS_CLASS } from '../indexes/layout.js';
|
|
2
|
+
import { referenceTextFor } from '../transform/references.js';
|
|
3
|
+
/** What a page reference reads when its label's node has no number or title: the section sign, “the passage at”. */
|
|
4
|
+
export const PAGE_REFERENCE_FALLBACK = '§';
|
|
5
|
+
/** Makes the rendered hast the web edition's: notes as pop-overs, page references as links. */
|
|
6
|
+
export function webHast(tree, options) {
|
|
7
|
+
notesAsPopovers(tree, options.noteLabel ?? 'Note {number}');
|
|
8
|
+
pageReferencesAsLinks(tree, options);
|
|
9
|
+
indexLocatorsAsLinks(tree, options);
|
|
10
|
+
contentsAsLinks(tree);
|
|
11
|
+
}
|
|
12
|
+
/** Each table of contents' entry loses its leader and its empty page number. */
|
|
13
|
+
function contentsAsLinks(tree) {
|
|
14
|
+
walk(tree, (el) => {
|
|
15
|
+
if (!hasClass(el, 'pw-contents-link'))
|
|
16
|
+
return true;
|
|
17
|
+
el.children = el.children.filter((c) => !(c.type === 'element' && (hasClass(c, 'pw-leader') || hasClass(c, 'pw-contents-page'))));
|
|
18
|
+
return false;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/** Elements whose content may be flow content, so a note's `div` may go in them. */
|
|
22
|
+
const FLOW_CONTAINERS = new Set([
|
|
23
|
+
'article', 'aside', 'blockquote', 'body', 'caption', 'dd', 'details', 'div', 'figcaption', 'figure', 'footer', 'header', 'li', 'main',
|
|
24
|
+
'nav', 'section', 'td', 'th',
|
|
25
|
+
]);
|
|
26
|
+
/** Elements that are blocks of a note, rather than its first paragraph's text. */
|
|
27
|
+
const BLOCKS = new Set([
|
|
28
|
+
'address', 'blockquote', 'details', 'div', 'dl', 'figure', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'ol', 'p', 'pre', 'section', 'table',
|
|
29
|
+
'ul',
|
|
30
|
+
]);
|
|
31
|
+
/**
|
|
32
|
+
* Each footnote call becomes a button that opens its note, and each note a
|
|
33
|
+
* pop-over just after the block that holds its call.
|
|
34
|
+
*/
|
|
35
|
+
function notesAsPopovers(tree, label) {
|
|
36
|
+
const moves = [];
|
|
37
|
+
walk(tree, (el, path) => {
|
|
38
|
+
if (hasClass(el, 'pw-footnote-call')) {
|
|
39
|
+
const href = el.properties['href'];
|
|
40
|
+
const id = typeof href === 'string' && href.startsWith('#') ? href.slice(1) : undefined;
|
|
41
|
+
if (id === undefined)
|
|
42
|
+
return;
|
|
43
|
+
const number = textOf(el);
|
|
44
|
+
el.tagName = 'button';
|
|
45
|
+
delete el.properties['href'];
|
|
46
|
+
delete el.properties['role'];
|
|
47
|
+
el.properties['type'] = 'button';
|
|
48
|
+
el.properties['popoverTarget'] = id;
|
|
49
|
+
el.properties['ariaLabel'] = label.replaceAll('{number}', number);
|
|
50
|
+
}
|
|
51
|
+
else if (hasClass(el, 'pw-note')) {
|
|
52
|
+
moves.push({ note: el, path: [...path] });
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
56
|
+
});
|
|
57
|
+
// After the block that holds the call: the outermost ancestor whose parent may hold a `div`.
|
|
58
|
+
const after = new Map();
|
|
59
|
+
for (const { note, path } of moves) {
|
|
60
|
+
let i = path.length - 1;
|
|
61
|
+
while (i > 0 && !FLOW_CONTAINERS.has(path[i].tagName))
|
|
62
|
+
i--;
|
|
63
|
+
const container = path[i];
|
|
64
|
+
const parent = path.at(-1);
|
|
65
|
+
parent.children.splice(parent.children.indexOf(note), 1);
|
|
66
|
+
note.tagName = 'div';
|
|
67
|
+
note.properties['popover'] = 'auto';
|
|
68
|
+
note.children = paragraphed(note.children);
|
|
69
|
+
if (container === parent) {
|
|
70
|
+
// Its call is in a block that holds flow content: the note goes after the call's run of text.
|
|
71
|
+
container.children.push(note);
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
const host = path[i + 1];
|
|
75
|
+
const last = after.get(host) ?? host;
|
|
76
|
+
container.children.splice(container.children.indexOf(last) + 1, 0, note);
|
|
77
|
+
after.set(host, note);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/** A note's content with its text, the marker and its first paragraph's inlines, in a paragraph of its own. */
|
|
81
|
+
function paragraphed(children) {
|
|
82
|
+
const first = children.findIndex((c) => c.type === 'element' && BLOCKS.has(c.tagName));
|
|
83
|
+
const text = first === -1 ? children : children.slice(0, first);
|
|
84
|
+
const rest = first === -1 ? [] : children.slice(first);
|
|
85
|
+
return [{ type: 'element', tagName: 'p', properties: { className: ['pw-note-text'] }, children: text }, ...rest];
|
|
86
|
+
}
|
|
87
|
+
/** Each page reference's empty page number becomes what a text reference to its label reads. */
|
|
88
|
+
function pageReferencesAsLinks(tree, options) {
|
|
89
|
+
walk(tree, (el) => {
|
|
90
|
+
if (!hasClass(el, 'pw-page-ref'))
|
|
91
|
+
return true;
|
|
92
|
+
const target = el.properties['dataPwTarget'];
|
|
93
|
+
const number = el.children.find((c) => c.type === 'element' && hasClass(c, 'pw-page-number'));
|
|
94
|
+
if (!number)
|
|
95
|
+
return false;
|
|
96
|
+
if (textOf(el).trim() !== '') {
|
|
97
|
+
// The author wrote the link's text: the page number has no place.
|
|
98
|
+
el.children.splice(el.children.indexOf(number), 1);
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
const text = typeof target === 'string' ? referenceTextFor(options.manuscript, target, options.references) : undefined;
|
|
102
|
+
number.children = [{ type: 'text', value: text ?? PAGE_REFERENCE_FALLBACK }];
|
|
103
|
+
return false;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Each index entry's empty locators become links, with no pages to name:
|
|
108
|
+
* one for each section its terms are in, in order, to the first term there,
|
|
109
|
+
* reading as a text reference to the section does.
|
|
110
|
+
*/
|
|
111
|
+
function indexLocatorsAsLinks(tree, options) {
|
|
112
|
+
walk(tree, (el) => {
|
|
113
|
+
if (!hasClass(el, LOCATORS_CLASS))
|
|
114
|
+
return true;
|
|
115
|
+
let occurrences = [];
|
|
116
|
+
try {
|
|
117
|
+
occurrences = JSON.parse(String(el.properties['dataPwOccurrences'] ?? '[]'));
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
// Left empty.
|
|
121
|
+
}
|
|
122
|
+
delete el.properties['dataPwOccurrences'];
|
|
123
|
+
const seen = new Set();
|
|
124
|
+
const children = [];
|
|
125
|
+
for (const o of occurrences) {
|
|
126
|
+
const section = o.section ?? '';
|
|
127
|
+
if (seen.has(section))
|
|
128
|
+
continue;
|
|
129
|
+
seen.add(section);
|
|
130
|
+
const text = (o.section !== undefined ? referenceTextFor(options.manuscript, o.section, options.references) : undefined) ?? PAGE_REFERENCE_FALLBACK;
|
|
131
|
+
children.push({ type: 'text', value: LOCATOR_SEPARATOR }, { type: 'element', tagName: 'a', properties: { className: [LOCATOR_CLASS], href: `#${o.start}` }, children: [{ type: 'text', value: text }] });
|
|
132
|
+
}
|
|
133
|
+
el.children = children;
|
|
134
|
+
return false;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Visits every element under `tree` in document order, with its ancestors
|
|
139
|
+
* (the root's element children have none); `false` skips its children.
|
|
140
|
+
*/
|
|
141
|
+
export function walk(tree, visit) {
|
|
142
|
+
const path = [];
|
|
143
|
+
const go = (children) => {
|
|
144
|
+
for (const c of [...children]) {
|
|
145
|
+
if (c.type !== 'element')
|
|
146
|
+
continue;
|
|
147
|
+
const descend = visit(c, path) !== false;
|
|
148
|
+
if (descend) {
|
|
149
|
+
path.push(c);
|
|
150
|
+
go(c.children);
|
|
151
|
+
path.pop();
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
if (tree.type === 'element') {
|
|
156
|
+
if (visit(tree, path) === false)
|
|
157
|
+
return;
|
|
158
|
+
path.push(tree);
|
|
159
|
+
}
|
|
160
|
+
go(tree.children);
|
|
161
|
+
}
|
|
162
|
+
/** Whether a hast element has a class. */
|
|
163
|
+
export function hasClass(el, name) {
|
|
164
|
+
const c = el.properties['className'];
|
|
165
|
+
return Array.isArray(c) && c.includes(name);
|
|
166
|
+
}
|
|
167
|
+
/** The text in a hast element. */
|
|
168
|
+
export function textOf(node) {
|
|
169
|
+
if (node.type === 'text')
|
|
170
|
+
return node.value;
|
|
171
|
+
if (node.type === 'element' || node.type === 'root')
|
|
172
|
+
return node.children.map(textOf).join('');
|
|
173
|
+
return '';
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=hast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hast.js","sourceRoot":"","sources":["../../src/web/hast.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,s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,EAAE,CAAA;AACX,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The web edition as a static site
|
|
3
|
+
* (https://plans.inkylabs.com/pulpweaver#media-queries-and-editions): the
|
|
4
|
+
* core's `web` output, its HTML, pages and stylesheet, and the optional
|
|
5
|
+
* Knuth–Plass justification its script does on screen.
|
|
6
|
+
*/
|
|
7
|
+
export { createWebOutput, WEB_RUNTIME_URLS, webOutput, type WebOutputOptions } from './output.js';
|
|
8
|
+
export { PAGE_REFERENCE_FALLBACK, webHast, type WebHastOptions } from './hast.js';
|
|
9
|
+
export { DEFAULT_SITE_LABELS, pageHtml, sitePages, type SiteLabels, type SiteOptions, type SitePage } from './site.js';
|
|
10
|
+
export { SITE_CSS } from './css.js';
|
|
11
|
+
export { Justifier, justifiable, pageFontFaces, wantsJustification, type JustifierOptions, type PageFontFace } from './justify.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The web edition as a static site
|
|
3
|
+
* (https://plans.inkylabs.com/pulpweaver#media-queries-and-editions): the
|
|
4
|
+
* core's `web` output, its HTML, pages and stylesheet, and the optional
|
|
5
|
+
* Knuth–Plass justification its script does on screen.
|
|
6
|
+
*/
|
|
7
|
+
export { createWebOutput, WEB_RUNTIME_URLS, webOutput } from './output.js';
|
|
8
|
+
export { PAGE_REFERENCE_FALLBACK, webHast } from './hast.js';
|
|
9
|
+
export { DEFAULT_SITE_LABELS, pageHtml, sitePages } from './site.js';
|
|
10
|
+
export { SITE_CSS } from './css.js';
|
|
11
|
+
export { Justifier, justifiable, pageFontFaces, wantsJustification } from './justify.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/web/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,SAAS,EAAyB,MAAM,aAAa,CAAA;AACjG,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAuB,MAAM,WAAW,CAAA;AACjF,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,SAAS,EAAoD,MAAM,WAAW,CAAA;AACtH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,EAA4C,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The web edition's script, `pw/justify.js` (bundled by
|
|
3
|
+
* `//:web_runtime`): lays out the paragraphs that ask for Knuth–Plass
|
|
4
|
+
* justification once the page's fonts have loaded, with HarfBuzz's
|
|
5
|
+
* WebAssembly, the hyphenation patterns and the project's exceptions beside
|
|
6
|
+
* it, and again as their
|
|
7
|
+
* widths change (`justify.ts`). Any failure leaves the browser's lines.
|
|
8
|
+
*/
|
|
9
|
+
import { FontRegistry } from '../layout/fonts.js';
|
|
10
|
+
import { Measurer } from '../measure/measurer.js';
|
|
11
|
+
import { Justifier, justifiable, pageFontFaces, pageHyphenator } from './justify.js';
|
|
12
|
+
async function start() {
|
|
13
|
+
const paragraphs = justifiable(document);
|
|
14
|
+
if (!paragraphs.length)
|
|
15
|
+
return;
|
|
16
|
+
await document.fonts.ready;
|
|
17
|
+
const fonts = new FontRegistry(await Measurer.create());
|
|
18
|
+
await Promise.all(pageFontFaces().map(async (face) => {
|
|
19
|
+
const response = await fetch(face.url);
|
|
20
|
+
if (!response.ok)
|
|
21
|
+
return;
|
|
22
|
+
await fonts.add(face.family, new Uint8Array(await response.arrayBuffer()), {
|
|
23
|
+
...(face.weight ? { weight: face.weight } : {}),
|
|
24
|
+
...(face.style ? { style: face.style } : {}),
|
|
25
|
+
...(face.stretch ? { stretch: face.stretch } : {}),
|
|
26
|
+
page: false,
|
|
27
|
+
});
|
|
28
|
+
}));
|
|
29
|
+
// The project's exceptions are beside the script, if it has any.
|
|
30
|
+
const hyphenator = await pageHyphenator(document.documentElement, new URL('hyphenation.txt', import.meta.url));
|
|
31
|
+
new Justifier({ fonts, hyphenator }).observe(paragraphs);
|
|
32
|
+
document.documentElement.dataset['pwJustified'] = String(paragraphs.filter((p) => p.classList.contains('pw-justified')).length);
|
|
33
|
+
}
|
|
34
|
+
if (document.readyState === 'loading')
|
|
35
|
+
document.addEventListener('DOMContentLoaded', () => void start(), { once: true });
|
|
36
|
+
else
|
|
37
|
+
void start();
|
|
38
|
+
//# sourceMappingURL=justify-main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"justify-main.js","sourceRoot":"","sources":["../../src/web/justify-main.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAEpF,KAAK,UAAU,KAAK;IAClB,MAAM,UAAU,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAA;IACxC,IAAI,CAAC,UAAU,CAAC,MAAM;QAAE,OAAM;IAC9B,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAA;IAC1B,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,MAAM,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;IACvD,MAAM,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACnD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACtC,IAAI,CAAC,QAAQ,CAAC,EAAE;YAAE,OAAM;QACxB,MAAM,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,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
|
|
1
|
+
import { Hyphenator } from '../hyphenation/hyphenator.js';
|
|
2
|
+
import type { FontRegistry } from '../layout/fonts.js';
|
|
3
|
+
/** Whether an element asks for the engine's justification. */
|
|
4
|
+
export declare function wantsJustification(el: Element): boolean;
|
|
5
|
+
/** The paragraphs under `root` that ask for it. */
|
|
6
|
+
export declare function justifiable(root: ParentNode): HTMLElement[];
|
|
7
|
+
export interface JustifierOptions {
|
|
8
|
+
fonts: FontRegistry;
|
|
9
|
+
hyphenator?: Hyphenator;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Lays out paragraphs with Knuth–Plass and keeps them laid out at their
|
|
13
|
+
* width: `observe` lays each out again when its width changes.
|
|
14
|
+
*/
|
|
15
|
+
export declare class Justifier {
|
|
16
|
+
#private;
|
|
17
|
+
readonly options: JustifierOptions;
|
|
18
|
+
constructor(options: JustifierOptions);
|
|
19
|
+
/**
|
|
20
|
+
* Lays a paragraph out at its width, from its original content; returns
|
|
21
|
+
* whether it could. One the engine can't lay out (no width yet, a font it
|
|
22
|
+
* wasn't given) keeps the browser's lines.
|
|
23
|
+
*/
|
|
24
|
+
justify(el: HTMLElement): boolean;
|
|
25
|
+
/** Lays each paragraph out, and again whenever its width changes. */
|
|
26
|
+
observe(paragraphs: Iterable<HTMLElement>): void;
|
|
27
|
+
disconnect(): void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The page's hyphenator: the patterns of the languages under `root`, and
|
|
31
|
+
* the project's exceptions, which the site has at `exceptions` (its
|
|
32
|
+
* `hyphenation.txt`, a comment alone when the project has none). Without the patterns a
|
|
33
|
+
* language breaks only at soft and explicit hyphens; without the file,
|
|
34
|
+
* by the patterns alone.
|
|
35
|
+
*/
|
|
36
|
+
export declare function pageHyphenator(root: Element, exceptions: URL): Promise<Hyphenator>;
|
|
37
|
+
/** A face an `@font-face` rule of the page loads: its family, descriptors and file. */
|
|
38
|
+
export interface PageFontFace {
|
|
39
|
+
family: string;
|
|
40
|
+
url: string;
|
|
41
|
+
weight?: string;
|
|
42
|
+
style?: string;
|
|
43
|
+
stretch?: string;
|
|
44
|
+
}
|
|
45
|
+
/** The faces the page's own stylesheets load, by their `@font-face` rules, with each file's URL resolved. */
|
|
46
|
+
export declare function pageFontFaces(doc?: Document): PageFontFace[];
|