postext 1.4.2 → 1.5.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/README.md +76 -202
- package/dist/__tests__/breakOpportunities.test.d.ts +2 -0
- package/dist/__tests__/breakOpportunities.test.d.ts.map +1 -0
- package/dist/__tests__/breakOpportunities.test.js +204 -0
- package/dist/__tests__/breakOpportunities.test.js.map +1 -0
- package/dist/__tests__/bundle.test.js +399 -1
- package/dist/__tests__/bundle.test.js.map +1 -1
- package/dist/__tests__/bundleLocaleAndBytes.test.d.ts +2 -0
- package/dist/__tests__/bundleLocaleAndBytes.test.d.ts.map +1 -0
- package/dist/__tests__/bundleLocaleAndBytes.test.js +177 -0
- package/dist/__tests__/bundleLocaleAndBytes.test.js.map +1 -0
- package/dist/__tests__/colorAlpha.test.d.ts +2 -0
- package/dist/__tests__/colorAlpha.test.d.ts.map +1 -0
- package/dist/__tests__/colorAlpha.test.js +87 -0
- package/dist/__tests__/colorAlpha.test.js.map +1 -0
- package/dist/__tests__/columnBalancing.test.js +88 -0
- package/dist/__tests__/columnBalancing.test.js.map +1 -1
- package/dist/__tests__/columnClip.test.js +20 -0
- package/dist/__tests__/columnClip.test.js.map +1 -1
- package/dist/__tests__/columnRuleBands.test.d.ts +2 -0
- package/dist/__tests__/columnRuleBands.test.d.ts.map +1 -0
- package/dist/__tests__/columnRuleBands.test.js +146 -0
- package/dist/__tests__/columnRuleBands.test.js.map +1 -0
- package/dist/__tests__/contentWarnings.test.d.ts +2 -0
- package/dist/__tests__/contentWarnings.test.d.ts.map +1 -0
- package/dist/__tests__/contentWarnings.test.js +219 -0
- package/dist/__tests__/contentWarnings.test.js.map +1 -0
- package/dist/__tests__/continuation.test.js +2 -1
- package/dist/__tests__/continuation.test.js.map +1 -1
- package/dist/__tests__/createLayout.test.js +18 -1
- package/dist/__tests__/createLayout.test.js.map +1 -1
- package/dist/__tests__/cropMarks.test.d.ts +2 -0
- package/dist/__tests__/cropMarks.test.d.ts.map +1 -0
- package/dist/__tests__/cropMarks.test.js +138 -0
- package/dist/__tests__/cropMarks.test.js.map +1 -0
- package/dist/__tests__/defaults/calloutStyles.test.js +30 -0
- package/dist/__tests__/defaults/calloutStyles.test.js.map +1 -1
- package/dist/__tests__/defaults/headingsBreakBefore.test.d.ts +2 -0
- package/dist/__tests__/defaults/headingsBreakBefore.test.d.ts.map +1 -0
- package/dist/__tests__/defaults/headingsBreakBefore.test.js +78 -0
- package/dist/__tests__/defaults/headingsBreakBefore.test.js.map +1 -0
- package/dist/__tests__/defaults/paragraphStyles.test.js +22 -0
- package/dist/__tests__/defaults/paragraphStyles.test.js.map +1 -1
- package/dist/__tests__/design/bleedClip.test.d.ts +2 -0
- package/dist/__tests__/design/bleedClip.test.d.ts.map +1 -0
- package/dist/__tests__/design/bleedClip.test.js +91 -0
- package/dist/__tests__/design/bleedClip.test.js.map +1 -0
- package/dist/__tests__/design/boxBorderInside.test.d.ts +2 -0
- package/dist/__tests__/design/boxBorderInside.test.d.ts.map +1 -0
- package/dist/__tests__/design/boxBorderInside.test.js +102 -0
- package/dist/__tests__/design/boxBorderInside.test.js.map +1 -0
- package/dist/__tests__/design/designLineHeight.test.d.ts +2 -0
- package/dist/__tests__/design/designLineHeight.test.d.ts.map +1 -0
- package/dist/__tests__/design/designLineHeight.test.js +108 -0
- package/dist/__tests__/design/designLineHeight.test.js.map +1 -0
- package/dist/__tests__/design/designText.test.d.ts +2 -0
- package/dist/__tests__/design/designText.test.d.ts.map +1 -0
- package/dist/__tests__/design/designText.test.js +331 -0
- package/dist/__tests__/design/designText.test.js.map +1 -0
- package/dist/__tests__/design/designTextJustify.test.d.ts +2 -0
- package/dist/__tests__/design/designTextJustify.test.d.ts.map +1 -0
- package/dist/__tests__/design/designTextJustify.test.js +119 -0
- package/dist/__tests__/design/designTextJustify.test.js.map +1 -0
- package/dist/__tests__/design/designTextNegativeTracking.test.d.ts +2 -0
- package/dist/__tests__/design/designTextNegativeTracking.test.d.ts.map +1 -0
- package/dist/__tests__/design/designTextNegativeTracking.test.js +95 -0
- package/dist/__tests__/design/designTextNegativeTracking.test.js.map +1 -0
- package/dist/__tests__/design/designTextRender.test.d.ts +2 -0
- package/dist/__tests__/design/designTextRender.test.d.ts.map +1 -0
- package/dist/__tests__/design/designTextRender.test.js +106 -0
- package/dist/__tests__/design/designTextRender.test.js.map +1 -0
- package/dist/__tests__/design/dropCap.test.d.ts +2 -0
- package/dist/__tests__/design/dropCap.test.d.ts.map +1 -0
- package/dist/__tests__/design/dropCap.test.js +205 -0
- package/dist/__tests__/design/dropCap.test.js.map +1 -0
- package/dist/__tests__/design/ellipsis.test.d.ts +2 -0
- package/dist/__tests__/design/ellipsis.test.d.ts.map +1 -0
- package/dist/__tests__/design/ellipsis.test.js +113 -0
- package/dist/__tests__/design/ellipsis.test.js.map +1 -0
- package/dist/__tests__/design/headingDesignClip.test.d.ts +2 -0
- package/dist/__tests__/design/headingDesignClip.test.d.ts.map +1 -0
- package/dist/__tests__/design/headingDesignClip.test.js +60 -0
- package/dist/__tests__/design/headingDesignClip.test.js.map +1 -0
- package/dist/__tests__/design/headingDesignSideChannel.test.d.ts +2 -0
- package/dist/__tests__/design/headingDesignSideChannel.test.d.ts.map +1 -0
- package/dist/__tests__/design/headingDesignSideChannel.test.js +187 -0
- package/dist/__tests__/design/headingDesignSideChannel.test.js.map +1 -0
- package/dist/__tests__/design/inColumnTitleBreak.test.d.ts +2 -0
- package/dist/__tests__/design/inColumnTitleBreak.test.d.ts.map +1 -0
- package/dist/__tests__/design/inColumnTitleBreak.test.js +60 -0
- package/dist/__tests__/design/inColumnTitleBreak.test.js.map +1 -0
- package/dist/__tests__/design/openerBottomAnchor.test.d.ts +2 -0
- package/dist/__tests__/design/openerBottomAnchor.test.d.ts.map +1 -0
- package/dist/__tests__/design/openerBottomAnchor.test.js +106 -0
- package/dist/__tests__/design/openerBottomAnchor.test.js.map +1 -0
- package/dist/__tests__/design/openerChapterNumber.test.d.ts +2 -0
- package/dist/__tests__/design/openerChapterNumber.test.d.ts.map +1 -0
- package/dist/__tests__/design/openerChapterNumber.test.js +163 -0
- package/dist/__tests__/design/openerChapterNumber.test.js.map +1 -0
- package/dist/__tests__/design/openerImageReserve.test.d.ts +2 -0
- package/dist/__tests__/design/openerImageReserve.test.d.ts.map +1 -0
- package/dist/__tests__/design/openerImageReserve.test.js +83 -0
- package/dist/__tests__/design/openerImageReserve.test.js.map +1 -0
- package/dist/__tests__/design/openerReserve.test.d.ts +2 -0
- package/dist/__tests__/design/openerReserve.test.d.ts.map +1 -0
- package/dist/__tests__/design/openerReserve.test.js +147 -0
- package/dist/__tests__/design/openerReserve.test.js.map +1 -0
- package/dist/__tests__/design/ruleDefaults.test.d.ts +2 -0
- package/dist/__tests__/design/ruleDefaults.test.d.ts.map +1 -0
- package/dist/__tests__/design/ruleDefaults.test.js +59 -0
- package/dist/__tests__/design/ruleDefaults.test.js.map +1 -0
- package/dist/__tests__/design/runningHeads.test.js +4 -2
- package/dist/__tests__/design/runningHeads.test.js.map +1 -1
- package/dist/__tests__/design/titleTextWrapped.test.d.ts +2 -0
- package/dist/__tests__/design/titleTextWrapped.test.d.ts.map +1 -0
- package/dist/__tests__/design/titleTextWrapped.test.js +258 -0
- package/dist/__tests__/design/titleTextWrapped.test.js.map +1 -0
- package/dist/__tests__/design/trackingAlignment.test.d.ts +2 -0
- package/dist/__tests__/design/trackingAlignment.test.d.ts.map +1 -0
- package/dist/__tests__/design/trackingAlignment.test.js +101 -0
- package/dist/__tests__/design/trackingAlignment.test.js.map +1 -0
- package/dist/__tests__/design/verticalAlignOverflow.test.d.ts +2 -0
- package/dist/__tests__/design/verticalAlignOverflow.test.d.ts.map +1 -0
- package/dist/__tests__/design/verticalAlignOverflow.test.js +68 -0
- package/dist/__tests__/design/verticalAlignOverflow.test.js.map +1 -0
- package/dist/__tests__/exports.test.js +24 -0
- package/dist/__tests__/exports.test.js.map +1 -1
- package/dist/__tests__/fontStack.test.d.ts +2 -0
- package/dist/__tests__/fontStack.test.d.ts.map +1 -0
- package/dist/__tests__/fontStack.test.js +100 -0
- package/dist/__tests__/fontStack.test.js.map +1 -0
- package/dist/__tests__/frontmatterValues.test.d.ts +2 -0
- package/dist/__tests__/frontmatterValues.test.d.ts.map +1 -0
- package/dist/__tests__/frontmatterValues.test.js +119 -0
- package/dist/__tests__/frontmatterValues.test.js.map +1 -0
- package/dist/__tests__/gradedRunt.test.d.ts +2 -0
- package/dist/__tests__/gradedRunt.test.d.ts.map +1 -0
- package/dist/__tests__/gradedRunt.test.js +66 -0
- package/dist/__tests__/gradedRunt.test.js.map +1 -0
- package/dist/__tests__/headingAlign.test.d.ts +2 -0
- package/dist/__tests__/headingAlign.test.d.ts.map +1 -0
- package/dist/__tests__/headingAlign.test.js +92 -0
- package/dist/__tests__/headingAlign.test.js.map +1 -0
- package/dist/__tests__/headingInlineMarks.test.d.ts +2 -0
- package/dist/__tests__/headingInlineMarks.test.d.ts.map +1 -0
- package/dist/__tests__/headingInlineMarks.test.js +126 -0
- package/dist/__tests__/headingInlineMarks.test.js.map +1 -0
- package/dist/__tests__/headingLetterSpacing.test.d.ts +2 -0
- package/dist/__tests__/headingLetterSpacing.test.d.ts.map +1 -0
- package/dist/__tests__/headingLetterSpacing.test.js +135 -0
- package/dist/__tests__/headingLetterSpacing.test.js.map +1 -0
- package/dist/__tests__/headingNumberPlaceholders.test.d.ts +2 -0
- package/dist/__tests__/headingNumberPlaceholders.test.d.ts.map +1 -0
- package/dist/__tests__/headingNumberPlaceholders.test.js +104 -0
- package/dist/__tests__/headingNumberPlaceholders.test.js.map +1 -0
- package/dist/__tests__/headingNumberingStyles.test.d.ts +2 -0
- package/dist/__tests__/headingNumberingStyles.test.d.ts.map +1 -0
- package/dist/__tests__/headingNumberingStyles.test.js +151 -0
- package/dist/__tests__/headingNumberingStyles.test.js.map +1 -0
- package/dist/__tests__/headingSourceTitle.test.d.ts +2 -0
- package/dist/__tests__/headingSourceTitle.test.d.ts.map +1 -0
- package/dist/__tests__/headingSourceTitle.test.js +35 -0
- package/dist/__tests__/headingSourceTitle.test.js.map +1 -0
- package/dist/__tests__/headingStyleBreakAfterPagebreak.test.d.ts +2 -0
- package/dist/__tests__/headingStyleBreakAfterPagebreak.test.d.ts.map +1 -0
- package/dist/__tests__/headingStyleBreakAfterPagebreak.test.js +52 -0
- package/dist/__tests__/headingStyleBreakAfterPagebreak.test.js.map +1 -0
- package/dist/__tests__/hiddenHeadings.test.d.ts +2 -0
- package/dist/__tests__/hiddenHeadings.test.d.ts.map +1 -0
- package/dist/__tests__/hiddenHeadings.test.js +137 -0
- package/dist/__tests__/hiddenHeadings.test.js.map +1 -0
- package/dist/__tests__/htmlHostReset.test.d.ts +2 -0
- package/dist/__tests__/htmlHostReset.test.d.ts.map +1 -0
- package/dist/__tests__/htmlHostReset.test.js +63 -0
- package/dist/__tests__/htmlHostReset.test.js.map +1 -0
- package/dist/__tests__/hyphenationLocale.test.d.ts +2 -0
- package/dist/__tests__/hyphenationLocale.test.d.ts.map +1 -0
- package/dist/__tests__/hyphenationLocale.test.js +143 -0
- package/dist/__tests__/hyphenationLocale.test.js.map +1 -0
- package/dist/__tests__/justifyTracking.test.d.ts +2 -0
- package/dist/__tests__/justifyTracking.test.d.ts.map +1 -0
- package/dist/__tests__/justifyTracking.test.js +217 -0
- package/dist/__tests__/justifyTracking.test.js.map +1 -0
- package/dist/__tests__/layoutWorkerClient.test.d.ts +2 -0
- package/dist/__tests__/layoutWorkerClient.test.d.ts.map +1 -0
- package/dist/__tests__/layoutWorkerClient.test.js +140 -0
- package/dist/__tests__/layoutWorkerClient.test.js.map +1 -0
- package/dist/__tests__/links.test.d.ts +2 -0
- package/dist/__tests__/links.test.d.ts.map +1 -0
- package/dist/__tests__/links.test.js +227 -0
- package/dist/__tests__/links.test.js.map +1 -0
- package/dist/__tests__/localisedStrings.test.d.ts +2 -0
- package/dist/__tests__/localisedStrings.test.d.ts.map +1 -0
- package/dist/__tests__/localisedStrings.test.js +118 -0
- package/dist/__tests__/localisedStrings.test.js.map +1 -0
- package/dist/__tests__/looseLines.test.d.ts +2 -0
- package/dist/__tests__/looseLines.test.d.ts.map +1 -0
- package/dist/__tests__/looseLines.test.js +72 -0
- package/dist/__tests__/looseLines.test.js.map +1 -0
- package/dist/__tests__/mainEntryReact.test.d.ts +2 -0
- package/dist/__tests__/mainEntryReact.test.d.ts.map +1 -0
- package/dist/__tests__/mainEntryReact.test.js +13 -0
- package/dist/__tests__/mainEntryReact.test.js.map +1 -0
- package/dist/__tests__/mathBundle.test.d.ts +2 -0
- package/dist/__tests__/mathBundle.test.d.ts.map +1 -0
- package/dist/__tests__/mathBundle.test.js +80 -0
- package/dist/__tests__/mathBundle.test.js.map +1 -0
- package/dist/__tests__/mathEngine.test.d.ts +2 -0
- package/dist/__tests__/mathEngine.test.d.ts.map +1 -0
- package/dist/__tests__/mathEngine.test.js +69 -0
- package/dist/__tests__/mathEngine.test.js.map +1 -0
- package/dist/__tests__/mathEngineInit.test.d.ts +2 -0
- package/dist/__tests__/mathEngineInit.test.d.ts.map +1 -0
- package/dist/__tests__/mathEngineInit.test.js +33 -0
- package/dist/__tests__/mathEngineInit.test.js.map +1 -0
- package/dist/__tests__/mathSize.test.d.ts +2 -0
- package/dist/__tests__/mathSize.test.d.ts.map +1 -0
- package/dist/__tests__/mathSize.test.js +168 -0
- package/dist/__tests__/mathSize.test.js.map +1 -0
- package/dist/__tests__/mathSizeMigration.test.d.ts +2 -0
- package/dist/__tests__/mathSizeMigration.test.d.ts.map +1 -0
- package/dist/__tests__/mathSizeMigration.test.js +188 -0
- package/dist/__tests__/mathSizeMigration.test.js.map +1 -0
- package/dist/__tests__/measureCache.test.js +148 -4
- package/dist/__tests__/measureCache.test.js.map +1 -1
- package/dist/__tests__/measureCacheKeepBreaks.test.d.ts +2 -0
- package/dist/__tests__/measureCacheKeepBreaks.test.d.ts.map +1 -0
- package/dist/__tests__/measureCacheKeepBreaks.test.js +59 -0
- package/dist/__tests__/measureCacheKeepBreaks.test.js.map +1 -0
- package/dist/__tests__/noBreakSpaces.test.d.ts +2 -0
- package/dist/__tests__/noBreakSpaces.test.d.ts.map +1 -0
- package/dist/__tests__/noBreakSpaces.test.js +208 -0
- package/dist/__tests__/noBreakSpaces.test.js.map +1 -0
- package/dist/__tests__/numberFormats.test.d.ts +2 -0
- package/dist/__tests__/numberFormats.test.d.ts.map +1 -0
- package/dist/__tests__/numberFormats.test.js +142 -0
- package/dist/__tests__/numberFormats.test.js.map +1 -0
- package/dist/__tests__/paletteEverywhere.test.d.ts +2 -0
- package/dist/__tests__/paletteEverywhere.test.d.ts.map +1 -0
- package/dist/__tests__/paletteEverywhere.test.js +228 -0
- package/dist/__tests__/paletteEverywhere.test.js.map +1 -0
- package/dist/__tests__/paragraphStyleIndent.test.d.ts +2 -0
- package/dist/__tests__/paragraphStyleIndent.test.d.ts.map +1 -0
- package/dist/__tests__/paragraphStyleIndent.test.js +91 -0
- package/dist/__tests__/paragraphStyleIndent.test.js.map +1 -0
- package/dist/__tests__/parse/attrQuoting.test.d.ts +2 -0
- package/dist/__tests__/parse/attrQuoting.test.d.ts.map +1 -0
- package/dist/__tests__/parse/attrQuoting.test.js +87 -0
- package/dist/__tests__/parse/attrQuoting.test.js.map +1 -0
- package/dist/__tests__/parse/codeSpans.test.d.ts +2 -0
- package/dist/__tests__/parse/codeSpans.test.d.ts.map +1 -0
- package/dist/__tests__/parse/codeSpans.test.js +31 -0
- package/dist/__tests__/parse/codeSpans.test.js.map +1 -0
- package/dist/__tests__/parse/intrawordUnderscore.test.d.ts +2 -0
- package/dist/__tests__/parse/intrawordUnderscore.test.d.ts.map +1 -0
- package/dist/__tests__/parse/intrawordUnderscore.test.js +69 -0
- package/dist/__tests__/parse/intrawordUnderscore.test.js.map +1 -0
- package/dist/__tests__/parse/scripts.test.js +4 -1
- package/dist/__tests__/parse/scripts.test.js.map +1 -1
- package/dist/__tests__/parts.test.js +103 -0
- package/dist/__tests__/parts.test.js.map +1 -1
- package/dist/__tests__/pipeline/balancingRecord.test.d.ts +2 -0
- package/dist/__tests__/pipeline/balancingRecord.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/balancingRecord.test.js +176 -0
- package/dist/__tests__/pipeline/balancingRecord.test.js.map +1 -0
- package/dist/__tests__/pipeline/blockquoteStyle.test.d.ts +2 -0
- package/dist/__tests__/pipeline/blockquoteStyle.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/blockquoteStyle.test.js +99 -0
- package/dist/__tests__/pipeline/blockquoteStyle.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutContinuation.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutContinuation.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutContinuation.test.js +133 -0
- package/dist/__tests__/pipeline/calloutContinuation.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutContinuationInset.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutContinuationInset.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutContinuationInset.test.js +116 -0
- package/dist/__tests__/pipeline/calloutContinuationInset.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutCornerWideIcon.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutCornerWideIcon.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutCornerWideIcon.test.js +69 -0
- package/dist/__tests__/pipeline/calloutCornerWideIcon.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutFloatMargins.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutFloatMargins.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutFloatMargins.test.js +104 -0
- package/dist/__tests__/pipeline/calloutFloatMargins.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutInlineResourceGap.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutInlineResourceGap.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutInlineResourceGap.test.js +148 -0
- package/dist/__tests__/pipeline/calloutInlineResourceGap.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutListColor.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutListColor.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutListColor.test.js +86 -0
- package/dist/__tests__/pipeline/calloutListColor.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutRaggedLines.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutRaggedLines.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutRaggedLines.test.js +65 -0
- package/dist/__tests__/pipeline/calloutRaggedLines.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutRuntTracking.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutRuntTracking.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutRuntTracking.test.js +84 -0
- package/dist/__tests__/pipeline/calloutRuntTracking.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutSplitMinLinesChild.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutSplitMinLinesChild.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutSplitMinLinesChild.test.js +187 -0
- package/dist/__tests__/pipeline/calloutSplitMinLinesChild.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutStripeRadius.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutStripeRadius.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutStripeRadius.test.js +127 -0
- package/dist/__tests__/pipeline/calloutStripeRadius.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutTitleLineHeight.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutTitleLineHeight.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutTitleLineHeight.test.js +81 -0
- package/dist/__tests__/pipeline/calloutTitleLineHeight.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutTypography.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutTypography.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutTypography.test.js +97 -0
- package/dist/__tests__/pipeline/calloutTypography.test.js.map +1 -0
- package/dist/__tests__/pipeline/capUnderHeadFloats.test.d.ts +2 -0
- package/dist/__tests__/pipeline/capUnderHeadFloats.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/capUnderHeadFloats.test.js +68 -0
- package/dist/__tests__/pipeline/capUnderHeadFloats.test.js.map +1 -0
- package/dist/__tests__/pipeline/captionAlign.test.d.ts +2 -0
- package/dist/__tests__/pipeline/captionAlign.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/captionAlign.test.js +99 -0
- package/dist/__tests__/pipeline/captionAlign.test.js.map +1 -0
- package/dist/__tests__/pipeline/chipPalette.test.d.ts +2 -0
- package/dist/__tests__/pipeline/chipPalette.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/chipPalette.test.js +80 -0
- package/dist/__tests__/pipeline/chipPalette.test.js.map +1 -0
- package/dist/__tests__/pipeline/chipVerticalPadding.test.d.ts +2 -0
- package/dist/__tests__/pipeline/chipVerticalPadding.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/chipVerticalPadding.test.js +66 -0
- package/dist/__tests__/pipeline/chipVerticalPadding.test.js.map +1 -0
- package/dist/__tests__/pipeline/chips.test.js +32 -0
- package/dist/__tests__/pipeline/chips.test.js.map +1 -1
- package/dist/__tests__/pipeline/closingBoxLever.test.d.ts +2 -0
- package/dist/__tests__/pipeline/closingBoxLever.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/closingBoxLever.test.js +68 -0
- package/dist/__tests__/pipeline/closingBoxLever.test.js.map +1 -0
- package/dist/__tests__/pipeline/closingBoxOrder.test.d.ts +2 -0
- package/dist/__tests__/pipeline/closingBoxOrder.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/closingBoxOrder.test.js +87 -0
- package/dist/__tests__/pipeline/closingBoxOrder.test.js.map +1 -0
- package/dist/__tests__/pipeline/closingPageAfterFloat.test.d.ts +2 -0
- package/dist/__tests__/pipeline/closingPageAfterFloat.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/closingPageAfterFloat.test.js +159 -0
- package/dist/__tests__/pipeline/closingPageAfterFloat.test.js.map +1 -0
- package/dist/__tests__/pipeline/closingPageAfterFloatPage.test.d.ts +2 -0
- package/dist/__tests__/pipeline/closingPageAfterFloatPage.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/closingPageAfterFloatPage.test.js +90 -0
- package/dist/__tests__/pipeline/closingPageAfterFloatPage.test.js.map +1 -0
- package/dist/__tests__/pipeline/colonBalancing.test.js +19 -15
- package/dist/__tests__/pipeline/colonBalancing.test.js.map +1 -1
- package/dist/__tests__/pipeline/colonListRoom.test.d.ts +2 -0
- package/dist/__tests__/pipeline/colonListRoom.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/colonListRoom.test.js +127 -0
- package/dist/__tests__/pipeline/colonListRoom.test.js.map +1 -0
- package/dist/__tests__/pipeline/columnWidthRebreak.test.d.ts +2 -0
- package/dist/__tests__/pipeline/columnWidthRebreak.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/columnWidthRebreak.test.js +124 -0
- package/dist/__tests__/pipeline/columnWidthRebreak.test.js.map +1 -0
- package/dist/__tests__/pipeline/compoundBreaks.test.d.ts +2 -0
- package/dist/__tests__/pipeline/compoundBreaks.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/compoundBreaks.test.js +368 -0
- package/dist/__tests__/pipeline/compoundBreaks.test.js.map +1 -0
- package/dist/__tests__/pipeline/continuationUnderFloat.test.d.ts +2 -0
- package/dist/__tests__/pipeline/continuationUnderFloat.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/continuationUnderFloat.test.js +64 -0
- package/dist/__tests__/pipeline/continuationUnderFloat.test.js.map +1 -0
- package/dist/__tests__/pipeline/crossChapterRef.test.d.ts +2 -0
- package/dist/__tests__/pipeline/crossChapterRef.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/crossChapterRef.test.js +124 -0
- package/dist/__tests__/pipeline/crossChapterRef.test.js.map +1 -0
- package/dist/__tests__/pipeline/dashBreaks.test.d.ts +2 -0
- package/dist/__tests__/pipeline/dashBreaks.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/dashBreaks.test.js +358 -0
- package/dist/__tests__/pipeline/dashBreaks.test.js.map +1 -0
- package/dist/__tests__/pipeline/defaultOpenerPaint.test.d.ts +2 -0
- package/dist/__tests__/pipeline/defaultOpenerPaint.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/defaultOpenerPaint.test.js +128 -0
- package/dist/__tests__/pipeline/defaultOpenerPaint.test.js.map +1 -0
- package/dist/__tests__/pipeline/displayMathFlow.test.d.ts +2 -0
- package/dist/__tests__/pipeline/displayMathFlow.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/displayMathFlow.test.js +156 -0
- package/dist/__tests__/pipeline/displayMathFlow.test.js.map +1 -0
- package/dist/__tests__/pipeline/emptyResourceTemplate.test.d.ts +2 -0
- package/dist/__tests__/pipeline/emptyResourceTemplate.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/emptyResourceTemplate.test.js +66 -0
- package/dist/__tests__/pipeline/emptyResourceTemplate.test.js.map +1 -0
- package/dist/__tests__/pipeline/figureBodyAlign.test.d.ts +2 -0
- package/dist/__tests__/pipeline/figureBodyAlign.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/figureBodyAlign.test.js +92 -0
- package/dist/__tests__/pipeline/figureBodyAlign.test.js.map +1 -0
- package/dist/__tests__/pipeline/floatAfterCitingLine.test.d.ts +2 -0
- package/dist/__tests__/pipeline/floatAfterCitingLine.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/floatAfterCitingLine.test.js +217 -0
- package/dist/__tests__/pipeline/floatAfterCitingLine.test.js.map +1 -0
- package/dist/__tests__/pipeline/floatFirstSlot.test.js +15 -0
- package/dist/__tests__/pipeline/floatFirstSlot.test.js.map +1 -1
- package/dist/__tests__/pipeline/floatOverInlineResource.test.d.ts +2 -0
- package/dist/__tests__/pipeline/floatOverInlineResource.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/floatOverInlineResource.test.js +75 -0
- package/dist/__tests__/pipeline/floatOverInlineResource.test.js.map +1 -0
- package/dist/__tests__/pipeline/floatPlacementRules.test.d.ts +2 -0
- package/dist/__tests__/pipeline/floatPlacementRules.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/floatPlacementRules.test.js +177 -0
- package/dist/__tests__/pipeline/floatPlacementRules.test.js.map +1 -0
- package/dist/__tests__/pipeline/floatSlots.test.js +35 -1
- package/dist/__tests__/pipeline/floatSlots.test.js.map +1 -1
- package/dist/__tests__/pipeline/hardHyphenBreaks.test.d.ts +2 -0
- package/dist/__tests__/pipeline/hardHyphenBreaks.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/hardHyphenBreaks.test.js +165 -0
- package/dist/__tests__/pipeline/hardHyphenBreaks.test.js.map +1 -0
- package/dist/__tests__/pipeline/headingDesignCuts.test.d.ts +2 -0
- package/dist/__tests__/pipeline/headingDesignCuts.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/headingDesignCuts.test.js +96 -0
- package/dist/__tests__/pipeline/headingDesignCuts.test.js.map +1 -0
- package/dist/__tests__/pipeline/headingSnapPerLevel.test.d.ts +2 -0
- package/dist/__tests__/pipeline/headingSnapPerLevel.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/headingSnapPerLevel.test.js +97 -0
- package/dist/__tests__/pipeline/headingSnapPerLevel.test.js.map +1 -0
- package/dist/__tests__/pipeline/headingSplitOrphans.test.d.ts +2 -0
- package/dist/__tests__/pipeline/headingSplitOrphans.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/headingSplitOrphans.test.js +134 -0
- package/dist/__tests__/pipeline/headingSplitOrphans.test.js.map +1 -0
- package/dist/__tests__/pipeline/hyphenAcrossColumns.test.d.ts +2 -0
- package/dist/__tests__/pipeline/hyphenAcrossColumns.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/hyphenAcrossColumns.test.js +232 -0
- package/dist/__tests__/pipeline/hyphenAcrossColumns.test.js.map +1 -0
- package/dist/__tests__/pipeline/indentAfterOutOfFlow.test.d.ts +2 -0
- package/dist/__tests__/pipeline/indentAfterOutOfFlow.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/indentAfterOutOfFlow.test.js +93 -0
- package/dist/__tests__/pipeline/indentAfterOutOfFlow.test.js.map +1 -0
- package/dist/__tests__/pipeline/inlineFigureSpace.test.d.ts +2 -0
- package/dist/__tests__/pipeline/inlineFigureSpace.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/inlineFigureSpace.test.js +195 -0
- package/dist/__tests__/pipeline/inlineFigureSpace.test.js.map +1 -0
- package/dist/__tests__/pipeline/lineSourceEdges.test.d.ts +2 -0
- package/dist/__tests__/pipeline/lineSourceEdges.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/lineSourceEdges.test.js +143 -0
- package/dist/__tests__/pipeline/lineSourceEdges.test.js.map +1 -0
- package/dist/__tests__/pipeline/lineSourceRanges.test.d.ts +2 -0
- package/dist/__tests__/pipeline/lineSourceRanges.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/lineSourceRanges.test.js +96 -0
- package/dist/__tests__/pipeline/lineSourceRanges.test.js.map +1 -0
- package/dist/__tests__/pipeline/listTopSnap.test.d.ts +2 -0
- package/dist/__tests__/pipeline/listTopSnap.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/listTopSnap.test.js +90 -0
- package/dist/__tests__/pipeline/listTopSnap.test.js.map +1 -0
- package/dist/__tests__/pipeline/looseParagraphLimit.test.d.ts +2 -0
- package/dist/__tests__/pipeline/looseParagraphLimit.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/looseParagraphLimit.test.js +63 -0
- package/dist/__tests__/pipeline/looseParagraphLimit.test.js.map +1 -0
- package/dist/__tests__/pipeline/nestedListSpacing.test.d.ts +2 -0
- package/dist/__tests__/pipeline/nestedListSpacing.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/nestedListSpacing.test.js +62 -0
- package/dist/__tests__/pipeline/nestedListSpacing.test.js.map +1 -0
- package/dist/__tests__/pipeline/openerColumnStarts.test.d.ts +2 -0
- package/dist/__tests__/pipeline/openerColumnStarts.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/openerColumnStarts.test.js +189 -0
- package/dist/__tests__/pipeline/openerColumnStarts.test.js.map +1 -0
- package/dist/__tests__/pipeline/openerFillsPage.test.d.ts +2 -0
- package/dist/__tests__/pipeline/openerFillsPage.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/openerFillsPage.test.js +133 -0
- package/dist/__tests__/pipeline/openerFillsPage.test.js.map +1 -0
- package/dist/__tests__/pipeline/openerTallerThanColumn.test.d.ts +2 -0
- package/dist/__tests__/pipeline/openerTallerThanColumn.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/openerTallerThanColumn.test.js +139 -0
- package/dist/__tests__/pipeline/openerTallerThanColumn.test.js.map +1 -0
- package/dist/__tests__/pipeline/orderedNumberWidth.test.d.ts +2 -0
- package/dist/__tests__/pipeline/orderedNumberWidth.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/orderedNumberWidth.test.js +69 -0
- package/dist/__tests__/pipeline/orderedNumberWidth.test.js.map +1 -0
- package/dist/__tests__/pipeline/pageSpanHeadingWidth.test.d.ts +2 -0
- package/dist/__tests__/pipeline/pageSpanHeadingWidth.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/pageSpanHeadingWidth.test.js +74 -0
- package/dist/__tests__/pipeline/pageSpanHeadingWidth.test.js.map +1 -0
- package/dist/__tests__/pipeline/paragraphContainerTail.test.d.ts +2 -0
- package/dist/__tests__/pipeline/paragraphContainerTail.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/paragraphContainerTail.test.js +218 -0
- package/dist/__tests__/pipeline/paragraphContainerTail.test.js.map +1 -0
- package/dist/__tests__/pipeline/paragraphStyleFaces.test.d.ts +2 -0
- package/dist/__tests__/pipeline/paragraphStyleFaces.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/paragraphStyleFaces.test.js +121 -0
- package/dist/__tests__/pipeline/paragraphStyleFaces.test.js.map +1 -0
- package/dist/__tests__/pipeline/paragraphStyles.test.js +85 -0
- package/dist/__tests__/pipeline/paragraphStyles.test.js.map +1 -1
- package/dist/__tests__/pipeline/raggedOptimal.test.d.ts +2 -0
- package/dist/__tests__/pipeline/raggedOptimal.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/raggedOptimal.test.js +231 -0
- package/dist/__tests__/pipeline/raggedOptimal.test.js.map +1 -0
- package/dist/__tests__/pipeline/resolvedPaletteCopy.test.d.ts +2 -0
- package/dist/__tests__/pipeline/resolvedPaletteCopy.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/resolvedPaletteCopy.test.js +68 -0
- package/dist/__tests__/pipeline/resolvedPaletteCopy.test.js.map +1 -0
- package/dist/__tests__/pipeline/resourceNumberingRules.test.d.ts +2 -0
- package/dist/__tests__/pipeline/resourceNumberingRules.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/resourceNumberingRules.test.js +103 -0
- package/dist/__tests__/pipeline/resourceNumberingRules.test.js.map +1 -0
- package/dist/__tests__/pipeline/sectionPageOwnership.test.d.ts +2 -0
- package/dist/__tests__/pipeline/sectionPageOwnership.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/sectionPageOwnership.test.js +89 -0
- package/dist/__tests__/pipeline/sectionPageOwnership.test.js.map +1 -0
- package/dist/__tests__/pipeline/sectionPaletteSharedBase.test.d.ts +2 -0
- package/dist/__tests__/pipeline/sectionPaletteSharedBase.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/sectionPaletteSharedBase.test.js +278 -0
- package/dist/__tests__/pipeline/sectionPaletteSharedBase.test.js.map +1 -0
- package/dist/__tests__/pipeline/sectionPaletteTables.test.d.ts +2 -0
- package/dist/__tests__/pipeline/sectionPaletteTables.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/sectionPaletteTables.test.js +104 -0
- package/dist/__tests__/pipeline/sectionPaletteTables.test.js.map +1 -0
- package/dist/__tests__/pipeline/sideBoxAtColumnEnd.test.d.ts +2 -0
- package/dist/__tests__/pipeline/sideBoxAtColumnEnd.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/sideBoxAtColumnEnd.test.js +176 -0
- package/dist/__tests__/pipeline/sideBoxAtColumnEnd.test.js.map +1 -0
- package/dist/__tests__/pipeline/sideColumnPercent.test.d.ts +2 -0
- package/dist/__tests__/pipeline/sideColumnPercent.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/sideColumnPercent.test.js +114 -0
- package/dist/__tests__/pipeline/sideColumnPercent.test.js.map +1 -0
- package/dist/__tests__/pipeline/snippetDollarEscape.test.d.ts +2 -0
- package/dist/__tests__/pipeline/snippetDollarEscape.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/snippetDollarEscape.test.js +112 -0
- package/dist/__tests__/pipeline/snippetDollarEscape.test.js.map +1 -0
- package/dist/__tests__/pipeline/snippetLineBreaks.test.d.ts +2 -0
- package/dist/__tests__/pipeline/snippetLineBreaks.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/snippetLineBreaks.test.js +178 -0
- package/dist/__tests__/pipeline/snippetLineBreaks.test.js.map +1 -0
- package/dist/__tests__/pipeline/spanCutUnderColumnFloat.test.d.ts +2 -0
- package/dist/__tests__/pipeline/spanCutUnderColumnFloat.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/spanCutUnderColumnFloat.test.js +90 -0
- package/dist/__tests__/pipeline/spanCutUnderColumnFloat.test.js.map +1 -0
- package/dist/__tests__/pipeline/splitBoxCappedBand.test.d.ts +2 -0
- package/dist/__tests__/pipeline/splitBoxCappedBand.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/splitBoxCappedBand.test.js +64 -0
- package/dist/__tests__/pipeline/splitBoxCappedBand.test.js.map +1 -0
- package/dist/__tests__/pipeline/tableCellNoBreakSpaces.test.d.ts +2 -0
- package/dist/__tests__/pipeline/tableCellNoBreakSpaces.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/tableCellNoBreakSpaces.test.js +97 -0
- package/dist/__tests__/pipeline/tableCellNoBreakSpaces.test.js.map +1 -0
- package/dist/__tests__/pipeline/tableHeaderTracking.test.d.ts +2 -0
- package/dist/__tests__/pipeline/tableHeaderTracking.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/tableHeaderTracking.test.js +139 -0
- package/dist/__tests__/pipeline/tableHeaderTracking.test.js.map +1 -0
- package/dist/__tests__/pipeline/tableSplitTextRoom.test.d.ts +2 -0
- package/dist/__tests__/pipeline/tableSplitTextRoom.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/tableSplitTextRoom.test.js +90 -0
- package/dist/__tests__/pipeline/tableSplitTextRoom.test.js.map +1 -0
- package/dist/__tests__/pipeline/tableStyles.test.js +94 -1
- package/dist/__tests__/pipeline/tableStyles.test.js.map +1 -1
- package/dist/__tests__/pipeline/tallParagraphShortColumn.test.d.ts +2 -0
- package/dist/__tests__/pipeline/tallParagraphShortColumn.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/tallParagraphShortColumn.test.js +79 -0
- package/dist/__tests__/pipeline/tallParagraphShortColumn.test.js.map +1 -0
- package/dist/__tests__/pipeline/textFaces.test.d.ts +2 -0
- package/dist/__tests__/pipeline/textFaces.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/textFaces.test.js +258 -0
- package/dist/__tests__/pipeline/textFaces.test.js.map +1 -0
- package/dist/__tests__/pipeline/trailingBand.test.js +29 -0
- package/dist/__tests__/pipeline/trailingBand.test.js.map +1 -1
- package/dist/__tests__/pipeline/trailingCapHeading.test.d.ts +2 -0
- package/dist/__tests__/pipeline/trailingCapHeading.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/trailingCapHeading.test.js +69 -0
- package/dist/__tests__/pipeline/trailingCapHeading.test.js.map +1 -0
- package/dist/__tests__/pipeline/trailingCapOverflow.test.d.ts +2 -0
- package/dist/__tests__/pipeline/trailingCapOverflow.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/trailingCapOverflow.test.js +116 -0
- package/dist/__tests__/pipeline/trailingCapOverflow.test.js.map +1 -0
- package/dist/__tests__/placeholders.test.js +100 -2
- package/dist/__tests__/placeholders.test.js.map +1 -1
- package/dist/__tests__/punctuationGlue.test.d.ts +2 -0
- package/dist/__tests__/punctuationGlue.test.d.ts.map +1 -0
- package/dist/__tests__/punctuationGlue.test.js +165 -0
- package/dist/__tests__/punctuationGlue.test.js.map +1 -0
- package/dist/__tests__/raggedHyphenation.test.d.ts +2 -0
- package/dist/__tests__/raggedHyphenation.test.d.ts.map +1 -0
- package/dist/__tests__/raggedHyphenation.test.js +184 -0
- package/dist/__tests__/raggedHyphenation.test.js.map +1 -0
- package/dist/__tests__/renderWarnings.test.d.ts +2 -0
- package/dist/__tests__/renderWarnings.test.d.ts.map +1 -0
- package/dist/__tests__/renderWarnings.test.js +72 -0
- package/dist/__tests__/renderWarnings.test.js.map +1 -0
- package/dist/__tests__/resolvedLocale.test.d.ts +2 -0
- package/dist/__tests__/resolvedLocale.test.d.ts.map +1 -0
- package/dist/__tests__/resolvedLocale.test.js +51 -0
- package/dist/__tests__/resolvedLocale.test.js.map +1 -0
- package/dist/__tests__/runningChapter.test.d.ts +2 -0
- package/dist/__tests__/runningChapter.test.d.ts.map +1 -0
- package/dist/__tests__/runningChapter.test.js +161 -0
- package/dist/__tests__/runningChapter.test.js.map +1 -0
- package/dist/__tests__/runtFixStretchLimit.test.d.ts +2 -0
- package/dist/__tests__/runtFixStretchLimit.test.d.ts.map +1 -0
- package/dist/__tests__/runtFixStretchLimit.test.js +145 -0
- package/dist/__tests__/runtFixStretchLimit.test.js.map +1 -0
- package/dist/__tests__/scriptStacking.test.d.ts +2 -0
- package/dist/__tests__/scriptStacking.test.d.ts.map +1 -0
- package/dist/__tests__/scriptStacking.test.js +331 -0
- package/dist/__tests__/scriptStacking.test.js.map +1 -0
- package/dist/__tests__/sectionPaletteFlow.test.d.ts +2 -0
- package/dist/__tests__/sectionPaletteFlow.test.d.ts.map +1 -0
- package/dist/__tests__/sectionPaletteFlow.test.js +51 -0
- package/dist/__tests__/sectionPaletteFlow.test.js.map +1 -0
- package/dist/__tests__/singleInk.test.js +64 -2
- package/dist/__tests__/singleInk.test.js.map +1 -1
- package/dist/__tests__/singleInkRender.test.d.ts +2 -0
- package/dist/__tests__/singleInkRender.test.d.ts.map +1 -0
- package/dist/__tests__/singleInkRender.test.js +396 -0
- package/dist/__tests__/singleInkRender.test.js.map +1 -0
- package/dist/__tests__/spaceDirective.test.js +75 -0
- package/dist/__tests__/spaceDirective.test.js.map +1 -1
- package/dist/__tests__/table/model.test.js +124 -1
- package/dist/__tests__/table/model.test.js.map +1 -1
- package/dist/__tests__/tableFillSeams.test.d.ts +2 -0
- package/dist/__tests__/tableFillSeams.test.d.ts.map +1 -0
- package/dist/__tests__/tableFillSeams.test.js +180 -0
- package/dist/__tests__/tableFillSeams.test.js.map +1 -0
- package/dist/__tests__/toc.test.js +23 -2
- package/dist/__tests__/toc.test.js.map +1 -1
- package/dist/__tests__/tocLeaderKerning.test.d.ts +2 -0
- package/dist/__tests__/tocLeaderKerning.test.d.ts.map +1 -0
- package/dist/__tests__/tocLeaderKerning.test.js +83 -0
- package/dist/__tests__/tocLeaderKerning.test.js.map +1 -0
- package/dist/__tests__/tocNumberBaseline.test.d.ts +2 -0
- package/dist/__tests__/tocNumberBaseline.test.d.ts.map +1 -0
- package/dist/__tests__/tocNumberBaseline.test.js +90 -0
- package/dist/__tests__/tocNumberBaseline.test.js.map +1 -0
- package/dist/__tests__/tocPartsHeight.test.d.ts +2 -0
- package/dist/__tests__/tocPartsHeight.test.d.ts.map +1 -0
- package/dist/__tests__/tocPartsHeight.test.js +41 -0
- package/dist/__tests__/tocPartsHeight.test.js.map +1 -0
- package/dist/__tests__/trackedLineAlign.test.d.ts +2 -0
- package/dist/__tests__/trackedLineAlign.test.d.ts.map +1 -0
- package/dist/__tests__/trackedLineAlign.test.js +96 -0
- package/dist/__tests__/trackedLineAlign.test.js.map +1 -0
- package/dist/bundle/adapters.d.ts +10 -3
- package/dist/bundle/adapters.d.ts.map +1 -1
- package/dist/bundle/adapters.js +13 -5
- package/dist/bundle/adapters.js.map +1 -1
- package/dist/bundle/api.d.ts +32 -0
- package/dist/bundle/api.d.ts.map +1 -1
- package/dist/bundle/api.js +12 -2
- package/dist/bundle/api.js.map +1 -1
- package/dist/bundle/book.d.ts +6 -1
- package/dist/bundle/book.d.ts.map +1 -1
- package/dist/bundle/book.js +89 -17
- package/dist/bundle/book.js.map +1 -1
- package/dist/bundle/codec.d.ts +87 -3
- package/dist/bundle/codec.d.ts.map +1 -1
- package/dist/bundle/codec.js +193 -13
- package/dist/bundle/codec.js.map +1 -1
- package/dist/bundle/configVersion.d.ts +295 -0
- package/dist/bundle/configVersion.d.ts.map +1 -0
- package/dist/bundle/configVersion.js +788 -0
- package/dist/bundle/configVersion.js.map +1 -0
- package/dist/bundle/index.d.ts +6 -4
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +2 -1
- package/dist/bundle/index.js.map +1 -1
- package/dist/bundle/manifest.d.ts +19 -5
- package/dist/bundle/manifest.d.ts.map +1 -1
- package/dist/bundle/manifest.js +53 -21
- package/dist/bundle/manifest.js.map +1 -1
- package/dist/bundle/types.d.ts +19 -0
- package/dist/bundle/types.d.ts.map +1 -1
- package/dist/bundle/zip.d.ts +14 -1
- package/dist/bundle/zip.d.ts.map +1 -1
- package/dist/bundle/zip.js +13 -2
- package/dist/bundle/zip.js.map +1 -1
- package/dist/canvas-backend/blockRender.d.ts +3 -1
- package/dist/canvas-backend/blockRender.d.ts.map +1 -1
- package/dist/canvas-backend/blockRender.js +27 -17
- package/dist/canvas-backend/blockRender.js.map +1 -1
- package/dist/canvas-backend/decorations.d.ts.map +1 -1
- package/dist/canvas-backend/decorations.js +6 -36
- package/dist/canvas-backend/decorations.js.map +1 -1
- package/dist/canvas-backend/headerFooter.d.ts +3 -1
- package/dist/canvas-backend/headerFooter.d.ts.map +1 -1
- package/dist/canvas-backend/headerFooter.js +85 -22
- package/dist/canvas-backend/headerFooter.js.map +1 -1
- package/dist/canvas-backend/index.d.ts +17 -3
- package/dist/canvas-backend/index.d.ts.map +1 -1
- package/dist/canvas-backend/index.js +75 -14
- package/dist/canvas-backend/index.js.map +1 -1
- package/dist/canvas-backend/renderResourceBlock.d.ts +45 -5
- package/dist/canvas-backend/renderResourceBlock.d.ts.map +1 -1
- package/dist/canvas-backend/renderResourceBlock.js +133 -22
- package/dist/canvas-backend/renderResourceBlock.js.map +1 -1
- package/dist/columnClip.d.ts +13 -2
- package/dist/columnClip.d.ts.map +1 -1
- package/dist/columnClip.js +37 -4
- package/dist/columnClip.js.map +1 -1
- package/dist/columnRule.d.ts +7 -2
- package/dist/columnRule.d.ts.map +1 -1
- package/dist/columnRule.js +27 -2
- package/dist/columnRule.js.map +1 -1
- package/dist/configWarnings.d.ts +26 -0
- package/dist/configWarnings.d.ts.map +1 -0
- package/dist/configWarnings.js +223 -0
- package/dist/configWarnings.js.map +1 -0
- package/dist/createLayout.d.ts +16 -1
- package/dist/createLayout.d.ts.map +1 -1
- package/dist/createLayout.js +25 -22
- package/dist/createLayout.js.map +1 -1
- package/dist/cropMarks.d.ts +28 -0
- package/dist/cropMarks.d.ts.map +1 -0
- package/dist/cropMarks.js +40 -0
- package/dist/cropMarks.js.map +1 -0
- package/dist/defaults/bodyText.d.ts +12 -2
- package/dist/defaults/bodyText.d.ts.map +1 -1
- package/dist/defaults/bodyText.js +132 -7
- package/dist/defaults/bodyText.js.map +1 -1
- package/dist/defaults/calloutStyles.d.ts +13 -2
- package/dist/defaults/calloutStyles.d.ts.map +1 -1
- package/dist/defaults/calloutStyles.js +64 -4
- package/dist/defaults/calloutStyles.js.map +1 -1
- package/dist/defaults/chipStyles.d.ts +4 -3
- package/dist/defaults/chipStyles.d.ts.map +1 -1
- package/dist/defaults/chipStyles.js +11 -3
- package/dist/defaults/chipStyles.js.map +1 -1
- package/dist/defaults/headerFooter.d.ts +11 -1
- package/dist/defaults/headerFooter.d.ts.map +1 -1
- package/dist/defaults/headerFooter.js +52 -4
- package/dist/defaults/headerFooter.js.map +1 -1
- package/dist/defaults/headingStyles.d.ts +7 -3
- package/dist/defaults/headingStyles.d.ts.map +1 -1
- package/dist/defaults/headingStyles.js +34 -6
- package/dist/defaults/headingStyles.js.map +1 -1
- package/dist/defaults/headings.d.ts +10 -2
- package/dist/defaults/headings.d.ts.map +1 -1
- package/dist/defaults/headings.js +79 -16
- package/dist/defaults/headings.js.map +1 -1
- package/dist/defaults/index.d.ts +1 -1
- package/dist/defaults/index.d.ts.map +1 -1
- package/dist/defaults/index.js +1 -1
- package/dist/defaults/index.js.map +1 -1
- package/dist/defaults/layout.d.ts.map +1 -1
- package/dist/defaults/layout.js +27 -0
- package/dist/defaults/layout.js.map +1 -1
- package/dist/defaults/lists-shared.d.ts +2 -0
- package/dist/defaults/lists-shared.d.ts.map +1 -1
- package/dist/defaults/lists-shared.js +2 -0
- package/dist/defaults/lists-shared.js.map +1 -1
- package/dist/defaults/math.d.ts.map +1 -1
- package/dist/defaults/math.js +12 -0
- package/dist/defaults/math.js.map +1 -1
- package/dist/defaults/orderedLists.d.ts +7 -1
- package/dist/defaults/orderedLists.d.ts.map +1 -1
- package/dist/defaults/orderedLists.js +30 -4
- package/dist/defaults/orderedLists.js.map +1 -1
- package/dist/defaults/page.d.ts.map +1 -1
- package/dist/defaults/page.js +7 -2
- package/dist/defaults/page.js.map +1 -1
- package/dist/defaults/paragraphStyles.d.ts +2 -1
- package/dist/defaults/paragraphStyles.d.ts.map +1 -1
- package/dist/defaults/paragraphStyles.js +26 -1
- package/dist/defaults/paragraphStyles.js.map +1 -1
- package/dist/defaults/resourceTypes.d.ts +5 -1
- package/dist/defaults/resourceTypes.d.ts.map +1 -1
- package/dist/defaults/resourceTypes.js +37 -6
- package/dist/defaults/resourceTypes.js.map +1 -1
- package/dist/defaults/shared.d.ts +10 -0
- package/dist/defaults/shared.d.ts.map +1 -1
- package/dist/defaults/shared.js +79 -0
- package/dist/defaults/shared.js.map +1 -1
- package/dist/defaults/tableStyle.d.ts +1 -1
- package/dist/defaults/tableStyle.d.ts.map +1 -1
- package/dist/defaults/tableStyle.js +40 -6
- package/dist/defaults/tableStyle.js.map +1 -1
- package/dist/defaults/toc.d.ts +2 -1
- package/dist/defaults/toc.d.ts.map +1 -1
- package/dist/defaults/toc.js +2 -1
- package/dist/defaults/toc.js.map +1 -1
- package/dist/defaults/unorderedLists.d.ts +1 -0
- package/dist/defaults/unorderedLists.d.ts.map +1 -1
- package/dist/defaults/unorderedLists.js +7 -1
- package/dist/defaults/unorderedLists.js.map +1 -1
- package/dist/design/layout.d.ts +41 -3
- package/dist/design/layout.d.ts.map +1 -1
- package/dist/design/layout.js +322 -90
- package/dist/design/layout.js.map +1 -1
- package/dist/design/placeholders.d.ts +39 -4
- package/dist/design/placeholders.d.ts.map +1 -1
- package/dist/design/placeholders.js +61 -11
- package/dist/design/placeholders.js.map +1 -1
- package/dist/design/richText.d.ts +110 -0
- package/dist/design/richText.d.ts.map +1 -0
- package/dist/design/richText.js +458 -0
- package/dist/design/richText.js.map +1 -0
- package/dist/frontmatter.d.ts +14 -0
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +61 -0
- package/dist/frontmatter.js.map +1 -1
- package/dist/html-backend.d.ts +60 -2
- package/dist/html-backend.d.ts.map +1 -1
- package/dist/html-backend.js +317 -62
- package/dist/html-backend.js.map +1 -1
- package/dist/hyphenate.d.ts +30 -4
- package/dist/hyphenate.d.ts.map +1 -1
- package/dist/hyphenate.js +71 -5
- package/dist/hyphenate.js.map +1 -1
- package/dist/index.d.ts +28 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -11
- package/dist/index.js.map +1 -1
- package/dist/knuthPlass/breakpoints.d.ts +21 -0
- package/dist/knuthPlass/breakpoints.d.ts.map +1 -1
- package/dist/knuthPlass/breakpoints.js +205 -14
- package/dist/knuthPlass/breakpoints.js.map +1 -1
- package/dist/knuthPlass/constants.d.ts +15 -0
- package/dist/knuthPlass/constants.d.ts.map +1 -1
- package/dist/knuthPlass/constants.js +15 -0
- package/dist/knuthPlass/constants.js.map +1 -1
- package/dist/knuthPlass/pretextAdapter.d.ts +23 -2
- package/dist/knuthPlass/pretextAdapter.d.ts.map +1 -1
- package/dist/knuthPlass/pretextAdapter.js +95 -9
- package/dist/knuthPlass/pretextAdapter.js.map +1 -1
- package/dist/knuthPlass/richAdapter.d.ts +26 -2
- package/dist/knuthPlass/richAdapter.d.ts.map +1 -1
- package/dist/knuthPlass/richAdapter.js +79 -18
- package/dist/knuthPlass/richAdapter.js.map +1 -1
- package/dist/knuthPlass/tracking.d.ts +24 -0
- package/dist/knuthPlass/tracking.d.ts.map +1 -0
- package/dist/knuthPlass/tracking.js +77 -0
- package/dist/knuthPlass/tracking.js.map +1 -0
- package/dist/knuthPlass/types.d.ts +66 -4
- package/dist/knuthPlass/types.d.ts.map +1 -1
- package/dist/lineInk.d.ts +12 -0
- package/dist/lineInk.d.ts.map +1 -0
- package/dist/lineInk.js +20 -0
- package/dist/lineInk.js.map +1 -0
- package/dist/locale.d.ts +26 -0
- package/dist/locale.d.ts.map +1 -0
- package/dist/locale.js +63 -0
- package/dist/locale.js.map +1 -0
- package/dist/looseLines.d.ts +44 -0
- package/dist/looseLines.d.ts.map +1 -0
- package/dist/looseLines.js +46 -0
- package/dist/looseLines.js.map +1 -0
- package/dist/math/THIRD_PARTY_LICENSES.txt +221 -0
- package/dist/math/engine.d.ts +24 -0
- package/dist/math/engine.d.ts.map +1 -1
- package/dist/math/engine.js +252 -83
- package/dist/math/engine.js.map +1 -1
- package/dist/math/index.d.ts +1 -1
- package/dist/math/index.d.ts.map +1 -1
- package/dist/math/index.js +1 -1
- package/dist/math/index.js.map +1 -1
- package/dist/math/mathjax.d.ts +20 -0
- package/dist/math/mathjax.d.ts.map +1 -0
- package/dist/math/mathjax.js +29 -0
- package/dist/measure/breakRules.d.ts +50 -0
- package/dist/measure/breakRules.d.ts.map +1 -0
- package/dist/measure/breakRules.js +116 -0
- package/dist/measure/breakRules.js.map +1 -0
- package/dist/measure/cache.d.ts.map +1 -1
- package/dist/measure/cache.js +26 -5
- package/dist/measure/cache.js.map +1 -1
- package/dist/measure/cjk.d.ts +19 -0
- package/dist/measure/cjk.d.ts.map +1 -0
- package/dist/measure/cjk.js +70 -0
- package/dist/measure/cjk.js.map +1 -0
- package/dist/measure/font.d.ts +21 -5
- package/dist/measure/font.d.ts.map +1 -1
- package/dist/measure/font.js +61 -4
- package/dist/measure/font.js.map +1 -1
- package/dist/measure/index.d.ts +16 -2
- package/dist/measure/index.d.ts.map +1 -1
- package/dist/measure/index.js +61 -1
- package/dist/measure/index.js.map +1 -1
- package/dist/measure/links.d.ts +15 -0
- package/dist/measure/links.d.ts.map +1 -0
- package/dist/measure/links.js +115 -0
- package/dist/measure/links.js.map +1 -0
- package/dist/measure/plain.d.ts +10 -2
- package/dist/measure/plain.d.ts.map +1 -1
- package/dist/measure/plain.js +175 -25
- package/dist/measure/plain.js.map +1 -1
- package/dist/measure/rich.d.ts +86 -6
- package/dist/measure/rich.d.ts.map +1 -1
- package/dist/measure/rich.js +808 -131
- package/dist/measure/rich.js.map +1 -1
- package/dist/measure/spaces.d.ts +34 -0
- package/dist/measure/spaces.d.ts.map +1 -0
- package/dist/measure/spaces.js +42 -0
- package/dist/measure/spaces.js.map +1 -0
- package/dist/measure/types.d.ts +99 -0
- package/dist/measure/types.d.ts.map +1 -1
- package/dist/measure/types.js +19 -0
- package/dist/measure/types.js.map +1 -1
- package/dist/numberWords.d.ts +22 -0
- package/dist/numberWords.d.ts.map +1 -0
- package/dist/numberWords.js +155 -0
- package/dist/numberWords.js.map +1 -0
- package/dist/numbering.d.ts +52 -3
- package/dist/numbering.d.ts.map +1 -1
- package/dist/numbering.js +116 -16
- package/dist/numbering.js.map +1 -1
- package/dist/parse/blockParser.d.ts.map +1 -1
- package/dist/parse/blockParser.js +54 -7
- package/dist/parse/blockParser.js.map +1 -1
- 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/injectSpans.d.ts +3 -1
- package/dist/parse/injectSpans.d.ts.map +1 -1
- package/dist/parse/injectSpans.js +8 -4
- package/dist/parse/injectSpans.js.map +1 -1
- package/dist/parse/inlineFormatting.d.ts +50 -2
- package/dist/parse/inlineFormatting.d.ts.map +1 -1
- package/dist/parse/inlineFormatting.js +441 -26
- package/dist/parse/inlineFormatting.js.map +1 -1
- package/dist/parse/inlineSnippet.d.ts +12 -3
- package/dist/parse/inlineSnippet.d.ts.map +1 -1
- package/dist/parse/inlineSnippet.js +10 -3
- package/dist/parse/inlineSnippet.js.map +1 -1
- package/dist/parse/links.d.ts +9 -0
- package/dist/parse/links.d.ts.map +1 -0
- package/dist/parse/links.js +23 -0
- package/dist/parse/links.js.map +1 -0
- package/dist/parse/sourceMapping.d.ts.map +1 -1
- package/dist/parse/sourceMapping.js +68 -7
- package/dist/parse/sourceMapping.js.map +1 -1
- package/dist/parse/types.d.ts +32 -0
- package/dist/parse/types.d.ts.map +1 -1
- package/dist/pipeline/bandCaps.d.ts +26 -5
- package/dist/pipeline/bandCaps.d.ts.map +1 -1
- package/dist/pipeline/bandCaps.js +47 -20
- package/dist/pipeline/bandCaps.js.map +1 -1
- package/dist/pipeline/build.d.ts.map +1 -1
- package/dist/pipeline/build.js +1417 -172
- package/dist/pipeline/build.js.map +1 -1
- package/dist/pipeline/buildBlockKind.d.ts +4 -0
- package/dist/pipeline/buildBlockKind.d.ts.map +1 -1
- package/dist/pipeline/buildBlockKind.js +38 -7
- package/dist/pipeline/buildBlockKind.js.map +1 -1
- package/dist/pipeline/buildHelpers.d.ts +5 -2
- package/dist/pipeline/buildHelpers.d.ts.map +1 -1
- package/dist/pipeline/buildHelpers.js +101 -25
- package/dist/pipeline/buildHelpers.js.map +1 -1
- package/dist/pipeline/buildMeasurement.d.ts.map +1 -1
- package/dist/pipeline/buildMeasurement.js +6 -2
- package/dist/pipeline/buildMeasurement.js.map +1 -1
- package/dist/pipeline/calloutLayout.d.ts +34 -7
- package/dist/pipeline/calloutLayout.d.ts.map +1 -1
- package/dist/pipeline/calloutLayout.js +331 -44
- package/dist/pipeline/calloutLayout.js.map +1 -1
- package/dist/pipeline/chips.d.ts.map +1 -1
- package/dist/pipeline/chips.js +3 -0
- package/dist/pipeline/chips.js.map +1 -1
- package/dist/pipeline/columnBalancing.d.ts +26 -6
- package/dist/pipeline/columnBalancing.d.ts.map +1 -1
- package/dist/pipeline/columnBalancing.js +82 -21
- package/dist/pipeline/columnBalancing.js.map +1 -1
- package/dist/pipeline/config.d.ts +18 -0
- package/dist/pipeline/config.d.ts.map +1 -1
- package/dist/pipeline/config.js +44 -7
- package/dist/pipeline/config.js.map +1 -1
- package/dist/pipeline/contentWarnings.d.ts +50 -0
- package/dist/pipeline/contentWarnings.d.ts.map +1 -0
- package/dist/pipeline/contentWarnings.js +362 -0
- package/dist/pipeline/contentWarnings.js.map +1 -0
- package/dist/pipeline/continuation.d.ts.map +1 -1
- package/dist/pipeline/continuation.js +25 -5
- package/dist/pipeline/continuation.js.map +1 -1
- package/dist/pipeline/floatPlacement.d.ts +16 -7
- package/dist/pipeline/floatPlacement.d.ts.map +1 -1
- package/dist/pipeline/floatPlacement.js +22 -5
- package/dist/pipeline/floatPlacement.js.map +1 -1
- package/dist/pipeline/floatSlots.d.ts +30 -4
- package/dist/pipeline/floatSlots.d.ts.map +1 -1
- package/dist/pipeline/floatSlots.js +42 -7
- package/dist/pipeline/floatSlots.js.map +1 -1
- package/dist/pipeline/headerFooter.d.ts +125 -11
- package/dist/pipeline/headerFooter.d.ts.map +1 -1
- package/dist/pipeline/headerFooter.js +444 -69
- package/dist/pipeline/headerFooter.js.map +1 -1
- package/dist/pipeline/headingDesignCuts.d.ts +40 -0
- package/dist/pipeline/headingDesignCuts.d.ts.map +1 -0
- package/dist/pipeline/headingDesignCuts.js +72 -0
- package/dist/pipeline/headingDesignCuts.js.map +1 -0
- package/dist/pipeline/headingStyles.d.ts +12 -0
- package/dist/pipeline/headingStyles.d.ts.map +1 -1
- package/dist/pipeline/headingStyles.js +45 -1
- package/dist/pipeline/headingStyles.js.map +1 -1
- package/dist/pipeline/lists.d.ts +33 -1
- package/dist/pipeline/lists.d.ts.map +1 -1
- package/dist/pipeline/lists.js +53 -2
- package/dist/pipeline/lists.js.map +1 -1
- package/dist/pipeline/measureContentBlock.d.ts +25 -1
- package/dist/pipeline/measureContentBlock.d.ts.map +1 -1
- package/dist/pipeline/measureContentBlock.js +137 -17
- package/dist/pipeline/measureContentBlock.js.map +1 -1
- package/dist/pipeline/outline.d.ts +10 -5
- package/dist/pipeline/outline.d.ts.map +1 -1
- package/dist/pipeline/outline.js +38 -14
- package/dist/pipeline/outline.js.map +1 -1
- package/dist/pipeline/paragraphContainers.d.ts +13 -4
- package/dist/pipeline/paragraphContainers.d.ts.map +1 -1
- package/dist/pipeline/paragraphContainers.js +4 -3
- package/dist/pipeline/paragraphContainers.js.map +1 -1
- package/dist/pipeline/partPalette.d.ts +49 -3
- package/dist/pipeline/partPalette.d.ts.map +1 -1
- package/dist/pipeline/partPalette.js +414 -46
- package/dist/pipeline/partPalette.js.map +1 -1
- package/dist/pipeline/parts.d.ts +5 -1
- package/dist/pipeline/parts.d.ts.map +1 -1
- package/dist/pipeline/parts.js +16 -0
- package/dist/pipeline/parts.js.map +1 -1
- package/dist/pipeline/placeholders.d.ts +152 -3
- package/dist/pipeline/placeholders.d.ts.map +1 -1
- package/dist/pipeline/placeholders.js +259 -33
- package/dist/pipeline/placeholders.js.map +1 -1
- package/dist/pipeline/placement.d.ts +6 -1
- package/dist/pipeline/placement.d.ts.map +1 -1
- package/dist/pipeline/placement.js +13 -2
- package/dist/pipeline/placement.js.map +1 -1
- package/dist/pipeline/raggedLines.d.ts +5 -0
- package/dist/pipeline/raggedLines.d.ts.map +1 -1
- package/dist/pipeline/raggedLines.js +24 -3
- package/dist/pipeline/raggedLines.js.map +1 -1
- package/dist/pipeline/resourceLayout.d.ts +6 -4
- package/dist/pipeline/resourceLayout.d.ts.map +1 -1
- package/dist/pipeline/resourceLayout.js +137 -36
- package/dist/pipeline/resourceLayout.js.map +1 -1
- package/dist/pipeline/resourceNumbering.d.ts.map +1 -1
- package/dist/pipeline/resourceNumbering.js +5 -15
- package/dist/pipeline/resourceNumbering.js.map +1 -1
- package/dist/pipeline/styles.d.ts +38 -5
- package/dist/pipeline/styles.d.ts.map +1 -1
- package/dist/pipeline/styles.js +99 -46
- package/dist/pipeline/styles.js.map +1 -1
- package/dist/pipeline/toc.d.ts.map +1 -1
- package/dist/pipeline/toc.js +41 -5
- package/dist/pipeline/toc.js.map +1 -1
- package/dist/react/createLayout.d.ts +20 -0
- package/dist/react/createLayout.d.ts.map +1 -0
- package/dist/react/createLayout.js +50 -0
- package/dist/react/createLayout.js.map +1 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +4 -0
- package/dist/react/index.js.map +1 -0
- package/dist/svg/singleInk.d.ts +46 -1
- package/dist/svg/singleInk.d.ts.map +1 -1
- package/dist/svg/singleInk.js +180 -10
- package/dist/svg/singleInk.js.map +1 -1
- package/dist/table/model.d.ts +36 -1
- package/dist/table/model.d.ts.map +1 -1
- package/dist/table/model.js +163 -20
- package/dist/table/model.js.map +1 -1
- package/dist/types.d.ts +979 -68
- package/dist/types.d.ts.map +1 -1
- package/dist/vdt.d.ts +439 -13
- package/dist/vdt.d.ts.map +1 -1
- package/dist/vdt.js +91 -0
- package/dist/vdt.js.map +1 -1
- package/dist/worker/client.d.ts +15 -1
- package/dist/worker/client.d.ts.map +1 -1
- package/dist/worker/client.js +52 -3
- package/dist/worker/client.js.map +1 -1
- package/dist/worker/entryUrl.d.ts +15 -0
- package/dist/worker/entryUrl.d.ts.map +1 -0
- package/dist/worker/entryUrl.js +33 -0
- package/dist/worker/entryUrl.js.map +1 -0
- package/dist/worker/fonts.d.ts +18 -0
- package/dist/worker/fonts.d.ts.map +1 -0
- package/dist/worker/fonts.js +53 -0
- package/dist/worker/fonts.js.map +1 -0
- package/dist/worker/layout.worker.js +41 -6
- package/dist/worker/layout.worker.js.map +1 -1
- package/dist/worker/protocol.d.ts +4 -0
- package/dist/worker/protocol.d.ts.map +1 -1
- package/package.json +12 -5
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { applyPartPalettesToFlow } from './partPalette';
|
|
2
|
-
import { TITLE_BREAK_RE, applyTitleBreaks } from '../parse/inlineFormatting';
|
|
2
|
+
import { TITLE_BREAK_RE, applyTitleBreaks, parseInlineFormatting } from '../parse/inlineFormatting';
|
|
3
3
|
import { createBoundingBox, } from '../vdt';
|
|
4
|
-
import { computeChapterTitles, computeChapterNumbers, computeChapterAttrs, computePartValues } from './placeholders';
|
|
5
|
-
import { parsePartNumber } from './parts';
|
|
4
|
+
import { computeChapterTitles, computeChapterTitlesAtTop, computeChapterNumbers, computeChapterNumbersAtTop, computeChapterNumbersByBlock, computeChapterAttrs, computePageMarks, computePartValues, lineJoin, markSourceOf } from './placeholders';
|
|
5
|
+
import { parsePartNumber, partMarkPages } from './parts';
|
|
6
6
|
import { computePageMetrics } from './buildHelpers';
|
|
7
|
+
import { resolvedLocale } from './config';
|
|
7
8
|
import { classifyPages } from './pageRoles';
|
|
8
|
-
import { computeSectionStyles, createHeadingLevelResolver } from './headingStyles';
|
|
9
|
+
import { computeSectionStyles, createHeadingLevelResolver, headingIsHidden } from './headingStyles';
|
|
9
10
|
import { dimensionToPx } from '../units';
|
|
10
|
-
import {
|
|
11
|
+
import { resolveDesignLineHeight } from '../defaults/headerFooter';
|
|
12
|
+
import { layoutDesignSlot, textVerticalOffset, trailingTracking, } from '../design/layout';
|
|
13
|
+
import { resolveDesignText } from '../design/placeholders';
|
|
14
|
+
import { plainDesignText } from '../design/richText';
|
|
11
15
|
/** Slots live in the page margin area between the body edge and the trim
|
|
12
16
|
* edge. Header slot container: from the trim top down to body top.
|
|
13
17
|
* Footer slot container: from body bottom down to the trim bottom.
|
|
@@ -39,7 +43,9 @@ function footerContainerBbox(contentArea, trimBox) {
|
|
|
39
43
|
};
|
|
40
44
|
}
|
|
41
45
|
function textAlignOffsetX(align, contentWidth, lineWidth) {
|
|
42
|
-
|
|
46
|
+
// A justified line fills its room; the last line of a paragraph is set
|
|
47
|
+
// flush left.
|
|
48
|
+
if (align === 'left' || align === 'justify')
|
|
43
49
|
return 0;
|
|
44
50
|
if (align === 'right')
|
|
45
51
|
return Math.max(0, contentWidth - lineWidth);
|
|
@@ -59,18 +65,25 @@ function imagePrimitiveToBlock(prim) {
|
|
|
59
65
|
kind: 'image',
|
|
60
66
|
bbox: createBoundingBox(prim.x, prim.y, prim.width, prim.height),
|
|
61
67
|
fileId: prim.fileId,
|
|
68
|
+
...(prim.imageKind ? { imageKind: prim.imageKind } : {}),
|
|
69
|
+
...(prim.pdfFileId ? { pdfFileId: prim.pdfFileId } : {}),
|
|
62
70
|
};
|
|
63
71
|
}
|
|
64
72
|
function textPrimitiveToBlock(prim) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
73
|
+
// Lines taller than the box run out on the side the alignment leaves
|
|
74
|
+
// free (EF-138). A drop cap's primitive carries the offset of its text
|
|
75
|
+
// already, and is top-aligned.
|
|
76
|
+
const vOffset = textVerticalOffset(prim.verticalAlign, prim.contentHeight, prim.lines);
|
|
77
|
+
// A centred or right-aligned line is placed by its ink: the tracking
|
|
78
|
+
// after its last glyph does not count (EF-153).
|
|
69
79
|
const lines = prim.lines.map((l) => ({
|
|
70
80
|
text: l.text,
|
|
71
|
-
xOffset: prim.contentX + (l.xOffset ?? 0)
|
|
81
|
+
xOffset: prim.contentX + (l.xOffset ?? 0)
|
|
82
|
+
+ textAlignOffsetX(prim.align, prim.contentWidth - (l.xOffset ?? 0), l.width - trailingTracking(l.text, prim.letterSpacingPx)),
|
|
72
83
|
baselineY: prim.y + prim.contentY + vOffset + l.baselineY,
|
|
73
84
|
width: l.width,
|
|
85
|
+
...(l.runs ? { runs: l.runs.map((r) => ({ ...r })) } : {}),
|
|
86
|
+
...(l.wordSpacingPx !== undefined ? { wordSpacingPx: l.wordSpacingPx } : {}),
|
|
74
87
|
}));
|
|
75
88
|
return {
|
|
76
89
|
kind: 'text',
|
|
@@ -87,9 +100,11 @@ function textPrimitiveToBlock(prim) {
|
|
|
87
100
|
}
|
|
88
101
|
: undefined,
|
|
89
102
|
clip: prim.needsClip,
|
|
90
|
-
|
|
103
|
+
// Negative tracking (a tightened display title) is painted too (EF-82).
|
|
104
|
+
...(prim.letterSpacingPx !== undefined && prim.letterSpacingPx !== 0
|
|
91
105
|
? { letterSpacingPx: prim.letterSpacingPx }
|
|
92
106
|
: {}),
|
|
107
|
+
...(prim.stroke ? { stroke: { ...prim.stroke } } : {}),
|
|
93
108
|
};
|
|
94
109
|
}
|
|
95
110
|
function rulePrimitiveToBlock(prim) {
|
|
@@ -113,6 +128,59 @@ function boxPrimitiveToBlock(prim) {
|
|
|
113
128
|
},
|
|
114
129
|
};
|
|
115
130
|
}
|
|
131
|
+
/** Where a primitive's reservation ends: its foot, except for a drop cap,
|
|
132
|
+
* whose line box runs a quarter of its size under its baseline. The letter
|
|
133
|
+
* sits inside its paragraph's lines, so it reserves nothing below the text
|
|
134
|
+
* (`text`, the primitive before it) — at most down to its own baseline,
|
|
135
|
+
* should the text end above it (EF-108). */
|
|
136
|
+
function reservedBottom(prim, text) {
|
|
137
|
+
const foot = prim.y + prim.height;
|
|
138
|
+
if (prim.kind !== 'text' || !prim.dropCap || !text)
|
|
139
|
+
return foot;
|
|
140
|
+
const baseline = prim.y + (prim.lines[0]?.baselineY ?? prim.height);
|
|
141
|
+
return Math.min(foot, Math.max(text.y + text.height, baseline));
|
|
142
|
+
}
|
|
143
|
+
/** Height of the container a design is measured against: large enough
|
|
144
|
+
* that nothing reaches its foot. */
|
|
145
|
+
const MEASURE_CONTAINER_HEIGHT = 1e6;
|
|
146
|
+
/** The placeholder context a heading design is laid out with during body
|
|
147
|
+
* layout, before the pages exist (a one-page stub). */
|
|
148
|
+
function headingPlaceholders(heading, metadata, pageIndex) {
|
|
149
|
+
const stubPage = { index: pageIndex, pageLabel: '1' };
|
|
150
|
+
return {
|
|
151
|
+
kind: 'heading',
|
|
152
|
+
page: stubPage,
|
|
153
|
+
allPages: [stubPage],
|
|
154
|
+
metadata,
|
|
155
|
+
chapterTitleByPageIndex: [],
|
|
156
|
+
heading,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* The page boxes a heading's design paints, laid out against `container`
|
|
161
|
+
* — the band the placed heading takes, as `buildHeadersAndFooters` lays it
|
|
162
|
+
* out — in absolute page px. Only the elements that reserve room: those
|
|
163
|
+
* with `reserve: false` are decoration the text and the floats may cover.
|
|
164
|
+
* The placement pass keeps the float-only side column clear of them
|
|
165
|
+
* (EF-78): a chapter numeral set in the margin column is no room for a
|
|
166
|
+
* marginal figure.
|
|
167
|
+
*/
|
|
168
|
+
export function headingDesignBoxes(level, heading, container, dpi, metadata, pageIndex, frames, resourceById) {
|
|
169
|
+
if (!level.advancedDesign.enabled || level.advancedDesign.slot.elements.length === 0)
|
|
170
|
+
return [];
|
|
171
|
+
const result = layoutDesignSlot(level.advancedDesign.slot, { container, dpi, placeholders: headingPlaceholders(heading, metadata, pageIndex), frames, resourceById }, pageIndex);
|
|
172
|
+
const excluded = new Set(level.advancedDesign.slot.elements.filter((el) => el.reserve === false).map((el) => el.id));
|
|
173
|
+
const out = [];
|
|
174
|
+
result.primitives.forEach((prim, i) => {
|
|
175
|
+
if (excluded.has(result.elementIds[i]))
|
|
176
|
+
return;
|
|
177
|
+
if (![prim.x, prim.y, prim.width, prim.height].every(Number.isFinite))
|
|
178
|
+
return;
|
|
179
|
+
const bottom = reservedBottom(prim, result.primitives[i - 1]);
|
|
180
|
+
out.push({ x: prim.x, y: prim.y, width: prim.width, height: Math.max(0, bottom - prim.y) });
|
|
181
|
+
});
|
|
182
|
+
return out;
|
|
183
|
+
}
|
|
116
184
|
/** Measure the natural bottom of a heading's advanced-design slot when laid
|
|
117
185
|
* out against a container of the given `width` with unbounded height.
|
|
118
186
|
* Returns 0 if the level has no advanced design or the slot is empty. Used
|
|
@@ -120,7 +188,16 @@ function boxPrimitiveToBlock(prim) {
|
|
|
120
188
|
* subsequent blocks sit below the actual bottom of the design content
|
|
121
189
|
* rather than below the natural text bottom. Applies to both in-column
|
|
122
190
|
* headings (overlay in block bbox) and page-spanning openers (width is the
|
|
123
|
-
* full content area; passed in by the caller).
|
|
191
|
+
* full content area; passed in by the caller).
|
|
192
|
+
*
|
|
193
|
+
* Two kinds of element never count: those flagged `reserve: false`
|
|
194
|
+
* (decoration that may overlap the text), and those whose position or
|
|
195
|
+
* height follows the container's height — anchored to its middle or its
|
|
196
|
+
* foot, `'fill'` tall, or chained to such an element. The container at
|
|
197
|
+
* paint time is the band this height reserves, so they are laid out
|
|
198
|
+
* against the result and cannot set it. They are found by laying the slot
|
|
199
|
+
* out against two container heights and keeping only the primitives that
|
|
200
|
+
* did not move. */
|
|
124
201
|
export function measureHeadingAdvancedDesignHeight(level, heading, width, dpi, metadata, pageIndex,
|
|
125
202
|
/** Page/bleed frames in absolute page px, for `anchor.to: 'page' |
|
|
126
203
|
* 'bleed'` elements. Translated into the stub coordinate system (the
|
|
@@ -130,23 +207,31 @@ export function measureHeadingAdvancedDesignHeight(level, heading, width, dpi, m
|
|
|
130
207
|
frames,
|
|
131
208
|
/** Absolute page position of the heading container's top-left. Defaults
|
|
132
209
|
* to the frames' page origin when omitted. */
|
|
133
|
-
origin
|
|
210
|
+
origin,
|
|
211
|
+
/** Resources by id, for `kind: 'image'` elements — the pictures painted
|
|
212
|
+
* with the design count like its other elements (EF-90). Without it an
|
|
213
|
+
* image element cannot be sized and counts nothing. */
|
|
214
|
+
resourceById) {
|
|
215
|
+
return measureHeadingDesign(level, heading, width, dpi, metadata, pageIndex, frames, origin, resourceById).height;
|
|
216
|
+
}
|
|
217
|
+
/** {@link measureHeadingAdvancedDesignHeight}, with the floor that texts
|
|
218
|
+
* riding on the band set (`textFloor`). A text anchored to the foot or
|
|
219
|
+
* the middle of the band (a title set on the last line of a tall opener)
|
|
220
|
+
* does not set the reserved height, but the band has to be tall enough to
|
|
221
|
+
* hold it: the caller keeps the band it paints at least `textFloor` tall,
|
|
222
|
+
* so such a title never rises above the heading's top into the text over
|
|
223
|
+
* it (EF-176; up to postext 1.4 it did when it was taller than the
|
|
224
|
+
* heading's own lines). Boxes, rules and pictures that ride on the band
|
|
225
|
+
* set no floor: a panel may reach above the heading on purpose. */
|
|
226
|
+
export function measureHeadingDesign(level, heading, width, dpi, metadata, pageIndex, frames, origin, resourceById) {
|
|
134
227
|
if (!level.advancedDesign.enabled)
|
|
135
|
-
return 0;
|
|
228
|
+
return { height: 0, textFloor: 0 };
|
|
136
229
|
const minHeightPx = level.advancedDesign.minHeight
|
|
137
230
|
? dimensionToPx(level.advancedDesign.minHeight, dpi)
|
|
138
231
|
: 0;
|
|
139
232
|
if (level.advancedDesign.slot.elements.length === 0)
|
|
140
|
-
return minHeightPx;
|
|
141
|
-
const
|
|
142
|
-
const placeholders = {
|
|
143
|
-
kind: 'heading',
|
|
144
|
-
page: stubPage,
|
|
145
|
-
allPages: [stubPage],
|
|
146
|
-
metadata,
|
|
147
|
-
chapterTitleByPageIndex: [],
|
|
148
|
-
heading,
|
|
149
|
-
};
|
|
233
|
+
return { height: minHeightPx, textFloor: 0 };
|
|
234
|
+
const placeholders = headingPlaceholders(heading, metadata, pageIndex);
|
|
150
235
|
let stubFrames;
|
|
151
236
|
if (frames) {
|
|
152
237
|
const ox = origin?.x ?? frames.page.x;
|
|
@@ -154,14 +239,45 @@ origin) {
|
|
|
154
239
|
const shift = (f) => ({ x: f.x - ox, y: f.y - oy, width: f.width, height: f.height });
|
|
155
240
|
stubFrames = { page: shift(frames.page), bleed: shift(frames.bleed) };
|
|
156
241
|
}
|
|
157
|
-
const
|
|
242
|
+
const layoutAt = (height) => layoutDesignSlot(level.advancedDesign.slot, { container: { x: 0, y: 0, width, height }, dpi, placeholders, frames: stubFrames, resourceById }, pageIndex);
|
|
243
|
+
const result = layoutAt(MEASURE_CONTAINER_HEIGHT);
|
|
244
|
+
// Only an element reaching far down the container can follow its height
|
|
245
|
+
// (its middle is half a million px down): the second layout is skipped
|
|
246
|
+
// for every other design.
|
|
247
|
+
const taller = result.primitives.some((p) => p.y + p.height > MEASURE_CONTAINER_HEIGHT / 4)
|
|
248
|
+
? layoutAt(2 * MEASURE_CONTAINER_HEIGHT)
|
|
249
|
+
: result;
|
|
250
|
+
const excluded = new Set(level.advancedDesign.slot.elements.filter((el) => el.reserve === false).map((el) => el.id));
|
|
158
251
|
let bottom = 0;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
252
|
+
let textFloor = 0;
|
|
253
|
+
result.primitives.forEach((prim, i) => {
|
|
254
|
+
if (excluded.has(result.elementIds[i]))
|
|
255
|
+
return;
|
|
256
|
+
// A primitive a malformed value left without a finite box reserves
|
|
257
|
+
// nothing: a NaN here would make the caller drop the whole reservation
|
|
258
|
+
// (minHeight included).
|
|
259
|
+
if (!Number.isFinite(prim.y + prim.height))
|
|
260
|
+
return;
|
|
261
|
+
const moved = taller.primitives[i];
|
|
262
|
+
if (!moved)
|
|
263
|
+
return;
|
|
264
|
+
const stretched = Math.abs(moved.height - prim.height) > 0.5;
|
|
265
|
+
if (Math.abs(moved.y - prim.y) > 0.5 || stretched) {
|
|
266
|
+
// A text riding on the band: its top moves `rate` px for each px of
|
|
267
|
+
// band, so the band that brings it up to the heading's top (y = 0)
|
|
268
|
+
// is the least it needs.
|
|
269
|
+
if (prim.kind === 'text' && !stretched) {
|
|
270
|
+
const rate = (moved.y - prim.y) / MEASURE_CONTAINER_HEIGHT;
|
|
271
|
+
if (rate > 0)
|
|
272
|
+
textFloor = Math.max(textFloor, MEASURE_CONTAINER_HEIGHT - prim.y / rate);
|
|
273
|
+
}
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
bottom = Math.max(bottom, reservedBottom(prim, result.primitives[i - 1]));
|
|
277
|
+
});
|
|
278
|
+
return { height: Math.max(bottom, minHeightPx), textFloor };
|
|
163
279
|
}
|
|
164
|
-
const HEADING_LINE_PLACEHOLDER = /\{(number|numberDecimal|numberRoman|numberRomanLower|numberAlpha|numberAlphaLower|chapterNumber|chapterTitle)\}/;
|
|
280
|
+
const HEADING_LINE_PLACEHOLDER = /\{(number|numberDecimal|numberRoman|numberRomanLower|numberAlpha|numberAlphaLower|numberWords|numberWordsLower|numberOrdinalWords|numberOrdinalWordsLower|chapterNumber|chapterTitle)\}/;
|
|
165
281
|
const METADATA_ELEMENT = /^\s*\{(title|subtitle|author|publishDate)\}\s*$/;
|
|
166
282
|
/** The source a text element maps back to, from what its content renders:
|
|
167
283
|
* the heading title for `{titleText}`, an attribute value for a bare
|
|
@@ -204,8 +320,15 @@ export function layoutSlotToVdt(slot, container, pageIndex, placeholders, dpi, e
|
|
|
204
320
|
if (el.kind !== 'text')
|
|
205
321
|
continue;
|
|
206
322
|
const src = sourceForElement(el.content, extras);
|
|
207
|
-
if (src)
|
|
208
|
-
|
|
323
|
+
if (!src)
|
|
324
|
+
continue;
|
|
325
|
+
// Inline marks drop their markers from the printed text. The
|
|
326
|
+
// per-character map holds while the mapped value is still printed as
|
|
327
|
+
// written (no markers or escapes of its own); otherwise only the range
|
|
328
|
+
// maps back.
|
|
329
|
+
const keepMap = !el.inlineMarks || src.text === undefined
|
|
330
|
+
|| plainDesignText(resolveDesignText(el.content, placeholders)).includes(src.text);
|
|
331
|
+
sourceByElement.set(el.id, keepMap ? src : { start: src.start, end: src.end });
|
|
209
332
|
}
|
|
210
333
|
}
|
|
211
334
|
const blocks = result.primitives.map((prim) => {
|
|
@@ -284,22 +407,209 @@ function findOpenerHeading(page, levels) {
|
|
|
284
407
|
continue;
|
|
285
408
|
if (lvl.span !== 'page')
|
|
286
409
|
continue;
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
410
|
+
// A structural heading prints nothing, not even an opener.
|
|
411
|
+
if (headingIsHidden(block, lvl))
|
|
412
|
+
continue;
|
|
290
413
|
const pref = block.numberPrefix ?? '';
|
|
291
|
-
const title =
|
|
292
|
-
return { block, level: block.headingLevel,
|
|
414
|
+
const title = defaultOpenerTitle(block.lines, pref, block.titleBreaks, block.titleLength ?? -1);
|
|
415
|
+
return { block, level: block.headingLevel, title, numberPrefix: pref };
|
|
293
416
|
}
|
|
294
417
|
}
|
|
295
418
|
return undefined;
|
|
296
419
|
}
|
|
420
|
+
/** `{titleText}` of a heading, from the lines it was laid out in: the
|
|
421
|
+
* plain title of {@link defaultOpenerTitle}. */
|
|
422
|
+
export function headingTitleText(lines, numberPrefix, titleBreaks, titleLength) {
|
|
423
|
+
return defaultOpenerTitle(lines, numberPrefix, titleBreaks, titleLength).titleText;
|
|
424
|
+
}
|
|
425
|
+
const PLAIN_RUN = { bold: false, italic: false };
|
|
426
|
+
/** The marker characters a backslash escapes (see `protectEscapes`). */
|
|
427
|
+
const TITLE_ESCAPE_RE = /[*_^~`]/g;
|
|
428
|
+
const escapeTitleRun = (text) => text.replace(TITLE_ESCAPE_RE, (c) => `\\${c}`);
|
|
429
|
+
const sameEmphasis = (a, b) => a.bold === b.bold && a.italic === b.italic;
|
|
430
|
+
/** The title a page-span heading's default opener prints, from the lines the
|
|
431
|
+
* heading was measured into (see {@link DefaultOpenerTitle}). The same
|
|
432
|
+
* reading serves the band's measure (`build.ts`) and its paint, so the
|
|
433
|
+
* two lay out one text. */
|
|
434
|
+
export function defaultOpenerTitle(lines, numberPrefix, titleBreaks, titleLength) {
|
|
435
|
+
const chars = [];
|
|
436
|
+
const flags = [];
|
|
437
|
+
/** Where a line break was read back as a space or a no-break space. */
|
|
438
|
+
const separators = new Set();
|
|
439
|
+
let hasMarks = false;
|
|
440
|
+
lines.forEach((ln, i) => {
|
|
441
|
+
const start = chars.length;
|
|
442
|
+
// The hyphen repeated from the line before (`repeatHyphen`) is not part
|
|
443
|
+
// of the title: "bem-" | "-aventurados" reads "bem-aventurados".
|
|
444
|
+
let skipRepeated = ln.repeatedHyphen === true;
|
|
445
|
+
for (const s of ln.segments ?? []) {
|
|
446
|
+
let from = 0;
|
|
447
|
+
if (skipRepeated && s.text.length > 0) {
|
|
448
|
+
if (s.text.startsWith('-'))
|
|
449
|
+
from = 1;
|
|
450
|
+
skipRepeated = false;
|
|
451
|
+
}
|
|
452
|
+
const f = s.bold || s.italic || s.script
|
|
453
|
+
? { bold: !!s.bold, italic: !!s.italic, ...(s.script ? { script: s.script } : {}) }
|
|
454
|
+
: PLAIN_RUN;
|
|
455
|
+
if (f !== PLAIN_RUN)
|
|
456
|
+
hasMarks = true;
|
|
457
|
+
for (let k = from; k < s.text.length; k++) {
|
|
458
|
+
chars.push(s.text[k]);
|
|
459
|
+
flags.push(f);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
// Read the lines back as the text they were broken from (EF-162): the
|
|
463
|
+
// space a break took comes back, a word the break divided is whole
|
|
464
|
+
// again (its added hyphen goes), and a hard hyphen at a line end keeps
|
|
465
|
+
// its word ("Word-" | "Book" is "Word-Book"), and a group glued by a
|
|
466
|
+
// no-break space that the line parted gets its no-break space back.
|
|
467
|
+
// Up to postext 1.4 every line break became a space.
|
|
468
|
+
const next = lines[i + 1];
|
|
469
|
+
let end = chars.length;
|
|
470
|
+
if (next !== undefined)
|
|
471
|
+
while (end > start && (chars[end - 1] === ' ' || chars[end - 1] === '\t'))
|
|
472
|
+
end--;
|
|
473
|
+
const { drop, separator } = lineJoin(chars.slice(start, end).join(''), ln, next, end < chars.length);
|
|
474
|
+
chars.length = end - drop;
|
|
475
|
+
flags.length = end - drop;
|
|
476
|
+
if (separator) {
|
|
477
|
+
separators.add(chars.length);
|
|
478
|
+
chars.push(separator);
|
|
479
|
+
flags.push(PLAIN_RUN);
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
// The space two lines were broken at takes the emphasis of the words on
|
|
483
|
+
// both sides of it, when they share one.
|
|
484
|
+
for (let i = 1; i < chars.length - 1; i++) {
|
|
485
|
+
if (flags[i] === PLAIN_RUN && (chars[i] === ' ' || separators.has(i)) && sameEmphasis(flags[i - 1], flags[i + 1])) {
|
|
486
|
+
const f = flags[i - 1];
|
|
487
|
+
if (f.bold || f.italic)
|
|
488
|
+
flags[i] = { bold: f.bold, italic: f.italic };
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
const full = chars.join('');
|
|
492
|
+
const drop = numberPrefix && full.startsWith(`${numberPrefix} `) ? numberPrefix.length + 1 : 0;
|
|
493
|
+
const title = full.slice(drop);
|
|
494
|
+
const titleText = applyTitleBreaks(title, titleBreaks, titleLength);
|
|
495
|
+
if (!hasMarks)
|
|
496
|
+
return { titleText };
|
|
497
|
+
let tChars = chars.slice(drop);
|
|
498
|
+
let tFlags = flags.slice(drop);
|
|
499
|
+
// The forced breaks, as `applyTitleBreaks` sets them: a newline at each
|
|
500
|
+
// recorded index, the spaces and tabs around it dropped.
|
|
501
|
+
if (titleBreaks && titleBreaks.length > 0 && title.length === titleLength) {
|
|
502
|
+
for (const i of titleBreaks)
|
|
503
|
+
if (i < tChars.length)
|
|
504
|
+
tChars[i] = '\n';
|
|
505
|
+
const keep = tChars.map((c, i) => {
|
|
506
|
+
if (c !== ' ' && c !== '\t')
|
|
507
|
+
return true;
|
|
508
|
+
let a = i - 1;
|
|
509
|
+
while (a >= 0 && (tChars[a] === ' ' || tChars[a] === '\t'))
|
|
510
|
+
a--;
|
|
511
|
+
let b = i + 1;
|
|
512
|
+
while (b < tChars.length && (tChars[b] === ' ' || tChars[b] === '\t'))
|
|
513
|
+
b++;
|
|
514
|
+
return tChars[a] !== '\n' && tChars[b] !== '\n';
|
|
515
|
+
});
|
|
516
|
+
tFlags = tFlags.filter((_, i) => keep[i]);
|
|
517
|
+
tChars = tChars.filter((_, i) => keep[i]);
|
|
518
|
+
}
|
|
519
|
+
if (tChars.join('') !== titleText)
|
|
520
|
+
return { titleText };
|
|
521
|
+
const scripted = (a, b) => {
|
|
522
|
+
let out = '';
|
|
523
|
+
let i = a;
|
|
524
|
+
while (i < b) {
|
|
525
|
+
const script = tFlags[i].script;
|
|
526
|
+
let j = i + 1;
|
|
527
|
+
while (j < b && tFlags[j].script === script)
|
|
528
|
+
j++;
|
|
529
|
+
const text = escapeTitleRun(tChars.slice(i, j).join(''));
|
|
530
|
+
out += script === 'sup' ? `^${text}^` : script === 'sub' ? `~${text}~` : text;
|
|
531
|
+
i = j;
|
|
532
|
+
}
|
|
533
|
+
return out;
|
|
534
|
+
};
|
|
535
|
+
let marked = '';
|
|
536
|
+
let i = 0;
|
|
537
|
+
while (i < tChars.length) {
|
|
538
|
+
if (tChars[i] === '\n') {
|
|
539
|
+
marked += '\n';
|
|
540
|
+
i++;
|
|
541
|
+
continue;
|
|
542
|
+
}
|
|
543
|
+
// A run of one emphasis, within one line; its edge spaces stay outside
|
|
544
|
+
// the markers, as Markdown needs them.
|
|
545
|
+
let j = i + 1;
|
|
546
|
+
while (j < tChars.length && tChars[j] !== '\n' && sameEmphasis(tFlags[j], tFlags[i]))
|
|
547
|
+
j++;
|
|
548
|
+
const { bold, italic } = tFlags[i];
|
|
549
|
+
let a = i;
|
|
550
|
+
let b = j;
|
|
551
|
+
if (bold || italic) {
|
|
552
|
+
while (a < b && /\s/.test(tChars[a]))
|
|
553
|
+
a++;
|
|
554
|
+
while (b > a && /\s/.test(tChars[b - 1]))
|
|
555
|
+
b--;
|
|
556
|
+
}
|
|
557
|
+
if (a < b && (bold || italic)) {
|
|
558
|
+
const marker = bold && italic ? '***' : bold ? '**' : '*';
|
|
559
|
+
marked += scripted(i, a) + marker + scripted(a, b) + marker + scripted(b, j);
|
|
560
|
+
}
|
|
561
|
+
else {
|
|
562
|
+
marked += scripted(i, j);
|
|
563
|
+
}
|
|
564
|
+
i = j;
|
|
565
|
+
}
|
|
566
|
+
// Kept only when it reads back as the same text with the same runs.
|
|
567
|
+
const spans = parseInlineFormatting(marked);
|
|
568
|
+
if (spans.map((s) => s.text).join('') !== titleText)
|
|
569
|
+
return { titleText };
|
|
570
|
+
let at = 0;
|
|
571
|
+
for (const s of spans) {
|
|
572
|
+
if (s.smallCaps || s.links || s.math)
|
|
573
|
+
return { titleText };
|
|
574
|
+
for (let k = 0; k < s.text.length; k++, at++) {
|
|
575
|
+
if (/\s/.test(s.text[k]))
|
|
576
|
+
continue;
|
|
577
|
+
const f = tFlags[at];
|
|
578
|
+
if (f.bold !== !!s.bold || f.italic !== !!s.italic || f.script !== s.script)
|
|
579
|
+
return { titleText };
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
return { titleText, marked };
|
|
583
|
+
}
|
|
584
|
+
/** The height of the title a page-span heading's default opener paints
|
|
585
|
+
* across `width`, with the opener's own painter (a greedy wrap at natural
|
|
586
|
+
* widths, a justified heading set flush left). The band reserved for the
|
|
587
|
+
* heading is at least this tall, so it holds every line the opener paints
|
|
588
|
+
* even where the heading's own measure fits more on a line: a justified
|
|
589
|
+
* line whose spaces shrink, a forced break, a run the opener sets plain
|
|
590
|
+
* (EF-100). */
|
|
591
|
+
export function measureDefaultOpenerHeight(level, textAlign, title, numberPrefix, width, dpi, metadata, pageIndex) {
|
|
592
|
+
const slot = synthesiseDefaultOpenerSlot(level, numberPrefix.length > 0, textAlign, title.marked !== undefined);
|
|
593
|
+
const placeholders = headingPlaceholders({ titleText: title.marked ?? title.titleText, formattedNumber: numberPrefix }, metadata, pageIndex);
|
|
594
|
+
const result = layoutDesignSlot(slot, { container: { x: 0, y: 0, width, height: MEASURE_CONTAINER_HEIGHT }, dpi, placeholders }, pageIndex);
|
|
595
|
+
let bottom = 0;
|
|
596
|
+
for (const prim of result.primitives) {
|
|
597
|
+
if (prim.kind !== 'text')
|
|
598
|
+
continue;
|
|
599
|
+
for (const ln of prim.lines)
|
|
600
|
+
bottom = Math.max(bottom, ln.topY + ln.height);
|
|
601
|
+
}
|
|
602
|
+
return bottom;
|
|
603
|
+
}
|
|
297
604
|
/** Build a synthesised default design slot for a `span: 'page'` heading when
|
|
298
605
|
* the user has not configured an `advancedDesign.slot`. Renders as a single
|
|
299
606
|
* text element, anchored to fill the full-page-width container, using the
|
|
300
|
-
* heading level's resolved typography
|
|
301
|
-
*
|
|
302
|
-
|
|
607
|
+
* heading level's resolved typography and `headings.textAlign` (justified
|
|
608
|
+
* sets flush left, like the last line of a justified heading). Emits
|
|
609
|
+
* `{number} {titleText}` when the heading carries a numberPrefix, otherwise
|
|
610
|
+
* `{titleText}`. With `marked`, `{titleText}` holds the title as inline
|
|
611
|
+
* Markdown (see {@link DefaultOpenerTitle}) and the element reads it so. */
|
|
612
|
+
function synthesiseDefaultOpenerSlot(level, hasNumberPrefix, textAlign, marked = false) {
|
|
303
613
|
// `{number}` is the heading placeholder for the formatted number;
|
|
304
614
|
// `{formattedNumber}` is not one, and left the title with a leading space.
|
|
305
615
|
const content = hasNumberPrefix ? '{number} {titleText}' : '{titleText}';
|
|
@@ -319,11 +629,17 @@ function synthesiseDefaultOpenerSlot(level, hasNumberPrefix) {
|
|
|
319
629
|
fontWeight: level.fontWeight,
|
|
320
630
|
italic: level.italic,
|
|
321
631
|
color: level.color,
|
|
322
|
-
align: 'left',
|
|
632
|
+
align: textAlign === 'center' || textAlign === 'right' ? textAlign : 'left',
|
|
323
633
|
verticalAlign: 'middle',
|
|
324
|
-
|
|
634
|
+
// The level's own leading, as the band that holds the title was
|
|
635
|
+
// measured with it (EF-100).
|
|
636
|
+
...resolveDesignLineHeight(level.lineHeight, level.fontSize),
|
|
325
637
|
overflow: 'wrap',
|
|
326
638
|
hyphenate: true,
|
|
639
|
+
// The level's tracking, as its in-column text is measured (EF-83).
|
|
640
|
+
...(level.letterSpacing && level.letterSpacing.value !== 0 ? { letterSpacing: level.letterSpacing } : {}),
|
|
641
|
+
// The heading's bold, italic and script runs (EF-122).
|
|
642
|
+
...(marked ? { inlineMarks: true } : {}),
|
|
327
643
|
};
|
|
328
644
|
return { elements: [textEl] };
|
|
329
645
|
}
|
|
@@ -394,19 +710,15 @@ function pagesWithPartMarks(doc) {
|
|
|
394
710
|
if (!doc.partMarks || doc.partMarks.length === 0)
|
|
395
711
|
return doc.pages;
|
|
396
712
|
const marked = new Map();
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
if (b.contentIndex !== undefined && b.contentIndex > mark.afterContentIndex && b.pageIndex !== undefined) {
|
|
401
|
-
page = page === undefined ? b.pageIndex : Math.min(page, b.pageIndex);
|
|
402
|
-
}
|
|
403
|
-
}
|
|
713
|
+
const pages = partMarkPages(doc);
|
|
714
|
+
doc.partMarks.forEach((mark, i) => {
|
|
715
|
+
const page = pages[i];
|
|
404
716
|
if (page !== undefined)
|
|
405
717
|
marked.set(page, { number: mark.number, title: mark.title, ...(mark.palette ? { palette: mark.palette } : {}) });
|
|
406
|
-
}
|
|
718
|
+
});
|
|
407
719
|
return doc.pages.map((p, i) => (marked.has(i) && !p.partInfo ? { ...p, partInfo: marked.get(i) } : p));
|
|
408
720
|
}
|
|
409
|
-
export function buildHeadersAndFooters(doc, resourceById) {
|
|
721
|
+
export function buildHeadersAndFooters(doc, resourceById, inputs = {}) {
|
|
410
722
|
const resolved = doc.config;
|
|
411
723
|
const dpi = resolved.page.dpi;
|
|
412
724
|
const metrics = computePageMetrics(resolved);
|
|
@@ -414,13 +726,44 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
414
726
|
// Page roles drive the per-element `pages` filter of every slot below.
|
|
415
727
|
classifyPages(doc, resolved);
|
|
416
728
|
const chapterTitleByPageIndex = computeChapterTitles(doc.blocks, doc.pages.length, doc.pages);
|
|
417
|
-
|
|
729
|
+
// A heading style with an empty `numberingTemplate` prints no number, not
|
|
730
|
+
// even the chapter ordinal `{chapterNumber}` falls back to.
|
|
731
|
+
const numberlessStyles = new Set(resolved.headingStyles.filter((s) => s.numberingTemplate === '').map((s) => s.id));
|
|
732
|
+
const numberless = numberlessStyles.size > 0
|
|
733
|
+
? (b) => b.headingStyleId !== undefined && numberlessStyles.has(b.headingStyleId)
|
|
734
|
+
: undefined;
|
|
735
|
+
const chapterNumberByPageIndex = computeChapterNumbers(doc.blocks, doc.pages.length, doc.pages, doc.chapterOrdinalOffset ?? 0, numberless);
|
|
736
|
+
// The chapter in force at the top of each page (`{chapterTitleAtTop}`,
|
|
737
|
+
// `{chapterNumberAtTop}`): the one a page runs on from, even where a new
|
|
738
|
+
// chapter starts lower down (EF-187).
|
|
739
|
+
const chapterTitleAtTopByPageIndex = computeChapterTitlesAtTop(doc.blocks, doc.pages.length, doc.pages);
|
|
740
|
+
const chapterNumberAtTopByPageIndex = computeChapterNumbersAtTop(doc.blocks, doc.pages.length, doc.pages, doc.chapterOrdinalOffset ?? 0, numberless);
|
|
741
|
+
// A heading design (opener, in-column overlay, contents part row) prints
|
|
742
|
+
// the chapter its block belongs to, not the page's: where two chapters
|
|
743
|
+
// meet on a page, the page value is the later one's. Its height was
|
|
744
|
+
// measured with this value too (`build.ts`).
|
|
745
|
+
const chapterNumberByBlock = computeChapterNumbersByBlock(doc.blocks, doc.chapterOrdinalOffset ?? 0, numberless);
|
|
746
|
+
const chapterNumberOf = (block, pageIndex) => chapterNumberByBlock.get(block) ?? chapterNumberByPageIndex[pageIndex] ?? '';
|
|
418
747
|
// Parity (odd/even elements) counts the pages before a continued document.
|
|
419
748
|
const pageIndexOffset = doc.pageIndexOffset ?? 0;
|
|
420
749
|
const chapterAttrsByPageIndex = computeChapterAttrs(doc.blocks, doc.pages.length, doc.pages);
|
|
750
|
+
// `{bookTotalPages}`: the host's count of the whole book, else the pages
|
|
751
|
+
// up to the end of this document.
|
|
752
|
+
const bookTotalPages = doc.bookPageCount ?? pageIndexOffset + doc.pages.length;
|
|
753
|
+
// Running marks, computed per key the first time a template names it.
|
|
754
|
+
const marksByKey = new Map();
|
|
755
|
+
const marksFor = (key) => {
|
|
756
|
+
let marks = marksByKey.get(key);
|
|
757
|
+
if (!marks) {
|
|
758
|
+
marks = computePageMarks(doc.blocks, doc.pages.length, markSourceOf(key), inputs.paragraphMark);
|
|
759
|
+
marksByKey.set(key, marks);
|
|
760
|
+
}
|
|
761
|
+
return marks;
|
|
762
|
+
};
|
|
421
763
|
const partValues = computePartValues(pagesWithPartMarks(doc), doc.partStart);
|
|
422
764
|
const { partTitleByPageIndex, partNumberByPageIndex } = partValues;
|
|
423
765
|
const headingLevels = createHeadingLevelResolver(resolved);
|
|
766
|
+
const locale = resolvedLocale(resolved);
|
|
424
767
|
// Styled sections (`{style="…"}` headings): their running heads replace
|
|
425
768
|
// the document's on their pages, and their palette overrides stack on the
|
|
426
769
|
// part's.
|
|
@@ -430,7 +773,7 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
430
773
|
return section && Object.keys(section.palette).length > 0 ? { ...palette, ...section.palette } : palette;
|
|
431
774
|
});
|
|
432
775
|
// The same overrides recolour the palette-linked colours of the flow.
|
|
433
|
-
applyPartPalettesToFlow(doc, partPaletteByPageIndex, resolved.colorPalette);
|
|
776
|
+
applyPartPalettesToFlow(doc, partPaletteByPageIndex, resolved.colorPalette, inputs.flowColorValues);
|
|
434
777
|
for (const page of doc.pages) {
|
|
435
778
|
// Per-page content area: mirrored margins swap inner/outer on even pages.
|
|
436
779
|
const contentArea = page.contentArea;
|
|
@@ -448,8 +791,12 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
448
791
|
allPages: doc.pages,
|
|
449
792
|
metadata: doc.metadata,
|
|
450
793
|
chapterTitleByPageIndex,
|
|
794
|
+
chapterTitleAtTopByPageIndex,
|
|
795
|
+
chapterNumberAtTopByPageIndex,
|
|
451
796
|
chapterNumberByPageIndex,
|
|
452
797
|
chapterAttrsByPageIndex,
|
|
798
|
+
bookTotalPages,
|
|
799
|
+
marksFor,
|
|
453
800
|
partTitleByPageIndex,
|
|
454
801
|
partNumberByPageIndex,
|
|
455
802
|
partPaletteByPageIndex,
|
|
@@ -457,13 +804,16 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
457
804
|
page.header = layoutSlotToVdt(headerSlot, headerContainerBbox(contentArea, metrics.trimBox), page.index + pageIndexOffset, placeholders, dpi, extras);
|
|
458
805
|
}
|
|
459
806
|
// Back of a part divider: a blank page right after a part page takes the
|
|
460
|
-
// part's verso design (the model book tints the whole leaf).
|
|
461
|
-
|
|
807
|
+
// part's verso design (the model book tints the whole leaf). The part
|
|
808
|
+
// page may close the preceding chapter (`doc.afterPartPage`).
|
|
809
|
+
const prevPart = page.index > 0
|
|
810
|
+
? doc.pages[page.index - 1].partInfo
|
|
811
|
+
: doc.afterPartPage ? doc.partStart : undefined;
|
|
462
812
|
if (!page.partInfo
|
|
463
|
-
&&
|
|
813
|
+
&& prevPart
|
|
464
814
|
&& resolved.parts.versoDesign.elements.length > 0
|
|
465
815
|
&& page.columns.every((c) => c.blocks.length === 0)) {
|
|
466
|
-
const { number, title } =
|
|
816
|
+
const { number, title } = prevPart;
|
|
467
817
|
const placeholders = {
|
|
468
818
|
kind: 'part',
|
|
469
819
|
page,
|
|
@@ -472,6 +822,8 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
472
822
|
chapterTitleByPageIndex,
|
|
473
823
|
chapterNumberByPageIndex,
|
|
474
824
|
chapterAttrsByPageIndex,
|
|
825
|
+
bookTotalPages,
|
|
826
|
+
marksFor,
|
|
475
827
|
partTitleByPageIndex,
|
|
476
828
|
partNumberByPageIndex,
|
|
477
829
|
partPaletteByPageIndex,
|
|
@@ -479,6 +831,7 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
479
831
|
titleText: title.replace(TITLE_BREAK_RE, '\n'),
|
|
480
832
|
formattedNumber: number,
|
|
481
833
|
numericValue: parsePartNumber(number),
|
|
834
|
+
locale,
|
|
482
835
|
chapterNumber: chapterNumberByPageIndex[page.index] ?? '',
|
|
483
836
|
},
|
|
484
837
|
};
|
|
@@ -499,6 +852,8 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
499
852
|
chapterTitleByPageIndex,
|
|
500
853
|
chapterNumberByPageIndex,
|
|
501
854
|
chapterAttrsByPageIndex,
|
|
855
|
+
bookTotalPages,
|
|
856
|
+
marksFor,
|
|
502
857
|
partTitleByPageIndex,
|
|
503
858
|
partNumberByPageIndex,
|
|
504
859
|
partPaletteByPageIndex,
|
|
@@ -506,6 +861,7 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
506
861
|
titleText: title.replace(TITLE_BREAK_RE, '\n'),
|
|
507
862
|
formattedNumber: number,
|
|
508
863
|
numericValue: parsePartNumber(number),
|
|
864
|
+
locale,
|
|
509
865
|
chapterNumber: chapterNumberByPageIndex[page.index] ?? '',
|
|
510
866
|
},
|
|
511
867
|
};
|
|
@@ -522,9 +878,13 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
522
878
|
if (opener) {
|
|
523
879
|
const level = headingLevels.forLevel(opener.level, opener.block.headingStyleId);
|
|
524
880
|
if (level) {
|
|
525
|
-
const
|
|
881
|
+
const designed = level.advancedDesign.enabled && level.advancedDesign.slot.elements.length > 0;
|
|
882
|
+
// The default opener prints the heading's runs (`marked`); a design's
|
|
883
|
+
// `{titleText}` is the plain title.
|
|
884
|
+
const marked = designed ? undefined : opener.title.marked;
|
|
885
|
+
const slot = designed
|
|
526
886
|
? level.advancedDesign.slot
|
|
527
|
-
: synthesiseDefaultOpenerSlot(level, opener.numberPrefix.length > 0);
|
|
887
|
+
: synthesiseDefaultOpenerSlot(level, opener.numberPrefix.length > 0, resolved.headings.textAlign, marked !== undefined);
|
|
528
888
|
const placeholders = {
|
|
529
889
|
kind: 'heading',
|
|
530
890
|
page,
|
|
@@ -533,19 +893,23 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
533
893
|
chapterTitleByPageIndex,
|
|
534
894
|
chapterNumberByPageIndex,
|
|
535
895
|
chapterAttrsByPageIndex,
|
|
896
|
+
bookTotalPages,
|
|
897
|
+
marksFor,
|
|
536
898
|
partTitleByPageIndex,
|
|
537
899
|
partNumberByPageIndex,
|
|
538
900
|
partPaletteByPageIndex,
|
|
539
901
|
heading: {
|
|
540
|
-
titleText: opener.titleText,
|
|
902
|
+
titleText: marked ?? opener.title.titleText,
|
|
541
903
|
formattedNumber: opener.numberPrefix,
|
|
542
|
-
|
|
904
|
+
numericValue: opener.block.headingNumber,
|
|
905
|
+
locale,
|
|
906
|
+
chapterNumber: chapterNumberOf(opener.block, page.index),
|
|
543
907
|
attrs: opener.block.attrs,
|
|
544
908
|
},
|
|
545
909
|
};
|
|
546
910
|
page.openerBand = layoutSlotToVdt(slot, openerContainerBbox(opener.block, contentArea), page.index + pageIndexOffset, placeholders, dpi, {
|
|
547
911
|
...extras,
|
|
548
|
-
titleSource: headingTitleSource(opener.block, opener.titleText),
|
|
912
|
+
titleSource: headingTitleSource(opener.block, opener.title.titleText),
|
|
549
913
|
attrSources: opener.block.attrSources,
|
|
550
914
|
attrs: opener.block.attrs,
|
|
551
915
|
headingSource: headingLineSource(opener.block),
|
|
@@ -581,6 +945,8 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
581
945
|
chapterTitleByPageIndex,
|
|
582
946
|
chapterNumberByPageIndex,
|
|
583
947
|
chapterAttrsByPageIndex,
|
|
948
|
+
bookTotalPages,
|
|
949
|
+
marksFor,
|
|
584
950
|
partTitleByPageIndex,
|
|
585
951
|
partNumberByPageIndex,
|
|
586
952
|
partPaletteByPageIndex: doc.pages.map((_, i) => (i === page.index ? palette : partPaletteByPageIndex[i] ?? {})),
|
|
@@ -588,7 +954,8 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
588
954
|
titleText: tp.title,
|
|
589
955
|
formattedNumber: tp.number,
|
|
590
956
|
numericValue: parsePartNumber(tp.number),
|
|
591
|
-
|
|
957
|
+
locale,
|
|
958
|
+
chapterNumber: chapterNumberOf(block, page.index),
|
|
592
959
|
},
|
|
593
960
|
};
|
|
594
961
|
const overlay = layoutSlotToVdt(slot, { x: block.bbox.x, y: block.bbox.y, width: block.bbox.width, height: block.bbox.height }, page.index + pageIndexOffset, placeholders, dpi, extras);
|
|
@@ -607,11 +974,11 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
607
974
|
continue;
|
|
608
975
|
if (lvl.advancedDesign.slot.elements.length === 0)
|
|
609
976
|
continue;
|
|
610
|
-
const full = block.lines
|
|
611
|
-
.map((ln) => (ln.segments ?? []).map((s) => s.text).join(''))
|
|
612
|
-
.join(' ');
|
|
613
977
|
const pref = block.numberPrefix ?? '';
|
|
614
|
-
|
|
978
|
+
// The lines joined back into the title (EF-162), with a forced break
|
|
979
|
+
// (`\\`) as a newline, as the block's height was measured
|
|
980
|
+
// (`build.ts`) and as an opener prints it (EF-152).
|
|
981
|
+
const title = headingTitleText(block.lines, pref, block.titleBreaks, block.titleLength ?? -1);
|
|
615
982
|
const placeholders = {
|
|
616
983
|
kind: 'heading',
|
|
617
984
|
page,
|
|
@@ -620,13 +987,17 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
620
987
|
chapterTitleByPageIndex,
|
|
621
988
|
chapterNumberByPageIndex,
|
|
622
989
|
chapterAttrsByPageIndex,
|
|
990
|
+
bookTotalPages,
|
|
991
|
+
marksFor,
|
|
623
992
|
partTitleByPageIndex,
|
|
624
993
|
partNumberByPageIndex,
|
|
625
994
|
partPaletteByPageIndex,
|
|
626
995
|
heading: {
|
|
627
996
|
titleText: title,
|
|
628
997
|
formattedNumber: pref,
|
|
629
|
-
|
|
998
|
+
numericValue: block.headingNumber,
|
|
999
|
+
locale,
|
|
1000
|
+
chapterNumber: chapterNumberOf(block, page.index),
|
|
630
1001
|
attrs: block.attrs,
|
|
631
1002
|
},
|
|
632
1003
|
};
|
|
@@ -648,8 +1019,12 @@ export function buildHeadersAndFooters(doc, resourceById) {
|
|
|
648
1019
|
allPages: doc.pages,
|
|
649
1020
|
metadata: doc.metadata,
|
|
650
1021
|
chapterTitleByPageIndex,
|
|
1022
|
+
chapterTitleAtTopByPageIndex,
|
|
1023
|
+
chapterNumberAtTopByPageIndex,
|
|
651
1024
|
chapterNumberByPageIndex,
|
|
652
1025
|
chapterAttrsByPageIndex,
|
|
1026
|
+
bookTotalPages,
|
|
1027
|
+
marksFor,
|
|
653
1028
|
partTitleByPageIndex,
|
|
654
1029
|
partNumberByPageIndex,
|
|
655
1030
|
partPaletteByPageIndex,
|