@beyondwork/docx-react-component 1.0.27 → 1.0.29

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 (356) hide show
  1. package/dist/canonical-document-BLEbzL2J.d.cts +844 -0
  2. package/dist/canonical-document-BLEbzL2J.d.ts +844 -0
  3. package/dist/chunk-2FJS5GZM.js +763 -0
  4. package/dist/chunk-2FJS5GZM.js.map +1 -0
  5. package/{src/core/commands/section-layout-commands.ts → dist/chunk-2OQBZS3F.js} +106 -340
  6. package/dist/chunk-2OQBZS3F.js.map +1 -0
  7. package/dist/chunk-2S7W4KFO.js +127 -0
  8. package/dist/chunk-2S7W4KFO.js.map +1 -0
  9. package/dist/chunk-2TG72QSW.js +3874 -0
  10. package/dist/chunk-2TG72QSW.js.map +1 -0
  11. package/{src/core/commands/table-structure-commands.ts → dist/chunk-36QNIZBO.js} +126 -315
  12. package/dist/chunk-36QNIZBO.js.map +1 -0
  13. package/dist/chunk-4AQOYAW4.js +3069 -0
  14. package/dist/chunk-4AQOYAW4.js.map +1 -0
  15. package/dist/chunk-4D5EWJ3P.js +77 -0
  16. package/dist/chunk-4D5EWJ3P.js.map +1 -0
  17. package/dist/chunk-5FN54NDH.js +2257 -0
  18. package/dist/chunk-5FN54NDH.js.map +1 -0
  19. package/dist/chunk-BOYGQYRQ.js +7306 -0
  20. package/dist/chunk-BOYGQYRQ.js.map +1 -0
  21. package/dist/chunk-CN3XMECL.js +212 -0
  22. package/dist/chunk-CN3XMECL.js.map +1 -0
  23. package/dist/chunk-EBI3BX6U.js +164 -0
  24. package/dist/chunk-EBI3BX6U.js.map +1 -0
  25. package/dist/chunk-EILUG3VB.js +1275 -0
  26. package/dist/chunk-EILUG3VB.js.map +1 -0
  27. package/dist/chunk-FUDY333O.js +70 -0
  28. package/dist/chunk-FUDY333O.js.map +1 -0
  29. package/dist/chunk-GBVOWFIK.js +1237 -0
  30. package/dist/chunk-GBVOWFIK.js.map +1 -0
  31. package/dist/chunk-H4TQ3H3Y.js +262 -0
  32. package/dist/chunk-H4TQ3H3Y.js.map +1 -0
  33. package/{src/core/commands/style-commands.ts → dist/chunk-JGB3IXZO.js} +40 -113
  34. package/dist/chunk-JGB3IXZO.js.map +1 -0
  35. package/dist/chunk-KD2QRQPY.js +4342 -0
  36. package/dist/chunk-KD2QRQPY.js.map +1 -0
  37. package/dist/chunk-KLMXQVYK.js +369 -0
  38. package/dist/chunk-KLMXQVYK.js.map +1 -0
  39. package/dist/chunk-KZUG5KFQ.js +214 -0
  40. package/dist/chunk-KZUG5KFQ.js.map +1 -0
  41. package/{src/core/state/text-transaction.ts → dist/chunk-QDAQ4CJU.js} +79 -236
  42. package/dist/chunk-QDAQ4CJU.js.map +1 -0
  43. package/{src/legal/bookmarks.ts → dist/chunk-RMH72RZI.js} +44 -130
  44. package/dist/chunk-RMH72RZI.js.map +1 -0
  45. package/dist/chunk-SWKWQZXM.js +117 -0
  46. package/dist/chunk-SWKWQZXM.js.map +1 -0
  47. package/{src/core/commands/formatting-commands.ts → dist/chunk-TJBP2K4T.js} +196 -536
  48. package/dist/chunk-TJBP2K4T.js.map +1 -0
  49. package/dist/chunk-TLCEAQDQ.js +542 -0
  50. package/dist/chunk-TLCEAQDQ.js.map +1 -0
  51. package/{src/core/commands/text-commands.ts → dist/chunk-UZXBISGO.js} +86 -142
  52. package/dist/chunk-UZXBISGO.js.map +1 -0
  53. package/dist/chunk-WGBAKP3Q.js +3220 -0
  54. package/dist/chunk-WGBAKP3Q.js.map +1 -0
  55. package/dist/compare/index.cjs +5475 -0
  56. package/dist/compare/index.cjs.map +1 -0
  57. package/dist/compare/index.d.cts +114 -0
  58. package/dist/compare/index.d.ts +114 -0
  59. package/dist/compare/index.js +731 -0
  60. package/dist/compare/index.js.map +1 -0
  61. package/dist/core/commands/formatting-commands.cjs +828 -0
  62. package/dist/core/commands/formatting-commands.cjs.map +1 -0
  63. package/dist/core/commands/formatting-commands.d.cts +63 -0
  64. package/dist/core/commands/formatting-commands.d.ts +63 -0
  65. package/dist/core/commands/formatting-commands.js +37 -0
  66. package/dist/core/commands/formatting-commands.js.map +1 -0
  67. package/dist/core/commands/image-commands.cjs +2023 -0
  68. package/dist/core/commands/image-commands.cjs.map +1 -0
  69. package/dist/core/commands/image-commands.d.cts +58 -0
  70. package/dist/core/commands/image-commands.d.ts +58 -0
  71. package/dist/core/commands/image-commands.js +18 -0
  72. package/dist/core/commands/image-commands.js.map +1 -0
  73. package/dist/core/commands/section-layout-commands.cjs +477 -0
  74. package/dist/core/commands/section-layout-commands.cjs.map +1 -0
  75. package/dist/core/commands/section-layout-commands.d.cts +62 -0
  76. package/dist/core/commands/section-layout-commands.d.ts +62 -0
  77. package/dist/core/commands/section-layout-commands.js +21 -0
  78. package/dist/core/commands/section-layout-commands.js.map +1 -0
  79. package/dist/core/commands/style-commands.cjs +214 -0
  80. package/dist/core/commands/style-commands.cjs.map +1 -0
  81. package/dist/core/commands/style-commands.d.cts +13 -0
  82. package/dist/core/commands/style-commands.d.ts +13 -0
  83. package/dist/core/commands/style-commands.js +9 -0
  84. package/dist/core/commands/style-commands.js.map +1 -0
  85. package/dist/core/commands/table-structure-commands.cjs +1883 -0
  86. package/dist/core/commands/table-structure-commands.cjs.map +1 -0
  87. package/dist/core/commands/table-structure-commands.d.cts +59 -0
  88. package/dist/core/commands/table-structure-commands.d.ts +59 -0
  89. package/dist/core/commands/table-structure-commands.js +12 -0
  90. package/dist/core/commands/table-structure-commands.js.map +1 -0
  91. package/dist/core/commands/text-commands.cjs +2391 -0
  92. package/dist/core/commands/text-commands.cjs.map +1 -0
  93. package/dist/core/commands/text-commands.d.cts +24 -0
  94. package/dist/core/commands/text-commands.d.ts +24 -0
  95. package/dist/core/commands/text-commands.js +28 -0
  96. package/dist/core/commands/text-commands.js.map +1 -0
  97. package/dist/core/selection/mapping.cjs +200 -0
  98. package/dist/core/selection/mapping.cjs.map +1 -0
  99. package/dist/core/selection/mapping.d.cts +2 -0
  100. package/dist/core/selection/mapping.d.ts +2 -0
  101. package/dist/core/selection/mapping.js +31 -0
  102. package/dist/core/selection/mapping.js.map +1 -0
  103. package/dist/core/state/editor-state.cjs +2278 -0
  104. package/dist/core/state/editor-state.cjs.map +1 -0
  105. package/dist/core/state/editor-state.d.cts +2 -0
  106. package/dist/core/state/editor-state.d.ts +2 -0
  107. package/dist/core/state/editor-state.js +26 -0
  108. package/dist/core/state/editor-state.js.map +1 -0
  109. package/dist/index.cjs +38553 -0
  110. package/dist/index.cjs.map +1 -0
  111. package/dist/index.d.cts +15 -0
  112. package/dist/index.d.ts +15 -0
  113. package/dist/index.js +7856 -0
  114. package/dist/index.js.map +1 -0
  115. package/dist/io/docx-session.cjs +16236 -0
  116. package/dist/io/docx-session.cjs.map +1 -0
  117. package/dist/io/docx-session.d.cts +21 -0
  118. package/dist/io/docx-session.d.ts +21 -0
  119. package/dist/io/docx-session.js +18 -0
  120. package/dist/io/docx-session.js.map +1 -0
  121. package/dist/legal/index.cjs +3900 -0
  122. package/dist/legal/index.cjs.map +1 -0
  123. package/dist/legal/index.d.cts +86 -0
  124. package/dist/legal/index.d.ts +86 -0
  125. package/dist/legal/index.js +616 -0
  126. package/dist/legal/index.js.map +1 -0
  127. package/dist/public-types-7ZL_94cz.d.ts +1573 -0
  128. package/dist/public-types-CeMaDueh.d.cts +1573 -0
  129. package/dist/public-types.cjs +19 -0
  130. package/dist/public-types.cjs.map +1 -0
  131. package/dist/public-types.d.cts +2 -0
  132. package/dist/public-types.d.ts +2 -0
  133. package/dist/public-types.js +1 -0
  134. package/dist/public-types.js.map +1 -0
  135. package/dist/runtime/document-runtime.cjs +11140 -0
  136. package/dist/runtime/document-runtime.cjs.map +1 -0
  137. package/dist/runtime/document-runtime.d.cts +231 -0
  138. package/dist/runtime/document-runtime.d.ts +231 -0
  139. package/dist/runtime/document-runtime.js +21 -0
  140. package/dist/runtime/document-runtime.js.map +1 -0
  141. package/dist/structural-helpers-CilgOVhh.d.cts +10 -0
  142. package/dist/structural-helpers-q0Gd-eBN.d.ts +10 -0
  143. package/dist/ui-tailwind/editor-surface/search-plugin.cjs +313 -0
  144. package/dist/ui-tailwind/editor-surface/search-plugin.cjs.map +1 -0
  145. package/dist/ui-tailwind/editor-surface/search-plugin.d.cts +67 -0
  146. package/dist/ui-tailwind/editor-surface/search-plugin.d.ts +67 -0
  147. package/dist/ui-tailwind/editor-surface/search-plugin.js +23 -0
  148. package/dist/ui-tailwind/editor-surface/search-plugin.js.map +1 -0
  149. package/dist/ui-tailwind/index.cjs +4833 -0
  150. package/dist/ui-tailwind/index.cjs.map +1 -0
  151. package/dist/ui-tailwind/index.d.cts +617 -0
  152. package/dist/ui-tailwind/index.d.ts +617 -0
  153. package/dist/ui-tailwind/index.js +575 -0
  154. package/dist/ui-tailwind/index.js.map +1 -0
  155. package/package.json +64 -54
  156. package/src/README.md +0 -85
  157. package/src/api/README.md +0 -26
  158. package/src/api/public-types.ts +0 -1418
  159. package/src/api/session-state.ts +0 -60
  160. package/src/compare/diff-engine.ts +0 -623
  161. package/src/compare/export-redlines.ts +0 -280
  162. package/src/compare/index.ts +0 -25
  163. package/src/compare/snapshot.ts +0 -97
  164. package/src/component-inventory.md +0 -99
  165. package/src/core/README.md +0 -10
  166. package/src/core/commands/README.md +0 -3
  167. package/src/core/commands/image-commands.ts +0 -373
  168. package/src/core/commands/index.ts +0 -1757
  169. package/src/core/commands/list-commands.ts +0 -565
  170. package/src/core/commands/paragraph-layout-commands.ts +0 -339
  171. package/src/core/commands/review-commands.ts +0 -108
  172. package/src/core/commands/structural-helpers.ts +0 -309
  173. package/src/core/schema/README.md +0 -3
  174. package/src/core/schema/text-schema.ts +0 -516
  175. package/src/core/search/search-text.ts +0 -357
  176. package/src/core/selection/README.md +0 -3
  177. package/src/core/selection/mapping.ts +0 -289
  178. package/src/core/selection/review-anchors.ts +0 -183
  179. package/src/core/state/README.md +0 -3
  180. package/src/core/state/editor-state.ts +0 -892
  181. package/src/formats/xlsx/io/parse-shared-strings.ts +0 -41
  182. package/src/formats/xlsx/io/parse-sheet.ts +0 -459
  183. package/src/formats/xlsx/io/parse-styles.ts +0 -59
  184. package/src/formats/xlsx/io/parse-workbook.ts +0 -75
  185. package/src/formats/xlsx/io/serialize-shared-strings.ts +0 -72
  186. package/src/formats/xlsx/io/serialize-sheet.ts +0 -333
  187. package/src/formats/xlsx/io/serialize-styles.ts +0 -98
  188. package/src/formats/xlsx/io/serialize-workbook.ts +0 -429
  189. package/src/formats/xlsx/io/xlsx-session.ts +0 -314
  190. package/src/formats/xlsx/model/cell.ts +0 -189
  191. package/src/formats/xlsx/model/sheet.ts +0 -326
  192. package/src/formats/xlsx/model/styles.ts +0 -118
  193. package/src/formats/xlsx/model/workbook.ts +0 -453
  194. package/src/formats/xlsx/runtime/cell-commands.ts +0 -567
  195. package/src/formats/xlsx/runtime/sheet-commands.ts +0 -206
  196. package/src/formats/xlsx/runtime/workbook-runtime.ts +0 -177
  197. package/src/formats/xlsx/runtime/workbook-transaction.ts +0 -822
  198. package/src/index.ts +0 -101
  199. package/src/io/README.md +0 -10
  200. package/src/io/docx-session.ts +0 -2882
  201. package/src/io/export/README.md +0 -3
  202. package/src/io/export/export-session.ts +0 -220
  203. package/src/io/export/minimal-docx.ts +0 -115
  204. package/src/io/export/reattach-preserved-parts.ts +0 -54
  205. package/src/io/export/serialize-comments.ts +0 -947
  206. package/src/io/export/serialize-footnotes.ts +0 -399
  207. package/src/io/export/serialize-headers-footers.ts +0 -372
  208. package/src/io/export/serialize-main-document.ts +0 -1376
  209. package/src/io/export/serialize-numbering.ts +0 -118
  210. package/src/io/export/serialize-revisions.ts +0 -389
  211. package/src/io/export/serialize-runtime-revisions.ts +0 -269
  212. package/src/io/export/serialize-tables.ts +0 -174
  213. package/src/io/export/split-review-boundaries.ts +0 -356
  214. package/src/io/normalize/README.md +0 -3
  215. package/src/io/normalize/normalize-text.ts +0 -639
  216. package/src/io/ooxml/README.md +0 -3
  217. package/src/io/ooxml/highlight-colors.ts +0 -39
  218. package/src/io/ooxml/numbering-sentinels.ts +0 -44
  219. package/src/io/ooxml/parse-comments.ts +0 -846
  220. package/src/io/ooxml/parse-complex-content.ts +0 -287
  221. package/src/io/ooxml/parse-fields.ts +0 -834
  222. package/src/io/ooxml/parse-footnotes.ts +0 -896
  223. package/src/io/ooxml/parse-headers-footers.ts +0 -1169
  224. package/src/io/ooxml/parse-inline-media.ts +0 -461
  225. package/src/io/ooxml/parse-main-document.ts +0 -2877
  226. package/src/io/ooxml/parse-numbering.ts +0 -432
  227. package/src/io/ooxml/parse-revisions.ts +0 -931
  228. package/src/io/ooxml/parse-settings.ts +0 -184
  229. package/src/io/ooxml/parse-shapes.ts +0 -296
  230. package/src/io/ooxml/parse-styles.ts +0 -463
  231. package/src/io/ooxml/parse-tables.ts +0 -618
  232. package/src/io/ooxml/parse-theme.ts +0 -346
  233. package/src/io/ooxml/part-manifest.ts +0 -136
  234. package/src/io/ooxml/revision-boundaries.ts +0 -351
  235. package/src/io/opc/README.md +0 -3
  236. package/src/io/opc/corrupt-package.ts +0 -166
  237. package/src/io/opc/docx-package.ts +0 -74
  238. package/src/io/opc/package-reader.ts +0 -325
  239. package/src/io/opc/package-writer.ts +0 -273
  240. package/src/io/source-package-provenance.ts +0 -241
  241. package/src/legal/cross-references.ts +0 -414
  242. package/src/legal/defined-terms.ts +0 -203
  243. package/src/legal/index.ts +0 -32
  244. package/src/legal/signature-blocks.ts +0 -259
  245. package/src/model/README.md +0 -3
  246. package/src/model/canonical-document.ts +0 -2632
  247. package/src/model/cds-1.0.0.ts +0 -212
  248. package/src/model/snapshot.ts +0 -649
  249. package/src/preservation/README.md +0 -3
  250. package/src/preservation/markup-compatibility.ts +0 -48
  251. package/src/preservation/opaque-fragment-store.ts +0 -89
  252. package/src/preservation/opaque-region.ts +0 -233
  253. package/src/preservation/package-preservation.ts +0 -113
  254. package/src/preservation/preserved-part-manifest.ts +0 -56
  255. package/src/preservation/relationship-retention.ts +0 -57
  256. package/src/preservation/store.ts +0 -185
  257. package/src/review/README.md +0 -16
  258. package/src/review/store/README.md +0 -3
  259. package/src/review/store/comment-anchors.ts +0 -70
  260. package/src/review/store/comment-remapping.ts +0 -154
  261. package/src/review/store/comment-store.ts +0 -331
  262. package/src/review/store/comment-thread.ts +0 -109
  263. package/src/review/store/revision-actions.ts +0 -394
  264. package/src/review/store/revision-store.ts +0 -312
  265. package/src/review/store/revision-types.ts +0 -171
  266. package/src/review/store/runtime-comment-store.ts +0 -43
  267. package/src/runtime/README.md +0 -3
  268. package/src/runtime/ai-action-policy.ts +0 -764
  269. package/src/runtime/collab-review-sync.ts +0 -254
  270. package/src/runtime/document-layout.ts +0 -332
  271. package/src/runtime/document-navigation.ts +0 -603
  272. package/src/runtime/document-runtime.ts +0 -3159
  273. package/src/runtime/document-search.ts +0 -145
  274. package/src/runtime/numbering-prefix.ts +0 -216
  275. package/src/runtime/page-layout-estimation.ts +0 -212
  276. package/src/runtime/read-only-diagnostics-runtime.ts +0 -241
  277. package/src/runtime/review-runtime.ts +0 -44
  278. package/src/runtime/revision-runtime.ts +0 -107
  279. package/src/runtime/session-capabilities.ts +0 -192
  280. package/src/runtime/story-context.ts +0 -164
  281. package/src/runtime/story-targeting.ts +0 -162
  282. package/src/runtime/surface-projection.ts +0 -1357
  283. package/src/runtime/table-commands.ts +0 -173
  284. package/src/runtime/table-schema.ts +0 -309
  285. package/src/runtime/view-state.ts +0 -477
  286. package/src/runtime/virtualized-rendering.ts +0 -258
  287. package/src/runtime/workflow-markup.ts +0 -353
  288. package/src/ui/README.md +0 -30
  289. package/src/ui/WordReviewEditor.tsx +0 -4097
  290. package/src/ui/browser-export.ts +0 -52
  291. package/src/ui/comments/README.md +0 -3
  292. package/src/ui/compatibility/README.md +0 -3
  293. package/src/ui/editor-command-bag.ts +0 -120
  294. package/src/ui/editor-runtime-boundary.ts +0 -1457
  295. package/src/ui/editor-shell-view.tsx +0 -142
  296. package/src/ui/editor-surface/README.md +0 -3
  297. package/src/ui/editor-surface-controller.tsx +0 -63
  298. package/src/ui/headless/comment-decoration-model.ts +0 -124
  299. package/src/ui/headless/preserve-editor-selection.ts +0 -5
  300. package/src/ui/headless/revision-decoration-model.ts +0 -128
  301. package/src/ui/headless/selection-helpers.ts +0 -54
  302. package/src/ui/headless/selection-toolbar-model.ts +0 -34
  303. package/src/ui/headless/use-editor-keyboard.ts +0 -103
  304. package/src/ui/review/README.md +0 -3
  305. package/src/ui/runtime-snapshot-selectors.ts +0 -197
  306. package/src/ui/shared/revision-filters.ts +0 -31
  307. package/src/ui/status/README.md +0 -3
  308. package/src/ui/theme/README.md +0 -3
  309. package/src/ui/toolbar/README.md +0 -3
  310. package/src/ui/workflow-surface-blocked-rails.ts +0 -94
  311. package/src/ui-tailwind/chrome/tw-alert-banner.tsx +0 -64
  312. package/src/ui-tailwind/chrome/tw-image-context-toolbar.tsx +0 -129
  313. package/src/ui-tailwind/chrome/tw-layout-panel.tsx +0 -114
  314. package/src/ui-tailwind/chrome/tw-object-context-toolbar.tsx +0 -34
  315. package/src/ui-tailwind/chrome/tw-page-ruler.tsx +0 -386
  316. package/src/ui-tailwind/chrome/tw-selection-toolbar.tsx +0 -186
  317. package/src/ui-tailwind/chrome/tw-suggestion-card.tsx +0 -139
  318. package/src/ui-tailwind/chrome/tw-table-context-toolbar.tsx +0 -128
  319. package/src/ui-tailwind/chrome/tw-unsaved-modal.tsx +0 -58
  320. package/src/ui-tailwind/chrome/use-before-unload.ts +0 -20
  321. package/src/ui-tailwind/editor-surface/perf-probe.ts +0 -179
  322. package/src/ui-tailwind/editor-surface/pm-collab-plugins.ts +0 -40
  323. package/src/ui-tailwind/editor-surface/pm-command-bridge.ts +0 -178
  324. package/src/ui-tailwind/editor-surface/pm-contextual-ui.ts +0 -31
  325. package/src/ui-tailwind/editor-surface/pm-decorations.ts +0 -427
  326. package/src/ui-tailwind/editor-surface/pm-position-map.ts +0 -123
  327. package/src/ui-tailwind/editor-surface/pm-schema.ts +0 -876
  328. package/src/ui-tailwind/editor-surface/pm-state-from-snapshot.ts +0 -504
  329. package/src/ui-tailwind/editor-surface/search-plugin.ts +0 -168
  330. package/src/ui-tailwind/editor-surface/surface-build-keys.ts +0 -61
  331. package/src/ui-tailwind/editor-surface/tw-caret.tsx +0 -12
  332. package/src/ui-tailwind/editor-surface/tw-editor-surface.tsx +0 -150
  333. package/src/ui-tailwind/editor-surface/tw-inline-token.tsx +0 -129
  334. package/src/ui-tailwind/editor-surface/tw-opaque-block.tsx +0 -58
  335. package/src/ui-tailwind/editor-surface/tw-paragraph-block.tsx +0 -151
  336. package/src/ui-tailwind/editor-surface/tw-prosemirror-surface.tsx +0 -973
  337. package/src/ui-tailwind/editor-surface/tw-segment-view.tsx +0 -111
  338. package/src/ui-tailwind/editor-surface/tw-table-node-view.tsx +0 -436
  339. package/src/ui-tailwind/index.ts +0 -62
  340. package/src/ui-tailwind/page-chrome-model.ts +0 -27
  341. package/src/ui-tailwind/review/tw-comment-sidebar.tsx +0 -406
  342. package/src/ui-tailwind/review/tw-health-panel.tsx +0 -149
  343. package/src/ui-tailwind/review/tw-review-rail.tsx +0 -120
  344. package/src/ui-tailwind/review/tw-revision-sidebar.tsx +0 -164
  345. package/src/ui-tailwind/status/tw-status-bar.tsx +0 -61
  346. package/src/ui-tailwind/toolbar/tw-toolbar-icon-button.tsx +0 -52
  347. package/src/ui-tailwind/toolbar/tw-toolbar.tsx +0 -1064
  348. package/src/ui-tailwind/tw-review-workspace.tsx +0 -1417
  349. package/src/validation/README.md +0 -3
  350. package/src/validation/compatibility-engine.ts +0 -634
  351. package/src/validation/compatibility-report.ts +0 -161
  352. package/src/validation/diagnostics.ts +0 -204
  353. package/src/validation/docx-comment-proof.ts +0 -707
  354. package/src/validation/import-diagnostics.ts +0 -128
  355. package/src/validation/low-priority-word-surfaces.ts +0 -373
  356. /package/{src → dist}/ui-tailwind/theme/editor-theme.css +0 -0
@@ -1,1418 +0,0 @@
1
- import type { PersistedEditorSnapshot as RuntimePersistedEditorSnapshot } from "../core/state/editor-state.ts";
2
-
3
- export type FieldFamily = import("../model/canonical-document.ts").FieldFamily;
4
- export type FieldRefreshStatus = import("../model/canonical-document.ts").FieldRefreshStatus;
5
- export type SupportedFieldFamily = import("../model/canonical-document.ts").SupportedFieldFamily;
6
-
7
- export type ExternalDocumentSource =
8
- | {
9
- kind: "docx";
10
- bytes: Uint8Array | ArrayBuffer;
11
- sourceLabel?: string;
12
- }
13
- | {
14
- kind: "session";
15
- sessionState: EditorSessionState;
16
- sourceLabel?: string;
17
- }
18
- | {
19
- kind: "snapshot";
20
- snapshot: PersistedEditorSnapshot;
21
- sourceLabel?: string;
22
- };
23
-
24
- export type LoadSourcePolicy = "prefer-saved-state" | "prefer-source-package";
25
-
26
- export interface LoadRequest {
27
- documentId: string;
28
- loadRevision?: string;
29
- loadSourcePolicy?: LoadSourcePolicy;
30
- }
31
-
32
- export interface EditorUser {
33
- userId: string;
34
- displayName: string;
35
- email?: string;
36
- avatarUrl?: string;
37
- }
38
-
39
- export type EditorAnchorProjection =
40
- | {
41
- kind: "range";
42
- from: number;
43
- to: number;
44
- assoc: {
45
- start: -1 | 1;
46
- end: -1 | 1;
47
- };
48
- }
49
- | {
50
- kind: "node";
51
- at: number;
52
- assoc: -1 | 1;
53
- }
54
- | {
55
- kind: "detached";
56
- lastKnownRange: {
57
- from: number;
58
- to: number;
59
- };
60
- reason: "deleted" | "invalidatedByStructureChange" | "importAmbiguity";
61
- };
62
-
63
- export type EditorStoryTarget =
64
- | { kind: "main" }
65
- | {
66
- kind: "header";
67
- relationshipId: string;
68
- variant: "default" | "first" | "even";
69
- sectionIndex?: number;
70
- }
71
- | {
72
- kind: "footer";
73
- relationshipId: string;
74
- variant: "default" | "first" | "even";
75
- sectionIndex?: number;
76
- }
77
- | { kind: "footnote"; noteId: string }
78
- | { kind: "endnote"; noteId: string };
79
-
80
- export interface SelectionSnapshot {
81
- anchor: number;
82
- head: number;
83
- isCollapsed: boolean;
84
- activeRange: EditorAnchorProjection;
85
- storyTarget?: EditorStoryTarget;
86
- }
87
-
88
- export interface PageLayoutSnapshot {
89
- sectionIndex: number;
90
- sectionType?: "continuous" | "nextPage" | "evenPage" | "oddPage" | "nextColumn";
91
- pageWidth: number;
92
- pageHeight: number;
93
- marginTop: number;
94
- marginBottom: number;
95
- marginLeft: number;
96
- marginRight: number;
97
- headerMargin: number;
98
- footerMargin: number;
99
- gutter: number;
100
- orientation: "portrait" | "landscape";
101
- columns: number;
102
- differentFirstPage: boolean;
103
- differentOddEvenPages: boolean;
104
- pageNumbering?: {
105
- format?: string;
106
- start?: number;
107
- chapterStyle?: string;
108
- chapterSeparator?: string;
109
- };
110
- lineNumbering?: {
111
- countBy?: number;
112
- start?: number;
113
- distance?: number;
114
- restart?: "newPage" | "newSection" | "continuous";
115
- };
116
- pageBorders?: {
117
- top?: { value?: string; size?: number; space?: number; color?: string };
118
- left?: { value?: string; size?: number; space?: number; color?: string };
119
- bottom?: { value?: string; size?: number; space?: number; color?: string };
120
- right?: { value?: string; size?: number; space?: number; color?: string };
121
- offsetFrom?: "page" | "text";
122
- display?: "allPages" | "firstPage" | "notFirstPage";
123
- zOrder?: "front" | "back";
124
- };
125
- documentGrid?: {
126
- type?: "default" | "lines" | "linesAndChars" | "snapToChars";
127
- linePitch?: number;
128
- charSpace?: number;
129
- };
130
- columnDefinitions: Array<{ width: number; space?: number }>;
131
- equalWidthColumns: boolean;
132
- columnSeparator: boolean;
133
- headerVariants: Array<{ variant: "default" | "first" | "even"; relationshipId: string }>;
134
- footerVariants: Array<{ variant: "default" | "first" | "even"; relationshipId: string }>;
135
- }
136
-
137
- export type WorkspaceMode = "canvas" | "page";
138
-
139
- export type ZoomLevel = "pageWidth" | "onePage" | number;
140
-
141
- export type SectionBreakType =
142
- | "nextPage"
143
- | "continuous"
144
- | "evenPage"
145
- | "oddPage"
146
- | "nextColumn";
147
-
148
- export interface SectionLayoutPatch {
149
- pageSize?: Partial<{
150
- width: number;
151
- height: number;
152
- orientation: "portrait" | "landscape";
153
- }>;
154
- pageMargins?: Partial<{
155
- top: number;
156
- right: number;
157
- bottom: number;
158
- left: number;
159
- header: number;
160
- footer: number;
161
- gutter: number;
162
- }>;
163
- columns?: Partial<{
164
- count: number;
165
- space: number;
166
- equalWidth: boolean;
167
- columns: Array<{ width: number; space?: number }>;
168
- separator: boolean;
169
- }>;
170
- titlePage?: boolean;
171
- sectionType?: SectionBreakType;
172
- }
173
-
174
- export interface SectionPageNumberingPatch {
175
- format?: string | null;
176
- start?: number | null;
177
- chapterStyle?: string | null;
178
- chapterSeparator?: string | null;
179
- }
180
-
181
- export interface HeaderFooterLinkPatch {
182
- kind: "header" | "footer";
183
- variant: "default" | "first" | "even";
184
- linkToPrevious: boolean;
185
- relationshipId?: string | null;
186
- }
187
-
188
- export interface DocumentStats {
189
- storyLength: number;
190
- commentCount: number;
191
- revisionCount: number;
192
- opaqueFragmentCount: number;
193
- }
194
-
195
- export interface CommentSidebarSnapshot {
196
- activeCommentId?: string;
197
- openCommentIds: string[];
198
- resolvedCommentIds: string[];
199
- detachedCommentIds: string[];
200
- totalCount: number;
201
- threads: CommentSidebarThreadSnapshot[];
202
- }
203
-
204
- export interface CommentSidebarThreadEntrySnapshot {
205
- entryId: string;
206
- authorId: string;
207
- body: string;
208
- createdAt: string;
209
- }
210
-
211
- export interface CommentSidebarThreadSnapshot {
212
- commentId: string;
213
- status: "open" | "resolved" | "detached";
214
- anchor: EditorAnchorProjection;
215
- excerpt: string;
216
- entryCount: number;
217
- entries: CommentSidebarThreadEntrySnapshot[];
218
- createdAt: string;
219
- createdBy: string;
220
- warningCount: number;
221
- anchorLabel: string;
222
- isActive: boolean;
223
- resolvedAt?: string;
224
- resolvedBy?: string;
225
- }
226
-
227
- export interface TrackedChangeEntrySnapshot {
228
- revisionId: string;
229
- kind: "insertion" | "deletion" | "formatting" | "move" | "property-change";
230
- label: string;
231
- status: "active" | "accepted" | "rejected" | "detached";
232
- actionability: "actionable" | "preserve-only";
233
- storyTarget?: EditorStoryTarget;
234
- importedRevisionForm?:
235
- | "run-insertion"
236
- | "run-deletion"
237
- | "paragraph-insertion"
238
- | "paragraph-deletion";
239
- anchor: EditorAnchorProjection;
240
- anchorLabel: string;
241
- createdAt: string;
242
- authorId: string;
243
- warningCount: number;
244
- canAccept: boolean;
245
- canReject: boolean;
246
- preserveOnlyReason?: string;
247
- excerpt?: string;
248
- detail?: string;
249
- }
250
-
251
- export interface TrackedChangesSnapshot {
252
- pendingChangeIds: string[];
253
- acceptedChangeIds: string[];
254
- rejectedChangeIds: string[];
255
- detachedChangeIds: string[];
256
- actionableChangeIds: string[];
257
- preserveOnlyChangeIds: string[];
258
- totalCount: number;
259
- revisions: TrackedChangeEntrySnapshot[];
260
- }
261
-
262
- export type FormattingAlignment = "left" | "center" | "right" | "justify";
263
-
264
- export interface FormattingBreadcrumbItem {
265
- kind: "table" | "table_row" | "table_cell" | "paragraph" | "sdt_block" | "opaque_block";
266
- label: string;
267
- from: number;
268
- to: number;
269
- }
270
-
271
- export interface FormattingStateSnapshot {
272
- bold: boolean;
273
- italic: boolean;
274
- underline: boolean;
275
- strikethrough: boolean;
276
- superscript: boolean;
277
- subscript: boolean;
278
- fontFamily?: string;
279
- fontSize?: number;
280
- textColor?: string;
281
- highlightColor?: string | null;
282
- alignment?: FormattingAlignment;
283
- paragraphStyleId?: string;
284
- breadcrumb: FormattingBreadcrumbItem[];
285
- }
286
-
287
- export interface SearchOptions {
288
- matchCase?: boolean;
289
- wholeWord?: boolean;
290
- limit?: number;
291
- }
292
-
293
- export interface SearchResultSnapshot {
294
- resultId: string;
295
- anchor: EditorAnchorProjection;
296
- excerpt: string;
297
- isActive: boolean;
298
- storyTarget?: EditorStoryTarget;
299
- sectionIndex?: number;
300
- pageIndex?: number;
301
- }
302
-
303
- // ---------------------------------------------------------------------------
304
- // Document Navigation Model (Wave 37)
305
- // ---------------------------------------------------------------------------
306
-
307
- /**
308
- * Runtime-owned snapshot of the document's page stack, heading outline, and
309
- * navigation context. Derived from canonical document state and section
310
- * properties — never from DOM scroll position or CSS layout.
311
- */
312
- export interface DocumentNavigationSnapshot {
313
- /** Total estimated page count across all sections. */
314
- pageCount: number;
315
- /** Ordered page descriptors, one per logical page. */
316
- pages: DocumentPageSnapshot[];
317
- /** Ordered heading outline extracted from paragraph styles. */
318
- headings: DocumentHeadingSnapshot[];
319
- /** Index of the page containing the current selection head. */
320
- activePageIndex: number;
321
- /** Section index containing the current selection head. */
322
- activeSectionIndex: number;
323
- }
324
-
325
- /** Runtime-derived descriptor for a single logical page. */
326
- export interface DocumentPageSnapshot {
327
- /** Zero-based page index within the whole document. */
328
- pageIndex: number;
329
- /** Section that owns this page (zero-based). */
330
- sectionIndex: number;
331
- /** Zero-based page index within its owning section. */
332
- pageInSection: number;
333
- /** Estimated character offset where the page begins in the main story. */
334
- startOffset: number;
335
- /** Estimated character offset where the page ends in the main story. */
336
- endOffset: number;
337
- /** Page layout properties inherited from the section. */
338
- layout: PageLayoutSnapshot;
339
- }
340
-
341
- /** A heading entry in the document outline. */
342
- export interface DocumentHeadingSnapshot {
343
- /** Stable identifier for the heading (derived from block position). */
344
- headingId: string;
345
- /** Outline level (1 = Heading 1, 2 = Heading 2, etc.). */
346
- level: number;
347
- /** Plain-text content of the heading paragraph. */
348
- text: string;
349
- /** Character offset of the heading in the main story. */
350
- offset: number;
351
- /** Zero-based page index where the heading lives. */
352
- pageIndex: number;
353
- /** Section index where the heading lives. */
354
- sectionIndex: number;
355
- }
356
-
357
- /** A single field entry in the runtime field snapshot. */
358
- export interface FieldEntrySnapshot {
359
- /** Stable index of the field in document order. */
360
- index: number;
361
- /** Classified field family. */
362
- fieldFamily: FieldFamily;
363
- /** Whether this family is in the supported refresh slice. */
364
- supported: boolean;
365
- /** Raw field instruction string. */
366
- instruction: string;
367
- /** Target bookmark for REF/PAGEREF/NOTEREF fields. */
368
- fieldTarget?: string;
369
- /** Current refresh status. */
370
- refreshStatus: FieldRefreshStatus;
371
- /** Resolved display text (from field children). */
372
- displayText: string;
373
- }
374
-
375
- /** Runtime field snapshot — read-only view of all fields in the document. */
376
- export interface FieldSnapshot {
377
- /** Total number of fields in the document. */
378
- totalCount: number;
379
- /** Number of fields in the supported refresh slice. */
380
- supportedCount: number;
381
- /** Number of fields that are preserve-only. */
382
- preserveOnlyCount: number;
383
- /** Ordered field entries. */
384
- fields: FieldEntrySnapshot[];
385
- }
386
-
387
- /** Options for runtime-backed field refresh. */
388
- export interface UpdateFieldsOptions {
389
- /** When true, only refresh fields in the supported slice. Default true. */
390
- supportedOnly?: boolean;
391
- }
392
-
393
- /** Result of a runtime-backed field refresh operation. */
394
- export interface UpdateFieldsResult {
395
- /** Total number of fields in the document. */
396
- totalCount: number;
397
- /** Number of fields that were refreshed. */
398
- updatedCount: number;
399
- /** Number of preserve-only fields left unchanged. */
400
- preserveOnlyCount: number;
401
- }
402
-
403
- /** Options for runtime-backed TOC refresh. */
404
- export interface TocRefreshOptions {
405
- /** Maximum heading outline level to include (1–9, default 3). */
406
- maxLevel?: number;
407
- }
408
-
409
- /** Result of a TOC refresh operation. */
410
- export interface TocRefreshResult {
411
- /** Number of TOC entries generated from heading structure. */
412
- entryCount: number;
413
- /** Heading entries that populated the TOC. */
414
- entries: Array<{
415
- level: number;
416
- text: string;
417
- pageIndex: number;
418
- }>;
419
- }
420
-
421
- export interface StyleCatalogEntrySnapshot {
422
- styleId: string;
423
- displayName: string;
424
- kind: "paragraph" | "character" | "table";
425
- isDefault: boolean;
426
- basedOn?: string;
427
- nextStyle?: string;
428
- }
429
-
430
- export interface StyleCatalogSnapshot {
431
- paragraphs: StyleCatalogEntrySnapshot[];
432
- characters: StyleCatalogEntrySnapshot[];
433
- tables: StyleCatalogEntrySnapshot[];
434
- fromPackage: boolean;
435
- }
436
-
437
- export interface InsertTableOptions {
438
- rows: number;
439
- columns: number;
440
- }
441
-
442
- export interface InsertImageOptions {
443
- data: Uint8Array;
444
- mimeType: string;
445
- width?: number;
446
- height?: number;
447
- altText?: string;
448
- }
449
-
450
- export type SurfaceTextMark =
451
- | "bold"
452
- | "italic"
453
- | "underline"
454
- | "strikethrough"
455
- | "doubleStrikethrough"
456
- | "superscript"
457
- | "subscript"
458
- | "vanish"
459
- | "emboss"
460
- | "imprint"
461
- | "shadow"
462
- | "smallCaps"
463
- | "allCaps";
464
-
465
- export type SurfaceInlineSegment =
466
- | {
467
- segmentId: string;
468
- kind: "text";
469
- from: number;
470
- to: number;
471
- text: string;
472
- marks?: SurfaceTextMark[];
473
- markAttrs?: {
474
- backgroundColor?: string;
475
- charSpacing?: number;
476
- kerning?: number;
477
- textFill?: string;
478
- fontFamily?: string;
479
- fontSize?: number;
480
- textColor?: string;
481
- };
482
- hyperlinkHref?: string;
483
- }
484
- | {
485
- segmentId: string;
486
- kind: "tab" | "hard_break";
487
- from: number;
488
- to: number;
489
- hyperlinkHref?: string;
490
- }
491
- | {
492
- segmentId: string;
493
- kind: "image";
494
- from: number;
495
- to: number;
496
- mediaId: string;
497
- altText?: string;
498
- state: "editable" | "missing";
499
- display?: "inline" | "floating";
500
- detail?: string;
501
- }
502
- | {
503
- segmentId: string;
504
- kind: "opaque_inline";
505
- from: number;
506
- to: number;
507
- fragmentId: string;
508
- warningId: string;
509
- label: string;
510
- detail: string;
511
- presentation?: "inline-chip" | "quiet-marker";
512
- state: "locked-preserve-only";
513
- }
514
- | {
515
- segmentId: string;
516
- kind: "note_ref";
517
- from: number;
518
- to: number;
519
- noteKind: "footnote" | "endnote";
520
- noteId: string;
521
- label: string;
522
- }
523
- | {
524
- segmentId: string;
525
- kind: "field_ref";
526
- from: number;
527
- to: number;
528
- fieldFamily: SupportedFieldFamily;
529
- fieldTarget?: string;
530
- instruction: string;
531
- refreshStatus: FieldRefreshStatus;
532
- label: string;
533
- };
534
-
535
- export interface SurfaceTableCellSnapshot {
536
- gridSpan: number;
537
- verticalMerge: "restart" | "continue" | null;
538
- colspan: number;
539
- rowspan: number;
540
- backgroundColor?: string | null;
541
- verticalAlign?: "top" | "center" | "bottom" | null;
542
- borderTop?: string | null;
543
- borderRight?: string | null;
544
- borderBottom?: string | null;
545
- borderLeft?: string | null;
546
- content: SurfaceBlockSnapshot[];
547
- }
548
-
549
- export interface SurfaceTableRowSnapshot {
550
- cells: SurfaceTableCellSnapshot[];
551
- gridBefore?: number;
552
- gridAfter?: number;
553
- height?: number;
554
- heightRule?: "auto" | "atLeast" | "exact";
555
- isHeader?: boolean;
556
- }
557
-
558
- export type SurfaceBlockSnapshot =
559
- | {
560
- blockId: string;
561
- kind: "paragraph";
562
- from: number;
563
- to: number;
564
- styleId?: string;
565
- numbering?: {
566
- numberingInstanceId: string;
567
- level: number;
568
- };
569
- numberingPrefix?: string;
570
- numberingSuffix?: "tab" | "space" | "nothing";
571
- alignment?: "left" | "center" | "right" | "both" | "distribute";
572
- spacing?: { before?: number; after?: number; line?: number; lineRule?: string };
573
- contextualSpacing?: boolean;
574
- indentation?: { left?: number; right?: number; firstLine?: number; hanging?: number };
575
- borders?: { top?: unknown; left?: unknown; bottom?: unknown; right?: unknown; bar?: unknown; between?: unknown };
576
- shading?: { fill?: string; color?: string; val?: string };
577
- tabStops?: Array<{ pos: number; val?: string; leader?: string }>;
578
- keepNext?: boolean;
579
- keepLines?: boolean;
580
- pageBreakBefore?: boolean;
581
- outlineLevel?: number;
582
- bidi?: boolean;
583
- suppressLineNumbers?: boolean;
584
- segments: SurfaceInlineSegment[];
585
- }
586
- | {
587
- blockId: string;
588
- kind: "table";
589
- from: number;
590
- to: number;
591
- styleId?: string;
592
- gridColumns: number[];
593
- alignment?: "left" | "center" | "right";
594
- tblLook?: {
595
- firstRow?: boolean;
596
- lastRow?: boolean;
597
- firstColumn?: boolean;
598
- lastColumn?: boolean;
599
- noHBand?: boolean;
600
- noVBand?: boolean;
601
- };
602
- rows: SurfaceTableRowSnapshot[];
603
- }
604
- | {
605
- blockId: string;
606
- kind: "sdt_block";
607
- from: number;
608
- to: number;
609
- sdtType?: string;
610
- alias?: string;
611
- tag?: string;
612
- lock?: string;
613
- checkboxChecked?: boolean;
614
- dateValue?: string;
615
- dropdownItems?: Array<{ displayText?: string; value: string }>;
616
- comboBoxItems?: Array<{ displayText?: string; value: string }>;
617
- showingPlcHdr?: boolean;
618
- children: SurfaceBlockSnapshot[];
619
- }
620
- | {
621
- blockId: string;
622
- kind: "opaque_block";
623
- from: number;
624
- to: number;
625
- fragmentId: string;
626
- warningId: string;
627
- label: string;
628
- detail: string;
629
- state: "locked-preserve-only";
630
- };
631
-
632
- export interface SecondaryStorySurface {
633
- target: EditorStoryTarget;
634
- label: string;
635
- storySize: number;
636
- blocks: SurfaceBlockSnapshot[];
637
- }
638
-
639
- export interface EditorSurfaceSnapshot {
640
- storySize: number;
641
- plainText: string;
642
- blocks: SurfaceBlockSnapshot[];
643
- lockedFragmentIds: string[];
644
- secondaryStories: SecondaryStorySurface[];
645
- }
646
-
647
- export type EditorWarningCode =
648
- | "unsupported_ooxml_preserved"
649
- | "unsupported_ooxml_locked"
650
- | "import_normalized"
651
- | "export_roundtrip_risk"
652
- | "comment_anchor_detached"
653
- | "revision_anchor_detached"
654
- | "large_document_degraded"
655
- | "font_substitution"
656
- | "image_missing";
657
-
658
- export interface EditorWarning {
659
- warningId: string;
660
- code: EditorWarningCode;
661
- severity: "info" | "warning";
662
- message: string;
663
- source:
664
- | "import"
665
- | "runtime"
666
- | "review"
667
- | "preservation"
668
- | "validation"
669
- | "export";
670
- affectedAnchor?: EditorAnchorProjection;
671
- featureEntryId?: string;
672
- details?: Record<string, unknown>;
673
- }
674
-
675
- export type EditorErrorCode =
676
- | "import_failed"
677
- | "export_failed"
678
- | "package_corrupt"
679
- | "validation_failed"
680
- | "datastore_failed"
681
- | "internal_invariant";
682
-
683
- export interface EditorError {
684
- errorId: string;
685
- code: EditorErrorCode;
686
- message: string;
687
- isFatal: boolean;
688
- source: "import" | "runtime" | "validation" | "datastore" | "host" | "export";
689
- details?: Record<string, unknown>;
690
- }
691
-
692
- export type CompatibilityFeatureClass =
693
- | "supported-roundtrip"
694
- | "preserve-only"
695
- | "unsupported-fatal";
696
-
697
- export interface CompatibilityFeatureEntry {
698
- featureEntryId: string;
699
- featureKey: string;
700
- featureClass: CompatibilityFeatureClass;
701
- message: string;
702
- affectedAnchor?: EditorAnchorProjection;
703
- details?: Record<string, unknown>;
704
- }
705
-
706
- export interface CompatibilityReport {
707
- reportVersion: "compatibility-report/1";
708
- generatedAt: string;
709
- blockExport: boolean;
710
- featureEntries: CompatibilityFeatureEntry[];
711
- warnings: EditorWarning[];
712
- errors: EditorError[];
713
- }
714
-
715
- export interface CompatibilityPanelSnapshot {
716
- blockExport: boolean;
717
- blockExportReasons: string[];
718
- warningCount: number;
719
- errorCount: number;
720
- featureEntries: CompatibilityFeatureEntry[];
721
- }
722
-
723
- export type ViewMode = "editing" | "review" | "view";
724
-
725
- /**
726
- * Runtime document-mode — controls whether editing is unrestricted, restricted
727
- * to suggestions, or fully read-only at the document level.
728
- *
729
- * Distinct from `ViewMode` (editor posture) and `WorkspaceMode` (shell layout).
730
- * `DocumentMode` reflects document-level editing authority, not presentation.
731
- */
732
- export type DocumentMode = "editing" | "suggesting" | "viewing";
733
-
734
- /**
735
- * A single permission range parsed from `w:permStart` / `w:permEnd` in the
736
- * source package. Ranges carry stable ids, edit-rights metadata, and an
737
- * enforcement reason that the UI can display.
738
- */
739
- export interface ProtectionRange {
740
- /** Stable range id from `w:id` on the originating `w:permStart`. */
741
- rangeId: string;
742
- /** Start offset of the editable range when the runtime can map it safely. */
743
- start?: number;
744
- /** End offset of the editable range when the runtime can map it safely. */
745
- end?: number;
746
- /** Editor group allowed to edit this range (`w:edGrp`), if specified. */
747
- editorGroup?: string;
748
- /** Specific editor identity (`w:ed`), if specified. */
749
- editor?: string;
750
- /** Whether this range is currently enforced by the runtime. */
751
- enforced: boolean;
752
- /** Human-readable reason for the enforcement state. */
753
- enforcementReason: string;
754
- }
755
-
756
- /**
757
- * Snapshot of the document's protection posture. Descriptive and bounded —
758
- * no public bypass around protected ranges, export blockers, or preserve-only
759
- * regions.
760
- */
761
- export interface ProtectionSnapshot {
762
- /** Whether document-level protection is declared in the source package. */
763
- hasDocumentProtection: boolean;
764
- /**
765
- * The declared protection edit type from `w:documentProtection` in
766
- * `settings.xml` (e.g. `"readOnly"`, `"comments"`, `"trackedChanges"`,
767
- * `"forms"`, `"none"`). `undefined` when no protection element exists.
768
- */
769
- editType?: string;
770
- /** Whether the declared protection is enforced (`w:enforcement="1"`). */
771
- enforcementActive: boolean;
772
- /** All parsed permission ranges from the source package. */
773
- ranges: ProtectionRange[];
774
- /** Count of permission ranges that are currently enforced. */
775
- enforcedRangeCount: number;
776
- /** Count of permission ranges preserved but not live-enforced. */
777
- preservedRangeCount: number;
778
- }
779
-
780
- export type CaretAffinity = "forward" | "backward" | "none";
781
-
782
- export interface ActiveListContext {
783
- numberingInstanceId: string;
784
- level: number;
785
- isOrdered: boolean;
786
- markerText?: string;
787
- }
788
-
789
- export interface ActiveNoteContext {
790
- noteKind: "footnote" | "endnote";
791
- noteId: string;
792
- referencePosition: number;
793
- }
794
-
795
- export interface PageRegionHitTest {
796
- region: "body" | "header" | "footer" | "margin" | "gutter";
797
- sectionIndex: number;
798
- columnIndex: number;
799
- }
800
-
801
- export interface LayoutMeasurement {
802
- pageRegions: PageRegionHitTest[];
803
- caretAffinity: CaretAffinity;
804
- tabStops: Array<{ pos: number; val?: string; leader?: string }>;
805
- listMarkerLane?: { indent: number; markerWidth: number };
806
- objectFrame?: { kind: "image" | "textbox" | "shape"; anchorPos: number; display: "inline" | "floating" };
807
- }
808
-
809
- export interface EditorViewStateSnapshot {
810
- viewMode: ViewMode;
811
- documentMode: DocumentMode;
812
- workspaceMode: WorkspaceMode;
813
- zoomLevel: ZoomLevel;
814
- activeStory: EditorStoryTarget;
815
- selection: SelectionSnapshot;
816
- caretAffinity: CaretAffinity;
817
- activeListContext: ActiveListContext | null;
818
- activeNoteContext: ActiveNoteContext | null;
819
- activePageRegion: PageRegionHitTest | null;
820
- activeObjectFrame: LayoutMeasurement["objectFrame"] | null;
821
- measurement: LayoutMeasurement;
822
- isFocused: boolean;
823
- }
824
-
825
- export interface CommandStateSnapshot {
826
- canUndo: boolean;
827
- canRedo: boolean;
828
- readOnly: boolean;
829
- }
830
-
831
- export interface RuntimeRenderSnapshot {
832
- documentId: string;
833
- sessionId: string;
834
- sourceLabel?: string;
835
- revisionToken: string;
836
- isReady: boolean;
837
- isDirty: boolean;
838
- readOnly: boolean;
839
- documentMode: DocumentMode;
840
- selection: SelectionSnapshot;
841
- activeStory: EditorStoryTarget;
842
- pageLayout?: PageLayoutSnapshot;
843
- documentStats: DocumentStats;
844
- comments: CommentSidebarSnapshot;
845
- trackedChanges: TrackedChangesSnapshot;
846
- compatibility: CompatibilityPanelSnapshot;
847
- warnings: EditorWarning[];
848
- fatalError?: EditorError;
849
- commandState: CommandStateSnapshot;
850
- surface?: EditorSurfaceSnapshot;
851
- protectionSnapshot: ProtectionSnapshot;
852
- }
853
-
854
- export interface EditorSessionState {
855
- sessionVersion: "editor-session-state/1";
856
- schemaVersion: RuntimePersistedEditorSnapshot["schemaVersion"];
857
- documentId: string;
858
- docId: string;
859
- createdAt: string;
860
- updatedAt: string;
861
- editorBuild: string;
862
- canonicalDocument: RuntimePersistedEditorSnapshot["canonicalDocument"];
863
- compatibility: CompatibilityReport;
864
- warningLog: EditorWarning[];
865
- protectionSnapshot?: ProtectionSnapshot;
866
- sourcePackage?: RuntimePersistedEditorSnapshot["sourcePackage"];
867
- }
868
-
869
- export interface PersistedEditorSnapshot {
870
- snapshotVersion: RuntimePersistedEditorSnapshot["snapshotVersion"];
871
- schemaVersion: RuntimePersistedEditorSnapshot["schemaVersion"];
872
- documentId: string;
873
- docId: string;
874
- createdAt: string;
875
- updatedAt: string;
876
- savedAt: string;
877
- editorBuild: string;
878
- canonicalDocument: RuntimePersistedEditorSnapshot["canonicalDocument"];
879
- compatibility: CompatibilityReport;
880
- warningLog: EditorWarning[];
881
- protectionSnapshot?: ProtectionSnapshot;
882
- sourcePackage?: RuntimePersistedEditorSnapshot["sourcePackage"];
883
- }
884
-
885
- export interface AddCommentParams {
886
- anchor?: EditorAnchorProjection;
887
- body?: string;
888
- authorId?: string;
889
- }
890
-
891
- export interface ExportDocxOptions {
892
- fileName?: string;
893
- reason?: string;
894
- }
895
-
896
- export interface ExportDelivery {
897
- mode: "downloaded" | "persisted-by-host" | "exported-bytes-only";
898
- savedAt?: string;
899
- }
900
-
901
- export interface ExportResult {
902
- bytes: Uint8Array;
903
- mimeType: string;
904
- fileName: string;
905
- delivery: ExportDelivery;
906
- }
907
-
908
- export type WorkflowScopeMode = "edit" | "suggest" | "comment" | "view";
909
-
910
- export interface WorkflowCandidateRange {
911
- candidateId: string;
912
- storyTarget?: EditorStoryTarget;
913
- anchor: EditorAnchorProjection;
914
- label?: string;
915
- source?: "search" | "playbook" | "host" | "ai";
916
- }
917
-
918
- export interface WorkflowScope {
919
- scopeId: string;
920
- mode: WorkflowScopeMode;
921
- anchor: EditorAnchorProjection;
922
- storyTarget?: EditorStoryTarget;
923
- workItemId?: string;
924
- label?: string;
925
- domain?: "legal" | "commercial" | "finance" | "other";
926
- }
927
-
928
- export interface WorkflowWorkItem {
929
- workItemId: string;
930
- title: string;
931
- description?: string;
932
- domain?: "legal" | "commercial" | "finance" | "other";
933
- status?: "pending" | "active" | "done" | "blocked";
934
- scopeIds: string[];
935
- }
936
-
937
- export interface WorkflowOverlay {
938
- overlayVersion: "workflow-overlay/1";
939
- candidates?: WorkflowCandidateRange[];
940
- scopes: WorkflowScope[];
941
- workItems?: WorkflowWorkItem[];
942
- activeWorkItemId?: string | null;
943
- }
944
-
945
- export interface WorkflowBlockedCommandReason {
946
- code:
947
- | "outside_workflow_scope"
948
- | "workflow_comment_only"
949
- | "workflow_view_only"
950
- | "workflow_preserve_only"
951
- | "workflow_blocked_import"
952
- | "document_read_only"
953
- | "document_viewing_mode"
954
- | "protected_range"
955
- | "unsupported_surface"
956
- | "suggesting_unsupported";
957
- message: string;
958
- scopeId?: string;
959
- workItemId?: string;
960
- anchor?: EditorAnchorProjection;
961
- storyTarget?: EditorStoryTarget;
962
- }
963
-
964
- export interface WorkflowScopeSnapshot {
965
- overlayPresent: boolean;
966
- activeWorkItemId?: string | null;
967
- activeWorkItem?: WorkflowWorkItem;
968
- scopes: WorkflowScope[];
969
- candidates: WorkflowCandidateRange[];
970
- blockedReasons: WorkflowBlockedCommandReason[];
971
- }
972
-
973
- export type EffectiveSelectionMode = WorkflowScopeMode | "blocked";
974
-
975
- export interface InteractionGuardSnapshot {
976
- effectiveMode: EffectiveSelectionMode;
977
- matchedScopeId?: string;
978
- matchedScopeMode?: WorkflowScopeMode;
979
- disabledReason?: string;
980
- blockedReasons: WorkflowBlockedCommandReason[];
981
- }
982
-
983
- export type WorkflowMarkupKind =
984
- | "highlight"
985
- | "comment"
986
- | "revision"
987
- | "field"
988
- | "protected_range"
989
- | "opaque_fragment";
990
-
991
- export interface WorkflowMarkupBase {
992
- markupId: string;
993
- kind: WorkflowMarkupKind;
994
- anchor: EditorAnchorProjection;
995
- storyTarget?: EditorStoryTarget;
996
- label: string;
997
- excerpt?: string;
998
- }
999
-
1000
- export interface WorkflowHighlightMarkup extends WorkflowMarkupBase {
1001
- kind: "highlight";
1002
- color: string;
1003
- text: string;
1004
- }
1005
-
1006
- export interface WorkflowCommentMarkup extends WorkflowMarkupBase {
1007
- kind: "comment";
1008
- commentId: string;
1009
- status: CommentSidebarThreadSnapshot["status"];
1010
- warningCount: number;
1011
- entryCount: number;
1012
- createdAt: string;
1013
- createdBy: string;
1014
- }
1015
-
1016
- export interface WorkflowRevisionMarkup extends WorkflowMarkupBase {
1017
- kind: "revision";
1018
- revisionId: string;
1019
- revisionKind: TrackedChangeEntrySnapshot["kind"];
1020
- status: TrackedChangeEntrySnapshot["status"];
1021
- actionability: TrackedChangeEntrySnapshot["actionability"];
1022
- authorId: string;
1023
- createdAt: string;
1024
- preserveOnlyReason?: string;
1025
- }
1026
-
1027
- export interface WorkflowFieldMarkup extends WorkflowMarkupBase {
1028
- kind: "field";
1029
- fieldIndex: number;
1030
- fieldFamily: FieldFamily;
1031
- fieldTarget?: string;
1032
- refreshStatus: FieldRefreshStatus;
1033
- displayText: string;
1034
- }
1035
-
1036
- export interface WorkflowProtectedRangeMarkup extends WorkflowMarkupBase {
1037
- kind: "protected_range";
1038
- rangeId: string;
1039
- enforced: boolean;
1040
- enforcementReason: string;
1041
- editorGroup?: string;
1042
- editor?: string;
1043
- }
1044
-
1045
- export interface WorkflowOpaqueFragmentMarkup extends WorkflowMarkupBase {
1046
- kind: "opaque_fragment";
1047
- fragmentId: string;
1048
- warningId: string;
1049
- detail: string;
1050
- blockedReasonCode: "workflow_preserve_only" | "workflow_blocked_import";
1051
- }
1052
-
1053
- export type WorkflowMarkupItem =
1054
- | WorkflowHighlightMarkup
1055
- | WorkflowCommentMarkup
1056
- | WorkflowRevisionMarkup
1057
- | WorkflowFieldMarkup
1058
- | WorkflowProtectedRangeMarkup
1059
- | WorkflowOpaqueFragmentMarkup;
1060
-
1061
- export interface WorkflowMarkupSnapshot {
1062
- totalCount: number;
1063
- items: WorkflowMarkupItem[];
1064
- highlights: WorkflowHighlightMarkup[];
1065
- comments: WorkflowCommentMarkup[];
1066
- revisions: WorkflowRevisionMarkup[];
1067
- fields: WorkflowFieldMarkup[];
1068
- protectedRanges: WorkflowProtectedRangeMarkup[];
1069
- opaqueFragments: WorkflowOpaqueFragmentMarkup[];
1070
- }
1071
-
1072
- export type HostAnnotationKind =
1073
- | "note"
1074
- | "scope_hint"
1075
- | "readonly_marker"
1076
- | "suggestion"
1077
- | "warning";
1078
-
1079
- export interface HostAnnotationItem {
1080
- annotationId: string;
1081
- kind: HostAnnotationKind;
1082
- label: string;
1083
- anchor: EditorAnchorProjection;
1084
- storyTarget?: EditorStoryTarget;
1085
- detail?: string;
1086
- scopeMode?: WorkflowScopeMode;
1087
- severity?: "low" | "medium" | "high";
1088
- workItemId?: string;
1089
- provenance: "host";
1090
- }
1091
-
1092
- export interface HostAnnotationOverlay {
1093
- overlayVersion: "host-annotation-overlay/1";
1094
- annotations: HostAnnotationItem[];
1095
- }
1096
-
1097
- export interface HostAnnotationSnapshot {
1098
- totalCount: number;
1099
- annotations: HostAnnotationItem[];
1100
- }
1101
-
1102
- export interface WorkflowCandidateRangeOptions {
1103
- kinds?: WorkflowMarkupKind[];
1104
- includeDetached?: boolean;
1105
- source?: WorkflowCandidateRange["source"];
1106
- }
1107
-
1108
- export type AutosaveState =
1109
- | { status: "idle" }
1110
- | { status: "saving" }
1111
- | { status: "saved"; savedAt: string }
1112
- | { status: "error"; error: EditorError };
1113
-
1114
- export interface AutosaveConfig {
1115
- enabled?: boolean;
1116
- debounceMs?: number;
1117
- }
1118
-
1119
- export type WordReviewEditorEvent =
1120
- | {
1121
- type: "ready";
1122
- documentId: string;
1123
- sessionId: string;
1124
- source: "docx" | "session" | "snapshot";
1125
- stats: DocumentStats;
1126
- compatibility: CompatibilityReport;
1127
- comments: CommentSidebarSnapshot;
1128
- trackedChanges: TrackedChangesSnapshot;
1129
- }
1130
- | {
1131
- type: "dirty_changed";
1132
- documentId: string;
1133
- isDirty: boolean;
1134
- }
1135
- | {
1136
- type: "selection_changed";
1137
- documentId: string;
1138
- selection: SelectionSnapshot;
1139
- }
1140
- | {
1141
- type: "comment_added";
1142
- documentId: string;
1143
- commentId: string;
1144
- anchor: EditorAnchorProjection;
1145
- }
1146
- | {
1147
- type: "comment_resolved";
1148
- documentId: string;
1149
- commentId: string;
1150
- }
1151
- | {
1152
- type: "change_accepted";
1153
- documentId: string;
1154
- changeId: string;
1155
- }
1156
- | {
1157
- type: "change_rejected";
1158
- documentId: string;
1159
- changeId: string;
1160
- }
1161
- | {
1162
- type: "story_changed";
1163
- documentId: string;
1164
- activeStory: EditorStoryTarget;
1165
- }
1166
- | {
1167
- type: "warning_added";
1168
- documentId: string;
1169
- warning: EditorWarning;
1170
- }
1171
- | {
1172
- type: "warning_cleared";
1173
- documentId: string;
1174
- warningId: string;
1175
- code: EditorWarningCode;
1176
- }
1177
- | {
1178
- type: "error";
1179
- documentId: string;
1180
- error: EditorError;
1181
- }
1182
- | {
1183
- type: "autosave_state";
1184
- documentId: string;
1185
- state: AutosaveState;
1186
- }
1187
- | {
1188
- type: "snapshot_saved";
1189
- documentId: string;
1190
- snapshot: PersistedEditorSnapshot;
1191
- isAutosave: boolean;
1192
- }
1193
- | {
1194
- type: "session_saved";
1195
- documentId: string;
1196
- sessionState: EditorSessionState;
1197
- savedAt: string;
1198
- isAutosave: boolean;
1199
- }
1200
- | {
1201
- type: "export_completed";
1202
- documentId: string;
1203
- result: ExportResult;
1204
- }
1205
- | {
1206
- type: "workflow_overlay_changed";
1207
- documentId: string;
1208
- snapshot: WorkflowScopeSnapshot;
1209
- }
1210
- | {
1211
- type: "workflow_active_work_item_changed";
1212
- documentId: string;
1213
- activeWorkItemId: string | null;
1214
- }
1215
- | {
1216
- type: "host_annotation_overlay_changed";
1217
- documentId: string;
1218
- snapshot: HostAnnotationSnapshot;
1219
- }
1220
- | {
1221
- type: "change_authored";
1222
- documentId: string;
1223
- changeId: string;
1224
- kind: "insertion" | "deletion";
1225
- }
1226
- | {
1227
- type: "command_blocked";
1228
- documentId: string;
1229
- command: string;
1230
- reasons: WorkflowBlockedCommandReason[];
1231
- };
1232
-
1233
- export interface LoadResult {
1234
- source?: ExternalDocumentSource;
1235
- }
1236
-
1237
- export interface SaveSnapshotParams {
1238
- documentId: string;
1239
- snapshot: PersistedEditorSnapshot;
1240
- isAutosave: boolean;
1241
- }
1242
-
1243
- export interface SaveSnapshotResult {
1244
- savedAt: string;
1245
- }
1246
-
1247
- export interface SaveSessionParams {
1248
- documentId: string;
1249
- sessionState: EditorSessionState;
1250
- isAutosave: boolean;
1251
- }
1252
-
1253
- export interface SaveSessionResult {
1254
- savedAt: string;
1255
- }
1256
-
1257
- export interface SaveExportParams {
1258
- documentId: string;
1259
- result: ExportResult;
1260
- }
1261
-
1262
- export interface SaveExportResult {
1263
- savedAt: string;
1264
- }
1265
-
1266
- export interface EditorTelemetryEvent {
1267
- type: string;
1268
- documentId: string;
1269
- detail?: Record<string, unknown>;
1270
- }
1271
-
1272
- export interface EditorHostAdapter {
1273
- load?(params: LoadRequest): Promise<LoadResult>;
1274
- saveSession?(params: SaveSessionParams): Promise<SaveSessionResult>;
1275
- saveExport?(params: SaveExportParams): Promise<SaveExportResult>;
1276
- logEvent?(event: EditorTelemetryEvent): void;
1277
- }
1278
-
1279
- export interface EditorDatastoreAdapter {
1280
- load(params: LoadRequest): Promise<LoadResult>;
1281
- saveSnapshot(params: SaveSnapshotParams): Promise<SaveSnapshotResult>;
1282
- saveExport?(params: SaveExportParams): Promise<SaveExportResult>;
1283
- logEvent?(event: EditorTelemetryEvent): void;
1284
- }
1285
-
1286
- export interface WordReviewEditorRef {
1287
- focus(): void;
1288
- blur(): void;
1289
- undo(): void;
1290
- redo(): void;
1291
- addComment(params: AddCommentParams): string;
1292
- openComment(commentId: string): void;
1293
- resolveComment(commentId: string): void;
1294
- reopenComment(commentId: string): void;
1295
- addCommentReply(commentId: string, body: string): void;
1296
- editCommentBody(commentId: string, body: string): void;
1297
- deleteComment(commentId: string): void;
1298
- acceptChange(changeId: string): void;
1299
- rejectChange(changeId: string): void;
1300
- acceptAllChanges(): void;
1301
- rejectAllChanges(): void;
1302
- exportDocx(options?: ExportDocxOptions): Promise<ExportResult>;
1303
- getSessionState(): EditorSessionState;
1304
- getSnapshot(): PersistedEditorSnapshot;
1305
- getRenderSnapshot(): RuntimeRenderSnapshot;
1306
- getCompatibilityReport(): CompatibilityReport;
1307
- getWarnings(): EditorWarning[];
1308
- getCommentSidebarSnapshot(): CommentSidebarSnapshot;
1309
- getTrackedChangesSnapshot(): TrackedChangesSnapshot;
1310
- getComments(): CommentSidebarSnapshot;
1311
- getTrackedChanges(): TrackedChangesSnapshot;
1312
- isDirty(): boolean;
1313
- getFormattingState(): FormattingStateSnapshot;
1314
- getStyleCatalog(): StyleCatalogSnapshot;
1315
- replaceText(text: string, target?: EditorAnchorProjection): void;
1316
- toggleBold(): void;
1317
- toggleItalic(): void;
1318
- toggleUnderline(): void;
1319
- toggleStrikethrough(): void;
1320
- toggleSuperscript(): void;
1321
- toggleSubscript(): void;
1322
- setFontFamily(fontFamily: string | null): void;
1323
- setFontSize(size: number | null): void;
1324
- setTextColor(color: string | null): void;
1325
- setHighlightColor(color: string | null): void;
1326
- setAlignment(alignment: FormattingAlignment): void;
1327
- setParagraphStyle(styleId: string | null): void;
1328
- setTableStyle(styleId: string | null): void;
1329
- indent(): void;
1330
- outdent(): void;
1331
- insertPageBreak(): void;
1332
- insertTable(options: InsertTableOptions): void;
1333
- insertImage(options: InsertImageOptions): void;
1334
- addRowBefore(): void;
1335
- addRowAfter(): void;
1336
- addColumnBefore(): void;
1337
- addColumnAfter(): void;
1338
- deleteRow(): void;
1339
- deleteColumn(): void;
1340
- deleteTable(): void;
1341
- mergeCells(): void;
1342
- splitCell(): void;
1343
- setCellBackground(color: string): void;
1344
- search(query: string, options?: SearchOptions): SearchResultSnapshot[];
1345
- clearSearch(): void;
1346
- setSelection(selection: SelectionSnapshot | null): void;
1347
- scrollToRevision(revisionId: string): void;
1348
- scrollToComment(commentId: string): void;
1349
- openStory(target: EditorStoryTarget): void;
1350
- closeStory(): void;
1351
- getPageLayoutSnapshot(): PageLayoutSnapshot | null;
1352
- getDocumentNavigationSnapshot(): DocumentNavigationSnapshot;
1353
- getFieldSnapshot(): FieldSnapshot;
1354
- updateFields(options?: UpdateFieldsOptions): UpdateFieldsResult;
1355
- updateTableOfContents(options?: TocRefreshOptions): TocRefreshResult;
1356
- getViewState(): EditorViewStateSnapshot;
1357
- setDocumentMode(mode: DocumentMode): void;
1358
- getProtectionSnapshot(): ProtectionSnapshot;
1359
- setWorkspaceMode(mode: WorkspaceMode): void;
1360
- setZoom(level: ZoomLevel): void;
1361
- insertSectionBreak(type: SectionBreakType, options?: { afterSectionIndex?: number }): void;
1362
- deleteSectionBreak(sectionIndex: number): void;
1363
- updateSectionLayout(sectionIndex: number, patch: SectionLayoutPatch): void;
1364
- setSectionPageNumbering(
1365
- sectionIndex: number,
1366
- patch: SectionPageNumberingPatch | null,
1367
- ): void;
1368
- setHeaderFooterLink(sectionIndex: number, params: HeaderFooterLinkPatch): void;
1369
- setImageLayout(mediaId: string, dimensions: { widthEmu: number; heightEmu: number }): void;
1370
- setImageFrame(mediaId: string, offsets: { horizontalOffsetEmu?: number; verticalOffsetEmu?: number }): void;
1371
- setWorkflowOverlay(overlay: WorkflowOverlay): void;
1372
- clearWorkflowOverlay(): void;
1373
- getWorkflowScopeSnapshot(): WorkflowScopeSnapshot | null;
1374
- getInteractionGuardSnapshot(): InteractionGuardSnapshot;
1375
- getWorkflowMarkupSnapshot(): WorkflowMarkupSnapshot;
1376
- setHostAnnotationOverlay(overlay: HostAnnotationOverlay): void;
1377
- clearHostAnnotationOverlay(): void;
1378
- getHostAnnotationSnapshot(): HostAnnotationSnapshot;
1379
- getWorkflowCandidateRanges(options?: WorkflowCandidateRangeOptions): WorkflowCandidateRange[];
1380
- replaceWorkflowMarkupText(markupId: string, text: string): void;
1381
- }
1382
-
1383
- export interface WordReviewEditorProps {
1384
- documentId: string;
1385
- currentUser: EditorUser;
1386
- ydoc?: import('yjs').Doc;
1387
- awareness?: import("y-protocols/awareness").Awareness;
1388
- initialDocx?: Uint8Array | ArrayBuffer;
1389
- initialSessionState?: EditorSessionState;
1390
- initialSnapshot?: PersistedEditorSnapshot;
1391
- initialSourceLabel?: string;
1392
- externalDocumentRevision?: string;
1393
- externalDocSource?: ExternalDocumentSource;
1394
- loadRevision?: string;
1395
- loadSourcePolicy?: LoadSourcePolicy;
1396
- readOnly?: boolean;
1397
- reviewMode?: "editing" | "review";
1398
- suggestionsEnabled?: boolean;
1399
- markupDisplay?: "clean" | "simple" | "all";
1400
- showReviewPanel?: boolean;
1401
- chromeVisibility?: Partial<WordReviewEditorChromeVisibility>;
1402
- hostAdapter?: EditorHostAdapter;
1403
- datastore?: EditorDatastoreAdapter;
1404
- autosave?: AutosaveConfig;
1405
- onEvent?: (event: WordReviewEditorEvent) => void;
1406
- onWarning?: (warning: EditorWarning) => void;
1407
- onError?: (error: EditorError) => void;
1408
- }
1409
-
1410
- export interface WordReviewEditorChromeVisibility {
1411
- toolbar: boolean;
1412
- alerts: boolean;
1413
- selectionOverlay: boolean;
1414
- contextToolbars: boolean;
1415
- pageChrome: boolean;
1416
- statusBar: boolean;
1417
- reviewRail: boolean;
1418
- }