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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/** A resource block's texts (#429): each table cell, the caption and the
|
|
2
|
+
* note, painted from their own fonts. Their lines carry their alignment
|
|
3
|
+
* (the measurer pushed a centred or right-aligned line over by its
|
|
4
|
+
* slack), so they are read flush from their start. The "continued"
|
|
5
|
+
* marker of a table slice holds no annotations. */
|
|
6
|
+
export function resourceTextGroups(block, at) {
|
|
7
|
+
const rb = block.resourceBlock;
|
|
8
|
+
if (!rb)
|
|
9
|
+
return [];
|
|
10
|
+
const groups = [];
|
|
11
|
+
const add = (lines, fonts, key) => {
|
|
12
|
+
const first = lines[0];
|
|
13
|
+
if (!first || !lines.some((l) => l.segments?.some((s) => s.cjkMarks || s.ruby)))
|
|
14
|
+
return;
|
|
15
|
+
groups.push({
|
|
16
|
+
lines,
|
|
17
|
+
like: { bbox: first.bbox, textAlign: 'left', ...fonts },
|
|
18
|
+
pageIndex: block.pageIndex,
|
|
19
|
+
where: `${block.id}:${key}`,
|
|
20
|
+
at,
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const t = rb.table;
|
|
24
|
+
if (t) {
|
|
25
|
+
t.cells.forEach((cell, i) => add(cell.lines, cell.isHeader
|
|
26
|
+
? { fontString: t.headerFontString, boldFontString: t.headerBoldFontString, italicFontString: t.headerItalicFontString, boldItalicFontString: t.headerBoldItalicFontString }
|
|
27
|
+
: { fontString: t.fontString, boldFontString: t.boldFontString, italicFontString: t.italicFontString, boldItalicFontString: t.boldItalicFontString }, `c${i}`));
|
|
28
|
+
}
|
|
29
|
+
add(rb.captionLines, { fontString: rb.captionFontString, boldFontString: rb.captionBoldFontString, italicFontString: rb.captionItalicFontString, boldItalicFontString: rb.captionBoldItalicFontString }, 'caption');
|
|
30
|
+
add(rb.noteLines, { fontString: rb.noteFontString, boldFontString: rb.noteBoldFontString, italicFontString: rb.noteItalicFontString, boldItalicFontString: rb.noteBoldItalicFontString }, 'note');
|
|
31
|
+
return groups;
|
|
32
|
+
}
|
|
33
|
+
/** The blocks of a document that hold a resource: in the flow and floated
|
|
34
|
+
* (`VDTPage.floats`), each once. */
|
|
35
|
+
export function resourceBlocksOf(doc) {
|
|
36
|
+
const seen = new Set();
|
|
37
|
+
for (const block of doc.blocks)
|
|
38
|
+
if (block.resourceBlock)
|
|
39
|
+
seen.add(block);
|
|
40
|
+
for (const page of doc.pages)
|
|
41
|
+
for (const block of page.floats ?? [])
|
|
42
|
+
if (block.resourceBlock)
|
|
43
|
+
seen.add(block);
|
|
44
|
+
return [...seen];
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../src/marks/cjkMarks/resources.ts"],"names":[],"mappings":"AAoBA;;;;oDAIoD;AACpD,MAAM,UAAU,kBAAkB,CAAC,KAAe,EAAE,EAAmB;IACrE,MAAM,EAAE,GAAG,KAAK,CAAC,aAAa,CAAC;IAC/B,IAAI,CAAC,EAAE;QAAE,OAAO,EAAE,CAAC;IACnB,MAAM,MAAM,GAAgB,EAAE,CAAC;IAC/B,MAAM,GAAG,GAAG,CAAC,KAAgB,EAAE,KAA6G,EAAE,GAAW,EAAQ,EAAE;QACjK,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;YAAE,OAAO;QACxF,MAAM,CAAC,IAAI,CAAC;YACV,KAAK;YACL,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE;YACvD,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,KAAK,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,GAAG,EAAE;YAC3B,EAAE;SACH,CAAC,CAAC;IACL,CAAC,CAAC;IACF,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;IACnB,IAAI,CAAC,EAAE,CAAC;QACN,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ;YACxD,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,gBAAgB,EAAE,cAAc,EAAE,CAAC,CAAC,oBAAoB,EAAE,gBAAgB,EAAE,CAAC,CAAC,sBAAsB,EAAE,oBAAoB,EAAE,CAAC,CAAC,0BAA0B,EAAE;YAC5K,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,UAAU,EAAE,cAAc,EAAE,CAAC,CAAC,cAAc,EAAE,gBAAgB,EAAE,CAAC,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,CAAC,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACpK,CAAC;IACD,GAAG,CAAC,EAAE,CAAC,YAAY,EAAE,EAAE,UAAU,EAAE,EAAE,CAAC,iBAAiB,EAAE,cAAc,EAAE,EAAE,CAAC,qBAAqB,EAAE,gBAAgB,EAAE,EAAE,CAAC,uBAAuB,EAAE,oBAAoB,EAAE,EAAE,CAAC,2BAA2B,EAAE,EAAE,SAAS,CAAC,CAAC;IACpN,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE,UAAU,EAAE,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,EAAE,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,EAAE,CAAC,wBAAwB,EAAE,EAAE,MAAM,CAAC,CAAC;IAClM,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;qCACqC;AACrC,MAAM,UAAU,gBAAgB,CAAC,GAAgB;IAC/C,MAAM,IAAI,GAAG,IAAI,GAAG,EAAY,CAAC;IACjC,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,MAAM;QAAE,IAAI,KAAK,CAAC,aAAa;YAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACzE,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK;QAAE,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,IAAI,EAAE;YAAE,IAAI,KAAK,CAAC,aAAa;gBAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC9G,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;AACnB,CAAC"}
|
package/dist/marks/cjkMarks.d.ts
CHANGED
|
@@ -19,32 +19,10 @@
|
|
|
19
19
|
* same text on one side, the line is nearer the text, and dots on the side
|
|
20
20
|
* of a ruby reading go outside it (as CSS Text Decoration 3 sets them).
|
|
21
21
|
*/
|
|
22
|
-
import type {
|
|
23
|
-
import type {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Where the renderers paint each segment of a line: its x (absolute, in
|
|
28
|
-
* the flow frame) and the advance they give it — a word space of a
|
|
29
|
-
* justified line its share of the slack, a centred or right-aligned line
|
|
30
|
-
* shifted by its slack. Mirrors the line painters of the canvas, PDF and
|
|
31
|
-
* HTML backends.
|
|
32
|
-
*/
|
|
33
|
-
export declare function segmentPositions(line: VDTLine, block: BlockLike): {
|
|
34
|
-
xs: number[];
|
|
35
|
-
widths: number[];
|
|
36
|
-
};
|
|
37
|
-
/** The font a segment is painted in. */
|
|
38
|
-
export declare function segmentFont(seg: VDTLineSegment, block: BlockLike): string;
|
|
39
|
-
/** What a vertical line's dots need to find its upright cells. */
|
|
40
|
-
interface VerticalMarks {
|
|
41
|
-
region: CjkRegion;
|
|
42
|
-
uprightDigits: number;
|
|
43
|
-
}
|
|
44
|
-
/** The marks of one line (see the module comment), relative to it; empty
|
|
45
|
-
* when it has none. `color` is `cjk.annotationColor` (hex), if set;
|
|
46
|
-
* `vertical` is set on a vertical page. */
|
|
47
|
-
export declare function lineMarks(line: VDTLine, block: BlockLike, color?: string, vertical?: VerticalMarks): VDTLineMark[];
|
|
22
|
+
import type { VDTDocument, ContentWarning } from '../vdt.js';
|
|
23
|
+
import type { ResolvedCjkConfig } from '../types.js';
|
|
24
|
+
export { segmentPositions, segmentFont } from './cjkMarks/geometry.js';
|
|
25
|
+
export { lineMarks } from './cjkMarks/lineMarks.js';
|
|
48
26
|
/**
|
|
49
27
|
* Set `VDTLine.marks` on every line of the document that holds Chinese
|
|
50
28
|
* marks, and report the paragraphs whose line gap is narrower than their
|
|
@@ -66,5 +44,4 @@ export declare function lineMarks(line: VDTLine, block: BlockLike, color?: strin
|
|
|
66
44
|
* horizontally on every page, a vertical one turning the whole block.
|
|
67
45
|
*/
|
|
68
46
|
export declare function annotateDocument(doc: VDTDocument, cjk: ResolvedCjkConfig | undefined): ContentWarning[];
|
|
69
|
-
export {};
|
|
70
47
|
//# sourceMappingURL=cjkMarks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cjkMarks.d.ts","sourceRoot":"","sources":["../../src/marks/cjkMarks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"cjkMarks.d.ts","sourceRoot":"","sources":["../../src/marks/cjkMarks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAqB,MAAM,WAAW,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAOrD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,iBAAiB,GAAG,SAAS,GAAG,cAAc,EAAE,CA0GvG"}
|
package/dist/marks/cjkMarks.js
CHANGED
|
@@ -19,486 +19,13 @@
|
|
|
19
19
|
* same text on one side, the line is nearer the text, and dots on the side
|
|
20
20
|
* of a ruby reading go outside it (as CSS Text Decoration 3 sets them).
|
|
21
21
|
*/
|
|
22
|
-
import {
|
|
23
|
-
import { measureTextWidth } from '../measure/canvas.js';
|
|
24
|
-
import { graphemesOf } from '../measure/graphemes.js';
|
|
25
|
-
import { isCjkGrapheme } from '../measure/cjk/cjkClasses.js';
|
|
26
|
-
import { CENTRAL, ZHUYIN_SIZE_RATIO, isZhuyin } from '../measure/cjk/cjkAnnotate.js';
|
|
22
|
+
import { CENTRAL } from '../measure/cjk/cjkAnnotate.js';
|
|
27
23
|
import { fontEm } from '../measure/vertical.js';
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
* justified line its share of the slack, a centred or right-aligned line
|
|
34
|
-
* shifted by its slack. Mirrors the line painters of the canvas, PDF and
|
|
35
|
-
* HTML backends.
|
|
36
|
-
*/
|
|
37
|
-
export function segmentPositions(line, block) {
|
|
38
|
-
const segments = line.segments ?? [];
|
|
39
|
-
const tracking = (block.letterSpacing ?? 0) + (line.letterSpacing ?? 0);
|
|
40
|
-
const lineIndent = line.bbox.x - block.bbox.x;
|
|
41
|
-
const effectiveWidth = block.bbox.width - lineIndent;
|
|
42
|
-
let start = line.bbox.x;
|
|
43
|
-
let justified;
|
|
44
|
-
if (block.textAlign === 'justify') {
|
|
45
|
-
let wordWidth = 0;
|
|
46
|
-
let natural = 0;
|
|
47
|
-
let spaces = 0;
|
|
48
|
-
for (const seg of segments) {
|
|
49
|
-
if (seg.hangs)
|
|
50
|
-
continue;
|
|
51
|
-
if (seg.kind === 'space' && !seg.autospace)
|
|
52
|
-
spaces++;
|
|
53
|
-
else
|
|
54
|
-
wordWidth += seg.width;
|
|
55
|
-
natural += seg.width;
|
|
56
|
-
}
|
|
57
|
-
if (spaces > 0 && !line.tabbed && ((!line.isLastLine && !line.ragged) || natural > effectiveWidth))
|
|
58
|
-
justified = (effectiveWidth - wordWidth) / spaces;
|
|
59
|
-
}
|
|
60
|
-
else if (block.textAlign === 'center' || block.textAlign === 'right') {
|
|
61
|
-
const trailing = lineTrailingTracking(line, tracking);
|
|
62
|
-
const slack = Math.max(0, effectiveWidth - (lineInkExtent(line, 0).width - trailing));
|
|
63
|
-
start += block.textAlign === 'center' ? slack / 2 : slack;
|
|
64
|
-
}
|
|
65
|
-
const xs = [];
|
|
66
|
-
const widths = [];
|
|
67
|
-
let x = start;
|
|
68
|
-
for (const seg of segments) {
|
|
69
|
-
xs.push(x);
|
|
70
|
-
const w = seg.kind === 'space' && !seg.autospace && justified !== undefined ? justified : seg.width;
|
|
71
|
-
widths.push(w);
|
|
72
|
-
x += w;
|
|
73
|
-
}
|
|
74
|
-
return { xs, widths };
|
|
75
|
-
}
|
|
76
|
-
/** The font a segment is painted in. */
|
|
77
|
-
export function segmentFont(seg, block) {
|
|
78
|
-
if (seg.fontString)
|
|
79
|
-
return seg.fontString;
|
|
80
|
-
if (seg.bold && seg.italic && block.boldItalicFontString)
|
|
81
|
-
return block.boldItalicFontString;
|
|
82
|
-
if (seg.bold && block.boldFontString)
|
|
83
|
-
return block.boldFontString;
|
|
84
|
-
if (seg.italic && block.italicFontString)
|
|
85
|
-
return block.italicFontString;
|
|
86
|
-
return block.fontString;
|
|
87
|
-
}
|
|
88
|
-
/** Characters that take no emphasis dot: punctuation, spaces, controls. */
|
|
89
|
-
const NO_DOT_RE = /^[\p{P}\p{Z}\p{Cc}\p{Cf}]/u;
|
|
90
|
-
/** Mark sizes, in em of the text they mark. */
|
|
91
|
-
const DOT = { dot: 0.16, circle: 0.2, sesame: 0.3 };
|
|
92
|
-
const GAP = 0.06;
|
|
93
|
-
const STROKE = 0.05;
|
|
94
|
-
const OUTLINE = 0.035;
|
|
95
|
-
const LINE_AT = 0.08;
|
|
96
|
-
const WAVE_AT = 0.1;
|
|
97
|
-
const WAVE_HEIGHT = 0.08;
|
|
98
|
-
const WAVE_LENGTH = 0.25;
|
|
99
|
-
/** A double side line: its two rules' centres this far apart. */
|
|
100
|
-
const DOUBLE_GAP = 0.08;
|
|
101
|
-
/** A dotted side line: its dots' diameter and the pitch they come near. */
|
|
102
|
-
const DOTTED_SIZE = 0.08;
|
|
103
|
-
const DOTTED_PITCH = 0.16;
|
|
104
|
-
/** How far dots move out when a line marks the same text on their side. */
|
|
105
|
-
const PAST_LINE = 0.16;
|
|
106
|
-
/** Where each grapheme of a segment starts and how far it advances, px
|
|
107
|
-
* from the segment's start: CJK characters share the segment's width
|
|
108
|
-
* evenly (the composer only puts characters that advance alike in one
|
|
109
|
-
* segment); anything else is measured and scaled to the segment. Down a
|
|
110
|
-
* vertical line a number set in one upright cell (`:tcy[…]`, or up to
|
|
111
|
-
* `cjk.uprightDigits` digits) is one character: it takes one dot; the
|
|
112
|
-
* letters of an `:upright[…]` run stand one to a cell, whatever their
|
|
113
|
-
* horizontal widths. */
|
|
114
|
-
function graphemeAdvances(seg, width, font, vertical) {
|
|
115
|
-
const graphemes = graphemesOf(seg.text);
|
|
116
|
-
if (graphemes.length === 0)
|
|
117
|
-
return [];
|
|
118
|
-
const out = [];
|
|
119
|
-
if (vertical && seg.tcy)
|
|
120
|
-
return [{ g: seg.text, at: 0, adv: width }];
|
|
121
|
-
if (vertical && seg.orientation === 'upright') {
|
|
122
|
-
const adv = width / graphemes.length;
|
|
123
|
-
graphemes.forEach((g, i) => out.push({ g, at: i * adv, adv }));
|
|
124
|
-
return out;
|
|
125
|
-
}
|
|
126
|
-
if (vertical && seg.orientation !== 'sideways' && vertical.uprightDigits > 0 && /[0-9]/.test(seg.text)) {
|
|
127
|
-
const em = fontEm(font);
|
|
128
|
-
const pieces = verticalRuns(graphemes, vertical.region, vertical.uprightDigits).flatMap((run) => run.cell !== undefined ? [{ g: run.text, w: em * run.cell }] : graphemesOf(run.text).map((g) => ({ g, w: measureTextWidth(g, font) })));
|
|
129
|
-
const sum = pieces.reduce((a, p) => a + p.w, 0);
|
|
130
|
-
const k = sum > 0 ? width / sum : 1;
|
|
131
|
-
let at = 0;
|
|
132
|
-
for (const p of pieces) {
|
|
133
|
-
out.push({ g: p.g, at, adv: p.w * k });
|
|
134
|
-
at += p.w * k;
|
|
135
|
-
}
|
|
136
|
-
return out;
|
|
137
|
-
}
|
|
138
|
-
if (graphemes.every(isCjkGrapheme)) {
|
|
139
|
-
const adv = width / graphemes.length;
|
|
140
|
-
graphemes.forEach((g, i) => out.push({ g, at: i * adv, adv }));
|
|
141
|
-
return out;
|
|
142
|
-
}
|
|
143
|
-
const natural = graphemes.map((g) => measureTextWidth(g, font));
|
|
144
|
-
const sum = natural.reduce((a, b) => a + b, 0);
|
|
145
|
-
const scale = sum > 0 ? width / sum : 1;
|
|
146
|
-
let at = 0;
|
|
147
|
-
graphemes.forEach((g, i) => {
|
|
148
|
-
const adv = natural[i] * scale;
|
|
149
|
-
out.push({ g, at, adv });
|
|
150
|
-
at += adv;
|
|
151
|
-
});
|
|
152
|
-
return out;
|
|
153
|
-
}
|
|
154
|
-
/** The marks of one line (see the module comment), relative to it; empty
|
|
155
|
-
* when it has none. `color` is `cjk.annotationColor` (hex), if set;
|
|
156
|
-
* `vertical` is set on a vertical page. */
|
|
157
|
-
export function lineMarks(line, block, color, vertical) {
|
|
158
|
-
const segments = line.segments;
|
|
159
|
-
if (!segments || !segments.some((s) => s.cjkMarks))
|
|
160
|
-
return [];
|
|
161
|
-
const { xs, widths } = segmentPositions(line, block);
|
|
162
|
-
const x0 = line.bbox.x;
|
|
163
|
-
const tracking = (block.letterSpacing ?? 0) + (line.letterSpacing ?? 0);
|
|
164
|
-
const out = [];
|
|
165
|
-
const paint = color !== undefined ? { color } : {};
|
|
166
|
-
const runs = [];
|
|
167
|
-
const lined = new Set();
|
|
168
|
-
const linedOver = new Set();
|
|
169
|
-
const idOf = (kind, seg) => kind === 'line' ? seg?.cjkMarks?.properName : kind === 'wavy' ? seg?.cjkMarks?.bookTitle : seg?.cjkMarks?.sideline?.id;
|
|
170
|
-
for (const kind of ['line', 'wavy', 'side']) {
|
|
171
|
-
let open;
|
|
172
|
-
for (let i = 0; i < segments.length; i++) {
|
|
173
|
-
const seg = segments[i];
|
|
174
|
-
const id = idOf(kind, seg);
|
|
175
|
-
// A space inside a run (for a side line, anything the layout added
|
|
176
|
-
// there too: a Han–Latin space, a bracket): the line goes on when
|
|
177
|
-
// the run does.
|
|
178
|
-
const bridges = (s) => s.kind === 'space' || (kind === 'side' && !!s.inserted && !s.warichu);
|
|
179
|
-
if (id === undefined && open && bridges(seg)) {
|
|
180
|
-
let j = i + 1;
|
|
181
|
-
while (j < segments.length && bridges(segments[j]))
|
|
182
|
-
j++;
|
|
183
|
-
const nextId = idOf(kind, segments[j]);
|
|
184
|
-
if (nextId !== undefined && `${kind}:${nextId}` === open.key)
|
|
185
|
-
continue;
|
|
186
|
-
}
|
|
187
|
-
if (id === undefined || seg.warichu || (seg.inserted && kind !== 'side')) {
|
|
188
|
-
open = undefined;
|
|
189
|
-
continue;
|
|
190
|
-
}
|
|
191
|
-
const key = `${kind}:${id}`;
|
|
192
|
-
const font = segmentFont(seg, block);
|
|
193
|
-
const em = fontEm(font);
|
|
194
|
-
const end = xs[i] + widths[i] - (seg.kind === 'text' ? tracking + (seg.tracking ?? 0) : 0);
|
|
195
|
-
const over = kind === 'side' && seg.cjkMarks.sideline.position === 'over';
|
|
196
|
-
if (open && open.key === key) {
|
|
197
|
-
open.to = Math.max(open.to, end);
|
|
198
|
-
open.endSeg = i;
|
|
199
|
-
(over ? linedOver : lined).add(i);
|
|
200
|
-
continue;
|
|
201
|
-
}
|
|
202
|
-
open = {
|
|
203
|
-
kind,
|
|
204
|
-
key,
|
|
205
|
-
from: xs[i],
|
|
206
|
-
to: end,
|
|
207
|
-
em,
|
|
208
|
-
axis: -CENTRAL * em + (seg.baselineShift ?? 0),
|
|
209
|
-
startSeg: i,
|
|
210
|
-
endSeg: i,
|
|
211
|
-
...(kind === 'side' ? { side: seg.cjkMarks.sideline } : {}),
|
|
212
|
-
};
|
|
213
|
-
runs.push(open);
|
|
214
|
-
(over ? linedOver : lined).add(i);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
// Two runs that meet each give up an eighth of an em.
|
|
218
|
-
for (const a of runs) {
|
|
219
|
-
for (const b of runs) {
|
|
220
|
-
if (a === b || a.kind !== b.kind || b.startSeg !== a.endSeg + 1)
|
|
221
|
-
continue;
|
|
222
|
-
if (a.side && a.side.position !== b.side?.position)
|
|
223
|
-
continue;
|
|
224
|
-
a.to -= a.em / 8;
|
|
225
|
-
b.from += b.em / 8;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
for (const r of runs) {
|
|
229
|
-
const length = r.to - r.from;
|
|
230
|
-
if (length <= 0)
|
|
231
|
-
continue;
|
|
232
|
-
if (r.side) {
|
|
233
|
-
out.push(sidelineMark(r.side, r.from - x0, length, r.axis, r.em, paint));
|
|
234
|
-
continue;
|
|
235
|
-
}
|
|
236
|
-
const edge = r.axis + r.em / 2;
|
|
237
|
-
if (r.kind === 'line') {
|
|
238
|
-
out.push({ kind: 'line', x: r.from - x0, y: edge + LINE_AT * r.em, length, thickness: Math.max(0.5, STROKE * r.em), ...paint });
|
|
239
|
-
}
|
|
240
|
-
else {
|
|
241
|
-
out.push({
|
|
242
|
-
kind: 'wavy',
|
|
243
|
-
x: r.from - x0,
|
|
244
|
-
y: edge + WAVE_AT * r.em,
|
|
245
|
-
length,
|
|
246
|
-
thickness: Math.max(0.5, STROKE * r.em * 0.9),
|
|
247
|
-
amplitude: WAVE_HEIGHT * r.em,
|
|
248
|
-
wavelength: WAVE_LENGTH * r.em,
|
|
249
|
-
...paint,
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
// Emphasis dots, one per character.
|
|
254
|
-
segments.forEach((seg, i) => {
|
|
255
|
-
const dots = seg.cjkMarks?.dots;
|
|
256
|
-
if (!dots || seg.kind !== 'text' || seg.warichu || seg.inserted)
|
|
257
|
-
return;
|
|
258
|
-
const font = segmentFont(seg, block);
|
|
259
|
-
const em = fontEm(font);
|
|
260
|
-
const axis = -CENTRAL * em + (seg.baselineShift ?? 0);
|
|
261
|
-
const size = DOT[dots.style] * em;
|
|
262
|
-
const under = dots.position === 'under';
|
|
263
|
-
const past = (under ? lined : linedOver).has(i) ? PAST_LINE * em : 0;
|
|
264
|
-
let y = under ? axis + em / 2 + GAP * em + past + size / 2 : axis - em / 2 - GAP * em - past - size / 2;
|
|
265
|
-
// A reading on the same side: the dots go outside it.
|
|
266
|
-
const reading = seg.ruby && seg.ruby.position === dots.position ? rubyExtent(seg.ruby) : undefined;
|
|
267
|
-
if (reading)
|
|
268
|
-
y = under ? Math.max(y, reading.foot + GAP * em + size / 2) : Math.min(y, reading.head - GAP * em - size / 2);
|
|
269
|
-
const t = tracking + (seg.tracking ?? 0);
|
|
270
|
-
const inset = seg.ruby ? seg.inkOffset ?? 0 : 0;
|
|
271
|
-
const box = seg.ruby ? Math.max(0, widths[i] - 2 * inset) : widths[i];
|
|
272
|
-
for (const { g, at, adv } of graphemeAdvances(seg, box, font, vertical)) {
|
|
273
|
-
if (NO_DOT_RE.test(g))
|
|
274
|
-
continue;
|
|
275
|
-
out.push({
|
|
276
|
-
kind: dots.style === 'dot' ? 'dot' : dots.style,
|
|
277
|
-
x: xs[i] + inset + at + (adv - t) / 2 - x0,
|
|
278
|
-
y,
|
|
279
|
-
size,
|
|
280
|
-
thickness: Math.max(0.4, OUTLINE * em),
|
|
281
|
-
...(dots.fill === 'open' ? { open: true } : {}),
|
|
282
|
-
...paint,
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
});
|
|
286
|
-
return out;
|
|
287
|
-
}
|
|
288
|
-
/** How far a reading reaches across its line, px from the baseline: its
|
|
289
|
-
* runs' em boxes (`head` the least, `foot` the most). */
|
|
290
|
-
function rubyExtent(ruby) {
|
|
291
|
-
let head = Infinity;
|
|
292
|
-
let foot = -Infinity;
|
|
293
|
-
for (const run of ruby.runs) {
|
|
294
|
-
const runEm = fontEm(run.fontString);
|
|
295
|
-
head = Math.min(head, run.dy - (CENTRAL + 0.5) * runEm);
|
|
296
|
-
foot = Math.max(foot, run.dy + (0.5 - CENTRAL) * runEm);
|
|
297
|
-
}
|
|
298
|
-
return head <= foot ? { head, foot } : undefined;
|
|
299
|
-
}
|
|
300
|
-
/** The mark of a side line (傍線) `length` px long from `x`, against the
|
|
301
|
-
* em box of text `em` px high whose central axis is `axis`: a rule, two
|
|
302
|
-
* rules, a wave or a row of dots, on the side it was given. */
|
|
303
|
-
function sidelineMark(line, x, length, axis, em, paint) {
|
|
304
|
-
const sign = line.position === 'over' ? -1 : 1;
|
|
305
|
-
const edge = axis + sign * (em / 2);
|
|
306
|
-
switch (line.style) {
|
|
307
|
-
case 'double': {
|
|
308
|
-
const gap = DOUBLE_GAP * em;
|
|
309
|
-
return { kind: 'double', x, y: edge + sign * (LINE_AT * em + gap / 2), length, gap, thickness: Math.max(0.4, OUTLINE * em), ...paint };
|
|
310
|
-
}
|
|
311
|
-
case 'wavy':
|
|
312
|
-
return {
|
|
313
|
-
kind: 'wavy',
|
|
314
|
-
x,
|
|
315
|
-
y: edge + sign * WAVE_AT * em,
|
|
316
|
-
length,
|
|
317
|
-
thickness: Math.max(0.5, STROKE * em * 0.9),
|
|
318
|
-
amplitude: WAVE_HEIGHT * em,
|
|
319
|
-
wavelength: WAVE_LENGTH * em,
|
|
320
|
-
...paint,
|
|
321
|
-
};
|
|
322
|
-
case 'dotted': {
|
|
323
|
-
const size = DOTTED_SIZE * em;
|
|
324
|
-
// The pitch that sets the dots evenly from one end to the other.
|
|
325
|
-
const span = Math.max(0, length - size);
|
|
326
|
-
const count = Math.max(1, Math.round(span / (DOTTED_PITCH * em)));
|
|
327
|
-
return { kind: 'dotted', x, y: edge + sign * LINE_AT * em, length, size, gap: span / count, thickness: size, ...paint };
|
|
328
|
-
}
|
|
329
|
-
default:
|
|
330
|
-
return { kind: 'line', x, y: edge + sign * LINE_AT * em, length, thickness: Math.max(0.5, STROKE * em), ...paint };
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
/** How much line gap (em of the text) a line's marks need: half an em on
|
|
334
|
-
* one side, five eighths on both (clreq §5.6.1). 0 when it has none. */
|
|
335
|
-
function marksNeed(line) {
|
|
336
|
-
const sides = new Set();
|
|
337
|
-
for (const seg of line.segments ?? []) {
|
|
338
|
-
const m = seg.cjkMarks;
|
|
339
|
-
if (!m)
|
|
340
|
-
continue;
|
|
341
|
-
if (m.dots)
|
|
342
|
-
sides.add(m.dots.position);
|
|
343
|
-
if (m.properName !== undefined || m.bookTitle !== undefined)
|
|
344
|
-
sides.add('under');
|
|
345
|
-
if (m.sideline)
|
|
346
|
-
sides.add(m.sideline.position);
|
|
347
|
-
}
|
|
348
|
-
return sides.size === 0 ? 0 : sides.size > 1 ? 0.625 : 0.5;
|
|
349
|
-
}
|
|
350
|
-
/** How much line gap (em of the text) a line's ruby readings over or under
|
|
351
|
-
* it need: the reading's size (a zhuyin column's, with its tone mark; a
|
|
352
|
-
* Latin reading over the base, with the lift that clears its descenders). */
|
|
353
|
-
function rubyNeed(line, em) {
|
|
354
|
-
let need = 0;
|
|
355
|
-
for (const seg of line.segments ?? []) {
|
|
356
|
-
// A footnote marker in the line gap (JLReq §4.2.3) needs its size, as
|
|
357
|
-
// a reading does.
|
|
358
|
-
for (const run of seg.sideMarker?.runs ?? [])
|
|
359
|
-
need = Math.max(need, fontEm(run.fontString) / em);
|
|
360
|
-
const r = seg.ruby;
|
|
361
|
-
if (!r || r.position === 'right')
|
|
362
|
-
continue;
|
|
363
|
-
const rtEm = fontEm(r.fontString);
|
|
364
|
-
// A Latin reading over its base stands higher by its lift (rubyLift.ts).
|
|
365
|
-
const lift = r.position === 'under' ? 0 : latinReadingLift(r.text, r.fontString, em);
|
|
366
|
-
const size = isZhuyin(r.text) ? rtEm * ZHUYIN_SIZE_RATIO * (/[ˊˇˋˉ]/.test(r.text) ? 1.75 : 1) : rtEm + lift;
|
|
367
|
-
need = Math.max(need, size / em);
|
|
368
|
-
}
|
|
369
|
-
return need;
|
|
370
|
-
}
|
|
371
|
-
/** How far a line's kanbun marks (#430) reach out of its em box, in em
|
|
372
|
-
* of the text: the 送り仮名 beside it, 返り点 set in the line gap. */
|
|
373
|
-
function kuntenNeed(line, em) {
|
|
374
|
-
const top = -(CENTRAL + 0.5) * em;
|
|
375
|
-
const bottom = (0.5 - CENTRAL) * em;
|
|
376
|
-
let need = 0;
|
|
377
|
-
for (const seg of line.segments ?? []) {
|
|
378
|
-
for (const run of seg.kunten?.runs ?? []) {
|
|
379
|
-
const runEm = fontEm(run.fontString);
|
|
380
|
-
const centre = run.dy - CENTRAL * runEm;
|
|
381
|
-
need = Math.max(need, top - (centre - runEm / 2), centre + runEm / 2 - bottom);
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
return need / em;
|
|
385
|
-
}
|
|
386
|
-
/** The {@link LineReach} of a line whose text is `em` px (its em box
|
|
387
|
-
* centred on the central axis): marks by their drawn extent, readings by
|
|
388
|
-
* their em box (an upright tone mark by its advance across the line). */
|
|
389
|
-
function lineReach(line, em) {
|
|
390
|
-
const top = -(CENTRAL + 0.5) * em;
|
|
391
|
-
const bottom = (0.5 - CENTRAL) * em;
|
|
392
|
-
const reach = { head: 0, foot: 0, headRuby: false, footRuby: false };
|
|
393
|
-
const extend = (lo, hi, ruby) => {
|
|
394
|
-
if (top - lo > reach.head + 1e-9) {
|
|
395
|
-
reach.head = top - lo;
|
|
396
|
-
reach.headRuby = ruby;
|
|
397
|
-
}
|
|
398
|
-
else if (ruby && top - lo > 1e-9)
|
|
399
|
-
reach.headRuby = true;
|
|
400
|
-
if (hi - bottom > reach.foot + 1e-9) {
|
|
401
|
-
reach.foot = hi - bottom;
|
|
402
|
-
reach.footRuby = ruby;
|
|
403
|
-
}
|
|
404
|
-
else if (ruby && hi - bottom > 1e-9)
|
|
405
|
-
reach.footRuby = true;
|
|
406
|
-
};
|
|
407
|
-
for (const m of line.marks ?? []) {
|
|
408
|
-
const half = m.kind === 'line' ? m.thickness / 2
|
|
409
|
-
: m.kind === 'wavy' ? (m.amplitude ?? 0) / 2 + m.thickness / 2
|
|
410
|
-
: m.kind === 'double' ? (m.gap ?? 0) / 2 + m.thickness / 2
|
|
411
|
-
: (m.size ?? 0) / 2;
|
|
412
|
-
extend(m.y - half, m.y + half, false);
|
|
413
|
-
}
|
|
414
|
-
for (const seg of line.segments ?? []) {
|
|
415
|
-
for (const run of seg.sideMarker?.runs ?? []) {
|
|
416
|
-
const runEm = fontEm(run.fontString);
|
|
417
|
-
extend(run.dy - (CENTRAL + 0.5) * runEm, run.dy + (0.5 - CENTRAL) * runEm, true);
|
|
418
|
-
}
|
|
419
|
-
const r = seg.ruby;
|
|
420
|
-
if (!r || r.position === 'right')
|
|
421
|
-
continue;
|
|
422
|
-
for (const run of r.runs) {
|
|
423
|
-
const runEm = fontEm(run.fontString);
|
|
424
|
-
if (run.upright) {
|
|
425
|
-
const axis = run.dy - CENTRAL * runEm;
|
|
426
|
-
let w = 0;
|
|
427
|
-
for (const g of graphemesOf(run.text))
|
|
428
|
-
w = Math.max(w, measureTextWidth(g, run.fontString));
|
|
429
|
-
extend(axis - w / 2, axis + w / 2, true);
|
|
430
|
-
}
|
|
431
|
-
else {
|
|
432
|
-
extend(run.dy - (CENTRAL + 0.5) * runEm, run.dy + (0.5 - CENTRAL) * runEm, true);
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
// Kanbun marks, by their em box: the side they reach furthest out on is
|
|
437
|
-
// theirs when nothing else reaches as far.
|
|
438
|
-
for (const seg of line.segments ?? []) {
|
|
439
|
-
for (const run of seg.kunten?.runs ?? []) {
|
|
440
|
-
const runEm = fontEm(run.fontString);
|
|
441
|
-
const lo = run.dy - (CENTRAL + 0.5) * runEm;
|
|
442
|
-
const hi = run.dy + (0.5 - CENTRAL) * runEm;
|
|
443
|
-
if (top - lo > reach.head + 1e-9) {
|
|
444
|
-
reach.head = top - lo;
|
|
445
|
-
reach.headRuby = false;
|
|
446
|
-
reach.headKunten = true;
|
|
447
|
-
}
|
|
448
|
-
if (hi - bottom > reach.foot + 1e-9) {
|
|
449
|
-
reach.foot = hi - bottom;
|
|
450
|
-
reach.footRuby = false;
|
|
451
|
-
reach.footKunten = true;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
return reach;
|
|
456
|
-
}
|
|
457
|
-
/** A resource block's texts (#429): each table cell, the caption and the
|
|
458
|
-
* note, painted from their own fonts. Their lines carry their alignment
|
|
459
|
-
* (the measurer pushed a centred or right-aligned line over by its
|
|
460
|
-
* slack), so they are read flush from their start. The "continued"
|
|
461
|
-
* marker of a table slice holds no annotations. */
|
|
462
|
-
function resourceTextGroups(block, at) {
|
|
463
|
-
const rb = block.resourceBlock;
|
|
464
|
-
if (!rb)
|
|
465
|
-
return [];
|
|
466
|
-
const groups = [];
|
|
467
|
-
const add = (lines, fonts, key) => {
|
|
468
|
-
const first = lines[0];
|
|
469
|
-
if (!first || !lines.some((l) => l.segments?.some((s) => s.cjkMarks || s.ruby)))
|
|
470
|
-
return;
|
|
471
|
-
groups.push({
|
|
472
|
-
lines,
|
|
473
|
-
like: { bbox: first.bbox, textAlign: 'left', ...fonts },
|
|
474
|
-
pageIndex: block.pageIndex,
|
|
475
|
-
where: `${block.id}:${key}`,
|
|
476
|
-
at,
|
|
477
|
-
});
|
|
478
|
-
};
|
|
479
|
-
const t = rb.table;
|
|
480
|
-
if (t) {
|
|
481
|
-
t.cells.forEach((cell, i) => add(cell.lines, cell.isHeader
|
|
482
|
-
? { fontString: t.headerFontString, boldFontString: t.headerBoldFontString, italicFontString: t.headerItalicFontString, boldItalicFontString: t.headerBoldItalicFontString }
|
|
483
|
-
: { fontString: t.fontString, boldFontString: t.boldFontString, italicFontString: t.italicFontString, boldItalicFontString: t.boldItalicFontString }, `c${i}`));
|
|
484
|
-
}
|
|
485
|
-
add(rb.captionLines, { fontString: rb.captionFontString, boldFontString: rb.captionBoldFontString, italicFontString: rb.captionItalicFontString, boldItalicFontString: rb.captionBoldItalicFontString }, 'caption');
|
|
486
|
-
add(rb.noteLines, { fontString: rb.noteFontString, boldFontString: rb.noteBoldFontString, italicFontString: rb.noteItalicFontString, boldItalicFontString: rb.noteBoldItalicFontString }, 'note');
|
|
487
|
-
return groups;
|
|
488
|
-
}
|
|
489
|
-
/** The blocks of a document that hold a resource: in the flow and floated
|
|
490
|
-
* (`VDTPage.floats`), each once. */
|
|
491
|
-
function resourceBlocksOf(doc) {
|
|
492
|
-
const seen = new Set();
|
|
493
|
-
for (const block of doc.blocks)
|
|
494
|
-
if (block.resourceBlock)
|
|
495
|
-
seen.add(block);
|
|
496
|
-
for (const page of doc.pages)
|
|
497
|
-
for (const block of page.floats ?? [])
|
|
498
|
-
if (block.resourceBlock)
|
|
499
|
-
seen.add(block);
|
|
500
|
-
return [...seen];
|
|
501
|
-
}
|
|
24
|
+
import { lineMarks } from './cjkMarks/lineMarks.js';
|
|
25
|
+
import { lineReach, marksNeed, rubyNeed, kuntenNeed } from './cjkMarks/reach.js';
|
|
26
|
+
import { resourceBlocksOf, resourceTextGroups } from './cjkMarks/resources.js';
|
|
27
|
+
export { segmentPositions, segmentFont } from './cjkMarks/geometry.js';
|
|
28
|
+
export { lineMarks } from './cjkMarks/lineMarks.js';
|
|
502
29
|
/**
|
|
503
30
|
* Set `VDTLine.marks` on every line of the document that holds Chinese
|
|
504
31
|
* marks, and report the paragraphs whose line gap is narrower than their
|