@docx-editor.dev/pro 2.26.0 → 2.28.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 (85) hide show
  1. package/dist/chunk-CNXDNDD3.js +1 -0
  2. package/dist/chunk-FD2KDBHX.cjs +1 -0
  3. package/dist/chunk-JRHEYVVY.cjs +1 -0
  4. package/dist/chunk-L567WP3J.js +5 -0
  5. package/dist/chunk-MJECUVHQ.cjs +5 -0
  6. package/dist/chunk-MWO2ZUEJ.js +1 -0
  7. package/dist/chunk-N34IUO36.cjs +1 -0
  8. package/dist/chunk-OT5R3IYV.cjs +1 -0
  9. package/dist/chunk-P2EF7WMV.js +1 -0
  10. package/dist/chunk-Q5JTCGJI.js +1 -0
  11. package/dist/chunk-SNQCYZLT.js +1 -0
  12. package/dist/chunk-ZSAAX6HV.cjs +1 -0
  13. package/dist/collaboration/hocuspocus.cjs +1 -1
  14. package/dist/collaboration/hocuspocus.d.cts +18 -11
  15. package/dist/collaboration/hocuspocus.d.ts +18 -11
  16. package/dist/collaboration/hocuspocus.js +1 -1
  17. package/dist/collaboration/index.cjs +2 -2
  18. package/dist/collaboration/index.d.cts +333 -18
  19. package/dist/collaboration/index.d.ts +333 -18
  20. package/dist/collaboration/index.js +2 -2
  21. package/dist/collaboration/webrtc.cjs +2 -2
  22. package/dist/collaboration/webrtc.d.cts +26 -3
  23. package/dist/collaboration/webrtc.d.ts +26 -3
  24. package/dist/collaboration/webrtc.js +2 -2
  25. package/dist/{collaboration-module-DlSv0oAd.d.cts → collaboration-module-DWn2heE1.d.cts} +1 -0
  26. package/dist/{collaboration-module-DlSv0oAd.d.ts → collaboration-module-DWn2heE1.d.ts} +1 -0
  27. package/dist/{define-custom-node-DA6UEXID.d.ts → define-custom-node-CNRQG1TI.d.cts} +14 -4
  28. package/dist/{define-custom-node-CkjSwcxy.d.cts → define-custom-node-D0c36PpZ.d.ts} +14 -4
  29. package/dist/document-session-3VC43WNI.cjs +1 -0
  30. package/dist/{document-session-BKKfJzKB.d.cts → document-session-Bxs4_GgX.d.ts} +55 -33
  31. package/dist/document-session-J2YKWERI.js +1 -0
  32. package/dist/{document-session-BQ4nBDTd.d.ts → document-session-_v9vqiSX.d.cts} +55 -33
  33. package/dist/document-session-options-CfKypp9c.d.cts +37 -0
  34. package/dist/document-session-options-DelOC7PX.d.ts +37 -0
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.d.cts +29 -4
  37. package/dist/index.d.ts +29 -4
  38. package/dist/index.js +1 -1
  39. package/dist/react/hocuspocus.cjs +1 -1
  40. package/dist/react/hocuspocus.d.cts +52 -8
  41. package/dist/react/hocuspocus.d.ts +52 -8
  42. package/dist/react/hocuspocus.js +1 -1
  43. package/dist/react/index.cjs +2 -2
  44. package/dist/react/index.d.cts +354 -156
  45. package/dist/react/index.d.ts +354 -156
  46. package/dist/react/index.js +2 -2
  47. package/dist/react/webrtc.cjs +1 -1
  48. package/dist/react/webrtc.d.cts +35 -7
  49. package/dist/react/webrtc.d.ts +35 -7
  50. package/dist/react/webrtc.js +1 -1
  51. package/dist/{session-okdqygLg.d.cts → types-6EmrEn4n.d.cts} +26 -4
  52. package/dist/{session-okdqygLg.d.ts → types-6EmrEn4n.d.ts} +26 -4
  53. package/dist/{session-B-ds4k64.d.cts → types-BQ1vBt5Q.d.cts} +32 -54
  54. package/dist/{session-B-ds4k64.d.ts → types-BQ1vBt5Q.d.ts} +32 -54
  55. package/dist/vue/hocuspocus.cjs +1 -1
  56. package/dist/vue/hocuspocus.d.cts +52 -7
  57. package/dist/vue/hocuspocus.d.ts +52 -7
  58. package/dist/vue/hocuspocus.js +1 -1
  59. package/dist/vue/index.cjs +2 -2
  60. package/dist/vue/index.d.cts +237 -24
  61. package/dist/vue/index.d.ts +237 -24
  62. package/dist/vue/index.js +2 -2
  63. package/dist/vue/webrtc.cjs +1 -1
  64. package/dist/vue/webrtc.d.cts +36 -6
  65. package/dist/vue/webrtc.d.ts +36 -6
  66. package/dist/vue/webrtc.js +1 -1
  67. package/package.json +4 -4
  68. package/dist/chunk-3JW4VNG5.js +0 -4
  69. package/dist/chunk-GDTCNTK7.cjs +0 -1
  70. package/dist/chunk-HJB77VBO.js +0 -1
  71. package/dist/chunk-JDLJS5RD.cjs +0 -4
  72. package/dist/chunk-MRW46GJW.js +0 -4
  73. package/dist/chunk-OMUXC73J.cjs +0 -1
  74. package/dist/chunk-PQNLQ2P2.js +0 -1
  75. package/dist/chunk-Q4YPX2DT.cjs +0 -1
  76. package/dist/chunk-VCMQFPO2.cjs +0 -4
  77. package/dist/chunk-W3V54DWZ.js +0 -1
  78. package/dist/document-session-6X24KXAM.js +0 -1
  79. package/dist/document-session-BDVKTCYX.js +0 -1
  80. package/dist/document-session-NECF3VT6.cjs +0 -1
  81. package/dist/document-session-RKQQLHEL.cjs +0 -1
  82. package/dist/hocuspocus-BCQPTL3M.cjs +0 -1
  83. package/dist/hocuspocus-QIIKEK6J.js +0 -1
  84. package/dist/webrtc-54VKWBFN.js +0 -2
  85. package/dist/webrtc-TIHZFB4K.cjs +0 -2
@@ -1,14 +1,26 @@
1
- import { EditorModule } from '@docx-editor.dev/core/editor';
1
+ /**
2
+ * Vue review rail — preset layout with {@link useReview} data wiring.
3
+ *
4
+ * Compound part overrides (`List`, `Card`, `Accept`, …) match the React export names and
5
+ * mount when passed as slots; the preset arrangement is the default when no slot overrides
6
+ * are supplied. Full `asChild` merge semantics follow the React ladder and are typed on
7
+ * each part export for hosts that replace individual pieces.
8
+ *
9
+ * @packageDocumentation
10
+ * @public
11
+ */
12
+ import { ReviewPaneOptions, EditorModule } from '@docx-editor.dev/core/editor';
13
+ export { CommentMarkerStyle, ResolvedReviewPane, ReviewPaneOpening, ReviewPaneOptions, ReviewPaneOverflow, RevisionDisplay } from '@docx-editor.dev/core/editor';
2
14
  import { EditorCollaborationSession, CollaborationStatus, CollaborationFailure, CollaborationParticipant, CollaborationIdentity, CollaborationRemoteSelection } from '@docx-editor.dev/core/collaboration';
3
15
  export { CollaborationFailure, CollaborationFailureCode, CollaborationIdentity, CollaborationParticipant, CollaborationRemoteSelection, CollaborationRemoteSelectionAddress, CollaborationSelectionKind, CollaborationStatus, CollaborationStatusSnapshot } from '@docx-editor.dev/core/collaboration';
4
16
  import * as vue_jsx_runtime from 'vue/jsx-runtime';
5
17
  import * as vue from 'vue';
6
18
  import { ComputedRef, Ref, VNode, MaybeRefOrGetter as MaybeRefOrGetter$1, PropType } from 'vue';
7
19
  import { ReviewItemPlacement, ReviewActivationOptions, ReviewItemQuery, Editor } from '@docx-editor.dev/core/contracts/editor';
8
- export { ReviewActivationOptions } from '@docx-editor.dev/core/contracts/editor';
20
+ export { ReviewActivationOptions, ReviewItemRevealEvent, ReviewItemRevealSource, ScrollPlacement } from '@docx-editor.dev/core/contracts/editor';
9
21
  import { MaybeRefOrGetter, ReviewAuthorInfo } from '@docx-editor.dev/vue';
10
- import { C as CollaborationSession, a as CollaborationBootstrap } from '../session-okdqygLg.js';
11
- export { b as CollaborationIdentityUpdate } from '../session-okdqygLg.js';
22
+ import { C as CollaborationSession, a as CollaborationBootstrap } from '../types-6EmrEn4n.js';
23
+ export { b as CollaborationIdentityUpdate } from '../types-6EmrEn4n.js';
12
24
  import * as Y from 'yjs';
13
25
  import { Awareness } from 'y-protocols/awareness';
14
26
 
@@ -42,12 +54,20 @@ interface ProLicenseOptions {
42
54
  */
43
55
 
44
56
  /**
45
- * How {@link reviewModule} is configured. Carries only the licence key today, so
46
- * `reviewModule()` with no argument is the ordinary call.
57
+ * How {@link reviewModule} is configured. Every field is optional, so `reviewModule()`
58
+ * with no argument is the ordinary call.
47
59
  *
48
60
  * @public
49
61
  */
50
62
  interface ReviewModuleOptions extends ProLicenseOptions {
63
+ /**
64
+ * The review pane settings the editor starts with. Change them later with
65
+ * `editor.setReviewPaneOptions()`, and read them from `snapshot.reviewPane`. Pass
66
+ * `{ opening: 'manual' }` when the host shows review items its own way, for example in
67
+ * balloons or margin markers, and opens the pane only on demand. An unknown field or
68
+ * value throws a `TypeError`.
69
+ */
70
+ readonly pane?: ReviewPaneOptions;
51
71
  }
52
72
  /** Build the review module. Construction never validates the key and never touches the network. */
53
73
  declare function reviewModule(options?: ReviewModuleOptions): EditorModule;
@@ -69,21 +89,68 @@ declare function reviewModule(options?: ReviewModuleOptions): EditorModule;
69
89
  * @public
70
90
  */
71
91
  interface CollaborationModuleOptions extends ProLicenseOptions {
92
+ /** The session from a collaboration factory. The editor attaches its document port to it. */
72
93
  readonly session: EditorCollaborationSession;
73
94
  }
74
95
  /** Build the collaboration module. Construction never validates the key and never touches the network. */
75
96
  declare function collaborationModule(options: CollaborationModuleOptions): EditorModule;
76
97
 
98
+ /**
99
+ * Who and when an adopted change records.
100
+ *
101
+ * @public
102
+ */
103
+ interface ReviewAdoptOptions {
104
+ /** The author to record. Defaults to the editor's `author`, the person reviewing. */
105
+ readonly author?: string;
106
+ /** The date to record. Omit it to keep each change's own date. */
107
+ readonly date?: Date;
108
+ }
109
+
77
110
  /** @public */
78
111
  type ReviewItemView = ReviewItemPlacement;
79
112
 
80
113
  /** @public */
81
114
  interface UseReviewReturn {
82
115
  readonly items: ComputedRef<readonly ReviewItemView[]>;
116
+ /** The CARET-ACTIVE item: the one the caret is in, or null. */
83
117
  readonly activeKey: ComputedRef<string | null>;
118
+ /**
119
+ * The key of the ACTIVATED item: the one `setActive`, Next Change, or Previous Change
120
+ * made active, while the caret stays in it. `null` when only a caret move made an item
121
+ * active. `activeKey` is the caret-active item instead: the one the caret is in,
122
+ * however it got there. The key follows this hook's query, so a paired replacement reports
123
+ * the pair's key under `pairReplacements: true`. The same value as the editor's
124
+ * `getActivatedReviewItemKey(query)`, read on every selection change.
125
+ */
126
+ readonly activatedKey: ComputedRef<string | null>;
127
+ /**
128
+ * Card to document: puts the caret at the start of the item and scrolls to it. Reports
129
+ * whether it landed.
130
+ *
131
+ * With `{ announce: true }`, a call that lands fires the editor's `reviewItemReveal` event
132
+ * with `source: 'host'`, also when the item was already active. The packaged review UI then
133
+ * opens the item's balloon, or opens a closed pane at its card when the pane's `opening`
134
+ * setting is `'auto'`. Without it, the call fires no event. A `null` key closes the card.
135
+ *
136
+ * @example
137
+ * ```ts
138
+ * const { setActive } = useReview();
139
+ * useEditorEvent('reviewItemReveal', ({ key, source }) => openMyCard(key, source));
140
+ * setActive(key); // fires nothing
141
+ * setActive(key, { announce: true }); // fires 'reviewItemReveal'
142
+ * ```
143
+ */
84
144
  readonly setActive: (key: string | null, options?: ReviewActivationOptions) => boolean;
85
145
  readonly accept: (item: ReviewItemView) => boolean;
86
146
  readonly reject: (item: ReviewItemView) => boolean;
147
+ /**
148
+ * Adopt tracked changes as the reviewer's own; they stay pending. Takes one item or a list,
149
+ * and ignores comment items. The default author is `DocxEditorConfig.author`. One undo
150
+ * step. Reports whether it landed: false when no revision was passed, when no author is
151
+ * known, or when the editor refuses the write.
152
+ */
153
+ readonly adopt: (items: ReviewItemView | readonly ReviewItemView[], options?: ReviewAdoptOptions) => boolean;
87
154
  readonly resolve: (item: ReviewItemView) => boolean;
88
155
  readonly reopen: (item: ReviewItemView) => boolean;
89
156
  readonly commentResolutionDisabledReason: ComputedRef<string | null>;
@@ -120,6 +187,22 @@ interface ReviewPartProps {
120
187
  interface ReviewActionProps extends ReviewPartProps {
121
188
  icon?: VNode | string;
122
189
  }
190
+ /**
191
+ * Props for `DocxEditorReview.Balloon`, the balloon that opens a review item at its text:
192
+ * each tracked change under `revisionsIn: 'balloons'`, and format and structural changes in
193
+ * every mode.
194
+ *
195
+ * @public
196
+ */
197
+ interface ReviewBalloonProps {
198
+ /** A class added to the balloon element. */
199
+ className?: string;
200
+ /**
201
+ * Remove the built-in balloon, for example to render your own. Format and structural
202
+ * change balloons go with it.
203
+ */
204
+ hidden?: boolean;
205
+ }
123
206
  /** @public */
124
207
  interface ReviewMarkersProps extends ReviewPartProps {
125
208
  scale?: number;
@@ -153,7 +236,8 @@ declare function useReviewItem(): ComputedRef<ReviewItemView | null>;
153
236
  /**
154
237
  * Returns the resolved color, slot, and declared style for one review author.
155
238
  *
156
- * The result updates when the author or revision style declarations change.
239
+ * The result updates when the author or revision style declarations change. Outside the
240
+ * review rail it reads the editor's author roster.
157
241
  *
158
242
  * @public
159
243
  */
@@ -772,8 +856,11 @@ type DocxEditorReviewNamespace = typeof DocxEditorReview;
772
856
 
773
857
  /** Reactive collaboration status for Vue hosts. @public */
774
858
  interface UseCollaborationStatusReturn {
859
+ /** Current lifecycle state, or `inactive` when no session is attached. */
775
860
  readonly status: Readonly<Ref<CollaborationStatus | 'inactive'>>;
861
+ /** Why the session holds `status`, or `undefined` when nothing is wrong. */
776
862
  readonly reason: Readonly<Ref<CollaborationFailure | undefined>>;
863
+ /** The most recent `error` reason. Kept after the session recovers. */
777
864
  readonly lastFailure: Readonly<Ref<CollaborationFailure | undefined>>;
778
865
  /**
779
866
  * Edits made now reach the room.
@@ -786,11 +873,28 @@ interface UseCollaborationStatusReturn {
786
873
  /**
787
874
  * This replica no longer agrees with the room, and waiting will not fix it.
788
875
  *
789
- * `error` and `destroyed`. The replica refused an update and kept the copy it had, so it is
790
- * now editing a document the others do not have. The way out is `rejoin`, not time — which
791
- * is why this is separate from "not live" rather than folded into it.
876
+ * `destroyed`, or an `error` that is not `recovering`. The replica refused an update and
877
+ * kept the copy it had, so it is now editing a document the others do not have. The way
878
+ * out is `rejoin`, not time — which is why this is separate from "not live" rather than
879
+ * folded into it.
792
880
  */
793
881
  readonly diverged: ComputedRef<boolean>;
882
+ /**
883
+ * The session is in `error` but heals by itself on the next clean update: show a passing
884
+ * notice, not a rejoin action.
885
+ */
886
+ readonly recovering: Readonly<Ref<boolean>>;
887
+ /**
888
+ * Edits wait for the room: an update arrived that depends on one still on its way. The
889
+ * editor refuses edits until it arrives or the wait times out.
890
+ */
891
+ readonly waiting: Readonly<Ref<boolean>>;
892
+ /**
893
+ * How many failures the session has recorded. It changes with each new failure, also when
894
+ * `lastFailure` repeats the same code, so a host can tell a user each time an edit is
895
+ * refused.
896
+ */
897
+ readonly failureCount: Readonly<Ref<number>>;
794
898
  /**
795
899
  * An editor has attached its document port to this replica.
796
900
  *
@@ -812,6 +916,7 @@ declare function useCollaborationStatus(session?: MaybeRefOrGetter$1<Collaborati
812
916
 
813
917
  /** Reactive participant roster for Vue hosts. @public */
814
918
  interface UseCollaborationParticipantsReturn {
919
+ /** Everyone in the room, this participant included, in a stable order. */
815
920
  readonly participants: Readonly<Ref<readonly CollaborationParticipant[]>>;
816
921
  }
817
922
  /**
@@ -855,8 +960,11 @@ declare function useCollaborationSession(): UseCollaborationSessionReturn;
855
960
  * @public
856
961
  */
857
962
  interface CollaborationRootSource {
963
+ /** The document bytes to mount, or null while none is ready. */
858
964
  readonly document: Uint8Array | null;
965
+ /** The editor modules to register, the collaboration module among them. */
859
966
  readonly modules: readonly EditorModule[];
967
+ /** The collaboration session, or null while none is connected. */
860
968
  readonly session: CollaborationSession | null;
861
969
  }
862
970
  /**
@@ -913,15 +1021,6 @@ declare const DocxEditorCollaborationRoot: vue.DefineComponent<vue.ExtractPropTy
913
1021
  };
914
1022
  }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
915
1023
 
916
- /**
917
- * Full-document collaboration over the canonical primitive journal.
918
- *
919
- * Local direction: the canonical store commits, emits ONE journal, and the journal is applied
920
- * to shared state in one Yjs transaction. Remote direction: a shared-state change materializes
921
- * one canonical package, which the port publishes as one revision. The two never chase each
922
- * other, because a remote publication deliberately emits no journal.
923
- */
924
-
925
1024
  /**
926
1025
  * Options for one full-document collaboration replica.
927
1026
  *
@@ -929,20 +1028,26 @@ declare const DocxEditorCollaborationRoot: vue.DefineComponent<vue.ExtractPropTy
929
1028
  * @public
930
1029
  */
931
1030
  interface CreateDocumentCollaborationOptions {
1031
+ /** The room's Yjs document. Connect its provider before a `join` bootstrap. */
932
1032
  readonly ydoc: Y.Doc;
1033
+ /** Presence channel for participants and remote selections, from `y-protocols/awareness`. */
933
1034
  readonly awareness: Awareness;
1035
+ /** The room's document id, 1 to 256 characters. A room seeded with another id refuses. */
934
1036
  readonly documentId: string;
935
1037
  /** Unique attachment identity. Omit it to generate a new identity for this session. */
936
1038
  readonly sessionId?: string;
1039
+ /** The local participant. Recorded as the author of this replica's changes. */
937
1040
  readonly identity: CollaborationIdentity;
1041
+ /** Whether to seed the room, join it, or let the peers decide. */
938
1042
  readonly bootstrap: CollaborationBootstrap;
939
1043
  /**
940
1044
  * Admit local edits while the transport is `disconnected`.
941
1045
  *
942
1046
  * A journal applies to the local `Y.Doc` either way, so buffered offline edits merge on
943
- * reconnect exactly as concurrent online edits do. Off by default: a host that shows no
944
- * offline indicator would let users type into a document no peer receives yet. `error`
945
- * stays terminal and `initializing` stays refused regardless of this option.
1047
+ * reconnect exactly as concurrent online edits do. On by default, as in other Yjs editors:
1048
+ * a dropped connection should not stop anyone typing. Show the `disconnected` status so
1049
+ * users know their edits have not reached the room yet. Pass `false` to pause editing
1050
+ * while disconnected. `error` and `initializing` refuse edits regardless of this option.
946
1051
  */
947
1052
  readonly offlineEditing?: boolean;
948
1053
  }
@@ -965,15 +1070,22 @@ interface UseDocumentCollaborationOptions {
965
1070
  /**
966
1071
  * Connect this room when the composable starts. Omit it and call
967
1072
  * {@link UseDocumentCollaborationReturn.connect} after the host has a `ydoc` and a room.
1073
+ * A different room, server, bootstrap kind, or `actorId` leaves the old room and
1074
+ * connects the new one, and `null` leaves. A room opened with `connect` stays.
968
1075
  */
969
1076
  readonly room?: UseDocumentCollaborationConnectOptions | null;
970
1077
  }
971
1078
  /** Values {@link useDocumentCollaboration} returns. @public */
972
1079
  interface UseDocumentCollaborationReturn {
1080
+ /** The room's document as `.docx` bytes to mount. Null until the room is ready. */
973
1081
  readonly document: Readonly<Ref<Uint8Array | null>>;
1082
+ /** Modules to pass to the editor. They include the collaboration module once ready. */
974
1083
  readonly modules: Readonly<Ref<readonly EditorModule[]>>;
1084
+ /** The live session for status and presence. Null while no room is connected. */
975
1085
  readonly session: Readonly<Ref<CollaborationSession | null>>;
1086
+ /** True while a connect is in progress. */
976
1087
  readonly pending: Readonly<Ref<boolean>>;
1088
+ /** The connect failure or session failure, or null. Check it before `document`. */
977
1089
  readonly error: Readonly<Ref<CollaborationFailure | null>>;
978
1090
  /**
979
1091
  * Connect a room. RESOLVES with the failure, or null on success — it does not reject.
@@ -1056,6 +1168,7 @@ interface CollaborationCaretLabelsProps {
1056
1168
  }
1057
1169
  /** Render props for {@link DocxEditorCollaboration}.Avatars' per-participant override. @public */
1058
1170
  interface CollaborationAvatarRenderProps {
1171
+ /** The participant this avatar shows. */
1059
1172
  readonly participant: CollaborationParticipant;
1060
1173
  /** The resolved accent — published colour, or the review roster's colour for the name. */
1061
1174
  readonly color: string;
@@ -1073,13 +1186,16 @@ interface CollaborationAvatarsProps {
1073
1186
  readonly session?: CollaborationSession | null;
1074
1187
  /** Avatars shown before the rest collapse into one "+N" chip. Omit to show everyone. */
1075
1188
  readonly max?: number;
1189
+ /** Classes added to the part's root element. */
1076
1190
  readonly className?: string;
1077
1191
  /** Scoped slot: `#default="{ participant, color, initials, avatarUrl }"` replaces the disc. */
1078
1192
  readonly children?: (props: CollaborationAvatarRenderProps) => VNode | VNode[];
1079
1193
  }
1080
1194
  /** Props for {@link DocxEditorCollaboration}.Avatar. @public */
1081
1195
  interface CollaborationAvatarProps {
1196
+ /** The participant to show. */
1082
1197
  readonly participant: CollaborationParticipant;
1198
+ /** Classes added to the part's root element. */
1083
1199
  readonly className?: string;
1084
1200
  /** Default slot: replaces the initials inside the disc; the accent background stays. */
1085
1201
  readonly children?: VNode | VNode[];
@@ -1092,6 +1208,7 @@ interface CollaborationAvatarProps {
1092
1208
  * @example
1093
1209
  * ```html
1094
1210
  * <DocxEditorCollaboration.Avatars :session="session" :max="4" />
1211
+ * <DocxEditorCollaboration.Status :session="session" :on-rejoin="rejoin" />
1095
1212
  * <DocxEditorCollaboration.CaretLabels :session="session" v-slot="{ selection, color }">
1096
1213
  * <MyLabel :name="selection.name" :color="color" />
1097
1214
  * </DocxEditorCollaboration.CaretLabels>
@@ -1174,10 +1291,102 @@ declare const DocxEditorCollaboration: {
1174
1291
  }>> & Readonly<{}>, {
1175
1292
  className: string;
1176
1293
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1294
+ /** The room's state in one line, shown only when the user needs to know. */
1295
+ Status: vue.DefineComponent<vue.ExtractPropTypes<{
1296
+ session: {
1297
+ type: PropType<CollaborationSession | null>;
1298
+ default: undefined;
1299
+ };
1300
+ onRejoin: {
1301
+ type: PropType<() => void>;
1302
+ default: undefined;
1303
+ };
1304
+ className: {
1305
+ type: StringConstructor;
1306
+ default: undefined;
1307
+ };
1308
+ }>, () => VNode<vue.RendererNode, vue.RendererElement, {
1309
+ [key: string]: any;
1310
+ }> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
1311
+ session: {
1312
+ type: PropType<CollaborationSession | null>;
1313
+ default: undefined;
1314
+ };
1315
+ onRejoin: {
1316
+ type: PropType<() => void>;
1317
+ default: undefined;
1318
+ };
1319
+ className: {
1320
+ type: StringConstructor;
1321
+ default: undefined;
1322
+ };
1323
+ }>> & Readonly<{}>, {
1324
+ session: CollaborationSession | null;
1325
+ onRejoin: () => void;
1326
+ className: string;
1327
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1177
1328
  };
1178
- /** @public */
1329
+ /** The collaboration presence compound: its parts, by name. @public */
1179
1330
  type DocxEditorCollaborationNamespace = typeof DocxEditorCollaboration;
1180
1331
 
1332
+ /**
1333
+ * What the collaboration status part tells the user, from the session's status snapshot.
1334
+ * Shared by the React and Vue parts so the two say the same thing.
1335
+ */
1336
+
1337
+ /**
1338
+ * The notice the status part shows, or none while everything is in order.
1339
+ *
1340
+ * - `connecting`: the session is joining the room.
1341
+ * - `offline`: the transport is down and edits continue; they sync on reconnect.
1342
+ * - `offlinePaused`: the transport is down and the session refuses edits until reconnect
1343
+ * (`offlineEditing: false`).
1344
+ * - `syncing`: the session hit an update it could not apply yet and heals on the next one.
1345
+ * - `waiting`: edits wait until an update the room sent can apply.
1346
+ * - `stalled`: edits have waited longer than `STALLED_AFTER_MS`; rejoining loads the room.
1347
+ * - `editRefused`: the room refused the last edit, and the editor undid it.
1348
+ * - `outOfSync`: this copy no longer agrees with the room; rejoining loads the room's copy.
1349
+ * - `upgradeRequired`: this client and the room use different collaboration formats, and either
1350
+ * side can be the older one. A rejoin cannot fix it; an upgrade of the older side can.
1351
+ * - `newRoomRequired`: the room itself cannot continue (two seeds merged, a damaged blob, or
1352
+ * a resource limit); a rejoin cannot fix it. Save a copy and share it in a new room.
1353
+ *
1354
+ * @public
1355
+ */
1356
+ type CollaborationNoticeKind = 'connecting' | 'offline' | 'offlinePaused' | 'syncing' | 'waiting' | 'stalled' | 'editRefused' | 'outOfSync' | 'upgradeRequired' | 'newRoomRequired';
1357
+
1358
+ /** What the {@link DocxEditorCollaboration}.Status default slot renders with. @public */
1359
+ interface CollaborationStatusNoticeRenderProps {
1360
+ /** Which notice to show. */
1361
+ readonly kind: CollaborationNoticeKind;
1362
+ /** The packaged message for `kind`, in the editor's language. */
1363
+ readonly message: string;
1364
+ /** Emits `rejoin`; present for `outOfSync` and `stalled` when the part has a listener. */
1365
+ readonly rejoin?: () => void;
1366
+ }
1367
+ /**
1368
+ * Props for {@link DocxEditorCollaboration}.Status. The default slot,
1369
+ * `#default="{ kind, message, rejoin }"`, replaces the packaged notice.
1370
+ *
1371
+ * @public
1372
+ */
1373
+ interface CollaborationStatusNoticeProps {
1374
+ /**
1375
+ * The session to report on. Omit it and the part uses the one the editor above holds;
1376
+ * `null` renders nothing.
1377
+ */
1378
+ readonly session?: CollaborationSession | null;
1379
+ /**
1380
+ * The `rejoin` event: the part's "Rejoin" button when this copy is out of sync, or when
1381
+ * edits have waited too long for the room. Listen with
1382
+ * `@rejoin`, save the editor, and pass the bytes to your provider composable's `rejoin`.
1383
+ * Without a listener the part shows the message only.
1384
+ */
1385
+ readonly onRejoin?: () => void;
1386
+ /** Classes added to the notice region. */
1387
+ readonly className?: string;
1388
+ }
1389
+
1181
1390
  /**
1182
1391
  * The Standard Schema interface, vendored.
1183
1392
  *
@@ -1311,6 +1520,8 @@ interface CustomNodeDefinition<Schema extends StandardSchemaV1 | undefined = any
1311
1520
  /**
1312
1521
  * Contribute a card to the review sidebar for every recognized node of this
1313
1522
  * definition, anchored at the node's range. Return null to skip one node.
1523
+ * Without this hook the node has no card: it never becomes the active review
1524
+ * item, so placing the cursor inside it shows no active highlight.
1314
1525
  *
1315
1526
  * `attrs` and `text` originate in the file — untrusted; the returned strings
1316
1527
  * are rendered as TEXT by the pane, never markup. The context-menu section
@@ -1479,6 +1690,8 @@ declare const CustomNodeChrome: {
1479
1690
  };
1480
1691
  };
1481
1692
 
1693
+ /** @jsxImportSource vue */
1694
+
1482
1695
  /** Props for the custom-node context-menu section. @public */
1483
1696
  interface CustomNodeContextMenuProps {
1484
1697
  /** Definitions to offer. Defaults to definitions registered on the editor. */
@@ -1518,4 +1731,4 @@ declare function activatedCustomNodeOf(resolved: ResolvedCustomNodeActivation, e
1518
1731
  declare function resolveCustomNodeActivation(target: EventTarget | null, nodes: readonly AnyCustomNodeDefinition[]): ResolvedCustomNodeActivation | null;
1519
1732
 
1520
1733
  export { CollaborationBootstrap, CollaborationSession, CustomNodeChrome, CustomNodeContextMenu, DocxEditorCollaboration, DocxEditorCollaborationRoot, DocxEditorReview, activatedCustomNodeOf, collaborationModule, resolveCustomNodeActivation, reviewModule, useCollaborationParticipants, useCollaborationSession, useCollaborationStatus, useCustomNodeDefinitions, useDocumentCollaboration, useReview, useReviewAuthor, useReviewItem, useReviewOf, useStackedReviewPositions };
1521
- export type { CollaborationAvatarProps, CollaborationAvatarRenderProps, CollaborationAvatarsProps, CollaborationCaretLabelRenderProps, CollaborationCaretLabelsProps, CollaborationModuleOptions, CollaborationRootSource, CreateDocumentCollaborationOptions, CustomNodeChromeProps, CustomNodeContextMenuProps, DocxEditorCollaborationNamespace, DocxEditorCollaborationRootProps, DocxEditorReviewNamespace, ProLicenseOptions, ResolvedCustomNodeActivation, ReviewActionProps, ReviewItemView, ReviewMarkersProps, ReviewModuleOptions, ReviewPartProps, ReviewProps, UseCollaborationParticipantsReturn, UseCollaborationSessionReturn, UseCollaborationStatusReturn, UseDocumentCollaborationConnectOptions, UseDocumentCollaborationOptions, UseDocumentCollaborationReturn, UseReviewReturn };
1734
+ export type { CollaborationAvatarProps, CollaborationAvatarRenderProps, CollaborationAvatarsProps, CollaborationCaretLabelRenderProps, CollaborationCaretLabelsProps, CollaborationModuleOptions, CollaborationNoticeKind, CollaborationRootSource, CollaborationStatusNoticeProps, CollaborationStatusNoticeRenderProps, CreateDocumentCollaborationOptions, CustomNodeChromeProps, CustomNodeContextMenuProps, DocxEditorCollaborationNamespace, DocxEditorCollaborationRootProps, DocxEditorReviewNamespace, ProLicenseOptions, ResolvedCustomNodeActivation, ReviewActionProps, ReviewAdoptOptions, ReviewBalloonProps, ReviewItemView, ReviewMarkersProps, ReviewModuleOptions, ReviewPartProps, ReviewProps, UseCollaborationParticipantsReturn, UseCollaborationSessionReturn, UseCollaborationStatusReturn, UseDocumentCollaborationConnectOptions, UseDocumentCollaborationOptions, UseDocumentCollaborationReturn, UseReviewReturn };