postext 0.3.19 → 0.3.21

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 (297) hide show
  1. package/dist/__tests__/columnBalancing.test.js +36 -2
  2. package/dist/__tests__/columnBalancing.test.js.map +1 -1
  3. package/dist/__tests__/defaults/calloutStyles.test.d.ts +2 -0
  4. package/dist/__tests__/defaults/calloutStyles.test.d.ts.map +1 -0
  5. package/dist/__tests__/defaults/calloutStyles.test.js +201 -0
  6. package/dist/__tests__/defaults/calloutStyles.test.js.map +1 -0
  7. package/dist/__tests__/defaults/captionStyle.test.d.ts +2 -0
  8. package/dist/__tests__/defaults/captionStyle.test.d.ts.map +1 -0
  9. package/dist/__tests__/defaults/captionStyle.test.js +87 -0
  10. package/dist/__tests__/defaults/captionStyle.test.js.map +1 -0
  11. package/dist/__tests__/defaults/pageSizePreset.test.d.ts +2 -0
  12. package/dist/__tests__/defaults/pageSizePreset.test.d.ts.map +1 -0
  13. package/dist/__tests__/defaults/pageSizePreset.test.js +24 -0
  14. package/dist/__tests__/defaults/pageSizePreset.test.js.map +1 -0
  15. package/dist/__tests__/defaults/paragraphStyles.test.d.ts +2 -0
  16. package/dist/__tests__/defaults/paragraphStyles.test.d.ts.map +1 -0
  17. package/dist/__tests__/defaults/paragraphStyles.test.js +93 -0
  18. package/dist/__tests__/defaults/paragraphStyles.test.js.map +1 -0
  19. package/dist/__tests__/design/pageAnchors.test.d.ts +2 -0
  20. package/dist/__tests__/design/pageAnchors.test.d.ts.map +1 -0
  21. package/dist/__tests__/design/pageAnchors.test.js +140 -0
  22. package/dist/__tests__/design/pageAnchors.test.js.map +1 -0
  23. package/dist/__tests__/directives.test.js +58 -0
  24. package/dist/__tests__/directives.test.js.map +1 -1
  25. package/dist/__tests__/exports.test.js +19 -0
  26. package/dist/__tests__/exports.test.js.map +1 -1
  27. package/dist/__tests__/mirroredMargins.test.d.ts +2 -0
  28. package/dist/__tests__/mirroredMargins.test.d.ts.map +1 -0
  29. package/dist/__tests__/mirroredMargins.test.js +136 -0
  30. package/dist/__tests__/mirroredMargins.test.js.map +1 -0
  31. package/dist/__tests__/numbering.test.js +54 -0
  32. package/dist/__tests__/numbering.test.js.map +1 -1
  33. package/dist/__tests__/openerTitleSource.test.d.ts +2 -0
  34. package/dist/__tests__/openerTitleSource.test.d.ts.map +1 -0
  35. package/dist/__tests__/openerTitleSource.test.js +108 -0
  36. package/dist/__tests__/openerTitleSource.test.js.map +1 -0
  37. package/dist/__tests__/overStretch.test.d.ts +2 -0
  38. package/dist/__tests__/overStretch.test.d.ts.map +1 -0
  39. package/dist/__tests__/overStretch.test.js +35 -0
  40. package/dist/__tests__/overStretch.test.js.map +1 -0
  41. package/dist/__tests__/pageRoles.test.d.ts +2 -0
  42. package/dist/__tests__/pageRoles.test.d.ts.map +1 -0
  43. package/dist/__tests__/pageRoles.test.js +95 -0
  44. package/dist/__tests__/pageRoles.test.js.map +1 -0
  45. package/dist/__tests__/parse/containers.test.d.ts +2 -0
  46. package/dist/__tests__/parse/containers.test.d.ts.map +1 -0
  47. package/dist/__tests__/parse/containers.test.js +204 -0
  48. package/dist/__tests__/parse/containers.test.js.map +1 -0
  49. package/dist/__tests__/parse/headingAttrs.test.d.ts +2 -0
  50. package/dist/__tests__/parse/headingAttrs.test.d.ts.map +1 -0
  51. package/dist/__tests__/parse/headingAttrs.test.js +62 -0
  52. package/dist/__tests__/parse/headingAttrs.test.js.map +1 -0
  53. package/dist/__tests__/parse/inlineRef.test.js +26 -0
  54. package/dist/__tests__/parse/inlineRef.test.js.map +1 -1
  55. package/dist/__tests__/parts.test.d.ts +2 -0
  56. package/dist/__tests__/parts.test.d.ts.map +1 -0
  57. package/dist/__tests__/parts.test.js +405 -0
  58. package/dist/__tests__/parts.test.js.map +1 -0
  59. package/dist/__tests__/pipeline/calloutLayout.test.d.ts +2 -0
  60. package/dist/__tests__/pipeline/calloutLayout.test.d.ts.map +1 -0
  61. package/dist/__tests__/pipeline/calloutLayout.test.js +273 -0
  62. package/dist/__tests__/pipeline/calloutLayout.test.js.map +1 -0
  63. package/dist/__tests__/pipeline/calloutPlacement.test.d.ts +2 -0
  64. package/dist/__tests__/pipeline/calloutPlacement.test.d.ts.map +1 -0
  65. package/dist/__tests__/pipeline/calloutPlacement.test.js +239 -0
  66. package/dist/__tests__/pipeline/calloutPlacement.test.js.map +1 -0
  67. package/dist/__tests__/pipeline/captionLayout.test.d.ts +2 -0
  68. package/dist/__tests__/pipeline/captionLayout.test.d.ts.map +1 -0
  69. package/dist/__tests__/pipeline/captionLayout.test.js +269 -0
  70. package/dist/__tests__/pipeline/captionLayout.test.js.map +1 -0
  71. package/dist/__tests__/pipeline/inlineRefRender.test.js +53 -0
  72. package/dist/__tests__/pipeline/inlineRefRender.test.js.map +1 -1
  73. package/dist/__tests__/pipeline/orderedSeparator.test.d.ts +2 -0
  74. package/dist/__tests__/pipeline/orderedSeparator.test.d.ts.map +1 -0
  75. package/dist/__tests__/pipeline/orderedSeparator.test.js +196 -0
  76. package/dist/__tests__/pipeline/orderedSeparator.test.js.map +1 -0
  77. package/dist/__tests__/pipeline/paragraphStyles.test.d.ts +2 -0
  78. package/dist/__tests__/pipeline/paragraphStyles.test.d.ts.map +1 -0
  79. package/dist/__tests__/pipeline/paragraphStyles.test.js +172 -0
  80. package/dist/__tests__/pipeline/paragraphStyles.test.js.map +1 -0
  81. package/dist/__tests__/pipeline/spanBands.test.d.ts +2 -0
  82. package/dist/__tests__/pipeline/spanBands.test.d.ts.map +1 -0
  83. package/dist/__tests__/pipeline/spanBands.test.js +303 -0
  84. package/dist/__tests__/pipeline/spanBands.test.js.map +1 -0
  85. package/dist/__tests__/pipeline/spanBlocks.test.d.ts +2 -0
  86. package/dist/__tests__/pipeline/spanBlocks.test.d.ts.map +1 -0
  87. package/dist/__tests__/pipeline/spanBlocks.test.js +407 -0
  88. package/dist/__tests__/pipeline/spanBlocks.test.js.map +1 -0
  89. package/dist/__tests__/placeholders.test.d.ts +2 -0
  90. package/dist/__tests__/placeholders.test.d.ts.map +1 -0
  91. package/dist/__tests__/placeholders.test.js +130 -0
  92. package/dist/__tests__/placeholders.test.js.map +1 -0
  93. package/dist/__tests__/table/model.test.js +24 -0
  94. package/dist/__tests__/table/model.test.js.map +1 -1
  95. package/dist/__tests__/tracking.test.d.ts +2 -0
  96. package/dist/__tests__/tracking.test.d.ts.map +1 -0
  97. package/dist/__tests__/tracking.test.js +37 -0
  98. package/dist/__tests__/tracking.test.js.map +1 -0
  99. package/dist/__tests__/urlBreaks.test.d.ts +2 -0
  100. package/dist/__tests__/urlBreaks.test.d.ts.map +1 -0
  101. package/dist/__tests__/urlBreaks.test.js +57 -0
  102. package/dist/__tests__/urlBreaks.test.js.map +1 -0
  103. package/dist/canvas-backend/blockRender.d.ts.map +1 -1
  104. package/dist/canvas-backend/blockRender.js +20 -1
  105. package/dist/canvas-backend/blockRender.js.map +1 -1
  106. package/dist/canvas-backend/decorations.d.ts +3 -0
  107. package/dist/canvas-backend/decorations.d.ts.map +1 -1
  108. package/dist/canvas-backend/decorations.js +14 -8
  109. package/dist/canvas-backend/decorations.js.map +1 -1
  110. package/dist/canvas-backend/headerFooter.d.ts.map +1 -1
  111. package/dist/canvas-backend/headerFooter.js +23 -0
  112. package/dist/canvas-backend/headerFooter.js.map +1 -1
  113. package/dist/canvas-backend/index.d.ts.map +1 -1
  114. package/dist/canvas-backend/index.js +4 -2
  115. package/dist/canvas-backend/index.js.map +1 -1
  116. package/dist/canvas-backend/renderResourceBlock.d.ts.map +1 -1
  117. package/dist/canvas-backend/renderResourceBlock.js +33 -5
  118. package/dist/canvas-backend/renderResourceBlock.js.map +1 -1
  119. package/dist/columnRule.d.ts +19 -0
  120. package/dist/columnRule.d.ts.map +1 -0
  121. package/dist/columnRule.js +36 -0
  122. package/dist/columnRule.js.map +1 -0
  123. package/dist/defaults/bodyText.js +1 -1
  124. package/dist/defaults/bodyText.js.map +1 -1
  125. package/dist/defaults/calloutStyles.d.ts +61 -0
  126. package/dist/defaults/calloutStyles.d.ts.map +1 -0
  127. package/dist/defaults/calloutStyles.js +292 -0
  128. package/dist/defaults/calloutStyles.js.map +1 -0
  129. package/dist/defaults/captionStyle.d.ts +11 -1
  130. package/dist/defaults/captionStyle.d.ts.map +1 -1
  131. package/dist/defaults/captionStyle.js +127 -2
  132. package/dist/defaults/captionStyle.js.map +1 -1
  133. package/dist/defaults/headerFooter.d.ts.map +1 -1
  134. package/dist/defaults/headerFooter.js +3 -0
  135. package/dist/defaults/headerFooter.js.map +1 -1
  136. package/dist/defaults/headings.d.ts +3 -0
  137. package/dist/defaults/headings.d.ts.map +1 -1
  138. package/dist/defaults/headings.js +33 -6
  139. package/dist/defaults/headings.js.map +1 -1
  140. package/dist/defaults/index.d.ts +4 -1
  141. package/dist/defaults/index.d.ts.map +1 -1
  142. package/dist/defaults/index.js +28 -1
  143. package/dist/defaults/index.js.map +1 -1
  144. package/dist/defaults/orderedLists.d.ts +9 -8
  145. package/dist/defaults/orderedLists.d.ts.map +1 -1
  146. package/dist/defaults/orderedLists.js +66 -4
  147. package/dist/defaults/orderedLists.js.map +1 -1
  148. package/dist/defaults/page.d.ts.map +1 -1
  149. package/dist/defaults/page.js +14 -3
  150. package/dist/defaults/page.js.map +1 -1
  151. package/dist/defaults/paragraphStyles.d.ts +10 -0
  152. package/dist/defaults/paragraphStyles.d.ts.map +1 -0
  153. package/dist/defaults/paragraphStyles.js +67 -0
  154. package/dist/defaults/paragraphStyles.js.map +1 -0
  155. package/dist/defaults/parts.d.ts +22 -0
  156. package/dist/defaults/parts.d.ts.map +1 -0
  157. package/dist/defaults/parts.js +139 -0
  158. package/dist/defaults/parts.js.map +1 -0
  159. package/dist/defaults/shared.d.ts.map +1 -1
  160. package/dist/defaults/shared.js +110 -17
  161. package/dist/defaults/shared.js.map +1 -1
  162. package/dist/defaults/tableStyle.d.ts.map +1 -1
  163. package/dist/defaults/tableStyle.js +6 -0
  164. package/dist/defaults/tableStyle.js.map +1 -1
  165. package/dist/design/layout.d.ts +27 -1
  166. package/dist/design/layout.d.ts.map +1 -1
  167. package/dist/design/layout.js +39 -8
  168. package/dist/design/layout.js.map +1 -1
  169. package/dist/design/placeholders.d.ts +21 -4
  170. package/dist/design/placeholders.d.ts.map +1 -1
  171. package/dist/design/placeholders.js +38 -7
  172. package/dist/design/placeholders.js.map +1 -1
  173. package/dist/html-backend.d.ts.map +1 -1
  174. package/dist/html-backend.js +75 -16
  175. package/dist/html-backend.js.map +1 -1
  176. package/dist/index.d.ts +13 -9
  177. package/dist/index.d.ts.map +1 -1
  178. package/dist/index.js +7 -4
  179. package/dist/index.js.map +1 -1
  180. package/dist/knuthPlass/breakpoints.d.ts.map +1 -1
  181. package/dist/knuthPlass/breakpoints.js +4 -2
  182. package/dist/knuthPlass/breakpoints.js.map +1 -1
  183. package/dist/knuthPlass/constants.d.ts +7 -0
  184. package/dist/knuthPlass/constants.d.ts.map +1 -1
  185. package/dist/knuthPlass/constants.js +7 -0
  186. package/dist/knuthPlass/constants.js.map +1 -1
  187. package/dist/knuthPlass/richAdapter.d.ts +2 -0
  188. package/dist/knuthPlass/richAdapter.d.ts.map +1 -1
  189. package/dist/knuthPlass/richAdapter.js +6 -6
  190. package/dist/knuthPlass/richAdapter.js.map +1 -1
  191. package/dist/measure/cache.js +2 -2
  192. package/dist/measure/cache.js.map +1 -1
  193. package/dist/measure/rich.d.ts +8 -0
  194. package/dist/measure/rich.d.ts.map +1 -1
  195. package/dist/measure/rich.js +54 -10
  196. package/dist/measure/rich.js.map +1 -1
  197. package/dist/measure/types.d.ts +4 -0
  198. package/dist/measure/types.d.ts.map +1 -1
  199. package/dist/measure/types.js.map +1 -1
  200. package/dist/parse/attrs.d.ts +10 -0
  201. package/dist/parse/attrs.d.ts.map +1 -0
  202. package/dist/parse/attrs.js +20 -0
  203. package/dist/parse/attrs.js.map +1 -0
  204. package/dist/parse/blockParser.d.ts +8 -4
  205. package/dist/parse/blockParser.d.ts.map +1 -1
  206. package/dist/parse/blockParser.js +134 -20
  207. package/dist/parse/blockParser.js.map +1 -1
  208. package/dist/parse/index.d.ts +2 -2
  209. package/dist/parse/index.d.ts.map +1 -1
  210. package/dist/parse/index.js +1 -1
  211. package/dist/parse/index.js.map +1 -1
  212. package/dist/parse/inlineFormatting.d.ts +17 -1
  213. package/dist/parse/inlineFormatting.d.ts.map +1 -1
  214. package/dist/parse/inlineFormatting.js +56 -7
  215. package/dist/parse/inlineFormatting.js.map +1 -1
  216. package/dist/parse/sourceMapping.d.ts.map +1 -1
  217. package/dist/parse/sourceMapping.js +13 -1
  218. package/dist/parse/sourceMapping.js.map +1 -1
  219. package/dist/parse/types.d.ts +55 -5
  220. package/dist/parse/types.d.ts.map +1 -1
  221. package/dist/pipeline/bandCaps.d.ts +86 -0
  222. package/dist/pipeline/bandCaps.d.ts.map +1 -0
  223. package/dist/pipeline/bandCaps.js +142 -0
  224. package/dist/pipeline/bandCaps.js.map +1 -0
  225. package/dist/pipeline/build.d.ts +41 -0
  226. package/dist/pipeline/build.d.ts.map +1 -1
  227. package/dist/pipeline/build.js +675 -168
  228. package/dist/pipeline/build.js.map +1 -1
  229. package/dist/pipeline/buildBlockKind.d.ts +8 -0
  230. package/dist/pipeline/buildBlockKind.d.ts.map +1 -1
  231. package/dist/pipeline/buildBlockKind.js +40 -11
  232. package/dist/pipeline/buildBlockKind.js.map +1 -1
  233. package/dist/pipeline/buildHelpers.d.ts +23 -1
  234. package/dist/pipeline/buildHelpers.d.ts.map +1 -1
  235. package/dist/pipeline/buildHelpers.js +50 -6
  236. package/dist/pipeline/buildHelpers.js.map +1 -1
  237. package/dist/pipeline/calloutLayout.d.ts +107 -0
  238. package/dist/pipeline/calloutLayout.d.ts.map +1 -0
  239. package/dist/pipeline/calloutLayout.js +498 -0
  240. package/dist/pipeline/calloutLayout.js.map +1 -0
  241. package/dist/pipeline/columnBalancing.d.ts +26 -8
  242. package/dist/pipeline/columnBalancing.d.ts.map +1 -1
  243. package/dist/pipeline/columnBalancing.js +50 -18
  244. package/dist/pipeline/columnBalancing.js.map +1 -1
  245. package/dist/pipeline/config.d.ts.map +1 -1
  246. package/dist/pipeline/config.js +17 -5
  247. package/dist/pipeline/config.js.map +1 -1
  248. package/dist/pipeline/headerFooter.d.ts +37 -2
  249. package/dist/pipeline/headerFooter.d.ts.map +1 -1
  250. package/dist/pipeline/headerFooter.js +231 -15
  251. package/dist/pipeline/headerFooter.js.map +1 -1
  252. package/dist/pipeline/lists.d.ts +15 -0
  253. package/dist/pipeline/lists.d.ts.map +1 -1
  254. package/dist/pipeline/lists.js +73 -16
  255. package/dist/pipeline/lists.js.map +1 -1
  256. package/dist/pipeline/measureContentBlock.d.ts +65 -0
  257. package/dist/pipeline/measureContentBlock.d.ts.map +1 -0
  258. package/dist/pipeline/measureContentBlock.js +134 -0
  259. package/dist/pipeline/measureContentBlock.js.map +1 -0
  260. package/dist/pipeline/pageRoles.d.ts +23 -0
  261. package/dist/pipeline/pageRoles.d.ts.map +1 -0
  262. package/dist/pipeline/pageRoles.js +54 -0
  263. package/dist/pipeline/pageRoles.js.map +1 -0
  264. package/dist/pipeline/paragraphContainers.d.ts +32 -0
  265. package/dist/pipeline/paragraphContainers.d.ts.map +1 -0
  266. package/dist/pipeline/paragraphContainers.js +61 -0
  267. package/dist/pipeline/paragraphContainers.js.map +1 -0
  268. package/dist/pipeline/parts.d.ts +47 -0
  269. package/dist/pipeline/parts.d.ts.map +1 -0
  270. package/dist/pipeline/parts.js +230 -0
  271. package/dist/pipeline/parts.js.map +1 -0
  272. package/dist/pipeline/placeholders.d.ts +46 -1
  273. package/dist/pipeline/placeholders.d.ts.map +1 -1
  274. package/dist/pipeline/placeholders.js +93 -11
  275. package/dist/pipeline/placeholders.js.map +1 -1
  276. package/dist/pipeline/placement.d.ts +61 -7
  277. package/dist/pipeline/placement.d.ts.map +1 -1
  278. package/dist/pipeline/placement.js +151 -12
  279. package/dist/pipeline/placement.js.map +1 -1
  280. package/dist/pipeline/resourceLayout.d.ts +18 -5
  281. package/dist/pipeline/resourceLayout.d.ts.map +1 -1
  282. package/dist/pipeline/resourceLayout.js +145 -23
  283. package/dist/pipeline/resourceLayout.js.map +1 -1
  284. package/dist/pipeline/styles.d.ts +9 -1
  285. package/dist/pipeline/styles.d.ts.map +1 -1
  286. package/dist/pipeline/styles.js +50 -0
  287. package/dist/pipeline/styles.js.map +1 -1
  288. package/dist/table/model.d.ts.map +1 -1
  289. package/dist/table/model.js +16 -2
  290. package/dist/table/model.js.map +1 -1
  291. package/dist/types.d.ts +468 -2
  292. package/dist/types.d.ts.map +1 -1
  293. package/dist/vdt.d.ts +132 -4
  294. package/dist/vdt.d.ts.map +1 -1
  295. package/dist/vdt.js +2 -1
  296. package/dist/vdt.js.map +1 -1
  297. package/package.json +8 -8
package/dist/types.d.ts CHANGED
@@ -60,6 +60,10 @@ export interface ResourceType {
60
60
  /** Default placement for resources of this type, used when a resource does
61
61
  * not specify its own `placement`. Falls back to `top` / `column`. */
62
62
  defaultPlacement?: ResourcePlacement;
63
+ /** Optional partial caption-style override for resources of this type.
64
+ * Only the keys set here replace the resolved global `captionStyle`; the
65
+ * rest is inherited (see `mergeCaptionStyle`). */
66
+ captionStyle?: CaptionStyleConfig;
63
67
  }
64
68
  /** The concrete payload kind a `Resource` carries. */
65
69
  export type ResourceKind = 'bitmap' | 'svg' | 'table';
@@ -93,6 +97,10 @@ export interface TableModel {
93
97
  rows: TableCell[][];
94
98
  /** Number of leading rows that form the table header. Default 0. */
95
99
  headerRowCount?: number;
100
+ /** Relative column weights (one per column), normalised at layout time —
101
+ * `[2, 1, 1]` gives the first column half the width. Unset, a wrong
102
+ * length, or any non-positive weight falls back to an equal split. */
103
+ columnWidths?: number[];
96
104
  }
97
105
  /** A user-managed resource instance. Binary payloads (bitmaps, SVGs) are
98
106
  * stored out-of-band (IndexedDB in the sandbox) and referenced by
@@ -105,6 +113,10 @@ export interface Resource {
105
113
  kind: ResourceKind;
106
114
  /** Optional caption text (the type prefix + number are computed). */
107
115
  caption?: string;
116
+ /** Optional note (source line, credits, footnote-like remark) set in a
117
+ * smaller run under the resource. Accepts the same inline formatting and
118
+ * `:ref` marks as the caption. Styled by `captionStyle.note`. */
119
+ note?: string;
108
120
  /** Accessibility alt text. */
109
121
  altText?: string;
110
122
  /** Creation timestamp (ms since epoch). */
@@ -224,8 +236,15 @@ export type PageSizePreset = '11x17' | '12x19' | '17x24' | '21x28' | 'custom';
224
236
  export interface PageMargins {
225
237
  top?: Dimension;
226
238
  bottom?: Dimension;
239
+ /** Inner (spine-side) margin when `mirror` is on; left margin otherwise. */
227
240
  left?: Dimension;
241
+ /** Outer margin when `mirror` is on; right margin otherwise. */
228
242
  right?: Dimension;
243
+ /** Mirrored (facing-page) margins: `left` is the inner margin and `right`
244
+ * the outer one. Odd pages (page 1 = odd) keep them as written; even
245
+ * pages swap them so the inner margin always faces the spine. Default
246
+ * `false`. */
247
+ mirror?: boolean;
229
248
  }
230
249
  export interface BaselineGridConfig {
231
250
  enabled: boolean;
@@ -481,7 +500,12 @@ export interface TableStyleConfig {
481
500
  borderWidth?: Dimension;
482
501
  /** Inner padding inside each cell. Default `0.375em`. */
483
502
  cellPadding?: Dimension;
503
+ /** Which rules to stroke when {@link borders} is on. Default `'grid'`. */
504
+ rules?: TableRules;
484
505
  }
506
+ /** Rule pattern of a table: the full cell grid, horizontal rules only (top
507
+ * and bottom edge of every row), the outer frame only, or none. */
508
+ export type TableRules = 'grid' | 'horizontal' | 'outer' | 'none';
485
509
  export interface ResolvedTableStyleConfig {
486
510
  bodyFontFamily: string;
487
511
  bodyFontSize: Dimension;
@@ -499,6 +523,31 @@ export interface ResolvedTableStyleConfig {
499
523
  borderColor: ColorValue;
500
524
  borderWidth: Dimension;
501
525
  cellPadding: Dimension;
526
+ rules: TableRules;
527
+ }
528
+ /** Where a resource caption sits relative to the figure body. */
529
+ export type CaptionPosition = 'above' | 'below';
530
+ /** Styling of the optional resource note (`Resource.note`) — a smaller run
531
+ * set under the resource (source line, credits). Inherits the caption
532
+ * typeface; every field is optional. */
533
+ export interface CaptionNoteStyleConfig {
534
+ /** Note font size. Default 0.85 × the caption size. */
535
+ fontSize?: Dimension;
536
+ /** Note text colour. Defaults to the caption {@link CaptionStyleConfig.color}. */
537
+ color?: ColorValue;
538
+ /** Render the note italic. Default `false`. */
539
+ italic?: boolean;
540
+ /** Gap between the note and what precedes it (body or caption). Default `0.35em`. */
541
+ gap?: Dimension;
542
+ /** Horizontal alignment of the note. Default `'left'`. */
543
+ align?: TextAlign;
544
+ }
545
+ export interface ResolvedCaptionNoteStyleConfig {
546
+ fontSize: Dimension;
547
+ color: ColorValue;
548
+ italic: boolean;
549
+ gap: Dimension;
550
+ align: TextAlign;
502
551
  }
503
552
  /** User-facing styling for resource captions (the numbered label such as
504
553
  * "Figure 1." plus the description text). The label and description share one
@@ -524,6 +573,17 @@ export interface CaptionStyleConfig {
524
573
  labelColor?: ColorValue;
525
574
  /** Render the description italic. Default `false`. */
526
575
  descriptionItalic?: boolean;
576
+ /** Caption placement: under the figure body (`'below'`, default) or on top
577
+ * of it (`'above'`), as a table heading. */
578
+ position?: CaptionPosition;
579
+ /** Paint a bar behind the caption spanning the block width. Default `false`. */
580
+ backgroundEnabled?: boolean;
581
+ /** Bar colour. Defaults to the document's main palette colour. */
582
+ background?: ColorValue;
583
+ /** Inner padding between the bar edge and the caption text. Default `0.35em`. */
584
+ padding?: Dimension;
585
+ /** Styling of the optional resource note (`Resource.note`). */
586
+ note?: CaptionNoteStyleConfig;
527
587
  }
528
588
  export interface ResolvedCaptionStyleConfig {
529
589
  fontFamily: string;
@@ -535,6 +595,11 @@ export interface ResolvedCaptionStyleConfig {
535
595
  labelItalic: boolean;
536
596
  labelColor: ColorValue;
537
597
  descriptionItalic: boolean;
598
+ position: CaptionPosition;
599
+ backgroundEnabled: boolean;
600
+ background: ColorValue;
601
+ padding: Dimension;
602
+ note: ResolvedCaptionNoteStyleConfig;
538
603
  }
539
604
  /** Styling for embedded SVG diagrams (`kind: 'svg'` resources). When
540
605
  * {@link singleInk} is on, every colour in the SVG is remapped to a tint of
@@ -551,6 +616,247 @@ export interface ResolvedDiagramStyleConfig {
551
616
  singleInk: boolean;
552
617
  inkColor: ColorValue;
553
618
  }
619
+ /** A named paragraph style, applied to the paragraphs inside a
620
+ * `:::paragraphs{style="<id>"}` container. Every typographic field is
621
+ * optional and inherits the body text when unset, so a style only needs to
622
+ * spell out what differs from running text. See
623
+ * {@link ResolvedParagraphStyleConfig}. */
624
+ export interface ParagraphStyleConfig {
625
+ /** Identifier referenced from `:::paragraphs{style="…"}`. */
626
+ id: string;
627
+ /** Human-readable name (editor UI only). Defaults to {@link id}. */
628
+ name?: string;
629
+ /** Defaults to the body font family. */
630
+ fontFamily?: string;
631
+ /** Defaults to the body font size. */
632
+ fontSize?: Dimension;
633
+ /** Leading. `em`/`rem` are relative to the style's own font size.
634
+ * Defaults to the body line height. */
635
+ lineHeight?: Dimension;
636
+ /** Defaults to the body text colour. */
637
+ color?: ColorValue;
638
+ /** Defaults to the body alignment (`center` is not available here). */
639
+ textAlign?: 'left' | 'justify';
640
+ /** Hyphenate when justified. Defaults to the body hyphenation setting. */
641
+ hyphenation?: boolean;
642
+ /** Defaults to the body first-line indent. Ignored when
643
+ * {@link hangingIndent} is non-zero. */
644
+ firstLineIndent?: Dimension;
645
+ /** Indent applied to every line except the first (bibliographies,
646
+ * glossaries). Non-zero replaces {@link firstLineIndent}. Default `0`. */
647
+ hangingIndent?: Dimension;
648
+ /** Vertical gap between consecutive paragraphs in the container. Default
649
+ * `0` — entries abut, off the baseline grid until the container closes. */
650
+ spaceBetween?: Dimension;
651
+ /** Space above the container's first block. Default `0`. */
652
+ marginTop?: Dimension;
653
+ /** Minimum space below the container's last block; the flow snaps back
654
+ * to the baseline grid after it. Default `0`. */
655
+ marginBottom?: Dimension;
656
+ }
657
+ export interface ResolvedParagraphStyleConfig {
658
+ id: string;
659
+ name: string;
660
+ fontFamily: string;
661
+ fontSize: Dimension;
662
+ lineHeight: Dimension;
663
+ color: ColorValue;
664
+ textAlign: 'left' | 'justify';
665
+ hyphenation: boolean;
666
+ firstLineIndent: Dimension;
667
+ hangingIndent: Dimension;
668
+ spaceBetween: Dimension;
669
+ marginTop: Dimension;
670
+ marginBottom: Dimension;
671
+ }
672
+ /** Horizontal extent of a callout: its column, or the full content width. */
673
+ export type CalloutSpan = 'column' | 'page';
674
+ /** Where a callout lands: inline in the flow (`'here'`), or floated to the
675
+ * top / bottom band of a page like a resource. */
676
+ export type CalloutPlacement = 'here' | 'top' | 'bottom';
677
+ /** `'fill'` spans the available width; `'auto'` shrink-wraps the title
678
+ * (badge use — children are ignored). */
679
+ export type CalloutWidth = 'fill' | 'auto';
680
+ export type CalloutStripeSide = 'left' | 'right' | 'top';
681
+ export type CalloutIconKind = 'none' | 'glyph' | 'resource';
682
+ export type CalloutIconAlign = 'top' | 'center';
683
+ export type CalloutTextTransform = 'none' | 'uppercase';
684
+ export interface CalloutBorderConfig {
685
+ enabled?: boolean;
686
+ color?: ColorValue;
687
+ width?: Dimension;
688
+ }
689
+ export interface CalloutPaddingConfig {
690
+ top?: Dimension;
691
+ right?: Dimension;
692
+ bottom?: Dimension;
693
+ left?: Dimension;
694
+ }
695
+ /** Solid band along one edge of the box. A side stripe reduces the inner
696
+ * width; a top stripe reduces the inner height. */
697
+ export interface CalloutStripeConfig {
698
+ enabled?: boolean;
699
+ side?: CalloutStripeSide;
700
+ width?: Dimension;
701
+ color?: ColorValue;
702
+ }
703
+ /** Icon drawn beside the title/body: a text glyph or a resource image. When
704
+ * the style has a side stripe the icon is centred over the stripe;
705
+ * otherwise it reserves its own column (`size` + `titleStyle.gap`). */
706
+ export interface CalloutIconConfig {
707
+ kind?: CalloutIconKind;
708
+ /** Glyph text for `kind: 'glyph'` (e.g. `'!'`, `'✎'`). */
709
+ glyph?: string;
710
+ /** Resource id (bitmap / svg) for `kind: 'resource'`. */
711
+ resourceId?: string;
712
+ /** Glyph font family. Defaults to the headings font. */
713
+ fontFamily?: string;
714
+ fontWeight?: number;
715
+ /** Icon box size (square). Default `1.5em` of the callout body size. */
716
+ size?: Dimension;
717
+ color?: ColorValue;
718
+ align?: CalloutIconAlign;
719
+ }
720
+ export interface CalloutTitleStyleConfig {
721
+ /** Defaults to the headings font family. */
722
+ fontFamily?: string;
723
+ /** Defaults to the body font size. */
724
+ fontSize?: Dimension;
725
+ fontWeight?: number;
726
+ italic?: boolean;
727
+ color?: ColorValue;
728
+ textTransform?: CalloutTextTransform;
729
+ /** Vertical gap between the title and the first child block (also the
730
+ * horizontal gap between the icon column and the content). */
731
+ gap?: Dimension;
732
+ }
733
+ /** Body typography inside the callout. Every field inherits `bodyText`. */
734
+ export interface CalloutBodyStyleConfig {
735
+ fontFamily?: string;
736
+ fontSize?: Dimension;
737
+ lineHeight?: Dimension;
738
+ color?: ColorValue;
739
+ textAlign?: 'left' | 'justify';
740
+ hyphenation?: boolean;
741
+ paragraphSpacing?: boolean;
742
+ firstLineIndent?: Dimension;
743
+ }
744
+ /** List typography inside the callout. Every field inherits
745
+ * `unorderedLists` (`color`, `indent`, `gap`, `itemSpacing` also apply to
746
+ * ordered lists). */
747
+ export interface CalloutListStyleConfig {
748
+ bulletChar?: string;
749
+ color?: ColorValue;
750
+ indent?: Dimension;
751
+ gap?: Dimension;
752
+ itemSpacing?: Dimension;
753
+ }
754
+ /** A named callout style, selected by `:::callout{type="<id>"}`. */
755
+ export interface CalloutStyleConfig {
756
+ id: string;
757
+ /** Human-readable name (editor UI only). Defaults to {@link id}. */
758
+ name?: string;
759
+ /** Default title text; empty / unset = no title. The fence `title`
760
+ * attribute overrides it per instance. */
761
+ title?: string;
762
+ /** Default `'column'`. Overridable per instance with the `span` attribute. */
763
+ span?: CalloutSpan;
764
+ /** Default `'here'`. Overridable per instance with the `placement` attribute. */
765
+ placement?: CalloutPlacement;
766
+ /** Default `'fill'`. */
767
+ width?: CalloutWidth;
768
+ /** Default `true`. */
769
+ backgroundEnabled?: boolean;
770
+ /** Default `#f4f4f4`. */
771
+ background?: ColorValue;
772
+ /** Default off, `#cccccc`, `0.5pt`. */
773
+ border?: CalloutBorderConfig;
774
+ /** Default `0`. */
775
+ borderRadius?: Dimension;
776
+ /** Default `0.75em` on every side. */
777
+ padding?: CalloutPaddingConfig;
778
+ /** Default off, `left`, `1.5em`, main colour. */
779
+ stripe?: CalloutStripeConfig;
780
+ /** Default `kind: 'none'`. */
781
+ icon?: CalloutIconConfig;
782
+ titleStyle?: CalloutTitleStyleConfig;
783
+ body?: CalloutBodyStyleConfig;
784
+ lists?: CalloutListStyleConfig;
785
+ /** Space above the box. Default `0.75em`. */
786
+ marginTop?: Dimension;
787
+ /** Minimum space below the box; the flow snaps back to the baseline grid
788
+ * after it. Default `0.75em`. */
789
+ marginBottom?: Dimension;
790
+ /** Always `true` in v1: callouts never split across columns or pages. */
791
+ keepTogether?: boolean;
792
+ }
793
+ export interface ResolvedCalloutStyleConfig {
794
+ id: string;
795
+ name: string;
796
+ title: string;
797
+ span: CalloutSpan;
798
+ placement: CalloutPlacement;
799
+ width: CalloutWidth;
800
+ backgroundEnabled: boolean;
801
+ background: ColorValue;
802
+ border: {
803
+ enabled: boolean;
804
+ color: ColorValue;
805
+ width: Dimension;
806
+ };
807
+ borderRadius: Dimension;
808
+ padding: {
809
+ top: Dimension;
810
+ right: Dimension;
811
+ bottom: Dimension;
812
+ left: Dimension;
813
+ };
814
+ stripe: {
815
+ enabled: boolean;
816
+ side: CalloutStripeSide;
817
+ width: Dimension;
818
+ color: ColorValue;
819
+ };
820
+ icon: {
821
+ kind: CalloutIconKind;
822
+ glyph: string;
823
+ resourceId: string;
824
+ fontFamily: string;
825
+ fontWeight: number;
826
+ size: Dimension;
827
+ color: ColorValue;
828
+ align: CalloutIconAlign;
829
+ };
830
+ titleStyle: {
831
+ fontFamily: string;
832
+ fontSize: Dimension;
833
+ fontWeight: number;
834
+ italic: boolean;
835
+ color: ColorValue;
836
+ textTransform: CalloutTextTransform;
837
+ gap: Dimension;
838
+ };
839
+ body: {
840
+ fontFamily: string;
841
+ fontSize: Dimension;
842
+ lineHeight: Dimension;
843
+ color: ColorValue;
844
+ textAlign: 'left' | 'justify';
845
+ hyphenation: boolean;
846
+ paragraphSpacing: boolean;
847
+ firstLineIndent: Dimension;
848
+ };
849
+ lists: {
850
+ bulletChar: string;
851
+ color: ColorValue;
852
+ indent: Dimension;
853
+ gap: Dimension;
854
+ itemSpacing: Dimension;
855
+ };
856
+ marginTop: Dimension;
857
+ marginBottom: Dimension;
858
+ keepTogether: boolean;
859
+ }
554
860
  /** Parity constraint for a forced page break.
555
861
  *
556
862
  * - `'any'` — no constraint; the break just opens a new page.
@@ -587,10 +893,16 @@ export type HeadingSpan = 'column' | 'page';
587
893
  export interface HeadingAdvancedDesignConfig {
588
894
  enabled: boolean;
589
895
  slot: DesignSlot;
896
+ /** Minimum height reserved for the heading in the column flow. The
897
+ * reserved height is `max(design content bottom, minHeight)`, so an
898
+ * opener can push body text down even when its elements are short (or
899
+ * anchored to the page/bleed frames above the heading). */
900
+ minHeight?: Dimension;
590
901
  }
591
902
  export interface ResolvedHeadingAdvancedDesignConfig {
592
903
  enabled: boolean;
593
904
  slot: ResolvedDesignSlot;
905
+ minHeight?: Dimension;
594
906
  }
595
907
  export interface HeadingLevelConfig {
596
908
  level: number;
@@ -608,7 +920,13 @@ export interface HeadingLevelConfig {
608
920
  span?: HeadingSpan;
609
921
  /** When enabled, the heading renders as a design slot. */
610
922
  advancedDesign?: HeadingAdvancedDesignConfig;
923
+ /** Letter-case transform applied to the heading title (after any
924
+ * numbering prefix, which is kept as written). Length-preserving so the
925
+ * editor's source map stays 1:1 — characters whose upper-case form
926
+ * expands (`ß` → `SS`) are left unchanged. Default `'none'`. */
927
+ textTransform?: HeadingTextTransform;
611
928
  }
929
+ export type HeadingTextTransform = 'none' | 'uppercase';
612
930
  export interface ResolvedHeadingLevelConfig {
613
931
  level: number;
614
932
  fontSize: Dimension;
@@ -623,6 +941,7 @@ export interface ResolvedHeadingLevelConfig {
623
941
  breakBefore: ResolvedHeadingBreakBeforeConfig;
624
942
  span: HeadingSpan;
625
943
  advancedDesign: ResolvedHeadingAdvancedDesignConfig;
944
+ textTransform: HeadingTextTransform;
626
945
  }
627
946
  export interface HeadingsConfig {
628
947
  fontFamily?: string;
@@ -658,6 +977,17 @@ export interface ColumnBalancingConfig {
658
977
  * (TeX \looseness=+1), within the configured `bodyText.maxWordSpacing`.
659
978
  * Requires `bodyText.optimalLineBreaking`. Default true. */
660
979
  looseParagraphs?: boolean;
980
+ /** How many paragraphs of one short column may be run a line long (one
981
+ * extra line each, longest paragraphs first). Default 2. */
982
+ maxLooseParagraphs?: number;
983
+ /** Let a loose paragraph also take a little positive tracking (letter
984
+ * spacing) when word spacing alone cannot gain the line — the compositor's
985
+ * classic fix. Only the smallest tracking that gains the line is used, and
986
+ * never more than `maxTracking`. Default true. */
987
+ trackParagraphs?: boolean;
988
+ /** Maximum tracking for a loose paragraph, in thousandths of an em (the
989
+ * InDesign unit: 10 = 0.01 em per character). Default 10. */
990
+ maxTracking?: number;
661
991
  }
662
992
  export interface ResolvedHeadingsConfig {
663
993
  fontFamily: string;
@@ -674,6 +1004,9 @@ export interface ResolvedHeadingsConfig {
674
1004
  stretchAfterLists: boolean;
675
1005
  maxLinesAfterList: number;
676
1006
  looseParagraphs: boolean;
1007
+ maxLooseParagraphs: number;
1008
+ trackParagraphs: boolean;
1009
+ maxTracking: number;
677
1010
  };
678
1011
  levels: ResolvedHeadingLevelConfig[];
679
1012
  }
@@ -759,6 +1092,13 @@ export interface OrderedListLevelConfig {
759
1092
  italic?: boolean;
760
1093
  indent?: Dimension;
761
1094
  verticalOffset?: Dimension;
1095
+ /** Separator run styling for this level; each field inherits the level's
1096
+ * number style (or the list-wide separator setting) when unset. */
1097
+ separatorFontFamily?: string;
1098
+ separatorFontWeight?: number;
1099
+ separatorItalic?: boolean;
1100
+ separatorColor?: ColorValue;
1101
+ separatorGap?: Dimension;
762
1102
  }
763
1103
  export interface ResolvedOrderedListLevelConfig {
764
1104
  level: number;
@@ -772,6 +1112,11 @@ export interface ResolvedOrderedListLevelConfig {
772
1112
  /** User-overridden indent for this level. Undefined => pipeline cascades. */
773
1113
  indent?: Dimension;
774
1114
  verticalOffset: Dimension;
1115
+ separatorFontFamily: string;
1116
+ separatorFontWeight: number;
1117
+ separatorItalic: boolean;
1118
+ separatorColor: ColorValue;
1119
+ separatorGap: Dimension;
775
1120
  }
776
1121
  export interface OrderedListsConfig {
777
1122
  fontFamily?: string;
@@ -789,6 +1134,16 @@ export interface OrderedListsConfig {
789
1134
  itemSpacing?: Dimension;
790
1135
  hangingIndent?: boolean;
791
1136
  levels?: OrderedListLevelConfig[];
1137
+ /** Font family of the separator run. Inherits the number's `fontFamily`. */
1138
+ separatorFontFamily?: string;
1139
+ /** Weight of the separator run. Inherits the number's `fontWeight`. */
1140
+ separatorFontWeight?: number;
1141
+ /** Italic separator run. Inherits the number's `italic`. */
1142
+ separatorItalic?: boolean;
1143
+ /** Colour of the separator run. Inherits the number's `color`. */
1144
+ separatorColor?: ColorValue;
1145
+ /** Space between the number and the separator. Default `0em`. */
1146
+ separatorGap?: Dimension;
792
1147
  }
793
1148
  export interface ResolvedOrderedListsConfig {
794
1149
  fontFamily: string;
@@ -806,6 +1161,11 @@ export interface ResolvedOrderedListsConfig {
806
1161
  itemSpacing: Dimension;
807
1162
  hangingIndent: boolean;
808
1163
  levels: ResolvedOrderedListLevelConfig[];
1164
+ separatorFontFamily: string;
1165
+ separatorFontWeight: number;
1166
+ separatorItalic: boolean;
1167
+ separatorColor: ColorValue;
1168
+ separatorGap: Dimension;
809
1169
  }
810
1170
  export interface SyncIndicatorConfig {
811
1171
  enabled: boolean;
@@ -943,12 +1303,28 @@ export interface CustomFontFamily {
943
1303
  }
944
1304
  export type PageParity = 'all' | 'odd' | 'even';
945
1305
  export type HeaderFooterHAlign = 'left' | 'center' | 'right';
1306
+ /** Classification of a laid-out page, computed after placement
1307
+ * (`pipeline/pageRoles.ts`):
1308
+ * - `'blank'` — parity / force-blank padding, or a page with no content;
1309
+ * - `'part'` — a part-divider page (`partInfo` set);
1310
+ * - `'opener'` — the first block in reading order is a heading whose level
1311
+ * spans the page or forces a page break before it (a chapter opener);
1312
+ * - `'body'` — everything else. */
1313
+ export type PageRole = 'body' | 'opener' | 'part' | 'blank';
1314
+ /** Which page roles a design element renders on. `'all'` (default) renders
1315
+ * on every page the parity filter admits. */
1316
+ export type PageRoleFilter = 'all' | PageRole;
946
1317
  export type HAlign = 'left' | 'center' | 'right';
947
1318
  export type VAlign = 'top' | 'middle' | 'bottom';
948
1319
  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';
949
1320
  export interface ElementAnchor {
950
- /** `'container'` or `'#elementId'` reference to another element in the slot. */
951
- to: 'container' | `#${string}`;
1321
+ /** `'container'` (the slot's own container), `'page'` (the trim box),
1322
+ * `'bleed'` (the trim box expanded by `cutLines.bleed` when cut lines are
1323
+ * enabled, otherwise the trim box) or `'#elementId'` — a reference to
1324
+ * another element in the slot. Page/bleed anchoring also makes that frame
1325
+ * the reference for `size: 'fill'` and auto-width clamping, so a band can
1326
+ * run edge to edge regardless of the page margins. */
1327
+ to: 'container' | 'page' | 'bleed' | `#${string}`;
952
1328
  edge: AnchorEdge;
953
1329
  }
954
1330
  export type ElementSize = 'auto' | 'fill' | Dimension;
@@ -982,6 +1358,9 @@ export interface DesignTextElement {
982
1358
  id: string;
983
1359
  /** Header/footer only; ignored by heading designs. */
984
1360
  parity?: PageParity;
1361
+ /** Page roles this element renders on (see `PageRoleFilter`). Default
1362
+ * `'all'`. */
1363
+ pages?: PageRoleFilter;
985
1364
  placement: ElementPlacement;
986
1365
  /** Template with placeholders (see design/placeholders.ts). Use `{{`/`}}`
987
1366
  * for literal braces. */
@@ -1007,6 +1386,8 @@ export interface DesignRuleElement {
1007
1386
  kind: 'rule';
1008
1387
  id: string;
1009
1388
  parity?: PageParity;
1389
+ /** Page roles this element renders on. Default `'all'`. */
1390
+ pages?: PageRoleFilter;
1010
1391
  placement: ElementPlacement;
1011
1392
  direction: 'horizontal' | 'vertical';
1012
1393
  color: ColorValue;
@@ -1016,6 +1397,8 @@ export interface DesignBoxElement {
1016
1397
  kind: 'box';
1017
1398
  id: string;
1018
1399
  parity?: PageParity;
1400
+ /** Page roles this element renders on. Default `'all'`. */
1401
+ pages?: PageRoleFilter;
1019
1402
  placement: ElementPlacement;
1020
1403
  style: ElementBoxStyle;
1021
1404
  }
@@ -1090,6 +1473,81 @@ export type HeaderFooterRuleElement = DesignRuleElement;
1090
1473
  export type ResolvedHeaderFooterTextElement = ResolvedDesignTextElement;
1091
1474
  /** @deprecated Use `ResolvedDesignRuleElement`. */
1092
1475
  export type ResolvedHeaderFooterRuleElement = ResolvedDesignRuleElement;
1476
+ export interface PartsBreakBeforeConfig {
1477
+ /** Parity of the page the part opens on. Default `'odd'`. */
1478
+ parity?: HeadingBreakParity;
1479
+ }
1480
+ export interface PartsBreakAfterConfig {
1481
+ /** Whether the content after the part moves to a fresh page. Default `true`. */
1482
+ enabled?: boolean;
1483
+ /** Parity of that fresh page. Default `'any'` — the next chapter's own
1484
+ * `breakBefore.parity` then decides whether a blank verso follows. */
1485
+ parity?: HeadingBreakParity;
1486
+ }
1487
+ /** Typography of the blocks inside a `:::part` container. Every field
1488
+ * inherits `bodyText` / the list configs when unset. */
1489
+ export interface PartsBodyStyleConfig {
1490
+ fontFamily?: string;
1491
+ fontSize?: Dimension;
1492
+ lineHeight?: Dimension;
1493
+ color?: ColorValue;
1494
+ textAlign?: TextAlign;
1495
+ /** Bullet colour of unordered lists inside the part. */
1496
+ bulletColor?: ColorValue;
1497
+ /** Number colour of ordered lists inside the part (numbers are set bold). */
1498
+ numberColor?: ColorValue;
1499
+ /** Partial overrides applied on top of the document's `unorderedLists`
1500
+ * inside the part (after `bulletColor`). */
1501
+ unorderedLists?: UnorderedListsConfig;
1502
+ /** Partial overrides applied on top of the document's `orderedLists`
1503
+ * inside the part (after `numberColor` and the bold weight). */
1504
+ orderedLists?: OrderedListsConfig;
1505
+ }
1506
+ export interface PartsConfig {
1507
+ breakBefore?: PartsBreakBeforeConfig;
1508
+ breakAfter?: PartsBreakAfterConfig;
1509
+ /** Body area of the part page. Defaults to the page margins (`mirror`
1510
+ * honoured). */
1511
+ margins?: PageMargins;
1512
+ /** Opener design. Its container is the page trim box, so `'page'` /
1513
+ * `'bleed'` anchors and container anchors coincide. Purely decorative —
1514
+ * it never reserves body space; raise `margins.top` to leave room for
1515
+ * it. When empty, `{number} {titleText}` is synthesised from the H1
1516
+ * typography. */
1517
+ design?: DesignSlot;
1518
+ /** Design of the blank verso that follows a part page (the back of the
1519
+ * divider leaf). Same container and placeholders as `design`; when
1520
+ * empty the verso stays plain. */
1521
+ versoDesign?: DesignSlot;
1522
+ bodyStyle?: PartsBodyStyleConfig;
1523
+ }
1524
+ export interface ResolvedPartsBreakBeforeConfig {
1525
+ parity: HeadingBreakParity;
1526
+ }
1527
+ export interface ResolvedPartsBreakAfterConfig {
1528
+ enabled: boolean;
1529
+ parity: HeadingBreakParity;
1530
+ }
1531
+ export interface ResolvedPartsBodyStyleConfig {
1532
+ fontFamily: string;
1533
+ fontSize: Dimension;
1534
+ lineHeight: Dimension;
1535
+ color: ColorValue;
1536
+ textAlign: TextAlign;
1537
+ bulletColor: ColorValue;
1538
+ numberColor: ColorValue;
1539
+ /** Kept partial: applied on top of the resolved document lists inside parts. */
1540
+ unorderedLists?: UnorderedListsConfig;
1541
+ orderedLists?: OrderedListsConfig;
1542
+ }
1543
+ export interface ResolvedPartsConfig {
1544
+ breakBefore: ResolvedPartsBreakBeforeConfig;
1545
+ breakAfter: ResolvedPartsBreakAfterConfig;
1546
+ margins: Required<PageMargins>;
1547
+ design: ResolvedDesignSlot;
1548
+ versoDesign: ResolvedDesignSlot;
1549
+ bodyStyle: ResolvedPartsBodyStyleConfig;
1550
+ }
1093
1551
  export interface PostextConfig {
1094
1552
  page?: PageConfig;
1095
1553
  layout?: LayoutConfig;
@@ -1101,6 +1559,14 @@ export interface PostextConfig {
1101
1559
  captionStyle?: CaptionStyleConfig;
1102
1560
  /** Styling for embedded SVG diagrams (single-ink reproduction). */
1103
1561
  diagramStyle?: DiagramStyleConfig;
1562
+ /** Named paragraph styles for `:::paragraphs{style="…"}` containers. */
1563
+ paragraphStyles?: ParagraphStyleConfig[];
1564
+ /** Named callout styles for `:::callout{type="…"}` containers. Defaults
1565
+ * to a single neutral `note` style when unset. */
1566
+ calloutStyles?: CalloutStyleConfig[];
1567
+ /** Part dividers (`:::part` containers): page breaks, body area,
1568
+ * opener design and body typography. */
1569
+ parts?: PartsConfig;
1104
1570
  unorderedLists?: UnorderedListsConfig;
1105
1571
  orderedLists?: OrderedListsConfig;
1106
1572
  math?: MathConfig;