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
|
@@ -18,652 +18,7 @@
|
|
|
18
18
|
* fields once the spans exist. The content may hold other inline marks,
|
|
19
19
|
* nested annotations included (`:warichu[甲戌側批::name[寶玉]…]`).
|
|
20
20
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export const ANNOTATION_NAMES = ['dots', 'name', 'book', 'ruby', 'warichu', 'ltr', 'rtl', 'sideline', 'kunten'];
|
|
25
|
-
/** Private-use marks opening each kind of annotation while the emphasis
|
|
26
|
-
* scanners run (after the small-caps and link marks, outside the escape
|
|
27
|
-
* range), and the one mark that closes any of them. */
|
|
28
|
-
const OPEN = {
|
|
29
|
-
dots: '',
|
|
30
|
-
name: '',
|
|
31
|
-
book: '',
|
|
32
|
-
ruby: '',
|
|
33
|
-
warichu: '',
|
|
34
|
-
ltr: '',
|
|
35
|
-
rtl: '',
|
|
36
|
-
sideline: '',
|
|
37
|
-
kunten: '',
|
|
38
|
-
};
|
|
39
|
-
const CLOSE = '';
|
|
40
|
-
const KIND_OF_OPEN = new Map(ANNOTATION_NAMES.map((n) => [OPEN[n], n]));
|
|
41
|
-
const MARK_RE = /[-]/;
|
|
42
|
-
const MARKS_RE = /[-]/g;
|
|
43
|
-
/** `:dots[`, `:name[`… at the start of a match. */
|
|
44
|
-
const OPENER_RE = /:(dots|name|book|ruby|warichu|ltr|rtl|sideline|kunten)\[/y;
|
|
45
|
-
/** Letters that make a `{…|…}` a compact ruby: Han, kana, bopomofo. A
|
|
46
|
-
* brace group without one (`{x|x>0}`) stays text. */
|
|
47
|
-
const RUBY_BASE_RE = /[\p{sc=Han}\p{sc=Hiragana}\p{sc=Katakana}\p{sc=Bopomofo}々〇]/u;
|
|
48
|
-
/**
|
|
49
|
-
* The index of the `]` closing the `[` at `open`, brackets nested inside
|
|
50
|
-
* counting and a backslash escaping the character after it; -1 when the
|
|
51
|
-
* line ends first (or `end` is reached).
|
|
52
|
-
*/
|
|
53
|
-
export function closingBracket(text, open, end = text.length) {
|
|
54
|
-
let depth = 0;
|
|
55
|
-
for (let i = open; i < end; i++) {
|
|
56
|
-
const c = text[i];
|
|
57
|
-
if (c === '\n')
|
|
58
|
-
return -1;
|
|
59
|
-
if (c === '\\') {
|
|
60
|
-
i++;
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
|
-
if (c === '[')
|
|
64
|
-
depth++;
|
|
65
|
-
else if (c === ']') {
|
|
66
|
-
depth--;
|
|
67
|
-
if (depth === 0)
|
|
68
|
-
return i;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return -1;
|
|
72
|
-
}
|
|
73
|
-
/** The `{…}` attribute blob right after index `at` (`text[at] === '{'`),
|
|
74
|
-
* on the same line: its end (past the `}`), or -1. */
|
|
75
|
-
function attrBlobEnd(text, at, end = text.length) {
|
|
76
|
-
if (text[at] !== '{')
|
|
77
|
-
return -1;
|
|
78
|
-
for (let i = at + 1; i < end; i++) {
|
|
79
|
-
const c = text[i];
|
|
80
|
-
if (c === '\n' || c === '{')
|
|
81
|
-
return -1;
|
|
82
|
-
if (c === '}')
|
|
83
|
-
return i + 1;
|
|
84
|
-
}
|
|
85
|
-
return -1;
|
|
86
|
-
}
|
|
87
|
-
/** Whether the character at `at` follows an odd run of backslashes. */
|
|
88
|
-
function escapedAt(text, at) {
|
|
89
|
-
let n = 0;
|
|
90
|
-
for (let i = at - 1; i >= 0 && text[i] === '\\'; i--)
|
|
91
|
-
n++;
|
|
92
|
-
return n % 2 === 1;
|
|
93
|
-
}
|
|
94
|
-
/** A compact ruby `{base|reading…}` starting at `at`: the index of its `|`
|
|
95
|
-
* and its end (past the `}`), or undefined. The base holds a Han, kana or
|
|
96
|
-
* bopomofo letter, no brace, no line end. A backslash escapes the `{`
|
|
97
|
-
* (`\{紅|hóng}`) or a bar (`{紅\|hóng}`): a literal brace or bar, no ruby. */
|
|
98
|
-
function compactRubyAt(text, at, end = text.length) {
|
|
99
|
-
if (text[at] !== '{' || escapedAt(text, at))
|
|
100
|
-
return undefined;
|
|
101
|
-
let bar = -1;
|
|
102
|
-
for (let i = at + 1; i < end; i++) {
|
|
103
|
-
const c = text[i];
|
|
104
|
-
if (c === '\\') {
|
|
105
|
-
if (text[i + 1] === '\n')
|
|
106
|
-
return undefined;
|
|
107
|
-
i++;
|
|
108
|
-
continue;
|
|
109
|
-
}
|
|
110
|
-
if (c === '\n' || c === '{')
|
|
111
|
-
return undefined;
|
|
112
|
-
if (c === '|' && bar < 0) {
|
|
113
|
-
bar = i;
|
|
114
|
-
continue;
|
|
115
|
-
}
|
|
116
|
-
if (c === '}') {
|
|
117
|
-
if (bar <= at + 1 || i <= bar + 1)
|
|
118
|
-
return undefined;
|
|
119
|
-
const base = text.slice(at + 1, bar);
|
|
120
|
-
if (!RUBY_BASE_RE.test(base) || MARK_RE.test(base) || MARK_RE.test(text.slice(bar + 1, i)))
|
|
121
|
-
return undefined;
|
|
122
|
-
return { bar, end: i + 1 };
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return undefined;
|
|
126
|
-
}
|
|
127
|
-
/** Where the next `:` or `{` of `text` at or after `from` is, -1 when
|
|
128
|
-
* there is none: an annotation opens at one of them. */
|
|
129
|
-
function nextOpening(text, from) {
|
|
130
|
-
const colon = text.indexOf(':', from);
|
|
131
|
-
const brace = text.indexOf('{', from);
|
|
132
|
-
return colon < 0 ? brace : brace < 0 ? colon : Math.min(colon, brace);
|
|
133
|
-
}
|
|
134
|
-
/** The next annotation of `text` at or after `from` (before `end`). Only
|
|
135
|
-
* a `:` or a `{` can open one: the text between them is passed over. */
|
|
136
|
-
function nextAnnotation(text, from, end) {
|
|
137
|
-
for (let i = nextOpening(text, from); i >= 0 && i < end; i = nextOpening(text, i + 1)) {
|
|
138
|
-
const c = text[i];
|
|
139
|
-
if (c === ':') {
|
|
140
|
-
OPENER_RE.lastIndex = i;
|
|
141
|
-
const m = OPENER_RE.exec(text);
|
|
142
|
-
if (!m)
|
|
143
|
-
continue;
|
|
144
|
-
const open = i + m[0].length - 1;
|
|
145
|
-
const close = closingBracket(text, open, end);
|
|
146
|
-
if (close < 0 || close === open + 1)
|
|
147
|
-
continue;
|
|
148
|
-
// A compact ruby right after the bracket is text, not attributes
|
|
149
|
-
// (`:name[賈寶玉]{紅|hóng}`); a brace whose "base" assigns a value is
|
|
150
|
-
// attributes (`:ruby[東京]{rt="とう|きょう"}`, kana readings split
|
|
151
|
-
// on bars, #422).
|
|
152
|
-
const compact = compactRubyAt(text, close + 1, end);
|
|
153
|
-
const blob = compact && !text.slice(close + 2, compact.bar).includes('=') ? -1 : attrBlobEnd(text, close + 1, end);
|
|
154
|
-
return {
|
|
155
|
-
name: m[1],
|
|
156
|
-
start: i,
|
|
157
|
-
contentStart: open + 1,
|
|
158
|
-
contentEnd: close,
|
|
159
|
-
end: blob > 0 ? blob : close + 1,
|
|
160
|
-
attrs: blob > 0 ? text.slice(close + 2, blob - 1) : undefined,
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
if (c === '{') {
|
|
164
|
-
const ruby = compactRubyAt(text, i, end);
|
|
165
|
-
if (ruby) {
|
|
166
|
-
return { name: 'ruby', start: i, contentStart: i + 1, contentEnd: ruby.bar, end: ruby.end, attrs: undefined, compact: true };
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return undefined;
|
|
171
|
-
}
|
|
172
|
-
const unescapeBrackets = (s) => s.replace(/\\([[\]])/g, '$1');
|
|
173
|
-
/** A brace group that a backslash kept from being a compact ruby
|
|
174
|
-
* (`\{紅|hóng}`, `{紅\|hóng}`): `\{` and `\|` in it print as `{` and `|`.
|
|
175
|
-
* Text without a backslash is returned as is. */
|
|
176
|
-
const ESCAPED_RUBY_RE = /(\\?)\{((?:\\.|[^{}\n\\])*)\}/g;
|
|
177
|
-
function unescapeRubyGroups(s) {
|
|
178
|
-
if (!s.includes('\\'))
|
|
179
|
-
return s;
|
|
180
|
-
return s.replace(ESCAPED_RUBY_RE, (m, slash, inner) => {
|
|
181
|
-
if (!slash && !inner.includes('\\|'))
|
|
182
|
-
return m;
|
|
183
|
-
const plain = inner.replace(/\\\|/g, '|');
|
|
184
|
-
const bar = plain.indexOf('|');
|
|
185
|
-
if (bar <= 0 || bar >= plain.length - 1 || !RUBY_BASE_RE.test(plain.slice(0, bar)))
|
|
186
|
-
return m;
|
|
187
|
-
return `{${plain}}`;
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
/** `s` split at its bars that no backslash escapes, `\|` read as `|`. */
|
|
191
|
-
function splitReadings(s) {
|
|
192
|
-
return s.split(/(?<!\\)\|/).map((r) => r.replace(/\\\|/g, '|'));
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Replace every annotation of `text` by its content between the private-use
|
|
196
|
-
* marks, pushing each one's attributes on `queue` in text order. A
|
|
197
|
-
* directive whose bracket never closes on its line stays text. `restore`
|
|
198
|
-
* turns the escape placeholders of an attribute value back into the
|
|
199
|
-
* characters written.
|
|
200
|
-
*/
|
|
201
|
-
export function markAnnotations(text, queue, restore = (s) => s) {
|
|
202
|
-
if (!text.includes(':') && !text.includes('{'))
|
|
203
|
-
return text;
|
|
204
|
-
const mark = (from, end, inside) => {
|
|
205
|
-
let out = '';
|
|
206
|
-
let at = from;
|
|
207
|
-
for (;;) {
|
|
208
|
-
const found = nextAnnotation(text, at, end);
|
|
209
|
-
if (!found)
|
|
210
|
-
break;
|
|
211
|
-
const between = text.slice(at, found.start);
|
|
212
|
-
out += unescapeRubyGroups(inside ? unescapeBrackets(between) : between);
|
|
213
|
-
const entry = { name: found.name, attrs: {} };
|
|
214
|
-
if (found.compact) {
|
|
215
|
-
entry.readings = splitReadings(text.slice(found.contentEnd + 1, found.end - 1)).map((r) => restore(r).trim());
|
|
216
|
-
}
|
|
217
|
-
else if (found.attrs !== undefined) {
|
|
218
|
-
const attrs = parseDirectiveAttrs(found.attrs);
|
|
219
|
-
for (const key of Object.keys(attrs))
|
|
220
|
-
attrs[key] = restore(attrs[key]);
|
|
221
|
-
entry.attrs = attrs;
|
|
222
|
-
}
|
|
223
|
-
queue.push(entry);
|
|
224
|
-
const content = mark(found.contentStart, found.contentEnd, true);
|
|
225
|
-
out += OPEN[found.name] + (found.compact ? content.replace(/\\\|/g, '|') : content) + CLOSE;
|
|
226
|
-
at = found.end;
|
|
227
|
-
}
|
|
228
|
-
const rest = text.slice(at, end);
|
|
229
|
-
return out + unescapeRubyGroups(inside ? unescapeBrackets(rest) : rest);
|
|
230
|
-
};
|
|
231
|
-
return mark(0, text.length, false);
|
|
232
|
-
}
|
|
233
|
-
/** `text` with every annotation reduced to its content (the plain text of
|
|
234
|
-
* a running head, an index term, a contents row): `boundary` is left where
|
|
235
|
-
* each mark was. */
|
|
236
|
-
export function stripAnnotations(text, boundary = '') {
|
|
237
|
-
if (!text.includes(':') && !text.includes('{'))
|
|
238
|
-
return text;
|
|
239
|
-
const marked = markAnnotations(text, []);
|
|
240
|
-
return marked === text ? text : marked.replace(MARKS_RE, boundary);
|
|
241
|
-
}
|
|
242
|
-
/** Whether a text holds annotation marks (see {@link markAnnotations}). */
|
|
243
|
-
export function hasAnnotationMarks(text) {
|
|
244
|
-
return MARK_RE.test(text);
|
|
245
|
-
}
|
|
246
|
-
/** The innermost ruby open on `stack`. */
|
|
247
|
-
function innermostRuby(stack) {
|
|
248
|
-
for (let i = stack.length - 1; i >= 0; i--)
|
|
249
|
-
if (stack[i].name === 'ruby')
|
|
250
|
-
return stack[i];
|
|
251
|
-
return undefined;
|
|
252
|
-
}
|
|
253
|
-
const DOT_STYLES = new Set(['dot', 'circle', 'sesame']);
|
|
254
|
-
const SIDES = new Set(['over', 'under']);
|
|
255
|
-
const SIDELINE_STYLES = new Set(['solid', 'double', 'wavy', 'dotted']);
|
|
256
|
-
const RUBY_SIDES = new Set(['over', 'under', 'right']);
|
|
257
|
-
function emphasisOf(attrs) {
|
|
258
|
-
const mark = {};
|
|
259
|
-
if (attrs.style && DOT_STYLES.has(attrs.style))
|
|
260
|
-
mark.style = attrs.style;
|
|
261
|
-
const fill = attrs.fill;
|
|
262
|
-
if (fill === 'open' || fill === 'filled')
|
|
263
|
-
mark.fill = fill;
|
|
264
|
-
const pos = attrs.pos ?? attrs.position;
|
|
265
|
-
if (pos && SIDES.has(pos))
|
|
266
|
-
mark.position = pos;
|
|
267
|
-
return mark;
|
|
268
|
-
}
|
|
269
|
-
/** A side line's look as written: `style` and `pos` (or `position`);
|
|
270
|
-
* values the engine does not know are left unset. */
|
|
271
|
-
function sidelineOf(id, attrs) {
|
|
272
|
-
const line = { id };
|
|
273
|
-
if (attrs.style && SIDELINE_STYLES.has(attrs.style))
|
|
274
|
-
line.style = attrs.style;
|
|
275
|
-
const pos = attrs.pos ?? attrs.position;
|
|
276
|
-
if (pos && SIDES.has(pos))
|
|
277
|
-
line.position = pos;
|
|
278
|
-
return line;
|
|
279
|
-
}
|
|
280
|
-
/** The kanbun code points (U+3191–319F, ㆑ ㆒ … ㆟): the 返り点 they
|
|
281
|
-
* stand for, set as ordinary characters at the marks' size (the fonts
|
|
282
|
-
* that have these glyphs draw them small and placed, differently from
|
|
283
|
-
* each other). U+3190 ㆐ is the 竪点. */
|
|
284
|
-
const KANBUN_MARKS = {
|
|
285
|
-
'㆑': 'レ', '㆒': '一', '㆓': '二', '㆔': '三', '㆕': '四', '㆖': '上', '㆗': '中', '㆘': '下',
|
|
286
|
-
'㆙': '甲', '㆚': '乙', '㆛': '丙', '㆜': '丁', '㆝': '天', '㆞': '地', '㆟': '人',
|
|
287
|
-
};
|
|
288
|
-
/** A kanbun mark as written: `kaeri` (返り点, kanbun code points read as
|
|
289
|
-
* the characters they stand for), `okuri` (送り仮名, `(ヲ)` read as
|
|
290
|
-
* ヲ) and the flag `tate` (竪点); empty values are left unset. */
|
|
291
|
-
function kuntenOf(id, attrs) {
|
|
292
|
-
const k = { id };
|
|
293
|
-
const kaeri = (attrs.kaeri ?? '').replace(/[㆑-㆟]/g, (c) => KANBUN_MARKS[c] ?? c).trim();
|
|
294
|
-
if (kaeri.length > 0)
|
|
295
|
-
k.kaeri = kaeri;
|
|
296
|
-
const okuri = (attrs.okuri ?? '').trim().replace(/^[((](.*)[))]$/, '$1');
|
|
297
|
-
if (okuri.length > 0)
|
|
298
|
-
k.okuri = okuri;
|
|
299
|
-
if (flag(attrs.tate))
|
|
300
|
-
k.tate = true;
|
|
301
|
-
return k;
|
|
302
|
-
}
|
|
303
|
-
/** A flag attribute: present, and not written `false` or `no`. */
|
|
304
|
-
function flag(value) {
|
|
305
|
-
return value !== undefined && value !== 'false' && value !== 'no';
|
|
306
|
-
}
|
|
307
|
-
const RUBY_MODES = new Set(['mono', 'group', 'jukugo']);
|
|
308
|
-
const RUBY_ALIGNS = new Set(['center', 'jis', 'start']);
|
|
309
|
-
/** A ruby's `mode` (#422): `mono`, `group` or `jukugo` as written (the
|
|
310
|
-
* `group` flag is `mode=group`); undefined when it says none. */
|
|
311
|
-
function rubyMode(attrs) {
|
|
312
|
-
if (flag(attrs.group))
|
|
313
|
-
return 'group';
|
|
314
|
-
const mode = attrs.mode?.trim();
|
|
315
|
-
return mode && RUBY_MODES.has(mode) ? mode : undefined;
|
|
316
|
-
}
|
|
317
|
-
/** The fields `mode` and `align` give each span of a ruby (#422). */
|
|
318
|
-
function rubyFlags(attrs, perCharacter, count) {
|
|
319
|
-
const mode = rubyMode(attrs);
|
|
320
|
-
const align = attrs.align?.trim();
|
|
321
|
-
return {
|
|
322
|
-
...(perCharacter && mode === 'jukugo' && count > 1 ? { jukugo: true } : {}),
|
|
323
|
-
...(perCharacter && mode === 'mono' ? { mono: true } : {}),
|
|
324
|
-
...(align && RUBY_ALIGNS.has(align) ? { align: align } : {}),
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* The readings of a ruby, one per base character when they pair up (a mono
|
|
329
|
-
* ruby, or a jukugo ruby), else undefined (a group ruby): the `rt`
|
|
330
|
-
* attribute split on `|` or spaces, or the readings of a compact ruby (one
|
|
331
|
-
* `|` each; a single one split on spaces).
|
|
332
|
-
*/
|
|
333
|
-
function monoReadings(entry, count) {
|
|
334
|
-
if (rubyMode(entry.attrs) === 'group')
|
|
335
|
-
return undefined;
|
|
336
|
-
let readings;
|
|
337
|
-
if (entry.readings) {
|
|
338
|
-
readings = entry.readings.length === 1 ? entry.readings[0].split(/\s+/) : entry.readings;
|
|
339
|
-
}
|
|
340
|
-
else {
|
|
341
|
-
const rt = (entry.attrs.rt ?? '').trim();
|
|
342
|
-
readings = rt.includes('|') ? rt.split('|') : rt.split(/\s+/);
|
|
343
|
-
}
|
|
344
|
-
readings = readings.map((r) => r.trim());
|
|
345
|
-
return readings.length === count && readings.every((r) => r.length > 0) ? readings : undefined;
|
|
346
|
-
}
|
|
347
|
-
/** The whole reading of a group ruby, spaces collapsed. */
|
|
348
|
-
function groupReading(entry) {
|
|
349
|
-
const raw = entry.readings ? entry.readings.join(entry.readings.length > 1 ? ' ' : '') : entry.attrs.rt ?? '';
|
|
350
|
-
return raw.replace(/\|/g, ' ').replace(/\s+/g, ' ').trim();
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* Split the spans at the annotation marks, setting the fields of each
|
|
354
|
-
* annotation on the spans between its marks and dropping the marks (and
|
|
355
|
-
* any piece left empty). `queue` holds the annotations in the order of
|
|
356
|
-
* their marks (see {@link markAnnotations}); ids count from 1 per call, so
|
|
357
|
-
* a paragraph parsed twice gets the same ones. A mono ruby becomes one span
|
|
358
|
-
* per base character; a group ruby one span (in its first piece's style).
|
|
359
|
-
*/
|
|
360
|
-
export function applyAnnotationMarks(spans, queue) {
|
|
361
|
-
if (queue.length === 0 || !spans.some((s) => MARK_RE.test(s.text)))
|
|
362
|
-
return spans;
|
|
363
|
-
const out = [];
|
|
364
|
-
const stack = [];
|
|
365
|
-
const rubies = [];
|
|
366
|
-
let next = 0;
|
|
367
|
-
let id = 0;
|
|
368
|
-
const fieldsOf = () => {
|
|
369
|
-
const fields = {};
|
|
370
|
-
let depth = 0;
|
|
371
|
-
for (const f of stack) {
|
|
372
|
-
switch (f.name) {
|
|
373
|
-
case 'dots':
|
|
374
|
-
fields.emphasisMark = emphasisOf(f.entry.attrs);
|
|
375
|
-
break;
|
|
376
|
-
case 'name':
|
|
377
|
-
fields.properName = f.id;
|
|
378
|
-
break;
|
|
379
|
-
case 'book':
|
|
380
|
-
depth++;
|
|
381
|
-
fields.bookTitle = { id: f.id, depth };
|
|
382
|
-
break;
|
|
383
|
-
case 'warichu':
|
|
384
|
-
fields.warichu = f.warichu;
|
|
385
|
-
break;
|
|
386
|
-
case 'ltr':
|
|
387
|
-
case 'rtl':
|
|
388
|
-
// The innermost isolate: it names the ones around it.
|
|
389
|
-
fields.direction = f.direction;
|
|
390
|
-
break;
|
|
391
|
-
case 'sideline':
|
|
392
|
-
// The innermost line: a span takes one.
|
|
393
|
-
fields.sideline = f.sideline;
|
|
394
|
-
break;
|
|
395
|
-
case 'kunten':
|
|
396
|
-
fields.kunten = f.kunten;
|
|
397
|
-
break;
|
|
398
|
-
case 'ruby':
|
|
399
|
-
break;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
return fields;
|
|
403
|
-
};
|
|
404
|
-
for (const span of spans) {
|
|
405
|
-
if (!MARK_RE.test(span.text)) {
|
|
406
|
-
const fields = stack.length > 0 ? fieldsOf() : undefined;
|
|
407
|
-
out.push(fields ? { ...span, ...fields } : span);
|
|
408
|
-
const ruby = innermostRuby(stack);
|
|
409
|
-
if (ruby)
|
|
410
|
-
ruby.pieces.push(out.length - 1);
|
|
411
|
-
continue;
|
|
412
|
-
}
|
|
413
|
-
let piece = '';
|
|
414
|
-
const flush = () => {
|
|
415
|
-
if (piece.length === 0)
|
|
416
|
-
return;
|
|
417
|
-
out.push({ ...span, text: piece, ...fieldsOf() });
|
|
418
|
-
const ruby = innermostRuby(stack);
|
|
419
|
-
if (ruby)
|
|
420
|
-
ruby.pieces.push(out.length - 1);
|
|
421
|
-
piece = '';
|
|
422
|
-
};
|
|
423
|
-
for (const ch of span.text) {
|
|
424
|
-
const kind = KIND_OF_OPEN.get(ch);
|
|
425
|
-
if (kind !== undefined) {
|
|
426
|
-
flush();
|
|
427
|
-
const entry = queue[next++] ?? { name: kind, attrs: {} };
|
|
428
|
-
const frame = { name: kind, entry, id: ++id };
|
|
429
|
-
if (kind === 'warichu') {
|
|
430
|
-
frame.warichu = {
|
|
431
|
-
id: frame.id,
|
|
432
|
-
...(entry.attrs.open !== undefined ? { open: entry.attrs.open } : {}),
|
|
433
|
-
...(entry.attrs.close !== undefined ? { close: entry.attrs.close } : {}),
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
if (kind === 'ruby') {
|
|
437
|
-
frame.pieces = [];
|
|
438
|
-
rubies.push(frame);
|
|
439
|
-
}
|
|
440
|
-
if (kind === 'sideline')
|
|
441
|
-
frame.sideline = sidelineOf(frame.id, entry.attrs);
|
|
442
|
-
if (kind === 'kunten')
|
|
443
|
-
frame.kunten = kuntenOf(frame.id, entry.attrs);
|
|
444
|
-
if (kind === 'ltr' || kind === 'rtl') {
|
|
445
|
-
let outer;
|
|
446
|
-
for (let i = stack.length - 1; i >= 0 && !outer; i--)
|
|
447
|
-
outer = stack[i].direction;
|
|
448
|
-
const lang = entry.attrs.lang?.trim();
|
|
449
|
-
frame.direction = {
|
|
450
|
-
dir: kind,
|
|
451
|
-
id: frame.id,
|
|
452
|
-
...(lang ? { lang } : {}),
|
|
453
|
-
...(outer ? { outer } : {}),
|
|
454
|
-
};
|
|
455
|
-
}
|
|
456
|
-
stack.push(frame);
|
|
457
|
-
continue;
|
|
458
|
-
}
|
|
459
|
-
if (ch === CLOSE) {
|
|
460
|
-
flush();
|
|
461
|
-
stack.pop();
|
|
462
|
-
continue;
|
|
463
|
-
}
|
|
464
|
-
piece += ch;
|
|
465
|
-
}
|
|
466
|
-
flush();
|
|
467
|
-
}
|
|
468
|
-
if (rubies.length === 0)
|
|
469
|
-
return out;
|
|
470
|
-
// The rubies: each piece index to the spans it becomes.
|
|
471
|
-
const replace = new Map();
|
|
472
|
-
const drop = new Set();
|
|
473
|
-
for (const frame of rubies) {
|
|
474
|
-
const pieces = frame.pieces;
|
|
475
|
-
if (pieces.length === 0)
|
|
476
|
-
continue;
|
|
477
|
-
const base = pieces.map((i) => out[i].text).join('');
|
|
478
|
-
const graphemes = graphemesOf(base);
|
|
479
|
-
const pos = frame.entry.attrs.pos ?? frame.entry.attrs.position;
|
|
480
|
-
const position = pos && RUBY_SIDES.has(pos) ? pos : undefined;
|
|
481
|
-
const readings = monoReadings(frame.entry, graphemes.length);
|
|
482
|
-
const flags = rubyFlags(frame.entry.attrs, readings !== undefined, graphemes.length);
|
|
483
|
-
if (readings) {
|
|
484
|
-
let r = 0;
|
|
485
|
-
for (const i of pieces) {
|
|
486
|
-
const span = out[i];
|
|
487
|
-
const parts = [];
|
|
488
|
-
for (const g of graphemesOf(span.text)) {
|
|
489
|
-
parts.push({ ...span, text: g, ruby: { text: readings[r++], id: frame.id, ...(position ? { position } : {}), ...flags } });
|
|
490
|
-
}
|
|
491
|
-
replace.set(i, parts);
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
else {
|
|
495
|
-
const first = out[pieces[0]];
|
|
496
|
-
const reading = groupReading(frame.entry);
|
|
497
|
-
replace.set(pieces[0], [{
|
|
498
|
-
...first,
|
|
499
|
-
text: base,
|
|
500
|
-
...(reading.length > 0 ? { ruby: { text: reading, group: true, id: frame.id, ...(position ? { position } : {}), ...flags } } : {}),
|
|
501
|
-
}]);
|
|
502
|
-
for (const i of pieces.slice(1))
|
|
503
|
-
drop.add(i);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
const result = [];
|
|
507
|
-
out.forEach((span, i) => {
|
|
508
|
-
if (drop.has(i))
|
|
509
|
-
return;
|
|
510
|
-
const parts = replace.get(i);
|
|
511
|
-
if (parts)
|
|
512
|
-
result.push(...parts);
|
|
513
|
-
else
|
|
514
|
-
result.push(span);
|
|
515
|
-
});
|
|
516
|
-
return result;
|
|
517
|
-
}
|
|
518
|
-
/** The fields of an annotation a span carries, for a pass that cuts a span
|
|
519
|
-
* into pieces (a placeholder injected inside it): every piece keeps them.
|
|
520
|
-
* `withRuby` keeps a ruby too (a text piece; never the placeholder). */
|
|
521
|
-
export function annotationFields(span, withRuby = true) {
|
|
522
|
-
const out = {};
|
|
523
|
-
if (span.emphasisMark)
|
|
524
|
-
out.emphasisMark = span.emphasisMark;
|
|
525
|
-
if (span.properName !== undefined)
|
|
526
|
-
out.properName = span.properName;
|
|
527
|
-
if (span.bookTitle)
|
|
528
|
-
out.bookTitle = span.bookTitle;
|
|
529
|
-
if (span.warichu)
|
|
530
|
-
out.warichu = span.warichu;
|
|
531
|
-
if (span.direction)
|
|
532
|
-
out.direction = span.direction;
|
|
533
|
-
if (span.sideline)
|
|
534
|
-
out.sideline = span.sideline;
|
|
535
|
-
if (span.kunten)
|
|
536
|
-
out.kunten = span.kunten;
|
|
537
|
-
if (withRuby && span.ruby)
|
|
538
|
-
out.ruby = span.ruby;
|
|
539
|
-
if (span.inserted)
|
|
540
|
-
out.inserted = true;
|
|
541
|
-
return out;
|
|
542
|
-
}
|
|
543
|
-
/**
|
|
544
|
-
* Where the annotations of a stretch of source (`[from, end)` of
|
|
545
|
-
* `markdown`) put markup the plain text does not print: each opener
|
|
546
|
-
* (`:dots[`, a compact ruby's `{`) and each closer (`]` with its `{…}`, a
|
|
547
|
-
* compact ruby's `|…}`), sorted. `computeSourceMap` steps over them, so a
|
|
548
|
-
* plain space after `:ruby[紅]{rt="hóng lóu"}` never maps into the reading.
|
|
549
|
-
* Inline code is left alone, as the parser leaves it.
|
|
550
|
-
*/
|
|
551
|
-
export function annotationSourceSkips(markdown, from, end) {
|
|
552
|
-
const out = [];
|
|
553
|
-
const slice = markdown.slice(from, end);
|
|
554
|
-
if (!/:(?:dots|name|book|ruby|warichu|ltr|rtl|sideline|kunten)\[|\{[^{}\n|]*\|/.test(slice))
|
|
555
|
-
return out;
|
|
556
|
-
// Inline code spans, which the parser protects.
|
|
557
|
-
const code = [];
|
|
558
|
-
const codeRe = /(?<!\\)`[^`\n]+?`/g;
|
|
559
|
-
let m;
|
|
560
|
-
while ((m = codeRe.exec(slice)) !== null)
|
|
561
|
-
code.push([from + m.index, from + m.index + m[0].length]);
|
|
562
|
-
const inCode = (at) => code.some(([s, e]) => at >= s && at < e);
|
|
563
|
-
const walk = (at, stop) => {
|
|
564
|
-
for (;;) {
|
|
565
|
-
const found = nextAnnotation(markdown, at, stop);
|
|
566
|
-
if (!found)
|
|
567
|
-
return;
|
|
568
|
-
if (inCode(found.start)) {
|
|
569
|
-
at = found.start + 1;
|
|
570
|
-
continue;
|
|
571
|
-
}
|
|
572
|
-
out.push([found.start, found.contentStart]);
|
|
573
|
-
walk(found.contentStart, found.contentEnd);
|
|
574
|
-
out.push([found.contentEnd, found.end]);
|
|
575
|
-
at = found.end;
|
|
576
|
-
}
|
|
577
|
-
};
|
|
578
|
-
walk(from, end);
|
|
579
|
-
return out.sort((a, b) => a[0] - b[0]);
|
|
580
|
-
}
|
|
581
|
-
/**
|
|
582
|
-
* Every annotation of a line of source, nested ones included, in order of
|
|
583
|
-
* their openers (for an editor's highlighting): its kind, the opener
|
|
584
|
-
* (`[start, contentStart)`), the text (`[contentStart, contentEnd)`) and the
|
|
585
|
-
* closer with its attributes or readings (`[contentEnd, end)`).
|
|
586
|
-
*/
|
|
587
|
-
export function findAnnotations(text) {
|
|
588
|
-
const out = [];
|
|
589
|
-
const walk = (at, stop) => {
|
|
590
|
-
for (;;) {
|
|
591
|
-
const found = nextAnnotation(text, at, stop);
|
|
592
|
-
if (!found)
|
|
593
|
-
return;
|
|
594
|
-
out.push(found);
|
|
595
|
-
walk(found.contentStart, found.contentEnd);
|
|
596
|
-
at = found.end;
|
|
597
|
-
}
|
|
598
|
-
};
|
|
599
|
-
walk(0, text.length);
|
|
600
|
-
return out;
|
|
601
|
-
}
|
|
602
|
-
/** The brackets of a Chinese book title: 《》, 〈〉 for a title inside
|
|
603
|
-
* one (`defaultCjkBookTitleBrackets`). */
|
|
604
|
-
const CHINESE_BOOK_BRACKETS = [{ open: '《', close: '》' }, { open: '〈', close: '〉' }];
|
|
605
|
-
/** The side line the brackets of the title opening at `spans[at]` carry:
|
|
606
|
-
* the one its first and its last character share, if any (a line drawn
|
|
607
|
-
* under a whole title runs on under its brackets). */
|
|
608
|
-
function titleSideline(spans, at, depth, id) {
|
|
609
|
-
const line = spans[at].sideline;
|
|
610
|
-
if (!line)
|
|
611
|
-
return undefined;
|
|
612
|
-
let last = at;
|
|
613
|
-
for (let k = at + 1; k < spans.length; k++) {
|
|
614
|
-
const book = spans[k].bookTitle;
|
|
615
|
-
if (!book || book.depth < depth || (book.depth === depth && book.id !== id))
|
|
616
|
-
break;
|
|
617
|
-
last = k;
|
|
618
|
-
}
|
|
619
|
-
return spans[last].sideline?.id === line.id ? line : undefined;
|
|
620
|
-
}
|
|
621
|
-
/** The brackets of `pairs` around the titles of `:book[…]` (`《》` and
|
|
622
|
-
* `〈〉` for a title inside one unless `pairs` says otherwise; a title
|
|
623
|
-
* nested deeper than the list takes its last pair), as spans flagged
|
|
624
|
-
* `inserted` (they take no character of the plain text); the titles lose
|
|
625
|
-
* their `bookTitle`. A bracket written empty is left out.
|
|
626
|
-
* `cjk.bookTitleMark: 'brackets'` with `cjk.bookTitleBrackets`. */
|
|
627
|
-
export function withBookBrackets(spans, pairs = CHINESE_BOOK_BRACKETS) {
|
|
628
|
-
const out = [];
|
|
629
|
-
const list = pairs.length > 0 ? pairs : CHINESE_BOOK_BRACKETS;
|
|
630
|
-
const pairAt = (depth) => list[Math.min(depth, list.length) - 1];
|
|
631
|
-
// Open titles, by depth (index 0 = depth 1): their run ids, and the side
|
|
632
|
-
// line their brackets carry.
|
|
633
|
-
const open = [];
|
|
634
|
-
const bracket = (text, line) => {
|
|
635
|
-
if (text.length > 0)
|
|
636
|
-
out.push({ text, bold: false, italic: false, inserted: true, ...(line ? { sideline: line } : {}) });
|
|
637
|
-
};
|
|
638
|
-
const close = (toDepth) => {
|
|
639
|
-
while (open.length > toDepth) {
|
|
640
|
-
bracket(pairAt(open.length).close, open[open.length - 1].line);
|
|
641
|
-
open.pop();
|
|
642
|
-
}
|
|
643
|
-
};
|
|
644
|
-
spans.forEach((span, i) => {
|
|
645
|
-
const book = span.bookTitle;
|
|
646
|
-
if (!book) {
|
|
647
|
-
close(0);
|
|
648
|
-
out.push(span);
|
|
649
|
-
return;
|
|
650
|
-
}
|
|
651
|
-
if (open.length >= book.depth && open[book.depth - 1].id === book.id)
|
|
652
|
-
close(book.depth);
|
|
653
|
-
else {
|
|
654
|
-
close(book.depth - 1);
|
|
655
|
-
while (open.length < book.depth) {
|
|
656
|
-
const own = open.length === book.depth - 1;
|
|
657
|
-
const line = own ? titleSideline(spans, i, book.depth, book.id) : undefined;
|
|
658
|
-
bracket(pairAt(open.length + 1).open, line);
|
|
659
|
-
open.push({ id: own ? book.id : -1, ...(line ? { line } : {}) });
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
663
|
-
const { bookTitle: _b, ...rest } = span;
|
|
664
|
-
out.push(rest);
|
|
665
|
-
});
|
|
666
|
-
close(0);
|
|
667
|
-
return out;
|
|
668
|
-
}
|
|
21
|
+
export { ANNOTATION_NAMES, closingBracket, markAnnotations, stripAnnotations, hasAnnotationMarks } from './annotations/scan.js';
|
|
22
|
+
export { applyAnnotationMarks, annotationFields } from './annotations/apply.js';
|
|
23
|
+
export { annotationSourceSkips, findAnnotations, withBookBrackets } from './annotations/source.js';
|
|
669
24
|
//# sourceMappingURL=annotations.js.map
|