postext 1.8.6 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__bench__/cjkChapter.bench.test.d.ts +2 -0
- package/dist/__bench__/cjkChapter.bench.test.d.ts.map +1 -0
- package/dist/__bench__/cjkChapter.bench.test.js +71 -0
- package/dist/__bench__/cjkChapter.bench.test.js.map +1 -0
- package/dist/__tests__/bundle.test.js +16 -0
- package/dist/__tests__/bundle.test.js.map +1 -1
- package/dist/__tests__/canvasDirection.test.d.ts +2 -0
- package/dist/__tests__/canvasDirection.test.d.ts.map +1 -0
- package/dist/__tests__/canvasDirection.test.js +45 -0
- package/dist/__tests__/canvasDirection.test.js.map +1 -0
- package/dist/__tests__/chineseLocale.test.d.ts +2 -0
- package/dist/__tests__/chineseLocale.test.d.ts.map +1 -0
- package/dist/__tests__/chineseLocale.test.js +253 -0
- package/dist/__tests__/chineseLocale.test.js.map +1 -0
- package/dist/__tests__/chineseNumbering.test.d.ts +2 -0
- package/dist/__tests__/chineseNumbering.test.d.ts.map +1 -0
- package/dist/__tests__/chineseNumbering.test.js +376 -0
- package/dist/__tests__/chineseNumbering.test.js.map +1 -0
- package/dist/__tests__/cjk/annotations.test.d.ts +2 -0
- package/dist/__tests__/cjk/annotations.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/annotations.test.js +483 -0
- package/dist/__tests__/cjk/annotations.test.js.map +1 -0
- package/dist/__tests__/cjk/annotationsRender.test.d.ts +2 -0
- package/dist/__tests__/cjk/annotationsRender.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/annotationsRender.test.js +263 -0
- package/dist/__tests__/cjk/annotationsRender.test.js.map +1 -0
- package/dist/__tests__/cjk/composer.test.d.ts +2 -0
- package/dist/__tests__/cjk/composer.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/composer.test.js +237 -0
- package/dist/__tests__/cjk/composer.test.js.map +1 -0
- package/dist/__tests__/cjk/composerEdges.test.d.ts +2 -0
- package/dist/__tests__/cjk/composerEdges.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/composerEdges.test.js +352 -0
- package/dist/__tests__/cjk/composerEdges.test.js.map +1 -0
- package/dist/__tests__/cjk/dashRule.test.d.ts +2 -0
- package/dist/__tests__/cjk/dashRule.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/dashRule.test.js +261 -0
- package/dist/__tests__/cjk/dashRule.test.js.map +1 -0
- package/dist/__tests__/cjk/fuzz.test.d.ts +2 -0
- package/dist/__tests__/cjk/fuzz.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/fuzz.test.js +102 -0
- package/dist/__tests__/cjk/fuzz.test.js.map +1 -0
- package/dist/__tests__/cjk/grid.test.d.ts +2 -0
- package/dist/__tests__/cjk/grid.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/grid.test.js +261 -0
- package/dist/__tests__/cjk/grid.test.js.map +1 -0
- package/dist/__tests__/cjk/justifyRender.test.d.ts +2 -0
- package/dist/__tests__/cjk/justifyRender.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/justifyRender.test.js +139 -0
- package/dist/__tests__/cjk/justifyRender.test.js.map +1 -0
- package/dist/__tests__/cjk/latinFastPath.test.d.ts +2 -0
- package/dist/__tests__/cjk/latinFastPath.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/latinFastPath.test.js +208 -0
- package/dist/__tests__/cjk/latinFastPath.test.js.map +1 -0
- package/dist/__tests__/cjk/markCutsLatin.test.d.ts +2 -0
- package/dist/__tests__/cjk/markCutsLatin.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/markCutsLatin.test.js +69 -0
- package/dist/__tests__/cjk/markCutsLatin.test.js.map +1 -0
- package/dist/__tests__/cjk/markRuns.test.d.ts +2 -0
- package/dist/__tests__/cjk/markRuns.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/markRuns.test.js +347 -0
- package/dist/__tests__/cjk/markRuns.test.js.map +1 -0
- package/dist/__tests__/cjk/punctuation.test.d.ts +2 -0
- package/dist/__tests__/cjk/punctuation.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/punctuation.test.js +440 -0
- package/dist/__tests__/cjk/punctuation.test.js.map +1 -0
- package/dist/__tests__/cjk/punctuationRender.test.d.ts +2 -0
- package/dist/__tests__/cjk/punctuationRender.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/punctuationRender.test.js +135 -0
- package/dist/__tests__/cjk/punctuationRender.test.js.map +1 -0
- package/dist/__tests__/cjk/rubyDescenders.test.d.ts +2 -0
- package/dist/__tests__/cjk/rubyDescenders.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/rubyDescenders.test.js +77 -0
- package/dist/__tests__/cjk/rubyDescenders.test.js.map +1 -0
- package/dist/__tests__/cjk/runt.test.d.ts +2 -0
- package/dist/__tests__/cjk/runt.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/runt.test.js +103 -0
- package/dist/__tests__/cjk/runt.test.js.map +1 -0
- package/dist/__tests__/cjk/sharedMarks.test.d.ts +2 -0
- package/dist/__tests__/cjk/sharedMarks.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/sharedMarks.test.js +347 -0
- package/dist/__tests__/cjk/sharedMarks.test.js.map +1 -0
- package/dist/__tests__/cjk/uprightDots.test.d.ts +2 -0
- package/dist/__tests__/cjk/uprightDots.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/uprightDots.test.js +47 -0
- package/dist/__tests__/cjk/uprightDots.test.js.map +1 -0
- package/dist/__tests__/cjk/wordJoiner.test.d.ts +2 -0
- package/dist/__tests__/cjk/wordJoiner.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/wordJoiner.test.js +47 -0
- package/dist/__tests__/cjk/wordJoiner.test.js.map +1 -0
- package/dist/__tests__/cjk/zhuyinTones.test.d.ts +2 -0
- package/dist/__tests__/cjk/zhuyinTones.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/zhuyinTones.test.js +72 -0
- package/dist/__tests__/cjk/zhuyinTones.test.js.map +1 -0
- package/dist/__tests__/contentLocale.test.d.ts +2 -0
- package/dist/__tests__/contentLocale.test.d.ts.map +1 -0
- package/dist/__tests__/contentLocale.test.js +167 -0
- package/dist/__tests__/contentLocale.test.js.map +1 -0
- package/dist/__tests__/defaults/cjk.test.d.ts +2 -0
- package/dist/__tests__/defaults/cjk.test.d.ts.map +1 -0
- package/dist/__tests__/defaults/cjk.test.js +70 -0
- package/dist/__tests__/defaults/cjk.test.js.map +1 -0
- package/dist/__tests__/design/designTextRender.test.js +31 -0
- package/dist/__tests__/design/designTextRender.test.js.map +1 -1
- package/dist/__tests__/design/imageAltText.test.d.ts +2 -0
- package/dist/__tests__/design/imageAltText.test.d.ts.map +1 -0
- package/dist/__tests__/design/imageAltText.test.js +126 -0
- package/dist/__tests__/design/imageAltText.test.js.map +1 -0
- package/dist/__tests__/exports.test.js +61 -0
- package/dist/__tests__/exports.test.js.map +1 -1
- package/dist/__tests__/headingLetterSpacing.test.js +1 -1
- package/dist/__tests__/headingLetterSpacing.test.js.map +1 -1
- package/dist/__tests__/indexChinese.test.d.ts +2 -0
- package/dist/__tests__/indexChinese.test.d.ts.map +1 -0
- package/dist/__tests__/indexChinese.test.js +190 -0
- package/dist/__tests__/indexChinese.test.js.map +1 -0
- package/dist/__tests__/parse/annotations.test.d.ts +2 -0
- package/dist/__tests__/parse/annotations.test.d.ts.map +1 -0
- package/dist/__tests__/parse/annotations.test.js +175 -0
- package/dist/__tests__/parse/annotations.test.js.map +1 -0
- package/dist/__tests__/parse/attrQuoting.test.js +10 -8
- package/dist/__tests__/parse/attrQuoting.test.js.map +1 -1
- package/dist/__tests__/parse/chineseText.test.d.ts +2 -0
- package/dist/__tests__/parse/chineseText.test.d.ts.map +1 -0
- package/dist/__tests__/parse/chineseText.test.js +352 -0
- package/dist/__tests__/parse/chineseText.test.js.map +1 -0
- package/dist/__tests__/parts.test.js +25 -0
- package/dist/__tests__/parts.test.js.map +1 -1
- package/dist/__tests__/pipeline/colonListRoom.test.js +20 -0
- package/dist/__tests__/pipeline/colonListRoom.test.js.map +1 -1
- package/dist/__tests__/presets/hongloumeng.test.d.ts +2 -0
- package/dist/__tests__/presets/hongloumeng.test.d.ts.map +1 -0
- package/dist/__tests__/presets/hongloumeng.test.js +484 -0
- package/dist/__tests__/presets/hongloumeng.test.js.map +1 -0
- package/dist/__tests__/vertical/canvasPaint.test.d.ts +2 -0
- package/dist/__tests__/vertical/canvasPaint.test.d.ts.map +1 -0
- package/dist/__tests__/vertical/canvasPaint.test.js +229 -0
- package/dist/__tests__/vertical/canvasPaint.test.js.map +1 -0
- package/dist/__tests__/vertical/compositionPaint.test.d.ts +2 -0
- package/dist/__tests__/vertical/compositionPaint.test.d.ts.map +1 -0
- package/dist/__tests__/vertical/compositionPaint.test.js +538 -0
- package/dist/__tests__/vertical/compositionPaint.test.js.map +1 -0
- package/dist/__tests__/vertical/geometry.test.d.ts +2 -0
- package/dist/__tests__/vertical/geometry.test.d.ts.map +1 -0
- package/dist/__tests__/vertical/geometry.test.js +276 -0
- package/dist/__tests__/vertical/geometry.test.js.map +1 -0
- package/dist/__tests__/vertical/htmlSmoke.test.d.ts +2 -0
- package/dist/__tests__/vertical/htmlSmoke.test.d.ts.map +1 -0
- package/dist/__tests__/vertical/htmlSmoke.test.js +25 -0
- package/dist/__tests__/vertical/htmlSmoke.test.js.map +1 -0
- package/dist/__tests__/vertical/htmlTurnedCells.test.d.ts +2 -0
- package/dist/__tests__/vertical/htmlTurnedCells.test.d.ts.map +1 -0
- package/dist/__tests__/vertical/htmlTurnedCells.test.js +99 -0
- package/dist/__tests__/vertical/htmlTurnedCells.test.js.map +1 -0
- package/dist/__tests__/vertical/htmlVertical.test.d.ts +2 -0
- package/dist/__tests__/vertical/htmlVertical.test.d.ts.map +1 -0
- package/dist/__tests__/vertical/htmlVertical.test.js +145 -0
- package/dist/__tests__/vertical/htmlVertical.test.js.map +1 -0
- package/dist/__tests__/vertical/lineAxis.test.d.ts +2 -0
- package/dist/__tests__/vertical/lineAxis.test.d.ts.map +1 -0
- package/dist/__tests__/vertical/lineAxis.test.js +128 -0
- package/dist/__tests__/vertical/lineAxis.test.js.map +1 -0
- package/dist/__tests__/vertical/measurePaint.test.d.ts +2 -0
- package/dist/__tests__/vertical/measurePaint.test.d.ts.map +1 -0
- package/dist/__tests__/vertical/measurePaint.test.js +259 -0
- package/dist/__tests__/vertical/measurePaint.test.js.map +1 -0
- package/dist/__tests__/vertical/orientation.test.d.ts +2 -0
- package/dist/__tests__/vertical/orientation.test.d.ts.map +1 -0
- package/dist/__tests__/vertical/orientation.test.js +153 -0
- package/dist/__tests__/vertical/orientation.test.js.map +1 -0
- package/dist/__tests__/vertical/stub.d.ts +8 -0
- package/dist/__tests__/vertical/stub.d.ts.map +1 -0
- package/dist/__tests__/vertical/stub.js +37 -0
- package/dist/__tests__/vertical/stub.js.map +1 -0
- package/dist/__tests__/vertical/tateChuYoko.test.d.ts +2 -0
- package/dist/__tests__/vertical/tateChuYoko.test.d.ts.map +1 -0
- package/dist/__tests__/vertical/tateChuYoko.test.js +270 -0
- package/dist/__tests__/vertical/tateChuYoko.test.js.map +1 -0
- package/dist/__tests__/vertical/uprightResources.test.d.ts +2 -0
- package/dist/__tests__/vertical/uprightResources.test.d.ts.map +1 -0
- package/dist/__tests__/vertical/uprightResources.test.js +182 -0
- package/dist/__tests__/vertical/uprightResources.test.js.map +1 -0
- package/dist/__tests__/vertical/verticalDesignText.test.d.ts +2 -0
- package/dist/__tests__/vertical/verticalDesignText.test.d.ts.map +1 -0
- package/dist/__tests__/vertical/verticalDesignText.test.js +190 -0
- package/dist/__tests__/vertical/verticalDesignText.test.js.map +1 -0
- package/dist/__tests__/vertical/verticalSpans.d.ts +25 -0
- package/dist/__tests__/vertical/verticalSpans.d.ts.map +1 -0
- package/dist/__tests__/vertical/verticalSpans.js +39 -0
- package/dist/__tests__/vertical/verticalSpans.js.map +1 -0
- package/dist/__tests__/vertical/verticalTwins.test.d.ts +2 -0
- package/dist/__tests__/vertical/verticalTwins.test.d.ts.map +1 -0
- package/dist/__tests__/vertical/verticalTwins.test.js +71 -0
- package/dist/__tests__/vertical/verticalTwins.test.js.map +1 -0
- package/dist/bundle/adapters.d.ts +14 -5
- package/dist/bundle/adapters.d.ts.map +1 -1
- package/dist/bundle/adapters.js +4 -3
- package/dist/bundle/adapters.js.map +1 -1
- package/dist/bundle/codec.d.ts.map +1 -1
- package/dist/bundle/codec.js +27 -4
- package/dist/bundle/codec.js.map +1 -1
- package/dist/bundle/index.d.ts +1 -1
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/manifest.d.ts +6 -4
- package/dist/bundle/manifest.d.ts.map +1 -1
- package/dist/bundle/manifest.js +31 -32
- package/dist/bundle/manifest.js.map +1 -1
- package/dist/bundle/types.d.ts +7 -2
- package/dist/bundle/types.d.ts.map +1 -1
- package/dist/canvas-backend/annotations.d.ts +31 -0
- package/dist/canvas-backend/annotations.d.ts.map +1 -0
- package/dist/canvas-backend/annotations.js +120 -0
- package/dist/canvas-backend/annotations.js.map +1 -0
- package/dist/canvas-backend/blockRender.d.ts.map +1 -1
- package/dist/canvas-backend/blockRender.js +195 -15
- package/dist/canvas-backend/blockRender.js.map +1 -1
- package/dist/canvas-backend/decorations.d.ts +5 -0
- package/dist/canvas-backend/decorations.d.ts.map +1 -1
- package/dist/canvas-backend/decorations.js +27 -0
- package/dist/canvas-backend/decorations.js.map +1 -1
- package/dist/canvas-backend/headerFooter.d.ts.map +1 -1
- package/dist/canvas-backend/headerFooter.js +32 -16
- package/dist/canvas-backend/headerFooter.js.map +1 -1
- package/dist/canvas-backend/index.d.ts +2 -0
- package/dist/canvas-backend/index.d.ts.map +1 -1
- package/dist/canvas-backend/index.js +62 -2
- package/dist/canvas-backend/index.js.map +1 -1
- package/dist/canvas-backend/renderResourceBlock.d.ts.map +1 -1
- package/dist/canvas-backend/renderResourceBlock.js +42 -5
- package/dist/canvas-backend/renderResourceBlock.js.map +1 -1
- package/dist/canvas-backend/segmentText.d.ts +23 -0
- package/dist/canvas-backend/segmentText.d.ts.map +1 -0
- package/dist/canvas-backend/segmentText.js +41 -0
- package/dist/canvas-backend/segmentText.js.map +1 -0
- package/dist/canvas-backend/verticalText.d.ts +113 -0
- package/dist/canvas-backend/verticalText.d.ts.map +1 -0
- package/dist/canvas-backend/verticalText.js +437 -0
- package/dist/canvas-backend/verticalText.js.map +1 -0
- package/dist/chineseNumerals.d.ts +39 -0
- package/dist/chineseNumerals.d.ts.map +1 -0
- package/dist/chineseNumerals.js +192 -0
- package/dist/chineseNumerals.js.map +1 -0
- package/dist/cjkMarks.d.ts +61 -0
- package/dist/cjkMarks.d.ts.map +1 -0
- package/dist/cjkMarks.js +441 -0
- package/dist/cjkMarks.js.map +1 -0
- package/dist/columnClip.d.ts +13 -4
- package/dist/columnClip.d.ts.map +1 -1
- package/dist/columnClip.js +33 -5
- package/dist/columnClip.js.map +1 -1
- package/dist/configWarnings.d.ts.map +1 -1
- package/dist/configWarnings.js +18 -3
- package/dist/configWarnings.js.map +1 -1
- package/dist/defaults/bodyText.d.ts +4 -1
- package/dist/defaults/bodyText.d.ts.map +1 -1
- package/dist/defaults/bodyText.js +27 -5
- package/dist/defaults/bodyText.js.map +1 -1
- package/dist/defaults/calloutStyles.js +1 -1
- package/dist/defaults/calloutStyles.js.map +1 -1
- package/dist/defaults/captionStyle.d.ts.map +1 -1
- package/dist/defaults/captionStyle.js +14 -0
- package/dist/defaults/captionStyle.js.map +1 -1
- package/dist/defaults/cjk.d.ts +33 -0
- package/dist/defaults/cjk.d.ts.map +1 -0
- package/dist/defaults/cjk.js +234 -0
- package/dist/defaults/cjk.js.map +1 -0
- package/dist/defaults/headerFooter.d.ts.map +1 -1
- package/dist/defaults/headerFooter.js +2 -0
- package/dist/defaults/headerFooter.js.map +1 -1
- package/dist/defaults/headingStyles.d.ts.map +1 -1
- package/dist/defaults/headingStyles.js +4 -0
- package/dist/defaults/headingStyles.js.map +1 -1
- package/dist/defaults/headings.d.ts.map +1 -1
- package/dist/defaults/headings.js +13 -6
- package/dist/defaults/headings.js.map +1 -1
- package/dist/defaults/index.d.ts +1 -0
- package/dist/defaults/index.d.ts.map +1 -1
- package/dist/defaults/index.js +10 -1
- package/dist/defaults/index.js.map +1 -1
- package/dist/defaults/indexConfig.d.ts +2 -1
- package/dist/defaults/indexConfig.d.ts.map +1 -1
- package/dist/defaults/indexConfig.js +5 -0
- package/dist/defaults/indexConfig.js.map +1 -1
- package/dist/defaults/layout.d.ts.map +1 -1
- package/dist/defaults/layout.js +7 -0
- package/dist/defaults/layout.js.map +1 -1
- package/dist/defaults/orderedLists.d.ts +5 -2
- package/dist/defaults/orderedLists.d.ts.map +1 -1
- package/dist/defaults/orderedLists.js +20 -5
- package/dist/defaults/orderedLists.js.map +1 -1
- package/dist/defaults/page.d.ts +8 -2
- package/dist/defaults/page.d.ts.map +1 -1
- package/dist/defaults/page.js +24 -7
- package/dist/defaults/page.js.map +1 -1
- package/dist/defaults/resourceTypes.d.ts +3 -3
- package/dist/defaults/resourceTypes.d.ts.map +1 -1
- package/dist/defaults/resourceTypes.js +23 -9
- package/dist/defaults/resourceTypes.js.map +1 -1
- package/dist/defaults/tableStyle.d.ts.map +1 -1
- package/dist/defaults/tableStyle.js +8 -5
- package/dist/defaults/tableStyle.js.map +1 -1
- package/dist/design/layout.d.ts +33 -0
- package/dist/design/layout.d.ts.map +1 -1
- package/dist/design/layout.js +124 -18
- package/dist/design/layout.js.map +1 -1
- package/dist/design/placeholders.d.ts.map +1 -1
- package/dist/design/placeholders.js +5 -1
- package/dist/design/placeholders.js.map +1 -1
- package/dist/design/richText.d.ts +24 -4
- package/dist/design/richText.d.ts.map +1 -1
- package/dist/design/richText.js +77 -16
- package/dist/design/richText.js.map +1 -1
- package/dist/html-backend.d.ts.map +1 -1
- package/dist/html-backend.js +635 -25
- package/dist/html-backend.js.map +1 -1
- package/dist/htmlAnnotations.d.ts +29 -0
- package/dist/htmlAnnotations.d.ts.map +1 -0
- package/dist/htmlAnnotations.js +86 -0
- package/dist/htmlAnnotations.js.map +1 -0
- package/dist/hyphenate.js +2 -1
- package/dist/hyphenate.js.map +1 -1
- package/dist/index.d.ts +28 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -8
- package/dist/index.js.map +1 -1
- package/dist/knuthPlass/pretextAdapter.d.ts +4 -1
- package/dist/knuthPlass/pretextAdapter.d.ts.map +1 -1
- package/dist/knuthPlass/pretextAdapter.js +9 -5
- package/dist/knuthPlass/pretextAdapter.js.map +1 -1
- package/dist/knuthPlass/richAdapter.d.ts +15 -2
- package/dist/knuthPlass/richAdapter.d.ts.map +1 -1
- package/dist/knuthPlass/richAdapter.js +16 -6
- package/dist/knuthPlass/richAdapter.js.map +1 -1
- package/dist/knuthPlass/tracking.d.ts +1 -1
- package/dist/knuthPlass/tracking.d.ts.map +1 -1
- package/dist/knuthPlass/tracking.js +4 -3
- package/dist/knuthPlass/tracking.js.map +1 -1
- package/dist/knuthPlass/types.d.ts +3 -0
- package/dist/knuthPlass/types.d.ts.map +1 -1
- package/dist/lineInk.d.ts +13 -0
- package/dist/lineInk.d.ts.map +1 -1
- package/dist/lineInk.js +28 -1
- package/dist/lineInk.js.map +1 -1
- package/dist/locale.d.ts +91 -3
- package/dist/locale.d.ts.map +1 -1
- package/dist/locale.js +245 -1
- package/dist/locale.js.map +1 -1
- package/dist/looseLines.d.ts +11 -1
- package/dist/looseLines.d.ts.map +1 -1
- package/dist/looseLines.js +26 -1
- package/dist/looseLines.js.map +1 -1
- package/dist/measure/cache.d.ts.map +1 -1
- package/dist/measure/cache.js +51 -3
- package/dist/measure/cache.js.map +1 -1
- package/dist/measure/canvas.d.ts +25 -0
- package/dist/measure/canvas.d.ts.map +1 -1
- package/dist/measure/canvas.js +90 -1
- package/dist/measure/canvas.js.map +1 -1
- package/dist/measure/cjk.d.ts +8 -13
- package/dist/measure/cjk.d.ts.map +1 -1
- package/dist/measure/cjk.js +29 -53
- package/dist/measure/cjk.js.map +1 -1
- package/dist/measure/cjkAnnotate.d.ts +96 -0
- package/dist/measure/cjkAnnotate.d.ts.map +1 -0
- package/dist/measure/cjkAnnotate.js +237 -0
- package/dist/measure/cjkAnnotate.js.map +1 -0
- package/dist/measure/cjkClasses.d.ts +133 -0
- package/dist/measure/cjkClasses.d.ts.map +1 -0
- package/dist/measure/cjkClasses.js +273 -0
- package/dist/measure/cjkClasses.js.map +1 -0
- package/dist/measure/cjkCompose.d.ts +86 -0
- package/dist/measure/cjkCompose.d.ts.map +1 -0
- package/dist/measure/cjkCompose.js +2022 -0
- package/dist/measure/cjkCompose.js.map +1 -0
- package/dist/measure/cjkPunctuation.d.ts +248 -0
- package/dist/measure/cjkPunctuation.d.ts.map +1 -0
- package/dist/measure/cjkPunctuation.js +492 -0
- package/dist/measure/cjkPunctuation.js.map +1 -0
- package/dist/measure/graphemes.d.ts +13 -0
- package/dist/measure/graphemes.d.ts.map +1 -0
- package/dist/measure/graphemes.js +38 -0
- package/dist/measure/graphemes.js.map +1 -0
- package/dist/measure/index.d.ts +3 -0
- package/dist/measure/index.d.ts.map +1 -1
- package/dist/measure/index.js +2 -0
- package/dist/measure/index.js.map +1 -1
- package/dist/measure/links.d.ts +6 -2
- package/dist/measure/links.d.ts.map +1 -1
- package/dist/measure/links.js +15 -5
- package/dist/measure/links.js.map +1 -1
- package/dist/measure/markCuts.d.ts +37 -0
- package/dist/measure/markCuts.d.ts.map +1 -0
- package/dist/measure/markCuts.js +77 -0
- package/dist/measure/markCuts.js.map +1 -0
- package/dist/measure/plain.d.ts.map +1 -1
- package/dist/measure/plain.js +33 -11
- package/dist/measure/plain.js.map +1 -1
- package/dist/measure/rich.d.ts +88 -1
- package/dist/measure/rich.d.ts.map +1 -1
- package/dist/measure/rich.js +233 -111
- package/dist/measure/rich.js.map +1 -1
- package/dist/measure/rubyLift.d.ts +11 -0
- package/dist/measure/rubyLift.d.ts.map +1 -0
- package/dist/measure/rubyLift.js +57 -0
- package/dist/measure/rubyLift.js.map +1 -0
- package/dist/measure/spaces.d.ts +12 -2
- package/dist/measure/spaces.d.ts.map +1 -1
- package/dist/measure/spaces.js +21 -7
- package/dist/measure/spaces.js.map +1 -1
- package/dist/measure/types.d.ts +20 -1
- package/dist/measure/types.d.ts.map +1 -1
- package/dist/measure/types.js.map +1 -1
- package/dist/measure/vertical.d.ts +104 -0
- package/dist/measure/vertical.d.ts.map +1 -0
- package/dist/measure/vertical.js +184 -0
- package/dist/measure/vertical.js.map +1 -0
- package/dist/numberWords.d.ts +3 -10
- package/dist/numberWords.d.ts.map +1 -1
- package/dist/numberWords.js +21 -9
- package/dist/numberWords.js.map +1 -1
- package/dist/numbering.d.ts +23 -5
- package/dist/numbering.d.ts.map +1 -1
- package/dist/numbering.js +99 -14
- package/dist/numbering.js.map +1 -1
- package/dist/parse/annotations.d.ts +101 -0
- package/dist/parse/annotations.d.ts.map +1 -0
- package/dist/parse/annotations.js +556 -0
- package/dist/parse/annotations.js.map +1 -0
- package/dist/parse/attrs.d.ts +48 -1
- package/dist/parse/attrs.d.ts.map +1 -1
- package/dist/parse/attrs.js +121 -8
- package/dist/parse/attrs.js.map +1 -1
- package/dist/parse/blockParser.d.ts.map +1 -1
- package/dist/parse/blockParser.js +50 -24
- package/dist/parse/blockParser.js.map +1 -1
- package/dist/parse/index.d.ts +3 -1
- package/dist/parse/index.d.ts.map +1 -1
- package/dist/parse/index.js +1 -0
- 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 +29 -8
- package/dist/parse/injectSpans.js.map +1 -1
- package/dist/parse/inlineFormatting.d.ts +38 -6
- package/dist/parse/inlineFormatting.d.ts.map +1 -1
- package/dist/parse/inlineFormatting.js +139 -26
- package/dist/parse/inlineFormatting.js.map +1 -1
- package/dist/parse/inlineSnippet.d.ts +2 -1
- package/dist/parse/inlineSnippet.d.ts.map +1 -1
- package/dist/parse/inlineSnippet.js +6 -2
- package/dist/parse/inlineSnippet.js.map +1 -1
- package/dist/parse/orientationMarks.d.ts +49 -0
- package/dist/parse/orientationMarks.d.ts.map +1 -0
- package/dist/parse/orientationMarks.js +138 -0
- package/dist/parse/orientationMarks.js.map +1 -0
- package/dist/parse/softBreaks.d.ts +56 -0
- package/dist/parse/softBreaks.d.ts.map +1 -0
- package/dist/parse/softBreaks.js +271 -0
- package/dist/parse/softBreaks.js.map +1 -0
- package/dist/parse/sourceMapping.d.ts.map +1 -1
- package/dist/parse/sourceMapping.js +41 -0
- package/dist/parse/sourceMapping.js.map +1 -1
- package/dist/parse/types.d.ts +84 -0
- package/dist/parse/types.d.ts.map +1 -1
- package/dist/pipeline/annotations.d.ts +56 -0
- package/dist/pipeline/annotations.d.ts.map +1 -0
- package/dist/pipeline/annotations.js +181 -0
- package/dist/pipeline/annotations.js.map +1 -0
- package/dist/pipeline/build.d.ts.map +1 -1
- package/dist/pipeline/build.js +158 -47
- package/dist/pipeline/build.js.map +1 -1
- package/dist/pipeline/buildBlockKind.d.ts +3 -0
- package/dist/pipeline/buildBlockKind.d.ts.map +1 -1
- package/dist/pipeline/buildBlockKind.js +5 -3
- package/dist/pipeline/buildBlockKind.js.map +1 -1
- package/dist/pipeline/buildHelpers.d.ts +36 -6
- package/dist/pipeline/buildHelpers.d.ts.map +1 -1
- package/dist/pipeline/buildHelpers.js +55 -8
- package/dist/pipeline/buildHelpers.js.map +1 -1
- package/dist/pipeline/buildMeasurement.d.ts +4 -0
- package/dist/pipeline/buildMeasurement.d.ts.map +1 -1
- package/dist/pipeline/buildMeasurement.js +3 -1
- package/dist/pipeline/buildMeasurement.js.map +1 -1
- package/dist/pipeline/calloutLayout.d.ts.map +1 -1
- package/dist/pipeline/calloutLayout.js +25 -11
- package/dist/pipeline/calloutLayout.js.map +1 -1
- package/dist/pipeline/cjkGrid.d.ts +133 -0
- package/dist/pipeline/cjkGrid.d.ts.map +1 -0
- package/dist/pipeline/cjkGrid.js +191 -0
- package/dist/pipeline/cjkGrid.js.map +1 -0
- package/dist/pipeline/config.d.ts +13 -9
- package/dist/pipeline/config.d.ts.map +1 -1
- package/dist/pipeline/config.js +43 -18
- package/dist/pipeline/config.js.map +1 -1
- package/dist/pipeline/contentWarnings.d.ts +10 -0
- package/dist/pipeline/contentWarnings.d.ts.map +1 -1
- package/dist/pipeline/contentWarnings.js +174 -2
- package/dist/pipeline/contentWarnings.js.map +1 -1
- package/dist/pipeline/floatPlacement.d.ts +9 -3
- package/dist/pipeline/floatPlacement.d.ts.map +1 -1
- package/dist/pipeline/floatPlacement.js +17 -6
- package/dist/pipeline/floatPlacement.js.map +1 -1
- package/dist/pipeline/headerFooter.d.ts +5 -2
- package/dist/pipeline/headerFooter.d.ts.map +1 -1
- package/dist/pipeline/headerFooter.js +123 -28
- package/dist/pipeline/headerFooter.js.map +1 -1
- package/dist/pipeline/headingDesignCuts.d.ts.map +1 -1
- package/dist/pipeline/headingDesignCuts.js +3 -1
- package/dist/pipeline/headingDesignCuts.js.map +1 -1
- package/dist/pipeline/headingStyles.d.ts +9 -3
- package/dist/pipeline/headingStyles.d.ts.map +1 -1
- package/dist/pipeline/headingStyles.js +23 -5
- package/dist/pipeline/headingStyles.js.map +1 -1
- package/dist/pipeline/indexDirective.d.ts.map +1 -1
- package/dist/pipeline/indexDirective.js +64 -20
- package/dist/pipeline/indexDirective.js.map +1 -1
- package/dist/pipeline/indexGroups.d.ts +55 -0
- package/dist/pipeline/indexGroups.d.ts.map +1 -0
- package/dist/pipeline/indexGroups.js +151 -0
- package/dist/pipeline/indexGroups.js.map +1 -0
- package/dist/pipeline/lists.d.ts +17 -0
- package/dist/pipeline/lists.d.ts.map +1 -1
- package/dist/pipeline/lists.js +43 -51
- package/dist/pipeline/lists.js.map +1 -1
- package/dist/pipeline/measureContentBlock.d.ts +3 -0
- package/dist/pipeline/measureContentBlock.d.ts.map +1 -1
- package/dist/pipeline/measureContentBlock.js +31 -4
- package/dist/pipeline/measureContentBlock.js.map +1 -1
- package/dist/pipeline/outline.d.ts.map +1 -1
- package/dist/pipeline/outline.js +13 -8
- package/dist/pipeline/outline.js.map +1 -1
- package/dist/pipeline/parts.d.ts +6 -3
- package/dist/pipeline/parts.d.ts.map +1 -1
- package/dist/pipeline/parts.js +28 -5
- package/dist/pipeline/parts.js.map +1 -1
- package/dist/pipeline/placeholders.d.ts +11 -0
- package/dist/pipeline/placeholders.d.ts.map +1 -1
- package/dist/pipeline/placeholders.js +48 -18
- package/dist/pipeline/placeholders.js.map +1 -1
- package/dist/pipeline/placement.d.ts +10 -6
- package/dist/pipeline/placement.d.ts.map +1 -1
- package/dist/pipeline/placement.js +33 -16
- package/dist/pipeline/placement.js.map +1 -1
- package/dist/pipeline/resourceLayout.d.ts +18 -1
- package/dist/pipeline/resourceLayout.d.ts.map +1 -1
- package/dist/pipeline/resourceLayout.js +109 -21
- package/dist/pipeline/resourceLayout.js.map +1 -1
- package/dist/pipeline/toc.d.ts.map +1 -1
- package/dist/pipeline/toc.js +6 -5
- package/dist/pipeline/toc.js.map +1 -1
- package/dist/pipeline/verticalMetrics.d.ts +14 -0
- package/dist/pipeline/verticalMetrics.d.ts.map +1 -0
- package/dist/pipeline/verticalMetrics.js +154 -0
- package/dist/pipeline/verticalMetrics.js.map +1 -0
- package/dist/types.d.ts +344 -13
- package/dist/types.d.ts.map +1 -1
- package/dist/vdt.d.ts +396 -6
- package/dist/vdt.d.ts.map +1 -1
- package/dist/vdt.js +49 -0
- package/dist/vdt.js.map +1 -1
- package/dist/writingMode.d.ts +156 -0
- package/dist/writingMode.d.ts.map +1 -0
- package/dist/writingMode.js +291 -0
- package/dist/writingMode.js.map +1 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NumeralStyle } from './numbering';
|
|
1
|
+
import type { EastAsianNumeralStyle, NumeralStyle } from './numbering';
|
|
2
2
|
/** @deprecated Legacy content-model resource used by the VDT renderer
|
|
3
3
|
* (`VDTBlock.resource`). The Resources-panel feature uses the newer
|
|
4
4
|
* `Resource` / `ResourceType` model below. Retained until the renderer
|
|
@@ -13,8 +13,9 @@ export interface PostextResource {
|
|
|
13
13
|
width?: number;
|
|
14
14
|
height?: number;
|
|
15
15
|
}
|
|
16
|
-
/** How a counter renders for a given resource type.
|
|
17
|
-
|
|
16
|
+
/** How a counter renders for a given resource type. The East Asian styles
|
|
17
|
+
* keep their CSS names (`simp-chinese-informal`, `circled-decimal`…). */
|
|
18
|
+
export type ResourceCounterFormat = 'decimal' | 'roman-lower' | 'roman-upper' | 'alpha-lower' | 'alpha-upper' | EastAsianNumeralStyle;
|
|
18
19
|
/** When the per-type counter resets back to its starting value. `'never'`
|
|
19
20
|
* yields a single document-wide running count; `'h1'..'h6'` resets the
|
|
20
21
|
* counter whenever a heading of that level is encountered. */
|
|
@@ -464,8 +465,11 @@ export interface PageMargins {
|
|
|
464
465
|
right?: Dimension;
|
|
465
466
|
/** Mirrored (facing-page) margins: `left` is the inner margin and `right`
|
|
466
467
|
* the outer one. Odd pages (page 1 = odd) keep them as written; even
|
|
467
|
-
* pages swap them so the inner margin always faces the spine.
|
|
468
|
-
* `
|
|
468
|
+
* pages swap them so the inner margin always faces the spine. In a
|
|
469
|
+
* right-bound book (`page.binding`) it is the other way round: the
|
|
470
|
+
* recto (odd) is the left page of the spread, its spine on its right,
|
|
471
|
+
* so odd pages swap and even pages keep the margins as written — `left`
|
|
472
|
+
* is still the inner margin. Default `false`. */
|
|
469
473
|
mirror?: boolean;
|
|
470
474
|
}
|
|
471
475
|
/** The baseline grid: lines one body line height apart from the top of
|
|
@@ -500,7 +504,7 @@ export interface CutLinesConfig {
|
|
|
500
504
|
* separation), so they print on every plate. Default black. */
|
|
501
505
|
color?: ColorValue;
|
|
502
506
|
}
|
|
503
|
-
export type PageNumberFormat = 'decimal' | 'lower-roman' | 'upper-roman' | 'lower-alpha' | 'upper-alpha';
|
|
507
|
+
export type PageNumberFormat = 'decimal' | 'lower-roman' | 'upper-roman' | 'lower-alpha' | 'upper-alpha' | EastAsianNumeralStyle;
|
|
504
508
|
export interface PageNumberingConfig {
|
|
505
509
|
/** Format for page labels. Default: `'decimal'`. The list and resource
|
|
506
510
|
* spellings of a format are read too (`'arabic'`, `'roman-lower'`,
|
|
@@ -516,6 +520,8 @@ export interface ResolvedPageNumberingConfig {
|
|
|
516
520
|
format: PageNumberFormat;
|
|
517
521
|
startAt: number;
|
|
518
522
|
}
|
|
523
|
+
/** The edge a book is bound on (see `PageConfig.binding`). */
|
|
524
|
+
export type PageBinding = 'auto' | 'left' | 'right';
|
|
519
525
|
export interface PageConfig {
|
|
520
526
|
backgroundColor?: ColorValue;
|
|
521
527
|
sizePreset?: PageSizePreset;
|
|
@@ -526,6 +532,16 @@ export interface PageConfig {
|
|
|
526
532
|
cutLines?: CutLinesConfig;
|
|
527
533
|
baselineGrid?: BaselineGridConfig;
|
|
528
534
|
pageNumbering?: PageNumberingConfig;
|
|
535
|
+
/** The edge the book is bound on. `'left'`: pages turn right to left, as
|
|
536
|
+
* in any Western book. `'right'`: the book is bound on its right edge,
|
|
537
|
+
* as vertical Chinese and Japanese books are (clreq §7.1.1.1): page 1 is
|
|
538
|
+
* still the recto (odd), but it is the LEFT page of a spread, its inner
|
|
539
|
+
* margin is on its right, and viewers show the pairs `[3 | 2]`. With
|
|
540
|
+
* mirrored margins the recto therefore swaps `left` and `right`: `left`
|
|
541
|
+
* stays the inner margin. `'auto'` (the default) is `'right'` when
|
|
542
|
+
* `layout.writingMode` is `'vertical-rl'`, else `'left'`. Book-level:
|
|
543
|
+
* a heading style's own `layout` never changes it. */
|
|
544
|
+
binding?: PageBinding;
|
|
529
545
|
}
|
|
530
546
|
export interface ResolvedPageConfig {
|
|
531
547
|
backgroundColor: ColorValue;
|
|
@@ -548,8 +564,12 @@ export interface ResolvedPageConfig {
|
|
|
548
564
|
lineWidth: Dimension;
|
|
549
565
|
};
|
|
550
566
|
pageNumbering: ResolvedPageNumberingConfig;
|
|
567
|
+
/** `binding` resolved: `'auto'` is `'right'` in a vertical document. */
|
|
568
|
+
binding: 'left' | 'right';
|
|
551
569
|
}
|
|
552
570
|
export type LayoutType = 'single' | 'double' | 'oneAndHalf';
|
|
571
|
+
/** The direction lines run in (see `LayoutConfig.writingMode`). */
|
|
572
|
+
export type WritingMode = 'horizontal-tb' | 'vertical-rl';
|
|
553
573
|
/** What the narrow column of a `oneAndHalf` layout carries. `'text'` (the
|
|
554
574
|
* default): body text flows into it after the main column, as into any
|
|
555
575
|
* column. `'floats'`: it is a side channel that never takes body text —
|
|
@@ -631,6 +651,17 @@ export interface LayoutConfig {
|
|
|
631
651
|
* by an earlier version is read with 1 when its chapters hold a box (see
|
|
632
652
|
* `migrateConfig` in `postext/bundle`). */
|
|
633
653
|
boxChildSplitMinLines?: number;
|
|
654
|
+
/** How lines run. `'horizontal-tb'` (the default): left to right, lines
|
|
655
|
+
* stacked top to bottom. `'vertical-rl'`: Chinese and Japanese vertical
|
|
656
|
+
* setting — characters top to bottom, lines advancing right to left
|
|
657
|
+
* (clreq §2.1.2). The flow is laid out as a horizontal page turned a
|
|
658
|
+
* quarter turn clockwise: columns become tiers (栏) stacked top to
|
|
659
|
+
* bottom, a top float sits at the right edge where reading starts,
|
|
660
|
+
* footnotes at the left end of each tier. Figures, tables and images stay
|
|
661
|
+
* upright; running heads, folios, crop marks and the page background stay
|
|
662
|
+
* physical. See `VDTPage.flow`. A heading style's `layout` inherits the
|
|
663
|
+
* document's writing mode unless it sets its own. */
|
|
664
|
+
writingMode?: WritingMode;
|
|
634
665
|
}
|
|
635
666
|
/** Where an inline resource keeps the float gap (see
|
|
636
667
|
* `LayoutConfig.inlineResourceGap`). */
|
|
@@ -651,6 +682,7 @@ export interface ResolvedLayoutConfig {
|
|
|
651
682
|
inlineResourceGap: InlineResourceGap;
|
|
652
683
|
inlineResourceGapInBoxes: boolean;
|
|
653
684
|
boxChildSplitMinLines: number;
|
|
685
|
+
writingMode: WritingMode;
|
|
654
686
|
}
|
|
655
687
|
export type TextAlign = 'left' | 'justify' | 'center' | 'right';
|
|
656
688
|
export type HyphenationLocale = 'en-us' | 'es' | 'fr' | 'de' | 'it' | 'pt' | 'ca' | 'nl';
|
|
@@ -860,7 +892,10 @@ export interface BodyTextConfig {
|
|
|
860
892
|
/** When true, discourage paragraphs from ending with a very short last line
|
|
861
893
|
* (a "runt" — e.g. a single short word alone). Soft (Knuth-Plass penalty),
|
|
862
894
|
* so ragged text takes it only when `optimalRagged` breaks it with
|
|
863
|
-
* Knuth–Plass.
|
|
895
|
+
* Knuth–Plass. A Chinese, Japanese or Korean paragraph does not end on a
|
|
896
|
+
* line holding one character, alone or with its closing marks (孤字): the
|
|
897
|
+
* line above gives it its last character when that line can still be
|
|
898
|
+
* justified within the tracking cap. Default true. */
|
|
864
899
|
avoidRunts?: boolean;
|
|
865
900
|
/** Approximate minimum character count for the last line of a paragraph.
|
|
866
901
|
* Interpreted internally as `runtMinCharacters * normalSpaceWidth` pixels, so
|
|
@@ -1230,6 +1265,15 @@ export interface CaptionStyleConfig {
|
|
|
1230
1265
|
padding?: Dimension;
|
|
1231
1266
|
/** Styling of the optional resource note (`Resource.note`). */
|
|
1232
1267
|
note?: CaptionNoteStyleConfig;
|
|
1268
|
+
/** What stands between the label and the number: in the caption
|
|
1269
|
+
* ("Figure 1.7") and in an inline `:ref` ("Fig. 1.7"). Default a no-break
|
|
1270
|
+
* space (U+00A0); `''` sets them solid, as Chinese does (图1-1). */
|
|
1271
|
+
labelNumberGap?: string;
|
|
1272
|
+
/** What follows the number in the caption, before the description.
|
|
1273
|
+
* Default `'. '` ("Figure 1.7. A caption"); Chinese sets an ideographic
|
|
1274
|
+
* space (`' '`: 图1-1 标题). A label without a number keeps its own rule
|
|
1275
|
+
* (a stop unless the prefix ends in one). */
|
|
1276
|
+
labelSeparator?: string;
|
|
1233
1277
|
}
|
|
1234
1278
|
export interface ResolvedCaptionStyleConfig {
|
|
1235
1279
|
fontFamily: string;
|
|
@@ -1246,6 +1290,8 @@ export interface ResolvedCaptionStyleConfig {
|
|
|
1246
1290
|
background: ColorValue;
|
|
1247
1291
|
padding: Dimension;
|
|
1248
1292
|
note: ResolvedCaptionNoteStyleConfig;
|
|
1293
|
+
labelNumberGap: string;
|
|
1294
|
+
labelSeparator: string;
|
|
1249
1295
|
}
|
|
1250
1296
|
/** Styling for embedded SVG diagrams (`kind: 'svg'` resources). When
|
|
1251
1297
|
* {@link singleInk} is on, every colour in the SVG is remapped to a tint of
|
|
@@ -2027,6 +2073,14 @@ export interface HeadingLevelConfig {
|
|
|
2027
2073
|
* with `{1:words}` / `{1:ordinal}` — see `numberingTemplate` in the
|
|
2028
2074
|
* configuration docs). Default `''`: no number. */
|
|
2029
2075
|
numberingTemplate?: string;
|
|
2076
|
+
/** What stands between the number and the title (`第一回` + `' '` +
|
|
2077
|
+
* `甄士隱夢幻識通靈`): in the column, in the default opener of a
|
|
2078
|
+
* `span: 'page'` level, in the running heads that print the heading
|
|
2079
|
+
* line and in the PDF bookmarks; level 1's also joins a part's number
|
|
2080
|
+
* and title in the default part page and contents row. Default `' '`;
|
|
2081
|
+
* Chinese sets U+3000 (`' '`) or nothing (`''`). The contents keep
|
|
2082
|
+
* their own number column (`toc.levels[].numberGap`). */
|
|
2083
|
+
numberSeparator?: string;
|
|
2030
2084
|
italic?: boolean;
|
|
2031
2085
|
/** Tracking after every glyph of the heading (spaces and the numbering
|
|
2032
2086
|
* prefix included), as CSS `letter-spacing`: positive spreads the
|
|
@@ -2083,6 +2137,8 @@ export interface ResolvedHeadingLevelConfig {
|
|
|
2083
2137
|
marginTop: Dimension;
|
|
2084
2138
|
marginBottom: Dimension;
|
|
2085
2139
|
numberingTemplate: string;
|
|
2140
|
+
/** The level's own separator, else `' '`. */
|
|
2141
|
+
numberSeparator: string;
|
|
2086
2142
|
italic: boolean;
|
|
2087
2143
|
/** The level's own tracking, else `0`. */
|
|
2088
2144
|
letterSpacing: Dimension;
|
|
@@ -2344,11 +2400,13 @@ export interface ResolvedUnorderedListsConfig {
|
|
|
2344
2400
|
/** Undefined => inherit body text color at render time. */
|
|
2345
2401
|
taskCompletedColor?: ColorValue;
|
|
2346
2402
|
}
|
|
2347
|
-
export type OrderedListNumberFormat = 'arabic' | 'lower-alpha' | 'upper-alpha' | 'lower-roman' | 'upper-roman';
|
|
2403
|
+
export type OrderedListNumberFormat = 'arabic' | 'lower-alpha' | 'upper-alpha' | 'lower-roman' | 'upper-roman' | EastAsianNumeralStyle;
|
|
2348
2404
|
export interface OrderedListLevelConfig {
|
|
2349
2405
|
level: number;
|
|
2350
2406
|
/** Number style of this level (see `OrderedListsConfig.numberFormat`). */
|
|
2351
2407
|
numberFormat?: OrderedListNumberFormat;
|
|
2408
|
+
/** Text before this level's number (see `OrderedListsConfig.prefix`). */
|
|
2409
|
+
prefix?: string;
|
|
2352
2410
|
separator?: string;
|
|
2353
2411
|
fontFamily?: string;
|
|
2354
2412
|
fontSize?: Dimension;
|
|
@@ -2368,6 +2426,7 @@ export interface OrderedListLevelConfig {
|
|
|
2368
2426
|
export interface ResolvedOrderedListLevelConfig {
|
|
2369
2427
|
level: number;
|
|
2370
2428
|
numberFormat: OrderedListNumberFormat;
|
|
2429
|
+
prefix: string;
|
|
2371
2430
|
separator: string;
|
|
2372
2431
|
fontFamily: string;
|
|
2373
2432
|
fontSize: Dimension;
|
|
@@ -2393,6 +2452,10 @@ export interface OrderedListsConfig {
|
|
|
2393
2452
|
* `parseNumberFormat`) and resolve to the list spelling; an unknown
|
|
2394
2453
|
* value numbers in arabic and is reported by `collectConfigWarnings`. */
|
|
2395
2454
|
numberFormat?: OrderedListNumberFormat;
|
|
2455
|
+
/** Text set before the number, styled like the separator: with
|
|
2456
|
+
* `prefix: '('` and `separator: ')'` a Chinese list reads (一)(二).
|
|
2457
|
+
* Default `''`. A level may set its own. */
|
|
2458
|
+
prefix?: string;
|
|
2396
2459
|
separator?: string;
|
|
2397
2460
|
numberFontSize?: Dimension;
|
|
2398
2461
|
gap?: Dimension;
|
|
@@ -2439,6 +2502,7 @@ export interface ResolvedOrderedListsConfig {
|
|
|
2439
2502
|
fontWeight: number;
|
|
2440
2503
|
italic: boolean;
|
|
2441
2504
|
numberFormat: OrderedListNumberFormat;
|
|
2505
|
+
prefix: string;
|
|
2442
2506
|
separator: string;
|
|
2443
2507
|
numberFontSize: Dimension;
|
|
2444
2508
|
gap: Dimension;
|
|
@@ -2672,6 +2736,224 @@ export interface ResolvedFootnotesConfig {
|
|
|
2672
2736
|
spaceBelowRule: Dimension;
|
|
2673
2737
|
separator: ResolvedFootnoteSeparatorConfig;
|
|
2674
2738
|
}
|
|
2739
|
+
/** The conventions Chinese text follows, after the regions clreq
|
|
2740
|
+
* describes: `mainland` (China and Singapore: simplified characters,
|
|
2741
|
+
* GB/T 15834—2011), `taiwan` and `hongkong` (traditional characters). */
|
|
2742
|
+
export type CjkRegion = 'mainland' | 'taiwan' | 'hongkong';
|
|
2743
|
+
/** How strictly lines of CJK text avoid starting or ending with a mark
|
|
2744
|
+
* (clreq §6.1.1):
|
|
2745
|
+
* - `none`: a line may break between any two characters (Taiwan and Hong
|
|
2746
|
+
* Kong newspapers);
|
|
2747
|
+
* - `basic`: no line starts with a pause or stop mark (、,;:。!?), a
|
|
2748
|
+
* closing bracket or quote, a connector (– ~, a single —), an
|
|
2749
|
+
* interpunct (·) or an iteration mark (々), and none ends with an
|
|
2750
|
+
* opening bracket or quote;
|
|
2751
|
+
* - `gb`: `basic`, and the solidus (/ /) at neither end (GB/T
|
|
2752
|
+
* 15834—2011 §5.1.9);
|
|
2753
|
+
* - `strict`: `gb`, and no line starts with a two-em dash (——) or an
|
|
2754
|
+
* ellipsis (……).
|
|
2755
|
+
* At every level —— and …… never split, a number keeps its signs and its
|
|
2756
|
+
* unit (¥5,999, 50%), a Latin word stays whole unless it is wider than the
|
|
2757
|
+
* line, and a footnote marker stays with the character it follows. */
|
|
2758
|
+
export type CjkLineBreak = 'none' | 'basic' | 'gb' | 'strict';
|
|
2759
|
+
/** East Asian typography: how Chinese, Japanese and Korean text is
|
|
2760
|
+
* composed. Every field is optional; `'auto'` follows the region of the
|
|
2761
|
+
* document language (`locale`). A paragraph is composed this way when it
|
|
2762
|
+
* holds more CJK characters than word spaces; a Latin paragraph quoting a
|
|
2763
|
+
* few characters keeps Knuth–Plass, with a break allowed next to them. */
|
|
2764
|
+
export interface CjkConfig {
|
|
2765
|
+
/** The regional conventions to follow. `'auto'` (the default) reads them
|
|
2766
|
+
* from `locale`: `zh`, `zh-Hans`, `zh-CN` and `zh-SG` → `mainland`;
|
|
2767
|
+
* `zh-Hant` and `zh-TW` → `taiwan`; `zh-HK` and `zh-MO` → `hongkong`;
|
|
2768
|
+
* any other language → `mainland`. */
|
|
2769
|
+
region?: 'auto' | CjkRegion;
|
|
2770
|
+
/** Where lines may break (see {@link CjkLineBreak}). `'auto'` (the
|
|
2771
|
+
* default): `gb` for the mainland, `basic` for Taiwan and Hong Kong. */
|
|
2772
|
+
lineBreak?: 'auto' | CjkLineBreak;
|
|
2773
|
+
/** How wide the full-width marks are set (see
|
|
2774
|
+
* {@link CjkPunctuationWidth}). `'auto'` (the default): `kaiming` for
|
|
2775
|
+
* the mainland, `fullwidth` for Taiwan and Hong Kong. */
|
|
2776
|
+
punctuationWidth?: 'auto' | CjkPunctuationWidth;
|
|
2777
|
+
/** Two marks that meet (`。」`, `》(`, `:“`) give up the half em of
|
|
2778
|
+
* blank between them, so the pair takes 1.5 em instead of 2 (clreq
|
|
2779
|
+
* §6.3.2.2). `'auto'` (the default): on for the mainland and Hong
|
|
2780
|
+
* Kong, off for Taiwan. */
|
|
2781
|
+
compressAdjacent?: 'auto' | boolean;
|
|
2782
|
+
/** An opening bracket or quote that starts a line gives up its leading
|
|
2783
|
+
* half em, so its ink lines up with the text edge, and a closing one
|
|
2784
|
+
* that ends a line its trailing half (clreq §6.3.2.3). `'auto'` (the
|
|
2785
|
+
* default): on for the mainland and Hong Kong, off for Taiwan. */
|
|
2786
|
+
trimLineStart?: 'auto' | boolean;
|
|
2787
|
+
/** Whether a pause or stop mark may hang past the end of the line
|
|
2788
|
+
* (clreq §6.1.3). `'none'` (the default): never. `'allow'`: one of
|
|
2789
|
+
* 、,。. (on the mainland also ;:?!) hangs when it would otherwise
|
|
2790
|
+
* open the next line and compressing the line cannot take it in; never
|
|
2791
|
+
* in horizontal Taiwan and Hong Kong text. `'force'`: such a mark hangs
|
|
2792
|
+
* whenever it ends a line (but the paragraph's last). Never after or
|
|
2793
|
+
* before another mark. */
|
|
2794
|
+
hangingPunctuation?: CjkHangingPunctuation;
|
|
2795
|
+
/** The space set between a Han character (or kana) and a Latin letter or
|
|
2796
|
+
* a European digit next to it (`用 iPhone 拍照`), in em of the CJK
|
|
2797
|
+
* text's size or any length. Default `{ value: 0.25, unit: 'em' }`; `0`
|
|
2798
|
+
* turns it off. None at a line start or end, none next to a Chinese
|
|
2799
|
+
* mark or inside Chinese brackets; a space the author typed there is
|
|
2800
|
+
* replaced, not added to. On a justified line it grows up to ½ em
|
|
2801
|
+
* before characters are spread, and shrinks down to ⅛ em when the line
|
|
2802
|
+
* takes one more character. */
|
|
2803
|
+
latinSpacing?: Dimension;
|
|
2804
|
+
/** Tate-chu-yoko (縱中橫) in vertical text: a number of at most this many
|
|
2805
|
+
* ASCII digits is set side by side in one upright cell (`2026年9月28日`:
|
|
2806
|
+
* `9` and `28` upright, `2026` sideways). `0` turns it off; default
|
|
2807
|
+
* `2`. The whole number or none of it: under `2` a three-digit number
|
|
2808
|
+
* stays sideways. A number touching a Latin letter (`A4`, `mp3`) or
|
|
2809
|
+
* written with a decimal point or digit grouping (`3.14`, `10,000`)
|
|
2810
|
+
* stays sideways. `:tcy[…]`, `:upright[…]` and `:sideways[…]` set a
|
|
2811
|
+
* run apart by hand. No effect in horizontal text. */
|
|
2812
|
+
uprightDigits?: 0 | 2 | 3 | 4;
|
|
2813
|
+
/** The character grid (字格): a type area authored in characters per line
|
|
2814
|
+
* and lines per page (see {@link CjkGridConfig}). Off by default. */
|
|
2815
|
+
grid?: CjkGridConfig;
|
|
2816
|
+
/** What Markdown emphasis (`*…*`) does to Chinese characters: `'dots'`
|
|
2817
|
+
* sets emphasis dots (着重号) under them, as `:dots[…]` does, and Latin
|
|
2818
|
+
* letters inside the same emphasis keep their italics; `'italic'` slants
|
|
2819
|
+
* them as any text (a CJK face has no italic, so the slant is
|
|
2820
|
+
* synthesised). `'auto'` (the default): `'dots'` when the document
|
|
2821
|
+
* language (`locale`) is Chinese, `'italic'` otherwise (#193). */
|
|
2822
|
+
emphasis?: 'auto' | CjkEmphasis;
|
|
2823
|
+
/** What a book title marked `:book[…]` prints (#193): `'brackets'` sets
|
|
2824
|
+
* 《》 around it (〈〉 for a title inside another), as text the lines
|
|
2825
|
+
* are broken with; `'wavy'` draws the wavy book-title line (书名号甲式)
|
|
2826
|
+
* under it (left of it in vertical text); `'none'` prints the bare
|
|
2827
|
+
* title. `'auto'` (the default): brackets for the mainland, the wavy
|
|
2828
|
+
* line for Taiwan and Hong Kong (`region`). */
|
|
2829
|
+
bookTitleMark?: 'auto' | CjkBookTitleMark;
|
|
2830
|
+
/** Colour of the emphasis dots and of the proper-name and book-title
|
|
2831
|
+
* lines. Unset: the colour of the text they mark (#193). The default of
|
|
2832
|
+
* the ruby and warichu colours too. */
|
|
2833
|
+
annotationColor?: ColorValue;
|
|
2834
|
+
/** Ruby: how readings (pinyin, zhuyin) set with `:ruby[…]{rt="…"}` or
|
|
2835
|
+
* `{紅樓|hóng|lóu}` look (see {@link CjkRubyConfig}, #194). */
|
|
2836
|
+
ruby?: CjkRubyConfig;
|
|
2837
|
+
/** Warichu (双行夹注): how the two-row notes of `:warichu[…]` look (see
|
|
2838
|
+
* {@link CjkWarichuConfig}, #195). */
|
|
2839
|
+
warichu?: CjkWarichuConfig;
|
|
2840
|
+
}
|
|
2841
|
+
/** See {@link CjkConfig.emphasis}. */
|
|
2842
|
+
export type CjkEmphasis = 'italic' | 'dots';
|
|
2843
|
+
/** See {@link CjkConfig.bookTitleMark}. */
|
|
2844
|
+
export type CjkBookTitleMark = 'brackets' | 'wavy' | 'none';
|
|
2845
|
+
/** Where a ruby reading goes: over the base (in vertical text: to its
|
|
2846
|
+
* right), under it (to its left), or right of each character inside the
|
|
2847
|
+
* line (zhuyin in horizontal text; the same as `over` in vertical text). */
|
|
2848
|
+
export type CjkRubyPosition = 'over' | 'under' | 'right';
|
|
2849
|
+
/** `cjk.ruby`: the look of ruby readings. Readings live in the line gap,
|
|
2850
|
+
* whose height never changes: a paragraph with readings over or under it
|
|
2851
|
+
* needs a line height of at least its size plus the reading's
|
|
2852
|
+
* (`rubyExceedsLeading` reports one that is tighter). */
|
|
2853
|
+
export interface CjkRubyConfig {
|
|
2854
|
+
/** Face of the readings. Unset: the text's own face. Pinyin often reads
|
|
2855
|
+
* better in a sans face with a single-storey a and g. */
|
|
2856
|
+
fontFamily?: string;
|
|
2857
|
+
/** Size of the readings, in em of the text they annotate (or any
|
|
2858
|
+
* length). Default `{ value: 0.5, unit: 'em' }`. Zhuyin is set at 60 %
|
|
2859
|
+
* of it (0.3 em by default), as clreq asks. */
|
|
2860
|
+
fontSize?: Dimension;
|
|
2861
|
+
/** Colour of the readings. Unset: `cjk.annotationColor`, else the text
|
|
2862
|
+
* colour. */
|
|
2863
|
+
color?: ColorValue;
|
|
2864
|
+
/** Where readings go when `pos` does not say (see
|
|
2865
|
+
* {@link CjkRubyPosition}). `'auto'` (the default): zhuyin (bopomofo)
|
|
2866
|
+
* right of each character, anything else (pinyin) over the base in
|
|
2867
|
+
* horizontal text and right of it in vertical text. */
|
|
2868
|
+
position?: 'auto' | CjkRubyPosition;
|
|
2869
|
+
}
|
|
2870
|
+
/** `cjk.warichu`: the look of warichu notes (双行夹注). */
|
|
2871
|
+
export interface CjkWarichuConfig {
|
|
2872
|
+
/** Size of the note's characters, in em of the text (or any length);
|
|
2873
|
+
* the two rows together take the line's em. Default
|
|
2874
|
+
* `{ value: 0.5, unit: 'em' }`. */
|
|
2875
|
+
fontSize?: Dimension;
|
|
2876
|
+
/** Colour of the notes and their brackets (a commentary set in
|
|
2877
|
+
* vermilion). Unset: `cjk.annotationColor`, else the text colour. */
|
|
2878
|
+
color?: ColorValue;
|
|
2879
|
+
/** Brackets set at the text size before the first row and after the
|
|
2880
|
+
* last one (`〔` `〕`, `(` `)`). Default: none. A note's own
|
|
2881
|
+
* `open` / `close` attributes win. */
|
|
2882
|
+
open?: string;
|
|
2883
|
+
close?: string;
|
|
2884
|
+
}
|
|
2885
|
+
export interface ResolvedCjkRubyConfig {
|
|
2886
|
+
fontFamily?: string;
|
|
2887
|
+
fontSize: Dimension;
|
|
2888
|
+
color?: ColorValue;
|
|
2889
|
+
position: 'auto' | CjkRubyPosition;
|
|
2890
|
+
}
|
|
2891
|
+
export interface ResolvedCjkWarichuConfig {
|
|
2892
|
+
fontSize: Dimension;
|
|
2893
|
+
color?: ColorValue;
|
|
2894
|
+
open: string;
|
|
2895
|
+
close: string;
|
|
2896
|
+
}
|
|
2897
|
+
/** Punctuation width styles (clreq §6.3.2.1): each full-width mark is
|
|
2898
|
+
* half a glyph and half an em of blank that may be set or removed.
|
|
2899
|
+
* - `fullwidth` (全角式): every mark one em; only a pair of adjacent marks
|
|
2900
|
+
* (`compressAdjacent`) and a bracket at a line edge (`trimLineStart`)
|
|
2901
|
+
* lose blank;
|
|
2902
|
+
* - `kaiming` (开明式): 。?! one em (half at a line end), ,、;:,
|
|
2903
|
+
* brackets and quotes half an em;
|
|
2904
|
+
* - `lineEndHalf` (行末半角): one em inside the line, half at its end
|
|
2905
|
+
* (GB/T 15834—2011 §5.1.10 read literally);
|
|
2906
|
+
* - `halfwidth` (半角式): every mark half an em (dictionaries).
|
|
2907
|
+
* Marks set in the middle of their box (Taiwan, Hong Kong: 。,、;:) lose
|
|
2908
|
+
* a quarter em on each side; ?! stay one em in horizontal Taiwan and
|
|
2909
|
+
* Hong Kong text. */
|
|
2910
|
+
export type CjkPunctuationWidth = 'fullwidth' | 'kaiming' | 'lineEndHalf' | 'halfwidth';
|
|
2911
|
+
/** See {@link CjkConfig.hangingPunctuation}. */
|
|
2912
|
+
export type CjkHangingPunctuation = 'none' | 'allow' | 'force';
|
|
2913
|
+
/** The character grid of `cjk.grid`: the type area is derived from the
|
|
2914
|
+
* body size, not authored as margins. Each column is `charsPerLine` ems
|
|
2915
|
+
* wide and holds `linesPerPage` lines of the body's line height; with two
|
|
2916
|
+
* columns the gutter is rounded to a whole number of ems (at least one).
|
|
2917
|
+
* The grid is centred inside the configured margins, which act as
|
|
2918
|
+
* minimums; a grid that does not fit is reduced to what fits and reported
|
|
2919
|
+
* (`cjkGridClamped`). In vertical text (`layout.writingMode:
|
|
2920
|
+
* 'vertical-rl'`) characters run down the page and lines across it. */
|
|
2921
|
+
export interface CjkGridConfig {
|
|
2922
|
+
/** Default `false`. */
|
|
2923
|
+
enabled?: boolean;
|
|
2924
|
+
/** Characters per line of one column. Unset: as many as the margins
|
|
2925
|
+
* leave room for. */
|
|
2926
|
+
charsPerLine?: number;
|
|
2927
|
+
/** Lines per column. Unset: as many as the margins leave room for. */
|
|
2928
|
+
linesPerPage?: number;
|
|
2929
|
+
/** Draw the grid (稿纸) over the type area on screen. Default `false`. */
|
|
2930
|
+
show?: boolean;
|
|
2931
|
+
}
|
|
2932
|
+
export interface ResolvedCjkGridConfig {
|
|
2933
|
+
enabled: boolean;
|
|
2934
|
+
/** The characters per line in use (after the pre-pass: what the
|
|
2935
|
+
* margins leave room for when unset or too many); 0 when off. */
|
|
2936
|
+
charsPerLine: number;
|
|
2937
|
+
/** The lines per column in use; 0 when off. */
|
|
2938
|
+
linesPerPage: number;
|
|
2939
|
+
show: boolean;
|
|
2940
|
+
}
|
|
2941
|
+
export interface ResolvedCjkConfig {
|
|
2942
|
+
region: CjkRegion;
|
|
2943
|
+
lineBreak: CjkLineBreak;
|
|
2944
|
+
punctuationWidth: CjkPunctuationWidth;
|
|
2945
|
+
compressAdjacent: boolean;
|
|
2946
|
+
trimLineStart: boolean;
|
|
2947
|
+
hangingPunctuation: CjkHangingPunctuation;
|
|
2948
|
+
latinSpacing: Dimension;
|
|
2949
|
+
uprightDigits: 0 | 2 | 3 | 4;
|
|
2950
|
+
grid: ResolvedCjkGridConfig;
|
|
2951
|
+
emphasis: CjkEmphasis;
|
|
2952
|
+
bookTitleMark: CjkBookTitleMark;
|
|
2953
|
+
annotationColor?: ColorValue;
|
|
2954
|
+
ruby: ResolvedCjkRubyConfig;
|
|
2955
|
+
warichu: ResolvedCjkWarichuConfig;
|
|
2956
|
+
}
|
|
2675
2957
|
export type PdfColorSpace = 'rgb' | 'cmyk' | 'grayscale';
|
|
2676
2958
|
/** How postext-pdf writes the file. Layout ignores it; the VDT carries it
|
|
2677
2959
|
* (`doc.config.pdfGeneration`), and `renderToPdf` takes each setting from
|
|
@@ -2750,8 +3032,14 @@ export interface ElementAnchor {
|
|
|
2750
3032
|
* enabled, otherwise the trim box) or `'#elementId'` — a reference to
|
|
2751
3033
|
* another element in the slot. Page/bleed anchoring also makes that frame
|
|
2752
3034
|
* the reference for `size: 'fill'` and auto-width clamping, so a band can
|
|
2753
|
-
* run edge to edge regardless of the page margins.
|
|
2754
|
-
|
|
3035
|
+
* run edge to edge regardless of the page margins. `'outer'` (header
|
|
3036
|
+
* and footer only) is the outer margin of the page — between the type
|
|
3037
|
+
* area and the trim edge on the side away from the spine, from the type
|
|
3038
|
+
* area's head to its foot — on the right of a recto and the left of a
|
|
3039
|
+
* verso in a left-bound book, the other way round in a right-bound one
|
|
3040
|
+
* (`page.binding`), so one element serves both pages of a spread: a
|
|
3041
|
+
* running head down the fore-edge. Elsewhere it reads as `'container'`. */
|
|
3042
|
+
to: 'container' | 'page' | 'bleed' | 'outer' | `#${string}`;
|
|
2755
3043
|
edge: AnchorEdge;
|
|
2756
3044
|
}
|
|
2757
3045
|
export type ElementSize = 'auto' | 'fill' | Dimension;
|
|
@@ -2896,6 +3184,16 @@ export interface DesignTextElement {
|
|
|
2896
3184
|
inlineMarks?: boolean;
|
|
2897
3185
|
/** Outline drawn around the glyphs (see `DesignTextStroke`). */
|
|
2898
3186
|
stroke?: DesignTextStroke;
|
|
3187
|
+
/** `'vertical-rl'`: the text is set vertically, top to bottom, lines
|
|
3188
|
+
* right to left, with the characters upright (a running head down the
|
|
3189
|
+
* fore-edge of a vertical book, a vertical title beside a horizontal
|
|
3190
|
+
* chapter). The element's box stays as placed on the page: its height
|
|
3191
|
+
* is the length of a line, its width the lines side by side; `align`
|
|
3192
|
+
* places the lines along it (`'left'` at the top), `verticalAlign` in
|
|
3193
|
+
* the box across (`'top'` at the right), and `size.maxWidth` caps a
|
|
3194
|
+
* line's length. In the flow of a vertical page text already runs so,
|
|
3195
|
+
* and the setting changes nothing there. Default `'horizontal-tb'`. */
|
|
3196
|
+
writingMode?: 'horizontal-tb' | 'vertical-rl';
|
|
2899
3197
|
}
|
|
2900
3198
|
export interface DesignRuleElement {
|
|
2901
3199
|
kind: 'rule';
|
|
@@ -2954,6 +3252,12 @@ export interface DesignImageElement {
|
|
|
2954
3252
|
* `# Chapter I {style="opener" vignette="log"}`. An id that resolves
|
|
2955
3253
|
* empty or to no resource draws nothing. */
|
|
2956
3254
|
resourceId: string;
|
|
3255
|
+
/** A picture that is decoration only (an ornament, a band): it carries
|
|
3256
|
+
* no alternative text into the output even when its resource has one.
|
|
3257
|
+
* Otherwise the resource's `altText`, else its caption, becomes the
|
|
3258
|
+
* picture's `alt` in HTML and a `Figure` with `/Alt` in a tagged PDF.
|
|
3259
|
+
* Default `false`. */
|
|
3260
|
+
decorative?: boolean;
|
|
2957
3261
|
}
|
|
2958
3262
|
export type DesignElement = DesignTextElement | DesignRuleElement | DesignBoxElement | DesignImageElement;
|
|
2959
3263
|
export interface DesignSlot {
|
|
@@ -3083,7 +3387,7 @@ export interface PartsConfig {
|
|
|
3083
3387
|
* `'bleed'` anchors and container anchors coincide. Purely decorative —
|
|
3084
3388
|
* it never reserves body space; raise `margins.top` to leave room for
|
|
3085
3389
|
* it. When empty, `{number} {titleText}` is synthesised from the H1
|
|
3086
|
-
* typography
|
|
3390
|
+
* typography, joined with the H1's `numberSeparator`. */
|
|
3087
3391
|
design?: DesignSlot;
|
|
3088
3392
|
/** Design of the blank verso that follows a part page (the back of the
|
|
3089
3393
|
* divider leaf). Same container and placeholders as `design`; when
|
|
@@ -3312,8 +3616,9 @@ export interface TocConfig {
|
|
|
3312
3616
|
/** Row design; its container is the row (column width × `height`).
|
|
3313
3617
|
* Placeholders: `{number}`, `{numberRoman}`…, `{titleText}` and
|
|
3314
3618
|
* `{pageNumber}` (the part page's label). Palette-linked colours take
|
|
3315
|
-
* the part's own palette. When empty, `{number} {titleText}`
|
|
3316
|
-
* page number are set in the
|
|
3619
|
+
* the part's own palette. When empty, `{number} {titleText}` (joined
|
|
3620
|
+
* with the H1's `numberSeparator`) and the page number are set in the
|
|
3621
|
+
* level-1 entry typography. */
|
|
3317
3622
|
design?: DesignSlot;
|
|
3318
3623
|
/** Row height; `em` is the body text size. Default `2em`, twice the
|
|
3319
3624
|
* body size (a row one or two body lines tall, depending on the
|
|
@@ -3442,8 +3747,30 @@ export interface IndexConfig {
|
|
|
3442
3747
|
/** Language whose alphabetical order sorts the entries (a BCP 47 tag).
|
|
3443
3748
|
* Default: the document language. */
|
|
3444
3749
|
locale?: string;
|
|
3750
|
+
/** What the group heads are (#182):
|
|
3751
|
+
* - `'letter'`: the first letter of the sort key (up to postext 1.8 the
|
|
3752
|
+
* only grouping);
|
|
3753
|
+
* - `'pinyin'`: an entry starting with a Han character files under the
|
|
3754
|
+
* Latin initial of its pinyin reading (A–Z; 贾宝玉 under J), a Latin
|
|
3755
|
+
* sort key under its letter, after the Han entries (`sort="jia mu"`
|
|
3756
|
+
* ends J); a Han key read as wanted sorts in place (`sort="崇阳"`
|
|
3757
|
+
* for 重阳);
|
|
3758
|
+
* - `'stroke'`: under the stroke count of its first character (一畫,
|
|
3759
|
+
* 二畫 …; 一画 … in Simplified Chinese);
|
|
3760
|
+
* - `'none'`: no heads; symbols, numbers and words are set apart by the
|
|
3761
|
+
* groups' `marginTop` only;
|
|
3762
|
+
* - `'auto'` (default): `'pinyin'` in Simplified Chinese (`zh`,
|
|
3763
|
+
* `zh-Hans`, `zh-CN`), `'stroke'` in Traditional Chinese (`zh-Hant`,
|
|
3764
|
+
* `zh-TW`, `zh-HK`), `'letter'` in any other language.
|
|
3765
|
+
*
|
|
3766
|
+
* The entries sort in the collation the heads come from (a
|
|
3767
|
+
* `zh-Hant` index grouped by pinyin sorts by pinyin). A browser without
|
|
3768
|
+
* Chinese collation data sets a pinyin or stroke index with no heads. */
|
|
3769
|
+
groupBy?: IndexGroupBy;
|
|
3445
3770
|
groups?: IndexGroupsConfig;
|
|
3446
3771
|
}
|
|
3772
|
+
/** See {@link IndexConfig.groupBy}. */
|
|
3773
|
+
export type IndexGroupBy = 'auto' | 'letter' | 'pinyin' | 'stroke' | 'none';
|
|
3447
3774
|
export interface ResolvedIndexConfig {
|
|
3448
3775
|
fontFamily: string;
|
|
3449
3776
|
fontSize: Dimension;
|
|
@@ -3469,6 +3796,7 @@ export interface ResolvedIndexConfig {
|
|
|
3469
3796
|
italic: boolean;
|
|
3470
3797
|
};
|
|
3471
3798
|
locale?: string;
|
|
3799
|
+
groupBy: IndexGroupBy;
|
|
3472
3800
|
groups: {
|
|
3473
3801
|
enabled: boolean;
|
|
3474
3802
|
fontFamily: string;
|
|
@@ -3521,6 +3849,9 @@ export interface PostextConfig {
|
|
|
3521
3849
|
math?: MathConfig;
|
|
3522
3850
|
/** Footnotes (`[^id]` markers and `[^id]: …` definitions). */
|
|
3523
3851
|
footnotes?: FootnotesConfig;
|
|
3852
|
+
/** East Asian typography: line breaking and justification of Chinese,
|
|
3853
|
+
* Japanese and Korean text (see {@link CjkConfig}). */
|
|
3854
|
+
cjk?: CjkConfig;
|
|
3524
3855
|
header?: HeaderFooterSlot;
|
|
3525
3856
|
footer?: HeaderFooterSlot;
|
|
3526
3857
|
/** Document language, a BCP 47 tag (see {@link LocaleTag}). The fallback
|