postext 0.3.19 → 0.3.20

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 (259) hide show
  1. package/dist/__tests__/defaults/calloutStyles.test.d.ts +2 -0
  2. package/dist/__tests__/defaults/calloutStyles.test.d.ts.map +1 -0
  3. package/dist/__tests__/defaults/calloutStyles.test.js +201 -0
  4. package/dist/__tests__/defaults/calloutStyles.test.js.map +1 -0
  5. package/dist/__tests__/defaults/captionStyle.test.d.ts +2 -0
  6. package/dist/__tests__/defaults/captionStyle.test.d.ts.map +1 -0
  7. package/dist/__tests__/defaults/captionStyle.test.js +87 -0
  8. package/dist/__tests__/defaults/captionStyle.test.js.map +1 -0
  9. package/dist/__tests__/defaults/pageSizePreset.test.d.ts +2 -0
  10. package/dist/__tests__/defaults/pageSizePreset.test.d.ts.map +1 -0
  11. package/dist/__tests__/defaults/pageSizePreset.test.js +24 -0
  12. package/dist/__tests__/defaults/pageSizePreset.test.js.map +1 -0
  13. package/dist/__tests__/defaults/paragraphStyles.test.d.ts +2 -0
  14. package/dist/__tests__/defaults/paragraphStyles.test.d.ts.map +1 -0
  15. package/dist/__tests__/defaults/paragraphStyles.test.js +93 -0
  16. package/dist/__tests__/defaults/paragraphStyles.test.js.map +1 -0
  17. package/dist/__tests__/design/pageAnchors.test.d.ts +2 -0
  18. package/dist/__tests__/design/pageAnchors.test.d.ts.map +1 -0
  19. package/dist/__tests__/design/pageAnchors.test.js +140 -0
  20. package/dist/__tests__/design/pageAnchors.test.js.map +1 -0
  21. package/dist/__tests__/directives.test.js +58 -0
  22. package/dist/__tests__/directives.test.js.map +1 -1
  23. package/dist/__tests__/exports.test.js +19 -0
  24. package/dist/__tests__/exports.test.js.map +1 -1
  25. package/dist/__tests__/mirroredMargins.test.d.ts +2 -0
  26. package/dist/__tests__/mirroredMargins.test.d.ts.map +1 -0
  27. package/dist/__tests__/mirroredMargins.test.js +136 -0
  28. package/dist/__tests__/mirroredMargins.test.js.map +1 -0
  29. package/dist/__tests__/numbering.test.js +54 -0
  30. package/dist/__tests__/numbering.test.js.map +1 -1
  31. package/dist/__tests__/openerTitleSource.test.d.ts +2 -0
  32. package/dist/__tests__/openerTitleSource.test.d.ts.map +1 -0
  33. package/dist/__tests__/openerTitleSource.test.js +108 -0
  34. package/dist/__tests__/openerTitleSource.test.js.map +1 -0
  35. package/dist/__tests__/pageRoles.test.d.ts +2 -0
  36. package/dist/__tests__/pageRoles.test.d.ts.map +1 -0
  37. package/dist/__tests__/pageRoles.test.js +95 -0
  38. package/dist/__tests__/pageRoles.test.js.map +1 -0
  39. package/dist/__tests__/parse/containers.test.d.ts +2 -0
  40. package/dist/__tests__/parse/containers.test.d.ts.map +1 -0
  41. package/dist/__tests__/parse/containers.test.js +204 -0
  42. package/dist/__tests__/parse/containers.test.js.map +1 -0
  43. package/dist/__tests__/parse/headingAttrs.test.d.ts +2 -0
  44. package/dist/__tests__/parse/headingAttrs.test.d.ts.map +1 -0
  45. package/dist/__tests__/parse/headingAttrs.test.js +62 -0
  46. package/dist/__tests__/parse/headingAttrs.test.js.map +1 -0
  47. package/dist/__tests__/parse/inlineRef.test.js +26 -0
  48. package/dist/__tests__/parse/inlineRef.test.js.map +1 -1
  49. package/dist/__tests__/parts.test.d.ts +2 -0
  50. package/dist/__tests__/parts.test.d.ts.map +1 -0
  51. package/dist/__tests__/parts.test.js +405 -0
  52. package/dist/__tests__/parts.test.js.map +1 -0
  53. package/dist/__tests__/pipeline/calloutLayout.test.d.ts +2 -0
  54. package/dist/__tests__/pipeline/calloutLayout.test.d.ts.map +1 -0
  55. package/dist/__tests__/pipeline/calloutLayout.test.js +273 -0
  56. package/dist/__tests__/pipeline/calloutLayout.test.js.map +1 -0
  57. package/dist/__tests__/pipeline/calloutPlacement.test.d.ts +2 -0
  58. package/dist/__tests__/pipeline/calloutPlacement.test.d.ts.map +1 -0
  59. package/dist/__tests__/pipeline/calloutPlacement.test.js +239 -0
  60. package/dist/__tests__/pipeline/calloutPlacement.test.js.map +1 -0
  61. package/dist/__tests__/pipeline/captionLayout.test.d.ts +2 -0
  62. package/dist/__tests__/pipeline/captionLayout.test.d.ts.map +1 -0
  63. package/dist/__tests__/pipeline/captionLayout.test.js +269 -0
  64. package/dist/__tests__/pipeline/captionLayout.test.js.map +1 -0
  65. package/dist/__tests__/pipeline/inlineRefRender.test.js +53 -0
  66. package/dist/__tests__/pipeline/inlineRefRender.test.js.map +1 -1
  67. package/dist/__tests__/pipeline/orderedSeparator.test.d.ts +2 -0
  68. package/dist/__tests__/pipeline/orderedSeparator.test.d.ts.map +1 -0
  69. package/dist/__tests__/pipeline/orderedSeparator.test.js +196 -0
  70. package/dist/__tests__/pipeline/orderedSeparator.test.js.map +1 -0
  71. package/dist/__tests__/pipeline/paragraphStyles.test.d.ts +2 -0
  72. package/dist/__tests__/pipeline/paragraphStyles.test.d.ts.map +1 -0
  73. package/dist/__tests__/pipeline/paragraphStyles.test.js +172 -0
  74. package/dist/__tests__/pipeline/paragraphStyles.test.js.map +1 -0
  75. package/dist/__tests__/pipeline/spanBands.test.d.ts +2 -0
  76. package/dist/__tests__/pipeline/spanBands.test.d.ts.map +1 -0
  77. package/dist/__tests__/pipeline/spanBands.test.js +303 -0
  78. package/dist/__tests__/pipeline/spanBands.test.js.map +1 -0
  79. package/dist/__tests__/pipeline/spanBlocks.test.d.ts +2 -0
  80. package/dist/__tests__/pipeline/spanBlocks.test.d.ts.map +1 -0
  81. package/dist/__tests__/pipeline/spanBlocks.test.js +407 -0
  82. package/dist/__tests__/pipeline/spanBlocks.test.js.map +1 -0
  83. package/dist/__tests__/placeholders.test.d.ts +2 -0
  84. package/dist/__tests__/placeholders.test.d.ts.map +1 -0
  85. package/dist/__tests__/placeholders.test.js +130 -0
  86. package/dist/__tests__/placeholders.test.js.map +1 -0
  87. package/dist/__tests__/table/model.test.js +24 -0
  88. package/dist/__tests__/table/model.test.js.map +1 -1
  89. package/dist/canvas-backend/blockRender.d.ts.map +1 -1
  90. package/dist/canvas-backend/blockRender.js +13 -1
  91. package/dist/canvas-backend/blockRender.js.map +1 -1
  92. package/dist/canvas-backend/decorations.d.ts +3 -0
  93. package/dist/canvas-backend/decorations.d.ts.map +1 -1
  94. package/dist/canvas-backend/decorations.js +14 -8
  95. package/dist/canvas-backend/decorations.js.map +1 -1
  96. package/dist/canvas-backend/headerFooter.d.ts.map +1 -1
  97. package/dist/canvas-backend/headerFooter.js +23 -0
  98. package/dist/canvas-backend/headerFooter.js.map +1 -1
  99. package/dist/canvas-backend/index.d.ts.map +1 -1
  100. package/dist/canvas-backend/index.js +4 -2
  101. package/dist/canvas-backend/index.js.map +1 -1
  102. package/dist/canvas-backend/renderResourceBlock.d.ts.map +1 -1
  103. package/dist/canvas-backend/renderResourceBlock.js +33 -5
  104. package/dist/canvas-backend/renderResourceBlock.js.map +1 -1
  105. package/dist/columnRule.d.ts +19 -0
  106. package/dist/columnRule.d.ts.map +1 -0
  107. package/dist/columnRule.js +36 -0
  108. package/dist/columnRule.js.map +1 -0
  109. package/dist/defaults/calloutStyles.d.ts +61 -0
  110. package/dist/defaults/calloutStyles.d.ts.map +1 -0
  111. package/dist/defaults/calloutStyles.js +292 -0
  112. package/dist/defaults/calloutStyles.js.map +1 -0
  113. package/dist/defaults/captionStyle.d.ts +11 -1
  114. package/dist/defaults/captionStyle.d.ts.map +1 -1
  115. package/dist/defaults/captionStyle.js +127 -2
  116. package/dist/defaults/captionStyle.js.map +1 -1
  117. package/dist/defaults/headerFooter.d.ts.map +1 -1
  118. package/dist/defaults/headerFooter.js +3 -0
  119. package/dist/defaults/headerFooter.js.map +1 -1
  120. package/dist/defaults/headings.d.ts.map +1 -1
  121. package/dist/defaults/headings.js +12 -6
  122. package/dist/defaults/headings.js.map +1 -1
  123. package/dist/defaults/index.d.ts +4 -1
  124. package/dist/defaults/index.d.ts.map +1 -1
  125. package/dist/defaults/index.js +28 -1
  126. package/dist/defaults/index.js.map +1 -1
  127. package/dist/defaults/orderedLists.d.ts +9 -8
  128. package/dist/defaults/orderedLists.d.ts.map +1 -1
  129. package/dist/defaults/orderedLists.js +66 -4
  130. package/dist/defaults/orderedLists.js.map +1 -1
  131. package/dist/defaults/page.d.ts.map +1 -1
  132. package/dist/defaults/page.js +14 -3
  133. package/dist/defaults/page.js.map +1 -1
  134. package/dist/defaults/paragraphStyles.d.ts +10 -0
  135. package/dist/defaults/paragraphStyles.d.ts.map +1 -0
  136. package/dist/defaults/paragraphStyles.js +67 -0
  137. package/dist/defaults/paragraphStyles.js.map +1 -0
  138. package/dist/defaults/parts.d.ts +22 -0
  139. package/dist/defaults/parts.d.ts.map +1 -0
  140. package/dist/defaults/parts.js +139 -0
  141. package/dist/defaults/parts.js.map +1 -0
  142. package/dist/defaults/shared.d.ts.map +1 -1
  143. package/dist/defaults/shared.js +110 -17
  144. package/dist/defaults/shared.js.map +1 -1
  145. package/dist/defaults/tableStyle.d.ts.map +1 -1
  146. package/dist/defaults/tableStyle.js +6 -0
  147. package/dist/defaults/tableStyle.js.map +1 -1
  148. package/dist/design/layout.d.ts +27 -1
  149. package/dist/design/layout.d.ts.map +1 -1
  150. package/dist/design/layout.js +39 -8
  151. package/dist/design/layout.js.map +1 -1
  152. package/dist/design/placeholders.d.ts +21 -4
  153. package/dist/design/placeholders.d.ts.map +1 -1
  154. package/dist/design/placeholders.js +38 -7
  155. package/dist/design/placeholders.js.map +1 -1
  156. package/dist/html-backend.d.ts.map +1 -1
  157. package/dist/html-backend.js +71 -16
  158. package/dist/html-backend.js.map +1 -1
  159. package/dist/index.d.ts +13 -9
  160. package/dist/index.d.ts.map +1 -1
  161. package/dist/index.js +7 -4
  162. package/dist/index.js.map +1 -1
  163. package/dist/parse/attrs.d.ts +10 -0
  164. package/dist/parse/attrs.d.ts.map +1 -0
  165. package/dist/parse/attrs.js +20 -0
  166. package/dist/parse/attrs.js.map +1 -0
  167. package/dist/parse/blockParser.d.ts +8 -4
  168. package/dist/parse/blockParser.d.ts.map +1 -1
  169. package/dist/parse/blockParser.js +134 -20
  170. package/dist/parse/blockParser.js.map +1 -1
  171. package/dist/parse/index.d.ts +2 -2
  172. package/dist/parse/index.d.ts.map +1 -1
  173. package/dist/parse/index.js +1 -1
  174. package/dist/parse/index.js.map +1 -1
  175. package/dist/parse/inlineFormatting.d.ts +17 -1
  176. package/dist/parse/inlineFormatting.d.ts.map +1 -1
  177. package/dist/parse/inlineFormatting.js +56 -7
  178. package/dist/parse/inlineFormatting.js.map +1 -1
  179. package/dist/parse/sourceMapping.d.ts.map +1 -1
  180. package/dist/parse/sourceMapping.js +13 -1
  181. package/dist/parse/sourceMapping.js.map +1 -1
  182. package/dist/parse/types.d.ts +55 -5
  183. package/dist/parse/types.d.ts.map +1 -1
  184. package/dist/pipeline/bandCaps.d.ts +86 -0
  185. package/dist/pipeline/bandCaps.d.ts.map +1 -0
  186. package/dist/pipeline/bandCaps.js +142 -0
  187. package/dist/pipeline/bandCaps.js.map +1 -0
  188. package/dist/pipeline/build.d.ts +32 -0
  189. package/dist/pipeline/build.d.ts.map +1 -1
  190. package/dist/pipeline/build.js +589 -159
  191. package/dist/pipeline/build.js.map +1 -1
  192. package/dist/pipeline/buildBlockKind.d.ts +8 -0
  193. package/dist/pipeline/buildBlockKind.d.ts.map +1 -1
  194. package/dist/pipeline/buildBlockKind.js +40 -11
  195. package/dist/pipeline/buildBlockKind.js.map +1 -1
  196. package/dist/pipeline/buildHelpers.d.ts +23 -1
  197. package/dist/pipeline/buildHelpers.d.ts.map +1 -1
  198. package/dist/pipeline/buildHelpers.js +50 -6
  199. package/dist/pipeline/buildHelpers.js.map +1 -1
  200. package/dist/pipeline/calloutLayout.d.ts +107 -0
  201. package/dist/pipeline/calloutLayout.d.ts.map +1 -0
  202. package/dist/pipeline/calloutLayout.js +498 -0
  203. package/dist/pipeline/calloutLayout.js.map +1 -0
  204. package/dist/pipeline/columnBalancing.d.ts.map +1 -1
  205. package/dist/pipeline/columnBalancing.js +22 -2
  206. package/dist/pipeline/columnBalancing.js.map +1 -1
  207. package/dist/pipeline/config.d.ts.map +1 -1
  208. package/dist/pipeline/config.js +17 -5
  209. package/dist/pipeline/config.js.map +1 -1
  210. package/dist/pipeline/headerFooter.d.ts +37 -2
  211. package/dist/pipeline/headerFooter.d.ts.map +1 -1
  212. package/dist/pipeline/headerFooter.js +231 -15
  213. package/dist/pipeline/headerFooter.js.map +1 -1
  214. package/dist/pipeline/lists.d.ts +15 -0
  215. package/dist/pipeline/lists.d.ts.map +1 -1
  216. package/dist/pipeline/lists.js +73 -16
  217. package/dist/pipeline/lists.js.map +1 -1
  218. package/dist/pipeline/measureContentBlock.d.ts +59 -0
  219. package/dist/pipeline/measureContentBlock.d.ts.map +1 -0
  220. package/dist/pipeline/measureContentBlock.js +124 -0
  221. package/dist/pipeline/measureContentBlock.js.map +1 -0
  222. package/dist/pipeline/pageRoles.d.ts +23 -0
  223. package/dist/pipeline/pageRoles.d.ts.map +1 -0
  224. package/dist/pipeline/pageRoles.js +54 -0
  225. package/dist/pipeline/pageRoles.js.map +1 -0
  226. package/dist/pipeline/paragraphContainers.d.ts +32 -0
  227. package/dist/pipeline/paragraphContainers.d.ts.map +1 -0
  228. package/dist/pipeline/paragraphContainers.js +61 -0
  229. package/dist/pipeline/paragraphContainers.js.map +1 -0
  230. package/dist/pipeline/parts.d.ts +47 -0
  231. package/dist/pipeline/parts.d.ts.map +1 -0
  232. package/dist/pipeline/parts.js +230 -0
  233. package/dist/pipeline/parts.js.map +1 -0
  234. package/dist/pipeline/placeholders.d.ts +46 -1
  235. package/dist/pipeline/placeholders.d.ts.map +1 -1
  236. package/dist/pipeline/placeholders.js +93 -11
  237. package/dist/pipeline/placeholders.js.map +1 -1
  238. package/dist/pipeline/placement.d.ts +61 -7
  239. package/dist/pipeline/placement.d.ts.map +1 -1
  240. package/dist/pipeline/placement.js +151 -12
  241. package/dist/pipeline/placement.js.map +1 -1
  242. package/dist/pipeline/resourceLayout.d.ts +18 -5
  243. package/dist/pipeline/resourceLayout.d.ts.map +1 -1
  244. package/dist/pipeline/resourceLayout.js +145 -23
  245. package/dist/pipeline/resourceLayout.js.map +1 -1
  246. package/dist/pipeline/styles.d.ts +9 -1
  247. package/dist/pipeline/styles.d.ts.map +1 -1
  248. package/dist/pipeline/styles.js +50 -0
  249. package/dist/pipeline/styles.js.map +1 -1
  250. package/dist/table/model.d.ts.map +1 -1
  251. package/dist/table/model.js +16 -2
  252. package/dist/table/model.js.map +1 -1
  253. package/dist/types.d.ts +454 -2
  254. package/dist/types.d.ts.map +1 -1
  255. package/dist/vdt.d.ts +128 -4
  256. package/dist/vdt.d.ts.map +1 -1
  257. package/dist/vdt.js +2 -1
  258. package/dist/vdt.js.map +1 -1
  259. package/package.json +8 -8
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Pre-pass for `:::paragraphs{style="…"}` containers. The placement loop
3
+ * rewinds `blockIdx` on keep-with-next rollbacks and replays the blocks in
4
+ * between (marker blocks included), so container state is resolved up front
5
+ * per content-block index instead of being pushed/popped inside the loop.
6
+ */
7
+ import type { ContentBlock } from '../parse';
8
+ import type { ResolvedConfig } from '../vdt';
9
+ import { type BlockStyle } from './styles';
10
+ export interface ParagraphContainer {
11
+ /** `containerId` of the start/end marker pair. */
12
+ id: number;
13
+ /** Style for every paragraph in the container. */
14
+ style: BlockStyle;
15
+ /** Style for the container's last paragraph: the container's
16
+ * `marginBottom` is baked into its `marginBottomPx` so the grid snap that
17
+ * closes the container guarantees the margin (grid wins, margin is a
18
+ * minimum — the same convention snapped headings follow). */
19
+ tailStyle: BlockStyle;
20
+ /** Applied on entry through pending spacing. */
21
+ marginTopPx: number;
22
+ /** Fallback for containers whose last block is not a paragraph. */
23
+ marginBottomPx: number;
24
+ }
25
+ export interface ParagraphContainerPlan {
26
+ /** Container id → entry, for `paragraphs` containers with a known style. */
27
+ byId: Map<number, ParagraphContainer>;
28
+ /** Content-block index → innermost enclosing paragraph container. */
29
+ byBlock: Array<ParagraphContainer | undefined>;
30
+ }
31
+ export declare function planParagraphContainers(contentBlocks: readonly ContentBlock[], resolved: ResolvedConfig): ParagraphContainerPlan;
32
+ //# sourceMappingURL=paragraphContainers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paragraphContainers.d.ts","sourceRoot":"","sources":["../../src/pipeline/paragraphContainers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAyB,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAElE,MAAM,WAAW,kBAAkB;IACjC,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,kDAAkD;IAClD,KAAK,EAAE,UAAU,CAAC;IAClB;;;kEAG8D;IAC9D,SAAS,EAAE,UAAU,CAAC;IACtB,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,4EAA4E;IAC5E,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IACtC,qEAAqE;IACrE,OAAO,EAAE,KAAK,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAAC;CAChD;AAED,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,SAAS,YAAY,EAAE,EACtC,QAAQ,EAAE,cAAc,GACvB,sBAAsB,CAiDxB"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Pre-pass for `:::paragraphs{style="…"}` containers. The placement loop
3
+ * rewinds `blockIdx` on keep-with-next rollbacks and replays the blocks in
4
+ * between (marker blocks included), so container state is resolved up front
5
+ * per content-block index instead of being pushed/popped inside the loop.
6
+ */
7
+ import { dimensionToPx } from '../units';
8
+ import { resolveParagraphStyle } from './styles';
9
+ export function planParagraphContainers(contentBlocks, resolved) {
10
+ const byId = new Map();
11
+ const byBlock = new Array(contentBlocks.length);
12
+ const dpi = resolved.page.dpi;
13
+ // Every open container occupies one slot, undefined for non-`paragraphs`
14
+ // containers and for unknown style ids (those render as plain body text —
15
+ // the build has no warnings channel; the editor's warnings phase can flag
16
+ // them).
17
+ const open = [];
18
+ const cache = new Map();
19
+ for (let i = 0; i < contentBlocks.length; i++) {
20
+ const b = contentBlocks[i];
21
+ if (b.type === 'containerStart') {
22
+ let entry;
23
+ const styleId = b.containerAttrs?.style;
24
+ if (b.containerName === 'paragraphs' && styleId !== undefined && b.containerId !== undefined) {
25
+ let base = cache.get(styleId);
26
+ if (!base) {
27
+ const cfg = resolved.paragraphStyles.find((s) => s.id === styleId);
28
+ if (cfg) {
29
+ const style = resolveParagraphStyle(cfg, resolved);
30
+ const marginBottomPx = dimensionToPx(cfg.marginBottom, dpi, style.fontSizePx);
31
+ base = {
32
+ style,
33
+ tailStyle: { ...style, marginBottomPx: Math.max(style.marginBottomPx, marginBottomPx) },
34
+ marginTopPx: dimensionToPx(cfg.marginTop, dpi, style.fontSizePx),
35
+ marginBottomPx,
36
+ };
37
+ cache.set(styleId, base);
38
+ }
39
+ }
40
+ if (base) {
41
+ entry = { id: b.containerId, ...base };
42
+ byId.set(b.containerId, entry);
43
+ }
44
+ }
45
+ open.push(entry);
46
+ continue;
47
+ }
48
+ if (b.type === 'containerEnd') {
49
+ open.pop();
50
+ continue;
51
+ }
52
+ for (let j = open.length - 1; j >= 0; j--) {
53
+ if (open[j]) {
54
+ byBlock[i] = open[j];
55
+ break;
56
+ }
57
+ }
58
+ }
59
+ return { byId, byBlock };
60
+ }
61
+ //# sourceMappingURL=paragraphContainers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paragraphContainers.js","sourceRoot":"","sources":["../../src/pipeline/paragraphContainers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,qBAAqB,EAAmB,MAAM,UAAU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AC,UAAU,CAAC,CAAC;wBAC9E,IAAI,GAAG;4BACL,KAAK;4BACL,SAAS,EAAE,EAAE,GAAG,KAAK,EAAE,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE;4BACvF,WAAW,EAAE,aAAa,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC;4BAChE,cAAc;yBACf,CAAC;wBACF,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;oBAC3B,CAAC;gBACH,CAAC;gBACD,IAAI,IAAI,EAAE,CAAC;oBACT,KAAK,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,EAAE,CAAC;oBACvC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;gBACjC,CAAC;YACH,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACjB,SAAS;QACX,CAAC;QACD,IAAI,CAAC,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;YAC9B,IAAI,CAAC,GAAG,EAAE,CAAC;YACX,SAAS;QACX,CAAC;QACD,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC1C,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;gBAAC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;gBAAC,MAAM;YAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Pre-pass and derived typography for `:::part{number="…" title="…"}`
3
+ * containers. Like the other container plans, part ranges are resolved up
4
+ * front per content-block index (the placement loop rewinds `blockIdx` on
5
+ * keep-with-next rollbacks and replays the markers in between).
6
+ */
7
+ import type { ContentBlock } from '../parse';
8
+ import type { ResolvedConfig } from '../vdt';
9
+ import type { BlockMeasureContext } from './measureContentBlock';
10
+ export interface PlannedPart {
11
+ /** Content-block index of the `containerStart` marker. */
12
+ startIdx: number;
13
+ /** Content-block index of the matching `containerEnd` marker. */
14
+ endIdx: number;
15
+ containerId: number;
16
+ /** `number` attribute as written (`'I'`, `'2'`, …); `''` when absent. */
17
+ number: string;
18
+ /** `title` attribute; `''` when absent. */
19
+ title: string;
20
+ }
21
+ export interface PartPlan {
22
+ /** Start-marker index → part. */
23
+ byStart: Map<number, PlannedPart>;
24
+ /** End-marker index → part. */
25
+ byEnd: Map<number, PlannedPart>;
26
+ /** Content-block index → enclosing part (markers excluded). A part nested
27
+ * inside another part is flattened into the outer one. */
28
+ byBlock: Array<PlannedPart | undefined>;
29
+ }
30
+ export declare function planParts(contentBlocks: readonly ContentBlock[]): PartPlan;
31
+ /** Numeric value of a part number written as a decimal (`'3'`) or a roman
32
+ * numeral (`'III'`, `'iv'`), so `{numberDecimal}` / `{numberRoman}` work
33
+ * whichever way the author wrote it. `undefined` for anything else. */
34
+ export declare function parsePartNumber(raw: string): number | undefined;
35
+ /** Shallow copy of `resolved` whose `bodyText` and list configs carry the
36
+ * `parts.bodyStyle` overrides, so the body/list resolvers yield the part
37
+ * typography without any part-specific branches (the callout approach).
38
+ * Ordered-list numbers are set bold in `numberColor`; bullets take
39
+ * `bulletColor`. Level-specific values only follow an override when they
40
+ * still equal the general value they were resolved from. The
41
+ * `bodyStyle.unorderedLists` / `orderedLists` partials apply last. */
42
+ export declare function derivePartResolvedConfig(resolved: ResolvedConfig): ResolvedConfig;
43
+ /** Measurement context for the blocks inside a part: the derived config
44
+ * plus the body / blockquote styles, list indents and ordered-list number
45
+ * widths recomputed from it. */
46
+ export declare function derivePartMeasureContext(ctx: BlockMeasureContext): BlockMeasureContext;
47
+ //# sourceMappingURL=parts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../src/pipeline/parts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAQ7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,QAAQ;IACvB,iCAAiC;IACjC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAClC,+BAA+B;IAC/B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAChC;+DAC2D;IAC3D,OAAO,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;CACzC;AAED,wBAAgB,SAAS,CAAC,aAAa,EAAE,SAAS,YAAY,EAAE,GAAG,QAAQ,CAgC1E;AAOD;;wEAEwE;AACxE,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAgB/D;AAmID;;;;;;uEAMuE;AACvE,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,CA0BjF;AAED;;iCAEiC;AACjC,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,mBAAmB,GAAG,mBAAmB,CAqBtF"}
@@ -0,0 +1,230 @@
1
+ /**
2
+ * Pre-pass and derived typography for `:::part{number="…" title="…"}`
3
+ * containers. Like the other container plans, part ranges are resolved up
4
+ * front per content-block index (the placement loop rewinds `blockIdx` on
5
+ * keep-with-next rollbacks and replays the markers in between).
6
+ */
7
+ import { dimensionsEqual } from '../defaults/shared';
8
+ import { resolveBodyStyle, resolveBlockquoteStyle } from './styles';
9
+ import { computeLevelIndentsPx, computeOrderedLevelIndentsPx, computeOrderedListRunMetrics, } from './lists';
10
+ export function planParts(contentBlocks) {
11
+ const byStart = new Map();
12
+ const byEnd = new Map();
13
+ const byBlock = new Array(contentBlocks.length);
14
+ let open;
15
+ for (let i = 0; i < contentBlocks.length; i++) {
16
+ const b = contentBlocks[i];
17
+ if (b.type === 'containerStart' && b.containerName === 'part' && b.containerId !== undefined) {
18
+ if (open) {
19
+ open.depth++;
20
+ continue;
21
+ }
22
+ const attrs = b.containerAttrs ?? {};
23
+ const part = {
24
+ startIdx: i,
25
+ endIdx: -1,
26
+ containerId: b.containerId,
27
+ number: (attrs.number ?? '').trim(),
28
+ title: (attrs.title ?? '').trim(),
29
+ };
30
+ open = { part, depth: 0 };
31
+ continue;
32
+ }
33
+ if (b.type === 'containerEnd' && b.containerName === 'part') {
34
+ if (!open)
35
+ continue;
36
+ if (open.depth > 0) {
37
+ open.depth--;
38
+ continue;
39
+ }
40
+ open.part.endIdx = i;
41
+ byStart.set(open.part.startIdx, open.part);
42
+ byEnd.set(i, open.part);
43
+ open = undefined;
44
+ continue;
45
+ }
46
+ if (open)
47
+ byBlock[i] = open.part;
48
+ }
49
+ return { byStart, byEnd, byBlock };
50
+ }
51
+ const ROMAN_RE = /^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/i;
52
+ const ROMAN_VALUES = {
53
+ M: 1000, D: 500, C: 100, L: 50, X: 10, V: 5, I: 1,
54
+ };
55
+ /** Numeric value of a part number written as a decimal (`'3'`) or a roman
56
+ * numeral (`'III'`, `'iv'`), so `{numberDecimal}` / `{numberRoman}` work
57
+ * whichever way the author wrote it. `undefined` for anything else. */
58
+ export function parsePartNumber(raw) {
59
+ const s = raw.trim();
60
+ if (s.length === 0)
61
+ return undefined;
62
+ if (/^\d+$/.test(s)) {
63
+ const n = Number(s);
64
+ return Number.isSafeInteger(n) ? n : undefined;
65
+ }
66
+ if (!ROMAN_RE.test(s))
67
+ return undefined;
68
+ const u = s.toUpperCase();
69
+ let total = 0;
70
+ for (let i = 0; i < u.length; i++) {
71
+ const v = ROMAN_VALUES[u[i]];
72
+ const next = i + 1 < u.length ? ROMAN_VALUES[u[i + 1]] : 0;
73
+ total += v < next ? -v : v;
74
+ }
75
+ return total;
76
+ }
77
+ const eqStrict = (a, b) => a === b;
78
+ const eqDim = (a, b) => a !== undefined && b !== undefined && dimensionsEqual(a, b);
79
+ const eqColor = (a, b) => a !== undefined && b !== undefined && a.hex === b.hex;
80
+ const UNORDERED_FIELDS = [
81
+ { key: 'fontFamily', levelKey: 'fontFamily', eq: eqStrict },
82
+ { key: 'color', levelKey: 'color', eq: eqColor },
83
+ { key: 'fontWeight', levelKey: 'fontWeight', eq: eqStrict },
84
+ { key: 'italic', levelKey: 'italic', eq: eqStrict },
85
+ { key: 'bulletChar', levelKey: 'bulletChar', eq: eqStrict },
86
+ { key: 'bulletFontSize', levelKey: 'fontSize', eq: eqDim },
87
+ { key: 'gap', eq: eqDim },
88
+ { key: 'indent', levelKey: 'indent', eq: eqDim },
89
+ { key: 'bulletVerticalOffset', levelKey: 'verticalOffset', eq: eqDim },
90
+ { key: 'marginTop', eq: eqDim },
91
+ { key: 'marginBottom', eq: eqDim },
92
+ { key: 'itemSpacing', eq: eqDim },
93
+ { key: 'hangingIndent', eq: eqStrict },
94
+ { key: 'taskCheckboxChar', eq: eqStrict },
95
+ { key: 'taskCheckedChar', eq: eqStrict },
96
+ { key: 'taskCompletedStrikethrough', eq: eqStrict },
97
+ { key: 'taskCompletedColor', eq: eqColor },
98
+ ];
99
+ const ORDERED_FIELDS = [
100
+ {
101
+ key: 'fontFamily', levelKey: 'fontFamily', eq: eqStrict,
102
+ dependents: [{ key: 'separatorFontFamily', levelKey: 'separatorFontFamily' }],
103
+ },
104
+ {
105
+ key: 'color', levelKey: 'color', eq: eqColor,
106
+ dependents: [{ key: 'separatorColor', levelKey: 'separatorColor' }],
107
+ },
108
+ {
109
+ key: 'fontWeight', levelKey: 'fontWeight', eq: eqStrict,
110
+ dependents: [{ key: 'separatorFontWeight', levelKey: 'separatorFontWeight' }],
111
+ },
112
+ {
113
+ key: 'italic', levelKey: 'italic', eq: eqStrict,
114
+ dependents: [{ key: 'separatorItalic', levelKey: 'separatorItalic' }],
115
+ },
116
+ { key: 'numberFormat', levelKey: 'numberFormat', eq: eqStrict },
117
+ { key: 'separator', levelKey: 'separator', eq: eqStrict },
118
+ { key: 'numberFontSize', levelKey: 'fontSize', eq: eqDim },
119
+ { key: 'gap', eq: eqDim },
120
+ { key: 'indent', levelKey: 'indent', eq: eqDim },
121
+ { key: 'numberVerticalOffset', levelKey: 'verticalOffset', eq: eqDim },
122
+ { key: 'marginTop', eq: eqDim },
123
+ { key: 'marginBottom', eq: eqDim },
124
+ { key: 'itemSpacing', eq: eqDim },
125
+ { key: 'hangingIndent', eq: eqStrict },
126
+ { key: 'separatorFontFamily', levelKey: 'separatorFontFamily', eq: eqStrict, inheritsFrom: 'fontFamily' },
127
+ { key: 'separatorFontWeight', levelKey: 'separatorFontWeight', eq: eqStrict, inheritsFrom: 'fontWeight' },
128
+ { key: 'separatorItalic', levelKey: 'separatorItalic', eq: eqStrict, inheritsFrom: 'italic' },
129
+ { key: 'separatorColor', levelKey: 'separatorColor', eq: eqColor, inheritsFrom: 'color' },
130
+ { key: 'separatorGap', levelKey: 'separatorGap', eq: eqDim },
131
+ ];
132
+ /**
133
+ * Apply a partial list config on top of a resolved one. A list-wide value
134
+ * propagates to every level (and dependent field) whose current value still
135
+ * equals the value it was resolved from — a level with its own value keeps
136
+ * it (the same heuristic the callout overrides use). Entries in `levels`
137
+ * then apply directly to their level.
138
+ */
139
+ function applyListOverrides(base, override, specs) {
140
+ if (!override)
141
+ return base;
142
+ const ov = override;
143
+ const out = { ...base };
144
+ const levels = base.levels.map((l) => ({ ...l }));
145
+ const setField = (target, spec, onLevel, value) => {
146
+ const key = onLevel ? spec.levelKey : spec.key;
147
+ const prev = target[key];
148
+ target[key] = value;
149
+ for (const dep of spec.dependents ?? []) {
150
+ const depKey = onLevel ? dep.levelKey : dep.key;
151
+ if (spec.eq(target[depKey], prev))
152
+ target[depKey] = value;
153
+ }
154
+ };
155
+ for (const spec of specs) {
156
+ const value = ov[spec.key];
157
+ if (value === undefined)
158
+ continue;
159
+ const prevGeneral = out[spec.key];
160
+ setField(out, spec, false, value);
161
+ if (!spec.levelKey)
162
+ continue;
163
+ for (const l of levels) {
164
+ const current = l[spec.levelKey];
165
+ const inherited = spec.eq(current, prevGeneral) ||
166
+ (spec.inheritsFrom !== undefined && spec.eq(current, l[spec.inheritsFrom]));
167
+ if (inherited)
168
+ setField(l, spec, true, value);
169
+ }
170
+ }
171
+ const levelOverrides = ov.levels ?? [];
172
+ for (const lo of levelOverrides) {
173
+ const target = levels.find((l) => l.level === lo.level);
174
+ if (!target)
175
+ continue;
176
+ for (const spec of specs) {
177
+ if (!spec.levelKey)
178
+ continue;
179
+ const value = lo[spec.levelKey];
180
+ if (value !== undefined)
181
+ setField(target, spec, true, value);
182
+ }
183
+ }
184
+ out.levels = levels;
185
+ return out;
186
+ }
187
+ /** Shallow copy of `resolved` whose `bodyText` and list configs carry the
188
+ * `parts.bodyStyle` overrides, so the body/list resolvers yield the part
189
+ * typography without any part-specific branches (the callout approach).
190
+ * Ordered-list numbers are set bold in `numberColor`; bullets take
191
+ * `bulletColor`. Level-specific values only follow an override when they
192
+ * still equal the general value they were resolved from. The
193
+ * `bodyStyle.unorderedLists` / `orderedLists` partials apply last. */
194
+ export function derivePartResolvedConfig(resolved) {
195
+ const { bodyStyle } = resolved.parts;
196
+ const bold = resolved.bodyText.boldFontWeight;
197
+ const unorderedLists = applyListOverrides(applyListOverrides(resolved.unorderedLists, { color: bodyStyle.bulletColor }, UNORDERED_FIELDS), bodyStyle.unorderedLists, UNORDERED_FIELDS);
198
+ const orderedLists = applyListOverrides(applyListOverrides(resolved.orderedLists, { color: bodyStyle.numberColor, fontWeight: bold }, ORDERED_FIELDS), bodyStyle.orderedLists, ORDERED_FIELDS);
199
+ return {
200
+ ...resolved,
201
+ bodyText: {
202
+ ...resolved.bodyText,
203
+ fontFamily: bodyStyle.fontFamily,
204
+ fontSize: bodyStyle.fontSize,
205
+ lineHeight: bodyStyle.lineHeight,
206
+ color: bodyStyle.color,
207
+ textAlign: bodyStyle.textAlign,
208
+ },
209
+ unorderedLists,
210
+ orderedLists,
211
+ };
212
+ }
213
+ /** Measurement context for the blocks inside a part: the derived config
214
+ * plus the body / blockquote styles, list indents and ordered-list number
215
+ * widths recomputed from it. */
216
+ export function derivePartMeasureContext(ctx) {
217
+ const resolved = derivePartResolvedConfig(ctx.resolved);
218
+ const bodyStyle = resolveBodyStyle(resolved);
219
+ const orderedMetrics = computeOrderedListRunMetrics([...ctx.contentBlocks], resolved, bodyStyle.fontSizePx);
220
+ return {
221
+ ...ctx,
222
+ resolved,
223
+ bodyStyle,
224
+ blockquoteStyle: resolveBlockquoteStyle(resolved),
225
+ listLevelIndentsPx: computeLevelIndentsPx(resolved, bodyStyle.fontSizePx),
226
+ orderedMetrics,
227
+ orderedLevelIndentsPx: computeOrderedLevelIndentsPx(resolved, bodyStyle.fontSizePx, orderedMetrics.maxWidthByDepth),
228
+ };
229
+ }
230
+ //# sourceMappingURL=parts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parts.js","sourceRoot":"","sources":["../../src/pipeline/parts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,4BAA4B,G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AAC;IACF,OAAO;QACL,GAAG,QAAQ;QACX,QAAQ,EAAE;YACR,GAAG,QAAQ,CAAC,QAAQ;YACpB,UAAU,EAAE,SAAS,CAAC,UAAU;YAChC,QAAQ,EAAE,SAAS,CAAC,QAAQ;YAC5B,UAAU,EAAE,SAAS,CAAC,UAAU;YAChC,KAAK,EAAE,SAAS,CAAC,KAAK;YACtB,SAAS,EAAE,SAAS,CAAC,SAAS;SAC/B;QACD,cAAc;QACd,YAAY;KACb,CAAC;AACJ,CAAC;AAED;;iCAEiC;AACjC,MAAM,UAAU,wBAAwB,CAAC,GAAwB;IAC/D,MAAM,QAAQ,GAAG,wBAAwB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxD,MAAM,SAAS,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC7C,MAAM,cAAc,GAAG,4BAA4B,CACjD,CAAC,GAAG,GAAG,CAAC,aAAa,CAAC,EACtB,QAAQ,EACR,SAAS,CAAC,UAAU,CACrB,CAAC;IACF,OAAO;QACL,GAAG,GAAG;QACN,QAAQ;QACR,SAAS;QACT,eAAe,EAAE,sBAAsB,CAAC,QAAQ,CAAC;QACjD,kBAAkB,EAAE,qBAAqB,CAAC,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC;QACzE,cAAc;QACd,qBAAqB,EAAE,4BAA4B,CACjD,QAAQ,EACR,SAAS,CAAC,UAAU,EACpB,cAAc,CAAC,eAAe,CAC/B;KACF,CAAC;AACJ,CAAC"}
@@ -18,12 +18,30 @@ export interface PlaceholderContext {
18
18
  metadata: DocumentMetadata;
19
19
  /** Chapter title per page index (most recent H1 at or before each page). */
20
20
  chapterTitleByPageIndex: string[];
21
+ /** Heading attributes of the current chapter's H1 per page index (see
22
+ * `computeChapterAttrs`). Backs `{attr.<key>}` in header/footer slots. A
23
+ * missing entry or key resolves to `''`. */
24
+ chapterAttrsByPageIndex?: Record<string, string>[];
25
+ /** Current part title / number per page index (see `computePartValues`).
26
+ * Back `{partTitle}` / `{partNumber}`; a missing entry resolves to `''`. */
27
+ partTitleByPageIndex?: string[];
28
+ partNumberByPageIndex?: string[];
29
+ /** Current chapter number per page index (see `computeChapterNumbers`).
30
+ * Backs `{chapterNumber}` in header/footer slots. */
31
+ chapterNumberByPageIndex?: string[];
21
32
  }
22
33
  export interface PlaceholderResult {
23
34
  text: string;
24
35
  unknownPlaceholders: string[];
25
36
  missingMetadata: string[];
26
37
  }
38
+ /** Placeholder grammar: `name` or `name.key` — the dotted form is reserved
39
+ * for namespaced lookups such as `{attr.author}` (heading attributes). */
40
+ export declare const PLACEHOLDER_NAME_RE: RegExp;
41
+ /** Namespace of the heading-attribute placeholders (`{attr.<key>}`). */
42
+ export declare const ATTR_PLACEHOLDER_PREFIX = "attr.";
43
+ /** When `name` is an `attr.<key>` placeholder, returns `<key>`. */
44
+ export declare function attrPlaceholderKey(name: string): string | undefined;
27
45
  /**
28
46
  * Precompute chapter titles (most recent H1 text) for each page index by
29
47
  * walking blocks once. Returns an array where `result[pageIndex]` is the plain
@@ -43,9 +61,36 @@ export declare function computeChapterTitles(blocks: VDTBlock[], totalPages: num
43
61
  * `{chapterNumber}` in heading-context slots resolves to the current chapter.
44
62
  */
45
63
  export declare function computeChapterNumbers(blocks: VDTBlock[], totalPages: number, pages?: ChapterTitlePageInfo[]): string[];
64
+ /**
65
+ * Precompute the heading attributes (`# Title {key="value"}`) of the most
66
+ * recent H1 per page. Backs `{attr.<key>}` in header/footer slots; pages
67
+ * before the first H1 get an empty record.
68
+ */
69
+ export declare function computeChapterAttrs(blocks: VDTBlock[], totalPages: number, pages?: ChapterTitlePageInfo[]): Record<string, string>[];
70
+ /** The page fields `computePartValues` reads. */
71
+ export interface PartPageInfo extends ChapterTitlePageInfo {
72
+ partInfo?: {
73
+ number: string;
74
+ title: string;
75
+ };
76
+ }
77
+ /**
78
+ * Precompute the current part title and number per page index. A page with
79
+ * `partInfo` (a `:::part` divider page) starts a new part that runs until
80
+ * the next one; pages before the first part get `''`. Blank parity pages
81
+ * immediately preceding a part page belong to the upcoming part (they exist
82
+ * only to push it onto the right parity); a `blankForForce` page stops the
83
+ * walk — it belongs to the previous part, the same rule as chapters.
84
+ */
85
+ export declare function computePartValues(pages: readonly PartPageInfo[]): {
86
+ partTitleByPageIndex: string[];
87
+ partNumberByPageIndex: string[];
88
+ };
46
89
  /**
47
90
  * Resolve placeholder templates. Grammar:
48
- * - `{name}` with name matching `[a-zA-Z][a-zA-Z0-9]*` is a placeholder.
91
+ * - `{name}` with name matching `[a-zA-Z][a-zA-Z0-9]*` is a placeholder;
92
+ * - `{name.key}` is a namespaced placeholder — `{attr.<key>}` reads the
93
+ * current chapter's heading attributes (missing → `''`, no warning);
49
94
  * - `{{` and `}}` are literal braces.
50
95
  */
51
96
  export declare function resolvePlaceholders(template: string, ctx: PlaceholderContext): PlaceholderResult;
@@ -1 +1 @@
1
- {"version":3,"file":"placeholders.d.ts","sourceRoot":"","sources":["../../src/pipeline/placeholders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEhD;;;;;;;oEAOoE;AACpE,MAAM,WAAW,oBAAoB;IACnC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,4EAA4E;IAC5E,uBAAuB,EAAE,MAAM,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAcD;;;;;;;;;;;GAWG;AACH,wBAA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