@arbidocs/blocks 0.4.109 → 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.
Files changed (167) hide show
  1. package/dist/{NativeDocxEditor-WODZAURG.cjs → NativeDocxEditor-AQKRZBIU.cjs} +7 -7
  2. package/dist/{NativeDocxEditor-WODZAURG.cjs.map → NativeDocxEditor-AQKRZBIU.cjs.map} +1 -1
  3. package/dist/{NativeDocxEditor-4PY4YZYC.js → NativeDocxEditor-IN2HEO5I.js} +3 -3
  4. package/dist/{NativeDocxEditor-4PY4YZYC.js.map → NativeDocxEditor-IN2HEO5I.js.map} +1 -1
  5. package/dist/agents/index.cjs +286 -286
  6. package/dist/agents/index.js +10 -10
  7. package/dist/agents/tasks/ConversationListView.d.ts +5 -1
  8. package/dist/agents/tasks/TaskActivityTimeline.d.ts +5 -1
  9. package/dist/calendar/EventDetails.d.ts +1 -1
  10. package/dist/calendar/EventEditor.d.ts +1 -1
  11. package/dist/calendar/draft.d.ts +7 -1
  12. package/dist/calendar/index.cjs +71 -10
  13. package/dist/calendar/index.cjs.map +1 -1
  14. package/dist/calendar/index.d.ts +1 -1
  15. package/dist/calendar/index.js +69 -11
  16. package/dist/calendar/index.js.map +1 -1
  17. package/dist/calendar/types.d.ts +23 -0
  18. package/dist/calls/CallSidePanel.d.ts +32 -0
  19. package/dist/calls/CallStage.d.ts +57 -0
  20. package/dist/calls/ControlBar.d.ts +113 -0
  21. package/dist/calls/ControlButton.d.ts +44 -0
  22. package/dist/calls/PreJoin.d.ts +35 -0
  23. package/dist/calls/cards.d.ts +58 -0
  24. package/dist/calls/hooks.d.ts +20 -0
  25. package/dist/calls/index.cjs +2884 -0
  26. package/dist/calls/index.cjs.map +1 -0
  27. package/dist/calls/index.d.ts +21 -0
  28. package/dist/calls/index.js +2753 -0
  29. package/dist/calls/index.js.map +1 -0
  30. package/dist/calls/join-choices.d.ts +11 -0
  31. package/dist/calls/layout.d.ts +106 -0
  32. package/dist/calls/panels.d.ts +66 -0
  33. package/dist/calls/status.d.ts +69 -0
  34. package/dist/calls/tiles.d.ts +59 -0
  35. package/dist/calls/webinar/ChatPermissionSetting.d.ts +18 -0
  36. package/dist/calls/webinar/OnStageCheck.d.ts +23 -0
  37. package/dist/calls/webinar/QAPanel.d.ts +56 -0
  38. package/dist/calls/webinar/RaiseHandButton.d.ts +14 -0
  39. package/dist/calls/webinar/WebinarAudiencePanel.d.ts +23 -0
  40. package/dist/calls/webinar/WebinarViewer.d.ts +39 -0
  41. package/dist/calls/webinar/WebinarWaiting.d.ts +19 -0
  42. package/dist/calls/webinar/hooks.d.ts +13 -0
  43. package/dist/calls/webinar/index.d.ts +14 -0
  44. package/dist/calls/webinar/live.d.ts +43 -0
  45. package/dist/calls/webinar/types.d.ts +49 -0
  46. package/dist/chat/Message.d.ts +17 -2
  47. package/dist/chat/TranscriptLine.d.ts +50 -0
  48. package/dist/chat/index.cjs +147 -126
  49. package/dist/chat/index.d.ts +3 -1
  50. package/dist/chat/index.js +5 -4
  51. package/dist/chat/transcript-runs.d.ts +6 -0
  52. package/dist/{chunk-GKDWQLVU.js → chunk-2C7TCVQZ.js} +172 -121
  53. package/dist/chunk-2C7TCVQZ.js.map +1 -0
  54. package/dist/{chunk-QKWQMOHN.cjs → chunk-2UAJVK3C.cjs} +4 -4
  55. package/dist/{chunk-QKWQMOHN.cjs.map → chunk-2UAJVK3C.cjs.map} +1 -1
  56. package/dist/{chunk-54WBIVHV.cjs → chunk-2WO5L7YT.cjs} +5 -5
  57. package/dist/{chunk-54WBIVHV.cjs.map → chunk-2WO5L7YT.cjs.map} +1 -1
  58. package/dist/{chunk-7C35WXYB.js → chunk-5HFPRI3W.js} +5 -5
  59. package/dist/chunk-5HFPRI3W.js.map +1 -0
  60. package/dist/{chunk-ZSV2NQQP.js → chunk-6RHHMBZ5.js} +158 -5
  61. package/dist/chunk-6RHHMBZ5.js.map +1 -0
  62. package/dist/{chunk-FQX6N5G6.js → chunk-6Z7DLJU2.js} +35 -18
  63. package/dist/chunk-6Z7DLJU2.js.map +1 -0
  64. package/dist/{chunk-PGDL26TQ.js → chunk-AY32GGKU.js} +10 -4
  65. package/dist/{chunk-PGDL26TQ.js.map → chunk-AY32GGKU.js.map} +1 -1
  66. package/dist/{chunk-S55VDTX3.js → chunk-CECWAIHL.js} +3 -3
  67. package/dist/{chunk-S55VDTX3.js.map → chunk-CECWAIHL.js.map} +1 -1
  68. package/dist/{chunk-UABPHZWZ.js → chunk-CXZ7FPTQ.js} +3 -3
  69. package/dist/{chunk-UABPHZWZ.js.map → chunk-CXZ7FPTQ.js.map} +1 -1
  70. package/dist/{chunk-C2HRZSAT.cjs → chunk-DJM7DLCT.cjs} +5 -5
  71. package/dist/chunk-DJM7DLCT.cjs.map +1 -0
  72. package/dist/{chunk-GBYY3PIC.cjs → chunk-FXUQZFAN.cjs} +79 -62
  73. package/dist/chunk-FXUQZFAN.cjs.map +1 -0
  74. package/dist/{chunk-W7NZRZ54.js → chunk-GFYGYME3.js} +3 -3
  75. package/dist/{chunk-W7NZRZ54.js.map → chunk-GFYGYME3.js.map} +1 -1
  76. package/dist/chunk-GICUGQNN.cjs +76 -0
  77. package/dist/chunk-GICUGQNN.cjs.map +1 -0
  78. package/dist/{chunk-I4XQCE6U.cjs → chunk-HBBJYRGI.cjs} +162 -5
  79. package/dist/{chunk-ZSV2NQQP.js.map → chunk-HBBJYRGI.cjs.map} +1 -1
  80. package/dist/chunk-JJLMCV3T.js +73 -0
  81. package/dist/chunk-JJLMCV3T.js.map +1 -0
  82. package/dist/chunk-MWDW5UBW.cjs +199 -0
  83. package/dist/chunk-MWDW5UBW.cjs.map +1 -0
  84. package/dist/{chunk-NUTLXVPX.js → chunk-NRUPUDWB.js} +16 -7
  85. package/dist/chunk-NRUPUDWB.js.map +1 -0
  86. package/dist/{chunk-5YXG342J.cjs → chunk-OR4CO743.cjs} +3 -3
  87. package/dist/{chunk-5YXG342J.cjs.map → chunk-OR4CO743.cjs.map} +1 -1
  88. package/dist/{chunk-DDF5GPIJ.js → chunk-P5ST47VY.js} +3 -3
  89. package/dist/{chunk-DDF5GPIJ.js.map → chunk-P5ST47VY.js.map} +1 -1
  90. package/dist/{chunk-PEHLUB52.js → chunk-Q6B77ZWZ.js} +3 -3
  91. package/dist/{chunk-PEHLUB52.js.map → chunk-Q6B77ZWZ.js.map} +1 -1
  92. package/dist/{chunk-ELDUWTRR.cjs → chunk-TF47ATYS.cjs} +4 -4
  93. package/dist/{chunk-ELDUWTRR.cjs.map → chunk-TF47ATYS.cjs.map} +1 -1
  94. package/dist/{chunk-PDRYGPZB.cjs → chunk-VP4KJ4LK.cjs} +16 -6
  95. package/dist/chunk-VP4KJ4LK.cjs.map +1 -0
  96. package/dist/{chunk-SKSE4OT6.cjs → chunk-WPVIOGDG.cjs} +5 -5
  97. package/dist/{chunk-SKSE4OT6.cjs.map → chunk-WPVIOGDG.cjs.map} +1 -1
  98. package/dist/{chunk-JB32KYAH.js → chunk-WTM65ZNG.js} +3 -3
  99. package/dist/{chunk-JB32KYAH.js.map → chunk-WTM65ZNG.js.map} +1 -1
  100. package/dist/{chunk-2NIL2ASF.cjs → chunk-XIGWUDOD.cjs} +170 -119
  101. package/dist/chunk-XIGWUDOD.cjs.map +1 -0
  102. package/dist/{chunk-3US5OIDQ.cjs → chunk-XSUOEJB3.cjs} +9 -3
  103. package/dist/chunk-XSUOEJB3.cjs.map +1 -0
  104. package/dist/chunk-Z3AZ7Q5X.js +177 -0
  105. package/dist/chunk-Z3AZ7Q5X.js.map +1 -0
  106. package/dist/{chunk-Z5VUZ6YD.cjs → chunk-ZV3BKLFY.cjs} +3 -3
  107. package/dist/{chunk-Z5VUZ6YD.cjs.map → chunk-ZV3BKLFY.cjs.map} +1 -1
  108. package/dist/collaboration/index.cjs +42 -42
  109. package/dist/collaboration/index.js +2 -2
  110. package/dist/connect/docx.cjs +6 -6
  111. package/dist/connect/docx.js +4 -4
  112. package/dist/connect/index.cjs +72 -72
  113. package/dist/connect/index.js +18 -18
  114. package/dist/docx/AgentUndo.d.ts +4 -0
  115. package/dist/docx/index.cjs +46 -46
  116. package/dist/docx/index.js +3 -3
  117. package/dist/facts/index.cjs +4 -4
  118. package/dist/facts/index.js +4 -4
  119. package/dist/files/index.cjs +6 -6
  120. package/dist/files/index.js +6 -6
  121. package/dist/home/index.cjs +17 -17
  122. package/dist/home/index.js +3 -3
  123. package/dist/index.cjs +958 -937
  124. package/dist/index.cjs.map +1 -1
  125. package/dist/index.js +24 -23
  126. package/dist/index.js.map +1 -1
  127. package/dist/retrieval/index.cjs +1 -1
  128. package/dist/retrieval/index.js +1 -1
  129. package/dist/settings/index.cjs +50 -104
  130. package/dist/settings/index.cjs.map +1 -1
  131. package/dist/settings/index.js +12 -72
  132. package/dist/settings/index.js.map +1 -1
  133. package/dist/shell/index.cjs +12 -12
  134. package/dist/shell/index.js +4 -4
  135. package/dist/site/index.cjs +5 -5
  136. package/dist/site/index.js +1 -1
  137. package/dist/studio/index.cjs +5 -5
  138. package/dist/studio/index.js +4 -4
  139. package/dist/workflow-canvas/index.cjs +53 -53
  140. package/dist/workflow-canvas/index.js +10 -10
  141. package/dist/workspaces/index.cjs +2 -2
  142. package/dist/workspaces/index.js +2 -2
  143. package/node_modules/@arbidocs/coedit/dist/commands.cjs +179 -9
  144. package/node_modules/@arbidocs/coedit/dist/commands.cjs.map +1 -1
  145. package/node_modules/@arbidocs/coedit/dist/commands.d.cts +81 -1
  146. package/node_modules/@arbidocs/coedit/dist/commands.d.ts +81 -1
  147. package/node_modules/@arbidocs/coedit/dist/commands.js +173 -11
  148. package/node_modules/@arbidocs/coedit/dist/commands.js.map +1 -1
  149. package/node_modules/@arbidocs/coedit/dist/server.cjs +58 -2
  150. package/node_modules/@arbidocs/coedit/dist/server.cjs.map +1 -1
  151. package/node_modules/@arbidocs/coedit/dist/server.d.cts +29 -1
  152. package/node_modules/@arbidocs/coedit/dist/server.d.ts +29 -1
  153. package/node_modules/@arbidocs/coedit/dist/server.js +58 -3
  154. package/node_modules/@arbidocs/coedit/dist/server.js.map +1 -1
  155. package/node_modules/@arbidocs/coedit/package.json +1 -1
  156. package/package.json +15 -5
  157. package/src/calls/calls.css +157 -0
  158. package/dist/chunk-2NIL2ASF.cjs.map +0 -1
  159. package/dist/chunk-3US5OIDQ.cjs.map +0 -1
  160. package/dist/chunk-7C35WXYB.js.map +0 -1
  161. package/dist/chunk-C2HRZSAT.cjs.map +0 -1
  162. package/dist/chunk-FQX6N5G6.js.map +0 -1
  163. package/dist/chunk-GBYY3PIC.cjs.map +0 -1
  164. package/dist/chunk-GKDWQLVU.js.map +0 -1
  165. package/dist/chunk-I4XQCE6U.cjs.map +0 -1
  166. package/dist/chunk-NUTLXVPX.js.map +0 -1
  167. package/dist/chunk-PDRYGPZB.cjs.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