@powerhousedao/connect 1.0.14-staging.0 → 1.0.14-staging.2

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 (26) hide show
  1. package/dist/assets/{app-Bv7s5e1T.js → app-C4TJlScz.js} +110 -106
  2. package/dist/assets/{app-PiC0Ta1H.css → app-Dgg_a3j6.css} +57 -81
  3. package/dist/assets/{app-loader-_MQrOY_E.js → app-loader-CYoe8tme.js} +211 -199
  4. package/dist/assets/{ccip-CSwsypx8.js → ccip-CEHlMpiW.js} +3 -3
  5. package/dist/assets/{content-B_zQBC8D.js → content-DglJo78i.js} +18 -3
  6. package/dist/assets/{index-BC3RcytG.js → index-CLeV0FFE.js} +3 -3
  7. package/dist/assets/{index-6A-J7PP1.js → index-Z28MxXUW.js} +60 -60
  8. package/dist/assets/{index-B0JWl_uK.js → index-uzWyTaAW.js} +3 -3
  9. package/dist/assets/{main.BDYWtQzk.js → main.CnCSFm3W.js} +1 -1
  10. package/dist/external-packages.js +4 -1
  11. package/dist/index.html +1 -1
  12. package/dist/modules/@powerhousedao/reactor-browser/{chunk-IME4ZUL6.js → chunk-DLRUYMO4.js} +16 -4
  13. package/dist/modules/@powerhousedao/reactor-browser/{chunk-QGLDHTUZ.js → chunk-EJ6TL4YI.js} +1 -1
  14. package/dist/modules/@powerhousedao/reactor-browser/{chunk-MLHWWUYZ.js → chunk-KOQOG5LA.js} +1 -1
  15. package/dist/modules/@powerhousedao/reactor-browser/{chunk-HJFVYPII.js → chunk-QN247DH5.js} +1 -1
  16. package/dist/modules/@powerhousedao/reactor-browser/{chunk-SJR6F726.js → chunk-RGFGC5EB.js} +1 -1
  17. package/dist/modules/@powerhousedao/reactor-browser/context/index.js +2 -2
  18. package/dist/modules/@powerhousedao/reactor-browser/context/read-mode.js +2 -2
  19. package/dist/modules/@powerhousedao/reactor-browser/hooks/index.js +3 -3
  20. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActions.js +2 -2
  21. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes.js +3 -3
  22. package/dist/modules/@powerhousedao/reactor-browser/index.js +5 -5
  23. package/dist/modules/@powerhousedao/reactor-browser/reactor.js +2 -2
  24. package/dist/vite-envs.sh +1 -1
  25. package/package.json +7 -7
  26. package/dist/assets/external-packages-nwfrlbiu.js +0 -4
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-Bv7s5e1T.js","assets/main.BDYWtQzk.js","assets/app-PiC0Ta1H.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-C4TJlScz.js","assets/main.CnCSFm3W.js","assets/app-Dgg_a3j6.css"])))=>i.map(i=>d[i]);
2
2
  var __defProp = Object.defineProperty;
3
3
  var __typeError = (msg) => {
4
4
  throw TypeError(msg);
@@ -11,7 +11,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
11
11
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
12
12
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
13
13
  var _tags, _levelString, _errorHandler, _ConsoleLogger_instances, levelValue_get, _getDocumentModelModule, _drives, _ReadModeService_instances, parseGraphQLErrors_fn, fetchDrive_fn, _a, _ServiceWorkerManager_instances, handleServiceWorkerMessage_fn, handleServiceWorker_fn;
14
- import { _ as __vitePreload } from "./main.BDYWtQzk.js";
14
+ import { _ as __vitePreload } from "./main.CnCSFm3W.js";
15
15
  import { jsx, jsxs } from "react/jsx-runtime";
16
16
  import { useState, useEffect, Suspense, lazy } from "react";
17
17
  function _mergeNamespaces(n, m) {
@@ -22508,6 +22508,7 @@ class DefaultDrivesManager {
22508
22508
  }
22509
22509
  const PULL_DRIVE_INTERVAL = 1500;
22510
22510
  const MAX_REVISIONS_PER_ACK = 100;
22511
+ const MAX_PULLS = 50;
22511
22512
  let _staticLogger;
22512
22513
  const staticLogger = () => {
22513
22514
  if (!_staticLogger) {
@@ -22685,6 +22686,8 @@ class PullResponderTransmitter {
22685
22686
  * All other errors are caught, logged, and passed to `onError`.
22686
22687
  *
22687
22688
  * Because of this, `onError` _may be called multiple times_.
22689
+ *
22690
+ * @returns boolean indicating whether there might be more data to pull
22688
22691
  */
22689
22692
  static async executePull(driveId, trigger, onStrandUpdate, onError, onRevisions, onAcknowledge) {
22690
22693
  var _a2, _b;
@@ -22710,7 +22713,7 @@ class PullResponderTransmitter {
22710
22713
  } catch (error2) {
22711
22714
  staticLogger().error(`Could not resolve 'Listener not found' error by registering a new pull responder for drive: ${driveId}, listenerId: ${listenerId}: ${error2}`);
22712
22715
  onError(error2);
22713
- return;
22716
+ return false;
22714
22717
  }
22715
22718
  break;
22716
22719
  }
@@ -22719,7 +22722,7 @@ class PullResponderTransmitter {
22719
22722
  if (!strands) {
22720
22723
  staticLogger().error(`Error pulling strands for drive, and could not auto-register: ${driveId}, listenerId: ${trigger.data.listenerId}: ${error}`);
22721
22724
  onError(error);
22722
- return;
22725
+ return false;
22723
22726
  }
22724
22727
  if (!strands.length) {
22725
22728
  staticLogger().verbose(`[SYNC DEBUG] No strands returned in pull cycle for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
@@ -22729,7 +22732,7 @@ class PullResponderTransmitter {
22729
22732
  staticLogger().error(`Error calling onRevisions for drive: ${driveId}, listenerId: ${trigger.data.listenerId}: ${error2}`);
22730
22733
  onError(error2);
22731
22734
  }
22732
- return;
22735
+ return false;
22733
22736
  }
22734
22737
  staticLogger().verbose(`[SYNC DEBUG] Processing ${strands.length} strands in pull cycle for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
22735
22738
  const listenerRevisions = [];
@@ -22794,6 +22797,7 @@ class PullResponderTransmitter {
22794
22797
  staticLogger().error(`Error calling onAcknowledge for drive: ${driveId}, listenerId: ${trigger.data.listenerId}: ${error2}`);
22795
22798
  onError(error2);
22796
22799
  }
22800
+ return strands.length > 0;
22797
22801
  }
22798
22802
  static setupPull(driveId, trigger, onStrandUpdate, onError, onRevisions, onAcknowledge) {
22799
22803
  staticLogger().verbose(`[SYNC DEBUG] PullResponderTransmitter.setupPull initiated for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
@@ -22814,7 +22818,15 @@ class PullResponderTransmitter {
22814
22818
  const executeLoop = async () => {
22815
22819
  while (!isCancelled) {
22816
22820
  staticLogger().verbose(`[SYNC DEBUG] Starting pull cycle for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
22817
- await this.executePull(driveId, trigger, onStrandUpdate, onError, onRevisions, onAcknowledge);
22821
+ let counter = 0;
22822
+ let hasMore = true;
22823
+ while (hasMore && !isCancelled && counter < MAX_PULLS) {
22824
+ counter++;
22825
+ hasMore = await this.executePull(driveId, trigger, onStrandUpdate, onError, onRevisions, onAcknowledge);
22826
+ if (hasMore) {
22827
+ staticLogger().verbose(`[SYNC DEBUG] More strands available, continuing pull cycle for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
22828
+ }
22829
+ }
22818
22830
  staticLogger().verbose(`[SYNC DEBUG] Completed pull cycle for drive: ${driveId}, listenerId: ${trigger.data.listenerId}, waiting ${loopInterval}ms for next cycle`);
22819
22831
  await new Promise((resolve) => {
22820
22832
  staticLogger().verbose(`Scheduling next pull in ${loopInterval} ms`);
@@ -25772,7 +25784,7 @@ const nodeOptionsMap = {
25772
25784
  };
25773
25785
  const name = "@powerhousedao/connect";
25774
25786
  const productName = "Powerhouse-Connect";
25775
- const version$1 = "1.0.14-staging.0";
25787
+ const version$1 = "1.0.14-staging.2";
25776
25788
  const description = "Powerhouse Connect";
25777
25789
  const main = "./dist/index.html";
25778
25790
  const type = "module";
@@ -31377,203 +31389,203 @@ if (window.__VITE_ENVS.MODE === "development") {
31377
31389
  } else {
31378
31390
  serviceWorkerManager.registerServiceWorker(false);
31379
31391
  }
31380
- const App = lazy(() => __vitePreload(() => import("./app-Bv7s5e1T.js").then((n) => n.aN), true ? __vite__mapDeps([0,1,2]) : void 0));
31392
+ const App = lazy(() => __vitePreload(() => import("./app-C4TJlScz.js").then((n) => n.aQ), true ? __vite__mapDeps([0,1,2]) : void 0));
31381
31393
  const AppLoader = /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(App, {}) });
31382
31394
  const appLoader = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
31383
31395
  __proto__: null,
31384
31396
  default: AppLoader
31385
31397
  }, Symbol.toStringTag, { value: "Module" }));
31386
31398
  export {
31387
- isAbstractType as $,
31388
- isEnumType as A,
31389
- print as B,
31390
- isPrintableAsBlockString as C,
31391
- DELETE as D,
31392
- astFromValue as E,
31393
- FILE as F,
31394
- GraphQLError as G,
31395
- DEFAULT_DEPRECATION_REASON as H,
31396
- Icon as I,
31397
- isSpecifiedDirective as J,
31398
- Kind as K,
31399
- isSpecifiedScalarType as L,
31400
- isIntrospectionType as M,
31401
- z as N,
31402
- GraphQLScalarType as O,
31403
- pascalCase as P,
31404
- parse as Q,
31405
- READ as R,
31406
- visit as S,
31407
- buildASTSchema as T,
31408
- UI_NODE as U,
31409
- extendSchema as V,
31410
- WRITE as W,
31411
- getNullableType as X,
31412
- isListType as Y,
31413
- snakeCase as Z,
31414
- constantCase as _,
31415
- getDefaultExportFromCjs as a,
31416
- SetOperationErrorCodeInputSchema as a$,
31417
- BREAK as a0,
31418
- GraphQLInputObjectType as a1,
31419
- GraphQLList as a2,
31420
- GraphQLEnumType as a3,
31421
- GraphQLObjectType as a4,
31422
- GraphQLInterfaceType as a5,
31423
- SchemaMetaFieldDef as a6,
31424
- TypeMetaFieldDef as a7,
31425
- TypeNameMetaFieldDef as a8,
31426
- isCompositeType as a9,
31427
- createReducer as aA,
31428
- isDocumentAction as aB,
31429
- ReorderStateExamplesInputSchema as aC,
31430
- DeleteStateExampleInputSchema as aD,
31431
- UpdateStateExampleInputSchema as aE,
31432
- AddStateExampleInputSchema as aF,
31433
- SetInitialStateInputSchema as aG,
31434
- SetStateSchemaInputSchema as aH,
31435
- ReorderModuleOperationsInputSchema as aI,
31436
- DeleteOperationInputSchema as aJ,
31437
- MoveOperationInputSchema as aK,
31438
- SetOperationReducerInputSchema as aL,
31439
- SetOperationTemplateInputSchema as aM,
31440
- SetOperationDescriptionInputSchema as aN,
31441
- SetOperationSchemaInputSchema as aO,
31442
- SetOperationScopeInputSchema as aP,
31443
- SetOperationNameInputSchema as aQ,
31444
- AddOperationInputSchema as aR,
31445
- ReorderOperationExamplesInputSchema as aS,
31446
- DeleteOperationExampleInputSchema as aT,
31447
- UpdateOperationExampleInputSchema as aU,
31448
- AddOperationExampleInputSchema as aV,
31449
- ReorderOperationErrorsInputSchema as aW,
31450
- DeleteOperationErrorInputSchema as aX,
31451
- SetOperationErrorTemplateInputSchema as aY,
31452
- SetOperationErrorDescriptionInputSchema as aZ,
31453
- SetOperationErrorNameInputSchema as a_,
31454
- isOutputType as aa,
31455
- isInputType as ab,
31456
- GraphQLBoolean as ac,
31457
- assertAbstractType as ad,
31458
- doTypesOverlap as ae,
31459
- DirectiveLocation as af,
31460
- specifiedRules as ag,
31461
- NoUnusedFragmentsRule as ah,
31462
- ExecutableDefinitionsRule as ai,
31463
- validate as aj,
31464
- validateSchema as ak,
31465
- GraphQLID as al,
31466
- GraphQLString as am,
31467
- GraphQLFloat as an,
31468
- GraphQLInt as ao,
31469
- GraphQLDirective as ap,
31470
- GraphQLUnionType as aq,
31471
- isNonNullType as ar,
31472
- GraphQLNonNull as as,
31473
- isNamedType as at,
31474
- isLeafType as au,
31475
- GraphQLSchema as av,
31476
- buildSchema as aw,
31477
- sentenceCase as ax,
31478
- hashKey as ay,
31479
- createAction as az,
31480
- getDimensions as b,
31481
- addTrigger as b$,
31482
- AddOperationErrorInputSchema as b0,
31483
- ReorderModulesInputSchema as b1,
31484
- DeleteModuleInputSchema as b2,
31485
- SetModuleDescriptionInputSchema as b3,
31486
- SetModuleNameInputSchema as b4,
31487
- AddModuleInputSchema as b5,
31488
- ReorderChangeLogItemsInputSchema as b6,
31489
- DeleteChangeLogItemInputSchema as b7,
31490
- UpdateChangeLogItemInputSchema as b8,
31491
- AddChangeLogItemInputSchema as b9,
31492
- getI18n as bA,
31493
- getDefaults as bB,
31494
- hashDocumentStateForScope as bC,
31495
- setErrorHandler as bD,
31496
- createBrowserDocumentDriveServer as bE,
31497
- childLogger as bF,
31498
- reducer as bG,
31499
- isDocumentDrive as bH,
31500
- generateAddNodeAction as bI,
31501
- isFileNode as bJ,
31502
- uploadDocumentOperations as bK,
31503
- updateFile as bL,
31504
- addFolder as bM,
31505
- isFolderNode as bN,
31506
- deleteNode as bO,
31507
- updateNode as bP,
31508
- moveNode as bQ,
31509
- generateNodesCopy as bR,
31510
- copyNode as bS,
31511
- createState as bT,
31512
- setDriveName as bU,
31513
- setAvailableOffline as bV,
31514
- setSharingType as bW,
31515
- SynchronizationUnitNotFoundError as bX,
31516
- removeTrigger as bY,
31517
- generateUUID as bZ,
31518
- PullResponderTransmitter as b_,
31519
- SetAuthorWebsiteInputSchema as ba,
31520
- SetAuthorNameInputSchema as bb,
31521
- SetModelDescriptionInputSchema as bc,
31522
- SetModelExtensionInputSchema as bd,
31523
- SetModelIdInputSchema as be,
31524
- SetModelNameInputSchema as bf,
31525
- baseCreateExtendedState as bg,
31526
- baseCreateDocument as bh,
31527
- baseSaveToFile as bi,
31528
- baseSaveToFileHandle as bj,
31529
- baseLoadFromFile as bk,
31530
- baseLoadFromInput as bl,
31531
- LOCAL as bm,
31532
- commonjsGlobal as bn,
31533
- PUBLIC as bo,
31534
- SWITCHBOARD as bp,
31535
- locationInfoByLocation as bq,
31536
- sharingTypeOptions as br,
31537
- objectType as bs,
31538
- recordType as bt,
31539
- stringType as bu,
31540
- capitalCase as bv,
31541
- CLOUD as bw,
31542
- createZip as bx,
31543
- LZString as by,
31544
- buildSignedOperation as bz,
31545
- connectConfig as c,
31546
- ReadDriveNotFoundError as c0,
31547
- openUrl as c1,
31548
- getNodeOptions as c2,
31549
- requestPublicDrive as c3,
31550
- serviceWorkerManager as c4,
31551
- packageJson as c5,
31552
- t as c6,
31553
- gql as c7,
31554
- request as c8,
31399
+ getDefaultExportFromCjs as $,
31400
+ AddStateExampleInputSchema as A,
31401
+ SetModuleDescriptionInputSchema as B,
31402
+ SetModuleNameInputSchema as C,
31403
+ DeleteStateExampleInputSchema as D,
31404
+ AddModuleInputSchema as E,
31405
+ ReorderChangeLogItemsInputSchema as F,
31406
+ DeleteChangeLogItemInputSchema as G,
31407
+ UpdateChangeLogItemInputSchema as H,
31408
+ AddChangeLogItemInputSchema as I,
31409
+ SetAuthorWebsiteInputSchema as J,
31410
+ SetAuthorNameInputSchema as K,
31411
+ SetModelDescriptionInputSchema as L,
31412
+ MoveOperationInputSchema as M,
31413
+ SetModelExtensionInputSchema as N,
31414
+ SetModelIdInputSchema as O,
31415
+ SetModelNameInputSchema as P,
31416
+ baseCreateExtendedState as Q,
31417
+ ReorderStateExamplesInputSchema as R,
31418
+ SetInitialStateInputSchema as S,
31419
+ baseCreateDocument as T,
31420
+ UpdateStateExampleInputSchema as U,
31421
+ baseSaveToFile as V,
31422
+ baseSaveToFileHandle as W,
31423
+ baseLoadFromFile as X,
31424
+ baseLoadFromInput as Y,
31425
+ pascalCase as Z,
31426
+ Icon as _,
31427
+ createReducer as a,
31428
+ DELETE as a$,
31429
+ LOCAL as a0,
31430
+ commonjsGlobal as a1,
31431
+ PUBLIC as a2,
31432
+ SWITCHBOARD as a3,
31433
+ locationInfoByLocation as a4,
31434
+ sharingTypeOptions as a5,
31435
+ objectType as a6,
31436
+ recordType as a7,
31437
+ stringType as a8,
31438
+ capitalCase as a9,
31439
+ generateNodesCopy as aA,
31440
+ copyNode as aB,
31441
+ createState as aC,
31442
+ setDriveName as aD,
31443
+ setAvailableOffline as aE,
31444
+ setSharingType as aF,
31445
+ SynchronizationUnitNotFoundError as aG,
31446
+ removeTrigger as aH,
31447
+ generateUUID as aI,
31448
+ PullResponderTransmitter as aJ,
31449
+ addTrigger as aK,
31450
+ ReadDriveNotFoundError as aL,
31451
+ openUrl as aM,
31452
+ getNodeOptions as aN,
31453
+ DRIVE as aO,
31454
+ FOLDER as aP,
31455
+ requestPublicDrive as aQ,
31456
+ serviceWorkerManager as aR,
31457
+ packageJson as aS,
31458
+ t as aT,
31459
+ gql as aU,
31460
+ request as aV,
31461
+ getAugmentedNamespace as aW,
31462
+ getDimensions as aX,
31463
+ READ as aY,
31464
+ nodeOptionsMap as aZ,
31465
+ defaultFileOptions as a_,
31466
+ CLOUD as aa,
31467
+ createZip as ab,
31468
+ logger$1 as ac,
31469
+ LZString as ad,
31470
+ buildSignedOperation as ae,
31471
+ getI18n as af,
31472
+ getDefaults as ag,
31473
+ connectConfig as ah,
31474
+ hashDocumentStateForScope as ai,
31475
+ setErrorHandler as aj,
31476
+ driveDocumentModelModule as ak,
31477
+ createBrowserDocumentDriveServer as al,
31478
+ hashKey as am,
31479
+ childLogger as an,
31480
+ reducer as ao,
31481
+ isDocumentDrive as ap,
31482
+ generateAddNodeAction as aq,
31483
+ isFileNode as ar,
31484
+ uploadDocumentOperations as as,
31485
+ updateFile as at,
31486
+ addFolder as au,
31487
+ isFolderNode as av,
31488
+ deleteNode as aw,
31489
+ updateNode as ax,
31490
+ FILE as ay,
31491
+ moveNode as az,
31492
+ SetStateSchemaInputSchema as b,
31493
+ GraphQLInt as b$,
31494
+ RENAME as b0,
31495
+ WRITE as b1,
31496
+ DUPLICATE as b2,
31497
+ defaultFolderOptions as b3,
31498
+ garbageCollect as b4,
31499
+ sortOperations as b5,
31500
+ UI_NODE as b6,
31501
+ undo as b7,
31502
+ redo as b8,
31503
+ useDocumentDispatch as b9,
31504
+ snakeCase as bA,
31505
+ constantCase as bB,
31506
+ isAbstractType as bC,
31507
+ BREAK as bD,
31508
+ GraphQLInputObjectType as bE,
31509
+ GraphQLList as bF,
31510
+ GraphQLEnumType as bG,
31511
+ GraphQLObjectType as bH,
31512
+ GraphQLInterfaceType as bI,
31513
+ SchemaMetaFieldDef as bJ,
31514
+ TypeMetaFieldDef as bK,
31515
+ TypeNameMetaFieldDef as bL,
31516
+ isCompositeType as bM,
31517
+ isOutputType as bN,
31518
+ isInputType as bO,
31519
+ GraphQLBoolean as bP,
31520
+ assertAbstractType as bQ,
31521
+ doTypesOverlap as bR,
31522
+ DirectiveLocation as bS,
31523
+ specifiedRules as bT,
31524
+ NoUnusedFragmentsRule as bU,
31525
+ ExecutableDefinitionsRule as bV,
31526
+ validate as bW,
31527
+ validateSchema as bX,
31528
+ GraphQLID as bY,
31529
+ GraphQLString as bZ,
31530
+ GraphQLFloat as b_,
31531
+ inspect as ba,
31532
+ GraphQLError as bb,
31533
+ getNamedType as bc,
31534
+ invariant as bd,
31535
+ isInputObjectType as be,
31536
+ isScalarType as bf,
31537
+ isObjectType as bg,
31538
+ isInterfaceType as bh,
31539
+ isUnionType as bi,
31540
+ isEnumType as bj,
31541
+ print as bk,
31542
+ isPrintableAsBlockString as bl,
31543
+ Kind as bm,
31544
+ astFromValue as bn,
31545
+ DEFAULT_DEPRECATION_REASON as bo,
31546
+ isSpecifiedDirective as bp,
31547
+ isSpecifiedScalarType as bq,
31548
+ isIntrospectionType as br,
31549
+ z as bs,
31550
+ GraphQLScalarType as bt,
31551
+ parse as bu,
31552
+ visit as bv,
31553
+ buildASTSchema as bw,
31554
+ extendSchema as bx,
31555
+ getNullableType as by,
31556
+ isListType as bz,
31557
+ createAction as c,
31558
+ GraphQLDirective as c0,
31559
+ GraphQLUnionType as c1,
31560
+ isNonNullType as c2,
31561
+ GraphQLNonNull as c3,
31562
+ isNamedType as c4,
31563
+ isLeafType as c5,
31564
+ GraphQLSchema as c6,
31565
+ buildSchema as c7,
31566
+ sentenceCase as c8,
31555
31567
  appLoader as c9,
31556
- defaultFileOptions as d,
31557
- RENAME as e,
31558
- DUPLICATE as f,
31559
- getAugmentedNamespace as g,
31560
- defaultFolderOptions as h,
31561
- garbageCollect as i,
31562
- DRIVE as j,
31563
- useDocumentDispatch as k,
31564
- logger$1 as l,
31565
- FOLDER as m,
31566
- nodeOptionsMap as n,
31567
- driveDocumentModelModule as o,
31568
- inspect as p,
31569
- getNamedType as q,
31570
- redo as r,
31571
- sortOperations as s,
31572
- invariant as t,
31573
- undo as u,
31574
- isInputObjectType as v,
31575
- isScalarType as w,
31576
- isObjectType as x,
31577
- isInterfaceType as y,
31578
- isUnionType as z
31568
+ ReorderModuleOperationsInputSchema as d,
31569
+ DeleteOperationInputSchema as e,
31570
+ SetOperationReducerInputSchema as f,
31571
+ SetOperationTemplateInputSchema as g,
31572
+ SetOperationDescriptionInputSchema as h,
31573
+ isDocumentAction as i,
31574
+ SetOperationSchemaInputSchema as j,
31575
+ SetOperationScopeInputSchema as k,
31576
+ SetOperationNameInputSchema as l,
31577
+ AddOperationInputSchema as m,
31578
+ ReorderOperationExamplesInputSchema as n,
31579
+ DeleteOperationExampleInputSchema as o,
31580
+ UpdateOperationExampleInputSchema as p,
31581
+ AddOperationExampleInputSchema as q,
31582
+ ReorderOperationErrorsInputSchema as r,
31583
+ DeleteOperationErrorInputSchema as s,
31584
+ SetOperationErrorTemplateInputSchema as t,
31585
+ SetOperationErrorDescriptionInputSchema as u,
31586
+ SetOperationErrorNameInputSchema as v,
31587
+ SetOperationErrorCodeInputSchema as w,
31588
+ AddOperationErrorInputSchema as x,
31589
+ ReorderModulesInputSchema as y,
31590
+ DeleteModuleInputSchema as z
31579
31591
  };
@@ -1,7 +1,7 @@
1
- import { B as BaseError, g as getUrl, s as stringify, d as decodeErrorResult, i as isAddressEqual, c as call, a as concat, e as encodeAbiParameters, H as HttpRequestError, b as isHex } from "./app-Bv7s5e1T.js";
2
- import "./main.BDYWtQzk.js";
1
+ import { aG as BaseError, aH as getUrl, aI as stringify, aJ as decodeErrorResult, aK as isAddressEqual, aL as call, aM as concat, aN as encodeAbiParameters, aO as HttpRequestError, aP as isHex } from "./app-C4TJlScz.js";
2
+ import "./main.CnCSFm3W.js";
3
3
  import "react/jsx-runtime";
4
- import "./app-loader-_MQrOY_E.js";
4
+ import "./app-loader-CYoe8tme.js";
5
5
  import "react";
6
6
  import "@powerhousedao/reactor-browser";
7
7
  import "react-dom";
@@ -1,8 +1,8 @@
1
1
  import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
2
- import { t as twMerge, p as Button, q as mergeClassNameProps, E as ERROR, M as MISSING, C as CONFLICT, S as SUCCESS, u as SYNCING, I as INITIAL_SYNC, v as ConnectDropdownMenu, w as useOnClickOutside, x as useEventListener, y as useCopyToClipboard, z as Select, A as ENSAvatar, P as Provider, D as Root3, T as Trigger, F as Portal, G as Content2, J as validateInitialState, K as validateStateSchemaName, L as validateModules, N as useUnwrappedReactor, O as useConnectDid, Q as useConnectCrypto, U as useTranslation, V as useModal, W as useAtomValue, X as themeAtom, Y as useUser, Z as useUserPermissions, _ as useUiNodes, $ as exportFile, a0 as useGetDocumentModelModule, a1 as addActionContext, a2 as signOperation, a3 as useDocumentDriveServer, a4 as useHotkeys, a5 as useGetEditor, a6 as isSameDocument, a7 as useNavigate, a8 as ErrorBoundary, a9 as DriveLayout, aa as SearchBar, ab as useAsyncReactor, ac as useFilteredDocumentModels, ad as useDriveEditor, ae as useDocumentDriveById } from "./app-Bv7s5e1T.js";
2
+ import { t as twMerge, B as Button, m as mergeClassNameProps, E as ERROR, M as MISSING, C as CONFLICT, S as SUCCESS, h as SYNCING, I as INITIAL_SYNC, i as ConnectDropdownMenu, u as useOnClickOutside, j as useEventListener, k as useCopyToClipboard, l as Select, n as ENSAvatar, P as Provider, o as Root3, T as Trigger, p as Portal, q as Content2, v as validateInitialState, w as validateStateSchemaName, x as validateModules, y as useUnwrappedReactor, z as useConnectDid, A as useConnectCrypto, D as useTranslation, F as useModal, G as useAtomValue, H as themeAtom, J as useUser, K as useUserPermissions, L as useUiNodes, N as exportFile, O as useGetDocumentModelModule, Q as addActionContext, U as signOperation, V as useDocumentDriveServer, W as useHotkeys, X as useGetEditor, Y as isSameDocument, Z as useNavigate, _ as ErrorBoundary, $ as DriveLayout, a0 as SearchBar, a1 as useAsyncReactor, a2 as useFilteredDocumentModels, a3 as useDriveEditor, a4 as useDocumentDriveById, a5 as useParams, a6 as useDocumentDrives, a7 as toast } from "./app-C4TJlScz.js";
3
3
  import * as React from "react";
4
4
  import React__default, { useState, useCallback, useMemo, useEffect, Fragment, useRef, useLayoutEffect, memo as memo$1, createElement, useSyncExternalStore, Suspense } from "react";
5
- import { I as Icon, b as getDimensions, R as READ, n as nodeOptionsMap, d as defaultFileOptions, D as DELETE, e as RENAME, W as WRITE, f as DUPLICATE, h as defaultFolderOptions, i as garbageCollect, s as sortOperations, U as UI_NODE, j as DRIVE, F as FILE, u as undo, r as redo, l as logger, k as useDocumentDispatch, m as FOLDER, o as driveDocumentModelModule } from "./app-loader-_MQrOY_E.js";
5
+ import { _ as Icon, aX as getDimensions, aY as READ, aZ as nodeOptionsMap, a_ as defaultFileOptions, a$ as DELETE, b0 as RENAME, b1 as WRITE, b2 as DUPLICATE, b3 as defaultFolderOptions, b4 as garbageCollect, b5 as sortOperations, b6 as UI_NODE, aO as DRIVE, ay as FILE, b7 as undo, b8 as redo, ac as logger, b9 as useDocumentDispatch, aP as FOLDER, ak as driveDocumentModelModule } from "./app-loader-CYoe8tme.js";
6
6
  import { useDocument, useDocumentEditorProps } from "@powerhousedao/reactor-browser";
7
7
  import { useUiNodesContext, FILE as FILE$1 } from "@powerhousedao/reactor-browser/hooks/useUiNodesContext";
8
8
  import { useDriveActionsWithUiNodes } from "@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes";
@@ -10,7 +10,7 @@ import { DriveContextProvider, useDriveContext } from "@powerhousedao/reactor-br
10
10
  import "@powerhousedao/reactor-browser/uiNodes/constants";
11
11
  import { makeDriveDocumentStateHook } from "@powerhousedao/reactor-browser/hooks/document-state";
12
12
  import { flushSync } from "react-dom";
13
- import "./main.BDYWtQzk.js";
13
+ import "./main.CnCSFm3W.js";
14
14
  const PaginationButton = ({ active = false, ...props }) => {
15
15
  const className = twMerge("h-8 min-w-8 border border-solid border-gray-300 bg-white px-3 py-1 text-xs text-gray-900 hover:bg-gray-100", !active && "border-0");
16
16
  return jsx(Button, { color: "light", size: "small", ...mergeClassNameProps(props, className), children: props.children });
@@ -3951,6 +3951,9 @@ function DriveEditorContainer() {
3951
3951
  );
3952
3952
  }
3953
3953
  function Content() {
3954
+ const navigate = useNavigate();
3955
+ const { driveId } = useParams();
3956
+ const [documentDrives, , , status] = useDocumentDrives();
3954
3957
  const uiNodes = useUiNodes();
3955
3958
  const { fileNodeDocument, selectedDriveNode, selectedNode, addFile } = uiNodes;
3956
3959
  useEffect(() => {
@@ -3967,6 +3970,18 @@ function Content() {
3967
3970
  );
3968
3971
  });
3969
3972
  }, [selectedDriveNode, selectedNode, addFile]);
3973
+ useEffect(() => {
3974
+ if ((status === "LOADED" || status === "ERROR") && !documentDrives.find(
3975
+ (d) => d.state.global.id === driveId || d.state.global.slug === driveId || d.state.global.name === driveId
3976
+ )) {
3977
+ toast(/* @__PURE__ */ jsxs("p", { children: [
3978
+ "Drive ",
3979
+ driveId,
3980
+ " not found"
3981
+ ] }), { type: "warning" });
3982
+ navigate("/");
3983
+ }
3984
+ }, [status, driveId, documentDrives]);
3970
3985
  return /* @__PURE__ */ jsx("div", { className: "flex h-full flex-col overflow-auto", id: "content-view", children: fileNodeDocument ? /* @__PURE__ */ jsx(DocumentEditorContainer, {}, fileNodeDocument.documentId) : selectedDriveNode ? /* @__PURE__ */ jsx(DriveEditorContainer, {}, selectedDriveNode.id) : null });
3971
3986
  }
3972
3987
  export {
@@ -1,8 +1,8 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-loader-_MQrOY_E.js","assets/main.BDYWtQzk.js","assets/app-loader-Br74gdhw.css"])))=>i.map(i=>d[i]);
2
- import { _ as __vitePreload } from "./main.BDYWtQzk.js";
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-loader-CYoe8tme.js","assets/main.CnCSFm3W.js","assets/app-loader-Br74gdhw.css"])))=>i.map(i=>d[i]);
2
+ import { _ as __vitePreload } from "./main.CnCSFm3W.js";
3
3
  import { createRoot } from "react-dom/client";
4
4
  async function renderApp(element) {
5
- const AppLoader = await __vitePreload(() => import("./app-loader-_MQrOY_E.js").then((n) => n.c9), true ? __vite__mapDeps([0,1,2]) : void 0);
5
+ const AppLoader = await __vitePreload(() => import("./app-loader-CYoe8tme.js").then((n) => n.c9), true ? __vite__mapDeps([0,1,2]) : void 0);
6
6
  createRoot(element).render(AppLoader.default);
7
7
  }
8
8
  const AppElement = document.getElementById("app");