postext 1.27.0 → 1.28.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.
Files changed (544) hide show
  1. package/dist/__tests__/bundle/balloonPlacementPin.test.d.ts +2 -0
  2. package/dist/__tests__/bundle/balloonPlacementPin.test.d.ts.map +1 -0
  3. package/dist/__tests__/bundle/balloonPlacementPin.test.js +71 -0
  4. package/dist/__tests__/bundle/balloonPlacementPin.test.js.map +1 -0
  5. package/dist/__tests__/bundle/cjkRulesPin.test.js +131 -7
  6. package/dist/__tests__/bundle/cjkRulesPin.test.js.map +1 -1
  7. package/dist/__tests__/bundle/designOverflowPin.test.js +3 -3
  8. package/dist/__tests__/bundle/designOverflowPin.test.js.map +1 -1
  9. package/dist/__tests__/bundle/flowColumnsPin.test.js +3 -1
  10. package/dist/__tests__/bundle/flowColumnsPin.test.js.map +1 -1
  11. package/dist/__tests__/bundle/gridBalancingPin.test.js +14 -5
  12. package/dist/__tests__/bundle/gridBalancingPin.test.js.map +1 -1
  13. package/dist/__tests__/bundle/gridBreakRulesPin.test.d.ts +2 -0
  14. package/dist/__tests__/bundle/gridBreakRulesPin.test.d.ts.map +1 -0
  15. package/dist/__tests__/bundle/gridBreakRulesPin.test.js +144 -0
  16. package/dist/__tests__/bundle/gridBreakRulesPin.test.js.map +1 -0
  17. package/dist/__tests__/bundle/indexGroupSplitPin.test.d.ts +2 -0
  18. package/dist/__tests__/bundle/indexGroupSplitPin.test.d.ts.map +1 -0
  19. package/dist/__tests__/bundle/indexGroupSplitPin.test.js +55 -0
  20. package/dist/__tests__/bundle/indexGroupSplitPin.test.js.map +1 -0
  21. package/dist/__tests__/bundle/inlineCaptionSidePin.test.d.ts +2 -0
  22. package/dist/__tests__/bundle/inlineCaptionSidePin.test.d.ts.map +1 -0
  23. package/dist/__tests__/bundle/inlineCaptionSidePin.test.js +60 -0
  24. package/dist/__tests__/bundle/inlineCaptionSidePin.test.js.map +1 -0
  25. package/dist/__tests__/bundle/inlineTableSplitPin.test.js +3 -1
  26. package/dist/__tests__/bundle/inlineTableSplitPin.test.js.map +1 -1
  27. package/dist/__tests__/bundle/looseOrderPin.test.d.ts +2 -0
  28. package/dist/__tests__/bundle/looseOrderPin.test.d.ts.map +1 -0
  29. package/dist/__tests__/bundle/looseOrderPin.test.js +76 -0
  30. package/dist/__tests__/bundle/looseOrderPin.test.js.map +1 -0
  31. package/dist/__tests__/bundle/openerHeadFloatsPin.test.js +2 -1
  32. package/dist/__tests__/bundle/openerHeadFloatsPin.test.js.map +1 -1
  33. package/dist/__tests__/bundle/refLabelBreaksPin.test.d.ts +2 -0
  34. package/dist/__tests__/bundle/refLabelBreaksPin.test.d.ts.map +1 -0
  35. package/dist/__tests__/bundle/refLabelBreaksPin.test.js +72 -0
  36. package/dist/__tests__/bundle/refLabelBreaksPin.test.js.map +1 -0
  37. package/dist/__tests__/bundle/scriptContextPin.test.d.ts +2 -0
  38. package/dist/__tests__/bundle/scriptContextPin.test.d.ts.map +1 -0
  39. package/dist/__tests__/bundle/scriptContextPin.test.js +66 -0
  40. package/dist/__tests__/bundle/scriptContextPin.test.js.map +1 -0
  41. package/dist/__tests__/bundle/trailingStepPin.test.d.ts +2 -0
  42. package/dist/__tests__/bundle/trailingStepPin.test.d.ts.map +1 -0
  43. package/dist/__tests__/bundle/trailingStepPin.test.js +59 -0
  44. package/dist/__tests__/bundle/trailingStepPin.test.js.map +1 -0
  45. package/dist/__tests__/bundle/wideFloatStretchPin.test.d.ts +2 -0
  46. package/dist/__tests__/bundle/wideFloatStretchPin.test.d.ts.map +1 -0
  47. package/dist/__tests__/bundle/wideFloatStretchPin.test.js +59 -0
  48. package/dist/__tests__/bundle/wideFloatStretchPin.test.js.map +1 -0
  49. package/dist/__tests__/bundle.test.js +8 -6
  50. package/dist/__tests__/bundle.test.js.map +1 -1
  51. package/dist/__tests__/cjk/annotations.test.js +223 -0
  52. package/dist/__tests__/cjk/annotations.test.js.map +1 -1
  53. package/dist/__tests__/cjk/annotationsRender.test.js +3 -3
  54. package/dist/__tests__/cjk/annotationsRender.test.js.map +1 -1
  55. package/dist/__tests__/cjk/chipLatinSpacing.test.js +13 -2
  56. package/dist/__tests__/cjk/chipLatinSpacing.test.js.map +1 -1
  57. package/dist/__tests__/cjk/designNumberSeams.test.d.ts +2 -0
  58. package/dist/__tests__/cjk/designNumberSeams.test.d.ts.map +1 -0
  59. package/dist/__tests__/cjk/designNumberSeams.test.js +221 -0
  60. package/dist/__tests__/cjk/designNumberSeams.test.js.map +1 -0
  61. package/dist/__tests__/cjk/grid.test.js +1 -1
  62. package/dist/__tests__/cjk/grid.test.js.map +1 -1
  63. package/dist/__tests__/cjk/gridBalancing.test.js +3 -1
  64. package/dist/__tests__/cjk/gridBalancing.test.js.map +1 -1
  65. package/dist/__tests__/cjk/japaneseSpacing.test.js +3 -1
  66. package/dist/__tests__/cjk/japaneseSpacing.test.js.map +1 -1
  67. package/dist/__tests__/cjk/keepAll.test.js +3 -1
  68. package/dist/__tests__/cjk/keepAll.test.js.map +1 -1
  69. package/dist/__tests__/cjk/keepAllLatinQuotation.test.d.ts +2 -0
  70. package/dist/__tests__/cjk/keepAllLatinQuotation.test.d.ts.map +1 -0
  71. package/dist/__tests__/cjk/keepAllLatinQuotation.test.js +166 -0
  72. package/dist/__tests__/cjk/keepAllLatinQuotation.test.js.map +1 -0
  73. package/dist/__tests__/cjk/latinSpacingEdge.test.d.ts +2 -0
  74. package/dist/__tests__/cjk/latinSpacingEdge.test.d.ts.map +1 -0
  75. package/dist/__tests__/cjk/latinSpacingEdge.test.js +179 -0
  76. package/dist/__tests__/cjk/latinSpacingEdge.test.js.map +1 -0
  77. package/dist/__tests__/cjk/runt.test.js +92 -1
  78. package/dist/__tests__/cjk/runt.test.js.map +1 -1
  79. package/dist/__tests__/codeBlocks.test.js +1 -1
  80. package/dist/__tests__/columnBalancing.test.js +216 -0
  81. package/dist/__tests__/columnBalancing.test.js.map +1 -1
  82. package/dist/__tests__/columnRuleBands.test.js +78 -0
  83. package/dist/__tests__/columnRuleBands.test.js.map +1 -1
  84. package/dist/__tests__/comics/readingDirection.test.js +52 -0
  85. package/dist/__tests__/comics/readingDirection.test.js.map +1 -1
  86. package/dist/__tests__/comics/script.test.js +5 -0
  87. package/dist/__tests__/comics/script.test.js.map +1 -1
  88. package/dist/__tests__/contrast.test.d.ts +2 -0
  89. package/dist/__tests__/contrast.test.d.ts.map +1 -0
  90. package/dist/__tests__/contrast.test.js +258 -0
  91. package/dist/__tests__/contrast.test.js.map +1 -0
  92. package/dist/__tests__/defaults/cjk.test.js +4 -4
  93. package/dist/__tests__/defaults/cjk.test.js.map +1 -1
  94. package/dist/__tests__/defaults/gridBreakRules.test.d.ts +2 -0
  95. package/dist/__tests__/defaults/gridBreakRules.test.d.ts.map +1 -0
  96. package/dist/__tests__/defaults/gridBreakRules.test.js +152 -0
  97. package/dist/__tests__/defaults/gridBreakRules.test.js.map +1 -0
  98. package/dist/__tests__/defaults/headingsBalancing.test.js +25 -0
  99. package/dist/__tests__/defaults/headingsBalancing.test.js.map +1 -1
  100. package/dist/__tests__/defaults/stripContextDefaults.test.js +41 -0
  101. package/dist/__tests__/defaults/stripContextDefaults.test.js.map +1 -1
  102. package/dist/__tests__/defaults/stripRoundTrip.test.js +8 -5
  103. package/dist/__tests__/defaults/stripRoundTrip.test.js.map +1 -1
  104. package/dist/__tests__/exports.test.js +30 -0
  105. package/dist/__tests__/exports.test.js.map +1 -1
  106. package/dist/__tests__/fontUsage.test.d.ts +2 -0
  107. package/dist/__tests__/fontUsage.test.d.ts.map +1 -0
  108. package/dist/__tests__/fontUsage.test.js +113 -0
  109. package/dist/__tests__/fontUsage.test.js.map +1 -0
  110. package/dist/__tests__/hardBreaks.test.js +1 -1
  111. package/dist/__tests__/headingInlineMarks.test.js +7 -5
  112. package/dist/__tests__/headingInlineMarks.test.js.map +1 -1
  113. package/dist/__tests__/hyphenationRules.test.d.ts +2 -0
  114. package/dist/__tests__/hyphenationRules.test.d.ts.map +1 -0
  115. package/dist/__tests__/hyphenationRules.test.js +295 -0
  116. package/dist/__tests__/hyphenationRules.test.js.map +1 -0
  117. package/dist/__tests__/indexGroupSplit.test.d.ts +2 -0
  118. package/dist/__tests__/indexGroupSplit.test.d.ts.map +1 -0
  119. package/dist/__tests__/indexGroupSplit.test.js +175 -0
  120. package/dist/__tests__/indexGroupSplit.test.js.map +1 -0
  121. package/dist/__tests__/mathSizeMigration.test.js +7 -5
  122. package/dist/__tests__/mathSizeMigration.test.js.map +1 -1
  123. package/dist/__tests__/multipleColumns.test.js +19 -0
  124. package/dist/__tests__/multipleColumns.test.js.map +1 -1
  125. package/dist/__tests__/pipeline/calloutInlineResourceGap.test.js +1 -1
  126. package/dist/__tests__/pipeline/calloutSplitMinLinesChild.test.js +3 -3
  127. package/dist/__tests__/pipeline/calloutSplitMinLinesChild.test.js.map +1 -1
  128. package/dist/__tests__/pipeline/closingBandUnderOpener.test.d.ts +2 -0
  129. package/dist/__tests__/pipeline/closingBandUnderOpener.test.d.ts.map +1 -0
  130. package/dist/__tests__/pipeline/closingBandUnderOpener.test.js +90 -0
  131. package/dist/__tests__/pipeline/closingBandUnderOpener.test.js.map +1 -0
  132. package/dist/__tests__/pipeline/colonListRoom.test.js +5 -4
  133. package/dist/__tests__/pipeline/colonListRoom.test.js.map +1 -1
  134. package/dist/__tests__/pipeline/columnHeadSpace.test.d.ts +2 -0
  135. package/dist/__tests__/pipeline/columnHeadSpace.test.d.ts.map +1 -0
  136. package/dist/__tests__/pipeline/columnHeadSpace.test.js +175 -0
  137. package/dist/__tests__/pipeline/columnHeadSpace.test.js.map +1 -0
  138. package/dist/__tests__/pipeline/compoundBreaks.test.js +6 -6
  139. package/dist/__tests__/pipeline/compoundBreaks.test.js.map +1 -1
  140. package/dist/__tests__/pipeline/dashBreaks.test.js +5 -5
  141. package/dist/__tests__/pipeline/dashBreaks.test.js.map +1 -1
  142. package/dist/__tests__/pipeline/flowColumns.test.js +100 -0
  143. package/dist/__tests__/pipeline/flowColumns.test.js.map +1 -1
  144. package/dist/__tests__/pipeline/headingShortBand.test.js +2 -1
  145. package/dist/__tests__/pipeline/headingShortBand.test.js.map +1 -1
  146. package/dist/__tests__/pipeline/headingSplitOrphans.test.js +6 -5
  147. package/dist/__tests__/pipeline/headingSplitOrphans.test.js.map +1 -1
  148. package/dist/__tests__/pipeline/hyphenAcrossColumns.test.js +188 -1
  149. package/dist/__tests__/pipeline/hyphenAcrossColumns.test.js.map +1 -1
  150. package/dist/__tests__/pipeline/inlineCaptionSide.test.d.ts +2 -0
  151. package/dist/__tests__/pipeline/inlineCaptionSide.test.d.ts.map +1 -0
  152. package/dist/__tests__/pipeline/inlineCaptionSide.test.js +270 -0
  153. package/dist/__tests__/pipeline/inlineCaptionSide.test.js.map +1 -0
  154. package/dist/__tests__/pipeline/inlineFigureSpace.test.js +5 -5
  155. package/dist/__tests__/pipeline/inlineFigureSpace.test.js.map +1 -1
  156. package/dist/__tests__/pipeline/inlineRefRender.test.js +8 -6
  157. package/dist/__tests__/pipeline/inlineRefRender.test.js.map +1 -1
  158. package/dist/__tests__/pipeline/looseBeforeHeadingLines.test.d.ts +2 -0
  159. package/dist/__tests__/pipeline/looseBeforeHeadingLines.test.d.ts.map +1 -0
  160. package/dist/__tests__/pipeline/looseBeforeHeadingLines.test.js +73 -0
  161. package/dist/__tests__/pipeline/looseBeforeHeadingLines.test.js.map +1 -0
  162. package/dist/__tests__/pipeline/openerFloats.test.d.ts +2 -0
  163. package/dist/__tests__/pipeline/openerFloats.test.d.ts.map +1 -0
  164. package/dist/__tests__/pipeline/openerFloats.test.js +137 -0
  165. package/dist/__tests__/pipeline/openerFloats.test.js.map +1 -0
  166. package/dist/__tests__/pipeline/orderedNumberWidthItem.test.d.ts +2 -0
  167. package/dist/__tests__/pipeline/orderedNumberWidthItem.test.d.ts.map +1 -0
  168. package/dist/__tests__/pipeline/orderedNumberWidthItem.test.js +162 -0
  169. package/dist/__tests__/pipeline/orderedNumberWidthItem.test.js.map +1 -0
  170. package/dist/__tests__/pipeline/paragraphContainerTail.test.js +68 -8
  171. package/dist/__tests__/pipeline/paragraphContainerTail.test.js.map +1 -1
  172. package/dist/__tests__/pipeline/paragraphStyleFaces.test.js +1 -1
  173. package/dist/__tests__/pipeline/paragraphStyleFaces.test.js.map +1 -1
  174. package/dist/__tests__/pipeline/raggedLineAndRuntFix.test.d.ts +2 -0
  175. package/dist/__tests__/pipeline/raggedLineAndRuntFix.test.d.ts.map +1 -0
  176. package/dist/__tests__/pipeline/raggedLineAndRuntFix.test.js +151 -0
  177. package/dist/__tests__/pipeline/raggedLineAndRuntFix.test.js.map +1 -0
  178. package/dist/__tests__/pipeline/raggedOptimal.test.js +6 -6
  179. package/dist/__tests__/pipeline/raggedOptimal.test.js.map +1 -1
  180. package/dist/__tests__/pipeline/refLabelBreaks.test.d.ts +2 -0
  181. package/dist/__tests__/pipeline/refLabelBreaks.test.d.ts.map +1 -0
  182. package/dist/__tests__/pipeline/refLabelBreaks.test.js +324 -0
  183. package/dist/__tests__/pipeline/refLabelBreaks.test.js.map +1 -0
  184. package/dist/__tests__/pipeline/resourceTemplateStyles.test.d.ts +2 -0
  185. package/dist/__tests__/pipeline/resourceTemplateStyles.test.d.ts.map +1 -0
  186. package/dist/__tests__/pipeline/resourceTemplateStyles.test.js +145 -0
  187. package/dist/__tests__/pipeline/resourceTemplateStyles.test.js.map +1 -0
  188. package/dist/__tests__/pipeline/shortListSplit.test.d.ts +2 -0
  189. package/dist/__tests__/pipeline/shortListSplit.test.d.ts.map +1 -0
  190. package/dist/__tests__/pipeline/shortListSplit.test.js +181 -0
  191. package/dist/__tests__/pipeline/shortListSplit.test.js.map +1 -0
  192. package/dist/__tests__/pipeline/snapTailAtColumnFoot.test.d.ts +2 -0
  193. package/dist/__tests__/pipeline/snapTailAtColumnFoot.test.d.ts.map +1 -0
  194. package/dist/__tests__/pipeline/snapTailAtColumnFoot.test.js +133 -0
  195. package/dist/__tests__/pipeline/snapTailAtColumnFoot.test.js.map +1 -0
  196. package/dist/__tests__/pipeline/stretchAfterDisplays.test.d.ts +2 -0
  197. package/dist/__tests__/pipeline/stretchAfterDisplays.test.d.ts.map +1 -0
  198. package/dist/__tests__/pipeline/stretchAfterDisplays.test.js +51 -0
  199. package/dist/__tests__/pipeline/stretchAfterDisplays.test.js.map +1 -0
  200. package/dist/__tests__/pipeline/trailingCapFloatHead.test.js +26 -0
  201. package/dist/__tests__/pipeline/trailingCapFloatHead.test.js.map +1 -1
  202. package/dist/__tests__/pipeline/trailingStep.test.d.ts +2 -0
  203. package/dist/__tests__/pipeline/trailingStep.test.d.ts.map +1 -0
  204. package/dist/__tests__/pipeline/trailingStep.test.js +187 -0
  205. package/dist/__tests__/pipeline/trailingStep.test.js.map +1 -0
  206. package/dist/__tests__/pipeline/wideFloatStretch.test.d.ts +2 -0
  207. package/dist/__tests__/pipeline/wideFloatStretch.test.d.ts.map +1 -0
  208. package/dist/__tests__/pipeline/wideFloatStretch.test.js +84 -0
  209. package/dist/__tests__/pipeline/wideFloatStretch.test.js.map +1 -0
  210. package/dist/__tests__/scriptContext.test.d.ts +2 -0
  211. package/dist/__tests__/scriptContext.test.d.ts.map +1 -0
  212. package/dist/__tests__/scriptContext.test.js +919 -0
  213. package/dist/__tests__/scriptContext.test.js.map +1 -0
  214. package/dist/__tests__/softHyphenEdges.test.d.ts +2 -0
  215. package/dist/__tests__/softHyphenEdges.test.d.ts.map +1 -0
  216. package/dist/__tests__/softHyphenEdges.test.js +217 -0
  217. package/dist/__tests__/softHyphenEdges.test.js.map +1 -0
  218. package/dist/__tests__/spaceLimitRatio.test.d.ts +2 -0
  219. package/dist/__tests__/spaceLimitRatio.test.d.ts.map +1 -0
  220. package/dist/__tests__/spaceLimitRatio.test.js +226 -0
  221. package/dist/__tests__/spaceLimitRatio.test.js.map +1 -0
  222. package/dist/__tests__/trackedLigatures.test.js +365 -24
  223. package/dist/__tests__/trackedLigatures.test.js.map +1 -1
  224. package/dist/__tests__/verseLines.test.js +9 -7
  225. package/dist/__tests__/verseLines.test.js.map +1 -1
  226. package/dist/bundle/configVersion.d.ts +201 -6
  227. package/dist/bundle/configVersion.d.ts.map +1 -1
  228. package/dist/bundle/configVersion.js +440 -6
  229. package/dist/bundle/configVersion.js.map +1 -1
  230. package/dist/bundle/index.d.ts +8 -0
  231. package/dist/bundle/index.d.ts.map +1 -1
  232. package/dist/bundle/index.js +8 -0
  233. package/dist/bundle/index.js.map +1 -1
  234. package/dist/canvas-backend/blockRender.d.ts.map +1 -1
  235. package/dist/canvas-backend/blockRender.js +3 -2
  236. package/dist/canvas-backend/blockRender.js.map +1 -1
  237. package/dist/canvas-backend/chip.js +1 -1
  238. package/dist/canvas-backend/chip.js.map +1 -1
  239. package/dist/canvas-backend/headerFooter.d.ts.map +1 -1
  240. package/dist/canvas-backend/headerFooter.js +17 -2
  241. package/dist/canvas-backend/headerFooter.js.map +1 -1
  242. package/dist/canvas-backend/runDirection.d.ts +10 -6
  243. package/dist/canvas-backend/runDirection.d.ts.map +1 -1
  244. package/dist/canvas-backend/runDirection.js +12 -7
  245. package/dist/canvas-backend/runDirection.js.map +1 -1
  246. package/dist/canvas-backend/scriptText.d.ts +11 -0
  247. package/dist/canvas-backend/scriptText.d.ts.map +1 -0
  248. package/dist/canvas-backend/scriptText.js +75 -0
  249. package/dist/canvas-backend/scriptText.js.map +1 -0
  250. package/dist/canvas-backend/segmentText.d.ts.map +1 -1
  251. package/dist/canvas-backend/segmentText.js +9 -1
  252. package/dist/canvas-backend/segmentText.js.map +1 -1
  253. package/dist/canvas-backend/trackedText.d.ts +35 -20
  254. package/dist/canvas-backend/trackedText.d.ts.map +1 -1
  255. package/dist/canvas-backend/trackedText.js +58 -22
  256. package/dist/canvas-backend/trackedText.js.map +1 -1
  257. package/dist/canvas-backend/verticalText.d.ts.map +1 -1
  258. package/dist/canvas-backend/verticalText.js +10 -2
  259. package/dist/canvas-backend/verticalText.js.map +1 -1
  260. package/dist/canvas-backend/wordRuns.d.ts +14 -5
  261. package/dist/canvas-backend/wordRuns.d.ts.map +1 -1
  262. package/dist/canvas-backend/wordRuns.js +20 -7
  263. package/dist/canvas-backend/wordRuns.js.map +1 -1
  264. package/dist/citations/names.d.ts +8 -0
  265. package/dist/citations/names.d.ts.map +1 -0
  266. package/dist/citations/names.js +25 -0
  267. package/dist/citations/names.js.map +1 -0
  268. package/dist/columnClip.d.ts +8 -1
  269. package/dist/columnClip.d.ts.map +1 -1
  270. package/dist/columnClip.js +32 -3
  271. package/dist/columnClip.js.map +1 -1
  272. package/dist/columnRule.d.ts +6 -3
  273. package/dist/columnRule.d.ts.map +1 -1
  274. package/dist/columnRule.js +6 -3
  275. package/dist/columnRule.js.map +1 -1
  276. package/dist/comics/layoutPage.d.ts.map +1 -1
  277. package/dist/comics/layoutPage.js +51 -22
  278. package/dist/comics/layoutPage.js.map +1 -1
  279. package/dist/comics/lettering/__tests__/bystanderFaces.test.d.ts +2 -0
  280. package/dist/comics/lettering/__tests__/bystanderFaces.test.d.ts.map +1 -0
  281. package/dist/comics/lettering/__tests__/bystanderFaces.test.js +204 -0
  282. package/dist/comics/lettering/__tests__/bystanderFaces.test.js.map +1 -0
  283. package/dist/comics/lettering/__tests__/shapeTextDash.test.d.ts +2 -0
  284. package/dist/comics/lettering/__tests__/shapeTextDash.test.d.ts.map +1 -0
  285. package/dist/comics/lettering/__tests__/shapeTextDash.test.js +173 -0
  286. package/dist/comics/lettering/__tests__/shapeTextDash.test.js.map +1 -0
  287. package/dist/comics/lettering/__tests__/strictPlacement.test.d.ts +2 -0
  288. package/dist/comics/lettering/__tests__/strictPlacement.test.d.ts.map +1 -0
  289. package/dist/comics/lettering/__tests__/strictPlacement.test.js +130 -0
  290. package/dist/comics/lettering/__tests__/strictPlacement.test.js.map +1 -0
  291. package/dist/comics/lettering/letter.js +21 -8
  292. package/dist/comics/lettering/letter.js.map +1 -1
  293. package/dist/comics/lettering/placement.d.ts.map +1 -1
  294. package/dist/comics/lettering/placement.js +12 -3
  295. package/dist/comics/lettering/placement.js.map +1 -1
  296. package/dist/comics/lettering/shape-text.d.ts +3 -0
  297. package/dist/comics/lettering/shape-text.d.ts.map +1 -1
  298. package/dist/comics/lettering/shape-text.js +71 -12
  299. package/dist/comics/lettering/shape-text.js.map +1 -1
  300. package/dist/comics/lettering/text.d.ts +5 -0
  301. package/dist/comics/lettering/text.d.ts.map +1 -1
  302. package/dist/comics/lettering/text.js +6 -1
  303. package/dist/comics/lettering/text.js.map +1 -1
  304. package/dist/comics/lettering/types.d.ts +12 -2
  305. package/dist/comics/lettering/types.d.ts.map +1 -1
  306. package/dist/comics/script.js +1 -1
  307. package/dist/comics/script.js.map +1 -1
  308. package/dist/comics/types.d.ts +7 -3
  309. package/dist/comics/types.d.ts.map +1 -1
  310. package/dist/configWarnings.d.ts.map +1 -1
  311. package/dist/configWarnings.js +33 -6
  312. package/dist/configWarnings.js.map +1 -1
  313. package/dist/contrast.d.ts +188 -0
  314. package/dist/contrast.d.ts.map +1 -0
  315. package/dist/contrast.js +583 -0
  316. package/dist/contrast.js.map +1 -0
  317. package/dist/defaults/bodyText.d.ts +31 -3
  318. package/dist/defaults/bodyText.d.ts.map +1 -1
  319. package/dist/defaults/bodyText.js +76 -8
  320. package/dist/defaults/bodyText.js.map +1 -1
  321. package/dist/defaults/citations.d.ts.map +1 -1
  322. package/dist/defaults/citations.js +4 -0
  323. package/dist/defaults/citations.js.map +1 -1
  324. package/dist/defaults/cjk.d.ts +11 -1
  325. package/dist/defaults/cjk.d.ts.map +1 -1
  326. package/dist/defaults/cjk.js +41 -3
  327. package/dist/defaults/cjk.js.map +1 -1
  328. package/dist/defaults/comics.d.ts.map +1 -1
  329. package/dist/defaults/comics.js +2 -0
  330. package/dist/defaults/comics.js.map +1 -1
  331. package/dist/defaults/contrast.d.ts +11 -0
  332. package/dist/defaults/contrast.d.ts.map +1 -0
  333. package/dist/defaults/contrast.js +65 -0
  334. package/dist/defaults/contrast.js.map +1 -0
  335. package/dist/defaults/crossRefs.d.ts +1 -1
  336. package/dist/defaults/crossRefs.d.ts.map +1 -1
  337. package/dist/defaults/crossRefs.js +6 -1
  338. package/dist/defaults/crossRefs.js.map +1 -1
  339. package/dist/defaults/footnotes.d.ts.map +1 -1
  340. package/dist/defaults/footnotes.js +5 -0
  341. package/dist/defaults/footnotes.js.map +1 -1
  342. package/dist/defaults/headings.d.ts +5 -1
  343. package/dist/defaults/headings.d.ts.map +1 -1
  344. package/dist/defaults/headings.js +41 -1
  345. package/dist/defaults/headings.js.map +1 -1
  346. package/dist/defaults/index.d.ts +3 -2
  347. package/dist/defaults/index.d.ts.map +1 -1
  348. package/dist/defaults/index.js +15 -4
  349. package/dist/defaults/index.js.map +1 -1
  350. package/dist/defaults/indexConfig.d.ts +1 -0
  351. package/dist/defaults/indexConfig.d.ts.map +1 -1
  352. package/dist/defaults/indexConfig.js +7 -1
  353. package/dist/defaults/indexConfig.js.map +1 -1
  354. package/dist/defaults/layout.d.ts.map +1 -1
  355. package/dist/defaults/layout.js +13 -1
  356. package/dist/defaults/layout.js.map +1 -1
  357. package/dist/defaults/orderedLists.js +1 -1
  358. package/dist/defaults/orderedLists.js.map +1 -1
  359. package/dist/defaults/paragraphStyles.d.ts.map +1 -1
  360. package/dist/defaults/paragraphStyles.js +5 -0
  361. package/dist/defaults/paragraphStyles.js.map +1 -1
  362. package/dist/defaults/shared.d.ts +4 -1
  363. package/dist/defaults/shared.d.ts.map +1 -1
  364. package/dist/defaults/shared.js +5 -0
  365. package/dist/defaults/shared.js.map +1 -1
  366. package/dist/design/cjkText.d.ts +7 -2
  367. package/dist/design/cjkText.d.ts.map +1 -1
  368. package/dist/design/cjkText.js +8 -2
  369. package/dist/design/cjkText.js.map +1 -1
  370. package/dist/design/layout.d.ts.map +1 -1
  371. package/dist/design/layout.js +85 -12
  372. package/dist/design/layout.js.map +1 -1
  373. package/dist/design/richText.d.ts.map +1 -1
  374. package/dist/design/richText.js +7 -3
  375. package/dist/design/richText.js.map +1 -1
  376. package/dist/fonts/usage.d.ts.map +1 -1
  377. package/dist/fonts/usage.js +89 -0
  378. package/dist/fonts/usage.js.map +1 -1
  379. package/dist/html-backend.d.ts.map +1 -1
  380. package/dist/html-backend.js +97 -27
  381. package/dist/html-backend.js.map +1 -1
  382. package/dist/hyphenate.d.ts +58 -1
  383. package/dist/hyphenate.d.ts.map +1 -1
  384. package/dist/hyphenate.js +228 -19
  385. package/dist/hyphenate.js.map +1 -1
  386. package/dist/hyphenationExceptions.d.ts +10 -0
  387. package/dist/hyphenationExceptions.d.ts.map +1 -0
  388. package/dist/hyphenationExceptions.js +29 -0
  389. package/dist/hyphenationExceptions.js.map +1 -0
  390. package/dist/index.d.ts +12 -4
  391. package/dist/index.d.ts.map +1 -1
  392. package/dist/index.js +10 -3
  393. package/dist/index.js.map +1 -1
  394. package/dist/knuthPlass/pretextAdapter.d.ts.map +1 -1
  395. package/dist/knuthPlass/pretextAdapter.js +4 -17
  396. package/dist/knuthPlass/pretextAdapter.js.map +1 -1
  397. package/dist/knuthPlass/richAdapter.d.ts +9 -0
  398. package/dist/knuthPlass/richAdapter.d.ts.map +1 -1
  399. package/dist/knuthPlass/richAdapter.js +15 -18
  400. package/dist/knuthPlass/richAdapter.js.map +1 -1
  401. package/dist/looseLines.d.ts +15 -4
  402. package/dist/looseLines.d.ts.map +1 -1
  403. package/dist/looseLines.js +17 -4
  404. package/dist/looseLines.js.map +1 -1
  405. package/dist/measure/cache.d.ts.map +1 -1
  406. package/dist/measure/cache.js +14 -4
  407. package/dist/measure/cache.js.map +1 -1
  408. package/dist/measure/canvas.d.ts +18 -0
  409. package/dist/measure/canvas.d.ts.map +1 -1
  410. package/dist/measure/canvas.js +104 -0
  411. package/dist/measure/canvas.js.map +1 -1
  412. package/dist/measure/cjkAnnotate.d.ts +11 -6
  413. package/dist/measure/cjkAnnotate.d.ts.map +1 -1
  414. package/dist/measure/cjkAnnotate.js +27 -11
  415. package/dist/measure/cjkAnnotate.js.map +1 -1
  416. package/dist/measure/cjkCompose.d.ts +6 -2
  417. package/dist/measure/cjkCompose.d.ts.map +1 -1
  418. package/dist/measure/cjkCompose.js +146 -30
  419. package/dist/measure/cjkCompose.js.map +1 -1
  420. package/dist/measure/cjkPunctuation.d.ts +17 -0
  421. package/dist/measure/cjkPunctuation.d.ts.map +1 -1
  422. package/dist/measure/cjkPunctuation.js +15 -1
  423. package/dist/measure/cjkPunctuation.js.map +1 -1
  424. package/dist/measure/font.d.ts +2 -1
  425. package/dist/measure/font.d.ts.map +1 -1
  426. package/dist/measure/font.js +4 -2
  427. package/dist/measure/font.js.map +1 -1
  428. package/dist/measure/hardBreaks.d.ts.map +1 -1
  429. package/dist/measure/hardBreaks.js +6 -2
  430. package/dist/measure/hardBreaks.js.map +1 -1
  431. package/dist/measure/kashida.d.ts.map +1 -1
  432. package/dist/measure/kashida.js +8 -11
  433. package/dist/measure/kashida.js.map +1 -1
  434. package/dist/measure/plain.d.ts +3 -0
  435. package/dist/measure/plain.d.ts.map +1 -1
  436. package/dist/measure/plain.js +70 -5
  437. package/dist/measure/plain.js.map +1 -1
  438. package/dist/measure/rich.d.ts +32 -0
  439. package/dist/measure/rich.d.ts.map +1 -1
  440. package/dist/measure/rich.js +227 -35
  441. package/dist/measure/rich.js.map +1 -1
  442. package/dist/measure/script.d.ts +180 -0
  443. package/dist/measure/script.d.ts.map +1 -0
  444. package/dist/measure/script.js +329 -0
  445. package/dist/measure/script.js.map +1 -0
  446. package/dist/measure/spaceRatios.d.ts +28 -0
  447. package/dist/measure/spaceRatios.d.ts.map +1 -0
  448. package/dist/measure/spaceRatios.js +48 -0
  449. package/dist/measure/spaceRatios.js.map +1 -0
  450. package/dist/measure/spaces.d.ts +10 -0
  451. package/dist/measure/spaces.d.ts.map +1 -1
  452. package/dist/measure/spaces.js +36 -0
  453. package/dist/measure/spaces.js.map +1 -1
  454. package/dist/measure/types.d.ts +9 -0
  455. package/dist/measure/types.d.ts.map +1 -1
  456. package/dist/measure/types.js.map +1 -1
  457. package/dist/numbering.d.ts +5 -0
  458. package/dist/numbering.d.ts.map +1 -1
  459. package/dist/numbering.js +5 -1
  460. package/dist/numbering.js.map +1 -1
  461. package/dist/parse/types.d.ts +13 -0
  462. package/dist/parse/types.d.ts.map +1 -1
  463. package/dist/pipeline/bandCaps.d.ts +35 -1
  464. package/dist/pipeline/bandCaps.d.ts.map +1 -1
  465. package/dist/pipeline/bandCaps.js +95 -3
  466. package/dist/pipeline/bandCaps.js.map +1 -1
  467. package/dist/pipeline/build.d.ts.map +1 -1
  468. package/dist/pipeline/build.js +754 -49
  469. package/dist/pipeline/build.js.map +1 -1
  470. package/dist/pipeline/buildHelpers.d.ts.map +1 -1
  471. package/dist/pipeline/buildHelpers.js +5 -1
  472. package/dist/pipeline/buildHelpers.js.map +1 -1
  473. package/dist/pipeline/buildMeasurement.d.ts +9 -0
  474. package/dist/pipeline/buildMeasurement.d.ts.map +1 -1
  475. package/dist/pipeline/buildMeasurement.js +3 -2
  476. package/dist/pipeline/buildMeasurement.js.map +1 -1
  477. package/dist/pipeline/calloutLayout.d.ts +10 -1
  478. package/dist/pipeline/calloutLayout.d.ts.map +1 -1
  479. package/dist/pipeline/calloutLayout.js +45 -9
  480. package/dist/pipeline/calloutLayout.js.map +1 -1
  481. package/dist/pipeline/columnBalancing.d.ts +44 -7
  482. package/dist/pipeline/columnBalancing.d.ts.map +1 -1
  483. package/dist/pipeline/columnBalancing.js +167 -40
  484. package/dist/pipeline/columnBalancing.js.map +1 -1
  485. package/dist/pipeline/config.d.ts +2 -2
  486. package/dist/pipeline/config.d.ts.map +1 -1
  487. package/dist/pipeline/config.js +18 -3
  488. package/dist/pipeline/config.js.map +1 -1
  489. package/dist/pipeline/contentWarnings.d.ts +6 -0
  490. package/dist/pipeline/contentWarnings.d.ts.map +1 -1
  491. package/dist/pipeline/contentWarnings.js +32 -0
  492. package/dist/pipeline/contentWarnings.js.map +1 -1
  493. package/dist/pipeline/crossRefs.d.ts +12 -1
  494. package/dist/pipeline/crossRefs.d.ts.map +1 -1
  495. package/dist/pipeline/crossRefs.js +22 -14
  496. package/dist/pipeline/crossRefs.js.map +1 -1
  497. package/dist/pipeline/flowColumns.d.ts +2 -1
  498. package/dist/pipeline/flowColumns.d.ts.map +1 -1
  499. package/dist/pipeline/flowColumns.js +12 -2
  500. package/dist/pipeline/flowColumns.js.map +1 -1
  501. package/dist/pipeline/footnotes.d.ts.map +1 -1
  502. package/dist/pipeline/footnotes.js +3 -0
  503. package/dist/pipeline/footnotes.js.map +1 -1
  504. package/dist/pipeline/indexDirective.d.ts.map +1 -1
  505. package/dist/pipeline/indexDirective.js +15 -0
  506. package/dist/pipeline/indexDirective.js.map +1 -1
  507. package/dist/pipeline/lists.d.ts +1 -1
  508. package/dist/pipeline/lists.d.ts.map +1 -1
  509. package/dist/pipeline/lists.js +9 -1
  510. package/dist/pipeline/lists.js.map +1 -1
  511. package/dist/pipeline/measureContentBlock.d.ts +18 -0
  512. package/dist/pipeline/measureContentBlock.d.ts.map +1 -1
  513. package/dist/pipeline/measureContentBlock.js +13 -3
  514. package/dist/pipeline/measureContentBlock.js.map +1 -1
  515. package/dist/pipeline/paragraphContainers.d.ts +4 -1
  516. package/dist/pipeline/paragraphContainers.d.ts.map +1 -1
  517. package/dist/pipeline/paragraphContainers.js +2 -0
  518. package/dist/pipeline/paragraphContainers.js.map +1 -1
  519. package/dist/pipeline/placement.d.ts +15 -0
  520. package/dist/pipeline/placement.d.ts.map +1 -1
  521. package/dist/pipeline/placement.js +36 -4
  522. package/dist/pipeline/placement.js.map +1 -1
  523. package/dist/pipeline/raggedLines.d.ts +8 -6
  524. package/dist/pipeline/raggedLines.d.ts.map +1 -1
  525. package/dist/pipeline/raggedLines.js +13 -10
  526. package/dist/pipeline/raggedLines.js.map +1 -1
  527. package/dist/pipeline/resourceLayout.d.ts +4 -0
  528. package/dist/pipeline/resourceLayout.d.ts.map +1 -1
  529. package/dist/pipeline/resourceLayout.js +22 -7
  530. package/dist/pipeline/resourceLayout.js.map +1 -1
  531. package/dist/pipeline/resourceNumbering.d.ts +6 -3
  532. package/dist/pipeline/resourceNumbering.d.ts.map +1 -1
  533. package/dist/pipeline/resourceNumbering.js +36 -19
  534. package/dist/pipeline/resourceNumbering.js.map +1 -1
  535. package/dist/pipeline/toc.d.ts +0 -3
  536. package/dist/pipeline/toc.d.ts.map +1 -1
  537. package/dist/pipeline/toc.js +19 -2
  538. package/dist/pipeline/toc.js.map +1 -1
  539. package/dist/types.d.ts +411 -15
  540. package/dist/types.d.ts.map +1 -1
  541. package/dist/vdt.d.ts +90 -7
  542. package/dist/vdt.d.ts.map +1 -1
  543. package/dist/vdt.js.map +1 -1
  544. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -86,7 +86,12 @@ export interface ResourcePlacement {
86
86
  * a `oneAndHalf` layout (`layout.sideColumnRole: 'floats'`): the body
87
87
  * keeps its column, the caption goes to the margin level with the
88
88
  * figure's top (its bottom for a bottom float). A page without such a
89
- * column keeps the caption under the figure. Column floats only. */
89
+ * column keeps the caption under the figure. For a column float, and
90
+ * for a resource set where its `::resource` line stands (`position:
91
+ * 'here'`, #729, `layout.inlineCaptionSide`): there the caption stands
92
+ * level with the body's top when the side column is free over its
93
+ * band, else under the body. Not for a page-span or rotated resource,
94
+ * one inside a box, or one text wraps round. */
90
95
  captionSide?: boolean;
91
96
  /** Scale a floated picture (bitmap, SVG, a video's poster) down, keeping
92
97
  * its proportions, to the room a slot has, instead of moving it on
@@ -190,7 +195,11 @@ export interface ResourceType {
190
195
  /** Compact label used in inline references (e.g. "Fig."). */
191
196
  shortLabel: string;
192
197
  /** Template for the computed number. Placeholders: `{n}` (the counter),
193
- * `{h1}`..`{h6}` (current heading numbers). E.g. `'{h1}.{n}'`. `''`
198
+ * `{h1}`..`{h6}` (current heading numbers). E.g. `'{h1}.{n}'`. A token
199
+ * takes the style a heading template's does after a colon (#730):
200
+ * `'{h1:A}.{n}'` prints "A.1" under a lettered appendix, `'{h1:I}.{n}'`
201
+ * "II.3", and `{n:i}` wins over `counterFormat` for that token. Without
202
+ * one a heading number is decimal and `{n}` follows `counterFormat`. `''`
194
203
  * prints no number: the caption reads "Do. Caption" and a reference the
195
204
  * label alone, though the counter still counts. */
196
205
  numberingTemplate: string;
@@ -520,6 +529,11 @@ export interface Resource {
520
529
  /** Regions of a comic panel's picture no balloon covers (a hand, a key
521
530
  * object), in fractions of the picture. Only comic panels read them. */
522
531
  avoid?: ResourceSafeArea[];
532
+ /** The faces of people in a comic panel's picture who do not speak
533
+ * (#726): no balloon covers them, at any fallback, as it covers no
534
+ * speaker's `face`; a balloon that still does is reported. In fractions
535
+ * of the picture. Only comic panels read them. */
536
+ faces?: ResourceSafeArea[];
523
537
  /** Optional per-resource placement override. When unset, the resource's
524
538
  * type default (then `top` / `column`) applies. A `position` of `'top'` or
525
539
  * `'bottom'` floats the resource to a band on the page near its first
@@ -1022,6 +1036,20 @@ export interface LayoutConfig {
1022
1036
  * read with `false` when it sets a page-span heading (see
1023
1037
  * `migrateConfig` in `postext/bundle`). */
1024
1038
  floatsUnderOpener?: boolean;
1039
+ /** Floats on an opener page (#749): the page a part opens, the page a
1040
+ * heading opens with its own break (`breakBefore`, or a `span: 'page'`
1041
+ * heading that opens a page), and the first page of a document that
1042
+ * starts with a heading. A float is a figure, a table or a comic strip
1043
+ * with a floating placement, or a `:::callout` floated to the head or
1044
+ * foot (`placement: 'top' | 'bottom' | 'auto'`), in a column, across
1045
+ * the page or in the side column; an inline (`'here'`) resource, a
1046
+ * `'fixed'` box and a `span: 'side'` box are not. `'allow'` (the
1047
+ * default) sets floats there as on any page. `'warn'` lays the page out
1048
+ * the same and reports each float on it (an `openerFloat` content
1049
+ * warning). `'avoid'` keeps the opener page clear: a float that would
1050
+ * land there takes the first free slot after it, so the page holds the
1051
+ * opener and text alone. */
1052
+ openerFloats?: CompositionRule;
1025
1053
  /** Where an inline resource (`placement.position: 'here'`, embedded with
1026
1054
  * `::resource`) keeps the float gap, a line: `'around'` keeps it above
1027
1055
  * and below the resource, and the text after it goes back onto the
@@ -1032,6 +1060,16 @@ export interface LayoutConfig {
1032
1060
  * when its chapters embed a resource (see `migrateConfig` in
1033
1061
  * `postext/bundle`). */
1034
1062
  inlineResourceGap?: InlineResourceGap;
1063
+ /** Whether `placement.captionSide` acts on a resource set in the text
1064
+ * (`position: 'here'`) as it does on a column float (#729): its caption
1065
+ * and note go to the float-only side column of a `oneAndHalf` layout,
1066
+ * level with the top of the body, and the block in the text column is
1067
+ * as tall as the body alone. Default `true`. `false`: `captionSide`
1068
+ * acts on column floats only, as up to postext 1.27 (a `oneAndHalf`
1069
+ * configuration stored by an earlier version is read with `false` when
1070
+ * its chapters embed a resource, see `migrateConfig` in
1071
+ * `postext/bundle`). */
1072
+ inlineCaptionSide?: boolean;
1035
1073
  /** Whether an inline resource inside a box (`:::callout`) keeps the gap
1036
1074
  * {@link inlineResourceGap} sets, a line of the box's own text: above
1037
1075
  * the resource, and below it with `'around'`, the larger of it and the
@@ -1120,7 +1158,9 @@ export interface ResolvedLayoutConfig {
1120
1158
  maxTopFraction: number;
1121
1159
  hugClosingFloats: boolean;
1122
1160
  floatsUnderOpener: boolean;
1161
+ openerFloats: CompositionRule;
1123
1162
  inlineResourceGap: InlineResourceGap;
1163
+ inlineCaptionSide: boolean;
1124
1164
  inlineResourceGapInBoxes: boolean;
1125
1165
  flowColumns: boolean;
1126
1166
  boxChildSplitMinLines: number;
@@ -1192,6 +1232,31 @@ export interface HyphenationConfig {
1192
1232
  * and boxes; captions, notes, table cells and the contents keep dividing
1193
1233
  * compounds. */
1194
1234
  compounds?: boolean;
1235
+ /** Words the dictionary must not divide, or may divide only where the
1236
+ * entry says (#699), as in TeX's `\hyphenation{…}`. An entry is one word:
1237
+ * written without a hyphen (`'Alice'`) it is never divided; written with
1238
+ * hyphens (`'You-Tube'`) it is divided only at those points. It matches a
1239
+ * run of letters inside a word as written, so `(Alice,` and `Alice’s`
1240
+ * match `Alice` and a compound is matched part by part; an inflected form
1241
+ * is another entry. An entry in lower case matches the word in any case
1242
+ * (`'blender'` covers `Blender` and `BLENDER`); one with an initial
1243
+ * capital matches only the occurrences that start with a capital, so
1244
+ * `'Rose'` keeps the name whole and leaves `rose` to the dictionary. A
1245
+ * soft hyphen typed in an occurrence still decides that occurrence, and a
1246
+ * word wider than its whole measure is still divided. Applies wherever
1247
+ * the dictionary runs: body, headings, lists, boxes, captions, table
1248
+ * cells, notes, running heads and the other design text. Default none. */
1249
+ exceptions?: string[];
1250
+ /** Divide capitalised words like any other. Default `true`. `false`: the
1251
+ * dictionary adds no break inside a run of letters that starts with a
1252
+ * capital (`Alice`, `Ámsterdam`, `UNESCO`, the `Alembert` of
1253
+ * `d’Alembert`), the first word of a sentence included: InDesign's
1254
+ * "Hyphenate Capitalized Words" switched off, TeX's `\uchyph=0`. Of no
1255
+ * use in German, which capitalises every noun: name the words in
1256
+ * {@link exceptions}, or keep the cited authors whole with
1257
+ * `citations.hyphenateNames`. An entry of `exceptions` with points still
1258
+ * divides its word there. */
1259
+ capitalized?: boolean;
1195
1260
  }
1196
1261
  export interface ResolvedHyphenationConfig {
1197
1262
  enabled: boolean;
@@ -1204,6 +1269,10 @@ export interface ResolvedHyphenationConfig {
1204
1269
  ragged: boolean;
1205
1270
  zone: Dimension;
1206
1271
  compounds: boolean;
1272
+ /** The words of `HyphenationConfig.exceptions`, trimmed, checked, without
1273
+ * duplicates and sorted; absent when the document names none. */
1274
+ exceptions?: string[];
1275
+ capitalized: boolean;
1207
1276
  }
1208
1277
  /** `BodyTextConfig.kashida`. */
1209
1278
  export type KashidaSetting = 'auto' | 'none';
@@ -1367,6 +1436,41 @@ export interface BodyTextConfig {
1367
1436
  * `pinLegacyHardBreaks`). Titles (`\\` in a heading), captions, notes
1368
1437
  * and table cells break at `\\` either way. */
1369
1438
  hardLineBreaks?: boolean;
1439
+ /** Shape a word with no letter (`46.`, `1367)`, `».`: digits,
1440
+ * punctuation or symbols alone) in the script of the text around it
1441
+ * (#725). Such a word has no script of its own, and a face may draw its
1442
+ * marks by script: Amiri sets a Latin full stop, brackets and guillemets
1443
+ * under Latin and Arabic ones otherwise, of other widths. Left alone,
1444
+ * each shaper picks a script by its own rule (one version of a browser
1445
+ * the font's default, the next Latin, the PDF the default), so a
1446
+ * document broke its lines otherwise from one browser to another and
1447
+ * its PDF set glyphs of another width in the measured places. With
1448
+ * this on, a word painted left to right takes the script of the nearest
1449
+ * letter before it in its isolate, else after it; one painted right to
1450
+ * left (a bracket or a full stop at a right-to-left level) the script
1451
+ * of the nearest right-to-left letter; with no letter near, the script
1452
+ * of the document's language. A piece with no letter of a word that
1453
+ * has one (`10.1006/` and `.2001` of a DOI that ends a line at its
1454
+ * joints, what a cut leaves of a word wider than its line) takes the
1455
+ * script it has inside the word. In a Chinese or Japanese document a
1456
+ * doubled ellipsis or dash (`……`, `——`) in a word with no letter is
1457
+ * the document's own mark, set in the forms of Han text whatever
1458
+ * sentence cites it. The layout measures it in that script
1459
+ * and says so on its segment (`VDTLineSegment.scriptContext`), and the
1460
+ * canvas, the HTML, the fixed-layout EPUB and the PDF paint those
1461
+ * forms at that width. It acts on Latin, Greek, Cyrillic, Arabic and
1462
+ * Hebrew contexts, and only in a face whose punctuation or digits
1463
+ * change with the script (asked once a face): every other face is laid
1464
+ * out and painted as before. It governs the running text, headings,
1465
+ * lists, captions, notes and table cells, and the leader of dots of a
1466
+ * contents entry (in the script of the document's language); in such a
1467
+ * face a right-to-left word is also measured as it is painted, right to
1468
+ * left, so a bracket or a stop at its edge takes one width in every
1469
+ * browser. Design text (running heads, openers), list markers, comic
1470
+ * lettering and paragraphs set by the CJK composer are not touched. Default `true`. `false` shapes such a word alone, as up
1471
+ * to postext 1.27 (configurations stored before `configVersion` 12
1472
+ * read with it, see `pinLegacyScriptContext` in `postext/bundle`). */
1473
+ scriptContext?: boolean;
1370
1474
  /** Tab stops of every paragraph, list item and quotation (#622): where a
1371
1475
  * tab (`:tab`, or a tab character in the text) sends the words after
1372
1476
  * it. A paragraph style or a callout body that sets its own replaces
@@ -1396,7 +1500,9 @@ export interface BodyTextConfig {
1396
1500
  * attribute of the same name overrides the setting for its poem. */
1397
1501
  verse?: VerseConfig;
1398
1502
  /** When true, discourage a paragraph from ending with fewer than `orphanMinLines`
1399
- * lines at the top of the next column. Soft (penalty-based). Default true. */
1503
+ * lines at the top of the next column. Soft (penalty-based). Default true;
1504
+ * false on a character grid (`cjk.grid`) in the Japan region, where a
1505
+ * page holds the lines its grid counts (#717, `avoidOrphansByDefault`). */
1400
1506
  avoidOrphans?: boolean;
1401
1507
  /** Minimum lines required at the top of the next column when a paragraph is split.
1402
1508
  * Only effective when `avoidOrphans` is true. Default 2. */
@@ -1410,7 +1516,8 @@ export interface BodyTextConfig {
1410
1516
  * Only effective when `avoidOrphans` is true. Default true. */
1411
1517
  avoidOrphansInLists?: boolean;
1412
1518
  /** When true, discourage a paragraph from starting with fewer than `widowMinLines`
1413
- * lines at the bottom of the current column. Soft (penalty-based). Default true. */
1519
+ * lines at the bottom of the current column. Soft (penalty-based). Default true;
1520
+ * false on a character grid (`cjk.grid`, #717, `avoidWidowsByDefault`). */
1414
1521
  avoidWidows?: boolean;
1415
1522
  /** Minimum lines required at the bottom of the current column when a paragraph is
1416
1523
  * split. Only effective when `avoidWidows` is true. Default 2. */
@@ -1421,6 +1528,25 @@ export interface BodyTextConfig {
1421
1528
  /** When true, list items also receive widow protection (not just paragraphs).
1422
1529
  * Only effective when `avoidWidows` is true. Default true. */
1423
1530
  avoidWidowsInLists?: boolean;
1531
+ /** A short list cut between two columns or pages (#749): one of up to
1532
+ * `shortListMaxItems` items, in the running text. `avoidOrphansInLists`
1533
+ * and `avoidWidowsInLists` keep the lines of one item together; this
1534
+ * rule keeps the items of one list together. `'allow'` (the default)
1535
+ * cuts such a list wherever the column ends, as any other. `'warn'`
1536
+ * lays it out the same and reports each list cut (a `shortListSplit`
1537
+ * content warning). `'avoid'` sets the list whole: when it does not fit
1538
+ * under what the column holds it opens the next column, the headings
1539
+ * right above it and the colon line that introduces it
1540
+ * (`keepColonWithList`) going with it. A float offered the foot of the
1541
+ * column the list stands whole in takes its next slot instead, and the
1542
+ * colon line counts the room a figure it cites will take there. A list
1543
+ * taller than an empty column is cut as any other, and reported. Lists inside a `:::callout`
1544
+ * follow the box's own cut rules, and the entries of `:::toc` and
1545
+ * `:::index` are not lists. */
1546
+ shortListSplit?: CompositionRule;
1547
+ /** The most items a list has to count as short for `shortListSplit`,
1548
+ * the items of its nested lists included. Default 3. */
1549
+ shortListMaxItems?: number;
1424
1550
  /** Weight applied to the squared "unused column space" cost. Higher values make
1425
1551
  * the layout prefer filling columns tightly; 0 disables the slack pressure.
1426
1552
  * Default 10. */
@@ -1431,7 +1557,11 @@ export interface BodyTextConfig {
1431
1557
  * Knuth–Plass. A Chinese, Japanese or Korean paragraph does not end on a
1432
1558
  * line holding one character, alone or with its closing marks (孤字): the
1433
1559
  * line above gives it its last character when that line can still be
1434
- * justified within the tracking cap. Default true. */
1560
+ * justified within the tracking cap; a line set left, right or centred
1561
+ * gives it up too and stands one character short. On manuscript paper
1562
+ * (`cjk.grid.fullLines`, #718) only a justified line gives it up: the
1563
+ * others keep every cell and the paragraph may end on one character.
1564
+ * Default true. */
1435
1565
  avoidRunts?: boolean;
1436
1566
  /** Approximate minimum character count for the last line of a paragraph.
1437
1567
  * Interpreted internally as `runtMinCharacters * normalSpaceWidth` pixels, so
@@ -1499,8 +1629,17 @@ export interface BodyTextConfig {
1499
1629
  * A ragged paragraph set with `optimalRagged` is broken again the same
1500
1630
  * way; its word spaces keep their width, so only its line ends move.
1501
1631
  * Needs `optimalLineBreaking` (and `optimalRagged` for ragged text).
1502
- * Running text only (not box bodies). */
1503
- hyphenateAcrossColumns?: boolean;
1632
+ * Running text only (not box bodies).
1633
+ *
1634
+ * `'withinPage'` (#701) guards the lines that close a page and no
1635
+ * other: a word may be divided between two columns of one page, and the
1636
+ * last line of a page ends on a whole word wherever the word-spacing
1637
+ * limits allow it. A column closes its page when the text that leaves it
1638
+ * goes on to another page (no later column of the page takes text: a
1639
+ * float-only side column does not, nor does a column the floats have
1640
+ * filled). It moves fewer lines than
1641
+ * `false`; in a single-column layout the two give the same lines. */
1642
+ hyphenateAcrossColumns?: boolean | 'withinPage';
1504
1643
  /** The space under a `:::paragraphs` container that closes on a
1505
1644
  * paragraph, between that paragraph and the block after it:
1506
1645
  * - `'collapse'` (default): the larger of the style's `spaceBetween` and
@@ -1560,6 +1699,12 @@ export type TashkilMode = 'keep' | 'strip' | 'strip-vowels';
1560
1699
  /** The room kept for a list under the colon line that introduces it
1561
1700
  * (`BodyTextConfig.colonListRoom`). */
1562
1701
  export type ColonListRoom = 'item' | 'line';
1702
+ /** How far a composition rule goes (`BodyTextConfig.shortListSplit`,
1703
+ * `LayoutConfig.openerFloats`, #749): `'allow'` leaves the rule off (the
1704
+ * layout is not changed and nothing is reported), `'warn'` leaves the
1705
+ * layout as it is and reports each case in
1706
+ * `VDTDocument.contentWarnings`, `'avoid'` applies the rule. */
1707
+ export type CompositionRule = 'allow' | 'warn' | 'avoid';
1563
1708
  /** How the space under a `:::paragraphs` container is worked out
1564
1709
  * (`BodyTextConfig.paragraphContainerSpacing`). */
1565
1710
  export type ParagraphContainerSpacing = 'collapse' | 'add';
@@ -1979,6 +2124,9 @@ export interface ResolvedBodyTextConfig {
1979
2124
  breakAfterDashes: boolean;
1980
2125
  breakAfterHyphens: boolean;
1981
2126
  hardLineBreaks: boolean;
2127
+ /** Present only when switched off (see
2128
+ * {@link BodyTextConfig.scriptContext}). */
2129
+ scriptContext?: false;
1982
2130
  /** Absent when unset (see {@link BodyTextConfig.tabStops}). */
1983
2131
  tabStops?: TabStop[];
1984
2132
  /** Absent when unset (see {@link BodyTextConfig.tabInterval}). */
@@ -1994,6 +2142,8 @@ export interface ResolvedBodyTextConfig {
1994
2142
  widowMinLines: number;
1995
2143
  widowPenalty: number;
1996
2144
  avoidWidowsInLists: boolean;
2145
+ shortListSplit: CompositionRule;
2146
+ shortListMaxItems: number;
1997
2147
  slackWeight: number;
1998
2148
  avoidRunts: boolean;
1999
2149
  runtMinCharacters: number;
@@ -2004,7 +2154,7 @@ export interface ResolvedBodyTextConfig {
2004
2154
  maxRuntTracking: number;
2005
2155
  keepColonWithList: boolean;
2006
2156
  colonListRoom: ColonListRoom;
2007
- hyphenateAcrossColumns: boolean;
2157
+ hyphenateAcrossColumns: boolean | 'withinPage';
2008
2158
  paragraphContainerSpacing: ParagraphContainerSpacing;
2009
2159
  /** `emphasis` resolved; absent when `*…*` is set in italics. */
2010
2160
  emphasis?: Exclude<EmphasisStyle, 'italic'>;
@@ -2586,6 +2736,13 @@ export interface ParagraphStyleConfig {
2586
2736
  * that runs off the grid, or a group whose leading is its own. Inside a
2587
2737
  * callout, which has no grid, it changes nothing. Default `true`. */
2588
2738
  snapToGrid?: boolean;
2739
+ /** How the space under the `:::paragraphs` containers that name this
2740
+ * style is worked out (#715): `'collapse'` or `'add'`, with the meaning
2741
+ * of `bodyText.paragraphContainerSpacing`, in the running text and
2742
+ * inside a box. Unset, the document's. `'add'` on a style ends its
2743
+ * groups on the style's own space, with no line of paragraph spacing
2744
+ * under them, while the rest of the document keeps the default. */
2745
+ containerSpacing?: ParagraphContainerSpacing;
2589
2746
  /** Letter case of the paragraphs: `'uppercase'` sets them in capitals,
2590
2747
  * the words of a chip and the label of a `:ref` included.
2591
2748
  * Length-preserving, so source maps stay 1:1: a character whose capital
@@ -2678,6 +2835,9 @@ export interface ResolvedParagraphStyleConfig {
2678
2835
  marginTop: Dimension;
2679
2836
  marginBottom: Dimension;
2680
2837
  snapToGrid: boolean;
2838
+ /** Absent when the style sets none: its containers follow
2839
+ * `bodyText.paragraphContainerSpacing`. */
2840
+ containerSpacing?: ParagraphContainerSpacing;
2681
2841
  textTransform: ParagraphTextTransform;
2682
2842
  /** Absent when the style sets none (the document's `cjk.wordBreak`). */
2683
2843
  wordBreak?: CjkWordBreak;
@@ -3083,8 +3243,9 @@ export interface CalloutNumberingConfig {
3083
3243
  * prints the label with no number ("Proof."). Default: the style's id. */
3084
3244
  counter?: string | false;
3085
3245
  /** Template of the number: `{n}` (the counter) and `{h1}`..`{h6}`
3086
- * (heading numbers), as a resource type's. Default `'{n}'`;
3087
- * `'{h1}.{n}'` numbers by chapter (with `resetOn: 'h1'`). */
3246
+ * (heading numbers), as a resource type's, with the same style suffix
3247
+ * (`'{h1:A}.{n}'`, #730). Default `'{n}'`; `'{h1}.{n}'` numbers by
3248
+ * chapter (with `resetOn: 'h1'`). */
3088
3249
  numberingTemplate?: string;
3089
3250
  /** When the counter starts again at 1. Default `'never'`. */
3090
3251
  resetOn?: ResourceCounterReset;
@@ -3639,6 +3800,25 @@ export interface HeadingsConfig {
3639
3800
  * tail, display math). A level overrides it with
3640
3801
  * {@link HeadingLevelConfig.snapToGrid}. */
3641
3802
  snapToGrid?: boolean;
3803
+ /** What a heading that snaps to the grid keeps of its space above when
3804
+ * it opens a column (at the page's head, or under a float that heads
3805
+ * the column), where its `marginTop` is dropped (#706):
3806
+ * - `'none'` (default): the whole space is dropped, the heading stands
3807
+ * on the column's first line, level with the head of the column
3808
+ * beside it, and the grid snap gives the part of a line it needs back
3809
+ * under the heading, so its text can stand further from it than
3810
+ * after a paragraph.
3811
+ * - `'remainder'`: the space is dropped in whole grid lines only. The
3812
+ * part of a line that is left stays above the heading, so the text
3813
+ * under it starts at the distance it starts at under the same heading
3814
+ * set after a paragraph. The heading no longer stands on the column's
3815
+ * first line; no line of body text moves. For a book in one column,
3816
+ * where no column head beside it shows the difference.
3817
+ * Any other value reads as `'none'`. `'remainder'` does not apply under
3818
+ * a page-span opener band, nor to a `span: 'page'`, `lineSpan` or hidden
3819
+ * heading, nor to one painted from its `advancedDesign` (its band is
3820
+ * the design's). */
3821
+ columnHeadSpace?: ColumnHeadSpace;
3642
3822
  /** Vertical column balancing — editorial bottom alignment. When a column
3643
3823
  * ends short of its bottom, extra baseline-grid lines are added above the
3644
3824
  * column's headings so every column ends flush with the page bottom.
@@ -3671,11 +3851,28 @@ export interface ColumnBalancingConfig {
3671
3851
  enabled?: boolean;
3672
3852
  /** Maximum extra grid lines that may be added above a single heading. */
3673
3853
  maxLinesPerHeading?: number;
3854
+ /** Grid lines a heading may take before the levers after it are tried
3855
+ * (#707): each heading of a short column takes up to this many, then the
3856
+ * list ends, the displays, the float bands and the loose paragraphs take
3857
+ * what they can, and a heading gets its further lines, up to
3858
+ * `maxLinesPerHeading`, only when those have nothing left to give. A
3859
+ * value at or above `maxLinesPerHeading` gives the headings all their
3860
+ * lines first, as up to postext 1.27; `0` tries the other levers before
3861
+ * any line goes above a heading. Default 2; configurations stored
3862
+ * earlier keep the old order (see `migrateConfig` in `postext/bundle`). */
3863
+ maxLinesBeforeLoose?: number;
3674
3864
  /** Allow extra grid lines where a list/enumeration ends, when the column's
3675
3865
  * headings cannot absorb the whole gap. Default true. */
3676
3866
  stretchAfterLists?: boolean;
3677
3867
  /** Maximum extra grid lines after a single list end. Default 1. */
3678
3868
  maxLinesAfterList?: number;
3869
+ /** Allow one extra grid line under a display formula, and under a callout
3870
+ * box, in the short column (the block after it moves down a line), after
3871
+ * the headings and the list ends have been tried. `false` leaves the
3872
+ * space under formulas and boxes as their own margins set it: the gap
3873
+ * goes on to the levers after this one and the column ends short if they
3874
+ * do not close it (#710). Default true. */
3875
+ stretchAfterDisplays?: boolean;
3679
3876
  /** Allow extra grid lines between a top float (figure / table band) and
3680
3877
  * the text under it in the same column, after headings and list ends
3681
3878
  * have been tried. Never on a page that does not flow on (a chapter's
@@ -3691,6 +3888,16 @@ export interface ColumnBalancingConfig {
3691
3888
  stretchAfterFloats?: boolean;
3692
3889
  /** Maximum extra grid lines under a single float band. Default 1. */
3693
3890
  maxLinesAfterFloat?: number;
3891
+ /** Under a float that stands over two or more text columns (#708):
3892
+ * `'flush'` (default) moves a column down under it only when every text
3893
+ * column under the float takes the same lines, so their heads stay
3894
+ * level, or when the lines end that column flush; a line that would
3895
+ * lower one head and still leave its column short is not added.
3896
+ * `'always'` treats such a float as any other, as up to postext 1.27.
3897
+ * Any other value reads as `'flush'`. `stretchAfterFloats: false` turns
3898
+ * the lever off under every float. Configurations stored earlier keep
3899
+ * `'always'` (see `migrateConfig` in `postext/bundle`). */
3900
+ stretchAfterWideFloats?: StretchAfterWideFloats;
3694
3901
  /** Last resort: re-break one paragraph per short column one line looser
3695
3902
  * (TeX \looseness=+1), within the configured `bodyText.maxWordSpacing`.
3696
3903
  * Requires `bodyText.optimalLineBreaking`. Default true. */
@@ -3719,6 +3926,22 @@ export interface ColumnBalancingConfig {
3719
3926
  * grid line or less are left as they are: a last column a line short is
3720
3927
  * the usual finish of a closing band. Default true. */
3721
3928
  trailing?: boolean;
3929
+ /** The unit of the level cut of a closing band (`trailing`, and the cut
3930
+ * `beforeSpan` takes behind a box that moves on), #711:
3931
+ * - `'lines'` (default): a band whose text is set on a leading of its
3932
+ * own (an index, a list of references, a container of small type) is
3933
+ * cut, and retried, by whole lines of that leading: the height most
3934
+ * lines of the band share. A band of body text has the baseline
3935
+ * grid for its leading and is cut as before, and so is a band whose
3936
+ * lines share a height without standing whole lines apart (entries
3937
+ * with a gap between them, groups on a hand-set margin).
3938
+ * - `'grid'`: every cut is a whole number of baseline-grid lines, as up
3939
+ * to postext 1.27, which let a line more into one column of an
3940
+ * off-grid band and lowered a failed cut by more than one of its
3941
+ * lines.
3942
+ * Any other value reads as `'lines'`. Configurations stored earlier
3943
+ * keep `'grid'` (see `migrateConfig` in `postext/bundle`). */
3944
+ trailingStep?: TrailingStep;
3722
3945
  /** Balance the band a page-span block leaves behind: when a `span: 'page'`
3723
3946
  * callout does not fit under the current columns and has to move to the
3724
3947
  * next page (or split, see `CalloutStyleConfig.keepTogether`), the
@@ -3755,12 +3978,22 @@ export interface ColumnBalancingConfig {
3755
3978
  /** Where the column-balancing lever of a box closing a column runs
3756
3979
  * (`ColumnBalancingConfig.closingBox`). */
3757
3980
  export type ClosingBoxLever = 'first' | 'last' | 'off';
3981
+ /** How the after-float lever of column balancing treats a float that stands
3982
+ * over several text columns (`headings.balancing.stretchAfterWideFloats`,
3983
+ * #708). */
3984
+ export type StretchAfterWideFloats = 'flush' | 'always';
3985
+ /** The unit of the level cut of a closing band
3986
+ * (`headings.balancing.trailingStep`, #711). */
3987
+ export type TrailingStep = 'lines' | 'grid';
3758
3988
  /** Whether the whole-line balancing levers run on a character grid
3759
3989
  * (`ColumnBalancingConfig.gridLines`). */
3760
3990
  export type GridLinesLever = 'allow' | 'off';
3761
3991
  /** How a paragraph kept with the heading above it splits at a column's foot
3762
3992
  * (`HeadingsConfig.keepWithNextSplit`). */
3763
3993
  export type KeepWithNextSplit = 'rules' | 'fill';
3994
+ /** What a snapping heading keeps of its space above at a column's head
3995
+ * (`HeadingsConfig.columnHeadSpace`, #706). */
3996
+ export type ColumnHeadSpace = 'remainder' | 'none';
3764
3997
  export interface ResolvedHeadingsConfig {
3765
3998
  fontFamily: string;
3766
3999
  lineHeight: Dimension;
@@ -3774,19 +4007,24 @@ export interface ResolvedHeadingsConfig {
3774
4007
  keepWithNextSpread?: boolean;
3775
4008
  keepWithNextSplit: KeepWithNextSplit;
3776
4009
  snapToGrid: boolean;
4010
+ columnHeadSpace: ColumnHeadSpace;
3777
4011
  inlineMarks: boolean;
3778
4012
  balancing: {
3779
4013
  enabled: boolean;
3780
4014
  maxLinesPerHeading: number;
4015
+ maxLinesBeforeLoose: number;
3781
4016
  stretchAfterLists: boolean;
3782
4017
  maxLinesAfterList: number;
4018
+ stretchAfterDisplays: boolean;
3783
4019
  stretchAfterFloats: boolean;
3784
4020
  maxLinesAfterFloat: number;
4021
+ stretchAfterWideFloats: StretchAfterWideFloats;
3785
4022
  looseParagraphs: boolean;
3786
4023
  maxLooseParagraphs: number;
3787
4024
  trackParagraphs: boolean;
3788
4025
  maxTracking: number;
3789
4026
  trailing: boolean;
4027
+ trailingStep: TrailingStep;
3790
4028
  beforeSpan: boolean;
3791
4029
  closingBox: ClosingBoxLever;
3792
4030
  /** Present only when `'off'` (#632): every other configuration
@@ -3953,7 +4191,14 @@ export interface OrderedListsConfig {
3953
4191
  * - `'level'`: the widest number at the item's depth in the whole
3954
4192
  * document (the chapter, in a book), so every list and every part of
3955
4193
  * an interrupted one starts its text at the same place, as the
3956
- * indents of the deeper levels already do. */
4194
+ * indents of the deeper levels already do;
4195
+ * - `'item'` (#722): the item's own number, so the text of each item
4196
+ * starts one `gap` after its own label and 第九條 and 第十一條 are
4197
+ * each followed by the same space, their texts starting at different
4198
+ * places (the articles of a law in the Japanese Official Gazette).
4199
+ * Turnover lines follow `hangingIndent`: `false` returns them to the
4200
+ * list's indent, `true` hangs them under the item's own text. The
4201
+ * indent of a deeper level stays one value per level. */
3957
4202
  numberWidth?: OrderedListNumberWidth;
3958
4203
  /** How a number sits in its column (#682):
3959
4204
  * - `'end'` (default): against the text, so `9.` and `10.` end
@@ -3962,7 +4207,10 @@ export interface OrderedListsConfig {
3962
4207
  * page, the right on a right-to-left one, the head of the line in
3963
4208
  * vertical text), so 第九條 and 第十一條 begin together. The column
3964
4209
  * keeps its width ({@link numberWidth}): the text of the items still
3965
- * starts at one place. */
4210
+ * starts at one place.
4211
+ *
4212
+ * Under `numberWidth: 'item'` the column is the number itself, so the
4213
+ * two values set the same list. */
3966
4214
  numberAlign?: OrderedListNumberAlign;
3967
4215
  hangingIndent?: boolean;
3968
4216
  levels?: OrderedListLevelConfig[];
@@ -3979,7 +4227,7 @@ export interface OrderedListsConfig {
3979
4227
  }
3980
4228
  /** The number column of an ordered list item
3981
4229
  * (`OrderedListsConfig.numberWidth`). */
3982
- export type OrderedListNumberWidth = 'run' | 'level';
4230
+ export type OrderedListNumberWidth = 'run' | 'level' | 'item';
3983
4231
  /** Where a number stands in the number column of an ordered list
3984
4232
  * (`OrderedListsConfig.numberAlign`). */
3985
4233
  export type OrderedListNumberAlign = 'end' | 'start';
@@ -4282,8 +4530,9 @@ export interface EquationNumberingConfig {
4282
4530
  * and a reference prints the equation's page. */
4283
4531
  enabled?: boolean;
4284
4532
  /** Template of the number: `{n}` (the counter) and `{h1}`..`{h6}`
4285
- * (heading numbers), as a resource type's. Default `'{n}'`;
4286
- * `'{h1}.{n}'` numbers by chapter (with `resetOn: 'h1'`). */
4533
+ * (heading numbers), as a resource type's, with the same style suffix
4534
+ * (`'{h1:A}.{n}'`, #730). Default `'{n}'`; `'{h1}.{n}'` numbers by
4535
+ * chapter (with `resetOn: 'h1'`). */
4287
4536
  numberingTemplate?: string;
4288
4537
  /** When the counter starts again at 1. Default `'never'`. */
4289
4538
  resetOn?: ResourceCounterReset;
@@ -4417,6 +4666,16 @@ export interface CitationsConfig {
4417
4666
  * (`bibliography.scope: 'chapter'`): the proceedings, the bulletin, the
4418
4667
  * edited volume. */
4419
4668
  numbering?: 'book' | 'chapter';
4669
+ /** Let the dictionary divide the names of the authors the document cites.
4670
+ * Default `true`. `false` (#699): the family names and the `literal`
4671
+ * names of every work of the references are never divided where they
4672
+ * start with a capital, in a citation, in the running text and in the
4673
+ * bibliography, so no line ends on `(Lup-`. Each name is read run of
4674
+ * letters by run of letters (`García-Márquez` gives two), and an author
4675
+ * called Baker does not keep `baker` whole. A bibliography cannot be
4676
+ * typed into `bodyText.hyphenation.exceptions`, and a German book cannot
4677
+ * use `hyphenation.capitalized: false`. */
4678
+ hyphenateNames?: boolean;
4420
4679
  /** The list of works cited. */
4421
4680
  bibliography?: {
4422
4681
  /** Title printed above the list (a bold paragraph). Unset: the
@@ -4467,6 +4726,7 @@ export interface ResolvedCitationsConfig {
4467
4726
  collapseRanges: boolean;
4468
4727
  notes: 'footnote' | 'warichu';
4469
4728
  numbering: 'book' | 'chapter';
4729
+ hyphenateNames: boolean;
4470
4730
  bibliography: {
4471
4731
  title?: string;
4472
4732
  scope: 'book' | 'chapter';
@@ -4498,6 +4758,16 @@ export interface CrossRefsConfig {
4498
4758
  * `'default'`: a numbered heading by its label and number, an
4499
4759
  * unnumbered one by its title, an anchor by its text. */
4500
4760
  defaultStyle?: 'default' | 'number' | 'title' | 'page';
4761
+ /** Let a line break at the spaces of a reference whose label is words
4762
+ * (#702): the text of a `[words]{#id}` anchor, the title of a heading or
4763
+ * a box, a `text="…"` override. The label's spaces then take part in
4764
+ * justification like the others of the line, and the reference stays
4765
+ * one link. A label with a number or a page (`section 3.2`, `p. 112`,
4766
+ * `Fig. 1.7`, `Theorem 2`) never breaks, whatever space its template
4767
+ * holds. Default `true`. `false`: every label is one unbreakable word,
4768
+ * as up to postext 1.27; configurations stored before `configVersion`
4769
+ * 12 read with it (see `pinLegacyRefLabelBreaks` in `postext/bundle`). */
4770
+ breakLabels?: boolean;
4501
4771
  }
4502
4772
  /** {@link CrossRefsConfig} with every value resolved. */
4503
4773
  export interface ResolvedCrossRefsConfig {
@@ -4505,6 +4775,7 @@ export interface ResolvedCrossRefsConfig {
4505
4775
  section: string;
4506
4776
  page: string;
4507
4777
  defaultStyle: 'default' | 'number' | 'title' | 'page';
4778
+ breakLabels: boolean;
4508
4779
  }
4509
4780
  /** Footnotes. A Japanese document (`locale: 'ja'`) resolves the fields it
4510
4781
  * leaves unset after JLReq §4.2: a vertical one sets endnotes after each
@@ -4572,6 +4843,15 @@ export interface FootnotesConfig {
4572
4843
  color?: ColorValue;
4573
4844
  /** Alignment of the note text. Defaults to the body alignment. */
4574
4845
  textAlign?: TextAlignKeyword;
4846
+ /** How the notes break their lines between Chinese, Japanese and Korean
4847
+ * characters (#705). Unset: the document's `cjk.wordBreak`, as on a
4848
+ * paragraph style. `'keep-all'` keeps a run of such characters whole, so
4849
+ * a book whose body breaks between any two characters can keep the
4850
+ * short quotations of its Latin notes whole without word joiners;
4851
+ * `'normal'` breaks the notes of a `keep-all` document between
4852
+ * characters. Notes at the foot of the column, at the end of the
4853
+ * chapter and beside a spread take it. */
4854
+ wordBreak?: CjkWordBreak;
4575
4855
  /** Indent of the turnover lines of a note, so they align past its
4576
4856
  * number. Default `0` (the lines run flush under the number). */
4577
4857
  hangingIndent?: Dimension;
@@ -4610,6 +4890,8 @@ export interface ResolvedFootnotesConfig {
4610
4890
  lineHeight: Dimension;
4611
4891
  color?: ColorValue;
4612
4892
  textAlign?: TextAlign;
4893
+ /** Set only when the notes take a rule of their own. */
4894
+ wordBreak?: CjkWordBreak;
4613
4895
  hangingIndent: Dimension;
4614
4896
  /** Set when it is `'em'`. */
4615
4897
  numberGap?: 'em';
@@ -4768,6 +5050,11 @@ export interface CjkConfig {
4768
5050
  * before characters are spread, and shrinks down to ⅛ em when the line
4769
5051
  * takes one more character. */
4770
5052
  latinSpacing?: Dimension;
5053
+ /** Which side of a Western word takes `latinSpacing` (#721, see
5054
+ * {@link CjkLatinSpacingEdge}). `'auto'` (the default): `'western'` in
5055
+ * the Japan region, `'letters'` elsewhere. An unknown value reads as
5056
+ * `'auto'`. */
5057
+ latinSpacingEdge?: 'auto' | CjkLatinSpacingEdge;
4771
5058
  /** Tate-chu-yoko (縱中橫) in vertical text: a number of at most this many
4772
5059
  * ASCII digits is set side by side in one upright cell (`2026年9月28日`:
4773
5060
  * `9` and `28` upright, `2026` sideways). `0` turns it off; default
@@ -4939,6 +5226,16 @@ export interface CjkWarichuConfig {
4939
5226
  * own `open` / `close` attributes win. */
4940
5227
  open?: string;
4941
5228
  close?: string;
5229
+ /** How many characters of a note a line break leaves on either side of
5230
+ * it at least (#720): a note that runs over a line end never leaves one
5231
+ * of its characters alone at the end of a line or at the head of the
5232
+ * next, so no column or page opens on a single small character and its
5233
+ * stop. A character is a CJK character, a Western word or an inline
5234
+ * box; marks and the note's word spaces do not count. A note of fewer
5235
+ * than twice the number is never divided; a line with no other break
5236
+ * falls back on the breaks the level allows. Default 2; `1` lets a line
5237
+ * break anywhere in a note the level allows, as up to postext 1.27. */
5238
+ minChars?: number;
4942
5239
  }
4943
5240
  /** Where the 返り点 of a kanbun text go (see {@link CjkKuntenConfig}):
4944
5241
  * - `inline` (JIS X 4051 §5.5): right after their character, in the
@@ -4987,6 +5284,7 @@ export interface ResolvedCjkWarichuConfig {
4987
5284
  color?: ColorValue;
4988
5285
  open: string;
4989
5286
  close: string;
5287
+ minChars: number;
4990
5288
  }
4991
5289
  /** Punctuation width styles (clreq §6.3.2.1): each full-width mark is
4992
5290
  * half a glyph and half an em of blank that may be set or removed.
@@ -5029,6 +5327,21 @@ export type CjkParagraphStartBracket = 'indent' | 'half' | 'flush';
5029
5327
  * break only there; kinsoku still applies. A phrase longer than the
5030
5328
  * line is broken inside it anyway, where `normal` would break it. */
5031
5329
  export type CjkWordBreak = 'normal' | 'keep-all';
5330
+ /** Where a Western word takes the Han–Latin space (`cjk.latinSpacingEdge`):
5331
+ * - `letters` (clreq §6.3.3, CSS `text-autospace`): on a side that ends
5332
+ * in a letter or a digit, so `abc関数` takes it and `normalize()関数`
5333
+ * does not;
5334
+ * - `western` (JLReq §3.2.6: the space stands between Japanese text and
5335
+ * Western characters, the marks of a Western word among them, §3.9.2):
5336
+ * a Western word that holds a letter or a digit takes it on a side that
5337
+ * ends in a bracket or a sign too, so `normalize()関数`, `(abc)関数`,
5338
+ * `A+関数` and `100%関数` are set like `abc関数`. Two sides stay solid,
5339
+ * where the mark binds to what follows or precedes it: after an opening
5340
+ * bracket or a prefix sign that ends the word (`abc(関数`), and before
5341
+ * a closing bracket, a pause, a stop or a postfix sign that opens it
5342
+ * (`関数)abc`). A bracket or a sign with no letter or digit in its word
5343
+ * (`関数(かんすう)は`) stands in Japanese context and takes none. */
5344
+ export type CjkLatinSpacingEdge = 'letters' | 'western';
5032
5345
  /** The character grid of `cjk.grid`: the type area is derived from the
5033
5346
  * body size, not authored as margins. Each column is `charsPerLine` ems
5034
5347
  * wide and holds `linesPerPage` lines of the body's line height; with two
@@ -5047,6 +5360,16 @@ export interface CjkGridConfig {
5047
5360
  linesPerPage?: number;
5048
5361
  /** Draw the grid (稿纸) over the type area on screen. Default `false`. */
5049
5362
  show?: boolean;
5363
+ /** Manuscript paper (原稿用紙), where every square of a full line is
5364
+ * written in: a paragraph that is not justified keeps its full lines
5365
+ * full, so the runt rule (`bodyText.avoidRunts`) carries no character
5366
+ * down from a line it cannot spread, and such a paragraph may end on
5367
+ * one character. A justified paragraph still gives the character up,
5368
+ * its line spread to the measure. Default `false`: a paragraph does
5369
+ * not end on a single character (clreq §7.1.2, 孤字不成行; JLReq §3.5.4
5370
+ * takes the same care), and the line above it stands one cell short
5371
+ * when it is not justified (#718). */
5372
+ fullLines?: boolean;
5050
5373
  }
5051
5374
  export interface ResolvedCjkGridConfig {
5052
5375
  enabled: boolean;
@@ -5056,6 +5379,8 @@ export interface ResolvedCjkGridConfig {
5056
5379
  /** The lines per column in use; 0 when off. */
5057
5380
  linesPerPage: number;
5058
5381
  show: boolean;
5382
+ /** `false` when the grid is off. */
5383
+ fullLines: boolean;
5059
5384
  }
5060
5385
  export interface ResolvedCjkConfig {
5061
5386
  region: CjkRegion;
@@ -5081,6 +5406,7 @@ export interface ResolvedCjkConfig {
5081
5406
  /** Set (false) only when off: absent, CJK design text is composed. */
5082
5407
  composeDesignText?: false;
5083
5408
  latinSpacing: Dimension;
5409
+ latinSpacingEdge: CjkLatinSpacingEdge;
5084
5410
  uprightDigits: 0 | 2 | 3 | 4;
5085
5411
  grid: ResolvedCjkGridConfig;
5086
5412
  emphasis: CjkEmphasis;
@@ -5170,6 +5496,52 @@ export interface ResolvedPrintPreflightConfig {
5170
5496
  bleedSnap: Dimension;
5171
5497
  checkFonts: boolean;
5172
5498
  }
5499
+ /** The conformance level a contrast ratio is held to (WCAG 2): `'AA'`
5500
+ * asks 4.5:1 of text and 3:1 of large text, `'AAA'` 7:1 and 4.5:1. */
5501
+ export type ContrastLevel = 'AA' | 'AAA';
5502
+ /** Which rendition the contrast check reads: `'screen'` (the sRGB colours,
5503
+ * as the canvas, the HTML and an RGB PDF show them), `'print'` (the inks
5504
+ * on the paper of the output profile), `'both'`, or `'auto'`: the screen
5505
+ * always, and print as well for a book set up for print (a PDF/X
5506
+ * standard, a CMYK PDF, or crop marks). */
5507
+ export type ContrastMode = 'auto' | 'screen' | 'print' | 'both';
5508
+ /** Reversed text (light text knocked out of an inked ground) fills in on
5509
+ * press when it is small or its strokes are thin, whatever its contrast
5510
+ * ratio: the sizes under which the print check reports it. */
5511
+ export interface ContrastReversedTextConfig {
5512
+ /** Report reversed text. Defaults to true. */
5513
+ enabled?: boolean;
5514
+ /** Reversed text smaller than this is reported. Defaults to 8 pt. */
5515
+ minSize?: Dimension;
5516
+ /** The same for italics and light weights, whose strokes are thinner.
5517
+ * Defaults to 12 pt. */
5518
+ minFineSize?: Dimension;
5519
+ /** A weight at or under this counts as light. Defaults to 300. */
5520
+ lightWeight?: number;
5521
+ }
5522
+ export interface ResolvedContrastReversedTextConfig {
5523
+ enabled: boolean;
5524
+ minSize: Dimension;
5525
+ minFineSize: Dimension;
5526
+ lightWeight: number;
5527
+ }
5528
+ /** The contrast check (`contrastDocument`): the text of the laid-out pages
5529
+ * against the ground it is set on. Layout ignores it. */
5530
+ export interface ContrastConfig {
5531
+ /** Run the check. Defaults to true. */
5532
+ enabled?: boolean;
5533
+ /** Defaults to `'AA'`. */
5534
+ level?: ContrastLevel;
5535
+ /** Defaults to `'auto'`. */
5536
+ mode?: ContrastMode;
5537
+ reversedText?: ContrastReversedTextConfig;
5538
+ }
5539
+ export interface ResolvedContrastConfig {
5540
+ enabled: boolean;
5541
+ level: ContrastLevel;
5542
+ mode: ContrastMode;
5543
+ reversedText: ResolvedContrastReversedTextConfig;
5544
+ }
5173
5545
  /** An ICC output profile the user uploaded (their printer's), stored
5174
5546
  * out-of-band like a font or a picture. */
5175
5547
  export interface CustomOutputProfile {
@@ -6005,6 +6377,17 @@ export interface IndexGroupsConfig {
6005
6377
  /** Space above each group (letter head or not), except at the top of a
6006
6378
  * column. Default one body line. */
6007
6379
  marginTop?: Dimension;
6380
+ /** The fewest entries of a group left at the foot of a column, and the
6381
+ * fewest carried to the head of the next, when a column or a page ends
6382
+ * inside the group (#712). An entry is one entry block: a main entry or
6383
+ * a sub-entry, with the head and the page-less entries set above it. A
6384
+ * group too short to leave that many on each side moves whole to the
6385
+ * next column; one taller than a column is divided where it must be.
6386
+ * `1` lets a column end between any two entries, as up to postext 1.27.
6387
+ * A whole number of 1 or more. Default `2`; configurations stored
6388
+ * earlier whose text sets an index read with `1` (see `migrateConfig` in
6389
+ * `postext/bundle`). */
6390
+ splitMinEntries?: number;
6008
6391
  /** Head of the entries that start with a symbol. Default `Symbols` /
6009
6392
  * `Símbolos` in the document language. */
6010
6393
  symbolsLabel?: string;
@@ -6139,6 +6522,7 @@ export interface ResolvedIndexConfig {
6139
6522
  italic: boolean;
6140
6523
  color: ColorValue;
6141
6524
  marginTop: Dimension;
6525
+ splitMinEntries: number;
6142
6526
  symbolsLabel?: string;
6143
6527
  numbersLabel?: string;
6144
6528
  };
@@ -6244,6 +6628,15 @@ export interface LetteringConfig {
6244
6628
  joinSameSpeaker?: 'butt' | 'connector' | 'none';
6245
6629
  /** Vertical lettering: the most characters in a column. Default `8`. */
6246
6630
  maxColumnChars?: number;
6631
+ /** A balloon reshaped to fit its panel does not part a Chinese word to
6632
+ * do so (#728): each word its new lines cut, which its preferred shape
6633
+ * leaves whole, costs more than a balloon read out of order, so the
6634
+ * placement moves or reorders before it cuts 其|实. Japanese lettering
6635
+ * is not touched (its breaks go by phrases). Default `true`; `false`
6636
+ * letters as postext 1.27 did, which a configuration stored under
6637
+ * `configVersion` 11 or lower is read with when its text may hold a
6638
+ * comic (see `pinLegacyBalloonPlacement` in `postext/bundle`). */
6639
+ strictPlacement?: boolean;
6247
6640
  }
6248
6641
  export interface ResolvedLetteringConfig {
6249
6642
  fontFamily: string;
@@ -6260,6 +6653,7 @@ export interface ResolvedLetteringConfig {
6260
6653
  inset: Dimension;
6261
6654
  joinSameSpeaker: 'butt' | 'connector' | 'none';
6262
6655
  maxColumnChars: number;
6656
+ strictPlacement: boolean;
6263
6657
  }
6264
6658
  /** The outline of a balloon body. */
6265
6659
  export type ComicBalloonShape = 'oval' | 'rounded' | 'rectangle' | 'cloud' | 'burst' | 'wavy' | 'electric' | 'none';
@@ -6573,6 +6967,8 @@ export interface PostextConfig {
6573
6967
  pdfGeneration?: PdfGenerationConfig;
6574
6968
  /** Print production: PDF/X, output profile, black, preflight. */
6575
6969
  print?: PrintConfig;
6970
+ /** The contrast check: level, rendition, reversed text. */
6971
+ contrast?: ContrastConfig;
6576
6972
  colorPalette?: ColorPaletteEntry[];
6577
6973
  /** User-provided font families. Referenced the same way as Google Fonts:
6578
6974
  * set `bodyText.fontFamily` (or any other font-family field) to the