@docx-editor.dev/core 2.31.0 → 2.33.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 (140) hide show
  1. package/README.md +25 -1
  2. package/THIRD_PARTY_NOTICES.md +1 -0
  3. package/dist/automation.cjs +1 -1
  4. package/dist/automation.d.ts +16 -54
  5. package/dist/automation.js +1 -1
  6. package/dist/binding.cjs +1 -1
  7. package/dist/binding.d.ts +17 -15
  8. package/dist/binding.js +1 -1
  9. package/dist/{chrome-print-BWvaVEhD.d.ts → chrome-print-CrPI9ZQc.d.ts} +128 -38
  10. package/dist/chunk-23MKR33J.js +4 -0
  11. package/dist/chunk-2CWQY27B.cjs +1 -0
  12. package/dist/chunk-2DEY5NUC.cjs +32 -0
  13. package/dist/chunk-2DR4TH6B.js +1 -0
  14. package/dist/chunk-2F2UEAE2.js +2 -0
  15. package/dist/chunk-2GPGAFOJ.cjs +5 -0
  16. package/dist/chunk-ALD626VU.cjs +2 -0
  17. package/dist/chunk-AU33YWEJ.js +236 -0
  18. package/dist/chunk-AXU63LYW.cjs +1 -0
  19. package/dist/chunk-CM5VZRBV.js +32 -0
  20. package/dist/chunk-D7FAFFTN.js +1 -0
  21. package/dist/chunk-DYUVJNDD.cjs +1 -0
  22. package/dist/chunk-ESYUKD5D.js +2 -0
  23. package/dist/chunk-F7TGQMVR.js +5 -0
  24. package/dist/chunk-FLW7KIQX.js +30 -0
  25. package/dist/chunk-JG4A6W6I.js +7 -0
  26. package/dist/chunk-JNGLSBPH.js +2 -0
  27. package/dist/chunk-KE6ZWRIY.cjs +236 -0
  28. package/dist/chunk-L3YXJDPX.js +1 -0
  29. package/dist/chunk-LI42N7OW.cjs +4 -0
  30. package/dist/chunk-PLKDS4JT.js +1 -0
  31. package/dist/chunk-PXMTQ73F.cjs +2 -0
  32. package/dist/chunk-R4R3AAE4.js +1 -0
  33. package/dist/chunk-RFUNFTGV.cjs +1 -0
  34. package/dist/chunk-SVM6PGMS.js +3 -0
  35. package/dist/chunk-SZURLHR3.cjs +3 -0
  36. package/dist/chunk-UYCGCVZ2.cjs +1 -0
  37. package/dist/chunk-WN7ICTA5.js +1 -0
  38. package/dist/chunk-X34QRAUU.cjs +1 -0
  39. package/dist/chunk-XNBYG4XJ.cjs +30 -0
  40. package/dist/chunk-ZDFJW5XS.cjs +2 -0
  41. package/dist/chunk-ZWO4JHNN.cjs +7 -0
  42. package/dist/collaboration/replication.cjs +1 -1
  43. package/dist/collaboration/replication.d.ts +29 -4
  44. package/dist/collaboration/replication.js +1 -1
  45. package/dist/collaboration.cjs +1 -1
  46. package/dist/collaboration.d.ts +5 -5
  47. package/dist/collaboration.js +1 -1
  48. package/dist/contracts/document.d.ts +3 -3
  49. package/dist/contracts/editor.d.ts +13 -9
  50. package/dist/contracts/interaction.d.ts +2 -2
  51. package/dist/contracts/modules.d.ts +15 -12
  52. package/dist/contracts/types.d.ts +135 -2
  53. package/dist/{custom-node-writes-TeUvMP13.d.ts → custom-node-writes-AqY5KpVx.d.ts} +7 -2
  54. package/dist/diagnostic-context-CuzhOX0g.d.ts +98 -0
  55. package/dist/{diagnostic-hints-C9JlLz1L.d.ts → diagnostic-hints-BtCaCqQC.d.ts} +4 -4
  56. package/dist/{document-protection-C8x3P2J6.d.ts → document-protection-BvbpSXbQ.d.ts} +1 -1
  57. package/dist/drawing-graphic-kind-CXYGYbB3.d.ts +324 -0
  58. package/dist/drawing-preview-package-B9lSLRg4.d.ts +115 -0
  59. package/dist/{editor-B2ShlO23.d.ts → editor-B7OOAAie.d.ts} +181 -244
  60. package/dist/editor-fonts-D_-vjuJi.d.ts +53 -0
  61. package/dist/{editor-scope-C7ke1KJG.d.ts → editor-scope-CA6egMaK.d.ts} +6 -2
  62. package/dist/editor.cjs +1 -1
  63. package/dist/editor.css +4 -4
  64. package/dist/editor.d.ts +259 -31
  65. package/dist/editor.js +1 -1
  66. package/dist/export.cjs +2 -2
  67. package/dist/export.d.ts +48 -19
  68. package/dist/export.js +2 -2
  69. package/dist/{failure-NS2lsya4.d.ts → failure-6KGFrDO9.d.ts} +1 -1
  70. package/dist/{font-resolver-CWh40DYp.d.ts → font-resolver-Bm9XqTNO.d.ts} +15 -1
  71. package/dist/index.cjs +1 -1
  72. package/dist/index.d.ts +43 -26
  73. package/dist/index.js +1 -1
  74. package/dist/{layout-shaping-CWS3j0Xr.d.ts → layout-shaping-Ci_BTnSU.d.ts} +1 -1
  75. package/dist/layout.cjs +1 -1
  76. package/dist/layout.d.ts +181 -99
  77. package/dist/layout.js +1 -1
  78. package/dist/metafile-drawing-DtMFyMKq.d.ts +107 -0
  79. package/dist/{note-properties-QsKh24sM.d.ts → note-properties-DCIJUKIy.d.ts} +1 -1
  80. package/dist/output.cjs +1 -1
  81. package/dist/output.d.ts +11 -7
  82. package/dist/output.js +1 -1
  83. package/dist/{protocol-COZJUKUY.d.ts → protocol-Cp_QzVxS.d.ts} +75 -5
  84. package/dist/{review-paragraph-order-C_QbCKcH.d.ts → review-paragraph-order-BJQ43_r0.d.ts} +1 -1
  85. package/dist/revision-projection-OVusTS77.d.ts +258 -0
  86. package/dist/{semantic-cell-selection-Cub9FDa8.d.ts → semantic-cell-selection-CoI5hHBm.d.ts} +2 -2
  87. package/dist/{semantic-interaction-dApRIYpt.d.ts → semantic-interaction-BbA4dgEo.d.ts} +1 -1
  88. package/dist/{semantic-paint-DLzA8sjP.d.ts → semantic-paint-B5JcIv9c.d.ts} +19 -9
  89. package/dist/{semantic-record-queries-3yp9o11g.d.ts → semantic-record-queries-DnO8J5_j.d.ts} +1 -1
  90. package/dist/{semantic-records-B-akgRch.d.ts → semantic-records-DoK0lNjS.d.ts} +439 -418
  91. package/dist/store.cjs +1 -1
  92. package/dist/store.d.ts +511 -20
  93. package/dist/store.js +1 -1
  94. package/dist/{types-barrel-CkF2JbU4.d.ts → tree-op-types-Df4oY2u4.d.ts} +1081 -524
  95. package/dist/{tree-package-store-B8l8DX3Z.d.ts → tree-package-store-DXhX1PE-.d.ts} +8 -3
  96. package/dist/{tree-session-contract-DeLRqohz.d.ts → tree-session-contract-CF2625mv.d.ts} +5 -5
  97. package/dist/unsupported-elements-CUojsaCr.d.ts +23 -0
  98. package/docs/accept-reject-without-scrolling.md +95 -0
  99. package/docs/comment-on-found-text.md +72 -0
  100. package/docs/custom-review-cards.md +178 -0
  101. package/docs/highlight-ranges.md +48 -0
  102. package/docs/index.md +36 -0
  103. package/docs/propose-rewrite.md +247 -0
  104. package/docs/tracked-replacement.md +68 -0
  105. package/licenses/ECMA-376.md +29 -0
  106. package/package.json +3 -2
  107. package/dist/bookmark-names-DDuAra_V.d.ts +0 -37
  108. package/dist/chunk-243W4WW2.cjs +0 -2
  109. package/dist/chunk-2E2RPEKX.js +0 -1
  110. package/dist/chunk-4S24UOPG.js +0 -30
  111. package/dist/chunk-5JPIEN54.cjs +0 -3
  112. package/dist/chunk-5SO5QDMV.cjs +0 -2
  113. package/dist/chunk-6IDOVU6L.cjs +0 -1
  114. package/dist/chunk-6JIJOZDW.js +0 -1
  115. package/dist/chunk-BTQKU64Q.cjs +0 -1
  116. package/dist/chunk-DBOOTED4.cjs +0 -30
  117. package/dist/chunk-EOTAXOJY.cjs +0 -5
  118. package/dist/chunk-FDAKJ2SJ.cjs +0 -30
  119. package/dist/chunk-FNNOJNGY.js +0 -3
  120. package/dist/chunk-FT33HRZP.js +0 -5
  121. package/dist/chunk-HC6YNKUI.cjs +0 -1
  122. package/dist/chunk-HZ66UCIS.js +0 -2
  123. package/dist/chunk-IBRBNT37.cjs +0 -1
  124. package/dist/chunk-IVIN7X43.js +0 -30
  125. package/dist/chunk-LZY6B6IV.js +0 -4
  126. package/dist/chunk-MOYYRVFV.cjs +0 -2
  127. package/dist/chunk-N6B3BXCL.js +0 -1
  128. package/dist/chunk-Q5K2GGNG.js +0 -2
  129. package/dist/chunk-R2XINWVE.js +0 -7
  130. package/dist/chunk-SUEXVBPR.js +0 -1
  131. package/dist/chunk-T2QQHG5C.js +0 -18
  132. package/dist/chunk-VWIJKH4A.js +0 -1
  133. package/dist/chunk-WO4V6PNS.cjs +0 -18
  134. package/dist/chunk-XMJKFURD.cjs +0 -4
  135. package/dist/chunk-XSTGE3NI.cjs +0 -1
  136. package/dist/chunk-YQWMI6J5.cjs +0 -7
  137. package/dist/chunk-ZCJS7D7S.js +0 -2
  138. package/dist/diagnostic-context-DJ0P1uZE.d.ts +0 -31
  139. package/dist/headless-document-view-qOpaCF82.d.ts +0 -143
  140. package/dist/omml-equation-BsLAa2lX.d.ts +0 -115
package/README.md CHANGED
@@ -30,7 +30,7 @@ Node.js requires `^20.16.0 || >=22.3.0`.
30
30
  ## Features
31
31
 
32
32
  - [Read and save DOCX files](https://www.docx-editor.dev/docs/2.x/guides/loading-and-saving).
33
- - [Lay out and render document pages](https://www.docx-editor.dev/docs/2.x/word-fidelity).
33
+ - [Lay out and render document pages](https://www.docx-editor.dev/docs/2.x/word-fidelity). Charts, SmartArt saved without its drawing, shape effects, and WordArt need [`@docx-editor.dev/pro/drawing`](https://www.docx-editor.dev/docs/2.x/pro/drawing).
34
34
  - [Build an editor with shared commands and controls](https://www.docx-editor.dev/docs/2.x/guides/chrome-slots).
35
35
  - [Configure fonts for text measurement](https://www.docx-editor.dev/docs/2.x/guides/fonts).
36
36
 
@@ -114,6 +114,30 @@ Treat DOCX files as untrusted input. The engine validates URLs and limits XML en
114
114
 
115
115
  Anything you render from document data (a font name, a hyperlink target, a comment body) is still attacker-controlled at your boundary. Render it as text; do not build markup or URLs from it.
116
116
 
117
+ ## Which API for which job
118
+
119
+ | Job | Use |
120
+ | --- | --- |
121
+ | Build a review UI in the browser | The React or Vue adapter hooks, plus the review hooks and `DocxEditorReview` from `@docx-editor.dev/pro/react` or `@docx-editor.dev/pro/vue`. |
122
+ | Edit in a headless, server, or agent pipeline | The editing API in `@docx-editor.dev/editor-api`, which follows the Office.js object model. |
123
+
124
+ | Task | Browser host (React or Vue) | Headless, server, or agent |
125
+ | --- | --- | --- |
126
+ | [Comment on found text](https://www.docx-editor.dev/docs/2.x/recipes/comment-on-found-text) | `editor.findMatches`, `editor.selectMatch`, then `useReview().comment` | `body.search`, then `Range.insertComment` |
127
+ | Reply to a thread | `useReview().reply(item, text)` | `Comment.reply(text)` |
128
+ | [Record a tracked replacement](https://www.docx-editor.dev/docs/2.x/recipes/tracked-replacement) | Suggesting mode, then `editor.exec({ type: 'replaceMatch', match, text })` | `document.changeTrackingMode = 'TrackMineOnly'`, then `Range.insertText(text, 'Replace')` |
129
+ | [Propose an AI rewrite as tracked changes](https://www.docx-editor.dev/docs/2.x/recipes/propose-rewrite) | The same code through `DocxEditor.createBrowser` from `@docx-editor.dev/editor-api/browser` | `prepareRewrite` from `@docx-editor.dev/editor-api/agent` |
130
+ | [Accept or reject a change](https://www.docx-editor.dev/docs/2.x/recipes/accept-reject-without-scrolling) | `useReview().accept(item)` or `useReview().reject(item)` | `Revision.accept()` or `Revision.reject()` |
131
+ | [Open or reveal a change without scrolling](https://www.docx-editor.dev/docs/2.x/recipes/accept-reject-without-scrolling) | `useReview().setActive(key, { reveal: false })` | Not applicable: no viewport |
132
+ | [Highlight ranges](https://www.docx-editor.dev/docs/2.x/recipes/highlight-ranges) | `useHighlights(name, source, options)` | Not applicable |
133
+ | [Custom review rail cards](https://www.docx-editor.dev/docs/2.x/recipes/custom-review-cards) | `DocxEditorReview` with `preset` set to `false`, `useReview().items`, `useStackedReviewPositions`, and `useReviewRailMetrics` | Not applicable |
134
+ | Comment-on-selection button | `DocxEditorReview.AddComment` as a direct child of `DocxEditorReview`, or `useEditorCommand('review.addComment')` | Not applicable |
135
+ | Page setup and paragraph dialogs from a custom toolbar | `DocxEditor.PageSetupDialog` or `DocxEditor.ParagraphDialog` with `open` and a close handler (`onClose` in React, `@close` in Vue); enable the button from `usePageSetup().isEnabled` or `useParagraphFormat().isEnabled` | `Section.pageSetup`, and `Paragraph` properties such as `alignment` |
136
+
137
+ The review hooks need `reviewModule()` from `@docx-editor.dev/pro` in the editor's modules, and an editor `author` for comments and tracked changes. The editing API takes its author from the `author` option of `DocxEditor.createServer`, imported from `@docx-editor.dev/editor-api`, or of `DocxEditor.createBrowser`, imported from `@docx-editor.dev/editor-api/browser`.
138
+
139
+ This package ships the task recipes in [`docs/index.md`](./docs/index.md). They are also on the site: [Task recipes](https://www.docx-editor.dev/docs/2.x/recipes).
140
+
117
141
  ## Documentation
118
142
 
119
143
  - [Core overview](https://www.docx-editor.dev/docs/2.x/core)
@@ -19,6 +19,7 @@ This package also ships prebuilt third-party assets that are not esbuild inputs,
19
19
  so they cannot appear below. Their licenses travel with the package in
20
20
  `licenses/`:
21
21
 
22
+ - `licenses/ECMA-376.md`
22
23
  - `licenses/HarfBuzz-COPYING.txt`
23
24
 
24
25
  ## Bundled packages
@@ -1 +1 @@
1
- 'use strict';var chunkYQWMI6J5_cjs=require('./chunk-YQWMI6J5.cjs');require('./chunk-HC6YNKUI.cjs'),require('./chunk-DBOOTED4.cjs'),require('./chunk-5SO5QDMV.cjs'),require('./chunk-IBRBNT37.cjs'),require('./chunk-243W4WW2.cjs'),require('./chunk-6IDOVU6L.cjs'),require('./chunk-WO4V6PNS.cjs');Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.e}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.d}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.f}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.c}});Object.defineProperty(exports,"SERVER_AUTOMATION_CAPABILITIES",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.n}});Object.defineProperty(exports,"byteSizeBucket",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.v}});Object.defineProperty(exports,"countBucket",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.w}});Object.defineProperty(exports,"createAutomationPaginationProvider",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.l}});Object.defineProperty(exports,"createDiagnosticEmitter",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.x}});Object.defineProperty(exports,"createServerAutomationHost",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.o}});Object.defineProperty(exports,"diagnosticCause",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.z}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.y}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.r}});Object.defineProperty(exports,"diagnosticErrorName",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.B}});Object.defineProperty(exports,"documentPartKind",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.C}});Object.defineProperty(exports,"exceptionCause",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.A}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.q}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.h}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.g}});Object.defineProperty(exports,"openDiagnosticCode",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.s}});Object.defineProperty(exports,"paginationSnapshotOf",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.j}});Object.defineProperty(exports,"reviewDiagnosticCode",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.u}});Object.defineProperty(exports,"storeEditDiagnosticCode",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.t}});
1
+ 'use strict';var chunkZWO4JHNN_cjs=require('./chunk-ZWO4JHNN.cjs');require('./chunk-AXU63LYW.cjs'),require('./chunk-2DEY5NUC.cjs'),require('./chunk-PXMTQ73F.cjs'),require('./chunk-RFUNFTGV.cjs'),require('./chunk-DYUVJNDD.cjs'),require('./chunk-ZDFJW5XS.cjs'),require('./chunk-X34QRAUU.cjs'),require('./chunk-KE6ZWRIY.cjs');Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.g}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.f}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.h}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.e}});Object.defineProperty(exports,"SERVER_AUTOMATION_CAPABILITIES",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.p}});Object.defineProperty(exports,"byteSizeBucket",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.y}});Object.defineProperty(exports,"countBucket",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.z}});Object.defineProperty(exports,"createAutomationPaginationProvider",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.n}});Object.defineProperty(exports,"createDiagnosticEmitter",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.A}});Object.defineProperty(exports,"createServerAutomationHost",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.q}});Object.defineProperty(exports,"diagnosticCause",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.C}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.B}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.t}});Object.defineProperty(exports,"diagnosticErrorName",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.F}});Object.defineProperty(exports,"documentPartKind",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.G}});Object.defineProperty(exports,"exceptionCause",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.E}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.s}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.j}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.i}});Object.defineProperty(exports,"openDiagnosticCode",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.u}});Object.defineProperty(exports,"paginationSnapshotOf",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.l}});Object.defineProperty(exports,"reviewCodeOfSkip",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.w}});Object.defineProperty(exports,"reviewDiagnosticCode",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.x}});Object.defineProperty(exports,"reviewSkipOfReason",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.D}});Object.defineProperty(exports,"storeEditDiagnosticCode",{enumerable:true,get:function(){return chunkZWO4JHNN_cjs.v}});
@@ -11,21 +11,20 @@
11
11
  * @packageDocumentation
12
12
  * @public
13
13
  */
14
- import { A as AutomationOperation, a as AutomationCapabilities, b as AutomationHost } from './protocol-COZJUKUY.js';
15
- export { c as AutomationAlignment, d as AutomationBatchRequest, e as AutomationBatchResponse, f as AutomationChangeEvent, g as AutomationContentControlLock, h as AutomationContentControlRangeLocation, i as AutomationContentControlScope, j as AutomationContentControlSubtype, k as AutomationContentControlValue, l as AutomationError, m as AutomationErrorCode, n as AutomationFontRead, o as AutomationFontWrite, p as AutomationHandle, q as AutomationHandleRef, r as AutomationObjectKind, s as AutomationOperationKind, t as AutomationOperationResult, u as AutomationPageOrientation, v as AutomationPageSetupRead, w as AutomationPageSetupWrite, x as AutomationParagraphFormatRead, y as AutomationParagraphFormatWrite, z as AutomationParagraphRef, B as AutomationPoint, C as AutomationReadingOrder, D as AutomationSaveResult, E as AutomationSearchOptions, F as AutomationSelectionMode, G as AutomationSpan, H as AutomationSpanRef, I as AutomationTextProjection, J as AutomationUnsubscribe, K as AutomationValue } from './protocol-COZJUKUY.js';
16
- import { c as HeaderFooterVariant, N as NoteKind, C as ContentLockPolicy } from './tree-package-store-B8l8DX3Z.js';
17
- import { T as TextMeasurer, S as SemanticLayout } from './semantic-records-B-akgRch.js';
18
- import { H as HeadlessDocumentView } from './headless-document-view-qOpaCF82.js';
19
- import { av as OoxmlPackageLimits, as as OoxmlPackageRejection } from './types-barrel-CkF2JbU4.js';
20
- export { aw as RevisionAuthorEntry, ab as RevisionAuthorResult, ax as RevisionAuthorSkipReason, ay as RevisionBatchEntry, ac as RevisionBatchResult, az as RevisionBatchSkipDetail, aA as RevisionBatchSkipReason, aB as RevisionSiteRefusal } from './types-barrel-CkF2JbU4.js';
14
+ import { A as AutomationOperation, a as AutomationCapabilities, b as AutomationHost } from './protocol-Cp_QzVxS.js';
15
+ export { c as AutomationAlignment, d as AutomationAuthoringOperation, e as AutomationBatchRequest, f as AutomationBatchResponse, g as AutomationChangeEvent, h as AutomationContentControlLock, i as AutomationContentControlRangeLocation, j as AutomationContentControlScope, k as AutomationContentControlSubtype, l as AutomationContentControlValue, m as AutomationCustomNodePayload, n as AutomationEndpoint, o as AutomationError, p as AutomationErrorCode, q as AutomationFontRead, r as AutomationFontWrite, s as AutomationHandle, t as AutomationHandleRef, u as AutomationInlinePictureRead, v as AutomationInlinePictureWrite, w as AutomationListBullet, x as AutomationListLevelFormat, y as AutomationListNumbering, z as AutomationObjectKind, B as AutomationOperationKind, C as AutomationOperationResult, D as AutomationPageOrientation, E as AutomationPageSetupRead, F as AutomationPageSetupWrite, G as AutomationParagraphFormatRead, H as AutomationParagraphFormatWrite, I as AutomationParagraphRef, J as AutomationPoint, K as AutomationReadingOrder, L as AutomationSaveResult, M as AutomationSearchOptions, N as AutomationSelectionMode, O as AutomationShapeRead, P as AutomationShapeType, Q as AutomationSpan, R as AutomationSpanRef, S as AutomationTextProjection, T as AutomationUnsubscribe, U as AutomationValue } from './protocol-Cp_QzVxS.js';
16
+ import { H as HeaderFooterVariant, N as NoteKind, C as ContentLockPolicy } from './tree-package-store-DXhX1PE-.js';
17
+ import { az as OoxmlPackageLimits, aA as OoxmlPackageRejection } from './tree-op-types-Df4oY2u4.js';
18
+ export { aB as AutomationTableMutation, J as RevisionAuthorEntry, K as RevisionAuthorResult, L as RevisionAuthorSkipReason, M as RevisionBatchEntry, Q as RevisionBatchResult, T as RevisionBatchSkipDetail, U as RevisionBatchSkipReason, V as RevisionSiteRefusal } from './tree-op-types-Df4oY2u4.js';
19
+ import { T as TextMeasurer, S as SemanticLayout } from './semantic-records-DoK0lNjS.js';
20
+ import { H as HeadlessDocumentView } from './drawing-graphic-kind-CXYGYbB3.js';
21
21
  import { CollaborationModuleContribution } from './collaboration.js';
22
- import { B as ByteSizeBucket, b as CountBucket, f as DocumentOpenDiagnosticCode, j as ReviewDiagnosticCode, E as EditDiagnosticCode } from './diagnostic-hints-C9JlLz1L.js';
23
- export { C as CollaborationDiagnosticCode, c as CustomNodeDiagnosticCode, d as DiagnosticCode, D as DiagnosticErrorName, e as DiagnosticExplanation, a as DocumentPartKind, g as DocumentSaveDiagnosticCode, F as FailureStage, h as FontDiagnosticCode, i as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, R as ReviewChangeKind, k as ReviewOperation, l as diagnosticCodes, m as explainDiagnostic } from './diagnostic-hints-C9JlLz1L.js';
24
- export { a as diagnosticCause, d as diagnosticCauses, b as diagnosticErrorName, c as documentPartKind, e as exceptionCause } from './diagnostic-context-DJ0P1uZE.js';
25
- export { b as HistoryGroup, d as HistoryGroupOutcome } from './editor-scope-C7ke1KJG.js';
26
- import './omml-equation-BsLAa2lX.js';
22
+ export { D as DiagnosticEmitter, a as DiagnosticPayload, b as byteSizeBucket, c as countBucket, e as createDiagnosticEmitter, f as diagnosticCause, d as diagnosticCauses, g as diagnosticErrorName, h as documentPartKind, i as exceptionCause, o as openDiagnosticCode, r as reviewCodeOfSkip, j as reviewDiagnosticCode, k as reviewSkipOfReason, s as storeEditDiagnosticCode } from './diagnostic-context-CuzhOX0g.js';
23
+ export { B as ByteSizeBucket, C as CollaborationDiagnosticCode, a as CountBucket, b as CustomNodeDiagnosticCode, D as DiagnosticCode, c as DiagnosticErrorName, d as DiagnosticExplanation, e as DocumentOpenDiagnosticCode, f as DocumentPartKind, g as DocumentSaveDiagnosticCode, E as EditDiagnosticCode, F as FailureStage, h as FontDiagnosticCode, i as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, j as ReviewChangeKind, R as ReviewDiagnosticCode, k as ReviewOperation, l as diagnosticCodes, m as explainDiagnostic } from './diagnostic-hints-BtCaCqQC.js';
24
+ export { c as HistoryGroup, H as HistoryGroupOutcome } from './editor-scope-CA6egMaK.js';
25
+ import './revision-projection-OVusTS77.js';
27
26
  import './collaboration/replication.js';
28
- import './failure-NS2lsya4.js';
27
+ import './failure-6KGFrDO9.js';
29
28
 
30
29
  /** The variants a section can declare furniture for. */
31
30
  declare const HEADER_FOOTER_VARIANTS: readonly HeaderFooterVariant[];
@@ -62,9 +61,9 @@ type AutomationShapeOwnerStory = {
62
61
  };
63
62
 
64
63
  /** Operations that read. They never open a transaction. */
65
- declare const AUTOMATION_QUERY_OPERATIONS: readonly ["getTables", "getTable", "getTableRows", "getTableCells", "getTableCell", "getTableCellProperties", "getTableCellBody", "getFields", "getField", "getInlinePictures", "getInlinePicture", "getShapes", "getShape", "getShapeBody", "getChangeTrackingMode", "getDocument", "getDocumentProperty", "getBody", "getParagraphs", "getRange", "getSpanParagraphs", "getText", "getSpanText", "getParagraphId", "search", "getFont", "getParagraphFormat", "getStyle", "getSections", "getPageSetup", "getFurniture", "getNotes", "getNoteBody", "getNoteText", "getNoteKind", "getLists", "getListId", "getListById", "getListParagraphs", "getParagraphList", "getListLevel", "getHyperlink", "getBookmarks", "getBookmarkName", "getBookmarkRange", "getBookmarkNames", "getBookmarkRangeByName", "getComments", "getCommentReplies", "getCommentId", "getCommentAuthor", "getCommentDate", "getCommentText", "getCommentRange", "getCommentResolved", "getRevisions", "getRevisionType", "getRevisionAuthor", "getRevisionDate", "getRevisionRange", "getReviewItemRange", "getContentControls", "getContentControlById", "getContentControlsByTag", "getContentControlsByTitle", "getContentControlTag", "getContentControlTitle", "getContentControlFileId", "getContentControlSubtype", "getContentControlLock", "getContentControlIsBound", "getContentControlPlaceholderShown", "getContentControlTemporary", "getContentControlText", "getContentControlParagraphs", "getContentControlRange"];
64
+ declare const AUTOMATION_QUERY_OPERATIONS: readonly ["getTables", "getTable", "getTableRows", "getTableCells", "getTableCell", "getMergedTableCell", "getTableCellProperties", "getTableCellBody", "getFields", "getField", "getFieldResult", "getInlinePictures", "getInlinePicture", "getShapes", "getShape", "getShapeBody", "getChangeTrackingMode", "getDocument", "getDocumentProperty", "getBody", "getParagraphs", "getRange", "getSpanParagraphs", "getText", "getSpanText", "getTextRanges", "expandSpan", "getReviewedText", "getParagraphId", "search", "getFont", "getParagraphFormat", "getStyle", "getSections", "getPageSetup", "getFurniture", "getNotes", "getNoteBody", "getNoteText", "getNoteKind", "getLists", "getListId", "getListById", "getListParagraphs", "getParagraphList", "getListLevel", "getHyperlink", "getBookmarks", "getBookmarkName", "getBookmarkRange", "getBookmarkNames", "getBookmarkRangeByName", "getComments", "getCommentReplies", "getCommentId", "getCommentAuthor", "getCommentDate", "getCommentText", "getCommentRange", "getCommentResolved", "getRevisions", "getRevisionType", "getRevisionAuthor", "getRevisionDate", "getRevisionRange", "getReviewItemRange", "getContentControls", "getContentControlById", "getContentControlsByTag", "getContentControlsByTitle", "getContentControlTag", "getContentControlTitle", "getContentControlFileId", "getContentControlSubtype", "getContentControlLock", "getContentControlIsBound", "getContentControlPlaceholderShown", "getContentControlTemporary", "getContentControlText", "getContentControlParagraphs", "getContentControlRange"];
66
65
  /** Operations that write. Every one of these goes through the single transaction path. */
67
- declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["removeDocumentInformation", "setDocumentProperties", "insertTableRows", "insertTable", "updateTable", "updateTableCell", "setInlinePicture", "deleteInlinePicture", "insertField", "setFieldCode", "deleteField", "updateFieldResult", "insertInlinePicture", "insertBreak", "setChangeTrackingMode", "proposeInsertion", "proposeDeletion", "proposeReplacement", "insertText", "replaceSpan", "replaceStoryBlocks", "insertParagraph", "splitParagraph", "deleteParagraph", "selectSpan", "selectBookmark", "insertBookmark", "deleteBookmark", "setFont", "setParagraphFormat", "setStyle", "setPageSetup", "deleteNote", "setListLevel", "startNewList", "attachToList", "detachFromList", "setListLevelFormat", "insertListParagraph", "setHyperlink", "insertComment", "setCommentResolved", "replyToComment", "deleteComment", "acceptRevision", "rejectRevision", "resolveRevisionBatch", "setRevisionAuthorBatch", "acceptAllRevisions", "rejectAllRevisions", "setContentControlValue", "setContentControlProperties", "deleteContentControl", "insertContentControlText", "insertContentControl", "insertCustomNode"];
66
+ declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["removeDocumentInformation", "setDocumentProperties", "insertTableRows", "insertTable", "updateTable", "updateTableCell", "splitTableCell", "setInlinePicture", "deleteInlinePicture", "insertField", "insertOoxml", "setFieldCode", "setFieldResult", "deleteField", "updateFieldResult", "insertInlinePicture", "insertBreak", "setChangeTrackingMode", "proposeInsertion", "proposeDeletion", "proposeReplacement", "insertText", "replaceSpan", "replaceStoryBlocks", "insertParagraph", "splitParagraph", "deleteParagraph", "selectSpan", "selectBookmark", "insertBookmark", "deleteBookmark", "setFont", "setParagraphFormat", "setStyle", "setPageSetup", "deleteNote", "setListLevel", "startNewList", "attachToList", "detachFromList", "setListLevelFormat", "insertListParagraph", "setHyperlink", "insertComment", "setCommentResolved", "replyToComment", "deleteComment", "acceptRevision", "rejectRevision", "resolveRevisionBatch", "setRevisionAuthorBatch", "acceptAllRevisions", "rejectAllRevisions", "setContentControlValue", "setContentControlProperties", "deleteContentControl", "insertContentControlText", "insertContentControl", "insertCustomNode"];
68
67
  /**
69
68
  * Commands that commit as a PACKAGE transaction and therefore share a batch with nothing.
70
69
  *
@@ -164,42 +163,5 @@ interface ServerAutomationHostOptions {
164
163
  */
165
164
  declare function createServerAutomationHost(bytes: Uint8Array, options?: ServerAutomationHostOptions): ServerAutomationHostResult;
166
165
 
167
- /**
168
- * The public code for a refused open. `too-large` is the one reason two layers share: the
169
- * archive reports it WITH the limit it crossed, a single XML part reports it without one.
170
- *
171
- * @public
172
- */
173
- declare function openDiagnosticCode(reason: string, limit?: string): DocumentOpenDiagnosticCode;
174
- /**
175
- * The public code for a store or host refusal reason, or `null` for a reason this table does
176
- * not know (a sentence, a binding reason). `unsupported-revision:<kind>` counts as
177
- * `unsupported-revision`, except `unsupported-revision:foreign-insertion`, which has its own
178
- * code.
179
- *
180
- * @public
181
- */
182
- declare function storeEditDiagnosticCode(reason: string): EditDiagnosticCode | null;
183
- /** The public code for a skipped tracked change, or null for a reason with no public code. */
184
- declare function reviewDiagnosticCode(reason: string): ReviewDiagnosticCode | null;
185
- /** The power-of-two bucket of a byte size. */
186
- declare function byteSizeBucket(bytes: number): ByteSizeBucket;
187
- /** The order-of-magnitude bucket of a count. */
188
- declare function countBucket(count: number): CountBucket;
189
- /** A diagnostic without the fields the emitter adds. Distributes over the union. */
190
- type DiagnosticPayload<T> = T extends unknown ? Omit<T, 'schemaVersion' | 'editorSessionId' | 'time'> : never;
191
- /** One delivery path for one editor or runtime instance. */
192
- interface DiagnosticEmitter<E> {
193
- /** Random for this instance and never stored. */
194
- readonly editorSessionId: string;
195
- /** Stamp the payload and hand it to every listener. A listener that throws is ignored. */
196
- deliver(payload: DiagnosticPayload<E>): void;
197
- }
198
- /**
199
- * A delivery path over `listeners`, read at each delivery so a later listener is heard. Generic
200
- * over the event union, which the editor contracts own: this lane never names them.
201
- */
202
- declare function createDiagnosticEmitter<E>(listeners: () => Iterable<(event: E) => unknown>, now?: () => number): DiagnosticEmitter<E>;
203
-
204
- export { AUTOMATION_COMMAND_OPERATIONS, AUTOMATION_QUERY_OPERATIONS, AUTOMATION_SOLITARY_OPERATIONS, AutomationCapabilities, AutomationHost, AutomationOperation, ByteSizeBucket, ContentLockPolicy, CountBucket, DocumentOpenDiagnosticCode, EditDiagnosticCode, HEADER_FOOTER_VARIANTS, ReviewDiagnosticCode, SERVER_AUTOMATION_CAPABILITIES, byteSizeBucket, countBucket, createAutomationPaginationProvider, createDiagnosticEmitter, createServerAutomationHost, isAutomationCommand, isSolitaryAutomationCommand, openDiagnosticCode, paginationSnapshotOf, reviewDiagnosticCode, storeEditDiagnosticCode };
205
- export type { AutomationPaginationOptions, AutomationPaginationProvider, AutomationPaginationSnapshot, AutomationStoryId, DiagnosticEmitter, DiagnosticPayload, ServerAutomationHostOptions, ServerAutomationHostRejection, ServerAutomationHostResult };
166
+ export { AUTOMATION_COMMAND_OPERATIONS, AUTOMATION_QUERY_OPERATIONS, AUTOMATION_SOLITARY_OPERATIONS, AutomationCapabilities, AutomationHost, AutomationOperation, ContentLockPolicy, HEADER_FOOTER_VARIANTS, SERVER_AUTOMATION_CAPABILITIES, createAutomationPaginationProvider, createServerAutomationHost, isAutomationCommand, isSolitaryAutomationCommand, paginationSnapshotOf };
167
+ export type { AutomationPaginationOptions, AutomationPaginationProvider, AutomationPaginationSnapshot, AutomationShapeOwnerStory, AutomationStoryId, ServerAutomationHostOptions, ServerAutomationHostRejection, ServerAutomationHostResult };
@@ -1 +1 @@
1
- export{e as AUTOMATION_COMMAND_OPERATIONS,d as AUTOMATION_QUERY_OPERATIONS,f as AUTOMATION_SOLITARY_OPERATIONS,c as HEADER_FOOTER_VARIANTS,n as SERVER_AUTOMATION_CAPABILITIES,v as byteSizeBucket,w as countBucket,l as createAutomationPaginationProvider,x as createDiagnosticEmitter,o as createServerAutomationHost,z as diagnosticCause,y as diagnosticCauses,r as diagnosticCodes,B as diagnosticErrorName,C as documentPartKind,A as exceptionCause,q as explainDiagnostic,h as isAutomationCommand,g as isSolitaryAutomationCommand,s as openDiagnosticCode,j as paginationSnapshotOf,u as reviewDiagnosticCode,t as storeEditDiagnosticCode}from'./chunk-R2XINWVE.js';import'./chunk-SUEXVBPR.js';import'./chunk-4S24UOPG.js';import'./chunk-ZCJS7D7S.js';import'./chunk-VWIJKH4A.js';import'./chunk-Q5K2GGNG.js';import'./chunk-N6B3BXCL.js';import'./chunk-T2QQHG5C.js';
1
+ export{g as AUTOMATION_COMMAND_OPERATIONS,f as AUTOMATION_QUERY_OPERATIONS,h as AUTOMATION_SOLITARY_OPERATIONS,e as HEADER_FOOTER_VARIANTS,p as SERVER_AUTOMATION_CAPABILITIES,y as byteSizeBucket,z as countBucket,n as createAutomationPaginationProvider,A as createDiagnosticEmitter,q as createServerAutomationHost,C as diagnosticCause,B as diagnosticCauses,t as diagnosticCodes,F as diagnosticErrorName,G as documentPartKind,E as exceptionCause,s as explainDiagnostic,j as isAutomationCommand,i as isSolitaryAutomationCommand,u as openDiagnosticCode,l as paginationSnapshotOf,w as reviewCodeOfSkip,x as reviewDiagnosticCode,D as reviewSkipOfReason,v as storeEditDiagnosticCode}from'./chunk-JG4A6W6I.js';import'./chunk-R4R3AAE4.js';import'./chunk-CM5VZRBV.js';import'./chunk-2F2UEAE2.js';import'./chunk-L3YXJDPX.js';import'./chunk-PLKDS4JT.js';import'./chunk-JNGLSBPH.js';import'./chunk-2DR4TH6B.js';import'./chunk-AU33YWEJ.js';
package/dist/binding.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkEOTAXOJY_cjs=require('./chunk-EOTAXOJY.cjs');require('./chunk-XSTGE3NI.cjs'),require('./chunk-5SO5QDMV.cjs'),require('./chunk-IBRBNT37.cjs'),require('./chunk-243W4WW2.cjs'),require('./chunk-6IDOVU6L.cjs'),require('./chunk-WO4V6PNS.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkEOTAXOJY_cjs.l}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkEOTAXOJY_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkEOTAXOJY_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkEOTAXOJY_cjs.m}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkEOTAXOJY_cjs.j}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkEOTAXOJY_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkEOTAXOJY_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkEOTAXOJY_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkEOTAXOJY_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkEOTAXOJY_cjs.e}});
1
+ 'use strict';var chunk2GPGAFOJ_cjs=require('./chunk-2GPGAFOJ.cjs');require('./chunk-UYCGCVZ2.cjs'),require('./chunk-PXMTQ73F.cjs'),require('./chunk-RFUNFTGV.cjs'),require('./chunk-DYUVJNDD.cjs'),require('./chunk-ZDFJW5XS.cjs'),require('./chunk-X34QRAUU.cjs'),require('./chunk-KE6ZWRIY.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunk2GPGAFOJ_cjs.n}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunk2GPGAFOJ_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunk2GPGAFOJ_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunk2GPGAFOJ_cjs.o}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunk2GPGAFOJ_cjs.l}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunk2GPGAFOJ_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunk2GPGAFOJ_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunk2GPGAFOJ_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunk2GPGAFOJ_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunk2GPGAFOJ_cjs.e}});
package/dist/binding.d.ts CHANGED
@@ -9,26 +9,28 @@
9
9
  * @public
10
10
  */
11
11
  import { Node, Schema } from 'prosemirror-model';
12
- import { at as OoxmlProperty, au as OoxmlPackageResult, as as OoxmlPackageRejection } from './types-barrel-CkF2JbU4.js';
13
- import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-DeLRqohz.js';
14
- export { D as DocumentStyleEntry, M as MapResult, P as PackageWriteOptions, b as TreeApplyOptions, c as TreeBindingRejection, d as bodyParagraphs, e as docToTreeOps, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-contract-DeLRqohz.js';
15
- import { C as ContentLockPolicy } from './tree-package-store-B8l8DX3Z.js';
16
- export { S as StoryScope, b as StoryTargetRejection } from './tree-package-store-B8l8DX3Z.js';
12
+ import { aC as OoxmlProperty, aD as OoxmlPackageResult, aA as OoxmlPackageRejection } from './tree-op-types-Df4oY2u4.js';
13
+ import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-CF2625mv.js';
14
+ export { D as DocumentStyleEntry, M as MapResult, P as PackageWriteOptions, b as TreeApplyOptions, c as TreeBindingRejection, d as bodyParagraphs, e as docToTreeOps, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-contract-CF2625mv.js';
15
+ import { C as ContentLockPolicy } from './tree-package-store-DXhX1PE-.js';
16
+ export { S as StoryScope, a as StoryTargetRejection } from './tree-package-store-DXhX1PE-.js';
17
17
  import { ReviewModuleContribution } from './contracts/modules.js';
18
18
  import { EditorView } from 'prosemirror-view';
19
- import './editor-scope-C7ke1KJG.js';
20
- import './custom-node-writes-TeUvMP13.js';
21
- import './headless-document-view-qOpaCF82.js';
19
+ import './editor-scope-CA6egMaK.js';
20
+ import './custom-node-writes-AqY5KpVx.js';
21
+ import './drawing-graphic-kind-CXYGYbB3.js';
22
22
  import './collaboration/replication.js';
23
- import './semantic-records-B-akgRch.js';
24
- import './omml-equation-BsLAa2lX.js';
25
- import './editor-B2ShlO23.js';
26
- import './diagnostic-hints-C9JlLz1L.js';
27
- import './failure-NS2lsya4.js';
23
+ import './revision-projection-OVusTS77.js';
24
+ import './contracts/types.js';
25
+ import './failure-6KGFrDO9.js';
26
+ import './document-protection-BvbpSXbQ.js';
27
+ import './editor-B7OOAAie.js';
28
+ import './editor-fonts-D_-vjuJi.js';
29
+ import './diagnostic-hints-BtCaCqQC.js';
28
30
  import './contracts/document.js';
29
31
  import './contracts/interaction.js';
30
- import './semantic-interaction-dApRIYpt.js';
31
- import './document-protection-C8x3P2J6.js';
32
+ import './semantic-interaction-BbA4dgEo.js';
33
+ import './semantic-records-DoK0lNjS.js';
32
34
  import './collaboration.js';
33
35
 
34
36
  /** Attributes carried by a projected paragraph. */
package/dist/binding.js CHANGED
@@ -1 +1 @@
1
- export{l as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,m as mountTreeSurface,j as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-FT33HRZP.js';import'./chunk-2E2RPEKX.js';import'./chunk-ZCJS7D7S.js';import'./chunk-VWIJKH4A.js';import'./chunk-Q5K2GGNG.js';import'./chunk-N6B3BXCL.js';import'./chunk-T2QQHG5C.js';
1
+ export{n as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,o as mountTreeSurface,l as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-F7TGQMVR.js';import'./chunk-D7FAFFTN.js';import'./chunk-2F2UEAE2.js';import'./chunk-L3YXJDPX.js';import'./chunk-PLKDS4JT.js';import'./chunk-JNGLSBPH.js';import'./chunk-2DR4TH6B.js';import'./chunk-AU33YWEJ.js';
@@ -1,29 +1,77 @@
1
- import { c as FontConfigurationFragment, g as FontResolver, M as MarkedFontResolver, f as FontResolutionRequest } from './font-resolver-CWh40DYp.js';
2
- import { e as BookmarkStory, u as DocumentSource, Z as FontConfiguration, aV as ZoomMode, J as EditorFontError, x as Editor, R as ReviewPaneOptions, b as EditorCommand, C as CanResult, aC as SelectedImageState, a4 as FormatPainterSurfaceState, f as BookmarkSummary, aA as ScrollPlacement, aT as TrackedChangePredicate, aS as TrackedChangeFilterMode, _ as FontFaceRequest, a0 as FontSource, af as ImageContext, aG as TableBorderEdgeTarget, aH as TableBorderSpec, aI as TableBorderStyle, aN as TableContext } from './editor-B2ShlO23.js';
3
- import { V as ViewScope, a as EditorExecOptions } from './editor-scope-C7ke1KJG.js';
4
- import { ao as TreeDocOp, b0 as TextFormFieldRange, b1 as TextFormFieldOptions, aE as ImageDecodePort, ai as Unsubscribe, E as ExecResult, _ as DrawingPositionInput, b2 as DrawingTransform, A as ParagraphTabStop, y as IndentFormatting, z as ParagraphFlags, a5 as ParagraphDisagreements, aJ as DrawingTreeDocOp, af as SupportedImageMime, ae as SelectionPin, Q as OoxmlPackage, g as ReviewRevisionKind, aH as PackageWatermarkWrite, a2 as ImageWrapTarget } from './types-barrel-CkF2JbU4.js';
5
- import { T as TextMeasurer, a as ReviewDisplayMode, q as ResolvedRevisionMarkup, t as RevisionMarkupOptions, z as RevisionMarkupChromeHandlers, S as SemanticLayout, C as ContentControlBoundaryRecord, O as SectionProperties } from './semantic-records-B-akgRch.js';
6
- import { F as FieldResultsMode, C as ContentLockPolicy, I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, i as ImageIntentResult } from './tree-package-store-B8l8DX3Z.js';
1
+ import { d as FontOrigin, M as MarkedFontResolver, c as FontConfigurationFragment, g as FontResolver, f as FontResolutionRequest } from './font-resolver-Bm9XqTNO.js';
2
+ import { F as FontConfiguration, a as FontFaceRequest, b as FontSource } from './editor-fonts-D_-vjuJi.js';
3
+ import { V as ViewScope, a as EditorExecOptions } from './editor-scope-CA6egMaK.js';
4
+ import { au as TreeDocOp, aU as TextFormFieldRange, aV as TextFormFieldOptions, ad as ImageDecodePort, ao as Unsubscribe, E as ExecResult, aa as DrawingPositionInput, aW as DrawingTransform, G as ParagraphTabStop, y as IndentFormatting, F as ParagraphFlags, A as ParagraphDisagreements, aJ as DrawingTreeDocOp, an as SupportedImageMime, am as SelectionPin, a5 as OoxmlPackage, g as ReviewRevisionKind, aH as PackageWatermarkWrite, ag as ImageWrapTarget } from './tree-op-types-Df4oY2u4.js';
5
+ import { e as BookmarkStory, u as DocumentSource, aQ as ZoomMode, J as EditorFontError, x as Editor, b as EditorCommand, C as CanResult, ax as SelectedImageState, _ as FormatPainterSurfaceState, f as BookmarkSummary, av as ScrollPlacement, aO as TrackedChangePredicate, aN as TrackedChangeFilterMode, a9 as ImageContext, aB as TableBorderEdgeTarget, aC as TableBorderSpec, aD as TableBorderStyle, aI as TableContext } from './editor-B7OOAAie.js';
6
+ import { T as TextMeasurer, f as UnsupportedElementRule, S as SemanticLayout, C as ContentControlBoundaryRecord, t as SectionProperties } from './semantic-records-DoK0lNjS.js';
7
+ import { a as ReviewDisplayMode, d as ResolvedRevisionMarkup, k as RevisionMarkupOptions, g as RevisionMarkupChromeHandlers } from './revision-projection-OVusTS77.js';
8
+ import { F as FieldResultsMode, C as ContentLockPolicy, I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, i as ImageIntentResult } from './tree-package-store-DXhX1PE-.js';
9
+ import { ReviewPaneOptions } from './contracts/types.js';
7
10
  import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
8
- import { F as FieldShadingMode, d as RevisionStyles, f as DrawingPaintStrings, R as ReviewAuthorInfo, c as RevisionAuthorStyle } from './semantic-paint-DLzA8sjP.js';
9
- import { ReviewModuleContribution, EditorModule } from './contracts/modules.js';
10
- import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-dApRIYpt.js';
11
11
  import { CollaborationModuleContribution, EditorCollaborationSession, CollaborationRemoteSelection } from './collaboration.js';
12
- import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-QsKh24sM.js';
13
- import { B as BookmarkIndex } from './custom-node-writes-TeUvMP13.js';
14
- import { C as CellSelection } from './semantic-cell-selection-Cub9FDa8.js';
15
- import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-DeLRqohz.js';
16
- import { C as CollaborationStatus } from './failure-NS2lsya4.js';
12
+ import { F as FieldShadingMode, c as RevisionStyles, f as DrawingPaintStrings, R as ReviewAuthorInfo, b as RevisionAuthorStyle } from './semantic-paint-B5JcIv9c.js';
13
+ import { ReviewModuleContribution, EditorModule } from './contracts/modules.js';
14
+ import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-BbA4dgEo.js';
15
+ import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-DCIJUKIy.js';
16
+ import { B as BookmarkIndex } from './custom-node-writes-AqY5KpVx.js';
17
+ import { C as CellSelection } from './semantic-cell-selection-CoI5hHBm.js';
18
+ import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-CF2625mv.js';
19
+ import { a as CollaborationStatus } from './failure-6KGFrDO9.js';
20
+
21
+ /**
22
+ * Load an origin's faces after the document first paints, instead of before.
23
+ *
24
+ * The editor opens the document with the faces the other origins supply, then lays it out
25
+ * again when these arrive. Use it for faces that are large or slow to fetch. Leave an origin
26
+ * unwrapped to install its faces with the document's other waiting fonts: a large document
27
+ * (over about 512 KB of uncompressed content) waits up to 2 seconds for them before its
28
+ * first paint.
29
+ *
30
+ * ```ts
31
+ * const fonts = [packagedFonts(), deferFonts(myBrandFonts())];
32
+ * ```
33
+ *
34
+ * A document export that receives this origin waits for its faces, so exported pages use them.
35
+ * The faces never change the configuration settings, such as `defaultFont` or `maxFontBytes`:
36
+ * those come from the origins that answer at once, so the document does not change its
37
+ * default font after it paints.
38
+ *
39
+ * @public
40
+ */
41
+ declare function deferFonts(origin: FontOrigin): MarkedFontResolver;
17
42
 
43
+ /**
44
+ * How a blank document starts.
45
+ *
46
+ * @public
47
+ */
48
+ interface BlankDocumentOptions {
49
+ /**
50
+ * `'rtl'` starts the document right to left: its paragraphs (`w:bidi` in the paragraph
51
+ * defaults) and its section (`w:sectPr/w:bidi`) read right to left, as a new document does
52
+ * when a right-to-left editing language is the default. `'ltr'` is the default.
53
+ */
54
+ readonly direction?: 'ltr' | 'rtl';
55
+ /**
56
+ * The language of right-to-left and complex-script text, as a BCP 47 tag such as `ar-SA`
57
+ * or `he-IL`, written as the run defaults' `w:lang/@w:bidi`. Layout follows it: European
58
+ * digits in an Arabic-script language draw in the Latin face. A value that is not a
59
+ * language tag is ignored.
60
+ */
61
+ readonly bidiLanguage?: string;
62
+ }
18
63
  /**
19
64
  * A blank document, freshly zipped per call (the caller may hand the
20
65
  * bytes to a loader that takes ownership). Calibri 11pt and Word's Normal paragraph
21
66
  * spacing are authored in `w:docDefaults`, Word's built-in style gallery in `styles.xml`,
22
67
  * and US Letter geometry in the section. Word opens the saved file.
23
68
  *
69
+ * A right-to-left interface usually wants `{ direction: 'rtl', bidiLanguage: 'ar-SA' }` (or
70
+ * the reader's own language), so the first paragraph is ready for right-to-left typing.
71
+ *
24
72
  * @public
25
73
  */
26
- declare function blankDocumentBytes(): Uint8Array;
74
+ declare function blankDocumentBytes(options?: BlankDocumentOptions): Uint8Array;
27
75
 
28
76
  type TableCommandSelectionPolicy = {
29
77
  readonly kind: 'preserveSelection';
@@ -400,6 +448,7 @@ interface PaginatedSurfaceOptions {
400
448
  * revision markup paints, whatever the {@link revisionDisplayMode} leaves visible.
401
449
  */
402
450
  readonly revisionStyles?: RevisionStyles;
451
+ readonly unsupportedElementRules?: readonly UnsupportedElementRule[];
403
452
  readonly revisionMarkup?: ResolvedRevisionMarkup;
404
453
  /**
405
454
  * The review module's derivation hooks for this surface's session. Absent,
@@ -506,8 +555,8 @@ interface PaginatedSurfaceOptions {
506
555
  }
507
556
 
508
557
  /**
509
- * Receives the element that shows the loading indicator on the first page, while a large
510
- * document lays out its remaining pages.
558
+ * Receives the element that shows the loading indicator below the laid-out pages, while a
559
+ * large document lays out its remaining pages.
511
560
  *
512
561
  * @example
513
562
  * ```ts
@@ -524,8 +573,8 @@ interface OpeningIndicatorHost {
524
573
  /**
525
574
  * Called with the indicator element when the first pages show, and with `null` when the
526
575
  * remaining pages are laid out or the open is abandoned. The element is empty while a host
527
- * is set: render the host's content into it. It is centered on the first page, at most 30%
528
- * of the window height below the page top, and scrolls with the document.
576
+ * is set: render the host's content into it. It is centered in a band below the last
577
+ * laid-out page, as wide as the page, and scrolls with the document.
529
578
  */
530
579
  publish(element: HTMLElement | null): void;
531
580
  }
@@ -629,6 +678,8 @@ interface DocxEditorConfig {
629
678
  * the proposed view still marks surviving insertions.
630
679
  */
631
680
  revisionStyles?: RevisionStyles;
681
+ /** Ordered unsupported-content registrations; the first matching rule reserves a layout box. */
682
+ unsupportedElementRules?: readonly UnsupportedElementRule[];
632
683
  /** Initial local revision presentation and tracking preferences. */
633
684
  revisionMarkup?: RevisionMarkupOptions;
634
685
  /** Initial review projection. Markup modes require a review module. */
@@ -812,6 +863,17 @@ interface AttachOptions {
812
863
  * need. Production adapters program against `Editor` for everything else.
813
864
  */
814
865
  interface DocxEditorInstance extends Editor {
866
+ /**
867
+ * Replace host font resources without replacing the document or its edit history.
868
+ * Old resolution is cancelled. Existing host faces are removed before the new
869
+ * resolver runs; no answer keeps the bounded fallback. Document-embedded faces
870
+ * remain independent of host fonts. Failures report through `onFontError`.
871
+ *
872
+ * The session, selection, undo, protection, and collaboration state stay intact.
873
+ * Throws after `destroy()`. This does not grant permission to load native fonts.
874
+ * @public
875
+ */
876
+ setFonts(fonts: DocxEditorConfig['fonts']): Promise<void>;
815
877
  /** Bumps on mount, detach, destroy, and document reload — guards async image intents. */
816
878
  readonly mountGeneration: number;
817
879
  /**
@@ -1033,6 +1095,8 @@ interface DocxEditorInstance extends Editor {
1033
1095
  * of calling it. Call it directly from headless and non-React hosts.
1034
1096
  */
1035
1097
  setRevisionStyles(styles: RevisionStyles): void;
1098
+ /** Replace registrations while preserving document edits and undo history. */
1099
+ setUnsupportedElementRules(rules: readonly UnsupportedElementRule[]): void;
1036
1100
  /** Merge local preferences and emit revisionMarkupChange after a change.
1037
1101
  * Invalid settings throw TypeError without changing the previous settings.
1038
1102
  */
@@ -1224,6 +1288,11 @@ interface ImageOverlayScrollPort {
1224
1288
  interface SelectedDrawingOverlayTarget {
1225
1289
  /** Keep the text area available for pointer editing through the frame. */
1226
1290
  readonly textbox?: boolean;
1291
+ /**
1292
+ * False for a text box whose text takes no caret: rotated or vertical text, or a story
1293
+ * holding a table. Absent for a drawing that is not a text box.
1294
+ */
1295
+ readonly textEditable?: boolean;
1227
1296
  readonly id: string;
1228
1297
  readonly pageIndex: number;
1229
1298
  readonly x: number;
@@ -1968,11 +2037,11 @@ interface PaginatedSurface {
1968
2037
  */
1969
2038
  adjustIndent(direction: 'increase' | 'decrease'): boolean;
1970
2039
  /**
1971
- * Tab (`increase`) or Shift+Tab (`decrease`) over a selection outside a list: change the
1972
- * indent and keep the text.
2040
+ * Tab (`increase`) or Shift+Tab (`decrease`) over a selection outside a list and outside a
2041
+ * table cell (the key moves between cells there): change the indent and keep the text.
1973
2042
  *
1974
- * A selection over two or more paragraphs, or a cell rectangle, steps the left indent of
1975
- * each paragraph. A selection in one paragraph that starts at the paragraph start, whole or
2043
+ * A selection over two or more paragraphs, or a cell rectangle (only from a host calling
2044
+ * this directly), steps the left indent of each paragraph. A selection in one paragraph that starts at the paragraph start, whole or
1976
2045
  * partial, works on the first line: Tab sets a first-line indent of one default tab stop
1977
2046
  * (`w:defaultTabStop`), or steps the left indent when the first line already has that
1978
2047
  * indent or more, or a hanging indent. Shift+Tab clears a first-line indent that the
@@ -2088,16 +2157,17 @@ interface PaginatedSurface {
2088
2157
  * caret-preserving edits (Backspace, Delete, Enter) and IME composition, and is
2089
2158
  * discarded when the caret moves elsewhere or the document is undone. A property the
2090
2159
  * store cannot author is refused at arm time rather than left to poison the keystroke.
2160
+ * Returns the document's refusal reason, or null when the write landed, armed, or did nothing.
2091
2161
  */
2092
- toggleRunProperty(localName: string, attributes?: Record<string, string>): void;
2162
+ toggleRunProperty(localName: string, attributes?: Record<string, string>): string | null;
2093
2163
  /**
2094
2164
  * SET a run property over the selection, rather than toggling it.
2095
2165
  *
2096
2166
  * Font family, size and colour are values, not switches: picking Arial twice must leave
2097
2167
  * the text in Arial, which a toggle would not. Arms at a collapsed caret on the same
2098
- * terms as `toggleRunProperty`.
2168
+ * terms as `toggleRunProperty`, and returns a refusal the same way.
2099
2169
  */
2100
- setRunProperty(localName: string, attributes?: Record<string, string>): void;
2170
+ setRunProperty(localName: string, attributes?: Record<string, string>): string | null;
2101
2171
  /**
2102
2172
  * Set a property on every paragraph the selection touches — alignment, style, spacing.
2103
2173
  *
@@ -2348,6 +2418,7 @@ interface PaginatedSurface {
2348
2418
  */
2349
2419
  setRevisionMarkup(settings: ResolvedRevisionMarkup): void;
2350
2420
  setRevisionStyles(colors: RevisionStyles | undefined): void;
2421
+ setUnsupportedElementRules(rules: readonly UnsupportedElementRule[]): void;
2351
2422
  /** Toggle paragraph-end furniture without layout or document changes. */
2352
2423
  setShowParagraphMarks(show: boolean): void;
2353
2424
  /**
@@ -2533,14 +2604,14 @@ interface PaginatedSurface {
2533
2604
  selectedText(): string;
2534
2605
  /**
2535
2606
  * Every clipboard flavour for the current selection: plain text, and the interop HTML
2536
- * carrying the embedded fragment when the selection is a body-story range. A cell
2537
- * rectangle answers grid text plus a flattened table; `html` is null where only plain
2538
- * text should be written. Unsupported object selections return a refusal reason.
2607
+ * carrying the embedded fragment when the selection is a body-story range. A cell rectangle
2608
+ * answers grid text plus a flattened table; `html` is null where only plain text should be
2609
+ * written. A chart refuses as `'chart-content'`, another object as `'unsupported-content'`.
2539
2610
  */
2540
2611
  copyFlavours(): {
2541
2612
  readonly text: string;
2542
2613
  readonly html: string | null;
2543
- readonly reason?: 'unsupported-content';
2614
+ readonly reason?: 'unsupported-content' | 'chart-content';
2544
2615
  };
2545
2616
  /**
2546
2617
  * Route one paste payload by fidelity: embedded fragment, then external HTML, then
@@ -3561,6 +3632,20 @@ declare const CHROME_GROUPS: readonly [{
3561
3632
  readonly state: {
3562
3633
  readonly kind: 'value';
3563
3634
  };
3635
+ }, {
3636
+ readonly id: 'mergeCells';
3637
+ readonly labelKey: 'table.mergeCells';
3638
+ readonly paths: readonly string[];
3639
+ readonly state: {
3640
+ readonly kind: 'command';
3641
+ };
3642
+ }, {
3643
+ readonly id: 'splitCell';
3644
+ readonly labelKey: 'table.splitCell';
3645
+ readonly paths: readonly string[];
3646
+ readonly state: {
3647
+ readonly kind: 'command';
3648
+ };
3564
3649
  }];
3565
3650
  }, {
3566
3651
  readonly id: 'paragraph';
@@ -3739,7 +3824,7 @@ type ChromeGroupId = 'history' | 'zoom' | 'styles' | 'font' | 'text' | 'script'
3739
3824
  *
3740
3825
  * @public
3741
3826
  */
3742
- type ChromeSlotId = 'history.undo' | 'history.redo' | 'zoom.level' | 'styles.style' | 'font.family' | 'font.size' | 'text.bold' | 'text.italic' | 'text.underline' | 'text.strike' | 'text.color' | 'text.highlight' | 'text.link' | 'script.super' | 'script.sub' | 'alignment.left' | 'alignment.center' | 'alignment.right' | 'alignment.justify' | 'direction.ltr' | 'direction.rtl' | 'list.bullet' | 'list.numbered' | 'list.outdent' | 'list.indent' | 'list.lineSpacing' | 'format.painter' | 'format.clear' | 'review.revisionMarkup' | 'review.comments' | 'review.addComment' | 'review.paragraphMarks' | 'review.bookmarks' | 'review.protectDocument' | 'review.simpleMarkup' | 'review.allMarkup' | 'review.noMarkup' | 'review.original' | 'review.previousChange' | 'review.nextChange' | 'review.acceptAllChanges' | 'review.rejectAllChanges' | 'review.authors' | 'review.editingMode' | 'contentControl.showAll' | 'contentControl.formFill' | 'contentControl.inspector' | 'contentControl.remove' | 'image.insert' | 'image.properties' | 'image.wrap' | 'image.altText' | 'table.insert' | 'table.borderTarget' | 'table.borderColor' | 'table.borderStyle' | 'table.borderWidth' | 'table.cellFill' | 'file.open' | 'file.save' | 'file.exportMarkdown' | 'file.exportPdf' | 'file.print' | 'paragraph.dialog' | 'file.pageSetup' | 'insert.textBox' | 'insert.footnote' | 'insert.endnote' | 'insert.pageNumber' | 'insert.totalPages' | 'insert.sectionPages' | 'insert.pageXofY' | 'insert.pageBreak' | 'insert.sectionBreakNextPage' | 'insert.sectionBreakContinuous' | 'insert.toc' | 'insert.bookmark' | 'insert.goToBookmark' | 'insert.watermark';
3827
+ type ChromeSlotId = 'history.undo' | 'history.redo' | 'zoom.level' | 'styles.style' | 'font.family' | 'font.size' | 'text.bold' | 'text.italic' | 'text.underline' | 'text.strike' | 'text.color' | 'text.highlight' | 'text.link' | 'script.super' | 'script.sub' | 'alignment.left' | 'alignment.center' | 'alignment.right' | 'alignment.justify' | 'direction.ltr' | 'direction.rtl' | 'list.bullet' | 'list.numbered' | 'list.outdent' | 'list.indent' | 'list.lineSpacing' | 'format.painter' | 'format.clear' | 'review.revisionMarkup' | 'review.comments' | 'review.addComment' | 'review.paragraphMarks' | 'review.bookmarks' | 'review.protectDocument' | 'review.simpleMarkup' | 'review.allMarkup' | 'review.noMarkup' | 'review.original' | 'review.previousChange' | 'review.nextChange' | 'review.acceptAllChanges' | 'review.rejectAllChanges' | 'review.authors' | 'review.editingMode' | 'contentControl.showAll' | 'contentControl.formFill' | 'contentControl.inspector' | 'contentControl.remove' | 'image.insert' | 'image.properties' | 'image.wrap' | 'image.altText' | 'table.insert' | 'table.borderTarget' | 'table.borderColor' | 'table.borderStyle' | 'table.borderWidth' | 'table.cellFill' | 'table.mergeCells' | 'table.splitCell' | 'file.open' | 'file.save' | 'file.exportMarkdown' | 'file.exportPdf' | 'file.print' | 'paragraph.dialog' | 'file.pageSetup' | 'insert.textBox' | 'insert.footnote' | 'insert.endnote' | 'insert.pageNumber' | 'insert.totalPages' | 'insert.sectionPages' | 'insert.pageXofY' | 'insert.pageBreak' | 'insert.sectionBreakNextPage' | 'insert.sectionBreakContinuous' | 'insert.toc' | 'insert.bookmark' | 'insert.goToBookmark' | 'insert.watermark';
3743
3828
  /**
3744
3829
  * Every control id in the chrome, as a literal union. Unique WITHIN a group, not
3745
3830
  * globally (`image.insert` / `table.insert`) — key consumers on {@link ChromeSlotId}.
@@ -3769,15 +3854,20 @@ declare function chromeSlotId(group: {
3769
3854
  * @public
3770
3855
  */
3771
3856
  declare function defaultChromeGroups(): readonly ChromeGroup[];
3857
+ /** Options for {@link formattingBarChromeGroups}. @public */
3858
+ interface FormattingBarOptions {
3859
+ /** Show `direction.ltr` and `direction.rtl` after alignment, as for a right-to-left UI. */
3860
+ readonly direction?: boolean;
3861
+ }
3772
3862
  /**
3773
- * The formatting-bar groups for one editor snapshot: the default bar, plus the
3774
- * contextual `image` group when a drawing is selected. Insertion without a selection
3775
- * lives in the packaged Insert menu (`CHROME_MENUS`), not in the bar — a host that wants
3776
- * a bar button places `DocxEditor.Toolbar.ImageInsert` itself.
3863
+ * The formatting-bar groups for one editor snapshot: the default bar, the contextual `image`
3864
+ * group when a drawing is selected, and the direction group when `options.direction` asks.
3865
+ * Insertion without a selection lives in the packaged Insert menu (`CHROME_MENUS`), not in
3866
+ * the bar — a host that wants a bar button places `DocxEditor.Toolbar.ImageInsert` itself.
3777
3867
  *
3778
3868
  * @public
3779
3869
  */
3780
- declare function formattingBarChromeGroups(image: ImageContext | null): readonly ChromeGroup[];
3870
+ declare function formattingBarChromeGroups(image: ImageContext | null, options?: FormattingBarOptions): readonly ChromeGroup[];
3781
3871
 
3782
3872
  /**
3783
3873
  * The menu bar the chrome shows above the toolbar, in bar order: File, Format, Insert, Review,
@@ -4209,5 +4299,5 @@ interface ChromePrintJob {
4209
4299
  */
4210
4300
  declare function runChromePrint(editor: Pick<Editor, 'save'> & Partial<Pick<Editor, 'snapshot'>>, handlers?: ChromeExportHandlers, container?: Document | Element): Promise<ChromePrintJob>;
4211
4301
 
4212
- export { CHROME_GROUPS as C, bindHistoryGroup as J, blankDocumentBytes as K, chromeMenuSlots as M, commandForSlot as N, commandForSlotValue as O, createDocxEditor as P, createFontSource as Q, customFonts as R, isChromePrintShortcut as U, loadFonts as V, runChromeExport as W, runChromePrint as X, runToolbarCommand as Y, toolbarCommandState as Z, CHROME_UNAVAILABLE_KEY as a7, TABLE_BORDER_STYLE_OPTIONS as aO, TABLE_BORDER_TARGET_OPTIONS as aP, TABLE_BORDER_WIDTH_OPTIONS as aQ, TABLE_CHROME_SLOT_IDS as aR, DEFAULT_TABLE_CHROME_DRAFT as ag, EMU_PER_POINT as ai, IMAGE_OVERLAY_NUDGE_PT as ap, IMAGE_OVERLAY_NUDGE_SHIFT_PT as aq, CHROME_MENUS as b, applyTableChromePick as b3, canExecuteImageCommand as b4, captureImageMutationPreconditions as b5, chromeControlCount as b6, chromeProbeForSlot as b7, chromeSlotId as b8, chromeSlotIsToggle as b9, selectedImageStateOf as bA, surfacePaintScale as bB, tableChromeIconPaths as bC, tableChromeLabelKeyForTarget as bD, tableChromeToolbarState as bE, tableChromeVisible as bF, tableCommandToolbarState as bG, toolbarCommandStates as bH, commandExecOptions as ba, commandForTableChromeSlotValue as bb, computeImageResizeResult as bc, computeMovedImagePosition as bd, computeResizedImageExtentEmu as be, createImageOverlayScrollPort as bf, cssPixelsToLayoutPoints as bg, defaultChromeGroups as bh, defaultTableLabel as bi, emuToOverlayPoints as bj, equationAtPosition as bk, executeImageCommand as bl, finalizeImageOverlayInteraction as bm, formattingBarChromeGroups as bn, isStaleImageInteractionCommit as bo, isTableChromeSlot as bp, layoutPointsToCssPixels as bq, overlayFrameToSheetCssPixels as br, overlayHostOrigin as bs, pointsToEmu as bt, probeTableChromeCommand as bu, resizePreservesAspect as bv, runSave as bw, runTableChromeCommand as bx, runTableCommand as by, selectedDrawingOverlayTargetOf as bz, ChromeExportError as c, ChromePrintError as m };
4213
- export type { OpenPaginatedResult as $, HyperlinkChromeHandlers as A, BookmarkMarkInfo as B, DocxEditorConfig as D, LoadFontsResult as E, FontLoadFailure as F, GoToChromeHandlers as G, HistoryGroupBinding as H, LockedControlNavigation as I, LoadFontsRequest as L, SurfaceHyperlink as S, ToolbarCommandState as T, PaginatedSurfaceOptions as _, BookmarkMarkOptions as a, TextFormFieldDialogSession as a$, PaginatedSurface as a0, TableCommandPlan as a1, SurfaceFormatting as a2, AnchorFrameOrigin as a3, AttachOptions as a4, BookmarkChromeHandlers as a5, BookmarkMarkOptionsSource as a6, ChromeControl as a8, ChromeControlId as a9, ParagraphPropertyEdit as aA, PopupChromeRegistrationOptions as aB, RemoteCaretLabelAnchor as aC, RemoteCaretLabelHost as aD, ReviewWriteIntent as aE, RunTableChromeCommandResult as aF, SectionAnchor as aG, SectionBreakInsertType as aH, SelectedDrawingOverlayTarget as aI, SurfaceEquation as aJ, SurfaceInsertImageInput as aK, SurfaceNavigation as aL, SurfaceOverlayCoordinates as aM, SurfaceParagraphFormat as aN, TableBorderStyleOption as aS, TableBorderTargetOption as aT, TableBorderTargetValue as aU, TableBorderWidthOption as aV, TableChromeDraft as aW, TableChromePick as aX, TableChromeSlotId as aY, TableInteractionLabelKey as aZ, TextFormFieldChromeHandlers as a_, ChromeControlState as aa, ChromeExportView as ab, ChromeGroup as ac, ChromeGroupId as ad, ContentControlWidgetChromeHandlers as ae, ContentControlWidgetSession as af, DrawingSelectionIntent as ah, EditorCommandExecute as aj, EquationActivation as ak, EquationChromeHandlers as al, EquationOps as am, FinalizedImageOverlayInteraction as an, HyperlinkOps as ao, ImageInteractionSession as ar, ImageOverlayScrollPort as as, ImageResizeHandle as at, ImageResizeResult as au, InvalidTextFormFieldChromeHandlers as av, InvalidTextFormFieldSession as aw, OpeningIndicatorHost as ax, OverlayFrameRect as ay, PaginatedSurfaceState as az, ToolbarSlotValue as b0, ToolbarValueMap as b1, ToolbarValueSlot as b2, ChromeExportFormat as d, ChromeExportHandlers as e, ChromeExportResult as f, ChromeMenu as g, ChromeMenuEntry as h, ChromeMenuId as i, ChromeMenuItemEntry as j, ChromeMenuSeparatorEntry as k, ChromeMenuSubmenuEntry as l, ChromePrintErrorCode as n, ChromePrintJob as o, ChromePrintOptions as p, ChromeSlotId as q, CommentDraftChromeHandlers as r, CustomFontsOptions as s, CustomFontsResolver as t, DocxEditorInstance as u, FontLoadFailureReason as v, FontMeasurementState as w, FontUrlSource as x, HistoryGroupBindingOptions as y, HyperlinkActivation as z };
4302
+ export { bindHistoryGroup as $, CHROME_GROUPS as C, blankDocumentBytes as a0, chromeMenuSlots as a1, commandForSlot as a2, commandForSlotValue as a3, createDocxEditor as a4, createFontSource as a5, customFonts as a6, deferFonts as a7, isChromePrintShortcut as a8, loadFonts as a9, IMAGE_OVERLAY_NUDGE_SHIFT_PT as aA, TABLE_BORDER_STYLE_OPTIONS as aU, TABLE_BORDER_TARGET_OPTIONS as aV, TABLE_BORDER_WIDTH_OPTIONS as aW, TABLE_CHROME_SLOT_IDS as aX, runChromeExport as aa, runChromePrint as ab, runToolbarCommand as ac, toolbarCommandState as ad, CHROME_UNAVAILABLE_KEY as al, DEFAULT_TABLE_CHROME_DRAFT as ar, EMU_PER_POINT as at, IMAGE_OVERLAY_NUDGE_PT as az, applyTableChromePick as b6, canExecuteImageCommand as b7, captureImageMutationPreconditions as b8, chromeControlCount as b9, runTableChromeCommand as bA, runTableCommand as bB, selectedDrawingOverlayTargetOf as bC, selectedImageStateOf as bD, surfacePaintScale as bE, tableChromeIconPaths as bF, tableChromeLabelKeyForTarget as bG, tableChromeToolbarState as bH, tableChromeVisible as bI, tableCommandToolbarState as bJ, toolbarCommandStates as bK, chromeProbeForSlot as ba, chromeSlotId as bb, chromeSlotIsToggle as bc, commandExecOptions as bd, commandForTableChromeSlotValue as be, computeImageResizeResult as bf, computeMovedImagePosition as bg, computeResizedImageExtentEmu as bh, createImageOverlayScrollPort as bi, cssPixelsToLayoutPoints as bj, defaultChromeGroups as bk, defaultTableLabel as bl, emuToOverlayPoints as bm, equationAtPosition as bn, executeImageCommand as bo, finalizeImageOverlayInteraction as bp, formattingBarChromeGroups as bq, isStaleImageInteractionCommit as br, isTableChromeSlot as bs, layoutPointsToCssPixels as bt, overlayFrameToSheetCssPixels as bu, overlayHostOrigin as bv, pointsToEmu as bw, probeTableChromeCommand as bx, resizePreservesAspect as by, runSave as bz, CHROME_MENUS as d, ChromeExportError as e, ChromePrintError as p };
4303
+ export type { AttachOptions as A, BlankDocumentOptions as B, DocxEditorConfig as D, EquationActivation as E, EquationChromeHandlers as F, FontLoadFailure as G, FontLoadFailureReason as H, FontMeasurementState as I, FontUrlSource as J, GoToChromeHandlers as K, HistoryGroupBinding as L, HistoryGroupBindingOptions as M, HyperlinkActivation as N, HyperlinkChromeHandlers as O, InvalidTextFormFieldChromeHandlers as P, InvalidTextFormFieldSession as Q, LoadFontsRequest as R, LoadFontsResult as S, LockedControlNavigation as T, PopupChromeRegistrationOptions as U, SurfaceEquation as V, SurfaceHyperlink as W, TableChromeSlotId as X, ToolbarCommandState as Y, ToolbarValueMap as Z, ToolbarValueSlot as _, BookmarkChromeHandlers as a, TableBorderWidthOption as a$, ImageInteractionSession as aB, ImageOverlayScrollPort as aC, ImageResizeHandle as aD, ImageResizeResult as aE, OpeningIndicatorHost as aF, OverlayFrameRect as aG, PaginatedSurfaceState as aH, ParagraphPropertyEdit as aI, RemoteCaretLabelAnchor as aJ, RemoteCaretLabelHost as aK, ReviewWriteIntent as aL, RunTableChromeCommandResult as aM, SectionAnchor as aN, SectionBreakInsertType as aO, SelectedDrawingOverlayTarget as aP, SurfaceInsertImageInput as aQ, SurfaceNavigation as aR, SurfaceOverlayCoordinates as aS, SurfaceParagraphFormat as aT, TableBorderStyleOption as aY, TableBorderTargetOption as aZ, TableBorderTargetValue as a_, PaginatedSurfaceOptions as ae, OpenPaginatedResult as af, PaginatedSurface as ag, TableCommandPlan as ah, SurfaceFormatting as ai, AnchorFrameOrigin as aj, BookmarkMarkOptionsSource as ak, ChromeControl as am, ChromeControlId as an, ChromeControlState as ao, ChromeGroup as ap, ChromeGroupId as aq, DrawingSelectionIntent as as, EditorCommandExecute as au, EquationOps as av, FinalizedImageOverlayInteraction as aw, FormattingBarOptions as ax, HyperlinkOps as ay, BookmarkMarkInfo as b, TableChromeDraft as b0, TableChromePick as b1, TableInteractionLabelKey as b2, TextFormFieldChromeHandlers as b3, TextFormFieldDialogSession as b4, ToolbarSlotValue as b5, BookmarkMarkOptions as c, ChromeExportFormat as f, ChromeExportHandlers as g, ChromeExportResult as h, ChromeExportView as i, ChromeMenu as j, ChromeMenuEntry as k, ChromeMenuId as l, ChromeMenuItemEntry as m, ChromeMenuSeparatorEntry as n, ChromeMenuSubmenuEntry as o, ChromePrintErrorCode as q, ChromePrintJob as r, ChromePrintOptions as s, ChromeSlotId as t, CommentDraftChromeHandlers as u, ContentControlWidgetChromeHandlers as v, ContentControlWidgetSession as w, CustomFontsOptions as x, CustomFontsResolver as y, DocxEditorInstance as z };