@docx-editor.dev/core 2.10.0 → 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 (136) 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 +12 -11
  7. package/dist/binding.d.ts +12 -11
  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/editor.cjs +1 -1
  42. package/dist/contracts/editor.d.cts +8 -9
  43. package/dist/contracts/editor.d.ts +8 -9
  44. package/dist/contracts/editor.js +1 -1
  45. package/dist/contracts/interaction.d.cts +8 -9
  46. package/dist/contracts/interaction.d.ts +8 -9
  47. package/dist/contracts/modules.cjs +1 -1
  48. package/dist/contracts/modules.d.cts +21 -8
  49. package/dist/contracts/modules.d.ts +21 -8
  50. package/dist/contracts/modules.js +1 -1
  51. package/dist/custom-node-writes-CwkYRw3V.d.cts +310 -0
  52. package/dist/custom-node-writes-JfTn-Sy6.d.ts +310 -0
  53. package/dist/document-properties-D6Ahr8D6.d.cts +28 -0
  54. package/dist/document-properties-D6Ahr8D6.d.ts +28 -0
  55. package/dist/{editor-C0my6Uta.d.ts → editor-BogcVHXk.d.ts} +145 -49
  56. package/dist/{editor-CwzY2Hcg.d.cts → editor-C8edZgy5.d.cts} +145 -49
  57. package/dist/editor.cjs +1 -1
  58. package/dist/editor.css +1 -7299
  59. package/dist/editor.d.cts +26 -25
  60. package/dist/editor.d.ts +26 -25
  61. package/dist/editor.js +1 -1
  62. package/dist/failure-BnGjoXf0.d.cts +64 -0
  63. package/dist/failure-BnGjoXf0.d.ts +64 -0
  64. package/dist/{index-kID8Ymkp.d.ts → index-BNv-ZLQP.d.ts} +262 -81
  65. package/dist/{index-nLFwo_17.d.cts → index-Dn0lOp9Z.d.cts} +262 -81
  66. package/dist/index.cjs +1 -1
  67. package/dist/index.d.cts +19 -18
  68. package/dist/index.d.ts +19 -18
  69. package/dist/index.js +1 -1
  70. package/dist/layout.cjs +1 -1
  71. package/dist/layout.d.cts +71 -53
  72. package/dist/layout.d.ts +71 -53
  73. package/dist/layout.js +1 -1
  74. package/dist/{note-properties-jvnw_DGG.d.ts → note-properties-BmoSdyKS.d.ts} +1 -1
  75. package/dist/{note-properties-CQlxjic_.d.cts → note-properties-BvGfHk5e.d.cts} +1 -1
  76. package/dist/{omml-equation-Dd3mBep-.d.ts → omml-equation-Ciq5rgb7.d.ts} +1 -1
  77. package/dist/{omml-equation-BD-LsmWE.d.cts → omml-equation-CqQOt_dD.d.cts} +1 -1
  78. package/dist/output.cjs +1 -1
  79. package/dist/output.d.cts +6 -8
  80. package/dist/output.d.ts +6 -8
  81. package/dist/output.js +1 -1
  82. package/dist/{protocol-UuZOcOp7.d.cts → protocol-BB-WP3zk.d.cts} +2 -2
  83. package/dist/{protocol-C7ahrdUx.d.ts → protocol-Ckl7hWsv.d.ts} +2 -2
  84. package/dist/{review-items-Dw-8a6Ie.d.ts → review-items-BdeLNRi2.d.cts} +1 -2
  85. package/dist/{review-items-CwixiHNe.d.cts → review-items-CkYyXhXM.d.ts} +1 -2
  86. package/dist/{review-reads-BqkiJTeR.d.cts → review-reads-BOLSBm5w.d.cts} +2 -2
  87. package/dist/{review-reads-C0u-IKEA.d.ts → review-reads-Crf0Xn42.d.ts} +2 -2
  88. package/dist/{revision-projection-CILpvv4M.d.ts → revision-projection-Ae2CWa8E.d.ts} +1 -1
  89. package/dist/{revision-projection-Cc4wz30g.d.cts → revision-projection-C2S8PSQm.d.cts} +1 -1
  90. package/dist/{semantic-cell-selection-DT9x9WLf.d.cts → semantic-cell-selection-C0OFD4D9.d.cts} +4 -4
  91. package/dist/{semantic-cell-selection-Utrf0lz7.d.ts → semantic-cell-selection-DdmoxC-y.d.ts} +4 -4
  92. package/dist/{semantic-interaction-B6hFRQLy.d.ts → semantic-interaction-COyhZ9WH.d.ts} +1 -1
  93. package/dist/{semantic-interaction-Z0xKQcB4.d.cts → semantic-interaction-Cs2jErnt.d.cts} +1 -1
  94. package/dist/{semantic-paint-CQEOC0Od.d.cts → semantic-paint-UHaj3sBY.d.cts} +2 -2
  95. package/dist/{semantic-paint-quke354p.d.ts → semantic-paint-vA-oLSdV.d.ts} +2 -2
  96. package/dist/{semantic-records-Do3-i5oB.d.ts → semantic-records-5AOQJmLX.d.cts} +5 -4
  97. package/dist/{semantic-records-CMakzQ1X.d.cts → semantic-records-9xhwbJ23.d.ts} +5 -4
  98. package/dist/{shaped-measurer-DzRwWrL5.d.cts → shaped-measurer-NeF2mPSu.d.cts} +1 -1
  99. package/dist/{shaped-measurer-BxwTUluj.d.ts → shaped-measurer-vzsY88oK.d.ts} +1 -1
  100. package/dist/store.cjs +1 -1
  101. package/dist/store.d.cts +74 -16
  102. package/dist/store.d.ts +74 -16
  103. package/dist/store.js +1 -1
  104. package/dist/{tree-op-types-DSJYmf5b.d.cts → tree-op-types-BPyXNxyL.d.cts} +1247 -10
  105. package/dist/{tree-op-types-BuOfCrkp.d.ts → tree-op-types-DnzAOnc9.d.ts} +1247 -10
  106. package/dist/{custom-node-writes-BvpWCnW8.d.ts → tree-package-fragment-BjZ3RWAS.d.cts} +107 -322
  107. package/dist/{custom-node-writes-Db8H6Z3n.d.cts → tree-package-fragment-CDER0G3B.d.ts} +107 -322
  108. package/dist/{tree-session-contract-C1dfE9hy.d.ts → tree-session-contract-BF2FVBOM.d.cts} +16 -10
  109. package/dist/{tree-session-contract-ByWx8eew.d.cts → tree-session-contract-DhdsFT_z.d.ts} +16 -10
  110. package/dist/{tree-store-ASBtz7UB.d.ts → tree-store-CNZ3O83s.d.ts} +130 -25
  111. package/dist/{tree-store-CWOUMGN8.d.cts → tree-store-DfZi7FqY.d.cts} +130 -25
  112. package/package.json +14 -3
  113. package/dist/chunk-27APDXY2.js +0 -2
  114. package/dist/chunk-35MI6K7M.cjs +0 -10
  115. package/dist/chunk-4XL7SOWQ.cjs +0 -2
  116. package/dist/chunk-6K6QQVAZ.cjs +0 -18
  117. package/dist/chunk-7VQ7YLW3.cjs +0 -1
  118. package/dist/chunk-7ZJL5AEY.cjs +0 -1
  119. package/dist/chunk-C6LK2BYA.cjs +0 -2
  120. package/dist/chunk-GQQOL4PV.js +0 -1
  121. package/dist/chunk-HBEBUCRM.cjs +0 -5
  122. package/dist/chunk-LG5K46OM.js +0 -2
  123. package/dist/chunk-LWADHMVV.js +0 -5
  124. package/dist/chunk-N725IUO7.js +0 -18
  125. package/dist/chunk-N7DBENH4.js +0 -10
  126. package/dist/chunk-NVGFWMCO.js +0 -1
  127. package/dist/chunk-SYTWKJPJ.cjs +0 -18
  128. package/dist/chunk-YI6JXF7U.js +0 -18
  129. package/dist/hf-references-Dvk6De4Q.d.cts +0 -70
  130. package/dist/hf-references-z5Y4N1ab.d.ts +0 -70
  131. package/dist/note-nodes-BNCANoGN.d.ts +0 -108
  132. package/dist/note-nodes-DL-Au22P.d.cts +0 -108
  133. package/dist/ooxml-package-CdEy9ufK.d.cts +0 -1222
  134. package/dist/ooxml-package-CdEy9ufK.d.ts +0 -1222
  135. package/dist/tree-op-revision-attribution-CN06Xshv.d.cts +0 -24
  136. package/dist/tree-op-revision-attribution-CN06Xshv.d.ts +0 -24
@@ -1,17 +1,19 @@
1
- import { T as TreeDocOp, j as ImageDecodePort, d as DrawingPositionInput, t as DrawingTransform, k as DrawingTreeDocOp, c as SupportedImageMime } from './tree-op-types-DSJYmf5b.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';
2
2
  import { Unsubscribe, ExecResult, ParagraphTabStop, IndentFormatting, ParagraphFlags, ParagraphDisagreements, SelectionPin } from './contracts/types.cjs';
3
- import './tree-op-revision-attribution-CN06Xshv.cjs';
4
- import { g as ReviewRevisionKind } from './review-items-CwixiHNe.cjs';
3
+ import { g as ReviewRevisionKind } from './review-items-BdeLNRi2.cjs';
5
4
  import { EditorModule, ReviewModuleContribution } from './contracts/modules.cjs';
6
- 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-CwzY2Hcg.cjs';
7
- import { R as RevisionDisplayMode } from './revision-projection-Cc4wz30g.cjs';
8
- import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-Z0xKQcB4.cjs';
9
- import { c as RevisionStyles, R as ReviewAuthorInfo, b as RevisionAuthorStyle, F as FieldShadingMode, d as DrawingPaintStrings } from './semantic-paint-CQEOC0Od.cjs';
10
- import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-CQlxjic_.cjs';
11
- import { S as SemanticLayout, C as ContentControlBoundaryRecord, T as TextMeasurer } from './semantic-records-CMakzQ1X.cjs';
12
- import { S as StoryScope, A as ApplyImagePropertiesInput, d as ImageIntentResult, c as InsertImageInput, B as BookmarkIndex } from './custom-node-writes-Db8H6Z3n.cjs';
13
- import { C as CellSelection, S as SectionProperties } from './semantic-cell-selection-DT9x9WLf.cjs';
14
- import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-ByWx8eew.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,16 @@ 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
- /**
1223
- * Observable content-control interaction state on the paginated surface.
1224
- *
1225
- * Boundary furniture visibility and form-fill navigation are surface chrome, not model
1226
- * bytes — toggling them never reflows layout records.
1227
- */
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
- }
1236
1382
  /**
1237
1383
  * Where the section after an inserted break begins — Word's Layout > Breaks menu.
1238
1384
  *
@@ -1255,12 +1401,14 @@ type SectionBreakInsertType = 'nextPage' | 'continuous';
1255
1401
  */
1256
1402
  interface PaginatedSurface {
1257
1403
  readonly session: TreeDocxSessionView;
1404
+ /** The collaboration replica a `collaborationModule` attached, or null. */
1405
+ collaborationSession(): EditorCollaborationSession | null;
1258
1406
  storyScope(): StoryScope;
1259
1407
  imageDecodePort(): ImageDecodePort;
1260
1408
  applyDrawingOps(ops: readonly DrawingTreeDocOp[]): TreeApplyResult;
1261
1409
  applyImageProperties(input: ApplyImagePropertiesInput): ImageIntentResult;
1262
1410
  deleteImage(drawingNodeId: string): ImageIntentResult;
1263
- insertImage(input: Omit<InsertImageInput, 'decodePort'>): Promise<ImageIntentResult>;
1411
+ insertImage(input: SurfaceInsertImageInput): Promise<ImageIntentResult>;
1264
1412
  replaceImage(drawingNodeId: string, bytes: Uint8Array, mime: SupportedImageMime, options: {
1265
1413
  readonly expectedPackageRevision: number;
1266
1414
  readonly commitGuard?: () => boolean;
@@ -1275,14 +1423,11 @@ interface PaginatedSurface {
1275
1423
  /**
1276
1424
  * Queue plain typed text for a batched commit at the caret.
1277
1425
  *
1278
- * The DOM input lane's entry: keystrokes arriving in a burst append here and land
1279
- * through ONE `type()` call — one transaction, one undo step, one layout flush —
1280
- * when the input queue drains. Every surface-level mutation, selection or scope
1281
- * move, geometry read, composition start and teardown flushes the buffer first.
1282
- * Code reading `session` directly (its text or its bytes) sits BELOW the buffer
1283
- * and must call {@link flushPendingInput} first, as the facade's save/detach
1284
- * paths do. `type()` itself stays synchronous; automation and commands should
1285
- * 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.
1286
1431
  */
1287
1432
  enqueueType(text: string): void;
1288
1433
  /**
@@ -1579,6 +1724,8 @@ interface PaginatedSurface {
1579
1724
  * Show-all and form-fill are surface chrome and never reflow layout.
1580
1725
  */
1581
1726
  readonly contentControls: ContentControlOps;
1727
+ /** Word's Format Painter: capture, apply, and the transient armed mode. */
1728
+ readonly formatPainter: FormatPainterOps;
1582
1729
  /** Whether a `rows`×`cols` table can be inserted at the caret. */
1583
1730
  canInsertTable(rows: number, cols: number): boolean;
1584
1731
  /**
@@ -1634,11 +1781,24 @@ interface PaginatedSurface {
1634
1781
  * its identity.
1635
1782
  */
1636
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;
1637
1786
  /**
1638
1787
  * Replace how tracked changes are coloured, live. Paint-level: the pages repaint without
1639
1788
  * remeasuring a line, and the caret, selection and undo history stay where they are.
1640
1789
  */
1641
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;
1642
1802
  /**
1643
1803
  * Commit ops that came from automation, through the gate a keystroke goes through.
1644
1804
  *
@@ -1672,6 +1832,10 @@ interface PaginatedSurface {
1672
1832
  * Commit review ops — accept, reject, a new comment — through the SAME path a keystroke
1673
1833
  * takes: layout, paint, and a caret clamped to what the document now holds.
1674
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
+ *
1675
1839
  * Applying them straight to the session skipped all three. Rejecting an insertion left the
1676
1840
  * pages painting text the tree no longer had, every card anchored where it used to be, and
1677
1841
  * the caret past the end of the paragraph — after which every keystroke was refused with
@@ -1680,7 +1844,7 @@ interface PaginatedSurface {
1680
1844
  commitReviewOps(run: () => {
1681
1845
  readonly committed: boolean;
1682
1846
  readonly reason?: unknown;
1683
- }): void;
1847
+ }, intent?: ReviewWriteIntent): void;
1684
1848
  /**
1685
1849
  * The layout as last PUBLISHED, without forcing pending work.
1686
1850
  *
@@ -1694,14 +1858,12 @@ interface PaginatedSurface {
1694
1858
  /**
1695
1859
  * How the current selection came to address a drawing, if it does at all.
1696
1860
  *
1697
- * Word's rule: a caret NEXT TO a floating object is a text caret, never an object
1698
- * selection — only clicking the object (or an explicit host selection write) selects it.
1699
- * The engine's selection is a caret at the drawing's anchor offset either way, so the
1700
- * offsets alone cannot tell the two apart; this is the discriminator. `none` for a fresh
1701
- * mount (a document must not open with an image selected — the initial caret routinely
1702
- * coincides with a drawing anchored at offset zero) and after typing, caret keys, or a
1703
- * pointer press on anything that is not a drawing. `pointer` names the drawing the press
1704
- * 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.
1705
1867
  */
1706
1868
  drawingSelectionIntent(): DrawingSelectionIntent;
1707
1869
  /**
@@ -2365,8 +2527,15 @@ declare const CHROME_GROUPS: readonly [{
2365
2527
  }];
2366
2528
  }, {
2367
2529
  readonly id: "format";
2368
- readonly labelKey: "formattingBar.clearFormatting";
2530
+ readonly labelKey: "formattingBar.groups.format";
2369
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
+ }, {
2370
2539
  readonly id: "clear";
2371
2540
  readonly labelKey: "formattingBar.clearFormatting";
2372
2541
  readonly paths: readonly string[];
@@ -2647,7 +2816,7 @@ type ChromeGroupId = 'history' | 'zoom' | 'styles' | 'font' | 'text' | 'script'
2647
2816
  *
2648
2817
  * @public
2649
2818
  */
2650
- 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';
2651
2820
  /**
2652
2821
  * Every control id in the chrome, as a literal union. Unique WITHIN a group, not
2653
2822
  * globally (`image.insert` / `table.insert`) — key consumers on {@link ChromeSlotId}.
@@ -2943,6 +3112,18 @@ declare function tableChromeToolbarState(editor: Editor | null, slot: TableChrom
2943
3112
  * @public
2944
3113
  */
2945
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;
2946
3127
  /**
2947
3128
  * Enabled state for several controls in one pass.
2948
3129
  *
@@ -3018,4 +3199,4 @@ declare function runTableCommand(editor: Editor | null, command: EditorCommand):
3018
3199
  */
3019
3200
  declare function createDocxEditor(config: DocxEditorConfig): DocxEditorInstance;
3020
3201
 
3021
- 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, surfacePaintScale as a$, type SectionBreakInsertType as a0, type SelectedDrawingOverlayTarget as a1, type SurfaceEquation as a2, type SurfaceFormatting as a3, type SurfaceHyperlink as a4, type SurfaceNavigation as a5, type SurfaceOverlayCoordinates as a6, type SurfaceParagraphFormat as a7, TABLE_BORDER_STYLE_OPTIONS as a8, TABLE_BORDER_TARGET_OPTIONS as a9, computeResizedImageExtentEmu as aA, createDocxEditor as aB, createFontSource as aC, createImageOverlayScrollPort as aD, cssPixelsToLayoutPoints as aE, defaultChromeGroups as aF, defaultTableLabel as aG, emuToOverlayPoints as aH, equationAtPosition as aI, executeImageCommand as aJ, finalizeImageOverlayInteraction as aK, formattingBarChromeGroups as aL, isStaleImageInteractionCommit as aM, isTableChromeSlot as aN, layoutPointsToCssPixels as aO, loadFonts as aP, overlayFrameToSheetCssPixels as aQ, overlayHostOrigin as aR, pointsToEmu as aS, probeTableChromeCommand as aT, resizePreservesAspect as aU, runSave as aV, runTableChromeCommand as aW, runTableCommand as aX, runToolbarCommand as aY, selectedDrawingOverlayTargetOf as aZ, selectedImageStateOf as a_, TABLE_BORDER_WIDTH_OPTIONS as aa, TABLE_CHROME_SLOT_IDS as ab, type TableBorderStyleOption as ac, type TableBorderTargetOption as ad, type TableBorderTargetValue as ae, type TableBorderWidthOption as af, type TableChromeDraft as ag, type TableChromePick as ah, type TableChromeSlotId as ai, type TableInteractionLabelKey as aj, type ToolbarCommandState as ak, WORD_DEFAULT_FONT as al, applyTableChromePick as am, blankDocumentBytes as an, canExecuteImageCommand as ao, captureImageMutationPreconditions as ap, chromeControlCount as aq, chromeMenuSlots as ar, chromeProbeForSlot as as, chromeSlotId as at, commandForSlot as au, commandForSlotValue as av, commandForTableChromeSlotValue as aw, composeFontConfiguration as ax, computeImageResizeResult as ay, computeMovedImagePosition as az, CHROME_MENUS as b, tableChromeIconPaths as b0, tableChromeLabelKeyForTarget as b1, tableChromeToolbarState as b2, tableChromeVisible as b3, tableCommandToolbarState as b4, toolbarCommandState as b5, toolbarCommandStates as b6, 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 chunkSYTWKJPJ_cjs=require('./chunk-SYTWKJPJ.cjs');require('./chunk-4XL7SOWQ.cjs'),require('./chunk-6K6QQVAZ.cjs'),require('./chunk-7ZJL5AEY.cjs'),require('./chunk-HBEBUCRM.cjs'),require('./chunk-C6LK2BYA.cjs'),require('./chunk-35MI6K7M.cjs'),require('./chunk-YMYCPY5Y.cjs'),require('./chunk-7VQ7YLW3.cjs');Object.defineProperty(exports,"CHROME_GROUPS",{enumerable:true,get:function(){return chunkSYTWKJPJ_cjs.va}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunkSYTWKJPJ_cjs.za}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkSYTWKJPJ_cjs.f}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunkSYTWKJPJ_cjs.h}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunkSYTWKJPJ_cjs.Aa}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunkSYTWKJPJ_cjs.ja}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunkSYTWKJPJ_cjs.la}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkSYTWKJPJ_cjs.g}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunkSYTWKJPJ_cjs.Ma}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunkSYTWKJPJ_cjs.k}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkSYTWKJPJ_cjs.j}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunkSYTWKJPJ_cjs.qa}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunkSYTWKJPJ_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}});
package/dist/index.d.cts CHANGED
@@ -1,22 +1,23 @@
1
- export { g as DrawingHorizontalReferenceFrame, D as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, h as DrawingVerticalReferenceFrame, f as ImageResourceState, b as ImageWrapTarget, P as PreservedImageMime, R as RenderableImageMime, c as SupportedImageMime, V as ValidatedImageBytesHandle, i as VectorImageMime } from './tree-op-types-DSJYmf5b.cjs';
1
+ export { z as DrawingHorizontalReferenceFrame, D as DrawingKind, w as DrawingLocks, v as DrawingPositionInput, A as DrawingVerticalReferenceFrame, x as ImageResourceState, u as ImageWrapTarget, P as PreservedImageMime, t as RenderableImageMime, R as RevisionAddress, y as SupportedImageMime, V as ValidatedImageBytesHandle, B as VectorImageMime } from './tree-op-types-BPyXNxyL.cjs';
2
2
  export { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, InsertableContentControlType, NumberingRef, PageMargins, Paragraph, ParagraphDisagreements, ParagraphFlags, ParagraphFormatCommand, ParagraphTabStop, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, SelectionPin, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark } from './contracts/types.cjs';
3
- export { R as RevisionAddress } from './tree-op-revision-attribution-CN06Xshv.cjs';
4
- export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from './review-items-CwixiHNe.cjs';
3
+ export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from './review-items-BdeLNRi2.cjs';
5
4
  export { CollectReviewItems, EditorModule, ReviewModuleContribution } from './contracts/modules.cjs';
6
- export { A as AuthoredNoteNumbering, C as CanResult, q as DocumentChange, r as DocumentEditingMode, t as DocumentHandle, D as DocumentSource, l as Editor, b as EditorCommand, u as EditorCommandShape, w as EditorCommands, x as EditorError, y as EditorEvents, E as EditorFontError, z as EditorFontErrorCode, B as EditorHeaderFooterCommands, G as EditorNoteCommands, H as EditorPosition, J as EditorQueries, K as EditorQuery, L as EditorQueryResults, M as EditorScope, N as EditorSelection, a as EditorSnapshot, F as FontConfiguration, m as FontFaceRequest, j as FontSource, k as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, c as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, _ as NotePropertiesSide, $ as NotePropertiesState, a0 as PageSetup, a1 as ResolvedNoteNumbering, a2 as ReviewActivationOptions, a3 as ReviewCommentPlacement, a4 as ReviewCustomPlacement, a5 as ReviewItemPlacement, a6 as ReviewItemPlacementBase, a7 as ReviewItemQuery, a8 as ReviewRevisionPlacement, S as SelectedImageState, a9 as SemanticIdentity, aa as SemanticTarget, T as TableBorderEdgeTarget, n as TableBorderSpec, o as TableBorderStyle, ab as TableBorderTarget, ac as TableCellVerticalAlignment, ad as TableColumnDividerResizeTarget, ae as TableColumnOccurrenceTarget, p as TableContext, af as TableRightEdgeResizeTarget, ag as TableRowOccurrenceTarget, ah as TextMatch, V as ViewScope, ai as ZoomFitTarget, Z as ZoomMode } from './editor-CwzY2Hcg.cjs';
7
- export { R as RevisionDisplayMode } from './revision-projection-Cc4wz30g.cjs';
8
- export { S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-Z0xKQcB4.cjs';
9
- export { C as CHROME_GROUPS, b as CHROME_MENUS, i as ChromeMenu, j as ChromeMenuEntry, k as ChromeMenuId, l as ChromeMenuItemEntry, m as ChromeMenuSeparatorEntry, n as ChromeMenuSubmenuEntry, o as ChromeSlotId, q as DocxEditorConfig, D as DocxEditorInstance, v as FontConfigurationBase, w as FontConfigurationFragment, x as FontLoadFailure, y as FontLoadFailureReason, z as FontMeasurementState, B as FontResolutionRequest, G as FontResolver, H as FontUrlSource, I as HyperlinkActivation, J as HyperlinkChromeHandlers, U as LoadFontsRequest, V as LoadFontsResult, a4 as SurfaceHyperlink, ak as ToolbarCommandState, al as WORD_DEFAULT_FONT, an as blankDocumentBytes, ar as chromeMenuSlots, au as commandForSlot, av as commandForSlotValue, ax as composeFontConfiguration, aB as createDocxEditor, aC as createFontSource, aP as loadFonts, aY as runToolbarCommand, b5 as toolbarCommandState } from './index-nLFwo_17.cjs';
5
+ export { A as AuthoredNoteNumbering, C as CanResult, r as DocumentChange, t as DocumentEditingMode, u as DocumentHandle, D as DocumentSource, l as Editor, b as EditorCommand, w as EditorCommandShape, x as EditorCommands, y as EditorError, z as EditorEvents, E as EditorFontError, B as EditorFontErrorCode, G as EditorFormatPainterCommands, H as EditorHeaderFooterCommands, J as EditorNoteCommands, K as EditorPosition, L as EditorQueries, M as EditorQuery, N as EditorQueryResults, O as EditorScope, P as EditorSelection, a as EditorSnapshot, F as FontConfiguration, n as FontFaceRequest, j as FontSource, k as FontSourceSubstitution, Q as FormatPainterLevel, R as FormatPainterMode, m as FormatPainterSurfaceState, U as FurnitureVariant, W as HeaderFooterSlotArgs, X as HeaderFooterState, Y as HyperlinkInfo, I as ImageContext, c as ImageCropPercent, _ as InteractionAffinity, $ as InteractionOutcome, a0 as InteractionOutcomeCode, a1 as NoteKind, a2 as NotePropertiesSide, a3 as NotePropertiesState, a4 as PageSetup, a5 as ResolvedNoteNumbering, a6 as ReviewActivationOptions, a7 as ReviewCommentPlacement, a8 as ReviewCustomPlacement, a9 as ReviewItemPlacement, aa as ReviewItemPlacementBase, ab as ReviewItemQuery, ac as ReviewRevisionPlacement, S as SelectedImageState, ad as SemanticIdentity, ae as SemanticTarget, T as TableBorderEdgeTarget, o as TableBorderSpec, p as TableBorderStyle, af as TableBorderTarget, ag as TableCellVerticalAlignment, ah as TableColumnDividerResizeTarget, ai as TableColumnOccurrenceTarget, q as TableContext, aj as TableRightEdgeResizeTarget, ak as TableRowOccurrenceTarget, al as TextMatch, V as ViewScope, am as ZoomFitTarget, Z as ZoomMode } from './editor-C8edZgy5.cjs';
6
+ export { R as RevisionDisplayMode } from './revision-projection-C2S8PSQm.cjs';
7
+ export { S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-Cs2jErnt.cjs';
8
+ export { C as CHROME_GROUPS, b as CHROME_MENUS, i as ChromeMenu, j as ChromeMenuEntry, k as ChromeMenuId, l as ChromeMenuItemEntry, m as ChromeMenuSeparatorEntry, n as ChromeMenuSubmenuEntry, o as ChromeSlotId, q as DocxEditorConfig, D as DocxEditorInstance, v as FontConfigurationBase, w as FontConfigurationFragment, x as FontLoadFailure, y as FontLoadFailureReason, z as FontMeasurementState, B as FontResolutionRequest, G as FontResolver, H as FontUrlSource, I as HyperlinkActivation, J as HyperlinkChromeHandlers, U as LoadFontsRequest, V as LoadFontsResult, a7 as SurfaceHyperlink, ao as ToolbarCommandState, ap as WORD_DEFAULT_FONT, ar as blankDocumentBytes, av as chromeMenuSlots, az as commandForSlot, aA as commandForSlotValue, aC as composeFontConfiguration, aG as createDocxEditor, aH as createFontSource, aU as loadFonts, b1 as runToolbarCommand, ba as toolbarCommandState } from './index-Dn0lOp9Z.cjs';
10
9
  export { ApplyResult, ContentControlSummary, DocEdit, DocEdits, DocQueries, DocQuery, DocQueryResults, ParagraphSummary } from './contracts/document.cjs';
11
- import './ooxml-package-CdEy9ufK.cjs';
12
- import './semantic-records-CMakzQ1X.cjs';
13
- import './omml-equation-BD-LsmWE.cjs';
14
- import './semantic-paint-CQEOC0Od.cjs';
15
- import './note-properties-CQlxjic_.cjs';
16
- import './custom-node-writes-Db8H6Z3n.cjs';
17
- import './hf-references-Dvk6De4Q.cjs';
18
- import './note-nodes-DL-Au22P.cjs';
19
- import './tree-store-CWOUMGN8.cjs';
20
- import './semantic-cell-selection-DT9x9WLf.cjs';
21
- import './tree-session-contract-ByWx8eew.cjs';
10
+ import './collaboration.cjs';
11
+ import './tree-package-fragment-BjZ3RWAS.cjs';
12
+ import './tree-store-DfZi7FqY.cjs';
13
+ import './collaboration/replication.cjs';
14
+ import './failure-BnGjoXf0.cjs';
15
+ import './semantic-records-5AOQJmLX.cjs';
16
+ import './omml-equation-CqQOt_dD.cjs';
17
+ import './semantic-paint-UHaj3sBY.cjs';
18
+ import './note-properties-BvGfHk5e.cjs';
19
+ import './custom-node-writes-CwkYRw3V.cjs';
20
+ import './semantic-cell-selection-C0OFD4D9.cjs';
21
+ import './tree-session-contract-BF2FVBOM.cjs';
22
+ import './document-properties-D6Ahr8D6.cjs';
22
23
  import 'prosemirror-model';