@powerhousedao/connect 1.0.0-dev.246 → 1.0.0-dev.248

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 (36) hide show
  1. package/LICENSE +661 -0
  2. package/dist/assets/{app-BT03qzg4.js → app-BgY4XbK3.js} +1483 -1001
  3. package/dist/assets/{app-D9QJBr8i.css → app-CYjeY4R-.css} +113 -50
  4. package/dist/assets/{app-loader-Cp_C_kSQ.js → app-loader-Be1urgPw.js} +206 -185
  5. package/dist/assets/{app-loader-Bnp0H-wa.css → app-loader-DC8DXqh9.css} +129 -18
  6. package/dist/assets/{ccip-rCu2dOKk.js → ccip-KX_YlO62.js} +3 -3
  7. package/dist/assets/{content-B1RXkSXz.js → content-CrBPsYmC.js} +36 -6
  8. package/dist/assets/{index-CJbQZ7hP.js → index-Ca8tBMzh.js} +3 -3
  9. package/dist/assets/{index-DX2bXpNe.js → index-CrpTq7W6.js} +670 -519
  10. package/dist/assets/{index-a5VEmfQw.js → index-DG5cID7M.js} +4 -4
  11. package/dist/assets/{main.Hm4UID1Z.js → main.BvYgkrO6.js} +1 -1
  12. package/dist/assets/{style-D4JhTt_m.css → style-D7CwmVZf.css} +52 -36
  13. package/dist/index.html +1 -1
  14. package/dist/modules/@powerhousedao/reactor-browser/{chunk-G6LMXRY5.js → chunk-2ONJ2PX4.js} +1 -1
  15. package/dist/modules/@powerhousedao/reactor-browser/{chunk-XXFOSD4A.js → chunk-6MBHOHAA.js} +1 -1
  16. package/dist/modules/@powerhousedao/reactor-browser/{chunk-FW7N6EJH.js → chunk-C7QRY43M.js} +3 -3
  17. package/dist/modules/@powerhousedao/reactor-browser/{chunk-45DCPCA7.js → chunk-CO2RVWYY.js} +1 -1
  18. package/dist/modules/@powerhousedao/reactor-browser/{chunk-YDERCA5J.js → chunk-IC6B3767.js} +1 -1
  19. package/dist/modules/@powerhousedao/reactor-browser/{chunk-A4GIWVYS.js → chunk-N5UNGAA6.js} +94 -74
  20. package/dist/modules/@powerhousedao/reactor-browser/{chunk-F3RCGUF6.js → chunk-NHD6VUCD.js} +2 -2
  21. package/dist/modules/@powerhousedao/reactor-browser/{chunk-UP4DC4D2.js → chunk-OYYVE7RP.js} +1 -1
  22. package/dist/modules/@powerhousedao/reactor-browser/{chunk-M2UUQ5LH.js → chunk-U34SEKEB.js} +2 -2
  23. package/dist/modules/@powerhousedao/reactor-browser/{chunk-PQ4UODLR.js → chunk-UDKYG6I4.js} +1 -1
  24. package/dist/modules/@powerhousedao/reactor-browser/context/index.js +2 -2
  25. package/dist/modules/@powerhousedao/reactor-browser/context/read-mode.js +2 -2
  26. package/dist/modules/@powerhousedao/reactor-browser/hooks/index.js +8 -8
  27. package/dist/modules/@powerhousedao/reactor-browser/hooks/useAddDebouncedOperations.js +3 -3
  28. package/dist/modules/@powerhousedao/reactor-browser/hooks/useConnectCrypto.js +2 -2
  29. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentDrives.js +2 -2
  30. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentEditor.js +5 -5
  31. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActions.js +2 -2
  32. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes.js +3 -3
  33. package/dist/modules/@powerhousedao/reactor-browser/index.js +10 -10
  34. package/dist/modules/@powerhousedao/reactor-browser/reactor.js +2 -2
  35. package/dist/vite-envs.sh +1 -1
  36. package/package.json +8 -8
@@ -10,10 +10,10 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
10
10
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
12
  var _DB_NAME, _STORE_NAME, _KEY, _db, _BrowserKeyStorage_instances, useStore_fn, _subtleCrypto, _keyPair, _keyPairStorage, _did, _ConnectCrypto_instances, initCrypto_fn, initialize_fn, parseDid_fn, generateECDSAKeyPair_fn, exportKeyPair_fn, importKeyPair_fn, _sign, _verify, _store, _namespace, _BaseStorage_instances, buildKey_fn, _baseUrl, _store2, _connectId, _eventEmitter, _Renown_instances, updateUser_fn, getCredential_fn;
13
- import { _ as __vitePreload } from "./main.Hm4UID1Z.js";
14
- import { aW as getAugmentedNamespace, $ as getDefaultExportFromCjs, ah as connectConfig, ac as logger } from "./app-loader-Cp_C_kSQ.js";
15
- import { e as eventsExports, R as RENOWN_URL, g as getEnsInfo } from "./app-BT03qzg4.js";
16
- import { d, c, b, f, a, r, s } from "./app-BT03qzg4.js";
13
+ import { _ as __vitePreload } from "./main.BvYgkrO6.js";
14
+ import { aW as getAugmentedNamespace, $ as getDefaultExportFromCjs, ah as connectConfig, ac as logger } from "./app-loader-Be1urgPw.js";
15
+ import { e as eventsExports, R as RENOWN_URL, g as getEnsInfo } from "./app-BgY4XbK3.js";
16
+ import { d, c, b, f, a, r, s } from "./app-BgY4XbK3.js";
17
17
  import "react/jsx-runtime";
18
18
  import "react";
19
19
  import "@powerhousedao/reactor-browser";
@@ -99,7 +99,7 @@ const __vitePreload = function preload(baseModule, deps, importerUrl) {
99
99
  return baseModule().catch(handlePreloadError);
100
100
  });
101
101
  };
102
- __vitePreload(() => import("./index-CJbQZ7hP.js"), true ? [] : void 0);
102
+ __vitePreload(() => import("./index-Ca8tBMzh.js"), true ? [] : void 0);
103
103
  export {
104
104
  __vitePreload as _
105
105
  };
@@ -1,6 +1,6 @@
1
1
  @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
2
2
 
3
- /*! tailwindcss v4.0.14 | MIT License | https://tailwindcss.com */
3
+ /*! tailwindcss v4.0.17 | MIT License | https://tailwindcss.com */
4
4
  :root {
5
5
  --toastify-color-light: #fff;
6
6
  --toastify-color-dark: #121212;
@@ -687,9 +687,6 @@
687
687
  @layer theme, base, components, utilities;
688
688
  @layer theme {
689
689
  :root, :host {
690
- --font-sans: "Inter", sans-serif;
691
- --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
692
- "Courier New", monospace;
693
690
  --color-red-800: hsl(5 81% 61%);
694
691
  --color-red-900: hsl(5 81% 56%);
695
692
  --color-slate-50: hsl(210 20% 96%);
@@ -721,18 +718,6 @@
721
718
  --radius-3xl: 1.5rem;
722
719
  --default-transition-duration: 150ms;
723
720
  --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
724
- --default-font-family: var(--font-sans);
725
- --default-font-feature-settings: var(--font-sans--font-feature-settings);
726
- --default-font-variation-settings: var(
727
- --font-sans--font-variation-settings
728
- );
729
- --default-mono-font-family: var(--font-mono);
730
- --default-mono-font-feature-settings: var(
731
- --font-mono--font-feature-settings
732
- );
733
- --default-mono-font-variation-settings: var(
734
- --font-mono--font-variation-settings
735
- );
736
721
  }
737
722
  }
738
723
  @layer base {
@@ -746,14 +731,11 @@
746
731
  line-height: 1.5;
747
732
  -webkit-text-size-adjust: 100%;
748
733
  tab-size: 4;
749
- font-family: var( --default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" );
750
- font-feature-settings: var(--default-font-feature-settings, normal);
751
- font-variation-settings: var( --default-font-variation-settings, normal );
734
+ font-family: "Inter", sans-serif;
735
+ font-feature-settings: initial;
736
+ font-variation-settings: initial;
752
737
  -webkit-tap-highlight-color: transparent;
753
738
  }
754
- body {
755
- line-height: inherit;
756
- }
757
739
  hr {
758
740
  height: 0;
759
741
  color: inherit;
@@ -776,9 +758,10 @@
776
758
  font-weight: bolder;
777
759
  }
778
760
  code, kbd, samp, pre {
779
- font-family: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace );
780
- font-feature-settings: var( --default-mono-font-feature-settings, normal );
781
- font-variation-settings: var( --default-mono-font-variation-settings, normal );
761
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
762
+ "Courier New", monospace;
763
+ font-feature-settings: initial;
764
+ font-variation-settings: initial;
782
765
  font-size: 1em;
783
766
  }
784
767
  small {
@@ -842,7 +825,11 @@
842
825
  }
843
826
  ::placeholder {
844
827
  opacity: 1;
845
- color: color-mix(in oklab, currentColor 50%, transparent);
828
+ }
829
+ @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
830
+ ::placeholder {
831
+ color: color-mix(in oklab, currentColor 50%, transparent);
832
+ }
846
833
  }
847
834
  textarea {
848
835
  resize: vertical;
@@ -934,6 +921,27 @@
934
921
  .ml-4 {
935
922
  margin-left: calc(var(--spacing) * 4);
936
923
  }
924
+ .scrollbar {
925
+ &::-webkit-scrollbar-track {
926
+ background-color: var(--scrollbar-track);
927
+ border-radius: var(--scrollbar-track-radius);
928
+ }
929
+ &::-webkit-scrollbar-thumb {
930
+ background-color: var(--scrollbar-thumb);
931
+ border-radius: var(--scrollbar-thumb-radius);
932
+ }
933
+ &::-webkit-scrollbar-corner {
934
+ background-color: var(--scrollbar-corner);
935
+ border-radius: var(--scrollbar-corner-radius);
936
+ }
937
+ scrollbar-width: auto;
938
+ scrollbar-color: var(--scrollbar-thumb, initial) var(--scrollbar-track, initial);
939
+ &::-webkit-scrollbar {
940
+ display: block;
941
+ width: var(--scrollbar-width, 16px);
942
+ height: var(--scrollbar-height, 16px);
943
+ }
944
+ }
937
945
  .block {
938
946
  display: block;
939
947
  }
@@ -1392,14 +1400,11 @@ input[type="number"] {
1392
1400
  line-height: 1.5;
1393
1401
  -webkit-text-size-adjust: 100%;
1394
1402
  tab-size: 4;
1395
- font-family: var( --default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" );
1396
- font-feature-settings: var(--default-font-feature-settings, normal);
1397
- font-variation-settings: var( --default-font-variation-settings, normal );
1403
+ font-family: "Inter", sans-serif;
1404
+ font-feature-settings: initial;
1405
+ font-variation-settings: initial;
1398
1406
  -webkit-tap-highlight-color: transparent;
1399
1407
  }
1400
- body {
1401
- line-height: inherit;
1402
- }
1403
1408
  hr {
1404
1409
  height: 0;
1405
1410
  color: inherit;
@@ -1422,9 +1427,10 @@ input[type="number"] {
1422
1427
  font-weight: bolder;
1423
1428
  }
1424
1429
  code, kbd, samp, pre {
1425
- font-family: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace );
1426
- font-feature-settings: var( --default-mono-font-feature-settings, normal );
1427
- font-variation-settings: var( --default-mono-font-variation-settings, normal );
1430
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
1431
+ "Courier New", monospace;
1432
+ font-feature-settings: initial;
1433
+ font-variation-settings: initial;
1428
1434
  font-size: 1em;
1429
1435
  }
1430
1436
  small {
@@ -1488,7 +1494,11 @@ input[type="number"] {
1488
1494
  }
1489
1495
  ::placeholder {
1490
1496
  opacity: 1;
1491
- color: color-mix(in oklab, currentColor 50%, transparent);
1497
+ }
1498
+ @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
1499
+ ::placeholder {
1500
+ color: color-mix(in oklab, currentColor 50%, transparent);
1501
+ }
1492
1502
  }
1493
1503
  textarea {
1494
1504
  resize: vertical;
@@ -1523,6 +1533,12 @@ input[type="number"] {
1523
1533
  }
1524
1534
  }
1525
1535
  @layer utilities;
1536
+ @layer base {
1537
+ * {
1538
+ scrollbar-color: initial;
1539
+ scrollbar-width: initial;
1540
+ }
1541
+ }
1526
1542
  @property --tw-rotate-x {
1527
1543
  syntax: "*";
1528
1544
  inherits: false;
package/dist/index.html CHANGED
@@ -94,4 +94,4 @@
94
94
  "@powerhousedao/reactor-browser/utils/index": "/modules/@powerhousedao/reactor-browser/utils/index.js",
95
95
  "@powerhousedao/reactor-browser/utils/signature": "/modules/@powerhousedao/reactor-browser/utils/signature.js"
96
96
  }
97
- }</script><script type="module" crossorigin="" src="/assets/main.Hm4UID1Z.js"></script></head><body><div id="app"></div></body></html>
97
+ }</script><script type="module" crossorigin="" src="/assets/main.BvYgkrO6.js"></script></head><body><div id="app"></div></body></html>
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  atom,
3
3
  useAtom
4
- } from "./chunk-FW7N6EJH.js";
4
+ } from "./chunk-C7QRY43M.js";
5
5
  import {
6
6
  BrowserKeyStorage
7
7
  } from "./chunk-YWKVPJNL.js";
@@ -4,7 +4,7 @@ import {
4
4
  ReactorBuilder,
5
5
  memory_default,
6
6
  mergeOperations
7
- } from "./chunk-A4GIWVYS.js";
7
+ } from "./chunk-N5UNGAA6.js";
8
8
  import {
9
9
  __commonJS,
10
10
  __require,
@@ -1,4 +1,4 @@
1
- // ../../node_modules/.pnpm/jotai@2.12.2_@types+react@18.3.18_react@18.3.1/node_modules/jotai/esm/vanilla/internals.mjs
1
+ // ../../node_modules/.pnpm/jotai@2.12.2_@types+react@18.3.20_react@18.3.1/node_modules/jotai/esm/vanilla/internals.mjs
2
2
  var isSelfAtom = (atom2, a) => atom2.unstable_is ? atom2.unstable_is(a) : a === atom2;
3
3
  var hasInitialValue = (atom2) => "init" in atom2;
4
4
  var isActuallyWritableAtom = (atom2) => !!atom2.write;
@@ -533,7 +533,7 @@ var INTERNAL_buildStoreRev1 = buildStore;
533
533
  var INTERNAL_initializeStoreHooks = initializeStoreHooks;
534
534
  var INTERNAL_registerAbortHandler = registerAbortHandler;
535
535
 
536
- // ../../node_modules/.pnpm/jotai@2.12.2_@types+react@18.3.18_react@18.3.1/node_modules/jotai/esm/vanilla.mjs
536
+ // ../../node_modules/.pnpm/jotai@2.12.2_@types+react@18.3.20_react@18.3.1/node_modules/jotai/esm/vanilla.mjs
537
537
  var keyCount = 0;
538
538
  function atom(read, write) {
539
539
  const key = `atom${++keyCount}`;
@@ -643,7 +643,7 @@ function getDefaultStore() {
643
643
  return defaultStore;
644
644
  }
645
645
 
646
- // ../../node_modules/.pnpm/jotai@2.12.2_@types+react@18.3.18_react@18.3.1/node_modules/jotai/esm/react.mjs
646
+ // ../../node_modules/.pnpm/jotai@2.12.2_@types+react@18.3.20_react@18.3.1/node_modules/jotai/esm/react.mjs
647
647
  import ReactExports, { createContext, useContext, useRef, createElement, useReducer, useEffect, useDebugValue, useCallback } from "react";
648
648
  var StoreContext = createContext(
649
649
  void 0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useDocumentDrives
3
- } from "./chunk-M2UUQ5LH.js";
3
+ } from "./chunk-U34SEKEB.js";
4
4
  import {
5
5
  useUserPermissions
6
6
  } from "./chunk-OVGOA2P5.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useDriveActions
3
- } from "./chunk-PQ4UODLR.js";
3
+ } from "./chunk-UDKYG6I4.js";
4
4
  import {
5
5
  useDriveContext
6
6
  } from "./chunk-XBTEGV5M.js";
@@ -12163,6 +12163,80 @@ var PullResponderTransmitter = class _PullResponderTransmitter {
12163
12163
  }
12164
12164
  };
12165
12165
 
12166
+ // ../../packages/document-drive/dist/src/server/listener/transmitter/switchboard-push.js
12167
+ var import_json_stringify_deterministic = __toESM(require_lib(), 1);
12168
+ var SYNC_OPS_BATCH_LIMIT = 10;
12169
+ var SwitchboardPushTransmitter = class {
12170
+ targetURL;
12171
+ logger = childLogger([
12172
+ "SwitchboardPushTransmitter",
12173
+ Math.floor(Math.random() * 999).toString()
12174
+ ]);
12175
+ constructor(targetURL) {
12176
+ this.targetURL = targetURL;
12177
+ }
12178
+ async transmit(strands, source) {
12179
+ if (source.type === "trigger" && source.trigger.data?.url === this.targetURL) {
12180
+ this.logger.verbose(`Cutting trigger loop from ${this.targetURL}.`);
12181
+ return strands.map((strand) => ({
12182
+ driveId: strand.driveId,
12183
+ documentId: strand.documentId,
12184
+ scope: strand.scope,
12185
+ branch: strand.branch,
12186
+ status: "SUCCESS",
12187
+ revision: strand.operations.at(-1)?.index ?? -1
12188
+ }));
12189
+ }
12190
+ const culledStrands = [];
12191
+ let opsCounter = 0;
12192
+ for (let s = 0; opsCounter <= SYNC_OPS_BATCH_LIMIT && s < strands.length; s++) {
12193
+ const currentStrand = strands.at(s);
12194
+ if (!currentStrand) {
12195
+ break;
12196
+ }
12197
+ const newOps = Math.min(SYNC_OPS_BATCH_LIMIT - opsCounter, currentStrand.operations.length);
12198
+ culledStrands.push({
12199
+ ...currentStrand,
12200
+ operations: currentStrand.operations.slice(0, newOps)
12201
+ });
12202
+ opsCounter += newOps;
12203
+ }
12204
+ this.logger.verbose(` Total update: [${strands.map((s) => s.operations.length).join(", ")}] operations`);
12205
+ this.logger.verbose(`Culled update: [${culledStrands.map((s) => s.operations.length).join(", ")}] operations`);
12206
+ try {
12207
+ const { pushUpdates } = await requestGraphql(this.targetURL, gql`
12208
+ mutation pushUpdates($strands: [InputStrandUpdate!]) {
12209
+ pushUpdates(strands: $strands) {
12210
+ driveId
12211
+ documentId
12212
+ scope
12213
+ branch
12214
+ status
12215
+ revision
12216
+ error
12217
+ }
12218
+ }
12219
+ `, {
12220
+ strands: culledStrands.map((strand) => ({
12221
+ ...strand,
12222
+ operations: strand.operations.map((op) => ({
12223
+ ...op,
12224
+ input: (0, import_json_stringify_deterministic.default)(op.input)
12225
+ }))
12226
+ }))
12227
+ });
12228
+ if (!pushUpdates) {
12229
+ throw new Error("Couldn't update listener revision");
12230
+ }
12231
+ return pushUpdates;
12232
+ } catch (e) {
12233
+ this.logger.error(e);
12234
+ throw e;
12235
+ }
12236
+ return [];
12237
+ }
12238
+ };
12239
+
12166
12240
  // ../../packages/document-drive/dist/src/server/types.js
12167
12241
  var TransmitterType;
12168
12242
  (function(TransmitterType2) {
@@ -12403,6 +12477,26 @@ var BaseDocumentDriveServer = class {
12403
12477
  if (this.shouldSyncRemoteDrive(drive)) {
12404
12478
  await this.startSyncRemoteDrive(driveId);
12405
12479
  }
12480
+ for (const zodListener of drive.state.local.listeners) {
12481
+ if (zodListener.callInfo?.transmitterType === "SwitchboardPush") {
12482
+ const transmitter = new SwitchboardPushTransmitter(zodListener.callInfo?.data ?? "");
12483
+ this.listenerManager.setListener(driveId, {
12484
+ block: zodListener.block,
12485
+ driveId: drive.state.global.id,
12486
+ filter: {
12487
+ branch: zodListener.filter?.branch ?? [],
12488
+ documentId: zodListener.filter?.documentId ?? [],
12489
+ documentType: zodListener.filter?.documentType ?? [],
12490
+ scope: zodListener.filter?.scope ?? []
12491
+ },
12492
+ listenerId: zodListener.listenerId,
12493
+ callInfo: zodListener.callInfo,
12494
+ system: zodListener.system,
12495
+ label: zodListener.label ?? "",
12496
+ transmitter
12497
+ });
12498
+ }
12499
+ }
12406
12500
  }
12407
12501
  // Delegate synchronization methods to synchronizationManager
12408
12502
  getSynchronizationUnits(driveId, documentId, scope, branch, documentType2) {
@@ -13583,80 +13677,6 @@ var ListenerManager = class _ListenerManager {
13583
13677
  }
13584
13678
  };
13585
13679
 
13586
- // ../../packages/document-drive/dist/src/server/listener/transmitter/switchboard-push.js
13587
- var import_json_stringify_deterministic = __toESM(require_lib(), 1);
13588
- var SYNC_OPS_BATCH_LIMIT = 10;
13589
- var SwitchboardPushTransmitter = class {
13590
- targetURL;
13591
- logger = childLogger([
13592
- "SwitchboardPushTransmitter",
13593
- Math.floor(Math.random() * 999).toString()
13594
- ]);
13595
- constructor(targetURL) {
13596
- this.targetURL = targetURL;
13597
- }
13598
- async transmit(strands, source) {
13599
- if (source.type === "trigger" && source.trigger.data?.url === this.targetURL) {
13600
- this.logger.verbose(`Cutting trigger loop from ${this.targetURL}.`);
13601
- return strands.map((strand) => ({
13602
- driveId: strand.driveId,
13603
- documentId: strand.documentId,
13604
- scope: strand.scope,
13605
- branch: strand.branch,
13606
- status: "SUCCESS",
13607
- revision: strand.operations.at(-1)?.index ?? -1
13608
- }));
13609
- }
13610
- const culledStrands = [];
13611
- let opsCounter = 0;
13612
- for (let s = 0; opsCounter <= SYNC_OPS_BATCH_LIMIT && s < strands.length; s++) {
13613
- const currentStrand = strands.at(s);
13614
- if (!currentStrand) {
13615
- break;
13616
- }
13617
- const newOps = Math.min(SYNC_OPS_BATCH_LIMIT - opsCounter, currentStrand.operations.length);
13618
- culledStrands.push({
13619
- ...currentStrand,
13620
- operations: currentStrand.operations.slice(0, newOps)
13621
- });
13622
- opsCounter += newOps;
13623
- }
13624
- this.logger.verbose(` Total update: [${strands.map((s) => s.operations.length).join(", ")}] operations`);
13625
- this.logger.verbose(`Culled update: [${culledStrands.map((s) => s.operations.length).join(", ")}] operations`);
13626
- try {
13627
- const { pushUpdates } = await requestGraphql(this.targetURL, gql`
13628
- mutation pushUpdates($strands: [InputStrandUpdate!]) {
13629
- pushUpdates(strands: $strands) {
13630
- driveId
13631
- documentId
13632
- scope
13633
- branch
13634
- status
13635
- revision
13636
- error
13637
- }
13638
- }
13639
- `, {
13640
- strands: culledStrands.map((strand) => ({
13641
- ...strand,
13642
- operations: strand.operations.map((op) => ({
13643
- ...op,
13644
- input: (0, import_json_stringify_deterministic.default)(op.input)
13645
- }))
13646
- }))
13647
- });
13648
- if (!pushUpdates) {
13649
- throw new Error("Couldn't update listener revision");
13650
- }
13651
- return pushUpdates;
13652
- } catch (e) {
13653
- this.logger.error(e);
13654
- throw e;
13655
- }
13656
- return [];
13657
- }
13658
- };
13659
-
13660
13680
  // ../../packages/document-drive/dist/src/server/listener/transmitter/factory.js
13661
13681
  var TransmitterFactory = class {
13662
13682
  listenerManager;
@@ -4,11 +4,11 @@ import {
4
4
  } from "./chunk-IQTSFTNF.js";
5
5
  import {
6
6
  useAddDebouncedOperations
7
- } from "./chunk-45DCPCA7.js";
7
+ } from "./chunk-CO2RVWYY.js";
8
8
  import {
9
9
  useConnectCrypto,
10
10
  useConnectDid
11
- } from "./chunk-G6LMXRY5.js";
11
+ } from "./chunk-2ONJ2PX4.js";
12
12
  import {
13
13
  useDocumentDispatch
14
14
  } from "./chunk-GDP7BUIH.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-P6NJ6IAQ.js";
7
7
  import {
8
8
  ReadDriveNotFoundError
9
- } from "./chunk-A4GIWVYS.js";
9
+ } from "./chunk-N5UNGAA6.js";
10
10
 
11
11
  // ../../packages/reactor-browser/dist/src/context/read-mode.js
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  atom,
3
3
  useAtom
4
- } from "./chunk-FW7N6EJH.js";
4
+ } from "./chunk-C7QRY43M.js";
5
5
  import {
6
6
  documentToHash
7
7
  } from "./chunk-P6NJ6IAQ.js";
@@ -9,7 +9,7 @@ import {
9
9
  // ../../packages/reactor-browser/dist/src/hooks/useDocumentDrives.js
10
10
  import { useMemo, useCallback } from "react";
11
11
 
12
- // ../../node_modules/.pnpm/jotai@2.12.2_@types+react@18.3.18_react@18.3.1/node_modules/jotai/esm/vanilla/utils.mjs
12
+ // ../../node_modules/.pnpm/jotai@2.12.2_@types+react@18.3.20_react@18.3.1/node_modules/jotai/esm/vanilla/utils.mjs
13
13
  var RESET = Symbol(
14
14
  (import.meta.env ? import.meta.env.MODE : void 0) !== "production" ? "RESET" : ""
15
15
  );
@@ -8,7 +8,7 @@ import {
8
8
  isFolderNode,
9
9
  moveNode,
10
10
  updateNode
11
- } from "./chunk-A4GIWVYS.js";
11
+ } from "./chunk-N5UNGAA6.js";
12
12
  import {
13
13
  generateId
14
14
  } from "./chunk-FQF4YAVC.js";
@@ -3,10 +3,10 @@ import {
3
3
  ReadModeContext,
4
4
  ReadModeContextProvider,
5
5
  useReadModeContext
6
- } from "../chunk-UP4DC4D2.js";
6
+ } from "../chunk-OYYVE7RP.js";
7
7
  import "../chunk-OVGOA2P5.js";
8
8
  import "../chunk-P6NJ6IAQ.js";
9
- import "../chunk-A4GIWVYS.js";
9
+ import "../chunk-N5UNGAA6.js";
10
10
  import "../chunk-FQF4YAVC.js";
11
11
  import "../chunk-2ESYSVXG.js";
12
12
  export {
@@ -2,10 +2,10 @@ import {
2
2
  ReadModeContext,
3
3
  ReadModeContextProvider,
4
4
  useReadModeContext
5
- } from "../chunk-UP4DC4D2.js";
5
+ } from "../chunk-OYYVE7RP.js";
6
6
  import "../chunk-OVGOA2P5.js";
7
7
  import "../chunk-P6NJ6IAQ.js";
8
- import "../chunk-A4GIWVYS.js";
8
+ import "../chunk-N5UNGAA6.js";
9
9
  import "../chunk-FQF4YAVC.js";
10
10
  import "../chunk-2ESYSVXG.js";
11
11
  export {
@@ -1,10 +1,10 @@
1
1
  import "../chunk-DKDARAJS.js";
2
2
  import {
3
3
  useDriveActionsWithUiNodes
4
- } from "../chunk-YDERCA5J.js";
4
+ } from "../chunk-IC6B3767.js";
5
5
  import {
6
6
  useDriveActions
7
- } from "../chunk-PQ4UODLR.js";
7
+ } from "../chunk-UDKYG6I4.js";
8
8
  import {
9
9
  DriveContextProvider,
10
10
  useDriveContext
@@ -39,25 +39,25 @@ import {
39
39
  import {
40
40
  useDocumentEditor,
41
41
  useDocumentEditorProps
42
- } from "../chunk-F3RCGUF6.js";
42
+ } from "../chunk-NHD6VUCD.js";
43
43
  import "../chunk-IQTSFTNF.js";
44
- import "../chunk-45DCPCA7.js";
44
+ import "../chunk-CO2RVWYY.js";
45
45
  import {
46
46
  useConnectCrypto,
47
47
  useConnectDid
48
- } from "../chunk-G6LMXRY5.js";
48
+ } from "../chunk-2ONJ2PX4.js";
49
49
  import "../chunk-GDP7BUIH.js";
50
50
  import {
51
51
  documentDrivesInitializedMapAtomFamily,
52
52
  drivesToHash,
53
53
  useDocumentDrives
54
- } from "../chunk-M2UUQ5LH.js";
55
- import "../chunk-FW7N6EJH.js";
54
+ } from "../chunk-U34SEKEB.js";
55
+ import "../chunk-C7QRY43M.js";
56
56
  import {
57
57
  useUserPermissions
58
58
  } from "../chunk-OVGOA2P5.js";
59
59
  import "../chunk-P6NJ6IAQ.js";
60
- import "../chunk-A4GIWVYS.js";
60
+ import "../chunk-N5UNGAA6.js";
61
61
  import "../chunk-FQF4YAVC.js";
62
62
  import "../chunk-YWKVPJNL.js";
63
63
  import "../chunk-2X2M6BYG.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  useAddDebouncedOperations
3
- } from "../chunk-45DCPCA7.js";
4
- import "../chunk-M2UUQ5LH.js";
5
- import "../chunk-FW7N6EJH.js";
3
+ } from "../chunk-CO2RVWYY.js";
4
+ import "../chunk-U34SEKEB.js";
5
+ import "../chunk-C7QRY43M.js";
6
6
  import "../chunk-OVGOA2P5.js";
7
7
  import "../chunk-P6NJ6IAQ.js";
8
8
  import "../chunk-2ESYSVXG.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  useConnectCrypto,
3
3
  useConnectDid
4
- } from "../chunk-G6LMXRY5.js";
5
- import "../chunk-FW7N6EJH.js";
4
+ } from "../chunk-2ONJ2PX4.js";
5
+ import "../chunk-C7QRY43M.js";
6
6
  import "../chunk-YWKVPJNL.js";
7
7
  import "../chunk-2X2M6BYG.js";
8
8
  import "../chunk-2ESYSVXG.js";
@@ -2,8 +2,8 @@ import {
2
2
  documentDrivesInitializedMapAtomFamily,
3
3
  drivesToHash,
4
4
  useDocumentDrives
5
- } from "../chunk-M2UUQ5LH.js";
6
- import "../chunk-FW7N6EJH.js";
5
+ } from "../chunk-U34SEKEB.js";
6
+ import "../chunk-C7QRY43M.js";
7
7
  import "../chunk-P6NJ6IAQ.js";
8
8
  import "../chunk-2ESYSVXG.js";
9
9
  export {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  useDocumentEditor,
3
3
  useDocumentEditorProps
4
- } from "../chunk-F3RCGUF6.js";
4
+ } from "../chunk-NHD6VUCD.js";
5
5
  import "../chunk-IQTSFTNF.js";
6
- import "../chunk-45DCPCA7.js";
7
- import "../chunk-G6LMXRY5.js";
6
+ import "../chunk-CO2RVWYY.js";
7
+ import "../chunk-2ONJ2PX4.js";
8
8
  import "../chunk-GDP7BUIH.js";
9
- import "../chunk-M2UUQ5LH.js";
10
- import "../chunk-FW7N6EJH.js";
9
+ import "../chunk-U34SEKEB.js";
10
+ import "../chunk-C7QRY43M.js";
11
11
  import "../chunk-OVGOA2P5.js";
12
12
  import "../chunk-P6NJ6IAQ.js";
13
13
  import "../chunk-FQF4YAVC.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useDriveActions
3
- } from "../chunk-PQ4UODLR.js";
4
- import "../chunk-A4GIWVYS.js";
3
+ } from "../chunk-UDKYG6I4.js";
4
+ import "../chunk-N5UNGAA6.js";
5
5
  import "../chunk-FQF4YAVC.js";
6
6
  import "../chunk-2ESYSVXG.js";
7
7
  export {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useDriveActionsWithUiNodes
3
- } from "../chunk-YDERCA5J.js";
4
- import "../chunk-PQ4UODLR.js";
3
+ } from "../chunk-IC6B3767.js";
4
+ import "../chunk-UDKYG6I4.js";
5
5
  import "../chunk-XBTEGV5M.js";
6
6
  import "../chunk-RGIB4DD4.js";
7
7
  import "../chunk-7OQWVUC5.js";
8
8
  import "../chunk-ZL5IPB6D.js";
9
- import "../chunk-A4GIWVYS.js";
9
+ import "../chunk-N5UNGAA6.js";
10
10
  import "../chunk-FQF4YAVC.js";
11
11
  import "../chunk-2ESYSVXG.js";
12
12
  export {