@docx-editor.dev/core 2.9.2 → 2.11.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/dist/automation.cjs +1 -1
  2. package/dist/automation.d.cts +14 -5
  3. package/dist/automation.d.ts +14 -5
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.cts +78 -13
  7. package/dist/binding.d.ts +78 -13
  8. package/dist/binding.js +1 -1
  9. package/dist/chunk-34BNQUD4.js +10 -0
  10. package/dist/chunk-5AVHO75P.cjs +19 -0
  11. package/dist/chunk-6HMSC7UV.js +2 -0
  12. package/dist/chunk-6JIJOZDW.js +1 -0
  13. package/dist/chunk-76Y3Y45J.cjs +2 -0
  14. package/dist/chunk-BP7ANXGA.js +1 -0
  15. package/dist/chunk-BTQKU64Q.cjs +1 -0
  16. package/dist/chunk-CRZR6K5Z.js +19 -0
  17. package/dist/chunk-D5EHDHYV.js +1 -0
  18. package/dist/chunk-EJATEGJZ.cjs +1 -0
  19. package/dist/{chunk-PSZH2VXP.js → chunk-GOEBQ26R.js} +1 -1
  20. package/dist/chunk-GRDFEH5Q.cjs +2 -0
  21. package/dist/chunk-GWV65NQW.cjs +10 -0
  22. package/dist/chunk-GXLZCXEH.js +2 -0
  23. package/dist/chunk-JUQOPVSK.cjs +2 -0
  24. package/dist/chunk-LAETEBHD.js +1 -0
  25. package/dist/chunk-M6Z3KFXM.cjs +5 -0
  26. package/dist/{chunk-YMYCPY5Y.cjs → chunk-OHJQ7GPZ.cjs} +1 -1
  27. package/dist/chunk-UQFOYZJO.cjs +18 -0
  28. package/dist/chunk-WPQMPHNR.cjs +1 -0
  29. package/dist/chunk-WXQ245MQ.js +18 -0
  30. package/dist/chunk-WZHIFNSU.js +5 -0
  31. package/dist/chunk-X7A5XART.js +2 -0
  32. package/dist/chunk-ZKWRCLT2.cjs +1 -0
  33. package/dist/collaboration/replication.cjs +1 -0
  34. package/dist/collaboration/replication.d.cts +216 -0
  35. package/dist/collaboration/replication.d.ts +216 -0
  36. package/dist/collaboration/replication.js +1 -0
  37. package/dist/collaboration.cjs +1 -0
  38. package/dist/collaboration.d.cts +176 -0
  39. package/dist/collaboration.d.ts +176 -0
  40. package/dist/collaboration.js +1 -0
  41. package/dist/contracts/document.d.cts +6 -1
  42. package/dist/contracts/document.d.ts +6 -1
  43. package/dist/contracts/editor.cjs +1 -1
  44. package/dist/contracts/editor.d.cts +8 -9
  45. package/dist/contracts/editor.d.ts +8 -9
  46. package/dist/contracts/editor.js +1 -1
  47. package/dist/contracts/interaction.d.cts +8 -9
  48. package/dist/contracts/interaction.d.ts +8 -9
  49. package/dist/contracts/modules.cjs +1 -1
  50. package/dist/contracts/modules.d.cts +20 -8
  51. package/dist/contracts/modules.d.ts +20 -8
  52. package/dist/contracts/modules.js +1 -1
  53. package/dist/custom-node-writes-CwkYRw3V.d.cts +310 -0
  54. package/dist/custom-node-writes-JfTn-Sy6.d.ts +310 -0
  55. package/dist/document-properties-D6Ahr8D6.d.cts +28 -0
  56. package/dist/document-properties-D6Ahr8D6.d.ts +28 -0
  57. package/dist/{editor-Cvd7Geoc.d.ts → editor-BogcVHXk.d.ts} +176 -59
  58. package/dist/{editor-cAEf1uXW.d.cts → editor-C8edZgy5.d.cts} +176 -59
  59. package/dist/editor.cjs +1 -1
  60. package/dist/editor.css +1 -7698
  61. package/dist/editor.d.cts +26 -25
  62. package/dist/editor.d.ts +26 -25
  63. package/dist/editor.js +1 -1
  64. package/dist/failure-BnGjoXf0.d.cts +64 -0
  65. package/dist/failure-BnGjoXf0.d.ts +64 -0
  66. package/dist/{index-DRqY5JVF.d.ts → index-BNv-ZLQP.d.ts} +327 -86
  67. package/dist/{index-wb-iOxfh.d.cts → index-Dn0lOp9Z.d.cts} +327 -86
  68. package/dist/index.cjs +1 -1
  69. package/dist/index.d.cts +20 -19
  70. package/dist/index.d.ts +20 -19
  71. package/dist/index.js +1 -1
  72. package/dist/layout.cjs +1 -1
  73. package/dist/layout.d.cts +92 -55
  74. package/dist/layout.d.ts +92 -55
  75. package/dist/layout.js +1 -1
  76. package/dist/{note-properties-jvnw_DGG.d.ts → note-properties-BmoSdyKS.d.ts} +1 -1
  77. package/dist/{note-properties-CQlxjic_.d.cts → note-properties-BvGfHk5e.d.cts} +1 -1
  78. package/dist/{omml-equation-Dd3mBep-.d.ts → omml-equation-Ciq5rgb7.d.ts} +1 -1
  79. package/dist/{omml-equation-BD-LsmWE.d.cts → omml-equation-CqQOt_dD.d.cts} +1 -1
  80. package/dist/output.cjs +1 -1
  81. package/dist/output.d.cts +6 -8
  82. package/dist/output.d.ts +6 -8
  83. package/dist/output.js +1 -1
  84. package/dist/{protocol-UuZOcOp7.d.cts → protocol-BB-WP3zk.d.cts} +2 -2
  85. package/dist/{protocol-C7ahrdUx.d.ts → protocol-Ckl7hWsv.d.ts} +2 -2
  86. package/dist/{review-items-bdGxFWNA.d.ts → review-items-BdeLNRi2.d.cts} +1 -2
  87. package/dist/{review-items-B8tffIXj.d.cts → review-items-CkYyXhXM.d.ts} +1 -2
  88. package/dist/{review-reads-Bxz03tHG.d.cts → review-reads-BOLSBm5w.d.cts} +2 -2
  89. package/dist/{review-reads-CHODU0LI.d.ts → review-reads-Crf0Xn42.d.ts} +2 -2
  90. package/dist/{revision-projection-CILpvv4M.d.ts → revision-projection-Ae2CWa8E.d.ts} +1 -1
  91. package/dist/{revision-projection-Cc4wz30g.d.cts → revision-projection-C2S8PSQm.d.cts} +1 -1
  92. package/dist/{semantic-cell-selection-BPzx6DdT.d.cts → semantic-cell-selection-C0OFD4D9.d.cts} +4 -4
  93. package/dist/{semantic-cell-selection-CsHcr-yk.d.ts → semantic-cell-selection-DdmoxC-y.d.ts} +4 -4
  94. package/dist/{semantic-interaction-D-RZ9Ust.d.ts → semantic-interaction-COyhZ9WH.d.ts} +21 -2
  95. package/dist/{semantic-interaction-BfWDD_0V.d.cts → semantic-interaction-Cs2jErnt.d.cts} +21 -2
  96. package/dist/{semantic-paint-WhVtSDJK.d.ts → semantic-paint-UHaj3sBY.d.cts} +2 -2
  97. package/dist/{semantic-paint-Bd7EqzXV.d.cts → semantic-paint-vA-oLSdV.d.ts} +2 -2
  98. package/dist/{semantic-records-DadVT_E1.d.cts → semantic-records-5AOQJmLX.d.cts} +20 -5
  99. package/dist/{semantic-records-DCt-ZwKU.d.ts → semantic-records-9xhwbJ23.d.ts} +20 -5
  100. package/dist/{shaped-measurer-CninrHr_.d.cts → shaped-measurer-NeF2mPSu.d.cts} +1 -1
  101. package/dist/{shaped-measurer-B9f4A7QA.d.ts → shaped-measurer-vzsY88oK.d.ts} +1 -1
  102. package/dist/store.cjs +1 -1
  103. package/dist/store.d.cts +193 -19
  104. package/dist/store.d.ts +193 -19
  105. package/dist/store.js +1 -1
  106. package/dist/tree-op-types-BPyXNxyL.d.cts +3053 -0
  107. package/dist/tree-op-types-DnzAOnc9.d.ts +3053 -0
  108. package/dist/{custom-node-writes-D6SGwebL.d.ts → tree-package-fragment-BjZ3RWAS.d.cts} +128 -312
  109. package/dist/{custom-node-writes-Dy3b20PS.d.cts → tree-package-fragment-CDER0G3B.d.ts} +128 -312
  110. package/dist/{tree-session-ZuBFOhIh.d.ts → tree-session-contract-BF2FVBOM.d.cts} +52 -106
  111. package/dist/{tree-session-Df02ajqc.d.cts → tree-session-contract-DhdsFT_z.d.ts} +52 -106
  112. package/dist/{tree-store-B_sJBMIS.d.cts → tree-store-CNZ3O83s.d.ts} +130 -25
  113. package/dist/{tree-store-DgETo6Mf.d.ts → tree-store-DfZi7FqY.d.cts} +130 -25
  114. package/package.json +14 -3
  115. package/dist/chunk-6JWP2H7K.js +0 -2
  116. package/dist/chunk-6KNLLEUW.cjs +0 -18
  117. package/dist/chunk-7ADTI533.cjs +0 -10
  118. package/dist/chunk-7ETDCPF6.cjs +0 -2
  119. package/dist/chunk-7I3BSGGS.js +0 -1
  120. package/dist/chunk-7UU5YFCD.cjs +0 -2
  121. package/dist/chunk-7VQ7YLW3.cjs +0 -1
  122. package/dist/chunk-CKDAK3MV.js +0 -10
  123. package/dist/chunk-DIMEYVNS.js +0 -2
  124. package/dist/chunk-GQQOL4PV.js +0 -1
  125. package/dist/chunk-H2656QDI.cjs +0 -1
  126. package/dist/chunk-KQGENNL5.cjs +0 -15
  127. package/dist/chunk-LIXPSV4T.js +0 -18
  128. package/dist/chunk-O4UULRAQ.cjs +0 -5
  129. package/dist/chunk-SIIFNE6U.js +0 -15
  130. package/dist/chunk-VXYECPKA.js +0 -5
  131. package/dist/hf-references-Dvk6De4Q.d.cts +0 -70
  132. package/dist/hf-references-z5Y4N1ab.d.ts +0 -70
  133. package/dist/image-resources-BgA9EQxY.d.ts +0 -203
  134. package/dist/image-resources-BiA-IXgo.d.cts +0 -203
  135. package/dist/note-nodes-BNCANoGN.d.ts +0 -108
  136. package/dist/note-nodes-DL-Au22P.d.cts +0 -108
  137. package/dist/ooxml-package-CdEy9ufK.d.cts +0 -1222
  138. package/dist/ooxml-package-CdEy9ufK.d.ts +0 -1222
  139. package/dist/tree-op-types-CnRb7AYo.d.ts +0 -1589
  140. package/dist/tree-op-types-D1vNJ7XC.d.cts +0 -1589
@@ -1,17 +1,19 @@
1
- import { T as TreeDocOp, d as DrawingPositionInput, m as DrawingTransform, i as DrawingTreeDocOp } from './tree-op-types-D1vNJ7XC.cjs';
2
- import { b as ImageDecodePort, S as SupportedImageMime } from './image-resources-BiA-IXgo.cjs';
3
- import { g as ReviewRevisionKind } from './review-items-B8tffIXj.cjs';
4
- import { EditorModule, ReviewModuleContribution } from './contracts/modules.cjs';
5
- import { j as FontSource, k as FontSourceSubstitution, F as FontConfiguration, D as DocumentSource, Z as ZoomMode, E as EditorFontError, l as Editor, b as EditorCommand, C as CanResult, S as SelectedImageState, V as ViewScope, m as FontFaceRequest, I as ImageContext, T as TableBorderEdgeTarget, n as TableBorderSpec, o as TableBorderStyle, p as TableContext } from './editor-cAEf1uXW.cjs';
6
- import { R as RevisionDisplayMode } from './revision-projection-Cc4wz30g.cjs';
7
- import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-BfWDD_0V.cjs';
8
- import { c as RevisionStyles, R as ReviewAuthorInfo, b as RevisionAuthorStyle, F as FieldShadingMode, d as DrawingPaintStrings } from './semantic-paint-Bd7EqzXV.cjs';
9
- import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-CQlxjic_.cjs';
10
- import { S as SemanticLayout, C as ContentControlBoundaryRecord, T as TextMeasurer } from './semantic-records-DadVT_E1.cjs';
11
- import { S as StoryScope, A as ApplyImagePropertiesInput, d as ImageIntentResult, c as InsertImageInput, B as BookmarkIndex } from './custom-node-writes-Dy3b20PS.cjs';
12
- import { C as CellSelection, S as SectionProperties } from './semantic-cell-selection-BPzx6DdT.cjs';
1
+ import { T as TreeDocOp, C as ImageDecodePort, v as DrawingPositionInput, W as DrawingTransform, F as DrawingTreeDocOp, y as SupportedImageMime } from './tree-op-types-BPyXNxyL.cjs';
13
2
  import { Unsubscribe, ExecResult, ParagraphTabStop, IndentFormatting, ParagraphFlags, ParagraphDisagreements, SelectionPin } from './contracts/types.cjs';
14
- import { c as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-Df02ajqc.cjs';
3
+ import { g as ReviewRevisionKind } from './review-items-BdeLNRi2.cjs';
4
+ import { EditorModule, ReviewModuleContribution } from './contracts/modules.cjs';
5
+ import { j as FontSource, k as FontSourceSubstitution, F as FontConfiguration, D as DocumentSource, Z as ZoomMode, E as EditorFontError, l as Editor, b as EditorCommand, C as CanResult, S as SelectedImageState, m as FormatPainterSurfaceState, V as ViewScope, n as FontFaceRequest, I as ImageContext, T as TableBorderEdgeTarget, o as TableBorderSpec, p as TableBorderStyle, q as TableContext } from './editor-C8edZgy5.cjs';
6
+ import { R as RevisionDisplayMode } from './revision-projection-C2S8PSQm.cjs';
7
+ import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-Cs2jErnt.cjs';
8
+ import { EditorCollaborationSession, CollaborationRemoteSelection, CollaborationModuleContribution } from './collaboration.cjs';
9
+ import { c as RevisionStyles, R as ReviewAuthorInfo, b as RevisionAuthorStyle, F as FieldShadingMode, d as DrawingPaintStrings } from './semantic-paint-UHaj3sBY.cjs';
10
+ import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-BvGfHk5e.cjs';
11
+ import { S as SemanticLayout, C as ContentControlBoundaryRecord, T as TextMeasurer } from './semantic-records-5AOQJmLX.cjs';
12
+ import { B as BookmarkIndex } from './custom-node-writes-CwkYRw3V.cjs';
13
+ import { I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, d as ImageIntentResult } from './tree-package-fragment-BjZ3RWAS.cjs';
14
+ import { C as CellSelection, S as SectionProperties } from './semantic-cell-selection-C0OFD4D9.cjs';
15
+ import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-BF2FVBOM.cjs';
16
+ import { C as CollaborationStatus } from './failure-BnGjoXf0.cjs';
15
17
  import './contracts/document.cjs';
16
18
 
17
19
  /**
@@ -441,6 +443,16 @@ interface DocxEditorInstance extends Editor {
441
443
  setHyperlinkChrome(handlers: HyperlinkChromeHandlers): Unsubscribe;
442
444
  /** Wire the host equation popover to painted equation clicks. */
443
445
  setEquationChrome(handlers: EquationChromeHandlers): Unsubscribe;
446
+ /**
447
+ * Render the host's own component as the remote-caret label, or restore the default
448
+ * collaborator-name label with `null`. The engine keeps owning label geometry, class,
449
+ * and presence colour; the host owns the content of each published element.
450
+ *
451
+ * Instance-only, like `setHyperlinkChrome`: it is what a MOUNTING host needs. Tolerated
452
+ * before `attach` and after `detach` — the registration waits and applies on the next
453
+ * mount, and it survives a document reload the way the hyperlink chrome does.
454
+ */
455
+ setRemoteCaretLabelHost(host: RemoteCaretLabelHost | null): void;
444
456
  /**
445
457
  * Monotonic version of the observable editor state. Bumps whenever anything
446
458
  * `snapshot()` reports could have moved — a committed change, a selection move, zoom,
@@ -479,6 +491,26 @@ interface DocxEditorInstance extends Editor {
479
491
  * changes, so it is safe as a dependency; changes bump `stateVersion()`.
480
492
  */
481
493
  getReviewAuthors(): readonly ReviewAuthorInfo[];
494
+ /**
495
+ * The presence colour the engine paints for one display name — the answer the remote
496
+ * caret label takes, so chrome built on this cannot disagree with the painted caret.
497
+ *
498
+ * A name the review roster draws takes its resolved colour, sanitized exactly as the
499
+ * paint sink sanitizes it: a declared colour the paint refuses falls to the author's
500
+ * ramp-slot token. Any other name takes the next slot from the engine's stable
501
+ * allocator, in first-resolution order, and keeps it for the session. While no document
502
+ * is attached this returns `'var(--doc-accent)'`, the same default the overlay CSS
503
+ * falls back to.
504
+ */
505
+ presenceColorFor(name: string): string;
506
+ /**
507
+ * The live collaboration replica, or null when this editor is not in a room.
508
+ *
509
+ * Presence chrome reads it from here rather than being handed it: the editor already holds
510
+ * the session a `collaborationModule` contributed, so a host that threads it down to every
511
+ * avatar and caret consumer is passing something the tree below it can already see.
512
+ */
513
+ collaborationSession(): EditorCollaborationSession | null;
482
514
  /**
483
515
  * The configured author used when a comment or reply omits an explicit author.
484
516
  *
@@ -853,6 +885,15 @@ type SectionAnchor =
853
885
  readonly kind: 'unaddressable';
854
886
  };
855
887
 
888
+ /**
889
+ * What a host may set on a surface image insert.
890
+ *
891
+ * The decode port and the collaboration actor are the SURFACE's to supply. An actor a host
892
+ * could pass would be a second identity for the same mint, which is the thing actor-scoped
893
+ * allocation exists to prevent.
894
+ */
895
+ type SurfaceInsertImageInput = Omit<InsertImageInput, 'decodePort' | 'actorId'>;
896
+
856
897
  /**
857
898
  * Every field of the Paragraph dialog, in the units the rest of this contract uses:
858
899
  * points for spacing, TWIPS for indents.
@@ -894,13 +935,17 @@ interface ParagraphPropertyEdit {
894
935
  }
895
936
 
896
937
  /**
897
- * How an edit is written.
938
+ * Which review write is being committed through `commitReviewOps`.
898
939
  *
899
- * `'suggest'` is the one that changes what the ops MEAN: the same keystroke becomes a `w:ins`
900
- * and the same Backspace becomes a `w:del` over the words it would have removed. `'view'`
901
- * refuses edits outright.
940
+ * The callback that performs the write is opaque, so a lane deciding whether to allow it cannot
941
+ * tell an Accept from a comment delete. That mattered once a replica was attached: these paths
942
+ * reach the store directly rather than through `applyTreeOps`, and the ones that graft a package
943
+ * and swap the shell record no primitive effects — they replicate as NOTHING, leaving the peer a
944
+ * `commentReference` naming a comment it never received. Naming the write lets each be admitted
945
+ * only once a two-replica test proves it arrives whole.
902
946
  */
903
- type SurfaceEditingMode = 'edit' | 'suggest' | 'view';
947
+ type ReviewWriteIntent = 'revision-resolve' | 'comment-add' | 'comment-reply' | 'comment-resolve' | 'comment-delete' | 'package-scoped';
948
+
904
949
  /**
905
950
  * Content-control interaction lane on the paginated surface.
906
951
  *
@@ -941,6 +986,132 @@ interface ContentControlOps {
941
986
  */
942
987
  disabledReason(controlId: string, action: 'edit' | 'remove'): string | null;
943
988
  }
989
+ /**
990
+ * Content-control chrome the surface owns, not the document.
991
+ *
992
+ * Boundary furniture visibility and form-fill navigation are surface chrome, not model
993
+ * bytes — toggling them never reflows layout records.
994
+ */
995
+ interface ContentControlSurfaceState {
996
+ /** Show boundary chrome for every control. */
997
+ readonly showAll: boolean;
998
+ /** Tab / Shift+Tab navigate between editable controls. */
999
+ readonly formFill: boolean;
1000
+ /** Innermost control containing the caret, or null. */
1001
+ readonly activeControlId: string | null;
1002
+ }
1003
+
1004
+ /**
1005
+ * What one paint did.
1006
+ *
1007
+ * Four answers rather than a boolean, because the two FAILURES are different problems with
1008
+ * different words for the user: `'nothingToPaint'` says the selection holds nothing the
1009
+ * capture can reach, and `'refused'` says the document would not take the write — a locked
1010
+ * content control, a collaboration gate, a document open for viewing. Collapsed to false,
1011
+ * a refused paint told the reader to select some text.
1012
+ *
1013
+ * `'armed'` is the collapsed-caret outcome: no text to paint, so the character half went to
1014
+ * the stored-marks lane and the next characters typed will carry it.
1015
+ */
1016
+ type FormatPainterPaintResult = 'painted' | 'armed' | 'nothingToPaint' | 'refused';
1017
+ /** Word's Format Painter over the surface. */
1018
+ interface FormatPainterOps {
1019
+ state(): FormatPainterSurfaceState;
1020
+ /**
1021
+ * Capture the formatting at the selection. False when the selection resolves to no span
1022
+ * the layout has published yet — there is nothing to read.
1023
+ */
1024
+ capture(): boolean;
1025
+ /** Paint the captured formatting over the current selection. */
1026
+ apply(): FormatPainterPaintResult;
1027
+ /**
1028
+ * One press of the painter control, with Word's meaning.
1029
+ *
1030
+ * A press while the painter is off captures and arms it for a single application. A press
1031
+ * that lands within the double-press window locks it on. A press while it is armed and
1032
+ * outside that window turns it off.
1033
+ *
1034
+ * The double-press window is the ENGINE's, deliberately: the alternative is each adapter
1035
+ * binding its own `dblclick` beside its own `click`, which is two hosts deciding
1036
+ * separately what a double-click means and drifting the moment one of them changes.
1037
+ *
1038
+ * False when there was nothing at the selection to capture, so a control can report a
1039
+ * refusal rather than looking as though it armed.
1040
+ */
1041
+ press(): boolean;
1042
+ /** Turn the painter off, keeping the capture. `Esc` and a finished single application. */
1043
+ disarm(): void;
1044
+ }
1045
+
1046
+ /**
1047
+ * Where the last pass spent its time, and how much work it actually did.
1048
+ *
1049
+ * The durations are the surface's own three phases — layout, paint, selection sync — timed
1050
+ * separately because they fail separately: a full relayout, a full repaint and a forced
1051
+ * reflow each have a different fix. The counters come free from machinery that already
1052
+ * exists: the layout session says how much was re-placed versus reused, and the scheduler
1053
+ * says how often work was thrown away as stale. `placed` equal to `total` on every
1054
+ * keystroke is the one-glance sign that incremental layout is not engaging.
1055
+ */
1056
+ interface PaginatedSurfacePerf {
1057
+ /** Time the last layout pass took, in milliseconds. */
1058
+ readonly layoutMs: number;
1059
+ /** Time the last paint took — building and swapping the page DOM. */
1060
+ readonly paintMs: number;
1061
+ /** Time the last selection sync took — writing the model selection into the browser. */
1062
+ readonly selectionMs: number;
1063
+ /** Paragraphs the last pass re-placed, against the number in the document. */
1064
+ readonly placed: number;
1065
+ readonly total: number;
1066
+ /** Pages carried over from the previous layout without being rebuilt. */
1067
+ readonly reusedPages: number;
1068
+ /** Passes that could not resume and laid the document out from the top. */
1069
+ readonly fullPasses: number;
1070
+ /** Layouts discarded because the model had already moved on. */
1071
+ readonly staleDiscards: number;
1072
+ /** Cooperative runs abandoned mid-flight for a newer revision. */
1073
+ readonly cancelledRuns: number;
1074
+ }
1075
+
1076
+ /**
1077
+ * One live remote-caret label the engine positioned. The host owns its content; the engine
1078
+ * still owns the label's geometry, class, and presence colour, and rebuilds the labels
1079
+ * wholesale on every repaint that moves them.
1080
+ *
1081
+ * @public
1082
+ */
1083
+ interface RemoteCaretLabelAnchor {
1084
+ readonly element: HTMLElement;
1085
+ readonly selection: CollaborationRemoteSelection;
1086
+ }
1087
+ /**
1088
+ * A host that renders its own content inside the engine's remote-caret labels.
1089
+ *
1090
+ * @public
1091
+ */
1092
+ interface RemoteCaretLabelHost {
1093
+ /**
1094
+ * Called after every paint that rebuilt the labels, with the current anchors.
1095
+ *
1096
+ * A skipped paint (nothing moved) does not re-publish: the host keeps its last anchors
1097
+ * until the next publish, and elements from a previous publish are dead after the next
1098
+ * one. An empty array is a real publish — every remote caret left the screen.
1099
+ *
1100
+ * Never mutate editor state synchronously from `publish` — a mutation repaints, and the
1101
+ * nested rebuild's publish would arrive before this one returned; only set host state.
1102
+ */
1103
+ publish(anchors: readonly RemoteCaretLabelAnchor[]): void;
1104
+ }
1105
+
1106
+ /**
1107
+ * How an edit is written.
1108
+ *
1109
+ * `'suggest'` is the one that changes what the ops MEAN: the same keystroke becomes a `w:ins`
1110
+ * and the same Backspace becomes a `w:del` over the words it would have removed. `'view'`
1111
+ * refuses edits outright.
1112
+ */
1113
+ type SurfaceEditingMode = 'edit' | 'suggest' | 'view';
1114
+
944
1115
  /**
945
1116
  * How a paginated surface opens. Every field is optional.
946
1117
  *
@@ -948,6 +1119,12 @@ interface ContentControlOps {
948
1119
  * on a server, or leave it off in a browser to get the canvas measurer.
949
1120
  */
950
1121
  interface PaginatedSurfaceOptions {
1122
+ /**
1123
+ * The collaboration module's replica for this surface's session. Absent,
1124
+ * the surface does not attach, and local store history remains the undo
1125
+ * authority.
1126
+ */
1127
+ readonly collaborationModel?: CollaborationModuleContribution;
951
1128
  readonly measurer?: TextMeasurer;
952
1129
  /** Ambient author for tracked edits. Required before suggesting can write anything. */
953
1130
  readonly author?: string;
@@ -1113,35 +1290,6 @@ interface SurfaceFormatting {
1113
1290
  */
1114
1291
  readonly disagrees: ParagraphDisagreements;
1115
1292
  }
1116
- /**
1117
- * Where the last pass spent its time, and how much work it actually did.
1118
- *
1119
- * The durations are the surface's own three phases — layout, paint, selection sync — timed
1120
- * separately because they fail separately: a full relayout, a full repaint and a forced
1121
- * reflow each have a different fix. The counters come free from machinery that already
1122
- * exists: the layout session says how much was re-placed versus reused, and the scheduler
1123
- * says how often work was thrown away as stale. `placed` equal to `total` on every
1124
- * keystroke is the one-glance sign that incremental layout is not engaging.
1125
- */
1126
- interface PaginatedSurfacePerf {
1127
- /** Time the last layout pass took, in milliseconds. */
1128
- readonly layoutMs: number;
1129
- /** Time the last paint took — building and swapping the page DOM. */
1130
- readonly paintMs: number;
1131
- /** Time the last selection sync took — writing the model selection into the browser. */
1132
- readonly selectionMs: number;
1133
- /** Paragraphs the last pass re-placed, against the number in the document. */
1134
- readonly placed: number;
1135
- readonly total: number;
1136
- /** Pages carried over from the previous layout without being rebuilt. */
1137
- readonly reusedPages: number;
1138
- /** Passes that could not resume and laid the document out from the top. */
1139
- readonly fullPasses: number;
1140
- /** Layouts discarded because the model had already moved on. */
1141
- readonly staleDiscards: number;
1142
- /** Cooperative runs abandoned mid-flight for a newer revision. */
1143
- readonly cancelledRuns: number;
1144
- }
1145
1293
  /** How a reveal places its target in the viewport. */
1146
1294
  interface RevealOptions {
1147
1295
  /**
@@ -1189,6 +1337,11 @@ interface PaginatedSurfaceState {
1189
1337
  readonly cellSelection: CellSelection | null;
1190
1338
  readonly canUndo: boolean;
1191
1339
  readonly canRedo: boolean;
1340
+ /**
1341
+ * Lifecycle of the attached replica, or `'inactive'` when no collaboration
1342
+ * module is registered on this surface.
1343
+ */
1344
+ readonly collaborationStatus: CollaborationStatus | 'inactive';
1192
1345
  readonly lastRejection: string | null;
1193
1346
  /**
1194
1347
  * The typing format armed at the caret (Word's stored marks), or null.
@@ -1216,23 +1369,26 @@ interface PaginatedSurfaceState {
1216
1369
  * This is how a host's context menu learns it. Surface chrome, not document state.
1217
1370
  */
1218
1371
  readonly contextTocId: string | null;
1372
+ /**
1373
+ * Format painter arming, and the level of what it holds.
1374
+ *
1375
+ * Surface chrome, not document bytes — the lane `contentControls` above sits in, reported
1376
+ * through the same `onChange` so a toolbar's pressed state has exactly one source.
1377
+ */
1378
+ readonly formatPainter: FormatPainterSurfaceState;
1219
1379
  /** Timing and reuse counters for the last pass. Diagnostics, not document state. */
1220
1380
  readonly perf: PaginatedSurfacePerf;
1221
1381
  }
1222
1382
  /**
1223
- * Observable content-control interaction state on the paginated surface.
1383
+ * Where the section after an inserted break begins — Word's Layout > Breaks menu.
1224
1384
  *
1225
- * Boundary furniture visibility and form-fill navigation are surface chrome, not model
1226
- * bytes — toggling them never reflows layout records.
1385
+ * The two the engine paginates. `evenPage` / `oddPage` are readable in a file but not
1386
+ * offered here, because layout does not skip the blank sheet they need yet, and a menu
1387
+ * entry that silently behaves like `nextPage` is the lie this vocabulary exists to avoid.
1388
+ *
1389
+ * @public
1227
1390
  */
1228
- interface ContentControlSurfaceState {
1229
- /** Show boundary chrome for every control. */
1230
- readonly showAll: boolean;
1231
- /** Tab / Shift+Tab navigate between editable controls. */
1232
- readonly formFill: boolean;
1233
- /** Innermost control containing the caret, or null. */
1234
- readonly activeControlId: string | null;
1235
- }
1391
+ type SectionBreakInsertType = 'nextPage' | 'continuous';
1236
1392
  /**
1237
1393
  * The mounted, painted, editable document — the layer `createDocxEditor` builds its contract on.
1238
1394
  *
@@ -1245,12 +1401,14 @@ interface ContentControlSurfaceState {
1245
1401
  */
1246
1402
  interface PaginatedSurface {
1247
1403
  readonly session: TreeDocxSessionView;
1404
+ /** The collaboration replica a `collaborationModule` attached, or null. */
1405
+ collaborationSession(): EditorCollaborationSession | null;
1248
1406
  storyScope(): StoryScope;
1249
1407
  imageDecodePort(): ImageDecodePort;
1250
1408
  applyDrawingOps(ops: readonly DrawingTreeDocOp[]): TreeApplyResult;
1251
1409
  applyImageProperties(input: ApplyImagePropertiesInput): ImageIntentResult;
1252
1410
  deleteImage(drawingNodeId: string): ImageIntentResult;
1253
- insertImage(input: Omit<InsertImageInput, 'decodePort'>): Promise<ImageIntentResult>;
1411
+ insertImage(input: SurfaceInsertImageInput): Promise<ImageIntentResult>;
1254
1412
  replaceImage(drawingNodeId: string, bytes: Uint8Array, mime: SupportedImageMime, options: {
1255
1413
  readonly expectedPackageRevision: number;
1256
1414
  readonly commitGuard?: () => boolean;
@@ -1265,14 +1423,11 @@ interface PaginatedSurface {
1265
1423
  /**
1266
1424
  * Queue plain typed text for a batched commit at the caret.
1267
1425
  *
1268
- * The DOM input lane's entry: keystrokes arriving in a burst append here and land
1269
- * through ONE `type()` call — one transaction, one undo step, one layout flush —
1270
- * when the input queue drains. Every surface-level mutation, selection or scope
1271
- * move, geometry read, composition start and teardown flushes the buffer first.
1272
- * Code reading `session` directly (its text or its bytes) sits BELOW the buffer
1273
- * and must call {@link flushPendingInput} first, as the facade's save/detach
1274
- * paths do. `type()` itself stays synchronous; automation and commands should
1275
- * keep calling it directly.
1426
+ * The DOM input lane's entry: a burst of keystrokes appends here and lands through ONE
1427
+ * `type()` call — one transaction, one undo step, one layout flush — when the queue drains.
1428
+ * Every surface mutation, selection or scope move, geometry read, composition start and
1429
+ * teardown flushes first. Code reading `session` directly sits BELOW the buffer and must
1430
+ * call {@link flushPendingInput}, as save/detach do. `type()` stays synchronous.
1276
1431
  */
1277
1432
  enqueueType(text: string): void;
1278
1433
  /**
@@ -1518,11 +1673,33 @@ interface PaginatedSurface {
1518
1673
  readonly anchorParagraphId?: string;
1519
1674
  }): boolean;
1520
1675
  /**
1521
- * Insert a next-page section break at the caret: the paragraph splits, and the head
1522
- * ends a new section cloning the governing section's page setup — Word's Layout >
1523
- * Breaks > Next Page. One undoable step. Returns whether the break committed.
1676
+ * Insert a section break at the caret: the paragraph splits, and the head ends a new
1677
+ * section cloning the governing section's page setup — Word's Layout > Breaks. One
1678
+ * undoable step. Returns whether the break committed.
1679
+ *
1680
+ * `breakType` says where the section AFTER the break begins: `'nextPage'` (the default,
1681
+ * Word's Next Page) starts a new sheet, `'continuous'` keeps it on the sheet the
1682
+ * previous section ended, which is how a mid-page column or margin change is authored.
1524
1683
  */
1525
- insertSectionBreak(): boolean;
1684
+ insertSectionBreak(breakType?: SectionBreakInsertType): boolean;
1685
+ /**
1686
+ * Why {@link insertSectionBreak} would refuse this kind right now, or `null`.
1687
+ *
1688
+ * THE authority for the BREAK's own questions, so `Editor.can` and the write cannot answer
1689
+ * those differently. Both halves are things only the surface knows: the LIVE editing mode
1690
+ * (a document that declares `w:trackRevisions` opens suggesting without anyone passing a
1691
+ * mode, and Review > Track Changes moves it again afterwards), and the paragraph the break
1692
+ * would actually land in — which for a range in suggesting mode is past the struck words,
1693
+ * not the selection's head.
1694
+ *
1695
+ * NOT the deletion's questions. A break replaces the selection first, and that deletion can
1696
+ * cross content a control holds or a region protected some other way; only the store sees
1697
+ * that, and it sees it at write time. So a range whose landing is fine while its deletion
1698
+ * is not answers `null` here and refuses at the press — as every other replacing command in
1699
+ * the engine does, less loudly. Story scope is gated separately again, because a caret in a
1700
+ * header refuses every break kind for a different reason.
1701
+ */
1702
+ sectionBreakRefusal(breakType?: SectionBreakInsertType): string | null;
1526
1703
  /** The layout session, so a host or a test can see how much work a pass actually did. */
1527
1704
  layoutSession(): {
1528
1705
  readonly stats: {
@@ -1547,6 +1724,8 @@ interface PaginatedSurface {
1547
1724
  * Show-all and form-fill are surface chrome and never reflow layout.
1548
1725
  */
1549
1726
  readonly contentControls: ContentControlOps;
1727
+ /** Word's Format Painter: capture, apply, and the transient armed mode. */
1728
+ readonly formatPainter: FormatPainterOps;
1550
1729
  /** Whether a `rows`×`cols` table can be inserted at the caret. */
1551
1730
  canInsertTable(rows: number, cols: number): boolean;
1552
1731
  /**
@@ -1602,11 +1781,24 @@ interface PaginatedSurface {
1602
1781
  * its identity.
1603
1782
  */
1604
1783
  revisionAuthors(): ReadonlyMap<string, number>;
1784
+ /** The presence colour the caret paints for `name`, sanitized as the paint sink is. */
1785
+ remotePresenceColor(name: string): string | undefined;
1605
1786
  /**
1606
1787
  * Replace how tracked changes are coloured, live. Paint-level: the pages repaint without
1607
1788
  * remeasuring a line, and the caret, selection and undo history stay where they are.
1608
1789
  */
1609
1790
  setRevisionStyles(colors: RevisionStyles | undefined): void;
1791
+ /**
1792
+ * Hand remote-caret label content to the host, or take it back with `null`.
1793
+ *
1794
+ * With a host set, the engine still creates and positions each label (same class, same
1795
+ * presence colour) but leaves it empty, marks it `data-docx-remote-actor`, and calls
1796
+ * {@link RemoteCaretLabelHost.publish} after every paint that rebuilt the labels.
1797
+ * Registration and unregistration repaint immediately, so the first publish fires
1798
+ * without waiting for awareness to move and unregistering restores the default
1799
+ * collaborator-name labels.
1800
+ */
1801
+ setRemoteCaretLabelHost(host: RemoteCaretLabelHost | null): void;
1610
1802
  /**
1611
1803
  * Commit ops that came from automation, through the gate a keystroke goes through.
1612
1804
  *
@@ -1627,10 +1819,23 @@ interface PaginatedSurface {
1627
1819
  * target is one this engine will not author, and the write is refused having changed nothing.
1628
1820
  */
1629
1821
  applyAutomationOps(staged: (relate: (url: string) => string | null) => readonly TreeDocOp[] | null, scope?: StoryScope): TreeApplyResult;
1822
+ /**
1823
+ * Which revision halves this surface is SHOWING.
1824
+ *
1825
+ * Read by the automation adapter so the object model's formatting reaches the same runs the
1826
+ * toolbar does. A range's offsets cover every revision half whatever the view does with
1827
+ * them, so with markup on, a selection over a struck word means one thing to a reader and
1828
+ * would mean another to a script that assumed the resolved result.
1829
+ */
1830
+ revisionDisplayMode(): RevisionDisplayMode;
1630
1831
  /**
1631
1832
  * Commit review ops — accept, reject, a new comment — through the SAME path a keystroke
1632
1833
  * takes: layout, paint, and a caret clamped to what the document now holds.
1633
1834
  *
1835
+ * `intent` names WHICH review write this is, so a lane that judges them can tell them apart.
1836
+ * The callback is opaque, and a replica admits only the writes proven to replicate — see
1837
+ * {@link ReviewWriteIntent}.
1838
+ *
1634
1839
  * Applying them straight to the session skipped all three. Rejecting an insertion left the
1635
1840
  * pages painting text the tree no longer had, every card anchored where it used to be, and
1636
1841
  * the caret past the end of the paragraph — after which every keystroke was refused with
@@ -1639,7 +1844,7 @@ interface PaginatedSurface {
1639
1844
  commitReviewOps(run: () => {
1640
1845
  readonly committed: boolean;
1641
1846
  readonly reason?: unknown;
1642
- }): void;
1847
+ }, intent?: ReviewWriteIntent): void;
1643
1848
  /**
1644
1849
  * The layout as last PUBLISHED, without forcing pending work.
1645
1850
  *
@@ -1653,14 +1858,12 @@ interface PaginatedSurface {
1653
1858
  /**
1654
1859
  * How the current selection came to address a drawing, if it does at all.
1655
1860
  *
1656
- * Word's rule: a caret NEXT TO a floating object is a text caret, never an object
1657
- * selection — only clicking the object (or an explicit host selection write) selects it.
1658
- * The engine's selection is a caret at the drawing's anchor offset either way, so the
1659
- * offsets alone cannot tell the two apart; this is the discriminator. `none` for a fresh
1660
- * mount (a document must not open with an image selected — the initial caret routinely
1661
- * coincides with a drawing anchored at offset zero) and after typing, caret keys, or a
1662
- * pointer press on anything that is not a drawing. `pointer` names the drawing the press
1663
- * landed on, so a stale press can never claim a different drawing the caret later visits.
1861
+ * Word's rule: a caret NEXT TO a floating object is a text caret, never an object selection —
1862
+ * only clicking the object (or a host selection write) selects it. The engine's selection is a
1863
+ * caret at the anchor offset either way, so offsets cannot tell them apart; this is the
1864
+ * discriminator. `none` for a fresh mount (the initial caret routinely coincides with a drawing
1865
+ * anchored at offset zero) and after typing, caret keys, or a press on a non-drawing. `pointer`
1866
+ * names the drawing the press landed on, so a stale press cannot claim a later one.
1664
1867
  */
1665
1868
  drawingSelectionIntent(): DrawingSelectionIntent;
1666
1869
  /**
@@ -1732,6 +1935,25 @@ interface PaginatedSurface {
1732
1935
  bookmarks(): BookmarkIndex;
1733
1936
  /** The selected text, for copy and cut. */
1734
1937
  selectedText(): string;
1938
+ /**
1939
+ * Every clipboard flavour for the current selection: plain text, and the interop HTML
1940
+ * carrying the embedded fragment when the selection is a body-story range. A cell
1941
+ * rectangle answers grid text plus a flattened table; `html` is null where only plain
1942
+ * text should be written.
1943
+ */
1944
+ copyFlavours(): {
1945
+ readonly text: string;
1946
+ readonly html: string | null;
1947
+ };
1948
+ /**
1949
+ * Route one paste payload by fidelity: embedded fragment, then external HTML, then
1950
+ * plain text — degrading on decode, read, or apply refusal. Suggesting mode, non-body
1951
+ * stories and an armed force-plain all land on the plain lane. False when the payload
1952
+ * landed on no lane at all (nothing to insert).
1953
+ */
1954
+ pasteRich(text: string, html: string | null): boolean;
1955
+ /** The next paste routes plain, whatever its payload carries (Cmd+Shift+V). */
1956
+ armForcePlainPaste(): void;
1735
1957
  /** Remove the selection, if any. Returns whether anything was deleted. */
1736
1958
  deleteSelection(): boolean;
1737
1959
  navigate(command: NavigationCommand, extend?: boolean): void;
@@ -2305,8 +2527,15 @@ declare const CHROME_GROUPS: readonly [{
2305
2527
  }];
2306
2528
  }, {
2307
2529
  readonly id: "format";
2308
- readonly labelKey: "formattingBar.clearFormatting";
2530
+ readonly labelKey: "formattingBar.groups.format";
2309
2531
  readonly controls: readonly [{
2532
+ readonly id: "painter";
2533
+ readonly labelKey: "formattingBar.formatPainterShortcut";
2534
+ readonly paths: readonly string[];
2535
+ readonly state: {
2536
+ readonly kind: "command";
2537
+ };
2538
+ }, {
2310
2539
  readonly id: "clear";
2311
2540
  readonly labelKey: "formattingBar.clearFormatting";
2312
2541
  readonly paths: readonly string[];
@@ -2587,7 +2816,7 @@ type ChromeGroupId = 'history' | 'zoom' | 'styles' | 'font' | 'text' | 'script'
2587
2816
  *
2588
2817
  * @public
2589
2818
  */
2590
- 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' | 'list.bullet' | 'list.numbered' | 'list.outdent' | 'list.indent' | 'list.lineSpacing' | 'format.clear' | 'review.comments' | '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' | 'paragraph.dialog' | 'file.pageSetup' | 'insert.footnote' | 'insert.endnote' | 'insert.pageNumber' | 'insert.totalPages' | 'insert.sectionPages' | 'insert.pageXofY' | 'insert.pageBreak' | 'insert.sectionBreakNextPage' | 'insert.sectionBreakContinuous' | 'insert.toc';
2819
+ 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' | 'list.bullet' | 'list.numbered' | 'list.outdent' | 'list.indent' | 'list.lineSpacing' | 'format.painter' | 'format.clear' | 'review.comments' | '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' | 'paragraph.dialog' | 'file.pageSetup' | 'insert.footnote' | 'insert.endnote' | 'insert.pageNumber' | 'insert.totalPages' | 'insert.sectionPages' | 'insert.pageXofY' | 'insert.pageBreak' | 'insert.sectionBreakNextPage' | 'insert.sectionBreakContinuous' | 'insert.toc';
2591
2820
  /**
2592
2821
  * Every control id in the chrome, as a literal union. Unique WITHIN a group, not
2593
2822
  * globally (`image.insert` / `table.insert`) — key consumers on {@link ChromeSlotId}.
@@ -2619,9 +2848,9 @@ declare function chromeSlotId(group: {
2619
2848
  declare function defaultChromeGroups(): readonly ChromeGroup[];
2620
2849
  /**
2621
2850
  * The formatting-bar groups for one editor snapshot: the default bar, plus the
2622
- * contextual `image` group when a drawing is selected. Insertion without a selection is
2623
- * not in the packaged chrome at all — a host that wants it places `image.insert` itself,
2624
- * through `DocxEditor.Toolbar.ImageInsert` or `DocxEditor.Menu.ImageInsert`.
2851
+ * contextual `image` group when a drawing is selected. Insertion without a selection
2852
+ * lives in the packaged Insert menu (`CHROME_MENUS`), not in the bar — a host that wants
2853
+ * a bar button places `DocxEditor.Toolbar.ImageInsert` itself.
2625
2854
  *
2626
2855
  * @public
2627
2856
  */
@@ -2883,6 +3112,18 @@ declare function tableChromeToolbarState(editor: Editor | null, slot: TableChrom
2883
3112
  * @public
2884
3113
  */
2885
3114
  declare function toolbarCommandState(editor: Editor | null, id: ChromeSlotId): ToolbarCommandState;
3115
+ /**
3116
+ * Whether a slot's control renders as a TOGGLE — pressed or not — so it carries
3117
+ * `aria-pressed`.
3118
+ *
3119
+ * Shared rather than derived per adapter, because it is not derivable from the command table
3120
+ * alone: the format painter has no fixed command (a press captures, arms, locks or stands
3121
+ * down, which no single `EditorCommand` describes), so a rule that only read `commandForSlot`
3122
+ * left it announcing nothing at all to a screen reader while it was armed.
3123
+ *
3124
+ * @public
3125
+ */
3126
+ declare function chromeSlotIsToggle(slotId: ChromeSlotId): boolean;
2886
3127
  /**
2887
3128
  * Enabled state for several controls in one pass.
2888
3129
  *
@@ -2958,4 +3199,4 @@ declare function runTableCommand(editor: Editor | null, command: EditorCommand):
2958
3199
  */
2959
3200
  declare function createDocxEditor(config: DocxEditorConfig): DocxEditorInstance;
2960
3201
 
2961
- export { type SectionAnchor as $, type AnchorFrameOrigin as A, type FontResolutionRequest as B, CHROME_GROUPS as C, type DocxEditorInstance as D, EMU_PER_POINT as E, type FinalizedImageOverlayInteraction as F, type FontResolver as G, type FontUrlSource as H, type HyperlinkActivation as I, type HyperlinkChromeHandlers as J, type HyperlinkOps as K, IMAGE_OVERLAY_NUDGE_PT as L, IMAGE_OVERLAY_NUDGE_SHIFT_PT as M, type ImageInteractionSession as N, type OpenPaginatedResult as O, type PaginatedSurfaceOptions as P, type ImageOverlayScrollPort as Q, type ImageResizeHandle as R, type ImageResizeResult as S, type TableCommandPlan as T, type LoadFontsRequest as U, type LoadFontsResult as V, MAX_RESOLVER_FAMILIES as W, type OverlayFrameRect as X, type PaginatedSurfaceState as Y, type ParagraphPropertyEdit as Z, type RunTableChromeCommandResult as _, type PaginatedSurface as a, tableChromeIconPaths as a$, type SelectedDrawingOverlayTarget as a0, type SurfaceEquation as a1, type SurfaceFormatting as a2, type SurfaceHyperlink as a3, type SurfaceNavigation as a4, type SurfaceOverlayCoordinates as a5, type SurfaceParagraphFormat as a6, TABLE_BORDER_STYLE_OPTIONS as a7, TABLE_BORDER_TARGET_OPTIONS as a8, TABLE_BORDER_WIDTH_OPTIONS as a9, createDocxEditor as aA, createFontSource as aB, createImageOverlayScrollPort as aC, cssPixelsToLayoutPoints as aD, defaultChromeGroups as aE, defaultTableLabel as aF, emuToOverlayPoints as aG, equationAtPosition as aH, executeImageCommand as aI, finalizeImageOverlayInteraction as aJ, formattingBarChromeGroups as aK, isStaleImageInteractionCommit as aL, isTableChromeSlot as aM, layoutPointsToCssPixels as aN, loadFonts as aO, overlayFrameToSheetCssPixels as aP, overlayHostOrigin as aQ, pointsToEmu as aR, probeTableChromeCommand as aS, resizePreservesAspect as aT, runSave as aU, runTableChromeCommand as aV, runTableCommand as aW, runToolbarCommand as aX, selectedDrawingOverlayTargetOf as aY, selectedImageStateOf as aZ, surfacePaintScale as a_, TABLE_CHROME_SLOT_IDS as aa, type TableBorderStyleOption as ab, type TableBorderTargetOption as ac, type TableBorderTargetValue as ad, type TableBorderWidthOption as ae, type TableChromeDraft as af, type TableChromePick as ag, type TableChromeSlotId as ah, type TableInteractionLabelKey as ai, type ToolbarCommandState as aj, WORD_DEFAULT_FONT as ak, applyTableChromePick as al, blankDocumentBytes as am, canExecuteImageCommand as an, captureImageMutationPreconditions as ao, chromeControlCount as ap, chromeMenuSlots as aq, chromeProbeForSlot as ar, chromeSlotId as as, commandForSlot as at, commandForSlotValue as au, commandForTableChromeSlotValue as av, composeFontConfiguration as aw, computeImageResizeResult as ax, computeMovedImagePosition as ay, computeResizedImageExtentEmu as az, CHROME_MENUS as b, tableChromeLabelKeyForTarget as b0, tableChromeToolbarState as b1, tableChromeVisible as b2, tableCommandToolbarState as b3, toolbarCommandState as b4, toolbarCommandStates as b5, CHROME_UNAVAILABLE_KEY as c, type ChromeControl as d, type ChromeControlId as e, type ChromeControlState as f, type ChromeGroup as g, type ChromeGroupId as h, type ChromeMenu as i, type ChromeMenuEntry as j, type ChromeMenuId as k, type ChromeMenuItemEntry as l, type ChromeMenuSeparatorEntry as m, type ChromeMenuSubmenuEntry as n, type ChromeSlotId as o, DEFAULT_TABLE_CHROME_DRAFT as p, type DocxEditorConfig as q, type DrawingSelectionIntent as r, type EquationActivation as s, type EquationChromeHandlers as t, type EquationOps as u, type FontConfigurationBase as v, type FontConfigurationFragment as w, type FontLoadFailure as x, type FontLoadFailureReason as y, type FontMeasurementState as z };
3202
+ export { type RemoteCaretLabelHost as $, type AnchorFrameOrigin as A, type FontResolutionRequest as B, CHROME_GROUPS as C, type DocxEditorInstance as D, EMU_PER_POINT as E, type FinalizedImageOverlayInteraction as F, type FontResolver as G, type FontUrlSource as H, type HyperlinkActivation as I, type HyperlinkChromeHandlers as J, type HyperlinkOps as K, IMAGE_OVERLAY_NUDGE_PT as L, IMAGE_OVERLAY_NUDGE_SHIFT_PT as M, type ImageInteractionSession as N, type OpenPaginatedResult as O, type PaginatedSurfaceOptions as P, type ImageOverlayScrollPort as Q, type ImageResizeHandle as R, type ImageResizeResult as S, type TableCommandPlan as T, type LoadFontsRequest as U, type LoadFontsResult as V, MAX_RESOLVER_FAMILIES as W, type OverlayFrameRect as X, type PaginatedSurfaceState as Y, type ParagraphPropertyEdit as Z, type RemoteCaretLabelAnchor as _, type PaginatedSurface as a, runTableChromeCommand as a$, type ReviewWriteIntent as a0, type RunTableChromeCommandResult as a1, type SectionAnchor as a2, type SectionBreakInsertType as a3, type SelectedDrawingOverlayTarget as a4, type SurfaceEquation as a5, type SurfaceFormatting as a6, type SurfaceHyperlink as a7, type SurfaceInsertImageInput as a8, type SurfaceNavigation as a9, commandForSlotValue as aA, commandForTableChromeSlotValue as aB, composeFontConfiguration as aC, computeImageResizeResult as aD, computeMovedImagePosition as aE, computeResizedImageExtentEmu as aF, createDocxEditor as aG, createFontSource as aH, createImageOverlayScrollPort as aI, cssPixelsToLayoutPoints as aJ, defaultChromeGroups as aK, defaultTableLabel as aL, emuToOverlayPoints as aM, equationAtPosition as aN, executeImageCommand as aO, finalizeImageOverlayInteraction as aP, formattingBarChromeGroups as aQ, isStaleImageInteractionCommit as aR, isTableChromeSlot as aS, layoutPointsToCssPixels as aT, loadFonts as aU, overlayFrameToSheetCssPixels as aV, overlayHostOrigin as aW, pointsToEmu as aX, probeTableChromeCommand as aY, resizePreservesAspect as aZ, runSave as a_, type SurfaceOverlayCoordinates as aa, type SurfaceParagraphFormat as ab, TABLE_BORDER_STYLE_OPTIONS as ac, TABLE_BORDER_TARGET_OPTIONS as ad, TABLE_BORDER_WIDTH_OPTIONS as ae, TABLE_CHROME_SLOT_IDS as af, type TableBorderStyleOption as ag, type TableBorderTargetOption as ah, type TableBorderTargetValue as ai, type TableBorderWidthOption as aj, type TableChromeDraft as ak, type TableChromePick as al, type TableChromeSlotId as am, type TableInteractionLabelKey as an, type ToolbarCommandState as ao, WORD_DEFAULT_FONT as ap, applyTableChromePick as aq, blankDocumentBytes as ar, canExecuteImageCommand as as, captureImageMutationPreconditions as at, chromeControlCount as au, chromeMenuSlots as av, chromeProbeForSlot as aw, chromeSlotId as ax, chromeSlotIsToggle as ay, commandForSlot as az, CHROME_MENUS as b, runTableCommand as b0, runToolbarCommand as b1, selectedDrawingOverlayTargetOf as b2, selectedImageStateOf as b3, surfacePaintScale as b4, tableChromeIconPaths as b5, tableChromeLabelKeyForTarget as b6, tableChromeToolbarState as b7, tableChromeVisible as b8, tableCommandToolbarState as b9, toolbarCommandState as ba, toolbarCommandStates as bb, CHROME_UNAVAILABLE_KEY as c, type ChromeControl as d, type ChromeControlId as e, type ChromeControlState as f, type ChromeGroup as g, type ChromeGroupId as h, type ChromeMenu as i, type ChromeMenuEntry as j, type ChromeMenuId as k, type ChromeMenuItemEntry as l, type ChromeMenuSeparatorEntry as m, type ChromeMenuSubmenuEntry as n, type ChromeSlotId as o, DEFAULT_TABLE_CHROME_DRAFT as p, type DocxEditorConfig as q, type DrawingSelectionIntent as r, type EquationActivation as s, type EquationChromeHandlers as t, type EquationOps as u, type FontConfigurationBase as v, type FontConfigurationFragment as w, type FontLoadFailure as x, type FontLoadFailureReason as y, type FontMeasurementState as z };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkKQGENNL5_cjs=require('./chunk-KQGENNL5.cjs');require('./chunk-7ETDCPF6.cjs'),require('./chunk-6KNLLEUW.cjs'),require('./chunk-H2656QDI.cjs'),require('./chunk-O4UULRAQ.cjs'),require('./chunk-7UU5YFCD.cjs'),require('./chunk-7ADTI533.cjs'),require('./chunk-YMYCPY5Y.cjs'),require('./chunk-7VQ7YLW3.cjs');Object.defineProperty(exports,"CHROME_GROUPS",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.va}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.za}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.f}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.h}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Aa}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.ja}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.la}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.g}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Ma}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.k}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.j}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.qa}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.na}});
1
+ 'use strict';var chunk5AVHO75P_cjs=require('./chunk-5AVHO75P.cjs');require('./chunk-ZKWRCLT2.cjs'),require('./chunk-JUQOPVSK.cjs'),require('./chunk-UQFOYZJO.cjs'),require('./chunk-EJATEGJZ.cjs'),require('./chunk-M6Z3KFXM.cjs'),require('./chunk-GRDFEH5Q.cjs'),require('./chunk-76Y3Y45J.cjs'),require('./chunk-BTQKU64Q.cjs'),require('./chunk-WPQMPHNR.cjs'),require('./chunk-GWV65NQW.cjs'),require('./chunk-OHJQ7GPZ.cjs');Object.defineProperty(exports,"CHROME_GROUPS",{enumerable:true,get:function(){return chunk5AVHO75P_cjs.wa}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunk5AVHO75P_cjs.Aa}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunk5AVHO75P_cjs.f}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunk5AVHO75P_cjs.h}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunk5AVHO75P_cjs.Ba}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunk5AVHO75P_cjs.ja}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunk5AVHO75P_cjs.la}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunk5AVHO75P_cjs.g}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunk5AVHO75P_cjs.Na}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunk5AVHO75P_cjs.k}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunk5AVHO75P_cjs.j}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunk5AVHO75P_cjs.ra}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunk5AVHO75P_cjs.na}});