@powerhousedao/reactor-browser 6.1.0-dev.16 → 6.1.0-dev.18

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/index.js CHANGED
@@ -14,6 +14,7 @@ import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore
14
14
  import slug from "slug";
15
15
  import normalizeException from "normalize-exception";
16
16
  import * as lzString from "lz-string";
17
+ import { createAttachmentClient } from "@powerhousedao/reactor-attachments/client";
17
18
  //#region src/errors.ts
18
19
  var UnsupportedDocumentTypeError = class extends Error {
19
20
  constructor(documentType) {
@@ -1168,6 +1169,15 @@ const phGlobalConfigHooks = {
1168
1169
  ...nonUserConfigHooks
1169
1170
  };
1170
1171
  //#endregion
1172
+ //#region src/hooks/attachment-service.ts
1173
+ const attachmentServiceEventFunctions = makePHEventFunctions("attachmentService");
1174
+ /** Returns the attachment service from window.ph */
1175
+ const useAttachmentService = attachmentServiceEventFunctions.useValue;
1176
+ /** Sets the attachment service on window.ph */
1177
+ const setAttachmentService = attachmentServiceEventFunctions.setValue;
1178
+ /** Registers the attachmentService window event handler */
1179
+ const addAttachmentServiceEventHandler = attachmentServiceEventFunctions.addEventHandler;
1180
+ //#endregion
1171
1181
  //#region src/hooks/features.ts
1172
1182
  const featuresEventFunctions = makePHEventFunctions("features");
1173
1183
  const useFeatures = featuresEventFunctions.useValue;
@@ -1245,6 +1255,40 @@ const setDrives = drivesEventFunctions.setValue;
1245
1255
  /** Adds an event handler for the drives */
1246
1256
  const addDrivesEventHandler = drivesEventFunctions.addEventHandler;
1247
1257
  //#endregion
1258
+ //#region src/hooks/set-selected-node.ts
1259
+ const selectedNodeIdEventFunctions = makePHEventFunctions("selectedNodeId");
1260
+ const useSelectedNodeId = selectedNodeIdEventFunctions.useValue;
1261
+ const setSelectedNodeId = selectedNodeIdEventFunctions.setValue;
1262
+ const addSelectedNodeIdEventHandler = selectedNodeIdEventFunctions.addEventHandler;
1263
+ /** Sets the selected node (file or folder). */
1264
+ function setSelectedNode(nodeOrNodeSlug) {
1265
+ const nodeSlug = typeof nodeOrNodeSlug === "string" ? nodeOrNodeSlug : makeNodeSlug(nodeOrNodeSlug);
1266
+ setSelectedNodeId(extractNodeIdFromSlug(nodeSlug));
1267
+ const driveSlugFromPath = extractDriveSlugFromPath(window.location.pathname);
1268
+ if (!driveSlugFromPath) return;
1269
+ if (!nodeSlug) {
1270
+ const pathname = resolveUrlPathname(`/d/${driveSlugFromPath}`);
1271
+ if (pathname === window.location.pathname) return;
1272
+ window.history.pushState(null, "", createUrlWithPreservedParams(pathname));
1273
+ return;
1274
+ }
1275
+ const pathname = resolveUrlPathname(`/d/${driveSlugFromPath}/${nodeSlug}`);
1276
+ if (pathname === window.location.pathname) return;
1277
+ window.history.pushState(null, "", createUrlWithPreservedParams(pathname));
1278
+ }
1279
+ function addResetSelectedNodeEventHandler() {
1280
+ window.addEventListener("ph:selectedDriveIdUpdated", () => {
1281
+ setSelectedNodeId(void 0);
1282
+ });
1283
+ }
1284
+ function addSetSelectedNodeOnPopStateEventHandler() {
1285
+ window.addEventListener("popstate", () => {
1286
+ const pathname = window.location.pathname;
1287
+ const nodeSlug = extractNodeSlugFromPath(pathname);
1288
+ if (extractNodeIdFromSlug(nodeSlug) !== window.ph?.selectedNodeId) setSelectedNode(nodeSlug);
1289
+ });
1290
+ }
1291
+ //#endregion
1248
1292
  //#region src/hooks/selected-drive.ts
1249
1293
  const selectedDriveIdEventFunctions = makePHEventFunctions("selectedDriveId");
1250
1294
  /** Returns the selected drive id */
@@ -1269,7 +1313,14 @@ function useSelectedDriveSafe() {
1269
1313
  }
1270
1314
  function setSelectedDrive(driveOrDriveSlug) {
1271
1315
  const driveSlug = typeof driveOrDriveSlug === "string" ? driveOrDriveSlug : driveOrDriveSlug?.header.slug;
1272
- const driveId = (window.ph?.drives?.find((d) => d.header.slug === driveSlug))?.header.id;
1316
+ const drives = window.ph?.drives;
1317
+ const driveId = (typeof driveOrDriveSlug === "object" && driveOrDriveSlug !== null ? driveOrDriveSlug : drives?.find((d) => d.header.slug === driveSlug))?.header.id;
1318
+ if (!driveId && driveSlug && extractDriveSlugFromPath(window.location.pathname) === driveSlug) {
1319
+ if (window.ph?.selectedDriveId) setSelectedDriveId(void 0);
1320
+ deferDriveSelection(driveSlug);
1321
+ return;
1322
+ }
1323
+ cancelPendingDriveSelection();
1273
1324
  setSelectedDriveId(driveId);
1274
1325
  if (!driveId) {
1275
1326
  const pathname = resolveUrlPathname("/");
@@ -1281,6 +1332,58 @@ function setSelectedDrive(driveOrDriveSlug) {
1281
1332
  if (pathname === window.location.pathname) return;
1282
1333
  window.history.pushState(null, "", createUrlWithPreservedParams(pathname));
1283
1334
  }
1335
+ const DEFERRED_DRIVE_TICK_MS = 2e3;
1336
+ const DEFERRED_DRIVE_MAX_WAIT_MS = 15e3;
1337
+ function isInitialSyncInFlight() {
1338
+ const remotes = window.ph?.reactorClientModule?.reactorModule?.syncModule?.syncManager?.list();
1339
+ if (!remotes?.length) return false;
1340
+ return remotes.some((remote) => {
1341
+ try {
1342
+ const snapshot = remote.channel.getConnectionState();
1343
+ return snapshot.receivingPages || !snapshot.lastSuccessUtcMs && snapshot.state !== "error";
1344
+ } catch {
1345
+ return false;
1346
+ }
1347
+ });
1348
+ }
1349
+ let pendingHandler;
1350
+ let pendingTimeout;
1351
+ function cancelPendingDriveSelection() {
1352
+ if (pendingHandler) {
1353
+ window.removeEventListener("ph:drivesUpdated", pendingHandler);
1354
+ pendingHandler = void 0;
1355
+ }
1356
+ if (pendingTimeout) {
1357
+ clearTimeout(pendingTimeout);
1358
+ pendingTimeout = void 0;
1359
+ }
1360
+ }
1361
+ function deferDriveSelection(driveSlug) {
1362
+ cancelPendingDriveSelection();
1363
+ const nodeSlug = extractNodeSlugFromPath(window.location.pathname);
1364
+ const handler = () => {
1365
+ if (!window.ph?.drives?.find((d) => d.header.slug === driveSlug)) return;
1366
+ cancelPendingDriveSelection();
1367
+ setSelectedDrive(driveSlug);
1368
+ setSelectedNode(nodeSlug);
1369
+ };
1370
+ pendingHandler = handler;
1371
+ window.addEventListener("ph:drivesUpdated", handler);
1372
+ const deadline = Date.now() + DEFERRED_DRIVE_MAX_WAIT_MS;
1373
+ const scheduleTick = () => {
1374
+ pendingTimeout = setTimeout(() => {
1375
+ if (Date.now() < deadline && isInitialSyncInFlight()) {
1376
+ scheduleTick();
1377
+ return;
1378
+ }
1379
+ cancelPendingDriveSelection();
1380
+ const pathname = resolveUrlPathname("/");
1381
+ if (pathname === window.location.pathname) return;
1382
+ window.history.pushState(null, "", createUrlWithPreservedParams(pathname));
1383
+ }, DEFERRED_DRIVE_TICK_MS);
1384
+ };
1385
+ scheduleTick();
1386
+ }
1284
1387
  function addSetSelectedDriveOnPopStateEventHandler() {
1285
1388
  window.addEventListener("popstate", () => {
1286
1389
  const pathname = window.location.pathname;
@@ -1536,43 +1639,11 @@ function isDocumentModelDocument(document) {
1536
1639
  }
1537
1640
  //#endregion
1538
1641
  //#region src/hooks/selected-node.ts
1539
- const selectedNodeIdEventFunctions = makePHEventFunctions("selectedNodeId");
1540
- const useSelectedNodeId = selectedNodeIdEventFunctions.useValue;
1541
- const setSelectedNodeId = selectedNodeIdEventFunctions.setValue;
1542
- const addSelectedNodeIdEventHandler = selectedNodeIdEventFunctions.addEventHandler;
1543
1642
  /** Returns the selected node. */
1544
1643
  function useSelectedNode() {
1545
1644
  const selectedNodeId = useSelectedNodeId();
1546
1645
  return useNodesInSelectedDrive()?.find((n) => n.id === selectedNodeId);
1547
1646
  }
1548
- /** Sets the selected node (file or folder). */
1549
- function setSelectedNode(nodeOrNodeSlug) {
1550
- const nodeSlug = typeof nodeOrNodeSlug === "string" ? nodeOrNodeSlug : makeNodeSlug(nodeOrNodeSlug);
1551
- setSelectedNodeId(extractNodeIdFromSlug(nodeSlug));
1552
- const driveSlugFromPath = extractDriveSlugFromPath(window.location.pathname);
1553
- if (!driveSlugFromPath) return;
1554
- if (!nodeSlug) {
1555
- const pathname = resolveUrlPathname(`/d/${driveSlugFromPath}`);
1556
- if (pathname === window.location.pathname) return;
1557
- window.history.pushState(null, "", createUrlWithPreservedParams(pathname));
1558
- return;
1559
- }
1560
- const pathname = resolveUrlPathname(`/d/${driveSlugFromPath}/${nodeSlug}`);
1561
- if (pathname === window.location.pathname) return;
1562
- window.history.pushState(null, "", createUrlWithPreservedParams(pathname));
1563
- }
1564
- function addResetSelectedNodeEventHandler() {
1565
- window.addEventListener("ph:selectedDriveIdUpdated", () => {
1566
- setSelectedNodeId(void 0);
1567
- });
1568
- }
1569
- function addSetSelectedNodeOnPopStateEventHandler() {
1570
- window.addEventListener("popstate", () => {
1571
- const pathname = window.location.pathname;
1572
- const nodeSlug = extractNodeSlugFromPath(pathname);
1573
- if (nodeSlug !== window.ph?.selectedNodeId) setSelectedNode(nodeSlug);
1574
- });
1575
- }
1576
1647
  //#endregion
1577
1648
  //#region src/hooks/selected-timeline-item.ts
1578
1649
  const selectedTimelineItemEventFunctions = makePHEventFunctions("selectedTimelineItem");
@@ -1671,6 +1742,7 @@ const phGlobalEventHandlerRegisterFunctions = {
1671
1742
  ...commonGlobalEventHandlerFunctions,
1672
1743
  reactorClientModule: addReactorClientModuleEventHandler,
1673
1744
  reactorClient: addReactorClientEventHandler,
1745
+ attachmentService: addAttachmentServiceEventHandler,
1674
1746
  features: addFeaturesEventHandler,
1675
1747
  modal: addModalEventHandler,
1676
1748
  renown: addRenownEventHandler,
@@ -2798,6 +2870,61 @@ function useUserPermissions() {
2798
2870
  };
2799
2871
  }
2800
2872
  //#endregion
2873
+ //#region src/hooks/use-attachments.ts
2874
+ /** Returns an IAttachmentClient wrapping the current IAttachmentService, or undefined if none is set. */
2875
+ function useAttachments() {
2876
+ const service = useAttachmentService();
2877
+ return useMemo(() => service ? createAttachmentClient(service) : void 0, [service]);
2878
+ }
2879
+ /** Upload lifecycle status. progress is coarse (0 before/during, 1 on Done) because RemoteAttachmentUpload buffers the full body before issuing a single PUT. */
2880
+ let UploadStatus = /* @__PURE__ */ function(UploadStatus) {
2881
+ UploadStatus["None"] = "None";
2882
+ UploadStatus["Hashing"] = "Hashing";
2883
+ UploadStatus["Uploading"] = "Uploading";
2884
+ UploadStatus["Done"] = "Done";
2885
+ UploadStatus["Error"] = "Error";
2886
+ return UploadStatus;
2887
+ }({});
2888
+ /** Hook for managing the full attachment preprocess + upload lifecycle. preprocess and upload callbacks are stable (useCallback) and depend only on the current IAttachmentClient reference. */
2889
+ function useAttachmentUpload() {
2890
+ const [status, setStatus] = useState(UploadStatus.None);
2891
+ const [progress, setProgress] = useState(0);
2892
+ const [error, setError] = useState(void 0);
2893
+ const client = useAttachments();
2894
+ return {
2895
+ preprocess: useCallback(async (file) => {
2896
+ if (!client) throw new Error("AttachmentClient not available");
2897
+ setError(void 0);
2898
+ setStatus(UploadStatus.Hashing);
2899
+ try {
2900
+ return await client.preprocess(file);
2901
+ } catch (err) {
2902
+ setError(err instanceof Error ? err : new Error(String(err)));
2903
+ setStatus(UploadStatus.Error);
2904
+ throw err;
2905
+ }
2906
+ }, [client]),
2907
+ upload: useCallback(async (results) => {
2908
+ if (!client) throw new Error("AttachmentClient not available");
2909
+ setError(void 0);
2910
+ setStatus(UploadStatus.Uploading);
2911
+ setProgress(0);
2912
+ try {
2913
+ await client.reserve(results.options, (handle) => handle.send(results.stream()));
2914
+ } catch (err) {
2915
+ setError(err instanceof Error ? err : new Error(String(err)));
2916
+ setStatus(UploadStatus.Error);
2917
+ throw err;
2918
+ }
2919
+ setProgress(1);
2920
+ setStatus(UploadStatus.Done);
2921
+ }, [client]),
2922
+ status,
2923
+ progress,
2924
+ error
2925
+ };
2926
+ }
2927
+ //#endregion
2801
2928
  //#region src/pglite/drop.ts
2802
2929
  async function dropTablesInSchema(pg, schema) {
2803
2930
  await pg.exec(`
@@ -3668,6 +3795,6 @@ var BrowserLocalStorage = class extends BaseStorage {
3668
3795
  }
3669
3796
  };
3670
3797
  //#endregion
3671
- export { ActionTracker, BaseStorage, BrowserLocalStorage, COMMON_PACKAGE_ID, CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, CREDENTIAL_TYPES, ChannelScheme, ChevronDownIcon, ConflictError, CopyIcon, DEFAULT_DRIVE_EDITOR_ID, DEFAULT_DRIVE_ID, DEFAULT_SWITCHBOARD_URL, DOMAIN_TYPE, DisconnectIcon, DocumentCache, DocumentChangeType, DocumentIntegrityService, EDITOR_FILE_DROP_OPT_OUT_ATTR, GqlRequestChannel, GraphQLClientDocumentCache, ISSUER_TYPE, InMemoryQueue, IntervalPollTimer, PollBehavior, PropagationMode, REACTOR_SCHEMA, RENOWN_CHAIN_ID, RENOWN_NETWORK_ID, RENOWN_URL, ReactorBuilder, ReactorClientBuilder, RegistryClient, RelationalDbProcessor, RemoteClient, RemoteDocumentController, Renown, RenownAuthButton, RenownLoginButton, RenownLogo, RenownUserButton, SpinnerIcon, SyncOperationStatus, UserIcon, VERIFIABLE_CREDENTIAL_EIP712_TYPE, addAllowListEventHandler, addAllowedDocumentTypesEventHandler, addAnalyticsDatabaseNameEventHandler, addBasePathEventHandler, addCliVersionEventHandler, addDefaultDrivesUrlEventHandler, addDisabledEditorsEventHandler, addDocument, addDocumentCacheEventHandler, addDraggingNodeEventHandler, addDrive, addDrivesEventHandler, addDrivesPreserveStrategyEventHandler, addEnabledEditorsEventHandler, addFeaturesEventHandler, addFileUploadOperationsChunkSizeEventHandler, addFolder, addGaTrackingIdEventHandler, addGraphQLReactorClientEventHandler, addIsAddCloudDrivesEnabledEventHandler, addIsAddDriveEnabledEventHandler, addIsAddLocalDrivesEnabledEventHandler, addIsAddPublicDrivesEnabledEventHandler, addIsAnalyticsDatabaseWorkerEnabledEventHandler, addIsAnalyticsEnabledEventHandler, addIsAnalyticsExternalProcessorsEnabledEventHandler, addIsCloudDrivesEnabledEventHandler, addIsDeleteCloudDrivesEnabledEventHandler, addIsDeleteLocalDrivesEnabledEventHandler, addIsDeletePublicDrivesEnabledEventHandler, addIsDiffAnalyticsEnabledEventHandler, addIsDocumentModelSelectionSettingsEnabledEventHandler, addIsDragAndDropEnabledEventHandler, addIsDriveAnalyticsEnabledEventHandler, addIsEditorDebugModeEnabledEventHandler, addIsEditorReadModeEnabledEventHandler, addIsExternalControlsEnabledEventHandler, addIsExternalPackagesEnabledEventHandler, addIsExternalProcessorsEnabledEventHandler, addIsExternalRelationalProcessorsEnabledEventHandler, addIsLocalDrivesEnabledEventHandler, addIsPublicDrivesEnabledEventHandler, addIsRelationalProcessorsEnabledEventHandler, addIsSentryTracingEnabledEventHandler, addLoadingEventHandler, addLocalDrivesEnabledEventHandler, addLogLevelEventHandler, addModalEventHandler, addPHEventHandlers, addPackageDiscoveryServiceEventHandler, addPromiseState, addReactorClientEventHandler, addReactorClientModuleEventHandler, addRemoteDrive, addRenownChainIdEventHandler, addRenownEventHandler, addRenownNetworkIdEventHandler, addRenownUrlEventHandler, addRequiresHardRefreshEventHandler, addResetSelectedNodeEventHandler, addRevisionHistoryVisibleEventHandler, addRouterBasenameEventHandler, addSelectedDriveIdEventHandler, addSelectedNodeIdEventHandler, addSelectedTimelineItemEventHandler, addSelectedTimelineRevisionEventHandler, addSentryDsnEventHandler, addSentryEnvEventHandler, addSentryReleaseEventHandler, addSetSelectedDriveOnPopStateEventHandler, addSetSelectedNodeOnPopStateEventHandler, addStudioModeEventHandler, addToastEventHandler, addVersionCheckIntervalEventHandler, addVersionEventHandler, addVetraPackageManagerEventHandler, addWarnOutdatedAppEventHandler, baseDocumentModels, baseDocumentModelsMap, buildDocumentSubgraphQuery, buildDocumentSubgraphUrl, callEventHandlerRegisterFunctions, callGlobalSetterForKey, clearGlobal, closePHModal, commonGlobalEventHandlerFunctions, convertRemoteOperations, createAnalyticsStore, createClient, createProcessorQuery, createUrlWithPreservedParams, deleteDrive, deleteNode, deriveSystemUrl, dispatchActions, downloadDocument, driveCollectionId, driveIdFromUrl, dropAllReactorStorage, exportFile, extractDriveIdFromPath, extractDriveIdFromSlug, extractDriveSlugFromPath, extractNodeIdFromPath, extractNodeIdFromSlug, extractNodeSlugFromPath, findUuid, getAnalyticsStore, getDocumentGraphqlQuery, getDriveIdBySlug, getDrives, getGlobal, getPackages, getPackagesByDocumentType, getPathWithoutBase, getRevisionFromDate, getSlugFromDriveUrl, getSwitchboardGatewayUrlFromDriveUrl, getSyncStatus, getSyncStatusSync, getUserPermissions, graphqlDocumentEvents, graphqlDocumentsEvents, graphqlEventsToSyncDrive, hideRevisionHistory, identifierFromMutateDocumentOperationVariables, initConnectCrypto, initRenownCrypto, initTheme, isDocumentTypeSupported, isExternalControlsEnabledEventFunctions, isFileNodeKind, isFolderNodeKind, loading, login, logout, makeDriveUrlComponent, makeNodeSlug, makePHEventFunctions, openRenown, parseDriveUrl, phAppConfigHooks, phAppConfigSetters, phDocumentEditorConfigHooks, phDocumentEditorConfigSetters, phDocumentFromQuery, phDocumentsFromQuery, phGlobalConfigHooks, phGlobalConfigSetters, reactorGraphqlBatchFetchDocuments, reactorGraphqlCreateDocument, reactorGraphqlDeleteDocument, reactorGraphqlDeleteDocuments, reactorGraphqlFetchDocument, reactorGraphqlMutateDocument, readPromiseState, refreshReactorData, refreshReactorDataClient, renameDrive, renameDriveNode, resolveUrlPathname, setAllowList, setAllowedDocumentTypes, setAnalyticsDatabaseName, setBasePath, setCliVersion, setDefaultDrivesUrl, setDefaultPHGlobalConfig, setDisabledEditors, setDocumentCache, setDriveAvailableOffline, setDriveMetadata, setDriveSharingType, setDrives, setDrivesPreserveStrategy, setEnabledEditors, setFeatures, setFileUploadOperationsChunkSize, setGaTrackingId, setGlobal, setGraphQLReactorClient, setIsAddCloudDrivesEnabled, setIsAddDriveEnabled, setIsAddLocalDrivesEnabled, setIsAddPublicDrivesEnabled, setIsAnalyticsDatabaseWorkerEnabled, setIsAnalyticsEnabled, setIsAnalyticsExternalProcessorsEnabled, setIsCloudDrivesEnabled, setIsDeleteCloudDrivesEnabled, setIsDeleteLocalDrivesEnabled, setIsDeletePublicDrivesEnabled, setIsDiffAnalyticsEnabled, setIsDocumentModelSelectionSettingsEnabled, setIsDragAndDropEnabled, setIsDriveAnalyticsEnabled, setIsEditorDebugModeEnabled, setIsEditorReadModeEnabled, setIsExternalControlsEnabled, setIsExternalPackagesEnabled, setIsExternalProcessorsEnabled, setIsExternalRelationalProcessorsEnabled, setIsLocalDrivesEnabled, setIsPublicDrivesEnabled, setIsRelationalProcessorsEnabled, setIsSentryTracingEnabled, setLoading, setLocalDrivesEnabled, setLogLevel, setPHAppConfig, setPHAppConfigByKey, setPHDocumentEditorConfig, setPHDocumentEditorConfigByKey, setPHGlobalConfig, setPHGlobalConfigByKey, setPHModal, setPHToast, setPackageDiscoveryService, setReactorClient, setReactorClientModule, setRenown, setRenownChainId, setRenownNetworkId, setRenownUrl, setRequiresHardRefresh, setRevisionHistoryVisible, setRouterBasename, setSelectedDrive, setSelectedDriveId, setSelectedNode, setSelectedTimelineItem, setSelectedTimelineRevision, setSentryDsn, setSentryEnv, setSentryRelease, setStudioMode, setVersion, setVersionCheckInterval, setVetraPackageManager, setWarnOutdatedApp, showCreateDocumentModal, showDeleteNodeModal, showPHModal, showRevisionHistory, sortNodesByName, trimTrailingSlash, truncateAllTables, useAllowList, useAllowedDocumentModelModules, useAllowedDocumentTypes, useAnalyticsDatabaseName, useAppModuleById, useAppModules, useBasePath, useCliVersion, useConnectionState, useConnectionStates, useDatabase, useDefaultAppModule, useDefaultDrivesUrl, useDid, useDisabledEditors, useDispatch, useDocument, useDocumentById, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOfType, useDocumentOperations, useDocumentSafe, useDocumentTypes, useDocumentTypesInSelectedDrive, useDocuments, useDocumentsByIds, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useDownloadDocument, useDragNode, useDriveById, useDriveSystemInfo, useDrives, useDrivesPreserveStrategy, useDropFile, useDropNode, useEditorFileDrop, useEditorModuleById, useEditorModules, useEditorModulesForDocumentType, useEnabledEditors, useFallbackEditorModule, useFeatures, useFileNodesInSelectedDrive, useFileNodesInSelectedFolder, useFileUploadOperationsChunkSize, useFolderById, useFolderNodesInSelectedDrive, useFolderNodesInSelectedFolder, useGaTrackingId, useGetDocument, useGetDocumentAsync, useGetDocuments, useGetSwitchboardLink, useGraphQLReactorClient, useInitReactorGraphqlClient, useIsAddCloudDrivesEnabled, useIsAddDriveEnabled, useIsAddLocalDrivesEnabled, useIsAddPublicDrivesEnabled, useIsAnalyticsDatabaseWorkerEnabled, useIsAnalyticsEnabled, useIsAnalyticsExternalProcessorsEnabled, useIsCloudDrivesEnabled, useIsDeleteCloudDrivesEnabled, useIsDeleteLocalDrivesEnabled, useIsDeletePublicDrivesEnabled, useIsDiffAnalyticsEnabled, useIsDocumentModelSelectionSettingsEnabled, useIsDragAndDropEnabled, useIsDriveAnalyticsEnabled, useIsEditorDebugModeEnabled, useIsEditorReadModeEnabled, useIsExternalControlsEnabled, useIsExternalPackagesEnabled, useIsExternalProcessorsEnabled, useIsExternalRelationalProcessorsEnabled, useIsLocalDrivesEnabled, useIsPublicDrivesEnabled, useIsRelationalProcessorsEnabled, useIsSentryTracingEnabled, useLoading, useLocalDrivesEnabled, useLogLevel, useLoginStatus, useModelRegistry, useNodeActions, useNodeById, useNodeParentFolderById, useNodePathById, useNodesInSelectedDrive, useNodesInSelectedDriveOrFolder, useNodesInSelectedFolder, useOnDropFile, usePGlite, usePHAppConfigByKey, usePHDocumentEditorConfigByKey, usePHGlobalConfigByKey, usePHModal, usePHToast, usePackageDiscoveryService, useParentFolderForSelectedNode, useReactorClient, useReactorClientModule, useRelationalDb, useRelationalQuery, useRenown, useRenownAuth, useRenownChainId, useRenownInit, useRenownNetworkId, useRenownUrl, useRequiresHardRefresh, useResetPHGlobalConfig, useRevisionHistoryVisible, useRouterBasename, useSelectedDocument, useSelectedDocumentId, useSelectedDocumentOfType, useSelectedDocumentSafe, useSelectedDrive, useSelectedDriveId, useSelectedDriveSafe, useSelectedFolder, useSelectedNode, useSelectedNodePath, useSelectedTimelineItem, useSelectedTimelineRevision, useSentryDsn, useSentryEnv, useSentryRelease, useSetDefaultPHGlobalConfig, useSetPHAppConfig, useSetPHDocumentEditorConfig, useSetPHGlobalConfig, useStudioMode, useSubgraphModules, useSupportedDocumentTypesInReactor, useSync, useSyncList, useTheme, useUser, useUserPermissions, useVersion, useVersionCheckInterval, useVetraPackageManager, useVetraPackages, useWarnOutdatedApp, validateDocument };
3798
+ export { ActionTracker, BaseStorage, BrowserLocalStorage, COMMON_PACKAGE_ID, CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, CREDENTIAL_TYPES, ChannelScheme, ChevronDownIcon, ConflictError, CopyIcon, DEFAULT_DRIVE_EDITOR_ID, DEFAULT_DRIVE_ID, DEFAULT_SWITCHBOARD_URL, DOMAIN_TYPE, DisconnectIcon, DocumentCache, DocumentChangeType, DocumentIntegrityService, EDITOR_FILE_DROP_OPT_OUT_ATTR, GqlRequestChannel, GraphQLClientDocumentCache, ISSUER_TYPE, InMemoryQueue, IntervalPollTimer, PollBehavior, PropagationMode, REACTOR_SCHEMA, RENOWN_CHAIN_ID, RENOWN_NETWORK_ID, RENOWN_URL, ReactorBuilder, ReactorClientBuilder, RegistryClient, RelationalDbProcessor, RemoteClient, RemoteDocumentController, Renown, RenownAuthButton, RenownLoginButton, RenownLogo, RenownUserButton, SpinnerIcon, SyncOperationStatus, UploadStatus, UserIcon, VERIFIABLE_CREDENTIAL_EIP712_TYPE, addAllowListEventHandler, addAllowedDocumentTypesEventHandler, addAnalyticsDatabaseNameEventHandler, addAttachmentServiceEventHandler, addBasePathEventHandler, addCliVersionEventHandler, addDefaultDrivesUrlEventHandler, addDisabledEditorsEventHandler, addDocument, addDocumentCacheEventHandler, addDraggingNodeEventHandler, addDrive, addDrivesEventHandler, addDrivesPreserveStrategyEventHandler, addEnabledEditorsEventHandler, addFeaturesEventHandler, addFileUploadOperationsChunkSizeEventHandler, addFolder, addGaTrackingIdEventHandler, addGraphQLReactorClientEventHandler, addIsAddCloudDrivesEnabledEventHandler, addIsAddDriveEnabledEventHandler, addIsAddLocalDrivesEnabledEventHandler, addIsAddPublicDrivesEnabledEventHandler, addIsAnalyticsDatabaseWorkerEnabledEventHandler, addIsAnalyticsEnabledEventHandler, addIsAnalyticsExternalProcessorsEnabledEventHandler, addIsCloudDrivesEnabledEventHandler, addIsDeleteCloudDrivesEnabledEventHandler, addIsDeleteLocalDrivesEnabledEventHandler, addIsDeletePublicDrivesEnabledEventHandler, addIsDiffAnalyticsEnabledEventHandler, addIsDocumentModelSelectionSettingsEnabledEventHandler, addIsDragAndDropEnabledEventHandler, addIsDriveAnalyticsEnabledEventHandler, addIsEditorDebugModeEnabledEventHandler, addIsEditorReadModeEnabledEventHandler, addIsExternalControlsEnabledEventHandler, addIsExternalPackagesEnabledEventHandler, addIsExternalProcessorsEnabledEventHandler, addIsExternalRelationalProcessorsEnabledEventHandler, addIsLocalDrivesEnabledEventHandler, addIsPublicDrivesEnabledEventHandler, addIsRelationalProcessorsEnabledEventHandler, addIsSentryTracingEnabledEventHandler, addLoadingEventHandler, addLocalDrivesEnabledEventHandler, addLogLevelEventHandler, addModalEventHandler, addPHEventHandlers, addPackageDiscoveryServiceEventHandler, addPromiseState, addReactorClientEventHandler, addReactorClientModuleEventHandler, addRemoteDrive, addRenownChainIdEventHandler, addRenownEventHandler, addRenownNetworkIdEventHandler, addRenownUrlEventHandler, addRequiresHardRefreshEventHandler, addResetSelectedNodeEventHandler, addRevisionHistoryVisibleEventHandler, addRouterBasenameEventHandler, addSelectedDriveIdEventHandler, addSelectedNodeIdEventHandler, addSelectedTimelineItemEventHandler, addSelectedTimelineRevisionEventHandler, addSentryDsnEventHandler, addSentryEnvEventHandler, addSentryReleaseEventHandler, addSetSelectedDriveOnPopStateEventHandler, addSetSelectedNodeOnPopStateEventHandler, addStudioModeEventHandler, addToastEventHandler, addVersionCheckIntervalEventHandler, addVersionEventHandler, addVetraPackageManagerEventHandler, addWarnOutdatedAppEventHandler, baseDocumentModels, baseDocumentModelsMap, buildDocumentSubgraphQuery, buildDocumentSubgraphUrl, callEventHandlerRegisterFunctions, callGlobalSetterForKey, clearGlobal, closePHModal, commonGlobalEventHandlerFunctions, convertRemoteOperations, createAnalyticsStore, createClient, createProcessorQuery, createUrlWithPreservedParams, deleteDrive, deleteNode, deriveSystemUrl, dispatchActions, downloadDocument, driveCollectionId, driveIdFromUrl, dropAllReactorStorage, exportFile, extractDriveIdFromPath, extractDriveIdFromSlug, extractDriveSlugFromPath, extractNodeIdFromPath, extractNodeIdFromSlug, extractNodeSlugFromPath, findUuid, getAnalyticsStore, getDocumentGraphqlQuery, getDriveIdBySlug, getDrives, getGlobal, getPackages, getPackagesByDocumentType, getPathWithoutBase, getRevisionFromDate, getSlugFromDriveUrl, getSwitchboardGatewayUrlFromDriveUrl, getSyncStatus, getSyncStatusSync, getUserPermissions, graphqlDocumentEvents, graphqlDocumentsEvents, graphqlEventsToSyncDrive, hideRevisionHistory, identifierFromMutateDocumentOperationVariables, initConnectCrypto, initRenownCrypto, initTheme, isDocumentTypeSupported, isExternalControlsEnabledEventFunctions, isFileNodeKind, isFolderNodeKind, loading, login, logout, makeDriveUrlComponent, makeNodeSlug, makePHEventFunctions, openRenown, parseDriveUrl, phAppConfigHooks, phAppConfigSetters, phDocumentEditorConfigHooks, phDocumentEditorConfigSetters, phDocumentFromQuery, phDocumentsFromQuery, phGlobalConfigHooks, phGlobalConfigSetters, reactorGraphqlBatchFetchDocuments, reactorGraphqlCreateDocument, reactorGraphqlDeleteDocument, reactorGraphqlDeleteDocuments, reactorGraphqlFetchDocument, reactorGraphqlMutateDocument, readPromiseState, refreshReactorData, refreshReactorDataClient, renameDrive, renameDriveNode, resolveUrlPathname, setAllowList, setAllowedDocumentTypes, setAnalyticsDatabaseName, setAttachmentService, setBasePath, setCliVersion, setDefaultDrivesUrl, setDefaultPHGlobalConfig, setDisabledEditors, setDocumentCache, setDriveAvailableOffline, setDriveMetadata, setDriveSharingType, setDrives, setDrivesPreserveStrategy, setEnabledEditors, setFeatures, setFileUploadOperationsChunkSize, setGaTrackingId, setGlobal, setGraphQLReactorClient, setIsAddCloudDrivesEnabled, setIsAddDriveEnabled, setIsAddLocalDrivesEnabled, setIsAddPublicDrivesEnabled, setIsAnalyticsDatabaseWorkerEnabled, setIsAnalyticsEnabled, setIsAnalyticsExternalProcessorsEnabled, setIsCloudDrivesEnabled, setIsDeleteCloudDrivesEnabled, setIsDeleteLocalDrivesEnabled, setIsDeletePublicDrivesEnabled, setIsDiffAnalyticsEnabled, setIsDocumentModelSelectionSettingsEnabled, setIsDragAndDropEnabled, setIsDriveAnalyticsEnabled, setIsEditorDebugModeEnabled, setIsEditorReadModeEnabled, setIsExternalControlsEnabled, setIsExternalPackagesEnabled, setIsExternalProcessorsEnabled, setIsExternalRelationalProcessorsEnabled, setIsLocalDrivesEnabled, setIsPublicDrivesEnabled, setIsRelationalProcessorsEnabled, setIsSentryTracingEnabled, setLoading, setLocalDrivesEnabled, setLogLevel, setPHAppConfig, setPHAppConfigByKey, setPHDocumentEditorConfig, setPHDocumentEditorConfigByKey, setPHGlobalConfig, setPHGlobalConfigByKey, setPHModal, setPHToast, setPackageDiscoveryService, setReactorClient, setReactorClientModule, setRenown, setRenownChainId, setRenownNetworkId, setRenownUrl, setRequiresHardRefresh, setRevisionHistoryVisible, setRouterBasename, setSelectedDrive, setSelectedDriveId, setSelectedNode, setSelectedTimelineItem, setSelectedTimelineRevision, setSentryDsn, setSentryEnv, setSentryRelease, setStudioMode, setVersion, setVersionCheckInterval, setVetraPackageManager, setWarnOutdatedApp, showCreateDocumentModal, showDeleteNodeModal, showPHModal, showRevisionHistory, sortNodesByName, trimTrailingSlash, truncateAllTables, useAllowList, useAllowedDocumentModelModules, useAllowedDocumentTypes, useAnalyticsDatabaseName, useAppModuleById, useAppModules, useAttachmentService, useAttachmentUpload, useAttachments, useBasePath, useCliVersion, useConnectionState, useConnectionStates, useDatabase, useDefaultAppModule, useDefaultDrivesUrl, useDid, useDisabledEditors, useDispatch, useDocument, useDocumentById, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOfType, useDocumentOperations, useDocumentSafe, useDocumentTypes, useDocumentTypesInSelectedDrive, useDocuments, useDocumentsByIds, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useDownloadDocument, useDragNode, useDriveById, useDriveSystemInfo, useDrives, useDrivesPreserveStrategy, useDropFile, useDropNode, useEditorFileDrop, useEditorModuleById, useEditorModules, useEditorModulesForDocumentType, useEnabledEditors, useFallbackEditorModule, useFeatures, useFileNodesInSelectedDrive, useFileNodesInSelectedFolder, useFileUploadOperationsChunkSize, useFolderById, useFolderNodesInSelectedDrive, useFolderNodesInSelectedFolder, useGaTrackingId, useGetDocument, useGetDocumentAsync, useGetDocuments, useGetSwitchboardLink, useGraphQLReactorClient, useInitReactorGraphqlClient, useIsAddCloudDrivesEnabled, useIsAddDriveEnabled, useIsAddLocalDrivesEnabled, useIsAddPublicDrivesEnabled, useIsAnalyticsDatabaseWorkerEnabled, useIsAnalyticsEnabled, useIsAnalyticsExternalProcessorsEnabled, useIsCloudDrivesEnabled, useIsDeleteCloudDrivesEnabled, useIsDeleteLocalDrivesEnabled, useIsDeletePublicDrivesEnabled, useIsDiffAnalyticsEnabled, useIsDocumentModelSelectionSettingsEnabled, useIsDragAndDropEnabled, useIsDriveAnalyticsEnabled, useIsEditorDebugModeEnabled, useIsEditorReadModeEnabled, useIsExternalControlsEnabled, useIsExternalPackagesEnabled, useIsExternalProcessorsEnabled, useIsExternalRelationalProcessorsEnabled, useIsLocalDrivesEnabled, useIsPublicDrivesEnabled, useIsRelationalProcessorsEnabled, useIsSentryTracingEnabled, useLoading, useLocalDrivesEnabled, useLogLevel, useLoginStatus, useModelRegistry, useNodeActions, useNodeById, useNodeParentFolderById, useNodePathById, useNodesInSelectedDrive, useNodesInSelectedDriveOrFolder, useNodesInSelectedFolder, useOnDropFile, usePGlite, usePHAppConfigByKey, usePHDocumentEditorConfigByKey, usePHGlobalConfigByKey, usePHModal, usePHToast, usePackageDiscoveryService, useParentFolderForSelectedNode, useReactorClient, useReactorClientModule, useRelationalDb, useRelationalQuery, useRenown, useRenownAuth, useRenownChainId, useRenownInit, useRenownNetworkId, useRenownUrl, useRequiresHardRefresh, useResetPHGlobalConfig, useRevisionHistoryVisible, useRouterBasename, useSelectedDocument, useSelectedDocumentId, useSelectedDocumentOfType, useSelectedDocumentSafe, useSelectedDrive, useSelectedDriveId, useSelectedDriveSafe, useSelectedFolder, useSelectedNode, useSelectedNodePath, useSelectedTimelineItem, useSelectedTimelineRevision, useSentryDsn, useSentryEnv, useSentryRelease, useSetDefaultPHGlobalConfig, useSetPHAppConfig, useSetPHDocumentEditorConfig, useSetPHGlobalConfig, useStudioMode, useSubgraphModules, useSupportedDocumentTypesInReactor, useSync, useSyncList, useTheme, useUser, useUserPermissions, useVersion, useVersionCheckInterval, useVetraPackageManager, useVetraPackages, useWarnOutdatedApp, validateDocument, waitForDocumentReady };
3672
3799
 
3673
3800
  //# sourceMappingURL=index.js.map