@arbidocs/blocks 0.4.110 → 0.4.111
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/{NativeDocxEditor-WODZAURG.cjs → NativeDocxEditor-AQKRZBIU.cjs} +7 -7
- package/dist/{NativeDocxEditor-WODZAURG.cjs.map → NativeDocxEditor-AQKRZBIU.cjs.map} +1 -1
- package/dist/{NativeDocxEditor-4PY4YZYC.js → NativeDocxEditor-IN2HEO5I.js} +3 -3
- package/dist/{NativeDocxEditor-4PY4YZYC.js.map → NativeDocxEditor-IN2HEO5I.js.map} +1 -1
- package/dist/agents/index.cjs +207 -207
- package/dist/agents/index.js +2 -2
- package/dist/calendar/EventEditor.d.ts +1 -1
- package/dist/calendar/draft.d.ts +7 -1
- package/dist/calendar/index.cjs +58 -10
- package/dist/calendar/index.cjs.map +1 -1
- package/dist/calendar/index.d.ts +1 -1
- package/dist/calendar/index.js +56 -11
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/types.d.ts +20 -0
- package/dist/calls/CallSidePanel.d.ts +16 -1
- package/dist/calls/ControlBar.d.ts +25 -3
- package/dist/calls/PreJoin.d.ts +6 -2
- package/dist/calls/cards.d.ts +6 -2
- package/dist/calls/index.cjs +1078 -47
- package/dist/calls/index.cjs.map +1 -1
- package/dist/calls/index.d.ts +4 -3
- package/dist/calls/index.js +1067 -51
- package/dist/calls/index.js.map +1 -1
- package/dist/calls/panels.d.ts +11 -0
- package/dist/calls/webinar/ChatPermissionSetting.d.ts +18 -0
- package/dist/calls/webinar/OnStageCheck.d.ts +23 -0
- package/dist/calls/webinar/QAPanel.d.ts +56 -0
- package/dist/calls/webinar/RaiseHandButton.d.ts +14 -0
- package/dist/calls/webinar/WebinarAudiencePanel.d.ts +23 -0
- package/dist/calls/webinar/WebinarViewer.d.ts +39 -0
- package/dist/calls/webinar/WebinarWaiting.d.ts +19 -0
- package/dist/calls/webinar/hooks.d.ts +13 -0
- package/dist/calls/webinar/index.d.ts +14 -0
- package/dist/calls/webinar/live.d.ts +43 -0
- package/dist/calls/webinar/types.d.ts +49 -0
- package/dist/{chunk-GKDWQLVU.js → chunk-2C7TCVQZ.js} +172 -121
- package/dist/chunk-2C7TCVQZ.js.map +1 -0
- package/dist/{chunk-54WBIVHV.cjs → chunk-2WO5L7YT.cjs} +5 -5
- package/dist/{chunk-54WBIVHV.cjs.map → chunk-2WO5L7YT.cjs.map} +1 -1
- package/dist/{chunk-A35KT2II.js → chunk-6Z7DLJU2.js} +3 -3
- package/dist/{chunk-A35KT2II.js.map → chunk-6Z7DLJU2.js.map} +1 -1
- package/dist/{chunk-VZKBI2KJ.cjs → chunk-FXUQZFAN.cjs} +3 -3
- package/dist/{chunk-VZKBI2KJ.cjs.map → chunk-FXUQZFAN.cjs.map} +1 -1
- package/dist/{chunk-SQNAJPNR.js → chunk-GFYGYME3.js} +3 -3
- package/dist/{chunk-SQNAJPNR.js.map → chunk-GFYGYME3.js.map} +1 -1
- package/dist/chunk-GICUGQNN.cjs +76 -0
- package/dist/chunk-GICUGQNN.cjs.map +1 -0
- package/dist/chunk-JJLMCV3T.js +73 -0
- package/dist/chunk-JJLMCV3T.js.map +1 -0
- package/dist/{chunk-W7ZDBPJ3.cjs → chunk-OR4CO743.cjs} +3 -3
- package/dist/{chunk-W7ZDBPJ3.cjs.map → chunk-OR4CO743.cjs.map} +1 -1
- package/dist/{chunk-PEHLUB52.js → chunk-Q6B77ZWZ.js} +3 -3
- package/dist/{chunk-PEHLUB52.js.map → chunk-Q6B77ZWZ.js.map} +1 -1
- package/dist/{chunk-ELDUWTRR.cjs → chunk-TF47ATYS.cjs} +4 -4
- package/dist/{chunk-ELDUWTRR.cjs.map → chunk-TF47ATYS.cjs.map} +1 -1
- package/dist/{chunk-JB32KYAH.js → chunk-WTM65ZNG.js} +3 -3
- package/dist/{chunk-JB32KYAH.js.map → chunk-WTM65ZNG.js.map} +1 -1
- package/dist/{chunk-2NIL2ASF.cjs → chunk-XIGWUDOD.cjs} +170 -119
- package/dist/chunk-XIGWUDOD.cjs.map +1 -0
- package/dist/collaboration/index.cjs +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/connect/docx.cjs +6 -6
- package/dist/connect/docx.js +4 -4
- package/dist/connect/index.cjs +31 -31
- package/dist/connect/index.js +7 -7
- package/dist/docx/AgentUndo.d.ts +4 -0
- package/dist/docx/index.cjs +46 -46
- package/dist/docx/index.js +3 -3
- package/dist/files/index.cjs +1 -1
- package/dist/files/index.js +1 -1
- package/dist/index.cjs +332 -332
- package/dist/index.js +6 -6
- package/dist/settings/index.cjs +48 -102
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.js +10 -70
- package/dist/settings/index.js.map +1 -1
- package/dist/workflow-canvas/index.cjs +9 -9
- package/dist/workflow-canvas/index.js +2 -2
- package/node_modules/@arbidocs/coedit/dist/commands.cjs +179 -9
- package/node_modules/@arbidocs/coedit/dist/commands.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/commands.d.cts +81 -1
- package/node_modules/@arbidocs/coedit/dist/commands.d.ts +81 -1
- package/node_modules/@arbidocs/coedit/dist/commands.js +173 -11
- package/node_modules/@arbidocs/coedit/dist/commands.js.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.cjs +58 -2
- package/node_modules/@arbidocs/coedit/dist/server.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.d.cts +29 -1
- package/node_modules/@arbidocs/coedit/dist/server.d.ts +29 -1
- package/node_modules/@arbidocs/coedit/dist/server.js +58 -3
- package/node_modules/@arbidocs/coedit/dist/server.js.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +4 -4
- package/dist/chunk-2NIL2ASF.cjs.map +0 -1
- package/dist/chunk-GKDWQLVU.js.map +0 -1
|
@@ -2,6 +2,7 @@ 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';
|
|
5
6
|
import { D as DocxCollaborationSession } from './session-Cf9iu1Vt.cjs';
|
|
6
7
|
export { C as COLLAB_PROTOCOL, D as DOCUMENT_COLLABORATION_VERSIONS } from './versions-DXiFQMA6.cjs';
|
|
7
8
|
import 'y-protocols/awareness';
|
|
@@ -39,5 +40,32 @@ declare function openRoomAutomation(options: {
|
|
|
39
40
|
identity: CollaborationIdentity;
|
|
40
41
|
hostOptions?: Omit<ServerAutomationHostOptions, 'collaborationModel'>;
|
|
41
42
|
}): RoomAutomation;
|
|
43
|
+
/** A package store attached to a live room: writes go through `store` and reach the room on `flush`. */
|
|
44
|
+
interface RoomStore {
|
|
45
|
+
store: TreePackageStore;
|
|
46
|
+
session: DocxCollaborationSession;
|
|
47
|
+
/**
|
|
48
|
+
* One transaction on the body as the agent (attributed, outside the store's own history), mirrored
|
|
49
|
+
* into the room when it commits.
|
|
50
|
+
*/
|
|
51
|
+
transact(build: Parameters<TreePackageStore['transact']>[1]): PackageTransactResult;
|
|
52
|
+
/** Mirror the store's other committed writes (an image insert) into the room. */
|
|
53
|
+
flush(): void;
|
|
54
|
+
/** The document as the store now holds it, for the shared readers (`@arbidocs/coedit/commands`). */
|
|
55
|
+
view(): HeadlessDocumentView;
|
|
56
|
+
/** Image dimensions from the file header, for `store.insertImage` (no pixel decode on a server). */
|
|
57
|
+
imageDecodePort: ImageDecodePort;
|
|
58
|
+
dispose(): void;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Open a package store over a live room, for the writes the automation protocol does not carry
|
|
62
|
+
* (fragment paste, notes, tracked table and image inserts, whole paragraph properties). Its commits
|
|
63
|
+
* are mirrored into `doc` exactly as a browser's are.
|
|
64
|
+
*/
|
|
65
|
+
declare function openRoomStore(options: {
|
|
66
|
+
doc: Y.Doc;
|
|
67
|
+
documentId: string;
|
|
68
|
+
identity: CollaborationIdentity;
|
|
69
|
+
}): RoomStore;
|
|
42
70
|
|
|
43
|
-
export { CollaborationCompatibilityError, type RoomAutomation, assertCompatibleVersions, assertRoomFormat, normalizeDocx, openRoomAutomation, readRoom, seedRoom };
|
|
71
|
+
export { CollaborationCompatibilityError, type RoomAutomation, type RoomStore, assertCompatibleVersions, assertRoomFormat, normalizeDocx, openRoomAutomation, openRoomStore, readRoom, seedRoom };
|
|
@@ -2,6 +2,7 @@ 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';
|
|
5
6
|
import { D as DocxCollaborationSession } from './session-Cf9iu1Vt.js';
|
|
6
7
|
export { C as COLLAB_PROTOCOL, D as DOCUMENT_COLLABORATION_VERSIONS } from './versions-DXiFQMA6.js';
|
|
7
8
|
import 'y-protocols/awareness';
|
|
@@ -39,5 +40,32 @@ declare function openRoomAutomation(options: {
|
|
|
39
40
|
identity: CollaborationIdentity;
|
|
40
41
|
hostOptions?: Omit<ServerAutomationHostOptions, 'collaborationModel'>;
|
|
41
42
|
}): RoomAutomation;
|
|
43
|
+
/** A package store attached to a live room: writes go through `store` and reach the room on `flush`. */
|
|
44
|
+
interface RoomStore {
|
|
45
|
+
store: TreePackageStore;
|
|
46
|
+
session: DocxCollaborationSession;
|
|
47
|
+
/**
|
|
48
|
+
* One transaction on the body as the agent (attributed, outside the store's own history), mirrored
|
|
49
|
+
* into the room when it commits.
|
|
50
|
+
*/
|
|
51
|
+
transact(build: Parameters<TreePackageStore['transact']>[1]): PackageTransactResult;
|
|
52
|
+
/** Mirror the store's other committed writes (an image insert) into the room. */
|
|
53
|
+
flush(): void;
|
|
54
|
+
/** The document as the store now holds it, for the shared readers (`@arbidocs/coedit/commands`). */
|
|
55
|
+
view(): HeadlessDocumentView;
|
|
56
|
+
/** Image dimensions from the file header, for `store.insertImage` (no pixel decode on a server). */
|
|
57
|
+
imageDecodePort: ImageDecodePort;
|
|
58
|
+
dispose(): void;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Open a package store over a live room, for the writes the automation protocol does not carry
|
|
62
|
+
* (fragment paste, notes, tracked table and image inserts, whole paragraph properties). Its commits
|
|
63
|
+
* are mirrored into `doc` exactly as a browser's are.
|
|
64
|
+
*/
|
|
65
|
+
declare function openRoomStore(options: {
|
|
66
|
+
doc: Y.Doc;
|
|
67
|
+
documentId: string;
|
|
68
|
+
identity: CollaborationIdentity;
|
|
69
|
+
}): RoomStore;
|
|
42
70
|
|
|
43
|
-
export { CollaborationCompatibilityError, type RoomAutomation, assertCompatibleVersions, assertRoomFormat, normalizeDocx, openRoomAutomation, readRoom, seedRoom };
|
|
71
|
+
export { CollaborationCompatibilityError, type RoomAutomation, type RoomStore, assertCompatibleVersions, assertRoomFormat, normalizeDocx, openRoomAutomation, openRoomStore, readRoom, seedRoom };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Awareness } from 'y-protocols/awareness';
|
|
2
2
|
import { createServerAutomationHost } from '@docx-editor.dev/core/automation';
|
|
3
|
+
import { createCollaborationDocumentPort, historyGroupOfJournal } from '@docx-editor.dev/core/collaboration/replication';
|
|
4
|
+
import { TreePackageStore, validateRasterHeader, headlessViewOfStore, ORIGIN_IDS, readOoxmlPackage, writeOoxmlPackage, readOoxmlPart, validateExternalTarget, relsPartNameFor, contentTypesPartBytes, withContentTypeOverride } from '@docx-editor.dev/core/store';
|
|
3
5
|
import * as Y3 from 'yjs';
|
|
4
|
-
import { readOoxmlPackage, writeOoxmlPackage, readOoxmlPart, validateExternalTarget, relsPartNameFor, contentTypesPartBytes, withContentTypeOverride } from '@docx-editor.dev/core/store';
|
|
5
6
|
import { createCollaborationStatusTracker, safeParticipantColor } from '@docx-editor.dev/core/collaboration';
|
|
6
|
-
import { historyGroupOfJournal } from '@docx-editor.dev/core/collaboration/replication';
|
|
7
7
|
|
|
8
8
|
// src/server.ts
|
|
9
9
|
|
|
@@ -1816,7 +1816,62 @@ function openRoomAutomation(options) {
|
|
|
1816
1816
|
throw error;
|
|
1817
1817
|
}
|
|
1818
1818
|
}
|
|
1819
|
+
function openRoomStore(options) {
|
|
1820
|
+
assertRoomFormat(options.doc);
|
|
1821
|
+
const awareness = new Awareness(options.doc);
|
|
1822
|
+
const session = new DocxCollaborationSession({
|
|
1823
|
+
doc: options.doc,
|
|
1824
|
+
awareness,
|
|
1825
|
+
documentId: options.documentId,
|
|
1826
|
+
identity: options.identity,
|
|
1827
|
+
remoteDelayMs: 0
|
|
1828
|
+
});
|
|
1829
|
+
session.markReady();
|
|
1830
|
+
try {
|
|
1831
|
+
const pkg = materialize(options.doc);
|
|
1832
|
+
const main = pkg.parts.get(pkg.mainDocumentPart);
|
|
1833
|
+
if (!main) throw new MaterializeError("The room has no main document part.");
|
|
1834
|
+
const store = new TreePackageStore(pkg, main);
|
|
1835
|
+
const port = createCollaborationDocumentPort(store, { documentId: options.documentId });
|
|
1836
|
+
session.attach(port);
|
|
1837
|
+
return {
|
|
1838
|
+
store,
|
|
1839
|
+
session,
|
|
1840
|
+
transact(build) {
|
|
1841
|
+
const result = store.transact({ kind: "body" }, build, {
|
|
1842
|
+
origin: ORIGIN_IDS.mutationAgent,
|
|
1843
|
+
actorId: options.identity.actorId,
|
|
1844
|
+
recordsHistory: false
|
|
1845
|
+
});
|
|
1846
|
+
if (result.ok) port.flushPendingJournals();
|
|
1847
|
+
return result;
|
|
1848
|
+
},
|
|
1849
|
+
flush: () => port.flushPendingJournals(),
|
|
1850
|
+
view: () => headlessViewOfStore(store),
|
|
1851
|
+
imageDecodePort: {
|
|
1852
|
+
async decode(bytes, mime) {
|
|
1853
|
+
const header = validateRasterHeader(bytes, mime);
|
|
1854
|
+
if (!header) throw new Error("The image cannot be read.");
|
|
1855
|
+
return {
|
|
1856
|
+
pixelWidth: header.pixelWidth,
|
|
1857
|
+
pixelHeight: header.pixelHeight,
|
|
1858
|
+
dpiX: header.dpiX ?? 96,
|
|
1859
|
+
dpiY: header.dpiY ?? 96
|
|
1860
|
+
};
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1863
|
+
dispose() {
|
|
1864
|
+
session.destroy();
|
|
1865
|
+
awareness.destroy();
|
|
1866
|
+
}
|
|
1867
|
+
};
|
|
1868
|
+
} catch (error) {
|
|
1869
|
+
session.destroy();
|
|
1870
|
+
awareness.destroy();
|
|
1871
|
+
throw error;
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1819
1874
|
|
|
1820
|
-
export { COLLAB_PROTOCOL, CollaborationCompatibilityError, DOCUMENT_COLLABORATION_VERSIONS, assertCompatibleVersions, assertRoomFormat, normalizeDocx, openRoomAutomation, readRoom, seedRoom };
|
|
1875
|
+
export { COLLAB_PROTOCOL, CollaborationCompatibilityError, DOCUMENT_COLLABORATION_VERSIONS, assertCompatibleVersions, assertRoomFormat, normalizeDocx, openRoomAutomation, openRoomStore, readRoom, seedRoom };
|
|
1821
1876
|
//# sourceMappingURL=server.js.map
|
|
1822
1877
|
//# sourceMappingURL=server.js.map
|