postext 1.22.3 → 1.24.0
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/__tests__/bundle/bitmapInfo.test.d.ts +2 -0
- package/dist/__tests__/bundle/bitmapInfo.test.d.ts.map +1 -0
- package/dist/__tests__/bundle/bitmapInfo.test.js +78 -0
- package/dist/__tests__/bundle/bitmapInfo.test.js.map +1 -0
- package/dist/__tests__/bundle/designOverflowPin.test.d.ts +2 -0
- package/dist/__tests__/bundle/designOverflowPin.test.d.ts.map +1 -0
- package/dist/__tests__/bundle/designOverflowPin.test.js +87 -0
- package/dist/__tests__/bundle/designOverflowPin.test.js.map +1 -0
- package/dist/__tests__/bundle.test.js +1 -1
- package/dist/__tests__/bundle.test.js.map +1 -1
- package/dist/__tests__/codeBlocks.test.d.ts +2 -0
- package/dist/__tests__/codeBlocks.test.d.ts.map +1 -0
- package/dist/__tests__/codeBlocks.test.js +550 -0
- package/dist/__tests__/codeBlocks.test.js.map +1 -0
- package/dist/__tests__/design/designTextOverflow.test.d.ts +2 -0
- package/dist/__tests__/design/designTextOverflow.test.d.ts.map +1 -0
- package/dist/__tests__/design/designTextOverflow.test.js +102 -0
- package/dist/__tests__/design/designTextOverflow.test.js.map +1 -0
- package/dist/__tests__/exports.test.js +30 -0
- package/dist/__tests__/exports.test.js.map +1 -1
- package/dist/__tests__/frontmatterInvalid.test.d.ts +2 -0
- package/dist/__tests__/frontmatterInvalid.test.d.ts.map +1 -0
- package/dist/__tests__/frontmatterInvalid.test.js +101 -0
- package/dist/__tests__/frontmatterInvalid.test.js.map +1 -0
- package/dist/__tests__/hardBreaks.test.d.ts +2 -0
- package/dist/__tests__/hardBreaks.test.d.ts.map +1 -0
- package/dist/__tests__/hardBreaks.test.js +226 -0
- package/dist/__tests__/hardBreaks.test.js.map +1 -0
- package/dist/__tests__/headingFirstLineIndent.test.d.ts +2 -0
- package/dist/__tests__/headingFirstLineIndent.test.d.ts.map +1 -0
- package/dist/__tests__/headingFirstLineIndent.test.js +185 -0
- package/dist/__tests__/headingFirstLineIndent.test.js.map +1 -0
- package/dist/__tests__/headingInlineMarks.test.js +1 -1
- package/dist/__tests__/headingInlineMarks.test.js.map +1 -1
- package/dist/__tests__/headingLetterSpacing.test.js +1 -1
- package/dist/__tests__/headingLetterSpacing.test.js.map +1 -1
- package/dist/__tests__/lineNumbers.test.d.ts +2 -0
- package/dist/__tests__/lineNumbers.test.d.ts.map +1 -0
- package/dist/__tests__/lineNumbers.test.js +304 -0
- package/dist/__tests__/lineNumbers.test.js.map +1 -0
- package/dist/__tests__/mathSizeMigration.test.js +2 -2
- package/dist/__tests__/mathSizeMigration.test.js.map +1 -1
- package/dist/__tests__/paragraphDropCap.test.d.ts +2 -0
- package/dist/__tests__/paragraphDropCap.test.d.ts.map +1 -0
- package/dist/__tests__/paragraphDropCap.test.js +442 -0
- package/dist/__tests__/paragraphDropCap.test.js.map +1 -0
- package/dist/__tests__/paragraphStyleIndent.test.js +26 -2
- package/dist/__tests__/paragraphStyleIndent.test.js.map +1 -1
- package/dist/__tests__/pipeline/bitmapResolution.test.d.ts +2 -0
- package/dist/__tests__/pipeline/bitmapResolution.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/bitmapResolution.test.js +139 -0
- package/dist/__tests__/pipeline/bitmapResolution.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutInlineResourceGap.test.js +1 -1
- package/dist/__tests__/pipeline/calloutInlineResourceGap.test.js.map +1 -1
- package/dist/__tests__/pipeline/calloutSplitMinLinesChild.test.js +1 -1
- package/dist/__tests__/pipeline/calloutSplitMinLinesChild.test.js.map +1 -1
- package/dist/__tests__/pipeline/colonListRoom.test.js +1 -1
- package/dist/__tests__/pipeline/colonListRoom.test.js.map +1 -1
- package/dist/__tests__/pipeline/compoundBreaks.test.js +1 -1
- package/dist/__tests__/pipeline/compoundBreaks.test.js.map +1 -1
- package/dist/__tests__/pipeline/dashBreaks.test.js +1 -1
- package/dist/__tests__/pipeline/dashBreaks.test.js.map +1 -1
- package/dist/__tests__/pipeline/designTextTruncated.test.d.ts +2 -0
- package/dist/__tests__/pipeline/designTextTruncated.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/designTextTruncated.test.js +116 -0
- package/dist/__tests__/pipeline/designTextTruncated.test.js.map +1 -0
- package/dist/__tests__/pipeline/floatPlacement.test.js +3 -3
- package/dist/__tests__/pipeline/floatPlacement.test.js.map +1 -1
- package/dist/__tests__/pipeline/floatShrink.test.d.ts +2 -0
- package/dist/__tests__/pipeline/floatShrink.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/floatShrink.test.js +298 -0
- package/dist/__tests__/pipeline/floatShrink.test.js.map +1 -0
- package/dist/__tests__/pipeline/headingSplitOrphans.test.js +1 -1
- package/dist/__tests__/pipeline/headingSplitOrphans.test.js.map +1 -1
- package/dist/__tests__/pipeline/inlineFigureSpace.test.js +1 -1
- package/dist/__tests__/pipeline/inlineFigureSpace.test.js.map +1 -1
- package/dist/__tests__/pipeline/paragraphContainerTail.test.js +1 -1
- package/dist/__tests__/pipeline/paragraphContainerTail.test.js.map +1 -1
- package/dist/__tests__/pipeline/paragraphStyleFaces.test.js +7 -1
- package/dist/__tests__/pipeline/paragraphStyleFaces.test.js.map +1 -1
- package/dist/__tests__/pipeline/raggedOptimal.test.js +1 -1
- package/dist/__tests__/pipeline/raggedOptimal.test.js.map +1 -1
- package/dist/__tests__/pipeline/textWrap.test.d.ts +2 -0
- package/dist/__tests__/pipeline/textWrap.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/textWrap.test.js +453 -0
- package/dist/__tests__/pipeline/textWrap.test.js.map +1 -0
- package/dist/__tests__/preflight.test.js +30 -1
- package/dist/__tests__/preflight.test.js.map +1 -1
- package/dist/__tests__/presets/showcaseDesignOverflow.test.d.ts +2 -0
- package/dist/__tests__/presets/showcaseDesignOverflow.test.d.ts.map +1 -0
- package/dist/__tests__/presets/showcaseDesignOverflow.test.js +58 -0
- package/dist/__tests__/presets/showcaseDesignOverflow.test.js.map +1 -0
- package/dist/__tests__/tabStops.test.d.ts +2 -0
- package/dist/__tests__/tabStops.test.d.ts.map +1 -0
- package/dist/__tests__/tabStops.test.js +394 -0
- package/dist/__tests__/tabStops.test.js.map +1 -0
- package/dist/__tests__/table/booktabs.test.d.ts +2 -0
- package/dist/__tests__/table/booktabs.test.d.ts.map +1 -0
- package/dist/__tests__/table/booktabs.test.js +290 -0
- package/dist/__tests__/table/booktabs.test.js.map +1 -0
- package/dist/__tests__/textWrapMeasure.test.d.ts +2 -0
- package/dist/__tests__/textWrapMeasure.test.d.ts.map +1 -0
- package/dist/__tests__/textWrapMeasure.test.js +162 -0
- package/dist/__tests__/textWrapMeasure.test.js.map +1 -0
- package/dist/__tests__/verseLines.test.d.ts +2 -0
- package/dist/__tests__/verseLines.test.d.ts.map +1 -0
- package/dist/__tests__/verseLines.test.js +505 -0
- package/dist/__tests__/verseLines.test.js.map +1 -0
- package/dist/bitmapResolution.d.ts +42 -0
- package/dist/bitmapResolution.d.ts.map +1 -0
- package/dist/bitmapResolution.js +82 -0
- package/dist/bitmapResolution.js.map +1 -0
- package/dist/bundle/codec.d.ts +9 -2
- package/dist/bundle/codec.d.ts.map +1 -1
- package/dist/bundle/codec.js +24 -2
- package/dist/bundle/codec.js.map +1 -1
- package/dist/bundle/configVersion.d.ts +119 -8
- package/dist/bundle/configVersion.d.ts.map +1 -1
- package/dist/bundle/configVersion.js +395 -6
- package/dist/bundle/configVersion.js.map +1 -1
- package/dist/bundle/index.d.ts +3 -3
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +2 -2
- package/dist/bundle/index.js.map +1 -1
- package/dist/bundle/manifest.d.ts +12 -2
- package/dist/bundle/manifest.d.ts.map +1 -1
- package/dist/bundle/manifest.js +132 -6
- package/dist/bundle/manifest.js.map +1 -1
- package/dist/bundle/types.d.ts +28 -2
- package/dist/bundle/types.d.ts.map +1 -1
- package/dist/canvas-backend/blockRender.d.ts.map +1 -1
- package/dist/canvas-backend/blockRender.js +45 -9
- package/dist/canvas-backend/blockRender.js.map +1 -1
- package/dist/canvas-backend/index.d.ts.map +1 -1
- package/dist/canvas-backend/index.js +3 -0
- package/dist/canvas-backend/index.js.map +1 -1
- package/dist/canvas-backend/renderResourceBlock.d.ts.map +1 -1
- package/dist/canvas-backend/renderResourceBlock.js +15 -1
- package/dist/canvas-backend/renderResourceBlock.js.map +1 -1
- package/dist/cjkMarks.js +1 -1
- package/dist/cjkMarks.js.map +1 -1
- package/dist/code/highlight.d.ts +34 -0
- package/dist/code/highlight.d.ts.map +1 -0
- package/dist/code/highlight.js +406 -0
- package/dist/code/highlight.js.map +1 -0
- package/dist/configWarnings.d.ts.map +1 -1
- package/dist/configWarnings.js +220 -4
- package/dist/configWarnings.js.map +1 -1
- package/dist/defaults/bodyText.d.ts.map +1 -1
- package/dist/defaults/bodyText.js +25 -0
- package/dist/defaults/bodyText.js.map +1 -1
- package/dist/defaults/calloutStyles.d.ts.map +1 -1
- package/dist/defaults/calloutStyles.js +7 -0
- package/dist/defaults/calloutStyles.js.map +1 -1
- package/dist/defaults/codeStyle.d.ts +29 -0
- package/dist/defaults/codeStyle.d.ts.map +1 -0
- package/dist/defaults/codeStyle.js +284 -0
- package/dist/defaults/codeStyle.js.map +1 -0
- package/dist/defaults/dropCap.d.ts +49 -0
- package/dist/defaults/dropCap.d.ts.map +1 -0
- package/dist/defaults/dropCap.js +66 -0
- package/dist/defaults/dropCap.js.map +1 -0
- package/dist/defaults/headerFooter.d.ts +21 -6
- package/dist/defaults/headerFooter.d.ts.map +1 -1
- package/dist/defaults/headerFooter.js +37 -14
- package/dist/defaults/headerFooter.js.map +1 -1
- package/dist/defaults/headings.d.ts +5 -4
- package/dist/defaults/headings.d.ts.map +1 -1
- package/dist/defaults/headings.js +26 -4
- package/dist/defaults/headings.js.map +1 -1
- package/dist/defaults/index.d.ts +4 -1
- package/dist/defaults/index.d.ts.map +1 -1
- package/dist/defaults/index.js +20 -1
- package/dist/defaults/index.js.map +1 -1
- package/dist/defaults/layout.d.ts +30 -1
- package/dist/defaults/layout.d.ts.map +1 -1
- package/dist/defaults/layout.js +105 -1
- package/dist/defaults/layout.js.map +1 -1
- package/dist/defaults/lineNumbers.d.ts +19 -0
- package/dist/defaults/lineNumbers.d.ts.map +1 -0
- package/dist/defaults/lineNumbers.js +101 -0
- package/dist/defaults/lineNumbers.js.map +1 -0
- package/dist/defaults/paragraphStyles.d.ts.map +1 -1
- package/dist/defaults/paragraphStyles.js +20 -0
- package/dist/defaults/paragraphStyles.js.map +1 -1
- package/dist/defaults/parts.js +4 -4
- package/dist/defaults/parts.js.map +1 -1
- package/dist/defaults/tabStops.d.ts +29 -0
- package/dist/defaults/tabStops.d.ts.map +1 -0
- package/dist/defaults/tabStops.js +94 -0
- package/dist/defaults/tabStops.js.map +1 -0
- package/dist/defaults/tableStyle.d.ts.map +1 -1
- package/dist/defaults/tableStyle.js +44 -0
- package/dist/defaults/tableStyle.js.map +1 -1
- package/dist/defaults/toc.js +2 -2
- package/dist/defaults/verse.d.ts +11 -0
- package/dist/defaults/verse.d.ts.map +1 -0
- package/dist/defaults/verse.js +57 -0
- package/dist/defaults/verse.js.map +1 -0
- package/dist/design/layout.d.ts +15 -1
- package/dist/design/layout.d.ts.map +1 -1
- package/dist/design/layout.js +28 -4
- package/dist/design/layout.js.map +1 -1
- package/dist/fonts/usage.d.ts +7 -0
- package/dist/fonts/usage.d.ts.map +1 -1
- package/dist/fonts/usage.js +71 -0
- package/dist/fonts/usage.js.map +1 -1
- package/dist/frontmatter.d.ts +20 -0
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +69 -3
- package/dist/frontmatter.js.map +1 -1
- package/dist/html-backend.d.ts.map +1 -1
- package/dist/html-backend.js +107 -15
- package/dist/html-backend.js.map +1 -1
- package/dist/index.d.ts +18 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/measure/bidiLines.d.ts +4 -3
- package/dist/measure/bidiLines.d.ts.map +1 -1
- package/dist/measure/bidiLines.js +14 -9
- package/dist/measure/bidiLines.js.map +1 -1
- package/dist/measure/cache.js +2 -2
- package/dist/measure/cache.js.map +1 -1
- package/dist/measure/cjkCompose.d.ts.map +1 -1
- package/dist/measure/cjkCompose.js +10 -6
- package/dist/measure/cjkCompose.js.map +1 -1
- package/dist/measure/hardBreaks.d.ts +46 -0
- package/dist/measure/hardBreaks.d.ts.map +1 -0
- package/dist/measure/hardBreaks.js +228 -0
- package/dist/measure/hardBreaks.js.map +1 -0
- package/dist/measure/index.d.ts +4 -3
- package/dist/measure/index.d.ts.map +1 -1
- package/dist/measure/index.js +5 -4
- package/dist/measure/index.js.map +1 -1
- package/dist/measure/leader.d.ts +20 -0
- package/dist/measure/leader.d.ts.map +1 -0
- package/dist/measure/leader.js +46 -0
- package/dist/measure/leader.js.map +1 -0
- package/dist/measure/links.js +1 -1
- package/dist/measure/links.js.map +1 -1
- package/dist/measure/plain.d.ts.map +1 -1
- package/dist/measure/plain.js +23 -26
- package/dist/measure/plain.js.map +1 -1
- package/dist/measure/rich.d.ts +19 -0
- package/dist/measure/rich.d.ts.map +1 -1
- package/dist/measure/rich.js +215 -39
- package/dist/measure/rich.js.map +1 -1
- package/dist/measure/tabs.d.ts +103 -0
- package/dist/measure/tabs.d.ts.map +1 -0
- package/dist/measure/tabs.js +123 -0
- package/dist/measure/tabs.js.map +1 -0
- package/dist/measure/types.d.ts +72 -2
- package/dist/measure/types.d.ts.map +1 -1
- package/dist/measure/types.js +87 -3
- package/dist/measure/types.js.map +1 -1
- package/dist/parse/blockParser.d.ts +13 -6
- package/dist/parse/blockParser.d.ts.map +1 -1
- package/dist/parse/blockParser.js +457 -87
- package/dist/parse/blockParser.js.map +1 -1
- package/dist/parse/codeFence.d.ts +18 -0
- package/dist/parse/codeFence.d.ts.map +1 -0
- package/dist/parse/codeFence.js +52 -0
- package/dist/parse/codeFence.js.map +1 -0
- package/dist/parse/index.d.ts +1 -1
- package/dist/parse/index.d.ts.map +1 -1
- package/dist/parse/index.js.map +1 -1
- package/dist/parse/indexMarks.d.ts +3 -1
- package/dist/parse/indexMarks.d.ts.map +1 -1
- package/dist/parse/indexMarks.js +22 -2
- package/dist/parse/indexMarks.js.map +1 -1
- package/dist/parse/inlineFormatting.d.ts +50 -0
- package/dist/parse/inlineFormatting.d.ts.map +1 -1
- package/dist/parse/inlineFormatting.js +94 -0
- package/dist/parse/inlineFormatting.js.map +1 -1
- package/dist/parse/sourceMapping.d.ts.map +1 -1
- package/dist/parse/sourceMapping.js +65 -1
- package/dist/parse/sourceMapping.js.map +1 -1
- package/dist/parse/types.d.ts +144 -9
- package/dist/parse/types.d.ts.map +1 -1
- package/dist/pipeline/build.d.ts.map +1 -1
- package/dist/pipeline/build.js +629 -47
- package/dist/pipeline/build.js.map +1 -1
- package/dist/pipeline/buildBlockKind.d.ts +5 -0
- package/dist/pipeline/buildBlockKind.d.ts.map +1 -1
- package/dist/pipeline/buildBlockKind.js +74 -2
- package/dist/pipeline/buildBlockKind.js.map +1 -1
- package/dist/pipeline/buildHelpers.d.ts +3 -0
- package/dist/pipeline/buildHelpers.d.ts.map +1 -1
- package/dist/pipeline/buildHelpers.js +7 -2
- package/dist/pipeline/buildHelpers.js.map +1 -1
- package/dist/pipeline/buildMeasurement.js +1 -1
- package/dist/pipeline/buildMeasurement.js.map +1 -1
- package/dist/pipeline/calloutLayout.d.ts.map +1 -1
- package/dist/pipeline/calloutLayout.js +33 -2
- package/dist/pipeline/calloutLayout.js.map +1 -1
- package/dist/pipeline/chips.d.ts.map +1 -1
- package/dist/pipeline/chips.js +4 -0
- package/dist/pipeline/chips.js.map +1 -1
- package/dist/pipeline/codeBlocks.d.ts +38 -0
- package/dist/pipeline/codeBlocks.d.ts.map +1 -0
- package/dist/pipeline/codeBlocks.js +146 -0
- package/dist/pipeline/codeBlocks.js.map +1 -0
- package/dist/pipeline/codeInline.d.ts +22 -0
- package/dist/pipeline/codeInline.d.ts.map +1 -0
- package/dist/pipeline/codeInline.js +93 -0
- package/dist/pipeline/codeInline.js.map +1 -0
- package/dist/pipeline/codeLines.d.ts +91 -0
- package/dist/pipeline/codeLines.d.ts.map +1 -0
- package/dist/pipeline/codeLines.js +399 -0
- package/dist/pipeline/codeLines.js.map +1 -0
- package/dist/pipeline/columnBalancing.d.ts.map +1 -1
- package/dist/pipeline/columnBalancing.js +5 -0
- package/dist/pipeline/columnBalancing.js.map +1 -1
- package/dist/pipeline/config.d.ts.map +1 -1
- package/dist/pipeline/config.js +8 -1
- package/dist/pipeline/config.js.map +1 -1
- package/dist/pipeline/contentWarnings.d.ts +25 -0
- package/dist/pipeline/contentWarnings.d.ts.map +1 -1
- package/dist/pipeline/contentWarnings.js +173 -19
- package/dist/pipeline/contentWarnings.js.map +1 -1
- package/dist/pipeline/continuation.d.ts.map +1 -1
- package/dist/pipeline/continuation.js +9 -2
- package/dist/pipeline/continuation.js.map +1 -1
- package/dist/pipeline/dropCap.d.ts +128 -0
- package/dist/pipeline/dropCap.d.ts.map +1 -0
- package/dist/pipeline/dropCap.js +412 -0
- package/dist/pipeline/dropCap.js.map +1 -0
- package/dist/pipeline/floatPlacement.d.ts +34 -4
- package/dist/pipeline/floatPlacement.d.ts.map +1 -1
- package/dist/pipeline/floatPlacement.js +35 -5
- package/dist/pipeline/floatPlacement.js.map +1 -1
- package/dist/pipeline/floatSlots.d.ts +7 -0
- package/dist/pipeline/floatSlots.d.ts.map +1 -1
- package/dist/pipeline/floatSlots.js.map +1 -1
- package/dist/pipeline/hardBreaks.d.ts +19 -0
- package/dist/pipeline/hardBreaks.d.ts.map +1 -0
- package/dist/pipeline/hardBreaks.js +36 -0
- package/dist/pipeline/hardBreaks.js.map +1 -0
- package/dist/pipeline/headerFooter.d.ts +4 -1
- package/dist/pipeline/headerFooter.d.ts.map +1 -1
- package/dist/pipeline/headerFooter.js +23 -6
- package/dist/pipeline/headerFooter.js.map +1 -1
- package/dist/pipeline/lineNumbers.d.ts +37 -0
- package/dist/pipeline/lineNumbers.d.ts.map +1 -0
- package/dist/pipeline/lineNumbers.js +441 -0
- package/dist/pipeline/lineNumbers.js.map +1 -0
- package/dist/pipeline/measureContentBlock.d.ts +38 -5
- package/dist/pipeline/measureContentBlock.d.ts.map +1 -1
- package/dist/pipeline/measureContentBlock.js +284 -69
- package/dist/pipeline/measureContentBlock.js.map +1 -1
- package/dist/pipeline/partPalette.d.ts +1 -1
- package/dist/pipeline/partPalette.d.ts.map +1 -1
- package/dist/pipeline/partPalette.js +24 -2
- package/dist/pipeline/partPalette.js.map +1 -1
- package/dist/pipeline/placement.d.ts.map +1 -1
- package/dist/pipeline/placement.js +7 -0
- package/dist/pipeline/placement.js.map +1 -1
- package/dist/pipeline/resourceLayout.d.ts +15 -0
- package/dist/pipeline/resourceLayout.d.ts.map +1 -1
- package/dist/pipeline/resourceLayout.js +95 -15
- package/dist/pipeline/resourceLayout.js.map +1 -1
- package/dist/pipeline/styles.d.ts +18 -2
- package/dist/pipeline/styles.d.ts.map +1 -1
- package/dist/pipeline/styles.js +23 -8
- package/dist/pipeline/styles.js.map +1 -1
- package/dist/pipeline/tabs.d.ts +35 -0
- package/dist/pipeline/tabs.d.ts.map +1 -0
- package/dist/pipeline/tabs.js +99 -0
- package/dist/pipeline/tabs.js.map +1 -0
- package/dist/pipeline/textWrap.d.ts +94 -0
- package/dist/pipeline/textWrap.d.ts.map +1 -0
- package/dist/pipeline/textWrap.js +188 -0
- package/dist/pipeline/textWrap.js.map +1 -0
- package/dist/pipeline/toc.d.ts.map +1 -1
- package/dist/pipeline/toc.js +3 -38
- package/dist/pipeline/toc.js.map +1 -1
- package/dist/pipeline/verseLines.d.ts +98 -0
- package/dist/pipeline/verseLines.d.ts.map +1 -0
- package/dist/pipeline/verseLines.js +293 -0
- package/dist/pipeline/verseLines.js.map +1 -0
- package/dist/preflight.d.ts +46 -1
- package/dist/preflight.d.ts.map +1 -1
- package/dist/preflight.js +43 -7
- package/dist/preflight.js.map +1 -1
- package/dist/table/booktabs.d.ts +37 -0
- package/dist/table/booktabs.d.ts.map +1 -0
- package/dist/table/booktabs.js +82 -0
- package/dist/table/booktabs.js.map +1 -0
- package/dist/types.d.ts +787 -12
- package/dist/types.d.ts.map +1 -1
- package/dist/vdt.d.ts +367 -9
- package/dist/vdt.d.ts.map +1 -1
- package/dist/vdt.js +9 -2
- package/dist/vdt.js.map +1 -1
- package/dist/word/docxRead.d.ts.map +1 -1
- package/dist/word/docxRead.js +15 -0
- package/dist/word/docxRead.js.map +1 -1
- package/dist/word/index.d.ts +1 -1
- package/dist/word/index.d.ts.map +1 -1
- package/dist/word/index.js +1 -1
- package/dist/word/index.js.map +1 -1
- package/dist/word/inline.d.ts +6 -1
- package/dist/word/inline.d.ts.map +1 -1
- package/dist/word/inline.js +35 -1
- package/dist/word/inline.js.map +1 -1
- package/dist/word/model.d.ts +14 -0
- package/dist/word/model.d.ts.map +1 -1
- package/dist/word/model.js.map +1 -1
- package/dist/word/template.d.ts +12 -3
- package/dist/word/template.d.ts.map +1 -1
- package/dist/word/template.js +13 -3
- package/dist/word/template.js.map +1 -1
- package/dist/word/toDocx.d.ts.map +1 -1
- package/dist/word/toDocx.js +52 -8
- package/dist/word/toDocx.js.map +1 -1
- package/dist/word/toMarkdown.d.ts +15 -1
- package/dist/word/toMarkdown.d.ts.map +1 -1
- package/dist/word/toMarkdown.js +133 -7
- package/dist/word/toMarkdown.js.map +1 -1
- package/dist/word/word.test.js +124 -2
- package/dist/word/word.test.js.map +1 -1
- package/dist/worker/fonts.d.ts +2 -1
- package/dist/worker/fonts.d.ts.map +1 -1
- package/dist/worker/fonts.js +6 -2
- package/dist/worker/fonts.js.map +1 -1
- package/package.json +1 -1
package/dist/vdt.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ColorPaletteEntry, DocumentMetadata, PostextResource, Resource, ResourceSafeArea, TableCellAlign, TableCellVerticalAlign, ResolvedPageConfig, ResolvedLayoutConfig, ResolvedBodyTextConfig, ResolvedHeadingsConfig, ResolvedTableStyleConfig, ResolvedNamedTableStyleConfig, TableRules, ResolvedCaptionStyleConfig, ResolvedDiagramStyleConfig, ResolvedVideoStyleConfig, ResolvedVideoPlayerOptions, VideoSource, ResolvedParagraphStyleConfig, ResolvedCalloutStyleConfig, ResolvedChipStyleConfig, CalloutSpan, CalloutPlacement, ResolvedUnorderedListsConfig, ResolvedOrderedListsConfig, ResolvedMathConfig, ResolvedPdfGenerationConfig, ResolvedPrintConfig, ResolvedFolioConfig, ResolvedDesignSlot, ResolvedPartsConfig, ResolvedHeadingStyleConfig, ResolvedTocConfig, ResolvedIndexConfig, ResolvedFootnotesConfig, ResolvedCrossRefsConfig, ResolvedCitationsConfig, ResolvedCjkConfig, CjkRegion, PageRole, PartState, PostextConfig, FolioPaperConfig, ResolvedComicsConfig } from './types';
|
|
1
|
+
import type { ColorPaletteEntry, DocumentMetadata, PostextResource, Resource, ResourceSafeArea, TableCellAlign, TableCellVerticalAlign, ResolvedPageConfig, ResolvedLayoutConfig, ResolvedBodyTextConfig, ResolvedHeadingsConfig, ResolvedTableStyleConfig, ResolvedNamedTableStyleConfig, TableRules, ResolvedCaptionStyleConfig, ResolvedDiagramStyleConfig, ResolvedVideoStyleConfig, ResolvedVideoPlayerOptions, VideoSource, ResolvedParagraphStyleConfig, ResolvedCalloutStyleConfig, ResolvedChipStyleConfig, CalloutSpan, CalloutPlacement, ResolvedUnorderedListsConfig, ResolvedOrderedListsConfig, ResolvedMathConfig, ResolvedPdfGenerationConfig, ResolvedPrintConfig, ResolvedFolioConfig, ResolvedDesignSlot, ResolvedPartsConfig, ResolvedHeadingStyleConfig, ResolvedTocConfig, ResolvedIndexConfig, ResolvedFootnotesConfig, ResolvedCrossRefsConfig, ResolvedCitationsConfig, ResolvedCjkConfig, CjkRegion, PageRole, PartState, PostextConfig, FolioPaperConfig, ResolvedComicsConfig, ResolvedLineNumbersConfig, ResolvedCodeStyleConfig } from './types';
|
|
2
2
|
import type { NumeralStyle } from './numbering';
|
|
3
3
|
import type { MathRender } from './math/types';
|
|
4
4
|
export interface BoundingBox {
|
|
@@ -77,8 +77,18 @@ export interface ResolvedConfig {
|
|
|
77
77
|
* hashes) as before. Read it with `resolvedComics()`, which falls back
|
|
78
78
|
* to the defaults of the document language. */
|
|
79
79
|
comics?: ResolvedComicsConfig;
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
/** Line numbers (`PostextConfig.lineNumbers`, #621), resolved, when the
|
|
81
|
+
* config sets the section; absent otherwise (no numbers). */
|
|
82
|
+
lineNumbers?: ResolvedLineNumbersConfig;
|
|
83
|
+
/** Code listings and inline code (`PostextConfig.codeStyle`, #624),
|
|
84
|
+
* resolved, when the config sets the section; absent otherwise (the
|
|
85
|
+
* defaults apply, `resolvedCodeStyle`). */
|
|
86
|
+
codeStyle?: ResolvedCodeStyleConfig;
|
|
87
|
+
}
|
|
88
|
+
export type VDTBlockType = 'paragraph' | 'heading' | 'resource' | 'blockquote' | 'listItem' | 'footnoteRef' | 'mathDisplay' | 'callout'
|
|
89
|
+
/** A line of a code listing (#624): one line per source line, set as
|
|
90
|
+
* written (see `VDTLine.codeLine`), inside the listing's box. */
|
|
91
|
+
| 'code';
|
|
82
92
|
export type TextAlign = 'left' | 'justify' | 'center' | 'right';
|
|
83
93
|
/** One run of a chip's text: its own font (bold / italic / script, at the
|
|
84
94
|
* chip size) and advance. */
|
|
@@ -200,6 +210,25 @@ export interface VDTLineSegment {
|
|
|
200
210
|
/** A space of a bibliography entry's label column (#290): its width is
|
|
201
211
|
* set, so renderers paint the line segment by segment. */
|
|
202
212
|
labelTab?: true;
|
|
213
|
+
/** A leader (#622): the dots of a contents row, or of a tab stop in body
|
|
214
|
+
* text, painted over the room before the text at the stop. `'text'`:
|
|
215
|
+
* `text` is the run of the leader character, painted like a word;
|
|
216
|
+
* `'rule'`: a line drawn across the segment's `width` a little under the
|
|
217
|
+
* baseline (`text` is empty). A leader is no character of the
|
|
218
|
+
* paragraph: it is not in the line's `text`, copied or extracted text,
|
|
219
|
+
* search or the source map; the HTML viewer hides it from assistive
|
|
220
|
+
* technology and the tagged PDF paints it as an artifact. */
|
|
221
|
+
leader?: 'text' | 'rule';
|
|
222
|
+
/** A tab at its stop (#622; the `space` segment flagged `labelTab`, text
|
|
223
|
+
* `'\t'`): how the stop aligns the text after it and where it stands,
|
|
224
|
+
* px from the start edge of the measure (the measure being the line's
|
|
225
|
+
* box less its indent: `bbox.x` is that edge plus the line's indent).
|
|
226
|
+
* Read by outputs that cannot keep the stops exactly (the reflowable
|
|
227
|
+
* EPUB). */
|
|
228
|
+
tab?: {
|
|
229
|
+
align: import('./types').TabStopAlign;
|
|
230
|
+
at: number;
|
|
231
|
+
};
|
|
203
232
|
/** True when this segment is part of a caption's numbered label, so renderers
|
|
204
233
|
* paint it in the configured caption-label colour. */
|
|
205
234
|
captionLabel?: boolean;
|
|
@@ -574,9 +603,25 @@ export interface VDTLine {
|
|
|
574
603
|
segments?: VDTLineSegment[];
|
|
575
604
|
/** Whether this is the last line of the paragraph (ragged even when justified) */
|
|
576
605
|
isLastLine?: boolean;
|
|
606
|
+
/** The line ends at a forced line break the author typed inside the
|
|
607
|
+
* paragraph (#620: a backslash ending a source line, or `\\`): it is set
|
|
608
|
+
* at its natural width like a last line ({@link isLastLine} is set), the
|
|
609
|
+
* paragraph goes on on the next line, copied text takes a line feed
|
|
610
|
+
* there, the reflowable EPUB a `<br/>`. Absent otherwise. */
|
|
611
|
+
hardBreak?: true;
|
|
612
|
+
/** The line holds a tab that went to a tab stop (#622): its `space`
|
|
613
|
+
* segment flagged `labelTab`, `text` `'\t'`, is as wide as the stop asks,
|
|
614
|
+
* followed, when the stop has a leader, by the leader's segment and the
|
|
615
|
+
* gap after it (an empty `space`). The widths are final: in a justified
|
|
616
|
+
* paragraph the line is {@link ragged} and the measurer gave the slack
|
|
617
|
+
* to the word spaces after the last tab; in a centred or right-aligned
|
|
618
|
+
* one a last empty `space` fills the line to its measure, so every
|
|
619
|
+
* renderer sets it from its start side. Absent otherwise. */
|
|
620
|
+
tabbed?: true;
|
|
577
621
|
/** Set ragged inside a justified paragraph: a line a URL made unfillable
|
|
578
|
-
* (its few word spaces would stretch past the loose-line threshold),
|
|
579
|
-
*
|
|
622
|
+
* (its few word spaces would stretch past the loose-line threshold), a
|
|
623
|
+
* CJK line flagged {@link cjkLoose}, or a line holding a tab stop
|
|
624
|
+
* ({@link tabbed}). */
|
|
580
625
|
ragged?: boolean;
|
|
581
626
|
/** A justified CJK line that needed more inter-character spacing than the
|
|
582
627
|
* cap (½ em, or `bodyText.maxJustifyTracking` when it is set): it is set
|
|
@@ -649,10 +694,14 @@ export interface VDTLine {
|
|
|
649
694
|
* direction opposes its frame's (an English quotation in an Arabic book),
|
|
650
695
|
* whose indent and ragged edge fall on the other side. Absent
|
|
651
696
|
* otherwise. Its start side is the right of the span: renderers align
|
|
652
|
-
* the line there (see {@link lineTextAlign}).
|
|
697
|
+
* the line there (see {@link lineTextAlign}).
|
|
698
|
+
* Also set, flagged `wrap`, on a line set short beside a picture that
|
|
699
|
+
* text wraps round (#627): the span is the line's narrowed measure, and
|
|
700
|
+
* the line keeps its block's alignment in it. */
|
|
653
701
|
measure?: {
|
|
654
702
|
x: number;
|
|
655
703
|
width: number;
|
|
704
|
+
wrap?: true;
|
|
656
705
|
};
|
|
657
706
|
/** How many kashidas (tatweels, U+0640) justification inserted into the
|
|
658
707
|
* line's words, for warnings and overlays. The tatweels themselves are in
|
|
@@ -676,6 +725,44 @@ export interface VDTLine {
|
|
|
676
725
|
bayt: number;
|
|
677
726
|
part: 'bayt' | 'sadr' | 'ajuz' | 'single';
|
|
678
727
|
};
|
|
728
|
+
/** A line of a `:::verse` poem in the line layout (#620): the stanza it
|
|
729
|
+
* sets (0-based, in its poem), the line of verse (0-based, counted
|
|
730
|
+
* through the whole poem) and whether it is a turnover, the part of a
|
|
731
|
+
* line of verse too wide for the measure set on the line after it. A
|
|
732
|
+
* column or page never breaks between a line and its turnover.
|
|
733
|
+
* `indent` is the line's indent (px, from the poem's start side: its
|
|
734
|
+
* leading spaces × `indentStep`, or where a stepped line starts), set
|
|
735
|
+
* on its first line when not 0. `stanzaEnd` is set on the last line of
|
|
736
|
+
* a stanza another follows (copied text puts a blank line there).
|
|
737
|
+
* `spaceRatio` is set on a line a little too wide for the measure whose
|
|
738
|
+
* word spaces were tightened so it stays on one line: their width as a
|
|
739
|
+
* share of their natural width (never under `bodyText.minWordSpacing`).
|
|
740
|
+
* The widths of the line's segments are final (the block is set flush
|
|
741
|
+
* left): renderers paint them as they are. Absent on any other line. */
|
|
742
|
+
verseLine?: {
|
|
743
|
+
stanza: number;
|
|
744
|
+
line: number;
|
|
745
|
+
turnover: boolean;
|
|
746
|
+
indent?: number;
|
|
747
|
+
stanzaEnd?: true;
|
|
748
|
+
spaceRatio?: number;
|
|
749
|
+
};
|
|
750
|
+
/** A line of a code listing (#624, a `code` block): `line` is the source
|
|
751
|
+
* line it sets (0-based in the listing), `number` its printed number
|
|
752
|
+
* when the listing is numbered (never on a continuation), `continued`
|
|
753
|
+
* a continuation of a wrapped line, `highlight` a line the fence's
|
|
754
|
+
* `highlight` names, `wrapped` a line that goes on in the next one,
|
|
755
|
+
* `clipped` a line cut at the box's edge. The segments carry final
|
|
756
|
+
* widths from the block's left edge (spaces are kept, never
|
|
757
|
+
* stretched). Absent on any other line. */
|
|
758
|
+
codeLine?: {
|
|
759
|
+
line: number;
|
|
760
|
+
number?: string;
|
|
761
|
+
continued?: true;
|
|
762
|
+
highlight?: true;
|
|
763
|
+
wrapped?: true;
|
|
764
|
+
clipped?: true;
|
|
765
|
+
};
|
|
679
766
|
/** The first line of an entry of a back-of-book index (`:::index`): the
|
|
680
767
|
* entry's level (0 a main entry, 1 a sub-entry…). A block of the index
|
|
681
768
|
* may set more than one entry (the page-less entries heading its
|
|
@@ -763,6 +850,13 @@ export interface VDTResourceTableLayout {
|
|
|
763
850
|
rowEdges: number[];
|
|
764
851
|
/** Which rules to stroke with `borderWidthPx` (`'grid'` when absent). */
|
|
765
852
|
rules?: TableRules;
|
|
853
|
+
/** The rules of a `'booktabs'` table (#625), computed by the layout: the
|
|
854
|
+
* renderers stroke exactly these, in `borderColor`, and skip the
|
|
855
|
+
* {@link rules} pattern (and the rounded frame). Coordinates are
|
|
856
|
+
* relative to the table body's top-left corner, like {@link rowEdges};
|
|
857
|
+
* each stroke is centred on its line. `borderWidthPx` is then the
|
|
858
|
+
* widest stroke. Absent for the other patterns. */
|
|
859
|
+
strokes?: VDTTableStroke[];
|
|
766
860
|
/** Radii (px) of the outer frame's corners — top-left, top-right,
|
|
767
861
|
* bottom-right, bottom-left — from `tableStyle.borderRadius`, clamped to
|
|
768
862
|
* half the table's width and height. The frame is stroked round and the
|
|
@@ -770,6 +864,15 @@ export interface VDTResourceTableLayout {
|
|
|
770
864
|
* corners where it continues. Absent for a square frame. */
|
|
771
865
|
frameRadii?: [number, number, number, number];
|
|
772
866
|
}
|
|
867
|
+
/** One rule of a table (`VDTResourceTableLayout.strokes`): a straight
|
|
868
|
+
* line from `(x1, y1)` to `(x2, y2)`, `widthPx` thick, with butt ends. */
|
|
869
|
+
export interface VDTTableStroke {
|
|
870
|
+
x1: number;
|
|
871
|
+
y1: number;
|
|
872
|
+
x2: number;
|
|
873
|
+
y2: number;
|
|
874
|
+
widthPx: number;
|
|
875
|
+
}
|
|
773
876
|
/** A rounded outline: a rect and its corner radii (top-left, top-right,
|
|
774
877
|
* bottom-right, bottom-left). */
|
|
775
878
|
export interface RoundedOutline {
|
|
@@ -953,10 +1056,18 @@ export declare function pageIsVertical(page: Pick<VDTPage, 'flow'>): boolean;
|
|
|
953
1056
|
* block set against its frame's direction), whose start side is the right
|
|
954
1057
|
* of its span: `left` (the start; also the last line of a justified
|
|
955
1058
|
* paragraph, `justify` coming back as `right`) is flush right, `right` (the
|
|
956
|
-
* end) flush left, and a centred line stays centred. A
|
|
1059
|
+
* end) flush left, and a centred line stays centred. A span flagged `wrap`
|
|
1060
|
+
* (a line beside a wrapped picture, #627) keeps the block's alignment. A justified line that
|
|
957
1061
|
* is not its paragraph's last is filled across the span either way.
|
|
958
1062
|
*/
|
|
959
1063
|
export declare function lineTextAlign(line: Pick<VDTLine, 'measure'>, textAlign: TextAlign): TextAlign;
|
|
1064
|
+
/** A rule leader (`VDTLineSegment.leader: 'rule'`, #622) at a text size of
|
|
1065
|
+
* `fontSizePx`: its centre `dy` px under the baseline and its stroke
|
|
1066
|
+
* `thickness` px, the same on every renderer. */
|
|
1067
|
+
export declare function leaderRuleGeometry(fontSizePx: number): {
|
|
1068
|
+
dy: number;
|
|
1069
|
+
thickness: number;
|
|
1070
|
+
};
|
|
960
1071
|
export declare function pageIsMirrored(page: Pick<VDTPage, 'flow'>): boolean;
|
|
961
1072
|
/** Map a point of a page's flow frame to page coordinates: the identity on
|
|
962
1073
|
* a left-to-right horizontal page, `(page.width − y, x)` on a vertical
|
|
@@ -1074,6 +1185,11 @@ export interface ResolvedResourceBlock {
|
|
|
1074
1185
|
grow: number;
|
|
1075
1186
|
delta: number;
|
|
1076
1187
|
};
|
|
1188
|
+
/** For a floated picture scaled to the room of its slot
|
|
1189
|
+
* (`placement.shrink`, #626): the share of its width it keeps, below 1.
|
|
1190
|
+
* Absent when the picture is set at its size (or only cropped within
|
|
1191
|
+
* its safe area). */
|
|
1192
|
+
shrinkScale?: number;
|
|
1077
1193
|
/** For bitmap/svg: the out-of-band binary id to resolve at render time. */
|
|
1078
1194
|
fileId?: string;
|
|
1079
1195
|
/** For bitmap: the source format (e.g. `'png'`, `'jpeg'`, `'webp'`). */
|
|
@@ -1113,6 +1229,55 @@ export interface ResolvedResourceBlock {
|
|
|
1113
1229
|
* note fonts and colour. Empty otherwise. */
|
|
1114
1230
|
continuesLines: VDTLine[];
|
|
1115
1231
|
}
|
|
1232
|
+
/**
|
|
1233
|
+
* A paragraph's drop cap (#623, {@link VDTBlock.dropCap}), in page
|
|
1234
|
+
* coordinates of the flow frame, as a list marker's are. The block's
|
|
1235
|
+
* lines do not hold it: its first line starts after it. Its plain text and
|
|
1236
|
+
* source range are the paragraph's own, so the block's `sourceMap` and the
|
|
1237
|
+
* first line's `plainStart` (which counts past it) read the word whole.
|
|
1238
|
+
*/
|
|
1239
|
+
export interface VDTDropCap {
|
|
1240
|
+
/** The initial as printed: its letters, with an opening mark set with
|
|
1241
|
+
* the cap (`punctuation: 'with-cap'`). */
|
|
1242
|
+
text: string;
|
|
1243
|
+
fontString: string;
|
|
1244
|
+
/** Hex. */
|
|
1245
|
+
color: string;
|
|
1246
|
+
/** Left edge of the initial's advance. */
|
|
1247
|
+
x: number;
|
|
1248
|
+
/** The baseline it stands on: that of the paragraph's line `sink`. */
|
|
1249
|
+
baselineY: number;
|
|
1250
|
+
/** Its advance width. */
|
|
1251
|
+
width: number;
|
|
1252
|
+
/** Its size (px) and how many lines it spans and sinks. */
|
|
1253
|
+
fontSizePx: number;
|
|
1254
|
+
lines: number;
|
|
1255
|
+
sink: number;
|
|
1256
|
+
/** Source range of the characters it prints (an opening mark hung or set
|
|
1257
|
+
* with it included). */
|
|
1258
|
+
sourceStart?: number;
|
|
1259
|
+
sourceEnd?: number;
|
|
1260
|
+
/** The paragraph's plain-text range it stands for, from 0 (the first
|
|
1261
|
+
* line's `plainStart` counts past it). */
|
|
1262
|
+
plainStart: number;
|
|
1263
|
+
plainEnd: number;
|
|
1264
|
+
/** The whole first word as the paragraph reads it, the initial
|
|
1265
|
+
* included ("Se" of "Se puso"): a tagged PDF gives it as the
|
|
1266
|
+
* `/ActualText` of the initial and the rest of the word. */
|
|
1267
|
+
word: string;
|
|
1268
|
+
/** How many characters of the first line's text finish that word (the
|
|
1269
|
+
* "e" of "Se"); 0 when the initial is a word of its own. */
|
|
1270
|
+
wordRest: number;
|
|
1271
|
+
/** An opening mark hung before the initial at text size
|
|
1272
|
+
* (`punctuation: 'hang'`), on the first line's baseline. */
|
|
1273
|
+
hang?: {
|
|
1274
|
+
text: string;
|
|
1275
|
+
fontString: string;
|
|
1276
|
+
x: number;
|
|
1277
|
+
baselineY: number;
|
|
1278
|
+
width: number;
|
|
1279
|
+
};
|
|
1280
|
+
}
|
|
1116
1281
|
/** See {@link VDTBlock.stripCaption}. */
|
|
1117
1282
|
export interface VDTStripCaption {
|
|
1118
1283
|
/** Index of the first caption line in the block's `lines`, and how many
|
|
@@ -1304,6 +1469,28 @@ export interface VDTBlock {
|
|
|
1304
1469
|
/** Absolute page X coordinate where the prefix run starts (on the
|
|
1305
1470
|
* bullet's `bulletY` / `bulletBaselineY`, as the separator). */
|
|
1306
1471
|
prefixX?: number;
|
|
1472
|
+
/** A drop cap opening the paragraph (#623), on the fragment that holds
|
|
1473
|
+
* its first line only: renderers paint it beside the lines, which were
|
|
1474
|
+
* set short of it. */
|
|
1475
|
+
dropCap?: VDTDropCap;
|
|
1476
|
+
/** A code listing's lines (#624, `type: 'code'`): its language as the
|
|
1477
|
+
* fence names it; when its lines are numbered, the numbers' face and
|
|
1478
|
+
* colour and the room between them and the code (they are set in the
|
|
1479
|
+
* page's `lineNumbers` slot, out of the text, right-aligned before the
|
|
1480
|
+
* code); and how its lines were fitted when one was too wide. */
|
|
1481
|
+
code?: {
|
|
1482
|
+
lang?: string;
|
|
1483
|
+
numbers?: {
|
|
1484
|
+
gap: number;
|
|
1485
|
+
fontString: string;
|
|
1486
|
+
color: string;
|
|
1487
|
+
};
|
|
1488
|
+
fit?: {
|
|
1489
|
+
mode: 'wrap' | 'shrink' | 'clip';
|
|
1490
|
+
lines: number;
|
|
1491
|
+
scale: number;
|
|
1492
|
+
};
|
|
1493
|
+
};
|
|
1307
1494
|
/** List kind for `listItem` blocks — drives bullet shape and text decoration. */
|
|
1308
1495
|
listKind?: 'unordered' | 'ordered' | 'task';
|
|
1309
1496
|
/** When true, the canvas backend draws a strikethrough through the block's lines (completed tasks). */
|
|
@@ -1448,6 +1635,30 @@ export interface VDTColumn {
|
|
|
1448
1635
|
* level: its bottom is the level cut, and column balancing fills the
|
|
1449
1636
|
* column up to it even though the page does not flow on. */
|
|
1450
1637
|
trailingCap?: boolean;
|
|
1638
|
+
/** Regions of the column that text wraps round (#627): a picture or a
|
|
1639
|
+
* box narrower than the column, set at one of its sides, with the lines
|
|
1640
|
+
* beside it set short. Page coordinates of the flow frame (as `bbox`);
|
|
1641
|
+
* each covers the item and its gap on the text's side and under it, its
|
|
1642
|
+
* height in whole grid lines from its top. Absent when nothing in the
|
|
1643
|
+
* column wraps. */
|
|
1644
|
+
exclusions?: VDTExclusion[];
|
|
1645
|
+
}
|
|
1646
|
+
/** A region of a column that text wraps round (see `VDTColumn.exclusions`,
|
|
1647
|
+
* #627). */
|
|
1648
|
+
export interface VDTExclusion {
|
|
1649
|
+
x: number;
|
|
1650
|
+
y: number;
|
|
1651
|
+
width: number;
|
|
1652
|
+
height: number;
|
|
1653
|
+
/** The side of the column it stands at, in the flow (the text runs on the
|
|
1654
|
+
* other side). */
|
|
1655
|
+
side: 'left' | 'right';
|
|
1656
|
+
/** The space between the item and the text beside it (px), part of
|
|
1657
|
+
* `width`. */
|
|
1658
|
+
gap: number;
|
|
1659
|
+
/** The id of the block that wraps the text: an inline figure's block, a
|
|
1660
|
+
* float's, or a box's frame. */
|
|
1661
|
+
ownerId: string;
|
|
1451
1662
|
}
|
|
1452
1663
|
/** The notes set at the foot of one column (`footnotes.placement:
|
|
1453
1664
|
* 'column'`). The note paragraphs themselves are in `VDTPage.floats` (and
|
|
@@ -1587,6 +1798,18 @@ export interface VDTDesignTextBlock {
|
|
|
1587
1798
|
* runs were ordered at that paragraph level, and an HTML line takes
|
|
1588
1799
|
* `dir="rtl"`. Absent for left-to-right text. */
|
|
1589
1800
|
direction?: 'rtl';
|
|
1801
|
+
/** The element lost part of a line to fit its width (#628): `mode` is
|
|
1802
|
+
* how (its `overflow`, or `'clip'` with ink past the box), `elementId`
|
|
1803
|
+
* the element's id, `slot` where its design is painted and `text` the
|
|
1804
|
+
* whole text it was given. The build reports it as a
|
|
1805
|
+
* `designTextTruncated` content warning. Absent when every line shows
|
|
1806
|
+
* whole. */
|
|
1807
|
+
truncated?: {
|
|
1808
|
+
elementId: string;
|
|
1809
|
+
slot: VDTDesignSlotKind;
|
|
1810
|
+
mode: 'ellipsis-start' | 'ellipsis-end' | 'ellipsis-middle' | 'clip';
|
|
1811
|
+
text: string;
|
|
1812
|
+
};
|
|
1590
1813
|
/** Set vertically on a page or a slot whose text is horizontal
|
|
1591
1814
|
* (`DesignTextElement.writingMode: 'vertical-rl'`): the lines are laid
|
|
1592
1815
|
* out in the block's own frame, turned a quarter turn clockwise about
|
|
@@ -1953,6 +2176,28 @@ export interface VDTPage {
|
|
|
1953
2176
|
* split lines and lettering, in sheet coordinates. The page's columns
|
|
1954
2177
|
* are empty: nothing flows on it. */
|
|
1955
2178
|
comic?: VDTComicPage;
|
|
2179
|
+
/** The line numbers printed on the page (`lineNumbers`, #621): one text
|
|
2180
|
+
* block per number, physical like the header and footer, each flagged
|
|
2181
|
+
* `artifact` (a tagged PDF marks it so, the HTML hides it from
|
|
2182
|
+
* assistive technology and from selection). Absent on a page with
|
|
2183
|
+
* none. */
|
|
2184
|
+
lineNumbers?: VDTDesignSlot;
|
|
2185
|
+
/** The line each block of {@link lineNumbers} labels, in the same order:
|
|
2186
|
+
* for overlays and references. */
|
|
2187
|
+
lineNumberMarks?: VDTLineNumberMark[];
|
|
2188
|
+
}
|
|
2189
|
+
/** The line a printed line number labels (#621). */
|
|
2190
|
+
export interface VDTLineNumberMark {
|
|
2191
|
+
/** The line's number in the count. */
|
|
2192
|
+
number: number;
|
|
2193
|
+
/** The number as printed (in `lineNumbers.format`). */
|
|
2194
|
+
label: string;
|
|
2195
|
+
/** The column the line sits in (`VDTColumn.index`). */
|
|
2196
|
+
columnIndex: number;
|
|
2197
|
+
/** The line's block (`VDTBlock.id`) and its index in the block's
|
|
2198
|
+
* `lines`. */
|
|
2199
|
+
blockId: string;
|
|
2200
|
+
lineIndex: number;
|
|
1956
2201
|
}
|
|
1957
2202
|
/** Something the layout could not set as asked and placed anyway — a box
|
|
1958
2203
|
* taller than any column it could go to. Hosts surface these as warnings;
|
|
@@ -2010,8 +2255,13 @@ export interface ConfigWarning {
|
|
|
2010
2255
|
* the word it is closest to, when one is close.
|
|
2011
2256
|
* `unknownNumerals`: a `numerals` value that is not `'auto'`,
|
|
2012
2257
|
* `'latn'`, `'arab'` or `'arabext'`; the digits follow the document
|
|
2013
|
-
* language, and `used` is the digit system that gives.
|
|
2014
|
-
|
|
2258
|
+
* language, and `used` is the digit system that gives.
|
|
2259
|
+
* `lineNumbersUnsupported`: `lineNumbers.enabled` on a vertical
|
|
2260
|
+
* document (#621), which gets no line numbers; `used` is `false`.
|
|
2261
|
+
* `wrapUnsupported`: a resource type's `defaultPlacement.wrap` in a
|
|
2262
|
+
* vertical document (#627), whose figures keep their bands whole;
|
|
2263
|
+
* `used` is `none`. */
|
|
2264
|
+
kind: 'unknownNumberFormat' | 'fontFamilyStack' | 'sideColumnPercentClamped' | 'columnCountClamped' | 'unknownConfigKey' | 'cjkGridClamped' | 'unknownConfigValue' | 'unknownNumerals' | 'lineNumbersUnsupported' | 'wrapUnsupported';
|
|
2015
2265
|
/** Where the value sits in the config, e.g.
|
|
2016
2266
|
* `orderedLists.levels[1].numberFormat`, `header.elements[0].fontFamily`,
|
|
2017
2267
|
* `headingStyles[2].layout.sideColumnPercent`. */
|
|
@@ -2078,6 +2328,13 @@ export type ContentWarning = ContentWarningBase & (
|
|
|
2078
2328
|
kind: 'referencesUnreadable';
|
|
2079
2329
|
message: string;
|
|
2080
2330
|
}
|
|
2331
|
+
/** The front matter block is not valid YAML (an unclosed quote, text
|
|
2332
|
+
* after a quoted value): the document is set without its metadata.
|
|
2333
|
+
* `message` is the parser's reason, with the line and column. */
|
|
2334
|
+
| {
|
|
2335
|
+
kind: 'invalidFrontmatter';
|
|
2336
|
+
message: string;
|
|
2337
|
+
}
|
|
2081
2338
|
/** A `:::name` line whose name is neither a directive nor a container:
|
|
2082
2339
|
* it is set as text. */
|
|
2083
2340
|
| {
|
|
@@ -2317,6 +2574,11 @@ export type ContentWarning = ContentWarningBase & (
|
|
|
2317
2574
|
kind: 'rotateIgnoredVertical';
|
|
2318
2575
|
resourceId: string;
|
|
2319
2576
|
}
|
|
2577
|
+
/** A `:tab` in a block set in vertical text (#622): tab stops are set in
|
|
2578
|
+
* horizontal text only, so the tab is a word space. */
|
|
2579
|
+
| {
|
|
2580
|
+
kind: 'tabInVerticalText';
|
|
2581
|
+
}
|
|
2320
2582
|
/** A comic page's `split` attribute the grammar cannot read whole (a
|
|
2321
2583
|
* stray character, an unclosed `[`, `/` and `|` mixed in one list, a
|
|
2322
2584
|
* bracketed list on its parent's axis): the readable part is used, an
|
|
@@ -2393,7 +2655,93 @@ export type ContentWarning = ContentWarningBase & (
|
|
|
2393
2655
|
| {
|
|
2394
2656
|
kind: 'comicUnknownSpeaker';
|
|
2395
2657
|
speaker: string;
|
|
2658
|
+
}
|
|
2659
|
+
/** A line number set in the side column (`lineNumbers.position:
|
|
2660
|
+
* 'side'`, #621) overlaps a side box, a side caption or another float
|
|
2661
|
+
* of that column: both are painted where they are. Points at the line
|
|
2662
|
+
* it numbers; `number` is the number as printed. */
|
|
2663
|
+
| {
|
|
2664
|
+
kind: 'lineNumberOverlap';
|
|
2665
|
+
number: string;
|
|
2666
|
+
}
|
|
2667
|
+
/** A paragraph a drop cap opens (#623) that could not take it as
|
|
2668
|
+
* configured. `reason`: `'shortParagraph'`, fewer lines than the
|
|
2669
|
+
* initial sinks (`handling` says what `shortParagraph` did: kept the
|
|
2670
|
+
* room, shrank the initial to `lines`, or left it out); `'split'`, the
|
|
2671
|
+
* paragraph broke before the initial's last line, alone in a column
|
|
2672
|
+
* too short for it; `'joiningScript'`, its first letter joins the next
|
|
2673
|
+
* (Arabic, Syriac, N'Ko) and is not set apart; `'verticalText'`, drop
|
|
2674
|
+
* caps are set in horizontal text only; `'noLetter'`, it opens with no
|
|
2675
|
+
* letter or digit to set large (a reference, a formula, a note mark).
|
|
2676
|
+
* `text` is the paragraph's first line. Found by the layout. */
|
|
2677
|
+
| {
|
|
2678
|
+
kind: 'dropCap';
|
|
2679
|
+
reason: 'shortParagraph' | 'split' | 'joiningScript' | 'verticalText' | 'noLetter';
|
|
2680
|
+
handling?: 'reserve' | 'shrink' | 'skip';
|
|
2681
|
+
lines?: number;
|
|
2682
|
+
text: string;
|
|
2683
|
+
}
|
|
2684
|
+
/** `codeOverflow` (#624): a code listing has lines wider than its box,
|
|
2685
|
+
* fitted as `codeStyle.overflow` says: turned over (`'wrap'`), set
|
|
2686
|
+
* smaller (`'shrink'`, at `scale` of its size; past `minFontScale` its
|
|
2687
|
+
* lines wrap too) or cut at the box's edge (`'clip'`). `lines` counts
|
|
2688
|
+
* the source lines too wide. Found by the layout. */
|
|
2689
|
+
| {
|
|
2690
|
+
kind: 'codeOverflow';
|
|
2691
|
+
mode: 'wrap' | 'shrink' | 'clip';
|
|
2692
|
+
lines: number;
|
|
2693
|
+
scale?: number;
|
|
2694
|
+
lang?: string;
|
|
2695
|
+
}
|
|
2696
|
+
/** `floatShrunk` (#626): a floated picture was set smaller than its size
|
|
2697
|
+
* to fit the room of its slot (`placement.shrink`), at `scale` of its
|
|
2698
|
+
* width. `overflowPx`: at its smallest scale (`placement.minScale`) it
|
|
2699
|
+
* still runs this far past the foot of the page's text block, on a page
|
|
2700
|
+
* where it had nowhere else to go. Found by the layout; information
|
|
2701
|
+
* more than a fault, unless it overflows. */
|
|
2702
|
+
| {
|
|
2703
|
+
kind: 'floatShrunk';
|
|
2704
|
+
resourceId: string;
|
|
2705
|
+
scale: number;
|
|
2706
|
+
overflowPx?: number;
|
|
2707
|
+
}
|
|
2708
|
+
/** `textWrap` (#627): a resource or a box set to wrap text round it
|
|
2709
|
+
* (`placement.wrap`, a box's `wrap`) that does not as asked.
|
|
2710
|
+
* `'tooNarrow'`: the text beside it would be narrower than
|
|
2711
|
+
* `layout.wrap.minTextWidth`, so it takes its band whole; `'fewLines'`:
|
|
2712
|
+
* it is shorter than `layout.wrap.minLinesBeside` lines, so it takes
|
|
2713
|
+
* its band whole; `'moved'`: an inline one was too tall for the room
|
|
2714
|
+
* left in its column and moved on to the next, its anchor with it;
|
|
2715
|
+
* `'verticalText'`: text wraps in horizontal text only, so in a
|
|
2716
|
+
* vertical flow it takes its band whole. `resourceId` names a
|
|
2717
|
+
* resource, `box` a box's style. Found by the layout. */
|
|
2718
|
+
| {
|
|
2719
|
+
kind: 'textWrap';
|
|
2720
|
+
reason: 'tooNarrow' | 'fewLines' | 'moved' | 'verticalText';
|
|
2721
|
+
resourceId?: string;
|
|
2722
|
+
box?: string;
|
|
2723
|
+
}
|
|
2724
|
+
/** `designTextTruncated` (#628): a design text element did not fit its
|
|
2725
|
+
* width and lost part of a line: cut by an ellipsis (`mode`
|
|
2726
|
+
* `'ellipsis-*'`, its `overflow`) or clipped with ink past its box
|
|
2727
|
+
* (`'clip'`). `slot` is where the design is painted (a running head or
|
|
2728
|
+
* folio, a heading design, a part page, a contents part row),
|
|
2729
|
+
* `elementId` the element's id and `text` the whole text it was given.
|
|
2730
|
+
* One per element and page; a running head or folio once per element
|
|
2731
|
+
* and chapter (a chapter title cut on every page of its chapter is one
|
|
2732
|
+
* warning). `sourceStart` / `sourceEnd` when the text mirrors a heading
|
|
2733
|
+
* or a frontmatter field. Found by the layout. */
|
|
2734
|
+
| {
|
|
2735
|
+
kind: 'designTextTruncated';
|
|
2736
|
+
slot: VDTDesignSlotKind;
|
|
2737
|
+
elementId: string;
|
|
2738
|
+
text: string;
|
|
2739
|
+
mode: 'ellipsis-start' | 'ellipsis-end' | 'ellipsis-middle' | 'clip';
|
|
2396
2740
|
});
|
|
2741
|
+
/** Where a design slot is painted: a running head (`'header'`), a folio
|
|
2742
|
+
* (`'footer'`), a heading design (`'heading'`), a part page or its verso
|
|
2743
|
+
* (`'part'`), a part row of the contents (`'tocRow'`). */
|
|
2744
|
+
export type VDTDesignSlotKind = 'header' | 'footer' | 'heading' | 'part' | 'tocRow';
|
|
2397
2745
|
/** What a build reports in `VDTDocument.warnings`: a construct the layout
|
|
2398
2746
|
* had to force ({@link CalloutOverflowWarning}), with the shape it has had
|
|
2399
2747
|
* since postext 1.4. What the source names wrongly is in
|
|
@@ -2501,6 +2849,16 @@ export interface VDTDocument {
|
|
|
2501
2849
|
title: string;
|
|
2502
2850
|
palette?: Record<string, string>;
|
|
2503
2851
|
}[];
|
|
2852
|
+
/** The number of the last line the document counted (`lineNumbers`,
|
|
2853
|
+
* #621), printed or not; absent when line numbers are off or nothing
|
|
2854
|
+
* was counted. A host laying out a book chapter by chapter hands it to
|
|
2855
|
+
* the next chapter (`continuation.lineNumber`) when lines are counted
|
|
2856
|
+
* through the book. */
|
|
2857
|
+
lastLineNumber?: number;
|
|
2858
|
+
/** Set when the count of {@link lastLineNumber} started again inside
|
|
2859
|
+
* the document (a restart, a poem's `lineStart`): it does not depend on
|
|
2860
|
+
* the number the document inherited. */
|
|
2861
|
+
lineNumberRestarted?: true;
|
|
2504
2862
|
}
|
|
2505
2863
|
/** What a design image block records of the resource picture `fileId`
|
|
2506
2864
|
* (already picked from `resource`): its kind, which decides whether
|