@arbidocs/coedit 0.4.110 → 0.4.112
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.
- package/dist/commands.cjs +866 -9
- package/dist/commands.cjs.map +1 -1
- package/dist/commands.d.cts +342 -156
- package/dist/commands.d.ts +342 -156
- package/dist/commands.js +817 -11
- package/dist/commands.js.map +1 -1
- package/dist/port-ip7WByvH.d.cts +188 -0
- package/dist/port-ip7WByvH.d.ts +188 -0
- package/dist/server.cjs +731 -65
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +40 -1
- package/dist/server.d.ts +40 -1
- package/dist/server.js +730 -66
- package/dist/server.js.map +1 -1
- package/dist/template.d.cts +3 -17
- package/dist/template.d.ts +3 -17
- package/dist/track-eYC94jTp.d.cts +17 -0
- package/dist/track-eYC94jTp.d.ts +17 -0
- package/package.json +1 -1
package/dist/server.d.cts
CHANGED
|
@@ -2,6 +2,9 @@ import * as _docx_editor_dev_core_automation from '@docx-editor.dev/core/automat
|
|
|
2
2
|
import { createServerAutomationHost, ServerAutomationHostOptions } from '@docx-editor.dev/core/automation';
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
4
|
import { CollaborationIdentity } from '@docx-editor.dev/core/collaboration';
|
|
5
|
+
import { TreePackageStore, PackageTransactResult, HeadlessDocumentView, ImageDecodePort } from '@docx-editor.dev/core/store';
|
|
6
|
+
import { R as ReferencesPort } from './port-ip7WByvH.cjs';
|
|
7
|
+
import { R as Revision } from './track-eYC94jTp.cjs';
|
|
5
8
|
import { D as DocxCollaborationSession } from './session-Cf9iu1Vt.cjs';
|
|
6
9
|
export { C as COLLAB_PROTOCOL, D as DOCUMENT_COLLABORATION_VERSIONS } from './versions-DXiFQMA6.cjs';
|
|
7
10
|
import 'y-protocols/awareness';
|
|
@@ -39,5 +42,41 @@ declare function openRoomAutomation(options: {
|
|
|
39
42
|
identity: CollaborationIdentity;
|
|
40
43
|
hostOptions?: Omit<ServerAutomationHostOptions, 'collaborationModel'>;
|
|
41
44
|
}): RoomAutomation;
|
|
45
|
+
/** A package store attached to a live room: writes go through `store` and reach the room on `flush`. */
|
|
46
|
+
interface RoomStore {
|
|
47
|
+
store: TreePackageStore;
|
|
48
|
+
session: DocxCollaborationSession;
|
|
49
|
+
/**
|
|
50
|
+
* One transaction as the agent (attributed, outside the store's own history) on the body, or on
|
|
51
|
+
* another story (a note), mirrored into the room when it commits.
|
|
52
|
+
*/
|
|
53
|
+
transact(build: Parameters<TreePackageStore['transact']>[1], scope?: Parameters<TreePackageStore['transact']>[0]): PackageTransactResult;
|
|
54
|
+
/** Mirror the store's other committed writes (an image insert) into the room. */
|
|
55
|
+
flush(): void;
|
|
56
|
+
/** The document as the store now holds it, for the shared readers (`@arbidocs/coedit/commands`). */
|
|
57
|
+
view(): HeadlessDocumentView;
|
|
58
|
+
/** Image dimensions from the file header, for `store.insertImage` (no pixel decode on a server). */
|
|
59
|
+
imageDecodePort: ImageDecodePort;
|
|
60
|
+
dispose(): void;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Open a package store over a live room, for the writes the automation protocol does not carry
|
|
64
|
+
* (fragment paste, notes, tracked table and image inserts, whole paragraph properties). Its commits
|
|
65
|
+
* are mirrored into `doc` exactly as a browser's are.
|
|
66
|
+
*/
|
|
67
|
+
declare function openRoomStore(options: {
|
|
68
|
+
doc: Y.Doc;
|
|
69
|
+
documentId: string;
|
|
70
|
+
identity: CollaborationIdentity;
|
|
71
|
+
}): RoomStore;
|
|
72
|
+
/**
|
|
73
|
+
* The defined-term and cross-reference commands' port (`@arbidocs/coedit/commands`) over a room
|
|
74
|
+
* store: the same commands the editor's toolbar runs, landing in the room. A caret is just a
|
|
75
|
+
* position here; pastes are fragment pastes, with a `revision` one tracked insertion by it.
|
|
76
|
+
*/
|
|
77
|
+
declare function roomCommandsPort(room: RoomStore, { revision, actorId }?: {
|
|
78
|
+
revision?: Revision | null;
|
|
79
|
+
actorId?: string;
|
|
80
|
+
}): ReferencesPort;
|
|
42
81
|
|
|
43
|
-
export { CollaborationCompatibilityError, type RoomAutomation, assertCompatibleVersions, assertRoomFormat, normalizeDocx, openRoomAutomation, readRoom, seedRoom };
|
|
82
|
+
export { CollaborationCompatibilityError, type RoomAutomation, type RoomStore, assertCompatibleVersions, assertRoomFormat, normalizeDocx, openRoomAutomation, openRoomStore, readRoom, roomCommandsPort, seedRoom };
|
package/dist/server.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ import * as _docx_editor_dev_core_automation from '@docx-editor.dev/core/automat
|
|
|
2
2
|
import { createServerAutomationHost, ServerAutomationHostOptions } from '@docx-editor.dev/core/automation';
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
4
|
import { CollaborationIdentity } from '@docx-editor.dev/core/collaboration';
|
|
5
|
+
import { TreePackageStore, PackageTransactResult, HeadlessDocumentView, ImageDecodePort } from '@docx-editor.dev/core/store';
|
|
6
|
+
import { R as ReferencesPort } from './port-ip7WByvH.js';
|
|
7
|
+
import { R as Revision } from './track-eYC94jTp.js';
|
|
5
8
|
import { D as DocxCollaborationSession } from './session-Cf9iu1Vt.js';
|
|
6
9
|
export { C as COLLAB_PROTOCOL, D as DOCUMENT_COLLABORATION_VERSIONS } from './versions-DXiFQMA6.js';
|
|
7
10
|
import 'y-protocols/awareness';
|
|
@@ -39,5 +42,41 @@ declare function openRoomAutomation(options: {
|
|
|
39
42
|
identity: CollaborationIdentity;
|
|
40
43
|
hostOptions?: Omit<ServerAutomationHostOptions, 'collaborationModel'>;
|
|
41
44
|
}): RoomAutomation;
|
|
45
|
+
/** A package store attached to a live room: writes go through `store` and reach the room on `flush`. */
|
|
46
|
+
interface RoomStore {
|
|
47
|
+
store: TreePackageStore;
|
|
48
|
+
session: DocxCollaborationSession;
|
|
49
|
+
/**
|
|
50
|
+
* One transaction as the agent (attributed, outside the store's own history) on the body, or on
|
|
51
|
+
* another story (a note), mirrored into the room when it commits.
|
|
52
|
+
*/
|
|
53
|
+
transact(build: Parameters<TreePackageStore['transact']>[1], scope?: Parameters<TreePackageStore['transact']>[0]): PackageTransactResult;
|
|
54
|
+
/** Mirror the store's other committed writes (an image insert) into the room. */
|
|
55
|
+
flush(): void;
|
|
56
|
+
/** The document as the store now holds it, for the shared readers (`@arbidocs/coedit/commands`). */
|
|
57
|
+
view(): HeadlessDocumentView;
|
|
58
|
+
/** Image dimensions from the file header, for `store.insertImage` (no pixel decode on a server). */
|
|
59
|
+
imageDecodePort: ImageDecodePort;
|
|
60
|
+
dispose(): void;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Open a package store over a live room, for the writes the automation protocol does not carry
|
|
64
|
+
* (fragment paste, notes, tracked table and image inserts, whole paragraph properties). Its commits
|
|
65
|
+
* are mirrored into `doc` exactly as a browser's are.
|
|
66
|
+
*/
|
|
67
|
+
declare function openRoomStore(options: {
|
|
68
|
+
doc: Y.Doc;
|
|
69
|
+
documentId: string;
|
|
70
|
+
identity: CollaborationIdentity;
|
|
71
|
+
}): RoomStore;
|
|
72
|
+
/**
|
|
73
|
+
* The defined-term and cross-reference commands' port (`@arbidocs/coedit/commands`) over a room
|
|
74
|
+
* store: the same commands the editor's toolbar runs, landing in the room. A caret is just a
|
|
75
|
+
* position here; pastes are fragment pastes, with a `revision` one tracked insertion by it.
|
|
76
|
+
*/
|
|
77
|
+
declare function roomCommandsPort(room: RoomStore, { revision, actorId }?: {
|
|
78
|
+
revision?: Revision | null;
|
|
79
|
+
actorId?: string;
|
|
80
|
+
}): ReferencesPort;
|
|
42
81
|
|
|
43
|
-
export { CollaborationCompatibilityError, type RoomAutomation, assertCompatibleVersions, assertRoomFormat, normalizeDocx, openRoomAutomation, readRoom, seedRoom };
|
|
82
|
+
export { CollaborationCompatibilityError, type RoomAutomation, type RoomStore, assertCompatibleVersions, assertRoomFormat, normalizeDocx, openRoomAutomation, openRoomStore, readRoom, roomCommandsPort, seedRoom };
|