postext 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -202
- package/dist/__tests__/breakOpportunities.test.d.ts +2 -0
- package/dist/__tests__/breakOpportunities.test.d.ts.map +1 -0
- package/dist/__tests__/breakOpportunities.test.js +204 -0
- package/dist/__tests__/breakOpportunities.test.js.map +1 -0
- package/dist/__tests__/bundle.test.js +399 -1
- package/dist/__tests__/bundle.test.js.map +1 -1
- package/dist/__tests__/bundleLocaleAndBytes.test.d.ts +2 -0
- package/dist/__tests__/bundleLocaleAndBytes.test.d.ts.map +1 -0
- package/dist/__tests__/bundleLocaleAndBytes.test.js +177 -0
- package/dist/__tests__/bundleLocaleAndBytes.test.js.map +1 -0
- package/dist/__tests__/colorAlpha.test.d.ts +2 -0
- package/dist/__tests__/colorAlpha.test.d.ts.map +1 -0
- package/dist/__tests__/colorAlpha.test.js +87 -0
- package/dist/__tests__/colorAlpha.test.js.map +1 -0
- package/dist/__tests__/columnBalancing.test.js +88 -0
- package/dist/__tests__/columnBalancing.test.js.map +1 -1
- package/dist/__tests__/columnClip.test.js +20 -0
- package/dist/__tests__/columnClip.test.js.map +1 -1
- package/dist/__tests__/columnRuleBands.test.d.ts +2 -0
- package/dist/__tests__/columnRuleBands.test.d.ts.map +1 -0
- package/dist/__tests__/columnRuleBands.test.js +146 -0
- package/dist/__tests__/columnRuleBands.test.js.map +1 -0
- package/dist/__tests__/contentWarnings.test.d.ts +2 -0
- package/dist/__tests__/contentWarnings.test.d.ts.map +1 -0
- package/dist/__tests__/contentWarnings.test.js +219 -0
- package/dist/__tests__/contentWarnings.test.js.map +1 -0
- package/dist/__tests__/continuation.test.js +2 -1
- package/dist/__tests__/continuation.test.js.map +1 -1
- package/dist/__tests__/createLayout.test.js +18 -1
- package/dist/__tests__/createLayout.test.js.map +1 -1
- package/dist/__tests__/cropMarks.test.d.ts +2 -0
- package/dist/__tests__/cropMarks.test.d.ts.map +1 -0
- package/dist/__tests__/cropMarks.test.js +138 -0
- package/dist/__tests__/cropMarks.test.js.map +1 -0
- package/dist/__tests__/defaults/calloutStyles.test.js +30 -0
- package/dist/__tests__/defaults/calloutStyles.test.js.map +1 -1
- package/dist/__tests__/defaults/headingsBreakBefore.test.d.ts +2 -0
- package/dist/__tests__/defaults/headingsBreakBefore.test.d.ts.map +1 -0
- package/dist/__tests__/defaults/headingsBreakBefore.test.js +78 -0
- package/dist/__tests__/defaults/headingsBreakBefore.test.js.map +1 -0
- package/dist/__tests__/defaults/paragraphStyles.test.js +22 -0
- package/dist/__tests__/defaults/paragraphStyles.test.js.map +1 -1
- package/dist/__tests__/design/bleedClip.test.d.ts +2 -0
- package/dist/__tests__/design/bleedClip.test.d.ts.map +1 -0
- package/dist/__tests__/design/bleedClip.test.js +91 -0
- package/dist/__tests__/design/bleedClip.test.js.map +1 -0
- package/dist/__tests__/design/boxBorderInside.test.d.ts +2 -0
- package/dist/__tests__/design/boxBorderInside.test.d.ts.map +1 -0
- package/dist/__tests__/design/boxBorderInside.test.js +102 -0
- package/dist/__tests__/design/boxBorderInside.test.js.map +1 -0
- package/dist/__tests__/design/designLineHeight.test.d.ts +2 -0
- package/dist/__tests__/design/designLineHeight.test.d.ts.map +1 -0
- package/dist/__tests__/design/designLineHeight.test.js +108 -0
- package/dist/__tests__/design/designLineHeight.test.js.map +1 -0
- package/dist/__tests__/design/designText.test.d.ts +2 -0
- package/dist/__tests__/design/designText.test.d.ts.map +1 -0
- package/dist/__tests__/design/designText.test.js +331 -0
- package/dist/__tests__/design/designText.test.js.map +1 -0
- package/dist/__tests__/design/designTextJustify.test.d.ts +2 -0
- package/dist/__tests__/design/designTextJustify.test.d.ts.map +1 -0
- package/dist/__tests__/design/designTextJustify.test.js +119 -0
- package/dist/__tests__/design/designTextJustify.test.js.map +1 -0
- package/dist/__tests__/design/designTextNegativeTracking.test.d.ts +2 -0
- package/dist/__tests__/design/designTextNegativeTracking.test.d.ts.map +1 -0
- package/dist/__tests__/design/designTextNegativeTracking.test.js +95 -0
- package/dist/__tests__/design/designTextNegativeTracking.test.js.map +1 -0
- package/dist/__tests__/design/designTextRender.test.d.ts +2 -0
- package/dist/__tests__/design/designTextRender.test.d.ts.map +1 -0
- package/dist/__tests__/design/designTextRender.test.js +106 -0
- package/dist/__tests__/design/designTextRender.test.js.map +1 -0
- package/dist/__tests__/design/dropCap.test.d.ts +2 -0
- package/dist/__tests__/design/dropCap.test.d.ts.map +1 -0
- package/dist/__tests__/design/dropCap.test.js +205 -0
- package/dist/__tests__/design/dropCap.test.js.map +1 -0
- package/dist/__tests__/design/ellipsis.test.d.ts +2 -0
- package/dist/__tests__/design/ellipsis.test.d.ts.map +1 -0
- package/dist/__tests__/design/ellipsis.test.js +113 -0
- package/dist/__tests__/design/ellipsis.test.js.map +1 -0
- package/dist/__tests__/design/headingDesignClip.test.d.ts +2 -0
- package/dist/__tests__/design/headingDesignClip.test.d.ts.map +1 -0
- package/dist/__tests__/design/headingDesignClip.test.js +60 -0
- package/dist/__tests__/design/headingDesignClip.test.js.map +1 -0
- package/dist/__tests__/design/headingDesignSideChannel.test.d.ts +2 -0
- package/dist/__tests__/design/headingDesignSideChannel.test.d.ts.map +1 -0
- package/dist/__tests__/design/headingDesignSideChannel.test.js +187 -0
- package/dist/__tests__/design/headingDesignSideChannel.test.js.map +1 -0
- package/dist/__tests__/design/inColumnTitleBreak.test.d.ts +2 -0
- package/dist/__tests__/design/inColumnTitleBreak.test.d.ts.map +1 -0
- package/dist/__tests__/design/inColumnTitleBreak.test.js +60 -0
- package/dist/__tests__/design/inColumnTitleBreak.test.js.map +1 -0
- package/dist/__tests__/design/openerBottomAnchor.test.d.ts +2 -0
- package/dist/__tests__/design/openerBottomAnchor.test.d.ts.map +1 -0
- package/dist/__tests__/design/openerBottomAnchor.test.js +106 -0
- package/dist/__tests__/design/openerBottomAnchor.test.js.map +1 -0
- package/dist/__tests__/design/openerChapterNumber.test.d.ts +2 -0
- package/dist/__tests__/design/openerChapterNumber.test.d.ts.map +1 -0
- package/dist/__tests__/design/openerChapterNumber.test.js +163 -0
- package/dist/__tests__/design/openerChapterNumber.test.js.map +1 -0
- package/dist/__tests__/design/openerImageReserve.test.d.ts +2 -0
- package/dist/__tests__/design/openerImageReserve.test.d.ts.map +1 -0
- package/dist/__tests__/design/openerImageReserve.test.js +83 -0
- package/dist/__tests__/design/openerImageReserve.test.js.map +1 -0
- package/dist/__tests__/design/openerReserve.test.d.ts +2 -0
- package/dist/__tests__/design/openerReserve.test.d.ts.map +1 -0
- package/dist/__tests__/design/openerReserve.test.js +147 -0
- package/dist/__tests__/design/openerReserve.test.js.map +1 -0
- package/dist/__tests__/design/ruleDefaults.test.d.ts +2 -0
- package/dist/__tests__/design/ruleDefaults.test.d.ts.map +1 -0
- package/dist/__tests__/design/ruleDefaults.test.js +59 -0
- package/dist/__tests__/design/ruleDefaults.test.js.map +1 -0
- package/dist/__tests__/design/runningHeads.test.js +4 -2
- package/dist/__tests__/design/runningHeads.test.js.map +1 -1
- package/dist/__tests__/design/titleTextWrapped.test.d.ts +2 -0
- package/dist/__tests__/design/titleTextWrapped.test.d.ts.map +1 -0
- package/dist/__tests__/design/titleTextWrapped.test.js +258 -0
- package/dist/__tests__/design/titleTextWrapped.test.js.map +1 -0
- package/dist/__tests__/design/trackingAlignment.test.d.ts +2 -0
- package/dist/__tests__/design/trackingAlignment.test.d.ts.map +1 -0
- package/dist/__tests__/design/trackingAlignment.test.js +101 -0
- package/dist/__tests__/design/trackingAlignment.test.js.map +1 -0
- package/dist/__tests__/design/verticalAlignOverflow.test.d.ts +2 -0
- package/dist/__tests__/design/verticalAlignOverflow.test.d.ts.map +1 -0
- package/dist/__tests__/design/verticalAlignOverflow.test.js +68 -0
- package/dist/__tests__/design/verticalAlignOverflow.test.js.map +1 -0
- package/dist/__tests__/exports.test.js +24 -0
- package/dist/__tests__/exports.test.js.map +1 -1
- package/dist/__tests__/fontStack.test.d.ts +2 -0
- package/dist/__tests__/fontStack.test.d.ts.map +1 -0
- package/dist/__tests__/fontStack.test.js +100 -0
- package/dist/__tests__/fontStack.test.js.map +1 -0
- package/dist/__tests__/frontmatterValues.test.d.ts +2 -0
- package/dist/__tests__/frontmatterValues.test.d.ts.map +1 -0
- package/dist/__tests__/frontmatterValues.test.js +119 -0
- package/dist/__tests__/frontmatterValues.test.js.map +1 -0
- package/dist/__tests__/gradedRunt.test.d.ts +2 -0
- package/dist/__tests__/gradedRunt.test.d.ts.map +1 -0
- package/dist/__tests__/gradedRunt.test.js +66 -0
- package/dist/__tests__/gradedRunt.test.js.map +1 -0
- package/dist/__tests__/headingAlign.test.d.ts +2 -0
- package/dist/__tests__/headingAlign.test.d.ts.map +1 -0
- package/dist/__tests__/headingAlign.test.js +92 -0
- package/dist/__tests__/headingAlign.test.js.map +1 -0
- package/dist/__tests__/headingInlineMarks.test.d.ts +2 -0
- package/dist/__tests__/headingInlineMarks.test.d.ts.map +1 -0
- package/dist/__tests__/headingInlineMarks.test.js +126 -0
- package/dist/__tests__/headingInlineMarks.test.js.map +1 -0
- package/dist/__tests__/headingLetterSpacing.test.d.ts +2 -0
- package/dist/__tests__/headingLetterSpacing.test.d.ts.map +1 -0
- package/dist/__tests__/headingLetterSpacing.test.js +135 -0
- package/dist/__tests__/headingLetterSpacing.test.js.map +1 -0
- package/dist/__tests__/headingNumberPlaceholders.test.d.ts +2 -0
- package/dist/__tests__/headingNumberPlaceholders.test.d.ts.map +1 -0
- package/dist/__tests__/headingNumberPlaceholders.test.js +104 -0
- package/dist/__tests__/headingNumberPlaceholders.test.js.map +1 -0
- package/dist/__tests__/headingNumberingStyles.test.d.ts +2 -0
- package/dist/__tests__/headingNumberingStyles.test.d.ts.map +1 -0
- package/dist/__tests__/headingNumberingStyles.test.js +151 -0
- package/dist/__tests__/headingNumberingStyles.test.js.map +1 -0
- package/dist/__tests__/headingSourceTitle.test.d.ts +2 -0
- package/dist/__tests__/headingSourceTitle.test.d.ts.map +1 -0
- package/dist/__tests__/headingSourceTitle.test.js +35 -0
- package/dist/__tests__/headingSourceTitle.test.js.map +1 -0
- package/dist/__tests__/headingStyleBreakAfterPagebreak.test.d.ts +2 -0
- package/dist/__tests__/headingStyleBreakAfterPagebreak.test.d.ts.map +1 -0
- package/dist/__tests__/headingStyleBreakAfterPagebreak.test.js +52 -0
- package/dist/__tests__/headingStyleBreakAfterPagebreak.test.js.map +1 -0
- package/dist/__tests__/hiddenHeadings.test.d.ts +2 -0
- package/dist/__tests__/hiddenHeadings.test.d.ts.map +1 -0
- package/dist/__tests__/hiddenHeadings.test.js +137 -0
- package/dist/__tests__/hiddenHeadings.test.js.map +1 -0
- package/dist/__tests__/htmlHostReset.test.d.ts +2 -0
- package/dist/__tests__/htmlHostReset.test.d.ts.map +1 -0
- package/dist/__tests__/htmlHostReset.test.js +63 -0
- package/dist/__tests__/htmlHostReset.test.js.map +1 -0
- package/dist/__tests__/hyphenationLocale.test.d.ts +2 -0
- package/dist/__tests__/hyphenationLocale.test.d.ts.map +1 -0
- package/dist/__tests__/hyphenationLocale.test.js +143 -0
- package/dist/__tests__/hyphenationLocale.test.js.map +1 -0
- package/dist/__tests__/justifyTracking.test.d.ts +2 -0
- package/dist/__tests__/justifyTracking.test.d.ts.map +1 -0
- package/dist/__tests__/justifyTracking.test.js +217 -0
- package/dist/__tests__/justifyTracking.test.js.map +1 -0
- package/dist/__tests__/layoutWorkerClient.test.d.ts +2 -0
- package/dist/__tests__/layoutWorkerClient.test.d.ts.map +1 -0
- package/dist/__tests__/layoutWorkerClient.test.js +140 -0
- package/dist/__tests__/layoutWorkerClient.test.js.map +1 -0
- package/dist/__tests__/links.test.d.ts +2 -0
- package/dist/__tests__/links.test.d.ts.map +1 -0
- package/dist/__tests__/links.test.js +227 -0
- package/dist/__tests__/links.test.js.map +1 -0
- package/dist/__tests__/localisedStrings.test.d.ts +2 -0
- package/dist/__tests__/localisedStrings.test.d.ts.map +1 -0
- package/dist/__tests__/localisedStrings.test.js +118 -0
- package/dist/__tests__/localisedStrings.test.js.map +1 -0
- package/dist/__tests__/looseLines.test.d.ts +2 -0
- package/dist/__tests__/looseLines.test.d.ts.map +1 -0
- package/dist/__tests__/looseLines.test.js +72 -0
- package/dist/__tests__/looseLines.test.js.map +1 -0
- package/dist/__tests__/mainEntryReact.test.d.ts +2 -0
- package/dist/__tests__/mainEntryReact.test.d.ts.map +1 -0
- package/dist/__tests__/mainEntryReact.test.js +13 -0
- package/dist/__tests__/mainEntryReact.test.js.map +1 -0
- package/dist/__tests__/mathBundle.test.d.ts +2 -0
- package/dist/__tests__/mathBundle.test.d.ts.map +1 -0
- package/dist/__tests__/mathBundle.test.js +80 -0
- package/dist/__tests__/mathBundle.test.js.map +1 -0
- package/dist/__tests__/mathEngine.test.d.ts +2 -0
- package/dist/__tests__/mathEngine.test.d.ts.map +1 -0
- package/dist/__tests__/mathEngine.test.js +69 -0
- package/dist/__tests__/mathEngine.test.js.map +1 -0
- package/dist/__tests__/mathEngineInit.test.d.ts +2 -0
- package/dist/__tests__/mathEngineInit.test.d.ts.map +1 -0
- package/dist/__tests__/mathEngineInit.test.js +33 -0
- package/dist/__tests__/mathEngineInit.test.js.map +1 -0
- package/dist/__tests__/mathSize.test.d.ts +2 -0
- package/dist/__tests__/mathSize.test.d.ts.map +1 -0
- package/dist/__tests__/mathSize.test.js +168 -0
- package/dist/__tests__/mathSize.test.js.map +1 -0
- package/dist/__tests__/mathSizeMigration.test.d.ts +2 -0
- package/dist/__tests__/mathSizeMigration.test.d.ts.map +1 -0
- package/dist/__tests__/mathSizeMigration.test.js +188 -0
- package/dist/__tests__/mathSizeMigration.test.js.map +1 -0
- package/dist/__tests__/measureCache.test.js +148 -4
- package/dist/__tests__/measureCache.test.js.map +1 -1
- package/dist/__tests__/measureCacheKeepBreaks.test.d.ts +2 -0
- package/dist/__tests__/measureCacheKeepBreaks.test.d.ts.map +1 -0
- package/dist/__tests__/measureCacheKeepBreaks.test.js +59 -0
- package/dist/__tests__/measureCacheKeepBreaks.test.js.map +1 -0
- package/dist/__tests__/noBreakSpaces.test.d.ts +2 -0
- package/dist/__tests__/noBreakSpaces.test.d.ts.map +1 -0
- package/dist/__tests__/noBreakSpaces.test.js +208 -0
- package/dist/__tests__/noBreakSpaces.test.js.map +1 -0
- package/dist/__tests__/numberFormats.test.d.ts +2 -0
- package/dist/__tests__/numberFormats.test.d.ts.map +1 -0
- package/dist/__tests__/numberFormats.test.js +142 -0
- package/dist/__tests__/numberFormats.test.js.map +1 -0
- package/dist/__tests__/paletteEverywhere.test.d.ts +2 -0
- package/dist/__tests__/paletteEverywhere.test.d.ts.map +1 -0
- package/dist/__tests__/paletteEverywhere.test.js +228 -0
- package/dist/__tests__/paletteEverywhere.test.js.map +1 -0
- package/dist/__tests__/paragraphStyleIndent.test.d.ts +2 -0
- package/dist/__tests__/paragraphStyleIndent.test.d.ts.map +1 -0
- package/dist/__tests__/paragraphStyleIndent.test.js +91 -0
- package/dist/__tests__/paragraphStyleIndent.test.js.map +1 -0
- package/dist/__tests__/parse/attrQuoting.test.d.ts +2 -0
- package/dist/__tests__/parse/attrQuoting.test.d.ts.map +1 -0
- package/dist/__tests__/parse/attrQuoting.test.js +87 -0
- package/dist/__tests__/parse/attrQuoting.test.js.map +1 -0
- package/dist/__tests__/parse/codeSpans.test.d.ts +2 -0
- package/dist/__tests__/parse/codeSpans.test.d.ts.map +1 -0
- package/dist/__tests__/parse/codeSpans.test.js +31 -0
- package/dist/__tests__/parse/codeSpans.test.js.map +1 -0
- package/dist/__tests__/parse/intrawordUnderscore.test.d.ts +2 -0
- package/dist/__tests__/parse/intrawordUnderscore.test.d.ts.map +1 -0
- package/dist/__tests__/parse/intrawordUnderscore.test.js +69 -0
- package/dist/__tests__/parse/intrawordUnderscore.test.js.map +1 -0
- package/dist/__tests__/parse/scripts.test.js +4 -1
- package/dist/__tests__/parse/scripts.test.js.map +1 -1
- package/dist/__tests__/parts.test.js +103 -0
- package/dist/__tests__/parts.test.js.map +1 -1
- package/dist/__tests__/pipeline/balancingRecord.test.d.ts +2 -0
- package/dist/__tests__/pipeline/balancingRecord.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/balancingRecord.test.js +176 -0
- package/dist/__tests__/pipeline/balancingRecord.test.js.map +1 -0
- package/dist/__tests__/pipeline/blockquoteStyle.test.d.ts +2 -0
- package/dist/__tests__/pipeline/blockquoteStyle.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/blockquoteStyle.test.js +99 -0
- package/dist/__tests__/pipeline/blockquoteStyle.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutContinuation.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutContinuation.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutContinuation.test.js +133 -0
- package/dist/__tests__/pipeline/calloutContinuation.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutContinuationInset.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutContinuationInset.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutContinuationInset.test.js +116 -0
- package/dist/__tests__/pipeline/calloutContinuationInset.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutCornerWideIcon.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutCornerWideIcon.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutCornerWideIcon.test.js +69 -0
- package/dist/__tests__/pipeline/calloutCornerWideIcon.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutFloatMargins.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutFloatMargins.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutFloatMargins.test.js +104 -0
- package/dist/__tests__/pipeline/calloutFloatMargins.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutInlineResourceGap.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutInlineResourceGap.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutInlineResourceGap.test.js +148 -0
- package/dist/__tests__/pipeline/calloutInlineResourceGap.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutListColor.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutListColor.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutListColor.test.js +86 -0
- package/dist/__tests__/pipeline/calloutListColor.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutRaggedLines.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutRaggedLines.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutRaggedLines.test.js +65 -0
- package/dist/__tests__/pipeline/calloutRaggedLines.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutRuntTracking.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutRuntTracking.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutRuntTracking.test.js +84 -0
- package/dist/__tests__/pipeline/calloutRuntTracking.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutSplitMinLinesChild.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutSplitMinLinesChild.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutSplitMinLinesChild.test.js +187 -0
- package/dist/__tests__/pipeline/calloutSplitMinLinesChild.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutStripeRadius.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutStripeRadius.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutStripeRadius.test.js +127 -0
- package/dist/__tests__/pipeline/calloutStripeRadius.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutTitleLineHeight.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutTitleLineHeight.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutTitleLineHeight.test.js +81 -0
- package/dist/__tests__/pipeline/calloutTitleLineHeight.test.js.map +1 -0
- package/dist/__tests__/pipeline/calloutTypography.test.d.ts +2 -0
- package/dist/__tests__/pipeline/calloutTypography.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/calloutTypography.test.js +97 -0
- package/dist/__tests__/pipeline/calloutTypography.test.js.map +1 -0
- package/dist/__tests__/pipeline/capUnderHeadFloats.test.d.ts +2 -0
- package/dist/__tests__/pipeline/capUnderHeadFloats.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/capUnderHeadFloats.test.js +68 -0
- package/dist/__tests__/pipeline/capUnderHeadFloats.test.js.map +1 -0
- package/dist/__tests__/pipeline/captionAlign.test.d.ts +2 -0
- package/dist/__tests__/pipeline/captionAlign.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/captionAlign.test.js +99 -0
- package/dist/__tests__/pipeline/captionAlign.test.js.map +1 -0
- package/dist/__tests__/pipeline/chipPalette.test.d.ts +2 -0
- package/dist/__tests__/pipeline/chipPalette.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/chipPalette.test.js +80 -0
- package/dist/__tests__/pipeline/chipPalette.test.js.map +1 -0
- package/dist/__tests__/pipeline/chipVerticalPadding.test.d.ts +2 -0
- package/dist/__tests__/pipeline/chipVerticalPadding.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/chipVerticalPadding.test.js +66 -0
- package/dist/__tests__/pipeline/chipVerticalPadding.test.js.map +1 -0
- package/dist/__tests__/pipeline/chips.test.js +32 -0
- package/dist/__tests__/pipeline/chips.test.js.map +1 -1
- package/dist/__tests__/pipeline/closingBoxLever.test.d.ts +2 -0
- package/dist/__tests__/pipeline/closingBoxLever.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/closingBoxLever.test.js +68 -0
- package/dist/__tests__/pipeline/closingBoxLever.test.js.map +1 -0
- package/dist/__tests__/pipeline/closingBoxOrder.test.d.ts +2 -0
- package/dist/__tests__/pipeline/closingBoxOrder.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/closingBoxOrder.test.js +87 -0
- package/dist/__tests__/pipeline/closingBoxOrder.test.js.map +1 -0
- package/dist/__tests__/pipeline/closingPageAfterFloat.test.d.ts +2 -0
- package/dist/__tests__/pipeline/closingPageAfterFloat.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/closingPageAfterFloat.test.js +159 -0
- package/dist/__tests__/pipeline/closingPageAfterFloat.test.js.map +1 -0
- package/dist/__tests__/pipeline/closingPageAfterFloatPage.test.d.ts +2 -0
- package/dist/__tests__/pipeline/closingPageAfterFloatPage.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/closingPageAfterFloatPage.test.js +90 -0
- package/dist/__tests__/pipeline/closingPageAfterFloatPage.test.js.map +1 -0
- package/dist/__tests__/pipeline/colonBalancing.test.js +19 -15
- package/dist/__tests__/pipeline/colonBalancing.test.js.map +1 -1
- package/dist/__tests__/pipeline/colonListRoom.test.d.ts +2 -0
- package/dist/__tests__/pipeline/colonListRoom.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/colonListRoom.test.js +127 -0
- package/dist/__tests__/pipeline/colonListRoom.test.js.map +1 -0
- package/dist/__tests__/pipeline/columnWidthRebreak.test.d.ts +2 -0
- package/dist/__tests__/pipeline/columnWidthRebreak.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/columnWidthRebreak.test.js +124 -0
- package/dist/__tests__/pipeline/columnWidthRebreak.test.js.map +1 -0
- package/dist/__tests__/pipeline/compoundBreaks.test.d.ts +2 -0
- package/dist/__tests__/pipeline/compoundBreaks.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/compoundBreaks.test.js +368 -0
- package/dist/__tests__/pipeline/compoundBreaks.test.js.map +1 -0
- package/dist/__tests__/pipeline/continuationUnderFloat.test.d.ts +2 -0
- package/dist/__tests__/pipeline/continuationUnderFloat.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/continuationUnderFloat.test.js +64 -0
- package/dist/__tests__/pipeline/continuationUnderFloat.test.js.map +1 -0
- package/dist/__tests__/pipeline/crossChapterRef.test.d.ts +2 -0
- package/dist/__tests__/pipeline/crossChapterRef.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/crossChapterRef.test.js +124 -0
- package/dist/__tests__/pipeline/crossChapterRef.test.js.map +1 -0
- package/dist/__tests__/pipeline/dashBreaks.test.d.ts +2 -0
- package/dist/__tests__/pipeline/dashBreaks.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/dashBreaks.test.js +358 -0
- package/dist/__tests__/pipeline/dashBreaks.test.js.map +1 -0
- package/dist/__tests__/pipeline/defaultOpenerPaint.test.d.ts +2 -0
- package/dist/__tests__/pipeline/defaultOpenerPaint.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/defaultOpenerPaint.test.js +128 -0
- package/dist/__tests__/pipeline/defaultOpenerPaint.test.js.map +1 -0
- package/dist/__tests__/pipeline/displayMathFlow.test.d.ts +2 -0
- package/dist/__tests__/pipeline/displayMathFlow.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/displayMathFlow.test.js +156 -0
- package/dist/__tests__/pipeline/displayMathFlow.test.js.map +1 -0
- package/dist/__tests__/pipeline/emptyResourceTemplate.test.d.ts +2 -0
- package/dist/__tests__/pipeline/emptyResourceTemplate.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/emptyResourceTemplate.test.js +66 -0
- package/dist/__tests__/pipeline/emptyResourceTemplate.test.js.map +1 -0
- package/dist/__tests__/pipeline/figureBodyAlign.test.d.ts +2 -0
- package/dist/__tests__/pipeline/figureBodyAlign.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/figureBodyAlign.test.js +92 -0
- package/dist/__tests__/pipeline/figureBodyAlign.test.js.map +1 -0
- package/dist/__tests__/pipeline/floatAfterCitingLine.test.d.ts +2 -0
- package/dist/__tests__/pipeline/floatAfterCitingLine.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/floatAfterCitingLine.test.js +217 -0
- package/dist/__tests__/pipeline/floatAfterCitingLine.test.js.map +1 -0
- package/dist/__tests__/pipeline/floatFirstSlot.test.js +15 -0
- package/dist/__tests__/pipeline/floatFirstSlot.test.js.map +1 -1
- package/dist/__tests__/pipeline/floatOverInlineResource.test.d.ts +2 -0
- package/dist/__tests__/pipeline/floatOverInlineResource.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/floatOverInlineResource.test.js +75 -0
- package/dist/__tests__/pipeline/floatOverInlineResource.test.js.map +1 -0
- package/dist/__tests__/pipeline/floatPlacementRules.test.d.ts +2 -0
- package/dist/__tests__/pipeline/floatPlacementRules.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/floatPlacementRules.test.js +177 -0
- package/dist/__tests__/pipeline/floatPlacementRules.test.js.map +1 -0
- package/dist/__tests__/pipeline/floatSlots.test.js +35 -1
- package/dist/__tests__/pipeline/floatSlots.test.js.map +1 -1
- package/dist/__tests__/pipeline/hardHyphenBreaks.test.d.ts +2 -0
- package/dist/__tests__/pipeline/hardHyphenBreaks.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/hardHyphenBreaks.test.js +165 -0
- package/dist/__tests__/pipeline/hardHyphenBreaks.test.js.map +1 -0
- package/dist/__tests__/pipeline/headingDesignCuts.test.d.ts +2 -0
- package/dist/__tests__/pipeline/headingDesignCuts.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/headingDesignCuts.test.js +96 -0
- package/dist/__tests__/pipeline/headingDesignCuts.test.js.map +1 -0
- package/dist/__tests__/pipeline/headingSnapPerLevel.test.d.ts +2 -0
- package/dist/__tests__/pipeline/headingSnapPerLevel.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/headingSnapPerLevel.test.js +97 -0
- package/dist/__tests__/pipeline/headingSnapPerLevel.test.js.map +1 -0
- package/dist/__tests__/pipeline/headingSplitOrphans.test.d.ts +2 -0
- package/dist/__tests__/pipeline/headingSplitOrphans.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/headingSplitOrphans.test.js +134 -0
- package/dist/__tests__/pipeline/headingSplitOrphans.test.js.map +1 -0
- package/dist/__tests__/pipeline/hyphenAcrossColumns.test.d.ts +2 -0
- package/dist/__tests__/pipeline/hyphenAcrossColumns.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/hyphenAcrossColumns.test.js +232 -0
- package/dist/__tests__/pipeline/hyphenAcrossColumns.test.js.map +1 -0
- package/dist/__tests__/pipeline/indentAfterOutOfFlow.test.d.ts +2 -0
- package/dist/__tests__/pipeline/indentAfterOutOfFlow.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/indentAfterOutOfFlow.test.js +93 -0
- package/dist/__tests__/pipeline/indentAfterOutOfFlow.test.js.map +1 -0
- package/dist/__tests__/pipeline/inlineFigureSpace.test.d.ts +2 -0
- package/dist/__tests__/pipeline/inlineFigureSpace.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/inlineFigureSpace.test.js +195 -0
- package/dist/__tests__/pipeline/inlineFigureSpace.test.js.map +1 -0
- package/dist/__tests__/pipeline/lineSourceEdges.test.d.ts +2 -0
- package/dist/__tests__/pipeline/lineSourceEdges.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/lineSourceEdges.test.js +143 -0
- package/dist/__tests__/pipeline/lineSourceEdges.test.js.map +1 -0
- package/dist/__tests__/pipeline/lineSourceRanges.test.d.ts +2 -0
- package/dist/__tests__/pipeline/lineSourceRanges.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/lineSourceRanges.test.js +96 -0
- package/dist/__tests__/pipeline/lineSourceRanges.test.js.map +1 -0
- package/dist/__tests__/pipeline/listTopSnap.test.d.ts +2 -0
- package/dist/__tests__/pipeline/listTopSnap.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/listTopSnap.test.js +90 -0
- package/dist/__tests__/pipeline/listTopSnap.test.js.map +1 -0
- package/dist/__tests__/pipeline/looseParagraphLimit.test.d.ts +2 -0
- package/dist/__tests__/pipeline/looseParagraphLimit.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/looseParagraphLimit.test.js +63 -0
- package/dist/__tests__/pipeline/looseParagraphLimit.test.js.map +1 -0
- package/dist/__tests__/pipeline/nestedListSpacing.test.d.ts +2 -0
- package/dist/__tests__/pipeline/nestedListSpacing.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/nestedListSpacing.test.js +62 -0
- package/dist/__tests__/pipeline/nestedListSpacing.test.js.map +1 -0
- package/dist/__tests__/pipeline/openerColumnStarts.test.d.ts +2 -0
- package/dist/__tests__/pipeline/openerColumnStarts.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/openerColumnStarts.test.js +189 -0
- package/dist/__tests__/pipeline/openerColumnStarts.test.js.map +1 -0
- package/dist/__tests__/pipeline/openerFillsPage.test.d.ts +2 -0
- package/dist/__tests__/pipeline/openerFillsPage.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/openerFillsPage.test.js +133 -0
- package/dist/__tests__/pipeline/openerFillsPage.test.js.map +1 -0
- package/dist/__tests__/pipeline/openerTallerThanColumn.test.d.ts +2 -0
- package/dist/__tests__/pipeline/openerTallerThanColumn.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/openerTallerThanColumn.test.js +139 -0
- package/dist/__tests__/pipeline/openerTallerThanColumn.test.js.map +1 -0
- package/dist/__tests__/pipeline/orderedNumberWidth.test.d.ts +2 -0
- package/dist/__tests__/pipeline/orderedNumberWidth.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/orderedNumberWidth.test.js +69 -0
- package/dist/__tests__/pipeline/orderedNumberWidth.test.js.map +1 -0
- package/dist/__tests__/pipeline/pageSpanHeadingWidth.test.d.ts +2 -0
- package/dist/__tests__/pipeline/pageSpanHeadingWidth.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/pageSpanHeadingWidth.test.js +74 -0
- package/dist/__tests__/pipeline/pageSpanHeadingWidth.test.js.map +1 -0
- package/dist/__tests__/pipeline/paragraphContainerTail.test.d.ts +2 -0
- package/dist/__tests__/pipeline/paragraphContainerTail.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/paragraphContainerTail.test.js +218 -0
- package/dist/__tests__/pipeline/paragraphContainerTail.test.js.map +1 -0
- package/dist/__tests__/pipeline/paragraphStyleFaces.test.d.ts +2 -0
- package/dist/__tests__/pipeline/paragraphStyleFaces.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/paragraphStyleFaces.test.js +121 -0
- package/dist/__tests__/pipeline/paragraphStyleFaces.test.js.map +1 -0
- package/dist/__tests__/pipeline/paragraphStyles.test.js +85 -0
- package/dist/__tests__/pipeline/paragraphStyles.test.js.map +1 -1
- package/dist/__tests__/pipeline/raggedOptimal.test.d.ts +2 -0
- package/dist/__tests__/pipeline/raggedOptimal.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/raggedOptimal.test.js +231 -0
- package/dist/__tests__/pipeline/raggedOptimal.test.js.map +1 -0
- package/dist/__tests__/pipeline/resolvedPaletteCopy.test.d.ts +2 -0
- package/dist/__tests__/pipeline/resolvedPaletteCopy.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/resolvedPaletteCopy.test.js +68 -0
- package/dist/__tests__/pipeline/resolvedPaletteCopy.test.js.map +1 -0
- package/dist/__tests__/pipeline/resourceNumberingRules.test.d.ts +2 -0
- package/dist/__tests__/pipeline/resourceNumberingRules.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/resourceNumberingRules.test.js +103 -0
- package/dist/__tests__/pipeline/resourceNumberingRules.test.js.map +1 -0
- package/dist/__tests__/pipeline/sectionPageOwnership.test.d.ts +2 -0
- package/dist/__tests__/pipeline/sectionPageOwnership.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/sectionPageOwnership.test.js +89 -0
- package/dist/__tests__/pipeline/sectionPageOwnership.test.js.map +1 -0
- package/dist/__tests__/pipeline/sectionPaletteSharedBase.test.d.ts +2 -0
- package/dist/__tests__/pipeline/sectionPaletteSharedBase.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/sectionPaletteSharedBase.test.js +278 -0
- package/dist/__tests__/pipeline/sectionPaletteSharedBase.test.js.map +1 -0
- package/dist/__tests__/pipeline/sectionPaletteTables.test.d.ts +2 -0
- package/dist/__tests__/pipeline/sectionPaletteTables.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/sectionPaletteTables.test.js +104 -0
- package/dist/__tests__/pipeline/sectionPaletteTables.test.js.map +1 -0
- package/dist/__tests__/pipeline/sideBoxAtColumnEnd.test.d.ts +2 -0
- package/dist/__tests__/pipeline/sideBoxAtColumnEnd.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/sideBoxAtColumnEnd.test.js +176 -0
- package/dist/__tests__/pipeline/sideBoxAtColumnEnd.test.js.map +1 -0
- package/dist/__tests__/pipeline/sideColumnPercent.test.d.ts +2 -0
- package/dist/__tests__/pipeline/sideColumnPercent.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/sideColumnPercent.test.js +114 -0
- package/dist/__tests__/pipeline/sideColumnPercent.test.js.map +1 -0
- package/dist/__tests__/pipeline/snippetDollarEscape.test.d.ts +2 -0
- package/dist/__tests__/pipeline/snippetDollarEscape.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/snippetDollarEscape.test.js +112 -0
- package/dist/__tests__/pipeline/snippetDollarEscape.test.js.map +1 -0
- package/dist/__tests__/pipeline/snippetLineBreaks.test.d.ts +2 -0
- package/dist/__tests__/pipeline/snippetLineBreaks.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/snippetLineBreaks.test.js +178 -0
- package/dist/__tests__/pipeline/snippetLineBreaks.test.js.map +1 -0
- package/dist/__tests__/pipeline/spanCutUnderColumnFloat.test.d.ts +2 -0
- package/dist/__tests__/pipeline/spanCutUnderColumnFloat.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/spanCutUnderColumnFloat.test.js +90 -0
- package/dist/__tests__/pipeline/spanCutUnderColumnFloat.test.js.map +1 -0
- package/dist/__tests__/pipeline/splitBoxCappedBand.test.d.ts +2 -0
- package/dist/__tests__/pipeline/splitBoxCappedBand.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/splitBoxCappedBand.test.js +64 -0
- package/dist/__tests__/pipeline/splitBoxCappedBand.test.js.map +1 -0
- package/dist/__tests__/pipeline/tableCellNoBreakSpaces.test.d.ts +2 -0
- package/dist/__tests__/pipeline/tableCellNoBreakSpaces.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/tableCellNoBreakSpaces.test.js +97 -0
- package/dist/__tests__/pipeline/tableCellNoBreakSpaces.test.js.map +1 -0
- package/dist/__tests__/pipeline/tableHeaderTracking.test.d.ts +2 -0
- package/dist/__tests__/pipeline/tableHeaderTracking.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/tableHeaderTracking.test.js +139 -0
- package/dist/__tests__/pipeline/tableHeaderTracking.test.js.map +1 -0
- package/dist/__tests__/pipeline/tableSplitTextRoom.test.d.ts +2 -0
- package/dist/__tests__/pipeline/tableSplitTextRoom.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/tableSplitTextRoom.test.js +90 -0
- package/dist/__tests__/pipeline/tableSplitTextRoom.test.js.map +1 -0
- package/dist/__tests__/pipeline/tableStyles.test.js +94 -1
- package/dist/__tests__/pipeline/tableStyles.test.js.map +1 -1
- package/dist/__tests__/pipeline/tallParagraphShortColumn.test.d.ts +2 -0
- package/dist/__tests__/pipeline/tallParagraphShortColumn.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/tallParagraphShortColumn.test.js +79 -0
- package/dist/__tests__/pipeline/tallParagraphShortColumn.test.js.map +1 -0
- package/dist/__tests__/pipeline/textFaces.test.d.ts +2 -0
- package/dist/__tests__/pipeline/textFaces.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/textFaces.test.js +258 -0
- package/dist/__tests__/pipeline/textFaces.test.js.map +1 -0
- package/dist/__tests__/pipeline/trailingBand.test.js +29 -0
- package/dist/__tests__/pipeline/trailingBand.test.js.map +1 -1
- package/dist/__tests__/pipeline/trailingCapHeading.test.d.ts +2 -0
- package/dist/__tests__/pipeline/trailingCapHeading.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/trailingCapHeading.test.js +69 -0
- package/dist/__tests__/pipeline/trailingCapHeading.test.js.map +1 -0
- package/dist/__tests__/pipeline/trailingCapOverflow.test.d.ts +2 -0
- package/dist/__tests__/pipeline/trailingCapOverflow.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/trailingCapOverflow.test.js +116 -0
- package/dist/__tests__/pipeline/trailingCapOverflow.test.js.map +1 -0
- package/dist/__tests__/placeholders.test.js +100 -2
- package/dist/__tests__/placeholders.test.js.map +1 -1
- package/dist/__tests__/punctuationGlue.test.d.ts +2 -0
- package/dist/__tests__/punctuationGlue.test.d.ts.map +1 -0
- package/dist/__tests__/punctuationGlue.test.js +165 -0
- package/dist/__tests__/punctuationGlue.test.js.map +1 -0
- package/dist/__tests__/raggedHyphenation.test.d.ts +2 -0
- package/dist/__tests__/raggedHyphenation.test.d.ts.map +1 -0
- package/dist/__tests__/raggedHyphenation.test.js +184 -0
- package/dist/__tests__/raggedHyphenation.test.js.map +1 -0
- package/dist/__tests__/renderWarnings.test.d.ts +2 -0
- package/dist/__tests__/renderWarnings.test.d.ts.map +1 -0
- package/dist/__tests__/renderWarnings.test.js +72 -0
- package/dist/__tests__/renderWarnings.test.js.map +1 -0
- package/dist/__tests__/resolvedLocale.test.d.ts +2 -0
- package/dist/__tests__/resolvedLocale.test.d.ts.map +1 -0
- package/dist/__tests__/resolvedLocale.test.js +51 -0
- package/dist/__tests__/resolvedLocale.test.js.map +1 -0
- package/dist/__tests__/runningChapter.test.d.ts +2 -0
- package/dist/__tests__/runningChapter.test.d.ts.map +1 -0
- package/dist/__tests__/runningChapter.test.js +161 -0
- package/dist/__tests__/runningChapter.test.js.map +1 -0
- package/dist/__tests__/runtFixStretchLimit.test.d.ts +2 -0
- package/dist/__tests__/runtFixStretchLimit.test.d.ts.map +1 -0
- package/dist/__tests__/runtFixStretchLimit.test.js +145 -0
- package/dist/__tests__/runtFixStretchLimit.test.js.map +1 -0
- package/dist/__tests__/scriptStacking.test.d.ts +2 -0
- package/dist/__tests__/scriptStacking.test.d.ts.map +1 -0
- package/dist/__tests__/scriptStacking.test.js +331 -0
- package/dist/__tests__/scriptStacking.test.js.map +1 -0
- package/dist/__tests__/sectionPaletteFlow.test.d.ts +2 -0
- package/dist/__tests__/sectionPaletteFlow.test.d.ts.map +1 -0
- package/dist/__tests__/sectionPaletteFlow.test.js +51 -0
- package/dist/__tests__/sectionPaletteFlow.test.js.map +1 -0
- package/dist/__tests__/singleInk.test.js +64 -2
- package/dist/__tests__/singleInk.test.js.map +1 -1
- package/dist/__tests__/singleInkRender.test.d.ts +2 -0
- package/dist/__tests__/singleInkRender.test.d.ts.map +1 -0
- package/dist/__tests__/singleInkRender.test.js +396 -0
- package/dist/__tests__/singleInkRender.test.js.map +1 -0
- package/dist/__tests__/spaceDirective.test.js +75 -0
- package/dist/__tests__/spaceDirective.test.js.map +1 -1
- package/dist/__tests__/table/model.test.js +124 -1
- package/dist/__tests__/table/model.test.js.map +1 -1
- package/dist/__tests__/tableFillSeams.test.d.ts +2 -0
- package/dist/__tests__/tableFillSeams.test.d.ts.map +1 -0
- package/dist/__tests__/tableFillSeams.test.js +180 -0
- package/dist/__tests__/tableFillSeams.test.js.map +1 -0
- package/dist/__tests__/toc.test.js +23 -2
- package/dist/__tests__/toc.test.js.map +1 -1
- package/dist/__tests__/tocLeaderKerning.test.d.ts +2 -0
- package/dist/__tests__/tocLeaderKerning.test.d.ts.map +1 -0
- package/dist/__tests__/tocLeaderKerning.test.js +83 -0
- package/dist/__tests__/tocLeaderKerning.test.js.map +1 -0
- package/dist/__tests__/tocNumberBaseline.test.d.ts +2 -0
- package/dist/__tests__/tocNumberBaseline.test.d.ts.map +1 -0
- package/dist/__tests__/tocNumberBaseline.test.js +90 -0
- package/dist/__tests__/tocNumberBaseline.test.js.map +1 -0
- package/dist/__tests__/tocPartsHeight.test.d.ts +2 -0
- package/dist/__tests__/tocPartsHeight.test.d.ts.map +1 -0
- package/dist/__tests__/tocPartsHeight.test.js +41 -0
- package/dist/__tests__/tocPartsHeight.test.js.map +1 -0
- package/dist/__tests__/trackedLineAlign.test.d.ts +2 -0
- package/dist/__tests__/trackedLineAlign.test.d.ts.map +1 -0
- package/dist/__tests__/trackedLineAlign.test.js +96 -0
- package/dist/__tests__/trackedLineAlign.test.js.map +1 -0
- package/dist/bundle/adapters.d.ts +10 -3
- package/dist/bundle/adapters.d.ts.map +1 -1
- package/dist/bundle/adapters.js +13 -5
- package/dist/bundle/adapters.js.map +1 -1
- package/dist/bundle/api.d.ts +32 -0
- package/dist/bundle/api.d.ts.map +1 -1
- package/dist/bundle/api.js +12 -2
- package/dist/bundle/api.js.map +1 -1
- package/dist/bundle/book.d.ts +6 -1
- package/dist/bundle/book.d.ts.map +1 -1
- package/dist/bundle/book.js +89 -17
- package/dist/bundle/book.js.map +1 -1
- package/dist/bundle/codec.d.ts +87 -3
- package/dist/bundle/codec.d.ts.map +1 -1
- package/dist/bundle/codec.js +193 -13
- package/dist/bundle/codec.js.map +1 -1
- package/dist/bundle/configVersion.d.ts +295 -0
- package/dist/bundle/configVersion.d.ts.map +1 -0
- package/dist/bundle/configVersion.js +788 -0
- package/dist/bundle/configVersion.js.map +1 -0
- package/dist/bundle/index.d.ts +6 -4
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +2 -1
- package/dist/bundle/index.js.map +1 -1
- package/dist/bundle/manifest.d.ts +19 -5
- package/dist/bundle/manifest.d.ts.map +1 -1
- package/dist/bundle/manifest.js +53 -21
- package/dist/bundle/manifest.js.map +1 -1
- package/dist/bundle/types.d.ts +19 -0
- package/dist/bundle/types.d.ts.map +1 -1
- package/dist/bundle/zip.d.ts +14 -1
- package/dist/bundle/zip.d.ts.map +1 -1
- package/dist/bundle/zip.js +13 -2
- package/dist/bundle/zip.js.map +1 -1
- package/dist/canvas-backend/blockRender.d.ts +3 -1
- package/dist/canvas-backend/blockRender.d.ts.map +1 -1
- package/dist/canvas-backend/blockRender.js +27 -17
- package/dist/canvas-backend/blockRender.js.map +1 -1
- package/dist/canvas-backend/decorations.d.ts.map +1 -1
- package/dist/canvas-backend/decorations.js +6 -36
- package/dist/canvas-backend/decorations.js.map +1 -1
- package/dist/canvas-backend/headerFooter.d.ts +3 -1
- package/dist/canvas-backend/headerFooter.d.ts.map +1 -1
- package/dist/canvas-backend/headerFooter.js +85 -22
- package/dist/canvas-backend/headerFooter.js.map +1 -1
- package/dist/canvas-backend/index.d.ts +17 -3
- package/dist/canvas-backend/index.d.ts.map +1 -1
- package/dist/canvas-backend/index.js +75 -14
- package/dist/canvas-backend/index.js.map +1 -1
- package/dist/canvas-backend/renderResourceBlock.d.ts +45 -5
- package/dist/canvas-backend/renderResourceBlock.d.ts.map +1 -1
- package/dist/canvas-backend/renderResourceBlock.js +133 -22
- package/dist/canvas-backend/renderResourceBlock.js.map +1 -1
- package/dist/columnClip.d.ts +13 -2
- package/dist/columnClip.d.ts.map +1 -1
- package/dist/columnClip.js +37 -4
- package/dist/columnClip.js.map +1 -1
- package/dist/columnRule.d.ts +7 -2
- package/dist/columnRule.d.ts.map +1 -1
- package/dist/columnRule.js +27 -2
- package/dist/columnRule.js.map +1 -1
- package/dist/configWarnings.d.ts +26 -0
- package/dist/configWarnings.d.ts.map +1 -0
- package/dist/configWarnings.js +223 -0
- package/dist/configWarnings.js.map +1 -0
- package/dist/createLayout.d.ts +16 -1
- package/dist/createLayout.d.ts.map +1 -1
- package/dist/createLayout.js +25 -22
- package/dist/createLayout.js.map +1 -1
- package/dist/cropMarks.d.ts +28 -0
- package/dist/cropMarks.d.ts.map +1 -0
- package/dist/cropMarks.js +40 -0
- package/dist/cropMarks.js.map +1 -0
- package/dist/defaults/bodyText.d.ts +12 -2
- package/dist/defaults/bodyText.d.ts.map +1 -1
- package/dist/defaults/bodyText.js +132 -7
- package/dist/defaults/bodyText.js.map +1 -1
- package/dist/defaults/calloutStyles.d.ts +13 -2
- package/dist/defaults/calloutStyles.d.ts.map +1 -1
- package/dist/defaults/calloutStyles.js +64 -4
- package/dist/defaults/calloutStyles.js.map +1 -1
- package/dist/defaults/chipStyles.d.ts +4 -3
- package/dist/defaults/chipStyles.d.ts.map +1 -1
- package/dist/defaults/chipStyles.js +11 -3
- package/dist/defaults/chipStyles.js.map +1 -1
- package/dist/defaults/headerFooter.d.ts +11 -1
- package/dist/defaults/headerFooter.d.ts.map +1 -1
- package/dist/defaults/headerFooter.js +52 -4
- package/dist/defaults/headerFooter.js.map +1 -1
- package/dist/defaults/headingStyles.d.ts +7 -3
- package/dist/defaults/headingStyles.d.ts.map +1 -1
- package/dist/defaults/headingStyles.js +34 -6
- package/dist/defaults/headingStyles.js.map +1 -1
- package/dist/defaults/headings.d.ts +10 -2
- package/dist/defaults/headings.d.ts.map +1 -1
- package/dist/defaults/headings.js +79 -16
- package/dist/defaults/headings.js.map +1 -1
- package/dist/defaults/index.d.ts +1 -1
- package/dist/defaults/index.d.ts.map +1 -1
- package/dist/defaults/index.js +1 -1
- package/dist/defaults/index.js.map +1 -1
- package/dist/defaults/layout.d.ts.map +1 -1
- package/dist/defaults/layout.js +27 -0
- package/dist/defaults/layout.js.map +1 -1
- package/dist/defaults/lists-shared.d.ts +2 -0
- package/dist/defaults/lists-shared.d.ts.map +1 -1
- package/dist/defaults/lists-shared.js +2 -0
- package/dist/defaults/lists-shared.js.map +1 -1
- package/dist/defaults/math.d.ts.map +1 -1
- package/dist/defaults/math.js +12 -0
- package/dist/defaults/math.js.map +1 -1
- package/dist/defaults/orderedLists.d.ts +7 -1
- package/dist/defaults/orderedLists.d.ts.map +1 -1
- package/dist/defaults/orderedLists.js +30 -4
- package/dist/defaults/orderedLists.js.map +1 -1
- package/dist/defaults/page.d.ts.map +1 -1
- package/dist/defaults/page.js +7 -2
- package/dist/defaults/page.js.map +1 -1
- package/dist/defaults/paragraphStyles.d.ts +2 -1
- package/dist/defaults/paragraphStyles.d.ts.map +1 -1
- package/dist/defaults/paragraphStyles.js +26 -1
- package/dist/defaults/paragraphStyles.js.map +1 -1
- package/dist/defaults/resourceTypes.d.ts +5 -1
- package/dist/defaults/resourceTypes.d.ts.map +1 -1
- package/dist/defaults/resourceTypes.js +37 -6
- package/dist/defaults/resourceTypes.js.map +1 -1
- package/dist/defaults/shared.d.ts +10 -0
- package/dist/defaults/shared.d.ts.map +1 -1
- package/dist/defaults/shared.js +79 -0
- package/dist/defaults/shared.js.map +1 -1
- package/dist/defaults/tableStyle.d.ts +1 -1
- package/dist/defaults/tableStyle.d.ts.map +1 -1
- package/dist/defaults/tableStyle.js +40 -6
- package/dist/defaults/tableStyle.js.map +1 -1
- package/dist/defaults/toc.d.ts +2 -1
- package/dist/defaults/toc.d.ts.map +1 -1
- package/dist/defaults/toc.js +2 -1
- package/dist/defaults/toc.js.map +1 -1
- package/dist/defaults/unorderedLists.d.ts +1 -0
- package/dist/defaults/unorderedLists.d.ts.map +1 -1
- package/dist/defaults/unorderedLists.js +7 -1
- package/dist/defaults/unorderedLists.js.map +1 -1
- package/dist/design/layout.d.ts +41 -3
- package/dist/design/layout.d.ts.map +1 -1
- package/dist/design/layout.js +322 -90
- package/dist/design/layout.js.map +1 -1
- package/dist/design/placeholders.d.ts +39 -4
- package/dist/design/placeholders.d.ts.map +1 -1
- package/dist/design/placeholders.js +61 -11
- package/dist/design/placeholders.js.map +1 -1
- package/dist/design/richText.d.ts +110 -0
- package/dist/design/richText.d.ts.map +1 -0
- package/dist/design/richText.js +458 -0
- package/dist/design/richText.js.map +1 -0
- package/dist/frontmatter.d.ts +14 -0
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +61 -0
- package/dist/frontmatter.js.map +1 -1
- package/dist/html-backend.d.ts +60 -2
- package/dist/html-backend.d.ts.map +1 -1
- package/dist/html-backend.js +317 -62
- package/dist/html-backend.js.map +1 -1
- package/dist/hyphenate.d.ts +30 -4
- package/dist/hyphenate.d.ts.map +1 -1
- package/dist/hyphenate.js +71 -5
- package/dist/hyphenate.js.map +1 -1
- package/dist/index.d.ts +28 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -11
- package/dist/index.js.map +1 -1
- package/dist/knuthPlass/breakpoints.d.ts +21 -0
- package/dist/knuthPlass/breakpoints.d.ts.map +1 -1
- package/dist/knuthPlass/breakpoints.js +205 -14
- package/dist/knuthPlass/breakpoints.js.map +1 -1
- package/dist/knuthPlass/constants.d.ts +15 -0
- package/dist/knuthPlass/constants.d.ts.map +1 -1
- package/dist/knuthPlass/constants.js +15 -0
- package/dist/knuthPlass/constants.js.map +1 -1
- package/dist/knuthPlass/pretextAdapter.d.ts +23 -2
- package/dist/knuthPlass/pretextAdapter.d.ts.map +1 -1
- package/dist/knuthPlass/pretextAdapter.js +95 -9
- package/dist/knuthPlass/pretextAdapter.js.map +1 -1
- package/dist/knuthPlass/richAdapter.d.ts +26 -2
- package/dist/knuthPlass/richAdapter.d.ts.map +1 -1
- package/dist/knuthPlass/richAdapter.js +79 -18
- package/dist/knuthPlass/richAdapter.js.map +1 -1
- package/dist/knuthPlass/tracking.d.ts +24 -0
- package/dist/knuthPlass/tracking.d.ts.map +1 -0
- package/dist/knuthPlass/tracking.js +77 -0
- package/dist/knuthPlass/tracking.js.map +1 -0
- package/dist/knuthPlass/types.d.ts +66 -4
- package/dist/knuthPlass/types.d.ts.map +1 -1
- package/dist/lineInk.d.ts +12 -0
- package/dist/lineInk.d.ts.map +1 -0
- package/dist/lineInk.js +20 -0
- package/dist/lineInk.js.map +1 -0
- package/dist/locale.d.ts +26 -0
- package/dist/locale.d.ts.map +1 -0
- package/dist/locale.js +63 -0
- package/dist/locale.js.map +1 -0
- package/dist/looseLines.d.ts +44 -0
- package/dist/looseLines.d.ts.map +1 -0
- package/dist/looseLines.js +46 -0
- package/dist/looseLines.js.map +1 -0
- package/dist/math/THIRD_PARTY_LICENSES.txt +221 -0
- package/dist/math/engine.d.ts +24 -0
- package/dist/math/engine.d.ts.map +1 -1
- package/dist/math/engine.js +252 -83
- package/dist/math/engine.js.map +1 -1
- package/dist/math/index.d.ts +1 -1
- package/dist/math/index.d.ts.map +1 -1
- package/dist/math/index.js +1 -1
- package/dist/math/index.js.map +1 -1
- package/dist/math/mathjax.d.ts +20 -0
- package/dist/math/mathjax.d.ts.map +1 -0
- package/dist/math/mathjax.js +29 -0
- package/dist/measure/breakRules.d.ts +50 -0
- package/dist/measure/breakRules.d.ts.map +1 -0
- package/dist/measure/breakRules.js +116 -0
- package/dist/measure/breakRules.js.map +1 -0
- package/dist/measure/cache.d.ts.map +1 -1
- package/dist/measure/cache.js +26 -5
- package/dist/measure/cache.js.map +1 -1
- package/dist/measure/cjk.d.ts +19 -0
- package/dist/measure/cjk.d.ts.map +1 -0
- package/dist/measure/cjk.js +70 -0
- package/dist/measure/cjk.js.map +1 -0
- package/dist/measure/font.d.ts +21 -5
- package/dist/measure/font.d.ts.map +1 -1
- package/dist/measure/font.js +61 -4
- package/dist/measure/font.js.map +1 -1
- package/dist/measure/index.d.ts +16 -2
- package/dist/measure/index.d.ts.map +1 -1
- package/dist/measure/index.js +61 -1
- package/dist/measure/index.js.map +1 -1
- package/dist/measure/links.d.ts +15 -0
- package/dist/measure/links.d.ts.map +1 -0
- package/dist/measure/links.js +115 -0
- package/dist/measure/links.js.map +1 -0
- package/dist/measure/plain.d.ts +10 -2
- package/dist/measure/plain.d.ts.map +1 -1
- package/dist/measure/plain.js +175 -25
- package/dist/measure/plain.js.map +1 -1
- package/dist/measure/rich.d.ts +86 -6
- package/dist/measure/rich.d.ts.map +1 -1
- package/dist/measure/rich.js +808 -131
- package/dist/measure/rich.js.map +1 -1
- package/dist/measure/spaces.d.ts +34 -0
- package/dist/measure/spaces.d.ts.map +1 -0
- package/dist/measure/spaces.js +42 -0
- package/dist/measure/spaces.js.map +1 -0
- package/dist/measure/types.d.ts +99 -0
- package/dist/measure/types.d.ts.map +1 -1
- package/dist/measure/types.js +19 -0
- package/dist/measure/types.js.map +1 -1
- package/dist/numberWords.d.ts +22 -0
- package/dist/numberWords.d.ts.map +1 -0
- package/dist/numberWords.js +155 -0
- package/dist/numberWords.js.map +1 -0
- package/dist/numbering.d.ts +52 -3
- package/dist/numbering.d.ts.map +1 -1
- package/dist/numbering.js +116 -16
- package/dist/numbering.js.map +1 -1
- package/dist/parse/blockParser.d.ts.map +1 -1
- package/dist/parse/blockParser.js +54 -7
- package/dist/parse/blockParser.js.map +1 -1
- package/dist/parse/index.d.ts +1 -1
- package/dist/parse/index.d.ts.map +1 -1
- package/dist/parse/index.js.map +1 -1
- package/dist/parse/injectSpans.d.ts +3 -1
- package/dist/parse/injectSpans.d.ts.map +1 -1
- package/dist/parse/injectSpans.js +8 -4
- package/dist/parse/injectSpans.js.map +1 -1
- package/dist/parse/inlineFormatting.d.ts +50 -2
- package/dist/parse/inlineFormatting.d.ts.map +1 -1
- package/dist/parse/inlineFormatting.js +441 -26
- package/dist/parse/inlineFormatting.js.map +1 -1
- package/dist/parse/inlineSnippet.d.ts +12 -3
- package/dist/parse/inlineSnippet.d.ts.map +1 -1
- package/dist/parse/inlineSnippet.js +10 -3
- package/dist/parse/inlineSnippet.js.map +1 -1
- package/dist/parse/links.d.ts +9 -0
- package/dist/parse/links.d.ts.map +1 -0
- package/dist/parse/links.js +23 -0
- package/dist/parse/links.js.map +1 -0
- package/dist/parse/sourceMapping.d.ts.map +1 -1
- package/dist/parse/sourceMapping.js +68 -7
- package/dist/parse/sourceMapping.js.map +1 -1
- package/dist/parse/types.d.ts +32 -0
- package/dist/parse/types.d.ts.map +1 -1
- package/dist/pipeline/bandCaps.d.ts +26 -5
- package/dist/pipeline/bandCaps.d.ts.map +1 -1
- package/dist/pipeline/bandCaps.js +47 -20
- package/dist/pipeline/bandCaps.js.map +1 -1
- package/dist/pipeline/build.d.ts.map +1 -1
- package/dist/pipeline/build.js +1417 -172
- package/dist/pipeline/build.js.map +1 -1
- package/dist/pipeline/buildBlockKind.d.ts +4 -0
- package/dist/pipeline/buildBlockKind.d.ts.map +1 -1
- package/dist/pipeline/buildBlockKind.js +38 -7
- package/dist/pipeline/buildBlockKind.js.map +1 -1
- package/dist/pipeline/buildHelpers.d.ts +5 -2
- package/dist/pipeline/buildHelpers.d.ts.map +1 -1
- package/dist/pipeline/buildHelpers.js +101 -25
- package/dist/pipeline/buildHelpers.js.map +1 -1
- package/dist/pipeline/buildMeasurement.d.ts.map +1 -1
- package/dist/pipeline/buildMeasurement.js +6 -2
- package/dist/pipeline/buildMeasurement.js.map +1 -1
- package/dist/pipeline/calloutLayout.d.ts +34 -7
- package/dist/pipeline/calloutLayout.d.ts.map +1 -1
- package/dist/pipeline/calloutLayout.js +331 -44
- package/dist/pipeline/calloutLayout.js.map +1 -1
- package/dist/pipeline/chips.d.ts.map +1 -1
- package/dist/pipeline/chips.js +3 -0
- package/dist/pipeline/chips.js.map +1 -1
- package/dist/pipeline/columnBalancing.d.ts +26 -6
- package/dist/pipeline/columnBalancing.d.ts.map +1 -1
- package/dist/pipeline/columnBalancing.js +82 -21
- package/dist/pipeline/columnBalancing.js.map +1 -1
- package/dist/pipeline/config.d.ts +18 -0
- package/dist/pipeline/config.d.ts.map +1 -1
- package/dist/pipeline/config.js +44 -7
- package/dist/pipeline/config.js.map +1 -1
- package/dist/pipeline/contentWarnings.d.ts +50 -0
- package/dist/pipeline/contentWarnings.d.ts.map +1 -0
- package/dist/pipeline/contentWarnings.js +362 -0
- package/dist/pipeline/contentWarnings.js.map +1 -0
- package/dist/pipeline/continuation.d.ts.map +1 -1
- package/dist/pipeline/continuation.js +25 -5
- package/dist/pipeline/continuation.js.map +1 -1
- package/dist/pipeline/floatPlacement.d.ts +16 -7
- package/dist/pipeline/floatPlacement.d.ts.map +1 -1
- package/dist/pipeline/floatPlacement.js +22 -5
- package/dist/pipeline/floatPlacement.js.map +1 -1
- package/dist/pipeline/floatSlots.d.ts +30 -4
- package/dist/pipeline/floatSlots.d.ts.map +1 -1
- package/dist/pipeline/floatSlots.js +42 -7
- package/dist/pipeline/floatSlots.js.map +1 -1
- package/dist/pipeline/headerFooter.d.ts +125 -11
- package/dist/pipeline/headerFooter.d.ts.map +1 -1
- package/dist/pipeline/headerFooter.js +444 -69
- package/dist/pipeline/headerFooter.js.map +1 -1
- package/dist/pipeline/headingDesignCuts.d.ts +40 -0
- package/dist/pipeline/headingDesignCuts.d.ts.map +1 -0
- package/dist/pipeline/headingDesignCuts.js +72 -0
- package/dist/pipeline/headingDesignCuts.js.map +1 -0
- package/dist/pipeline/headingStyles.d.ts +12 -0
- package/dist/pipeline/headingStyles.d.ts.map +1 -1
- package/dist/pipeline/headingStyles.js +45 -1
- package/dist/pipeline/headingStyles.js.map +1 -1
- package/dist/pipeline/lists.d.ts +33 -1
- package/dist/pipeline/lists.d.ts.map +1 -1
- package/dist/pipeline/lists.js +53 -2
- package/dist/pipeline/lists.js.map +1 -1
- package/dist/pipeline/measureContentBlock.d.ts +25 -1
- package/dist/pipeline/measureContentBlock.d.ts.map +1 -1
- package/dist/pipeline/measureContentBlock.js +137 -17
- package/dist/pipeline/measureContentBlock.js.map +1 -1
- package/dist/pipeline/outline.d.ts +10 -5
- package/dist/pipeline/outline.d.ts.map +1 -1
- package/dist/pipeline/outline.js +38 -14
- package/dist/pipeline/outline.js.map +1 -1
- package/dist/pipeline/paragraphContainers.d.ts +13 -4
- package/dist/pipeline/paragraphContainers.d.ts.map +1 -1
- package/dist/pipeline/paragraphContainers.js +4 -3
- package/dist/pipeline/paragraphContainers.js.map +1 -1
- package/dist/pipeline/partPalette.d.ts +49 -3
- package/dist/pipeline/partPalette.d.ts.map +1 -1
- package/dist/pipeline/partPalette.js +414 -46
- package/dist/pipeline/partPalette.js.map +1 -1
- package/dist/pipeline/parts.d.ts +5 -1
- package/dist/pipeline/parts.d.ts.map +1 -1
- package/dist/pipeline/parts.js +16 -0
- package/dist/pipeline/parts.js.map +1 -1
- package/dist/pipeline/placeholders.d.ts +152 -3
- package/dist/pipeline/placeholders.d.ts.map +1 -1
- package/dist/pipeline/placeholders.js +259 -33
- package/dist/pipeline/placeholders.js.map +1 -1
- package/dist/pipeline/placement.d.ts +6 -1
- package/dist/pipeline/placement.d.ts.map +1 -1
- package/dist/pipeline/placement.js +13 -2
- package/dist/pipeline/placement.js.map +1 -1
- package/dist/pipeline/raggedLines.d.ts +5 -0
- package/dist/pipeline/raggedLines.d.ts.map +1 -1
- package/dist/pipeline/raggedLines.js +24 -3
- package/dist/pipeline/raggedLines.js.map +1 -1
- package/dist/pipeline/resourceLayout.d.ts +6 -4
- package/dist/pipeline/resourceLayout.d.ts.map +1 -1
- package/dist/pipeline/resourceLayout.js +137 -36
- package/dist/pipeline/resourceLayout.js.map +1 -1
- package/dist/pipeline/resourceNumbering.d.ts.map +1 -1
- package/dist/pipeline/resourceNumbering.js +5 -15
- package/dist/pipeline/resourceNumbering.js.map +1 -1
- package/dist/pipeline/styles.d.ts +38 -5
- package/dist/pipeline/styles.d.ts.map +1 -1
- package/dist/pipeline/styles.js +99 -46
- package/dist/pipeline/styles.js.map +1 -1
- package/dist/pipeline/toc.d.ts.map +1 -1
- package/dist/pipeline/toc.js +41 -5
- package/dist/pipeline/toc.js.map +1 -1
- package/dist/react/createLayout.d.ts +20 -0
- package/dist/react/createLayout.d.ts.map +1 -0
- package/dist/react/createLayout.js +50 -0
- package/dist/react/createLayout.js.map +1 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +4 -0
- package/dist/react/index.js.map +1 -0
- package/dist/svg/singleInk.d.ts +46 -1
- package/dist/svg/singleInk.d.ts.map +1 -1
- package/dist/svg/singleInk.js +180 -10
- package/dist/svg/singleInk.js.map +1 -1
- package/dist/table/model.d.ts +36 -1
- package/dist/table/model.d.ts.map +1 -1
- package/dist/table/model.js +163 -20
- package/dist/table/model.js.map +1 -1
- package/dist/types.d.ts +979 -68
- package/dist/types.d.ts.map +1 -1
- package/dist/vdt.d.ts +439 -13
- package/dist/vdt.d.ts.map +1 -1
- package/dist/vdt.js +91 -0
- package/dist/vdt.js.map +1 -1
- package/dist/worker/client.d.ts +15 -1
- package/dist/worker/client.d.ts.map +1 -1
- package/dist/worker/client.js +52 -3
- package/dist/worker/client.js.map +1 -1
- package/dist/worker/entryUrl.d.ts +15 -0
- package/dist/worker/entryUrl.d.ts.map +1 -0
- package/dist/worker/entryUrl.js +33 -0
- package/dist/worker/entryUrl.js.map +1 -0
- package/dist/worker/fonts.d.ts +18 -0
- package/dist/worker/fonts.d.ts.map +1 -0
- package/dist/worker/fonts.js +53 -0
- package/dist/worker/fonts.js.map +1 -0
- package/dist/worker/layout.worker.js +41 -6
- package/dist/worker/layout.worker.js.map +1 -1
- package/dist/worker/protocol.d.ts +4 -0
- package/dist/worker/protocol.d.ts.map +1 -1
- package/package.json +12 -5
|
@@ -40,14 +40,16 @@
|
|
|
40
40
|
*/
|
|
41
41
|
import { spaceDirectiveLines } from '../parse/attrs';
|
|
42
42
|
import { dimensionToPx } from '../units';
|
|
43
|
-
import { createBoundingBox, createVDTBlock, } from '../vdt';
|
|
43
|
+
import { createBoundingBox, createVDTBlock, pictureTraits, } from '../vdt';
|
|
44
44
|
import { buildFontString, measureBlock, measureRichBlock, measureTextWidth } from '../measure';
|
|
45
45
|
import { applyStyleAttrs, isMarkerBlock } from './buildHelpers';
|
|
46
46
|
import { resetLinePositions } from './placement';
|
|
47
|
+
import { raggedLooseLines } from './raggedLines';
|
|
47
48
|
import { resolveBodyStyle, resolveBlockquoteStyle } from './styles';
|
|
48
|
-
import { computeLevelIndentsPx, computeOrderedLevelIndentsPx } from './lists';
|
|
49
|
+
import { computeLevelIndentsPx, computeOrderedLevelIndentsPx, listBulletPosition, listItemGapPx } from './lists';
|
|
49
50
|
import { measureContentBlock } from './measureContentBlock';
|
|
50
51
|
import { uppercasePreservingLength } from './buildBlockKind';
|
|
52
|
+
import { headingIsHidden } from './headingStyles';
|
|
51
53
|
/** Map every `containerStart{callout}` index to its range. Resolved up front
|
|
52
54
|
* (like `:::paragraphs`) because keep-with-next rollbacks rewind the
|
|
53
55
|
* placement loop and replay blocks. Unclosed containers are auto-closed by
|
|
@@ -74,7 +76,8 @@ export function planCallouts(contentBlocks) {
|
|
|
74
76
|
return plan;
|
|
75
77
|
}
|
|
76
78
|
/** The style a `:::callout{type="…"}` selects: the matching id, else the
|
|
77
|
-
* first configured style (
|
|
79
|
+
* first configured style (`collectContentWarnings` reports an unknown type
|
|
80
|
+
* in `doc.contentWarnings`). */
|
|
78
81
|
export function pickCalloutStyle(styles, type) {
|
|
79
82
|
if (styles.length === 0)
|
|
80
83
|
return undefined;
|
|
@@ -91,7 +94,8 @@ export function pickCalloutStyle(styles, type) {
|
|
|
91
94
|
/** Shallow copy of `resolved` whose `bodyText`, `unorderedLists` and
|
|
92
95
|
* `orderedLists` carry the callout style's `body` / `lists` overrides, so
|
|
93
96
|
* `resolveBodyStyle`, the list item resolvers and the indent cascade yield
|
|
94
|
-
* the callout typography without any callout-specific branches
|
|
97
|
+
* the callout typography without any callout-specific branches (the
|
|
98
|
+
* body's `italic` / `smallCaps` ride on `bodyText` for that). Child
|
|
95
99
|
* headings (rare) keep the normal heading styles. */
|
|
96
100
|
export function deriveCalloutResolvedConfig(resolved, style) {
|
|
97
101
|
const { body, lists } = style;
|
|
@@ -99,9 +103,16 @@ export function deriveCalloutResolvedConfig(resolved, style) {
|
|
|
99
103
|
const ol = resolved.orderedLists;
|
|
100
104
|
// Level-specific bullets/colours only follow the override when it actually
|
|
101
105
|
// differs from the general value they were resolved from — a style that
|
|
102
|
-
// inherits keeps the document's per-level bullets intact
|
|
106
|
+
// inherits keeps the document's per-level bullets intact (and so does one
|
|
107
|
+
// that repeats the document's bullet or colour: its nested levels keep
|
|
108
|
+
// their dashes).
|
|
103
109
|
const bulletOverride = lists.bulletChar !== ul.bulletChar;
|
|
104
110
|
const colorOverride = lists.color.hex !== ul.color.hex;
|
|
111
|
+
// The numbers of ordered lists take the box's colour whenever the style
|
|
112
|
+
// sets it, also to the document's bullet colour (EF-92): the ordered lists
|
|
113
|
+
// have a colour of their own, which an unset `lists.color` leaves alone.
|
|
114
|
+
// A resolved style without the flag (built by hand) keeps the old rule.
|
|
115
|
+
const numberColorOverride = lists.colorSet === true || colorOverride;
|
|
105
116
|
return {
|
|
106
117
|
...resolved,
|
|
107
118
|
bodyText: {
|
|
@@ -112,6 +123,10 @@ export function deriveCalloutResolvedConfig(resolved, style) {
|
|
|
112
123
|
color: body.color,
|
|
113
124
|
boldColor: body.boldColor ?? body.color,
|
|
114
125
|
...(body.italicColor ? { italicColor: body.italicColor } : {}),
|
|
126
|
+
fontWeight: body.fontWeight,
|
|
127
|
+
boldFontWeight: body.boldFontWeight,
|
|
128
|
+
...(body.italic ? { italic: true } : {}),
|
|
129
|
+
...(body.smallCaps ? { smallCaps: true } : {}),
|
|
115
130
|
textAlign: body.textAlign,
|
|
116
131
|
hyphenation: { ...resolved.bodyText.hyphenation, enabled: body.hyphenation },
|
|
117
132
|
paragraphSpacing: body.paragraphSpacing,
|
|
@@ -136,11 +151,11 @@ export function deriveCalloutResolvedConfig(resolved, style) {
|
|
|
136
151
|
},
|
|
137
152
|
orderedLists: {
|
|
138
153
|
...ol,
|
|
139
|
-
color:
|
|
154
|
+
color: numberColorOverride ? lists.color : ol.color,
|
|
140
155
|
indent: lists.indent,
|
|
141
156
|
gap: lists.gap,
|
|
142
157
|
itemSpacing: lists.itemSpacing,
|
|
143
|
-
levels: ol.levels.map((l) => ({ ...l, color:
|
|
158
|
+
levels: ol.levels.map((l) => ({ ...l, color: numberColorOverride ? lists.color : l.color })),
|
|
144
159
|
},
|
|
145
160
|
};
|
|
146
161
|
}
|
|
@@ -160,6 +175,10 @@ export function deriveCalloutMeasureContext(ctx, style) {
|
|
|
160
175
|
orderedLevelIndentsPx: computeOrderedLevelIndentsPx(resolved, bodyStyle.fontSizePx, ctx.orderedMetrics.maxWidthByDepth),
|
|
161
176
|
};
|
|
162
177
|
}
|
|
178
|
+
/** The measures of `layoutCallout`'s first child across widths (see
|
|
179
|
+
* `CalloutLayoutInput.lineWidths`), per resolved configuration and
|
|
180
|
+
* content block: a build lays a split box out again on every pass. */
|
|
181
|
+
const acrossWidthsMemo = new WeakMap();
|
|
163
182
|
const VALID_SPANS = new Set(['column', 'page', 'side']);
|
|
164
183
|
const VALID_PLACEMENTS = new Set(['here', 'auto', 'top', 'bottom', 'fixed']);
|
|
165
184
|
/** Per-instance span / placement: fence attribute when valid, else the style. */
|
|
@@ -226,6 +245,8 @@ function offsetBlock(blk, ox, oy) {
|
|
|
226
245
|
blk.separatorX += ox;
|
|
227
246
|
if (blk.bulletY !== undefined)
|
|
228
247
|
blk.bulletY += oy;
|
|
248
|
+
if (blk.bulletBaselineY !== undefined)
|
|
249
|
+
blk.bulletBaselineY += oy;
|
|
229
250
|
if (blk.resourceBlock)
|
|
230
251
|
offsetResourceBlock(blk.resourceBlock, ox, oy);
|
|
231
252
|
// A nested box's frame carries its decoration on the overlay.
|
|
@@ -243,6 +264,10 @@ function offsetDesignBlock(b, ox, oy) {
|
|
|
243
264
|
for (const line of b.lines)
|
|
244
265
|
line.baselineY += oy;
|
|
245
266
|
}
|
|
267
|
+
if (b.kind === 'box' && b.clip) {
|
|
268
|
+
b.clip.x += ox;
|
|
269
|
+
b.clip.y += oy;
|
|
270
|
+
}
|
|
246
271
|
}
|
|
247
272
|
/** Move a laid-out callout from frame-relative to absolute page coordinates
|
|
248
273
|
* with the frame's top-left at `(x, y)`. */
|
|
@@ -291,40 +316,58 @@ export function layoutCallout(input) {
|
|
|
291
316
|
const stripeLeft = sideStripe && style.stripe.side === 'left';
|
|
292
317
|
const stripeRight = sideStripe && style.stripe.side === 'right';
|
|
293
318
|
const topStripe = stripeOn && style.stripe.side === 'top';
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
const
|
|
319
|
+
// The icon is drawn on the head only (`hasIcon`), but its geometry is
|
|
320
|
+
// the box's on every fragment.
|
|
321
|
+
const iconOn = iconPresent(style.icon);
|
|
322
|
+
const hasIcon = !input.continuation && iconOn;
|
|
323
|
+
const iconSize = iconOn ? px(style.icon.size) : 0;
|
|
324
|
+
const iconBoxW = iconOn && style.icon.width ? Math.max(iconSize, px(style.icon.width)) : iconSize;
|
|
297
325
|
const gapPx = px(style.titleStyle.gap);
|
|
298
326
|
// The icon takes its own column only when there is no side stripe to sit
|
|
299
|
-
// over. A continuation that
|
|
300
|
-
//
|
|
301
|
-
//
|
|
302
|
-
// or doubled.
|
|
303
|
-
|
|
327
|
+
// over. A continuation keeps that column, empty (EF-114): a box has one
|
|
328
|
+
// measure in columns of one width, and a continuation that opens inside a
|
|
329
|
+
// paragraph (`lineFrom`) wraps its text as the head counted it, line
|
|
330
|
+
// `lineFrom` on, nothing lost or doubled. In a column of another width
|
|
331
|
+
// the paragraph is broken again as the fragments before counted it
|
|
332
|
+
// (`lineWidths`).
|
|
304
333
|
const cornerIcon = style.icon.position === 'corner';
|
|
305
334
|
// A corner badge hangs on the top-right corner — or the left one, for an
|
|
306
335
|
// `'outer'` badge on a verso of mirrored margins (`'inner'` on a recto).
|
|
307
336
|
const cornerRight = style.icon.cornerSide === 'right'
|
|
308
337
|
|| (style.icon.cornerSide === 'outer' && !input.mirrored)
|
|
309
338
|
|| (style.icon.cornerSide === 'inner' && !!input.mirrored);
|
|
310
|
-
const iconColumnKept =
|
|
339
|
+
const iconColumnKept = iconOn && !sideStripe && !cornerIcon;
|
|
311
340
|
const iconColumn = iconColumnKept ? iconBoxW + gapPx : 0;
|
|
341
|
+
// A corner badge is centred on its corner by the width it is drawn at: a
|
|
342
|
+
// wide strip (`icon.width`) hangs half its width past the border, not
|
|
343
|
+
// half its height (EF-142).
|
|
344
|
+
const cornerIconW = cornerIcon && iconOn ? iconFootprintWidth(style.icon, iconSize, iconBoxW, ctx) : iconSize;
|
|
312
345
|
const innerX = (stripeLeft ? stripeW : 0) + padL + iconColumn;
|
|
313
346
|
const innerTop = (topStripe ? stripeW : 0) + padT;
|
|
314
347
|
// --- Title -----------------------------------------------------------------
|
|
348
|
+
// A continuation repeats the title, with its suffix, only when the style
|
|
349
|
+
// asks for it (`repeatTitle`); the repeat is pagination furniture.
|
|
350
|
+
const repeatedTitle = !!input.continuation && style.repeatTitle && rawTitle.trim().length > 0;
|
|
351
|
+
const suffix = repeatedTitle ? style.continuedSuffix.trim() : '';
|
|
352
|
+
const shownTitle = suffix.length > 0 ? `${rawTitle} ${suffix}` : rawTitle;
|
|
315
353
|
const titleText = style.titleStyle.textTransform === 'uppercase'
|
|
316
|
-
? uppercasePreservingLength(
|
|
317
|
-
:
|
|
354
|
+
? uppercasePreservingLength(shownTitle)
|
|
355
|
+
: shownTitle;
|
|
318
356
|
const titleFontPx = dimensionToPx(style.titleStyle.fontSize, dpi, em);
|
|
319
357
|
const titleFont = buildFontString(style.titleStyle.fontFamily, titleFontPx, style.titleStyle.fontWeight.toString(), style.titleStyle.italic ? 'italic' : 'normal');
|
|
320
|
-
|
|
358
|
+
// The title's leading (EF-182): `em` / `rem` count its own size; 1.2 em
|
|
359
|
+
// unless the style sets one.
|
|
360
|
+
const titleLh = style.titleStyle.lineHeight ?? { value: 1.2, unit: 'em' };
|
|
361
|
+
const titleLineHeight = titleLh.unit === 'em' || titleLh.unit === 'rem'
|
|
362
|
+
? titleFontPx * titleLh.value
|
|
363
|
+
: dimensionToPx(titleLh, dpi, titleFontPx);
|
|
321
364
|
const titleTrackingPx = Math.max(0, dimensionToPx(style.titleStyle.letterSpacing, dpi, titleFontPx));
|
|
322
365
|
// A corner badge on the left hangs half over the title's side: the title
|
|
323
366
|
// starts past it (its inner half plus the icon gap), at least — a
|
|
324
367
|
// configured `indent` only adds beyond that room.
|
|
325
|
-
const cornerLeftRoom = hasIcon && cornerIcon && !cornerRight ? Math.max(0,
|
|
368
|
+
const cornerLeftRoom = hasIcon && cornerIcon && !cornerRight ? Math.max(0, cornerIconW / 2 + gapPx - padL) : 0;
|
|
326
369
|
const titleIndentPx = Math.max(cornerLeftRoom, dimensionToPx(style.titleStyle.indent, dpi, titleFontPx));
|
|
327
|
-
const hasTitle = !input.continuation && titleText.trim().length > 0;
|
|
370
|
+
const hasTitle = (!input.continuation || repeatedTitle) && titleText.trim().length > 0;
|
|
328
371
|
const titleWidthOf = (t) => measureTextWidth(t, titleFont) + titleTrackingPx * t.length;
|
|
329
372
|
// Box width: `fill` uses the given width less the marker column; `auto`
|
|
330
373
|
// shrink-wraps the title.
|
|
@@ -365,6 +408,7 @@ export function layoutCallout(input) {
|
|
|
365
408
|
})),
|
|
366
409
|
clip: false,
|
|
367
410
|
...(titleTrackingPx > 0 ? { letterSpacingPx: titleTrackingPx } : {}),
|
|
411
|
+
...(repeatedTitle ? { artifact: true } : {}),
|
|
368
412
|
};
|
|
369
413
|
cursorY += titleHeight;
|
|
370
414
|
}
|
|
@@ -377,40 +421,157 @@ export function layoutCallout(input) {
|
|
|
377
421
|
const units = [];
|
|
378
422
|
const nestPath = input.nestPath && input.nestPath.length > 0 ? input.nestPath : undefined;
|
|
379
423
|
const columnGapPx = px(style.columnGap);
|
|
380
|
-
/** A `:::space` between children: body lines of the box's own type
|
|
381
|
-
* dropped at the top of
|
|
424
|
+
/** A `:::space` between children: body lines of the box's own type.
|
|
425
|
+
* Before the first child it is dropped, like at the top of a column —
|
|
426
|
+
* the padding already sets the content off the frame — unless it opens
|
|
427
|
+
* the head of a box under its title, or the box holds nothing else (an
|
|
428
|
+
* answer box sized by its space); at the top of a `:::columns` group or
|
|
429
|
+
* of a split box's continuation it always vanishes. */
|
|
382
430
|
const addSpace = (raw, st) => {
|
|
383
|
-
if (raw.type !== 'directive' || raw.directiveName !== 'space'
|
|
431
|
+
if (raw.type !== 'directive' || raw.directiveName !== 'space')
|
|
432
|
+
return;
|
|
433
|
+
if (st.first && !st.keepLeadingSpace)
|
|
384
434
|
return;
|
|
385
435
|
st.cursorY += (spaceDirectiveLines(raw.directiveAttrs) ?? 1) * bodyStyle.lineHeightPx;
|
|
386
436
|
};
|
|
437
|
+
/** The gap an inline resource keeps in the box (`layout.inlineResourceGapInBoxes`):
|
|
438
|
+
* a line of the box's text, above it and, with `inlineResourceGap:
|
|
439
|
+
* 'around'`, below it. None when off (postext 1.4). */
|
|
440
|
+
const resourceGapPx = input.resolved.layout.inlineResourceGapInBoxes ? bodyStyle.lineHeightPx : 0;
|
|
441
|
+
const resourceGapBelow = input.resolved.layout.inlineResourceGap !== 'above';
|
|
387
442
|
const isFirstRealOf = (k) => children.slice(0, k).every((c) => c.type === 'directive' || isMarkerBlock(c));
|
|
388
443
|
const isLastRealOf = (k) => children.slice(k + 1).every((c) => c.type === 'directive' || isMarkerBlock(c));
|
|
444
|
+
/** The widths of `lineWidths` as a child's measure: a child set `width`
|
|
445
|
+
* wide in a box `input.width` wide is that much narrower at every box
|
|
446
|
+
* width (the box's padding, stripe, icon and marker columns stay). */
|
|
447
|
+
const childWidthAt = (boxWidth, width) => Math.max(1, width - (input.width - boxWidth));
|
|
448
|
+
/** The first child of a continuation that goes on in a column of another
|
|
449
|
+
* width than the fragments before it (`lineWidths`), measured as they
|
|
450
|
+
* counted its lines and, from `lineFrom` on, for this box: the lines
|
|
451
|
+
* the earlier fragments placed keep their breaks. `undefined` when the
|
|
452
|
+
* child is measured at `width` alone: no width changed, the child is
|
|
453
|
+
* not the first one or opens at its head, or its placed lines cannot
|
|
454
|
+
* be set again as they were (then it is sliced from a measure at
|
|
455
|
+
* `width`, as before). */
|
|
456
|
+
const measureFirstChildAcrossWidths = (raw, blockIdx, k, width, styleOverride) => {
|
|
457
|
+
const history = input.lineWidths;
|
|
458
|
+
const lineFrom = input.lineFrom ?? 0;
|
|
459
|
+
if (!history || history.length === 0 || lineFrom <= 0 || !isFirstRealOf(k))
|
|
460
|
+
return undefined;
|
|
461
|
+
if (history.every((h) => Math.abs(h.width - input.width) <= 0.5))
|
|
462
|
+
return undefined;
|
|
463
|
+
// A split tries many cuts from the same start, and these measures are
|
|
464
|
+
// not cached by the measurement cache (they break at several widths).
|
|
465
|
+
let perBlock = acrossWidthsMemo.get(input.resolved);
|
|
466
|
+
if (!perBlock)
|
|
467
|
+
acrossWidthsMemo.set(input.resolved, (perBlock = new WeakMap()));
|
|
468
|
+
let memo = perBlock.get(raw);
|
|
469
|
+
if (!memo)
|
|
470
|
+
perBlock.set(raw, (memo = new Map()));
|
|
471
|
+
const styleAt = input.resolved.calloutStyles.indexOf(style);
|
|
472
|
+
// Every fragment's measure: the head's, then each one after it, which
|
|
473
|
+
// keeps the lines the fragments before it placed and breaks the rest
|
|
474
|
+
// for its own width. The one this fragment is set from is the last.
|
|
475
|
+
const last = history[history.length - 1];
|
|
476
|
+
const widths = Math.abs(last.width - input.width) <= 0.5
|
|
477
|
+
? history
|
|
478
|
+
: [...history, { fromLine: lineFrom, width: input.width }];
|
|
479
|
+
const steps = widths.map((h) => ({ fromLine: h.fromLine, columnWidth: childWidthAt(h.width, width) }));
|
|
480
|
+
const base = steps[0].columnWidth;
|
|
481
|
+
let prev;
|
|
482
|
+
for (let i = 0; i < steps.length; i++) {
|
|
483
|
+
const key = `${styleAt}|${blockIdx}|${steps.slice(0, i + 1).map((st) => `${st.fromLine}:${st.columnWidth}`).join(',')}`;
|
|
484
|
+
if (memo.has(key)) {
|
|
485
|
+
prev = memo.get(key);
|
|
486
|
+
if (!prev)
|
|
487
|
+
return undefined;
|
|
488
|
+
continue;
|
|
489
|
+
}
|
|
490
|
+
let next;
|
|
491
|
+
if (i === 0) {
|
|
492
|
+
next = measureContentBlock(raw, blockIdx, base, derivedCtx, { styleOverride }) ?? undefined;
|
|
493
|
+
}
|
|
494
|
+
else if (prev) {
|
|
495
|
+
const keep = steps[i].fromLine;
|
|
496
|
+
const breaks = prev.measured.breaks;
|
|
497
|
+
const keepBreaks = breaks && breaks.at.length >= keep ? { path: breaks.path, at: breaks.at.slice(0, keep) } : undefined;
|
|
498
|
+
const again = measureContentBlock(raw, blockIdx, base, derivedCtx, {
|
|
499
|
+
styleOverride,
|
|
500
|
+
restColumnWidths: steps.slice(1, i + 1),
|
|
501
|
+
...(keepBreaks ? { keepBreaks } : {}),
|
|
502
|
+
// No shorter setting for a runt: its tracking would part the
|
|
503
|
+
// lines kept from the ones placed before.
|
|
504
|
+
looseness: 0,
|
|
505
|
+
});
|
|
506
|
+
const a = again?.measured.lines ?? [];
|
|
507
|
+
const b = prev.measured.lines;
|
|
508
|
+
next = again && (again.letterSpacingPx ?? 0) === (prev.letterSpacingPx ?? 0) && a.length > keep && b.length >= keep
|
|
509
|
+
&& b.slice(0, keep).every((l, j) => a[j].text === l.text && a[j].hyphenated === l.hyphenated)
|
|
510
|
+
? again
|
|
511
|
+
: undefined;
|
|
512
|
+
}
|
|
513
|
+
memo.set(key, next);
|
|
514
|
+
if (!next)
|
|
515
|
+
return undefined;
|
|
516
|
+
prev = next;
|
|
517
|
+
}
|
|
518
|
+
return prev && prev.measured.lines.length > lineFrom ? prev : undefined;
|
|
519
|
+
};
|
|
389
520
|
/** Lay out one child at `width` from `x`, appending it to `into` and
|
|
390
521
|
* advancing the stack. */
|
|
391
522
|
const placeChild = (raw, k, width, x, st, into, unitsInto) => {
|
|
392
523
|
const blockIdx = childStartIdx + k;
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
524
|
+
// Inside a `:::paragraphs` container: its style, and for the block that
|
|
525
|
+
// closes it the tail style, which carries the container's bottom margin.
|
|
526
|
+
const container = input.paragraphContainers?.byBlock[blockIdx];
|
|
527
|
+
const next = children[k + 1];
|
|
528
|
+
const isContainerTail = container !== undefined && next?.type === 'containerEnd' && next.containerId === container.id;
|
|
529
|
+
const styleOverride = container ? (isContainerTail ? container.tailStyle : container.style) : undefined;
|
|
530
|
+
const measuredBlock = measureFirstChildAcrossWidths(raw, blockIdx, k, width, styleOverride)
|
|
531
|
+
?? measureContentBlock(raw, blockIdx, width, derivedCtx, { styleOverride });
|
|
396
532
|
if (!measuredBlock)
|
|
397
533
|
return undefined;
|
|
398
|
-
const { kind, measured, prefixLen, absoluteSourceMap, mathDisplayRender, resourceBlock } = measuredBlock;
|
|
399
|
-
const {
|
|
400
|
-
//
|
|
534
|
+
const { kind, measured, prefixLen, absoluteSourceMap, mathDisplayRender, resourceBlock, letterSpacingPx } = measuredBlock;
|
|
535
|
+
const { vdtType, headingLevel, numberPrefix, headingNumber, listBullet, listDepth, listKind, bulletXOffsetInColumn, strikethroughText } = kind;
|
|
536
|
+
// A structural heading (`hidden`) keeps its lines' text but prints
|
|
537
|
+
// nothing and takes no room: no line height, no margins, and the
|
|
538
|
+
// spacing around it collapses as if it were not there.
|
|
539
|
+
const hiddenHeading = vdtType === 'heading' && headingIsHidden(raw, derivedCtx.headingLevels?.forBlock(raw) ?? derivedCtx.resolved.headings.levels.find((l) => l.level === raw.level));
|
|
540
|
+
const bs = hiddenHeading ? { ...kind.style, lineHeightPx: 0, marginTopPx: 0, marginBottomPx: 0 } : kind.style;
|
|
541
|
+
// An inline resource keeps the gap as in running text (EF-117): a line
|
|
542
|
+
// of the box's text above it, and below it with `'around'`.
|
|
543
|
+
const inlineResource = vdtType === 'resource' && !!resourceBlock;
|
|
544
|
+
const marginTopPx = inlineResource ? Math.max(bs.marginTopPx, resourceGapPx) : bs.marginTopPx;
|
|
545
|
+
const marginBottomPx = inlineResource && resourceGapBelow ? Math.max(bs.marginBottomPx, resourceGapPx) : bs.marginBottomPx;
|
|
546
|
+
// Spacing above: margin collapsing, list-item spacing inside a run. A
|
|
547
|
+
// pull (a negative container margin) applies as it is, unless the
|
|
548
|
+
// block has a top margin of its own — as in running text.
|
|
401
549
|
let spacing;
|
|
402
|
-
if (
|
|
550
|
+
if (hiddenHeading) {
|
|
551
|
+
spacing = 0;
|
|
552
|
+
}
|
|
553
|
+
else if (st.first) {
|
|
554
|
+
spacing = st.prevMarginBottom;
|
|
555
|
+
}
|
|
556
|
+
else if (st.pull && marginTopPx <= 0) {
|
|
403
557
|
spacing = st.prevMarginBottom;
|
|
404
558
|
}
|
|
405
559
|
else if (vdtType === 'listItem' && st.prevWasListItem) {
|
|
406
|
-
spacing
|
|
560
|
+
// The shallower list's spacing, as in running text (EF-165).
|
|
561
|
+
const here = { spacingPx: listBullet ? listBullet.itemSpacingPx : 0, depth: listDepth ?? 1 };
|
|
562
|
+
spacing = st.prevListItem ? listItemGapPx(st.prevListItem, here) : here.spacingPx;
|
|
407
563
|
}
|
|
408
564
|
else {
|
|
409
|
-
spacing = Math.max(st.prevMarginBottom,
|
|
565
|
+
spacing = Math.max(st.prevMarginBottom, marginTopPx);
|
|
410
566
|
}
|
|
411
567
|
st.cursorY += spacing;
|
|
412
568
|
const blk = createVDTBlock(input.nextChildId(), vdtType, bs.fontString, bs.color, bs.textAlign);
|
|
413
569
|
applyStyleAttrs(blk, bs);
|
|
570
|
+
// The tracking the lines were measured with (a runt set one line
|
|
571
|
+
// shorter, a heading level's `letterSpacing`): painted as measured,
|
|
572
|
+
// as in the flow (EF-111).
|
|
573
|
+
if (letterSpacingPx !== undefined)
|
|
574
|
+
blk.letterSpacing = letterSpacingPx;
|
|
414
575
|
blk.contentIndex = blockIdx;
|
|
415
576
|
blk.containerId = containerId;
|
|
416
577
|
blk.dirty = false;
|
|
@@ -420,6 +581,10 @@ export function layoutCallout(input) {
|
|
|
420
581
|
blk.calloutPath = [...nestPath];
|
|
421
582
|
if (numberPrefix)
|
|
422
583
|
blk.numberPrefix = numberPrefix;
|
|
584
|
+
if (headingNumber !== undefined)
|
|
585
|
+
blk.headingNumber = headingNumber;
|
|
586
|
+
if (hiddenHeading)
|
|
587
|
+
blk.hidden = true;
|
|
423
588
|
blk.sourceMap = absoluteSourceMap;
|
|
424
589
|
blk.plainPrefixLen = prefixLen;
|
|
425
590
|
// Line-level cut of the first / last child (split boxes): the kept
|
|
@@ -432,7 +597,10 @@ export function layoutCallout(input) {
|
|
|
432
597
|
const lineTo = isTextRun && isLastReal && input.lineTo !== undefined
|
|
433
598
|
? Math.max(lineFrom + 1, Math.min(input.lineTo, measured.lines.length))
|
|
434
599
|
: measured.lines.length;
|
|
435
|
-
|
|
600
|
+
// A justified line the breaker could not fill is set ragged, as in the
|
|
601
|
+
// running text (EF-104): a box's narrow measure is where it happens most.
|
|
602
|
+
const textLines = isTextRun ? raggedLooseLines(measured.lines, bs.textAlign) : measured.lines;
|
|
603
|
+
const keptLines = isTextRun ? textLines.slice(Math.min(lineFrom, textLines.length - 1), lineTo) : measured.lines;
|
|
436
604
|
const openedMidRun = lineFrom > 0;
|
|
437
605
|
let height;
|
|
438
606
|
if (vdtType === 'resource' && resourceBlock) {
|
|
@@ -490,7 +658,10 @@ export function layoutCallout(input) {
|
|
|
490
658
|
blk.strikethroughText = true;
|
|
491
659
|
const firstLine = blk.lines[0];
|
|
492
660
|
if (firstLine) {
|
|
493
|
-
|
|
661
|
+
const at = listBulletPosition(listBullet, firstLine.baseline);
|
|
662
|
+
blk.bulletY = at.bulletY;
|
|
663
|
+
if (at.bulletBaselineY !== undefined)
|
|
664
|
+
blk.bulletBaselineY = at.bulletBaselineY;
|
|
494
665
|
}
|
|
495
666
|
}
|
|
496
667
|
else if (listBullet) {
|
|
@@ -500,11 +671,47 @@ export function layoutCallout(input) {
|
|
|
500
671
|
into.push(blk);
|
|
501
672
|
unitsInto.push({ kind: 'block', block: blk });
|
|
502
673
|
st.cursorY += height;
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
674
|
+
if (!hiddenHeading) {
|
|
675
|
+
st.prevMarginBottom = marginBottomPx;
|
|
676
|
+
// A negative container bottom margin pulls the next block up.
|
|
677
|
+
st.pull = isContainerTail && bs.marginBottomPx < 0;
|
|
678
|
+
st.prevWasListItem = vdtType === 'listItem';
|
|
679
|
+
st.prevListItem = vdtType === 'listItem' ? { spacingPx: listBullet ? listBullet.itemSpacingPx : 0, depth: listDepth ?? 1 } : undefined;
|
|
680
|
+
st.first = false;
|
|
681
|
+
}
|
|
506
682
|
return blk;
|
|
507
683
|
};
|
|
684
|
+
/** A `:::paragraphs` fence among the children: the container's top margin
|
|
685
|
+
* on entry, and its bottom margin on exit when the block before is not a
|
|
686
|
+
* paragraph (a closing paragraph carries it in its tail style). Each
|
|
687
|
+
* collapses with the spacing already there, as in running text; a
|
|
688
|
+
* negative one pulls (see `Stack.pull`). At the top of the box it
|
|
689
|
+
* vanishes, as at the top of a column. Under a closing paragraph the
|
|
690
|
+
* space is at least the box's paragraph spacing, as between two
|
|
691
|
+
* paragraphs of its text (`bodyText.paragraphContainerSpacing:
|
|
692
|
+
* 'collapse'`, EF-181). */
|
|
693
|
+
const containerMargin = (raw, k, st) => {
|
|
694
|
+
if ((raw.type !== 'containerStart' && raw.type !== 'containerEnd') || raw.containerId === undefined)
|
|
695
|
+
return;
|
|
696
|
+
const pc = input.paragraphContainers?.byId.get(raw.containerId);
|
|
697
|
+
if (!pc || st.first)
|
|
698
|
+
return;
|
|
699
|
+
if (raw.type === 'containerEnd' && children[k - 1]?.type === 'paragraph') {
|
|
700
|
+
if (input.resolved.bodyText.paragraphContainerSpacing === 'collapse' && !st.pull && bodyStyle.marginBottomPx > st.prevMarginBottom) {
|
|
701
|
+
st.prevMarginBottom = bodyStyle.marginBottomPx;
|
|
702
|
+
}
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
705
|
+
const margin = raw.type === 'containerStart' ? pc.marginTopPx : pc.marginBottomPx;
|
|
706
|
+
if (margin < 0) {
|
|
707
|
+
st.prevMarginBottom += margin;
|
|
708
|
+
st.pull = true;
|
|
709
|
+
}
|
|
710
|
+
else if (margin > st.prevMarginBottom) {
|
|
711
|
+
st.prevMarginBottom = margin;
|
|
712
|
+
st.pull = false;
|
|
713
|
+
}
|
|
714
|
+
};
|
|
508
715
|
/** Lay out the nested box whose fence opens with `open` (content index
|
|
509
716
|
* `openIdx`) over `children[k0 … k1 - 1]` — `k1` is its closing marker's
|
|
510
717
|
* position, or `children.length` when the range ends inside it — at
|
|
@@ -529,10 +736,17 @@ export function layoutCallout(input) {
|
|
|
529
736
|
containerId,
|
|
530
737
|
frameId: input.nextChildId(),
|
|
531
738
|
nextChildId: input.nextChildId,
|
|
532
|
-
...(input.
|
|
739
|
+
...(input.paragraphContainers ? { paragraphContainers: input.paragraphContainers } : {}),
|
|
533
740
|
...(input.bodyOffset !== undefined ? { bodyOffset: input.bodyOffset } : {}),
|
|
534
741
|
continuation: !!reopened,
|
|
742
|
+
// Cut before its closing marker, the nested box goes on in the next
|
|
743
|
+
// fragment too.
|
|
744
|
+
...(!closed ? { continues: true } : {}),
|
|
535
745
|
...(reopened && input.lineFrom !== undefined ? { lineFrom: input.lineFrom } : {}),
|
|
746
|
+
// The nested box is `input.width - width` narrower at every width.
|
|
747
|
+
...(reopened && input.lineWidths
|
|
748
|
+
? { lineWidths: input.lineWidths.map((h) => ({ fromLine: h.fromLine, width: childWidthAt(h.width, width) })) }
|
|
749
|
+
: {}),
|
|
536
750
|
...(!closed && input.lineTo !== undefined ? { lineTo: input.lineTo } : {}),
|
|
537
751
|
...(reopened && reopened.openRest.length > 0 ? { openNested: reopened.openRest } : {}),
|
|
538
752
|
mirrored: input.mirrored,
|
|
@@ -565,6 +779,7 @@ export function layoutCallout(input) {
|
|
|
565
779
|
});
|
|
566
780
|
st.cursorY += nested.totalHeight;
|
|
567
781
|
st.prevMarginBottom = nested.marginBottomPx;
|
|
782
|
+
st.pull = false;
|
|
568
783
|
st.prevWasListItem = false;
|
|
569
784
|
st.first = false;
|
|
570
785
|
return blocks;
|
|
@@ -587,6 +802,7 @@ export function layoutCallout(input) {
|
|
|
587
802
|
delete tail.bulletColor;
|
|
588
803
|
delete tail.bulletOffsetX;
|
|
589
804
|
delete tail.bulletY;
|
|
805
|
+
delete tail.bulletBaselineY;
|
|
590
806
|
delete tail.separatorText;
|
|
591
807
|
delete tail.separatorFontString;
|
|
592
808
|
delete tail.separatorColor;
|
|
@@ -603,7 +819,7 @@ export function layoutCallout(input) {
|
|
|
603
819
|
// Spacing above the group: as a block with no margin of its own.
|
|
604
820
|
const spacing = st.first ? st.prevMarginBottom : st.prevMarginBottom;
|
|
605
821
|
const groupTop = st.cursorY + spacing;
|
|
606
|
-
const gst = { cursorY: 0, prevMarginBottom: 0, prevWasListItem: false, first: true };
|
|
822
|
+
const gst = { cursorY: 0, prevMarginBottom: 0, pull: false, prevWasListItem: false, first: true, keepLeadingSpace: false };
|
|
607
823
|
/** The group's items: a child block, or a nested box's blocks (frame first). */
|
|
608
824
|
const stack = [];
|
|
609
825
|
for (let k = k0; k < k1; k++) {
|
|
@@ -619,6 +835,7 @@ export function layoutCallout(input) {
|
|
|
619
835
|
}
|
|
620
836
|
}
|
|
621
837
|
addSpace(raw, gst);
|
|
838
|
+
containerMargin(raw, k, gst);
|
|
622
839
|
if (raw.type === 'directive' || isMarkerBlock(raw))
|
|
623
840
|
continue;
|
|
624
841
|
if (placeChild(raw, k, colW, innerX, gst, into, unitsInto))
|
|
@@ -719,10 +936,19 @@ export function layoutCallout(input) {
|
|
|
719
936
|
});
|
|
720
937
|
st.cursorY = groupTop + groupHeight;
|
|
721
938
|
st.prevMarginBottom = 0;
|
|
939
|
+
st.pull = false;
|
|
722
940
|
st.prevWasListItem = false;
|
|
723
941
|
st.first = false;
|
|
724
942
|
};
|
|
725
|
-
const
|
|
943
|
+
const holdsContent = children.some((c) => c.type !== 'directive' && !isMarkerBlock(c));
|
|
944
|
+
const st = {
|
|
945
|
+
cursorY,
|
|
946
|
+
prevMarginBottom: hasTitle ? gapPx : 0,
|
|
947
|
+
pull: false,
|
|
948
|
+
prevWasListItem: false,
|
|
949
|
+
first: true,
|
|
950
|
+
keepLeadingSpace: !input.continuation && (hasTitle || !holdsContent),
|
|
951
|
+
};
|
|
726
952
|
if (!isAuto) {
|
|
727
953
|
let k0 = 0;
|
|
728
954
|
// A continuation opening inside a nested box redraws it (and the boxes
|
|
@@ -753,11 +979,47 @@ export function layoutCallout(input) {
|
|
|
753
979
|
continue;
|
|
754
980
|
}
|
|
755
981
|
addSpace(raw, st);
|
|
982
|
+
containerMargin(raw, k, st);
|
|
756
983
|
if (raw.type === 'directive' || isMarkerBlock(raw))
|
|
757
984
|
continue;
|
|
758
985
|
placeChild(raw, k, innerWidth, innerX, st, childBlocks, units);
|
|
759
986
|
}
|
|
760
987
|
}
|
|
988
|
+
// --- Continuation marker ---------------------------------------------------
|
|
989
|
+
// "Continued" under the last line of a fragment that goes on, in the box's
|
|
990
|
+
// body face and size, aligned in the inner width; like the repeated title
|
|
991
|
+
// it is pagination furniture.
|
|
992
|
+
const continuesText = style.continuesMarkerEnabled && !isAuto ? style.continuesMarker.trim() : '';
|
|
993
|
+
let continuesBlock;
|
|
994
|
+
let continuesMarkerPx = 0;
|
|
995
|
+
if (continuesText.length > 0) {
|
|
996
|
+
const font = buildFontString(style.body.fontFamily, em, style.body.fontWeight.toString(), style.continuesMarkerItalic ? 'italic' : 'normal');
|
|
997
|
+
const lh = bodyStyle.lineHeightPx;
|
|
998
|
+
const { lines } = measureRichBlock([{ text: continuesText, bold: false, italic: false }], font, font, font, font, innerWidth, lh, { textAlign: 'left' });
|
|
999
|
+
continuesMarkerPx = lines.length * lh;
|
|
1000
|
+
if (input.continues && lines.length > 0) {
|
|
1001
|
+
const top = st.cursorY;
|
|
1002
|
+
const align = style.continuesMarkerAlign;
|
|
1003
|
+
continuesBlock = {
|
|
1004
|
+
kind: 'text',
|
|
1005
|
+
bbox: createBoundingBox(innerX, top, innerWidth, continuesMarkerPx),
|
|
1006
|
+
fontString: font,
|
|
1007
|
+
color: bodyStyle.color,
|
|
1008
|
+
lines: lines.map((ln, i) => {
|
|
1009
|
+
const slack = Math.max(0, innerWidth - ln.bbox.width);
|
|
1010
|
+
return {
|
|
1011
|
+
text: ln.text,
|
|
1012
|
+
xOffset: align === 'right' ? slack : align === 'center' ? slack / 2 : 0,
|
|
1013
|
+
baselineY: top + i * lh + lh * 0.8,
|
|
1014
|
+
width: ln.bbox.width,
|
|
1015
|
+
};
|
|
1016
|
+
}),
|
|
1017
|
+
clip: false,
|
|
1018
|
+
artifact: true,
|
|
1019
|
+
};
|
|
1020
|
+
st.cursorY += continuesMarkerPx;
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
761
1023
|
cursorY = st.cursorY;
|
|
762
1024
|
// An icon taller than the content grows the inner area to fit it; with
|
|
763
1025
|
// `align: 'center'` the title and children are centred on the icon.
|
|
@@ -768,6 +1030,8 @@ export function layoutCallout(input) {
|
|
|
768
1030
|
if (style.icon.align === 'center') {
|
|
769
1031
|
if (titleBlock)
|
|
770
1032
|
offsetDesignBlock(titleBlock, 0, extra / 2);
|
|
1033
|
+
if (continuesBlock)
|
|
1034
|
+
offsetDesignBlock(continuesBlock, 0, extra / 2);
|
|
771
1035
|
for (const blk of childBlocks)
|
|
772
1036
|
offsetBlock(blk, 0, extra / 2);
|
|
773
1037
|
}
|
|
@@ -795,10 +1059,17 @@ export function layoutCallout(input) {
|
|
|
795
1059
|
: stripeLeft
|
|
796
1060
|
? createBoundingBox(0, 0, stripeW, boxHeight)
|
|
797
1061
|
: createBoundingBox(boxWidth - stripeW, 0, stripeW, boxHeight);
|
|
1062
|
+
// On a rounded frame the stripe follows the corners: it is clipped to
|
|
1063
|
+
// the frame's rounded rectangle (the radius clamped as the frame's is),
|
|
1064
|
+
// so its square ends never stick out past the background and border.
|
|
1065
|
+
const frameRadius = Math.max(0, Math.min(px(style.borderRadius), boxWidth / 2, boxHeight / 2));
|
|
798
1066
|
overlayBlocks.push({
|
|
799
1067
|
kind: 'box',
|
|
800
1068
|
bbox: stripeBox,
|
|
801
1069
|
box: { backgroundColor: style.stripe.color.hex, borderWidthPx: 0, borderRadiusPx: 0 },
|
|
1070
|
+
...(frameRadius > 0
|
|
1071
|
+
? { clip: { x: 0, y: 0, width: boxWidth, height: boxHeight, radii: [frameRadius, frameRadius, frameRadius, frameRadius] } }
|
|
1072
|
+
: {}),
|
|
802
1073
|
});
|
|
803
1074
|
}
|
|
804
1075
|
let iconFileId;
|
|
@@ -809,7 +1080,7 @@ export function layoutCallout(input) {
|
|
|
809
1080
|
// A corner badge hangs on its corner half past the border, flush with
|
|
810
1081
|
// the top edge.
|
|
811
1082
|
const iconX = cornerIcon
|
|
812
|
-
? (cornerRight ? boxWidth -
|
|
1083
|
+
? (cornerRight ? boxWidth - cornerIconW / 2 : -cornerIconW / 2)
|
|
813
1084
|
: sideStripe
|
|
814
1085
|
? (stripeLeft ? (stripeW - iconSize) / 2 : boxWidth - stripeW + (stripeW - iconSize) / 2)
|
|
815
1086
|
: innerX - iconColumn;
|
|
@@ -827,6 +1098,8 @@ export function layoutCallout(input) {
|
|
|
827
1098
|
}
|
|
828
1099
|
if (titleBlock)
|
|
829
1100
|
overlayBlocks.push(titleBlock);
|
|
1101
|
+
if (continuesBlock)
|
|
1102
|
+
overlayBlocks.push(continuesBlock);
|
|
830
1103
|
// --- Label tab ---------------------------------------------------------------
|
|
831
1104
|
// The fence's `label` on a tab hugging a top corner, rising `offset`
|
|
832
1105
|
// above the box; an icon beside it and a rule along the top edge.
|
|
@@ -874,7 +1147,7 @@ export function layoutCallout(input) {
|
|
|
874
1147
|
w = dims.width * k;
|
|
875
1148
|
h = dims.height * k;
|
|
876
1149
|
}
|
|
877
|
-
overlayBlocks.push({ kind: 'image', bbox: createBoundingBox(onRight ? iconX + iconW - w : iconX, tabY + (tabH - h) / 2, w, h), fileId });
|
|
1150
|
+
overlayBlocks.push({ kind: 'image', bbox: createBoundingBox(onRight ? iconX + iconW - w : iconX, tabY + (tabH - h) / 2, w, h), fileId, ...pictureTraits(resource, fileId) });
|
|
878
1151
|
edgeX = onRight ? iconX + iconW - w : iconX + w;
|
|
879
1152
|
}
|
|
880
1153
|
}
|
|
@@ -979,6 +1252,7 @@ export function layoutCallout(input) {
|
|
|
979
1252
|
totalHeight: frameHeight,
|
|
980
1253
|
marginTopPx: px(style.marginTop),
|
|
981
1254
|
marginBottomPx: px(style.marginBottom),
|
|
1255
|
+
continuesMarkerPx,
|
|
982
1256
|
};
|
|
983
1257
|
}
|
|
984
1258
|
/** Whether an icon / marker spec draws anything. */
|
|
@@ -999,6 +1273,19 @@ function fitInSquare(x, y, size, w, h) {
|
|
|
999
1273
|
const fh = h * scale;
|
|
1000
1274
|
return createBoundingBox(x + (size - fw) / 2, y + (size - fh) / 2, fw, fh);
|
|
1001
1275
|
}
|
|
1276
|
+
/** How wide the icon `buildIconBlock` draws for `spec` in a slot `size`
|
|
1277
|
+
* tall and `boxWidth` wide: the fitted picture of a wide resource icon (a
|
|
1278
|
+
* strip), else the square. A corner badge is centred on its corner by
|
|
1279
|
+
* this width (EF-142). */
|
|
1280
|
+
function iconFootprintWidth(spec, size, boxWidth, ctx) {
|
|
1281
|
+
if (spec.kind !== 'resource' || boxWidth <= size)
|
|
1282
|
+
return size;
|
|
1283
|
+
const resource = ctx.resourceById.get(spec.resourceId);
|
|
1284
|
+
const dims = resource?.bitmap ?? resource?.svg;
|
|
1285
|
+
if (!dims?.width || !dims.height)
|
|
1286
|
+
return size;
|
|
1287
|
+
return dims.width * Math.min(boxWidth / dims.width, size / dims.height);
|
|
1288
|
+
}
|
|
1002
1289
|
/** The design block for an icon spec drawn in the square `(x, y, size)`:
|
|
1003
1290
|
* an image block for a resource (aspect-fitted; `undefined` when the
|
|
1004
1291
|
* resource is missing), a centred text block for a glyph. */
|
|
@@ -1017,7 +1304,7 @@ function buildIconBlock(spec, x, y, size, ctx, boxWidth = size) {
|
|
|
1017
1304
|
bbox = createBoundingBox(x, y + (size - fh) / 2, fw, fh);
|
|
1018
1305
|
}
|
|
1019
1306
|
return {
|
|
1020
|
-
block: { kind: 'image', bbox, fileId },
|
|
1307
|
+
block: { kind: 'image', bbox, fileId, ...pictureTraits(resource, fileId) },
|
|
1021
1308
|
fileId,
|
|
1022
1309
|
format: resource?.bitmap?.format,
|
|
1023
1310
|
};
|