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
package/dist/types.d.ts
CHANGED
|
@@ -50,16 +50,24 @@ export interface ResourcePlacement {
|
|
|
50
50
|
span?: ResourceFloatSpan;
|
|
51
51
|
/** Set the resource turned a quarter turn on the page (a landscape table
|
|
52
52
|
* in a portrait book). A rotated resource is always a page-span float:
|
|
53
|
-
* it is laid out
|
|
54
|
-
* whole
|
|
53
|
+
* it is laid out along the height of the page's content area, rounded
|
|
54
|
+
* down to whole lines of the baseline grid and less one body line (the
|
|
55
|
+
* float gap every float band keeps), takes a whole page (a table too wide for one page continues on the next, cut
|
|
55
56
|
* between rows like an upright table), and sits flush to the spine when
|
|
56
57
|
* the margins are mirrored, flush left otherwise. Ignored for an inline
|
|
57
58
|
* (`position: 'here'`) embed. */
|
|
58
59
|
rotate?: ResourceRotation;
|
|
59
|
-
/** Fraction of the column (or page) width the float
|
|
60
|
-
* < 1
|
|
60
|
+
/** Fraction of the column (or page) width the float — or the inline
|
|
61
|
+
* embed — takes, `0 < width < 1`: a narrow table centred in its column.
|
|
62
|
+
* Default: the whole width. */
|
|
61
63
|
width?: number;
|
|
62
|
-
/** Where a
|
|
64
|
+
/** Where a resource narrower than its slot sits: a float or embed
|
|
65
|
+
* narrowed by `width`, and a picture (bitmap or SVG) narrower than its
|
|
66
|
+
* slot — a bitmap smaller than the column, or one `layout.fitFiguresToPage`
|
|
67
|
+
* shrank — whose caption and note keep the slot's measure. A turned
|
|
68
|
+
* figure and one with its caption beside it stay flush left. Default
|
|
69
|
+
* `'left'` (up to postext 1.4 a narrower picture was always set flush
|
|
70
|
+
* left). */
|
|
63
71
|
align?: 'left' | 'center' | 'right';
|
|
64
72
|
/** Set the caption beside the figure, in the float-only side column of
|
|
65
73
|
* a `oneAndHalf` layout (`layout.sideColumnRole: 'floats'`): the body
|
|
@@ -80,14 +88,21 @@ export interface ResourceType {
|
|
|
80
88
|
/** Compact label used in inline references (e.g. "Fig."). */
|
|
81
89
|
shortLabel: string;
|
|
82
90
|
/** Template for the computed number. Placeholders: `{n}` (the counter),
|
|
83
|
-
* `{h1}`..`{h6}` (current heading numbers). E.g. `'{h1}.{n}'`.
|
|
91
|
+
* `{h1}`..`{h6}` (current heading numbers). E.g. `'{h1}.{n}'`. `''`
|
|
92
|
+
* prints no number: the caption reads "Do. Caption" and a reference the
|
|
93
|
+
* label alone, though the counter still counts. */
|
|
84
94
|
numberingTemplate: string;
|
|
85
95
|
/** When the counter resets. */
|
|
86
96
|
resetOn: ResourceCounterReset;
|
|
87
|
-
/** How the `{n}` counter is formatted.
|
|
97
|
+
/** How the `{n}` counter is formatted. The page and list spellings of a
|
|
98
|
+
* format are read too (`'lower-roman'`, `'arabic'`…, see
|
|
99
|
+
* `parseNumberFormat`); an unknown value counts in decimal and is
|
|
100
|
+
* reported by `collectConfigWarnings`. */
|
|
88
101
|
counterFormat: ResourceCounterFormat;
|
|
89
102
|
/** Prefix prepended to the caption (e.g. "Figure"). The computed number
|
|
90
|
-
* follows this prefix.
|
|
103
|
+
* follows this prefix, then a full stop ("Figure 1.7. "); without a
|
|
104
|
+
* number the stop follows the prefix, less its end spaces, unless it
|
|
105
|
+
* ends in `.`, `:`, `!`, `?` or `…` (or a full-width form) already. */
|
|
91
106
|
captionPrefix: string;
|
|
92
107
|
/** Default placement for resources of this type, used when a resource does
|
|
93
108
|
* not specify its own `placement`. Falls back to `auto` / `column`. */
|
|
@@ -122,7 +137,10 @@ export interface TableCellImage {
|
|
|
122
137
|
width?: number;
|
|
123
138
|
}
|
|
124
139
|
export interface TableCell {
|
|
125
|
-
/** Cell content (plain text / inline markdown).
|
|
140
|
+
/** Cell content (plain text / inline markdown). A newline, or `\\` as in
|
|
141
|
+
* captions and notes, starts a new paragraph. A paragraph of ordinary
|
|
142
|
+
* spaces sets nothing; one holding a no-break space (U+00A0) sets a line.
|
|
143
|
+
* `\$` prints a dollar sign (cells are not parsed for maths). */
|
|
126
144
|
content: string;
|
|
127
145
|
/** Optional image drawn inside the cell, above the content. */
|
|
128
146
|
image?: TableCellImage;
|
|
@@ -162,11 +180,17 @@ export interface Resource {
|
|
|
162
180
|
/** The `ResourceType.id` this resource belongs to. */
|
|
163
181
|
typeId: string;
|
|
164
182
|
kind: ResourceKind;
|
|
165
|
-
/** Optional caption text (the type prefix + number are computed).
|
|
183
|
+
/** Optional caption text (the type prefix + number are computed). Inline
|
|
184
|
+
* formatting and `:ref` marks apply; `\\` — or a backslash ending a line
|
|
185
|
+
* — starts a new line (a plain newline is a space); inside inline code,
|
|
186
|
+
* a link destination or a directive's attributes the backslashes stay as
|
|
187
|
+
* written. */
|
|
166
188
|
caption?: string;
|
|
167
189
|
/** Optional note (source line, credits, footnote-like remark) set in a
|
|
168
190
|
* smaller run under the resource. Accepts the same inline formatting and
|
|
169
|
-
* `:ref` marks as the caption
|
|
191
|
+
* `:ref` marks as the caption, and the same forced line break (`\\`, or
|
|
192
|
+
* a backslash ending a line): the footnotes of a wide table, one per
|
|
193
|
+
* line. Styled by `captionStyle.note`. */
|
|
170
194
|
note?: string;
|
|
171
195
|
/** Accessibility alt text. */
|
|
172
196
|
altText?: string;
|
|
@@ -213,12 +237,18 @@ export interface Resource {
|
|
|
213
237
|
* reference; `'here'` embeds it inline at its `::resource` directive. */
|
|
214
238
|
placement?: ResourcePlacement;
|
|
215
239
|
}
|
|
240
|
+
/** A footnote, endnote or margin note. Not implemented yet: the engine does
|
|
241
|
+
* not read `PostextContent.notes` (see there). */
|
|
216
242
|
export interface PostextNote {
|
|
217
243
|
id: string;
|
|
218
244
|
type: 'footnote' | 'endnote' | 'marginNote';
|
|
219
245
|
content: string;
|
|
220
246
|
marker?: string;
|
|
221
247
|
}
|
|
248
|
+
/** Document metadata: the frontmatter merged over `PostextContent.metadata`.
|
|
249
|
+
* On a built document (`VDTDocument.metadata`) the four printed fields are
|
|
250
|
+
* always text — typed YAML values (`title: 1984`, a date, a list) are
|
|
251
|
+
* coerced by `metadataText`. */
|
|
222
252
|
export interface DocumentMetadata {
|
|
223
253
|
title?: string;
|
|
224
254
|
subtitle?: string;
|
|
@@ -234,6 +264,10 @@ export interface PostextContent {
|
|
|
234
264
|
* resolved out-of-band by the renderer; table resources carry their model
|
|
235
265
|
* inline. */
|
|
236
266
|
resources?: Resource[];
|
|
267
|
+
/** Not implemented yet: accepted, but no stage of the pipeline reads it —
|
|
268
|
+
* notes are neither laid out, numbered nor rendered, and the markdown has
|
|
269
|
+
* no note-reference syntax. Set notes as text for now (a superscript
|
|
270
|
+
* `^1^` marker and a `:::paragraphs` block of notes; see the docs). */
|
|
237
271
|
notes?: PostextNote[];
|
|
238
272
|
/** Counters carried over from content laid out before this document — a
|
|
239
273
|
* book chapter laid out on its own continues the numbering of the
|
|
@@ -266,6 +300,10 @@ export interface OutlineEntry {
|
|
|
266
300
|
* chapter ordinal for a level-1 heading; the part's `number` as written.
|
|
267
301
|
* Empty for an unnumbered heading. */
|
|
268
302
|
number: string;
|
|
303
|
+
/** A numbered heading's counter: its level's running count, restarted by
|
|
304
|
+
* a `startAt` attribute (the `3` of a third chapter, whatever `number`
|
|
305
|
+
* prints). Absent for a part and an unnumbered heading. */
|
|
306
|
+
counter?: number;
|
|
269
307
|
/** False for a heading whose style has `numbered: false`. */
|
|
270
308
|
numbered: boolean;
|
|
271
309
|
/** Id of the heading style (`{style="…"}`), when the heading has one. */
|
|
@@ -329,13 +367,33 @@ export interface LayoutContinuation {
|
|
|
329
367
|
heading: HeadingCounters;
|
|
330
368
|
}>;
|
|
331
369
|
/** Resources already numbered by the preceding content, so a later
|
|
332
|
-
* reference keeps the number of its first mention.
|
|
370
|
+
* reference keeps the number of its first mention. The preceding
|
|
371
|
+
* content placed them too: this document only refers to them — a
|
|
372
|
+
* floated resource listed here is not floated again, and a
|
|
373
|
+
* `::resource` embed of one is just another reference. */
|
|
333
374
|
resourceNumbers?: Record<string, ResourceNumberEntry>;
|
|
334
375
|
/** The `:::part` in effect at the end of the preceding content — the last
|
|
335
376
|
* part opened, whether or not its fence has closed — so a chapter laid
|
|
336
377
|
* out on its own keeps `{partTitle}` / `{partNumber}` and the part's
|
|
337
378
|
* palette overrides on every page until it opens a part of its own. */
|
|
338
379
|
part?: PartState;
|
|
380
|
+
/** True when the preceding content ends by closing a `:::part` (nothing
|
|
381
|
+
* follows its fence) and parts open a divider page: the part's pages are
|
|
382
|
+
* the last before this document. The part's `breakAfter` is then still
|
|
383
|
+
* owed — applied before this document's first block, as it would be in
|
|
384
|
+
* one document — and a first page left blank is the back of the part
|
|
385
|
+
* page, painted with `parts.versoDesign`. `continuationAfter` sets it;
|
|
386
|
+
* it moves page breaks only when `parts.breakAfter.parity` asks for a
|
|
387
|
+
* side. */
|
|
388
|
+
afterPartPage?: boolean;
|
|
389
|
+
/** Physical pages of the whole book this document is part of — every
|
|
390
|
+
* chapter, blank pages included — when the host knows them: what
|
|
391
|
+
* `{bookTotalPages}` prints. Omitted, the placeholder counts the pages up
|
|
392
|
+
* to the end of this document (`pageIndexOffset` plus its own pages),
|
|
393
|
+
* which is the whole book for a self-contained document and for the
|
|
394
|
+
* last chapter. It only feeds running heads and design text, never the
|
|
395
|
+
* page breaks, so a host can take it from a layout of the same book. */
|
|
396
|
+
bookPageCount?: number;
|
|
339
397
|
}
|
|
340
398
|
/** A part (section) as the running heads see it: number and title as
|
|
341
399
|
* written on the fence, plus the colour-palette entries the fence
|
|
@@ -351,6 +409,10 @@ export type ColorModel = 'hex' | 'rgb' | 'cmyk' | 'hsl';
|
|
|
351
409
|
export interface ColorValue {
|
|
352
410
|
hex: string;
|
|
353
411
|
model: ColorModel;
|
|
412
|
+
/** The `colorPalette` entry this colour follows, wherever it sits in the
|
|
413
|
+
* configuration (designs, callout labels and the `:ref` colour
|
|
414
|
+
* included): the entry's `hex` / `model` win, and the ones stored here
|
|
415
|
+
* are the fallback when the palette has no such entry. */
|
|
354
416
|
paletteId?: string;
|
|
355
417
|
}
|
|
356
418
|
export interface ColorPaletteEntry {
|
|
@@ -377,22 +439,44 @@ export interface PageMargins {
|
|
|
377
439
|
* `false`. */
|
|
378
440
|
mirror?: boolean;
|
|
379
441
|
}
|
|
442
|
+
/** The baseline grid: lines one body line height apart from the top of
|
|
443
|
+
* the content area. The layout uses it whether or not it is drawn
|
|
444
|
+
* (headings, list ends, boxes, figures and display formulas snap the flow
|
|
445
|
+
* back onto it, unless their own `snapToGrid` is off); this config only
|
|
446
|
+
* draws it. */
|
|
380
447
|
export interface BaselineGridConfig {
|
|
448
|
+
/** Draw the grid lines over the pages (canvas and PDF renderers, the
|
|
449
|
+
* Sandbox views). Only the drawing: the layout is the same either way. */
|
|
381
450
|
enabled: boolean;
|
|
382
451
|
color?: ColorValue;
|
|
383
452
|
lineWidth?: Dimension;
|
|
384
453
|
}
|
|
454
|
+
/** Bleed and crop marks. When enabled, the sheet grows by
|
|
455
|
+
* `bleed + markOffset + markLength` on every side, with the trimmed page
|
|
456
|
+
* in its middle (see `cropMarkSegments`). */
|
|
385
457
|
export interface CutLinesConfig {
|
|
386
458
|
enabled: boolean;
|
|
459
|
+
/** How far art may run past the trim. Default 3 mm. */
|
|
387
460
|
bleed?: Dimension;
|
|
461
|
+
/** Length of each crop mark. Default 5 mm. */
|
|
388
462
|
markLength?: Dimension;
|
|
463
|
+
/** Gap between the trim edge and the start of each crop mark. A mark
|
|
464
|
+
* never starts inside the bleed: when `bleed` is wider, it starts at
|
|
465
|
+
* the bleed edge. Default 3 mm. */
|
|
389
466
|
markOffset?: Dimension;
|
|
467
|
+
/** Stroke width of the marks. Default 0.25 pt. */
|
|
390
468
|
markWidth?: Dimension;
|
|
469
|
+
/** Colour of the marks on the canvas and in RGB or grayscale PDFs. A
|
|
470
|
+
* CMYK PDF paints them in registration colour (the `/All`
|
|
471
|
+
* separation), so they print on every plate. Default black. */
|
|
391
472
|
color?: ColorValue;
|
|
392
473
|
}
|
|
393
474
|
export type PageNumberFormat = 'decimal' | 'lower-roman' | 'upper-roman' | 'lower-alpha' | 'upper-alpha';
|
|
394
475
|
export interface PageNumberingConfig {
|
|
395
|
-
/** Format for page labels. Default: `'decimal'`.
|
|
476
|
+
/** Format for page labels. Default: `'decimal'`. The list and resource
|
|
477
|
+
* spellings of a format are read too (`'arabic'`, `'roman-lower'`,
|
|
478
|
+
* `'i'`…, see `parseNumberFormat`); an unknown value numbers in decimal
|
|
479
|
+
* and is reported by `collectConfigWarnings`. */
|
|
396
480
|
format?: PageNumberFormat;
|
|
397
481
|
/** Numeric starting value assigned to the first page of the document,
|
|
398
482
|
* regardless of format. `format: 'lower-roman', startAt: 1` yields
|
|
@@ -460,6 +544,12 @@ export interface ColumnRuleConfig {
|
|
|
460
544
|
export interface LayoutConfig {
|
|
461
545
|
layoutType?: LayoutType;
|
|
462
546
|
gutterWidth?: Dimension;
|
|
547
|
+
/** `oneAndHalf` only: width of the side column, in percent of the content
|
|
548
|
+
* width; the main column takes what is left after the gutter. Default
|
|
549
|
+
* 33. Any value that leaves both columns at least 1 % of the content
|
|
550
|
+
* width is used as written; one that does not (0 or below, or so wide
|
|
551
|
+
* the main column vanishes) is clamped to the nearest that does, and
|
|
552
|
+
* reported on `VDTDocument.configWarnings` (`sideColumnPercentClamped`). */
|
|
463
553
|
sideColumnPercent?: number;
|
|
464
554
|
/** `oneAndHalf` only. Default `'text'`. */
|
|
465
555
|
sideColumnRole?: SideColumnRole;
|
|
@@ -467,11 +557,55 @@ export interface LayoutConfig {
|
|
|
467
557
|
sideColumnSide?: SideColumnSide;
|
|
468
558
|
columnRule?: ColumnRuleConfig;
|
|
469
559
|
/** Shrink a figure (bitmap or SVG) whose image, caption and note would
|
|
470
|
-
* stand taller than the content area until the stack fits it.
|
|
471
|
-
*
|
|
472
|
-
*
|
|
560
|
+
* stand taller than the content area until the stack fits it. The shrunk
|
|
561
|
+
* image sits in its slot per `placement.align`. Off by default — print
|
|
562
|
+
* pages are sized for their figures; the HTML viewer, whose pages are as
|
|
563
|
+
* tall as the screen, turns it on. */
|
|
473
564
|
fitFiguresToPage?: boolean;
|
|
474
|
-
|
|
565
|
+
/** On the closing page of a chapter (and of the document), move the
|
|
566
|
+
* page-wide figures and tables set below the last band of text up to sit
|
|
567
|
+
* one float gap under it, stacked in their order, instead of at the page
|
|
568
|
+
* foot — nothing follows them there. Default `true`. `false` keeps them
|
|
569
|
+
* where their placement put them: a `position: 'bottom'` float ends at
|
|
570
|
+
* the page foot on the closing page as on every other page. Pages with a
|
|
571
|
+
* side column never move them. */
|
|
572
|
+
hugClosingFloats?: boolean;
|
|
573
|
+
/** Where an inline resource (`placement.position: 'here'`, embedded with
|
|
574
|
+
* `::resource`) keeps the float gap, a line: `'around'` keeps it above
|
|
575
|
+
* and below the resource, and the text after it goes back onto the
|
|
576
|
+
* baseline grid under that gap (the default since postext 1.5);
|
|
577
|
+
* `'above'` keeps it above only, and the text after it resumes at the
|
|
578
|
+
* next grid line, however close that is to the resource (postext 1.4).
|
|
579
|
+
* A configuration stored by an earlier version is read with `'above'`
|
|
580
|
+
* when its chapters embed a resource (see `migrateConfig` in
|
|
581
|
+
* `postext/bundle`). */
|
|
582
|
+
inlineResourceGap?: InlineResourceGap;
|
|
583
|
+
/** Whether an inline resource inside a box (`:::callout`) keeps the gap
|
|
584
|
+
* {@link inlineResourceGap} sets, a line of the box's own text: above
|
|
585
|
+
* the resource, and below it with `'around'`, the larger of it and the
|
|
586
|
+
* next block's own space applying. At the top or foot of the box, or of
|
|
587
|
+
* a split box's fragment, the padding sets the resource off instead.
|
|
588
|
+
* Default `true` (since postext 1.5). `false` sets the resource right
|
|
589
|
+
* under the text before it and the text after it right under the
|
|
590
|
+
* resource, as postext 1.4 did. A configuration stored by an earlier
|
|
591
|
+
* version is read with `false` when its chapters embed a resource (see
|
|
592
|
+
* `migrateConfig` in `postext/bundle`). */
|
|
593
|
+
inlineResourceGapInBoxes?: boolean;
|
|
594
|
+
/** Fewest lines of a paragraph or list item that a cut inside it leaves
|
|
595
|
+
* on each side when a box splits (see `CalloutStyleConfig.splitMinLines`,
|
|
596
|
+
* which still counts every line on each side of the cut). A whole number,
|
|
597
|
+
* at least 1; default 2 (since postext 1.5), so a cut never leaves a lone
|
|
598
|
+
* line of a paragraph or item at a column's foot or at the next one's
|
|
599
|
+
* head. A box style whose `splitMinLines` is lower sets the limit instead
|
|
600
|
+
* (1 allows a lone line). 1 lets any box cut leave one line of the
|
|
601
|
+
* paragraph or item on a side, as postext 1.4 did. A configuration stored
|
|
602
|
+
* by an earlier version is read with 1 when its chapters hold a box (see
|
|
603
|
+
* `migrateConfig` in `postext/bundle`). */
|
|
604
|
+
boxChildSplitMinLines?: number;
|
|
605
|
+
}
|
|
606
|
+
/** Where an inline resource keeps the float gap (see
|
|
607
|
+
* `LayoutConfig.inlineResourceGap`). */
|
|
608
|
+
export type InlineResourceGap = 'around' | 'above';
|
|
475
609
|
export interface ResolvedLayoutConfig {
|
|
476
610
|
layoutType: LayoutType;
|
|
477
611
|
gutterWidth: Dimension;
|
|
@@ -484,18 +618,69 @@ export interface ResolvedLayoutConfig {
|
|
|
484
618
|
lineWidth: Dimension;
|
|
485
619
|
};
|
|
486
620
|
fitFiguresToPage: boolean;
|
|
621
|
+
hugClosingFloats: boolean;
|
|
622
|
+
inlineResourceGap: InlineResourceGap;
|
|
623
|
+
inlineResourceGapInBoxes: boolean;
|
|
624
|
+
boxChildSplitMinLines: number;
|
|
487
625
|
}
|
|
488
626
|
export type TextAlign = 'left' | 'justify' | 'center' | 'right';
|
|
489
627
|
export type HyphenationLocale = 'en-us' | 'es' | 'fr' | 'de' | 'it' | 'pt' | 'ca' | 'nl';
|
|
628
|
+
/**
|
|
629
|
+
* A BCP 47 language tag: one of the bundled {@link HyphenationLocale} ids,
|
|
630
|
+
* or any other tag (`'es-ES'`, `'pt-BR'`, `'en-GB'`, `'sv'`). Hyphenation
|
|
631
|
+
* ignores the region, script and variant subtags (`'es-ES'` hyphenates with
|
|
632
|
+
* the `'es'` patterns, every English tag with `'en-us'`); a language with no
|
|
633
|
+
* bundled patterns hyphenates with `'en-us'` and the engine warns once on the
|
|
634
|
+
* console. The tag itself is kept as the PDF's document language.
|
|
635
|
+
*/
|
|
636
|
+
export type LocaleTag = HyphenationLocale | (string & {});
|
|
490
637
|
export interface HyphenationConfig {
|
|
491
638
|
enabled?: boolean;
|
|
492
|
-
|
|
639
|
+
/** Language of the hyphenation patterns. Defaults to the top-level
|
|
640
|
+
* `locale`, else `'en-us'`. */
|
|
641
|
+
locale?: LocaleTag;
|
|
642
|
+
/** Also hyphenate ragged text — left, right or centre aligned — within
|
|
643
|
+
* the {@link zone}. Default `false`: only justified text is hyphenated.
|
|
644
|
+
* Applies to the body text, blockquotes, and the paragraph styles and
|
|
645
|
+
* callout bodies whose own hyphenation is on. */
|
|
646
|
+
ragged?: boolean;
|
|
647
|
+
/** Hyphenation zone for ragged text: a word that does not fit the line is
|
|
648
|
+
* hyphenated only when sending it whole to the next line would leave more
|
|
649
|
+
* than this much empty space at the end of the line. A wider zone gives
|
|
650
|
+
* fewer hyphens and a more ragged edge; `0` hyphenates wherever a word
|
|
651
|
+
* does not fit. `em` is relative to the text's own font size. Default
|
|
652
|
+
* `3em`. Ignored for justified text. Set line by line, no more than two
|
|
653
|
+
* lines in a row end on a syllable; broken with Knuth–Plass
|
|
654
|
+
* (`BodyTextConfig.optimalRagged`), two in a row cost what two hyphens in
|
|
655
|
+
* a row cost in justified text. */
|
|
656
|
+
zone?: Dimension;
|
|
657
|
+
/** Let the dictionary divide the words of a compound, a word with a
|
|
658
|
+
* hyphen between two letters ("af-ter-dinner"). Default `true`. `false`
|
|
659
|
+
* keeps such a word whole but for its own hyphen, where a line may still
|
|
660
|
+
* end ("after-" | "dinner"): TeX's rule, and the Chicago Manual's advice.
|
|
661
|
+
* A soft hyphen typed in the word still breaks, and a compound wider than
|
|
662
|
+
* the whole line is still divided where it must be. Applies wherever the
|
|
663
|
+
* body's hyphenation does: the running text, headings, lists, blockquotes
|
|
664
|
+
* and boxes; captions, notes, table cells and the contents keep dividing
|
|
665
|
+
* compounds. */
|
|
666
|
+
compounds?: boolean;
|
|
493
667
|
}
|
|
494
668
|
export interface ResolvedHyphenationConfig {
|
|
495
669
|
enabled: boolean;
|
|
670
|
+
/** The bundled patterns actually used (see {@link LocaleTag}). */
|
|
496
671
|
locale: HyphenationLocale;
|
|
672
|
+
/** The BCP 47 tag {@link locale} was resolved from, when it is not itself
|
|
673
|
+
* a bundled id (`'es-ES'` → `'es'`, `'sv'` → `'en-us'`). The PDF backend
|
|
674
|
+
* declares it as the document language. */
|
|
675
|
+
tag?: string;
|
|
676
|
+
ragged: boolean;
|
|
677
|
+
zone: Dimension;
|
|
678
|
+
compounds: boolean;
|
|
497
679
|
}
|
|
498
680
|
export interface BodyTextConfig {
|
|
681
|
+
/** One family, as every `fontFamily` field: a CSS font stack is set in
|
|
682
|
+
* its first family (see `primaryFontFamily`) and reported by
|
|
683
|
+
* `collectConfigWarnings`. */
|
|
499
684
|
fontFamily?: string;
|
|
500
685
|
fontSize?: Dimension;
|
|
501
686
|
lineHeight?: Dimension;
|
|
@@ -522,12 +707,97 @@ export interface BodyTextConfig {
|
|
|
522
707
|
* Default `true` — every paragraph receives the indent. */
|
|
523
708
|
indentAfterHeading?: boolean;
|
|
524
709
|
/** Max word-spacing when justifying, as a multiplier of the normal space width.
|
|
525
|
-
*
|
|
710
|
+
* Knuth–Plass keeps every line within it that the paragraph allows,
|
|
711
|
+
* hyphenating or spreading the slack over neighbouring lines first; a
|
|
712
|
+
* line no break sequence can set within it stretches past it at a cost
|
|
713
|
+
* that jumps past the bound and grows with the square of the adjustment
|
|
714
|
+
* ratio, and one past 3× the normal
|
|
715
|
+
* space is set ragged. `maxJustifyTracking` lets such a line take a
|
|
716
|
+
* little tracking instead. Default 2. */
|
|
526
717
|
maxWordSpacing?: number;
|
|
527
718
|
/** Min word-spacing when justifying, as a multiplier of the normal space width. */
|
|
528
719
|
minWordSpacing?: number;
|
|
720
|
+
/** Most tracking a justified line may take, in thousandths of an em
|
|
721
|
+
* either way (the InDesign unit: 10 = 0.01 em per character), when its
|
|
722
|
+
* word spaces alone would set it past `maxWordSpacing` or
|
|
723
|
+
* `minWordSpacing`: the part of the adjustment beyond the limit goes into
|
|
724
|
+
* the letters, so a loose line's spaces come back to `maxWordSpacing` and
|
|
725
|
+
* a tight one fits at `minWordSpacing`. Lines within the limits, a
|
|
726
|
+
* paragraph's last line (unless it runs over) and a line of one word
|
|
727
|
+
* take none, nor does a line holding a chip. Knuth–Plass weighs it (it
|
|
728
|
+
* is taken only where word spacing alone would pass its limits), so it
|
|
729
|
+
* needs `optimalLineBreaking`. 0 (the default) turns it off. */
|
|
730
|
+
maxJustifyTracking?: number;
|
|
529
731
|
/** Use Knuth-Plass optimal line breaking instead of greedy first-fit. Default true. */
|
|
530
732
|
optimalLineBreaking?: boolean;
|
|
733
|
+
/** Break ragged paragraphs with Knuth–Plass too: body text, blockquotes
|
|
734
|
+
* and list items set left, right or centred, and ragged paragraph styles,
|
|
735
|
+
* box bodies and the bodies of parts and section styles. Word spaces keep
|
|
736
|
+
* their width; the breaker weighs how far each line falls short of the
|
|
737
|
+
* measure (3 em short costs what a justified line at `maxWordSpacing`
|
|
738
|
+
* does), so the edge comes out more even, and the runt rules
|
|
739
|
+
* (`avoidRunts`, `tightenRunts`) and `hyphenateAcrossColumns` work as on
|
|
740
|
+
* justified text. A line may end after a hyphen the text carries between
|
|
741
|
+
* two letters, as line by line. With `hyphenation.ragged` the zone still
|
|
742
|
+
* decides which syllables may end a line; two syllable ends in a row are
|
|
743
|
+
* discouraged rather than refused.
|
|
744
|
+
* Ragged headings, captions, table cells and the contents are still set
|
|
745
|
+
* line by line. Needs `optimalLineBreaking`. Default `true`; `false` sets ragged text
|
|
746
|
+
* line by line, as up to postext 1.4 (configurations stored before
|
|
747
|
+
* `configVersion` 7 whose text can be ragged read with it, see
|
|
748
|
+
* `pinLegacyRaggedBreaking` in `postext/bundle`). */
|
|
749
|
+
optimalRagged?: boolean;
|
|
750
|
+
/** Let a line end after an em or en dash set closed between words
|
|
751
|
+
* ("say—that’s", "riddles.—I", "Hamburg–Berlin"), in Knuth–Plass as well
|
|
752
|
+
* as line by line. Never after a dash that opens an aside or a line of
|
|
753
|
+
* dialogue ("—dijo", `said "—Hola`: a space, or a space and a quotation
|
|
754
|
+
* mark, before the dash; a quote that closes a word still lets the line
|
|
755
|
+
* end, "\"no\"—and", German "„nein“—und", French "« non »—et"), before
|
|
756
|
+
* punctuation ("él—,"), before a quotation
|
|
757
|
+
* mark or a bracket ("thinking—\" and", "says—“no”"), inside a run of
|
|
758
|
+
* dashes, or inside a range of numbers set with an en dash
|
|
759
|
+
* ("1914–1918"). A dash that ends a run before a word in another style
|
|
760
|
+
* ("see—*and*") counts too. The line ends on the dash and nothing is
|
|
761
|
+
* added. Default
|
|
762
|
+
* `true`; `false` keeps postext 1.4's breaks: Knuth–Plass never breaks
|
|
763
|
+
* there, and the line-by-line breaker of formatted or hyphenated ragged
|
|
764
|
+
* text only between two letters (configurations stored before
|
|
765
|
+
* `configVersion` 7 whose text sets such a dash read with it, see
|
|
766
|
+
* `pinLegacyDashBreaks`). Applies to the running text, headings, lists,
|
|
767
|
+
* blockquotes and boxes; captions, table cells and the contents keep the
|
|
768
|
+
* 1.4 breaks, and a plain ragged paragraph set line by line follows
|
|
769
|
+
* pretext's own rules either way. */
|
|
770
|
+
breakAfterDashes?: boolean;
|
|
771
|
+
/** Let a line end after the hyphen of a compound, a hyphen between two
|
|
772
|
+
* letters ("well-" | "known", "vencer-" | "se"), in every paragraph
|
|
773
|
+
* broken with Knuth–Plass. The line ends on the hyphen and nothing is
|
|
774
|
+
* added. Never after a hyphen next to a digit or a sign ("COVID-19",
|
|
775
|
+
* "-5 °C"). A justified paragraph without inline formatting breaks there
|
|
776
|
+
* only with two letters on each side of the hyphen, so no line ends on
|
|
777
|
+
* "e-" of "e-mail". Default `true`. `false` keeps postext 1.4's breaks: a
|
|
778
|
+
* justified paragraph with no inline formatting never breaks there,
|
|
779
|
+
* while one with a bold or italic word anywhere, a ragged paragraph and
|
|
780
|
+
* one set line by line do (configurations stored before `configVersion`
|
|
781
|
+
* 8 whose text sets a compound read with it, see
|
|
782
|
+
* `pinLegacyHyphenBreaks`). Applies to the running text, headings, lists,
|
|
783
|
+
* blockquotes and boxes. */
|
|
784
|
+
breakAfterHyphens?: boolean;
|
|
785
|
+
/** Start the line after a break at a compound's hyphen with a hyphen too:
|
|
786
|
+
* "vencer-" | "-se", as Portuguese spelling and the Spanish Academy's
|
|
787
|
+
* 2010 rules ask ("léxico-" | "-semántico"), so the reader knows the
|
|
788
|
+
* hyphen is part of the word. The repeated hyphen is measured with its
|
|
789
|
+
* line and painted, and left out of the line's source range (see
|
|
790
|
+
* `VDTLine.repeatedHyphen`); the PDF paints it under an `/ActualText`
|
|
791
|
+
* that leaves it out, so extracted text reads the word once. A web
|
|
792
|
+
* address never gets one. Default
|
|
793
|
+
* `false`. Applies to the running text, headings, lists, blockquotes and
|
|
794
|
+
* boxes; with it on, a paragraph without formatting that holds a
|
|
795
|
+
* compound is broken the way a formatted one is. */
|
|
796
|
+
repeatHyphen?: boolean;
|
|
797
|
+
/** How Markdown blockquotes (`> …`) are set. Unset fields keep the look
|
|
798
|
+
* postext 1.4 gave them: grey (`#666666`), italic, the body's first-line
|
|
799
|
+
* indent and no side indent. */
|
|
800
|
+
blockquote?: BlockquoteConfig;
|
|
531
801
|
/** When true, discourage a paragraph from ending with fewer than `orphanMinLines`
|
|
532
802
|
* lines at the top of the next column. Soft (penalty-based). Default true. */
|
|
533
803
|
avoidOrphans?: boolean;
|
|
@@ -559,8 +829,9 @@ export interface BodyTextConfig {
|
|
|
559
829
|
* Default 10. */
|
|
560
830
|
slackWeight?: number;
|
|
561
831
|
/** When true, discourage paragraphs from ending with a very short last line
|
|
562
|
-
* (a "runt" — e.g. a single short word alone). Soft (Knuth-Plass penalty)
|
|
563
|
-
*
|
|
832
|
+
* (a "runt" — e.g. a single short word alone). Soft (Knuth-Plass penalty),
|
|
833
|
+
* so ragged text takes it only when `optimalRagged` breaks it with
|
|
834
|
+
* Knuth–Plass. Default true. */
|
|
564
835
|
avoidRunts?: boolean;
|
|
565
836
|
/** Approximate minimum character count for the last line of a paragraph.
|
|
566
837
|
* Interpreted internally as `runtMinCharacters * normalSpaceWidth` pixels, so
|
|
@@ -572,6 +843,12 @@ export interface BodyTextConfig {
|
|
|
572
843
|
* scale as line `badness` (which saturates at 10000). Default 1000 —
|
|
573
844
|
* dominates alternatives up to roughly r≈2.15 word-spacing stretch. */
|
|
574
845
|
runtPenalty?: number;
|
|
846
|
+
/** Scale the runt penalty by how short the last line falls: a last line
|
|
847
|
+
* of width `w` under the threshold `t` costs `runtPenalty × (1 − w / t)`
|
|
848
|
+
* instead of the whole `runtPenalty`, so a two-word ending costs less
|
|
849
|
+
* than a one-word one and the breaker takes it when a line above can
|
|
850
|
+
* give a word up. Off by default (every runt costs the same). */
|
|
851
|
+
gradedRuntPenalty?: boolean;
|
|
575
852
|
/** When true, list items also receive the runt penalty (not just paragraphs).
|
|
576
853
|
* Only effective when `avoidRunts` is true. Default true. */
|
|
577
854
|
avoidRuntsInLists?: boolean;
|
|
@@ -579,8 +856,14 @@ export interface BodyTextConfig {
|
|
|
579
856
|
* runt, set the paragraph one line shorter instead — the compositor's
|
|
580
857
|
* fix: the spaces of every line tighten (never past `minWordSpacing`)
|
|
581
858
|
* and, when that alone does not carry the line, a little negative
|
|
582
|
-
* tracking joins in, up to `maxRuntTracking`.
|
|
583
|
-
*
|
|
859
|
+
* tracking joins in, up to `maxRuntTracking`. A shorter setting is no
|
|
860
|
+
* fix, and the runt stays, when it would stretch a justified line past
|
|
861
|
+
* `maxWordSpacing` or, when the paragraph already has a looser
|
|
862
|
+
* justified line, past that line; or when it would set more lines
|
|
863
|
+
* ragged (past 3× the normal space) than the paragraph had. The word
|
|
864
|
+
* spaces of ragged text keep their width, so there only the tracking
|
|
865
|
+
* takes part. Needs `optimalLineBreaking` and `avoidRunts` (and
|
|
866
|
+
* `optimalRagged` for ragged text). Default true. */
|
|
584
867
|
tightenRunts?: boolean;
|
|
585
868
|
/** Most tracking a runt fix may take, in thousandths of an em (the
|
|
586
869
|
* InDesign unit: 10 = 0.01 em per character), applied as a tightening.
|
|
@@ -590,8 +873,84 @@ export interface BodyTextConfig {
|
|
|
590
873
|
* list is kept joined to the list: if placing the paragraph would leave no
|
|
591
874
|
* room for the first list item in the same column/page, the colon-bearing
|
|
592
875
|
* last line is moved to the next column together with the list (or the
|
|
593
|
-
* whole paragraph, if it is a single line).
|
|
876
|
+
* whole paragraph, if it is a single line). How much room counts as
|
|
877
|
+
* enough is `colonListRoom`. Default true. */
|
|
594
878
|
keepColonWithList?: boolean;
|
|
879
|
+
/** The room `keepColonWithList` asks for under the colon line:
|
|
880
|
+
* - `'item'` (default): what the orphan and widow rules for lists would
|
|
881
|
+
* leave of the first item there, a line when it may split, all of it
|
|
882
|
+
* when they keep it whole (a two-line item, say);
|
|
883
|
+
* - `'line'`: one line, as up to postext 1.4. A first item those rules
|
|
884
|
+
* keep whole then goes on to the next column alone and leaves the
|
|
885
|
+
* colon line at the foot. Configurations stored before
|
|
886
|
+
* `configVersion` 6 read with it (see `pinLegacyColonListRoom` in
|
|
887
|
+
* `postext/bundle`). */
|
|
888
|
+
colonListRoom?: ColonListRoom;
|
|
889
|
+
/** Let a column or a page end on a hyphenated word (InDesign's "Hyphenate
|
|
890
|
+
* Across Column"). Default `true`. `false` re-breaks a paragraph whose
|
|
891
|
+
* last line in a column would end on a hyphen, so that line ends on a
|
|
892
|
+
* whole word instead — the word spaces of the lines above take the
|
|
893
|
+
* difference, within `maxWordSpacing` and `minWordSpacing`; when no
|
|
894
|
+
* break inside those limits avoids it, the hyphen stays. It covers the
|
|
895
|
+
* first column break of a paragraph and the later ones that fall where
|
|
896
|
+
* a full column ends; a later one that falls elsewhere (a widow kept, a
|
|
897
|
+
* band cut level) gets a second re-break from its column, which keeps
|
|
898
|
+
* the lines already placed at their breaks and breaks only the rest.
|
|
899
|
+
* A ragged paragraph set with `optimalRagged` is broken again the same
|
|
900
|
+
* way; its word spaces keep their width, so only its line ends move.
|
|
901
|
+
* Needs `optimalLineBreaking` (and `optimalRagged` for ragged text).
|
|
902
|
+
* Running text only (not box bodies). */
|
|
903
|
+
hyphenateAcrossColumns?: boolean;
|
|
904
|
+
/** The space under a `:::paragraphs` container that closes on a
|
|
905
|
+
* paragraph, between that paragraph and the block after it:
|
|
906
|
+
* - `'collapse'` (default): the larger of the style's `spaceBetween` and
|
|
907
|
+
* `marginBottom` and the paragraph spacing of the text around the
|
|
908
|
+
* container (a line with `paragraphSpacing`, in a box its body's),
|
|
909
|
+
* merged with the space the next block keeps above itself (a
|
|
910
|
+
* heading's `marginTop`, a list's), as between two paragraphs of
|
|
911
|
+
* running text. The flow still snaps back to the baseline grid under
|
|
912
|
+
* the container, the space being a minimum;
|
|
913
|
+
* - `'add'`: as up to postext 1.4, the style's space alone is set under
|
|
914
|
+
* the last line before the grid snap, the next block's own space above
|
|
915
|
+
* is added under it, and the paragraph spacing is left out.
|
|
916
|
+
* Configurations stored before `configVersion` 8 read with it (see
|
|
917
|
+
* `pinLegacyParagraphContainerSpacing` in `postext/bundle`).
|
|
918
|
+
* A negative `marginBottom` pulls the next block up either way. A
|
|
919
|
+
* container that closes on a list is set as in 1.4 under both rules: the
|
|
920
|
+
* list keeps its own space in its snap, and `marginBottom` follows. */
|
|
921
|
+
paragraphContainerSpacing?: ParagraphContainerSpacing;
|
|
922
|
+
}
|
|
923
|
+
/** The room kept for a list under the colon line that introduces it
|
|
924
|
+
* (`BodyTextConfig.colonListRoom`). */
|
|
925
|
+
export type ColonListRoom = 'item' | 'line';
|
|
926
|
+
/** How the space under a `:::paragraphs` container is worked out
|
|
927
|
+
* (`BodyTextConfig.paragraphContainerSpacing`). */
|
|
928
|
+
export type ParagraphContainerSpacing = 'collapse' | 'add';
|
|
929
|
+
/** How Markdown blockquotes (`> …`) are set (`BodyTextConfig.blockquote`).
|
|
930
|
+
* They take the body's family, size, leading, weights, alignment and
|
|
931
|
+
* hyphenation. */
|
|
932
|
+
export interface BlockquoteConfig {
|
|
933
|
+
/** Text colour. Default `#666666`. A colour linked to a palette entry
|
|
934
|
+
* (`paletteId`) follows that entry, as everywhere. */
|
|
935
|
+
color?: ColorValue;
|
|
936
|
+
/** Set the text in italics; a `*…*` run inside turns back to upright.
|
|
937
|
+
* Default `true`. */
|
|
938
|
+
italic?: boolean;
|
|
939
|
+
/** Indent of every line from the left edge of the column or box, the
|
|
940
|
+
* first-line indent counted from it. `em` is the body's size. Default
|
|
941
|
+
* `0`. */
|
|
942
|
+
indent?: Dimension;
|
|
943
|
+
/** Indent of the first line of each quoted paragraph, from {@link indent}
|
|
944
|
+
* (with the body's `hangingIndent`, of every line but the first). Unset:
|
|
945
|
+
* the body's `firstLineIndent`. */
|
|
946
|
+
firstLineIndent?: Dimension;
|
|
947
|
+
}
|
|
948
|
+
export interface ResolvedBlockquoteConfig {
|
|
949
|
+
color: ColorValue;
|
|
950
|
+
italic: boolean;
|
|
951
|
+
indent: Dimension;
|
|
952
|
+
/** Unset: the body's `firstLineIndent`. */
|
|
953
|
+
firstLineIndent?: Dimension;
|
|
595
954
|
}
|
|
596
955
|
export interface ResolvedBodyTextConfig {
|
|
597
956
|
fontFamily: string;
|
|
@@ -616,7 +975,13 @@ export interface ResolvedBodyTextConfig {
|
|
|
616
975
|
indentAfterHeading: boolean;
|
|
617
976
|
maxWordSpacing: number;
|
|
618
977
|
minWordSpacing: number;
|
|
978
|
+
maxJustifyTracking: number;
|
|
619
979
|
optimalLineBreaking: boolean;
|
|
980
|
+
optimalRagged: boolean;
|
|
981
|
+
breakAfterDashes: boolean;
|
|
982
|
+
breakAfterHyphens: boolean;
|
|
983
|
+
repeatHyphen: boolean;
|
|
984
|
+
blockquote: ResolvedBlockquoteConfig;
|
|
620
985
|
avoidOrphans: boolean;
|
|
621
986
|
orphanMinLines: number;
|
|
622
987
|
orphanPenalty: number;
|
|
@@ -629,10 +994,19 @@ export interface ResolvedBodyTextConfig {
|
|
|
629
994
|
avoidRunts: boolean;
|
|
630
995
|
runtMinCharacters: number;
|
|
631
996
|
runtPenalty: number;
|
|
997
|
+
gradedRuntPenalty: boolean;
|
|
632
998
|
avoidRuntsInLists: boolean;
|
|
633
999
|
tightenRunts: boolean;
|
|
634
1000
|
maxRuntTracking: number;
|
|
635
1001
|
keepColonWithList: boolean;
|
|
1002
|
+
colonListRoom: ColonListRoom;
|
|
1003
|
+
hyphenateAcrossColumns: boolean;
|
|
1004
|
+
paragraphContainerSpacing: ParagraphContainerSpacing;
|
|
1005
|
+
/** Set only in the derived config a callout lays its children out with
|
|
1006
|
+
* (a style's `body.italic` / `body.smallCaps`): the running text of a
|
|
1007
|
+
* document is always upright, in lowercase. */
|
|
1008
|
+
italic?: boolean;
|
|
1009
|
+
smallCaps?: boolean;
|
|
636
1010
|
}
|
|
637
1011
|
/** User-facing styling for embedded `kind: 'table'` resources. Every field is
|
|
638
1012
|
* optional; unset fields inherit body-text defaults (font family, size,
|
|
@@ -655,6 +1029,20 @@ export interface TableStyleConfig {
|
|
|
655
1029
|
headerBold?: boolean;
|
|
656
1030
|
/** Render header cells italic. Default `false`. */
|
|
657
1031
|
headerItalic?: boolean;
|
|
1032
|
+
/** Tracking after every character of a header cell (spaces included),
|
|
1033
|
+
* as CSS `letter-spacing`: positive spreads the letters (capitals set
|
|
1034
|
+
* with {@link headerTextTransform} usually want a little), negative
|
|
1035
|
+
* tightens them. An `em` value is relative to {@link headerFontSize}.
|
|
1036
|
+
* Measured into the header lines, so they wrap and align with it, and
|
|
1037
|
+
* painted the same by canvas, HTML and PDF. Applies to every header
|
|
1038
|
+
* cell: the header rows and a cell marked `isHeader`. Default `0`. */
|
|
1039
|
+
headerLetterSpacing?: Dimension;
|
|
1040
|
+
/** Letter case of the header cells: `'uppercase'` sets their text in
|
|
1041
|
+
* capitals. The transform keeps the text's length, so the editor's
|
|
1042
|
+
* source map stays exact: a letter whose capital is longer (`ß` → `SS`)
|
|
1043
|
+
* is left as it is. Resource references keep their label. Default
|
|
1044
|
+
* `'none'`. */
|
|
1045
|
+
headerTextTransform?: TableTextTransform;
|
|
658
1046
|
/** Fill header cells with {@link headerBackground}. Default `true`. */
|
|
659
1047
|
headerBackgroundEnabled?: boolean;
|
|
660
1048
|
/** Header-cell fill colour. Default light grey. */
|
|
@@ -663,6 +1051,15 @@ export interface TableStyleConfig {
|
|
|
663
1051
|
bodyBackgroundEnabled?: boolean;
|
|
664
1052
|
/** Body-cell fill colour. Default white. */
|
|
665
1053
|
bodyBackground?: ColorValue;
|
|
1054
|
+
/** Zebra rows: fill every second body row with
|
|
1055
|
+
* {@link bodyAlternateBackground}. Counting starts at the first row
|
|
1056
|
+
* after the header rows, which keeps `bodyBackground` (or no fill); a
|
|
1057
|
+
* merged cell takes the stripe of its first row, header cells keep the
|
|
1058
|
+
* header fill and a cell's own `background` wins over both. A table
|
|
1059
|
+
* split across pages keeps each row's stripe. Default `false`. */
|
|
1060
|
+
bodyAlternateBackgroundEnabled?: boolean;
|
|
1061
|
+
/** Fill of the alternate body rows. Default a light grey (`#f2f2f2`). */
|
|
1062
|
+
bodyAlternateBackground?: ColorValue;
|
|
666
1063
|
/** Draw cell borders. Default `true`. */
|
|
667
1064
|
borders?: boolean;
|
|
668
1065
|
/** Border colour. Defaults to the body-text colour. */
|
|
@@ -707,6 +1104,8 @@ export interface ResolvedNamedTableStyleConfig extends ResolvedTableStyleConfig
|
|
|
707
1104
|
id: string;
|
|
708
1105
|
name: string;
|
|
709
1106
|
}
|
|
1107
|
+
/** Letter case of a table's header cells (`TableStyleConfig.headerTextTransform`). */
|
|
1108
|
+
export type TableTextTransform = 'none' | 'uppercase';
|
|
710
1109
|
/** Rule pattern of a table: the full cell grid, horizontal rules only (top
|
|
711
1110
|
* and bottom edge of every row), the outer frame only, or none. */
|
|
712
1111
|
export type TableRules = 'grid' | 'horizontal' | 'outer' | 'none';
|
|
@@ -724,10 +1123,14 @@ export interface ResolvedTableStyleConfig {
|
|
|
724
1123
|
headerColor: ColorValue;
|
|
725
1124
|
headerBold: boolean;
|
|
726
1125
|
headerItalic: boolean;
|
|
1126
|
+
headerLetterSpacing: Dimension;
|
|
1127
|
+
headerTextTransform: TableTextTransform;
|
|
727
1128
|
headerBackgroundEnabled: boolean;
|
|
728
1129
|
headerBackground: ColorValue;
|
|
729
1130
|
bodyBackgroundEnabled: boolean;
|
|
730
1131
|
bodyBackground: ColorValue;
|
|
1132
|
+
bodyAlternateBackgroundEnabled: boolean;
|
|
1133
|
+
bodyAlternateBackground: ColorValue;
|
|
731
1134
|
borders: boolean;
|
|
732
1135
|
borderColor: ColorValue;
|
|
733
1136
|
borderWidth: Dimension;
|
|
@@ -854,13 +1257,39 @@ export interface ParagraphStyleConfig {
|
|
|
854
1257
|
textAlign?: TextAlign;
|
|
855
1258
|
/** Colour of bold runs. Defaults to `bodyText.boldColor`. */
|
|
856
1259
|
boldColor?: ColorValue;
|
|
857
|
-
/**
|
|
1260
|
+
/** Colour of italic (`*…*`) runs — in an {@link italic} style, the runs
|
|
1261
|
+
* that flip back to upright. Defaults to `bodyText.italicColor` (not to
|
|
1262
|
+
* {@link color}: set it to the style's colour to keep italics in it). */
|
|
1263
|
+
italicColor?: ColorValue;
|
|
1264
|
+
/** Weight of the regular text. Defaults to `bodyText.fontWeight`. */
|
|
1265
|
+
fontWeight?: number;
|
|
1266
|
+
/** Weight of bold (`**…**`) runs. Defaults to `bodyText.boldFontWeight`. */
|
|
1267
|
+
boldFontWeight?: number;
|
|
1268
|
+
/** Set the paragraphs in italics (stage directions, an epigraph); an
|
|
1269
|
+
* italic `*…*` run inside them flips back to upright, as in a
|
|
1270
|
+
* blockquote. Default `false`. */
|
|
1271
|
+
italic?: boolean;
|
|
1272
|
+
/** Set the paragraphs in small capitals: lowercase letters become
|
|
1273
|
+
* capitals at `SMALL_CAPS_SIZE_RATIO` (0.7) of the size, capitals keep
|
|
1274
|
+
* the full size. Synthesised the same way on every backend. Default
|
|
1275
|
+
* `false`. */
|
|
1276
|
+
smallCaps?: boolean;
|
|
1277
|
+
/** Hyphenate when justified — and, when `bodyText.hyphenation.ragged` is
|
|
1278
|
+
* on, when ragged too. Defaults to the body hyphenation setting. */
|
|
858
1279
|
hyphenation?: boolean;
|
|
1280
|
+
/** Indent of every line of the paragraphs from the left edge of the
|
|
1281
|
+
* column (or box), `em` being the style's own size. The first-line and
|
|
1282
|
+
* hanging indents are measured from there, so an indented line of verse
|
|
1283
|
+
* can hang its turnover deeper than its own start: `indent: 1.5em` with
|
|
1284
|
+
* `hangingIndent: 2.5em` sets the line at 1.5 em and its turnover at
|
|
1285
|
+
* 4 em. Default `0`; a negative value counts as `0`. */
|
|
1286
|
+
indent?: Dimension;
|
|
859
1287
|
/** Defaults to the body first-line indent. Ignored when
|
|
860
1288
|
* {@link hangingIndent} is non-zero. */
|
|
861
1289
|
firstLineIndent?: Dimension;
|
|
862
1290
|
/** Indent applied to every line except the first (bibliographies,
|
|
863
|
-
* glossaries)
|
|
1291
|
+
* glossaries), from {@link indent}. Non-zero replaces
|
|
1292
|
+
* {@link firstLineIndent}. Default `0`. */
|
|
864
1293
|
hangingIndent?: Dimension;
|
|
865
1294
|
/** Vertical gap between consecutive paragraphs in the container. Default
|
|
866
1295
|
* `0` — entries abut, off the baseline grid until the container closes. */
|
|
@@ -868,9 +1297,25 @@ export interface ParagraphStyleConfig {
|
|
|
868
1297
|
/** Space above the container's first block. Default `0`. */
|
|
869
1298
|
marginTop?: Dimension;
|
|
870
1299
|
/** Minimum space below the container's last block; the flow snaps back
|
|
871
|
-
* to the baseline grid after it.
|
|
1300
|
+
* to the baseline grid after it (see {@link snapToGrid}). How it meets
|
|
1301
|
+
* the space of the block after the container is
|
|
1302
|
+
* `bodyText.paragraphContainerSpacing`. Default `0`. */
|
|
872
1303
|
marginBottom?: Dimension;
|
|
873
|
-
|
|
1304
|
+
/** Snap the flow back onto the baseline grid under the container, the
|
|
1305
|
+
* space below being a minimum. `false` keeps the exact space, so the
|
|
1306
|
+
* text after the container stays off the grid until the next block that
|
|
1307
|
+
* snaps (a heading, the end of a list, display maths): for a document
|
|
1308
|
+
* that runs off the grid, or a group whose leading is its own. Inside a
|
|
1309
|
+
* callout, which has no grid, it changes nothing. Default `true`. */
|
|
1310
|
+
snapToGrid?: boolean;
|
|
1311
|
+
/** Letter case of the paragraphs: `'uppercase'` sets them in capitals,
|
|
1312
|
+
* the words of a chip and the label of a `:ref` included.
|
|
1313
|
+
* Length-preserving, so source maps stay 1:1: a character whose capital
|
|
1314
|
+
* is longer (`ß` → `SS`) is left as it is. Maths is left alone. Default
|
|
1315
|
+
* `'none'`. */
|
|
1316
|
+
textTransform?: ParagraphTextTransform;
|
|
1317
|
+
}
|
|
1318
|
+
export type ParagraphTextTransform = 'none' | 'uppercase';
|
|
874
1319
|
export interface ResolvedParagraphStyleConfig {
|
|
875
1320
|
id: string;
|
|
876
1321
|
name: string;
|
|
@@ -880,18 +1325,30 @@ export interface ResolvedParagraphStyleConfig {
|
|
|
880
1325
|
color: ColorValue;
|
|
881
1326
|
textAlign: TextAlign;
|
|
882
1327
|
boldColor?: ColorValue;
|
|
1328
|
+
/** Absent when the style sets none (italics take `bodyText.italicColor`). */
|
|
1329
|
+
italicColor?: ColorValue;
|
|
1330
|
+
fontWeight: number;
|
|
1331
|
+
boldFontWeight: number;
|
|
1332
|
+
italic: boolean;
|
|
1333
|
+
smallCaps: boolean;
|
|
883
1334
|
hyphenation: boolean;
|
|
1335
|
+
indent: Dimension;
|
|
884
1336
|
firstLineIndent: Dimension;
|
|
885
1337
|
hangingIndent: Dimension;
|
|
886
1338
|
spaceBetween: Dimension;
|
|
887
1339
|
marginTop: Dimension;
|
|
888
1340
|
marginBottom: Dimension;
|
|
1341
|
+
snapToGrid: boolean;
|
|
1342
|
+
textTransform: ParagraphTextTransform;
|
|
889
1343
|
}
|
|
890
1344
|
/** Horizontal extent of a callout: its column, or the full content width. */
|
|
891
1345
|
/** `'side'` sets the box in the float-only side column of a `oneAndHalf`
|
|
892
1346
|
* layout (`layout.sideColumnRole: 'floats'`), beside the text it
|
|
893
1347
|
* interrupts; on a page without such a column it lays out as `'column'`. */
|
|
894
1348
|
export type CalloutSpan = 'column' | 'page' | 'side';
|
|
1349
|
+
/** Where a side box stands when the text after its fence goes on in
|
|
1350
|
+
* another column or on another page (`CalloutStyleConfig.sideAtColumnEnd`). */
|
|
1351
|
+
export type CalloutSideAtColumnEnd = 'before' | 'after';
|
|
895
1352
|
/** Where a callout lands: inline in the flow (`'here'`), floated to the
|
|
896
1353
|
* top / bottom band of a page like a resource (`'auto'` takes whichever
|
|
897
1354
|
* band comes first — the foot of the current page before the head of the
|
|
@@ -1055,6 +1512,11 @@ export interface CalloutTitleStyleConfig {
|
|
|
1055
1512
|
/** Extra indent of the title from the box's inner left edge (room for a
|
|
1056
1513
|
* corner badge). Default `0`. */
|
|
1057
1514
|
indent?: Dimension;
|
|
1515
|
+
/** Leading of the title's lines; `em` and `rem` count the title's own
|
|
1516
|
+
* size. Its baseline sits 0.8 of the leading down each line, as in
|
|
1517
|
+
* running text, so a title on the body leading keeps a box a whole
|
|
1518
|
+
* number of lines and its baseline on the grid. Default `1.2em`. */
|
|
1519
|
+
lineHeight?: Dimension;
|
|
1058
1520
|
}
|
|
1059
1521
|
/** Body typography inside the callout. Every field inherits `bodyText`. */
|
|
1060
1522
|
export interface CalloutBodyStyleConfig {
|
|
@@ -1063,12 +1525,26 @@ export interface CalloutBodyStyleConfig {
|
|
|
1063
1525
|
lineHeight?: Dimension;
|
|
1064
1526
|
color?: ColorValue;
|
|
1065
1527
|
/** Colour of bold runs in the box (a key term set off in the box's own
|
|
1066
|
-
* colour). Defaults to `bodyText.boldColor
|
|
1528
|
+
* colour). Defaults to `bodyText.boldColor` (the palette's main colour
|
|
1529
|
+
* unless set), palette link included, so it follows `colorPalette`. */
|
|
1067
1530
|
boldColor?: ColorValue;
|
|
1068
1531
|
/** Colour of italic runs in the box (a pull quote set in italics in the
|
|
1069
1532
|
* box's colour). Defaults to `bodyText.italicColor`. */
|
|
1070
1533
|
italicColor?: ColorValue;
|
|
1534
|
+
/** Weight of the regular text in the box. Defaults to
|
|
1535
|
+
* `bodyText.fontWeight`. */
|
|
1536
|
+
fontWeight?: number;
|
|
1537
|
+
/** Weight of bold runs in the box. Defaults to `bodyText.boldFontWeight`. */
|
|
1538
|
+
boldFontWeight?: number;
|
|
1539
|
+
/** Set the box's paragraphs and list items in italics; an italic `*…*`
|
|
1540
|
+
* run flips back to upright. Default `false`. */
|
|
1541
|
+
italic?: boolean;
|
|
1542
|
+
/** Set the box's paragraphs and list items in small capitals (see
|
|
1543
|
+
* `ParagraphStyleConfig.smallCaps`). Default `false`. */
|
|
1544
|
+
smallCaps?: boolean;
|
|
1071
1545
|
textAlign?: 'left' | 'justify';
|
|
1546
|
+
/** Hyphenate when justified — and, when `bodyText.hyphenation.ragged` is
|
|
1547
|
+
* on, when ragged too. Defaults to the body hyphenation setting. */
|
|
1072
1548
|
hyphenation?: boolean;
|
|
1073
1549
|
paragraphSpacing?: boolean;
|
|
1074
1550
|
firstLineIndent?: Dimension;
|
|
@@ -1098,6 +1574,22 @@ export interface CalloutStyleConfig {
|
|
|
1098
1574
|
span?: CalloutSpan;
|
|
1099
1575
|
/** Default `'here'`. Overridable per instance with the `placement` attribute. */
|
|
1100
1576
|
placement?: CalloutPlacement;
|
|
1577
|
+
/** Where a side box (`span: 'side'`) stands when the text after its
|
|
1578
|
+
* fence does not go on in the fence's column: the column has no room
|
|
1579
|
+
* left for it, or the break rules send it on (a paragraph the widow and
|
|
1580
|
+
* orphan rules move whole, a heading kept with its text):
|
|
1581
|
+
* - `'before'` (default): at the fence, on its page, beside the text
|
|
1582
|
+
* before it. Where it does not fit below the fence it slides up, its
|
|
1583
|
+
* foot on the column's foot. Suits a gloss written after the passage
|
|
1584
|
+
* it explains. Every side box was set this way up to postext 1.4.
|
|
1585
|
+
* - `'after'`: level with the first line of the text after the fence,
|
|
1586
|
+
* in the side column of the page where that text goes on. Suits a
|
|
1587
|
+
* mark written before the line it belongs to: a line number, a
|
|
1588
|
+
* marginal heading.
|
|
1589
|
+
* When the text goes on in the same column both set the box at its
|
|
1590
|
+
* fence. A box nothing follows in its chapter stays with the text before
|
|
1591
|
+
* it either way. Side boxes fenced one after another keep their order. */
|
|
1592
|
+
sideAtColumnEnd?: CalloutSideAtColumnEnd;
|
|
1101
1593
|
/** Anchor and offset used when the placement is `'fixed'`. */
|
|
1102
1594
|
fixed?: CalloutFixedConfig;
|
|
1103
1595
|
/** Pending floats (figures / tables referenced earlier) are placed before
|
|
@@ -1158,24 +1650,53 @@ export interface CalloutStyleConfig {
|
|
|
1158
1650
|
* each side of the cut — the part that fits closes the current column
|
|
1159
1651
|
* (or, for a `span: 'page'` box, the page) and the rest continues on the
|
|
1160
1652
|
* next one in a box of its own without the title or icon (stripe, border
|
|
1161
|
-
* and background stay
|
|
1653
|
+
* and background stay; the text keeps the icon's column, empty, so the
|
|
1654
|
+
* box has one measure on every page). */
|
|
1162
1655
|
keepTogether?: boolean;
|
|
1163
1656
|
/** Fewest text lines a fragment of a split box may carry, on either side
|
|
1164
1657
|
* of the cut (`keepTogether: false`, or a keep-together box taller than
|
|
1165
1658
|
* a full column). Default 2: a box never breaks
|
|
1166
1659
|
* leaving a lone line at the foot of a column or the head of the next.
|
|
1167
1660
|
* It guards text only: a side holding a figure, table, display formula
|
|
1168
|
-
* or nested box is acceptable whatever its line count
|
|
1169
|
-
* paragraph still counts
|
|
1170
|
-
*
|
|
1661
|
+
* or nested box is acceptable whatever its line count. A cut inside a
|
|
1662
|
+
* paragraph or list item still counts every line on each side, and also
|
|
1663
|
+
* leaves at least `layout.boxChildSplitMinLines` lines of that paragraph
|
|
1664
|
+
* or item on each side (two by default; this value when it is lower, so
|
|
1665
|
+
* 1 allows one): by default a two- or three-line item never splits. A
|
|
1666
|
+
* nested box splits by its own style's `keepTogether` / `splitMinLines`. */
|
|
1171
1667
|
splitMinLines?: number;
|
|
1668
|
+
/** Repeat the title at the head of every continuation fragment of a
|
|
1669
|
+
* split box, followed by {@link continuedSuffix} — "Key points (cont.)",
|
|
1670
|
+
* a screenplay's "HAMLET (CONT'D)". The repeat takes the title style
|
|
1671
|
+
* (its `textTransform` applies to the suffix too); the icon and label tab
|
|
1672
|
+
* stay on the head. Default `false`: continuations carry no title. */
|
|
1673
|
+
repeatTitle?: boolean;
|
|
1674
|
+
/** Suffix set after the repeated title of a continuation (with
|
|
1675
|
+
* `repeatTitle`). Defaults to `"(cont.)"`, the table default, in the
|
|
1676
|
+
* document language. */
|
|
1677
|
+
continuedSuffix?: string;
|
|
1678
|
+
/** Set a marker at the foot of every fragment that continues on the next
|
|
1679
|
+
* column or page ("Continued", a screenplay's "(MORE)"), inside the box
|
|
1680
|
+
* under its last line. Default `false`. */
|
|
1681
|
+
continuesMarkerEnabled?: boolean;
|
|
1682
|
+
/** Text of that marker, in the box's body face and size. Defaults to
|
|
1683
|
+
* `"Continued"` (`"Continúa"` for Spanish documents), like a split
|
|
1684
|
+
* table's marker. */
|
|
1685
|
+
continuesMarker?: string;
|
|
1686
|
+
/** Alignment of the marker in the box's inner width. Default `'right'`. */
|
|
1687
|
+
continuesMarkerAlign?: CalloutMarkerTextAlign;
|
|
1688
|
+
/** Set the marker in italics. Default `true`. */
|
|
1689
|
+
continuesMarkerItalic?: boolean;
|
|
1172
1690
|
}
|
|
1691
|
+
/** Alignment of a split callout's continuation marker. */
|
|
1692
|
+
export type CalloutMarkerTextAlign = 'left' | 'center' | 'right';
|
|
1173
1693
|
export interface ResolvedCalloutStyleConfig {
|
|
1174
1694
|
id: string;
|
|
1175
1695
|
name: string;
|
|
1176
1696
|
title: string;
|
|
1177
1697
|
span: CalloutSpan;
|
|
1178
1698
|
placement: CalloutPlacement;
|
|
1699
|
+
sideAtColumnEnd: CalloutSideAtColumnEnd;
|
|
1179
1700
|
fixed: {
|
|
1180
1701
|
anchor: ElementAnchor;
|
|
1181
1702
|
offset: {
|
|
@@ -1268,6 +1789,7 @@ export interface ResolvedCalloutStyleConfig {
|
|
|
1268
1789
|
gap: Dimension;
|
|
1269
1790
|
letterSpacing: Dimension;
|
|
1270
1791
|
indent: Dimension;
|
|
1792
|
+
lineHeight: Dimension;
|
|
1271
1793
|
};
|
|
1272
1794
|
body: {
|
|
1273
1795
|
fontFamily: string;
|
|
@@ -1276,6 +1798,10 @@ export interface ResolvedCalloutStyleConfig {
|
|
|
1276
1798
|
color: ColorValue;
|
|
1277
1799
|
boldColor?: ColorValue;
|
|
1278
1800
|
italicColor?: ColorValue;
|
|
1801
|
+
fontWeight: number;
|
|
1802
|
+
boldFontWeight: number;
|
|
1803
|
+
italic: boolean;
|
|
1804
|
+
smallCaps: boolean;
|
|
1279
1805
|
textAlign: 'left' | 'justify';
|
|
1280
1806
|
hyphenation: boolean;
|
|
1281
1807
|
paragraphSpacing: boolean;
|
|
@@ -1289,12 +1815,25 @@ export interface ResolvedCalloutStyleConfig {
|
|
|
1289
1815
|
itemSpacing: Dimension;
|
|
1290
1816
|
bulletFontSize?: Dimension;
|
|
1291
1817
|
bulletFontWeight?: number;
|
|
1818
|
+
/** `true` when the style sets `lists.color` itself. The colour then
|
|
1819
|
+
* reaches the numbers of the box's ordered lists even when it equals
|
|
1820
|
+
* `unorderedLists.color` (the value an unset field inherits). Absent
|
|
1821
|
+
* when the field is inherited; a resolved style built without the flag
|
|
1822
|
+
* falls back to "the numbers take it when it differs from
|
|
1823
|
+
* `unorderedLists.color`". */
|
|
1824
|
+
colorSet?: boolean;
|
|
1292
1825
|
};
|
|
1293
1826
|
marginTop: Dimension;
|
|
1294
1827
|
marginBottom: Dimension;
|
|
1295
1828
|
snapToGrid: boolean;
|
|
1296
1829
|
keepTogether: boolean;
|
|
1297
1830
|
splitMinLines: number;
|
|
1831
|
+
repeatTitle: boolean;
|
|
1832
|
+
continuedSuffix: string;
|
|
1833
|
+
continuesMarkerEnabled: boolean;
|
|
1834
|
+
continuesMarker: string;
|
|
1835
|
+
continuesMarkerAlign: CalloutMarkerTextAlign;
|
|
1836
|
+
continuesMarkerItalic: boolean;
|
|
1298
1837
|
}
|
|
1299
1838
|
/**
|
|
1300
1839
|
* A named chip style, selected by the inline `:chip[text]{style="<id>"}`
|
|
@@ -1309,8 +1848,9 @@ export interface ResolvedCalloutStyleConfig {
|
|
|
1309
1848
|
* line height, so the baseline grid holds. A box taller than the line pitch
|
|
1310
1849
|
* would touch the chips of the next line (the sandbox warns).
|
|
1311
1850
|
*
|
|
1312
|
-
* Em dimensions of the box (`paddingX`, `paddingY`, `
|
|
1313
|
-
* `borderWidth`, `gap`) are relative to
|
|
1851
|
+
* Em dimensions of the box (`paddingX`, `paddingY`, `paddingTop`,
|
|
1852
|
+
* `paddingBottom`, `borderRadius`, `borderWidth`, `gap`) are relative to
|
|
1853
|
+
* the chip's font size; an em
|
|
1314
1854
|
* `fontSize` is relative to the surrounding text.
|
|
1315
1855
|
*/
|
|
1316
1856
|
export interface ChipStyleConfig {
|
|
@@ -1332,6 +1872,17 @@ export interface ChipStyleConfig {
|
|
|
1332
1872
|
/** Room above and below the text band. Paints outside the line box.
|
|
1333
1873
|
* Default `0.1em`. */
|
|
1334
1874
|
paddingY?: Dimension;
|
|
1875
|
+
/** Room above the text band, in place of {@link paddingY}. The band
|
|
1876
|
+
* runs 0.8 em above the baseline and 0.25 em below it, so its middle
|
|
1877
|
+
* sits 0.275 em above the baseline, lower than the middle of a capital
|
|
1878
|
+
* (about 0.35 em in most faces): a top padding larger than the bottom
|
|
1879
|
+
* one by twice the difference (`paddingTop: 0.2em`, `paddingBottom:
|
|
1880
|
+
* 0.05em`) centres a capital or a figure in a round chip. Default
|
|
1881
|
+
* `paddingY`. */
|
|
1882
|
+
paddingTop?: Dimension;
|
|
1883
|
+
/** Room below the text band, in place of {@link paddingY}. Default
|
|
1884
|
+
* `paddingY`. */
|
|
1885
|
+
paddingBottom?: Dimension;
|
|
1335
1886
|
/** Chip text family. Default the surrounding text's. */
|
|
1336
1887
|
fontFamily?: string;
|
|
1337
1888
|
/** Chip text size (em = the surrounding text). Default the surrounding
|
|
@@ -1360,6 +1911,10 @@ export interface ResolvedChipStyleConfig {
|
|
|
1360
1911
|
borderRadius: Dimension;
|
|
1361
1912
|
paddingX: Dimension;
|
|
1362
1913
|
paddingY: Dimension;
|
|
1914
|
+
/** Unset: `paddingY`. */
|
|
1915
|
+
paddingTop?: Dimension;
|
|
1916
|
+
/** Unset: `paddingY`. */
|
|
1917
|
+
paddingBottom?: Dimension;
|
|
1363
1918
|
/** Unset: the surrounding text's. */
|
|
1364
1919
|
fontFamily?: string;
|
|
1365
1920
|
fontSize?: Dimension;
|
|
@@ -1381,7 +1936,12 @@ export interface ResolvedChipStyleConfig {
|
|
|
1381
1936
|
* Useful for books where every chapter must start a fresh spread. */
|
|
1382
1937
|
export type HeadingBreakParity = 'any' | 'odd' | 'even' | 'always-odd' | 'always-even';
|
|
1383
1938
|
export interface HeadingBreakBeforeConfig {
|
|
1384
|
-
/** When true, force a page break before every heading of this level.
|
|
1939
|
+
/** When true, force a page break before every heading of this level. A
|
|
1940
|
+
* `:::pagebreak` right before the heading does not replace it: the
|
|
1941
|
+
* heading still applies its `parity` after the page the directive
|
|
1942
|
+
* opened (which may add a blank page). A heading style inherits its
|
|
1943
|
+
* level's break field by field; set `enabled: false` on a style meant to
|
|
1944
|
+
* start where a manual page break leaves it. */
|
|
1385
1945
|
enabled?: boolean;
|
|
1386
1946
|
/** Optional parity constraint on the page the heading opens on.
|
|
1387
1947
|
* `'odd'` / `'even'` inserts a blank padding page when needed. Default:
|
|
@@ -1405,9 +1965,18 @@ export interface HeadingAdvancedDesignConfig {
|
|
|
1405
1965
|
enabled: boolean;
|
|
1406
1966
|
slot: DesignSlot;
|
|
1407
1967
|
/** Minimum height reserved for the heading in the column flow. The
|
|
1408
|
-
*
|
|
1409
|
-
*
|
|
1410
|
-
*
|
|
1968
|
+
* heading takes `max(design content bottom, minHeight)`, then its
|
|
1969
|
+
* `marginBottom` under it (from its heading style, its level or
|
|
1970
|
+
* `headings.marginBottom`; 0.5 em of the heading's size by default), and
|
|
1971
|
+
* the sum is rounded up to the baseline grid when headings snap: a band
|
|
1972
|
+
* exactly `minHeight` tall needs that `marginBottom` at 0 and a
|
|
1973
|
+
* `minHeight` of whole grid lines. So an opener can push body text
|
|
1974
|
+
* down even when its elements are short (or anchored to the page/bleed
|
|
1975
|
+
* frames above the heading). The design
|
|
1976
|
+
* content bottom counts every element except those with
|
|
1977
|
+
* `reserve: false` and those that follow the reserved band itself
|
|
1978
|
+
* (anchored to the container's middle or bottom, or with a `'fill'`
|
|
1979
|
+
* height against it). */
|
|
1411
1980
|
minHeight?: Dimension;
|
|
1412
1981
|
}
|
|
1413
1982
|
export interface ResolvedHeadingAdvancedDesignConfig {
|
|
@@ -1424,10 +1993,32 @@ export interface HeadingLevelConfig {
|
|
|
1424
1993
|
fontWeight?: number;
|
|
1425
1994
|
marginTop?: Dimension;
|
|
1426
1995
|
marginBottom?: Dimension;
|
|
1996
|
+
/** Template of the level's automatic number: `{1}`…`{6}` print the
|
|
1997
|
+
* counters, optionally formatted (`{1:I}`, `{1:a}`, `{1:01}`, spelled out
|
|
1998
|
+
* with `{1:words}` / `{1:ordinal}` — see `numberingTemplate` in the
|
|
1999
|
+
* configuration docs). Default `''`: no number. */
|
|
1427
2000
|
numberingTemplate?: string;
|
|
1428
2001
|
italic?: boolean;
|
|
2002
|
+
/** Tracking after every glyph of the heading (spaces and the numbering
|
|
2003
|
+
* prefix included), as CSS `letter-spacing`: positive spreads the
|
|
2004
|
+
* letters — capitals set with `textTransform: 'uppercase'` usually want
|
|
2005
|
+
* a little — negative tightens a display size. An `em` value is relative
|
|
2006
|
+
* to the level's `fontSize`. Measured into the heading's lines and
|
|
2007
|
+
* painted the same by canvas, HTML and PDF. A level rendered from its
|
|
2008
|
+
* `advancedDesign` ignores it, like the other inline typography fields:
|
|
2009
|
+
* each design text element has its own `letterSpacing`. Default `0`. */
|
|
2010
|
+
letterSpacing?: Dimension;
|
|
2011
|
+
/** Force a page break before every heading of the level. Merged field by
|
|
2012
|
+
* field over the level's default (H1: `{ enabled: true, parity:
|
|
2013
|
+
* 'always-odd' }`, the others `{ enabled: false, parity: 'any' }`), so
|
|
2014
|
+
* setting only `parity` keeps the break on. */
|
|
1429
2015
|
breakBefore?: HeadingBreakBeforeConfig;
|
|
1430
|
-
/** Column vs full-page span. Default `'column'`.
|
|
2016
|
+
/** Column vs full-page span. Default `'column'`. A `'page'` heading
|
|
2017
|
+
* without a design of its own is painted by a default opener across the
|
|
2018
|
+
* content area, in the level's typography and leading, with its bold,
|
|
2019
|
+
* italic and script runs (`headings.inlineMarks`); its band holds every
|
|
2020
|
+
* line that opener paints, even where the heading's own measure fits the
|
|
2021
|
+
* title on fewer (a justified title, a forced break). */
|
|
1431
2022
|
span?: HeadingSpan;
|
|
1432
2023
|
/** When enabled, the heading renders as a design slot. */
|
|
1433
2024
|
advancedDesign?: HeadingAdvancedDesignConfig;
|
|
@@ -1436,6 +2027,21 @@ export interface HeadingLevelConfig {
|
|
|
1436
2027
|
* editor's source map stays 1:1 — characters whose upper-case form
|
|
1437
2028
|
* expands (`ß` → `SS`) are left unchanged. Default `'none'`. */
|
|
1438
2029
|
textTransform?: HeadingTextTransform;
|
|
2030
|
+
/** A structural heading: it prints nothing and takes no room in the
|
|
2031
|
+
* column, but still does everything else a heading does — its
|
|
2032
|
+
* `breakBefore`, the section a heading style opens, the numbering, the
|
|
2033
|
+
* contents (`:::toc`), `{chapterTitle}` running heads and the PDF
|
|
2034
|
+
* bookmarks. For a dedication or a colophon that must be listed but not
|
|
2035
|
+
* titled on the page. A heading overrides it with `{hidden="true"}` /
|
|
2036
|
+
* `{hidden="false"}`. Default `false`. */
|
|
2037
|
+
hidden?: boolean;
|
|
2038
|
+
/** Whether the flow snaps back onto the baseline grid under a heading of
|
|
2039
|
+
* this level (its `marginBottom` rounded up to whole grid lines) — the
|
|
2040
|
+
* per-level form of {@link HeadingsConfig.snapToGrid}, which it inherits
|
|
2041
|
+
* when unset. `false` keeps the exact margin, so an H2 can sit a line and
|
|
2042
|
+
* a half above its text while an H3 stays on the grid. A heading style
|
|
2043
|
+
* may set it too. */
|
|
2044
|
+
snapToGrid?: boolean;
|
|
1439
2045
|
}
|
|
1440
2046
|
export type HeadingTextTransform = 'none' | 'uppercase';
|
|
1441
2047
|
export interface ResolvedHeadingLevelConfig {
|
|
@@ -1449,10 +2055,15 @@ export interface ResolvedHeadingLevelConfig {
|
|
|
1449
2055
|
marginBottom: Dimension;
|
|
1450
2056
|
numberingTemplate: string;
|
|
1451
2057
|
italic: boolean;
|
|
2058
|
+
/** The level's own tracking, else `0`. */
|
|
2059
|
+
letterSpacing: Dimension;
|
|
1452
2060
|
breakBefore: ResolvedHeadingBreakBeforeConfig;
|
|
1453
2061
|
span: HeadingSpan;
|
|
1454
2062
|
advancedDesign: ResolvedHeadingAdvancedDesignConfig;
|
|
1455
2063
|
textTransform: HeadingTextTransform;
|
|
2064
|
+
hidden: boolean;
|
|
2065
|
+
/** The level's own value, else `headings.snapToGrid`. */
|
|
2066
|
+
snapToGrid: boolean;
|
|
1456
2067
|
}
|
|
1457
2068
|
export interface HeadingsConfig {
|
|
1458
2069
|
fontFamily?: string;
|
|
@@ -1465,13 +2076,30 @@ export interface HeadingsConfig {
|
|
|
1465
2076
|
/** When true, a heading is never placed as the last element of a column/page.
|
|
1466
2077
|
* If the following block would not have at least one line of room after the
|
|
1467
2078
|
* heading, the heading is pushed to the next column/page so it stays joined
|
|
1468
|
-
* to its text.
|
|
2079
|
+
* to its text. A closing band cut level by `balancing.trailing` keeps the
|
|
2080
|
+
* rule too: the cut is taken lower (or dropped) rather than leave a
|
|
2081
|
+
* heading closing a column while its text opens the next. Default true. */
|
|
1469
2082
|
keepWithNext?: boolean;
|
|
2083
|
+
/** How a paragraph that does not fit under a heading at a column's foot
|
|
2084
|
+
* is split, when pushing it whole would leave the heading behind
|
|
2085
|
+
* (`keepWithNext`):
|
|
2086
|
+
* - `'rules'` (default): the most lines that fit, as long as at least
|
|
2087
|
+
* `bodyText.widowMinLines` stay under the heading and at least
|
|
2088
|
+
* `bodyText.orphanMinLines` go on to the next column; when no split
|
|
2089
|
+
* does both, the heading moves on with its paragraph (column
|
|
2090
|
+
* balancing fills the room it leaves). `avoidWidows` and `avoidOrphans`
|
|
2091
|
+
* off drop their side of the rule.
|
|
2092
|
+
* - `'fill'`: as many lines as fit, at least `widowMinLines`, however few
|
|
2093
|
+
* go on (a four-line paragraph with room for three splits 3 + 1). The
|
|
2094
|
+
* rule up to postext 1.4: configurations stored before
|
|
2095
|
+
* `configVersion` 8 read with it (see `pinLegacyHeadingSplit`). */
|
|
2096
|
+
keepWithNextSplit?: KeepWithNextSplit;
|
|
1470
2097
|
/** When true (the default) the flow snaps back onto the baseline grid
|
|
1471
2098
|
* under a heading, so its `marginBottom` is rounded up to whole grid
|
|
1472
2099
|
* lines. `false` keeps the exact margin: the text under the heading may
|
|
1473
2100
|
* sit off the grid until the next snap point (a list's end, a container's
|
|
1474
|
-
* tail, display math).
|
|
2101
|
+
* tail, display math). A level overrides it with
|
|
2102
|
+
* {@link HeadingLevelConfig.snapToGrid}. */
|
|
1475
2103
|
snapToGrid?: boolean;
|
|
1476
2104
|
/** Vertical column balancing — editorial bottom alignment. When a column
|
|
1477
2105
|
* ends short of its bottom, extra baseline-grid lines are added above the
|
|
@@ -1479,6 +2107,21 @@ export interface HeadingsConfig {
|
|
|
1479
2107
|
* Extra lines are distributed across the column's headings, favouring the
|
|
1480
2108
|
* most important (lowest-level) heading. Default enabled. */
|
|
1481
2109
|
balancing?: ColumnBalancingConfig;
|
|
2110
|
+
/** Whether a heading reads its inline marks: `*italic*`, `**bold**`,
|
|
2111
|
+
* `^superscript^`, `~subscript~`, `:smallcaps[…]` and links, as a
|
|
2112
|
+
* paragraph does. An italic run flips the heading's slant (upright in an
|
|
2113
|
+
* italic heading) and a bold run takes the body's bold weight, or the
|
|
2114
|
+
* heading's own when it is heavier. The contents keep the bold and
|
|
2115
|
+
* italic runs; running heads and PDF bookmarks print the text only.
|
|
2116
|
+
* `false` prints the marked text in the heading's plain style, with the
|
|
2117
|
+
* markers dropped, as up to postext 1.4. The default opener of a
|
|
2118
|
+
* `span: 'page'` heading without a design sets the bold, italic and
|
|
2119
|
+
* script runs too; a heading design (a designed opener band, an
|
|
2120
|
+
* in-column `advancedDesign`) prints `{titleText}` as plain text either
|
|
2121
|
+
* way. Default `true`; configurations stored earlier whose
|
|
2122
|
+
* headings carry marks are read with `false` (see `migrateConfig` in
|
|
2123
|
+
* `postext/bundle`). */
|
|
2124
|
+
inlineMarks?: boolean;
|
|
1482
2125
|
levels?: HeadingLevelConfig[];
|
|
1483
2126
|
}
|
|
1484
2127
|
export interface ColumnBalancingConfig {
|
|
@@ -1492,7 +2135,16 @@ export interface ColumnBalancingConfig {
|
|
|
1492
2135
|
maxLinesAfterList?: number;
|
|
1493
2136
|
/** Allow extra grid lines between a top float (figure / table band) and
|
|
1494
2137
|
* the text under it in the same column, after headings and list ends
|
|
1495
|
-
* have been tried.
|
|
2138
|
+
* have been tried. Never on a page that does not flow on (a chapter's
|
|
2139
|
+
* closing page) nor in a closing band cut level by `trailing`: there the
|
|
2140
|
+
* column heads stay level and the last column may end a line short (a
|
|
2141
|
+
* heading or a callout box opening a column under the float stays at its
|
|
2142
|
+
* head too, whatever this says). The first block under the float may be
|
|
2143
|
+
* the rest of a paragraph begun on the page before: it moves down all
|
|
2144
|
+
* the same, by the line the break rules left free at the column's foot
|
|
2145
|
+
* (a line the widow rule kept empty, or a paragraph space with no room
|
|
2146
|
+
* for text after it); `false` keeps it right under the float. Default
|
|
2147
|
+
* true. */
|
|
1496
2148
|
stretchAfterFloats?: boolean;
|
|
1497
2149
|
/** Maximum extra grid lines under a single float band. Default 1. */
|
|
1498
2150
|
maxLinesAfterFloat?: number;
|
|
@@ -1514,7 +2166,15 @@ export interface ColumnBalancingConfig {
|
|
|
1514
2166
|
/** Balance the closing band of a chapter / the document: when the flow
|
|
1515
2167
|
* ends before the page is full and its columns are uneven, they are cut
|
|
1516
2168
|
* level (via a band cap) so the last columns end at the same height, the
|
|
1517
|
-
* way a compositor sets a short closing page.
|
|
2169
|
+
* way a compositor sets a short closing page. The cut keeps the rules an
|
|
2170
|
+
* uncut band keeps: when a block that cannot split across it (a paragraph
|
|
2171
|
+
* tail the orphan and widow minimums keep whole, a keep-together box)
|
|
2172
|
+
* would run past it and lose its last lines, or — with
|
|
2173
|
+
* {@link HeadingsConfig.keepWithNext} — a heading would close a column
|
|
2174
|
+
* while its text opens the next, the cut is taken a line lower, up to
|
|
2175
|
+
* three times, and otherwise dropped. Columns whose feet differ by one
|
|
2176
|
+
* grid line or less are left as they are: a last column a line short is
|
|
2177
|
+
* the usual finish of a closing band. Default true. */
|
|
1518
2178
|
trailing?: boolean;
|
|
1519
2179
|
/** Balance the band a page-span block leaves behind: when a `span: 'page'`
|
|
1520
2180
|
* callout does not fit under the current columns and has to move to the
|
|
@@ -1523,7 +2183,29 @@ export interface ColumnBalancingConfig {
|
|
|
1523
2183
|
* short — the flow ends at the same height in every column and the box
|
|
1524
2184
|
* (or the part of it that fits) sits under them. Default true. */
|
|
1525
2185
|
beforeSpan?: boolean;
|
|
1526
|
-
|
|
2186
|
+
/** When a callout box that closes a short column takes the room under
|
|
2187
|
+
* its foot as space above it (the `trailingCallout` lever), so that its
|
|
2188
|
+
* foot lands on the column's last grid slot:
|
|
2189
|
+
* - `'first'` (default, the 1.4 order): before any other lever, so the
|
|
2190
|
+
* box takes the whole gap, even several lines, and the headings above
|
|
2191
|
+
* it get nothing;
|
|
2192
|
+
* - `'last'`: after the heading, list-end, after-display and after-float
|
|
2193
|
+
* levers, which take whole lines first; the box then takes only what
|
|
2194
|
+
* they leave, usually a fraction of a line, and stays closer to the
|
|
2195
|
+
* text it annotates;
|
|
2196
|
+
* - `'off'`: never; the room under the box stays unless the other levers
|
|
2197
|
+
* take it (in whole lines).
|
|
2198
|
+
* On a closing page the box is the only lever that moves it level with
|
|
2199
|
+
* the last line of the column beside it; `'off'` leaves it where it is
|
|
2200
|
+
* there too. Any other value reads as `'first'`. */
|
|
2201
|
+
closingBox?: ClosingBoxLever;
|
|
2202
|
+
}
|
|
2203
|
+
/** Where the column-balancing lever of a box closing a column runs
|
|
2204
|
+
* (`ColumnBalancingConfig.closingBox`). */
|
|
2205
|
+
export type ClosingBoxLever = 'first' | 'last' | 'off';
|
|
2206
|
+
/** How a paragraph kept with the heading above it splits at a column's foot
|
|
2207
|
+
* (`HeadingsConfig.keepWithNextSplit`). */
|
|
2208
|
+
export type KeepWithNextSplit = 'rules' | 'fill';
|
|
1527
2209
|
export interface ResolvedHeadingsConfig {
|
|
1528
2210
|
fontFamily: string;
|
|
1529
2211
|
lineHeight: Dimension;
|
|
@@ -1533,7 +2215,9 @@ export interface ResolvedHeadingsConfig {
|
|
|
1533
2215
|
marginTop: Dimension;
|
|
1534
2216
|
marginBottom: Dimension;
|
|
1535
2217
|
keepWithNext: boolean;
|
|
2218
|
+
keepWithNextSplit: KeepWithNextSplit;
|
|
1536
2219
|
snapToGrid: boolean;
|
|
2220
|
+
inlineMarks: boolean;
|
|
1537
2221
|
balancing: {
|
|
1538
2222
|
enabled: boolean;
|
|
1539
2223
|
maxLinesPerHeading: number;
|
|
@@ -1547,6 +2231,7 @@ export interface ResolvedHeadingsConfig {
|
|
|
1547
2231
|
maxTracking: number;
|
|
1548
2232
|
trailing: boolean;
|
|
1549
2233
|
beforeSpan: boolean;
|
|
2234
|
+
closingBox: ClosingBoxLever;
|
|
1550
2235
|
};
|
|
1551
2236
|
levels: ResolvedHeadingLevelConfig[];
|
|
1552
2237
|
}
|
|
@@ -1590,6 +2275,15 @@ export interface UnorderedListsConfig {
|
|
|
1590
2275
|
marginTop?: Dimension;
|
|
1591
2276
|
marginBottom?: Dimension;
|
|
1592
2277
|
itemSpacing?: Dimension;
|
|
2278
|
+
/** Round the space above the list up so its first item sits on the
|
|
2279
|
+
* baseline grid, as the text after a heading does; `marginTop` is then a
|
|
2280
|
+
* minimum. The list's end snaps the flow back onto the grid either way;
|
|
2281
|
+
* this snaps its start too, so with no `itemSpacing` every item lines up
|
|
2282
|
+
* with the text in the column beside it. Lists in callout boxes, whose
|
|
2283
|
+
* interiors are off the grid, are left alone. Default false (1.4 set the
|
|
2284
|
+
* top margin exactly, so a margin that is not a whole number of lines
|
|
2285
|
+
* left the items off the grid until the list ended). */
|
|
2286
|
+
snapTopToGrid?: boolean;
|
|
1593
2287
|
hangingIndent?: boolean;
|
|
1594
2288
|
levels?: UnorderedListLevelConfig[];
|
|
1595
2289
|
/** GFM task list rendering. The bullet glyph is replaced with a checkbox. */
|
|
@@ -1612,6 +2306,7 @@ export interface ResolvedUnorderedListsConfig {
|
|
|
1612
2306
|
marginTop: Dimension;
|
|
1613
2307
|
marginBottom: Dimension;
|
|
1614
2308
|
itemSpacing: Dimension;
|
|
2309
|
+
snapTopToGrid: boolean;
|
|
1615
2310
|
hangingIndent: boolean;
|
|
1616
2311
|
levels: ResolvedUnorderedListLevelConfig[];
|
|
1617
2312
|
taskCheckboxChar: string;
|
|
@@ -1623,6 +2318,7 @@ export interface ResolvedUnorderedListsConfig {
|
|
|
1623
2318
|
export type OrderedListNumberFormat = 'arabic' | 'lower-alpha' | 'upper-alpha' | 'lower-roman' | 'upper-roman';
|
|
1624
2319
|
export interface OrderedListLevelConfig {
|
|
1625
2320
|
level: number;
|
|
2321
|
+
/** Number style of this level (see `OrderedListsConfig.numberFormat`). */
|
|
1626
2322
|
numberFormat?: OrderedListNumberFormat;
|
|
1627
2323
|
separator?: string;
|
|
1628
2324
|
fontFamily?: string;
|
|
@@ -1663,6 +2359,10 @@ export interface OrderedListsConfig {
|
|
|
1663
2359
|
color?: ColorValue;
|
|
1664
2360
|
fontWeight?: number;
|
|
1665
2361
|
italic?: boolean;
|
|
2362
|
+
/** Number style. Default `'arabic'`. The page and resource spellings of a
|
|
2363
|
+
* format are read too (`'decimal'`, `'roman-lower'`, `'i'`…, see
|
|
2364
|
+
* `parseNumberFormat`) and resolve to the list spelling; an unknown
|
|
2365
|
+
* value numbers in arabic and is reported by `collectConfigWarnings`. */
|
|
1666
2366
|
numberFormat?: OrderedListNumberFormat;
|
|
1667
2367
|
separator?: string;
|
|
1668
2368
|
numberFontSize?: Dimension;
|
|
@@ -1672,6 +2372,22 @@ export interface OrderedListsConfig {
|
|
|
1672
2372
|
marginTop?: Dimension;
|
|
1673
2373
|
marginBottom?: Dimension;
|
|
1674
2374
|
itemSpacing?: Dimension;
|
|
2375
|
+
/** Round the space above the list up so its first item sits on the
|
|
2376
|
+
* baseline grid (see `UnorderedListsConfig.snapTopToGrid`). Default
|
|
2377
|
+
* false. */
|
|
2378
|
+
snapTopToGrid?: boolean;
|
|
2379
|
+
/** How wide the number column of an item is, which sets where its text
|
|
2380
|
+
* starts (numbers are set flush right in it):
|
|
2381
|
+
* - `'run'` (default): the widest number of the item's own run, the
|
|
2382
|
+
* items of one depth with nothing but deeper items between them. A
|
|
2383
|
+
* list broken by a figure, a paragraph or a box starts a new run, so
|
|
2384
|
+
* `ii)` after a table can start its text further right than `i)`
|
|
2385
|
+
* before it;
|
|
2386
|
+
* - `'level'`: the widest number at the item's depth in the whole
|
|
2387
|
+
* document (the chapter, in a book), so every list and every part of
|
|
2388
|
+
* an interrupted one starts its text at the same place, as the
|
|
2389
|
+
* indents of the deeper levels already do. */
|
|
2390
|
+
numberWidth?: OrderedListNumberWidth;
|
|
1675
2391
|
hangingIndent?: boolean;
|
|
1676
2392
|
levels?: OrderedListLevelConfig[];
|
|
1677
2393
|
/** Font family of the separator run. Inherits the number's `fontFamily`. */
|
|
@@ -1685,6 +2401,9 @@ export interface OrderedListsConfig {
|
|
|
1685
2401
|
/** Space between the number and the separator. Default `0em`. */
|
|
1686
2402
|
separatorGap?: Dimension;
|
|
1687
2403
|
}
|
|
2404
|
+
/** The number column of an ordered list item
|
|
2405
|
+
* (`OrderedListsConfig.numberWidth`). */
|
|
2406
|
+
export type OrderedListNumberWidth = 'run' | 'level';
|
|
1688
2407
|
export interface ResolvedOrderedListsConfig {
|
|
1689
2408
|
fontFamily: string;
|
|
1690
2409
|
color: ColorValue;
|
|
@@ -1699,6 +2418,8 @@ export interface ResolvedOrderedListsConfig {
|
|
|
1699
2418
|
marginTop: Dimension;
|
|
1700
2419
|
marginBottom: Dimension;
|
|
1701
2420
|
itemSpacing: Dimension;
|
|
2421
|
+
snapTopToGrid: boolean;
|
|
2422
|
+
numberWidth: OrderedListNumberWidth;
|
|
1702
2423
|
hangingIndent: boolean;
|
|
1703
2424
|
levels: ResolvedOrderedListLevelConfig[];
|
|
1704
2425
|
separatorFontFamily: string;
|
|
@@ -1798,8 +2519,16 @@ export interface MathConfig {
|
|
|
1798
2519
|
* still parsed (so warnings track unclosed delimiters) but rendered as
|
|
1799
2520
|
* their literal TeX source. */
|
|
1800
2521
|
enabled?: boolean;
|
|
1801
|
-
/** Scale applied to the
|
|
1802
|
-
*
|
|
2522
|
+
/** Scale applied to the surrounding text's font size when rendering math:
|
|
2523
|
+
* one em of the formula's TeX font is that size × this factor — the body
|
|
2524
|
+
* size for display formulas and for inline maths in body text, the
|
|
2525
|
+
* enclosing block's size for inline maths in a heading, a paragraph
|
|
2526
|
+
* style, a caption or a callout body. 1.0 = match the surrounding text
|
|
2527
|
+
* (since postext 1.5; up to 1.4 formulas came out about 13% larger, and
|
|
2528
|
+
* 1.131 reproduces that size. The display margins in `em` follow the
|
|
2529
|
+
* formula's size, so 1.4's pages also need them divided by 1.131:
|
|
2530
|
+
* `pinLegacyMathSize` in `postext/bundle` does both, and configurations
|
|
2531
|
+
* stored by 1.4 are read through it). Range: typically 0.5–2.0. */
|
|
1803
2532
|
fontSizeScale?: number;
|
|
1804
2533
|
/** Formula colour. If omitted, inherits the body colour. */
|
|
1805
2534
|
color?: ColorValue;
|
|
@@ -1808,6 +2537,22 @@ export interface MathConfig {
|
|
|
1808
2537
|
/** Bottom margin for display math blocks. Baseline grid snap uses this
|
|
1809
2538
|
* as the *minimum* bottom gap (the grid always wins). */
|
|
1810
2539
|
marginBottom?: Dimension;
|
|
2540
|
+
/** Indent the first line of a paragraph that follows a display formula,
|
|
2541
|
+
* as any other paragraph. Default `true`. `false` sets every paragraph
|
|
2542
|
+
* right after a display formula flush, as the continuation of the
|
|
2543
|
+
* sentence the formula interrupted ("where …"). A formula written inside
|
|
2544
|
+
* a paragraph — no blank line above it nor below it — is always followed
|
|
2545
|
+
* flush: the text under its closing `$$` continues that paragraph,
|
|
2546
|
+
* whatever this says. */
|
|
2547
|
+
indentAfterDisplay?: boolean;
|
|
2548
|
+
/** Keep a display formula in the column of the line that leads into it
|
|
2549
|
+
* (TeX's predisplay penalty): when the formula does not fit under the
|
|
2550
|
+
* last line of the paragraph before it, that line goes to the next
|
|
2551
|
+
* column or page with the formula — the whole paragraph when the lines
|
|
2552
|
+
* left behind would break the widow rule (fewer than `widowMinLines`,
|
|
2553
|
+
* when `avoidWidows` is on). The carried line stands alone at the head
|
|
2554
|
+
* of the next column. Default `false`: the formula alone moves on. */
|
|
2555
|
+
keepWithLeadIn?: boolean;
|
|
1811
2556
|
}
|
|
1812
2557
|
export interface ResolvedMathConfig {
|
|
1813
2558
|
enabled: boolean;
|
|
@@ -1815,8 +2560,14 @@ export interface ResolvedMathConfig {
|
|
|
1815
2560
|
color?: ColorValue;
|
|
1816
2561
|
marginTop: Dimension;
|
|
1817
2562
|
marginBottom: Dimension;
|
|
2563
|
+
indentAfterDisplay: boolean;
|
|
2564
|
+
keepWithLeadIn: boolean;
|
|
1818
2565
|
}
|
|
1819
2566
|
export type PdfColorSpace = 'rgb' | 'cmyk' | 'grayscale';
|
|
2567
|
+
/** How postext-pdf writes the file. Layout ignores it; the VDT carries it
|
|
2568
|
+
* (`doc.config.pdfGeneration`), and `renderToPdf` takes each setting from
|
|
2569
|
+
* its own options first, then from here (the first document's, for a
|
|
2570
|
+
* book), then from the defaults. */
|
|
1820
2571
|
export interface PdfGenerationConfig {
|
|
1821
2572
|
/** Emit PDF outlines (bookmarks) so readers can jump between headings. */
|
|
1822
2573
|
outlines?: boolean;
|
|
@@ -1879,6 +2630,9 @@ export type PageRole = 'body' | 'opener' | 'part' | 'blank';
|
|
|
1879
2630
|
* on every page the parity filter admits. */
|
|
1880
2631
|
export type PageRoleFilter = 'all' | PageRole;
|
|
1881
2632
|
export type HAlign = 'left' | 'center' | 'right';
|
|
2633
|
+
/** Alignment of a design text's lines: an {@link HAlign}, or `'justify'`
|
|
2634
|
+
* (see `DesignTextElement.align`). */
|
|
2635
|
+
export type DesignTextAlign = HAlign | 'justify';
|
|
1882
2636
|
export type VAlign = 'top' | 'middle' | 'bottom';
|
|
1883
2637
|
export type AnchorEdge = 'top-left' | 'top' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right' | 'right-of' | 'left-of' | 'below' | 'above' | 'align-top' | 'align-bottom' | 'align-left' | 'align-right';
|
|
1884
2638
|
export interface ElementAnchor {
|
|
@@ -1920,7 +2674,28 @@ export interface ElementBoxStyle {
|
|
|
1920
2674
|
left?: Dimension;
|
|
1921
2675
|
};
|
|
1922
2676
|
}
|
|
2677
|
+
/** What a design text does with a line wider than its room: `'wrap'` onto
|
|
2678
|
+
* more lines; truncate with `…` at the end, the start or the middle; or
|
|
2679
|
+
* `'clip'` to the box. `'ellipsis-end'` / `'ellipsis-start'` cut at a word
|
|
2680
|
+
* boundary, and no space or joining punctuation touches the ellipsis —
|
|
2681
|
+
* mid-word only when what the boundary leaves, that punctuation dropped,
|
|
2682
|
+
* is less than half of what fits (a long word, a URL). A no-break space
|
|
2683
|
+
* or hyphen (U+2011) is no boundary. `'ellipsis-middle'` cuts anywhere but
|
|
2684
|
+
* drops the spaces beside it. */
|
|
1923
2685
|
export type TextOverflow = 'wrap' | 'ellipsis-start' | 'ellipsis-end' | 'ellipsis-middle' | 'clip';
|
|
2686
|
+
/** Outline drawn around the glyphs of a design text (a hollow display
|
|
2687
|
+
* number, a title that stands off a photograph). */
|
|
2688
|
+
export interface DesignTextStroke {
|
|
2689
|
+
/** Line width of the outline, centred on the glyph edges: half of it
|
|
2690
|
+
* falls inside the letters, half outside. The measured text width does
|
|
2691
|
+
* not grow with it. `0` draws no outline. */
|
|
2692
|
+
width: Dimension;
|
|
2693
|
+
/** Outline colour. Default: the text colour. */
|
|
2694
|
+
color?: ColorValue;
|
|
2695
|
+
/** Leave the inside of the letters unpainted, so only the outline shows.
|
|
2696
|
+
* Default `false` (the letters are filled, then outlined). */
|
|
2697
|
+
hollow?: boolean;
|
|
2698
|
+
}
|
|
1924
2699
|
export interface DesignTextElement {
|
|
1925
2700
|
kind: 'text';
|
|
1926
2701
|
/** Stable, unique within the slot. Anchors reference elements by `#id`. */
|
|
@@ -1930,20 +2705,46 @@ export interface DesignTextElement {
|
|
|
1930
2705
|
/** Page roles this element renders on (see `PageRoleFilter`). Default
|
|
1931
2706
|
* `'all'`. */
|
|
1932
2707
|
pages?: PageRoleFilter;
|
|
2708
|
+
/** Heading designs only: whether the element counts toward the height
|
|
2709
|
+
* the heading reserves in the text flow. Default `true`. Set `false` on
|
|
2710
|
+
* decoration anchored to the page or the bleed — a seal at the foot, a
|
|
2711
|
+
* frame, a side band — so the text keeps flowing under the heading
|
|
2712
|
+
* instead of starting below the decoration. The element still paints and
|
|
2713
|
+
* can still be an anchor: under the body text in an opener
|
|
2714
|
+
* (`span: 'page'`); an in-column design paints with the heading block
|
|
2715
|
+
* wherever it is placed above the foot of its column — in the margins,
|
|
2716
|
+
* the bleed and the neighbouring columns too — and the column's foot
|
|
2717
|
+
* cuts it. Ignored by header, footer and part designs, which never
|
|
2718
|
+
* reserve room. */
|
|
2719
|
+
reserve?: boolean;
|
|
1933
2720
|
placement: ElementPlacement;
|
|
1934
2721
|
/** Template with placeholders (see design/placeholders.ts). Use `{{`/`}}`
|
|
1935
|
-
* for literal braces.
|
|
2722
|
+
* for literal braces. A newline, or the two characters `\n` written in
|
|
2723
|
+
* the template or in an `{attr.<key>}` value, starts a new line whatever
|
|
2724
|
+
* the `overflow`. Text a placeholder copies from the document (a title,
|
|
2725
|
+
* a frontmatter value) is printed as written. */
|
|
1936
2726
|
content: string;
|
|
1937
2727
|
fontFamily?: string;
|
|
1938
2728
|
fontSize: Dimension;
|
|
1939
2729
|
fontWeight?: number;
|
|
1940
2730
|
italic?: boolean;
|
|
1941
2731
|
color?: ColorValue;
|
|
1942
|
-
/** Horizontal alignment within the element's box.
|
|
1943
|
-
|
|
2732
|
+
/** Horizontal alignment of the lines within the element's box. Default
|
|
2733
|
+
* `'center'`. `'justify'` stretches the word spaces of every wrapped line
|
|
2734
|
+
* but the last of each paragraph so it fills the box (the lines beside a
|
|
2735
|
+
* drop cap fill the room beside it); with `hyphenate` a word that does not
|
|
2736
|
+
* fit is also cut at a syllable to fill the line. A line with no space,
|
|
2737
|
+
* and a text that does not wrap, is set flush left. */
|
|
2738
|
+
align?: DesignTextAlign;
|
|
1944
2739
|
/** Vertical alignment within the element's box. */
|
|
1945
2740
|
verticalAlign?: VAlign;
|
|
1946
|
-
|
|
2741
|
+
/** Leading of the element's lines. A number is a multiplier of
|
|
2742
|
+
* `fontSize` (default `1.2`). A {@link Dimension} is accepted too, the
|
|
2743
|
+
* way every other leading of the config is written: `em` / `rem` is the
|
|
2744
|
+
* same multiplier, and an absolute length (`pt`, `mm`, `px`…) is the
|
|
2745
|
+
* distance between baselines. Any other value (a negative or zero
|
|
2746
|
+
* number, a malformed dimension) sets the default leading. */
|
|
2747
|
+
lineHeight?: number | Dimension;
|
|
1947
2748
|
letterSpacing?: Dimension;
|
|
1948
2749
|
overflow: TextOverflow;
|
|
1949
2750
|
/** When true, break long words at syllable boundaries while wrapping.
|
|
@@ -1954,9 +2755,16 @@ export interface DesignTextElement {
|
|
|
1954
2755
|
textTransform?: 'none' | 'uppercase';
|
|
1955
2756
|
box?: ElementBoxStyle;
|
|
1956
2757
|
/** Drop cap: the first letter set large beside the first `lines` lines
|
|
1957
|
-
* of the text (default 2), in its own face, weight and colour
|
|
1958
|
-
*
|
|
1959
|
-
* the
|
|
2758
|
+
* of the text (default 2), in its own face, weight and colour (a
|
|
2759
|
+
* palette-linked colour follows the part and section palettes like the
|
|
2760
|
+
* rest of the design); `gap` is the space between the letter and the
|
|
2761
|
+
* text. The letter stands on the baseline of the last line it spans, and
|
|
2762
|
+
* `fontSize` defaults to the size that brings its top level with the
|
|
2763
|
+
* capitals of the first line: the text size plus `lines − 1` line
|
|
2764
|
+
* spacings, capitals taken as 0.72 of the size. A text with a drop cap
|
|
2765
|
+
* wraps whatever its `overflow` (`'clip'` still cuts the lines at the
|
|
2766
|
+
* edge of a box of fixed height). In a heading design the letter
|
|
2767
|
+
* reserves no room below the text's last line. */
|
|
1960
2768
|
dropCap?: {
|
|
1961
2769
|
lines?: number;
|
|
1962
2770
|
fontFamily?: string;
|
|
@@ -1969,6 +2777,16 @@ export interface DesignTextElement {
|
|
|
1969
2777
|
* the content (or the two characters `\n`, for attribute values)
|
|
1970
2778
|
* separates paragraphs; consecutive newlines count as one. */
|
|
1971
2779
|
paragraphIndent?: Dimension;
|
|
2780
|
+
/** Read the resolved text — placeholder values included — as inline
|
|
2781
|
+
* Markdown: `**bold**`, `*italic*`, `***bold italic***` (and the
|
|
2782
|
+
* underscore forms), `^superscript^` and `~subscript~`. A backslash sets
|
|
2783
|
+
* the marker character itself (`\*`). Bold runs take weight 700 (the
|
|
2784
|
+
* element's own weight when it is heavier); italic runs flip the
|
|
2785
|
+
* element's slant; scripts are set smaller and raised or lowered, as in
|
|
2786
|
+
* the body text. Default `false`: the text is set exactly as written. */
|
|
2787
|
+
inlineMarks?: boolean;
|
|
2788
|
+
/** Outline drawn around the glyphs (see `DesignTextStroke`). */
|
|
2789
|
+
stroke?: DesignTextStroke;
|
|
1972
2790
|
}
|
|
1973
2791
|
export interface DesignRuleElement {
|
|
1974
2792
|
kind: 'rule';
|
|
@@ -1976,9 +2794,20 @@ export interface DesignRuleElement {
|
|
|
1976
2794
|
parity?: PageParity;
|
|
1977
2795
|
/** Page roles this element renders on. Default `'all'`. */
|
|
1978
2796
|
pages?: PageRoleFilter;
|
|
2797
|
+
/** Heading designs only: whether the element counts toward the height
|
|
2798
|
+
* the heading reserves (see `DesignTextElement.reserve`). Default
|
|
2799
|
+
* `true`. */
|
|
2800
|
+
reserve?: boolean;
|
|
1979
2801
|
placement: ElementPlacement;
|
|
2802
|
+
/** Typed as required, but a JSON configuration may leave it out:
|
|
2803
|
+
* `'horizontal'`. */
|
|
1980
2804
|
direction: 'horizontal' | 'vertical';
|
|
2805
|
+
/** Typed as required, but a JSON configuration may leave it out: black
|
|
2806
|
+
* (`#000000`). */
|
|
1981
2807
|
color: ColorValue;
|
|
2808
|
+
/** Line thickness. Typed as required, but a JSON configuration may leave
|
|
2809
|
+
* it out: `0.5 pt`, the documented default (up to postext 1.4 such a
|
|
2810
|
+
* rule painted nothing). */
|
|
1982
2811
|
thickness: Dimension;
|
|
1983
2812
|
}
|
|
1984
2813
|
export interface DesignBoxElement {
|
|
@@ -1987,6 +2816,10 @@ export interface DesignBoxElement {
|
|
|
1987
2816
|
parity?: PageParity;
|
|
1988
2817
|
/** Page roles this element renders on. Default `'all'`. */
|
|
1989
2818
|
pages?: PageRoleFilter;
|
|
2819
|
+
/** Heading designs only: whether the element counts toward the height
|
|
2820
|
+
* the heading reserves (see `DesignTextElement.reserve`). Default
|
|
2821
|
+
* `true`. */
|
|
2822
|
+
reserve?: boolean;
|
|
1990
2823
|
placement: ElementPlacement;
|
|
1991
2824
|
style: ElementBoxStyle;
|
|
1992
2825
|
}
|
|
@@ -2001,6 +2834,10 @@ export interface DesignImageElement {
|
|
|
2001
2834
|
parity?: PageParity;
|
|
2002
2835
|
/** Page roles this element renders on. Default `'all'`. */
|
|
2003
2836
|
pages?: PageRoleFilter;
|
|
2837
|
+
/** Heading designs only: whether the element counts toward the height
|
|
2838
|
+
* the heading reserves (see `DesignTextElement.reserve`). Default
|
|
2839
|
+
* `true`. */
|
|
2840
|
+
reserve?: boolean;
|
|
2004
2841
|
placement: ElementPlacement;
|
|
2005
2842
|
/** `Resource.id` of a bitmap or SVG resource. */
|
|
2006
2843
|
resourceId: string;
|
|
@@ -2016,9 +2853,16 @@ export interface ResolvedDesignTextElement extends Omit<DesignTextElement, 'font
|
|
|
2016
2853
|
fontWeight: number;
|
|
2017
2854
|
italic: boolean;
|
|
2018
2855
|
color: ColorValue;
|
|
2019
|
-
align:
|
|
2856
|
+
align: DesignTextAlign;
|
|
2020
2857
|
verticalAlign: VAlign;
|
|
2858
|
+
/** Leading as a multiplier of `fontSize`. When the element gives an
|
|
2859
|
+
* absolute length (`lineHeightLength`), the equivalent multiplier — what
|
|
2860
|
+
* an editor shows; the layout uses the length. */
|
|
2021
2861
|
lineHeight: number;
|
|
2862
|
+
/** The leading as an absolute length (the element's `lineHeight` written
|
|
2863
|
+
* in `pt`, `mm`, `px`…); wins over `lineHeight` at layout. Absent for a
|
|
2864
|
+
* multiplier. */
|
|
2865
|
+
lineHeightLength?: Dimension;
|
|
2022
2866
|
}
|
|
2023
2867
|
export interface ResolvedDesignRuleElement extends Omit<DesignRuleElement, 'parity'> {
|
|
2024
2868
|
parity: PageParity;
|
|
@@ -2171,6 +3015,12 @@ export interface HeadingStyleConfig extends Omit<HeadingLevelConfig, 'level' | '
|
|
|
2171
3015
|
id: string;
|
|
2172
3016
|
/** Human-readable name (editor UI only). Defaults to {@link id}. */
|
|
2173
3017
|
name?: string;
|
|
3018
|
+
/** Template the style's headings are numbered with, in place of their
|
|
3019
|
+
* level's `numberingTemplate` (same tokens): `'Appendix {1:A}'` letters
|
|
3020
|
+
* appendices that share the chapter counter — restart it with a
|
|
3021
|
+
* `{startAt=1}` attribute on the first one. `''` prints no number while
|
|
3022
|
+
* the heading still counts. Unset = the level's template. */
|
|
3023
|
+
numberingTemplate?: string;
|
|
2174
3024
|
/** Whether the heading counts: advances the level's counter and the
|
|
2175
3025
|
* chapter ordinal (`{chapterNumber}`), and is numbered in the contents.
|
|
2176
3026
|
* `false` for a preface, an authors list, an index. Default `true`. */
|
|
@@ -2178,6 +3028,18 @@ export interface HeadingStyleConfig extends Omit<HeadingLevelConfig, 'level' | '
|
|
|
2178
3028
|
/** Whether the heading is listed by `:::toc`. Default `true`; a heading
|
|
2179
3029
|
* may override it with `{toc="false"}` / `{toc="true"}`. */
|
|
2180
3030
|
toc?: boolean;
|
|
3031
|
+
/** Whether the style's level-1 headings become the running chapter: the
|
|
3032
|
+
* chapter that `{chapterTitle}`, `{chapterNumber}`, `{attr.<key>}`, the
|
|
3033
|
+
* `…AtTop` variants and the `h1` guide words name on the heading's page
|
|
3034
|
+
* and the pages after it. `false` for a plate, a map or a cover set as a
|
|
3035
|
+
* level-1 heading inside a chapter: the running heads keep naming the
|
|
3036
|
+
* chapter it interrupts. The heading still counts when `numbered` (its
|
|
3037
|
+
* own design reads its own number) and is still listed by `:::toc` when
|
|
3038
|
+
* `toc`. The style still opens a section of its own until the next
|
|
3039
|
+
* level-1 heading (its running-head slots, margins, columns, body style
|
|
3040
|
+
* and palette, or the document's where it sets none), as every heading
|
|
3041
|
+
* style does. No effect on headings of other levels. Default `true`. */
|
|
3042
|
+
runningChapter?: boolean;
|
|
2181
3043
|
/** Running heads of the section's pages, replacing the document's
|
|
2182
3044
|
* `header` / `footer` there (element `pages` / `parity` filters still
|
|
2183
3045
|
* apply). Unset = the document's own. */
|
|
@@ -2188,23 +3050,62 @@ export interface HeadingStyleConfig extends Omit<HeadingLevelConfig, 'level' | '
|
|
|
2188
3050
|
* with `breakBefore`. */
|
|
2189
3051
|
margins?: PageMargins;
|
|
2190
3052
|
/** Column layout of the section's pages (a single wide column for a
|
|
2191
|
-
* preface set in a two-column book).
|
|
3053
|
+
* preface set in a two-column book). Set, it replaces the document's
|
|
3054
|
+
* `layout`: each field it leaves out takes the static default, except
|
|
3055
|
+
* `columnRule`, whose unset fields (`enabled`, `color`, `lineWidth`)
|
|
3056
|
+
* come from the document's `layout.columnRule` (since postext 1.5).
|
|
3057
|
+
* Only its page geometry is read from it (`layoutType`, `gutterWidth`,
|
|
3058
|
+
* the side column, `columnRule`), plus its `fitFiguresToPage` when a
|
|
3059
|
+
* figure could move from an empty column cut short to a whole one;
|
|
3060
|
+
* `inlineResourceGap`, `inlineResourceGapInBoxes`,
|
|
3061
|
+
* `boxChildSplitMinLines` and `hugClosingFloats` stay the document's,
|
|
3062
|
+
* and so does the `fitFiguresToPage` that shrinks figures.
|
|
3063
|
+
* Unset, the section uses the document's `layout`. */
|
|
2192
3064
|
layout?: LayoutConfig;
|
|
2193
3065
|
/** Typography of the body blocks in the section. */
|
|
2194
3066
|
bodyStyle?: SectionBodyStyleConfig;
|
|
2195
|
-
/** Palette overrides (palette id → hex)
|
|
2196
|
-
*
|
|
3067
|
+
/** Palette overrides (palette id → hex) for the section's pages, applied
|
|
3068
|
+
* like a part's `palette` attribute and on top of it. Not only the design
|
|
3069
|
+
* slots of those pages (running heads, the opener: every colour linked
|
|
3070
|
+
* to an overridden id) follow them, but the text flow too, as under a
|
|
3071
|
+
* part: every flow colour equal to the base value of an overridden entry
|
|
3072
|
+
* — headings, bold, italic and reference colours, bullets and list
|
|
3073
|
+
* numbers, captions and caption bars, table text, rules and fills
|
|
3074
|
+
* (header, body, zebra rows, a cell's own fill), callout boxes
|
|
3075
|
+
* (background, border, stripe, title) and chips (fill, outline, text) —
|
|
3076
|
+
* takes the section's value. Inline swatches keep theirs. Where two
|
|
3077
|
+
* entries share a base value and the section gives them different
|
|
3078
|
+
* values, each flow colour takes the value its own settings link to: a
|
|
3079
|
+
* block's text, bold, italic, reference, marker and separator colours
|
|
3080
|
+
* apart, each heading level and heading style, each part of each
|
|
3081
|
+
* callout frame, each colour of each table, chip and caption style.
|
|
3082
|
+
* Settings in different places that set the same colour of a block
|
|
3083
|
+
* (`bodyText.color` and a callout style's `body.color`) are still told
|
|
3084
|
+
* apart by value only; see the configuration docs. */
|
|
2197
3085
|
palette?: Record<string, string>;
|
|
2198
3086
|
}
|
|
2199
|
-
/** The level fields a heading style may override, resolved.
|
|
3087
|
+
/** The level fields a heading style may override, resolved. `breakBefore`
|
|
3088
|
+
* here is the style's break resolved on its own (unset fields as for a
|
|
3089
|
+
* level without a break), kept for compatibility: headings merge
|
|
3090
|
+
* {@link ResolvedHeadingStyleConfig.breakBefore} over their level's break
|
|
3091
|
+
* instead. */
|
|
2200
3092
|
export type ResolvedHeadingStyleOverrides = Partial<Omit<ResolvedHeadingLevelConfig, 'level' | 'numberingTemplate'>>;
|
|
2201
3093
|
export interface ResolvedHeadingStyleConfig {
|
|
2202
3094
|
id: string;
|
|
2203
3095
|
name: string;
|
|
2204
3096
|
numbered: boolean;
|
|
2205
3097
|
toc: boolean;
|
|
3098
|
+
/** See {@link HeadingStyleConfig.runningChapter}. */
|
|
3099
|
+
runningChapter: boolean;
|
|
2206
3100
|
/** Level fields the style sets; merged over the heading's level config. */
|
|
2207
3101
|
overrides: ResolvedHeadingStyleOverrides;
|
|
3102
|
+
/** The `breakBefore` fields the style sets, as written: merged field by
|
|
3103
|
+
* field over the break of the heading's level, so a style that only
|
|
3104
|
+
* sets `parity` keeps the level's `enabled`. Unset = the level's. */
|
|
3105
|
+
breakBefore?: HeadingBreakBeforeConfig;
|
|
3106
|
+
/** The style's own numbering template (see
|
|
3107
|
+
* {@link HeadingStyleConfig.numberingTemplate}); unset = the level's. */
|
|
3108
|
+
numberingTemplate?: string;
|
|
2208
3109
|
header?: ResolvedDesignSlot;
|
|
2209
3110
|
footer?: ResolvedDesignSlot;
|
|
2210
3111
|
margins?: Required<PageMargins>;
|
|
@@ -2226,7 +3127,8 @@ export interface TocEntryStyleConfig {
|
|
|
2226
3127
|
/** Left indent of the whole entry. Default `0`. */
|
|
2227
3128
|
indent?: Dimension;
|
|
2228
3129
|
/** Width of the number column: the title starts after it plus
|
|
2229
|
-
* `numberGap`; numbers are right-aligned in it
|
|
3130
|
+
* `numberGap`; numbers are right-aligned in it, on the baseline of the
|
|
3131
|
+
* title's first line whatever their face and size. Default `2em`. */
|
|
2230
3132
|
numberWidth?: Dimension;
|
|
2231
3133
|
/** Gap between the number column and the title. Default `0.5em`. */
|
|
2232
3134
|
numberGap?: Dimension;
|
|
@@ -2265,7 +3167,8 @@ export interface TocConfig {
|
|
|
2265
3167
|
/** Default `true`. */
|
|
2266
3168
|
enabled?: boolean;
|
|
2267
3169
|
/** Repeated across the gap, right-aligned so dots line up. Default `'.'`;
|
|
2268
|
-
* `'. '` spaces them out.
|
|
3170
|
+
* `'. '` spaces them out. The run holds as many as fit when measured
|
|
3171
|
+
* whole, so a face that kerns the character against itself gets fewer. */
|
|
2269
3172
|
char?: string;
|
|
2270
3173
|
/** Minimum gap between the title and the leader / page number. Default
|
|
2271
3174
|
* `0.5em`. */
|
|
@@ -2299,7 +3202,9 @@ export interface TocConfig {
|
|
|
2299
3202
|
* the part's own palette. When empty, `{number} {titleText}` and the
|
|
2300
3203
|
* page number are set in the level-1 entry typography. */
|
|
2301
3204
|
design?: DesignSlot;
|
|
2302
|
-
/** Row height
|
|
3205
|
+
/** Row height; `em` is the body text size. Default `2em`, twice the
|
|
3206
|
+
* body size (a row one or two body lines tall, depending on the
|
|
3207
|
+
* leading). */
|
|
2303
3208
|
height?: Dimension;
|
|
2304
3209
|
marginTop?: Dimension;
|
|
2305
3210
|
marginBottom?: Dimension;
|
|
@@ -2398,11 +3303,15 @@ export interface PostextConfig {
|
|
|
2398
3303
|
math?: MathConfig;
|
|
2399
3304
|
header?: HeaderFooterSlot;
|
|
2400
3305
|
footer?: HeaderFooterSlot;
|
|
2401
|
-
/** Document language. The fallback
|
|
2402
|
-
* `bodyText.hyphenation.locale` is not explicitly
|
|
2403
|
-
* of the table continuation strings
|
|
2404
|
-
* `continuesMarker`) when those are not
|
|
2405
|
-
|
|
3306
|
+
/** Document language, a BCP 47 tag (see {@link LocaleTag}). The fallback
|
|
3307
|
+
* hyphenation locale when `bodyText.hyphenation.locale` is not explicitly
|
|
3308
|
+
* set, the language of the table continuation strings
|
|
3309
|
+
* (`tableStyle.continuedSuffix` / `continuesMarker`) when those are not
|
|
3310
|
+
* set, and of the built-in resource types (Figure / Table) when
|
|
3311
|
+
* {@link resourceTypes} is not set. Built-in strings exist for the
|
|
3312
|
+
* bundled hyphenation languages; any other language gets the English
|
|
3313
|
+
* ones. Defaults to `'en-us'`. */
|
|
3314
|
+
locale?: LocaleTag;
|
|
2406
3315
|
debug?: DebugConfig;
|
|
2407
3316
|
htmlViewer?: HtmlViewerConfig;
|
|
2408
3317
|
pdfGeneration?: PdfGenerationConfig;
|
|
@@ -2415,7 +3324,9 @@ export interface PostextConfig {
|
|
|
2415
3324
|
customFonts?: CustomFontFamily[];
|
|
2416
3325
|
/** User-definable resource categories (figures, tables, etc.) that drive
|
|
2417
3326
|
* typed numbering, caption prefixes, and inline references. Defaults to
|
|
2418
|
-
* the built-in 'figure' and 'table' types when unset
|
|
3327
|
+
* the built-in 'figure' and 'table' types when unset, localised to the
|
|
3328
|
+
* document language (`defaultResourceTypes(locale)`, where the language is
|
|
3329
|
+
* {@link locale}, else `bodyText.hyphenation.locale`, else English). */
|
|
2419
3330
|
resourceTypes?: ResourceType[];
|
|
2420
3331
|
}
|
|
2421
3332
|
//# sourceMappingURL=types.d.ts.map
|