@arbidocs/blocks 0.4.155 → 0.4.156

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 (105) hide show
  1. package/dist/{ConnectedNativeDocxComparison-OLWRQSRS.js → ConnectedNativeDocxComparison-2PLOOXSH.js} +7 -7
  2. package/dist/{ConnectedNativeDocxComparison-OLWRQSRS.js.map → ConnectedNativeDocxComparison-2PLOOXSH.js.map} +1 -1
  3. package/dist/{ConnectedNativeDocxComparison-YORMOPPN.cjs → ConnectedNativeDocxComparison-S25BPUH5.cjs} +8 -8
  4. package/dist/{ConnectedNativeDocxComparison-YORMOPPN.cjs.map → ConnectedNativeDocxComparison-S25BPUH5.cjs.map} +1 -1
  5. package/dist/{ConnectedNativeDocxEditor-34EBIIFS.js → ConnectedNativeDocxEditor-JJAGMHZC.js} +5 -5
  6. package/dist/{ConnectedNativeDocxEditor-34EBIIFS.js.map → ConnectedNativeDocxEditor-JJAGMHZC.js.map} +1 -1
  7. package/dist/{ConnectedNativeDocxEditor-EHTWGGX3.cjs → ConnectedNativeDocxEditor-YA4HWLY4.cjs} +7 -7
  8. package/dist/{ConnectedNativeDocxEditor-EHTWGGX3.cjs.map → ConnectedNativeDocxEditor-YA4HWLY4.cjs.map} +1 -1
  9. package/dist/{ConnectedStreamedWordArtifact-5DK6QGYN.cjs → ConnectedStreamedWordArtifact-EXYZAU4Y.cjs} +8 -8
  10. package/dist/ConnectedStreamedWordArtifact-EXYZAU4Y.cjs.map +1 -0
  11. package/dist/{ConnectedStreamedWordArtifact-GLIDLSAS.js → ConnectedStreamedWordArtifact-YAAXY5KY.js} +7 -7
  12. package/dist/{ConnectedStreamedWordArtifact-GLIDLSAS.js.map → ConnectedStreamedWordArtifact-YAAXY5KY.js.map} +1 -1
  13. package/dist/{NativeDocxEditor-XT5ZLFGU.js → NativeDocxEditor-JBQMH3MP.js} +3 -3
  14. package/dist/{NativeDocxEditor-XT5ZLFGU.js.map → NativeDocxEditor-JBQMH3MP.js.map} +1 -1
  15. package/dist/{NativeDocxEditor-5VBNM5I7.cjs → NativeDocxEditor-M3I776GD.cjs} +7 -7
  16. package/dist/{NativeDocxEditor-5VBNM5I7.cjs.map → NativeDocxEditor-M3I776GD.cjs.map} +1 -1
  17. package/dist/agents/index.cjs +238 -238
  18. package/dist/agents/index.js +4 -4
  19. package/dist/chat/index.cjs +1 -1
  20. package/dist/chat/index.js +1 -1
  21. package/dist/{chunk-MF5KQ4PS.js → chunk-2CWM2CFZ.js} +4 -4
  22. package/dist/{chunk-MF5KQ4PS.js.map → chunk-2CWM2CFZ.js.map} +1 -1
  23. package/dist/{chunk-QKR5LWDO.js → chunk-6HG56GCT.js} +4 -4
  24. package/dist/{chunk-QKR5LWDO.js.map → chunk-6HG56GCT.js.map} +1 -1
  25. package/dist/{chunk-KHXEIEXN.js → chunk-7IRSCMNK.js} +3 -3
  26. package/dist/{chunk-KHXEIEXN.js.map → chunk-7IRSCMNK.js.map} +1 -1
  27. package/dist/{chunk-TZOQKV64.js → chunk-EWCJXUBP.js} +3 -3
  28. package/dist/{chunk-TZOQKV64.js.map → chunk-EWCJXUBP.js.map} +1 -1
  29. package/dist/{chunk-CU6LDQ57.js → chunk-F3EZDBDJ.js} +4 -4
  30. package/dist/{chunk-CU6LDQ57.js.map → chunk-F3EZDBDJ.js.map} +1 -1
  31. package/dist/{chunk-YF3QUHKN.cjs → chunk-FEGXFABZ.cjs} +3 -3
  32. package/dist/{chunk-YF3QUHKN.cjs.map → chunk-FEGXFABZ.cjs.map} +1 -1
  33. package/dist/{chunk-GC2FSPSQ.cjs → chunk-HDJRSCRE.cjs} +6 -6
  34. package/dist/{chunk-GC2FSPSQ.cjs.map → chunk-HDJRSCRE.cjs.map} +1 -1
  35. package/dist/{chunk-CQCNU5KT.cjs → chunk-IJEISII2.cjs} +6 -6
  36. package/dist/{chunk-CQCNU5KT.cjs.map → chunk-IJEISII2.cjs.map} +1 -1
  37. package/dist/{chunk-NPR5BGFF.cjs → chunk-JSQEAPTC.cjs} +26 -14
  38. package/dist/chunk-JSQEAPTC.cjs.map +1 -0
  39. package/dist/{chunk-6QAAIDQQ.cjs → chunk-O3FB62T5.cjs} +47 -47
  40. package/dist/{chunk-6QAAIDQQ.cjs.map → chunk-O3FB62T5.cjs.map} +1 -1
  41. package/dist/{chunk-265GOG4W.js → chunk-ONTUMV74.js} +26 -14
  42. package/dist/chunk-ONTUMV74.js.map +1 -0
  43. package/dist/chunk-OTU5KGQ6.cjs +18 -0
  44. package/dist/{chunk-HUATKA3M.cjs.map → chunk-OTU5KGQ6.cjs.map} +1 -1
  45. package/dist/{chunk-GO3BN76C.js → chunk-PGOSIJ2I.js} +3 -3
  46. package/dist/{chunk-GO3BN76C.js.map → chunk-PGOSIJ2I.js.map} +1 -1
  47. package/dist/chunk-S74QMZVZ.cjs +18 -0
  48. package/dist/{chunk-C3SMTA3C.cjs.map → chunk-S74QMZVZ.cjs.map} +1 -1
  49. package/dist/{chunk-KUT2Y7JF.cjs → chunk-TQIY2SVY.cjs} +5 -5
  50. package/dist/{chunk-KUT2Y7JF.cjs.map → chunk-TQIY2SVY.cjs.map} +1 -1
  51. package/dist/{chunk-MNG7N6M2.js → chunk-UKCCV63X.js} +4 -4
  52. package/dist/{chunk-MNG7N6M2.js.map → chunk-UKCCV63X.js.map} +1 -1
  53. package/dist/{chunk-B3FMUFAW.cjs → chunk-UKT3WH5Z.cjs} +3 -3
  54. package/dist/{chunk-B3FMUFAW.cjs.map → chunk-UKT3WH5Z.cjs.map} +1 -1
  55. package/dist/{chunk-P6RIBIVN.js → chunk-UPMADXDU.js} +3 -3
  56. package/dist/{chunk-P6RIBIVN.js.map → chunk-UPMADXDU.js.map} +1 -1
  57. package/dist/{chunk-757OYF6G.cjs → chunk-VY4UFXTM.cjs} +4 -4
  58. package/dist/{chunk-757OYF6G.cjs.map → chunk-VY4UFXTM.cjs.map} +1 -1
  59. package/dist/{chunk-WU34CHU5.js → chunk-YMQDDUKW.js} +3 -3
  60. package/dist/{chunk-WU34CHU5.js.map → chunk-YMQDDUKW.js.map} +1 -1
  61. package/dist/connect/docx.cjs +11 -11
  62. package/dist/connect/docx.js +7 -7
  63. package/dist/connect/index.cjs +137 -137
  64. package/dist/connect/index.js +16 -16
  65. package/dist/connect/viewer.cjs +10 -10
  66. package/dist/connect/viewer.js +10 -10
  67. package/dist/document-tools/index.cjs +1 -1
  68. package/dist/document-tools/index.js +1 -1
  69. package/dist/docx/index.cjs +47 -47
  70. package/dist/docx/index.js +3 -3
  71. package/dist/facts/index.cjs +54 -54
  72. package/dist/facts/index.js +4 -4
  73. package/dist/index.cjs +347 -347
  74. package/dist/index.js +8 -8
  75. package/dist/studio/index.cjs +1 -1
  76. package/dist/studio/index.js +1 -1
  77. package/dist/workflow-canvas/index.cjs +16 -16
  78. package/dist/workflow-canvas/index.js +4 -4
  79. package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs +96 -29
  80. package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs.map +1 -1
  81. package/node_modules/@arbidocs/coedit/dist/hocuspocus.d.cts +1 -1
  82. package/node_modules/@arbidocs/coedit/dist/hocuspocus.d.ts +1 -1
  83. package/node_modules/@arbidocs/coedit/dist/hocuspocus.js +98 -31
  84. package/node_modules/@arbidocs/coedit/dist/hocuspocus.js.map +1 -1
  85. package/node_modules/@arbidocs/coedit/dist/index.cjs +96 -29
  86. package/node_modules/@arbidocs/coedit/dist/index.cjs.map +1 -1
  87. package/node_modules/@arbidocs/coedit/dist/index.d.cts +1 -1
  88. package/node_modules/@arbidocs/coedit/dist/index.d.ts +1 -1
  89. package/node_modules/@arbidocs/coedit/dist/index.js +98 -31
  90. package/node_modules/@arbidocs/coedit/dist/index.js.map +1 -1
  91. package/node_modules/@arbidocs/coedit/dist/server.cjs +98 -33
  92. package/node_modules/@arbidocs/coedit/dist/server.cjs.map +1 -1
  93. package/node_modules/@arbidocs/coedit/dist/server.d.cts +1 -1
  94. package/node_modules/@arbidocs/coedit/dist/server.d.ts +1 -1
  95. package/node_modules/@arbidocs/coedit/dist/server.js +99 -34
  96. package/node_modules/@arbidocs/coedit/dist/server.js.map +1 -1
  97. package/node_modules/@arbidocs/coedit/dist/{session-Cf9iu1Vt.d.cts → session-WGvWs6yO.d.cts} +22 -4
  98. package/node_modules/@arbidocs/coedit/dist/{session-Cf9iu1Vt.d.ts → session-WGvWs6yO.d.ts} +22 -4
  99. package/node_modules/@arbidocs/coedit/package.json +1 -1
  100. package/package.json +5 -5
  101. package/dist/ConnectedStreamedWordArtifact-5DK6QGYN.cjs.map +0 -1
  102. package/dist/chunk-265GOG4W.js.map +0 -1
  103. package/dist/chunk-C3SMTA3C.cjs +0 -18
  104. package/dist/chunk-HUATKA3M.cjs +0 -18
  105. package/dist/chunk-NPR5BGFF.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import * as Y from 'yjs';
2
2
  import { Awareness } from 'y-protocols/awareness';
3
- import { CollaborationFailureCode, EditorCollaborationSession, CollaborationIdentity, CollaborationStatus, CollaborationStatusSnapshot, CollaborationLocalSelection, CollaborationParticipant, CollaborationRemoteSelection } from '@docx-editor.dev/core/collaboration';
3
+ import { CollaborationFailureCode, EditorCollaborationSession, CollaborationIdentity, CollaborationStatus, CollaborationStatusSnapshot, CollaborationLocalSelection, CollaborationSelectionMove, CollaborationParticipant, CollaborationRemoteSelection } from '@docx-editor.dev/core/collaboration';
4
4
  import { CollaborationDocumentPort } from '@docx-editor.dev/core/collaboration/replication';
5
5
 
6
6
  /**
@@ -19,8 +19,6 @@ interface DocxCollaborationSessionOptions {
19
19
  identity: CollaborationIdentity;
20
20
  /** Keep accepting edits while the transport is down; they merge on reconnect. */
21
21
  offlineEditing?: boolean;
22
- /** See `MirrorSyncOptions.remoteDelayMs`. */
23
- remoteDelayMs?: number;
24
22
  }
25
23
  declare class CollaborationSessionError extends Error {
26
24
  readonly code: CollaborationFailureCode;
@@ -34,7 +32,6 @@ declare class DocxCollaborationSession implements EditorCollaborationSession {
34
32
  private readonly doc;
35
33
  private readonly awareness;
36
34
  private readonly offlineEditing;
37
- private readonly remoteDelayMs;
38
35
  private readonly tracker;
39
36
  private readonly statusListeners;
40
37
  private readonly participantListeners;
@@ -47,6 +44,10 @@ declare class DocxCollaborationSession implements EditorCollaborationSession {
47
44
  private selectionsCache;
48
45
  private selectionsKey;
49
46
  private baselineVector;
47
+ /** The selection the editor last published, carried across the remote changes since. */
48
+ private carried;
49
+ private selectionMove;
50
+ private inputFlush;
50
51
  private readonly disposers;
51
52
  constructor(options: DocxCollaborationSessionOptions);
52
53
  status(): CollaborationStatus;
@@ -64,11 +65,28 @@ declare class DocxCollaborationSession implements EditorCollaborationSession {
64
65
  attach(port: CollaborationDocumentPort): () => void;
65
66
  /** Transport hook: call before integrating inbound Yjs data so queued local edits are mirrored first. */
66
67
  beforeRemote(): void;
68
+ /**
69
+ * Bind the editor's pending-input flush (`PaginatedSurface.flushPendingInput`). The session writes
70
+ * below the editor's input buffer, so it lands queued typing before a remote change and lays the
71
+ * change out right after it: the editor carries its caret at that layout, and a keystroke before
72
+ * it would otherwise use the caret from before the change. Returns the unbind function.
73
+ */
74
+ bindEditorInput(flush: () => void): () => void;
67
75
  canUndo(): boolean;
68
76
  canRedo(): boolean;
69
77
  undo(): boolean;
70
78
  redo(): boolean;
71
79
  setLocalSelection(selection: CollaborationLocalSelection | null): void;
80
+ /** Where the last remote change carried the local selection; see `carrySelection`. */
81
+ remoteSelectionMove(): CollaborationSelectionMove | null;
82
+ /**
83
+ * Called before a remote change reaches the port: notes the selection's paragraphs and their text,
84
+ * and returns what carries it across the change once the port holds the new tree. The editor
85
+ * takes the carried selection when a local edit was coalesced with the remote change, where it
86
+ * cannot map its caret by the text alone. Several remote changes before the editor publishes its
87
+ * selection again chain, all from the selection it published.
88
+ */
89
+ private carrySelection;
72
90
  participants(): readonly CollaborationParticipant[];
73
91
  subscribeParticipants(listener: (participants: readonly CollaborationParticipant[]) => void): () => void;
74
92
  remoteSelections(): readonly CollaborationRemoteSelection[];
@@ -1,6 +1,6 @@
1
1
  import * as Y from 'yjs';
2
2
  import { Awareness } from 'y-protocols/awareness';
3
- import { CollaborationFailureCode, EditorCollaborationSession, CollaborationIdentity, CollaborationStatus, CollaborationStatusSnapshot, CollaborationLocalSelection, CollaborationParticipant, CollaborationRemoteSelection } from '@docx-editor.dev/core/collaboration';
3
+ import { CollaborationFailureCode, EditorCollaborationSession, CollaborationIdentity, CollaborationStatus, CollaborationStatusSnapshot, CollaborationLocalSelection, CollaborationSelectionMove, CollaborationParticipant, CollaborationRemoteSelection } from '@docx-editor.dev/core/collaboration';
4
4
  import { CollaborationDocumentPort } from '@docx-editor.dev/core/collaboration/replication';
5
5
 
6
6
  /**
@@ -19,8 +19,6 @@ interface DocxCollaborationSessionOptions {
19
19
  identity: CollaborationIdentity;
20
20
  /** Keep accepting edits while the transport is down; they merge on reconnect. */
21
21
  offlineEditing?: boolean;
22
- /** See `MirrorSyncOptions.remoteDelayMs`. */
23
- remoteDelayMs?: number;
24
22
  }
25
23
  declare class CollaborationSessionError extends Error {
26
24
  readonly code: CollaborationFailureCode;
@@ -34,7 +32,6 @@ declare class DocxCollaborationSession implements EditorCollaborationSession {
34
32
  private readonly doc;
35
33
  private readonly awareness;
36
34
  private readonly offlineEditing;
37
- private readonly remoteDelayMs;
38
35
  private readonly tracker;
39
36
  private readonly statusListeners;
40
37
  private readonly participantListeners;
@@ -47,6 +44,10 @@ declare class DocxCollaborationSession implements EditorCollaborationSession {
47
44
  private selectionsCache;
48
45
  private selectionsKey;
49
46
  private baselineVector;
47
+ /** The selection the editor last published, carried across the remote changes since. */
48
+ private carried;
49
+ private selectionMove;
50
+ private inputFlush;
50
51
  private readonly disposers;
51
52
  constructor(options: DocxCollaborationSessionOptions);
52
53
  status(): CollaborationStatus;
@@ -64,11 +65,28 @@ declare class DocxCollaborationSession implements EditorCollaborationSession {
64
65
  attach(port: CollaborationDocumentPort): () => void;
65
66
  /** Transport hook: call before integrating inbound Yjs data so queued local edits are mirrored first. */
66
67
  beforeRemote(): void;
68
+ /**
69
+ * Bind the editor's pending-input flush (`PaginatedSurface.flushPendingInput`). The session writes
70
+ * below the editor's input buffer, so it lands queued typing before a remote change and lays the
71
+ * change out right after it: the editor carries its caret at that layout, and a keystroke before
72
+ * it would otherwise use the caret from before the change. Returns the unbind function.
73
+ */
74
+ bindEditorInput(flush: () => void): () => void;
67
75
  canUndo(): boolean;
68
76
  canRedo(): boolean;
69
77
  undo(): boolean;
70
78
  redo(): boolean;
71
79
  setLocalSelection(selection: CollaborationLocalSelection | null): void;
80
+ /** Where the last remote change carried the local selection; see `carrySelection`. */
81
+ remoteSelectionMove(): CollaborationSelectionMove | null;
82
+ /**
83
+ * Called before a remote change reaches the port: notes the selection's paragraphs and their text,
84
+ * and returns what carries it across the change once the port holds the new tree. The editor
85
+ * takes the carried selection when a local edit was coalesced with the remote change, where it
86
+ * cannot map its caret by the text alone. Several remote changes before the editor publishes its
87
+ * selection again chain, all from the selection it published.
88
+ */
89
+ private carrySelection;
72
90
  participants(): readonly CollaborationParticipant[];
73
91
  subscribeParticipants(listener: (participants: readonly CollaborationParticipant[]) => void): () => void;
74
92
  remoteSelections(): readonly CollaborationRemoteSelection[];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/coedit",
3
- "version": "0.4.155",
3
+ "version": "0.4.156",
4
4
  "description": "Real-time collaboration for the ARBI native DOCX editor: a Yjs mirror of the canonical OOXML package, session, and server runtime",
5
5
  "type": "module",
6
6
  "sideEffects": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/blocks",
3
- "version": "0.4.155",
3
+ "version": "0.4.156",
4
4
  "description": "Composable, domain-neutral UI blocks for ARBI apps, organised by capability (retrieval, facts, agents, workspaces, citations, collaboration) plus shell, theme and site primitives, on top of @arbidocs/react.",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -288,9 +288,9 @@
288
288
  "example:test:e2e": "playwright test -c examples/custom-ui/playwright.config.ts"
289
289
  },
290
290
  "dependencies": {
291
- "@arbidocs/client": "0.4.155",
292
- "@arbidocs/coedit": "0.4.155",
293
- "@arbidocs/sdk": "0.4.155",
291
+ "@arbidocs/client": "0.4.156",
292
+ "@arbidocs/coedit": "0.4.156",
293
+ "@arbidocs/sdk": "0.4.156",
294
294
  "@dnd-kit/core": "^6.3.1",
295
295
  "@dnd-kit/sortable": "^10.0.0",
296
296
  "@dnd-kit/utilities": "^3.2.2",
@@ -334,7 +334,7 @@
334
334
  "y-protocols": "^1.0.6"
335
335
  },
336
336
  "peerDependencies": {
337
- "@arbidocs/react": "0.4.155",
337
+ "@arbidocs/react": "0.4.156",
338
338
  "@lexical/html": "0.35.0",
339
339
  "@lexical/link": "0.35.0",
340
340
  "@lexical/list": "0.35.0",
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"ConnectedStreamedWordArtifact-5DK6QGYN.cjs"}