postext 1.70.5 → 1.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (773) hide show
  1. package/README.md +1 -0
  2. package/dist/__tests__/exports.test.js +6 -0
  3. package/dist/__tests__/exports.test.js.map +1 -1
  4. package/dist/__tests__/fonts/strikeout.test.d.ts +2 -0
  5. package/dist/__tests__/fonts/strikeout.test.d.ts.map +1 -0
  6. package/dist/__tests__/fonts/strikeout.test.js +106 -0
  7. package/dist/__tests__/fonts/strikeout.test.js.map +1 -0
  8. package/dist/__tests__/paint/canvasFormFields.test.d.ts +2 -0
  9. package/dist/__tests__/paint/canvasFormFields.test.d.ts.map +1 -0
  10. package/dist/__tests__/paint/canvasFormFields.test.js +89 -0
  11. package/dist/__tests__/paint/canvasFormFields.test.js.map +1 -0
  12. package/dist/__tests__/paint/strikethrough.test.d.ts +2 -0
  13. package/dist/__tests__/paint/strikethrough.test.d.ts.map +1 -0
  14. package/dist/__tests__/paint/strikethrough.test.js +177 -0
  15. package/dist/__tests__/paint/strikethrough.test.js.map +1 -0
  16. package/dist/__tests__/parse/asteriskFlanking.test.d.ts +2 -0
  17. package/dist/__tests__/parse/asteriskFlanking.test.d.ts.map +1 -0
  18. package/dist/__tests__/parse/asteriskFlanking.test.js +67 -0
  19. package/dist/__tests__/parse/asteriskFlanking.test.js.map +1 -0
  20. package/dist/__tests__/parse/formFields.test.d.ts +2 -0
  21. package/dist/__tests__/parse/formFields.test.d.ts.map +1 -0
  22. package/dist/__tests__/parse/formFields.test.js +107 -0
  23. package/dist/__tests__/parse/formFields.test.js.map +1 -0
  24. package/dist/__tests__/parse/strikethrough.test.d.ts +2 -0
  25. package/dist/__tests__/parse/strikethrough.test.d.ts.map +1 -0
  26. package/dist/__tests__/parse/strikethrough.test.js +97 -0
  27. package/dist/__tests__/parse/strikethrough.test.js.map +1 -0
  28. package/dist/__tests__/pipeline/callouts/calloutHangingIndent.test.d.ts +2 -0
  29. package/dist/__tests__/pipeline/callouts/calloutHangingIndent.test.d.ts.map +1 -0
  30. package/dist/__tests__/pipeline/callouts/calloutHangingIndent.test.js +139 -0
  31. package/dist/__tests__/pipeline/callouts/calloutHangingIndent.test.js.map +1 -0
  32. package/dist/canvas-backend/chip.d.ts +4 -0
  33. package/dist/canvas-backend/chip.d.ts.map +1 -1
  34. package/dist/canvas-backend/chip.js +33 -1
  35. package/dist/canvas-backend/chip.js.map +1 -1
  36. package/dist/canvas-backend/index.d.ts +5 -0
  37. package/dist/canvas-backend/index.d.ts.map +1 -1
  38. package/dist/canvas-backend/index.js +5 -1
  39. package/dist/canvas-backend/index.js.map +1 -1
  40. package/dist/defaults/boxes/calloutStyles/resolve.d.ts.map +1 -1
  41. package/dist/defaults/boxes/calloutStyles/resolve.js +4 -0
  42. package/dist/defaults/boxes/calloutStyles/resolve.js.map +1 -1
  43. package/dist/defaults/boxes/calloutStyles/strip.d.ts.map +1 -1
  44. package/dist/defaults/boxes/calloutStyles/strip.js +2 -0
  45. package/dist/defaults/boxes/calloutStyles/strip.js.map +1 -1
  46. package/dist/fonts/glyphFallback.d.ts +2 -1
  47. package/dist/fonts/glyphFallback.d.ts.map +1 -1
  48. package/dist/fonts/glyphFallback.js +6 -1
  49. package/dist/fonts/glyphFallback.js.map +1 -1
  50. package/dist/fonts/strikeout.d.ts +22 -0
  51. package/dist/fonts/strikeout.d.ts.map +1 -0
  52. package/dist/fonts/strikeout.js +95 -0
  53. package/dist/fonts/strikeout.js.map +1 -0
  54. package/dist/html-backend/lines.d.ts.map +1 -1
  55. package/dist/html-backend/lines.js +8 -0
  56. package/dist/html-backend/lines.js.map +1 -1
  57. package/dist/html-backend/resources.js +3 -3
  58. package/dist/html-backend/resources.js.map +1 -1
  59. package/dist/html-backend/segmentText.d.ts +5 -0
  60. package/dist/html-backend/segmentText.d.ts.map +1 -1
  61. package/dist/html-backend/segmentText.js +7 -0
  62. package/dist/html-backend/segmentText.js.map +1 -1
  63. package/dist/html-backend/segments.js +3 -3
  64. package/dist/html-backend/segments.js.map +1 -1
  65. package/dist/html-backend/vertical.d.ts.map +1 -1
  66. package/dist/html-backend/vertical.js +3 -1
  67. package/dist/html-backend/vertical.js.map +1 -1
  68. package/dist/hyphenation/locale.d.ts +5 -0
  69. package/dist/hyphenation/locale.d.ts.map +1 -1
  70. package/dist/hyphenation/locale.js +8 -0
  71. package/dist/hyphenation/locale.js.map +1 -1
  72. package/dist/idml/colours.d.ts +14 -0
  73. package/dist/idml/colours.d.ts.map +1 -0
  74. package/dist/idml/colours.js +53 -0
  75. package/dist/idml/colours.js.map +1 -0
  76. package/dist/idml/fields.d.ts +19 -0
  77. package/dist/idml/fields.d.ts.map +1 -0
  78. package/dist/idml/fields.js +76 -0
  79. package/dist/idml/fields.js.map +1 -0
  80. package/dist/idml/fonts.d.ts +12 -0
  81. package/dist/idml/fonts.d.ts.map +1 -0
  82. package/dist/idml/fonts.js +19 -0
  83. package/dist/idml/fonts.js.map +1 -0
  84. package/dist/idml/geometry.d.ts +25 -0
  85. package/dist/idml/geometry.d.ts.map +1 -0
  86. package/dist/idml/geometry.js +37 -0
  87. package/dist/idml/geometry.js.map +1 -0
  88. package/dist/idml/idml.test.d.ts +2 -0
  89. package/dist/idml/idml.test.d.ts.map +1 -0
  90. package/dist/idml/idml.test.js +494 -0
  91. package/dist/idml/idml.test.js.map +1 -0
  92. package/dist/idml/images.d.ts +6 -0
  93. package/dist/idml/images.d.ts.map +1 -0
  94. package/dist/idml/images.js +75 -0
  95. package/dist/idml/images.js.map +1 -0
  96. package/dist/idml/index.d.ts +5 -0
  97. package/dist/idml/index.d.ts.map +1 -0
  98. package/dist/idml/index.js +100 -0
  99. package/dist/idml/index.js.map +1 -0
  100. package/dist/idml/paragraphs.d.ts +33 -0
  101. package/dist/idml/paragraphs.d.ts.map +1 -0
  102. package/dist/idml/paragraphs.js +203 -0
  103. package/dist/idml/paragraphs.js.map +1 -0
  104. package/dist/idml/parts.d.ts +89 -0
  105. package/dist/idml/parts.d.ts.map +1 -0
  106. package/dist/idml/parts.js +136 -0
  107. package/dist/idml/parts.js.map +1 -0
  108. package/dist/idml/shapes.d.ts +21 -0
  109. package/dist/idml/shapes.d.ts.map +1 -0
  110. package/dist/idml/shapes.js +146 -0
  111. package/dist/idml/shapes.js.map +1 -0
  112. package/dist/idml/spreads.d.ts +5 -0
  113. package/dist/idml/spreads.d.ts.map +1 -0
  114. package/dist/idml/spreads.js +154 -0
  115. package/dist/idml/spreads.js.map +1 -0
  116. package/dist/idml/story.d.ts +13 -0
  117. package/dist/idml/story.d.ts.map +1 -0
  118. package/dist/idml/story.js +238 -0
  119. package/dist/idml/story.js.map +1 -0
  120. package/dist/idml/writer.d.ts +86 -0
  121. package/dist/idml/writer.d.ts.map +1 -0
  122. package/dist/idml/writer.js +8 -0
  123. package/dist/idml/writer.js.map +1 -0
  124. package/dist/index.d.ts +4 -4
  125. package/dist/index.d.ts.map +1 -1
  126. package/dist/index.js +2 -2
  127. package/dist/index.js.map +1 -1
  128. package/dist/marks/strikeGeometry.d.ts +9 -0
  129. package/dist/marks/strikeGeometry.d.ts.map +1 -0
  130. package/dist/marks/strikeGeometry.js +9 -0
  131. package/dist/marks/strikeGeometry.js.map +1 -0
  132. package/dist/marks/strikethrough.d.ts +41 -0
  133. package/dist/marks/strikethrough.d.ts.map +1 -0
  134. package/dist/marks/strikethrough.js +189 -0
  135. package/dist/marks/strikethrough.js.map +1 -0
  136. package/dist/measure/cache.d.ts.map +1 -1
  137. package/dist/measure/cache.js +8 -2
  138. package/dist/measure/cache.js.map +1 -1
  139. package/dist/measure/links.d.ts.map +1 -1
  140. package/dist/measure/links.js +46 -5
  141. package/dist/measure/links.js.map +1 -1
  142. package/dist/measure/rich/chips.d.ts.map +1 -1
  143. package/dist/measure/rich/chips.js +64 -0
  144. package/dist/measure/rich/chips.js.map +1 -1
  145. package/dist/paint/displayList/blocks.d.ts.map +1 -1
  146. package/dist/paint/displayList/blocks.js +2 -0
  147. package/dist/paint/displayList/blocks.js.map +1 -1
  148. package/dist/paint/displayList/comic.d.ts.map +1 -1
  149. package/dist/paint/displayList/comic.js +3 -2
  150. package/dist/paint/displayList/comic.js.map +1 -1
  151. package/dist/paint/displayList/design.d.ts.map +1 -1
  152. package/dist/paint/displayList/design.js +2 -0
  153. package/dist/paint/displayList/design.js.map +1 -1
  154. package/dist/paint/displayList/displayList.test.js +22 -0
  155. package/dist/paint/displayList/displayList.test.js.map +1 -1
  156. package/dist/paint/displayList/inline.d.ts.map +1 -1
  157. package/dist/paint/displayList/inline.js +6 -3
  158. package/dist/paint/displayList/inline.js.map +1 -1
  159. package/dist/paint/displayList/labels.d.ts +19 -0
  160. package/dist/paint/displayList/labels.d.ts.map +1 -0
  161. package/dist/paint/displayList/labels.js +95 -0
  162. package/dist/paint/displayList/labels.js.map +1 -0
  163. package/dist/paint/displayList/labels.test.d.ts +2 -0
  164. package/dist/paint/displayList/labels.test.d.ts.map +1 -0
  165. package/dist/paint/displayList/labels.test.js +60 -0
  166. package/dist/paint/displayList/labels.test.js.map +1 -0
  167. package/dist/paint/displayList/lines.d.ts.map +1 -1
  168. package/dist/paint/displayList/lines.js +23 -2
  169. package/dist/paint/displayList/lines.js.map +1 -1
  170. package/dist/paint/displayList/page.d.ts.map +1 -1
  171. package/dist/paint/displayList/page.js +6 -2
  172. package/dist/paint/displayList/page.js.map +1 -1
  173. package/dist/paint/displayList/resource.d.ts.map +1 -1
  174. package/dist/paint/displayList/resource.js +8 -0
  175. package/dist/paint/displayList/resource.js.map +1 -1
  176. package/dist/paint/displayList/types.d.ts +43 -3
  177. package/dist/paint/displayList/types.d.ts.map +1 -1
  178. package/dist/parse/formFields.d.ts +118 -0
  179. package/dist/parse/formFields.d.ts.map +1 -0
  180. package/dist/parse/formFields.js +156 -0
  181. package/dist/parse/formFields.js.map +1 -0
  182. package/dist/parse/index.d.ts +2 -0
  183. package/dist/parse/index.d.ts.map +1 -1
  184. package/dist/parse/index.js +1 -0
  185. package/dist/parse/index.js.map +1 -1
  186. package/dist/parse/injectSpans.d.ts +2 -1
  187. package/dist/parse/injectSpans.d.ts.map +1 -1
  188. package/dist/parse/injectSpans.js +16 -2
  189. package/dist/parse/injectSpans.js.map +1 -1
  190. package/dist/parse/inlineFormatting/inlineDirectives.d.ts +3 -0
  191. package/dist/parse/inlineFormatting/inlineDirectives.d.ts.map +1 -1
  192. package/dist/parse/inlineFormatting/inlineDirectives.js +6 -1
  193. package/dist/parse/inlineFormatting/inlineDirectives.js.map +1 -1
  194. package/dist/parse/inlineFormatting/markup.d.ts +31 -1
  195. package/dist/parse/inlineFormatting/markup.d.ts.map +1 -1
  196. package/dist/parse/inlineFormatting/markup.js +47 -1
  197. package/dist/parse/inlineFormatting/markup.js.map +1 -1
  198. package/dist/parse/inlineFormatting/parse.d.ts +1 -1
  199. package/dist/parse/inlineFormatting/parse.d.ts.map +1 -1
  200. package/dist/parse/inlineFormatting/parse.js +44 -10
  201. package/dist/parse/inlineFormatting/parse.js.map +1 -1
  202. package/dist/parse/types/inlineSpan.d.ts +13 -1
  203. package/dist/parse/types/inlineSpan.d.ts.map +1 -1
  204. package/dist/pipeline/build/drivers.d.ts.map +1 -1
  205. package/dist/pipeline/build/drivers.js +3 -0
  206. package/dist/pipeline/build/drivers.js.map +1 -1
  207. package/dist/pipeline/callouts/calloutLayout/plan.d.ts.map +1 -1
  208. package/dist/pipeline/callouts/calloutLayout/plan.js +14 -1
  209. package/dist/pipeline/callouts/calloutLayout/plan.js.map +1 -1
  210. package/dist/pipeline/references/linkNotes.js +1 -1
  211. package/dist/pipeline/references/linkNotes.js.map +1 -1
  212. package/dist/pipeline/styles.d.ts.map +1 -1
  213. package/dist/pipeline/styles.js +20 -12
  214. package/dist/pipeline/styles.js.map +1 -1
  215. package/dist/pipeline/text/tabs.js +1 -1
  216. package/dist/pipeline/text/tabs.js.map +1 -1
  217. package/dist/types/boxes/calloutParts.d.ts +21 -0
  218. package/dist/types/boxes/calloutParts.d.ts.map +1 -1
  219. package/dist/types/boxes/callouts.d.ts +6 -0
  220. package/dist/types/boxes/callouts.d.ts.map +1 -1
  221. package/dist/types/text/bodyText/resolved.d.ts +6 -0
  222. package/dist/types/text/bodyText/resolved.d.ts.map +1 -1
  223. package/dist/vdt/segments.d.ts +31 -0
  224. package/dist/vdt/segments.d.ts.map +1 -1
  225. package/dist/vdt.d.ts +1 -1
  226. package/dist/vdt.d.ts.map +1 -1
  227. package/dist/word/docxRead/body.d.ts.map +1 -1
  228. package/dist/word/docxRead/body.js +7 -3
  229. package/dist/word/docxRead/body.js.map +1 -1
  230. package/dist/word/docxRead/equations.d.ts +6 -0
  231. package/dist/word/docxRead/equations.d.ts.map +1 -0
  232. package/dist/word/docxRead/equations.js +56 -0
  233. package/dist/word/docxRead/equations.js.map +1 -0
  234. package/dist/word/formatted/display.test.d.ts +2 -0
  235. package/dist/word/formatted/display.test.d.ts.map +1 -0
  236. package/dist/word/formatted/display.test.js +106 -0
  237. package/dist/word/formatted/display.test.js.map +1 -0
  238. package/dist/word/formatted/displayRoundTrip.test.js +10 -2
  239. package/dist/word/formatted/displayRoundTrip.test.js.map +1 -1
  240. package/dist/word/formatted/drawing.d.ts +39 -9
  241. package/dist/word/formatted/drawing.d.ts.map +1 -1
  242. package/dist/word/formatted/drawing.js +84 -17
  243. package/dist/word/formatted/drawing.js.map +1 -1
  244. package/dist/word/formatted/eastAsian.d.ts +9 -0
  245. package/dist/word/formatted/eastAsian.d.ts.map +1 -1
  246. package/dist/word/formatted/eastAsian.js +15 -0
  247. package/dist/word/formatted/eastAsian.js.map +1 -1
  248. package/dist/word/formatted/floats.d.ts +26 -0
  249. package/dist/word/formatted/floats.d.ts.map +1 -0
  250. package/dist/word/formatted/floats.js +55 -0
  251. package/dist/word/formatted/floats.js.map +1 -0
  252. package/dist/word/formatted/formatted.test.js +4 -5
  253. package/dist/word/formatted/formatted.test.js.map +1 -1
  254. package/dist/word/formatted/googleDocs.test.d.ts +2 -0
  255. package/dist/word/formatted/googleDocs.test.d.ts.map +1 -0
  256. package/dist/word/formatted/googleDocs.test.js +160 -0
  257. package/dist/word/formatted/googleDocs.test.js.map +1 -0
  258. package/dist/word/formatted/graphics.test.js +30 -8
  259. package/dist/word/formatted/graphics.test.js.map +1 -1
  260. package/dist/word/formatted/halo.d.ts +28 -0
  261. package/dist/word/formatted/halo.d.ts.map +1 -0
  262. package/dist/word/formatted/halo.js +107 -0
  263. package/dist/word/formatted/halo.js.map +1 -0
  264. package/dist/word/formatted/index.d.ts +1 -1
  265. package/dist/word/formatted/index.d.ts.map +1 -1
  266. package/dist/word/formatted/index.js +1 -1
  267. package/dist/word/formatted/index.js.map +1 -1
  268. package/dist/word/formatted/inline.test.js +3 -3
  269. package/dist/word/formatted/inline.test.js.map +1 -1
  270. package/dist/word/formatted/inlineShapes.d.ts +2 -0
  271. package/dist/word/formatted/inlineShapes.d.ts.map +1 -1
  272. package/dist/word/formatted/inlineShapes.js +4 -0
  273. package/dist/word/formatted/inlineShapes.js.map +1 -1
  274. package/dist/word/formatted/layers.d.ts +25 -0
  275. package/dist/word/formatted/layers.d.ts.map +1 -0
  276. package/dist/word/formatted/layers.js +74 -0
  277. package/dist/word/formatted/layers.js.map +1 -0
  278. package/dist/word/formatted/ligatures.d.ts +28 -0
  279. package/dist/word/formatted/ligatures.d.ts.map +1 -0
  280. package/dist/word/formatted/ligatures.js +154 -0
  281. package/dist/word/formatted/ligatures.js.map +1 -0
  282. package/dist/word/formatted/metrics.d.ts +8 -7
  283. package/dist/word/formatted/metrics.d.ts.map +1 -1
  284. package/dist/word/formatted/metrics.js +23 -22
  285. package/dist/word/formatted/metrics.js.map +1 -1
  286. package/dist/word/formatted/page.d.ts +14 -4
  287. package/dist/word/formatted/page.d.ts.map +1 -1
  288. package/dist/word/formatted/page.js +57 -22
  289. package/dist/word/formatted/page.js.map +1 -1
  290. package/dist/word/formatted/paragraphs.d.ts +25 -16
  291. package/dist/word/formatted/paragraphs.d.ts.map +1 -1
  292. package/dist/word/formatted/paragraphs.js +106 -68
  293. package/dist/word/formatted/paragraphs.js.map +1 -1
  294. package/dist/word/formatted/pictures.d.ts +10 -1
  295. package/dist/word/formatted/pictures.d.ts.map +1 -1
  296. package/dist/word/formatted/pictures.js +41 -7
  297. package/dist/word/formatted/pictures.js.map +1 -1
  298. package/dist/word/formatted/review.test.js +1 -1
  299. package/dist/word/formatted/review.test.js.map +1 -1
  300. package/dist/word/formatted/round3.test.d.ts +2 -0
  301. package/dist/word/formatted/round3.test.d.ts.map +1 -0
  302. package/dist/word/formatted/round3.test.js +144 -0
  303. package/dist/word/formatted/round3.test.js.map +1 -0
  304. package/dist/word/formatted/round4.test.d.ts +2 -0
  305. package/dist/word/formatted/round4.test.d.ts.map +1 -0
  306. package/dist/word/formatted/round4.test.js +200 -0
  307. package/dist/word/formatted/round4.test.js.map +1 -0
  308. package/dist/word/formatted/runs.d.ts +33 -3
  309. package/dist/word/formatted/runs.d.ts.map +1 -1
  310. package/dist/word/formatted/runs.js +112 -23
  311. package/dist/word/formatted/runs.js.map +1 -1
  312. package/dist/word/formatted/scripts.test.js +32 -20
  313. package/dist/word/formatted/scripts.test.js.map +1 -1
  314. package/dist/word/formatted/shapes.d.ts +7 -3
  315. package/dist/word/formatted/shapes.d.ts.map +1 -1
  316. package/dist/word/formatted/shapes.js +54 -10
  317. package/dist/word/formatted/shapes.js.map +1 -1
  318. package/dist/word/formatted/symbols.d.ts +12 -0
  319. package/dist/word/formatted/symbols.d.ts.map +1 -0
  320. package/dist/word/formatted/symbols.js +43 -0
  321. package/dist/word/formatted/symbols.js.map +1 -0
  322. package/dist/word/formatted/tableFills.d.ts +20 -0
  323. package/dist/word/formatted/tableFills.d.ts.map +1 -0
  324. package/dist/word/formatted/tableFills.js +116 -0
  325. package/dist/word/formatted/tableFills.js.map +1 -0
  326. package/dist/word/formatted/tables.d.ts +37 -0
  327. package/dist/word/formatted/tables.d.ts.map +1 -1
  328. package/dist/word/formatted/tables.js +87 -24
  329. package/dist/word/formatted/tables.js.map +1 -1
  330. package/dist/word/formatted/tables.test.d.ts +2 -0
  331. package/dist/word/formatted/tables.test.d.ts.map +1 -0
  332. package/dist/word/formatted/tables.test.js +32 -0
  333. package/dist/word/formatted/tables.test.js.map +1 -0
  334. package/dist/word/formatted/tabs.d.ts +33 -0
  335. package/dist/word/formatted/tabs.d.ts.map +1 -0
  336. package/dist/word/formatted/tabs.js +125 -0
  337. package/dist/word/formatted/tabs.js.map +1 -0
  338. package/dist/word/formatted/text.d.ts +25 -2
  339. package/dist/word/formatted/text.d.ts.map +1 -1
  340. package/dist/word/formatted/text.js +153 -8
  341. package/dist/word/formatted/text.js.map +1 -1
  342. package/dist/word/formatted/types.d.ts +13 -0
  343. package/dist/word/formatted/types.d.ts.map +1 -1
  344. package/dist/word/formatted/widths.test.js +2 -10
  345. package/dist/word/formatted/widths.test.js.map +1 -1
  346. package/dist/word/formatted/zorder.test.d.ts +2 -0
  347. package/dist/word/formatted/zorder.test.d.ts.map +1 -0
  348. package/dist/word/formatted/zorder.test.js +107 -0
  349. package/dist/word/formatted/zorder.test.js.map +1 -0
  350. package/dist/word/index.d.ts +1 -1
  351. package/dist/word/index.d.ts.map +1 -1
  352. package/dist/word/index.js +1 -1
  353. package/dist/word/index.js.map +1 -1
  354. package/dist/word/inline/parse.d.ts.map +1 -1
  355. package/dist/word/inline/parse.js +3 -2
  356. package/dist/word/inline/parse.js.map +1 -1
  357. package/dist/word/ommlWrite/index.d.ts +10 -0
  358. package/dist/word/ommlWrite/index.d.ts.map +1 -1
  359. package/dist/word/ommlWrite/index.js +20 -0
  360. package/dist/word/ommlWrite/index.js.map +1 -1
  361. package/dist/word/ommlWrite/ommlWrite.test.js +53 -1
  362. package/dist/word/ommlWrite/ommlWrite.test.js.map +1 -1
  363. package/dist/word/ommlWrite/runs.d.ts +3 -0
  364. package/dist/word/ommlWrite/runs.d.ts.map +1 -1
  365. package/dist/word/ommlWrite/runs.js +3 -1
  366. package/dist/word/ommlWrite/runs.js.map +1 -1
  367. package/dist/word/ommlWrite/tables.d.ts.map +1 -1
  368. package/dist/word/ommlWrite/tables.js +9 -3
  369. package/dist/word/ommlWrite/tables.js.map +1 -1
  370. package/dist/word/ommlWrite/tags.d.ts +11 -0
  371. package/dist/word/ommlWrite/tags.d.ts.map +1 -0
  372. package/dist/word/ommlWrite/tags.js +37 -0
  373. package/dist/word/ommlWrite/tags.js.map +1 -0
  374. package/dist/word/ooxml/package.d.ts.map +1 -1
  375. package/dist/word/ooxml/package.js +3 -2
  376. package/dist/word/ooxml/package.js.map +1 -1
  377. package/dist/word/ooxml/parts.d.ts +4 -2
  378. package/dist/word/ooxml/parts.d.ts.map +1 -1
  379. package/dist/word/ooxml/parts.js +6 -3
  380. package/dist/word/ooxml/parts.js.map +1 -1
  381. package/dist/word/ooxml/types.d.ts +6 -0
  382. package/dist/word/ooxml/types.d.ts.map +1 -1
  383. package/dist/word/roundtrip/added.test.js +3 -1
  384. package/dist/word/roundtrip/added.test.js.map +1 -1
  385. package/dist/word/roundtrip/apply.d.ts.map +1 -1
  386. package/dist/word/roundtrip/apply.js +37 -0
  387. package/dist/word/roundtrip/apply.js.map +1 -1
  388. package/dist/word/roundtrip/edits.d.ts.map +1 -1
  389. package/dist/word/roundtrip/edits.js +25 -7
  390. package/dist/word/roundtrip/edits.js.map +1 -1
  391. package/dist/word/roundtrip/math.d.ts +6 -0
  392. package/dist/word/roundtrip/math.d.ts.map +1 -1
  393. package/dist/word/roundtrip/math.js +19 -4
  394. package/dist/word/roundtrip/math.js.map +1 -1
  395. package/dist/word/roundtrip/math.test.js +62 -0
  396. package/dist/word/roundtrip/math.test.js.map +1 -1
  397. package/dist/word/roundtrip/walk.d.ts.map +1 -1
  398. package/dist/word/roundtrip/walk.js +59 -7
  399. package/dist/word/roundtrip/walk.js.map +1 -1
  400. package/dist/word/semantic/atoms.d.ts +16 -3
  401. package/dist/word/semantic/atoms.d.ts.map +1 -1
  402. package/dist/word/semantic/atoms.js +45 -9
  403. package/dist/word/semantic/atoms.js.map +1 -1
  404. package/dist/word/semantic/blocks.d.ts +23 -1
  405. package/dist/word/semantic/blocks.d.ts.map +1 -1
  406. package/dist/word/semantic/blocks.js +102 -38
  407. package/dist/word/semantic/blocks.js.map +1 -1
  408. package/dist/word/semantic/boxHangingIndent.test.d.ts +2 -0
  409. package/dist/word/semantic/boxHangingIndent.test.d.ts.map +1 -0
  410. package/dist/word/semantic/boxHangingIndent.test.js +38 -0
  411. package/dist/word/semantic/boxHangingIndent.test.js.map +1 -0
  412. package/dist/word/semantic/chapter.d.ts.map +1 -1
  413. package/dist/word/semantic/chapter.js +25 -12
  414. package/dist/word/semantic/chapter.js.map +1 -1
  415. package/dist/word/semantic/constructs.test.js +37 -13
  416. package/dist/word/semantic/constructs.test.js.map +1 -1
  417. package/dist/word/semantic/containers.d.ts +10 -0
  418. package/dist/word/semantic/containers.d.ts.map +1 -1
  419. package/dist/word/semantic/containers.js +228 -16
  420. package/dist/word/semantic/containers.js.map +1 -1
  421. package/dist/word/semantic/context.d.ts +27 -1
  422. package/dist/word/semantic/context.d.ts.map +1 -1
  423. package/dist/word/semantic/context.js.map +1 -1
  424. package/dist/word/semantic/design/bands.d.ts +42 -0
  425. package/dist/word/semantic/design/bands.d.ts.map +1 -0
  426. package/dist/word/semantic/design/bands.js +140 -0
  427. package/dist/word/semantic/design/bands.js.map +1 -0
  428. package/dist/word/semantic/design/columns.d.ts +32 -0
  429. package/dist/word/semantic/design/columns.d.ts.map +1 -0
  430. package/dist/word/semantic/design/columns.js +108 -0
  431. package/dist/word/semantic/design/columns.js.map +1 -0
  432. package/dist/word/semantic/design/design.test.d.ts +2 -0
  433. package/dist/word/semantic/design/design.test.d.ts.map +1 -0
  434. package/dist/word/semantic/design/design.test.js +141 -0
  435. package/dist/word/semantic/design/design.test.js.map +1 -0
  436. package/dist/word/semantic/design/geometry.d.ts +36 -0
  437. package/dist/word/semantic/design/geometry.d.ts.map +1 -0
  438. package/dist/word/semantic/design/geometry.js +108 -0
  439. package/dist/word/semantic/design/geometry.js.map +1 -0
  440. package/dist/word/semantic/design/heading.d.ts +24 -0
  441. package/dist/word/semantic/design/heading.d.ts.map +1 -0
  442. package/dist/word/semantic/design/heading.js +108 -0
  443. package/dist/word/semantic/design/heading.js.map +1 -0
  444. package/dist/word/semantic/design/hide.d.ts +3 -0
  445. package/dist/word/semantic/design/hide.d.ts.map +1 -0
  446. package/dist/word/semantic/design/hide.js +20 -0
  447. package/dist/word/semantic/design/hide.js.map +1 -0
  448. package/dist/word/semantic/design/ink.d.ts +6 -0
  449. package/dist/word/semantic/design/ink.d.ts.map +1 -0
  450. package/dist/word/semantic/design/ink.js +16 -0
  451. package/dist/word/semantic/design/ink.js.map +1 -0
  452. package/dist/word/semantic/design/part.d.ts +13 -0
  453. package/dist/word/semantic/design/part.d.ts.map +1 -0
  454. package/dist/word/semantic/design/part.js +69 -0
  455. package/dist/word/semantic/design/part.js.map +1 -0
  456. package/dist/word/semantic/design/partBody.d.ts +23 -0
  457. package/dist/word/semantic/design/partBody.d.ts.map +1 -0
  458. package/dist/word/semantic/design/partBody.js +62 -0
  459. package/dist/word/semantic/design/partBody.js.map +1 -0
  460. package/dist/word/semantic/design/partColor.d.ts +42 -0
  461. package/dist/word/semantic/design/partColor.d.ts.map +1 -0
  462. package/dist/word/semantic/design/partColor.js +93 -0
  463. package/dist/word/semantic/design/partColor.js.map +1 -0
  464. package/dist/word/semantic/design/pictures.d.ts +23 -0
  465. package/dist/word/semantic/design/pictures.d.ts.map +1 -0
  466. package/dist/word/semantic/design/pictures.js +99 -0
  467. package/dist/word/semantic/design/pictures.js.map +1 -0
  468. package/dist/word/semantic/design/placedPicture.d.ts +15 -0
  469. package/dist/word/semantic/design/placedPicture.d.ts.map +1 -0
  470. package/dist/word/semantic/design/placedPicture.js +53 -0
  471. package/dist/word/semantic/design/placedPicture.js.map +1 -0
  472. package/dist/word/semantic/design/round3.test.d.ts +2 -0
  473. package/dist/word/semantic/design/round3.test.d.ts.map +1 -0
  474. package/dist/word/semantic/design/round3.test.js +249 -0
  475. package/dist/word/semantic/design/round3.test.js.map +1 -0
  476. package/dist/word/semantic/design/round4.test.d.ts +2 -0
  477. package/dist/word/semantic/design/round4.test.d.ts.map +1 -0
  478. package/dist/word/semantic/design/round4.test.js +201 -0
  479. package/dist/word/semantic/design/round4.test.js.map +1 -0
  480. package/dist/word/semantic/design/round4b.test.d.ts +2 -0
  481. package/dist/word/semantic/design/round4b.test.d.ts.map +1 -0
  482. package/dist/word/semantic/design/round4b.test.js +128 -0
  483. package/dist/word/semantic/design/round4b.test.js.map +1 -0
  484. package/dist/word/semantic/design/rows.d.ts +34 -0
  485. package/dist/word/semantic/design/rows.d.ts.map +1 -0
  486. package/dist/word/semantic/design/rows.js +115 -0
  487. package/dist/word/semantic/design/rows.js.map +1 -0
  488. package/dist/word/semantic/design/text.d.ts +38 -0
  489. package/dist/word/semantic/design/text.d.ts.map +1 -0
  490. package/dist/word/semantic/design/text.js +193 -0
  491. package/dist/word/semantic/design/text.js.map +1 -0
  492. package/dist/word/semantic/design/values.d.ts +24 -0
  493. package/dist/word/semantic/design/values.d.ts.map +1 -0
  494. package/dist/word/semantic/design/values.js +143 -0
  495. package/dist/word/semantic/design/values.js.map +1 -0
  496. package/dist/word/semantic/design/write.d.ts +39 -0
  497. package/dist/word/semantic/design/write.d.ts.map +1 -0
  498. package/dist/word/semantic/design/write.js +366 -0
  499. package/dist/word/semantic/design/write.js.map +1 -0
  500. package/dist/word/semantic/directives.d.ts +13 -0
  501. package/dist/word/semantic/directives.d.ts.map +1 -0
  502. package/dist/word/semantic/directives.js +104 -0
  503. package/dist/word/semantic/directives.js.map +1 -0
  504. package/dist/word/semantic/directives.test.d.ts +2 -0
  505. package/dist/word/semantic/directives.test.d.ts.map +1 -0
  506. package/dist/word/semantic/directives.test.js +157 -0
  507. package/dist/word/semantic/directives.test.js.map +1 -0
  508. package/dist/word/semantic/engineNumbers.d.ts +12 -4
  509. package/dist/word/semantic/engineNumbers.d.ts.map +1 -1
  510. package/dist/word/semantic/engineNumbers.js +16 -5
  511. package/dist/word/semantic/engineNumbers.js.map +1 -1
  512. package/dist/word/semantic/exercises/exerciseBody.d.ts +48 -0
  513. package/dist/word/semantic/exercises/exerciseBody.d.ts.map +1 -0
  514. package/dist/word/semantic/exercises/exerciseBody.js +339 -0
  515. package/dist/word/semantic/exercises/exerciseBody.js.map +1 -0
  516. package/dist/word/semantic/exercises/exercises.d.ts +26 -0
  517. package/dist/word/semantic/exercises/exercises.d.ts.map +1 -0
  518. package/dist/word/semantic/exercises/exercises.js +245 -0
  519. package/dist/word/semantic/exercises/exercises.js.map +1 -0
  520. package/dist/word/semantic/exercises/exercises.test.d.ts +2 -0
  521. package/dist/word/semantic/exercises/exercises.test.d.ts.map +1 -0
  522. package/dist/word/semantic/exercises/exercises.test.js +96 -0
  523. package/dist/word/semantic/exercises/exercises.test.js.map +1 -0
  524. package/dist/word/semantic/fields.d.ts +15 -0
  525. package/dist/word/semantic/fields.d.ts.map +1 -0
  526. package/dist/word/semantic/fields.js +211 -0
  527. package/dist/word/semantic/fields.js.map +1 -0
  528. package/dist/word/semantic/fixtures/harness.d.ts +5 -0
  529. package/dist/word/semantic/fixtures/harness.d.ts.map +1 -1
  530. package/dist/word/semantic/fixtures/harness.js +10 -0
  531. package/dist/word/semantic/fixtures/harness.js.map +1 -1
  532. package/dist/word/semantic/generated.d.ts +21 -0
  533. package/dist/word/semantic/generated.d.ts.map +1 -0
  534. package/dist/word/semantic/generated.js +43 -0
  535. package/dist/word/semantic/generated.js.map +1 -0
  536. package/dist/word/semantic/index.d.ts +6 -0
  537. package/dist/word/semantic/index.d.ts.map +1 -1
  538. package/dist/word/semantic/index.js +43 -10
  539. package/dist/word/semantic/index.js.map +1 -1
  540. package/dist/word/semantic/inline.d.ts +11 -0
  541. package/dist/word/semantic/inline.d.ts.map +1 -1
  542. package/dist/word/semantic/inline.js +140 -11
  543. package/dist/word/semantic/inline.js.map +1 -1
  544. package/dist/word/semantic/inspect.d.ts.map +1 -1
  545. package/dist/word/semantic/inspect.js +24 -1
  546. package/dist/word/semantic/inspect.js.map +1 -1
  547. package/dist/word/semantic/layout/breaks.d.ts +17 -0
  548. package/dist/word/semantic/layout/breaks.d.ts.map +1 -0
  549. package/dist/word/semantic/layout/breaks.js +80 -0
  550. package/dist/word/semantic/layout/breaks.js.map +1 -0
  551. package/dist/word/semantic/layout/layout.test.d.ts +2 -0
  552. package/dist/word/semantic/layout/layout.test.d.ts.map +1 -0
  553. package/dist/word/semantic/layout/layout.test.js +171 -0
  554. package/dist/word/semantic/layout/layout.test.js.map +1 -0
  555. package/dist/word/semantic/layout/pageSpan.d.ts +35 -0
  556. package/dist/word/semantic/layout/pageSpan.d.ts.map +1 -0
  557. package/dist/word/semantic/layout/pageSpan.js +217 -0
  558. package/dist/word/semantic/layout/pageSpan.js.map +1 -0
  559. package/dist/word/semantic/layout/review.test.d.ts +2 -0
  560. package/dist/word/semantic/layout/review.test.d.ts.map +1 -0
  561. package/dist/word/semantic/layout/review.test.js +113 -0
  562. package/dist/word/semantic/layout/review.test.js.map +1 -0
  563. package/dist/word/semantic/math.d.ts +7 -0
  564. package/dist/word/semantic/math.d.ts.map +1 -0
  565. package/dist/word/semantic/math.js +44 -0
  566. package/dist/word/semantic/math.js.map +1 -0
  567. package/dist/word/semantic/media/bottomBoxes.d.ts +6 -0
  568. package/dist/word/semantic/media/bottomBoxes.d.ts.map +1 -0
  569. package/dist/word/semantic/media/bottomBoxes.js +69 -0
  570. package/dist/word/semantic/media/bottomBoxes.js.map +1 -0
  571. package/dist/word/semantic/media/captions.d.ts +31 -0
  572. package/dist/word/semantic/media/captions.d.ts.map +1 -0
  573. package/dist/word/semantic/media/captions.js +143 -0
  574. package/dist/word/semantic/media/captions.js.map +1 -0
  575. package/dist/word/semantic/media/code.d.ts +6 -0
  576. package/dist/word/semantic/media/code.d.ts.map +1 -0
  577. package/dist/word/semantic/media/code.js +76 -0
  578. package/dist/word/semantic/media/code.js.map +1 -0
  579. package/dist/word/semantic/media/comics.d.ts +18 -0
  580. package/dist/word/semantic/media/comics.d.ts.map +1 -0
  581. package/dist/word/semantic/media/comics.js +152 -0
  582. package/dist/word/semantic/media/comics.js.map +1 -0
  583. package/dist/word/semantic/media/figures.d.ts +26 -0
  584. package/dist/word/semantic/media/figures.d.ts.map +1 -0
  585. package/dist/word/semantic/media/figures.js +246 -0
  586. package/dist/word/semantic/media/figures.js.map +1 -0
  587. package/dist/word/semantic/media/floated.d.ts +19 -0
  588. package/dist/word/semantic/media/floated.d.ts.map +1 -0
  589. package/dist/word/semantic/media/floated.js +81 -0
  590. package/dist/word/semantic/media/floated.js.map +1 -0
  591. package/dist/word/semantic/media/floated.test.d.ts +2 -0
  592. package/dist/word/semantic/media/floated.test.d.ts.map +1 -0
  593. package/dist/word/semantic/media/floated.test.js +175 -0
  594. package/dist/word/semantic/media/floated.test.js.map +1 -0
  595. package/dist/word/semantic/media/frames.d.ts +32 -0
  596. package/dist/word/semantic/media/frames.d.ts.map +1 -0
  597. package/dist/word/semantic/media/frames.js +138 -0
  598. package/dist/word/semantic/media/frames.js.map +1 -0
  599. package/dist/word/semantic/media/media.test.d.ts +2 -0
  600. package/dist/word/semantic/media/media.test.d.ts.map +1 -0
  601. package/dist/word/semantic/media/media.test.js +156 -0
  602. package/dist/word/semantic/media/media.test.js.map +1 -0
  603. package/dist/word/semantic/media/pageOpener.d.ts +18 -0
  604. package/dist/word/semantic/media/pageOpener.d.ts.map +1 -0
  605. package/dist/word/semantic/media/pageOpener.js +207 -0
  606. package/dist/word/semantic/media/pageOpener.js.map +1 -0
  607. package/dist/word/semantic/media/pages.d.ts +36 -0
  608. package/dist/word/semantic/media/pages.d.ts.map +1 -0
  609. package/dist/word/semantic/media/pages.js +256 -0
  610. package/dist/word/semantic/media/pages.js.map +1 -0
  611. package/dist/word/semantic/media/pages.test.d.ts +2 -0
  612. package/dist/word/semantic/media/pages.test.d.ts.map +1 -0
  613. package/dist/word/semantic/media/pages.test.js +189 -0
  614. package/dist/word/semantic/media/pages.test.js.map +1 -0
  615. package/dist/word/semantic/media/round4.test.d.ts +2 -0
  616. package/dist/word/semantic/media/round4.test.d.ts.map +1 -0
  617. package/dist/word/semantic/media/round4.test.js +187 -0
  618. package/dist/word/semantic/media/round4.test.js.map +1 -0
  619. package/dist/word/semantic/media/scores.d.ts +10 -0
  620. package/dist/word/semantic/media/scores.d.ts.map +1 -0
  621. package/dist/word/semantic/media/scores.js +71 -0
  622. package/dist/word/semantic/media/scores.js.map +1 -0
  623. package/dist/word/semantic/media/strip.d.ts +10 -0
  624. package/dist/word/semantic/media/strip.d.ts.map +1 -0
  625. package/dist/word/semantic/media/strip.js +80 -0
  626. package/dist/word/semantic/media/strip.js.map +1 -0
  627. package/dist/word/semantic/media/video.d.ts +9 -0
  628. package/dist/word/semantic/media/video.d.ts.map +1 -0
  629. package/dist/word/semantic/media/video.js +51 -0
  630. package/dist/word/semantic/media/video.js.map +1 -0
  631. package/dist/word/semantic/numbering.d.ts +21 -4
  632. package/dist/word/semantic/numbering.d.ts.map +1 -1
  633. package/dist/word/semantic/numbering.js +136 -23
  634. package/dist/word/semantic/numbering.js.map +1 -1
  635. package/dist/word/semantic/page/composed.d.ts +16 -0
  636. package/dist/word/semantic/page/composed.d.ts.map +1 -0
  637. package/dist/word/semantic/page/composed.js +28 -0
  638. package/dist/word/semantic/page/composed.js.map +1 -0
  639. package/dist/word/semantic/page/furniture.d.ts +37 -0
  640. package/dist/word/semantic/page/furniture.d.ts.map +1 -0
  641. package/dist/word/semantic/page/furniture.js +328 -0
  642. package/dist/word/semantic/page/furniture.js.map +1 -0
  643. package/dist/word/semantic/page/margin.d.ts +14 -0
  644. package/dist/word/semantic/page/margin.d.ts.map +1 -0
  645. package/dist/word/semantic/page/margin.js +64 -0
  646. package/dist/word/semantic/page/margin.js.map +1 -0
  647. package/dist/word/semantic/page/notes.d.ts +16 -0
  648. package/dist/word/semantic/page/notes.d.ts.map +1 -0
  649. package/dist/word/semantic/page/notes.js +72 -0
  650. package/dist/word/semantic/page/notes.js.map +1 -0
  651. package/dist/word/semantic/page/page.test.d.ts +2 -0
  652. package/dist/word/semantic/page/page.test.d.ts.map +1 -0
  653. package/dist/word/semantic/page/page.test.js +142 -0
  654. package/dist/word/semantic/page/page.test.js.map +1 -0
  655. package/dist/word/semantic/page/paragraph.d.ts +35 -0
  656. package/dist/word/semantic/page/paragraph.d.ts.map +1 -0
  657. package/dist/word/semantic/page/paragraph.js +103 -0
  658. package/dist/word/semantic/page/paragraph.js.map +1 -0
  659. package/dist/word/semantic/page/place.d.ts +35 -0
  660. package/dist/word/semantic/page/place.d.ts.map +1 -0
  661. package/dist/word/semantic/page/place.js +89 -0
  662. package/dist/word/semantic/page/place.js.map +1 -0
  663. package/dist/word/semantic/page/round4.test.d.ts +2 -0
  664. package/dist/word/semantic/page/round4.test.d.ts.map +1 -0
  665. package/dist/word/semantic/page/round4.test.js +202 -0
  666. package/dist/word/semantic/page/round4.test.js.map +1 -0
  667. package/dist/word/semantic/page/settings.d.ts +11 -0
  668. package/dist/word/semantic/page/settings.d.ts.map +1 -0
  669. package/dist/word/semantic/page/settings.js +39 -0
  670. package/dist/word/semantic/page/settings.js.map +1 -0
  671. package/dist/word/semantic/prose/caption.d.ts +13 -0
  672. package/dist/word/semantic/prose/caption.d.ts.map +1 -0
  673. package/dist/word/semantic/prose/caption.js +39 -0
  674. package/dist/word/semantic/prose/caption.js.map +1 -0
  675. package/dist/word/semantic/prose/chips.d.ts +13 -0
  676. package/dist/word/semantic/prose/chips.d.ts.map +1 -0
  677. package/dist/word/semantic/prose/chips.js +60 -0
  678. package/dist/word/semantic/prose/chips.js.map +1 -0
  679. package/dist/word/semantic/prose/flush.d.ts +14 -0
  680. package/dist/word/semantic/prose/flush.d.ts.map +1 -0
  681. package/dist/word/semantic/prose/flush.js +34 -0
  682. package/dist/word/semantic/prose/flush.js.map +1 -0
  683. package/dist/word/semantic/prose/listSpacing.d.ts +7 -0
  684. package/dist/word/semantic/prose/listSpacing.d.ts.map +1 -0
  685. package/dist/word/semantic/prose/listSpacing.js +29 -0
  686. package/dist/word/semantic/prose/listSpacing.js.map +1 -0
  687. package/dist/word/semantic/prose/paragraphStyle.d.ts +57 -0
  688. package/dist/word/semantic/prose/paragraphStyle.d.ts.map +1 -0
  689. package/dist/word/semantic/prose/paragraphStyle.js +125 -0
  690. package/dist/word/semantic/prose/paragraphStyle.js.map +1 -0
  691. package/dist/word/semantic/prose/prose.test.d.ts +2 -0
  692. package/dist/word/semantic/prose/prose.test.d.ts.map +1 -0
  693. package/dist/word/semantic/prose/prose.test.js +124 -0
  694. package/dist/word/semantic/prose/prose.test.js.map +1 -0
  695. package/dist/word/semantic/prose/tabs.d.ts +7 -0
  696. package/dist/word/semantic/prose/tabs.d.ts.map +1 -0
  697. package/dist/word/semantic/prose/tabs.js +25 -0
  698. package/dist/word/semantic/prose/tabs.js.map +1 -0
  699. package/dist/word/semantic/prose/text4.test.d.ts +2 -0
  700. package/dist/word/semantic/prose/text4.test.d.ts.map +1 -0
  701. package/dist/word/semantic/prose/text4.test.js +174 -0
  702. package/dist/word/semantic/prose/text4.test.js.map +1 -0
  703. package/dist/word/semantic/prose/tocEntry.d.ts +32 -0
  704. package/dist/word/semantic/prose/tocEntry.d.ts.map +1 -0
  705. package/dist/word/semantic/prose/tocEntry.js +68 -0
  706. package/dist/word/semantic/prose/tocEntry.js.map +1 -0
  707. package/dist/word/semantic/review.test.js +4 -1
  708. package/dist/word/semantic/review.test.js.map +1 -1
  709. package/dist/word/semantic/sections.d.ts +48 -3
  710. package/dist/word/semantic/sections.d.ts.map +1 -1
  711. package/dist/word/semantic/sections.js +133 -33
  712. package/dist/word/semantic/sections.js.map +1 -1
  713. package/dist/word/semantic/snippet.d.ts +2 -2
  714. package/dist/word/semantic/snippet.d.ts.map +1 -1
  715. package/dist/word/semantic/snippet.js +3 -2
  716. package/dist/word/semantic/snippet.js.map +1 -1
  717. package/dist/word/semantic/strikethrough.test.d.ts +2 -0
  718. package/dist/word/semantic/strikethrough.test.d.ts.map +1 -0
  719. package/dist/word/semantic/strikethrough.test.js +17 -0
  720. package/dist/word/semantic/strikethrough.test.js.map +1 -0
  721. package/dist/word/semantic/styles.d.ts +84 -7
  722. package/dist/word/semantic/styles.d.ts.map +1 -1
  723. package/dist/word/semantic/styles.js +261 -47
  724. package/dist/word/semantic/styles.js.map +1 -1
  725. package/dist/word/semantic/styling.test.d.ts +2 -0
  726. package/dist/word/semantic/styling.test.d.ts.map +1 -0
  727. package/dist/word/semantic/styling.test.js +283 -0
  728. package/dist/word/semantic/styling.test.js.map +1 -0
  729. package/dist/word/semantic/table/rules.d.ts +18 -0
  730. package/dist/word/semantic/table/rules.d.ts.map +1 -0
  731. package/dist/word/semantic/table/rules.js +44 -0
  732. package/dist/word/semantic/table/rules.js.map +1 -0
  733. package/dist/word/semantic/table/styles.d.ts +16 -0
  734. package/dist/word/semantic/table/styles.d.ts.map +1 -0
  735. package/dist/word/semantic/table/styles.js +62 -0
  736. package/dist/word/semantic/table/styles.js.map +1 -0
  737. package/dist/word/semantic/table/tables.test.d.ts +2 -0
  738. package/dist/word/semantic/table/tables.test.d.ts.map +1 -0
  739. package/dist/word/semantic/table/tables.test.js +286 -0
  740. package/dist/word/semantic/table/tables.test.js.map +1 -0
  741. package/dist/word/semantic/table/widths.d.ts +20 -0
  742. package/dist/word/semantic/table/widths.d.ts.map +1 -0
  743. package/dist/word/semantic/table/widths.js +72 -0
  744. package/dist/word/semantic/table/widths.js.map +1 -0
  745. package/dist/word/semantic/tables.d.ts +3 -0
  746. package/dist/word/semantic/tables.d.ts.map +1 -1
  747. package/dist/word/semantic/tables.js +133 -59
  748. package/dist/word/semantic/tables.js.map +1 -1
  749. package/dist/word/semantic/verse.d.ts +13 -0
  750. package/dist/word/semantic/verse.d.ts.map +1 -0
  751. package/dist/word/semantic/verse.js +142 -0
  752. package/dist/word/semantic/verse.js.map +1 -0
  753. package/dist/word/semantic/wml.d.ts +15 -1
  754. package/dist/word/semantic/wml.d.ts.map +1 -1
  755. package/dist/word/semantic/wml.js +21 -6
  756. package/dist/word/semantic/wml.js.map +1 -1
  757. package/dist/word/svg/glyphs.d.ts +25 -0
  758. package/dist/word/svg/glyphs.d.ts.map +1 -0
  759. package/dist/word/svg/glyphs.js +218 -0
  760. package/dist/word/svg/glyphs.js.map +1 -0
  761. package/dist/word/svg/svg.test.d.ts +2 -0
  762. package/dist/word/svg/svg.test.d.ts.map +1 -0
  763. package/dist/word/svg/svg.test.js +65 -0
  764. package/dist/word/svg/svg.test.js.map +1 -0
  765. package/dist/word/svg/text.d.ts +23 -0
  766. package/dist/word/svg/text.d.ts.map +1 -0
  767. package/dist/word/svg/text.js +202 -0
  768. package/dist/word/svg/text.js.map +1 -0
  769. package/package.json +5 -1
  770. package/dist/word/semantic/figures.d.ts +0 -8
  771. package/dist/word/semantic/figures.d.ts.map +0 -1
  772. package/dist/word/semantic/figures.js +0 -175
  773. package/dist/word/semantic/figures.js.map +0 -1
@@ -1,7 +1,8 @@
1
1
  import type { ResolvedConfig } from '../../vdt.js';
2
- import type { ResolvedCalloutStyleConfig } from '../../types.js';
2
+ import type { ResolvedCalloutStyleConfig, ResolvedCaptionStyleConfig } from '../../types.js';
3
3
  import type { WordFontPlan } from '../fonts/types.js';
4
- import { type RunProps, type Units } from './wml.js';
4
+ import { type TocLevelNumbering } from './prose/paragraphStyle.js';
5
+ import { type ParaProps, type RunProps, type Units } from './wml.js';
5
6
  /** Style ids the writer uses by name. */
6
7
  export declare const STYLE: {
7
8
  readonly normal: "Normal";
@@ -26,32 +27,108 @@ export declare const STYLE: {
26
27
  readonly part: "PostextPart";
27
28
  readonly boxTitle: "PostextBoxTitle";
28
29
  };
30
+ export interface StyleDef {
31
+ type: 'paragraph' | 'character';
32
+ name: string;
33
+ basedOn?: string;
34
+ next?: string;
35
+ isDefault?: boolean;
36
+ custom?: boolean;
37
+ semiHidden?: boolean;
38
+ pPr?: ParaProps;
39
+ rPr?: RunProps;
40
+ }
29
41
  export declare class StyleRegistry {
30
42
  readonly resolved: ResolvedConfig;
31
43
  private readonly units;
32
44
  private readonly plan?;
33
45
  private readonly defs;
34
46
  private readonly byKey;
47
+ private readonly chipIds;
48
+ /** The face each paragraph style sets its text in (#1444). */
49
+ private readonly faces;
50
+ private readonly inks;
35
51
  readonly bodyPx: number;
36
52
  constructor(resolved: ResolvedConfig, units: Units, plan?: WordFontPlan | undefined);
37
53
  /** Font of a family stack at a weight/style, through the font plan. */
38
54
  font(stack: string | undefined, weight?: number, italic?: boolean): RunProps;
55
+ /**
56
+ * The family a bold or italic run of a paragraph style takes when its
57
+ * face lies in another Word family than the style's own (#1444): a Light
58
+ * body's italic is the 400 italic, filed under the regular family, as a
59
+ * browser picks it. Word would otherwise slant the Light upright or, in
60
+ * LibreOffice, set another family's italic. Nothing when the slot of the
61
+ * style's own family serves.
62
+ */
63
+ runFont(style: string | undefined, bold: boolean, italic: boolean): string | undefined;
64
+ /** The colour a bold or italic run of a paragraph style takes when the
65
+ * style sets one apart from its text (#1444): a key term in a box's
66
+ * colour, as the engine paints `boldColor` and `italicColor`. */
67
+ runInk(style: string | undefined, bold: boolean, italic: boolean): string | undefined;
68
+ /** Record the emphasis colours of a style that differ from its text's. */
69
+ private ink;
70
+ /** The text size of a style, half-points: its own or the style's it is
71
+ * based on, else the body's. */
72
+ styleSize(style: string | undefined): number;
73
+ private face;
39
74
  private add;
75
+ /** The name of style `id` (what a STYLEREF field names). */
76
+ nameOf(id: string): string | undefined;
40
77
  /** A unique style id for a key (config ids may collide once slugged). */
41
78
  private idFor;
42
79
  private builtins;
43
- /** A paragraph style for table header cells: their bold and italic go
44
- * in a style, not on the runs, so the importer does not read them as
45
- * emphasis the user added. */
46
- tableHeader(bold: boolean, italic: boolean): string;
80
+ /** The alignment a paragraph style ends up with, through its `basedOn`
81
+ * chain. */
82
+ jcOf(id: string | undefined): ParaProps['jc'];
83
+ /** Whether a paragraph style hangs its lines after the first (through
84
+ * its `basedOn` chain). */
85
+ hangs(id: string | undefined): boolean;
86
+ /** The caption style of a resource type whose caption style is not the
87
+ * document's (a table captioned above, in its own size): one based on
88
+ * `Caption`, made once per type. */
89
+ caption(cap: ResolvedCaptionStyleConfig, typeId: string): string;
90
+ /** The character style of a chip style: its fill, ink and face. Style
91
+ * ids never contain a word the importer reads as run formatting
92
+ * (`bold`, `code`…), so a chip does not come back as an edit. */
93
+ chip(styleId: string | undefined): string;
94
+ /** A style another module defines (the table styles, #1444): made once
95
+ * per key, under a unique id of `prefix` and `name`. */
96
+ define(key: string, prefix: string, name: string, make: () => StyleDef): string;
97
+ /** A chip's outline as Word draws a run's (#1444): a line round its
98
+ * characters (Word has no rounded or circled run, so a round chip is a
99
+ * square one), or the line under them of an underline chip. */
100
+ private chipLine;
47
101
  private headingProps;
48
102
  private headingLevel;
49
103
  /** The style of a heading: its level's, or the named heading style's
50
104
  * (a style per name and level, based on the level's). */
51
105
  heading(level: number, styleName?: string): string;
106
+ /** Word's own style of a contents or index entry at `level` (1–9):
107
+ * `toc N` / `index N`, the names Word applies when it updates the
108
+ * field. A contents level takes its entry's look from the config
109
+ * (#1444), its page-number tab (`endTwips`) and, by how its entries
110
+ * are numbered, its number column; an index level is indented one step
111
+ * further. */
112
+ listing(kind: 'toc' | 'index', level: number, endTwips?: number, numbering?: TocLevelNumbering): string;
113
+ /** Word's own style of an index letter head (`index heading`), bold and
114
+ * a line above, set apart from the entries before. */
115
+ indexHeading(): string;
52
116
  /** The Word style of a named paragraph style (`:::paragraphs{style}`). */
53
117
  paragraphStyle(name: string): string | undefined;
54
- private paragraphDef;
118
+ /** The list paragraph style of a box's text style (#1444): its items
119
+ * set in the box's face, size, leading and colour, as the engine sets
120
+ * a list in a box, not in the body's. */
121
+ boxList(body: string): string;
122
+ /** The leading of a paragraph style, twips: its own or the style's it is
123
+ * based on (Normal's at the end of the chain). */
124
+ lineOf(style: string | undefined): number | undefined;
125
+ /** A paragraph style of the writer's own, made once per `key` (a heading
126
+ * design's text, a box's label tab): `make` gives its look. */
127
+ custom(key: string, name: string, make: () => {
128
+ basedOn?: string;
129
+ pPr?: ParaProps;
130
+ rPr?: RunProps;
131
+ }): string;
55
132
  /** The box style named by a callout's `type`. */
56
133
  callout(type: string | undefined): ResolvedCalloutStyleConfig | undefined;
57
134
  /** Body and title paragraph styles of a box style. */
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/word/semantic/styles.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,0BAA0B,EAAuE,MAAM,gBAAgB,CAAC;AAEtI,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAAqE,KAAK,QAAQ,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAExH,yCAAyC;AACzC,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;CAsBR,CAAC;AAkBX,qBAAa,aAAa;IAMtB,QAAQ,CAAC,QAAQ,EAAE,cAAc;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;IAPxB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA+B;IACpD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA6B;IACnD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAGb,QAAQ,EAAE,cAAc,EAChB,KAAK,EAAE,KAAK,EACZ,IAAI,CAAC,EAAE,YAAY,YAAA;IAMtC,uEAAuE;IACvE,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,SAAM,EAAE,MAAM,UAAQ,GAAG,QAAQ;IAQvE,OAAO,CAAC,GAAG;IAKX,yEAAyE;IACzE,OAAO,CAAC,KAAK;IASb,OAAO,CAAC,QAAQ;IAmGhB;;mCAE+B;IAC/B,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM;IAMnD,OAAO,CAAC,YAAY;IA0BpB,OAAO,CAAC,YAAY;IAMpB;8DAC0D;IAC1D,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM;IAkBlD,0EAA0E;IAC1E,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAQhD,OAAO,CAAC,YAAY;IA2BpB,iDAAiD;IACjD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,0BAA0B,GAAG,SAAS;IAKzE,sDAAsD;IACtD,aAAa,CAAC,KAAK,EAAE,0BAA0B,GAAG,SAAS,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;IAgD7F,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM;IAK7C,sDAAsD;IACtD,GAAG,IAAI,MAAM;CAed"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/word/semantic/styles.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,0BAA0B,EAAE,0BAA0B,EAAkE,MAAM,gBAAgB,CAAC;AAE7J,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKtD,OAAO,EAAmD,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACpH,OAAO,EAAqD,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAExH,yCAAyC;AACzC,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;CAsBR,CAAC;AAMX,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,WAAW,GAAG,WAAW,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,GAAG,CAAC,EAAE,QAAQ,CAAC;CAChB;AAED,qBAAa,aAAa;IAUtB,QAAQ,CAAC,QAAQ,EAAE,cAAc;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;IAXxB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA+B;IACpD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA6B;IACnD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IACrD,8DAA8D;IAC9D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqF;IAC3G,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAyD;IAC9E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAGb,QAAQ,EAAE,cAAc,EAChB,KAAK,EAAE,KAAK,EACZ,IAAI,CAAC,EAAE,YAAY,YAAA;IAMtC,uEAAuE;IACvE,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,SAAM,EAAE,MAAM,UAAQ,GAAG,QAAQ;IAQvE;;;;;;;OAOG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAUtF;;sEAEkE;IAClE,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAKrF,0EAA0E;IAC1E,OAAO,CAAC,GAAG;IAQX;qCACiC;IACjC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM;IAS5C,OAAO,CAAC,IAAI;IAKZ,OAAO,CAAC,GAAG;IAKX,4DAA4D;IAC5D,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAItC,yEAAyE;IACzE,OAAO,CAAC,KAAK;IASb,OAAO,CAAC,QAAQ;IA4GhB;iBACa;IACb,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;IAO7C;gCAC4B;IAC5B,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO;IAQtC;;yCAEqC;IACrC,OAAO,CAAC,GAAG,EAAE,0BAA0B,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAShE;;sEAEkE;IAClE,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM;IA8BzC;6DACyD;IACzD,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,GAAG,MAAM;IAM/E;;oEAEgE;IAChE,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,YAAY;IA4BpB,OAAO,CAAC,YAAY;IAapB;8DAC0D;IAC1D,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM;IA2BlD;;;;;mBAKe;IACf,OAAO,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,iBAAiB,GAAG,MAAM;IAQvG;2DACuD;IACvD,YAAY,IAAI,MAAM;IAItB,0EAA0E;IAC1E,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAShD;;8CAE0C;IAC1C,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAW7B;uDACmD;IACnD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS;IASrD;oEACgE;IAChE,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,SAAS,CAAC;QAAC,GAAG,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,MAAM;IAU5G,iDAAiD;IACjD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,0BAA0B,GAAG,SAAS;IAKzE,sDAAsD;IACtD,aAAa,CAAC,KAAK,EAAE,0BAA0B,GAAG,SAAS,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;IAsD7F,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM;IAS7C,sDAAsD;IACtD,GAAG,IAAI,MAAM;CAed"}
@@ -6,6 +6,9 @@
6
6
  import { resolvedCodeStyle } from '../../defaults/text/codeStyle.js';
7
7
  import { wordFontFor } from '../fonts/plan.js';
8
8
  import { escapeAttr } from '../xml.js';
9
+ import { paleOnWhite } from './design/ink.js';
10
+ import { captionLook, sameCaptionLook } from './prose/caption.js';
11
+ import { boxBodyIndent, paragraphStyleLook, tocLevelLook } from './prose/paragraphStyle.js';
9
12
  import { firstFamily, halfPoints, hex, pPr, px, rPr, twips } from './wml.js';
10
13
  /** Style ids the writer uses by name. */
11
14
  export const STYLE = {
@@ -39,6 +42,10 @@ export class StyleRegistry {
39
42
  plan;
40
43
  defs = new Map();
41
44
  byKey = new Map();
45
+ chipIds = new Map();
46
+ /** The face each paragraph style sets its text in (#1444). */
47
+ faces = new Map();
48
+ inks = new Map();
42
49
  bodyPx;
43
50
  constructor(resolved, units, plan) {
44
51
  this.resolved = resolved;
@@ -57,11 +64,65 @@ export class StyleRegistry {
57
64
  const ref = wordFontFor(this.plan, `${italic ? 'italic ' : ''}${weight} 16px "${family}"`);
58
65
  return { font: ref.family, ...(ref.bold ? { b: true } : {}), ...(ref.italic ? { i: true } : {}) };
59
66
  }
67
+ /**
68
+ * The family a bold or italic run of a paragraph style takes when its
69
+ * face lies in another Word family than the style's own (#1444): a Light
70
+ * body's italic is the 400 italic, filed under the regular family, as a
71
+ * browser picks it. Word would otherwise slant the Light upright or, in
72
+ * LibreOffice, set another family's italic. Nothing when the slot of the
73
+ * style's own family serves.
74
+ */
75
+ runFont(style, bold, italic) {
76
+ if (!this.plan || (!bold && !italic))
77
+ return undefined;
78
+ const face = this.faces.get(style ?? STYLE.normal);
79
+ if (!face)
80
+ return undefined;
81
+ const own = this.font(face.stack, face.weight, face.italic).font;
82
+ const weight = bold ? Math.max(face.weight, this.resolved.bodyText.boldFontWeight) : face.weight;
83
+ const styled = this.font(face.stack, weight, italic || face.italic).font;
84
+ return styled && styled !== own ? styled : undefined;
85
+ }
86
+ /** The colour a bold or italic run of a paragraph style takes when the
87
+ * style sets one apart from its text (#1444): a key term in a box's
88
+ * colour, as the engine paints `boldColor` and `italicColor`. */
89
+ runInk(style, bold, italic) {
90
+ const ink = this.inks.get(style ?? STYLE.normal);
91
+ return (bold && ink?.bold) || (italic && ink?.italic) || undefined;
92
+ }
93
+ /** Record the emphasis colours of a style that differ from its text's. */
94
+ ink(id, color, bold, italic) {
95
+ const text = hex(color);
96
+ const differs = (c) => (hex(c) && hex(c) !== text ? hex(c) : undefined);
97
+ const ink = { bold: differs(bold), italic: differs(italic) };
98
+ if (ink.bold || ink.italic)
99
+ this.inks.set(id, ink);
100
+ return id;
101
+ }
102
+ /** The text size of a style, half-points: its own or the style's it is
103
+ * based on, else the body's. */
104
+ styleSize(style) {
105
+ for (let id = style, n = 0; id && n < 8; n++) {
106
+ const def = this.defs.get(id);
107
+ if (def?.rPr?.sz)
108
+ return def.rPr.sz;
109
+ id = def?.basedOn;
110
+ }
111
+ return halfPoints(this.units, this.resolved.bodyText.fontSize);
112
+ }
113
+ face(id, stack, weight = 400, italic = false) {
114
+ this.faces.set(id, { stack, weight, italic });
115
+ return id;
116
+ }
60
117
  add(id, def) {
61
118
  if (!this.defs.has(id))
62
119
  this.defs.set(id, def);
63
120
  return id;
64
121
  }
122
+ /** The name of style `id` (what a STYLEREF field names). */
123
+ nameOf(id) {
124
+ return this.defs.get(id)?.name;
125
+ }
65
126
  /** A unique style id for a key (config ids may collide once slugged). */
66
127
  idFor(key, prefix, name) {
67
128
  const known = this.byKey.get(key);
@@ -80,7 +141,7 @@ export class StyleRegistry {
80
141
  const bodyPx = px(u, body.fontSize);
81
142
  const line = twips(u, body.lineHeight, bodyPx);
82
143
  const after = body.paragraphSpacing === false ? 0 : body.paragraphSpacing === true ? line : twips(u, body.paragraphSpacing, bodyPx);
83
- this.add(STYLE.normal, {
144
+ this.add(this.ink(this.face(STYLE.normal, body.fontFamily, body.fontWeight), body.color, body.boldColor, body.italicColor), {
84
145
  type: 'paragraph',
85
146
  name: 'Normal',
86
147
  isDefault: true,
@@ -97,7 +158,7 @@ export class StyleRegistry {
97
158
  for (const level of r.headings.levels)
98
159
  this.headingLevel(level);
99
160
  const bq = body.blockquote;
100
- this.add(STYLE.quote, {
161
+ this.add(this.face(STYLE.quote, body.fontFamily, body.fontWeight, bq.italic), {
101
162
  type: 'paragraph',
102
163
  name: 'Quote',
103
164
  basedOn: STYLE.normal,
@@ -105,16 +166,17 @@ export class StyleRegistry {
105
166
  rPr: { i: bq.italic, color: hex(bq.color) },
106
167
  });
107
168
  const cap = r.captionStyle;
108
- this.add(STYLE.caption, {
169
+ this.add(this.face(STYLE.caption, cap.fontFamily ?? body.fontFamily, cap.fontFamily ? 400 : body.fontWeight), {
109
170
  type: 'paragraph',
110
171
  name: 'caption',
111
172
  basedOn: STYLE.normal,
112
173
  next: STYLE.normal,
113
- pPr: { before: twips(u, cap.gap, px(u, cap.fontSize)), ind: { firstLine: 0 }, jc: JC[cap.align] },
114
- rPr: { ...this.font(cap.fontFamily), color: hex(cap.color), sz: halfPoints(u, cap.fontSize) },
174
+ ...captionLook(u, cap, line, this.font(cap.fontFamily)),
115
175
  });
116
176
  const lists = r.unorderedLists;
117
- this.add(STYLE.list, {
177
+ // A list item's text is the body's: its italic and bold runs take the
178
+ // body's faces (#1444).
179
+ this.add(this.ink(this.face(STYLE.list, body.fontFamily, body.fontWeight), body.color, body.boldColor, body.italicColor), {
118
180
  type: 'paragraph',
119
181
  name: 'List Paragraph',
120
182
  basedOn: STYLE.normal,
@@ -122,7 +184,7 @@ export class StyleRegistry {
122
184
  });
123
185
  const fn = r.footnotes;
124
186
  const fnPx = px(u, fn.fontSize);
125
- this.add(STYLE.footnoteText, {
187
+ this.add(this.ink(this.face(STYLE.footnoteText, body.fontFamily, body.fontWeight), fn.color, body.boldColor, body.italicColor), {
126
188
  type: 'paragraph',
127
189
  name: 'footnote text',
128
190
  basedOn: STYLE.normal,
@@ -134,18 +196,24 @@ export class StyleRegistry {
134
196
  const small = { sz: Math.max(2, Math.round(halfPoints(u, body.fontSize) * 0.85)) };
135
197
  this.add(STYLE.header, { type: 'paragraph', name: 'header', basedOn: STYLE.normal, pPr: { ind: { firstLine: 0 }, jc: 'center' }, rPr: small });
136
198
  this.add(STYLE.footer, { type: 'paragraph', name: 'footer', basedOn: STYLE.normal, pPr: { ind: { firstLine: 0 }, jc: 'center' }, rPr: small });
137
- const mono = { font: 'Consolas' };
199
+ // Source the writer could not convert: a monospace face that Word,
200
+ // LibreOffice and Google Docs all have (Consolas is Windows only, and
201
+ // LibreOffice elsewhere falls back to a serif).
202
+ const mono = { font: 'Courier New' };
138
203
  this.add(STYLE.source, {
139
204
  type: 'paragraph',
140
205
  name: 'Postext Source',
141
206
  custom: true,
142
207
  basedOn: STYLE.normal,
143
- pPr: { shd: 'EDEDED', before: 0, after: 0, line: { twips: 240, rule: 'auto' }, ind: { firstLine: 0 }, jc: 'left' },
208
+ pPr: { shd: 'EDEDED', suppressAutoHyphens: true, bidi: r.direction === 'rtl' ? false : undefined, before: 0, after: 0, line: { twips: 240, rule: 'auto' }, ind: { firstLine: 0 }, jc: 'left' },
144
209
  rPr: { ...mono, color: '595959', sz: Math.max(16, small.sz) },
145
210
  });
146
211
  this.add(STYLE.sourceChar, { type: 'character', name: 'Postext Source Char', custom: true, rPr: { ...mono, color: '595959', shd: 'EDEDED' } });
147
212
  this.add(STYLE.reference, { type: 'character', name: 'Postext Reference', custom: true, rPr: { color: hex(body.referenceColor), b: body.referenceBold || undefined, i: body.referenceItalic || undefined } });
148
- this.add(STYLE.mark, { type: 'character', name: 'Postext Mark', custom: true, rPr: { highlight: 'yellow' } });
213
+ // The band of a mark as run shading in the mark style's colour:
214
+ // LibreOffice drops a highlight set in a character style.
215
+ const mark = r.markStyles?.[0];
216
+ this.add(STYLE.mark, { type: 'character', name: 'Postext Mark', custom: true, rPr: { color: hex(mark?.color), shd: hex(mark?.background) ?? 'FFF0A0' } });
149
217
  this.add(STYLE.chip, { type: 'character', name: 'Postext Chip', custom: true, rPr: { shd: 'E7E6E6' } });
150
218
  const code = resolvedCodeStyle(r);
151
219
  const codePx = px(u, code.fontSize, bodyPx);
@@ -156,6 +224,8 @@ export class StyleRegistry {
156
224
  basedOn: STYLE.normal,
157
225
  pPr: {
158
226
  shd: code.backgroundEnabled ? hex(code.background) : undefined,
227
+ suppressAutoHyphens: true,
228
+ bidi: r.direction === 'rtl' ? false : undefined,
159
229
  before: twips(u, code.marginTop, bodyPx),
160
230
  after: twips(u, code.marginBottom, bodyPx),
161
231
  line: code.lineHeight ? { twips: twips(u, code.lineHeight, codePx), rule: 'atLeast' } : undefined,
@@ -172,15 +242,94 @@ export class StyleRegistry {
172
242
  this.add(STYLE.part, { type: 'paragraph', name: 'Postext Part', custom: true, basedOn: STYLE.normal, pPr: { pageBreakBefore: true, keepNext: true, ind: { firstLine: 0 }, jc: 'center', outlineLvl: 0 }, rPr: { b: true, sz: halfPoints(u, body.fontSize) * 2 } });
173
243
  this.add(STYLE.boxTitle, { type: 'paragraph', name: 'Postext Box Title', custom: true, basedOn: STYLE.normal, pPr: { keepNext: true, ind: { firstLine: 0 } }, rPr: { b: true } });
174
244
  }
175
- /** A paragraph style for table header cells: their bold and italic go
176
- * in a style, not on the runs, so the importer does not read them as
177
- * emphasis the user added. */
178
- tableHeader(bold, italic) {
179
- const { id, fresh } = this.idFor(`th:${bold ? 'b' : ''}${italic ? 'i' : ''}`, 'PostextTableHeader', `${bold ? 'B' : ''}${italic ? 'I' : ''}`);
245
+ /** The alignment a paragraph style ends up with, through its `basedOn`
246
+ * chain. */
247
+ jcOf(id) {
248
+ for (let k = 0, d = id ? this.defs.get(id) : undefined; d && k < 16; k++, d = d.basedOn ? this.defs.get(d.basedOn) : undefined) {
249
+ if (d.pPr?.jc)
250
+ return d.pPr.jc;
251
+ }
252
+ return undefined;
253
+ }
254
+ /** Whether a paragraph style hangs its lines after the first (through
255
+ * its `basedOn` chain). */
256
+ hangs(id) {
257
+ for (let k = 0, d = id ? this.defs.get(id) : undefined; d && k < 16; k++, d = d.basedOn ? this.defs.get(d.basedOn) : undefined) {
258
+ if (d.pPr?.ind?.hanging !== undefined)
259
+ return d.pPr.ind.hanging > 0;
260
+ if (d.pPr?.ind?.firstLine !== undefined)
261
+ return false;
262
+ }
263
+ return false;
264
+ }
265
+ /** The caption style of a resource type whose caption style is not the
266
+ * document's (a table captioned above, in its own size): one based on
267
+ * `Caption`, made once per type. */
268
+ caption(cap, typeId) {
269
+ if (sameCaptionLook(cap, this.resolved.captionStyle))
270
+ return STYLE.caption;
271
+ const u = this.units;
272
+ const line = twips(u, this.resolved.bodyText.lineHeight, px(u, this.resolved.bodyText.fontSize));
273
+ const look = captionLook(u, cap, line, this.font(cap.fontFamily));
274
+ const id = this.define(`caption:${typeId}`, 'PostextCaption', typeId, () => ({ type: 'paragraph', name: `Caption: ${typeId}`, custom: true, basedOn: STYLE.caption, next: STYLE.normal, ...look }));
275
+ return this.face(id, cap.fontFamily || this.resolved.bodyText.fontFamily, cap.fontFamily ? 400 : this.resolved.bodyText.fontWeight);
276
+ }
277
+ /** The character style of a chip style: its fill, ink and face. Style
278
+ * ids never contain a word the importer reads as run formatting
279
+ * (`bold`, `code`…), so a chip does not come back as an edit. */
280
+ chip(styleId) {
281
+ const styles = this.resolved.chipStyles ?? [];
282
+ const cs = (styleId ? styles.find((s) => s.id === styleId) : undefined) ?? styles[0];
283
+ if (!cs)
284
+ return STYLE.chip;
285
+ const known = this.chipIds.get(cs.id);
286
+ if (known)
287
+ return known;
288
+ let id = `${STYLE.chip}${slug(cs.id)}`;
289
+ if (/strong|bold|emphasis|italic|smallcaps|superscript|subscript|code|verbatim/i.test(id) || this.defs.has(id))
290
+ id = `${STYLE.chip}${this.chipIds.size + 1}`;
291
+ this.chipIds.set(cs.id, id);
292
+ const u = this.units;
293
+ this.add(id, {
294
+ type: 'character',
295
+ name: `Postext Chip: ${cs.name || cs.id}`,
296
+ custom: true,
297
+ basedOn: STYLE.chip,
298
+ rPr: {
299
+ ...(cs.fontFamily ? this.font(cs.fontFamily, cs.bold ? 700 : 400, cs.italic) : {}),
300
+ b: cs.bold || undefined,
301
+ i: cs.italic || undefined,
302
+ color: hex(cs.color),
303
+ sz: cs.fontSize ? halfPoints(u, cs.fontSize, this.bodyPx) : undefined,
304
+ ...this.chipLine(cs),
305
+ // A white fill is the paper's: as run shading it would only show
306
+ // as a box over a shaded cell or band (#1444).
307
+ shd: cs.backgroundEnabled && hex(cs.background) !== 'FFFFFF' ? hex(cs.background) : 'auto',
308
+ },
309
+ });
310
+ return id;
311
+ }
312
+ /** A style another module defines (the table styles, #1444): made once
313
+ * per key, under a unique id of `prefix` and `name`. */
314
+ define(key, prefix, name, make) {
315
+ const { id, fresh } = this.idFor(key, prefix, name);
180
316
  if (fresh)
181
- this.add(id, { type: 'paragraph', name: `Postext Table Header${id.slice('PostextTableHeader'.length)}`, custom: true, basedOn: STYLE.normal, rPr: { b: bold || undefined, i: italic || undefined } });
317
+ this.add(id, make());
182
318
  return id;
183
319
  }
320
+ /** A chip's outline as Word draws a run's (#1444): a line round its
321
+ * characters (Word has no rounded or circled run, so a round chip is a
322
+ * square one), or the line under them of an underline chip. */
323
+ chipLine(cs) {
324
+ const u = this.units;
325
+ const pt = (px(u, cs.borderWidth, this.bodyPx) * 72) / u.dpi;
326
+ if (!(pt > 0))
327
+ return {};
328
+ if (cs.underline)
329
+ return { u: cs.underline === 'solid' ? true : cs.underline === 'dashed' ? 'dash' : 'dotted' };
330
+ // Eighths of a point, in the range Word reads (2 to 96).
331
+ return { bdr: { color: hex(cs.borderColor) ?? 'auto', sz: Math.min(96, Math.max(2, Math.round(pt * 8))) } };
332
+ }
184
333
  headingProps(level, align) {
185
334
  const u = this.units;
186
335
  const size = px(u, level.fontSize, this.bodyPx);
@@ -188,6 +337,7 @@ export class StyleRegistry {
188
337
  pPr: {
189
338
  keepNext: true,
190
339
  keepLines: true,
340
+ suppressAutoHyphens: true,
191
341
  before: twips(u, level.marginTop, size),
192
342
  after: twips(u, level.marginBottom, size),
193
343
  line: { twips: twips(u, level.lineHeight, size), rule: 'atLeast' },
@@ -200,7 +350,8 @@ export class StyleRegistry {
200
350
  b: level.fontWeight >= 600,
201
351
  i: level.italic,
202
352
  caps: level.textTransform === 'uppercase' || undefined,
203
- color: hex(level.color),
353
+ // A heading the design sets in white on a band keeps the paper's ink.
354
+ color: paleOnWhite(hex(level.color)) ? undefined : hex(level.color),
204
355
  spacing: level.letterSpacing.value ? twips(u, level.letterSpacing, size) : undefined,
205
356
  sz: halfPoints(u, level.fontSize, this.bodyPx),
206
357
  },
@@ -210,6 +361,14 @@ export class StyleRegistry {
210
361
  if (level.level < 1 || level.level > 6)
211
362
  return;
212
363
  const { pPr: p, rPr: r } = this.headingProps(level, this.resolved.headings.textAlign);
364
+ // A level that opens a page (chapters) keeps it in Word, so a heading
365
+ // the user adds there opens one too (#1444). The writer also starts a
366
+ // section at each such heading, for the side and the opener's header;
367
+ // a paragraph at the top of a new section's page breaks nothing more.
368
+ // The engine drops a heading's space above at the top of a page, where
369
+ // a heading that opens one always stands.
370
+ if (level.breakBefore.enabled)
371
+ Object.assign(p, { pageBreakBefore: true, before: 0 });
213
372
  this.add(`Heading${level.level}`, { type: 'paragraph', name: `heading ${level.level}`, basedOn: STYLE.normal, next: STYLE.normal, pPr: p, rPr: r });
214
373
  }
215
374
  /** The style of a heading: its level's, or the named heading style's
@@ -228,6 +387,17 @@ export class StyleRegistry {
228
387
  if (levelConfig) {
229
388
  const merged = { ...levelConfig, ...hs.overrides };
230
389
  const { pPr: p, rPr: r } = this.headingProps(merged, this.resolved.headings.textAlign);
390
+ // A style that opens a page (a cover, a half-title, a title page)
391
+ // keeps it in Word, so a run of such headings in one chapter does
392
+ // not pile up on one page (#1444). A chapter's first heading is at
393
+ // the top of its section's page already, where the break adds none.
394
+ // A style that does not break (a second article set under the end
395
+ // of the first) cancels its level's break.
396
+ const breaks = hs.breakBefore?.enabled ?? levelConfig.breakBefore.enabled;
397
+ if (breaks || levelConfig.breakBefore.enabled)
398
+ p.pageBreakBefore = breaks;
399
+ if (breaks)
400
+ p.before = 0;
231
401
  this.add(id, { type: 'paragraph', name: `Heading ${lv}: ${hs.name || hs.id}`, custom: true, basedOn: base, next: STYLE.normal, pPr: p, rPr: r });
232
402
  }
233
403
  else
@@ -235,41 +405,75 @@ export class StyleRegistry {
235
405
  }
236
406
  return id;
237
407
  }
408
+ /** Word's own style of a contents or index entry at `level` (1–9):
409
+ * `toc N` / `index N`, the names Word applies when it updates the
410
+ * field. A contents level takes its entry's look from the config
411
+ * (#1444), its page-number tab (`endTwips`) and, by how its entries
412
+ * are numbered, its number column; an index level is indented one step
413
+ * further. */
414
+ listing(kind, level, endTwips, numbering) {
415
+ const lv = Math.min(9, Math.max(1, level));
416
+ const id = kind === 'toc' ? `TOC${lv}` : `Index${lv}`;
417
+ if (this.defs.has(id))
418
+ return id;
419
+ const look = kind === 'toc' ? tocLevelLook(this.resolved, this.units, (f, w, i) => this.font(f, w, i), lv, endTwips, numbering) : { pPr: { before: 0, after: 0, ind: { left: lv * 240, hanging: 240 }, jc: 'left' } };
420
+ return this.add(id, { type: 'paragraph', name: `${kind} ${lv}`, basedOn: STYLE.normal, next: STYLE.normal, ...look });
421
+ }
422
+ /** Word's own style of an index letter head (`index heading`), bold and
423
+ * a line above, set apart from the entries before. */
424
+ indexHeading() {
425
+ return this.add('IndexHeading', { type: 'paragraph', name: 'index heading', basedOn: STYLE.normal, next: 'Index1', pPr: { before: 240, after: 0, keepNext: true, ind: { firstLine: 0 }, jc: 'left' }, rPr: { b: true } });
426
+ }
238
427
  /** The Word style of a named paragraph style (`:::paragraphs{style}`). */
239
428
  paragraphStyle(name) {
240
429
  const ps = this.resolved.paragraphStyles.find((s) => s.id === name || s.name === name);
241
430
  if (!ps)
242
431
  return undefined;
243
432
  const { id, fresh } = this.idFor(`para:${ps.id}`, 'PostextPara', ps.id);
433
+ const look = () => ({ type: 'paragraph', name: ps.name || ps.id, custom: true, basedOn: STYLE.normal, ...paragraphStyleLook(this.units, this.bodyPx, (f, w, i) => this.font(f, w, i), ps) });
244
434
  if (fresh)
245
- this.add(id, this.paragraphDef(ps));
435
+ this.add(this.ink(this.face(id, ps.fontFamily, ps.fontWeight, ps.italic), ps.color, ps.boldColor ?? this.resolved.bodyText.boldColor, ps.italicColor ?? this.resolved.bodyText.italicColor), look());
246
436
  return id;
247
437
  }
248
- paragraphDef(ps) {
249
- const u = this.units;
250
- const size = px(u, ps.fontSize, this.bodyPx);
251
- return {
252
- type: 'paragraph',
253
- name: ps.name || ps.id,
254
- custom: true,
255
- basedOn: STYLE.normal,
256
- pPr: {
257
- before: twips(u, ps.marginTop, size),
258
- after: twips(u, ps.spaceBetween, size),
259
- line: { twips: twips(u, ps.lineHeight, size), rule: 'atLeast' },
260
- ind: { left: twips(u, ps.indent, size), right: ps.endIndent ? twips(u, ps.endIndent, size) : undefined, firstLine: twips(u, ps.firstLineIndent, size), hanging: twips(u, ps.hangingIndent, size) || undefined },
261
- jc: JC[ps.textAlign],
262
- },
263
- rPr: {
264
- ...this.font(ps.fontFamily, ps.fontWeight, ps.italic),
265
- i: ps.italic,
266
- smallCaps: ps.smallCaps || undefined,
267
- caps: ps.textTransform === 'uppercase' || undefined,
268
- color: hex(ps.color),
269
- spacing: ps.letterSpacing ? twips(u, ps.letterSpacing, size) : undefined,
270
- sz: halfPoints(u, ps.fontSize, this.bodyPx),
271
- },
272
- };
438
+ /** The list paragraph style of a box's text style (#1444): its items
439
+ * set in the box's face, size, leading and colour, as the engine sets
440
+ * a list in a box, not in the body's. */
441
+ boxList(body) {
442
+ if (body === STYLE.normal || !this.defs.has(body))
443
+ return STYLE.list;
444
+ const { id, fresh } = this.idFor(`list:${body}`, 'PostextList', body.replace(/^Postext/, ''));
445
+ if (!fresh)
446
+ return id;
447
+ const face = this.faces.get(body);
448
+ if (face)
449
+ this.faces.set(id, face);
450
+ const ink = this.inks.get(body);
451
+ if (ink)
452
+ this.inks.set(id, ink);
453
+ return this.add(id, { type: 'paragraph', name: `List: ${this.defs.get(body).name}`, custom: true, basedOn: body, pPr: { contextualSpacing: true, ind: { firstLine: 0 } } });
454
+ }
455
+ /** The leading of a paragraph style, twips: its own or the style's it is
456
+ * based on (Normal's at the end of the chain). */
457
+ lineOf(style) {
458
+ for (let id = style ?? STYLE.normal, n = 0; id && n < 8; n++) {
459
+ const def = this.defs.get(id);
460
+ if (def?.pPr?.line)
461
+ return def.pPr.line.twips;
462
+ id = def?.basedOn ?? (id === STYLE.normal ? '' : STYLE.normal);
463
+ }
464
+ return undefined;
465
+ }
466
+ /** A paragraph style of the writer's own, made once per `key` (a heading
467
+ * design's text, a box's label tab): `make` gives its look. */
468
+ custom(key, name, make) {
469
+ const { id, fresh } = this.idFor(`custom:${key}`, 'Postext', name);
470
+ // Two looks of one element (sizes fitted to different titles) get ids
471
+ // …title and …title2; the names differ the same way, since LibreOffice
472
+ // keys styles by name and would merge them.
473
+ const n = id.slice(`Postext${slug(name)}`.length);
474
+ if (fresh)
475
+ this.add(id, { type: 'paragraph', name: `Postext ${name}${n ? ` ${n}` : ''}`, custom: true, basedOn: STYLE.normal, next: STYLE.normal, ...make() });
476
+ return id;
273
477
  }
274
478
  /** The box style named by a callout's `type`. */
275
479
  callout(type) {
@@ -287,12 +491,18 @@ export class StyleRegistry {
287
491
  if (body.fresh) {
288
492
  const size = px(u, b.fontSize, this.bodyPx);
289
493
  const after = b.paragraphSpacing === false ? 0 : b.paragraphSpacing === true ? twips(u, b.lineHeight, size) : twips(u, b.paragraphSpacing, size);
290
- this.add(body.id, {
494
+ this.add(this.ink(this.face(body.id, b.fontFamily, b.fontWeight, b.italic), b.color, b.boldColor ?? this.resolved.bodyText.boldColor, b.italicColor ?? this.resolved.bodyText.italicColor), {
291
495
  type: 'paragraph',
292
496
  name: `Box: ${style.name || style.id}`,
293
497
  custom: true,
294
498
  basedOn: STYLE.normal,
295
- pPr: { after, line: { twips: twips(u, b.lineHeight, size), rule: 'atLeast' }, ind: { firstLine: twips(u, b.firstLineIndent, size) }, jc: b.textAlign === 'justify' ? 'both' : 'left' },
499
+ pPr: {
500
+ suppressAutoHyphens: !b.hyphenation || undefined,
501
+ after,
502
+ line: { twips: twips(u, b.lineHeight, size), rule: 'atLeast' },
503
+ ind: boxBodyIndent(u, b, size),
504
+ jc: b.textAlign === 'justify' ? 'both' : 'left',
505
+ },
296
506
  rPr: {
297
507
  ...this.font(b.fontFamily, b.fontWeight, b.italic),
298
508
  i: b.italic,
@@ -311,7 +521,7 @@ export class StyleRegistry {
311
521
  name: `Box title: ${style.name || style.id}`,
312
522
  custom: true,
313
523
  basedOn: STYLE.boxTitle,
314
- pPr: { after: twips(u, t.gap, size), line: { twips: twips(u, t.lineHeight, size), rule: 'atLeast' }, ind: { left: twips(u, t.indent, size), firstLine: 0 } },
524
+ pPr: { suppressAutoHyphens: true, after: twips(u, t.gap, size), line: { twips: twips(u, t.lineHeight, size), rule: 'atLeast' }, ind: { left: twips(u, t.indent, size), firstLine: 0 } },
315
525
  rPr: {
316
526
  ...this.font(t.fontFamily, t.fontWeight, t.italic),
317
527
  b: t.fontWeight >= 600,
@@ -327,7 +537,11 @@ export class StyleRegistry {
327
537
  }
328
538
  docDefaults(lang) {
329
539
  const l = lang ? `<w:lang w:val="${escapeAttr(lang)}" w:eastAsia="${escapeAttr(lang)}" w:bidi="${escapeAttr(lang)}"/>` : '';
330
- return `<w:docDefaults><w:rPrDefault><w:rPr>${l}</w:rPr></w:rPrDefault><w:pPrDefault><w:pPr/></w:pPrDefault></w:docDefaults>`;
540
+ // Vertical text keeps no widow or orphan control: Word applies none
541
+ // unless asked, while LibreOffice applies it by default and, in a
542
+ // tbRl section, drops the lines it moves to the next page (#1444).
543
+ const p = this.resolved.layout.writingMode === 'vertical-rl' ? '<w:pPr><w:widowControl w:val="0"/></w:pPr>' : '<w:pPr/>';
544
+ return `<w:docDefaults><w:rPrDefault><w:rPr>${l}</w:rPr></w:rPrDefault><w:pPrDefault>${p}</w:pPrDefault></w:docDefaults>`;
331
545
  }
332
546
  /** The `w:style` elements (after `w:docDefaults`). */
333
547
  xml() {