docx-wasm 0.4.20 → 0.4.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/dist/index.html +8 -0
  2. package/dist/index.js +32 -0
  3. package/dist/node/builder.js +18 -9
  4. package/dist/node/builder.js.map +1 -1
  5. package/dist/node/carriage-return.d.ts +2 -0
  6. package/dist/node/carriage-return.js +7 -0
  7. package/dist/node/carriage-return.js.map +1 -0
  8. package/dist/node/delete.js +17 -7
  9. package/dist/node/delete.js.map +1 -1
  10. package/dist/node/footer.js.map +1 -1
  11. package/dist/node/header.js.map +1 -1
  12. package/dist/node/hyperlink.js +17 -7
  13. package/dist/node/hyperlink.js.map +1 -1
  14. package/dist/node/index.d.ts +2 -1
  15. package/dist/node/index.js +18 -7
  16. package/dist/node/index.js.map +1 -1
  17. package/dist/node/insert.js +17 -7
  18. package/dist/node/insert.js.map +1 -1
  19. package/dist/node/json/bindings/DrawingPosition.d.ts +2 -2
  20. package/dist/node/json/bindings/FieldChar.d.ts +2 -2
  21. package/dist/node/json/bindings/FontGroup.d.ts +2 -2
  22. package/dist/node/json/bindings/FontScheme.d.ts +2 -2
  23. package/dist/node/json/bindings/FontSchemeFont.d.ts +2 -2
  24. package/dist/node/json/bindings/FrameProperty.d.ts +50 -14
  25. package/dist/node/json/bindings/ImageData.d.ts +2 -2
  26. package/dist/node/json/bindings/InstrHyperlink.d.ts +2 -2
  27. package/dist/node/json/bindings/InstrToC.d.ts +11 -11
  28. package/dist/node/json/bindings/PageNumType.d.ts +4 -4
  29. package/dist/node/json/bindings/Pic.d.ts +23 -2
  30. package/dist/node/json/bindings/PositionalTab.d.ts +2 -2
  31. package/dist/node/json/bindings/Shape.d.ts +4 -4
  32. package/dist/node/json/bindings/Tab.d.ts +2 -2
  33. package/dist/node/json/bindings/TableCellBorder.d.ts +2 -2
  34. package/dist/node/json/bindings/TableCellBorderPosition.d.ts +1 -1
  35. package/dist/node/json/bindings/TableCellBorders.d.ts +4 -4
  36. package/dist/node/json/bindings/TablePositionProperty.d.ts +13 -10
  37. package/dist/node/json/bindings/Theme.d.ts +2 -2
  38. package/dist/node/json/index.d.ts +10 -0
  39. package/dist/node/json/index.js.map +1 -1
  40. package/dist/node/json/run.d.ts +4 -1
  41. package/dist/node/num-pages.js +17 -7
  42. package/dist/node/num-pages.js.map +1 -1
  43. package/dist/node/page-num.js +17 -7
  44. package/dist/node/page-num.js.map +1 -1
  45. package/dist/node/paragraph-property.d.ts +1 -1
  46. package/dist/node/paragraph-property.js +17 -7
  47. package/dist/node/paragraph-property.js.map +1 -1
  48. package/dist/node/pkg/docx_wasm.d.ts +1069 -810
  49. package/dist/node/pkg/docx_wasm.js +4114 -3959
  50. package/dist/node/pkg/docx_wasm_bg.wasm +0 -0
  51. package/dist/node/pkg/docx_wasm_bg.wasm.d.ts +274 -261
  52. package/dist/node/run-property.d.ts +1 -1
  53. package/dist/node/run-property.js +17 -7
  54. package/dist/node/run-property.js.map +1 -1
  55. package/dist/node/run.d.ts +3 -1
  56. package/dist/node/run.js +25 -7
  57. package/dist/node/run.js.map +1 -1
  58. package/dist/node/section-property.js +1 -1
  59. package/dist/node/section-property.js.map +1 -1
  60. package/dist/node/style.js +17 -7
  61. package/dist/node/style.js.map +1 -1
  62. package/dist/node/tab-leader.js +17 -7
  63. package/dist/node/tab-leader.js.map +1 -1
  64. package/dist/node/table-cell-borders.js.map +1 -1
  65. package/dist/node/table-cell.js +17 -7
  66. package/dist/node/table-cell.js.map +1 -1
  67. package/dist/node/table-of-contents-item.js +17 -7
  68. package/dist/node/table-of-contents-item.js.map +1 -1
  69. package/dist/node/table-of-contents.js +17 -7
  70. package/dist/node/table-of-contents.js.map +1 -1
  71. package/dist/node/table-row.js.map +1 -1
  72. package/dist/node/table.d.ts +1 -1
  73. package/dist/node/table.js +17 -7
  74. package/dist/node/table.js.map +1 -1
  75. package/dist/web/builder.js.map +1 -1
  76. package/dist/web/carriage-return.d.ts +2 -0
  77. package/dist/web/carriage-return.js +3 -0
  78. package/dist/web/carriage-return.js.map +1 -0
  79. package/dist/web/delete.js.map +1 -1
  80. package/dist/web/footer.js.map +1 -1
  81. package/dist/web/header.js.map +1 -1
  82. package/dist/web/hyperlink.js.map +1 -1
  83. package/dist/web/index.d.ts +2 -1
  84. package/dist/web/index.js +1 -0
  85. package/dist/web/index.js.map +1 -1
  86. package/dist/web/insert.js.map +1 -1
  87. package/dist/web/js/abstract-numbering.d.ts +7 -0
  88. package/dist/web/js/bookmark-end.d.ts +4 -0
  89. package/dist/web/js/bookmark-start.d.ts +5 -0
  90. package/dist/web/js/border.d.ts +1 -0
  91. package/dist/web/js/break.d.ts +5 -0
  92. package/dist/web/js/builder.d.ts +7 -0
  93. package/dist/web/js/carriage-return.d.ts +2 -0
  94. package/dist/web/js/comment-end.d.ts +4 -0
  95. package/dist/web/js/comment.d.ts +14 -0
  96. package/dist/web/js/delete-text.d.ts +4 -0
  97. package/dist/web/js/delete.d.ts +11 -0
  98. package/dist/web/js/doc-defaults.d.ts +10 -0
  99. package/dist/web/js/doc-props.d.ts +10 -0
  100. package/dist/web/js/footer.d.ts +8 -0
  101. package/dist/web/js/header.d.ts +8 -0
  102. package/dist/web/js/hyperlink.d.ts +22 -0
  103. package/dist/web/js/image.d.ts +15 -0
  104. package/dist/web/js/index.d.ts +119 -0
  105. package/dist/web/js/insert.d.ts +11 -0
  106. package/dist/web/js/json/bindings/AlignmentType.d.ts +1 -0
  107. package/dist/web/js/json/bindings/Bold.d.ts +1 -0
  108. package/dist/web/js/json/bindings/BoldCs.d.ts +1 -0
  109. package/dist/web/js/json/bindings/BorderType.d.ts +1 -0
  110. package/dist/web/js/json/bindings/Break.d.ts +4 -0
  111. package/dist/web/js/json/bindings/BreakType.d.ts +1 -0
  112. package/dist/web/js/json/bindings/Caps.d.ts +1 -0
  113. package/dist/web/js/json/bindings/CharacterSpacing.d.ts +1 -0
  114. package/dist/web/js/json/bindings/Color.d.ts +1 -0
  115. package/dist/web/js/json/bindings/Comment.d.ts +7 -0
  116. package/dist/web/js/json/bindings/CommentRangeEnd.d.ts +3 -0
  117. package/dist/web/js/json/bindings/CommentRangeStart.d.ts +5 -0
  118. package/dist/web/js/json/bindings/Delete.d.ts +6 -0
  119. package/dist/web/js/json/bindings/DeleteChild.d.ts +10 -0
  120. package/dist/web/js/json/bindings/DeleteText.d.ts +4 -0
  121. package/dist/web/js/json/bindings/DrawingPosition.d.ts +6 -0
  122. package/dist/web/js/json/bindings/DrawingPositionType.d.ts +1 -0
  123. package/dist/web/js/json/bindings/FieldChar.d.ts +5 -0
  124. package/dist/web/js/json/bindings/FieldCharType.d.ts +1 -0
  125. package/dist/web/js/json/bindings/FitText.d.ts +4 -0
  126. package/dist/web/js/json/bindings/FontGroup.d.ts +7 -0
  127. package/dist/web/js/json/bindings/FontScheme.d.ts +5 -0
  128. package/dist/web/js/json/bindings/FontSchemeFont.d.ts +4 -0
  129. package/dist/web/js/json/bindings/FooterReference.d.ts +4 -0
  130. package/dist/web/js/json/bindings/FrameProperty.d.ts +50 -0
  131. package/dist/web/js/json/bindings/HeaderReference.d.ts +4 -0
  132. package/dist/web/js/json/bindings/Highlight.d.ts +1 -0
  133. package/dist/web/js/json/bindings/HyperlinkType.d.ts +1 -0
  134. package/dist/web/js/json/bindings/ImageData.d.ts +3 -0
  135. package/dist/web/js/json/bindings/Insert.d.ts +5 -0
  136. package/dist/web/js/json/bindings/InsertChild.d.ts +13 -0
  137. package/dist/web/js/json/bindings/InstrHyperlink.d.ts +4 -0
  138. package/dist/web/js/json/bindings/InstrPAGEREF.d.ts +5 -0
  139. package/dist/web/js/json/bindings/InstrTC.d.ts +6 -0
  140. package/dist/web/js/json/bindings/InstrText.d.ts +15 -0
  141. package/dist/web/js/json/bindings/InstrToC.d.ts +19 -0
  142. package/dist/web/js/json/bindings/Italic.d.ts +1 -0
  143. package/dist/web/js/json/bindings/ItalicCs.d.ts +1 -0
  144. package/dist/web/js/json/bindings/PageNumType.d.ts +4 -0
  145. package/dist/web/js/json/bindings/Pic.d.ts +46 -0
  146. package/dist/web/js/json/bindings/PicAlign.d.ts +1 -0
  147. package/dist/web/js/json/bindings/PositionalTab.d.ts +8 -0
  148. package/dist/web/js/json/bindings/PositionalTabAlignmentType.d.ts +1 -0
  149. package/dist/web/js/json/bindings/PositionalTabRelativeTo.d.ts +1 -0
  150. package/dist/web/js/json/bindings/RelativeFromHType.d.ts +1 -0
  151. package/dist/web/js/json/bindings/RelativeFromVType.d.ts +1 -0
  152. package/dist/web/js/json/bindings/Run.d.ts +5 -0
  153. package/dist/web/js/json/bindings/RunFonts.d.ts +11 -0
  154. package/dist/web/js/json/bindings/RunProperty.d.ts +44 -0
  155. package/dist/web/js/json/bindings/RunStyle.d.ts +1 -0
  156. package/dist/web/js/json/bindings/Shape.d.ts +5 -0
  157. package/dist/web/js/json/bindings/SpecVanish.d.ts +1 -0
  158. package/dist/web/js/json/bindings/Strike.d.ts +1 -0
  159. package/dist/web/js/json/bindings/StyleWithLevel.d.ts +1 -0
  160. package/dist/web/js/json/bindings/Sym.d.ts +4 -0
  161. package/dist/web/js/json/bindings/Sz.d.ts +1 -0
  162. package/dist/web/js/json/bindings/SzCs.d.ts +1 -0
  163. package/dist/web/js/json/bindings/Tab.d.ts +7 -0
  164. package/dist/web/js/json/bindings/TabLeaderType.d.ts +1 -0
  165. package/dist/web/js/json/bindings/TabValueType.d.ts +1 -0
  166. package/dist/web/js/json/bindings/TableCellBorder.d.ts +9 -0
  167. package/dist/web/js/json/bindings/TableCellBorderPosition.d.ts +1 -0
  168. package/dist/web/js/json/bindings/TableCellBorders.d.ts +11 -0
  169. package/dist/web/js/json/bindings/TablePositionProperty.d.ts +13 -0
  170. package/dist/web/js/json/bindings/Text.d.ts +4 -0
  171. package/dist/web/js/json/bindings/TextAlignmentType.d.ts +1 -0
  172. package/dist/web/js/json/bindings/TextBorder.d.ts +7 -0
  173. package/dist/web/js/json/bindings/Theme.d.ts +4 -0
  174. package/dist/web/js/json/bindings/Underline.d.ts +1 -0
  175. package/dist/web/js/json/bindings/Vanish.d.ts +1 -0
  176. package/dist/web/js/json/bindings/VertAlign.d.ts +1 -0
  177. package/dist/web/js/json/border.d.ts +7 -0
  178. package/dist/web/js/json/comment.d.ts +22 -0
  179. package/dist/web/js/json/document.d.ts +11 -0
  180. package/dist/web/js/json/drawing.d.ts +45 -0
  181. package/dist/web/js/json/footer.d.ts +13 -0
  182. package/dist/web/js/json/header.d.ts +13 -0
  183. package/dist/web/js/json/indent.d.ts +11 -0
  184. package/dist/web/js/json/index.d.ts +88 -0
  185. package/dist/web/js/json/line_spacing.d.ts +8 -0
  186. package/dist/web/js/json/numbering.d.ts +35 -0
  187. package/dist/web/js/json/paragraph.d.ts +98 -0
  188. package/dist/web/js/json/run.d.ts +124 -0
  189. package/dist/web/js/json/section-property.d.ts +43 -0
  190. package/dist/web/js/json/shading.d.ts +5 -0
  191. package/dist/web/js/json/shape.d.ts +5 -0
  192. package/dist/web/js/json/structured-data-tag.d.ts +8 -0
  193. package/dist/web/js/json/styles.d.ts +28 -0
  194. package/dist/web/js/json/table.d.ts +101 -0
  195. package/dist/web/js/json/textbox-content.d.ts +6 -0
  196. package/dist/web/js/json/web-settings.d.ts +11 -0
  197. package/dist/web/js/level.d.ts +38 -0
  198. package/dist/web/js/num-pages.d.ts +4 -0
  199. package/dist/web/js/numbering.d.ts +8 -0
  200. package/dist/web/js/page-num.d.ts +4 -0
  201. package/dist/web/js/paragraph-property.d.ts +95 -0
  202. package/dist/web/js/paragraph.d.ts +70 -0
  203. package/dist/web/js/positional-tab.d.ts +12 -0
  204. package/dist/web/js/run-property.d.ts +91 -0
  205. package/dist/web/js/run.d.ts +44 -0
  206. package/dist/web/js/section-property.d.ts +61 -0
  207. package/dist/web/js/settings.d.ts +17 -0
  208. package/dist/web/js/shading.d.ts +8 -0
  209. package/dist/web/js/style.d.ts +69 -0
  210. package/dist/web/js/styles.d.ts +12 -0
  211. package/dist/web/js/tab-leader.d.ts +3 -0
  212. package/dist/web/js/tab.d.ts +2 -0
  213. package/dist/web/js/table-cell-border.d.ts +13 -0
  214. package/dist/web/js/table-cell-borders.d.ts +15 -0
  215. package/dist/web/js/table-cell.d.ts +61 -0
  216. package/dist/web/js/table-of-contents-item.d.ts +12 -0
  217. package/dist/web/js/table-of-contents.d.ts +46 -0
  218. package/dist/web/js/table-row.d.ts +21 -0
  219. package/dist/web/js/table.d.ts +85 -0
  220. package/dist/web/js/tc.d.ts +10 -0
  221. package/dist/web/js/text.d.ts +4 -0
  222. package/dist/web/js/webextension.d.ts +12 -0
  223. package/dist/web/json/bindings/DrawingPosition.d.ts +2 -2
  224. package/dist/web/json/bindings/FieldChar.d.ts +2 -2
  225. package/dist/web/json/bindings/FontGroup.d.ts +2 -2
  226. package/dist/web/json/bindings/FontScheme.d.ts +2 -2
  227. package/dist/web/json/bindings/FontSchemeFont.d.ts +2 -2
  228. package/dist/web/json/bindings/FrameProperty.d.ts +50 -14
  229. package/dist/web/json/bindings/ImageData.d.ts +2 -2
  230. package/dist/web/json/bindings/InstrHyperlink.d.ts +2 -2
  231. package/dist/web/json/bindings/InstrToC.d.ts +11 -11
  232. package/dist/web/json/bindings/PageNumType.d.ts +4 -4
  233. package/dist/web/json/bindings/Pic.d.ts +23 -2
  234. package/dist/web/json/bindings/PositionalTab.d.ts +2 -2
  235. package/dist/web/json/bindings/Shape.d.ts +4 -4
  236. package/dist/web/json/bindings/Tab.d.ts +2 -2
  237. package/dist/web/json/bindings/TableCellBorder.d.ts +2 -2
  238. package/dist/web/json/bindings/TableCellBorderPosition.d.ts +1 -1
  239. package/dist/web/json/bindings/TableCellBorders.d.ts +4 -4
  240. package/dist/web/json/bindings/TablePositionProperty.d.ts +13 -10
  241. package/dist/web/json/bindings/Theme.d.ts +2 -2
  242. package/dist/web/json/index.d.ts +10 -0
  243. package/dist/web/json/index.js.map +1 -1
  244. package/dist/web/json/run.d.ts +4 -1
  245. package/dist/web/paragraph-property.d.ts +1 -1
  246. package/dist/web/paragraph-property.js.map +1 -1
  247. package/dist/web/pkg/docx_wasm.d.ts +1069 -810
  248. package/dist/web/pkg/docx_wasm.js +7 -2
  249. package/dist/web/pkg/docx_wasm_bg.js +3947 -3870
  250. package/dist/web/pkg/docx_wasm_bg.wasm +0 -0
  251. package/dist/web/pkg/docx_wasm_bg.wasm.d.ts +274 -261
  252. package/dist/web/pkg/package.json +2 -1
  253. package/dist/web/run-property.d.ts +1 -1
  254. package/dist/web/run-property.js.map +1 -1
  255. package/dist/web/run.d.ts +3 -1
  256. package/dist/web/run.js +8 -0
  257. package/dist/web/run.js.map +1 -1
  258. package/dist/web/section-property.js +1 -1
  259. package/dist/web/section-property.js.map +1 -1
  260. package/dist/web/style.js.map +1 -1
  261. package/dist/web/tab-leader.js.map +1 -1
  262. package/dist/web/table-cell-borders.js.map +1 -1
  263. package/dist/web/table-cell.js.map +1 -1
  264. package/dist/web/table-of-contents-item.js.map +1 -1
  265. package/dist/web/table-of-contents.js.map +1 -1
  266. package/dist/web/table-row.js.map +1 -1
  267. package/dist/web/table.d.ts +1 -1
  268. package/dist/web/table.js.map +1 -1
  269. package/js/carriage-return.ts +1 -0
  270. package/js/index.ts +1 -0
  271. package/js/json/bindings/AlignmentType.ts +1 -1
  272. package/js/json/bindings/BorderType.ts +1 -1
  273. package/js/json/bindings/DrawingPosition.ts +1 -1
  274. package/js/json/bindings/DrawingPositionType.ts +1 -1
  275. package/js/json/bindings/FieldChar.ts +1 -1
  276. package/js/json/bindings/FieldCharType.ts +1 -1
  277. package/js/json/bindings/FontGroup.ts +1 -1
  278. package/js/json/bindings/FontScheme.ts +1 -1
  279. package/js/json/bindings/FontSchemeFont.ts +1 -1
  280. package/js/json/bindings/FrameProperty.ts +46 -1
  281. package/js/json/bindings/HyperlinkType.ts +1 -1
  282. package/js/json/bindings/ImageData.ts +1 -1
  283. package/js/json/bindings/InstrHyperlink.ts +1 -1
  284. package/js/json/bindings/InstrToC.ts +1 -1
  285. package/js/json/bindings/PageNumType.ts +1 -1
  286. package/js/json/bindings/Pic.ts +26 -1
  287. package/js/json/bindings/PicAlign.ts +1 -1
  288. package/js/json/bindings/PositionalTab.ts +1 -1
  289. package/js/json/bindings/PositionalTabAlignmentType.ts +1 -1
  290. package/js/json/bindings/PositionalTabRelativeTo.ts +1 -1
  291. package/js/json/bindings/RelativeFromHType.ts +1 -1
  292. package/js/json/bindings/RelativeFromVType.ts +1 -1
  293. package/js/json/bindings/Shape.ts +1 -1
  294. package/js/json/bindings/StyleWithLevel.ts +1 -1
  295. package/js/json/bindings/Tab.ts +1 -1
  296. package/js/json/bindings/TabLeaderType.ts +1 -1
  297. package/js/json/bindings/TabValueType.ts +1 -1
  298. package/js/json/bindings/TableCellBorder.ts +1 -1
  299. package/js/json/bindings/TableCellBorderPosition.ts +1 -1
  300. package/js/json/bindings/TableCellBorders.ts +1 -1
  301. package/js/json/bindings/TablePositionProperty.ts +4 -1
  302. package/js/json/bindings/TextAlignmentType.ts +1 -1
  303. package/js/json/bindings/Theme.ts +1 -1
  304. package/js/json/index.ts +10 -1
  305. package/js/json/run.ts +5 -0
  306. package/js/run.ts +9 -0
  307. package/js/section-property.ts +1 -1
  308. package/package.json +17 -8
@@ -1,876 +1,1135 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function createHyperlink(v: string, t: HyperlinkType): Hyperlink;
4
- export function createPositionalTab(alignment: PositionalTabAlignmentType, relative_to: PositionalTabRelativeTo, leader: TabLeaderType): PositionalTab;
5
- export function createTableCell(): TableCell;
6
- export function createTablePosition(): TablePositionProperty;
7
- export function createWebExtension(id: string, reference_id: string, version: string, store: string, store_type: string): WebExtension;
8
- export function createLineSpacing(): LineSpacing;
9
- export function createStyle(style_id: string, style_type: StyleType): Style;
10
- export function createDocx(): Docx;
11
- export function createRunFonts(): RunFonts;
12
- export function createFrameProperty(): FrameProperty;
13
- export function createLevelOverride(level: number): LevelOverride;
14
- export function createNumbering(id: number, abstract_num_id: number): Numbering;
15
- export function createParagraphPropertyChange(): ParagraphPropertyChange;
16
- export function createParagraphProperty(): ParagraphProperty;
17
- export function createPageMargin(): PageMargin;
18
- export function createHeader(): Header;
19
- export function createParagraph(): Paragraph;
20
- export function createPic(buf: Uint8Array): Pic;
21
- export function createAbstractNumbering(id: number): AbstractNumbering;
22
- export function createDelete(run: Run): Delete;
23
- export function createPageNum(): PageNum;
24
- export function createFooter(): Footer;
25
- export function readDocx(buf: Uint8Array): string;
26
- export function readXML(xml: string): string;
27
- export function createRunProperty(): RunProperty;
28
- export function createNumPages(): NumPages;
29
- export function createPageNumType(start?: number | null, chap_style?: string | null): PageNumType;
30
- export function createRun(): Run;
31
- export function createTableCellBorder(position: TableCellBorderPosition): TableCellBorder;
32
- export function createTableOfContentsItem(): TableOfContentsItem;
33
- export function createTableRow(): TableRow;
34
- export function createComment(id: number): Comment;
35
- export function createInsert(run: Run): Insert;
36
- export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
37
- export function createTable(): Table;
38
- export function createTableOfContents(): TableOfContents;
39
- export function createTableOfContentsWithInstrText(s: string): TableOfContents;
40
- export enum AlignmentType {
41
- Both = 0,
42
- Center = 1,
43
- Distribute = 2,
44
- Start = 3,
45
- End = 4,
46
- Left = 5,
47
- Right = 6,
48
- Justified = 7,
3
+
4
+ export class AbstractNumbering {
5
+ private constructor();
6
+ free(): void;
7
+ [Symbol.dispose](): void;
8
+ add_level(level: Level): AbstractNumbering;
49
9
  }
10
+
11
+ export enum AlignmentType {
12
+ Both = 0,
13
+ Center = 1,
14
+ Distribute = 2,
15
+ Start = 3,
16
+ End = 4,
17
+ Left = 5,
18
+ Right = 6,
19
+ Justified = 7,
20
+ }
21
+
50
22
  export enum BorderType {
51
- Nil = 0,
52
- None = 1,
53
- Single = 2,
54
- Thick = 3,
55
- Double = 4,
56
- Dotted = 5,
57
- Dashed = 6,
58
- DotDash = 7,
59
- DotDotDash = 8,
60
- Triple = 9,
61
- ThinThickSmallGap = 10,
62
- ThickThinSmallGap = 11,
63
- ThinThickThinSmallGap = 12,
64
- ThinThickMediumGap = 13,
65
- ThickThinMediumGap = 14,
66
- ThinThickThinMediumGap = 15,
67
- ThinThickLargeGap = 16,
68
- ThickThinLargeGap = 17,
69
- ThinThickThinLargeGap = 18,
70
- Wave = 19,
71
- DoubleWave = 20,
72
- DashSmallGap = 21,
73
- DashDotStroked = 22,
74
- ThreeDEmboss = 23,
75
- ThreeDEngrave = 24,
76
- Outset = 25,
77
- Inset = 26,
78
- Apples = 27,
79
- ArchedScallops = 28,
80
- BabyPacifier = 29,
81
- BabyRattle = 30,
82
- }
23
+ Nil = 0,
24
+ None = 1,
25
+ Single = 2,
26
+ Thick = 3,
27
+ Double = 4,
28
+ Dotted = 5,
29
+ Dashed = 6,
30
+ DotDash = 7,
31
+ DotDotDash = 8,
32
+ Triple = 9,
33
+ ThinThickSmallGap = 10,
34
+ ThickThinSmallGap = 11,
35
+ ThinThickThinSmallGap = 12,
36
+ ThinThickMediumGap = 13,
37
+ ThickThinMediumGap = 14,
38
+ ThinThickThinMediumGap = 15,
39
+ ThinThickLargeGap = 16,
40
+ ThickThinLargeGap = 17,
41
+ ThinThickThinLargeGap = 18,
42
+ Wave = 19,
43
+ DoubleWave = 20,
44
+ DashSmallGap = 21,
45
+ DashDotStroked = 22,
46
+ ThreeDEmboss = 23,
47
+ ThreeDEngrave = 24,
48
+ Outset = 25,
49
+ Inset = 26,
50
+ Apples = 27,
51
+ ArchedScallops = 28,
52
+ BabyPacifier = 29,
53
+ BabyRattle = 30,
54
+ }
55
+
83
56
  export enum BreakType {
84
- Page = 0,
85
- Column = 1,
86
- TextWrapping = 2,
87
- Unsupported = 3,
57
+ Page = 0,
58
+ Column = 1,
59
+ TextWrapping = 2,
60
+ Unsupported = 3,
88
61
  }
62
+
89
63
  export enum CharacterSpacingValues {
90
- DoNotCompress = 0,
91
- CompressPunctuation = 1,
92
- CompressPunctuationAndJapaneseKana = 2,
93
- Unsupported = 3,
64
+ DoNotCompress = 0,
65
+ CompressPunctuation = 1,
66
+ CompressPunctuationAndJapaneseKana = 2,
67
+ Unsupported = 3,
68
+ }
69
+
70
+ export class Comment {
71
+ private constructor();
72
+ free(): void;
73
+ [Symbol.dispose](): void;
74
+ add_paragraph(p: Paragraph): Comment;
75
+ author(author: string): Comment;
76
+ date(date: string): Comment;
77
+ id(): number;
78
+ parent_comment_id(id: number): Comment;
79
+ }
80
+
81
+ export class Delete {
82
+ private constructor();
83
+ free(): void;
84
+ [Symbol.dispose](): void;
85
+ author(author: string): Delete;
86
+ date(date: string): Delete;
94
87
  }
88
+
95
89
  export enum DocGridType {
96
- Default = 0,
97
- Lines = 1,
98
- LinesAndChars = 2,
99
- SnapToChars = 3,
90
+ Default = 0,
91
+ Lines = 1,
92
+ LinesAndChars = 2,
93
+ SnapToChars = 3,
100
94
  }
95
+
96
+ export class Docx {
97
+ private constructor();
98
+ free(): void;
99
+ [Symbol.dispose](): void;
100
+ add_abstract_numbering(num: AbstractNumbering): Docx;
101
+ add_bookmark_end(id: number): Docx;
102
+ add_bookmark_start(id: number, name: string): Docx;
103
+ add_custom_item(id: string, xml: string): Docx;
104
+ add_doc_var(name: string, val: string): Docx;
105
+ add_numbering(num: Numbering): Docx;
106
+ add_paragraph(p: Paragraph): Docx;
107
+ add_style(s: Style): Docx;
108
+ add_table(t: Table): Docx;
109
+ add_table_of_contents(t: TableOfContents): Docx;
110
+ build(has_numberings: boolean): Uint8Array;
111
+ character_spacing_control(v: CharacterSpacingValues): Docx;
112
+ comments_json(): string;
113
+ created_at(date: string): Docx;
114
+ custom_property(name: string, item: string): Docx;
115
+ default_fonts(font: RunFonts): Docx;
116
+ default_line_spacing(spacing: LineSpacing): Docx;
117
+ default_size(size: number): Docx;
118
+ default_spacing(spacing: number): Docx;
119
+ default_tab_stop(stop: number): Docx;
120
+ doc_grid(grid_type: DocGridType, line_pitch?: number | null, char_space?: number | null): Docx;
121
+ doc_id(id: string): Docx;
122
+ even_footer(footer: Footer): Docx;
123
+ even_header(header: Header): Docx;
124
+ first_footer(footer: Footer): Docx;
125
+ first_header(header: Header): Docx;
126
+ footer(footer: Footer): Docx;
127
+ header(header: Header): Docx;
128
+ json_with_update_comments(): string;
129
+ page_margin(margin: PageMargin): Docx;
130
+ page_num_type(p: PageNumType): Docx;
131
+ page_orient(o: PageOrientationType): Docx;
132
+ page_size(w: number, h: number): Docx;
133
+ set_adjust_line_height_in_table(): Docx;
134
+ taskpanes(): Docx;
135
+ title_pg(): Docx;
136
+ updated_at(date: string): Docx;
137
+ web_extension(ext: WebExtension): Docx;
138
+ }
139
+
101
140
  export enum DrawingPositionType {
102
- Anchor = 0,
103
- Inline = 1,
141
+ Anchor = 0,
142
+ Inline = 1,
104
143
  }
144
+
105
145
  export enum FieldCharType {
106
- Begin = 0,
107
- Separate = 1,
108
- End = 2,
109
- Unsupported = 3,
146
+ Begin = 0,
147
+ Separate = 1,
148
+ End = 2,
149
+ Unsupported = 3,
110
150
  }
151
+
111
152
  export enum FontPitchType {
112
- Default = 0,
113
- Fixed = 1,
114
- Variable = 2,
115
- }
116
- export enum HeightRule {
117
- Auto = 0,
118
- AtLeast = 1,
119
- Exact = 2,
120
- }
121
- export enum HyperlinkType {
122
- Anchor = 0,
123
- External = 1,
124
- }
125
- export enum LevelSuffixType {
126
- Nothing = 0,
127
- Space = 1,
128
- Tab = 2,
129
- }
130
- export enum LineSpacingType {
131
- Auto = 0,
132
- AtLeast = 1,
133
- Exact = 2,
134
- }
135
- export enum PageOrientationType {
136
- Landscape = 0,
137
- Portrait = 1,
138
- }
139
- export enum ParagraphBorderPosition {
140
- Left = 0,
141
- Right = 1,
142
- Top = 2,
143
- Bottom = 3,
144
- Between = 4,
145
- Bar = 5,
146
- }
147
- export enum PicAlign {
148
- Left = 0,
149
- Right = 1,
150
- Center = 2,
151
- Bottom = 3,
152
- Top = 4,
153
- }
154
- export enum PositionalTabAlignmentType {
155
- Center = 0,
156
- Left = 1,
157
- Right = 2,
158
- }
159
- export enum PositionalTabRelativeTo {
160
- Indent = 0,
161
- Margin = 1,
162
- }
163
- export enum RelativeFromHType {
164
- /**
165
- * Specifies that the horizontal positioning shall be
166
- * relative to the position of the anchor within its run
167
- * content.
168
- */
169
- Character = 0,
170
- /**
171
- * Specifies that the horizontal positioning shall be
172
- * relative to the extents of the column which contains its
173
- * anchor.
174
- */
175
- Column = 1,
176
- /**
177
- * Specifies that the horizontal positioning shall be
178
- * relative to the inside margin of the current page (the
179
- * left margin on odd pages, right on even pages).
180
- */
181
- InsideMargin = 2,
182
- /**
183
- * Specifies that the horizontal positioning shall be
184
- * relative to the left margin of the page.
185
- */
186
- LeftMargin = 3,
187
- /**
188
- * Specifies that the horizontal positioning shall be
189
- * relative to the page margins.
190
- */
191
- Margin = 4,
192
- /**
193
- * Specifies that the horizontal positioning shall be
194
- * relative to the outside margin of the current page (the
195
- * right margin on odd pages, left on even pages).
196
- */
197
- OutsizeMargin = 5,
198
- /**
199
- * Specifies that the horizontal positioning shall be
200
- * relative to the edge of the page.
201
- */
202
- Page = 6,
203
- /**
204
- * Specifies that the horizontal positioning shall be
205
- * relative to the right margin of the page.
206
- */
207
- RightMargin = 7,
208
- }
209
- export enum RelativeFromVType {
210
- BottomMargin = 0,
211
- InsideMargin = 1,
212
- Line = 2,
213
- Margin = 3,
214
- OutsizeMargin = 4,
215
- Page = 5,
216
- Paragraph = 6,
217
- TopMargin = 7,
218
- }
219
- export enum SectionType {
220
- NextPage = 0,
221
- NextColumn = 1,
222
- Continuous = 2,
223
- EvenPage = 3,
224
- OddPage = 4,
225
- }
226
- export enum ShdType {
227
- Nil = 0,
228
- Clear = 1,
229
- Solid = 2,
230
- HorzStripe = 3,
231
- VertStripe = 4,
232
- ReverseDiagStripe = 5,
233
- DiagStripe = 6,
234
- HorzCross = 7,
235
- DiagCross = 8,
236
- ThinHorzStripe = 9,
237
- ThinVertStripe = 10,
238
- ThinReverseDiagStripe = 11,
239
- ThinDiagStripe = 12,
240
- ThinHorzCross = 13,
241
- ThinDiagCross = 14,
242
- Pct5 = 15,
243
- Pct10 = 16,
244
- Pct12 = 17,
245
- Pct15 = 18,
246
- Pct20 = 19,
247
- Pct25 = 20,
248
- Pct30 = 21,
249
- Pct35 = 22,
250
- Pct37 = 23,
251
- Pct40 = 24,
252
- Pct45 = 25,
253
- Pct50 = 26,
254
- Pct55 = 27,
255
- Pct60 = 28,
256
- Pct62 = 29,
257
- Pct65 = 30,
258
- Pct70 = 31,
259
- Pct75 = 32,
260
- Pct80 = 33,
261
- Pct85 = 34,
262
- Pct87 = 35,
263
- Pct90 = 36,
264
- Pct95 = 37,
265
- }
266
- export enum SpecialIndentKind {
267
- FirstLine = 0,
268
- Hanging = 1,
269
- }
270
- export enum StyleType {
271
- Paragraph = 0,
272
- Character = 1,
273
- Numbering = 2,
274
- Table = 3,
275
- Unsupported = 4,
276
- }
277
- export enum TabLeaderType {
278
- Dot = 0,
279
- Heavy = 1,
280
- Hyphen = 2,
281
- MiddleDot = 3,
282
- None = 4,
283
- Underscore = 5,
284
- }
285
- export enum TabValueType {
286
- Bar = 0,
287
- Center = 1,
288
- Clear = 2,
289
- Decimal = 3,
290
- End = 4,
291
- Right = 5,
292
- Num = 6,
293
- Start = 7,
294
- Left = 8,
295
- }
296
- export enum TableAlignmentType {
297
- Center = 0,
298
- Left = 1,
299
- Right = 2,
300
- }
301
- export enum TableBorderPosition {
302
- Left = 0,
303
- Right = 1,
304
- Top = 2,
305
- Bottom = 3,
306
- InsideH = 4,
307
- InsideV = 5,
308
- }
309
- export enum TableCellBorderPosition {
310
- Left = 0,
311
- Right = 1,
312
- Top = 2,
313
- Bottom = 3,
314
- InsideH = 4,
315
- InsideV = 5,
316
- Tl2br = 6,
317
- Tr2bl = 7,
318
- }
319
- export enum TableLayoutType {
320
- Fixed = 0,
321
- Autofit = 1,
322
- }
323
- export enum TextAlignmentType {
324
- Auto = 0,
325
- Baseline = 1,
326
- Bottom = 2,
327
- Center = 3,
328
- Top = 4,
329
- }
330
- export enum TextDirectionType {
331
- Lr = 0,
332
- LrV = 1,
333
- Rl = 2,
334
- RlV = 3,
335
- Tb = 4,
336
- TbV = 5,
337
- TbRlV = 6,
338
- TbRl = 7,
339
- BtLr = 8,
340
- LrTbV = 9,
341
- }
342
- export enum VAlignType {
343
- Top = 0,
344
- Center = 1,
345
- Bottom = 2,
346
- Unsupported = 3,
347
- }
348
- export enum VMergeType {
349
- Continue = 0,
350
- Restart = 1,
351
- Unsupported = 2,
352
- }
353
- export enum VertAlignType {
354
- Baseline = 0,
355
- SuperScript = 1,
356
- SubScript = 2,
357
- Unsupported = 3,
358
- }
359
- export enum WidthType {
360
- Dxa = 0,
361
- Auto = 1,
362
- Pct = 2,
363
- Nil = 3,
364
- Unsupported = 4,
365
- }
366
- export class AbstractNumbering {
367
- private constructor();
368
- free(): void;
369
- add_level(level: Level): AbstractNumbering;
370
- }
371
- export class Comment {
372
- private constructor();
373
- free(): void;
374
- author(author: string): Comment;
375
- date(date: string): Comment;
376
- add_paragraph(p: Paragraph): Comment;
377
- parent_comment_id(id: number): Comment;
378
- id(): number;
379
- }
380
- export class Delete {
381
- private constructor();
382
- free(): void;
383
- author(author: string): Delete;
384
- date(date: string): Delete;
385
- }
386
- export class Docx {
387
- private constructor();
388
- free(): void;
389
- add_paragraph(p: Paragraph): Docx;
390
- add_table_of_contents(t: TableOfContents): Docx;
391
- add_bookmark_start(id: number, name: string): Docx;
392
- add_bookmark_end(id: number): Docx;
393
- add_table(t: Table): Docx;
394
- add_abstract_numbering(num: AbstractNumbering): Docx;
395
- add_numbering(num: Numbering): Docx;
396
- created_at(date: string): Docx;
397
- updated_at(date: string): Docx;
398
- custom_property(name: string, item: string): Docx;
399
- doc_id(id: string): Docx;
400
- add_doc_var(name: string, val: string): Docx;
401
- default_tab_stop(stop: number): Docx;
402
- set_adjust_line_height_in_table(): Docx;
403
- character_spacing_control(v: CharacterSpacingValues): Docx;
404
- header(header: Header): Docx;
405
- first_header(header: Header): Docx;
406
- even_header(header: Header): Docx;
407
- footer(footer: Footer): Docx;
408
- first_footer(footer: Footer): Docx;
409
- even_footer(footer: Footer): Docx;
410
- title_pg(): Docx;
411
- page_size(w: number, h: number): Docx;
412
- page_orient(o: PageOrientationType): Docx;
413
- page_margin(margin: PageMargin): Docx;
414
- add_style(s: Style): Docx;
415
- default_size(size: number): Docx;
416
- default_spacing(spacing: number): Docx;
417
- default_fonts(font: RunFonts): Docx;
418
- default_line_spacing(spacing: LineSpacing): Docx;
419
- taskpanes(): Docx;
420
- web_extension(ext: WebExtension): Docx;
421
- add_custom_item(id: string, xml: string): Docx;
422
- page_num_type(p: PageNumType): Docx;
423
- doc_grid(grid_type: DocGridType, line_pitch?: number | null, char_space?: number | null): Docx;
424
- build(has_numberings: boolean): Uint8Array;
425
- json_with_update_comments(): string;
426
- comments_json(): string;
153
+ Default = 0,
154
+ Fixed = 1,
155
+ Variable = 2,
427
156
  }
157
+
428
158
  export class Footer {
429
- private constructor();
430
- free(): void;
431
- add_paragraph(p: Paragraph): Footer;
432
- add_table(t: Table): Footer;
159
+ private constructor();
160
+ free(): void;
161
+ [Symbol.dispose](): void;
162
+ add_paragraph(p: Paragraph): Footer;
163
+ add_table(t: Table): Footer;
433
164
  }
165
+
434
166
  export class FrameProperty {
435
- private constructor();
436
- free(): void;
437
- wrap(wrap: string): FrameProperty;
438
- v_anchor(anchor: string): FrameProperty;
439
- h_anchor(anchor: string): FrameProperty;
440
- h_rule(r: string): FrameProperty;
441
- x_align(align: string): FrameProperty;
442
- y_align(align: string): FrameProperty;
443
- h_space(x: number): FrameProperty;
444
- v_space(x: number): FrameProperty;
445
- x(x: number): FrameProperty;
446
- y(y: number): FrameProperty;
447
- width(n: number): FrameProperty;
448
- height(n: number): FrameProperty;
449
- }
167
+ private constructor();
168
+ free(): void;
169
+ [Symbol.dispose](): void;
170
+ h_anchor(anchor: string): FrameProperty;
171
+ h_rule(r: string): FrameProperty;
172
+ h_space(x: number): FrameProperty;
173
+ height(n: number): FrameProperty;
174
+ v_anchor(anchor: string): FrameProperty;
175
+ v_space(x: number): FrameProperty;
176
+ width(n: number): FrameProperty;
177
+ wrap(wrap: string): FrameProperty;
178
+ x(x: number): FrameProperty;
179
+ x_align(align: string): FrameProperty;
180
+ y(y: number): FrameProperty;
181
+ y_align(align: string): FrameProperty;
182
+ }
183
+
450
184
  export class Header {
451
- private constructor();
452
- free(): void;
453
- add_paragraph(p: Paragraph): Header;
454
- add_table(t: Table): Header;
185
+ private constructor();
186
+ free(): void;
187
+ [Symbol.dispose](): void;
188
+ add_paragraph(p: Paragraph): Header;
189
+ add_table(t: Table): Header;
455
190
  }
191
+
192
+ export enum HeightRule {
193
+ Auto = 0,
194
+ AtLeast = 1,
195
+ Exact = 2,
196
+ }
197
+
456
198
  export class Hyperlink {
457
- private constructor();
458
- free(): void;
459
- add_run(run: Run): Hyperlink;
460
- add_insert(i: Insert): Hyperlink;
461
- add_delete(d: Delete): Hyperlink;
462
- add_bookmark_start(id: number, name: string): Hyperlink;
463
- add_bookmark_end(id: number): Hyperlink;
464
- add_comment_start(comment: Comment): Hyperlink;
465
- add_comment_end(id: number): Hyperlink;
199
+ private constructor();
200
+ free(): void;
201
+ [Symbol.dispose](): void;
202
+ add_bookmark_end(id: number): Hyperlink;
203
+ add_bookmark_start(id: number, name: string): Hyperlink;
204
+ add_comment_end(id: number): Hyperlink;
205
+ add_comment_start(comment: Comment): Hyperlink;
206
+ add_delete(d: Delete): Hyperlink;
207
+ add_insert(i: Insert): Hyperlink;
208
+ add_run(run: Run): Hyperlink;
209
+ }
210
+
211
+ export enum HyperlinkType {
212
+ Anchor = 0,
213
+ External = 1,
466
214
  }
215
+
467
216
  export class Insert {
468
- private constructor();
469
- free(): void;
470
- author(author: string): Insert;
471
- date(date: string): Insert;
217
+ private constructor();
218
+ free(): void;
219
+ [Symbol.dispose](): void;
220
+ author(author: string): Insert;
221
+ date(date: string): Insert;
472
222
  }
223
+
473
224
  export class Level {
474
- private constructor();
475
- free(): void;
476
- indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null): Level;
477
- suffix(s: LevelSuffixType): Level;
478
- size(size: number): Level;
479
- color(color: string): Level;
480
- highlight(color: string): Level;
481
- bold(): Level;
482
- disable_bold(): Level;
483
- italic(): Level;
484
- strike(): Level;
485
- disable_strike(): Level;
486
- dstrike(): Level;
487
- disable_dstrike(): Level;
488
- disable_italic(): Level;
489
- underline(line_type: string): Level;
490
- vanish(): Level;
491
- fonts(f: RunFonts): Level;
492
- spacing(spacing: number): Level;
493
- }
225
+ private constructor();
226
+ free(): void;
227
+ [Symbol.dispose](): void;
228
+ bold(): Level;
229
+ color(color: string): Level;
230
+ disable_bold(): Level;
231
+ disable_dstrike(): Level;
232
+ disable_italic(): Level;
233
+ disable_strike(): Level;
234
+ dstrike(): Level;
235
+ fonts(f: RunFonts): Level;
236
+ highlight(color: string): Level;
237
+ indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null): Level;
238
+ italic(): Level;
239
+ size(size: number): Level;
240
+ spacing(spacing: number): Level;
241
+ strike(): Level;
242
+ suffix(s: LevelSuffixType): Level;
243
+ underline(line_type: string): Level;
244
+ vanish(): Level;
245
+ }
246
+
494
247
  export class LevelOverride {
495
- private constructor();
496
- free(): void;
497
- start(start: number): LevelOverride;
498
- level(level: Level): LevelOverride;
248
+ private constructor();
249
+ free(): void;
250
+ [Symbol.dispose](): void;
251
+ level(level: Level): LevelOverride;
252
+ start(start: number): LevelOverride;
499
253
  }
500
- export class LineSpacing {
501
- private constructor();
502
- free(): void;
503
- line_rule(t: LineSpacingType): LineSpacing;
504
- before(before: number): LineSpacing;
505
- after(after: number): LineSpacing;
506
- before_lines(before: number): LineSpacing;
507
- after_lines(after: number): LineSpacing;
508
- line(line: number): LineSpacing;
254
+
255
+ export enum LevelSuffixType {
256
+ Nothing = 0,
257
+ Space = 1,
258
+ Tab = 2,
509
259
  }
260
+
261
+ export class LineSpacing {
262
+ private constructor();
263
+ free(): void;
264
+ [Symbol.dispose](): void;
265
+ after(after: number): LineSpacing;
266
+ after_lines(after: number): LineSpacing;
267
+ before(before: number): LineSpacing;
268
+ before_lines(before: number): LineSpacing;
269
+ line(line: number): LineSpacing;
270
+ line_rule(t: LineSpacingType): LineSpacing;
271
+ }
272
+
273
+ export enum LineSpacingType {
274
+ Auto = 0,
275
+ AtLeast = 1,
276
+ Exact = 2,
277
+ }
278
+
279
+ export class MoveFrom {
280
+ private constructor();
281
+ free(): void;
282
+ [Symbol.dispose](): void;
283
+ author(author: string): MoveFrom;
284
+ date(date: string): MoveFrom;
285
+ }
286
+
287
+ export class MoveTo {
288
+ private constructor();
289
+ free(): void;
290
+ [Symbol.dispose](): void;
291
+ author(author: string): MoveTo;
292
+ date(date: string): MoveTo;
293
+ }
294
+
510
295
  export class NumPages {
511
- private constructor();
512
- free(): void;
296
+ private constructor();
297
+ free(): void;
298
+ [Symbol.dispose](): void;
513
299
  }
300
+
514
301
  export class Numbering {
515
- private constructor();
516
- free(): void;
517
- add_override(o: LevelOverride): Numbering;
302
+ private constructor();
303
+ free(): void;
304
+ [Symbol.dispose](): void;
305
+ add_override(o: LevelOverride): Numbering;
518
306
  }
307
+
519
308
  export class PageMargin {
520
- private constructor();
521
- free(): void;
522
- top(v: number): PageMargin;
523
- left(v: number): PageMargin;
524
- bottom(v: number): PageMargin;
525
- right(v: number): PageMargin;
526
- header(v: number): PageMargin;
527
- footer(v: number): PageMargin;
528
- gutter(v: number): PageMargin;
529
- }
309
+ private constructor();
310
+ free(): void;
311
+ [Symbol.dispose](): void;
312
+ bottom(v: number): PageMargin;
313
+ footer(v: number): PageMargin;
314
+ gutter(v: number): PageMargin;
315
+ header(v: number): PageMargin;
316
+ left(v: number): PageMargin;
317
+ right(v: number): PageMargin;
318
+ top(v: number): PageMargin;
319
+ }
320
+
530
321
  export class PageNum {
531
- private constructor();
532
- free(): void;
322
+ private constructor();
323
+ free(): void;
324
+ [Symbol.dispose](): void;
533
325
  }
326
+
534
327
  export class PageNumType {
535
- private constructor();
536
- free(): void;
328
+ private constructor();
329
+ free(): void;
330
+ [Symbol.dispose](): void;
537
331
  }
538
- export class Paragraph {
539
- private constructor();
540
- free(): void;
541
- add_run(run: Run): Paragraph;
542
- add_hyperlink(link: Hyperlink): Paragraph;
543
- add_insert(i: Insert): Paragraph;
544
- add_delete(d: Delete): Paragraph;
545
- add_bookmark_start(id: number, name: string): Paragraph;
546
- add_bookmark_end(id: number): Paragraph;
547
- add_comment_start(comment: Comment): Paragraph;
548
- add_comment_end(id: number): Paragraph;
549
- align(alignment_type: AlignmentType): Paragraph;
550
- text_alignment(alignment_type: TextAlignmentType): Paragraph;
551
- adjust_right_ind(v: number): Paragraph;
552
- outline_lvl(level: number): Paragraph;
553
- style(style_id: string): Paragraph;
554
- indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null, right?: number | null): Paragraph;
555
- numbering(id: number, level: number): Paragraph;
556
- size(size: number): Paragraph;
557
- color(c: string): Paragraph;
558
- bold(): Paragraph;
559
- italic(): Paragraph;
560
- fonts(f: RunFonts): Paragraph;
561
- line_spacing(spacing: LineSpacing): Paragraph;
562
- character_spacing(spacing: number): Paragraph;
563
- keep_next(v: boolean): Paragraph;
564
- snap_to_grid(v: boolean): Paragraph;
565
- keep_lines(v: boolean): Paragraph;
566
- page_break_before(v: boolean): Paragraph;
567
- widow_control(v: boolean): Paragraph;
568
- delete(author: string, date: string): Paragraph;
569
- insert(author: string, date: string): Paragraph;
570
- add_tab(val?: TabValueType | null, leader?: TabLeaderType | null, pos?: number | null): Paragraph;
571
- paragraph_property_change(p: ParagraphPropertyChange): Paragraph;
572
- add_page_num(p: PageNum): Paragraph;
573
- add_num_pages(p: NumPages): Paragraph;
574
- wrap(wrap: string): Paragraph;
575
- v_anchor(anchor: string): Paragraph;
576
- h_anchor(anchor: string): Paragraph;
577
- h_rule(r: string): Paragraph;
578
- x_align(align: string): Paragraph;
579
- y_align(align: string): Paragraph;
580
- h_space(x: number): Paragraph;
581
- v_space(x: number): Paragraph;
582
- frame_x(x: number): Paragraph;
583
- frame_y(y: number): Paragraph;
584
- frame_width(n: number): Paragraph;
585
- frame_height(n: number): Paragraph;
586
- paragraph_property(p: ParagraphProperty): Paragraph;
332
+
333
+ export enum PageOrientationType {
334
+ Landscape = 0,
335
+ Portrait = 1,
587
336
  }
337
+
338
+ export class Paragraph {
339
+ private constructor();
340
+ free(): void;
341
+ [Symbol.dispose](): void;
342
+ add_bookmark_end(id: number): Paragraph;
343
+ add_bookmark_start(id: number, name: string): Paragraph;
344
+ add_comment_end(id: number): Paragraph;
345
+ add_comment_start(comment: Comment): Paragraph;
346
+ add_delete(d: Delete): Paragraph;
347
+ add_hyperlink(link: Hyperlink): Paragraph;
348
+ add_insert(i: Insert): Paragraph;
349
+ add_move_from(mf: MoveFrom): Paragraph;
350
+ add_move_to(mt: MoveTo): Paragraph;
351
+ add_num_pages(p: NumPages): Paragraph;
352
+ add_page_num(p: PageNum): Paragraph;
353
+ add_run(run: Run): Paragraph;
354
+ add_tab(val?: TabValueType | null, leader?: TabLeaderType | null, pos?: number | null): Paragraph;
355
+ adjust_right_ind(v: number): Paragraph;
356
+ align(alignment_type: AlignmentType): Paragraph;
357
+ bold(): Paragraph;
358
+ character_spacing(spacing: number): Paragraph;
359
+ color(c: string): Paragraph;
360
+ delete(author: string, date: string): Paragraph;
361
+ fonts(f: RunFonts): Paragraph;
362
+ frame_height(n: number): Paragraph;
363
+ frame_width(n: number): Paragraph;
364
+ frame_x(x: number): Paragraph;
365
+ frame_y(y: number): Paragraph;
366
+ h_anchor(anchor: string): Paragraph;
367
+ h_rule(r: string): Paragraph;
368
+ h_space(x: number): Paragraph;
369
+ indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null, right?: number | null): Paragraph;
370
+ insert(author: string, date: string): Paragraph;
371
+ italic(): Paragraph;
372
+ keep_lines(v: boolean): Paragraph;
373
+ keep_next(v: boolean): Paragraph;
374
+ line_spacing(spacing: LineSpacing): Paragraph;
375
+ numbering(id: number, level: number): Paragraph;
376
+ outline_lvl(level: number): Paragraph;
377
+ page_break_before(v: boolean): Paragraph;
378
+ paragraph_property(p: ParagraphProperty): Paragraph;
379
+ paragraph_property_change(p: ParagraphPropertyChange): Paragraph;
380
+ size(size: number): Paragraph;
381
+ snap_to_grid(v: boolean): Paragraph;
382
+ style(style_id: string): Paragraph;
383
+ text_alignment(alignment_type: TextAlignmentType): Paragraph;
384
+ v_anchor(anchor: string): Paragraph;
385
+ v_space(x: number): Paragraph;
386
+ widow_control(v: boolean): Paragraph;
387
+ wrap(wrap: string): Paragraph;
388
+ x_align(align: string): Paragraph;
389
+ y_align(align: string): Paragraph;
390
+ }
391
+
392
+ export enum ParagraphBorderPosition {
393
+ Left = 0,
394
+ Right = 1,
395
+ Top = 2,
396
+ Bottom = 3,
397
+ Between = 4,
398
+ Bar = 5,
399
+ }
400
+
588
401
  export class ParagraphProperty {
589
- private constructor();
590
- free(): void;
591
- align(alignment_type: AlignmentType): ParagraphProperty;
592
- text_alignment(alignment_type: TextAlignmentType): ParagraphProperty;
593
- adjust_right_ind(v: number): ParagraphProperty;
594
- outline_lvl(level: number): ParagraphProperty;
595
- style(style_id: string): ParagraphProperty;
596
- indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null, right?: number | null): ParagraphProperty;
597
- numbering(id: number, level: number): ParagraphProperty;
598
- line_spacing(spacing: LineSpacing): ParagraphProperty;
599
- character_spacing(spacing: number): ParagraphProperty;
600
- keep_next(v: boolean): ParagraphProperty;
601
- snap_to_grid(v: boolean): ParagraphProperty;
602
- keep_lines(v: boolean): ParagraphProperty;
603
- page_break_before(v: boolean): ParagraphProperty;
604
- widow_control(v: boolean): ParagraphProperty;
605
- add_tab(val?: TabValueType | null, leader?: TabLeaderType | null, pos?: number | null): ParagraphProperty;
606
- paragraph_property_change(p: ParagraphPropertyChange): ParagraphProperty;
607
- frame_property(p: FrameProperty): ParagraphProperty;
608
- run_property(p: RunProperty): ParagraphProperty;
609
- }
402
+ private constructor();
403
+ free(): void;
404
+ [Symbol.dispose](): void;
405
+ add_tab(val?: TabValueType | null, leader?: TabLeaderType | null, pos?: number | null): ParagraphProperty;
406
+ adjust_right_ind(v: number): ParagraphProperty;
407
+ align(alignment_type: AlignmentType): ParagraphProperty;
408
+ character_spacing(spacing: number): ParagraphProperty;
409
+ frame_property(p: FrameProperty): ParagraphProperty;
410
+ indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null, right?: number | null): ParagraphProperty;
411
+ keep_lines(v: boolean): ParagraphProperty;
412
+ keep_next(v: boolean): ParagraphProperty;
413
+ line_spacing(spacing: LineSpacing): ParagraphProperty;
414
+ numbering(id: number, level: number): ParagraphProperty;
415
+ outline_lvl(level: number): ParagraphProperty;
416
+ page_break_before(v: boolean): ParagraphProperty;
417
+ paragraph_property_change(p: ParagraphPropertyChange): ParagraphProperty;
418
+ run_property(p: RunProperty): ParagraphProperty;
419
+ snap_to_grid(v: boolean): ParagraphProperty;
420
+ style(style_id: string): ParagraphProperty;
421
+ text_alignment(alignment_type: TextAlignmentType): ParagraphProperty;
422
+ widow_control(v: boolean): ParagraphProperty;
423
+ }
424
+
610
425
  export class ParagraphPropertyChange {
611
- private constructor();
612
- free(): void;
613
- author(author: string): ParagraphPropertyChange;
614
- date(date: string): ParagraphPropertyChange;
615
- numbering(id: number, level: number): ParagraphPropertyChange;
616
- align(alignment_type: AlignmentType): ParagraphPropertyChange;
617
- style(style_id: string): ParagraphPropertyChange;
618
- indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null): ParagraphPropertyChange;
619
- }
426
+ private constructor();
427
+ free(): void;
428
+ [Symbol.dispose](): void;
429
+ align(alignment_type: AlignmentType): ParagraphPropertyChange;
430
+ author(author: string): ParagraphPropertyChange;
431
+ date(date: string): ParagraphPropertyChange;
432
+ indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null): ParagraphPropertyChange;
433
+ numbering(id: number, level: number): ParagraphPropertyChange;
434
+ style(style_id: string): ParagraphPropertyChange;
435
+ }
436
+
620
437
  export class Pic {
621
- private constructor();
622
- free(): void;
623
- size(w_emu: number, h_emu: number): Pic;
624
- rotate(deg: number): Pic;
625
- floating(): Pic;
626
- offset_x(x: number): Pic;
627
- offset_y(y: number): Pic;
438
+ private constructor();
439
+ free(): void;
440
+ [Symbol.dispose](): void;
441
+ floating(): Pic;
442
+ offset_x(x: number): Pic;
443
+ offset_y(y: number): Pic;
444
+ rotate(deg: number): Pic;
445
+ size(w_emu: number, h_emu: number): Pic;
446
+ }
447
+
448
+ export enum PicAlign {
449
+ Left = 0,
450
+ Right = 1,
451
+ Center = 2,
452
+ Bottom = 3,
453
+ Top = 4,
628
454
  }
455
+
629
456
  export class PositionalTab {
630
- private constructor();
631
- free(): void;
632
- alignment(alignment: PositionalTabAlignmentType): PositionalTab;
633
- relative_to(relative_to: PositionalTabRelativeTo): PositionalTab;
634
- leader(leader: TabLeaderType): PositionalTab;
457
+ private constructor();
458
+ free(): void;
459
+ [Symbol.dispose](): void;
460
+ alignment(alignment: PositionalTabAlignmentType): PositionalTab;
461
+ leader(leader: TabLeaderType): PositionalTab;
462
+ relative_to(relative_to: PositionalTabRelativeTo): PositionalTab;
463
+ }
464
+
465
+ export enum PositionalTabAlignmentType {
466
+ Center = 0,
467
+ Left = 1,
468
+ Right = 2,
635
469
  }
636
- export class Run {
637
- private constructor();
638
- free(): void;
639
- add_text(text: string): Run;
640
- add_image(pic: Pic): Run;
641
- add_delete_text(text: string): Run;
642
- add_tab(): Run;
643
- add_ptab(ptab: PositionalTab): Run;
644
- add_break(break_type: BreakType): Run;
645
- add_tc(text: string, omits_page_number: boolean, level?: number | null, id?: string | null): Run;
646
- style(style: string): Run;
647
- size(size: number): Run;
648
- color(color: string): Run;
649
- highlight(color: string): Run;
650
- bold(): Run;
651
- italic(): Run;
652
- caps(): Run;
653
- strike(): Run;
654
- dstrike(): Run;
655
- underline(line_type: string): Run;
656
- vanish(): Run;
657
- fonts(f: RunFonts): Run;
658
- character_spacing(spacing: number): Run;
659
- fit_text(val: number, id?: number | null): Run;
660
- vert_align(a: VertAlignType): Run;
661
- shading(t: string, color: string, fill: string): Run;
662
- text_border(border_type: BorderType, size: number, space: number, color: string): Run;
470
+
471
+ export enum PositionalTabRelativeTo {
472
+ Indent = 0,
473
+ Margin = 1,
663
474
  }
475
+
476
+ export enum RelativeFromHType {
477
+ /**
478
+ * Specifies that the horizontal positioning shall be
479
+ * relative to the position of the anchor within its run
480
+ * content.
481
+ */
482
+ Character = 0,
483
+ /**
484
+ * Specifies that the horizontal positioning shall be
485
+ * relative to the extents of the column which contains its
486
+ * anchor.
487
+ */
488
+ Column = 1,
489
+ /**
490
+ * Specifies that the horizontal positioning shall be
491
+ * relative to the inside margin of the current page (the
492
+ * left margin on odd pages, right on even pages).
493
+ */
494
+ InsideMargin = 2,
495
+ /**
496
+ * Specifies that the horizontal positioning shall be
497
+ * relative to the left margin of the page.
498
+ */
499
+ LeftMargin = 3,
500
+ /**
501
+ * Specifies that the horizontal positioning shall be
502
+ * relative to the page margins.
503
+ */
504
+ Margin = 4,
505
+ /**
506
+ * Specifies that the horizontal positioning shall be
507
+ * relative to the outside margin of the current page (the
508
+ * right margin on odd pages, left on even pages).
509
+ */
510
+ OutsizeMargin = 5,
511
+ /**
512
+ * Specifies that the horizontal positioning shall be
513
+ * relative to the edge of the page.
514
+ */
515
+ Page = 6,
516
+ /**
517
+ * Specifies that the horizontal positioning shall be
518
+ * relative to the right margin of the page.
519
+ */
520
+ RightMargin = 7,
521
+ }
522
+
523
+ export enum RelativeFromVType {
524
+ BottomMargin = 0,
525
+ InsideMargin = 1,
526
+ Line = 2,
527
+ Margin = 3,
528
+ OutsizeMargin = 4,
529
+ Page = 5,
530
+ Paragraph = 6,
531
+ TopMargin = 7,
532
+ }
533
+
534
+ export class Run {
535
+ private constructor();
536
+ free(): void;
537
+ [Symbol.dispose](): void;
538
+ add_break(break_type: BreakType): Run;
539
+ add_carriage_return(): Run;
540
+ add_delete_text(text: string): Run;
541
+ add_image(pic: Pic): Run;
542
+ add_ptab(ptab: PositionalTab): Run;
543
+ add_tab(): Run;
544
+ add_tc(text: string, omits_page_number: boolean, level?: number | null, id?: string | null): Run;
545
+ add_text(text: string): Run;
546
+ bold(): Run;
547
+ caps(): Run;
548
+ character_spacing(spacing: number): Run;
549
+ color(color: string): Run;
550
+ dstrike(): Run;
551
+ fit_text(val: number, id?: number | null): Run;
552
+ fonts(f: RunFonts): Run;
553
+ highlight(color: string): Run;
554
+ italic(): Run;
555
+ shading(t: string, color: string, fill: string): Run;
556
+ size(size: number): Run;
557
+ strike(): Run;
558
+ style(style: string): Run;
559
+ text_border(border_type: BorderType, size: number, space: number, color: string): Run;
560
+ underline(line_type: string): Run;
561
+ vanish(): Run;
562
+ vert_align(a: VertAlignType): Run;
563
+ }
564
+
664
565
  export class RunFonts {
665
- private constructor();
666
- free(): void;
667
- ascii(f: string): RunFonts;
668
- hi_ansi(f: string): RunFonts;
669
- cs(f: string): RunFonts;
670
- east_asia(f: string): RunFonts;
671
- ascii_theme(f: string): RunFonts;
672
- hi_ansi_theme(f: string): RunFonts;
673
- cs_theme(f: string): RunFonts;
674
- east_asia_theme(f: string): RunFonts;
675
- hint(f: string): RunFonts;
676
- }
566
+ private constructor();
567
+ free(): void;
568
+ [Symbol.dispose](): void;
569
+ ascii(f: string): RunFonts;
570
+ ascii_theme(f: string): RunFonts;
571
+ cs(f: string): RunFonts;
572
+ cs_theme(f: string): RunFonts;
573
+ east_asia(f: string): RunFonts;
574
+ east_asia_theme(f: string): RunFonts;
575
+ hi_ansi(f: string): RunFonts;
576
+ hi_ansi_theme(f: string): RunFonts;
577
+ hint(f: string): RunFonts;
578
+ }
579
+
677
580
  export class RunProperty {
678
- private constructor();
679
- free(): void;
680
- size(size: number): RunProperty;
681
- color(c: string): RunProperty;
682
- bold(): RunProperty;
683
- disable_bold(): RunProperty;
684
- italic(): RunProperty;
685
- disable_italic(): RunProperty;
686
- strike(): RunProperty;
687
- disable_strike(): RunProperty;
688
- dstrike(): RunProperty;
689
- disable_dstrike(): RunProperty;
690
- fonts(f: RunFonts): RunProperty;
691
- underline(line_type: string): RunProperty;
692
- vanish(): RunProperty;
693
- spec_vanish(): RunProperty;
694
- character_spacing(spacing: number): RunProperty;
695
- fit_text(val: number, id?: number | null): RunProperty;
696
- vert_align(a: VertAlignType): RunProperty;
697
- delete(author: string, date: string): RunProperty;
698
- insert(author: string, date: string): RunProperty;
699
- style(style_id: string): RunProperty;
700
- highlight(color: string): RunProperty;
701
- text_border(border_type: BorderType, size: number, space: number, color: string): RunProperty;
702
- shading(t: string, color: string, fill: string): RunProperty;
581
+ private constructor();
582
+ free(): void;
583
+ [Symbol.dispose](): void;
584
+ bold(): RunProperty;
585
+ character_spacing(spacing: number): RunProperty;
586
+ color(c: string): RunProperty;
587
+ delete(author: string, date: string): RunProperty;
588
+ disable_bold(): RunProperty;
589
+ disable_dstrike(): RunProperty;
590
+ disable_italic(): RunProperty;
591
+ disable_strike(): RunProperty;
592
+ dstrike(): RunProperty;
593
+ fit_text(val: number, id?: number | null): RunProperty;
594
+ fonts(f: RunFonts): RunProperty;
595
+ highlight(color: string): RunProperty;
596
+ insert(author: string, date: string): RunProperty;
597
+ italic(): RunProperty;
598
+ shading(t: string, color: string, fill: string): RunProperty;
599
+ size(size: number): RunProperty;
600
+ spec_vanish(): RunProperty;
601
+ strike(): RunProperty;
602
+ style(style_id: string): RunProperty;
603
+ text_border(border_type: BorderType, size: number, space: number, color: string): RunProperty;
604
+ underline(line_type: string): RunProperty;
605
+ vanish(): RunProperty;
606
+ vert_align(a: VertAlignType): RunProperty;
607
+ }
608
+
609
+ export enum SectionType {
610
+ NextPage = 0,
611
+ NextColumn = 1,
612
+ Continuous = 2,
613
+ EvenPage = 3,
614
+ OddPage = 4,
615
+ }
616
+
617
+ export enum ShdType {
618
+ Nil = 0,
619
+ Clear = 1,
620
+ Solid = 2,
621
+ HorzStripe = 3,
622
+ VertStripe = 4,
623
+ ReverseDiagStripe = 5,
624
+ DiagStripe = 6,
625
+ HorzCross = 7,
626
+ DiagCross = 8,
627
+ ThinHorzStripe = 9,
628
+ ThinVertStripe = 10,
629
+ ThinReverseDiagStripe = 11,
630
+ ThinDiagStripe = 12,
631
+ ThinHorzCross = 13,
632
+ ThinDiagCross = 14,
633
+ Pct5 = 15,
634
+ Pct10 = 16,
635
+ Pct12 = 17,
636
+ Pct15 = 18,
637
+ Pct20 = 19,
638
+ Pct25 = 20,
639
+ Pct30 = 21,
640
+ Pct35 = 22,
641
+ Pct37 = 23,
642
+ Pct40 = 24,
643
+ Pct45 = 25,
644
+ Pct50 = 26,
645
+ Pct55 = 27,
646
+ Pct60 = 28,
647
+ Pct62 = 29,
648
+ Pct65 = 30,
649
+ Pct70 = 31,
650
+ Pct75 = 32,
651
+ Pct80 = 33,
652
+ Pct85 = 34,
653
+ Pct87 = 35,
654
+ Pct90 = 36,
655
+ Pct95 = 37,
656
+ }
657
+
658
+ export enum SpecialIndentKind {
659
+ FirstLine = 0,
660
+ Hanging = 1,
703
661
  }
662
+
704
663
  export class Style {
705
- private constructor();
706
- free(): void;
707
- name(name: string): Style;
708
- based_on(base: string): Style;
709
- q_format(q_format: boolean): Style;
710
- ui_priority(ui_priority: number): Style;
711
- semi_hidden(): Style;
712
- unhide_when_used(): Style;
713
- size(size: number): Style;
714
- color(color: string): Style;
715
- highlight(color: string): Style;
716
- bold(): Style;
717
- italic(): Style;
718
- strike(): Style;
719
- dstrike(): Style;
720
- underline(line_type: string): Style;
721
- shading(t: string, color: string, fill: string): Style;
722
- link(link: string): Style;
723
- vanish(): Style;
724
- caps(): Style;
725
- fonts(f: RunFonts): Style;
726
- character_spacing(spacing: number): Style;
727
- fit_text(val: number, id?: number | null): Style;
728
- vert_align(a: VertAlignType): Style;
729
- text_border(border_type: BorderType, size: number, space: number, color: string): Style;
730
- align(alignment_type: AlignmentType): Style;
731
- text_alignment(alignment_type: TextAlignmentType): Style;
732
- adjust_right_ind(v: number): Style;
733
- add_tab(val?: TabValueType | null, leader?: TabLeaderType | null, pos?: number | null): Style;
734
- indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null): Style;
735
- outline_lvl(l: number): Style;
736
- numbering(id: number, level: number): Style;
737
- line_spacing(spacing: LineSpacing): Style;
738
- snap_to_grid(v: boolean): Style;
739
- keep_next(v: boolean): Style;
740
- keep_lines(v: boolean): Style;
741
- page_break_before(v: boolean): Style;
742
- widow_control(v: boolean): Style;
743
- run_property(p: RunProperty): Style;
744
- paragraph_property(p: ParagraphProperty): Style;
745
- table_property(p: TableProperty): Style;
746
- table_cell_property(p: TableCellProperty): Style;
747
- table_indent(v: number): Style;
748
- table_align(v: TableAlignmentType): Style;
749
- set_cell_margins(top: number, right: number, bottom: number, left: number): Style;
750
- cell_margin_top(v: number, t: WidthType): Style;
751
- cell_margin_right(v: number, t: WidthType): Style;
752
- cell_margin_bottom(v: number, t: WidthType): Style;
753
- cell_margin_left(v: number, t: WidthType): Style;
754
- layout(t: TableLayoutType): Style;
755
- wrap(wrap: string): Style;
756
- v_anchor(anchor: string): Style;
757
- h_anchor(anchor: string): Style;
758
- h_rule(r: string): Style;
759
- x_align(align: string): Style;
760
- y_align(align: string): Style;
761
- h_space(x: number): Style;
762
- v_space(x: number): Style;
763
- frame_x(x: number): Style;
764
- frame_y(y: number): Style;
765
- frame_width(n: number): Style;
766
- frame_height(n: number): Style;
664
+ private constructor();
665
+ free(): void;
666
+ [Symbol.dispose](): void;
667
+ add_tab(val?: TabValueType | null, leader?: TabLeaderType | null, pos?: number | null): Style;
668
+ adjust_right_ind(v: number): Style;
669
+ align(alignment_type: AlignmentType): Style;
670
+ based_on(base: string): Style;
671
+ bold(): Style;
672
+ caps(): Style;
673
+ cell_margin_bottom(v: number, t: WidthType): Style;
674
+ cell_margin_left(v: number, t: WidthType): Style;
675
+ cell_margin_right(v: number, t: WidthType): Style;
676
+ cell_margin_top(v: number, t: WidthType): Style;
677
+ character_spacing(spacing: number): Style;
678
+ color(color: string): Style;
679
+ dstrike(): Style;
680
+ fit_text(val: number, id?: number | null): Style;
681
+ fonts(f: RunFonts): Style;
682
+ frame_height(n: number): Style;
683
+ frame_width(n: number): Style;
684
+ frame_x(x: number): Style;
685
+ frame_y(y: number): Style;
686
+ h_anchor(anchor: string): Style;
687
+ h_rule(r: string): Style;
688
+ h_space(x: number): Style;
689
+ highlight(color: string): Style;
690
+ indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null): Style;
691
+ italic(): Style;
692
+ keep_lines(v: boolean): Style;
693
+ keep_next(v: boolean): Style;
694
+ layout(t: TableLayoutType): Style;
695
+ line_spacing(spacing: LineSpacing): Style;
696
+ link(link: string): Style;
697
+ name(name: string): Style;
698
+ numbering(id: number, level: number): Style;
699
+ outline_lvl(l: number): Style;
700
+ page_break_before(v: boolean): Style;
701
+ paragraph_property(p: ParagraphProperty): Style;
702
+ q_format(q_format: boolean): Style;
703
+ run_property(p: RunProperty): Style;
704
+ semi_hidden(): Style;
705
+ set_cell_margins(top: number, right: number, bottom: number, left: number): Style;
706
+ shading(t: string, color: string, fill: string): Style;
707
+ size(size: number): Style;
708
+ snap_to_grid(v: boolean): Style;
709
+ strike(): Style;
710
+ table_align(v: TableAlignmentType): Style;
711
+ table_cell_property(p: TableCellProperty): Style;
712
+ table_indent(v: number): Style;
713
+ table_property(p: TableProperty): Style;
714
+ text_alignment(alignment_type: TextAlignmentType): Style;
715
+ text_border(border_type: BorderType, size: number, space: number, color: string): Style;
716
+ ui_priority(ui_priority: number): Style;
717
+ underline(line_type: string): Style;
718
+ unhide_when_used(): Style;
719
+ v_anchor(anchor: string): Style;
720
+ v_space(x: number): Style;
721
+ vanish(): Style;
722
+ vert_align(a: VertAlignType): Style;
723
+ widow_control(v: boolean): Style;
724
+ wrap(wrap: string): Style;
725
+ x_align(align: string): Style;
726
+ y_align(align: string): Style;
727
+ }
728
+
729
+ export enum StyleType {
730
+ Paragraph = 0,
731
+ Character = 1,
732
+ Numbering = 2,
733
+ Table = 3,
734
+ Unsupported = 4,
767
735
  }
736
+
737
+ export enum TabLeaderType {
738
+ Dot = 0,
739
+ Heavy = 1,
740
+ Hyphen = 2,
741
+ MiddleDot = 3,
742
+ None = 4,
743
+ Underscore = 5,
744
+ }
745
+
746
+ export enum TabValueType {
747
+ Bar = 0,
748
+ Center = 1,
749
+ Clear = 2,
750
+ Decimal = 3,
751
+ End = 4,
752
+ Right = 5,
753
+ Num = 6,
754
+ Start = 7,
755
+ Left = 8,
756
+ }
757
+
768
758
  export class Table {
769
- private constructor();
770
- free(): void;
771
- add_row(row: TableRow): Table;
772
- set_grid(grid: Uint32Array): Table;
773
- style(style_id: string): Table;
774
- indent(v: number): Table;
775
- align(v: TableAlignmentType): Table;
776
- width(w: number): Table;
777
- layout(t: TableLayoutType): Table;
778
- position(p: TablePositionProperty): Table;
779
- set_cell_margins(top: number, right: number, bottom: number, left: number): Table;
780
- cell_margin_top(v: number, t: WidthType): Table;
781
- cell_margin_right(v: number, t: WidthType): Table;
782
- cell_margin_bottom(v: number, t: WidthType): Table;
783
- cell_margin_left(v: number, t: WidthType): Table;
759
+ private constructor();
760
+ free(): void;
761
+ [Symbol.dispose](): void;
762
+ add_row(row: TableRow): Table;
763
+ align(v: TableAlignmentType): Table;
764
+ cell_margin_bottom(v: number, t: WidthType): Table;
765
+ cell_margin_left(v: number, t: WidthType): Table;
766
+ cell_margin_right(v: number, t: WidthType): Table;
767
+ cell_margin_top(v: number, t: WidthType): Table;
768
+ indent(v: number): Table;
769
+ layout(t: TableLayoutType): Table;
770
+ position(p: TablePositionProperty): Table;
771
+ set_cell_margins(top: number, right: number, bottom: number, left: number): Table;
772
+ set_grid(grid: Uint32Array): Table;
773
+ style(style_id: string): Table;
774
+ width(w: number): Table;
775
+ }
776
+
777
+ export enum TableAlignmentType {
778
+ Center = 0,
779
+ Left = 1,
780
+ Right = 2,
784
781
  }
782
+
783
+ export enum TableBorderPosition {
784
+ Left = 0,
785
+ Right = 1,
786
+ Top = 2,
787
+ Bottom = 3,
788
+ InsideH = 4,
789
+ InsideV = 5,
790
+ }
791
+
785
792
  export class TableCell {
786
- private constructor();
787
- free(): void;
788
- add_paragraph(p: Paragraph): TableCell;
789
- add_table(t: Table): TableCell;
790
- add_table_of_contents(t: TableOfContents): TableCell;
791
- vertical_merge(t: VMergeType): TableCell;
792
- vertical_align(t: VAlignType): TableCell;
793
- grid_span(v: number): TableCell;
794
- width(v: number): TableCell;
795
- shading(t: string, color: string, fill: string): TableCell;
796
- text_direction(t: TextDirectionType): TableCell;
797
- set_border(border: TableCellBorder): TableCell;
798
- clear_border(position: TableCellBorderPosition): TableCell;
799
- clear_all_border(): TableCell;
800
- margin_top(v: number, t: WidthType): TableCell;
801
- margin_right(v: number, t: WidthType): TableCell;
802
- margin_bottom(v: number, t: WidthType): TableCell;
803
- margin_left(v: number, t: WidthType): TableCell;
804
- }
793
+ private constructor();
794
+ free(): void;
795
+ [Symbol.dispose](): void;
796
+ add_paragraph(p: Paragraph): TableCell;
797
+ add_table(t: Table): TableCell;
798
+ add_table_of_contents(t: TableOfContents): TableCell;
799
+ clear_all_border(): TableCell;
800
+ clear_border(position: TableCellBorderPosition): TableCell;
801
+ grid_span(v: number): TableCell;
802
+ margin_bottom(v: number, t: WidthType): TableCell;
803
+ margin_left(v: number, t: WidthType): TableCell;
804
+ margin_right(v: number, t: WidthType): TableCell;
805
+ margin_top(v: number, t: WidthType): TableCell;
806
+ set_border(border: TableCellBorder): TableCell;
807
+ shading(t: string, color: string, fill: string): TableCell;
808
+ text_direction(t: TextDirectionType): TableCell;
809
+ vertical_align(t: VAlignType): TableCell;
810
+ vertical_merge(t: VMergeType): TableCell;
811
+ width(v: number): TableCell;
812
+ }
813
+
805
814
  export class TableCellBorder {
806
- private constructor();
807
- free(): void;
808
- size(size: number): TableCellBorder;
809
- color(color: string): TableCellBorder;
810
- border_type(border_type: BorderType): TableCellBorder;
811
- get_size(): number;
812
- get_color(): string;
813
- get_border_type(): BorderType;
814
- }
815
+ private constructor();
816
+ free(): void;
817
+ [Symbol.dispose](): void;
818
+ border_type(border_type: BorderType): TableCellBorder;
819
+ color(color: string): TableCellBorder;
820
+ get_border_type(): BorderType;
821
+ get_color(): string;
822
+ get_size(): number;
823
+ size(size: number): TableCellBorder;
824
+ }
825
+
826
+ export enum TableCellBorderPosition {
827
+ Left = 0,
828
+ Right = 1,
829
+ Top = 2,
830
+ Bottom = 3,
831
+ InsideH = 4,
832
+ InsideV = 5,
833
+ Tl2br = 6,
834
+ Tr2bl = 7,
835
+ }
836
+
815
837
  export class TableCellProperty {
816
- private constructor();
817
- free(): void;
838
+ private constructor();
839
+ free(): void;
840
+ [Symbol.dispose](): void;
818
841
  }
819
- export class TableOfContents {
820
- private constructor();
821
- free(): void;
822
- heading_styles_range(start: number, end: number): TableOfContents;
823
- tc_field_identifier(f?: string | null): TableOfContents;
824
- add_style_with_level(style: string, level: number): TableOfContents;
825
- hyperlink(): TableOfContents;
826
- alias(a: string): TableOfContents;
827
- page_ref_placeholder(a: string): TableOfContents;
828
- add_item(t: TableOfContentsItem): TableOfContents;
829
- auto(): TableOfContents;
830
- dirty(): TableOfContents;
831
- without_sdt(): TableOfContents;
832
- delete(author: string, date: string): TableOfContents;
833
- add_before_paragraph(p: Paragraph): TableOfContents;
834
- add_after_paragraph(p: Paragraph): TableOfContents;
835
- add_before_table(t: Table): TableOfContents;
836
- add_after_table(t: Table): TableOfContents;
837
- paragraph_property(p: ParagraphProperty): TableOfContents;
842
+
843
+ export enum TableLayoutType {
844
+ Fixed = 0,
845
+ Autofit = 1,
838
846
  }
847
+
848
+ export class TableOfContents {
849
+ private constructor();
850
+ free(): void;
851
+ [Symbol.dispose](): void;
852
+ add_after_paragraph(p: Paragraph): TableOfContents;
853
+ add_after_table(t: Table): TableOfContents;
854
+ add_before_paragraph(p: Paragraph): TableOfContents;
855
+ add_before_table(t: Table): TableOfContents;
856
+ add_item(t: TableOfContentsItem): TableOfContents;
857
+ add_style_with_level(style: string, level: number): TableOfContents;
858
+ alias(a: string): TableOfContents;
859
+ auto(): TableOfContents;
860
+ delete(author: string, date: string): TableOfContents;
861
+ dirty(): TableOfContents;
862
+ heading_styles_range(start: number, end: number): TableOfContents;
863
+ hyperlink(): TableOfContents;
864
+ page_ref_placeholder(a: string): TableOfContents;
865
+ paragraph_property(p: ParagraphProperty): TableOfContents;
866
+ tc_field_identifier(f?: string | null): TableOfContents;
867
+ without_sdt(): TableOfContents;
868
+ }
869
+
839
870
  export class TableOfContentsItem {
840
- private constructor();
841
- free(): void;
842
- text(a: string): TableOfContentsItem;
843
- toc_key(a: string): TableOfContentsItem;
844
- level(l: number): TableOfContentsItem;
845
- page_ref(a: string): TableOfContentsItem;
846
- }
871
+ private constructor();
872
+ free(): void;
873
+ [Symbol.dispose](): void;
874
+ level(l: number): TableOfContentsItem;
875
+ page_ref(a: string): TableOfContentsItem;
876
+ text(a: string): TableOfContentsItem;
877
+ toc_key(a: string): TableOfContentsItem;
878
+ }
879
+
847
880
  export class TablePositionProperty {
848
- private constructor();
849
- free(): void;
850
- left_from_text(v: number): TablePositionProperty;
851
- right_from_text(v: number): TablePositionProperty;
852
- vertical_anchor(v: string): TablePositionProperty;
853
- horizontal_anchor(v: string): TablePositionProperty;
854
- position_x_alignment(v: string): TablePositionProperty;
855
- position_y_alignment(v: string): TablePositionProperty;
856
- position_x(v: number): TablePositionProperty;
857
- position_y(v: number): TablePositionProperty;
858
- }
881
+ private constructor();
882
+ free(): void;
883
+ [Symbol.dispose](): void;
884
+ horizontal_anchor(v: string): TablePositionProperty;
885
+ left_from_text(v: number): TablePositionProperty;
886
+ position_x(v: number): TablePositionProperty;
887
+ position_x_alignment(v: string): TablePositionProperty;
888
+ position_y(v: number): TablePositionProperty;
889
+ position_y_alignment(v: string): TablePositionProperty;
890
+ right_from_text(v: number): TablePositionProperty;
891
+ vertical_anchor(v: string): TablePositionProperty;
892
+ }
893
+
859
894
  export class TableProperty {
860
- private constructor();
861
- free(): void;
895
+ private constructor();
896
+ free(): void;
897
+ [Symbol.dispose](): void;
862
898
  }
899
+
863
900
  export class TableRow {
864
- private constructor();
865
- free(): void;
866
- add_cell(cell: TableCell): TableRow;
867
- row_height(h: number): TableRow;
868
- height_rule(r: HeightRule): TableRow;
869
- delete(author: string, date: string): TableRow;
870
- insert(author: string, date: string): TableRow;
901
+ private constructor();
902
+ free(): void;
903
+ [Symbol.dispose](): void;
904
+ add_cell(cell: TableCell): TableRow;
905
+ delete(author: string, date: string): TableRow;
906
+ height_rule(r: HeightRule): TableRow;
907
+ insert(author: string, date: string): TableRow;
908
+ row_height(h: number): TableRow;
909
+ }
910
+
911
+ export enum TextAlignmentType {
912
+ Auto = 0,
913
+ Baseline = 1,
914
+ Bottom = 2,
915
+ Center = 3,
916
+ Top = 4,
917
+ }
918
+
919
+ export enum TextDirectionType {
920
+ Lr = 0,
921
+ LrV = 1,
922
+ Rl = 2,
923
+ RlV = 3,
924
+ Tb = 4,
925
+ TbV = 5,
926
+ TbRlV = 6,
927
+ TbRl = 7,
928
+ BtLr = 8,
929
+ LrTbV = 9,
930
+ }
931
+
932
+ /**
933
+ * OpenXML theme color identifier (`ST_ThemeColor`, ECMA-376 Part 1 §17.18.97).
934
+ *
935
+ * A theme color tells Word to resolve the color from the document theme
936
+ * (e.g. `accent1`) instead of using a fixed RGB value. The accompanying
937
+ * `w:val` hex remains as a fallback for renderers that do not support themes.
938
+ *
939
+ * ```
940
+ * use docx_rs::ThemeColor;
941
+ *
942
+ * assert_eq!(ThemeColor::Accent1.to_string(), "accent1");
943
+ * assert_eq!(
944
+ * "followedHyperlink".parse::<ThemeColor>().unwrap(),
945
+ * ThemeColor::FollowedHyperlink,
946
+ * );
947
+ * ```
948
+ */
949
+ export enum ThemeColor {
950
+ /**
951
+ * `dark1`
952
+ */
953
+ Dark1 = 0,
954
+ /**
955
+ * `light1`
956
+ */
957
+ Light1 = 1,
958
+ /**
959
+ * `dark2`
960
+ */
961
+ Dark2 = 2,
962
+ /**
963
+ * `light2`
964
+ */
965
+ Light2 = 3,
966
+ /**
967
+ * `accent1`
968
+ */
969
+ Accent1 = 4,
970
+ /**
971
+ * `accent2`
972
+ */
973
+ Accent2 = 5,
974
+ /**
975
+ * `accent3`
976
+ */
977
+ Accent3 = 6,
978
+ /**
979
+ * `accent4`
980
+ */
981
+ Accent4 = 7,
982
+ /**
983
+ * `accent5`
984
+ */
985
+ Accent5 = 8,
986
+ /**
987
+ * `accent6`
988
+ */
989
+ Accent6 = 9,
990
+ /**
991
+ * `hyperlink`
992
+ */
993
+ Hyperlink = 10,
994
+ /**
995
+ * `followedHyperlink`
996
+ */
997
+ FollowedHyperlink = 11,
998
+ /**
999
+ * `none`
1000
+ */
1001
+ None = 12,
1002
+ /**
1003
+ * `background1`
1004
+ */
1005
+ Background1 = 13,
1006
+ /**
1007
+ * `text1`
1008
+ */
1009
+ Text1 = 14,
1010
+ /**
1011
+ * `background2`
1012
+ */
1013
+ Background2 = 15,
1014
+ /**
1015
+ * `text2`
1016
+ */
1017
+ Text2 = 16,
1018
+ /**
1019
+ * Any token not recognized by this crate (preserves forward compatibility on read).
1020
+ */
1021
+ Unsupported = 17,
1022
+ }
1023
+
1024
+ export enum VAlignType {
1025
+ Top = 0,
1026
+ Center = 1,
1027
+ Bottom = 2,
1028
+ Unsupported = 3,
1029
+ }
1030
+
1031
+ export enum VMergeType {
1032
+ Continue = 0,
1033
+ Restart = 1,
1034
+ Unsupported = 2,
1035
+ }
1036
+
1037
+ export enum VertAlignType {
1038
+ Baseline = 0,
1039
+ SuperScript = 1,
1040
+ SubScript = 2,
1041
+ Unsupported = 3,
871
1042
  }
1043
+
872
1044
  export class WebExtension {
873
- private constructor();
874
- free(): void;
875
- property(name: string, value: string): WebExtension;
1045
+ private constructor();
1046
+ free(): void;
1047
+ [Symbol.dispose](): void;
1048
+ property(name: string, value: string): WebExtension;
876
1049
  }
1050
+
1051
+ export enum WidthType {
1052
+ Dxa = 0,
1053
+ Auto = 1,
1054
+ Pct = 2,
1055
+ Nil = 3,
1056
+ Unsupported = 4,
1057
+ }
1058
+
1059
+ export function createAbstractNumbering(id: number): AbstractNumbering;
1060
+
1061
+ export function createComment(id: number): Comment;
1062
+
1063
+ export function createDelete(run: Run): Delete;
1064
+
1065
+ export function createDocx(): Docx;
1066
+
1067
+ export function createFooter(): Footer;
1068
+
1069
+ export function createFrameProperty(): FrameProperty;
1070
+
1071
+ export function createHeader(): Header;
1072
+
1073
+ export function createHyperlink(v: string, t: HyperlinkType): Hyperlink;
1074
+
1075
+ export function createInsert(run: Run): Insert;
1076
+
1077
+ export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
1078
+
1079
+ export function createLevelOverride(level: number): LevelOverride;
1080
+
1081
+ export function createLineSpacing(): LineSpacing;
1082
+
1083
+ export function createMoveFrom(run: Run): MoveFrom;
1084
+
1085
+ export function createMoveTo(run: Run): MoveTo;
1086
+
1087
+ export function createNumPages(): NumPages;
1088
+
1089
+ export function createNumbering(id: number, abstract_num_id: number): Numbering;
1090
+
1091
+ export function createPageMargin(): PageMargin;
1092
+
1093
+ export function createPageNum(): PageNum;
1094
+
1095
+ export function createPageNumType(start?: number | null, chap_style?: string | null): PageNumType;
1096
+
1097
+ export function createParagraph(): Paragraph;
1098
+
1099
+ export function createParagraphProperty(): ParagraphProperty;
1100
+
1101
+ export function createParagraphPropertyChange(): ParagraphPropertyChange;
1102
+
1103
+ export function createPic(buf: Uint8Array): Pic;
1104
+
1105
+ export function createPositionalTab(alignment: PositionalTabAlignmentType, relative_to: PositionalTabRelativeTo, leader: TabLeaderType): PositionalTab;
1106
+
1107
+ export function createRun(): Run;
1108
+
1109
+ export function createRunFonts(): RunFonts;
1110
+
1111
+ export function createRunProperty(): RunProperty;
1112
+
1113
+ export function createStyle(style_id: string, style_type: StyleType): Style;
1114
+
1115
+ export function createTable(): Table;
1116
+
1117
+ export function createTableCell(): TableCell;
1118
+
1119
+ export function createTableCellBorder(position: TableCellBorderPosition): TableCellBorder;
1120
+
1121
+ export function createTableOfContents(): TableOfContents;
1122
+
1123
+ export function createTableOfContentsItem(): TableOfContentsItem;
1124
+
1125
+ export function createTableOfContentsWithInstrText(s: string): TableOfContents;
1126
+
1127
+ export function createTablePosition(): TablePositionProperty;
1128
+
1129
+ export function createTableRow(): TableRow;
1130
+
1131
+ export function createWebExtension(id: string, reference_id: string, version: string, store: string, store_type: string): WebExtension;
1132
+
1133
+ export function readDocx(buf: Uint8Array): string;
1134
+
1135
+ export function readXML(xml: string): string;