postext 1.4.2 → 1.5.1
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 +405 -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 +226 -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 +18 -3
- 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 +363 -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
package/dist/html-backend.js
CHANGED
|
@@ -1,4 +1,65 @@
|
|
|
1
|
-
import { tableFrameOutline } from './vdt';
|
|
1
|
+
import { tableCellFillRects, tableFrameOutline } from './vdt';
|
|
2
|
+
import { dimensionToPx } from './units';
|
|
3
|
+
import { documentInkHex, isSingleInkSvgUrl, singleInkColorMatrix } from './svg/singleInk';
|
|
4
|
+
import { lineTrailingTracking } from './lineInk';
|
|
5
|
+
/**
|
|
6
|
+
* The resources this document anchors in its HTML (`id="pt-res-<id>"`):
|
|
7
|
+
* those whose embed (a first slice, for a split table) is on one of its
|
|
8
|
+
* pages. A host that renders a book's chapters one by one onto a single page
|
|
9
|
+
* passes the union over the chapters as `RenderHtmlOptions.refTargets`:
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* const docs = buildBundle(bundle);
|
|
13
|
+
* const refTargets = new Set(docs.flatMap((d) => [...anchoredResourceIds(d)]));
|
|
14
|
+
* const html = docs.map((d) => renderToHtml(d, { refTargets })).join('');
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export function anchoredResourceIds(doc) {
|
|
18
|
+
const ids = new Set();
|
|
19
|
+
for (const page of doc.pages) {
|
|
20
|
+
for (const block of [...page.columns.flatMap((c) => c.blocks), ...(page.floats ?? [])]) {
|
|
21
|
+
const rb = block.resourceBlock;
|
|
22
|
+
if (rb?.resource.id && !rb.slice?.continued)
|
|
23
|
+
ids.add(rb.resource.id);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return ids;
|
|
27
|
+
}
|
|
28
|
+
/** Whether a `:ref` segment links anywhere in the document being rendered. */
|
|
29
|
+
function refLinks(resourceId, targets) {
|
|
30
|
+
return !targets || targets.has(resourceId);
|
|
31
|
+
}
|
|
32
|
+
/** Whether an image URL names an SVG: a data URI of that type, or a path
|
|
33
|
+
* ending in `.svg` (query and fragment aside). Blob URLs cannot tell. */
|
|
34
|
+
function isSvgUrl(url) {
|
|
35
|
+
return /^data:image\/svg\+xml[;,]/i.test(url) || /\.svg(?:[?#]|$)/i.test(url);
|
|
36
|
+
}
|
|
37
|
+
/** The `filter` declaration tinting an image to the page's ink: an SVG
|
|
38
|
+
* (`svg: true`) or, of unknown kind, an SVG-looking URL; never a bitmap,
|
|
39
|
+
* and never an SVG data URI `applySingleInkToSvg` recoloured already (it
|
|
40
|
+
* carries `SINGLE_INK_MARK`). Empty when single ink does not apply. */
|
|
41
|
+
function inkFilterDecl(paint, svg, url) {
|
|
42
|
+
const ink = paint.ink;
|
|
43
|
+
if (!ink || svg === false || (svg === undefined && !isSvgUrl(url)) || isSingleInkSvgUrl(url))
|
|
44
|
+
return '';
|
|
45
|
+
return `filter:url(#${ink.id});`;
|
|
46
|
+
}
|
|
47
|
+
/** The page's `<filter>` definition: a zero-size inline SVG, first in the
|
|
48
|
+
* page so every `url(#…)` on it resolves. */
|
|
49
|
+
function inkFilterDefs(ink) {
|
|
50
|
+
const values = ink.matrix.map((v) => +v.toFixed(6)).join(' ');
|
|
51
|
+
return (`<svg aria-hidden="true" focusable="false" width="0" height="0" style="position:absolute;width:0;height:0;overflow:hidden;">` +
|
|
52
|
+
`<filter id="${ink.id}" color-interpolation-filters="sRGB"><feColorMatrix type="matrix" values="${values}"/></filter>` +
|
|
53
|
+
`</svg>`);
|
|
54
|
+
}
|
|
55
|
+
/** The URL of an image payload, reporting a miss (the caller then emits the
|
|
56
|
+
* placeholder). */
|
|
57
|
+
function imageUrl(options, fileId, resourceId) {
|
|
58
|
+
const url = options?.resourceImageUrl?.(fileId);
|
|
59
|
+
if (!url)
|
|
60
|
+
options?.missingImage?.(fileId, resourceId);
|
|
61
|
+
return url || undefined;
|
|
62
|
+
}
|
|
2
63
|
const HTML_ESCAPE = {
|
|
3
64
|
'&': '&',
|
|
4
65
|
'<': '<',
|
|
@@ -103,13 +164,64 @@ function renderTextSegment(seg, x, top, fontDecl, colorDecl, color) {
|
|
|
103
164
|
}
|
|
104
165
|
return `<span style="${pos}${colorDecl}">${text}</span>`;
|
|
105
166
|
}
|
|
106
|
-
|
|
167
|
+
/** A `:ref` painted as several runs (a label in small capitals: one run per
|
|
168
|
+
* case) from `segs[start]` on. Every run is placed as measured, and all of
|
|
169
|
+
* them sit in one anchor, so the reference stays one link. `paint` renders
|
|
170
|
+
* one run, as plain text, at its x. Returns the markup, the index past the
|
|
171
|
+
* last run and the x after it. */
|
|
172
|
+
function renderRefRuns(segs, start, x, color, paint, linked = true) {
|
|
173
|
+
const runs = [];
|
|
174
|
+
let i = start;
|
|
175
|
+
do {
|
|
176
|
+
const seg = segs[i];
|
|
177
|
+
runs.push(paint(seg, x));
|
|
178
|
+
x += seg.width;
|
|
179
|
+
i++;
|
|
180
|
+
} while (segs[i]?.refContinues);
|
|
181
|
+
if (!linked)
|
|
182
|
+
return { html: runs.join(''), end: i, x };
|
|
183
|
+
const href = refAnchorHref(segs[start].refResourceId);
|
|
184
|
+
return { html: `<a href="${href}" style="text-decoration:none;color:${color};">${runs.join('')}</a>`, end: i, x };
|
|
185
|
+
}
|
|
186
|
+
/** Wraps each run of segments of one link (`VDTLineSegment.href`) in an
|
|
187
|
+
* `<a>`: `at` returns the markup to emit before a segment with that link
|
|
188
|
+
* (closing the previous anchor, opening its own), `end` the markup that
|
|
189
|
+
* closes the line. The segments stay absolutely positioned inside it; the
|
|
190
|
+
* anchor takes the text colour, so a link reads as the surrounding text. */
|
|
191
|
+
function linkRuns() {
|
|
192
|
+
let open;
|
|
193
|
+
return {
|
|
194
|
+
at(href) {
|
|
195
|
+
if (href === open)
|
|
196
|
+
return '';
|
|
197
|
+
const close = open !== undefined ? '</a>' : '';
|
|
198
|
+
open = href;
|
|
199
|
+
return close + (href !== undefined
|
|
200
|
+
? `<a href="${esc(href)}" rel="noopener noreferrer" style="color:inherit;text-decoration:none;">`
|
|
201
|
+
: '');
|
|
202
|
+
},
|
|
203
|
+
end() {
|
|
204
|
+
const close = open !== undefined ? '</a>' : '';
|
|
205
|
+
open = undefined;
|
|
206
|
+
return close;
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
/** A segment's link, unless it is a `:ref` (which links to its resource). */
|
|
211
|
+
function segmentHref(seg) {
|
|
212
|
+
return seg.refResourceId === undefined ? seg.href : undefined;
|
|
213
|
+
}
|
|
214
|
+
function renderSegments(line, block, targets) {
|
|
215
|
+
// The tracking after the last glyph is advance, not ink: centring and
|
|
216
|
+
// right alignment leave it out (EF-153), as the canvas does.
|
|
217
|
+
const trailing = lineTrailingTracking(line, (block.letterSpacing ?? 0) + (line.letterSpacing ?? 0));
|
|
107
218
|
if (!line.segments || line.segments.length === 0) {
|
|
108
219
|
const plainIndent = line.bbox.x - block.bbox.x;
|
|
220
|
+
const plainWidth = line.bbox.width - trailing;
|
|
109
221
|
const plainLeft = block.textAlign === 'right'
|
|
110
|
-
? Math.max(0, block.bbox.width - plainIndent -
|
|
222
|
+
? Math.max(0, block.bbox.width - plainIndent - plainWidth)
|
|
111
223
|
: block.textAlign === 'center'
|
|
112
|
-
? Math.max(0, (block.bbox.width - plainIndent -
|
|
224
|
+
? Math.max(0, (block.bbox.width - plainIndent - plainWidth) / 2)
|
|
113
225
|
: 0;
|
|
114
226
|
return `<span style="position:absolute;left:${plainLeft.toFixed(3)}px;top:0;white-space:pre;">${esc(line.text)}</span>`;
|
|
115
227
|
}
|
|
@@ -136,15 +248,27 @@ function renderSegments(line, block) {
|
|
|
136
248
|
: 0;
|
|
137
249
|
// Centred / right alignment — math display blocks, ragged-left paragraph
|
|
138
250
|
// styles. Distribute the leading gap.
|
|
139
|
-
const slack = Math.max(0, effectiveWidth - contentWidth);
|
|
251
|
+
const slack = Math.max(0, effectiveWidth - (contentWidth - trailing));
|
|
140
252
|
const leadingGap = block.textAlign === 'center' ? slack / 2 : block.textAlign === 'right' ? slack : 0;
|
|
141
253
|
const parts = [];
|
|
254
|
+
const links = linkRuns();
|
|
142
255
|
let x = leadingGap;
|
|
143
|
-
|
|
256
|
+
const segs = line.segments;
|
|
257
|
+
const paintText = (seg, at, inLink = false) => {
|
|
258
|
+
const font = quoteFontString(pickSegmentFont(seg, block));
|
|
259
|
+
const color = pickSegmentColor(seg, block);
|
|
260
|
+
const fontDecl = font !== quoteFontString(block.fontString) ? `font:${font};` : '';
|
|
261
|
+
const colorDecl = color !== block.color ? `color:${color};` : '';
|
|
262
|
+
const top = seg.baselineShift ? `${seg.baselineShift.toFixed(3)}px` : '0';
|
|
263
|
+
return renderTextSegment(inLink ? { ...seg, refResourceId: undefined } : seg, at, top, fontDecl, colorDecl, color);
|
|
264
|
+
};
|
|
265
|
+
for (let i = 0; i < segs.length; i++) {
|
|
266
|
+
const seg = segs[i];
|
|
144
267
|
if (seg.kind === 'space') {
|
|
145
268
|
x += useJustify ? justifiedSpaceWidth : seg.width;
|
|
146
269
|
continue;
|
|
147
270
|
}
|
|
271
|
+
parts.push(links.at(segmentHref(seg)));
|
|
148
272
|
if (seg.kind === 'math') {
|
|
149
273
|
parts.push(renderMathSegmentSvg(seg, x, line, block));
|
|
150
274
|
x += seg.width;
|
|
@@ -160,14 +284,17 @@ function renderSegments(line, block) {
|
|
|
160
284
|
x += seg.width;
|
|
161
285
|
continue;
|
|
162
286
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
287
|
+
if (seg.refResourceId !== undefined && segs[i + 1]?.refContinues) {
|
|
288
|
+
const group = renderRefRuns(segs, i, x, pickSegmentColor(seg, block), (run, at) => paintText(run, at, true), refLinks(seg.refResourceId, targets));
|
|
289
|
+
parts.push(group.html);
|
|
290
|
+
x = group.x;
|
|
291
|
+
i = group.end - 1;
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
parts.push(paintText(seg, x, seg.refResourceId !== undefined && !refLinks(seg.refResourceId, targets)));
|
|
169
295
|
x += seg.width;
|
|
170
296
|
}
|
|
297
|
+
parts.push(links.end());
|
|
171
298
|
return parts.join('');
|
|
172
299
|
}
|
|
173
300
|
/** Inline colour swatch (`:swatch{…}`): a square of `side` px on the line's
|
|
@@ -223,15 +350,25 @@ function renderBullet(block) {
|
|
|
223
350
|
// Canvas uses `textBaseline='middle'` at `bulletY` to center the em square
|
|
224
351
|
// on the x-height; in HTML we get the equivalent alignment naturally when
|
|
225
352
|
// both bullet and line share top/height and font metrics.
|
|
353
|
+
// A marker set on the line's baseline (a contents number, whatever its
|
|
354
|
+
// face and size): the box takes the line's own font, so its baseline is
|
|
355
|
+
// the text's, and the marker sits in an inner box of its face with no
|
|
356
|
+
// line height, which aligns on that baseline without moving it — the
|
|
357
|
+
// way a text segment in another face does (`renderTextSegment`).
|
|
358
|
+
const onBaseline = block.bulletBaselineY !== undefined;
|
|
359
|
+
const lineFont = quoteFontString(block.fontString);
|
|
360
|
+
const baselineShift = onBaseline ? block.bulletBaselineY - firstLine.baseline : 0;
|
|
226
361
|
const markerDiv = (cls, x, font, color, text) => `<div class="${cls}" aria-hidden="true" style="` +
|
|
227
362
|
`position:absolute;` +
|
|
228
363
|
`left:${x}px;` +
|
|
229
|
-
`top:${firstLine.bbox.y}px;` +
|
|
364
|
+
`top:${firstLine.bbox.y + baselineShift}px;` +
|
|
230
365
|
`height:${firstLine.bbox.height}px;` +
|
|
231
|
-
`font:${font};` +
|
|
366
|
+
`font:${onBaseline ? lineFont : font};` +
|
|
232
367
|
`color:${color};` +
|
|
233
368
|
`white-space:pre;` +
|
|
234
|
-
|
|
369
|
+
(onBaseline
|
|
370
|
+
? `"><span style="font:${font};line-height:0;">${esc(text)}</span></div>`
|
|
371
|
+
: `">${esc(text)}</div>`);
|
|
235
372
|
let html = markerDiv('pt-bullet', block.bulletOffsetX, bulletFont, bulletColor, block.bulletText);
|
|
236
373
|
// Ordered-list separator styled apart from the number (own font/colour).
|
|
237
374
|
if (block.separatorText && block.separatorX !== undefined) {
|
|
@@ -241,12 +378,14 @@ function renderBullet(block) {
|
|
|
241
378
|
}
|
|
242
379
|
return html;
|
|
243
380
|
}
|
|
244
|
-
function renderLine(line, block) {
|
|
381
|
+
function renderLine(line, block, targets) {
|
|
245
382
|
const font = quoteFontString(block.fontString);
|
|
246
383
|
const strikethroughDecl = block.strikethroughText ? 'text-decoration:line-through;' : '';
|
|
247
|
-
//
|
|
384
|
+
// Tracking — the block's (column balancing, a runt set short) and the
|
|
385
|
+
// line's own (justification): measured into the segment widths, so the
|
|
248
386
|
// glyphs must spread the same way.
|
|
249
|
-
const
|
|
387
|
+
const tracking = (block.letterSpacing ?? 0) + (line.letterSpacing ?? 0);
|
|
388
|
+
const trackingDecl = tracking !== 0 ? `letter-spacing:${tracking}px;` : '';
|
|
250
389
|
return (`<div class="pt-line" data-block="${esc(block.id)}" style="` +
|
|
251
390
|
`position:absolute;` +
|
|
252
391
|
`left:${line.bbox.x}px;` +
|
|
@@ -256,7 +395,7 @@ function renderLine(line, block) {
|
|
|
256
395
|
`color:${block.color};` +
|
|
257
396
|
strikethroughDecl +
|
|
258
397
|
trackingDecl +
|
|
259
|
-
`">${renderSegments(line, block)}</div>`);
|
|
398
|
+
`">${renderSegments(line, block, targets)}</div>`);
|
|
260
399
|
}
|
|
261
400
|
function pickResourceFont(seg, fonts) {
|
|
262
401
|
if (seg.fontString)
|
|
@@ -273,16 +412,33 @@ function pickResourceFont(seg, fonts) {
|
|
|
273
412
|
* Alignment and justification are baked into the measured geometry, so
|
|
274
413
|
* segments paint sequentially from the line origin — `:ref` segments in the
|
|
275
414
|
* link colour, `captionLabel` segments in the label colour. */
|
|
276
|
-
function renderResourceLine(line, fonts, color, linkColor, labelColor = color) {
|
|
415
|
+
function renderResourceLine(line, fonts, color, linkColor, labelColor = color, targets) {
|
|
277
416
|
const baseFont = quoteFontString(fonts.normal);
|
|
278
417
|
const parts = [];
|
|
279
418
|
if (line.segments && line.segments.length > 0) {
|
|
419
|
+
const segs = line.segments;
|
|
420
|
+
const segColorOf = (seg) => (seg.refResourceId !== undefined
|
|
421
|
+
? linkColor
|
|
422
|
+
: seg.captionLabel
|
|
423
|
+
? labelColor
|
|
424
|
+
: color);
|
|
425
|
+
const paintText = (seg, at, inLink = false) => {
|
|
426
|
+
const font = quoteFontString(pickResourceFont(seg, fonts));
|
|
427
|
+
const segColor = segColorOf(seg);
|
|
428
|
+
const fontDecl = font !== baseFont ? `font:${font};` : '';
|
|
429
|
+
const colorDecl = segColor !== color ? `color:${segColor};` : '';
|
|
430
|
+
const top = seg.baselineShift ? `${seg.baselineShift.toFixed(3)}px` : '0';
|
|
431
|
+
return renderTextSegment(inLink ? { ...seg, refResourceId: undefined } : seg, at, top, fontDecl, colorDecl, segColor);
|
|
432
|
+
};
|
|
433
|
+
const links = linkRuns();
|
|
280
434
|
let x = 0;
|
|
281
|
-
for (
|
|
435
|
+
for (let i = 0; i < segs.length; i++) {
|
|
436
|
+
const seg = segs[i];
|
|
282
437
|
if (seg.kind === 'space') {
|
|
283
438
|
x += seg.width;
|
|
284
439
|
continue;
|
|
285
440
|
}
|
|
441
|
+
parts.push(links.at(segmentHref(seg)));
|
|
286
442
|
if (seg.kind === 'swatch') {
|
|
287
443
|
parts.push(renderSwatch(x, line.baseline - line.bbox.y, seg.width, seg.swatch?.color, color));
|
|
288
444
|
x += seg.width;
|
|
@@ -293,18 +449,17 @@ function renderResourceLine(line, fonts, color, linkColor, labelColor = color) {
|
|
|
293
449
|
x += seg.width;
|
|
294
450
|
continue;
|
|
295
451
|
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
const top = seg.baselineShift ? `${seg.baselineShift.toFixed(3)}px` : '0';
|
|
305
|
-
parts.push(renderTextSegment(seg, x, top, fontDecl, colorDecl, segColor));
|
|
452
|
+
if (seg.refResourceId !== undefined && segs[i + 1]?.refContinues) {
|
|
453
|
+
const group = renderRefRuns(segs, i, x, linkColor, (run, at) => paintText(run, at, true), refLinks(seg.refResourceId, targets));
|
|
454
|
+
parts.push(group.html);
|
|
455
|
+
x = group.x;
|
|
456
|
+
i = group.end - 1;
|
|
457
|
+
continue;
|
|
458
|
+
}
|
|
459
|
+
parts.push(paintText(seg, x, seg.refResourceId !== undefined && !refLinks(seg.refResourceId, targets)));
|
|
306
460
|
x += seg.width;
|
|
307
461
|
}
|
|
462
|
+
parts.push(links.end());
|
|
308
463
|
}
|
|
309
464
|
else {
|
|
310
465
|
parts.push(`<span style="position:absolute;left:0;top:0;white-space:pre;">${esc(line.text)}</span>`);
|
|
@@ -316,14 +471,18 @@ function renderResourceLine(line, fonts, color, linkColor, labelColor = color) {
|
|
|
316
471
|
`height:${line.bbox.height}px;` +
|
|
317
472
|
`font:${baseFont};` +
|
|
318
473
|
`color:${color};` +
|
|
474
|
+
// A tracked line (a table header set with `headerLetterSpacing`) was
|
|
475
|
+
// measured with the tracking in its widths.
|
|
476
|
+
(line.letterSpacing ? `letter-spacing:${line.letterSpacing}px;` : '') +
|
|
319
477
|
`">${parts.join('')}</div>`);
|
|
320
478
|
}
|
|
321
479
|
/** An image fitted to a box: `<img>` from `resourceImageUrl`, or the neutral
|
|
322
480
|
* placeholder the canvas backend paints when nothing is registered. */
|
|
323
|
-
function renderFittedImage(url, alt, label, x, y, w, h) {
|
|
481
|
+
function renderFittedImage(url, alt, label, x, y, w, h, paint, svg) {
|
|
324
482
|
if (url) {
|
|
483
|
+
const filter = paint ? inkFilterDecl(paint, svg, url) : '';
|
|
325
484
|
return (`<img src="${esc(url)}" alt="${esc(alt)}" style="position:absolute;` +
|
|
326
|
-
`left:${x}px;top:${y}px;width:${w}px;height:${h}px
|
|
485
|
+
`left:${x}px;top:${y}px;width:${w}px;height:${h}px;${filter}" />`);
|
|
327
486
|
}
|
|
328
487
|
const labelSize = Math.max(10, Math.min(16, h * 0.1));
|
|
329
488
|
return (`<div aria-hidden="true" style="position:absolute;` +
|
|
@@ -354,17 +513,19 @@ function renderResourceTable(rb, bx, by, options) {
|
|
|
354
513
|
// to its outer contour, then is drawn round on top.
|
|
355
514
|
const rounded = t.frameRadii !== undefined;
|
|
356
515
|
const outline = (outset) => tableFrameOutline(t, bx, by, rb.bodyRect.width, outset);
|
|
357
|
-
// Cell backgrounds first (the cell's own fill, else the header tint /
|
|
358
|
-
// fill), then borders, then text — same paint order as the
|
|
516
|
+
// Cell backgrounds first (the cell's own fill, else the header tint / the
|
|
517
|
+
// body or zebra fill), then borders, then text — same paint order as the
|
|
518
|
+
// canvas backend. Each opaque fill runs across the edges it shares with
|
|
519
|
+
// the cells painted after it, so no seam shows between cells at a
|
|
520
|
+
// fractional device-pixel ratio (see `tableCellFillRects`).
|
|
359
521
|
const fills = [];
|
|
360
|
-
for (const
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
`background:${fill};"></div>`);
|
|
522
|
+
for (const { fill, rects } of tableCellFillRects(t)) {
|
|
523
|
+
for (const r of rects) {
|
|
524
|
+
fills.push(`<div aria-hidden="true" style="position:absolute;` +
|
|
525
|
+
`left:${r.x}px;top:${r.y}px;` +
|
|
526
|
+
`width:${r.width}px;height:${r.height}px;` +
|
|
527
|
+
`background:${fill};"></div>`);
|
|
528
|
+
}
|
|
368
529
|
}
|
|
369
530
|
parts.push(rounded ? clipToOutline(fills.join(''), outline(0)) : fills.join(''));
|
|
370
531
|
if (t.borderWidthPx > 0) {
|
|
@@ -418,15 +579,15 @@ function renderResourceTable(rb, bx, by, options) {
|
|
|
418
579
|
const img = cell.image;
|
|
419
580
|
if (!img)
|
|
420
581
|
continue;
|
|
421
|
-
const url = options.
|
|
582
|
+
const url = imageUrl(options, img.fileId, img.resourceId);
|
|
422
583
|
const { x, y, width, height } = img.rect;
|
|
423
|
-
parts.push(renderFittedImage(url, '', img.kind === 'svg' ? 'SVG' : 'Image', x, y, width, height));
|
|
584
|
+
parts.push(renderFittedImage(url, '', img.kind === 'svg' ? 'SVG' : 'Image', x, y, width, height, options, img.kind === 'svg'));
|
|
424
585
|
}
|
|
425
586
|
for (const cell of t.cells) {
|
|
426
587
|
const fonts = cell.isHeader ? headerFonts : bodyFonts;
|
|
427
588
|
const color = cell.isHeader ? t.headerColor : t.color;
|
|
428
589
|
for (const line of cell.lines) {
|
|
429
|
-
parts.push(renderResourceLine(line, fonts, color, rb.linkColor));
|
|
590
|
+
parts.push(renderResourceLine(line, fonts, color, rb.linkColor, color, options.linkTargets));
|
|
430
591
|
}
|
|
431
592
|
}
|
|
432
593
|
return parts.join('');
|
|
@@ -451,9 +612,9 @@ function renderResourceBlockHtml(block, options) {
|
|
|
451
612
|
`left:${block.bbox.x}px;top:${block.bbox.y}px;width:0;height:0;"></span>`
|
|
452
613
|
: '';
|
|
453
614
|
if (rb.kind === 'bitmap' || rb.kind === 'svg') {
|
|
454
|
-
const url = rb.fileId ? options.
|
|
615
|
+
const url = rb.fileId ? imageUrl(options, rb.fileId, rb.resource.id) : undefined;
|
|
455
616
|
// `<img>`, or a neutral placeholder matching the canvas backend's colours.
|
|
456
|
-
parts.push(renderFittedImage(url, rb.resource.altText ?? '', rb.kind === 'svg' ? 'SVG' : 'Image', bx, by, bw, bh));
|
|
617
|
+
parts.push(renderFittedImage(url, rb.resource.altText ?? '', rb.kind === 'svg' ? 'SVG' : 'Image', bx, by, bw, bh, options, rb.kind === 'svg'));
|
|
457
618
|
}
|
|
458
619
|
else if (rb.kind === 'table') {
|
|
459
620
|
parts.push(renderResourceTable(rb, bx, by, options));
|
|
@@ -472,7 +633,7 @@ function renderResourceBlockHtml(block, options) {
|
|
|
472
633
|
boldItalic: rb.captionBoldItalicFontString,
|
|
473
634
|
};
|
|
474
635
|
for (const line of rb.captionLines) {
|
|
475
|
-
parts.push(renderResourceLine(line, captionFonts, rb.captionColor, rb.linkColor, rb.captionLabelColor));
|
|
636
|
+
parts.push(renderResourceLine(line, captionFonts, rb.captionColor, rb.linkColor, rb.captionLabelColor, options.linkTargets));
|
|
476
637
|
}
|
|
477
638
|
const noteFonts = {
|
|
478
639
|
normal: rb.noteFontString,
|
|
@@ -481,7 +642,7 @@ function renderResourceBlockHtml(block, options) {
|
|
|
481
642
|
boldItalic: rb.noteBoldItalicFontString,
|
|
482
643
|
};
|
|
483
644
|
for (const line of [...rb.noteLines, ...(rb.continuesLines ?? [])]) {
|
|
484
|
-
parts.push(renderResourceLine(line, noteFonts, rb.noteColor, rb.linkColor));
|
|
645
|
+
parts.push(renderResourceLine(line, noteFonts, rb.noteColor, rb.linkColor, rb.noteColor, options.linkTargets));
|
|
485
646
|
}
|
|
486
647
|
if (!rot)
|
|
487
648
|
return anchor + parts.join('');
|
|
@@ -524,21 +685,49 @@ function renderDesignTextBlock(block) {
|
|
|
524
685
|
const lineParts = [];
|
|
525
686
|
for (const line of block.lines) {
|
|
526
687
|
const top = line.baselineY - block.bbox.y - fontSize * 0.8;
|
|
688
|
+
// Inline marks: the runs as inline spans on the line's baseline, each
|
|
689
|
+
// in its own font; a script is shifted off the baseline. Of a subscript
|
|
690
|
+
// and a superscript set over each other, the first sits in a box that
|
|
691
|
+
// takes no room and the second in one as wide as the pair (EF-80).
|
|
692
|
+
const inner = line.runs
|
|
693
|
+
? line.runs.map((run, i) => {
|
|
694
|
+
const runFont = quoteFontString(run.fontString);
|
|
695
|
+
const fontDecl = runFont !== font ? `font:${runFont};` : '';
|
|
696
|
+
const stackDecl = run.stacked
|
|
697
|
+
? 'display:inline-block;width:0;'
|
|
698
|
+
: line.runs[i - 1]?.stacked ? `display:inline-block;min-width:${run.width.toFixed(3)}px;` : '';
|
|
699
|
+
const shiftDecl = run.baselineShift ? `position:relative;top:${run.baselineShift.toFixed(3)}px;` : '';
|
|
700
|
+
return fontDecl || stackDecl || shiftDecl ? `<span style="${fontDecl}${stackDecl}${shiftDecl}">${esc(run.text)}</span>` : esc(run.text);
|
|
701
|
+
}).join('')
|
|
702
|
+
: esc(line.text);
|
|
703
|
+
// A justified line: its word spaces widened as the canvas and the PDF
|
|
704
|
+
// advance its runs (EF-109).
|
|
705
|
+
const wordSpacingDecl = line.wordSpacingPx ? `word-spacing:${line.wordSpacingPx.toFixed(3)}px;` : '';
|
|
527
706
|
lineParts.push(`<span style="` +
|
|
528
707
|
`position:absolute;` +
|
|
529
708
|
`left:${line.xOffset.toFixed(3)}px;` +
|
|
530
709
|
`top:${top.toFixed(3)}px;` +
|
|
531
710
|
`line-height:1;white-space:pre;` +
|
|
532
|
-
|
|
711
|
+
wordSpacingDecl +
|
|
712
|
+
`">${inner}</span>`);
|
|
533
713
|
}
|
|
534
714
|
const clipDecl = block.clip ? 'overflow:hidden;' : '';
|
|
535
715
|
const trackingDecl = block.letterSpacingPx ? `letter-spacing:${block.letterSpacingPx}px;` : '';
|
|
536
|
-
|
|
716
|
+
// An outline over the glyphs (centred on their edges, as on canvas and in
|
|
717
|
+
// the PDF); hollow letters leave the fill transparent.
|
|
718
|
+
const strokeDecl = block.stroke && block.stroke.widthPx > 0
|
|
719
|
+
? `-webkit-text-stroke:${block.stroke.widthPx}px ${block.stroke.color};` +
|
|
720
|
+
(block.stroke.hollow ? '-webkit-text-fill-color:transparent;' : '')
|
|
721
|
+
: '';
|
|
722
|
+
// Pagination furniture (a split callout's repeated title and marker) is
|
|
723
|
+
// read once: hidden from assistive technology.
|
|
724
|
+
const hidden = block.artifact ? ' aria-hidden="true"' : '';
|
|
725
|
+
parts.push(`<div${hidden} style="` +
|
|
537
726
|
`position:absolute;` +
|
|
538
727
|
`left:${block.bbox.x}px;top:${block.bbox.y}px;` +
|
|
539
728
|
`width:${block.bbox.width}px;height:${block.bbox.height}px;` +
|
|
540
729
|
`font:${font};color:${block.color};` +
|
|
541
|
-
clipDecl + trackingDecl +
|
|
730
|
+
clipDecl + trackingDecl + strokeDecl +
|
|
542
731
|
`">${lineParts.join('')}</div>`);
|
|
543
732
|
return parts.join('');
|
|
544
733
|
}
|
|
@@ -553,7 +742,9 @@ function renderDesignRuleBlock(block) {
|
|
|
553
742
|
`"></div>`);
|
|
554
743
|
}
|
|
555
744
|
function renderDesignBoxBlock(block) {
|
|
556
|
-
|
|
745
|
+
const html = renderBoxAt(block.bbox, block.box);
|
|
746
|
+
// A callout stripe on a rounded frame: clipped to the frame's outline.
|
|
747
|
+
return block.clip ? clipToOutline(html, block.clip) : html;
|
|
557
748
|
}
|
|
558
749
|
/** Image block (e.g. a callout icon): `<img>` from `resourceImageUrl`, or a
|
|
559
750
|
* neutral placeholder box when the host cannot supply the image. */
|
|
@@ -561,10 +752,12 @@ function renderDesignImageBlock(block, options) {
|
|
|
561
752
|
const { x, y, width, height } = block.bbox;
|
|
562
753
|
if (width <= 0 || height <= 0)
|
|
563
754
|
return '';
|
|
564
|
-
const url = options
|
|
755
|
+
const url = imageUrl(options, block.fileId);
|
|
565
756
|
if (url) {
|
|
757
|
+
const svg = block.imageKind === undefined ? undefined : block.imageKind === 'svg';
|
|
758
|
+
const filter = options ? inkFilterDecl(options, svg, url) : '';
|
|
566
759
|
return (`<img src="${esc(url)}" alt="" style="position:absolute;` +
|
|
567
|
-
`left:${x}px;top:${y}px;width:${width}px;height:${height}px
|
|
760
|
+
`left:${x}px;top:${y}px;width:${width}px;height:${height}px;${filter}" />`);
|
|
568
761
|
}
|
|
569
762
|
return (`<div aria-hidden="true" style="position:absolute;` +
|
|
570
763
|
`left:${x}px;top:${y}px;width:${width}px;height:${height}px;` +
|
|
@@ -598,7 +791,7 @@ function renderBlockInner(block, options) {
|
|
|
598
791
|
const parts = [];
|
|
599
792
|
parts.push(renderBullet(block));
|
|
600
793
|
for (const line of block.lines) {
|
|
601
|
-
parts.push(renderLine(line, block));
|
|
794
|
+
parts.push(renderLine(line, block, options.linkTargets));
|
|
602
795
|
}
|
|
603
796
|
return parts.join('');
|
|
604
797
|
}
|
|
@@ -614,8 +807,20 @@ function renderBlock(block, options) {
|
|
|
614
807
|
renderBlockInner(block, options) +
|
|
615
808
|
`</div>`);
|
|
616
809
|
}
|
|
617
|
-
function renderPageDetailed(page, background,
|
|
810
|
+
function renderPageDetailed(page, background, pageOptions, ink = null,
|
|
811
|
+
/** With cut lines, how far the bleed box lies inside the sheet (px); 0
|
|
812
|
+
* without them. */
|
|
813
|
+
bleedInset = 0) {
|
|
618
814
|
const bgDecl = background && background !== 'transparent' ? `background:${background};` : '';
|
|
815
|
+
// With cut lines nothing the page paints shows past the bleed box, as on
|
|
816
|
+
// the canvas and in the PDF (EF-133).
|
|
817
|
+
const clipDecl = bleedInset > 0 ? `clip-path:inset(${bleedInset}px);` : '';
|
|
818
|
+
// A filter id local to the page and its ink, so every page is
|
|
819
|
+
// self-contained (a patcher may replace pages one by one) and two
|
|
820
|
+
// documents on one page never share a filter.
|
|
821
|
+
const options = ink
|
|
822
|
+
? { ...pageOptions, ink: { id: `pt-ink-${ink.hex.replace(/[^0-9a-z]/gi, '')}-${page.index}`, matrix: ink.matrix } }
|
|
823
|
+
: pageOptions;
|
|
619
824
|
const blocks = [];
|
|
620
825
|
for (const col of page.columns) {
|
|
621
826
|
for (const block of col.blocks) {
|
|
@@ -637,17 +842,40 @@ function renderPageDetailed(page, background, options) {
|
|
|
637
842
|
slotParts.push(renderDesignSlot(page.header, options));
|
|
638
843
|
if (page.footer)
|
|
639
844
|
slotParts.push(renderDesignSlot(page.footer, options));
|
|
640
|
-
|
|
641
|
-
|
|
845
|
+
// Whether or not a picture on the page uses it: a host patching blocks
|
|
846
|
+
// one by one may bring in an SVG image the first render did not have.
|
|
847
|
+
const defsHtml = options.ink ? inkFilterDefs(options.ink) : '';
|
|
848
|
+
const decorationHtml = defsHtml + openerHtml + slotParts.join('');
|
|
849
|
+
const innerHtml = defsHtml + openerHtml + blocksHtml + slotParts.join('');
|
|
642
850
|
const outerHtml = `<div class="pt-page" data-page="${page.index}" style="` +
|
|
643
851
|
`position:relative;` +
|
|
644
852
|
`width:${page.width}px;` +
|
|
645
853
|
`height:${page.height}px;` +
|
|
646
854
|
`flex-shrink:0;` +
|
|
647
855
|
bgDecl +
|
|
856
|
+
clipDecl +
|
|
648
857
|
`">${innerHtml}</div>`;
|
|
649
858
|
return { outerHtml, innerHtml, blocks, decorationHtml };
|
|
650
859
|
}
|
|
860
|
+
/**
|
|
861
|
+
* CSS declarations (a `prop:value;` list) that reset the inherited text
|
|
862
|
+
* properties to the values the engine measured with. Every line of the
|
|
863
|
+
* output is positioned at the widths the canvas measured, so a host that
|
|
864
|
+
* sets `letter-spacing`, `word-spacing`, `text-transform`, a `font-variant`
|
|
865
|
+
* or a `line-height` on an ancestor would otherwise widen or change the
|
|
866
|
+
* glyph runs and make lines overprint. The `.pt-doc` root carries them
|
|
867
|
+
* before its own layout declarations; a host that mounts the pages'
|
|
868
|
+
* `innerHtml` in containers of its own sets them on its root.
|
|
869
|
+
*/
|
|
870
|
+
export const HTML_TEXT_RESET = 'letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;' +
|
|
871
|
+
'white-space:normal;word-break:normal;overflow-wrap:normal;' +
|
|
872
|
+
'font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;' +
|
|
873
|
+
'font-feature-settings:normal;font-variation-settings:normal;font-kerning:auto;' +
|
|
874
|
+
'font-optical-sizing:auto;font-size-adjust:none;font-synthesis:initial;' +
|
|
875
|
+
'line-height:normal;text-align:left;text-shadow:none;text-rendering:auto;' +
|
|
876
|
+
'text-emphasis:none;hyphens:manual;direction:ltr;writing-mode:horizontal-tb;' +
|
|
877
|
+
'-webkit-text-stroke:0;-webkit-text-fill-color:currentcolor;' +
|
|
878
|
+
'-webkit-text-size-adjust:100%;text-size-adjust:100%;';
|
|
651
879
|
/**
|
|
652
880
|
* Like renderToHtml, but also returns a per-page / per-block breakdown that
|
|
653
881
|
* callers can use to diff against a previous render and patch only the DOM
|
|
@@ -661,10 +889,36 @@ export function renderToHtmlIndexed(doc, options = {}) {
|
|
|
661
889
|
const docStyle = mode === 'multi'
|
|
662
890
|
? `display:flex;flex-direction:row;gap:${gap}px;align-items:flex-start;padding:${padding}px;box-sizing:border-box;width:max-content;`
|
|
663
891
|
: `display:flex;flex-direction:column;align-items:center;padding:${padding}px 0;box-sizing:border-box;`;
|
|
892
|
+
// Single-ink diagrams: SVG pictures are filtered to the ink when the host
|
|
893
|
+
// asks (its URLs are not recoloured already).
|
|
894
|
+
const singleInk = options.singleInk ?? options.resourceImageUrl?.singleInk ?? false;
|
|
895
|
+
const inkHex = singleInk ? documentInkHex(doc.config) : null;
|
|
896
|
+
const inkMatrix = inkHex ? singleInkColorMatrix(inkHex) : null;
|
|
897
|
+
const ink = inkHex && inkMatrix ? { hex: inkHex, matrix: inkMatrix } : null;
|
|
664
898
|
const indexedPages = [];
|
|
665
899
|
const pageHtmlParts = [];
|
|
900
|
+
const onWarning = options.onWarning;
|
|
901
|
+
const reported = new Set();
|
|
902
|
+
const linkTargets = anchoredResourceIds(doc);
|
|
903
|
+
for (const id of options.refTargets ?? [])
|
|
904
|
+
linkTargets.add(id);
|
|
905
|
+
const bleedInset = doc.trimOffset > 0
|
|
906
|
+
? Math.max(0, doc.trimOffset - dimensionToPx(doc.config.page.cutLines.bleed, doc.config.page.dpi))
|
|
907
|
+
: 0;
|
|
666
908
|
for (const p of doc.pages) {
|
|
667
|
-
const
|
|
909
|
+
const pageOptions = onWarning
|
|
910
|
+
? {
|
|
911
|
+
...options,
|
|
912
|
+
linkTargets,
|
|
913
|
+
missingImage: (fileId, resourceId) => {
|
|
914
|
+
if (reported.has(fileId))
|
|
915
|
+
return;
|
|
916
|
+
reported.add(fileId);
|
|
917
|
+
onWarning({ kind: 'missingImage', fileId, ...(resourceId !== undefined ? { resourceId } : {}), pageIndex: p.index });
|
|
918
|
+
},
|
|
919
|
+
}
|
|
920
|
+
: { ...options, linkTargets };
|
|
921
|
+
const detail = renderPageDetailed(p, background, pageOptions, ink, bleedInset);
|
|
668
922
|
pageHtmlParts.push(detail.outerHtml);
|
|
669
923
|
indexedPages.push({
|
|
670
924
|
index: p.index,
|
|
@@ -675,7 +929,8 @@ export function renderToHtmlIndexed(doc, options = {}) {
|
|
|
675
929
|
decorationHtml: detail.decorationHtml,
|
|
676
930
|
});
|
|
677
931
|
}
|
|
678
|
-
|
|
932
|
+
// The host's inherited text properties are reset first (EF-96).
|
|
933
|
+
const html = `<div class="pt-doc" data-mode="${mode}" style="${HTML_TEXT_RESET}${docStyle}">` +
|
|
679
934
|
pageHtmlParts.join('') +
|
|
680
935
|
`</div>`;
|
|
681
936
|
return { html, mode, pages: indexedPages };
|