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
|
@@ -8,611 +8,20 @@
|
|
|
8
8
|
* mode or direction; the reading direction of the panels comes from
|
|
9
9
|
* `comics.readingDirection` (or the page's `direction`).
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
12
|
-
import { flowRectToPage } from '../vdt.js';
|
|
13
|
-
import { resolvedDirection, resolvedLocale } from '../pipeline/config.js';
|
|
11
|
+
import { isCornerRadii, cornerRadiiPx, uniformRadius } from '../design/boxShape.js';
|
|
14
12
|
import { dimensionToPx } from '../units.js';
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { comicBalloonElementId, comicBoxStyle, comicElementId, comicFrameElementId, comicFrameSpecs, comicPanelFrame, isComicTextPanel } from './frames.js';
|
|
13
|
+
import { resolvedComics, pickPanelStyle } from '../defaults/comics.js';
|
|
14
|
+
import { comicArtCrop } from './art.js';
|
|
15
|
+
import { comicGeometry } from './geometry.js';
|
|
16
|
+
import { comicFrameSpecs, comicBoxStyle, isComicTextPanel, comicFrameElementId, comicElementId, comicPanelFrame, comicBalloonElementId } from './frames.js';
|
|
20
17
|
import { parseComicPoint } from './script.js';
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export
|
|
28
|
-
const leaf = comics.viewerLeaf;
|
|
29
|
-
if (!leaf || !(leaf.fitWidth > 0))
|
|
30
|
-
return undefined;
|
|
31
|
-
const dpi0 = resolved.page.dpi;
|
|
32
|
-
const w0 = dimensionToPx(leaf.width, dpi0);
|
|
33
|
-
const h0 = dimensionToPx(leaf.height, dpi0);
|
|
34
|
-
if (!(w0 > 0) || !(h0 > 0))
|
|
35
|
-
return undefined;
|
|
36
|
-
const k = Math.min(leaf.fitWidth / w0, leaf.fitHeight && leaf.fitHeight > 0 ? leaf.fitHeight / h0 : Infinity);
|
|
37
|
-
const dpi = dpi0 * k;
|
|
38
|
-
const width = w0 * k;
|
|
39
|
-
const height = h0 * k;
|
|
40
|
-
const box = { x: trim.x + Math.max(0, (trim.width - width) / 2), y: trim.y, width, height };
|
|
41
|
-
const m = leaf.margins ?? {};
|
|
42
|
-
const at = (d) => (d ? dimensionToPx(d, dpi) : 0);
|
|
43
|
-
const left = at(m.left);
|
|
44
|
-
const right = at(m.right);
|
|
45
|
-
const top = at(m.top);
|
|
46
|
-
const bottom = at(m.bottom);
|
|
47
|
-
const content = { x: box.x + left, y: box.y + top, width: Math.max(0, width - left - right), height: Math.max(0, height - top - bottom) };
|
|
48
|
-
return { box, content, dpi };
|
|
49
|
-
}
|
|
50
|
-
/** A Dimension written in an attribute (`4mm`, `0.5cm`, `6pt`, `12px`, a
|
|
51
|
-
* bare number in mm), or undefined. */
|
|
52
|
-
export function parseComicDimension(value) {
|
|
53
|
-
if (value === undefined)
|
|
54
|
-
return undefined;
|
|
55
|
-
// The number is `4`, `0.5` or `.5`, each written one way only (linear).
|
|
56
|
-
const m = /^([0-9]+(?:\.[0-9]+)?|\.[0-9]+)(?:\s*(mm|cm|in|pt|px))?$/.exec(value.trim());
|
|
57
|
-
if (!m)
|
|
58
|
-
return undefined;
|
|
59
|
-
return { value: Number(m[1]), unit: m[2] ?? 'mm' };
|
|
60
|
-
}
|
|
61
|
-
/** Whether a flag attribute is on: present, and not `false` / `no` / `0`. */
|
|
62
|
-
function flagOn(value) {
|
|
63
|
-
if (value === undefined)
|
|
64
|
-
return undefined;
|
|
65
|
-
const t = value.trim().toLowerCase();
|
|
66
|
-
return !(t === 'false' || t === 'no' || t === '0' || t === 'none');
|
|
67
|
-
}
|
|
68
|
-
/** The reading direction of a page: its `direction` attribute, else the
|
|
69
|
-
* document's ({@link comicReadingDirection}): `'auto'` is `'rtl'` in a
|
|
70
|
-
* right-to-left document (an Arabic edition mirrors its pages), in a
|
|
71
|
-
* vertical one and in a Japanese or Traditional Chinese one (a localized
|
|
72
|
-
* edition of a Western comic reads in its language's direction), and the
|
|
73
|
-
* direction the art was drawn for otherwise (`comics.artDirection`: a
|
|
74
|
-
* manga stays right to left in any language). Every comic of the
|
|
75
|
-
* document — pages, spreads, strips, their lettering order and the
|
|
76
|
-
* guided views — reads in the direction this returns. */
|
|
77
|
-
export function comicPageDirection(source, comics, resolved) {
|
|
78
|
-
const own = source.attrs.direction?.trim().toLowerCase() ?? source.attrs.dir?.trim().toLowerCase();
|
|
79
|
-
if (own === 'ltr' || own === 'rtl')
|
|
80
|
-
return own;
|
|
81
|
-
return comicReadingDirection(comics, {
|
|
82
|
-
locale: resolvedLocale(resolved),
|
|
83
|
-
direction: resolvedDirection(resolved),
|
|
84
|
-
writingMode: resolved.layout.writingMode,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
/** A panel's `pad` (CSS-like, one to four values: top, end, bottom,
|
|
88
|
-
* start; each a Dimension or a percentage of the cell, `pad="0 12%"`) as
|
|
89
|
-
* px insets of a cell `cell` wide and high on a page read in
|
|
90
|
-
* `direction`. Undefined when unset or unreadable. */
|
|
91
|
-
export function comicPanelPadding(value, cell, direction, dpi) {
|
|
92
|
-
const parts = value?.trim().split(/[\s,]+/).filter(Boolean) ?? [];
|
|
93
|
-
if (parts.length === 0 || parts.length > 4)
|
|
94
|
-
return undefined;
|
|
95
|
-
const px = (v, along) => {
|
|
96
|
-
const pct = /^\s*(-?[0-9]*\.?[0-9]+)\s*%\s*$/.exec(v);
|
|
97
|
-
if (pct)
|
|
98
|
-
return (Number(pct[1]) / 100) * along;
|
|
99
|
-
if (/^\s*0+(?:\.0*)?\s*$/.test(v))
|
|
100
|
-
return 0;
|
|
101
|
-
const d = parseComicDimension(v);
|
|
102
|
-
return d ? dimensionToPx(d, dpi) : undefined;
|
|
103
|
-
};
|
|
104
|
-
const [t, e = t, b = t, st = e] = parts;
|
|
105
|
-
const top = px(t, cell.height);
|
|
106
|
-
const end = px(e, cell.width);
|
|
107
|
-
const bottom = px(b, cell.height);
|
|
108
|
-
const start = px(st, cell.width);
|
|
109
|
-
if (top === undefined || end === undefined || bottom === undefined || start === undefined)
|
|
110
|
-
return undefined;
|
|
111
|
-
const clampV = (v) => Math.max(0, v);
|
|
112
|
-
return direction === 'ltr'
|
|
113
|
-
? { top: clampV(top), right: clampV(end), bottom: clampV(bottom), left: clampV(start) }
|
|
114
|
-
: { top: clampV(top), right: clampV(start), bottom: clampV(bottom), left: clampV(end) };
|
|
115
|
-
}
|
|
116
|
-
/** A colour written in an attribute: `#rgb` / `#rrggbb`, or a palette id. */
|
|
117
|
-
function attrColor(value, palette) {
|
|
118
|
-
const v = value?.trim();
|
|
119
|
-
if (!v)
|
|
120
|
-
return undefined;
|
|
121
|
-
if (/^#[0-9a-f]{3}(?:[0-9a-f]{3})?(?:[0-9a-f]{2})?$/i.test(v))
|
|
122
|
-
return v;
|
|
123
|
-
if (v === 'none' || v === 'transparent')
|
|
124
|
-
return 'transparent';
|
|
125
|
-
return palette?.find((e) => e.id === v)?.value.hex;
|
|
126
|
-
}
|
|
127
|
-
/** The sides of the frame a panel bleeds through: the page's `bleed`, the
|
|
128
|
-
* panel's (`bleed`, `bleed="top start"`, `bleed=false`), else its style's. */
|
|
129
|
-
function bleedSides(page, panel, style, direction) {
|
|
130
|
-
const all = ['top', 'bottom', 'left', 'right'];
|
|
131
|
-
const own = panel?.attrs.bleed;
|
|
132
|
-
if (own !== undefined) {
|
|
133
|
-
const t = own.trim().toLowerCase();
|
|
134
|
-
if (t === '' || t === 'true' || t === 'all')
|
|
135
|
-
return all;
|
|
136
|
-
if (t === 'false' || t === 'none' || t === 'no')
|
|
137
|
-
return [];
|
|
138
|
-
return t.split(/[\s,]+/).map((s) => physicalSide(s, direction)).filter((s) => s !== undefined);
|
|
139
|
-
}
|
|
140
|
-
if (flagOn(page.attrs.bleed))
|
|
141
|
-
return all;
|
|
142
|
-
return style.bleed ? all : [];
|
|
143
|
-
}
|
|
144
|
-
/** The picture of a resource a panel names, if it is one. */
|
|
145
|
-
function pictureOf(resources, id) {
|
|
146
|
-
if (!id)
|
|
147
|
-
return undefined;
|
|
148
|
-
const r = resources.get(id);
|
|
149
|
-
if (!r)
|
|
150
|
-
return undefined;
|
|
151
|
-
if (r.kind === 'bitmap' && r.bitmap)
|
|
152
|
-
return { resource: r, kind: 'bitmap', fileId: r.bitmap.fileId, format: r.bitmap.format, width: r.bitmap.width, height: r.bitmap.height };
|
|
153
|
-
if (r.kind === 'svg' && r.svg)
|
|
154
|
-
return { resource: r, kind: 'svg', fileId: r.svg.fileId, width: r.svg.width ?? 0, height: r.svg.height ?? 0 };
|
|
155
|
-
return undefined;
|
|
156
|
-
}
|
|
157
|
-
/** The frame of a page: the content area on the sheet, or the trim inset
|
|
158
|
-
* by `comics.frame.margins`. */
|
|
159
|
-
export function comicPageFrame(ctx, comics = resolvedComics(ctx.resolved)) {
|
|
160
|
-
const m = comics.frame.margins;
|
|
161
|
-
if (!m)
|
|
162
|
-
return ctx.contentBox ?? flowRectToPage(ctx.page, ctx.page.contentArea);
|
|
163
|
-
const dpi = ctx.resolved.page.dpi;
|
|
164
|
-
const t = ctx.trimBox;
|
|
165
|
-
let left = dimensionToPx(m.left, dpi);
|
|
166
|
-
let right = dimensionToPx(m.right, dpi);
|
|
167
|
-
if (m.mirror && ctx.mirrorMargins)
|
|
168
|
-
[left, right] = [right, left];
|
|
169
|
-
const top = dimensionToPx(m.top, dpi);
|
|
170
|
-
const bottom = dimensionToPx(m.bottom, dpi);
|
|
171
|
-
return { x: t.x + left, y: t.y + top, width: Math.max(0, t.width - left - right), height: Math.max(0, t.height - top - bottom) };
|
|
172
|
-
}
|
|
173
|
-
/** The panel gutters (px): the page's `gutter` (one value for both, or
|
|
174
|
-
* `"rows columns"`), else the config's. */
|
|
175
|
-
function comicGutters(source, comics, dpi) {
|
|
176
|
-
const parts = source.attrs.gutter?.trim().split(/\s+/).filter(Boolean) ?? [];
|
|
177
|
-
const a = parseComicDimension(parts[0]);
|
|
178
|
-
const b = parseComicDimension(parts[1]) ?? a;
|
|
179
|
-
return {
|
|
180
|
-
rows: dimensionToPx(a ?? comics.gutter.horizontal, dpi),
|
|
181
|
-
columns: dimensionToPx(b ?? comics.gutter.vertical, dpi),
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
/** Layout warnings of the comic pages laid out, keyed by the page they
|
|
185
|
-
* belong to (each build pass lays its pages out afresh; only the last
|
|
186
|
-
* pass's pages reach the document). */
|
|
187
|
-
const layoutWarnings = new WeakMap();
|
|
188
|
-
/** The warnings the layout of a comic page found (`comicPanelLetterbox`,
|
|
189
|
-
* `comicBalloonOverflow`). */
|
|
190
|
-
export function comicPageLayoutWarnings(comic) {
|
|
191
|
-
return layoutWarnings.get(comic) ?? [];
|
|
192
|
-
}
|
|
193
|
-
/** The script (or text) each laid-out panel of a comic was set from, by
|
|
194
|
-
* the comic laid out (#885): what fills a text panel's frame. */
|
|
195
|
-
const panelSourcesOf = new WeakMap();
|
|
196
|
-
/** The source of each panel of a comic laid out by {@link layoutComicFrame}
|
|
197
|
-
* (undefined for an empty cell), in panel order. Internal to the comics
|
|
198
|
-
* modules. */
|
|
199
|
-
export function comicPanelSources(comic) {
|
|
200
|
-
return panelSourcesOf.get(comic) ?? [];
|
|
201
|
-
}
|
|
202
|
-
/** The panel sources of a comic laid out whole, given to a part of it (a
|
|
203
|
-
* half of a spread) or a copy moved elsewhere (a strip on the sheet): the
|
|
204
|
-
* sources stay indexed by the panels' `index`. Internal to the comics
|
|
205
|
-
* modules. */
|
|
206
|
-
export function copyComicPanelSources(from, to) {
|
|
207
|
-
const sources = panelSourcesOf.get(from);
|
|
208
|
-
if (sources)
|
|
209
|
-
panelSourcesOf.set(to, sources);
|
|
210
|
-
}
|
|
211
|
-
/** Set the layout warnings of a comic laid out in parts (each page of a
|
|
212
|
-
* spread gets those of its panels). Internal to the comics modules. */
|
|
213
|
-
export function setComicLayoutWarnings(comic, warnings) {
|
|
214
|
-
if (warnings.length > 0)
|
|
215
|
-
layoutWarnings.set(comic, [...warnings]);
|
|
216
|
-
else
|
|
217
|
-
layoutWarnings.delete(comic);
|
|
218
|
-
}
|
|
219
|
-
/** The document language the lettering is set in (as
|
|
220
|
-
* {@link resolvedComics} reads it). */
|
|
221
|
-
export function comicLetteringLocale(resolved) {
|
|
222
|
-
const h = resolved.bodyText.hyphenation;
|
|
223
|
-
return presentTag(resolved.locale) ?? presentTag(h.tag) ?? presentTag(h.locale) ?? 'en';
|
|
224
|
-
}
|
|
225
|
-
/** Whether balloons are set vertically: `lettering.writingMode`, `auto`
|
|
226
|
-
* meaning vertical for Japanese and Traditional Chinese (the comics of
|
|
227
|
-
* both are lettered in columns) and in a vertical document. */
|
|
228
|
-
export function comicLetteringVertical(comics, resolved, locale) {
|
|
229
|
-
const mode = comics.lettering.writingMode;
|
|
230
|
-
if (mode === 'vertical')
|
|
231
|
-
return true;
|
|
232
|
-
if (mode === 'horizontal')
|
|
233
|
-
return false;
|
|
234
|
-
return isJapaneseLanguage(locale) || chineseScriptOf(locale) === 'Hant' || resolved.layout.writingMode === 'vertical-rl';
|
|
235
|
-
}
|
|
236
|
-
/** The role's own balloon style. */
|
|
237
|
-
function roleStyleId(role) {
|
|
238
|
-
return role === 'speech' ? 'speech' : role;
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* A balloon style of the config resolved to the lettering's px style
|
|
242
|
-
* (SPEC D4 → D3): the style over the book's lettering, the speaker's cast
|
|
243
|
-
* entry and the line's own `color` / `font` over both. One lettering size
|
|
244
|
-
* per book: `fontScale` is the only factor (a sound effect's `size=` scales
|
|
245
|
-
* the item, not the style).
|
|
246
|
-
*/
|
|
247
|
-
export function comicLetteringStyle(input) {
|
|
248
|
-
const { style: st, comics, cast, item, locale, vertical, dpi } = input;
|
|
249
|
-
const L = comics.lettering;
|
|
250
|
-
const em = dimensionToPx(L.fontSize, dpi);
|
|
251
|
-
const size = em * (st.fontScale > 0 ? st.fontScale : 1);
|
|
252
|
-
const cjk = isCjkLanguage(locale);
|
|
253
|
-
const rtl = directionOf(locale) === 'rtl';
|
|
254
|
-
// Leading: the book's, or what a column of CJK or a line of Arabic needs
|
|
255
|
-
// when the book leaves the default.
|
|
256
|
-
const lineHeight = L.lineHeight !== DEFAULT_LETTERING_STATIC.lineHeight ? L.lineHeight
|
|
257
|
-
: vertical || cjk ? 1.5 : rtl ? 1.45 : L.lineHeight;
|
|
258
|
-
const letterSpacing = dimensionToPx(st.letterSpacing ?? L.letterSpacing, dpi, size);
|
|
259
|
-
const dropFinalStop = L.dropFinalStop === 'auto' ? undefined : L.dropFinalStop;
|
|
260
|
-
const out = {
|
|
261
|
-
id: st.id,
|
|
262
|
-
shape: st.shape,
|
|
263
|
-
fill: cast?.fill?.hex ?? st.fill.hex,
|
|
264
|
-
stroke: st.stroke.hex,
|
|
265
|
-
strokeWidth: dimensionToPx(st.strokeWidth, dpi, size),
|
|
266
|
-
...(st.dash ? { dash: true } : {}),
|
|
267
|
-
...(st.double ? { double: true } : {}),
|
|
268
|
-
...(st.wobble ? { wobble: st.wobble } : {}),
|
|
269
|
-
roundness: st.roundness,
|
|
270
|
-
...(st.burstPoints ? { burstPoints: st.burstPoints } : {}),
|
|
271
|
-
...(st.burstDepth ? { burstDepthRatio: st.burstDepth } : {}),
|
|
272
|
-
padding: dimensionToPx(st.padding, dpi, size),
|
|
273
|
-
aspect: st.aspect,
|
|
274
|
-
tail: st.tail,
|
|
275
|
-
tailWidth: dimensionToPx(st.tailWidth, dpi, size),
|
|
276
|
-
tailReach: st.tailReach,
|
|
277
|
-
target: st.target,
|
|
278
|
-
position: st.position,
|
|
279
|
-
...(st.butt ? { butt: true } : {}),
|
|
280
|
-
fontFamily: item?.font?.trim() || cast?.fontFamily || st.fontFamily || L.fontFamily,
|
|
281
|
-
fontSizePx: size,
|
|
282
|
-
lineHeight,
|
|
283
|
-
fontWeight: (st.bold ?? L.bold) ? 700 : 400,
|
|
284
|
-
// Italics only in scripts that have them (the lettering of Arabic,
|
|
285
|
-
// Hebrew and CJK is never slanted).
|
|
286
|
-
...((st.italic ?? L.italic) && !cjk && !rtl ? { italic: true } : {}),
|
|
287
|
-
color: attrColor(item?.color, input.palette) ?? cast?.color?.hex ?? (st.color ?? L.color).hex,
|
|
288
|
-
textTransform: st.textTransform ?? L.textTransform,
|
|
289
|
-
...(letterSpacing ? { letterSpacing } : {}),
|
|
290
|
-
align: st.align,
|
|
291
|
-
emphasis: 'bold-italic',
|
|
292
|
-
writingMode: 'auto',
|
|
293
|
-
maxColumnChars: L.maxColumnChars,
|
|
294
|
-
...(dropFinalStop !== undefined ? { dropFinalStop } : {}),
|
|
295
|
-
...(L.doubleDash ? { doubleDash: true } : {}),
|
|
296
|
-
...(st.halo ? { halo: dimensionToPx(st.halo, dpi, size), haloColor: st.haloColor?.hex ?? '#ffffff' } : {}),
|
|
297
|
-
...(st.rotate ? { rotate: st.rotate } : {}),
|
|
298
|
-
...(st.skew ? { skew: st.skew } : {}),
|
|
299
|
-
};
|
|
300
|
-
return out;
|
|
301
|
-
}
|
|
302
|
-
/** A sound effect set in columns breaks after five characters at most
|
|
303
|
-
* (its letters are big: a long column would run out of the panel). */
|
|
304
|
-
function sfxColumns(role, style) {
|
|
305
|
-
return role === 'sfx' ? { ...style, maxColumnChars: Math.min(5, style.maxColumnChars ?? 5) } : style;
|
|
306
|
-
}
|
|
307
|
-
/** A point given in fractions of a panel's picture (of its cell, for a
|
|
308
|
-
* panel without one) on the page. */
|
|
309
|
-
function panelPoint(panel, at) {
|
|
310
|
-
if (panel.art)
|
|
311
|
-
return comicArtPointToPage(panel.art, at.x, at.y);
|
|
312
|
-
return { x: panel.bbox.x + at.x * panel.bbox.width, y: panel.bbox.y + at.y * panel.bbox.height };
|
|
313
|
-
}
|
|
314
|
-
/** The anchors of a panel's picture on the page, each with whether its
|
|
315
|
-
* mouth is in view. */
|
|
316
|
-
function panelAnchors(panel, resource) {
|
|
317
|
-
const art = panel.art;
|
|
318
|
-
if (!art || !resource?.anchors)
|
|
319
|
-
return [];
|
|
320
|
-
return resource.anchors.map((a) => {
|
|
321
|
-
const mouth = comicArtPointToPage(art, a.x, a.y);
|
|
322
|
-
return {
|
|
323
|
-
id: a.id,
|
|
324
|
-
mouth,
|
|
325
|
-
...(a.head ? { head: comicArtPointToPage(art, a.head.x, a.head.y) } : {}),
|
|
326
|
-
...(a.face ? { face: comicArtRectToPage(art, a.face) } : {}),
|
|
327
|
-
visible: pointInPolygon(panel.polygon, mouth),
|
|
328
|
-
};
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
/** The faces a panel's picture marks for people who do not speak
|
|
332
|
-
* (`Resource.faces`, #726), on the page: through the crop and the mirror,
|
|
333
|
-
* as an anchor's face is. */
|
|
334
|
-
function bystanderFaces(panel, resource) {
|
|
335
|
-
const art = panel.art;
|
|
336
|
-
if (!art || !resource?.faces)
|
|
337
|
-
return [];
|
|
338
|
-
return resource.faces.map((r) => comicArtRectToPage(art, r));
|
|
339
|
-
}
|
|
340
|
-
/** The guard over a marked face: the box grown upward by 0.4 of its
|
|
341
|
-
* height and outward by a fifth of its width (hair, a hat brim). */
|
|
342
|
-
function faceGuard(f) {
|
|
343
|
-
const up = 0.4 * f.height;
|
|
344
|
-
const side = 0.2 * f.width;
|
|
345
|
-
return { x: f.x - side, y: f.y - up, width: f.width + 2 * side, height: f.height + up };
|
|
346
|
-
}
|
|
347
|
-
function overlaps(a, b) {
|
|
348
|
-
return a.x < b.x + b.width && b.x < a.x + a.width && a.y < b.y + b.height && b.y < a.y + a.height;
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
* Guards over the head of every speaker, so that balloons do not land on a
|
|
352
|
-
* hat or a head of hair. Each is an avoid zone (a balloon may still cover
|
|
353
|
-
* it as a last resort; tails run to the mouth as usual):
|
|
354
|
-
* - a marked `face` (a speaker's, or a bystander's from `Resource.faces`,
|
|
355
|
-
* #726) grown upward by 0.4 of its height and outward by a fifth of its
|
|
356
|
-
* width (hair, a hat brim; the face itself stays a hard no-go);
|
|
357
|
-
* - with no face, a box of a few ems about the mouth (and the head point),
|
|
358
|
-
* mostly above it, sized from the mouth-to-head distance when the head
|
|
359
|
-
* is marked.
|
|
360
|
-
* {@link headZones} adds the larger head a close shot may have, as a
|
|
361
|
-
* softer preference.
|
|
362
|
-
*/
|
|
363
|
-
function headGuards(panel, resource, em) {
|
|
364
|
-
const art = panel.art;
|
|
365
|
-
if (!art || !resource)
|
|
366
|
-
return [];
|
|
367
|
-
const speakers = (resource.anchors ?? []).filter((a) => a.id !== 'sfx').map((a) => {
|
|
368
|
-
if (a.face)
|
|
369
|
-
return faceGuard(comicArtRectToPage(art, a.face));
|
|
370
|
-
const mouth = comicArtPointToPage(art, a.x, a.y);
|
|
371
|
-
const head = a.head ? comicArtPointToPage(art, a.head.x, a.head.y) : mouth;
|
|
372
|
-
const d = Math.hypot(head.x - mouth.x, head.y - mouth.y);
|
|
373
|
-
const size = d > 0.5 * em ? Math.max(2.4 * d, 3.3 * em) : 3.3 * em;
|
|
374
|
-
const cx = (mouth.x + head.x) / 2;
|
|
375
|
-
const half = Math.max(1.6 * em, 0.5 * size);
|
|
376
|
-
const y0 = Math.min(mouth.y, head.y) - Math.max(2.9 * em, 0.95 * size);
|
|
377
|
-
const y1 = Math.max(mouth.y, head.y) + 0.7 * em;
|
|
378
|
-
return { x: cx - half, y: y0, width: 2 * half, height: y1 - y0 };
|
|
379
|
-
});
|
|
380
|
-
return [...speakers, ...bystanderFaces(panel, resource).map(faceGuard)];
|
|
381
|
-
}
|
|
382
|
-
/** The head a speaker with no marked face may have in a closer shot (a
|
|
383
|
-
* quarter of the shorter side of the cell, above the mouth), as a region
|
|
384
|
-
* better left uncovered: a cost per area, never a fault, so that in a
|
|
385
|
-
* long shot (small figures) a balloon still comes close. */
|
|
386
|
-
function headZones(panel, resource) {
|
|
387
|
-
const art = panel.art;
|
|
388
|
-
if (!art || !resource?.anchors)
|
|
389
|
-
return [];
|
|
390
|
-
const size = 0.22 * Math.min(panel.bbox.width, panel.bbox.height);
|
|
391
|
-
return resource.anchors.filter((a) => a.id !== 'sfx' && !a.face).map((a) => {
|
|
392
|
-
const mouth = comicArtPointToPage(art, a.x, a.y);
|
|
393
|
-
return { x: mouth.x - 0.45 * size, y: mouth.y - 1.05 * size, width: 0.9 * size, height: 1.25 * size, weight: 1.5 };
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
|
-
/** The body under every marked face (a figure's chest and arms, two
|
|
397
|
-
* hugging characters), as a region better left uncovered: a balloon goes
|
|
398
|
-
* over the background before it goes over the action. A cost per area,
|
|
399
|
-
* never a fault; each zone names its figure (`owner`), so that a balloon
|
|
400
|
-
* costs more over another character than over its own speaker. The
|
|
401
|
-
* figure under a bystander's face (`Resource.faces`, #726) is nobody's
|
|
402
|
-
* own: its owner is a name no script key can be (a key holds no space),
|
|
403
|
-
* so every balloon pays for it as for another character's. */
|
|
404
|
-
function bodyZones(panel, resource) {
|
|
405
|
-
const art = panel.art;
|
|
406
|
-
if (!art || !resource)
|
|
407
|
-
return [];
|
|
408
|
-
const under = (f, owner) => ({ x: f.x - 0.3 * f.width, y: f.y + f.height, width: 1.6 * f.width, height: 2 * f.height, weight: 1.5, owner });
|
|
409
|
-
return [
|
|
410
|
-
...(resource.anchors ?? []).filter((a) => a.id !== 'sfx' && a.face).map((a) => under(comicArtRectToPage(art, a.face), a.id)),
|
|
411
|
-
...bystanderFaces(panel, resource).map((f, i) => under(f, `bystander face ${i}`)),
|
|
412
|
-
];
|
|
413
|
-
}
|
|
414
|
-
/** The picture's safe area as a region better left uncovered, when the art
|
|
415
|
-
* marks no face (a speaker's or a bystander's) and no avoid zone (nothing
|
|
416
|
-
* else tells the lettering what matters in it). */
|
|
417
|
-
function softSafeArea(panel, resource) {
|
|
418
|
-
const art = panel.art;
|
|
419
|
-
if (!art || !resource?.safeArea)
|
|
420
|
-
return [];
|
|
421
|
-
if ((resource.avoid?.length ?? 0) > 0 || (resource.faces?.length ?? 0) > 0 || (resource.anchors ?? []).some((a) => a.face))
|
|
422
|
-
return [];
|
|
423
|
-
return [comicArtRectToPage(art, resource.safeArea)];
|
|
424
|
-
}
|
|
425
|
-
/** Text on the art with no balloon (a `none` shape) and no halo of its
|
|
426
|
-
* own gets one, light under dark letters and dark under light ones: the
|
|
427
|
-
* white outline letterers give lettering laid on a picture (#559). */
|
|
428
|
-
function withAutoHalo(style, st) {
|
|
429
|
-
if (st.shape !== 'none' || st.halo !== undefined || style.halo)
|
|
430
|
-
return style;
|
|
431
|
-
const hex = style.color.replace('#', '');
|
|
432
|
-
const v = hex.length >= 6 ? hex.slice(0, 6) : hex.split('').map((c) => c + c).join('');
|
|
433
|
-
const [r, g, b] = [0, 2, 4].map((i) => parseInt(v.slice(i, i + 2), 16) / 255);
|
|
434
|
-
const lum = 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
435
|
-
return { ...style, halo: Math.max(0.12 * style.fontSizePx, 1), haloColor: lum < 0.5 ? '#ffffff' : '#000000' };
|
|
436
|
-
}
|
|
437
|
-
/** A box butted against the border of a framed panel (a caption at a
|
|
438
|
-
* corner) is outlined at the border's weight, so that its edges and the
|
|
439
|
-
* border read as one line. */
|
|
440
|
-
function buttedCaption(style, panel, at) {
|
|
441
|
-
const butted = style.butt && style.shape !== 'none' && (at !== undefined || (style.position !== undefined && style.position !== 'auto'));
|
|
442
|
-
if (!butted || panel.border.style === 'none' || !(panel.border.width > 0) || style.strokeWidth <= 0)
|
|
443
|
-
return style;
|
|
444
|
-
return { ...style, strokeWidth: panel.border.width };
|
|
445
|
-
}
|
|
446
|
-
/** Whether a balloon's outline is an oval or grows from one (a cloud, a
|
|
447
|
-
* burst): its box's corners are no part of it. */
|
|
448
|
-
function roundBalloon(comics, b) {
|
|
449
|
-
if (b.kind !== 'balloon' || !b.shape)
|
|
450
|
-
return false;
|
|
451
|
-
const shape = pickBalloonStyle(comics, b.style)?.shape;
|
|
452
|
-
return shape !== 'rectangle' && shape !== 'rounded' && shape !== 'none';
|
|
453
|
-
}
|
|
454
|
-
/** A balloon's tail as drawn, from its body to its tip (the body taken as
|
|
455
|
-
* the oval its box holds); undefined for a balloon with none. */
|
|
456
|
-
function drawnTail(b) {
|
|
457
|
-
if (!b.tailTip)
|
|
458
|
-
return undefined;
|
|
459
|
-
const c = { x: b.bbox.x + b.bbox.width / 2, y: b.bbox.y + b.bbox.height / 2 };
|
|
460
|
-
const dx = b.tailTip.x - c.x;
|
|
461
|
-
const dy = b.tailTip.y - c.y;
|
|
462
|
-
const k = Math.hypot(dx / (b.bbox.width / 2 || 1), dy / (b.bbox.height / 2 || 1));
|
|
463
|
-
if (!(k > 1))
|
|
464
|
-
return undefined;
|
|
465
|
-
return [{ x: c.x + dx / k, y: c.y + dy / k }, { x: b.tailTip.x, y: b.tailTip.y }];
|
|
466
|
-
}
|
|
467
|
-
/** A script's `tail=` as the lettering reads it. `left` and `right` name
|
|
468
|
-
* a side of the panel's picture as stored (#727), as `at=` and `to=`
|
|
469
|
-
* name points of it: on the page that is the same side of the panel, and
|
|
470
|
-
* the other one when the picture is mirrored. A panel with no picture
|
|
471
|
-
* reads them as the page's. The other values pass through. */
|
|
472
|
-
function tailSideOnPage(tail, panel) {
|
|
473
|
-
if ((tail === 'left' || tail === 'right') && panel.art?.mirrored)
|
|
474
|
-
return tail === 'left' ? 'right' : 'left';
|
|
475
|
-
return tail;
|
|
476
|
-
}
|
|
477
|
-
/** A box grown (negative `d`) or shrunk by `d` on every side. */
|
|
478
|
-
function insetBox2(b, d) {
|
|
479
|
-
return { x: b.x + d, y: b.y + d, width: b.width - 2 * d, height: b.height - 2 * d };
|
|
480
|
-
}
|
|
481
|
-
/** The intersection of two boxes (empty boxes have no size). */
|
|
482
|
-
function intersect(a, b) {
|
|
483
|
-
const x = Math.max(a.x, b.x);
|
|
484
|
-
const y = Math.max(a.y, b.y);
|
|
485
|
-
return { x, y, width: Math.max(0, Math.min(a.x + a.width, b.x + b.width) - x), height: Math.max(0, Math.min(a.y + a.height, b.y + b.height) - y) };
|
|
486
|
-
}
|
|
487
|
-
/** The smallest box holding both. */
|
|
488
|
-
function union(a, b) {
|
|
489
|
-
const x = Math.min(a.x, b.x);
|
|
490
|
-
const y = Math.min(a.y, b.y);
|
|
491
|
-
return { x, y, width: Math.max(a.x + a.width, b.x + b.width) - x, height: Math.max(a.y + a.height, b.y + b.height) - y };
|
|
492
|
-
}
|
|
493
|
-
/**
|
|
494
|
-
* The lettering of a page's panels (#559–#561): balloons, captions and
|
|
495
|
-
* sound effects, in reading order (panel order, then script order), and the
|
|
496
|
-
* `comicBalloonOverflow` warnings of the balloons that could not be placed
|
|
497
|
-
* cleanly.
|
|
498
|
-
*/
|
|
499
|
-
export function letterPanels(input) {
|
|
500
|
-
const { panels, panelSources, comics, resolved, resources, direction, sourceOffset: off } = input;
|
|
501
|
-
const dpi = resolved.page.dpi;
|
|
502
|
-
const locale = comicLetteringLocale(resolved);
|
|
503
|
-
const vertical = comicLetteringVertical(comics, resolved, locale);
|
|
504
|
-
const L = comics.lettering;
|
|
505
|
-
const insetPx = dimensionToPx(L.inset, dpi);
|
|
506
|
-
const trim = input.trim ?? input.frame;
|
|
507
|
-
const castById = new Map(comics.cast.map((c) => [c.id, c]));
|
|
508
|
-
const balloons = [];
|
|
509
|
-
const warnings = [];
|
|
510
|
-
const em = dimensionToPx(L.fontSize, dpi);
|
|
511
|
-
// What each panel's picture protects, on the page (#671): a balloon that
|
|
512
|
-
// leaves its panel keeps off the faces and avoid zones of the others.
|
|
513
|
-
const insets = panels.map((_, i) => panelSources[i]?.attrs.inset !== undefined);
|
|
514
|
-
const protectedArt = panels.map((panel, pi) => {
|
|
515
|
-
const resource = panel.art ? resources.get(panel.art.resourceId) : undefined;
|
|
516
|
-
if (!panel.art || !resource)
|
|
517
|
-
return [];
|
|
518
|
-
const under = panels.filter((q, qi) => qi > pi && insets[qi] && overlaps(q.bbox, panel.bbox)).map((q) => q.polygon);
|
|
519
|
-
const shown = (rect) => overlaps(rect, panel.bbox);
|
|
520
|
-
const entry = (rect, kind, guard = false) => ({ rect, kind, ...(guard ? { guard } : {}), within: panel.polygon, ...(under.length > 0 ? { under } : {}) });
|
|
521
|
-
return [
|
|
522
|
-
...(resource.anchors ?? []).filter((a) => a.id !== 'sfx' && a.face).map((a) => entry(comicArtRectToPage(panel.art, a.face), 'face')),
|
|
523
|
-
...bystanderFaces(panel, resource).map((f) => entry(f, 'face')),
|
|
524
|
-
...(resource.avoid ?? []).map((r) => entry(comicArtRectToPage(panel.art, r), 'avoid')),
|
|
525
|
-
...headGuards(panel, resource, em).map((g) => entry(g, 'avoid', true)),
|
|
526
|
-
].filter((e) => shown(e.rect));
|
|
527
|
-
});
|
|
528
|
-
panels.forEach((panel, pi) => {
|
|
529
|
-
const src = panelSources[pi];
|
|
530
|
-
if (!src || src.items.length === 0)
|
|
531
|
-
return;
|
|
532
|
-
const resource = panel.art ? resources.get(panel.art.resourceId) : undefined;
|
|
533
|
-
// A line that may leave the panel (`break`, a pin, drawn sound) can land
|
|
534
|
-
// on anything about it: it is told what the panels before it lettered
|
|
535
|
-
// and what the pictures around it protect, as far as it can reach (its
|
|
536
|
-
// middle stays in its panel). A panel with no such line is lettered
|
|
537
|
-
// from what pokes into it alone, whatever the rest of the page does.
|
|
538
|
-
const laidOver = panels.filter((q, qi) => qi > pi && insets[qi] && overlaps(q.bbox, panel.bbox)).map((q) => q.polygon);
|
|
539
|
-
const leaves = src.items.some((it) => it.break || it.at !== undefined || it.role === 'sfx');
|
|
540
|
-
const reach = leaves ? insetBox2(panel.bbox, -Math.max(panel.bbox.width, panel.bbox.height)) : panel.bbox;
|
|
541
|
-
const set = balloons.filter((b) => overlaps(b.bbox, reach));
|
|
542
|
-
const tails = set.map(drawnTail).filter((t) => t !== undefined);
|
|
543
|
-
const around = leaves ? protectedArt.flatMap((list, qi) => (qi === pi ? [] : list.filter((e) => overlaps(e.rect, reach)))) : [];
|
|
544
|
-
const lp = {
|
|
545
|
-
index: panel.index,
|
|
546
|
-
polygon: panel.polygon,
|
|
547
|
-
bbox: panel.bbox,
|
|
548
|
-
insetPx,
|
|
549
|
-
direction,
|
|
550
|
-
writingMode: vertical ? 'vertical' : 'horizontal',
|
|
551
|
-
locale,
|
|
552
|
-
anchors: panelAnchors(panel, resource),
|
|
553
|
-
...(resource?.faces?.length && panel.art ? { faces: bystanderFaces(panel, resource) } : {}),
|
|
554
|
-
avoid: [
|
|
555
|
-
...(panel.art ? (resource?.avoid ?? []).map((r) => comicArtRectToPage(panel.art, r)) : []),
|
|
556
|
-
...headGuards(panel, resource, em).map((g) => ({ ...g, guard: true })),
|
|
557
|
-
],
|
|
558
|
-
keepOut: (input.avoid ?? []).filter((r) => overlaps(r, insetBox2(panel.bbox, -2 * insetPx))),
|
|
559
|
-
softAvoid: [...softSafeArea(panel, resource), ...headZones(panel, resource), ...bodyZones(panel, resource)],
|
|
560
|
-
...(panel.border.style !== 'none' && panel.border.width > 0 ? { borderPx: panel.border.width } : {}),
|
|
561
|
-
neighbours: panels.filter((q) => q !== panel).map((q) => q.bbox),
|
|
562
|
-
...(laidOver.length > 0 ? { over: laidOver } : {}),
|
|
563
|
-
...(input.frame ? { limit: input.frame } : {}),
|
|
564
|
-
...(trim ? { trim, sheet: input.bleedBox ? intersect(input.bleedBox, union(trim, panel.bbox)) : trim } : {}),
|
|
565
|
-
// What the panels before this one lettered: a balloon breaking out
|
|
566
|
-
// of either panel never covers the other's.
|
|
567
|
-
foreign: set.map((b) => (roundBalloon(comics, b) ? { ...b.bbox, round: true } : b.bbox)),
|
|
568
|
-
...(tails.length > 0 ? { foreignTails: tails } : {}),
|
|
569
|
-
...(around.length > 0 ? { foreignArt: around } : {}),
|
|
570
|
-
dpi,
|
|
571
|
-
};
|
|
572
|
-
const items = src.items.map((it, k) => {
|
|
573
|
-
const cast = it.speaker ? castById.get(it.speaker) : undefined;
|
|
574
|
-
const own = pickBalloonStyle(comics, it.style?.trim());
|
|
575
|
-
const st = own ?? pickBalloonStyle(comics, it.role === 'speech' ? cast?.balloonStyle : undefined)
|
|
576
|
-
?? pickBalloonStyle(comics, roleStyleId(it.role)) ?? pickBalloonStyle(comics, 'speech');
|
|
577
|
-
const tail = tailSideOnPage(it.tail, panel);
|
|
578
|
-
return {
|
|
579
|
-
id: `${panel.index}:${k}`,
|
|
580
|
-
order: k,
|
|
581
|
-
kind: it.role === 'speech' ? 'balloon' : it.role,
|
|
582
|
-
...(it.speaker ? { speaker: it.speaker } : {}),
|
|
583
|
-
text: it.spans.length > 0 ? it.spans : it.text,
|
|
584
|
-
sourceMap: it.sourceMap.map((o) => o + off),
|
|
585
|
-
sourceStart: it.sourceStart + off,
|
|
586
|
-
sourceEnd: it.sourceEnd + off,
|
|
587
|
-
style: buttedCaption(withAutoHalo(sfxColumns(it.role, comicLetteringStyle({ style: st, comics, ...(cast ? { cast } : {}), item: it, locale, vertical, dpi, ...(resolved.colorPalette ? { palette: resolved.colorPalette } : {}) })), st), panel, it.atKeyword),
|
|
588
|
-
...(it.at ? { pin: panelPoint(panel, it.at) } : {}),
|
|
589
|
-
...(it.atKeyword ? { position: it.atKeyword } : {}),
|
|
590
|
-
...(it.to ? { tailTarget: panelPoint(panel, it.to) } : tail && tail !== 'none' && tail !== 'auto' ? { tailTarget: tail } : {}),
|
|
591
|
-
...(tail === 'none' ? { tail: 'none' } : {}),
|
|
592
|
-
...(it.join !== undefined ? { join: it.join } : {}),
|
|
593
|
-
...(it.break ? { breakBorder: true } : {}),
|
|
594
|
-
...(it.rotate !== undefined ? { rotate: it.rotate } : {}),
|
|
595
|
-
...(it.skew !== undefined ? { skew: it.skew } : {}),
|
|
596
|
-
...(it.size !== undefined && it.size > 0 ? { sizeScale: it.size } : {}),
|
|
597
|
-
...(it.writingMode ? { writingMode: it.writingMode } : {}),
|
|
598
|
-
};
|
|
599
|
-
});
|
|
600
|
-
const r = letterPanelDetailed(lp, items, { joinSameSpeaker: L.joinSameSpeaker, groupBase: pi * 1000, ...(L.strictPlacement ? { strictPlacement: true } : {}) });
|
|
601
|
-
balloons.push(...r.balloons);
|
|
602
|
-
for (const d of r.diagnostics) {
|
|
603
|
-
warnings.push({
|
|
604
|
-
kind: 'comicBalloonOverflow',
|
|
605
|
-
panel: d.panelIndex,
|
|
606
|
-
reasons: d.reasons,
|
|
607
|
-
fallbacks: d.fallbacks,
|
|
608
|
-
sourceStart: d.sourceStart,
|
|
609
|
-
sourceEnd: d.sourceEnd,
|
|
610
|
-
...(input.pageIndex !== undefined ? { pageIndex: input.pageIndex } : {}),
|
|
611
|
-
});
|
|
612
|
-
}
|
|
613
|
-
});
|
|
614
|
-
return { balloons, warnings };
|
|
615
|
-
}
|
|
18
|
+
import { letterPanels } from './layoutPage/letterPanels.js';
|
|
19
|
+
import { layoutWarnings, panelSourcesOf } from './layoutPage/records.js';
|
|
20
|
+
import { comicViewerLeaf, comicPageFrame, comicPageDirection, comicGutters, bleedSides, comicPanelPadding, parseComicDimension, attrColor, flagOn, pictureOf } from './layoutPage/settings.js';
|
|
21
|
+
export { comicViewerLeaf, parseComicDimension, comicPageDirection, comicPanelPadding, comicPageFrame } from './layoutPage/settings.js';
|
|
22
|
+
export { comicPageLayoutWarnings, comicPanelSources, copyComicPanelSources, setComicLayoutWarnings } from './layoutPage/records.js';
|
|
23
|
+
export { comicLetteringLocale, comicLetteringVertical, comicLetteringStyle } from './layoutPage/letteringStyle.js';
|
|
24
|
+
export { letterPanels } from './layoutPage/letterPanels.js';
|
|
616
25
|
/** Lay out a comic page. */
|
|
617
26
|
export function layoutComicPage(source, given) {
|
|
618
27
|
// A host's screen page: the comic is laid out on the print leaf, scaled
|