postext 1.15.1 → 1.16.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/__tests__/arabic/harakatProfile.test.d.ts +2 -0
- package/dist/__tests__/arabic/harakatProfile.test.d.ts.map +1 -0
- package/dist/__tests__/arabic/harakatProfile.test.js +105 -0
- package/dist/__tests__/arabic/harakatProfile.test.js.map +1 -0
- package/dist/__tests__/bundleLocaleAndBytes.test.js +9 -9
- package/dist/__tests__/bundleLocaleAndBytes.test.js.map +1 -1
- package/dist/__tests__/chineseLocale.test.js +10 -5
- package/dist/__tests__/chineseLocale.test.js.map +1 -1
- package/dist/__tests__/cjk/annotationsRender.test.js +5 -2
- package/dist/__tests__/cjk/annotationsRender.test.js.map +1 -1
- package/dist/__tests__/cjk/chipTracking.test.d.ts +2 -0
- package/dist/__tests__/cjk/chipTracking.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/chipTracking.test.js +52 -0
- package/dist/__tests__/cjk/chipTracking.test.js.map +1 -0
- package/dist/__tests__/cjk/japaneseHtml.test.d.ts +2 -0
- package/dist/__tests__/cjk/japaneseHtml.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/japaneseHtml.test.js +163 -0
- package/dist/__tests__/cjk/japaneseHtml.test.js.map +1 -0
- package/dist/__tests__/cjk/japaneseMarks.test.d.ts +2 -0
- package/dist/__tests__/cjk/japaneseMarks.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/japaneseMarks.test.js +289 -0
- package/dist/__tests__/cjk/japaneseMarks.test.js.map +1 -0
- package/dist/__tests__/cjk/japaneseMarksRender.test.d.ts +2 -0
- package/dist/__tests__/cjk/japaneseMarksRender.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/japaneseMarksRender.test.js +161 -0
- package/dist/__tests__/cjk/japaneseMarksRender.test.js.map +1 -0
- package/dist/__tests__/cjk/japaneseRuby.test.d.ts +2 -0
- package/dist/__tests__/cjk/japaneseRuby.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/japaneseRuby.test.js +457 -0
- package/dist/__tests__/cjk/japaneseRuby.test.js.map +1 -0
- package/dist/__tests__/cjk/japaneseSegmentLanguage.test.d.ts +2 -0
- package/dist/__tests__/cjk/japaneseSegmentLanguage.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/japaneseSegmentLanguage.test.js +50 -0
- package/dist/__tests__/cjk/japaneseSegmentLanguage.test.js.map +1 -0
- package/dist/__tests__/cjk/japaneseSpacing.test.d.ts +2 -0
- package/dist/__tests__/cjk/japaneseSpacing.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/japaneseSpacing.test.js +417 -0
- package/dist/__tests__/cjk/japaneseSpacing.test.js.map +1 -0
- package/dist/__tests__/cjk/kanbunKunten.test.d.ts +2 -0
- package/dist/__tests__/cjk/kanbunKunten.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/kanbunKunten.test.js +230 -0
- package/dist/__tests__/cjk/kanbunKunten.test.js.map +1 -0
- package/dist/__tests__/cjk/kanbunKuntenRender.test.d.ts +2 -0
- package/dist/__tests__/cjk/kanbunKuntenRender.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/kanbunKuntenRender.test.js +127 -0
- package/dist/__tests__/cjk/kanbunKuntenRender.test.js.map +1 -0
- package/dist/__tests__/cjk/kinsokuJa.test.d.ts +2 -0
- package/dist/__tests__/cjk/kinsokuJa.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/kinsokuJa.test.js +388 -0
- package/dist/__tests__/cjk/kinsokuJa.test.js.map +1 -0
- package/dist/__tests__/cjk/kinsokuJaBuild.test.d.ts +2 -0
- package/dist/__tests__/cjk/kinsokuJaBuild.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/kinsokuJaBuild.test.js +38 -0
- package/dist/__tests__/cjk/kinsokuJaBuild.test.js.map +1 -0
- package/dist/__tests__/cjk/resourceAnnotations.test.d.ts +2 -0
- package/dist/__tests__/cjk/resourceAnnotations.test.d.ts.map +1 -0
- package/dist/__tests__/cjk/resourceAnnotations.test.js +223 -0
- package/dist/__tests__/cjk/resourceAnnotations.test.js.map +1 -0
- package/dist/__tests__/defaults/cjk.test.js +10 -2
- package/dist/__tests__/defaults/cjk.test.js.map +1 -1
- package/dist/__tests__/exports.test.js +36 -0
- package/dist/__tests__/exports.test.js.map +1 -1
- package/dist/__tests__/headingLetterSpacing.test.js +2 -1
- package/dist/__tests__/headingLetterSpacing.test.js.map +1 -1
- package/dist/__tests__/indexChinese.test.js +1 -1
- package/dist/__tests__/indexJapanese.test.d.ts +2 -0
- package/dist/__tests__/indexJapanese.test.d.ts.map +1 -0
- package/dist/__tests__/indexJapanese.test.js +242 -0
- package/dist/__tests__/indexJapanese.test.js.map +1 -0
- package/dist/__tests__/japaneseHeadings.test.d.ts +2 -0
- package/dist/__tests__/japaneseHeadings.test.d.ts.map +1 -0
- package/dist/__tests__/japaneseHeadings.test.js +319 -0
- package/dist/__tests__/japaneseHeadings.test.js.map +1 -0
- package/dist/__tests__/japaneseLocale.test.d.ts +2 -0
- package/dist/__tests__/japaneseLocale.test.d.ts.map +1 -0
- package/dist/__tests__/japaneseLocale.test.js +201 -0
- package/dist/__tests__/japaneseLocale.test.js.map +1 -0
- package/dist/__tests__/japaneseNotes.test.d.ts +2 -0
- package/dist/__tests__/japaneseNotes.test.d.ts.map +1 -0
- package/dist/__tests__/japaneseNotes.test.js +336 -0
- package/dist/__tests__/japaneseNotes.test.js.map +1 -0
- package/dist/__tests__/japaneseNumbering.test.d.ts +2 -0
- package/dist/__tests__/japaneseNumbering.test.d.ts.map +1 -0
- package/dist/__tests__/japaneseNumbering.test.js +292 -0
- package/dist/__tests__/japaneseNumbering.test.js.map +1 -0
- package/dist/__tests__/pipeline/citationsJapanese.test.d.ts +2 -0
- package/dist/__tests__/pipeline/citationsJapanese.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/citationsJapanese.test.js +110 -0
- package/dist/__tests__/pipeline/citationsJapanese.test.js.map +1 -0
- package/dist/__tests__/pipeline/paragraphStyleFaces.test.js +1 -1
- package/dist/__tests__/pipeline/paragraphStyleFaces.test.js.map +1 -1
- package/dist/__tests__/pipeline/safeArea.test.d.ts +2 -0
- package/dist/__tests__/pipeline/safeArea.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/safeArea.test.js +207 -0
- package/dist/__tests__/pipeline/safeArea.test.js.map +1 -0
- package/dist/__tests__/vertical/compositionPaint.test.js +6 -5
- package/dist/__tests__/vertical/compositionPaint.test.js.map +1 -1
- package/dist/__tests__/vertical/japaneseVertical.test.d.ts +2 -0
- package/dist/__tests__/vertical/japaneseVertical.test.d.ts.map +1 -0
- package/dist/__tests__/vertical/japaneseVertical.test.js +247 -0
- package/dist/__tests__/vertical/japaneseVertical.test.js.map +1 -0
- package/dist/__tests__/vertical/verticalSpans.d.ts +2 -1
- package/dist/__tests__/vertical/verticalSpans.d.ts.map +1 -1
- package/dist/__tests__/vertical/verticalSpans.js +3 -2
- package/dist/__tests__/vertical/verticalSpans.js.map +1 -1
- package/dist/__tests__/video.test.d.ts +2 -0
- package/dist/__tests__/video.test.d.ts.map +1 -0
- package/dist/__tests__/video.test.js +305 -0
- package/dist/__tests__/video.test.js.map +1 -0
- package/dist/arabicMarks.d.ts +11 -1
- package/dist/arabicMarks.d.ts.map +1 -1
- package/dist/arabicMarks.js +72 -5
- package/dist/arabicMarks.js.map +1 -1
- package/dist/bundle/adapters.d.ts +6 -0
- package/dist/bundle/adapters.d.ts.map +1 -1
- package/dist/bundle/adapters.js +30 -0
- package/dist/bundle/adapters.js.map +1 -1
- package/dist/bundle/codec.d.ts.map +1 -1
- package/dist/bundle/codec.js +67 -3
- package/dist/bundle/codec.js.map +1 -1
- package/dist/bundle/index.d.ts +2 -2
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +2 -2
- package/dist/bundle/index.js.map +1 -1
- package/dist/bundle/manifest.d.ts +8 -0
- package/dist/bundle/manifest.d.ts.map +1 -1
- package/dist/bundle/manifest.js +48 -1
- package/dist/bundle/manifest.js.map +1 -1
- package/dist/bundle/types.d.ts +5 -0
- package/dist/bundle/types.d.ts.map +1 -1
- package/dist/bundle/zip.js +1 -1
- package/dist/bundle/zip.js.map +1 -1
- package/dist/canvas-backend/annotations.d.ts +20 -5
- package/dist/canvas-backend/annotations.d.ts.map +1 -1
- package/dist/canvas-backend/annotations.js +59 -6
- package/dist/canvas-backend/annotations.js.map +1 -1
- package/dist/canvas-backend/blockRender.d.ts.map +1 -1
- package/dist/canvas-backend/blockRender.js +29 -3
- package/dist/canvas-backend/blockRender.js.map +1 -1
- package/dist/canvas-backend/renderResourceBlock.d.ts +6 -1
- package/dist/canvas-backend/renderResourceBlock.d.ts.map +1 -1
- package/dist/canvas-backend/renderResourceBlock.js +124 -5
- package/dist/canvas-backend/renderResourceBlock.js.map +1 -1
- package/dist/canvas-backend/verticalText.d.ts +9 -4
- package/dist/canvas-backend/verticalText.d.ts.map +1 -1
- package/dist/canvas-backend/verticalText.js +20 -9
- package/dist/canvas-backend/verticalText.js.map +1 -1
- package/dist/chineseNumerals.d.ts +3 -2
- package/dist/chineseNumerals.d.ts.map +1 -1
- package/dist/chineseNumerals.js +11 -8
- package/dist/chineseNumerals.js.map +1 -1
- package/dist/citations/bibtex.d.ts.map +1 -1
- package/dist/citations/bibtex.js +4 -0
- package/dist/citations/bibtex.js.map +1 -1
- package/dist/citations/data.d.ts.map +1 -1
- package/dist/citations/data.js +6 -1
- package/dist/citations/data.js.map +1 -1
- package/dist/citations/types.d.ts +8 -0
- package/dist/citations/types.d.ts.map +1 -1
- package/dist/cjkMarks.d.ts +23 -14
- package/dist/cjkMarks.d.ts.map +1 -1
- package/dist/cjkMarks.js +251 -49
- package/dist/cjkMarks.js.map +1 -1
- package/dist/configWarnings.js +9 -3
- package/dist/configWarnings.js.map +1 -1
- package/dist/defaults/cjk.d.ts +64 -14
- package/dist/defaults/cjk.d.ts.map +1 -1
- package/dist/defaults/cjk.js +203 -29
- package/dist/defaults/cjk.js.map +1 -1
- package/dist/defaults/footnotes.d.ts +27 -4
- package/dist/defaults/footnotes.d.ts.map +1 -1
- package/dist/defaults/footnotes.js +95 -36
- package/dist/defaults/footnotes.js.map +1 -1
- package/dist/defaults/headings.d.ts +5 -0
- package/dist/defaults/headings.d.ts.map +1 -1
- package/dist/defaults/headings.js +46 -1
- package/dist/defaults/headings.js.map +1 -1
- package/dist/defaults/index.d.ts +3 -2
- package/dist/defaults/index.d.ts.map +1 -1
- package/dist/defaults/index.js +12 -3
- package/dist/defaults/index.js.map +1 -1
- package/dist/defaults/indexConfig.d.ts.map +1 -1
- package/dist/defaults/indexConfig.js +7 -4
- package/dist/defaults/indexConfig.js.map +1 -1
- package/dist/defaults/paragraphStyles.d.ts.map +1 -1
- package/dist/defaults/paragraphStyles.js +4 -0
- package/dist/defaults/paragraphStyles.js.map +1 -1
- package/dist/defaults/resourceTypes.d.ts +16 -3
- package/dist/defaults/resourceTypes.d.ts.map +1 -1
- package/dist/defaults/resourceTypes.js +56 -8
- package/dist/defaults/resourceTypes.js.map +1 -1
- package/dist/defaults/shared.d.ts.map +1 -1
- package/dist/defaults/shared.js +21 -0
- package/dist/defaults/shared.js.map +1 -1
- package/dist/defaults/tableStyle.d.ts.map +1 -1
- package/dist/defaults/tableStyle.js +4 -1
- package/dist/defaults/tableStyle.js.map +1 -1
- package/dist/defaults/videoStyle.d.ts +9 -0
- package/dist/defaults/videoStyle.d.ts.map +1 -0
- package/dist/defaults/videoStyle.js +130 -0
- package/dist/defaults/videoStyle.js.map +1 -0
- package/dist/design/placeholders.d.ts.map +1 -1
- package/dist/design/placeholders.js +5 -3
- package/dist/design/placeholders.js.map +1 -1
- package/dist/html-backend.d.ts +13 -0
- package/dist/html-backend.d.ts.map +1 -1
- package/dist/html-backend.js +233 -26
- package/dist/html-backend.js.map +1 -1
- package/dist/htmlAnnotations.d.ts +47 -9
- package/dist/htmlAnnotations.d.ts.map +1 -1
- package/dist/htmlAnnotations.js +89 -17
- package/dist/htmlAnnotations.js.map +1 -1
- package/dist/index.d.ts +13 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/japaneseNumerals.d.ts +44 -0
- package/dist/japaneseNumerals.d.ts.map +1 -0
- package/dist/japaneseNumerals.js +100 -0
- package/dist/japaneseNumerals.js.map +1 -0
- package/dist/knuthPlass/richAdapter.d.ts +5 -1
- package/dist/knuthPlass/richAdapter.d.ts.map +1 -1
- package/dist/knuthPlass/richAdapter.js +2 -0
- package/dist/knuthPlass/richAdapter.js.map +1 -1
- package/dist/locale.d.ts +19 -12
- package/dist/locale.d.ts.map +1 -1
- package/dist/locale.js +24 -12
- package/dist/locale.js.map +1 -1
- package/dist/measure/cache.d.ts.map +1 -1
- package/dist/measure/cache.js +17 -8
- package/dist/measure/cache.js.map +1 -1
- package/dist/measure/canvas.d.ts +21 -0
- package/dist/measure/canvas.d.ts.map +1 -1
- package/dist/measure/canvas.js +82 -0
- package/dist/measure/canvas.js.map +1 -1
- package/dist/measure/cjk.d.ts +3 -1
- package/dist/measure/cjk.d.ts.map +1 -1
- package/dist/measure/cjk.js +4 -2
- package/dist/measure/cjk.js.map +1 -1
- package/dist/measure/cjkAnnotate.d.ts +62 -3
- package/dist/measure/cjkAnnotate.d.ts.map +1 -1
- package/dist/measure/cjkAnnotate.js +99 -2
- package/dist/measure/cjkAnnotate.js.map +1 -1
- package/dist/measure/cjkClasses.d.ts +93 -13
- package/dist/measure/cjkClasses.d.ts.map +1 -1
- package/dist/measure/cjkClasses.js +204 -14
- package/dist/measure/cjkClasses.js.map +1 -1
- package/dist/measure/cjkCompose.d.ts +10 -4
- package/dist/measure/cjkCompose.d.ts.map +1 -1
- package/dist/measure/cjkCompose.js +715 -75
- package/dist/measure/cjkCompose.js.map +1 -1
- package/dist/measure/cjkPunctuation.d.ts +68 -14
- package/dist/measure/cjkPunctuation.d.ts.map +1 -1
- package/dist/measure/cjkPunctuation.js +96 -21
- package/dist/measure/cjkPunctuation.js.map +1 -1
- package/dist/measure/plain.js +2 -2
- package/dist/measure/plain.js.map +1 -1
- package/dist/measure/rich.d.ts +12 -2
- package/dist/measure/rich.d.ts.map +1 -1
- package/dist/measure/rich.js +46 -8
- package/dist/measure/rich.js.map +1 -1
- package/dist/measure/rubyJis.d.ts +96 -0
- package/dist/measure/rubyJis.d.ts.map +1 -0
- package/dist/measure/rubyJis.js +245 -0
- package/dist/measure/rubyJis.js.map +1 -0
- package/dist/measure/vertical.d.ts +13 -5
- package/dist/measure/vertical.d.ts.map +1 -1
- package/dist/measure/vertical.js +16 -6
- package/dist/measure/vertical.js.map +1 -1
- package/dist/numberWords.d.ts +4 -3
- package/dist/numberWords.d.ts.map +1 -1
- package/dist/numberWords.js +15 -5
- package/dist/numberWords.js.map +1 -1
- package/dist/numbering.d.ts +24 -12
- package/dist/numbering.d.ts.map +1 -1
- package/dist/numbering.js +57 -11
- package/dist/numbering.js.map +1 -1
- package/dist/parse/annotations.d.ts +21 -18
- package/dist/parse/annotations.d.ts.map +1 -1
- package/dist/parse/annotations.js +140 -51
- package/dist/parse/annotations.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/indexMarks.d.ts.map +1 -1
- package/dist/parse/indexMarks.js +42 -0
- package/dist/parse/indexMarks.js.map +1 -1
- package/dist/parse/inlineFormatting.d.ts +4 -3
- package/dist/parse/inlineFormatting.d.ts.map +1 -1
- package/dist/parse/inlineFormatting.js +9 -8
- package/dist/parse/inlineFormatting.js.map +1 -1
- package/dist/parse/types.d.ts +93 -5
- package/dist/parse/types.d.ts.map +1 -1
- package/dist/pipeline/annotations.d.ts +25 -15
- package/dist/pipeline/annotations.d.ts.map +1 -1
- package/dist/pipeline/annotations.js +102 -16
- package/dist/pipeline/annotations.js.map +1 -1
- package/dist/pipeline/build.d.ts.map +1 -1
- package/dist/pipeline/build.js +284 -31
- package/dist/pipeline/build.js.map +1 -1
- package/dist/pipeline/buildBlockKind.js +2 -1
- package/dist/pipeline/buildBlockKind.js.map +1 -1
- package/dist/pipeline/buildHelpers.d.ts +2 -0
- package/dist/pipeline/buildHelpers.d.ts.map +1 -1
- package/dist/pipeline/buildHelpers.js +17 -0
- package/dist/pipeline/buildHelpers.js.map +1 -1
- package/dist/pipeline/buildMeasurement.d.ts +3 -0
- package/dist/pipeline/buildMeasurement.d.ts.map +1 -1
- package/dist/pipeline/buildMeasurement.js +1 -0
- package/dist/pipeline/buildMeasurement.js.map +1 -1
- package/dist/pipeline/calloutLayout.d.ts +2 -0
- package/dist/pipeline/calloutLayout.d.ts.map +1 -1
- package/dist/pipeline/calloutLayout.js +5 -5
- package/dist/pipeline/calloutLayout.js.map +1 -1
- package/dist/pipeline/citations.d.ts +1 -1
- package/dist/pipeline/citations.d.ts.map +1 -1
- package/dist/pipeline/citations.js +15 -7
- package/dist/pipeline/citations.js.map +1 -1
- package/dist/pipeline/columnBalancing.d.ts +22 -0
- package/dist/pipeline/columnBalancing.d.ts.map +1 -1
- package/dist/pipeline/columnBalancing.js +80 -3
- package/dist/pipeline/columnBalancing.js.map +1 -1
- package/dist/pipeline/config.d.ts.map +1 -1
- package/dist/pipeline/config.js +3 -2
- package/dist/pipeline/config.js.map +1 -1
- package/dist/pipeline/contentWarnings.d.ts.map +1 -1
- package/dist/pipeline/contentWarnings.js +19 -0
- package/dist/pipeline/contentWarnings.js.map +1 -1
- package/dist/pipeline/continuation.d.ts.map +1 -1
- package/dist/pipeline/continuation.js +3 -3
- package/dist/pipeline/continuation.js.map +1 -1
- package/dist/pipeline/crossRefs.d.ts.map +1 -1
- package/dist/pipeline/crossRefs.js +3 -0
- package/dist/pipeline/crossRefs.js.map +1 -1
- package/dist/pipeline/footnotes.d.ts +20 -12
- package/dist/pipeline/footnotes.d.ts.map +1 -1
- package/dist/pipeline/footnotes.js +62 -16
- package/dist/pipeline/footnotes.js.map +1 -1
- package/dist/pipeline/headingStyles.js +1 -1
- package/dist/pipeline/headingStyles.js.map +1 -1
- package/dist/pipeline/indexDirective.d.ts.map +1 -1
- package/dist/pipeline/indexDirective.js +89 -12
- package/dist/pipeline/indexDirective.js.map +1 -1
- package/dist/pipeline/indexGroups.d.ts +5 -3
- package/dist/pipeline/indexGroups.d.ts.map +1 -1
- package/dist/pipeline/indexGroups.js +9 -4
- package/dist/pipeline/indexGroups.js.map +1 -1
- package/dist/pipeline/indexJapanese.d.ts +75 -0
- package/dist/pipeline/indexJapanese.d.ts.map +1 -0
- package/dist/pipeline/indexJapanese.js +264 -0
- package/dist/pipeline/indexJapanese.js.map +1 -0
- package/dist/pipeline/lineSpan.d.ts +36 -0
- package/dist/pipeline/lineSpan.d.ts.map +1 -0
- package/dist/pipeline/lineSpan.js +36 -0
- package/dist/pipeline/lineSpan.js.map +1 -0
- package/dist/pipeline/lists.js +2 -2
- package/dist/pipeline/lists.js.map +1 -1
- package/dist/pipeline/measureContentBlock.d.ts +4 -0
- package/dist/pipeline/measureContentBlock.d.ts.map +1 -1
- package/dist/pipeline/measureContentBlock.js +54 -5
- package/dist/pipeline/measureContentBlock.js.map +1 -1
- package/dist/pipeline/outline.d.ts.map +1 -1
- package/dist/pipeline/outline.js +3 -1
- package/dist/pipeline/outline.js.map +1 -1
- package/dist/pipeline/paragraphContainers.d.ts +25 -2
- package/dist/pipeline/paragraphContainers.d.ts.map +1 -1
- package/dist/pipeline/paragraphContainers.js +82 -2
- package/dist/pipeline/paragraphContainers.js.map +1 -1
- package/dist/pipeline/parts.d.ts +2 -2
- package/dist/pipeline/parts.js +3 -3
- package/dist/pipeline/parts.js.map +1 -1
- package/dist/pipeline/placement.d.ts.map +1 -1
- package/dist/pipeline/placement.js +2 -2
- package/dist/pipeline/placement.js.map +1 -1
- package/dist/pipeline/resourceLayout.d.ts +6 -0
- package/dist/pipeline/resourceLayout.d.ts.map +1 -1
- package/dist/pipeline/resourceLayout.js +85 -15
- package/dist/pipeline/resourceLayout.js.map +1 -1
- package/dist/pipeline/resourceNumbering.d.ts +5 -2
- package/dist/pipeline/resourceNumbering.d.ts.map +1 -1
- package/dist/pipeline/resourceNumbering.js +12 -7
- package/dist/pipeline/resourceNumbering.js.map +1 -1
- package/dist/pipeline/safeArea.d.ts +29 -0
- package/dist/pipeline/safeArea.d.ts.map +1 -0
- package/dist/pipeline/safeArea.js +89 -0
- package/dist/pipeline/safeArea.js.map +1 -0
- package/dist/pipeline/styles.d.ts +12 -0
- package/dist/pipeline/styles.d.ts.map +1 -1
- package/dist/pipeline/styles.js +7 -1
- package/dist/pipeline/styles.js.map +1 -1
- package/dist/pipeline/verse.d.ts +3 -0
- package/dist/pipeline/verse.d.ts.map +1 -1
- package/dist/pipeline/verse.js +1 -1
- package/dist/pipeline/verse.js.map +1 -1
- package/dist/pipeline/verticalMetrics.d.ts.map +1 -1
- package/dist/pipeline/verticalMetrics.js +4 -0
- package/dist/pipeline/verticalMetrics.js.map +1 -1
- package/dist/pipeline/videoOverlay.d.ts +24 -0
- package/dist/pipeline/videoOverlay.d.ts.map +1 -0
- package/dist/pipeline/videoOverlay.js +134 -0
- package/dist/pipeline/videoOverlay.js.map +1 -0
- package/dist/types.d.ts +567 -50
- package/dist/types.d.ts.map +1 -1
- package/dist/uprightArabic.js +1 -1
- package/dist/uprightArabic.js.map +1 -1
- package/dist/vdt.d.ts +221 -17
- package/dist/vdt.d.ts.map +1 -1
- package/dist/vdt.js.map +1 -1
- package/dist/video/qr.d.ts +21 -0
- package/dist/video/qr.d.ts.map +1 -0
- package/dist/video/qr.js +326 -0
- package/dist/video/qr.js.map +1 -0
- package/dist/video/url.d.ts +62 -0
- package/dist/video/url.d.ts.map +1 -0
- package/dist/video/url.js +206 -0
- package/dist/video/url.js.map +1 -0
- package/dist/writingMode.d.ts +74 -20
- package/dist/writingMode.d.ts.map +1 -1
- package/dist/writingMode.js +146 -27
- package/dist/writingMode.js.map +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -117,7 +117,93 @@ export interface ResourceType {
|
|
|
117
117
|
captionStyle?: CaptionStyleConfig;
|
|
118
118
|
}
|
|
119
119
|
/** The concrete payload kind a `Resource` carries. */
|
|
120
|
-
export type ResourceKind = 'bitmap' | 'svg' | 'table';
|
|
120
|
+
export type ResourceKind = 'bitmap' | 'svg' | 'table' | 'video';
|
|
121
|
+
/** Where a video resource plays from (#454): a YouTube or Vimeo page, or a
|
|
122
|
+
* self-hosted file (an uploaded MP4 or WebM). */
|
|
123
|
+
export type VideoSource = 'youtube' | 'vimeo' | 'file';
|
|
124
|
+
/** What a video's player offers in the interactive outputs (the HTML viewer,
|
|
125
|
+
* EPUB). Set for the whole book in `videoStyle.player`, and per video in
|
|
126
|
+
* `Resource.video.player` (only the fields set there). The HTML5 player of
|
|
127
|
+
* a self-hosted file honours them all; the YouTube and Vimeo players honour
|
|
128
|
+
* what their embed parameters allow (see each field). */
|
|
129
|
+
export interface VideoPlayerOptions {
|
|
130
|
+
/** Show the player's controls. Default `true`. YouTube, Vimeo and
|
|
131
|
+
* HTML5. */
|
|
132
|
+
controls?: boolean;
|
|
133
|
+
/** Offer the browser's download button (HTML5 only: `controlslist=
|
|
134
|
+
* "nodownload"` when off). Default `true`. It hides the button; it is
|
|
135
|
+
* not copy protection. YouTube and Vimeo never offer a download. */
|
|
136
|
+
download?: boolean;
|
|
137
|
+
/** Offer full screen. Default `true`. YouTube (`fs=0`), Vimeo and HTML5
|
|
138
|
+
* (`nofullscreen`). */
|
|
139
|
+
fullscreen?: boolean;
|
|
140
|
+
/** Offer the playback speed menu. Default `true`. Vimeo (`speed=0`) and
|
|
141
|
+
* HTML5 (`noplaybackrate`, Chromium). */
|
|
142
|
+
playbackRate?: boolean;
|
|
143
|
+
/** Offer picture-in-picture. Default `true`. Vimeo (`pip=0`) and HTML5
|
|
144
|
+
* (`disablepictureinpicture`). */
|
|
145
|
+
pictureInPicture?: boolean;
|
|
146
|
+
/** Offer casting to another screen. Default `true`. HTML5
|
|
147
|
+
* (`disableremoteplayback`). */
|
|
148
|
+
remotePlayback?: boolean;
|
|
149
|
+
/** Start playing on its own (always muted, as browsers require). Default
|
|
150
|
+
* `false`. */
|
|
151
|
+
autoplay?: boolean;
|
|
152
|
+
/** Start muted. Default `false`. */
|
|
153
|
+
muted?: boolean;
|
|
154
|
+
/** Play again from the start at the end. Default `false`. */
|
|
155
|
+
loop?: boolean;
|
|
156
|
+
/** How much of a self-hosted file the browser loads before play:
|
|
157
|
+
* `'none'`, `'metadata'` (the default) or `'auto'`. HTML5 only. */
|
|
158
|
+
preload?: 'none' | 'metadata' | 'auto';
|
|
159
|
+
/** Privacy-enhanced embeds: YouTube from `youtube-nocookie.com`, Vimeo
|
|
160
|
+
* with `dnt=1` (no tracking cookies). Default `true`. */
|
|
161
|
+
privacy?: boolean;
|
|
162
|
+
}
|
|
163
|
+
export type ResolvedVideoPlayerOptions = Required<VideoPlayerOptions>;
|
|
164
|
+
/** The picture printed for a video: a frame of it (the platform's poster
|
|
165
|
+
* for YouTube and Vimeo, a chosen frame of a self-hosted file), stored
|
|
166
|
+
* out-of-band like a bitmap. */
|
|
167
|
+
export interface ResourceVideoPoster {
|
|
168
|
+
fileId: string;
|
|
169
|
+
format: string;
|
|
170
|
+
width: number;
|
|
171
|
+
height: number;
|
|
172
|
+
}
|
|
173
|
+
/** The payload of a `kind: 'video'` resource (#454). */
|
|
174
|
+
export interface ResourceVideo {
|
|
175
|
+
source: VideoSource;
|
|
176
|
+
/** YouTube or Vimeo: the video's address (any watch, short, Shorts or
|
|
177
|
+
* embed link). A self-hosted file: its production address, where the
|
|
178
|
+
* published book finds it — printed in the QR code, linked from the PDF,
|
|
179
|
+
* and played by the HTML and EPUB outputs when the file itself is not
|
|
180
|
+
* available to them. */
|
|
181
|
+
url?: string;
|
|
182
|
+
/** A self-hosted file: the uploaded video, stored out-of-band like a
|
|
183
|
+
* bitmap (part of a `.postext` bundle). */
|
|
184
|
+
fileId?: string;
|
|
185
|
+
/** A self-hosted file's format: `'mp4'` (the default), `'webm'`, `'ogv'`,
|
|
186
|
+
* `'mov'`. */
|
|
187
|
+
format?: string;
|
|
188
|
+
/** Frame size of the video in px, for its aspect ratio when there is no
|
|
189
|
+
* poster. */
|
|
190
|
+
width?: number;
|
|
191
|
+
height?: number;
|
|
192
|
+
/** Length in seconds (informative). */
|
|
193
|
+
duration?: number;
|
|
194
|
+
/** The poster frame. Without one a video is printed as a placeholder box
|
|
195
|
+
* in the video's aspect ratio (16:9 when unknown). */
|
|
196
|
+
poster?: ResourceVideoPoster;
|
|
197
|
+
/** The time in seconds of a self-hosted file's frame used as the poster
|
|
198
|
+
* (informative, kept so the frame can be picked again). */
|
|
199
|
+
posterTime?: number;
|
|
200
|
+
/** Play from `start` to `end` seconds. The printed link starts at
|
|
201
|
+
* `start` too. */
|
|
202
|
+
start?: number;
|
|
203
|
+
end?: number;
|
|
204
|
+
/** Player options of this video, laid over `videoStyle.player`. */
|
|
205
|
+
player?: VideoPlayerOptions;
|
|
206
|
+
}
|
|
121
207
|
/** Horizontal alignment of a table cell's content. */
|
|
122
208
|
export type TableCellAlign = 'left' | 'center' | 'right';
|
|
123
209
|
/** A cell's alignment as a table model writes it: a {@link TableCellAlign},
|
|
@@ -181,6 +267,15 @@ export interface TableModel {
|
|
|
181
267
|
* length, or any non-positive weight falls back to an equal split. */
|
|
182
268
|
columnWidths?: number[];
|
|
183
269
|
}
|
|
270
|
+
/** A rectangle of a picture in fractions of its intrinsic size: `x` and
|
|
271
|
+
* `width` of its width, `y` and `height` of its height (0–1, top-left
|
|
272
|
+
* origin). */
|
|
273
|
+
export interface ResourceSafeArea {
|
|
274
|
+
x: number;
|
|
275
|
+
y: number;
|
|
276
|
+
width: number;
|
|
277
|
+
height: number;
|
|
278
|
+
}
|
|
184
279
|
/** A user-managed resource instance. Binary payloads (bitmaps, SVGs) are
|
|
185
280
|
* stored out-of-band (IndexedDB in the sandbox) and referenced by
|
|
186
281
|
* `fileId`; table resources carry their model inline. */
|
|
@@ -250,6 +345,21 @@ export interface Resource {
|
|
|
250
345
|
* the document. */
|
|
251
346
|
direction?: 'ltr' | 'rtl';
|
|
252
347
|
};
|
|
348
|
+
/** Present when `kind === 'video'`: a YouTube, Vimeo or self-hosted
|
|
349
|
+
* video, placed, captioned and numbered like a picture (its type is
|
|
350
|
+
* usually the built-in `video`, numbered on its own: Video 1.1), printed
|
|
351
|
+
* as its poster with the `videoStyle` overlays and played by the
|
|
352
|
+
* interactive outputs. */
|
|
353
|
+
video?: ResourceVideo;
|
|
354
|
+
/** The safe area of a bitmap or SVG: the rectangle of the picture that
|
|
355
|
+
* holds what matters (a person and part of the landscape). With one, the
|
|
356
|
+
* engine may show the picture at any aspect ratio between the whole
|
|
357
|
+
* picture and this rectangle, cropping what lies outside it, to make the
|
|
358
|
+
* figure taller or shorter where the page needs it (fill a column left
|
|
359
|
+
* short, fit the room left); the outer margins are cropped in proportion
|
|
360
|
+
* to their sizes and the safe area always stays in view. Without one the
|
|
361
|
+
* picture is always shown whole. Ignored for tables. */
|
|
362
|
+
safeArea?: ResourceSafeArea;
|
|
253
363
|
/** Optional per-resource placement override. When unset, the resource's
|
|
254
364
|
* type default (then `top` / `column`) applies. A `position` of `'top'` or
|
|
255
365
|
* `'bottom'` floats the resource to a band on the page near its first
|
|
@@ -313,6 +423,10 @@ export interface OutlineIndexMark {
|
|
|
313
423
|
/** The entry's levels, main term first. */
|
|
314
424
|
path: string[];
|
|
315
425
|
sort?: string;
|
|
426
|
+
/** The reading of the last level (`yomi="…"`), and the kana reading the
|
|
427
|
+
* ruby of the marked text gives it (see {@link IndexMark.rubyYomi}). */
|
|
428
|
+
yomi?: string;
|
|
429
|
+
rubyYomi?: string;
|
|
316
430
|
see?: string;
|
|
317
431
|
seeAlso?: string;
|
|
318
432
|
main?: boolean;
|
|
@@ -530,9 +644,10 @@ export interface CutLinesConfig {
|
|
|
530
644
|
markOffset?: Dimension;
|
|
531
645
|
/** Stroke width of the marks. Default 0.25 pt. */
|
|
532
646
|
markWidth?: Dimension;
|
|
533
|
-
/** Colour of the marks on the canvas
|
|
534
|
-
*
|
|
535
|
-
*
|
|
647
|
+
/** Colour of the marks on the canvas (the screen preview). A PDF
|
|
648
|
+
* always paints them in registration colour (the `/All` separation),
|
|
649
|
+
* whatever its colour space, so they print on every plate. Default
|
|
650
|
+
* black. */
|
|
536
651
|
color?: ColorValue;
|
|
537
652
|
}
|
|
538
653
|
export type PageNumberFormat = 'decimal' | 'lower-roman' | 'upper-roman' | 'lower-alpha' | 'upper-alpha' | EastAsianNumeralStyle | ArabicNumeralStyle;
|
|
@@ -1459,6 +1574,101 @@ export interface ResolvedDiagramStyleConfig {
|
|
|
1459
1574
|
singleInk: boolean;
|
|
1460
1575
|
inkColor: ColorValue;
|
|
1461
1576
|
}
|
|
1577
|
+
/** Where an overlay sits on a video's poster: the centre, a corner or the
|
|
1578
|
+
* middle of a side. The positions are physical: `top-right` is the top
|
|
1579
|
+
* right corner in a right-to-left book too. */
|
|
1580
|
+
export type VideoOverlayPosition = 'center' | 'top-left' | 'top' | 'top-right' | 'left' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right';
|
|
1581
|
+
/** The mark printed on a video's poster to say it plays. */
|
|
1582
|
+
export interface VideoPlayMarkConfig {
|
|
1583
|
+
/** Print it. Default `true`. */
|
|
1584
|
+
enabled?: boolean;
|
|
1585
|
+
/** `'circle'` (a disc with a triangle, the default), `'rounded'` (a
|
|
1586
|
+
* rounded rectangle with a triangle) or `'triangle'` (the triangle
|
|
1587
|
+
* alone, outlined in the background colour). */
|
|
1588
|
+
shape?: 'circle' | 'rounded' | 'triangle';
|
|
1589
|
+
/** Default `'center'`. */
|
|
1590
|
+
position?: VideoOverlayPosition;
|
|
1591
|
+
/** Height of the mark (the disc's diameter). Default `12mm`; never more
|
|
1592
|
+
* than 40 % of the poster's shorter side. */
|
|
1593
|
+
size?: Dimension;
|
|
1594
|
+
/** Distance from the poster's edges when the mark sits at a side or a
|
|
1595
|
+
* corner. Default `4mm`. */
|
|
1596
|
+
inset?: Dimension;
|
|
1597
|
+
/** The triangle. Default white. */
|
|
1598
|
+
color?: ColorValue;
|
|
1599
|
+
/** The disc or rectangle behind it. Default the main palette colour. */
|
|
1600
|
+
background?: ColorValue;
|
|
1601
|
+
/** Opacity of the background, 0–1. Default `0.9`. */
|
|
1602
|
+
backgroundOpacity?: number;
|
|
1603
|
+
}
|
|
1604
|
+
/** The QR code printed on a video's poster, opening the video (its YouTube
|
|
1605
|
+
* or Vimeo page, or a self-hosted file's production address). */
|
|
1606
|
+
export interface VideoQrConfig {
|
|
1607
|
+
/** Print it. Default `true`. A video with no address (a self-hosted file
|
|
1608
|
+
* without `url`) prints none and raises `videoWithoutUrl`. */
|
|
1609
|
+
enabled?: boolean;
|
|
1610
|
+
/** Default `'bottom-right'`. */
|
|
1611
|
+
position?: VideoOverlayPosition;
|
|
1612
|
+
/** Side of the code with its quiet zone. Default `18mm`; never more than
|
|
1613
|
+
* 45 % of the poster's shorter side. Keep each module at least a third of
|
|
1614
|
+
* a millimetre for phone cameras. */
|
|
1615
|
+
size?: Dimension;
|
|
1616
|
+
/** Distance from the poster's edges. Default `3mm`. */
|
|
1617
|
+
inset?: Dimension;
|
|
1618
|
+
/** Error-correction level `'L'`, `'M'` (the default), `'Q'` or `'H'`;
|
|
1619
|
+
* raised automatically while the code stays the same size. */
|
|
1620
|
+
errorCorrection?: 'L' | 'M' | 'Q' | 'H';
|
|
1621
|
+
/** Light modules around the code, in modules. Default `2`. */
|
|
1622
|
+
quietZone?: number;
|
|
1623
|
+
/** Dark modules. Default black. */
|
|
1624
|
+
color?: ColorValue;
|
|
1625
|
+
/** The plate behind the code. Default white. */
|
|
1626
|
+
background?: ColorValue;
|
|
1627
|
+
/** Corner radius of the plate. Default `1mm`. */
|
|
1628
|
+
radius?: Dimension;
|
|
1629
|
+
}
|
|
1630
|
+
/** How video resources are printed and played (#454). */
|
|
1631
|
+
export interface VideoStyleConfig {
|
|
1632
|
+
playMark?: VideoPlayMarkConfig;
|
|
1633
|
+
qr?: VideoQrConfig;
|
|
1634
|
+
/** Make the poster a link to the video: a link annotation in the PDF, an
|
|
1635
|
+
* `<a>` around the poster in HTML and EPUB when they show the poster.
|
|
1636
|
+
* Default `true`. */
|
|
1637
|
+
linkPoster?: boolean;
|
|
1638
|
+
/** What the HTML output sets for a video: its player (`'player'`, the
|
|
1639
|
+
* default) or the printed poster with its overlays (`'poster'`). */
|
|
1640
|
+
html?: 'player' | 'poster';
|
|
1641
|
+
/** Player options for every video. */
|
|
1642
|
+
player?: VideoPlayerOptions;
|
|
1643
|
+
}
|
|
1644
|
+
export interface ResolvedVideoPlayMarkConfig {
|
|
1645
|
+
enabled: boolean;
|
|
1646
|
+
shape: 'circle' | 'rounded' | 'triangle';
|
|
1647
|
+
position: VideoOverlayPosition;
|
|
1648
|
+
size: Dimension;
|
|
1649
|
+
inset: Dimension;
|
|
1650
|
+
color: ColorValue;
|
|
1651
|
+
background: ColorValue;
|
|
1652
|
+
backgroundOpacity: number;
|
|
1653
|
+
}
|
|
1654
|
+
export interface ResolvedVideoQrConfig {
|
|
1655
|
+
enabled: boolean;
|
|
1656
|
+
position: VideoOverlayPosition;
|
|
1657
|
+
size: Dimension;
|
|
1658
|
+
inset: Dimension;
|
|
1659
|
+
errorCorrection: 'L' | 'M' | 'Q' | 'H';
|
|
1660
|
+
quietZone: number;
|
|
1661
|
+
color: ColorValue;
|
|
1662
|
+
background: ColorValue;
|
|
1663
|
+
radius: Dimension;
|
|
1664
|
+
}
|
|
1665
|
+
export interface ResolvedVideoStyleConfig {
|
|
1666
|
+
playMark: ResolvedVideoPlayMarkConfig;
|
|
1667
|
+
qr: ResolvedVideoQrConfig;
|
|
1668
|
+
linkPoster: boolean;
|
|
1669
|
+
html: 'player' | 'poster';
|
|
1670
|
+
player: ResolvedVideoPlayerOptions;
|
|
1671
|
+
}
|
|
1462
1672
|
/** A named paragraph style, applied to the paragraphs inside a
|
|
1463
1673
|
* `:::paragraphs{style="<id>"}` container. Every typographic field is
|
|
1464
1674
|
* optional and inherits the body text when unset, so a style only needs to
|
|
@@ -1510,6 +1720,14 @@ export interface ParagraphStyleConfig {
|
|
|
1510
1720
|
* `hangingIndent: 2.5em` sets the line at 1.5 em and its turnover at
|
|
1511
1721
|
* 4 em. Default `0`; a negative value counts as `0`. */
|
|
1512
1722
|
indent?: Dimension;
|
|
1723
|
+
/** Indent of every line from the side lines end on (the right of an
|
|
1724
|
+
* English paragraph, the foot of a vertical line), `em` being the
|
|
1725
|
+
* style's own size: the measure narrows by it and lines set flush to the
|
|
1726
|
+
* end (`textAlign: 'end'`) stop that far short of it. A date or a
|
|
1727
|
+
* signature raised N characters off the foot of a Japanese letter (地から
|
|
1728
|
+
* N字上げ) is `textAlign: 'end'` with `endIndent: 'Nem'`; 地付き is the
|
|
1729
|
+
* same at `0`. Default `0`; a negative value counts as `0`. */
|
|
1730
|
+
endIndent?: Dimension;
|
|
1513
1731
|
/** Defaults to the body first-line indent. Ignored when
|
|
1514
1732
|
* {@link hangingIndent} is non-zero. */
|
|
1515
1733
|
firstLineIndent?: Dimension;
|
|
@@ -1559,6 +1777,8 @@ export interface ResolvedParagraphStyleConfig {
|
|
|
1559
1777
|
smallCaps: boolean;
|
|
1560
1778
|
hyphenation: boolean;
|
|
1561
1779
|
indent: Dimension;
|
|
1780
|
+
/** Absent when the style sets none (or `0`). */
|
|
1781
|
+
endIndent?: Dimension;
|
|
1562
1782
|
firstLineIndent: Dimension;
|
|
1563
1783
|
hangingIndent: Dimension;
|
|
1564
1784
|
spaceBetween: Dimension;
|
|
@@ -2300,6 +2520,31 @@ export interface HeadingLevelConfig {
|
|
|
2300
2520
|
* a half above its text while an H3 stays on the grid. A heading style
|
|
2301
2521
|
* may set it too. */
|
|
2302
2522
|
snapToGrid?: boolean;
|
|
2523
|
+
/** 行取り (gyōdori, JLReq §4.1.6): the heading takes exactly this many
|
|
2524
|
+
* lines of the body grid (N × the body line pitch), its text centred in
|
|
2525
|
+
* them, in place of its `marginTop` and `marginBottom` — "3行取り" is
|
|
2526
|
+
* `lineSpan: 3`. The band starts on the grid when the heading snaps to it
|
|
2527
|
+
* (`snapToGrid`), keeps its lines at the head of a column and after
|
|
2528
|
+
* another heading, and holds its text centred across the line in
|
|
2529
|
+
* vertical text too. A heading whose lines need more room than N body
|
|
2530
|
+
* lines takes the next whole number of lines. Not read by a heading set
|
|
2531
|
+
* as a page opener (`span: 'page'`) or from its `advancedDesign`, nor
|
|
2532
|
+
* inside a box. Unset (default): the margins apply. */
|
|
2533
|
+
lineSpan?: number;
|
|
2534
|
+
/** Indent of the heading's lines from the side lines start on (字下げ:
|
|
2535
|
+
* the top of a vertical line, the left of an English one), in which `em`
|
|
2536
|
+
* is the BODY size, as Japanese books count a heading's indent in body
|
|
2537
|
+
* characters (JLReq §4.1.3: 4, 6 and 8 字 for the levels of a vertical
|
|
2538
|
+
* book). The measure narrows by it; a centred heading centres in what is
|
|
2539
|
+
* left. Default `0`. */
|
|
2540
|
+
indent?: Dimension;
|
|
2541
|
+
/** 字取り (jidori, JLReq §3.7.3, §4.1): a heading shorter than this many
|
|
2542
|
+
* of its own characters is spaced out evenly to fill exactly that width
|
|
2543
|
+
* (`jidori: 3` sets 序章 as 序 章). Applies to a heading that fits one
|
|
2544
|
+
* line; a longer title is set as it is. A heading overrides it with
|
|
2545
|
+
* `{jidori=N}` (`{jidori=0}` turns it off). Unset (default): no
|
|
2546
|
+
* spacing. */
|
|
2547
|
+
jidori?: number;
|
|
2303
2548
|
}
|
|
2304
2549
|
export type HeadingTextTransform = 'none' | 'uppercase';
|
|
2305
2550
|
export interface ResolvedHeadingLevelConfig {
|
|
@@ -2329,6 +2574,12 @@ export interface ResolvedHeadingLevelConfig {
|
|
|
2329
2574
|
hidden: boolean;
|
|
2330
2575
|
/** The level's own value, else `headings.snapToGrid`. */
|
|
2331
2576
|
snapToGrid: boolean;
|
|
2577
|
+
/** Absent unless set (see {@link HeadingLevelConfig.lineSpan}). */
|
|
2578
|
+
lineSpan?: number;
|
|
2579
|
+
/** Absent unless set (see {@link HeadingLevelConfig.indent}). */
|
|
2580
|
+
indent?: Dimension;
|
|
2581
|
+
/** Absent unless set (see {@link HeadingLevelConfig.jidori}). */
|
|
2582
|
+
jidori?: number;
|
|
2332
2583
|
}
|
|
2333
2584
|
export interface HeadingsConfig {
|
|
2334
2585
|
fontFamily?: string;
|
|
@@ -2345,6 +2596,12 @@ export interface HeadingsConfig {
|
|
|
2345
2596
|
* rule too: the cut is taken lower (or dropped) rather than leave a
|
|
2346
2597
|
* heading closing a column while its text opens the next. Default true. */
|
|
2347
2598
|
keepWithNext?: boolean;
|
|
2599
|
+
/** With {@link keepWithNext} on, let a heading close the last column of an
|
|
2600
|
+
* even page all the same: its text opens the facing odd page, which the
|
|
2601
|
+
* reader sees beside it in the same spread (JLReq §4.1.7 b allows it in
|
|
2602
|
+
* vertical books; the spread is the same in a left-bound book). Default
|
|
2603
|
+
* `false`. */
|
|
2604
|
+
keepWithNextSpread?: boolean;
|
|
2348
2605
|
/** How a paragraph that does not fit under a heading at a column's foot
|
|
2349
2606
|
* is split, when pushing it whole would leave the heading behind
|
|
2350
2607
|
* (`keepWithNext`):
|
|
@@ -2480,6 +2737,8 @@ export interface ResolvedHeadingsConfig {
|
|
|
2480
2737
|
marginTop: Dimension;
|
|
2481
2738
|
marginBottom: Dimension;
|
|
2482
2739
|
keepWithNext: boolean;
|
|
2740
|
+
/** Present (`true`) only when set. */
|
|
2741
|
+
keepWithNextSpread?: boolean;
|
|
2483
2742
|
keepWithNextSplit: KeepWithNextSplit;
|
|
2484
2743
|
snapToGrid: boolean;
|
|
2485
2744
|
inlineMarks: boolean;
|
|
@@ -2974,22 +3233,42 @@ export interface ResolvedMathConfig {
|
|
|
2974
3233
|
* - `'column'`: at the foot of the column that holds the line citing the
|
|
2975
3234
|
* note, under a separator rule, above the column's bottom float band. In
|
|
2976
3235
|
* a one-column layout that is the foot of the page;
|
|
2977
|
-
* - `'chapterEnd'`: every note of the chapter after its last block
|
|
2978
|
-
|
|
3236
|
+
* - `'chapterEnd'`: every note of the chapter after its last block;
|
|
3237
|
+
* - `'spread'`: sidenotes (傍注) of a vertical book (JLReq §4.2.6): the
|
|
3238
|
+
* notes cited on both pages of a spread are set at the fore-edge end of
|
|
3239
|
+
* its odd page (the left page of a right-bound book: the foot of the
|
|
3240
|
+
* flow, after its last line), under a rule. A note that does not fit
|
|
3241
|
+
* there stays on the even page, at its own fore-edge end; one cited too
|
|
3242
|
+
* late on the odd page goes, with its line, to the next spread. In a
|
|
3243
|
+
* horizontal document the notes are set as `'column'` notes and a
|
|
3244
|
+
* configuration warning (`footnoteSpreadHorizontal`) says so. */
|
|
3245
|
+
export type FootnotePlacement = 'column' | 'chapterEnd' | 'spread';
|
|
2979
3246
|
/** When the note numbers start again at 1: at each chapter (a heading
|
|
2980
3247
|
* that opens a page, `breakBefore`, and the start of each document of a
|
|
2981
3248
|
* book), never within the document, on every page (`'page'`, the usual
|
|
2982
|
-
* 页下注 of a Chinese book)
|
|
2983
|
-
* set their notes column by column)
|
|
2984
|
-
*
|
|
2985
|
-
*
|
|
2986
|
-
|
|
3249
|
+
* 页下注 of a Chinese book), in every column (`'column'`, for books that
|
|
3250
|
+
* set their notes column by column) or on every spread (`'spread'`, the
|
|
3251
|
+
* sidenotes of a Japanese book). `'page'`, `'column'` and `'spread'`
|
|
3252
|
+
* count the notes where the layout sets them, so they apply to notes at
|
|
3253
|
+
* the column foot or on the spread only: with `placement: 'chapterEnd'`
|
|
3254
|
+
* they number by chapter. */
|
|
3255
|
+
export type FootnoteNumbering = 'chapter' | 'document' | 'page' | 'column' | 'spread';
|
|
2987
3256
|
/** How the marker in the text is set:
|
|
2988
3257
|
* - `'superscript'`: raised and reduced, as a superscript (`text¹`);
|
|
2989
3258
|
* - `'inline'`: on the baseline at `markerSize` (`text①`), centred in its
|
|
2990
3259
|
* cell in vertical text — how Chinese books set circled markers;
|
|
3260
|
+
* - `'side'`: the interlinear marker of Japanese books (合印, JLReq
|
|
3261
|
+
* §4.2.3): small (`markerSize`, default 0.6 em) in the line gap beside
|
|
3262
|
+
* the word it marks, on the side ruby takes (right of a vertical line,
|
|
3263
|
+
* over a horizontal one), its end flush with the end of the word's last
|
|
3264
|
+
* character. It takes no room in the line, and the leading must hold it
|
|
3265
|
+
* as it holds ruby;
|
|
3266
|
+
* - `'right'`: the inline marker of Japanese vertical text (行右小書き):
|
|
3267
|
+
* reduced (`markerSize`, default 0.7 em) and set flush with the right
|
|
3268
|
+
* side of the line, taking its advance. In horizontal text it is a
|
|
3269
|
+
* superscript;
|
|
2991
3270
|
* - `'auto'`: inline for `circled-decimal` numbers, else superscript. */
|
|
2992
|
-
export type FootnoteMarkerPosition = 'auto' | 'superscript' | 'inline';
|
|
3271
|
+
export type FootnoteMarkerPosition = 'auto' | 'superscript' | 'inline' | 'side' | 'right';
|
|
2993
3272
|
/** The rule set between the text and the notes of a column. */
|
|
2994
3273
|
export interface FootnoteSeparatorConfig {
|
|
2995
3274
|
/** Draw the rule. Default `true`. With `false` the space stays. */
|
|
@@ -3131,10 +3410,20 @@ export interface ResolvedCrossRefsConfig {
|
|
|
3131
3410
|
page: string;
|
|
3132
3411
|
defaultStyle: 'default' | 'number' | 'title' | 'page';
|
|
3133
3412
|
}
|
|
3413
|
+
/** Footnotes. A Japanese document (`locale: 'ja'`) resolves the fields it
|
|
3414
|
+
* leaves unset after JLReq §4.2: a vertical one sets endnotes after each
|
|
3415
|
+
* chapter (後注: `placement: 'chapterEnd'`, numbered by chapter) with
|
|
3416
|
+
* `(1)` markers at the right of the line (`markerPosition: 'right'`,
|
|
3417
|
+
* `markerTemplate: '({n})'`, the digits upright by `cjk.uprightDigits`),
|
|
3418
|
+
* the notes hung 2 note-ems with a full em after the number; a
|
|
3419
|
+
* horizontal one sets them at the column foot numbered per page, with
|
|
3420
|
+
* superscript markers and a rule ⅓ of the measure. `placement: 'spread'`
|
|
3421
|
+
* numbers per spread unless `numbering` says otherwise. Every other
|
|
3422
|
+
* document resolves the defaults given on each field. */
|
|
3134
3423
|
export interface FootnotesConfig {
|
|
3135
3424
|
/** Default `'column'`. */
|
|
3136
3425
|
placement?: FootnotePlacement;
|
|
3137
|
-
/** Default `'chapter'
|
|
3426
|
+
/** Default `'chapter'` (`'spread'` with `placement: 'spread'`). */
|
|
3138
3427
|
numbering?: FootnoteNumbering;
|
|
3139
3428
|
/** How the numbers are written, in any spelling of a number format
|
|
3140
3429
|
* (`decimal`, `lower-roman`, `circled-decimal` / `①`, `cjk-decimal`…, see
|
|
@@ -3145,8 +3434,9 @@ export interface FootnotesConfig {
|
|
|
3145
3434
|
* that opens the note itself follows it too: raised, or set at the size
|
|
3146
3435
|
* of the note text. */
|
|
3147
3436
|
markerPosition?: FootnoteMarkerPosition;
|
|
3148
|
-
/** Size of an inline marker in the text, `em` of the
|
|
3149
|
-
* Default `1em
|
|
3437
|
+
/** Size of an inline, side or right marker in the text, `em` of the
|
|
3438
|
+
* text around it. Default `1em` (`0.6em` for a side marker, `0.7em` for
|
|
3439
|
+
* a right one). No effect on a superscript marker. */
|
|
3150
3440
|
markerSize?: Dimension;
|
|
3151
3441
|
/** How a note's number is written, `{n}` standing for it in its number
|
|
3152
3442
|
* format and the document's digits: `'({n})'` sets the parentheses of
|
|
@@ -3179,6 +3469,11 @@ export interface FootnotesConfig {
|
|
|
3179
3469
|
/** Indent of the turnover lines of a note, so they align past its
|
|
3180
3470
|
* number. Default `0` (the lines run flush under the number). */
|
|
3181
3471
|
hangingIndent?: Dimension;
|
|
3472
|
+
/** The space between a note's number and its text: an en space (`'en'`,
|
|
3473
|
+
* the default) or a full em of the note size (`'em'`, an ideographic
|
|
3474
|
+
* space in CJK text: JLReq §4.2.4 sets one note-em after the number).
|
|
3475
|
+
* It never stretches or breaks. */
|
|
3476
|
+
numberGap?: 'en' | 'em';
|
|
3182
3477
|
/** Space between two notes. Default `0`. */
|
|
3183
3478
|
spaceBetween?: Dimension;
|
|
3184
3479
|
/** Space between the last line of text and the separator rule (or the
|
|
@@ -3194,7 +3489,7 @@ export interface ResolvedFootnotesConfig {
|
|
|
3194
3489
|
numbering: FootnoteNumbering;
|
|
3195
3490
|
numberFormat: NumberFormatStyle;
|
|
3196
3491
|
/** `'auto'` resolved against the number format. */
|
|
3197
|
-
markerPosition: 'superscript' | 'inline';
|
|
3492
|
+
markerPosition: 'superscript' | 'inline' | 'side' | 'right';
|
|
3198
3493
|
markerSize: Dimension;
|
|
3199
3494
|
/** Set when it is not `'{n}'` (and holds `{n}`). */
|
|
3200
3495
|
markerTemplate?: string;
|
|
@@ -3207,17 +3502,21 @@ export interface ResolvedFootnotesConfig {
|
|
|
3207
3502
|
color?: ColorValue;
|
|
3208
3503
|
textAlign?: TextAlign;
|
|
3209
3504
|
hangingIndent: Dimension;
|
|
3505
|
+
/** Set when it is `'em'`. */
|
|
3506
|
+
numberGap?: 'em';
|
|
3210
3507
|
spaceBetween: Dimension;
|
|
3211
3508
|
spaceAbove: Dimension;
|
|
3212
3509
|
spaceBelowRule: Dimension;
|
|
3213
3510
|
separator: ResolvedFootnoteSeparatorConfig;
|
|
3214
3511
|
}
|
|
3215
|
-
/** The conventions
|
|
3512
|
+
/** The conventions CJK text follows. Chinese, after the regions clreq
|
|
3216
3513
|
* describes: `mainland` (China and Singapore: simplified characters,
|
|
3217
|
-
* GB/T 15834—2011), `taiwan` and `hongkong` (traditional characters).
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3514
|
+
* GB/T 15834—2011), `taiwan` and `hongkong` (traditional characters).
|
|
3515
|
+
* Japanese: `japan` (JIS X 4051, W3C JLReq), which every `ja` tag
|
|
3516
|
+
* resolves to. */
|
|
3517
|
+
export type CjkRegion = 'mainland' | 'taiwan' | 'hongkong' | 'japan';
|
|
3518
|
+
/** How strictly lines of CJK text avoid starting or ending with a mark.
|
|
3519
|
+
* The Chinese levels (clreq §6.1.1):
|
|
3221
3520
|
* - `none`: a line may break between any two characters (Taiwan and Hong
|
|
3222
3521
|
* Kong newspapers);
|
|
3223
3522
|
* - `basic`: no line starts with a pause or stop mark (、,;:。!?), a
|
|
@@ -3228,10 +3527,25 @@ export type CjkRegion = 'mainland' | 'taiwan' | 'hongkong';
|
|
|
3228
3527
|
* 15834—2011 §5.1.9);
|
|
3229
3528
|
* - `strict`: `gb`, and no line starts with a two-em dash (——) or an
|
|
3230
3529
|
* ellipsis (……).
|
|
3530
|
+
* The Japanese levels (kinsoku shori, JLReq §3.1.7–§3.1.10 and Appendix
|
|
3531
|
+
* C.3, JIS X 4051). At each no line starts with a closing bracket or
|
|
3532
|
+
* quote, 、,。. or a closing warichu bracket, and none ends with an
|
|
3533
|
+
* opening one; a line may start with ―― or …… (never break inside them,
|
|
3534
|
+
* nor inside ‥‥ or 〳〵); the solidus has no rule:
|
|
3535
|
+
* - `ja-very-strict` (JIS X 4051's default): no line starts with a small
|
|
3536
|
+
* kana (ぁ っ ゃ ァ ッ ョ ㇰ…), the prolonged sound mark ー, an iteration
|
|
3537
|
+
* mark (々 ゝ ゞ ヽ ヾ 〻), a hyphen (‐ ゠ 〜 ~ –), ?! or a middle dot
|
|
3538
|
+
* (・ : ;);
|
|
3539
|
+
* - `ja-strict`: `ja-very-strict`, but a small kana, ー and 々 may start a
|
|
3540
|
+
* line (JLReq's convention for general books);
|
|
3541
|
+
* - `ja-loose` (newspapers): only the marks named first stay off the line
|
|
3542
|
+
* start; hyphens, ?!, middle dots and every iteration mark may open a
|
|
3543
|
+
* line, and a currency sign or a unit may stand at a line end or start
|
|
3544
|
+
* away from a number.
|
|
3231
3545
|
* At every level —— and …… never split, a number keeps its signs and its
|
|
3232
3546
|
* unit (¥5,999, 50%), a Latin word stays whole unless it is wider than the
|
|
3233
3547
|
* line, and a footnote marker stays with the character it follows. */
|
|
3234
|
-
export type CjkLineBreak = 'none' | 'basic' | 'gb' | 'strict';
|
|
3548
|
+
export type CjkLineBreak = 'none' | 'basic' | 'gb' | 'strict' | 'ja-very-strict' | 'ja-strict' | 'ja-loose';
|
|
3235
3549
|
/** East Asian typography: how Chinese, Japanese and Korean text is
|
|
3236
3550
|
* composed. Every field is optional; `'auto'` follows the region of the
|
|
3237
3551
|
* document language (`locale`). A paragraph is composed this way when it
|
|
@@ -3241,33 +3555,66 @@ export interface CjkConfig {
|
|
|
3241
3555
|
/** The regional conventions to follow. `'auto'` (the default) reads them
|
|
3242
3556
|
* from `locale`: `zh`, `zh-Hans`, `zh-CN` and `zh-SG` → `mainland`;
|
|
3243
3557
|
* `zh-Hant` and `zh-TW` → `taiwan`; `zh-HK` and `zh-MO` → `hongkong`;
|
|
3244
|
-
* any other language →
|
|
3558
|
+
* `ja` and every `ja-*` tag → `japan`; any other language →
|
|
3559
|
+
* `mainland`. */
|
|
3245
3560
|
region?: 'auto' | CjkRegion;
|
|
3246
3561
|
/** Where lines may break (see {@link CjkLineBreak}). `'auto'` (the
|
|
3247
|
-
* default): `gb` for the mainland, `basic` for Taiwan and Hong Kong
|
|
3562
|
+
* default): `gb` for the mainland, `basic` for Taiwan and Hong Kong,
|
|
3563
|
+
* `ja-very-strict` for Japan. */
|
|
3248
3564
|
lineBreak?: 'auto' | CjkLineBreak;
|
|
3249
3565
|
/** How wide the full-width marks are set (see
|
|
3250
3566
|
* {@link CjkPunctuationWidth}). `'auto'` (the default): `kaiming` for
|
|
3251
|
-
* the mainland, `fullwidth` for Taiwan
|
|
3567
|
+
* the mainland, `fullwidth` for Taiwan, Hong Kong and Japan (JLReq
|
|
3568
|
+
* §3.1.2: 、。 inside a Japanese line keep their whole em). Japanese
|
|
3569
|
+
* full-width text follows JLReq throughout: ・:; take a quarter em
|
|
3570
|
+
* on each side, ?! none, 、 and ・ between kanji numerals none
|
|
3571
|
+
* (二、三日, 三・一四); a line that takes one more character gives up
|
|
3572
|
+
* the half em at its end first, then the blank of 、・「」 inside it,
|
|
3573
|
+
* never the half em after a 。 (JLReq §3.8.3); a justified line is
|
|
3574
|
+
* never spread inside a bracket or next to 、。・?!. */
|
|
3252
3575
|
punctuationWidth?: 'auto' | CjkPunctuationWidth;
|
|
3253
3576
|
/** Two marks that meet (`。」`, `》(`, `:“`) give up the half em of
|
|
3254
3577
|
* blank between them, so the pair takes 1.5 em instead of 2 (clreq
|
|
3255
|
-
* §6.3.2.2). `'auto'` (the default): on for the
|
|
3256
|
-
* Kong, off for Taiwan. */
|
|
3578
|
+
* §6.3.2.2, JLReq §3.1.4). `'auto'` (the default): on for the
|
|
3579
|
+
* mainland, Hong Kong and Japan, off for Taiwan. */
|
|
3257
3580
|
compressAdjacent?: 'auto' | boolean;
|
|
3258
3581
|
/** An opening bracket or quote that starts a line gives up its leading
|
|
3259
3582
|
* half em, so its ink lines up with the text edge, and a closing one
|
|
3260
|
-
* that ends a line its trailing half (clreq §6.3.2.3).
|
|
3261
|
-
*
|
|
3583
|
+
* that ends a line its trailing half (clreq §6.3.2.3, JLReq §3.1.5).
|
|
3584
|
+
* Japanese full-width text keeps the half em after a closing mark at
|
|
3585
|
+
* the end of a line: it is the first blank the line gives up, all of
|
|
3586
|
+
* it, when it takes in one more character (JLReq §3.8.3). `'auto'` (the
|
|
3587
|
+
* default): on for the mainland, Hong Kong and Japan, off for
|
|
3588
|
+
* Taiwan. */
|
|
3262
3589
|
trimLineStart?: 'auto' | boolean;
|
|
3263
3590
|
/** Whether a pause or stop mark may hang past the end of the line
|
|
3264
|
-
* (clreq §6.1.3
|
|
3265
|
-
* 、,。. (on the mainland also ;:?!) hangs when it
|
|
3266
|
-
* open the next line and compressing the line cannot
|
|
3267
|
-
* in horizontal Taiwan and Hong Kong text
|
|
3591
|
+
* (clreq §6.1.3; ぶら下げ, JLReq §2.5.1, §3.8.2). `'none'`: never.
|
|
3592
|
+
* `'allow'`: one of 、,。. (on the mainland also ;:?!) hangs when it
|
|
3593
|
+
* would otherwise open the next line and compressing the line cannot
|
|
3594
|
+
* take it in; never in horizontal Taiwan and Hong Kong text (Japan:
|
|
3595
|
+
* 、,。. only, in both writing modes). `'force'`: such a mark hangs
|
|
3268
3596
|
* whenever it ends a line (but the paragraph's last). Never after or
|
|
3269
|
-
* before another mark.
|
|
3270
|
-
|
|
3597
|
+
* before another mark. `'auto'` (the default): `'allow'` for Japan,
|
|
3598
|
+
* where many books hang 、。 (bunko in particular), `'none'` for the
|
|
3599
|
+
* Chinese regions. */
|
|
3600
|
+
hangingPunctuation?: 'auto' | CjkHangingPunctuation;
|
|
3601
|
+
/** The full-width space after ? and ! (JLReq §3.1.6): one em of blank
|
|
3602
|
+
* after a ? or ! that ends a sentence inside a paragraph, none when a
|
|
3603
|
+
* closing bracket or another ?! follows it, at the end of the
|
|
3604
|
+
* paragraph or at the end of a line (it does not carry over to the next
|
|
3605
|
+
* line). A space the author typed after the mark (U+3000 or a word
|
|
3606
|
+
* space) is replaced, not added to. The space neither stretches nor
|
|
3607
|
+
* shrinks when the line is justified. `'auto'` (the default): on for
|
|
3608
|
+
* Japan, off for the Chinese regions, whose ?! take no space. */
|
|
3609
|
+
spaceAfterQuestion?: 'auto' | boolean;
|
|
3610
|
+
/** Where an opening bracket that starts a paragraph is set (JLReq
|
|
3611
|
+
* §3.1.5, 起こしの括弧), see {@link CjkParagraphStartBracket}. Applies
|
|
3612
|
+
* to a paragraph with a first-line indent (`bodyText.firstLineIndent`)
|
|
3613
|
+
* that opens with 「『(〔 and the other opening brackets and quotes.
|
|
3614
|
+
* `'auto'` (the default): `'half'` for Japan (pattern ③, the
|
|
3615
|
+
* convention of literary books), and for the Chinese regions the
|
|
3616
|
+
* bracket is set as at any line start (`trimLineStart`). */
|
|
3617
|
+
paragraphStartBracket?: 'auto' | CjkParagraphStartBracket;
|
|
3271
3618
|
/** The space set between a Han character (or kana) and a Latin letter or
|
|
3272
3619
|
* a European digit next to it (`用 iPhone 拍照`), in em of the CJK
|
|
3273
3620
|
* text's size or any length. Default `{ value: 0.25, unit: 'em' }`; `0`
|
|
@@ -3294,18 +3641,32 @@ export interface CjkConfig {
|
|
|
3294
3641
|
* letters inside the same emphasis keep their italics; `'italic'` slants
|
|
3295
3642
|
* them as any text (a CJK face has no italic, so the slant is
|
|
3296
3643
|
* synthesised). `'auto'` (the default): `'dots'` when the document
|
|
3297
|
-
* language (`locale`) is Chinese
|
|
3644
|
+
* language (`locale`) is Chinese or Japanese (傍点: Japanese has no
|
|
3645
|
+
* italics either), `'italic'` otherwise (#193). */
|
|
3298
3646
|
emphasis?: 'auto' | CjkEmphasis;
|
|
3647
|
+
/** The emphasis mark `:dots[…]` and `*…*` (under `emphasis: 'dots'`)
|
|
3648
|
+
* set when the directive does not say: its shape, fill and side (see
|
|
3649
|
+
* {@link CjkEmphasisMarkConfig}). A `:dots[…]{style fill pos}`
|
|
3650
|
+
* attribute wins over it. */
|
|
3651
|
+
emphasisMark?: CjkEmphasisMarkConfig;
|
|
3299
3652
|
/** What a book title marked `:book[…]` prints (#193): `'brackets'` sets
|
|
3300
|
-
*
|
|
3301
|
-
* are broken with; `'wavy'` draws the
|
|
3302
|
-
* under it (left of it in vertical
|
|
3303
|
-
* title. `'auto'` (the default):
|
|
3304
|
-
*
|
|
3653
|
+
* the brackets of `bookTitleBrackets` around it (《》 on the mainland,
|
|
3654
|
+
* 『』 in Japan), as text the lines are broken with; `'wavy'` draws the
|
|
3655
|
+
* wavy book-title line (书名号甲式) under it (left of it in vertical
|
|
3656
|
+
* text); `'none'` prints the bare title. `'auto'` (the default):
|
|
3657
|
+
* brackets for the mainland and Japan, the wavy line for Taiwan and
|
|
3658
|
+
* Hong Kong (`region`). */
|
|
3305
3659
|
bookTitleMark?: 'auto' | CjkBookTitleMark;
|
|
3306
|
-
/**
|
|
3307
|
-
*
|
|
3308
|
-
*
|
|
3660
|
+
/** The brackets `bookTitleMark: 'brackets'` sets around a book title:
|
|
3661
|
+
* the outermost title's pair first, then the pair of a title inside it
|
|
3662
|
+
* (a title deeper still takes the last pair). `'auto'` (the default):
|
|
3663
|
+
* 《》 then 〈〉 for Chinese (GB/T 15834—2011), 『』 then 「」 for Japan
|
|
3664
|
+
* (『』 for a book, 「」 for an article or a chapter named inside its
|
|
3665
|
+
* title). */
|
|
3666
|
+
bookTitleBrackets?: 'auto' | CjkBracketPair[];
|
|
3667
|
+
/** Colour of the emphasis dots, of the proper-name and book-title lines
|
|
3668
|
+
* and of side lines (`:sideline[…]`). Unset: the colour of the text
|
|
3669
|
+
* they mark (#193). The default of the ruby and warichu colours too. */
|
|
3309
3670
|
annotationColor?: ColorValue;
|
|
3310
3671
|
/** Ruby: how readings (pinyin, zhuyin) set with `:ruby[…]{rt="…"}` or
|
|
3311
3672
|
* `{紅樓|hóng|lóu}` look (see {@link CjkRubyConfig}, #194). */
|
|
@@ -3313,11 +3674,47 @@ export interface CjkConfig {
|
|
|
3313
3674
|
/** Warichu (双行夹注): how the two-row notes of `:warichu[…]` look (see
|
|
3314
3675
|
* {@link CjkWarichuConfig}, #195). */
|
|
3315
3676
|
warichu?: CjkWarichuConfig;
|
|
3677
|
+
/** Kanbun reading marks (訓点): how the 返り点 and 送り仮名 of
|
|
3678
|
+
* `:kunten[字]{kaeri okuri tate}` look and where they go (see
|
|
3679
|
+
* {@link CjkKuntenConfig}, #430). */
|
|
3680
|
+
kunten?: CjkKuntenConfig;
|
|
3316
3681
|
}
|
|
3317
3682
|
/** See {@link CjkConfig.emphasis}. */
|
|
3318
3683
|
export type CjkEmphasis = 'italic' | 'dots';
|
|
3319
3684
|
/** See {@link CjkConfig.bookTitleMark}. */
|
|
3320
3685
|
export type CjkBookTitleMark = 'brackets' | 'wavy' | 'none';
|
|
3686
|
+
/** An opening and a closing bracket (`『` `』`), set at the text size. */
|
|
3687
|
+
export interface CjkBracketPair {
|
|
3688
|
+
open: string;
|
|
3689
|
+
close: string;
|
|
3690
|
+
}
|
|
3691
|
+
/** The shape of an emphasis mark: a dot ●, a circle ○, a sesame ﹅. */
|
|
3692
|
+
export type CjkEmphasisMarkStyle = 'dot' | 'circle' | 'sesame';
|
|
3693
|
+
/** `cjk.emphasisMark`: the emphasis mark set on each character (着重号,
|
|
3694
|
+
* 傍点). Every field is optional; `'auto'` follows the region. */
|
|
3695
|
+
export interface CjkEmphasisMarkConfig {
|
|
3696
|
+
/** `'auto'` (the default): the sesame ﹅ in Japan, in horizontal and
|
|
3697
|
+
* vertical text alike (JLReq §3.3.9, the Aozora 傍点; CSS keeps a
|
|
3698
|
+
* circle for horizontal `filled`, which literary books do not); the
|
|
3699
|
+
* dot elsewhere (着重号, GB/T 15834—2011). */
|
|
3700
|
+
style?: 'auto' | CjkEmphasisMarkStyle;
|
|
3701
|
+
/** `'auto'` (the default): filled, open for a circle. */
|
|
3702
|
+
fill?: 'auto' | 'filled' | 'open';
|
|
3703
|
+
/** Which side of the text, in its flow: `over` is above horizontal
|
|
3704
|
+
* text and right of vertical text, `under` below it and to its left.
|
|
3705
|
+
* `'auto'` (the default): over in Japan (JLReq §3.3.9: right of
|
|
3706
|
+
* vertical text, above horizontal text); for Chinese under horizontal
|
|
3707
|
+
* text and right of vertical text (clreq). */
|
|
3708
|
+
position?: 'auto' | 'over' | 'under';
|
|
3709
|
+
}
|
|
3710
|
+
/** `cjk.emphasisMark` resolved: the shape, and the fill and side when the
|
|
3711
|
+
* region or the author sets one (`'auto'`: a circle open, anything else
|
|
3712
|
+
* filled; under horizontal text, right of vertical text). */
|
|
3713
|
+
export interface ResolvedCjkEmphasisMarkConfig {
|
|
3714
|
+
style: CjkEmphasisMarkStyle;
|
|
3715
|
+
fill: 'auto' | 'filled' | 'open';
|
|
3716
|
+
position: 'auto' | 'over' | 'under';
|
|
3717
|
+
}
|
|
3321
3718
|
/** Where a ruby reading goes: over the base (in vertical text: to its
|
|
3322
3719
|
* right), under it (to its left), or right of each character inside the
|
|
3323
3720
|
* line (zhuyin in horizontal text; the same as `over` in vertical text). */
|
|
@@ -3342,7 +3739,47 @@ export interface CjkRubyConfig {
|
|
|
3342
3739
|
* right of each character, anything else (pinyin) over the base in
|
|
3343
3740
|
* horizontal text and right of it in vertical text. */
|
|
3344
3741
|
position?: 'auto' | CjkRubyPosition;
|
|
3345
|
-
|
|
3742
|
+
/** What a reading longer than its base may run onto (肩掛け, JLReq
|
|
3743
|
+
* §3.3.8) before the base is spread (see {@link CjkRubyOverhang}).
|
|
3744
|
+
* `'auto'` (the default): `kana` in Japan (`region`); elsewhere a
|
|
3745
|
+
* quarter of the ruby em onto any neighbour without a reading
|
|
3746
|
+
* (clreq). */
|
|
3747
|
+
overhang?: 'auto' | CjkRubyOverhang;
|
|
3748
|
+
/** Where a reading sits on its base (see {@link CjkRubyAlign}).
|
|
3749
|
+
* `'auto'` (the default): `jis` in Japan; elsewhere centred, as
|
|
3750
|
+
* `center`. */
|
|
3751
|
+
align?: 'auto' | CjkRubyAlign;
|
|
3752
|
+
/** Small kana in readings (ゃゅょっ…): `keep` (the default) paints them
|
|
3753
|
+
* as written, as modern books do; `full` paints them full size
|
|
3754
|
+
* (がつこう for がっこう), as letterpress books did (JLReq §3.3.3
|
|
3755
|
+
* note). The text read and copied keeps the small kana. */
|
|
3756
|
+
smallKana?: 'keep' | 'full';
|
|
3757
|
+
}
|
|
3758
|
+
/** What a ruby reading longer than its base may run onto, past the
|
|
3759
|
+
* base's edge, before the base is spread (JLReq §3.3.8):
|
|
3760
|
+
* - `none`: nothing; the base is spread to the reading;
|
|
3761
|
+
* - `kana`: up to one ruby character (half an em of the text) onto
|
|
3762
|
+
* hiragana, katakana, small kana and ー, onto the blank of a mark (the
|
|
3763
|
+
* half em after 、。」 before the reading, an ideographic space, a
|
|
3764
|
+
* middle dot's quarter, …… and ――), at most half a ruby character
|
|
3765
|
+
* onto an opening bracket; never onto kanji, Latin text or another
|
|
3766
|
+
* base; two readings never share a kana from both sides (the later one
|
|
3767
|
+
* keeps to its base);
|
|
3768
|
+
* - `any`: up to half a ruby character onto any neighbour without a
|
|
3769
|
+
* reading.
|
|
3770
|
+
* Never past the line's start or end: a reading at a line edge is set
|
|
3771
|
+
* flush with it and its base moves in. */
|
|
3772
|
+
export type CjkRubyOverhang = 'none' | 'kana' | 'any';
|
|
3773
|
+
/** Where a ruby reading sits on its base (JIS X 4051 §12, JLReq §3.3.6):
|
|
3774
|
+
* - `center`: centred; a longer reading centred over its base, which is
|
|
3775
|
+
* centred in the box the reading needs;
|
|
3776
|
+
* - `jis`: a shorter reading spread 1:2:1 (half a unit before the first
|
|
3777
|
+
* character and after the last, one between characters; `ruby-align:
|
|
3778
|
+
* space-around`), or flush with both ends of the base (`space-between`)
|
|
3779
|
+
* when the half unit would exceed one ruby character; a longer reading
|
|
3780
|
+
* set solid over a base spread 1:2:1;
|
|
3781
|
+
* - `start`: from the base's start (肩付き, a vertical-text practice). */
|
|
3782
|
+
export type CjkRubyAlign = 'center' | 'jis' | 'start';
|
|
3346
3783
|
/** `cjk.warichu`: the look of warichu notes (双行夹注). */
|
|
3347
3784
|
export interface CjkWarichuConfig {
|
|
3348
3785
|
/** Size of the note's characters, in em of the text (or any length);
|
|
@@ -3353,16 +3790,53 @@ export interface CjkWarichuConfig {
|
|
|
3353
3790
|
* vermilion). Unset: `cjk.annotationColor`, else the text colour. */
|
|
3354
3791
|
color?: ColorValue;
|
|
3355
3792
|
/** Brackets set at the text size before the first row and after the
|
|
3356
|
-
* last one (`〔` `〕`, `(` `)`). Default: none
|
|
3357
|
-
* `
|
|
3793
|
+
* last one (`〔` `〕`, `(` `)`). Default: none, but `(` `)` for
|
|
3794
|
+
* Japan (`region`; JLReq §3.4.2). An empty string sets none. A note's
|
|
3795
|
+
* own `open` / `close` attributes win. */
|
|
3358
3796
|
open?: string;
|
|
3359
3797
|
close?: string;
|
|
3360
3798
|
}
|
|
3799
|
+
/** Where the 返り点 of a kanbun text go (see {@link CjkKuntenConfig}):
|
|
3800
|
+
* - `inline` (JIS X 4051 §5.5): right after their character, in the
|
|
3801
|
+
* left half of a vertical line (the lower half of a horizontal one),
|
|
3802
|
+
* taking their own advance; a 竪点 takes half an em between the two
|
|
3803
|
+
* characters it joins, and 送り仮名 longer than the room beside their
|
|
3804
|
+
* character push the next one on (§5.6.4);
|
|
3805
|
+
* - `interlinear`: in the line gap left of the character's lower half
|
|
3806
|
+
* (under it in horizontal text), taking no advance, as many school
|
|
3807
|
+
* editions set them; the characters keep an even pitch and 送り仮名 run
|
|
3808
|
+
* on beside the next character. */
|
|
3809
|
+
export type CjkKuntenPlacement = 'inline' | 'interlinear';
|
|
3810
|
+
/** `cjk.kunten`: the look of kanbun reading marks (`:kunten[…]`). */
|
|
3811
|
+
export interface CjkKuntenConfig {
|
|
3812
|
+
/** Size of the 返り点 and 送り仮名, in em of the text (or any length).
|
|
3813
|
+
* Default `{ value: 0.5, unit: 'em' }` (JIS X 4051 §5.5, §5.6). */
|
|
3814
|
+
fontSize?: Dimension;
|
|
3815
|
+
/** Colour of the marks. Unset: `cjk.annotationColor`, else the text
|
|
3816
|
+
* colour. */
|
|
3817
|
+
color?: ColorValue;
|
|
3818
|
+
/** Where the 返り点 go (see {@link CjkKuntenPlacement}). Default
|
|
3819
|
+
* `inline`. */
|
|
3820
|
+
placement?: CjkKuntenPlacement;
|
|
3821
|
+
}
|
|
3822
|
+
export interface ResolvedCjkKuntenConfig {
|
|
3823
|
+
fontSize: Dimension;
|
|
3824
|
+
color?: ColorValue;
|
|
3825
|
+
placement: CjkKuntenPlacement;
|
|
3826
|
+
}
|
|
3361
3827
|
export interface ResolvedCjkRubyConfig {
|
|
3362
3828
|
fontFamily?: string;
|
|
3363
3829
|
fontSize: Dimension;
|
|
3364
3830
|
color?: ColorValue;
|
|
3365
3831
|
position: 'auto' | CjkRubyPosition;
|
|
3832
|
+
/** Set only when it is not clreq's quarter em (Japan, or set): absent,
|
|
3833
|
+
* a longer reading passes its base by a quarter of the ruby em onto a
|
|
3834
|
+
* neighbour without a reading. */
|
|
3835
|
+
overhang?: CjkRubyOverhang;
|
|
3836
|
+
/** Set only when it is not the plain centring (Japan, or set). */
|
|
3837
|
+
align?: CjkRubyAlign;
|
|
3838
|
+
/** Set only when on. */
|
|
3839
|
+
smallKana?: 'full';
|
|
3366
3840
|
}
|
|
3367
3841
|
export interface ResolvedCjkWarichuConfig {
|
|
3368
3842
|
fontSize: Dimension;
|
|
@@ -3386,6 +3860,20 @@ export interface ResolvedCjkWarichuConfig {
|
|
|
3386
3860
|
export type CjkPunctuationWidth = 'fullwidth' | 'kaiming' | 'lineEndHalf' | 'halfwidth';
|
|
3387
3861
|
/** See {@link CjkConfig.hangingPunctuation}. */
|
|
3388
3862
|
export type CjkHangingPunctuation = 'none' | 'allow' | 'force';
|
|
3863
|
+
/** An opening bracket at the start of an indented paragraph (JLReq
|
|
3864
|
+
* §3.1.5, with an indent of one em):
|
|
3865
|
+
* - `indent` (pattern ①, JIS X 4051's default): the indent, then the
|
|
3866
|
+
* bracket without the half em of blank before its glyph; the text
|
|
3867
|
+
* after it starts at 1.5 em;
|
|
3868
|
+
* - `half` (pattern ③, most literary publishers): the bracket's glyph
|
|
3869
|
+
* sits in the second half of the indent, so the text after it starts
|
|
3870
|
+
* where the indent ends; with a one-em indent it reads as the bracket
|
|
3871
|
+
* filling the indent cell with its half em of blank;
|
|
3872
|
+
* - `flush` (天付き): no indent; the bracket's glyph at the start of the
|
|
3873
|
+
* line.
|
|
3874
|
+
* A bracket that opens a later line of the paragraph follows
|
|
3875
|
+
* `trimLineStart`. */
|
|
3876
|
+
export type CjkParagraphStartBracket = 'indent' | 'half' | 'flush';
|
|
3389
3877
|
/** The character grid of `cjk.grid`: the type area is derived from the
|
|
3390
3878
|
* body size, not authored as margins. Each column is `charsPerLine` ems
|
|
3391
3879
|
* wide and holds `linesPerPage` lines of the body's line height; with two
|
|
@@ -3421,14 +3909,23 @@ export interface ResolvedCjkConfig {
|
|
|
3421
3909
|
compressAdjacent: boolean;
|
|
3422
3910
|
trimLineStart: boolean;
|
|
3423
3911
|
hangingPunctuation: CjkHangingPunctuation;
|
|
3912
|
+
/** Set (true) only when on: absent, ?! take no space after them. */
|
|
3913
|
+
spaceAfterQuestion?: true;
|
|
3914
|
+
/** Set only when it differs from a line start: absent, a bracket that
|
|
3915
|
+
* opens a paragraph is set as at any line start. */
|
|
3916
|
+
paragraphStartBracket?: CjkParagraphStartBracket;
|
|
3424
3917
|
latinSpacing: Dimension;
|
|
3425
3918
|
uprightDigits: 0 | 2 | 3 | 4;
|
|
3426
3919
|
grid: ResolvedCjkGridConfig;
|
|
3427
3920
|
emphasis: CjkEmphasis;
|
|
3921
|
+
emphasisMark: ResolvedCjkEmphasisMarkConfig;
|
|
3428
3922
|
bookTitleMark: CjkBookTitleMark;
|
|
3923
|
+
/** At least one pair. */
|
|
3924
|
+
bookTitleBrackets: CjkBracketPair[];
|
|
3429
3925
|
annotationColor?: ColorValue;
|
|
3430
3926
|
ruby: ResolvedCjkRubyConfig;
|
|
3431
3927
|
warichu: ResolvedCjkWarichuConfig;
|
|
3928
|
+
kunten: ResolvedCjkKuntenConfig;
|
|
3432
3929
|
}
|
|
3433
3930
|
export type PdfColorSpace = 'rgb' | 'cmyk' | 'grayscale';
|
|
3434
3931
|
/** How postext-pdf writes the file. Layout ignores it; the VDT carries it
|
|
@@ -4255,11 +4752,26 @@ export interface IndexConfig {
|
|
|
4255
4752
|
* for 重阳);
|
|
4256
4753
|
* - `'stroke'`: under the stroke count of its first character (一畫,
|
|
4257
4754
|
* 二畫 …; 一画 … in Simplified Chinese);
|
|
4755
|
+
* - `'gojuon'` (五十音, #425): under the gojūon row of the first kana of
|
|
4756
|
+
* the entry's reading (あ行 か行 さ行 た行 な行 は行 ま行 や行 ら行
|
|
4757
|
+
* わ行); see below for the order;
|
|
4758
|
+
* - `'kana'`: under the first kana of the reading itself (か for が,
|
|
4759
|
+
* カ and ヵ);
|
|
4258
4760
|
* - `'none'`: no heads; symbols, numbers and words are set apart by the
|
|
4259
4761
|
* groups' `marginTop` only;
|
|
4260
4762
|
* - `'auto'` (default): `'pinyin'` in Simplified Chinese (`zh`,
|
|
4261
4763
|
* `zh-Hans`, `zh-CN`), `'stroke'` in Traditional Chinese (`zh-Hant`,
|
|
4262
|
-
* `zh-TW`, `zh-HK`), `'
|
|
4764
|
+
* `zh-TW`, `zh-HK`), `'gojuon'` in Japanese (`ja`, `ja-JP`),
|
|
4765
|
+
* `'letter'` in any other language.
|
|
4766
|
+
*
|
|
4767
|
+
* A Japanese index (or one grouped by `gojuon` or `kana`) sorts by the
|
|
4768
|
+
* entries' readings in JIS X 4061 order: symbols, digits, Latin (under
|
|
4769
|
+
* their letters), then the kana rows; katakana file as hiragana, small
|
|
4770
|
+
* kana as large, voiced as plain (清 < 濁 < 半濁 break the ties), ー as
|
|
4771
|
+
* the vowel before it. The reading is the mark's `yomi` (alias
|
|
4772
|
+
* `reading`), else the kana ruby of the marked text, else `sort`; an
|
|
4773
|
+
* entry with a kanji and no reading raises `indexReadingMissing` and
|
|
4774
|
+
* files after the kana, with no head.
|
|
4263
4775
|
*
|
|
4264
4776
|
* The entries sort in the collation the heads come from (a
|
|
4265
4777
|
* `zh-Hant` index grouped by pinyin sorts by pinyin). A browser without
|
|
@@ -4276,7 +4788,7 @@ export interface IndexConfig {
|
|
|
4276
4788
|
ignoreArticle?: boolean;
|
|
4277
4789
|
}
|
|
4278
4790
|
/** See {@link IndexConfig.groupBy}. */
|
|
4279
|
-
export type IndexGroupBy = 'auto' | 'letter' | 'pinyin' | 'stroke' | 'none';
|
|
4791
|
+
export type IndexGroupBy = 'auto' | 'letter' | 'pinyin' | 'stroke' | 'gojuon' | 'kana' | 'none';
|
|
4280
4792
|
export interface ResolvedIndexConfig {
|
|
4281
4793
|
fontFamily: string;
|
|
4282
4794
|
fontSize: Dimension;
|
|
@@ -4331,6 +4843,9 @@ export interface PostextConfig {
|
|
|
4331
4843
|
captionStyle?: CaptionStyleConfig;
|
|
4332
4844
|
/** Styling for embedded SVG diagrams (single-ink reproduction). */
|
|
4333
4845
|
diagramStyle?: DiagramStyleConfig;
|
|
4846
|
+
/** How video resources are printed (poster overlays: play mark, QR
|
|
4847
|
+
* code) and played (player options). */
|
|
4848
|
+
videoStyle?: VideoStyleConfig;
|
|
4334
4849
|
/** Named paragraph styles for `:::paragraphs{style="…"}` containers. */
|
|
4335
4850
|
paragraphStyles?: ParagraphStyleConfig[];
|
|
4336
4851
|
/** Named callout styles for `:::callout{type="…"}` containers. Defaults
|
|
@@ -4418,7 +4933,9 @@ export interface PostextConfig {
|
|
|
4418
4933
|
customFonts?: CustomFontFamily[];
|
|
4419
4934
|
/** User-definable resource categories (figures, tables, etc.) that drive
|
|
4420
4935
|
* typed numbering, caption prefixes, and inline references. Defaults to
|
|
4421
|
-
* the built-in 'figure' and '
|
|
4936
|
+
* the built-in 'figure', 'table' and 'video' types when unset (a list
|
|
4937
|
+
* with no 'video' type still numbers video resources typed `video` with
|
|
4938
|
+
* the built-in one), localised to the
|
|
4422
4939
|
* document language (`defaultResourceTypes(locale)`, where the language is
|
|
4423
4940
|
* {@link locale}, else `bodyText.hyphenation.locale`, else English). */
|
|
4424
4941
|
resourceTypes?: ResourceType[];
|