postext 1.63.3 → 1.63.4
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/bundle/codec/files.d.ts +20 -0
- package/dist/bundle/codec/files.d.ts.map +1 -0
- package/dist/bundle/codec/files.js +92 -0
- package/dist/bundle/codec/files.js.map +1 -0
- package/dist/bundle/codec/plan.d.ts +114 -0
- package/dist/bundle/codec/plan.d.ts.map +1 -0
- package/dist/bundle/codec/plan.js +367 -0
- package/dist/bundle/codec/plan.js.map +1 -0
- package/dist/bundle/codec/read.d.ts +92 -0
- package/dist/bundle/codec/read.d.ts.map +1 -0
- package/dist/bundle/codec/read.js +249 -0
- package/dist/bundle/codec/read.js.map +1 -0
- package/dist/bundle/codec.d.ts +6 -218
- package/dist/bundle/codec.d.ts.map +1 -1
- package/dist/bundle/codec.js +3 -699
- package/dist/bundle/codec.js.map +1 -1
- package/dist/bundle/manifest/entries.d.ts +25 -0
- package/dist/bundle/manifest/entries.d.ts.map +1 -0
- package/dist/bundle/manifest/entries.js +108 -0
- package/dist/bundle/manifest/entries.js.map +1 -0
- package/dist/bundle/manifest/fileNames.d.ts +38 -0
- package/dist/bundle/manifest/fileNames.d.ts.map +1 -0
- package/dist/bundle/manifest/fileNames.js +143 -0
- package/dist/bundle/manifest/fileNames.js.map +1 -0
- package/dist/bundle/manifest/locale.d.ts +61 -0
- package/dist/bundle/manifest/locale.d.ts.map +1 -0
- package/dist/bundle/manifest/locale.js +216 -0
- package/dist/bundle/manifest/locale.js.map +1 -0
- package/dist/bundle/manifest/sizes.d.ts +18 -0
- package/dist/bundle/manifest/sizes.d.ts.map +1 -0
- package/dist/bundle/manifest/sizes.js +257 -0
- package/dist/bundle/manifest/sizes.js.map +1 -0
- package/dist/bundle/manifest/validation.d.ts +10 -0
- package/dist/bundle/manifest/validation.d.ts.map +1 -0
- package/dist/bundle/manifest/validation.js +114 -0
- package/dist/bundle/manifest/validation.js.map +1 -0
- package/dist/bundle/manifest.d.ts +7 -139
- package/dist/bundle/manifest.d.ts.map +1 -1
- package/dist/bundle/manifest.js +5 -829
- package/dist/bundle/manifest.js.map +1 -1
- package/dist/canvas-backend/blockRender/block.d.ts +5 -0
- package/dist/canvas-backend/blockRender/block.d.ts.map +1 -0
- package/dist/canvas-backend/blockRender/block.js +240 -0
- package/dist/canvas-backend/blockRender/block.js.map +1 -0
- package/dist/canvas-backend/blockRender/lines.d.ts +16 -0
- package/dist/canvas-backend/blockRender/lines.d.ts.map +1 -0
- package/dist/canvas-backend/blockRender/lines.js +192 -0
- package/dist/canvas-backend/blockRender/lines.js.map +1 -0
- package/dist/canvas-backend/blockRender/segments.d.ts +54 -0
- package/dist/canvas-backend/blockRender/segments.d.ts.map +1 -0
- package/dist/canvas-backend/blockRender/segments.js +311 -0
- package/dist/canvas-backend/blockRender/segments.js.map +1 -0
- package/dist/canvas-backend/blockRender.d.ts +2 -7
- package/dist/canvas-backend/blockRender.d.ts.map +1 -1
- package/dist/canvas-backend/blockRender.js +3 -727
- package/dist/canvas-backend/blockRender.js.map +1 -1
- package/dist/canvas-backend/renderResourceBlock/block.d.ts +9 -0
- package/dist/canvas-backend/renderResourceBlock/block.d.ts.map +1 -0
- package/dist/canvas-backend/renderResourceBlock/block.js +185 -0
- package/dist/canvas-backend/renderResourceBlock/block.js.map +1 -0
- package/dist/canvas-backend/renderResourceBlock/images.d.ts +67 -0
- package/dist/canvas-backend/renderResourceBlock/images.d.ts.map +1 -0
- package/dist/canvas-backend/renderResourceBlock/images.js +224 -0
- package/dist/canvas-backend/renderResourceBlock/images.js.map +1 -0
- package/dist/canvas-backend/renderResourceBlock/overlays.d.ts +10 -0
- package/dist/canvas-backend/renderResourceBlock/overlays.d.ts.map +1 -0
- package/dist/canvas-backend/renderResourceBlock/overlays.js +107 -0
- package/dist/canvas-backend/renderResourceBlock/overlays.js.map +1 -0
- package/dist/canvas-backend/renderResourceBlock/table.d.ts +3 -0
- package/dist/canvas-backend/renderResourceBlock/table.d.ts.map +1 -0
- package/dist/canvas-backend/renderResourceBlock/table.js +143 -0
- package/dist/canvas-backend/renderResourceBlock/table.js.map +1 -0
- package/dist/canvas-backend/renderResourceBlock/text.d.ts +11 -0
- package/dist/canvas-backend/renderResourceBlock/text.d.ts.map +1 -0
- package/dist/canvas-backend/renderResourceBlock/text.js +141 -0
- package/dist/canvas-backend/renderResourceBlock/text.js.map +1 -0
- package/dist/canvas-backend/renderResourceBlock.d.ts +4 -81
- package/dist/canvas-backend/renderResourceBlock.d.ts.map +1 -1
- package/dist/canvas-backend/renderResourceBlock.js +3 -777
- package/dist/canvas-backend/renderResourceBlock.js.map +1 -1
- package/dist/canvas-backend/verticalText/alternates.d.ts +47 -0
- package/dist/canvas-backend/verticalText/alternates.d.ts.map +1 -0
- package/dist/canvas-backend/verticalText/alternates.js +240 -0
- package/dist/canvas-backend/verticalText/alternates.js.map +1 -0
- package/dist/canvas-backend/verticalText/painter.d.ts +58 -0
- package/dist/canvas-backend/verticalText/painter.d.ts.map +1 -0
- package/dist/canvas-backend/verticalText/painter.js +329 -0
- package/dist/canvas-backend/verticalText/painter.js.map +1 -0
- package/dist/canvas-backend/verticalText.d.ts +4 -101
- package/dist/canvas-backend/verticalText.d.ts.map +1 -1
- package/dist/canvas-backend/verticalText.js +2 -562
- package/dist/canvas-backend/verticalText.js.map +1 -1
- package/dist/checks/contrast/colours.d.ts +64 -0
- package/dist/checks/contrast/colours.d.ts.map +1 -0
- package/dist/checks/contrast/colours.js +101 -0
- package/dist/checks/contrast/colours.js.map +1 -0
- package/dist/checks/contrast/document.d.ts +17 -0
- package/dist/checks/contrast/document.d.ts.map +1 -0
- package/dist/checks/contrast/document.js +132 -0
- package/dist/checks/contrast/document.js.map +1 -0
- package/dist/checks/contrast/pairs.d.ts +10 -0
- package/dist/checks/contrast/pairs.d.ts.map +1 -0
- package/dist/checks/contrast/pairs.js +462 -0
- package/dist/checks/contrast/pairs.js.map +1 -0
- package/dist/checks/contrast/types.d.ts +114 -0
- package/dist/checks/contrast/types.d.ts.map +1 -0
- package/dist/checks/contrast/types.js +2 -0
- package/dist/checks/contrast/types.js.map +1 -0
- package/dist/checks/contrast.d.ts +5 -170
- package/dist/checks/contrast.d.ts.map +1 -1
- package/dist/checks/contrast.js +3 -686
- package/dist/checks/contrast.js.map +1 -1
- package/dist/comics/layoutPage/letterPanels.d.ts +38 -0
- package/dist/comics/layoutPage/letterPanels.d.ts.map +1 -0
- package/dist/comics/layoutPage/letterPanels.js +146 -0
- package/dist/comics/layoutPage/letterPanels.js.map +1 -0
- package/dist/comics/layoutPage/letteringStyle.d.ts +31 -0
- package/dist/comics/layoutPage/letteringStyle.d.ts.map +1 -0
- package/dist/comics/layoutPage/letteringStyle.js +88 -0
- package/dist/comics/layoutPage/letteringStyle.js.map +1 -0
- package/dist/comics/layoutPage/records.d.ts +25 -0
- package/dist/comics/layoutPage/records.d.ts.map +1 -0
- package/dist/comics/layoutPage/records.js +36 -0
- package/dist/comics/layoutPage/records.js.map +1 -0
- package/dist/comics/layoutPage/settings.d.ts +64 -0
- package/dist/comics/layoutPage/settings.d.ts.map +1 -0
- package/dist/comics/layoutPage/settings.js +168 -0
- package/dist/comics/layoutPage/settings.js.map +1 -0
- package/dist/comics/layoutPage/zones.d.ts +79 -0
- package/dist/comics/layoutPage/zones.d.ts.map +1 -0
- package/dist/comics/layoutPage/zones.js +179 -0
- package/dist/comics/layoutPage/zones.js.map +1 -0
- package/dist/comics/layoutPage.d.ts +8 -113
- package/dist/comics/layoutPage.d.ts.map +1 -1
- package/dist/comics/layoutPage.js +12 -603
- package/dist/comics/layoutPage.js.map +1 -1
- package/dist/comics/lettering/letter/variants.d.ts +28 -0
- package/dist/comics/lettering/letter/variants.d.ts.map +1 -0
- package/dist/comics/lettering/letter/variants.js +269 -0
- package/dist/comics/lettering/letter/variants.js.map +1 -0
- package/dist/comics/lettering/letter.d.ts +32 -1
- package/dist/comics/lettering/letter.d.ts.map +1 -1
- package/dist/comics/lettering/letter.js +8 -270
- package/dist/comics/lettering/letter.js.map +1 -1
- package/dist/comics/lettering/shape-text/breaks.d.ts +53 -0
- package/dist/comics/lettering/shape-text/breaks.d.ts.map +1 -0
- package/dist/comics/lettering/shape-text/breaks.js +217 -0
- package/dist/comics/lettering/shape-text/breaks.js.map +1 -0
- package/dist/comics/lettering/shape-text/measure.d.ts +20 -0
- package/dist/comics/lettering/shape-text/measure.d.ts.map +1 -0
- package/dist/comics/lettering/shape-text/measure.js +160 -0
- package/dist/comics/lettering/shape-text/measure.js.map +1 -0
- package/dist/comics/lettering/shape-text/ruby.d.ts +28 -0
- package/dist/comics/lettering/shape-text/ruby.d.ts.map +1 -0
- package/dist/comics/lettering/shape-text/ruby.js +173 -0
- package/dist/comics/lettering/shape-text/ruby.js.map +1 -0
- package/dist/comics/lettering/shape-text.d.ts +7 -6
- package/dist/comics/lettering/shape-text.d.ts.map +1 -1
- package/dist/comics/lettering/shape-text.js +10 -536
- package/dist/comics/lettering/shape-text.js.map +1 -1
- package/dist/composed/overlap/ink.d.ts +48 -0
- package/dist/composed/overlap/ink.d.ts.map +1 -0
- package/dist/composed/overlap/ink.js +180 -0
- package/dist/composed/overlap/ink.js.map +1 -0
- package/dist/composed/overlap/moves.d.ts +97 -0
- package/dist/composed/overlap/moves.d.ts.map +1 -0
- package/dist/composed/overlap/moves.js +191 -0
- package/dist/composed/overlap/moves.js.map +1 -0
- package/dist/composed/overlap.d.ts +2 -2
- package/dist/composed/overlap.d.ts.map +1 -1
- package/dist/composed/overlap.js +3 -367
- package/dist/composed/overlap.js.map +1 -1
- package/dist/composed/sourceMap/chains.d.ts +27 -0
- package/dist/composed/sourceMap/chains.d.ts.map +1 -0
- package/dist/composed/sourceMap/chains.js +176 -0
- package/dist/composed/sourceMap/chains.js.map +1 -0
- package/dist/composed/sourceMap/frames.d.ts +19 -0
- package/dist/composed/sourceMap/frames.d.ts.map +1 -0
- package/dist/composed/sourceMap/frames.js +143 -0
- package/dist/composed/sourceMap/frames.js.map +1 -0
- package/dist/composed/sourceMap/text.d.ts +52 -0
- package/dist/composed/sourceMap/text.d.ts.map +1 -0
- package/dist/composed/sourceMap/text.js +200 -0
- package/dist/composed/sourceMap/text.js.map +1 -0
- package/dist/composed/sourceMap.d.ts +22 -1
- package/dist/composed/sourceMap.d.ts.map +1 -1
- package/dist/composed/sourceMap.js +7 -511
- package/dist/composed/sourceMap.js.map +1 -1
- package/dist/composed/types/frames.d.ts +290 -0
- package/dist/composed/types/frames.d.ts.map +1 -0
- package/dist/composed/types/frames.js +2 -0
- package/dist/composed/types/frames.js.map +1 -0
- package/dist/composed/types/resolved.d.ts +207 -0
- package/dist/composed/types/resolved.d.ts.map +1 -0
- package/dist/composed/types/resolved.js +2 -0
- package/dist/composed/types/resolved.js.map +1 -0
- package/dist/composed/types/templates.d.ts +152 -0
- package/dist/composed/types/templates.d.ts.map +1 -0
- package/dist/composed/types/templates.js +2 -0
- package/dist/composed/types/templates.js.map +1 -0
- package/dist/composed/types.d.ts +3 -641
- package/dist/composed/types.d.ts.map +1 -1
- package/dist/composed/types.js +8 -0
- package/dist/composed/types.js.map +1 -1
- package/dist/defaults/boxes/calloutStyles/inherit.d.ts +15 -0
- package/dist/defaults/boxes/calloutStyles/inherit.d.ts.map +1 -0
- package/dist/defaults/boxes/calloutStyles/inherit.js +64 -0
- package/dist/defaults/boxes/calloutStyles/inherit.js.map +1 -0
- package/dist/defaults/boxes/calloutStyles/resolve.d.ts +7 -0
- package/dist/defaults/boxes/calloutStyles/resolve.d.ts.map +1 -0
- package/dist/defaults/boxes/calloutStyles/resolve.js +223 -0
- package/dist/defaults/boxes/calloutStyles/resolve.js.map +1 -0
- package/dist/defaults/boxes/calloutStyles/statics.d.ts +136 -0
- package/dist/defaults/boxes/calloutStyles/statics.d.ts.map +1 -0
- package/dist/defaults/boxes/calloutStyles/statics.js +140 -0
- package/dist/defaults/boxes/calloutStyles/statics.js.map +1 -0
- package/dist/defaults/boxes/calloutStyles/strip.d.ts +10 -0
- package/dist/defaults/boxes/calloutStyles/strip.d.ts.map +1 -0
- package/dist/defaults/boxes/calloutStyles/strip.js +336 -0
- package/dist/defaults/boxes/calloutStyles/strip.js.map +1 -0
- package/dist/defaults/boxes/calloutStyles.d.ts +4 -148
- package/dist/defaults/boxes/calloutStyles.d.ts.map +1 -1
- package/dist/defaults/boxes/calloutStyles.js +4 -749
- package/dist/defaults/boxes/calloutStyles.js.map +1 -1
- package/dist/defaults/structure/headerFooter/defaults.d.ts +34 -0
- package/dist/defaults/structure/headerFooter/defaults.d.ts.map +1 -0
- package/dist/defaults/structure/headerFooter/defaults.js +162 -0
- package/dist/defaults/structure/headerFooter/defaults.js.map +1 -0
- package/dist/defaults/structure/headerFooter/legacy.d.ts +8 -0
- package/dist/defaults/structure/headerFooter/legacy.d.ts.map +1 -0
- package/dist/defaults/structure/headerFooter/legacy.js +124 -0
- package/dist/defaults/structure/headerFooter/legacy.js.map +1 -0
- package/dist/defaults/structure/headerFooter/resolve.d.ts +29 -0
- package/dist/defaults/structure/headerFooter/resolve.d.ts.map +1 -0
- package/dist/defaults/structure/headerFooter/resolve.js +231 -0
- package/dist/defaults/structure/headerFooter/resolve.js.map +1 -0
- package/dist/defaults/structure/headerFooter.d.ts +6 -58
- package/dist/defaults/structure/headerFooter.d.ts.map +1 -1
- package/dist/defaults/structure/headerFooter.js +5 -510
- package/dist/defaults/structure/headerFooter.js.map +1 -1
- package/dist/defaults/structure/headings/defaults.d.ts +46 -0
- package/dist/defaults/structure/headings/defaults.d.ts.map +1 -0
- package/dist/defaults/structure/headings/defaults.js +100 -0
- package/dist/defaults/structure/headings/defaults.js.map +1 -0
- package/dist/defaults/structure/headings/resolve.d.ts +17 -0
- package/dist/defaults/structure/headings/resolve.d.ts.map +1 -0
- package/dist/defaults/structure/headings/resolve.js +179 -0
- package/dist/defaults/structure/headings/resolve.js.map +1 -0
- package/dist/defaults/structure/headings/strip.d.ts +9 -0
- package/dist/defaults/structure/headings/strip.d.ts.map +1 -0
- package/dist/defaults/structure/headings/strip.js +323 -0
- package/dist/defaults/structure/headings/strip.js.map +1 -0
- package/dist/defaults/structure/headings.d.ts +3 -62
- package/dist/defaults/structure/headings.d.ts.map +1 -1
- package/dist/defaults/structure/headings.js +3 -594
- package/dist/defaults/structure/headings.js.map +1 -1
- package/dist/defaults/text/bodyText/arabic.d.ts +35 -0
- package/dist/defaults/text/bodyText/arabic.d.ts.map +1 -0
- package/dist/defaults/text/bodyText/arabic.js +85 -0
- package/dist/defaults/text/bodyText/arabic.js.map +1 -0
- package/dist/defaults/text/bodyText/defaults.d.ts +31 -0
- package/dist/defaults/text/bodyText/defaults.d.ts.map +1 -0
- package/dist/defaults/text/bodyText/defaults.js +128 -0
- package/dist/defaults/text/bodyText/defaults.js.map +1 -0
- package/dist/defaults/text/bodyText/resolve.d.ts +12 -0
- package/dist/defaults/text/bodyText/resolve.d.ts.map +1 -0
- package/dist/defaults/text/bodyText/resolve.js +171 -0
- package/dist/defaults/text/bodyText/resolve.js.map +1 -0
- package/dist/defaults/text/bodyText/strip.d.ts +12 -0
- package/dist/defaults/text/bodyText/strip.d.ts.map +1 -0
- package/dist/defaults/text/bodyText/strip.js +305 -0
- package/dist/defaults/text/bodyText/strip.js.map +1 -0
- package/dist/defaults/text/bodyText.d.ts +4 -70
- package/dist/defaults/text/bodyText.d.ts.map +1 -1
- package/dist/defaults/text/bodyText.js +4 -673
- package/dist/defaults/text/bodyText.js.map +1 -1
- package/dist/design/richText/ellipsis.d.ts +26 -0
- package/dist/design/richText/ellipsis.d.ts.map +1 -0
- package/dist/design/richText/ellipsis.js +173 -0
- package/dist/design/richText/ellipsis.js.map +1 -0
- package/dist/design/richText/measure.d.ts +51 -0
- package/dist/design/richText/measure.d.ts.map +1 -0
- package/dist/design/richText/measure.js +176 -0
- package/dist/design/richText/measure.js.map +1 -0
- package/dist/design/richText/parse.d.ts +120 -0
- package/dist/design/richText/parse.d.ts.map +1 -0
- package/dist/design/richText/parse.js +190 -0
- package/dist/design/richText/parse.js.map +1 -0
- package/dist/design/richText/wrap.d.ts +13 -0
- package/dist/design/richText/wrap.d.ts.map +1 -0
- package/dist/design/richText/wrap.js +176 -0
- package/dist/design/richText/wrap.js.map +1 -0
- package/dist/design/richText.d.ts +6 -199
- package/dist/design/richText.d.ts.map +1 -1
- package/dist/design/richText.js +4 -698
- package/dist/design/richText.js.map +1 -1
- package/dist/exercises/grids/arithmetic.d.ts +3 -0
- package/dist/exercises/grids/arithmetic.d.ts.map +1 -0
- package/dist/exercises/grids/arithmetic.js +214 -0
- package/dist/exercises/grids/arithmetic.js.map +1 -0
- package/dist/exercises/grids/common.d.ts +8 -0
- package/dist/exercises/grids/common.d.ts.map +1 -0
- package/dist/exercises/grids/common.js +9 -0
- package/dist/exercises/grids/common.js.map +1 -0
- package/dist/exercises/grids/crossword.d.ts +3 -0
- package/dist/exercises/grids/crossword.d.ts.map +1 -0
- package/dist/exercises/grids/crossword.js +191 -0
- package/dist/exercises/grids/crossword.js.map +1 -0
- package/dist/exercises/grids/match.d.ts +3 -0
- package/dist/exercises/grids/match.d.ts.map +1 -0
- package/dist/exercises/grids/match.js +58 -0
- package/dist/exercises/grids/match.js.map +1 -0
- package/dist/exercises/grids/wordSearch.d.ts +5 -0
- package/dist/exercises/grids/wordSearch.d.ts.map +1 -0
- package/dist/exercises/grids/wordSearch.js +122 -0
- package/dist/exercises/grids/wordSearch.js.map +1 -0
- package/dist/exercises/grids.d.ts +2 -2
- package/dist/exercises/grids.d.ts.map +1 -1
- package/dist/exercises/grids.js +4 -575
- package/dist/exercises/grids.js.map +1 -1
- package/dist/knuthPlass/breakpoints/adjust.d.ts +22 -0
- package/dist/knuthPlass/breakpoints/adjust.d.ts.map +1 -0
- package/dist/knuthPlass/breakpoints/adjust.js +39 -0
- package/dist/knuthPlass/breakpoints/adjust.js.map +1 -0
- package/dist/knuthPlass/breakpoints/search.d.ts +10 -0
- package/dist/knuthPlass/breakpoints/search.d.ts.map +1 -0
- package/dist/knuthPlass/breakpoints/search.js +439 -0
- package/dist/knuthPlass/breakpoints/search.js.map +1 -0
- package/dist/knuthPlass/breakpoints.d.ts +2 -21
- package/dist/knuthPlass/breakpoints.d.ts.map +1 -1
- package/dist/knuthPlass/breakpoints.js +2 -472
- package/dist/knuthPlass/breakpoints.js.map +1 -1
- package/dist/marks/cjkMarks/geometry.d.ts +58 -0
- package/dist/marks/cjkMarks/geometry.d.ts.map +1 -0
- package/dist/marks/cjkMarks/geometry.js +131 -0
- package/dist/marks/cjkMarks/geometry.js.map +1 -0
- package/dist/marks/cjkMarks/lineMarks.d.ts +7 -0
- package/dist/marks/cjkMarks/lineMarks.d.ts.map +1 -0
- package/dist/marks/cjkMarks/lineMarks.js +183 -0
- package/dist/marks/cjkMarks/lineMarks.js.map +1 -0
- package/dist/marks/cjkMarks/reach.d.ts +28 -0
- package/dist/marks/cjkMarks/reach.d.ts.map +1 -0
- package/dist/marks/cjkMarks/reach.js +130 -0
- package/dist/marks/cjkMarks/reach.js.map +1 -0
- package/dist/marks/cjkMarks/resources.d.ts +31 -0
- package/dist/marks/cjkMarks/resources.d.ts.map +1 -0
- package/dist/marks/cjkMarks/resources.js +46 -0
- package/dist/marks/cjkMarks/resources.js.map +1 -0
- package/dist/marks/cjkMarks.d.ts +4 -27
- package/dist/marks/cjkMarks.d.ts.map +1 -1
- package/dist/marks/cjkMarks.js +6 -479
- package/dist/marks/cjkMarks.js.map +1 -1
- package/dist/measure/canvas/ink.d.ts +67 -0
- package/dist/measure/canvas/ink.d.ts.map +1 -0
- package/dist/measure/canvas/ink.js +215 -0
- package/dist/measure/canvas/ink.js.map +1 -0
- package/dist/measure/canvas/state.d.ts +91 -0
- package/dist/measure/canvas/state.d.ts.map +1 -0
- package/dist/measure/canvas/state.js +306 -0
- package/dist/measure/canvas/state.js.map +1 -0
- package/dist/measure/canvas/widths.d.ts +27 -0
- package/dist/measure/canvas/widths.d.ts.map +1 -0
- package/dist/measure/canvas/widths.js +137 -0
- package/dist/measure/canvas/widths.js.map +1 -0
- package/dist/measure/canvas.d.ts +4 -154
- package/dist/measure/canvas.d.ts.map +1 -1
- package/dist/measure/canvas.js +4 -646
- package/dist/measure/canvas.js.map +1 -1
- package/dist/measure/cjk/cjkPunctuation/box.d.ts +71 -0
- package/dist/measure/cjk/cjkPunctuation/box.d.ts.map +1 -0
- package/dist/measure/cjk/cjkPunctuation/box.js +114 -0
- package/dist/measure/cjk/cjkPunctuation/box.js.map +1 -0
- package/dist/measure/cjk/cjkPunctuation/composition.d.ts +128 -0
- package/dist/measure/cjk/cjkPunctuation/composition.d.ts.map +1 -0
- package/dist/measure/cjk/cjkPunctuation/composition.js +157 -0
- package/dist/measure/cjk/cjkPunctuation/composition.js.map +1 -0
- package/dist/measure/cjk/cjkPunctuation/lineEdges.d.ts +63 -0
- package/dist/measure/cjk/cjkPunctuation/lineEdges.d.ts.map +1 -0
- package/dist/measure/cjk/cjkPunctuation/lineEdges.js +183 -0
- package/dist/measure/cjk/cjkPunctuation/lineEdges.js.map +1 -0
- package/dist/measure/cjk/cjkPunctuation.d.ts +8 -247
- package/dist/measure/cjk/cjkPunctuation.d.ts.map +1 -1
- package/dist/measure/cjk/cjkPunctuation.js +6 -447
- package/dist/measure/cjk/cjkPunctuation.js.map +1 -1
- package/dist/measure/plain/overwide.d.ts +70 -0
- package/dist/measure/plain/overwide.d.ts.map +1 -0
- package/dist/measure/plain/overwide.js +150 -0
- package/dist/measure/plain/overwide.js.map +1 -0
- package/dist/measure/plain/segments.d.ts +53 -0
- package/dist/measure/plain/segments.d.ts.map +1 -0
- package/dist/measure/plain/segments.js +153 -0
- package/dist/measure/plain/segments.js.map +1 -0
- package/dist/measure/plain.d.ts +2 -15
- package/dist/measure/plain.d.ts.map +1 -1
- package/dist/measure/plain.js +12 -300
- package/dist/measure/plain.js.map +1 -1
- package/dist/migrate/pageDesign/pictures.d.ts +16 -0
- package/dist/migrate/pageDesign/pictures.d.ts.map +1 -0
- package/dist/migrate/pageDesign/pictures.js +101 -0
- package/dist/migrate/pageDesign/pictures.js.map +1 -0
- package/dist/migrate/pageDesign/text.d.ts +48 -0
- package/dist/migrate/pageDesign/text.d.ts.map +1 -0
- package/dist/migrate/pageDesign/text.js +196 -0
- package/dist/migrate/pageDesign/text.js.map +1 -0
- package/dist/migrate/pageDesign/types.d.ts +137 -0
- package/dist/migrate/pageDesign/types.d.ts.map +1 -0
- package/dist/migrate/pageDesign/types.js +2 -0
- package/dist/migrate/pageDesign/types.js.map +1 -0
- package/dist/migrate/pageDesign.d.ts +4 -154
- package/dist/migrate/pageDesign.d.ts.map +1 -1
- package/dist/migrate/pageDesign.js +4 -294
- package/dist/migrate/pageDesign.js.map +1 -1
- package/dist/numerals/numbering/counters.d.ts +49 -0
- package/dist/numerals/numbering/counters.d.ts.map +1 -0
- package/dist/numerals/numbering/counters.js +311 -0
- package/dist/numerals/numbering/counters.js.map +1 -0
- package/dist/numerals/numbering/formats.d.ts +30 -0
- package/dist/numerals/numbering/formats.d.ts.map +1 -0
- package/dist/numerals/numbering/formats.js +116 -0
- package/dist/numerals/numbering/formats.js.map +1 -0
- package/dist/numerals/numbering/headings.d.ts +40 -0
- package/dist/numerals/numbering/headings.d.ts.map +1 -0
- package/dist/numerals/numbering/headings.js +64 -0
- package/dist/numerals/numbering/headings.js.map +1 -0
- package/dist/numerals/numbering/pageLabels.d.ts +43 -0
- package/dist/numerals/numbering/pageLabels.d.ts.map +1 -0
- package/dist/numerals/numbering/pageLabels.js +75 -0
- package/dist/numerals/numbering/pageLabels.js.map +1 -0
- package/dist/numerals/numbering/styles.d.ts +52 -0
- package/dist/numerals/numbering/styles.d.ts.map +1 -0
- package/dist/numerals/numbering/styles.js +43 -0
- package/dist/numerals/numbering/styles.js.map +1 -0
- package/dist/numerals/numbering.d.ts +9 -201
- package/dist/numerals/numbering.d.ts.map +1 -1
- package/dist/numerals/numbering.js +5 -595
- package/dist/numerals/numbering.js.map +1 -1
- package/dist/parse/annotations/apply.d.ts +32 -0
- package/dist/parse/annotations/apply.d.ts.map +1 -0
- package/dist/parse/annotations/apply.js +293 -0
- package/dist/parse/annotations/apply.js.map +1 -0
- package/dist/parse/annotations/scan.d.ts +55 -0
- package/dist/parse/annotations/scan.d.ts.map +1 -0
- package/dist/parse/annotations/scan.js +232 -0
- package/dist/parse/annotations/scan.js.map +1 -0
- package/dist/parse/annotations/source.d.ts +31 -0
- package/dist/parse/annotations/source.d.ts.map +1 -0
- package/dist/parse/annotations/source.js +128 -0
- package/dist/parse/annotations/source.js.map +1 -0
- package/dist/parse/annotations.d.ts +5 -86
- package/dist/parse/annotations.d.ts.map +1 -1
- package/dist/parse/annotations.js +3 -648
- package/dist/parse/annotations.js.map +1 -1
- package/dist/pipeline/blocks/measureContentBlock/helpers.d.ts +31 -0
- package/dist/pipeline/blocks/measureContentBlock/helpers.d.ts.map +1 -0
- package/dist/pipeline/blocks/measureContentBlock/helpers.js +74 -0
- package/dist/pipeline/blocks/measureContentBlock/helpers.js.map +1 -0
- package/dist/pipeline/blocks/measureContentBlock/inlineSpans.d.ts +12 -0
- package/dist/pipeline/blocks/measureContentBlock/inlineSpans.d.ts.map +1 -0
- package/dist/pipeline/blocks/measureContentBlock/inlineSpans.js +107 -0
- package/dist/pipeline/blocks/measureContentBlock/inlineSpans.js.map +1 -0
- package/dist/pipeline/blocks/measureContentBlock/measureOptions.d.ts +68 -0
- package/dist/pipeline/blocks/measureContentBlock/measureOptions.d.ts.map +1 -0
- package/dist/pipeline/blocks/measureContentBlock/measureOptions.js +90 -0
- package/dist/pipeline/blocks/measureContentBlock/measureOptions.js.map +1 -0
- package/dist/pipeline/blocks/measureContentBlock/types.d.ts +165 -0
- package/dist/pipeline/blocks/measureContentBlock/types.d.ts.map +1 -0
- package/dist/pipeline/blocks/measureContentBlock/types.js +2 -0
- package/dist/pipeline/blocks/measureContentBlock/types.js.map +1 -0
- package/dist/pipeline/blocks/measureContentBlock.d.ts +8 -172
- package/dist/pipeline/blocks/measureContentBlock.d.ts.map +1 -1
- package/dist/pipeline/blocks/measureContentBlock.js +16 -257
- package/dist/pipeline/blocks/measureContentBlock.js.map +1 -1
- package/dist/pipeline/blocks/placement/bands.d.ts +61 -0
- package/dist/pipeline/blocks/placement/bands.d.ts.map +1 -0
- package/dist/pipeline/blocks/placement/bands.js +188 -0
- package/dist/pipeline/blocks/placement/bands.js.map +1 -0
- package/dist/pipeline/blocks/placement.d.ts +2 -59
- package/dist/pipeline/blocks/placement.d.ts.map +1 -1
- package/dist/pipeline/blocks/placement.js +3 -184
- package/dist/pipeline/blocks/placement.js.map +1 -1
- package/dist/pipeline/build/pass/composed/comicText.d.ts +27 -0
- package/dist/pipeline/build/pass/composed/comicText.d.ts.map +1 -0
- package/dist/pipeline/build/pass/composed/comicText.js +89 -0
- package/dist/pipeline/build/pass/composed/comicText.js.map +1 -0
- package/dist/pipeline/build/pass/composed/jumps.d.ts +29 -0
- package/dist/pipeline/build/pass/composed/jumps.d.ts.map +1 -0
- package/dist/pipeline/build/pass/composed/jumps.js +91 -0
- package/dist/pipeline/build/pass/composed/jumps.js.map +1 -0
- package/dist/pipeline/build/pass/composed/placePage.d.ts +60 -0
- package/dist/pipeline/build/pass/composed/placePage.d.ts.map +1 -0
- package/dist/pipeline/build/pass/composed/placePage.js +368 -0
- package/dist/pipeline/build/pass/composed/placePage.js.map +1 -0
- package/dist/pipeline/build/pass/composed.d.ts +6 -7
- package/dist/pipeline/build/pass/composed.d.ts.map +1 -1
- package/dist/pipeline/build/pass/composed.js +20 -524
- package/dist/pipeline/build/pass/composed.js.map +1 -1
- package/dist/pipeline/build/pass/setup/contentSetup.d.ts +89 -0
- package/dist/pipeline/build/pass/setup/contentSetup.d.ts.map +1 -0
- package/dist/pipeline/build/pass/setup/contentSetup.js +314 -0
- package/dist/pipeline/build/pass/setup/contentSetup.js.map +1 -0
- package/dist/pipeline/build/pass/setup/pageSetup.d.ts +32 -0
- package/dist/pipeline/build/pass/setup/pageSetup.d.ts.map +1 -0
- package/dist/pipeline/build/pass/setup/pageSetup.js +147 -0
- package/dist/pipeline/build/pass/setup/pageSetup.js.map +1 -0
- package/dist/pipeline/build/pass/setup/passFinish.d.ts +95 -0
- package/dist/pipeline/build/pass/setup/passFinish.d.ts.map +1 -0
- package/dist/pipeline/build/pass/setup/passFinish.js +201 -0
- package/dist/pipeline/build/pass/setup/passFinish.js.map +1 -0
- package/dist/pipeline/build/pass/setupState.d.ts +8 -0
- package/dist/pipeline/build/pass/setupState.d.ts.map +1 -0
- package/dist/pipeline/build/pass/setupState.js +2 -0
- package/dist/pipeline/build/pass/setupState.js.map +1 -0
- package/dist/pipeline/build/pass.d.ts.map +1 -1
- package/dist/pipeline/build/pass.js +60 -654
- package/dist/pipeline/build/pass.js.map +1 -1
- package/dist/pipeline/callouts/calloutLayout/boxDecoration.d.ts +49 -0
- package/dist/pipeline/callouts/calloutLayout/boxDecoration.d.ts.map +1 -0
- package/dist/pipeline/callouts/calloutLayout/boxDecoration.js +110 -0
- package/dist/pipeline/callouts/calloutLayout/boxDecoration.js.map +1 -0
- package/dist/pipeline/callouts/calloutLayout/labelTab.d.ts +31 -0
- package/dist/pipeline/callouts/calloutLayout/labelTab.d.ts.map +1 -0
- package/dist/pipeline/callouts/calloutLayout/labelTab.js +202 -0
- package/dist/pipeline/callouts/calloutLayout/labelTab.js.map +1 -0
- package/dist/pipeline/callouts/calloutLayout/layoutCallout.d.ts.map +1 -1
- package/dist/pipeline/callouts/calloutLayout/layoutCallout.js +23 -355
- package/dist/pipeline/callouts/calloutLayout/layoutCallout.js.map +1 -1
- package/dist/pipeline/callouts/calloutLayout/layoutCalloutState.d.ts +14 -0
- package/dist/pipeline/callouts/calloutLayout/layoutCalloutState.d.ts.map +1 -0
- package/dist/pipeline/callouts/calloutLayout/layoutCalloutState.js +2 -0
- package/dist/pipeline/callouts/calloutLayout/layoutCalloutState.js.map +1 -0
- package/dist/pipeline/callouts/calloutLayout/markerColumn.d.ts +31 -0
- package/dist/pipeline/callouts/calloutLayout/markerColumn.d.ts.map +1 -0
- package/dist/pipeline/callouts/calloutLayout/markerColumn.js +75 -0
- package/dist/pipeline/callouts/calloutLayout/markerColumn.js.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/fill.d.ts +68 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/fill.d.ts.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/fill.js +249 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/fill.js.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/measure.d.ts +50 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/measure.d.ts.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/measure.js +195 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/measure.js.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/placeGrid.d.ts +30 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/placeGrid.d.ts.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/placeGrid.js +174 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/placeGrid.js.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/placeGroup.d.ts +35 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/placeGroup.d.ts.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/placeGroup.js +158 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/placeGroup.js.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/placeModules.d.ts +37 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/placeModules.d.ts.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/placeModules.js +303 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/placeModules.js.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/state.d.ts +11 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/state.d.ts.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/state.js +3 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/state.js.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/types.d.ts +14 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/types.d.ts.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/types.js +2 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run/types.js.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run.d.ts +59 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run.d.ts.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run.js +171 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/run.js.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/state.d.ts +7 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/state.d.ts.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/state.js +2 -0
- package/dist/pipeline/composedPages/composedLayout/composePage/state.js.map +1 -0
- package/dist/pipeline/composedPages/composedLayout/composePage.d.ts.map +1 -1
- package/dist/pipeline/composedPages/composedLayout/composePage.js +24 -1165
- package/dist/pipeline/composedPages/composedLayout/composePage.js.map +1 -1
- package/dist/pipeline/contents/indexDirective/blocks.d.ts +9 -0
- package/dist/pipeline/contents/indexDirective/blocks.d.ts.map +1 -0
- package/dist/pipeline/contents/indexDirective/blocks.js +256 -0
- package/dist/pipeline/contents/indexDirective/blocks.js.map +1 -0
- package/dist/pipeline/contents/indexDirective/tree.d.ts +71 -0
- package/dist/pipeline/contents/indexDirective/tree.d.ts.map +1 -0
- package/dist/pipeline/contents/indexDirective/tree.js +224 -0
- package/dist/pipeline/contents/indexDirective/tree.js.map +1 -0
- package/dist/pipeline/contents/indexDirective.d.ts +2 -8
- package/dist/pipeline/contents/indexDirective.d.ts.map +1 -1
- package/dist/pipeline/contents/indexDirective.js +3 -472
- package/dist/pipeline/contents/indexDirective.js.map +1 -1
- package/dist/pipeline/pages/placeholders/chapterValues.d.ts +117 -0
- package/dist/pipeline/pages/placeholders/chapterValues.d.ts.map +1 -0
- package/dist/pipeline/pages/placeholders/chapterValues.js +236 -0
- package/dist/pipeline/pages/placeholders/chapterValues.js.map +1 -0
- package/dist/pipeline/pages/placeholders/lineText.d.ts +66 -0
- package/dist/pipeline/pages/placeholders/lineText.d.ts.map +1 -0
- package/dist/pipeline/pages/placeholders/lineText.js +173 -0
- package/dist/pipeline/pages/placeholders/lineText.js.map +1 -0
- package/dist/pipeline/pages/placeholders.d.ts +6 -179
- package/dist/pipeline/pages/placeholders.d.ts.map +1 -1
- package/dist/pipeline/pages/placeholders.js +4 -398
- package/dist/pipeline/pages/placeholders.js.map +1 -1
- package/dist/pipeline/references/citations/markers.d.ts +14 -0
- package/dist/pipeline/references/citations/markers.d.ts.map +1 -0
- package/dist/pipeline/references/citations/markers.js +106 -0
- package/dist/pipeline/references/citations/markers.js.map +1 -0
- package/dist/pipeline/references/citations/process.d.ts +56 -0
- package/dist/pipeline/references/citations/process.d.ts.map +1 -0
- package/dist/pipeline/references/citations/process.js +213 -0
- package/dist/pipeline/references/citations/process.js.map +1 -0
- package/dist/pipeline/references/citations/spans.d.ts +33 -0
- package/dist/pipeline/references/citations/spans.d.ts.map +1 -0
- package/dist/pipeline/references/citations/spans.js +127 -0
- package/dist/pipeline/references/citations/spans.js.map +1 -0
- package/dist/pipeline/references/citations.d.ts +4 -51
- package/dist/pipeline/references/citations.d.ts.map +1 -1
- package/dist/pipeline/references/citations.js +5 -438
- package/dist/pipeline/references/citations.js.map +1 -1
- package/dist/pipeline/resources/resourceLayout/resourceBlock/captionNotes.d.ts +63 -0
- package/dist/pipeline/resources/resourceLayout/resourceBlock/captionNotes.d.ts.map +1 -0
- package/dist/pipeline/resources/resourceLayout/resourceBlock/captionNotes.js +88 -0
- package/dist/pipeline/resources/resourceLayout/resourceBlock/captionNotes.js.map +1 -0
- package/dist/pipeline/resources/resourceLayout/resourceBlock/state.d.ts +9 -0
- package/dist/pipeline/resources/resourceLayout/resourceBlock/state.d.ts.map +1 -0
- package/dist/pipeline/resources/resourceLayout/resourceBlock/state.js +2 -0
- package/dist/pipeline/resources/resourceLayout/resourceBlock/state.js.map +1 -0
- package/dist/pipeline/resources/resourceLayout/resourceBlock/upright.d.ts +26 -0
- package/dist/pipeline/resources/resourceLayout/resourceBlock/upright.d.ts.map +1 -0
- package/dist/pipeline/resources/resourceLayout/resourceBlock/upright.js +90 -0
- package/dist/pipeline/resources/resourceLayout/resourceBlock/upright.js.map +1 -0
- package/dist/pipeline/resources/resourceLayout/resourceBlock.d.ts +1 -3
- package/dist/pipeline/resources/resourceLayout/resourceBlock.d.ts.map +1 -1
- package/dist/pipeline/resources/resourceLayout/resourceBlock.js +13 -159
- package/dist/pipeline/resources/resourceLayout/resourceBlock.js.map +1 -1
- package/dist/pipeline/sections/partPalette/colorKinds.d.ts +53 -0
- package/dist/pipeline/sections/partPalette/colorKinds.d.ts.map +1 -0
- package/dist/pipeline/sections/partPalette/colorKinds.js +181 -0
- package/dist/pipeline/sections/partPalette/colorKinds.js.map +1 -0
- package/dist/pipeline/sections/partPalette/flowColors.d.ts +16 -0
- package/dist/pipeline/sections/partPalette/flowColors.d.ts.map +1 -0
- package/dist/pipeline/sections/partPalette/flowColors.js +78 -0
- package/dist/pipeline/sections/partPalette/flowColors.js.map +1 -0
- package/dist/pipeline/sections/partPalette/recolor.d.ts +18 -0
- package/dist/pipeline/sections/partPalette/recolor.d.ts.map +1 -0
- package/dist/pipeline/sections/partPalette/recolor.js +188 -0
- package/dist/pipeline/sections/partPalette/recolor.js.map +1 -0
- package/dist/pipeline/sections/partPalette.d.ts +4 -49
- package/dist/pipeline/sections/partPalette.d.ts.map +1 -1
- package/dist/pipeline/sections/partPalette.js +3 -442
- package/dist/pipeline/sections/partPalette.js.map +1 -1
- package/dist/pipeline/text/lists/orderedRuns.d.ts +49 -0
- package/dist/pipeline/text/lists/orderedRuns.d.ts.map +1 -0
- package/dist/pipeline/text/lists/orderedRuns.js +256 -0
- package/dist/pipeline/text/lists/orderedRuns.js.map +1 -0
- package/dist/pipeline/text/lists.d.ts +16 -46
- package/dist/pipeline/text/lists.d.ts.map +1 -1
- package/dist/pipeline/text/lists.js +5 -255
- package/dist/pipeline/text/lists.js.map +1 -1
- package/dist/svg/fonts/inline.d.ts +30 -0
- package/dist/svg/fonts/inline.d.ts.map +1 -0
- package/dist/svg/fonts/inline.js +298 -0
- package/dist/svg/fonts/inline.js.map +1 -0
- package/dist/svg/fonts/scan.d.ts +27 -0
- package/dist/svg/fonts/scan.d.ts.map +1 -0
- package/dist/svg/fonts/scan.js +353 -0
- package/dist/svg/fonts/scan.js.map +1 -0
- package/dist/svg/fonts/types.d.ts +106 -0
- package/dist/svg/fonts/types.d.ts.map +1 -0
- package/dist/svg/fonts/types.js +4 -0
- package/dist/svg/fonts/types.js.map +1 -0
- package/dist/svg/fonts.d.ts +4 -150
- package/dist/svg/fonts.d.ts.map +1 -1
- package/dist/svg/fonts.js +3 -647
- package/dist/svg/fonts.js.map +1 -1
- package/dist/types/text/bodyText/config.d.ts +465 -0
- package/dist/types/text/bodyText/config.d.ts.map +1 -0
- package/dist/types/text/bodyText/config.js +2 -0
- package/dist/types/text/bodyText/config.js.map +1 -0
- package/dist/types/text/bodyText/options.d.ts +73 -0
- package/dist/types/text/bodyText/options.d.ts.map +1 -0
- package/dist/types/text/bodyText/options.js +2 -0
- package/dist/types/text/bodyText/options.js.map +1 -0
- package/dist/types/text/bodyText/resolved.d.ts +95 -0
- package/dist/types/text/bodyText/resolved.d.ts.map +1 -0
- package/dist/types/text/bodyText/resolved.js +2 -0
- package/dist/types/text/bodyText/resolved.js.map +1 -0
- package/dist/types/text/bodyText.d.ts +3 -623
- package/dist/types/text/bodyText.d.ts.map +1 -1
- package/dist/vdt/contentWarnings/comic.d.ts +95 -0
- package/dist/vdt/contentWarnings/comic.d.ts.map +1 -0
- package/dist/vdt/contentWarnings/comic.js +3 -0
- package/dist/vdt/contentWarnings/comic.js.map +1 -0
- package/dist/vdt/contentWarnings/composed.d.ts +126 -0
- package/dist/vdt/contentWarnings/composed.d.ts.map +1 -0
- package/dist/vdt/contentWarnings/composed.js +2 -0
- package/dist/vdt/contentWarnings/composed.js.map +1 -0
- package/dist/vdt/contentWarnings/layout.d.ts +247 -0
- package/dist/vdt/contentWarnings/layout.d.ts.map +1 -0
- package/dist/vdt/contentWarnings/layout.js +2 -0
- package/dist/vdt/contentWarnings/layout.js.map +1 -0
- package/dist/vdt/contentWarnings/markup.d.ts +211 -0
- package/dist/vdt/contentWarnings/markup.d.ts.map +1 -0
- package/dist/vdt/contentWarnings/markup.js +4 -0
- package/dist/vdt/contentWarnings/markup.js.map +1 -0
- package/dist/vdt/contentWarnings/source.d.ts +216 -0
- package/dist/vdt/contentWarnings/source.d.ts.map +1 -0
- package/dist/vdt/contentWarnings/source.js +4 -0
- package/dist/vdt/contentWarnings/source.js.map +1 -0
- package/dist/vdt/contentWarnings/text.d.ts +139 -0
- package/dist/vdt/contentWarnings/text.d.ts.map +1 -0
- package/dist/vdt/contentWarnings/text.js +4 -0
- package/dist/vdt/contentWarnings/text.js.map +1 -0
- package/dist/vdt/contentWarnings.d.ts +7 -1017
- package/dist/vdt/contentWarnings.d.ts.map +1 -1
- package/dist/vdt/pages/comic.d.ts +200 -0
- package/dist/vdt/pages/comic.d.ts.map +1 -0
- package/dist/vdt/pages/comic.js +2 -0
- package/dist/vdt/pages/comic.js.map +1 -0
- package/dist/vdt/pages/composed.d.ts +282 -0
- package/dist/vdt/pages/composed.d.ts.map +1 -0
- package/dist/vdt/pages/composed.js +2 -0
- package/dist/vdt/pages/composed.js.map +1 -0
- package/dist/vdt/pages.d.ts +6 -476
- package/dist/vdt/pages.d.ts.map +1 -1
- package/dist/word/docxRead/body.d.ts +17 -0
- package/dist/word/docxRead/body.d.ts.map +1 -0
- package/dist/word/docxRead/body.js +372 -0
- package/dist/word/docxRead/body.js.map +1 -0
- package/dist/word/docxRead/parts.d.ts +27 -0
- package/dist/word/docxRead/parts.d.ts.map +1 -0
- package/dist/word/docxRead/parts.js +160 -0
- package/dist/word/docxRead/parts.js.map +1 -0
- package/dist/word/docxRead.d.ts +1 -5
- package/dist/word/docxRead.d.ts.map +1 -1
- package/dist/word/docxRead.js +5 -526
- package/dist/word/docxRead.js.map +1 -1
- package/dist/word/inline/parse.d.ts +16 -0
- package/dist/word/inline/parse.d.ts.map +1 -0
- package/dist/word/inline/parse.js +367 -0
- package/dist/word/inline/parse.js.map +1 -0
- package/dist/word/inline/render.d.ts +44 -0
- package/dist/word/inline/render.d.ts.map +1 -0
- package/dist/word/inline/render.js +296 -0
- package/dist/word/inline/render.js.map +1 -0
- package/dist/word/inline.d.ts +4 -52
- package/dist/word/inline.d.ts.map +1 -1
- package/dist/word/inline.js +2 -657
- package/dist/word/inline.js.map +1 -1
- package/dist/word/toDocx/parse.d.ts +46 -0
- package/dist/word/toDocx/parse.d.ts.map +1 -0
- package/dist/word/toDocx/parse.js +313 -0
- package/dist/word/toDocx/parse.js.map +1 -0
- package/dist/word/toDocx/styles.d.ts +63 -0
- package/dist/word/toDocx/styles.d.ts.map +1 -0
- package/dist/word/toDocx/styles.js +239 -0
- package/dist/word/toDocx/styles.js.map +1 -0
- package/dist/word/toDocx/wordml.d.ts +24 -0
- package/dist/word/toDocx/wordml.d.ts.map +1 -0
- package/dist/word/toDocx/wordml.js +114 -0
- package/dist/word/toDocx/wordml.js.map +1 -0
- package/dist/word/toDocx.d.ts +3 -25
- package/dist/word/toDocx.d.ts.map +1 -1
- package/dist/word/toDocx.js +8 -661
- package/dist/word/toDocx.js.map +1 -1
- package/dist/word/toMarkdown/converter.d.ts +57 -0
- package/dist/word/toMarkdown/converter.d.ts.map +1 -0
- package/dist/word/toMarkdown/converter.js +600 -0
- package/dist/word/toMarkdown/converter.js.map +1 -0
- package/dist/word/toMarkdown/helpers.d.ts +98 -0
- package/dist/word/toMarkdown/helpers.d.ts.map +1 -0
- package/dist/word/toMarkdown/helpers.js +153 -0
- package/dist/word/toMarkdown/helpers.js.map +1 -0
- package/dist/word/toMarkdown.d.ts +4 -64
- package/dist/word/toMarkdown.d.ts.map +1 -1
- package/dist/word/toMarkdown.js +2 -749
- package/dist/word/toMarkdown.js.map +1 -1
- package/dist/writing/bidi/chars.d.ts +61 -0
- package/dist/writing/bidi/chars.d.ts.map +1 -0
- package/dist/writing/bidi/chars.js +145 -0
- package/dist/writing/bidi/chars.js.map +1 -0
- package/dist/writing/bidi/joining.d.ts +27 -0
- package/dist/writing/bidi/joining.d.ts.map +1 -0
- package/dist/writing/bidi/joining.js +70 -0
- package/dist/writing/bidi/joining.js.map +1 -0
- package/dist/writing/bidi/paragraph.d.ts +72 -0
- package/dist/writing/bidi/paragraph.d.ts.map +1 -0
- package/dist/writing/bidi/paragraph.js +119 -0
- package/dist/writing/bidi/paragraph.js.map +1 -0
- package/dist/writing/bidi/resolve.d.ts +14 -0
- package/dist/writing/bidi/resolve.d.ts.map +1 -0
- package/dist/writing/bidi/resolve.js +413 -0
- package/dist/writing/bidi/resolve.js.map +1 -0
- package/dist/writing/bidi.d.ts +8 -147
- package/dist/writing/bidi.d.ts.map +1 -1
- package/dist/writing/bidi.js +6 -733
- package/dist/writing/bidi.js.map +1 -1
- package/package.json +1 -1
package/dist/svg/fonts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/svg/fonts.ts"],"names":[],"mappings":"AA4BA,
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/svg/fonts.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,sBAAsB,EAAE,eAAe,EAAE,mBAAmB,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC5O,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1H,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,cAAc,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/svg/fonts.js
CHANGED
|
@@ -25,651 +25,7 @@
|
|
|
25
25
|
//
|
|
26
26
|
// Single ink recolours the markup first (applySingleInkToSvg), then the
|
|
27
27
|
// faces are inlined: recolour → inline.
|
|
28
|
-
|
|
29
|
-
export
|
|
30
|
-
|
|
31
|
-
/** Generic CSS families, which never name a loadable face. */
|
|
32
|
-
const GENERIC_FAMILIES = new Set([
|
|
33
|
-
'serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'ui-serif', 'ui-sans-serif',
|
|
34
|
-
'ui-monospace', 'ui-rounded', 'emoji', 'math', 'fangsong', 'inherit', 'initial', 'unset', 'revert', 'default',
|
|
35
|
-
]);
|
|
36
|
-
/** Elements whose character data is never drawn as text. */
|
|
37
|
-
const NON_TEXT = new Set(['title', 'desc', 'metadata', 'script', 'style']);
|
|
38
|
-
// ------------------------------------------------------------ parsing
|
|
39
|
-
const ENTITIES = { amp: '&', lt: '<', gt: '>', quot: '"', apos: "'", nbsp: '\u00a0' };
|
|
40
|
-
function charOf(cp) {
|
|
41
|
-
return Number.isInteger(cp) && cp >= 0 && cp <= 0x10ffff ? String.fromCodePoint(cp) : '';
|
|
42
|
-
}
|
|
43
|
-
function decodeEntities(s) {
|
|
44
|
-
if (!s.includes('&'))
|
|
45
|
-
return s;
|
|
46
|
-
return s.replace(/&(#x[0-9a-fA-F]+|#\d+|[a-zA-Z]+);/g, (m, body) => {
|
|
47
|
-
if (body[0] === '#')
|
|
48
|
-
return charOf(body[1] === 'x' || body[1] === 'X' ? parseInt(body.slice(2), 16) : parseInt(body.slice(1), 10));
|
|
49
|
-
return ENTITIES[body] ?? m;
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function localName(name) {
|
|
53
|
-
const i = name.indexOf(':');
|
|
54
|
-
return (i < 0 ? name : name.slice(i + 1)).toLowerCase();
|
|
55
|
-
}
|
|
56
|
-
/** A `font-family` list as names, quotes stripped, generic families and
|
|
57
|
-
* CSS-wide keywords left out. */
|
|
58
|
-
export function parseFontFamilyList(value) {
|
|
59
|
-
const out = [];
|
|
60
|
-
for (const raw of value.split(',')) {
|
|
61
|
-
const name = raw.trim().replace(/^(['"])(.*)\1$/, '$2').trim();
|
|
62
|
-
if (name && !GENERIC_FAMILIES.has(name.toLowerCase()) && !out.includes(name))
|
|
63
|
-
out.push(name);
|
|
64
|
-
}
|
|
65
|
-
return out;
|
|
66
|
-
}
|
|
67
|
-
function parseWeight(value, inherited) {
|
|
68
|
-
const v = value.trim().toLowerCase();
|
|
69
|
-
if (v === 'normal')
|
|
70
|
-
return 400;
|
|
71
|
-
if (v === 'bold')
|
|
72
|
-
return 700;
|
|
73
|
-
if (v === 'bolder')
|
|
74
|
-
return inherited < 400 ? 400 : inherited < 600 ? 700 : 900;
|
|
75
|
-
if (v === 'lighter')
|
|
76
|
-
return inherited < 600 ? 100 : inherited < 800 ? 400 : 700;
|
|
77
|
-
const n = Number(v);
|
|
78
|
-
return Number.isFinite(n) && n >= 1 && n <= 1000 ? n : null;
|
|
79
|
-
}
|
|
80
|
-
function parseStyle(value) {
|
|
81
|
-
const v = value.trim().toLowerCase();
|
|
82
|
-
if (v === 'normal')
|
|
83
|
-
return 'normal';
|
|
84
|
-
if (v.startsWith('italic') || v.startsWith('oblique'))
|
|
85
|
-
return 'italic';
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
/** CSS declarations of a `style` attribute or rule body, lower-cased names. */
|
|
89
|
-
function declarations(css) {
|
|
90
|
-
const out = [];
|
|
91
|
-
for (const decl of css.split(';')) {
|
|
92
|
-
const i = decl.indexOf(':');
|
|
93
|
-
if (i < 0)
|
|
94
|
-
continue;
|
|
95
|
-
const name = decl.slice(0, i).trim().toLowerCase();
|
|
96
|
-
const value = decl.slice(i + 1).replace(/!important\s*$/i, '').trim();
|
|
97
|
-
if (name)
|
|
98
|
-
out.push([name, value]);
|
|
99
|
-
}
|
|
100
|
-
return out;
|
|
101
|
-
}
|
|
102
|
-
/** The `font` shorthand: `[style] [variant] [weight] size[/line-height]
|
|
103
|
-
* family-list`. */
|
|
104
|
-
function parseFontShorthand(value, ctx) {
|
|
105
|
-
const m = /^(.*?)(?:^|\s)(?:[\d.]+(?:px|pt|em|rem|%|ex|ch|mm|cm|in|pc|q|vh|vw)|0|xx-small|x-small|small|medium|large|x-large|xx-large|smaller|larger)(?:\s*\/\s*\S+)?\s+(.+)$/i.exec(value.trim());
|
|
106
|
-
if (!m)
|
|
107
|
-
return null;
|
|
108
|
-
const out = { families: parseFontFamilyList(m[2]), weight: 400, style: 'normal' };
|
|
109
|
-
for (const word of m[1].trim().split(/\s+/)) {
|
|
110
|
-
if (!word)
|
|
111
|
-
continue;
|
|
112
|
-
const style = parseStyle(word);
|
|
113
|
-
if (style && word.toLowerCase() !== 'normal')
|
|
114
|
-
out.style = style;
|
|
115
|
-
const weight = parseWeight(word, ctx.weight);
|
|
116
|
-
if (weight !== null && word.toLowerCase() !== 'normal')
|
|
117
|
-
out.weight = weight;
|
|
118
|
-
}
|
|
119
|
-
return out;
|
|
120
|
-
}
|
|
121
|
-
/** Apply font properties (attributes, then `style`, which wins) to an
|
|
122
|
-
* inherited context. */
|
|
123
|
-
function applyFontProps(ctx, props) {
|
|
124
|
-
let next = ctx;
|
|
125
|
-
for (const [name, value] of props) {
|
|
126
|
-
if (name === 'font-family') {
|
|
127
|
-
next = { ...next, families: parseFontFamilyList(value) };
|
|
128
|
-
}
|
|
129
|
-
else if (name === 'font-weight') {
|
|
130
|
-
const w = parseWeight(value, next.weight);
|
|
131
|
-
if (w !== null)
|
|
132
|
-
next = { ...next, weight: w };
|
|
133
|
-
}
|
|
134
|
-
else if (name === 'font-style') {
|
|
135
|
-
const s = parseStyle(value);
|
|
136
|
-
if (s)
|
|
137
|
-
next = { ...next, style: s };
|
|
138
|
-
}
|
|
139
|
-
else if (name === 'font') {
|
|
140
|
-
const f = parseFontShorthand(value, next);
|
|
141
|
-
if (f)
|
|
142
|
-
next = { ...next, ...f };
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
return next;
|
|
146
|
-
}
|
|
147
|
-
/** A start tag's attributes. */
|
|
148
|
-
function parseAttributes(tag) {
|
|
149
|
-
const attrs = new Map();
|
|
150
|
-
const re = /([^\s=/>]+)\s*=\s*("([^"]*)"|'([^']*)')/g;
|
|
151
|
-
for (const m of tag.matchAll(re))
|
|
152
|
-
attrs.set(m[1].toLowerCase(), decodeEntities(m[3] ?? m[4] ?? ''));
|
|
153
|
-
return attrs;
|
|
154
|
-
}
|
|
155
|
-
/** Strip CSS comments. */
|
|
156
|
-
function stripCssComments(css) {
|
|
157
|
-
return css.replace(/\/\*[\s\S]*?\*\//g, '');
|
|
158
|
-
}
|
|
159
|
-
/** The rules of a style sheet, `@font-face` ones apart: top-level
|
|
160
|
-
* `prelude { body }` pairs (an at-rule block such as `@media` is opened
|
|
161
|
-
* and its rules read in turn). */
|
|
162
|
-
function cssRules(css) {
|
|
163
|
-
const out = [];
|
|
164
|
-
const text = stripCssComments(css);
|
|
165
|
-
let i = 0;
|
|
166
|
-
while (i < text.length) {
|
|
167
|
-
const open = text.indexOf('{', i);
|
|
168
|
-
if (open < 0)
|
|
169
|
-
break;
|
|
170
|
-
const prelude = text.slice(i, open).trim();
|
|
171
|
-
// The matching brace, counting nested blocks.
|
|
172
|
-
let depth = 1;
|
|
173
|
-
let j = open + 1;
|
|
174
|
-
for (; j < text.length && depth > 0; j++) {
|
|
175
|
-
if (text[j] === '{')
|
|
176
|
-
depth++;
|
|
177
|
-
else if (text[j] === '}')
|
|
178
|
-
depth--;
|
|
179
|
-
}
|
|
180
|
-
const body = text.slice(open + 1, j - 1);
|
|
181
|
-
if (/^@(media|supports|layer|container)\b/i.test(prelude))
|
|
182
|
-
out.push(...cssRules(body));
|
|
183
|
-
else
|
|
184
|
-
out.push({ prelude, body });
|
|
185
|
-
i = j;
|
|
186
|
-
}
|
|
187
|
-
return out;
|
|
188
|
-
}
|
|
189
|
-
/** Whether a style sheet holds nothing but `@font-face` rules (comments
|
|
190
|
-
* and whitespace aside): the faces an author embedded, which change no
|
|
191
|
-
* geometry. */
|
|
192
|
-
export function isFontFaceOnlyStyleSheet(css) {
|
|
193
|
-
const text = stripCssComments(css.replace(/<!\[CDATA\[|\]\]>/g, ''));
|
|
194
|
-
if (text.trim() === '')
|
|
195
|
-
return true;
|
|
196
|
-
const rules = cssRules(text);
|
|
197
|
-
if (rules.length === 0)
|
|
198
|
-
return false;
|
|
199
|
-
// Whatever lies outside the rule blocks must be blank.
|
|
200
|
-
const outside = text.replace(/\{[^{}]*\}/g, '').replace(/@font-face/gi, '');
|
|
201
|
-
return outside.trim() === '' && rules.every((r) => /^@font-face$/i.test(r.prelude));
|
|
202
|
-
}
|
|
203
|
-
function scanSvgFonts(svgText) {
|
|
204
|
-
const byKey = new Map();
|
|
205
|
-
const order = [];
|
|
206
|
-
const declared = new Set();
|
|
207
|
-
const sheets = [];
|
|
208
|
-
const allCodePoints = new Set([0x20]);
|
|
209
|
-
const note = (ctx, text) => {
|
|
210
|
-
if (ctx.families.length === 0)
|
|
211
|
-
return;
|
|
212
|
-
const key = `${ctx.families.join('\u0000')}|${ctx.weight}|${ctx.style}`;
|
|
213
|
-
let req = byKey.get(key);
|
|
214
|
-
if (!req) {
|
|
215
|
-
req = { families: [...ctx.families], weight: ctx.weight, style: ctx.style, codePoints: new Set([0x20]) };
|
|
216
|
-
byKey.set(key, req);
|
|
217
|
-
order.push(req);
|
|
218
|
-
}
|
|
219
|
-
for (const ch of text) {
|
|
220
|
-
const cp = ch.codePointAt(0);
|
|
221
|
-
if (cp > 0x20)
|
|
222
|
-
req.codePoints.add(cp);
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
const root = { families: [], weight: 400, style: 'normal' };
|
|
226
|
-
const stack = [];
|
|
227
|
-
const top = () => stack[stack.length - 1];
|
|
228
|
-
const onText = (raw, isCdata) => {
|
|
229
|
-
const t = top();
|
|
230
|
-
if (!t)
|
|
231
|
-
return;
|
|
232
|
-
const text = isCdata ? raw : decodeEntities(raw);
|
|
233
|
-
if (t.name === 'style') {
|
|
234
|
-
sheets.push(text);
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
if (t.nonText || !t.inText)
|
|
238
|
-
return;
|
|
239
|
-
for (const ch of text) {
|
|
240
|
-
const cp = ch.codePointAt(0);
|
|
241
|
-
if (cp > 0x20)
|
|
242
|
-
allCodePoints.add(cp);
|
|
243
|
-
}
|
|
244
|
-
note(t.ctx, text);
|
|
245
|
-
};
|
|
246
|
-
const n = svgText.length;
|
|
247
|
-
let i = 0;
|
|
248
|
-
while (i < n) {
|
|
249
|
-
const lt = svgText.indexOf('<', i);
|
|
250
|
-
if (lt < 0) {
|
|
251
|
-
onText(svgText.slice(i), false);
|
|
252
|
-
break;
|
|
253
|
-
}
|
|
254
|
-
if (lt > i)
|
|
255
|
-
onText(svgText.slice(i, lt), false);
|
|
256
|
-
i = lt;
|
|
257
|
-
if (svgText.startsWith('<!--', i)) {
|
|
258
|
-
const end = svgText.indexOf('-->', i + 4);
|
|
259
|
-
i = end < 0 ? n : end + 3;
|
|
260
|
-
continue;
|
|
261
|
-
}
|
|
262
|
-
if (svgText.startsWith('<![CDATA[', i)) {
|
|
263
|
-
const end = svgText.indexOf(']]>', i + 9);
|
|
264
|
-
onText(svgText.slice(i + 9, end < 0 ? n : end), true);
|
|
265
|
-
i = end < 0 ? n : end + 3;
|
|
266
|
-
continue;
|
|
267
|
-
}
|
|
268
|
-
if (svgText.startsWith('<?', i)) {
|
|
269
|
-
const end = svgText.indexOf('?>', i + 2);
|
|
270
|
-
i = end < 0 ? n : end + 2;
|
|
271
|
-
continue;
|
|
272
|
-
}
|
|
273
|
-
if (svgText.startsWith('<!', i)) {
|
|
274
|
-
let depth = 0;
|
|
275
|
-
let j = i + 2;
|
|
276
|
-
for (; j < n; j++) {
|
|
277
|
-
const ch = svgText[j];
|
|
278
|
-
if (ch === '[')
|
|
279
|
-
depth++;
|
|
280
|
-
else if (ch === ']')
|
|
281
|
-
depth--;
|
|
282
|
-
else if (ch === '>' && depth === 0)
|
|
283
|
-
break;
|
|
284
|
-
}
|
|
285
|
-
i = j + 1;
|
|
286
|
-
continue;
|
|
287
|
-
}
|
|
288
|
-
if (svgText.startsWith('</', i)) {
|
|
289
|
-
const end = svgText.indexOf('>', i + 2);
|
|
290
|
-
const name = localName(svgText.slice(i + 2, end < 0 ? n : end).trim());
|
|
291
|
-
// Pop to the matching element (tolerates sloppy markup).
|
|
292
|
-
for (let k = stack.length - 1; k >= 0; k--) {
|
|
293
|
-
if (stack[k].name === name) {
|
|
294
|
-
stack.length = k;
|
|
295
|
-
break;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
i = end < 0 ? n : end + 1;
|
|
299
|
-
continue;
|
|
300
|
-
}
|
|
301
|
-
// A start tag: find its end outside quoted attribute values.
|
|
302
|
-
let j = i + 1;
|
|
303
|
-
let quote = null;
|
|
304
|
-
for (; j < n; j++) {
|
|
305
|
-
const ch = svgText[j];
|
|
306
|
-
if (quote) {
|
|
307
|
-
if (ch === quote)
|
|
308
|
-
quote = null;
|
|
309
|
-
}
|
|
310
|
-
else if (ch === '"' || ch === "'") {
|
|
311
|
-
quote = ch;
|
|
312
|
-
}
|
|
313
|
-
else if (ch === '>') {
|
|
314
|
-
break;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
const tag = svgText.slice(i + 1, j);
|
|
318
|
-
i = j + 1;
|
|
319
|
-
const selfClosing = tag.endsWith('/');
|
|
320
|
-
const nameMatch = /^([^\s/>]+)/.exec(tag);
|
|
321
|
-
if (!nameMatch)
|
|
322
|
-
continue;
|
|
323
|
-
const name = localName(nameMatch[1]);
|
|
324
|
-
const parent = top();
|
|
325
|
-
const attrs = parseAttributes(tag);
|
|
326
|
-
const props = [];
|
|
327
|
-
for (const key of ['font-family', 'font-weight', 'font-style']) {
|
|
328
|
-
const v = attrs.get(key);
|
|
329
|
-
if (v !== undefined)
|
|
330
|
-
props.push([key, v]);
|
|
331
|
-
}
|
|
332
|
-
const style = attrs.get('style');
|
|
333
|
-
if (style)
|
|
334
|
-
props.push(...declarations(style));
|
|
335
|
-
const ctx = applyFontProps(parent?.ctx ?? root, props);
|
|
336
|
-
const entry = {
|
|
337
|
-
name,
|
|
338
|
-
ctx,
|
|
339
|
-
inText: (parent?.inText ?? false) || name === 'text',
|
|
340
|
-
nonText: (parent?.nonText ?? false) || NON_TEXT.has(name),
|
|
341
|
-
};
|
|
342
|
-
if (!selfClosing)
|
|
343
|
-
stack.push(entry);
|
|
344
|
-
}
|
|
345
|
-
// Style sheets: `@font-face` rules declare families; a rule that names a
|
|
346
|
-
// family is taken to style the SVG's text (its selector is not matched).
|
|
347
|
-
for (const sheet of sheets) {
|
|
348
|
-
for (const rule of cssRules(sheet)) {
|
|
349
|
-
const decls = declarations(rule.body);
|
|
350
|
-
if (/^@font-face$/i.test(rule.prelude)) {
|
|
351
|
-
for (const [name, value] of decls) {
|
|
352
|
-
if (name === 'font-family')
|
|
353
|
-
for (const f of parseFontFamilyList(value))
|
|
354
|
-
declared.add(f.toLowerCase());
|
|
355
|
-
}
|
|
356
|
-
continue;
|
|
357
|
-
}
|
|
358
|
-
if (rule.prelude.startsWith('@'))
|
|
359
|
-
continue;
|
|
360
|
-
const ctx = applyFontProps(root, decls);
|
|
361
|
-
if (ctx.families.length > 0 && decls.some(([k]) => k === 'font-family' || k === 'font')) {
|
|
362
|
-
note(ctx, String.fromCodePoint(...allCodePoints));
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
return { requests: order, declared };
|
|
367
|
-
}
|
|
368
|
-
/** Every `(families, weight, style)` the SVG's text runs ask for, with
|
|
369
|
-
* the characters each sets, from `font-family`, `font-weight`,
|
|
370
|
-
* `font-style` and `font` in attributes, `style` attributes and inherited
|
|
371
|
-
* from enclosing elements. A `<style>` rule that names a family counts
|
|
372
|
-
* too (with all the SVG's characters: its selector is not matched).
|
|
373
|
-
* Generic families are ignored, and so is text in `<title>`, `<desc>`
|
|
374
|
-
* and the like. Pure. */
|
|
375
|
-
export function svgFontRequests(svgText) {
|
|
376
|
-
return scanSvgFonts(svgText).requests;
|
|
377
|
-
}
|
|
378
|
-
/** Families the SVG declares in its own `@font-face` rules, as written. */
|
|
379
|
-
export function svgDeclaredFontFamilies(svgText) {
|
|
380
|
-
return [...scanSvgFonts(svgText).declared];
|
|
381
|
-
}
|
|
382
|
-
// ------------------------------------------------------------ files
|
|
383
|
-
/** The format of a font file from its first bytes; null for one an
|
|
384
|
-
* `@font-face` cannot carry (a collection, an unknown file). */
|
|
385
|
-
export function sniffFontFormat(bytes) {
|
|
386
|
-
if (bytes.length < 4)
|
|
387
|
-
return null;
|
|
388
|
-
const tag = String.fromCharCode(bytes[0], bytes[1], bytes[2], bytes[3]);
|
|
389
|
-
if (tag === 'wOF2')
|
|
390
|
-
return 'woff2';
|
|
391
|
-
if (tag === 'wOFF')
|
|
392
|
-
return 'woff';
|
|
393
|
-
if (tag === 'OTTO')
|
|
394
|
-
return 'otf';
|
|
395
|
-
if (tag === 'true' || (bytes[0] === 0 && bytes[1] === 1 && bytes[2] === 0 && bytes[3] === 0))
|
|
396
|
-
return 'ttf';
|
|
397
|
-
return null;
|
|
398
|
-
}
|
|
399
|
-
const MIME = { woff2: 'font/woff2', woff: 'font/woff', ttf: 'font/ttf', otf: 'font/otf' };
|
|
400
|
-
const CSS_FORMAT = { woff2: 'woff2', woff: 'woff', ttf: 'truetype', otf: 'opentype' };
|
|
401
|
-
const base64Cache = new WeakMap();
|
|
402
|
-
function toBase64(bytes) {
|
|
403
|
-
const cached = base64Cache.get(bytes);
|
|
404
|
-
if (cached !== undefined)
|
|
405
|
-
return cached;
|
|
406
|
-
let binary = '';
|
|
407
|
-
for (let i = 0; i < bytes.length; i += 0x8000) {
|
|
408
|
-
binary += String.fromCharCode.apply(null, Array.from(bytes.subarray(i, i + 0x8000)));
|
|
409
|
-
}
|
|
410
|
-
const out = btoa(binary);
|
|
411
|
-
base64Cache.set(bytes, out);
|
|
412
|
-
return out;
|
|
413
|
-
}
|
|
414
|
-
/** One `@font-face` rule with the file as a data URI. */
|
|
415
|
-
export function fontFaceRule(family, weight, style, bytes, format = sniffFontFormat(bytes) ?? 'ttf') {
|
|
416
|
-
const name = family.replace(/["\\]/g, '');
|
|
417
|
-
return `@font-face{font-family:"${name}";font-weight:${weight};font-style:${style};`
|
|
418
|
-
+ `src:url(data:${MIME[format]};base64,${toBase64(bytes)}) format("${CSS_FORMAT[format]}")}`;
|
|
419
|
-
}
|
|
420
|
-
/** Insert `css` as a `<style>` right after the root `<svg …>` start tag.
|
|
421
|
-
* Pure; the markup is returned unchanged when there is no root tag (or
|
|
422
|
-
* an empty self-closing one, which has no text). */
|
|
423
|
-
export function injectSvgStyle(svgText, css) {
|
|
424
|
-
if (!css)
|
|
425
|
-
return svgText;
|
|
426
|
-
const m = /<(?:[a-zA-Z_][\w.-]*:)?svg\b(?:[^>"']|"[^"]*"|'[^']*')*?(\/?)>/.exec(svgText);
|
|
427
|
-
if (!m || m[1] === '/')
|
|
428
|
-
return svgText;
|
|
429
|
-
const at = m.index + m[0].length;
|
|
430
|
-
const cdata = `<![CDATA[${css.replace(/]]>/g, ']]]]><![CDATA[>')}]]>`;
|
|
431
|
-
return `${svgText.slice(0, at)}<style type="text/css">${cdata}</style>${svgText.slice(at)}`;
|
|
432
|
-
}
|
|
433
|
-
const faceKey = (family, weight, style) => `${family.toLowerCase()}|${weight}|${style}`;
|
|
434
|
-
/** The plan of an inlining: the faces to look up, then (given their
|
|
435
|
-
* files) the CSS and the report. Shared by the async and sync paths. */
|
|
436
|
-
function planInlining(svgText) {
|
|
437
|
-
const scan = scanSvgFonts(svgText);
|
|
438
|
-
const jobs = new Map();
|
|
439
|
-
for (const req of scan.requests) {
|
|
440
|
-
if (req.families.some((f) => scan.declared.has(f.toLowerCase())))
|
|
441
|
-
continue;
|
|
442
|
-
for (const family of req.families) {
|
|
443
|
-
const key = faceKey(family, req.weight, req.style);
|
|
444
|
-
let job = jobs.get(key);
|
|
445
|
-
if (!job) {
|
|
446
|
-
job = { family, weight: req.weight, style: req.style, codePoints: new Set() };
|
|
447
|
-
jobs.set(key, job);
|
|
448
|
-
}
|
|
449
|
-
for (const cp of req.codePoints)
|
|
450
|
-
job.codePoints.add(cp);
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
return { scan, jobs };
|
|
454
|
-
}
|
|
455
|
-
function asFiles(answer, formats) {
|
|
456
|
-
const list = Array.isArray(answer) ? answer : answer ? [answer] : [];
|
|
457
|
-
const out = [];
|
|
458
|
-
for (const bytes of list) {
|
|
459
|
-
if (!(bytes instanceof Uint8Array) || bytes.length === 0)
|
|
460
|
-
continue;
|
|
461
|
-
const format = sniffFontFormat(bytes);
|
|
462
|
-
if (format && formats.includes(format))
|
|
463
|
-
out.push({ bytes, format });
|
|
464
|
-
}
|
|
465
|
-
return out;
|
|
466
|
-
}
|
|
467
|
-
function finishInlining(svgText, plan, files, withheldFamilies, options, standIns = new Map()) {
|
|
468
|
-
const maxBytes = options?.maxBytes ?? DEFAULT_SVG_FONT_MAX_BYTES;
|
|
469
|
-
const faces = [];
|
|
470
|
-
const reported = new Set();
|
|
471
|
-
const report = (r) => {
|
|
472
|
-
const key = faceKey(r.family, r.weight, r.style);
|
|
473
|
-
if (reported.has(key))
|
|
474
|
-
return;
|
|
475
|
-
reported.add(key);
|
|
476
|
-
faces.push(r);
|
|
477
|
-
};
|
|
478
|
-
/** Faces chosen to embed, in order. */
|
|
479
|
-
const chosen = [];
|
|
480
|
-
const chosenKeys = new Set();
|
|
481
|
-
const unavailable = [];
|
|
482
|
-
for (const req of plan.scan.requests) {
|
|
483
|
-
const declared = req.families.find((f) => plan.scan.declared.has(f.toLowerCase()));
|
|
484
|
-
if (declared) {
|
|
485
|
-
report({ family: declared, weight: req.weight, style: req.style, status: 'declared' });
|
|
486
|
-
continue;
|
|
487
|
-
}
|
|
488
|
-
let resolved = false;
|
|
489
|
-
for (const family of req.families) {
|
|
490
|
-
if (withheldFamilies.has(family.toLowerCase())) {
|
|
491
|
-
report({ family, weight: req.weight, style: req.style, status: 'withheld' });
|
|
492
|
-
continue;
|
|
493
|
-
}
|
|
494
|
-
const key = faceKey(family, req.weight, req.style);
|
|
495
|
-
const found = files.get(key);
|
|
496
|
-
if (!found || found.length === 0)
|
|
497
|
-
continue;
|
|
498
|
-
if (!chosenKeys.has(key)) {
|
|
499
|
-
chosenKeys.add(key);
|
|
500
|
-
chosen.push({ family, weight: req.weight, style: req.style, files: found });
|
|
501
|
-
const stands = standIns.get(family.toLowerCase());
|
|
502
|
-
report({ family, weight: req.weight, style: req.style, status: 'inlined', ...(stands ? { standIn: stands } : {}) });
|
|
503
|
-
}
|
|
504
|
-
resolved = true;
|
|
505
|
-
break;
|
|
506
|
-
}
|
|
507
|
-
if (!resolved && !req.families.some((f) => withheldFamilies.has(f.toLowerCase()))) {
|
|
508
|
-
const first = req.families[0];
|
|
509
|
-
const key = faceKey(first, req.weight, req.style);
|
|
510
|
-
if (!reported.has(key))
|
|
511
|
-
unavailable.push({ family: first, weight: req.weight, style: req.style, status: 'unavailable' });
|
|
512
|
-
report({ family: first, weight: req.weight, style: req.style, status: 'unavailable' });
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
// One rule per distinct file of a family: a file the provider answered
|
|
516
|
-
// for several weights (the nearest it has) is embedded once, declared
|
|
517
|
-
// for the range of weights it stands for.
|
|
518
|
-
const rules = [];
|
|
519
|
-
for (const face of chosen) {
|
|
520
|
-
for (const file of face.files) {
|
|
521
|
-
const same = rules.find((r) => r.bytes === file.bytes && r.style === face.style && r.family.toLowerCase() === face.family.toLowerCase());
|
|
522
|
-
if (same) {
|
|
523
|
-
if (!same.weights.includes(face.weight))
|
|
524
|
-
same.weights.push(face.weight);
|
|
525
|
-
}
|
|
526
|
-
else {
|
|
527
|
-
rules.push({ family: face.family, weights: [face.weight], style: face.style, bytes: file.bytes, format: file.format });
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
const total = rules.reduce((sum, r) => sum + r.bytes.length, 0);
|
|
532
|
-
const sizeOf = (face) => ({
|
|
533
|
-
bytes: face.files.reduce((s, f) => s + f.bytes.length, 0),
|
|
534
|
-
files: face.files.length,
|
|
535
|
-
});
|
|
536
|
-
for (const w of unavailable)
|
|
537
|
-
options?.onWarning?.({ kind: 'svgFontUnavailable', family: w.family, weight: w.weight, style: w.style });
|
|
538
|
-
const tooLarge = total > maxBytes;
|
|
539
|
-
for (const face of chosen) {
|
|
540
|
-
const r = faces.find((f) => f.status === 'inlined' && faceKey(f.family, f.weight, f.style) === faceKey(face.family, face.weight, face.style));
|
|
541
|
-
if (r)
|
|
542
|
-
Object.assign(r, { status: tooLarge ? 'tooLarge' : 'inlined', ...sizeOf(face) });
|
|
543
|
-
}
|
|
544
|
-
if (tooLarge) {
|
|
545
|
-
options?.onWarning?.({ kind: 'svgFontsTooLarge', bytes: total, maxBytes });
|
|
546
|
-
return { svg: svgText, faces, bytes: 0 };
|
|
547
|
-
}
|
|
548
|
-
if (rules.length === 0)
|
|
549
|
-
return { svg: svgText, faces, bytes: 0 };
|
|
550
|
-
const css = rules.map((r) => {
|
|
551
|
-
const lo = Math.min(...r.weights);
|
|
552
|
-
const hi = Math.max(...r.weights);
|
|
553
|
-
return fontFaceRule(r.family, lo === hi ? lo : `${lo} ${hi}`, r.style, r.bytes, r.format);
|
|
554
|
-
}).join('');
|
|
555
|
-
return { svg: injectSvgStyle(svgText, css), faces, bytes: total };
|
|
556
|
-
}
|
|
557
|
-
/** The families `withhold` names that have no stand-in (told to
|
|
558
|
-
* `onWithheld`), and those that have one, by lower-case name, with the
|
|
559
|
-
* family that stands in for them (#993). */
|
|
560
|
-
function withheldOf(jobs, options) {
|
|
561
|
-
const withheld = new Set();
|
|
562
|
-
const standIns = new Map();
|
|
563
|
-
if (!options?.withhold)
|
|
564
|
-
return { withheld, standIns };
|
|
565
|
-
for (const job of jobs.values()) {
|
|
566
|
-
const lower = job.family.toLowerCase();
|
|
567
|
-
if (withheld.has(lower) || standIns.has(lower) || !options.withhold(job.family))
|
|
568
|
-
continue;
|
|
569
|
-
const stands = options.standIn?.(job.family)?.trim();
|
|
570
|
-
if (stands && stands.toLowerCase() !== lower) {
|
|
571
|
-
standIns.set(lower, stands);
|
|
572
|
-
continue;
|
|
573
|
-
}
|
|
574
|
-
withheld.add(lower);
|
|
575
|
-
options.onWithheld?.(job.family);
|
|
576
|
-
}
|
|
577
|
-
return { withheld, standIns };
|
|
578
|
-
}
|
|
579
|
-
/** The name a face is looked up under: its stand-in's for a family left to
|
|
580
|
-
* one. */
|
|
581
|
-
function askedFamily(job, standIns) {
|
|
582
|
-
return standIns.get(job.family.toLowerCase()) ?? job.family;
|
|
583
|
-
}
|
|
584
|
-
/** A family whose stand-in the provider has no face of, for some of the
|
|
585
|
-
* faces the SVG asks, is left out whole (as if it had none): a picture
|
|
586
|
-
* set half in the open face and half in the reader's is worse than either.
|
|
587
|
-
* Told to `onWithheld` like any family left out. */
|
|
588
|
-
function settleStandIns(jobs, files, standIns, withheld, options) {
|
|
589
|
-
for (const lower of [...standIns.keys()]) {
|
|
590
|
-
const mine = [...jobs].filter(([, job]) => job.family.toLowerCase() === lower);
|
|
591
|
-
if (mine.every(([key]) => (files.get(key)?.length ?? 0) > 0))
|
|
592
|
-
continue;
|
|
593
|
-
for (const [key] of mine)
|
|
594
|
-
files.delete(key);
|
|
595
|
-
standIns.delete(lower);
|
|
596
|
-
withheld.add(lower);
|
|
597
|
-
options?.onWithheld?.(mine[0][1].family);
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
/**
|
|
601
|
-
* Embed the faces an SVG's text asks for (see the module comment), with
|
|
602
|
-
* a report of each face. The provider is asked once per face, with the
|
|
603
|
-
* characters the SVG sets in it; a face it rejects falls through the
|
|
604
|
-
* run's `font-family` list, and a run none of whose families has a face
|
|
605
|
-
* is reported as `svgFontUnavailable`.
|
|
606
|
-
*/
|
|
607
|
-
export async function inlineSvgFontsDetailed(svgText, provider, options) {
|
|
608
|
-
const plan = planInlining(svgText);
|
|
609
|
-
if (plan.scan.requests.length === 0)
|
|
610
|
-
return { svg: svgText, faces: [], bytes: 0 };
|
|
611
|
-
const { withheld, standIns } = withheldOf(plan.jobs, options);
|
|
612
|
-
const formats = options?.formats ?? ALL_FORMATS;
|
|
613
|
-
const files = new Map();
|
|
614
|
-
await Promise.all([...plan.jobs].map(async ([key, job]) => {
|
|
615
|
-
if (withheld.has(job.family.toLowerCase()))
|
|
616
|
-
return;
|
|
617
|
-
const answer = await provider(askedFamily(job, standIns), job.weight, job.style, { codePoints: job.codePoints }).catch(() => null);
|
|
618
|
-
files.set(key, asFiles(answer, formats));
|
|
619
|
-
}));
|
|
620
|
-
settleStandIns(plan.jobs, files, standIns, withheld, options);
|
|
621
|
-
return finishInlining(svgText, plan, files, withheld, options, standIns);
|
|
622
|
-
}
|
|
623
|
-
/** {@link inlineSvgFontsDetailed} from a provider that answers from
|
|
624
|
-
* memory, for hosts that build their URLs synchronously
|
|
625
|
-
* (`bundleImageUrl`, `renderToHtml`). */
|
|
626
|
-
export function inlineSvgFontsDetailedSync(svgText, provider, options) {
|
|
627
|
-
const plan = planInlining(svgText);
|
|
628
|
-
if (plan.scan.requests.length === 0)
|
|
629
|
-
return { svg: svgText, faces: [], bytes: 0 };
|
|
630
|
-
const { withheld, standIns } = withheldOf(plan.jobs, options);
|
|
631
|
-
const formats = options?.formats ?? ALL_FORMATS;
|
|
632
|
-
const files = new Map();
|
|
633
|
-
for (const [key, job] of plan.jobs) {
|
|
634
|
-
if (withheld.has(job.family.toLowerCase()))
|
|
635
|
-
continue;
|
|
636
|
-
let answer = null;
|
|
637
|
-
try {
|
|
638
|
-
answer = provider(askedFamily(job, standIns), job.weight, job.style, { codePoints: job.codePoints });
|
|
639
|
-
}
|
|
640
|
-
catch {
|
|
641
|
-
answer = null;
|
|
642
|
-
}
|
|
643
|
-
files.set(key, asFiles(answer, formats));
|
|
644
|
-
}
|
|
645
|
-
settleStandIns(plan.jobs, files, standIns, withheld, options);
|
|
646
|
-
return finishInlining(svgText, plan, files, withheld, options, standIns);
|
|
647
|
-
}
|
|
648
|
-
/** Embed the faces an SVG's text asks for as `@font-face` data URIs and
|
|
649
|
-
* return the markup (see {@link inlineSvgFontsDetailed}). */
|
|
650
|
-
export async function inlineSvgFonts(svgText, provider, options) {
|
|
651
|
-
return (await inlineSvgFontsDetailed(svgText, provider, options)).svg;
|
|
652
|
-
}
|
|
653
|
-
/** {@link inlineSvgFonts} from a provider that answers from memory. */
|
|
654
|
-
export function inlineSvgFontsSync(svgText, provider, options) {
|
|
655
|
-
return inlineSvgFontsDetailedSync(svgText, provider, options).svg;
|
|
656
|
-
}
|
|
657
|
-
/** Providers tried in order: the first that answers wins. */
|
|
658
|
-
export function chainSvgFontProviders(...providers) {
|
|
659
|
-
const list = providers.filter((p) => !!p);
|
|
660
|
-
return async (family, weight, style, request) => {
|
|
661
|
-
let last = new Error(`No face for "${family}"`);
|
|
662
|
-
for (const p of list) {
|
|
663
|
-
try {
|
|
664
|
-
const answer = await p(family, weight, style, request);
|
|
665
|
-
if (Array.isArray(answer) ? answer.length > 0 : answer && answer.length > 0)
|
|
666
|
-
return answer;
|
|
667
|
-
}
|
|
668
|
-
catch (err) {
|
|
669
|
-
last = err;
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
throw last;
|
|
673
|
-
};
|
|
674
|
-
}
|
|
28
|
+
export { DEFAULT_SVG_FONT_MAX_BYTES } from './fonts/types.js';
|
|
29
|
+
export { parseFontFamilyList, isFontFaceOnlyStyleSheet, svgFontRequests, svgDeclaredFontFamilies } from './fonts/scan.js';
|
|
30
|
+
export { sniffFontFormat, fontFaceRule, injectSvgStyle, inlineSvgFontsDetailed, inlineSvgFontsDetailedSync, inlineSvgFonts, inlineSvgFontsSync, chainSvgFontProviders } from './fonts/inline.js';
|
|
675
31
|
//# sourceMappingURL=fonts.js.map
|