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
@@ -0,0 +1,6 @@
1
+ import type { DeleteChild } from "./DeleteChild";
2
+ export interface Delete {
3
+ author: string;
4
+ date: string;
5
+ children: Array<DeleteChild>;
6
+ }
@@ -0,0 +1,10 @@
1
+ import type { CommentRangeEnd } from "./CommentRangeEnd";
2
+ import type { CommentRangeStart } from "./CommentRangeStart";
3
+ import type { Run } from "./Run";
4
+ export type DeleteChild = {
5
+ "Run": Run;
6
+ } | {
7
+ "CommentStart": CommentRangeStart;
8
+ } | {
9
+ "CommentEnd": CommentRangeEnd;
10
+ };
@@ -0,0 +1,4 @@
1
+ export interface DeleteText {
2
+ text: string;
3
+ preserveSpace: boolean;
4
+ }
@@ -0,0 +1,6 @@
1
+ import type { PicAlign } from "./PicAlign";
2
+ export type DrawingPosition = {
3
+ "offset": number;
4
+ } | {
5
+ "align": PicAlign;
6
+ };
@@ -0,0 +1 @@
1
+ export type DrawingPositionType = "anchor" | "inline";
@@ -0,0 +1,5 @@
1
+ import type { FieldCharType } from "./FieldCharType";
2
+ export type FieldChar = {
3
+ fieldCharType: FieldCharType;
4
+ dirty: boolean;
5
+ };
@@ -0,0 +1 @@
1
+ export type FieldCharType = "begin" | "separate" | "end" | "unsupported";
@@ -0,0 +1,4 @@
1
+ export interface FitText {
2
+ val: number;
3
+ id?: number;
4
+ }
@@ -0,0 +1,7 @@
1
+ import type { FontSchemeFont } from "./FontSchemeFont";
2
+ export type FontGroup = {
3
+ latin: string;
4
+ ea: string;
5
+ cs: string;
6
+ fonts: Array<FontSchemeFont>;
7
+ };
@@ -0,0 +1,5 @@
1
+ import type { FontGroup } from "./FontGroup";
2
+ export type FontScheme = {
3
+ majorFont: FontGroup;
4
+ minorFont: FontGroup;
5
+ };
@@ -0,0 +1,4 @@
1
+ export type FontSchemeFont = {
2
+ script: string;
3
+ typeface: string;
4
+ };
@@ -0,0 +1,4 @@
1
+ export interface FooterReference {
2
+ footerType: string;
3
+ id: string;
4
+ }
@@ -0,0 +1,50 @@
1
+ export type FrameProperty = {
2
+ /**
3
+ * Frame Height
4
+ * Represents the following attribute in the schema: w:h
5
+ */
6
+ h: number | null;
7
+ /**
8
+ * Frame Height Type
9
+ * Represents the following attribute in the schema: w:hRule
10
+ */
11
+ hRule: string | null;
12
+ /**
13
+ * Frame Horizontal Positioning Base
14
+ * Represents the following attribute in the schema: w:hAnchor
15
+ */
16
+ hAnchor: string | null;
17
+ /**
18
+ * Horizontal Frame Padding
19
+ * Represents the following attribute in the schema: w:hSpace
20
+ */
21
+ hSpace: number | null;
22
+ vAnchor: string | null;
23
+ vSpace: number | null;
24
+ w: number | null;
25
+ /**
26
+ * Text Wrapping Around Frame
27
+ * Represents the following attribute in the schema: w:wrap
28
+ */
29
+ wrap: string | null;
30
+ /**
31
+ * Absolute Horizontal Position
32
+ * Represents the following attribute in the schema: w:x
33
+ */
34
+ x: number | null;
35
+ /**
36
+ * Relative Horizontal Position
37
+ * Represents the following attribute in the schema: w:xAlign
38
+ */
39
+ xAlign: string | null;
40
+ /**
41
+ * Absolute Vertical Position
42
+ * Represents the following attribute in the schema: w:y
43
+ */
44
+ y: number | null;
45
+ /**
46
+ * Relative Vertical Position
47
+ * Represents the following attribute in the schema: w:yAlign
48
+ */
49
+ yAlign: string | null;
50
+ };
@@ -0,0 +1,4 @@
1
+ export interface HeaderReference {
2
+ headerType: string;
3
+ id: string;
4
+ }
@@ -0,0 +1 @@
1
+ export type Highlight = string;
@@ -0,0 +1 @@
1
+ export type HyperlinkType = "anchor" | "external";
@@ -0,0 +1,3 @@
1
+ export type ImageData = {
2
+ id: string;
3
+ };
@@ -0,0 +1,5 @@
1
+ export interface Insert {
2
+ children: any[];
3
+ author: string;
4
+ date: string;
5
+ }
@@ -0,0 +1,13 @@
1
+ import type { CommentRangeEnd } from "./CommentRangeEnd";
2
+ import type { CommentRangeStart } from "./CommentRangeStart";
3
+ import type { Delete } from "./Delete";
4
+ import type { Run } from "./Run";
5
+ export type InsertChild = {
6
+ "Run": Run;
7
+ } | {
8
+ "Delete": Delete;
9
+ } | {
10
+ "CommentStart": CommentRangeStart;
11
+ } | {
12
+ "CommentEnd": CommentRangeEnd;
13
+ };
@@ -0,0 +1,4 @@
1
+ export type InstrHyperlink = {
2
+ target: string;
3
+ anchor: boolean;
4
+ };
@@ -0,0 +1,5 @@
1
+ export interface InstrPAGEREF {
2
+ pageRef: string;
3
+ hyperlink: boolean;
4
+ relativePosition: boolean;
5
+ }
@@ -0,0 +1,6 @@
1
+ export interface InstrTC {
2
+ text: string;
3
+ omitsPageNumber: boolean;
4
+ level: number | null;
5
+ itemTypeIdentifier: string | null;
6
+ }
@@ -0,0 +1,15 @@
1
+ import type { InstrHyperlink } from "./InstrHyperlink";
2
+ import type { InstrPAGEREF } from "./InstrPAGEREF";
3
+ import type { InstrTC } from "./InstrTC";
4
+ import type { InstrToC } from "./InstrToC";
5
+ export type InstrText = {
6
+ "TOC": InstrToC;
7
+ } | {
8
+ "TC": InstrTC;
9
+ } | {
10
+ "PAGEREF": InstrPAGEREF;
11
+ } | {
12
+ "HYPERLINK": InstrHyperlink;
13
+ } | {
14
+ "Unsupported": string;
15
+ };
@@ -0,0 +1,19 @@
1
+ import type { StyleWithLevel } from "./StyleWithLevel";
2
+ export type InstrToC = {
3
+ headingStylesRange: [number, number] | null;
4
+ tcFieldLevelRange: [number, number] | null;
5
+ omitPageNumbersLevelRange: [number, number] | null;
6
+ entryBookmarkName: string | null;
7
+ stylesWithLevels: Array<StyleWithLevel>;
8
+ entryAndPageNumberSeparator: string | null;
9
+ sequenceAndPageNumbersSeparator: string | null;
10
+ captionLabel: string | null;
11
+ captionLabelIncludingNumbers: string | null;
12
+ seqFieldIdentifierForPrefix: string | null;
13
+ tcFieldIdentifier: string | null | null;
14
+ hyperlink: boolean;
15
+ preserveTab: boolean;
16
+ preserveNewLine: boolean;
17
+ useAppliedParagraphLineLevel: boolean;
18
+ hideTabAndPageNumbersInWebview: boolean;
19
+ };
@@ -0,0 +1 @@
1
+ export type Italic = boolean;
@@ -0,0 +1 @@
1
+ export type ItalicCs = boolean;
@@ -0,0 +1,4 @@
1
+ export type PageNumType = {
2
+ start: number | null;
3
+ chapStyle: string | null;
4
+ };
@@ -0,0 +1,46 @@
1
+ import type { DrawingPosition } from "./DrawingPosition";
2
+ import type { DrawingPositionType } from "./DrawingPositionType";
3
+ import type { RelativeFromHType } from "./RelativeFromHType";
4
+ import type { RelativeFromVType } from "./RelativeFromVType";
5
+ export type Pic = {
6
+ id: string;
7
+ image: Array<number>;
8
+ size: [number, number];
9
+ positionType: DrawingPositionType;
10
+ /**
11
+ * Specifies that this object shall be positioned using the positioning information in the
12
+ * simplePos child element (§20.4.2.13). This positioning, when specified, positions the
13
+ * object on the page by placing its top left point at the x-y coordinates specified by that
14
+ * element.
15
+ */
16
+ simplePos: boolean;
17
+ simplePosX: number;
18
+ simplePosY: number;
19
+ /**
20
+ * Specifies how this DrawingML object behaves when its anchor is located in a table cell;
21
+ * and its specified position would cause it to intersect with a table cell displayed in the
22
+ * document. That behavior shall be as follows:
23
+ */
24
+ layoutInCell: boolean;
25
+ /**
26
+ * Specifies the relative Z-ordering of all DrawingML objects in this document. Each floating
27
+ * DrawingML object shall have a Z-ordering value, which determines which object is
28
+ * displayed when any two objects intersect. Higher values shall indicate higher Z-order;
29
+ * lower values shall indicate lower Z-order.
30
+ */
31
+ relativeHeight: number;
32
+ allowOverlap: boolean;
33
+ positionH: DrawingPosition;
34
+ positionV: DrawingPosition;
35
+ relativeFromH: RelativeFromHType;
36
+ relativeFromV: RelativeFromVType;
37
+ /**
38
+ * Specifies the minimum distance which shall be maintained between the top edge of this drawing object and any subsequent text within the document when this graphical object is displayed within the document's contents.,
39
+ * The distance shall be measured in EMUs (English Metric Units).,
40
+ */
41
+ distT: number;
42
+ distB: number;
43
+ distL: number;
44
+ distR: number;
45
+ rot: number;
46
+ };
@@ -0,0 +1 @@
1
+ export type PicAlign = "left" | "right" | "center" | "bottom" | "top";
@@ -0,0 +1,8 @@
1
+ import type { PositionalTabAlignmentType } from "./PositionalTabAlignmentType";
2
+ import type { PositionalTabRelativeTo } from "./PositionalTabRelativeTo";
3
+ import type { TabLeaderType } from "./TabLeaderType";
4
+ export type PositionalTab = {
5
+ alignment: PositionalTabAlignmentType;
6
+ relativeTo: PositionalTabRelativeTo;
7
+ leader: TabLeaderType;
8
+ };
@@ -0,0 +1 @@
1
+ export type PositionalTabAlignmentType = "center" | "left" | "right";
@@ -0,0 +1 @@
1
+ export type PositionalTabRelativeTo = "indent" | "margin";
@@ -0,0 +1 @@
1
+ export type RelativeFromHType = "character" | "column" | "insideMargin" | "leftMargin" | "margin" | "outsizeMargin" | "page" | "rightMargin";
@@ -0,0 +1 @@
1
+ export type RelativeFromVType = "bottomMargin" | "insideMargin" | "line" | "margin" | "outsizeMargin" | "page" | "paragraph" | "topMargin";
@@ -0,0 +1,5 @@
1
+ import type { RunProperty } from "./RunProperty";
2
+ export interface Run {
3
+ runProperty: RunProperty;
4
+ children: any[];
5
+ }
@@ -0,0 +1,11 @@
1
+ export interface RunFonts {
2
+ ascii?: string;
3
+ hiAnsi?: string;
4
+ eastAsia?: string;
5
+ cs?: string;
6
+ asciiTheme?: string;
7
+ hiAnsiTheme?: string;
8
+ eastAsiaTheme?: string;
9
+ csTheme?: string;
10
+ hint?: string;
11
+ }
@@ -0,0 +1,44 @@
1
+ import type { Bold } from "./Bold";
2
+ import type { BoldCs } from "./BoldCs";
3
+ import type { Caps } from "./Caps";
4
+ import type { CharacterSpacing } from "./CharacterSpacing";
5
+ import type { Color } from "./Color";
6
+ import type { Delete } from "./Delete";
7
+ import type { FitText } from "./FitText";
8
+ import type { Highlight } from "./Highlight";
9
+ import type { Insert } from "./Insert";
10
+ import type { Italic } from "./Italic";
11
+ import type { ItalicCs } from "./ItalicCs";
12
+ import type { RunFonts } from "./RunFonts";
13
+ import type { RunStyle } from "./RunStyle";
14
+ import type { SpecVanish } from "./SpecVanish";
15
+ import type { Strike } from "./Strike";
16
+ import type { Sz } from "./Sz";
17
+ import type { SzCs } from "./SzCs";
18
+ import type { TextBorder } from "./TextBorder";
19
+ import type { Underline } from "./Underline";
20
+ import type { Vanish } from "./Vanish";
21
+ import type { VertAlign } from "./VertAlign";
22
+ export interface RunProperty {
23
+ style?: RunStyle;
24
+ sz?: Sz;
25
+ szCs?: SzCs;
26
+ color?: Color;
27
+ highlight?: Highlight;
28
+ vertAlign?: VertAlign;
29
+ underline?: Underline;
30
+ bold?: Bold;
31
+ boldCs?: BoldCs;
32
+ caps?: Caps;
33
+ italic?: Italic;
34
+ italicCs?: ItalicCs;
35
+ vanish?: Vanish;
36
+ specVanish?: SpecVanish;
37
+ characterSpacing?: CharacterSpacing;
38
+ fitText?: FitText;
39
+ fonts?: RunFonts;
40
+ textBorder?: TextBorder;
41
+ del?: Delete;
42
+ ins?: Insert;
43
+ strike?: Strike;
44
+ }
@@ -0,0 +1 @@
1
+ export type RunStyle = string;
@@ -0,0 +1,5 @@
1
+ import type { ImageData } from "./ImageData";
2
+ export type Shape = {
3
+ style: string | null;
4
+ imageData: ImageData | null;
5
+ };
@@ -0,0 +1 @@
1
+ export type SpecVanish = boolean;
@@ -0,0 +1 @@
1
+ export type Strike = boolean;
@@ -0,0 +1 @@
1
+ export type StyleWithLevel = [string, number];
@@ -0,0 +1,4 @@
1
+ export interface Sym {
2
+ font: string;
3
+ char: string;
4
+ }
@@ -0,0 +1 @@
1
+ export type Sz = number;
@@ -0,0 +1 @@
1
+ export type SzCs = number;
@@ -0,0 +1,7 @@
1
+ import type { TabLeaderType } from "./TabLeaderType";
2
+ import type { TabValueType } from "./TabValueType";
3
+ export type Tab = {
4
+ val: TabValueType | null;
5
+ leader: TabLeaderType | null;
6
+ pos: number | null;
7
+ };
@@ -0,0 +1 @@
1
+ export type TabLeaderType = "dot" | "heavy" | "hyphen" | "middleDot" | "none" | "underscore";
@@ -0,0 +1 @@
1
+ export type TabValueType = "bar" | "center" | "clear" | "decimal" | "end" | "right" | "num" | "start" | "left";
@@ -0,0 +1,9 @@
1
+ import type { BorderType } from "./BorderType";
2
+ import type { TableCellBorderPosition } from "./TableCellBorderPosition";
3
+ export type TableCellBorder = {
4
+ borderType: BorderType;
5
+ size: number;
6
+ color: string;
7
+ position: TableCellBorderPosition;
8
+ space: number;
9
+ };
@@ -0,0 +1 @@
1
+ export type TableCellBorderPosition = "left" | "right" | "top" | "bottom" | "insideH" | "insideV" | "tl2br" | "tr2bl";
@@ -0,0 +1,11 @@
1
+ import type { TableCellBorder } from "./TableCellBorder";
2
+ export type TableCellBorders = {
3
+ top: TableCellBorder | null;
4
+ left: TableCellBorder | null;
5
+ bottom: TableCellBorder | null;
6
+ right: TableCellBorder | null;
7
+ insideH: TableCellBorder | null;
8
+ insideV: TableCellBorder | null;
9
+ tr2bl: TableCellBorder | null;
10
+ tl2br: TableCellBorder | null;
11
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.tablepositionproperties?view=openxml-3.0.1
3
+ */
4
+ export type TablePositionProperty = {
5
+ leftFromText: number | null;
6
+ rightFromText: number | null;
7
+ verticalAnchor: string | null;
8
+ horizontalAnchor: string | null;
9
+ positionXAlignment: string | null;
10
+ positionYAlignment: string | null;
11
+ positionX: number | null;
12
+ positionY: number | null;
13
+ };
@@ -0,0 +1,4 @@
1
+ export interface Text {
2
+ text: string;
3
+ preserveSpace: boolean;
4
+ }
@@ -0,0 +1 @@
1
+ export type TextAlignmentType = "auto" | "baseline" | "bottom" | "center" | "top";
@@ -0,0 +1,7 @@
1
+ import type { BorderType } from "./BorderType";
2
+ export interface TextBorder {
3
+ borderType: BorderType;
4
+ size: number;
5
+ color: string;
6
+ space: number;
7
+ }
@@ -0,0 +1,4 @@
1
+ import type { FontScheme } from "./FontScheme";
2
+ export type Theme = {
3
+ fontSchema: FontScheme;
4
+ };
@@ -0,0 +1 @@
1
+ export type Underline = string;
@@ -0,0 +1 @@
1
+ export type Vanish = boolean;
@@ -0,0 +1 @@
1
+ export type VertAlign = string;
@@ -0,0 +1,7 @@
1
+ export type BorderJSON = {
2
+ position: string;
3
+ borderType: string;
4
+ size: number;
5
+ space: number;
6
+ color: string;
7
+ };
@@ -0,0 +1,22 @@
1
+ import { ParagraphJSON, TableJSON } from "../";
2
+ export type CommentChildJSON = ParagraphJSON | TableJSON;
3
+ export type CommentJSON = {
4
+ id: number;
5
+ author: string;
6
+ date: string;
7
+ children: CommentChildJSON[];
8
+ parentCommentId: number | null;
9
+ };
10
+ export type CommentRangeStartJSON = {
11
+ type: "commentRangeStart";
12
+ data: {
13
+ id: number;
14
+ comment: CommentJSON;
15
+ };
16
+ };
17
+ export type CommentRangeEndJSON = {
18
+ type: "commentRangeEnd";
19
+ data: {
20
+ id: number;
21
+ };
22
+ };
@@ -0,0 +1,11 @@
1
+ import { ParagraphJSON, BookmarkStartJSON, BookmarkEndJSON } from "./paragraph";
2
+ import { TableJSON } from "./table";
3
+ import { SectionPropertyJSON } from "./section-property";
4
+ import { CommentRangeStartJSON, CommentRangeEndJSON } from "..";
5
+ import { StructuredTagJSON } from "./structured-data-tag";
6
+ export type DocumentChildJSON = ParagraphJSON | TableJSON | CommentRangeStartJSON | CommentRangeEndJSON | BookmarkStartJSON | BookmarkEndJSON | StructuredTagJSON;
7
+ export type DocumentJSON = {
8
+ children: DocumentChildJSON[];
9
+ sectionProperty: SectionPropertyJSON;
10
+ hasNumbering: boolean;
11
+ };
@@ -0,0 +1,45 @@
1
+ import { TextBoxContentJSON } from "./textbox-content";
2
+ import { Pic as InnerPic } from "./bindings/Pic";
3
+ import { ParagraphJSON, TableJSON } from "..";
4
+ export interface Pic extends Omit<InnerPic, "image"> {
5
+ image: string;
6
+ }
7
+ export type DrawingJSON = {
8
+ type: "drawing";
9
+ data: {
10
+ type: "pic";
11
+ data: Pic;
12
+ } | {
13
+ type: "textBox";
14
+ data: {
15
+ children: (ParagraphJSON | TableJSON)[];
16
+ };
17
+ };
18
+ };
19
+ export type WpAnchorJSON = {
20
+ type: "anchor";
21
+ data: {
22
+ children: AGraphicJSON[];
23
+ };
24
+ };
25
+ export type AGraphicJSON = {
26
+ children: AGraphChildJSON[];
27
+ };
28
+ export type AGraphChildJSON = AGraphicDataJSON;
29
+ export type AGraphicDataJSON = {
30
+ dataType: "wpShape";
31
+ children: WpsShapeJSON[];
32
+ };
33
+ export type WpsShapeJSON = {
34
+ type: "shape";
35
+ data: {
36
+ children: WpsShapeChildJSON[];
37
+ };
38
+ };
39
+ export type WpsShapeChildJSON = WpsTextBoxJSON;
40
+ export type WpsTextBoxJSON = {
41
+ type: "textbox";
42
+ data: {
43
+ children: TextBoxContentJSON[];
44
+ };
45
+ };
@@ -0,0 +1,13 @@
1
+ import { ParagraphJSON } from "./paragraph";
2
+ import { StructuredTagJSON } from "./structured-data-tag";
3
+ import { TableJSON } from "./table";
4
+ export type FooterJSON = [
5
+ string,
6
+ {
7
+ children: (ParagraphJSON | TableJSON | StructuredTagJSON)[];
8
+ }
9
+ ];
10
+ export type FooterReferenceJSON = {
11
+ footerType: string;
12
+ id: string;
13
+ };
@@ -0,0 +1,13 @@
1
+ import { ParagraphJSON } from "./paragraph";
2
+ import { StructuredTagJSON } from "./structured-data-tag";
3
+ import { TableJSON } from "./table";
4
+ export type HeaderJSON = [
5
+ string,
6
+ {
7
+ children: (ParagraphJSON | TableJSON | StructuredTagJSON)[];
8
+ }
9
+ ];
10
+ export type HeaderReferenceJSON = {
11
+ headerType: string;
12
+ id: string;
13
+ };
@@ -0,0 +1,11 @@
1
+ export type IndentJSON = {
2
+ start: number | null;
3
+ end: number | null;
4
+ specialIndent: {
5
+ type: "firstLine" | "hanging";
6
+ val: number;
7
+ } | null;
8
+ startChars: number | null;
9
+ hangingChars: number | null;
10
+ firstLineChars: number | null;
11
+ };