@a3s-lab/office 0.2.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/COLLABORATION_ROADMAP.md +426 -0
  2. package/README.md +649 -10
  3. package/dist/0~1403.js +1 -1
  4. package/dist/0~2805.js +1279 -0
  5. package/dist/{0~use-office-draft.js → 0~345.js} +30 -1
  6. package/dist/0~3539.js +1 -1
  7. package/dist/0~3557.js +1 -1
  8. package/dist/0~3635.js +1 -1
  9. package/dist/0~4595.js +123 -12
  10. package/dist/0~4980.js +154 -0
  11. package/dist/0~5050.js +124 -113
  12. package/dist/{0~9512.js → 0~6090.js} +540 -3
  13. package/dist/0~7048.js +92 -66
  14. package/dist/0~7614.js +2 -1
  15. package/dist/0~7754.js +5653 -0
  16. package/dist/0~9445.js +1 -1
  17. package/dist/0~document-editor.js +4992 -3323
  18. package/dist/0~markdown-editor.js +250 -44
  19. package/dist/0~pdf-viewer.js +1016 -24
  20. package/dist/0~presentation-editor.js +179 -8
  21. package/dist/0~spreadsheet-editor.js +3371 -578
  22. package/dist/0~work-docx-export.js +6801 -658
  23. package/dist/0~work-docx-import.js +1388 -795
  24. package/dist/0~work-office-diagnostics.js +524 -30
  25. package/dist/0~work-pptx-export.js +2 -1
  26. package/dist/0~work-pptx-import.js +1 -2
  27. package/dist/0~work-presentation-charts.js +1 -1
  28. package/dist/2591.js +197 -0
  29. package/dist/3818.js +1090 -0
  30. package/dist/4104.js +970 -60
  31. package/dist/432.js +171 -14
  32. package/dist/4476.js +2008 -0
  33. package/dist/4560.js +674 -0
  34. package/dist/4650.js +70 -0
  35. package/dist/{1134.js → 5184.js} +183 -1
  36. package/dist/6489.js +18 -18
  37. package/dist/7060.js +132 -0
  38. package/dist/8715.js +2 -136
  39. package/dist/8928.js +16778 -0
  40. package/dist/9787.js +209 -0
  41. package/dist/core.d.ts +29 -9
  42. package/dist/core.js +10 -2
  43. package/dist/index.js +13 -3
  44. package/dist/internal/collaboration/office-collaboration-flat-json.d.ts +13 -0
  45. package/dist/internal/collaboration/office-collaboration-json.d.ts +4 -0
  46. package/dist/internal/collaboration/office-collaboration-presence.d.ts +86 -0
  47. package/dist/internal/collaboration/office-collaboration-transport.d.ts +42 -0
  48. package/dist/internal/collaboration/office-collaboration.d.ts +85 -0
  49. package/dist/internal/collaboration/office-document-collaboration-bibliography.d.ts +7 -0
  50. package/dist/internal/collaboration/office-document-collaboration-claims.d.ts +9 -0
  51. package/dist/internal/collaboration/office-document-collaboration-comments.d.ts +7 -0
  52. package/dist/internal/collaboration/office-document-collaboration-sidecar-utils.d.ts +27 -0
  53. package/dist/internal/collaboration/office-document-collaboration-sidecars.d.ts +16 -0
  54. package/dist/internal/collaboration/office-document-collaboration.d.ts +45 -0
  55. package/dist/internal/collaboration/office-markdown-collaboration.d.ts +31 -0
  56. package/dist/internal/collaboration/office-pdf-collaboration-claims.d.ts +4 -0
  57. package/dist/internal/collaboration/office-pdf-collaboration-conflicts.d.ts +2 -0
  58. package/dist/internal/collaboration/office-pdf-collaboration-model.d.ts +26 -0
  59. package/dist/internal/collaboration/office-pdf-collaboration-records.d.ts +21 -0
  60. package/dist/internal/collaboration/office-pdf-collaboration-types.d.ts +91 -0
  61. package/dist/internal/collaboration/office-pdf-collaboration-validation.d.ts +4 -0
  62. package/dist/internal/collaboration/office-pdf-collaboration.d.ts +35 -0
  63. package/dist/internal/collaboration/office-presentation-collaboration-model.d.ts +25 -0
  64. package/dist/internal/collaboration/office-presentation-collaboration-records.d.ts +22 -0
  65. package/dist/internal/collaboration/office-presentation-collaboration-validation.d.ts +4 -0
  66. package/dist/internal/collaboration/office-presentation-collaboration.d.ts +32 -0
  67. package/dist/internal/collaboration/office-spreadsheet-collaboration-cells.d.ts +13 -0
  68. package/dist/internal/collaboration/office-spreadsheet-collaboration-claims.d.ts +4 -0
  69. package/dist/internal/collaboration/office-spreadsheet-collaboration-conflicts.d.ts +2 -0
  70. package/dist/internal/collaboration/office-spreadsheet-collaboration-flat-json.d.ts +10 -0
  71. package/dist/internal/collaboration/office-spreadsheet-collaboration-model.d.ts +31 -0
  72. package/dist/internal/collaboration/office-spreadsheet-collaboration-records.d.ts +17 -0
  73. package/dist/internal/collaboration/office-spreadsheet-collaboration-validation.d.ts +4 -0
  74. package/dist/internal/collaboration/office-spreadsheet-collaboration.d.ts +32 -0
  75. package/dist/internal/design-system/primitives/navigation/tabs.d.ts +3 -1
  76. package/dist/internal/features/work/components/work-document-page-border.d.ts +6 -0
  77. package/dist/internal/features/work/editors/document-command-catalog.d.ts +536 -0
  78. package/dist/internal/features/work/editors/document-editor-focus.d.ts +1 -1
  79. package/dist/internal/features/work/editors/document-editor-support.d.ts +7 -3
  80. package/dist/internal/features/work/editors/document-editor.d.ts +8 -2
  81. package/dist/internal/features/work/editors/document-external-content.d.ts +14 -0
  82. package/dist/internal/features/work/editors/document-format-clipboard.d.ts +6 -0
  83. package/dist/internal/features/work/editors/document-format-tools.d.ts +4 -0
  84. package/dist/internal/features/work/editors/document-layout-panel.d.ts +4 -1
  85. package/dist/internal/features/work/editors/document-page-chrome-wps-shortcuts.d.ts +2 -0
  86. package/dist/internal/features/work/editors/document-page-layout-ribbon.d.ts +14 -0
  87. package/dist/internal/features/work/editors/document-page-stack.d.ts +10 -1
  88. package/dist/internal/features/work/editors/document-page-thumbnail.d.ts +2 -0
  89. package/dist/internal/features/work/editors/document-pagination-run-coordinator.d.ts +26 -0
  90. package/dist/internal/features/work/editors/document-picture-properties-dialog-model.d.ts +20 -1
  91. package/dist/internal/features/work/editors/document-review-navigation.d.ts +9 -0
  92. package/dist/internal/features/work/editors/document-statistics-dialog.d.ts +7 -0
  93. package/dist/internal/features/work/editors/document-status-bar.d.ts +2 -1
  94. package/dist/internal/features/work/editors/document-table-properties-dialog-model.d.ts +4 -1
  95. package/dist/internal/features/work/editors/document-toolbar.d.ts +19 -42
  96. package/dist/internal/features/work/editors/document-wps-shortcuts.d.ts +12 -0
  97. package/dist/internal/features/work/editors/document-zoom.d.ts +17 -0
  98. package/dist/internal/features/work/editors/markdown-editor-focus.d.ts +1 -1
  99. package/dist/internal/features/work/editors/markdown-editor.d.ts +5 -1
  100. package/dist/internal/features/work/editors/markdown-toolbar.d.ts +2 -1
  101. package/dist/internal/features/work/editors/office-collaboration-participants.d.ts +3 -0
  102. package/dist/internal/features/work/editors/office-collaboration-presence-context.d.ts +17 -0
  103. package/dist/internal/features/work/editors/office-collaboration-presence-ui.d.ts +25 -0
  104. package/dist/internal/features/work/editors/office-editor-focus-handoff.d.ts +27 -0
  105. package/dist/internal/features/work/editors/pdf-annotation-controller.d.ts +5 -0
  106. package/dist/internal/features/work/editors/pdf-collaboration-presence.d.ts +3 -0
  107. package/dist/internal/features/work/editors/pdf-collaboration-projection.d.ts +10 -0
  108. package/dist/internal/features/work/editors/pdf-evidence-contract.d.ts +36 -0
  109. package/dist/internal/features/work/editors/pdf-evidence-overlay.d.ts +37 -0
  110. package/dist/internal/features/work/editors/pdf-toolbar.d.ts +2 -1
  111. package/dist/internal/features/work/editors/pdf-viewer-controller.d.ts +7 -1
  112. package/dist/internal/features/work/editors/pdf-viewer.d.ts +11 -1
  113. package/dist/internal/features/work/editors/presentation-collaboration-presence.d.ts +5 -0
  114. package/dist/internal/features/work/editors/presentation-editor-focus.d.ts +3 -2
  115. package/dist/internal/features/work/editors/presentation-editor-types.d.ts +3 -0
  116. package/dist/internal/features/work/editors/presentation-editor.d.ts +1 -1
  117. package/dist/internal/features/work/editors/spreadsheet-auto-filter.d.ts +9 -0
  118. package/dist/internal/features/work/editors/spreadsheet-cell-clear.d.ts +3 -0
  119. package/dist/internal/features/work/editors/spreadsheet-cell-merge.d.ts +12 -0
  120. package/dist/internal/features/work/editors/spreadsheet-clipboard-shortcuts.d.ts +3 -7
  121. package/dist/internal/features/work/editors/spreadsheet-collaboration-presence.d.ts +9 -0
  122. package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +464 -0
  123. package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +45 -9
  124. package/dist/internal/features/work/editors/spreadsheet-context-menu.d.ts +2 -0
  125. package/dist/internal/features/work/editors/spreadsheet-editor-ribbon.d.ts +9 -28
  126. package/dist/internal/features/work/editors/spreadsheet-editor.d.ts +8 -2
  127. package/dist/internal/features/work/editors/spreadsheet-format-painter.d.ts +27 -0
  128. package/dist/internal/features/work/editors/spreadsheet-freeze-panes.d.ts +14 -0
  129. package/dist/internal/features/work/editors/use-document-insert-commands.d.ts +3 -2
  130. package/dist/internal/features/work/editors/use-document-pagination.d.ts +6 -1
  131. package/dist/internal/features/work/editors/use-document-review-conflicts.d.ts +28 -0
  132. package/dist/internal/features/work/editors/use-spreadsheet-auto-filter.d.ts +21 -0
  133. package/dist/internal/features/work/editors/use-spreadsheet-collaboration.d.ts +27 -0
  134. package/dist/internal/features/work/editors/use-spreadsheet-format-painter.d.ts +18 -0
  135. package/dist/internal/features/work/editors/work-office-chrome.d.ts +22 -3
  136. package/dist/internal/features/work/editors/work-office-ribbon-overflow.d.ts +2 -0
  137. package/dist/internal/features/work/work-document-bookmark-references.d.ts +37 -0
  138. package/dist/internal/features/work/work-document-bookmarks.d.ts +29 -0
  139. package/dist/internal/features/work/work-document-caption-nodes.d.ts +4 -1
  140. package/dist/internal/features/work/work-document-comments.d.ts +1 -1
  141. package/dist/internal/features/work/work-document-equations.d.ts +513 -0
  142. package/dist/internal/features/work/work-document-extensions.d.ts +1 -0
  143. package/dist/internal/features/work/work-document-field-identity.d.ts +2 -0
  144. package/dist/internal/features/work/work-document-field-node.d.ts +2 -2
  145. package/dist/internal/features/work/work-document-fields.d.ts +7 -0
  146. package/dist/internal/features/work/work-document-image-identity.d.ts +30 -0
  147. package/dist/internal/features/work/work-document-image-layout.d.ts +46 -1
  148. package/dist/internal/features/work/work-document-image-wrap-contour.d.ts +16 -0
  149. package/dist/internal/features/work/work-document-incremental-layout.d.ts +2 -2
  150. package/dist/internal/features/work/work-document-model-codec.d.ts +4 -1
  151. package/dist/internal/features/work/work-document-note-integrity.d.ts +2 -0
  152. package/dist/internal/features/work/work-document-page-borders.d.ts +25 -0
  153. package/dist/internal/features/work/work-document-page-capture.d.ts +8 -0
  154. package/dist/internal/features/work/work-document-page-frames.d.ts +15 -0
  155. package/dist/internal/features/work/work-document-page-margins.d.ts +56 -0
  156. package/dist/internal/features/work/work-document-page-size.d.ts +47 -0
  157. package/dist/internal/features/work/work-document-pagination-measurement.d.ts +1 -2
  158. package/dist/internal/features/work/work-document-pagination-types.d.ts +7 -2
  159. package/dist/internal/features/work/work-document-pagination.d.ts +2 -2
  160. package/dist/internal/features/work/work-document-paragraph-borders.d.ts +32 -0
  161. package/dist/internal/features/work/work-document-paragraph-identity.d.ts +26 -0
  162. package/dist/internal/features/work/work-document-paragraph-shading.d.ts +18 -0
  163. package/dist/internal/features/work/work-document-review-conflicts.d.ts +35 -0
  164. package/dist/internal/features/work/work-document-section.d.ts +4 -0
  165. package/dist/internal/features/work/work-document-snapshot.d.ts +19 -0
  166. package/dist/internal/features/work/work-document-source.d.ts +23 -0
  167. package/dist/internal/features/work/work-document-table-column-widths.d.ts +7 -0
  168. package/dist/internal/features/work/work-document-table-property-changes.d.ts +3 -0
  169. package/dist/internal/features/work/work-document-table-row-identity.d.ts +15 -0
  170. package/dist/internal/features/work/work-document-table-sizing.d.ts +3 -0
  171. package/dist/internal/features/work/work-document-text-layout.d.ts +3 -1
  172. package/dist/internal/features/work/work-document-word-line-metrics.d.ts +2 -0
  173. package/dist/internal/features/work/work-docx-bookmark-diagnostics.d.ts +3 -0
  174. package/dist/internal/features/work/work-docx-bookmark-import.d.ts +24 -0
  175. package/dist/internal/features/work/work-docx-bookmarks.d.ts +17 -0
  176. package/dist/internal/features/work/work-docx-comment-durable-id-preservation.d.ts +2 -0
  177. package/dist/internal/features/work/work-docx-comment-export.d.ts +3 -0
  178. package/dist/internal/features/work/work-docx-comment-metadata.d.ts +2 -0
  179. package/dist/internal/features/work/work-docx-drawing-extension-preservation.d.ts +4 -0
  180. package/dist/internal/features/work/work-docx-equation-diagnostics.d.ts +3 -0
  181. package/dist/internal/features/work/work-docx-equation-export.d.ts +14 -0
  182. package/dist/internal/features/work/work-docx-equation-import.d.ts +30 -0
  183. package/dist/internal/features/work/work-docx-equation-story.d.ts +9 -0
  184. package/dist/internal/features/work/work-docx-export-formatting.d.ts +3 -1
  185. package/dist/internal/features/work/work-docx-export-image.d.ts +5 -1
  186. package/dist/internal/features/work/work-docx-export.d.ts +1 -1
  187. package/dist/internal/features/work/work-docx-field-instructions.d.ts +8 -0
  188. package/dist/internal/features/work/work-docx-font-table-preservation.d.ts +3 -0
  189. package/dist/internal/features/work/work-docx-ignorable-extension-preservation.d.ts +15 -0
  190. package/dist/internal/features/work/work-docx-image-crop.d.ts +12 -0
  191. package/dist/internal/features/work/work-docx-image-identity.d.ts +17 -0
  192. package/dist/internal/features/work/work-docx-image-layer.d.ts +12 -0
  193. package/dist/internal/features/work/work-docx-image-layout-import.d.ts +14 -2
  194. package/dist/internal/features/work/work-docx-image-wrap.d.ts +15 -0
  195. package/dist/internal/features/work/work-docx-import.d.ts +13 -3
  196. package/dist/internal/features/work/work-docx-list-export.d.ts +18 -0
  197. package/dist/internal/features/work/work-docx-list-import.d.ts +14 -0
  198. package/dist/internal/features/work/work-docx-note-comment-content-control-block-preservation.d.ts +18 -0
  199. package/dist/internal/features/work/work-docx-note-comment-content-control-model.d.ts +47 -0
  200. package/dist/internal/features/work/work-docx-note-comment-content-control-preservation.d.ts +4 -0
  201. package/dist/internal/features/work/work-docx-note-comment-content-control-properties.d.ts +17 -0
  202. package/dist/internal/features/work/work-docx-note-comment-content-control-table-model.d.ts +17 -0
  203. package/dist/internal/features/work/work-docx-note-comment-content-control-xml.d.ts +14 -0
  204. package/dist/internal/features/work/work-docx-note-comment-extension-preservation.d.ts +2 -0
  205. package/dist/internal/features/work/work-docx-note-comment-hyperlink-content.d.ts +40 -0
  206. package/dist/internal/features/work/work-docx-note-comment-hyperlink-preservation.d.ts +5 -0
  207. package/dist/internal/features/work/work-docx-note-comment-hyperlink-relationships.d.ts +35 -0
  208. package/dist/internal/features/work/work-docx-note-comment-identity.d.ts +15 -0
  209. package/dist/internal/features/work/work-docx-note-comment-run-preservation.d.ts +4 -0
  210. package/dist/internal/features/work/work-docx-note-comment-run-properties.d.ts +2 -0
  211. package/dist/internal/features/work/work-docx-note-image-import.d.ts +12 -0
  212. package/dist/internal/features/work/work-docx-note-image-relationships.d.ts +1 -0
  213. package/dist/internal/features/work/work-docx-numbering-extension-preservation.d.ts +6 -0
  214. package/dist/internal/features/work/work-docx-numbering.d.ts +1 -0
  215. package/dist/internal/features/work/work-docx-page-borders-diagnostics.d.ts +3 -0
  216. package/dist/internal/features/work/work-docx-page-borders-import.d.ts +10 -0
  217. package/dist/internal/features/work/work-docx-page-margins-diagnostics.d.ts +3 -0
  218. package/dist/internal/features/work/work-docx-page-margins-import.d.ts +18 -0
  219. package/dist/internal/features/work/work-docx-page-size-diagnostics.d.ts +2 -0
  220. package/dist/internal/features/work/work-docx-page-size-import.d.ts +17 -0
  221. package/dist/internal/features/work/work-docx-paragraph-borders-diagnostics.d.ts +3 -0
  222. package/dist/internal/features/work/work-docx-paragraph-borders-export.d.ts +18 -0
  223. package/dist/internal/features/work/work-docx-paragraph-borders-import.d.ts +24 -0
  224. package/dist/internal/features/work/work-docx-paragraph-default-collapsed.d.ts +19 -0
  225. package/dist/internal/features/work/work-docx-paragraph-extension-preservation.d.ts +2 -0
  226. package/dist/internal/features/work/work-docx-paragraph-identity-import.d.ts +10 -0
  227. package/dist/internal/features/work/work-docx-paragraph-identity.d.ts +18 -0
  228. package/dist/internal/features/work/work-docx-paragraph-pagination-import.d.ts +6 -1
  229. package/dist/internal/features/work/work-docx-paragraph-shading-diagnostics.d.ts +3 -0
  230. package/dist/internal/features/work/work-docx-paragraph-shading-export.d.ts +5 -0
  231. package/dist/internal/features/work/work-docx-paragraph-shading-import.d.ts +18 -0
  232. package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +3 -0
  233. package/dist/internal/features/work/work-docx-settings-preservation.d.ts +10 -0
  234. package/dist/internal/features/work/work-docx-settings-xml.d.ts +16 -0
  235. package/dist/internal/features/work/work-docx-style-extension-preservation.d.ts +2 -0
  236. package/dist/internal/features/work/work-docx-table-cell-export.d.ts +2 -1
  237. package/dist/internal/features/work/work-docx-table-cell-import.d.ts +3 -0
  238. package/dist/internal/features/work/work-docx-table-extension-preservation.d.ts +2 -0
  239. package/dist/internal/features/work/work-docx-table-row-import.d.ts +2 -0
  240. package/dist/internal/features/work/work-docx-table-sizing-import.d.ts +1 -0
  241. package/dist/internal/features/work/work-docx-theme-reference.d.ts +23 -0
  242. package/dist/internal/features/work/work-docx-theme.d.ts +4 -1
  243. package/dist/internal/features/work/work-docx-twips.d.ts +12 -0
  244. package/dist/internal/features/work/work-file-contract.d.ts +1 -0
  245. package/dist/internal/features/work/work-file-io.d.ts +1 -1
  246. package/dist/internal/features/work/work-markdown-extensions.d.ts +4 -1
  247. package/dist/internal/features/work/work-ooxml-package-preservation.d.ts +12 -0
  248. package/dist/internal/features/work/work-ooxml-package-security.d.ts +6 -0
  249. package/dist/internal/features/work/work-ooxml-relationship-preservation.d.ts +10 -0
  250. package/dist/internal/features/work/work-ooxml-xml.d.ts +2 -0
  251. package/dist/internal/features/work/work-pdf-export.d.ts +10 -0
  252. package/dist/internal/features/work/work-repository.d.ts +2 -0
  253. package/dist/internal/features/work/work-types.d.ts +15 -2
  254. package/dist/internal/kernel/office-kernel-client-types.d.ts +1 -0
  255. package/dist/internal/kernel/office-kernel-protocol.d.ts +7 -0
  256. package/dist/internal/kernel/office-kernel-version.d.ts +1 -1
  257. package/dist/office-kernel.wasm +0 -0
  258. package/dist/office-kernel.worker.js +93 -41
  259. package/dist/react.d.ts +18 -12
  260. package/dist/react.js +1 -1
  261. package/dist/styles.css +1367 -16
  262. package/dist/vue.d.ts +48 -5
  263. package/dist/vue.js +42 -3
  264. package/dist/web-component.d.ts +24 -2
  265. package/dist/web-component.js +101 -2
  266. package/docs/latest/en/browser-editor-architecture.md +262 -47
  267. package/package.json +29 -4
  268. package/dist/0~152.js +0 -94
  269. package/dist/0~2582.js +0 -485
  270. package/dist/0~4750.js +0 -939
  271. package/dist/0~5861.js +0 -596
  272. package/dist/0~work-document-extensions.js +0 -3045
  273. package/dist/0~work-document-model-codec.js +0 -42
  274. package/dist/0~work-docx-bibliography.js +0 -347
  275. package/dist/0~work-docx-page-color.js +0 -42
  276. package/dist/2881.js +0 -1455
  277. package/dist/8728.js +0 -723
@@ -3,9 +3,11 @@ declare module '@tiptap/extension-text-style' {
3
3
  interface TextStyleAttributes {
4
4
  wordLineHeightFactor?: number | null;
5
5
  wordSnapToGrid?: boolean | null;
6
+ themeColor?: string | null;
6
7
  }
7
8
  }
8
9
  export declare function documentWordLineHeightFactor(fontFamily: unknown): number;
9
10
  export declare function normalizedDocumentWordLineHeightFactor(value: unknown): number | null;
10
11
  export declare const DocumentTextStyle: import("@tiptap/core").Mark<import("@tiptap/extension-text-style").TextStyleOptions, any>;
12
+ export declare const DocumentHighlight: import("@tiptap/core").Mark<import("@tiptap/extension-highlight").HighlightOptions, any>;
11
13
  export declare const DocumentFontFamily: import("@tiptap/core").Extension<import("@tiptap/extension-text-style/font-family").FontFamilyOptions, any>;
@@ -0,0 +1,3 @@
1
+ import { type OoxmlPackage } from './work-ooxml-package';
2
+ import type { WorkCompatibilityIssue } from './work-types';
3
+ export declare function diagnoseDocxBookmarksAndLinks(archive: OoxmlPackage, document: Document): Promise<WorkCompatibilityIssue[]>;
@@ -0,0 +1,24 @@
1
+ export interface ImportedDocxBookmarkMarkers {
2
+ bookmarks: ImportedDocxBookmarkMarker[];
3
+ references: ImportedDocxBookmarkReferenceMarker[];
4
+ }
5
+ interface ImportedDocxBookmarkMarker {
6
+ start: string;
7
+ end: string;
8
+ id: string;
9
+ name: string;
10
+ sourceName: string;
11
+ nativeId: number;
12
+ }
13
+ interface ImportedDocxBookmarkReferenceMarker {
14
+ start: string;
15
+ end: string;
16
+ targetId: string;
17
+ targetName: string;
18
+ instruction: string;
19
+ display: string;
20
+ }
21
+ export declare function markDocxBookmarks(document: Document): ImportedDocxBookmarkMarkers;
22
+ export declare function applyImportedDocxBookmarkMarkers(document: Document, markers: ImportedDocxBookmarkMarkers): void;
23
+ export declare function hasImportedDocxBookmarkMarkers(markers: ImportedDocxBookmarkMarkers): boolean;
24
+ export {};
@@ -0,0 +1,17 @@
1
+ import { type WorkDocumentBookmarkBoundaryKind } from './work-document-bookmarks';
2
+ interface DocxBookmarkBoundaryPatch {
3
+ marker: string;
4
+ id: string;
5
+ name: string;
6
+ nativeId: number;
7
+ kind: WorkDocumentBookmarkBoundaryKind;
8
+ }
9
+ export declare class DocxBookmarkPatchCollector {
10
+ private readonly sourceHtml;
11
+ readonly patches: DocxBookmarkBoundaryPatch[];
12
+ private nextMarker;
13
+ constructor(sourceHtml: string);
14
+ register(element: HTMLElement): string | null;
15
+ }
16
+ export declare function patchDocxBookmarks(buffer: ArrayBuffer, patches: readonly DocxBookmarkBoundaryPatch[]): Promise<ArrayBuffer>;
17
+ export {};
@@ -0,0 +1,2 @@
1
+ import type JSZip from 'jszip';
2
+ export declare function preserveDocxCommentDurableIds(generated: JSZip, source: JSZip, sourcePath: string): Promise<boolean>;
@@ -0,0 +1,3 @@
1
+ import type { ICommentOptions } from 'docx';
2
+ import type { AssignedDocxCommentThread } from './work-docx-note-comment-identity';
3
+ export declare function createDocxCommentRecords(threads: readonly AssignedDocxCommentThread[], docx: typeof import('docx'), commentIds: Map<string, number>): ICommentOptions[];
@@ -0,0 +1,2 @@
1
+ import { type AssignedDocxCommentThread } from './work-docx-note-comment-identity';
2
+ export declare function patchDocxCommentMetadata(buffer: ArrayBuffer, threads: readonly AssignedDocxCommentThread[]): Promise<ArrayBuffer>;
@@ -0,0 +1,4 @@
1
+ import type JSZip from 'jszip';
2
+ import { type DocxIgnorableExtensionPair } from './work-docx-ignorable-extension-preservation';
3
+ export declare function preserveDocxDrawingExtensions(generated: JSZip, source: JSZip, generatedPaths: readonly string[], sourcePaths: readonly string[]): Promise<void>;
4
+ export declare function preserveDocxDrawingExtensionsAtScopes(generatedDocument: Document, sourceDocument: Document, scopes: readonly DocxIgnorableExtensionPair[]): void;
@@ -0,0 +1,3 @@
1
+ import type { OoxmlPackage } from './work-ooxml-package';
2
+ import type { WorkCompatibilityIssue } from './work-types';
3
+ export declare function diagnoseDocxEquations(archive: OoxmlPackage, document: Document | null): Promise<WorkCompatibilityIssue[]>;
@@ -0,0 +1,14 @@
1
+ import { type WorkDocumentEquation } from './work-document-equations';
2
+ interface DocxEquationPatch {
3
+ marker: string;
4
+ equation: WorkDocumentEquation;
5
+ }
6
+ export declare class DocxEquationPatchCollector {
7
+ private readonly source;
8
+ readonly patches: DocxEquationPatch[];
9
+ private nextMarker;
10
+ constructor(source: string);
11
+ marker(element: HTMLElement): string | null;
12
+ }
13
+ export declare function patchDocxEquations(buffer: ArrayBuffer, patches: readonly DocxEquationPatch[]): Promise<ArrayBuffer>;
14
+ export {};
@@ -0,0 +1,30 @@
1
+ import { type WorkDocumentEquation } from './work-document-equations';
2
+ import { type OoxmlPackage } from './work-ooxml-package';
3
+ export interface ImportedDocxEquationMarkers {
4
+ equations: ImportedDocxEquationMarker[];
5
+ }
6
+ export interface MarkedDocxEquationPart {
7
+ document: Document;
8
+ path: string;
9
+ }
10
+ export interface DocxEquationInspection {
11
+ equation: WorkDocumentEquation | null;
12
+ text: string;
13
+ status: 'supported' | 'unsupported' | 'spoofed';
14
+ }
15
+ interface ImportedDocxEquationMarker {
16
+ marker: string;
17
+ equation: WorkDocumentEquation;
18
+ }
19
+ export declare function markDocxPackageEquations(archive: OoxmlPackage, document: Document, existingParts?: readonly MarkedDocxEquationPart[]): Promise<{
20
+ markers: ImportedDocxEquationMarkers;
21
+ parts: MarkedDocxEquationPart[];
22
+ changed: boolean;
23
+ }>;
24
+ export declare function applyImportedDocxEquationMarkers(document: Document, markers: ImportedDocxEquationMarkers): void;
25
+ export declare function hasImportedDocxEquationMarkers(markers: ImportedDocxEquationMarkers): boolean;
26
+ export declare function inspectDocxEquation(element: Element): DocxEquationInspection;
27
+ export declare function docxEquationPlainText(element: Element): string;
28
+ export declare function isSupportedDocxEquationPlacement(element: Element): boolean;
29
+ export declare function docxEquationHtml(element: Element): string;
30
+ export {};
@@ -0,0 +1,9 @@
1
+ export type DocxEquationPlacement = 'inline' | 'block';
2
+ export declare function isDocxEquationLikeRoot(element: Element): boolean;
3
+ export declare function closestDocxEquationLikeRoot(element: Element | null): Element | null;
4
+ export declare function docxEquationPlacement(element: Element): DocxEquationPlacement | null;
5
+ export declare function docxEquationWordReplacement(document: Document, source: Element, text: string, placement: DocxEquationPlacement): Element;
6
+ export declare function docxEquationWordFallbackForContext(document: Document, source: Element, text: string, placement: DocxEquationPlacement | null): Element | null;
7
+ export declare function replaceDocxEquationTextMarker(text: Text, marker: string, replacement: HTMLElement): void;
8
+ export declare function docxEquationTextNodes(root: ParentNode): Text[];
9
+ export declare function escapeDocxEquationHtml(value: string): string;
@@ -1,5 +1,5 @@
1
1
  import type { TabStopDefinition } from 'docx';
2
- export declare function paragraphAlignment(element: HTMLElement, docx: typeof import('docx')): "right" | "left" | "center" | "both" | undefined;
2
+ export declare function paragraphAlignment(element: HTMLElement, docx: typeof import('docx')): "center" | "right" | "left" | "both" | undefined;
3
3
  export declare function paragraphDirectionOptions(element: HTMLElement): {
4
4
  bidirectional?: boolean;
5
5
  };
@@ -18,10 +18,12 @@ export declare function paragraphIndent(element: HTMLElement, tag: string): {
18
18
  firstLine?: number;
19
19
  } | undefined;
20
20
  export declare function paragraphPaginationOptions(element: HTMLElement): {
21
+ outlineLevel?: number | undefined;
21
22
  keepLines: boolean | undefined;
22
23
  keepNext: boolean | undefined;
23
24
  pageBreakBefore: boolean | undefined;
24
25
  widowControl: boolean | undefined;
26
+ contextualSpacing: boolean | undefined;
25
27
  };
26
28
  export declare function paragraphTabStops(element: HTMLElement, docx: typeof import('docx')): TabStopDefinition[] | undefined;
27
29
  export declare function dataBoolean(value: string | undefined): boolean | undefined;
@@ -1,2 +1,6 @@
1
1
  import type { ParagraphChild } from 'docx';
2
- export declare function imageToDocx(element: HTMLImageElement, docx: typeof import('docx')): Promise<ParagraphChild>;
2
+ import type { DocxImageCropPatchCollector } from './work-docx-image-crop';
3
+ import type { DocxImageIdentityPatchCollector } from './work-docx-image-identity';
4
+ import type { DocxImageLayerPatchCollector } from './work-docx-image-layer';
5
+ import type { DocxImageWrapPatchCollector } from './work-docx-image-wrap';
6
+ export declare function imageToDocx(element: HTMLImageElement, docx: typeof import('docx'), cropPatches?: DocxImageCropPatchCollector, wrapPatches?: DocxImageWrapPatchCollector, layerPatches?: DocxImageLayerPatchCollector, identityPatches?: DocxImageIdentityPatchCollector): Promise<ParagraphChild>;
@@ -1,2 +1,2 @@
1
1
  import type { WorkDocumentContent } from './work-types';
2
- export declare function createDocxBlob(content: WorkDocumentContent): Promise<Blob>;
2
+ export declare function createDocxBlob(content: WorkDocumentContent, sourcePackage?: ArrayBuffer): Promise<Blob>;
@@ -2,7 +2,15 @@ export interface DocxFieldOccurrence {
2
2
  instruction: string;
3
3
  start: Element;
4
4
  end: Element;
5
+ syntax: 'simple' | 'complex' | 'orphan';
6
+ complete: boolean;
7
+ nested: boolean;
8
+ containsNested: boolean;
9
+ sameParagraph: boolean;
10
+ inDeletion: boolean;
5
11
  }
6
12
  export declare function docxFieldInstructions(root: ParentNode): string[];
7
13
  export declare function docxFieldOccurrences(root: ParentNode): DocxFieldOccurrence[];
14
+ export declare function docxFieldOccurrenceIsInlineEditable(field: DocxFieldOccurrence): boolean;
15
+ export declare function hasInvalidDocxFieldStructure(root: ParentNode): boolean;
8
16
  export declare function docxFieldResultText(field: DocxFieldOccurrence): string;
@@ -0,0 +1,3 @@
1
+ import type JSZip from 'jszip';
2
+ import type { PreservedRelationshipReference } from './work-ooxml-relationship-preservation';
3
+ export declare function preserveDocxFontTable(generated: JSZip, source: JSZip, relationships: ReadonlyMap<string, PreservedRelationshipReference>, fontPartPaths: ReadonlySet<string>, generatedPath?: string, sourcePath?: string): Promise<void>;
@@ -0,0 +1,15 @@
1
+ export declare const DOCX_WORDPROCESSING_NAMESPACES: Set<string>;
2
+ export type DocxExtensionDocumentRole = 'generated' | 'source';
3
+ export interface DocxIgnorableExtensionOptions {
4
+ semanticKey?: (element: Element, role: DocxExtensionDocumentRole) => string;
5
+ isAdditionalSemanticNamespace?: (namespace: string) => boolean;
6
+ allowExtensionNamespace?: (namespace: string) => boolean;
7
+ allowMatchedElementMerge?: (generated: Element, source: Element, depth: number) => boolean;
8
+ allowSemanticElement?: (element: Element, generatedSemanticNames: ReadonlySet<string>) => boolean;
9
+ }
10
+ export interface DocxIgnorableExtensionPair {
11
+ generated: Element;
12
+ source: Element;
13
+ }
14
+ export declare function mergeDocxIgnorableExtensions(generatedDocument: Document, sourceDocument: Document, options?: DocxIgnorableExtensionOptions): void;
15
+ export declare function mergeDocxIgnorableExtensionsAtPairs(generatedDocument: Document, sourceDocument: Document, pairs: readonly DocxIgnorableExtensionPair[], options?: DocxIgnorableExtensionOptions): void;
@@ -0,0 +1,12 @@
1
+ import type { WorkDocumentImageCrop } from './work-document-image-layout';
2
+ interface DocxImageCropPatch {
3
+ marker: string;
4
+ crop: WorkDocumentImageCrop;
5
+ }
6
+ export declare class DocxImageCropPatchCollector {
7
+ readonly patches: DocxImageCropPatch[];
8
+ private nextMarker;
9
+ marker(crop: WorkDocumentImageCrop | null): string;
10
+ }
11
+ export declare function patchDocxImageCrops(buffer: ArrayBuffer, patches: readonly DocxImageCropPatch[]): Promise<ArrayBuffer>;
12
+ export {};
@@ -0,0 +1,17 @@
1
+ import { type WorkDocumentImageIdentity } from './work-document-image-identity';
2
+ interface DocxImageIdentityPatch {
3
+ marker: string;
4
+ identity: WorkDocumentImageIdentity;
5
+ }
6
+ export interface DocxImageIdentityRegistration {
7
+ marker: string;
8
+ docPropertiesId: number;
9
+ }
10
+ export declare class DocxImageIdentityPatchCollector {
11
+ readonly patches: DocxImageIdentityPatch[];
12
+ private readonly registry;
13
+ private nextMarker;
14
+ register(element: HTMLImageElement): DocxImageIdentityRegistration;
15
+ }
16
+ export declare function patchDocxImageIdentities(buffer: ArrayBuffer, patches: readonly DocxImageIdentityPatch[]): Promise<ArrayBuffer>;
17
+ export {};
@@ -0,0 +1,12 @@
1
+ import { type WorkDocumentImageLayer, type WorkDocumentImageLayout } from './work-document-image-layout';
2
+ interface DocxImageLayerPatch {
3
+ marker: string;
4
+ layer: WorkDocumentImageLayer;
5
+ }
6
+ export declare class DocxImageLayerPatchCollector {
7
+ readonly patches: DocxImageLayerPatch[];
8
+ private nextMarker;
9
+ marker(layout: WorkDocumentImageLayout, layer: WorkDocumentImageLayer): string;
10
+ }
11
+ export declare function patchDocxImageLayers(buffer: ArrayBuffer, patches: readonly DocxImageLayerPatch[]): Promise<ArrayBuffer>;
12
+ export {};
@@ -1,12 +1,24 @@
1
- import { type WorkDocumentImageLayoutOptions } from './work-document-image-layout';
1
+ import { type WorkDocumentImageIdentity, type WorkDocumentImageIdentityRegistry } from './work-document-image-identity';
2
+ import { type WorkDocumentImageCrop, type WorkDocumentImageLayer, type WorkDocumentImageLayoutOptions, type WorkDocumentImagePosition } from './work-document-image-layout';
3
+ import { type WorkDocumentImageWrapContour } from './work-document-image-wrap-contour';
2
4
  export interface ImportedDocxImageLayoutMarker {
3
5
  startMarker: string;
4
6
  endMarker: string;
5
7
  options: WorkDocumentImageLayoutOptions;
8
+ position: WorkDocumentImagePosition | null;
9
+ crop: WorkDocumentImageCrop | null;
10
+ contour: WorkDocumentImageWrapContour | null;
11
+ layer: WorkDocumentImageLayer | null;
12
+ identity: WorkDocumentImageIdentity;
6
13
  }
7
14
  export interface ImportedDocxImageLayoutMarkers {
8
15
  images: ImportedDocxImageLayoutMarker[];
9
16
  }
10
- export declare function markDocxImageLayouts(document: Document): ImportedDocxImageLayoutMarkers;
17
+ export interface ImportedDocxImageLayoutMarkerState {
18
+ identityRegistry: WorkDocumentImageIdentityRegistry;
19
+ nextMarker: number;
20
+ }
21
+ export declare function createImportedDocxImageLayoutMarkerState(): ImportedDocxImageLayoutMarkerState;
22
+ export declare function markDocxImageLayouts(document: Document, state?: ImportedDocxImageLayoutMarkerState): ImportedDocxImageLayoutMarkers;
11
23
  export declare function applyImportedDocxImageLayoutMarkers(document: Document, markers: ImportedDocxImageLayoutMarkers): void;
12
24
  export declare function hasImportedDocxImageLayoutMarkers(markers: ImportedDocxImageLayoutMarkers): boolean;
@@ -0,0 +1,15 @@
1
+ import { type WorkDocumentImageLayoutOptions } from './work-document-image-layout';
2
+ import { type WorkDocumentImageWrapContour } from './work-document-image-wrap-contour';
3
+ interface DocxImageWrapPatch {
4
+ marker: string;
5
+ layout: 'through' | 'tight';
6
+ options: WorkDocumentImageLayoutOptions;
7
+ contour: WorkDocumentImageWrapContour;
8
+ }
9
+ export declare class DocxImageWrapPatchCollector {
10
+ readonly patches: DocxImageWrapPatch[];
11
+ private nextMarker;
12
+ marker(options: WorkDocumentImageLayoutOptions, contour: WorkDocumentImageWrapContour | null): string;
13
+ }
14
+ export declare function patchDocxImageWraps(buffer: ArrayBuffer, patches: readonly DocxImageWrapPatch[]): Promise<ArrayBuffer>;
15
+ export {};
@@ -1,14 +1,19 @@
1
+ import { type ImportedDocxBookmarkMarkers } from './work-docx-bookmark-import';
1
2
  import { type ImportedDocxCaptionMarkers } from './work-docx-caption-import';
2
3
  import { type ImportedDocxChangeMarkers } from './work-docx-change-import';
3
4
  import { type ImportedDocxCitationMarkers } from './work-docx-citation-import';
4
5
  import { type ImportedDocxCommentMarkers } from './work-docx-comment-import';
6
+ import { type ImportedDocxEquationMarkers } from './work-docx-equation-import';
5
7
  import { type ImportedDocxFieldMarkers } from './work-docx-field-import';
6
- import { type ImportedDocxListMarkers } from './work-docx-list-import';
7
8
  import { type ImportedDocxImageLayoutMarkers } from './work-docx-image-layout-import';
8
- import { type ImportedDocxParagraphDirectionMarkers } from './work-docx-paragraph-direction-import';
9
+ import { type ImportedDocxListMarkers } from './work-docx-list-import';
9
10
  import { type ImportedDocxParagraphAlignmentMarkers } from './work-docx-paragraph-alignment-import';
11
+ import { type ImportedDocxParagraphDirectionMarkers } from './work-docx-paragraph-direction-import';
12
+ import { type ImportedDocxParagraphIdentityMarkers } from './work-docx-paragraph-identity-import';
10
13
  import { type ImportedDocxParagraphIndentMarkers } from './work-docx-paragraph-indent-import';
11
14
  import { type ImportedDocxParagraphPaginationMarkers } from './work-docx-paragraph-pagination-import';
15
+ import { type ImportedDocxParagraphBorderMarkers } from './work-docx-paragraph-borders-import';
16
+ import { type ImportedDocxParagraphShadingMarkers } from './work-docx-paragraph-shading-import';
12
17
  import { type ImportedDocxParagraphSpacingMarkers } from './work-docx-paragraph-spacing-import';
13
18
  import { type ImportedDocxRunFormattingMarkers } from './work-docx-run-formatting-import';
14
19
  import { type ImportedDocxParagraphTabStopMarkers } from './work-docx-tab-stop-import';
@@ -25,16 +30,21 @@ export interface PreparedDocxImport {
25
30
  }>;
26
31
  pageColor?: string;
27
32
  captionMarkers: ImportedDocxCaptionMarkers;
33
+ bookmarkMarkers: ImportedDocxBookmarkMarkers;
28
34
  changeMarkers: ImportedDocxChangeMarkers;
29
35
  commentMarkers: ImportedDocxCommentMarkers;
30
36
  fieldMarkers: ImportedDocxFieldMarkers;
37
+ equationMarkers: ImportedDocxEquationMarkers;
31
38
  citationMarkers: ImportedDocxCitationMarkers;
32
39
  listMarkers: ImportedDocxListMarkers;
33
40
  imageLayoutMarkers: ImportedDocxImageLayoutMarkers;
41
+ paragraphIdentityMarkers: ImportedDocxParagraphIdentityMarkers;
34
42
  paragraphAlignmentMarkers: ImportedDocxParagraphAlignmentMarkers;
35
43
  paragraphDirectionMarkers: ImportedDocxParagraphDirectionMarkers;
36
44
  paragraphIndentMarkers: ImportedDocxParagraphIndentMarkers;
37
45
  paragraphPaginationMarkers: ImportedDocxParagraphPaginationMarkers;
46
+ paragraphBorderMarkers: ImportedDocxParagraphBorderMarkers;
47
+ paragraphShadingMarkers: ImportedDocxParagraphShadingMarkers;
38
48
  paragraphSpacingMarkers: ImportedDocxParagraphSpacingMarkers;
39
49
  runFormattingMarkers: ImportedDocxRunFormattingMarkers;
40
50
  tabStopMarkers: ImportedDocxParagraphTabStopMarkers;
@@ -45,6 +55,6 @@ export interface PreparedDocxImport {
45
55
  trackChanges: boolean;
46
56
  }
47
57
  export declare function prepareDocxImport(buffer: ArrayBuffer): Promise<PreparedDocxImport>;
48
- export declare function applyDocxSectionsToHtml(html: string, sections: PreparedDocxImport['sections'], captionMarkers?: ImportedDocxCaptionMarkers, changeMarkers?: ImportedDocxChangeMarkers, commentMarkers?: ImportedDocxCommentMarkers, fieldMarkers?: ImportedDocxFieldMarkers, citationMarkers?: ImportedDocxCitationMarkers, listMarkers?: ImportedDocxListMarkers, imageLayoutMarkers?: ImportedDocxImageLayoutMarkers, paragraphAlignmentMarkers?: ImportedDocxParagraphAlignmentMarkers, runFormattingMarkers?: ImportedDocxRunFormattingMarkers, paragraphDirectionMarkers?: ImportedDocxParagraphDirectionMarkers, paragraphIndentMarkers?: ImportedDocxParagraphIndentMarkers, paragraphSpacingMarkers?: ImportedDocxParagraphSpacingMarkers, paragraphPaginationMarkers?: ImportedDocxParagraphPaginationMarkers, bibliography?: WorkDocumentContent['bibliography'], tabStopMarkers?: ImportedDocxParagraphTabStopMarkers, tableCellMarkers?: ImportedDocxTableCellMarkers, tableRowMarkers?: ImportedDocxTableRowMarkers, tableSizingMarkers?: ImportedDocxTableSizingMarkers): string;
58
+ export declare function applyDocxSectionsToHtml(html: string, sections: PreparedDocxImport['sections'], captionMarkers?: ImportedDocxCaptionMarkers, bookmarkMarkers?: ImportedDocxBookmarkMarkers, changeMarkers?: ImportedDocxChangeMarkers, commentMarkers?: ImportedDocxCommentMarkers, fieldMarkers?: ImportedDocxFieldMarkers, equationMarkers?: ImportedDocxEquationMarkers, citationMarkers?: ImportedDocxCitationMarkers, listMarkers?: ImportedDocxListMarkers, imageLayoutMarkers?: ImportedDocxImageLayoutMarkers, paragraphIdentityMarkers?: ImportedDocxParagraphIdentityMarkers, paragraphAlignmentMarkers?: ImportedDocxParagraphAlignmentMarkers, runFormattingMarkers?: ImportedDocxRunFormattingMarkers, paragraphDirectionMarkers?: ImportedDocxParagraphDirectionMarkers, paragraphIndentMarkers?: ImportedDocxParagraphIndentMarkers, paragraphSpacingMarkers?: ImportedDocxParagraphSpacingMarkers, paragraphBorderMarkers?: ImportedDocxParagraphBorderMarkers, paragraphShadingMarkers?: ImportedDocxParagraphShadingMarkers, paragraphPaginationMarkers?: ImportedDocxParagraphPaginationMarkers, bibliography?: WorkDocumentContent['bibliography'], tabStopMarkers?: ImportedDocxParagraphTabStopMarkers, tableCellMarkers?: ImportedDocxTableCellMarkers, tableRowMarkers?: ImportedDocxTableRowMarkers, tableSizingMarkers?: ImportedDocxTableSizingMarkers): string;
49
59
  export declare function readDocxLayout(buffer: ArrayBuffer): Promise<ImportedDocumentLayout>;
50
60
  export {};
@@ -0,0 +1,18 @@
1
+ import type { INumberingOptions, ParagraphChild } from 'docx';
2
+ import type { DocxSourceNumberingIdentity } from './work-docx-numbering-extension-preservation';
3
+ import { type DocxParagraphBorderPatchCollector } from './work-docx-paragraph-borders-export';
4
+ import type { DocxThemePatchCollector } from './work-docx-theme-reference';
5
+ export interface DocxListExportContext {
6
+ numbering: Array<INumberingOptions['config'][number]>;
7
+ nextNumberingReference: number;
8
+ numberingReferences: Map<string, string>;
9
+ numberingLevels: Map<string, Array<INumberingOptions['config'][number]['levels'][number]>>;
10
+ numberingRestartRules: Array<Map<number, number>>;
11
+ numberingRestartRulesByIdentity: Map<string, Map<number, number>>;
12
+ numberingSourceIdentities: Array<DocxSourceNumberingIdentity | null>;
13
+ paragraphBorderPatches?: DocxParagraphBorderPatchCollector;
14
+ themePatches?: DocxThemePatchCollector;
15
+ }
16
+ type InlineRuns = (element: HTMLElement) => Promise<ParagraphChild[]>;
17
+ export declare function listToDocxParagraphs(list: HTMLElement, docx: typeof import('docx'), context: DocxListExportContext, inlineRuns: InlineRuns, depth?: number): Promise<Array<InstanceType<typeof docx.Paragraph>>>;
18
+ export {};
@@ -1,6 +1,20 @@
1
1
  export interface ImportedDocxListMarker {
2
2
  marker: string;
3
3
  start: number;
4
+ numberingId: number;
5
+ abstractNumberingId?: number;
6
+ level: number;
7
+ format?: string;
8
+ text?: string;
9
+ suffix?: string;
10
+ alignment?: string;
11
+ indentLeft?: number;
12
+ indentRight?: number;
13
+ indentStart?: number;
14
+ indentEnd?: number;
15
+ indentHanging?: number;
16
+ indentFirstLine?: number;
17
+ restartAfterLevel?: number;
4
18
  type?: ImportedDocxOrderedListType;
5
19
  bulletStyle?: ImportedDocxBulletListStyle;
6
20
  }
@@ -0,0 +1,18 @@
1
+ import type { DocxIgnorableExtensionPair } from './work-docx-ignorable-extension-preservation';
2
+ import { type BlockContentControlRecord, type StaticContentBlockRecord } from './work-docx-note-comment-content-control-model';
3
+ type NoteCommentKind = 'comment' | 'note';
4
+ export interface BlockPlanUnit {
5
+ controls: BlockContentControlRecord[];
6
+ generated: StaticContentBlockRecord[];
7
+ kind: 'block';
8
+ source: BlockContentControlRecord;
9
+ targets: Element[];
10
+ }
11
+ export interface ContentControlAppliedPairs {
12
+ content: DocxIgnorableExtensionPair[];
13
+ runs: DocxIgnorableExtensionPair[];
14
+ structure: DocxIgnorableExtensionPair[];
15
+ }
16
+ export declare function blockCandidates(scope: Element, generated: readonly StaticContentBlockRecord[], source: readonly StaticContentBlockRecord[]): StaticContentBlockRecord[][];
17
+ export declare function applyBlockUnit(document: Document, unit: BlockPlanUnit, assignedIds: ReadonlyMap<Element, string | null>, kind: NoteCommentKind, applied: ContentControlAppliedPairs): void;
18
+ export {};
@@ -0,0 +1,47 @@
1
+ import { type StaticContentControlDefinition } from './work-docx-note-comment-content-control-properties';
2
+ import { type StaticContentBlockRecord } from './work-docx-note-comment-content-control-table-model';
3
+ type DocumentRole = 'generated' | 'source';
4
+ export interface ContentControlLimits {
5
+ generatedCells: number;
6
+ generatedControls: number;
7
+ generatedParagraphs: number;
8
+ generatedRuns: number;
9
+ generatedTables: number;
10
+ sourceCells: number;
11
+ sourceControls: number;
12
+ sourceParagraphs: number;
13
+ sourceRuns: number;
14
+ sourceTables: number;
15
+ }
16
+ export interface StaticContentRunRecord {
17
+ element: Element;
18
+ end: number;
19
+ start: number;
20
+ text: string;
21
+ }
22
+ export interface InlineContentControlRecord extends StaticContentControlDefinition {
23
+ end: number;
24
+ runs: StaticContentRunRecord[];
25
+ start: number;
26
+ text: string;
27
+ }
28
+ export interface StaticContentParagraphRecord {
29
+ controls: InlineContentControlRecord[];
30
+ element: Element;
31
+ runs: StaticContentRunRecord[];
32
+ text: string;
33
+ }
34
+ export interface BlockContentControlRecord extends StaticContentControlDefinition {
35
+ blocks: StaticContentBlockRecord[];
36
+ paragraphs: StaticContentParagraphRecord[];
37
+ }
38
+ export type { StaticContentBlockRecord };
39
+ export declare function createContentControlLimits(): ContentControlLimits;
40
+ export declare function readStaticInlineParagraph(paragraph: Element, role: DocumentRole, limits: ContentControlLimits): StaticContentParagraphRecord | null;
41
+ export declare function readStaticBlockControl(control: Element, limits: ContentControlLimits): BlockContentControlRecord | null;
42
+ export declare function readStaticScopeBlocks(scope: Element, role: 'generated' | 'source', limits: ContentControlLimits): StaticContentBlockRecord[];
43
+ export declare function readStaticContentBlock(element: Element, role: 'generated' | 'source', limits: ContentControlLimits): StaticContentBlockRecord | null;
44
+ export declare function directWordParagraphs(scope: Element): Element[];
45
+ export declare function directWordControls(scope: Element): Element[];
46
+ export declare function staticRunSpanKey(run: StaticContentRunRecord): string;
47
+ export declare function alignStaticRunBoundaries(paragraph: Element, boundaries: readonly number[]): boolean;
@@ -0,0 +1,4 @@
1
+ import { type DocxIgnorableExtensionPair } from './work-docx-ignorable-extension-preservation';
2
+ type NoteCommentKind = 'comment' | 'note';
3
+ export declare function preserveDocxNoteCommentContentControls(generatedDocument: Document, sourceDocument: Document, scopes: readonly DocxIgnorableExtensionPair[], kind: NoteCommentKind): void;
4
+ export {};
@@ -0,0 +1,17 @@
1
+ import { type DocxIgnorableExtensionPair } from './work-docx-ignorable-extension-preservation';
2
+ export interface StaticContentControlDefinition {
3
+ content: Element;
4
+ control: Element;
5
+ endProperties: Element | null;
6
+ id: string | null;
7
+ multiLine: boolean;
8
+ properties: Element;
9
+ type: 'richText' | 'text';
10
+ }
11
+ export interface StaticContentControlShell {
12
+ content: Element;
13
+ control: Element;
14
+ pairs: DocxIgnorableExtensionPair[];
15
+ }
16
+ export declare function readStaticContentControlDefinition(control: Element): StaticContentControlDefinition | null;
17
+ export declare function createStaticContentControlShell(document: Document, source: StaticContentControlDefinition, assignedId: string | null, targetContext: Element, kind: 'comment' | 'note'): StaticContentControlShell | null;
@@ -0,0 +1,17 @@
1
+ import type { ContentControlLimits, StaticContentParagraphRecord } from './work-docx-note-comment-content-control-model';
2
+ type DocumentRole = 'generated' | 'source';
3
+ interface StaticContentStructureRecord {
4
+ element: Element;
5
+ key: string;
6
+ }
7
+ export interface StaticContentBlockRecord {
8
+ element: Element;
9
+ extensionScopes: StaticContentStructureRecord[];
10
+ fingerprint: string;
11
+ kind: 'paragraph' | 'table';
12
+ paragraphs: StaticContentParagraphRecord[];
13
+ }
14
+ type ParagraphReader = (paragraph: Element, role: DocumentRole, limits: ContentControlLimits) => StaticContentParagraphRecord | null;
15
+ export declare function paragraphContentBlock(paragraph: StaticContentParagraphRecord): StaticContentBlockRecord;
16
+ export declare function readStaticTableBlock(table: Element, role: DocumentRole, limits: ContentControlLimits, readParagraph: ParagraphReader): StaticContentBlockRecord | null;
17
+ export {};
@@ -0,0 +1,14 @@
1
+ export declare const CONTENT_CONTROL_MC_NAMESPACE = "http://schemas.openxmlformats.org/markup-compatibility/2006";
2
+ export declare const CONTENT_CONTROL_RELATIONSHIP_NAMESPACES: Set<string>;
3
+ export declare const CONTENT_CONTROL_WORD_2012_NAMESPACE = "http://schemas.microsoft.com/office/word/2012/wordml";
4
+ export declare function isContentControlSemanticNamespace(namespace: string): boolean;
5
+ export declare function isDocxWordElement(element: Element): boolean;
6
+ export declare function wordDirectChildren(element: Element, localName: string): Element[];
7
+ export declare function hasOnlyPassiveContentControlAttributes(element: Element): boolean;
8
+ export declare function hasUnsupportedContentControlSemanticChild(element: Element): boolean;
9
+ export declare function hasContentControlRelationshipReference(root: Element): boolean;
10
+ export declare function createWordElement(document: Document, context: Element, localName: string): Element;
11
+ export declare function createNamespacedElement(document: Document, context: Element, namespace: string, preferredPrefix: string, localName: string): Element;
12
+ export declare function setWordContentControlAttribute(element: Element, context: Element, localName: string, value: string): void;
13
+ export declare function setNamespacedContentControlAttribute(element: Element, context: Element, namespace: string, preferredPrefix: string, localName: string, value: string): void;
14
+ export declare function ensureIgnorableContentControlNamespace(root: Element, namespace: string, preferredPrefix: string): void;
@@ -0,0 +1,2 @@
1
+ import type JSZip from 'jszip';
2
+ export declare function preserveDocxNoteCommentExtensions(generated: JSZip, source: JSZip): Promise<void>;
@@ -0,0 +1,40 @@
1
+ import { type DocxHyperlinkDestination, type DocxHyperlinkRelationshipState } from './work-docx-note-comment-hyperlink-relationships';
2
+ type DocumentRole = 'generated' | 'source';
3
+ export interface NoteCommentHyperlinkContentLimits {
4
+ generatedParagraphs: number;
5
+ generatedRuns: number;
6
+ sourceParagraphs: number;
7
+ sourceRuns: number;
8
+ }
9
+ export interface NoteCommentParagraphRecord {
10
+ element: Element;
11
+ hyperlinks: NoteCommentHyperlinkRecord[];
12
+ identity: string;
13
+ runs: NoteCommentRunRecord[];
14
+ text: string;
15
+ }
16
+ type ParagraphContent = Omit<NoteCommentParagraphRecord, 'element' | 'identity'>;
17
+ export interface NoteCommentHyperlinkRecord {
18
+ destination: DocxHyperlinkDestination | null;
19
+ element: Element;
20
+ end: number;
21
+ start: number;
22
+ text: string;
23
+ }
24
+ export interface NoteCommentRunRecord {
25
+ container: Element | null;
26
+ element: Element;
27
+ end: number;
28
+ start: number;
29
+ text: string;
30
+ }
31
+ export declare function noteCommentContentParagraphs(scope: Element, role: DocumentRole, relationships: DocxHyperlinkRelationshipState, limits: NoteCommentHyperlinkContentLimits): NoteCommentParagraphRecord[];
32
+ export declare function noteCommentParagraphContent(paragraph: Element, relationships: DocxHyperlinkRelationshipState, role: DocumentRole): ParagraphContent | null;
33
+ export declare function groupNoteCommentParagraphs(paragraphs: readonly NoteCommentParagraphRecord[]): Map<string, NoteCommentParagraphRecord[]>;
34
+ export declare function groupNoteCommentHyperlinks(hyperlinks: readonly NoteCommentHyperlinkRecord[]): Map<string, NoteCommentHyperlinkRecord[]>;
35
+ export declare function noteCommentHyperlinkSpanKey(item: NoteCommentHyperlinkRecord): string;
36
+ export declare function noteCommentHyperlinksOverlap(left: NoteCommentHyperlinkRecord, right: NoteCommentHyperlinkRecord): boolean;
37
+ export declare function restoreElementChildren(element: Element, children: readonly Node[]): void;
38
+ export declare function alignCommentRunBoundaries(generated: NoteCommentParagraphRecord, source: NoteCommentParagraphRecord): boolean;
39
+ export declare function isKnownOoxmlNamespace(namespace: string): boolean;
40
+ export {};
@@ -0,0 +1,5 @@
1
+ import type JSZip from 'jszip';
2
+ import { type DocxIgnorableExtensionPair } from './work-docx-ignorable-extension-preservation';
3
+ type NoteCommentKind = 'comment' | 'note';
4
+ export declare function preserveDocxNoteCommentHyperlinks(generatedArchive: JSZip, sourceArchive: JSZip, generatedDocument: Document, sourceDocument: Document, scopes: readonly DocxIgnorableExtensionPair[], kind: NoteCommentKind, ownerPart: string): Promise<void>;
5
+ export {};
@@ -0,0 +1,35 @@
1
+ import type JSZip from 'jszip';
2
+ export interface DocxHyperlinkDestination {
3
+ kind: 'external' | 'internal';
4
+ relationshipId?: string;
5
+ target: string;
6
+ }
7
+ interface RelationshipRecord {
8
+ id: string;
9
+ target: string;
10
+ targetMode: string;
11
+ type: string;
12
+ }
13
+ interface RelationshipDocument {
14
+ byId: Map<string, RelationshipRecord>;
15
+ document: Document;
16
+ usedIds: Set<string>;
17
+ }
18
+ export interface DocxHyperlinkRelationshipState {
19
+ archive: JSZip;
20
+ dirty: boolean;
21
+ generated: RelationshipDocument | null;
22
+ generatedMalformed: boolean;
23
+ path: string;
24
+ source: RelationshipDocument | null;
25
+ }
26
+ export interface DocxExternalHyperlinkRequest {
27
+ sourceId: string;
28
+ target: string;
29
+ }
30
+ export declare function loadDocxHyperlinkRelationshipState(generatedArchive: JSZip, sourceArchive: JSZip, ownerPart: string): Promise<DocxHyperlinkRelationshipState>;
31
+ export declare function readDocxHyperlinkDestination(hyperlink: Element, state: DocxHyperlinkRelationshipState, role: 'generated' | 'source'): DocxHyperlinkDestination | null;
32
+ export declare function ensureDocxExternalHyperlinkRelationships(state: DocxHyperlinkRelationshipState, requests: readonly DocxExternalHyperlinkRequest[]): string[] | null;
33
+ export declare function setDocxHyperlinkDestination(hyperlink: Element, root: Element, destination: DocxHyperlinkDestination, relationshipId?: string): boolean;
34
+ export declare function flushDocxHyperlinkRelationships(state: DocxHyperlinkRelationshipState): void;
35
+ export {};