postext 1.4.2 → 1.5.1

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