@powerhousedao/reactor-browser 6.2.3-dev.60 → 6.2.3-dev.62
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/{attachment-service-DG6UkyMv.d.ts → attachment-service-CQ3JygJd.d.ts} +3 -3
- package/dist/{attachment-service-DG6UkyMv.d.ts.map → attachment-service-CQ3JygJd.d.ts.map} +1 -1
- package/dist/{client-Cq5avLW5.js → client-Bwiji4R6.js} +6 -2
- package/dist/client-Bwiji4R6.js.map +1 -0
- package/dist/{dispatch-C1VVTn5S.js → dispatch-BmdzdTwb.js} +15 -11
- package/dist/dispatch-BmdzdTwb.js.map +1 -0
- package/dist/{document-by-id-BRDkvmpn.js → document-by-id-BqNuTx4S.js} +2 -2
- package/dist/{document-by-id-BRDkvmpn.js.map → document-by-id-BqNuTx4S.js.map} +1 -1
- package/dist/{document-model-modules-Gsh1Xr7j.js → document-model-modules-Wjh92XAb.js} +192 -157
- package/dist/document-model-modules-Wjh92XAb.js.map +1 -0
- package/dist/{document-operations-BSzcF0mu.js → document-operations--Z0AOyyy.js} +74 -27
- package/dist/document-operations--Z0AOyyy.js.map +1 -0
- package/dist/{global-BuSwbbY0.d.ts → global-CPJA8ePb.d.ts} +56 -4
- package/dist/global-CPJA8ePb.d.ts.map +1 -0
- package/dist/{index-ewIc3pEO.d.ts → index-DRCTps7m.d.ts} +2 -2
- package/dist/{index-ewIc3pEO.d.ts.map → index-DRCTps7m.d.ts.map} +1 -1
- package/dist/index.d.ts +244 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +305 -37
- package/dist/index.js.map +1 -1
- package/dist/make-ph-event-functions-C1JTfEw1.js +251 -0
- package/dist/make-ph-event-functions-C1JTfEw1.js.map +1 -0
- package/dist/navigation-B4fHR-Tm.js +315 -0
- package/dist/navigation-B4fHR-Tm.js.map +1 -0
- package/dist/{relational-DxHuX41f.js → relational-DZuyKp2y.js} +2 -2
- package/dist/{relational-DxHuX41f.js.map → relational-DZuyKp2y.js.map} +1 -1
- package/dist/{renown-D05wkobG.js → renown-CGQYQsvH.js} +2 -2
- package/dist/{renown-D05wkobG.js.map → renown-CGQYQsvH.js.map} +1 -1
- package/dist/{renown-CPAeJt5L.js → renown-DlkS61Dp.js} +28 -22
- package/dist/{renown-CPAeJt5L.js.map → renown-DlkS61Dp.js.map} +1 -1
- package/dist/src/ai/index.d.ts.map +1 -1
- package/dist/src/ai/index.js +3 -3
- package/dist/src/analytics/index.js +3 -3
- package/dist/src/graphql-client/entry.d.ts +2 -2
- package/dist/src/graphql-client/entry.js +3 -3
- package/dist/src/relational/index.js +1 -1
- package/dist/src/renown/index.d.ts +1 -1
- package/dist/src/renown/index.js +2 -2
- package/dist/src/rpc/index.d.ts +3 -1
- package/dist/src/rpc/index.d.ts.map +1 -1
- package/dist/src/rpc/index.js +1 -3
- package/dist/src/rpc/index.js.map +1 -1
- package/dist/{switchboard-3vHbIV5W.js → switchboard-DAvOdf_g.js} +8 -6
- package/dist/switchboard-DAvOdf_g.js.map +1 -0
- package/package.json +10 -10
- package/dist/client-Cq5avLW5.js.map +0 -1
- package/dist/dispatch-C1VVTn5S.js.map +0 -1
- package/dist/document-model-modules-Gsh1Xr7j.js.map +0 -1
- package/dist/document-operations-BSzcF0mu.js.map +0 -1
- package/dist/global-BuSwbbY0.d.ts.map +0 -1
- package/dist/make-ph-event-functions-CdsvEl5t.js +0 -55
- package/dist/make-ph-event-functions-CdsvEl5t.js.map +0 -1
- package/dist/switchboard-3vHbIV5W.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
1
|
+
import { a as bindPHStoreToWindow, c as ensurePHStore, d as getPHStoreSubscribe, f as isScopedPHStore, g as warnGlobalSetterInScope, h as usePHStore, i as SCOPED_PH_KEYS, l as getActivePHStore, m as subscribePHStore, n as subscribeToPHValue, o as createPHStore, p as notifyPHStore, r as PHStoreProvider, s as createScopedPHStore, t as makePHEventFunctions, u as getPHStore } from "./make-ph-event-functions-C1JTfEw1.js";
|
|
2
|
+
import { a as useDocumentCache, b as IDLE_REFETCH_STATE, c as useGetDocument, d as DocumentCache, f as IDLE_OPERATIONS_ENTRY, h as readPromiseState, i as useDocument, l as useGetDocumentAsync, m as isOperationCache, n as addDocumentCacheEventHandler, o as useDocumentSafe, p as addPromiseState, r as setDocumentCache, s as useDocuments, t as useDispatch, u as useGetDocuments, x as dispatchActions, y as DocumentRefetcher } from "./dispatch-BmdzdTwb.js";
|
|
3
|
+
import { A as useSetSelectedNode, B as ambientRenownTokenProvider, C as selectNode, D as useOpenNode, E as setSelectedNodeId, F as listSyncRemotes, I as DocumentModelNotFoundError, L as DocumentTypeMismatchError, M as setDrives, N as useDrives, O as usePreloadNode, P as isInitialSyncInFlight, R as NoSelectedDocumentError, S as preloadNode, T as setSelectedNode, V as makeAuthMiddleware, _ as useSetSelectedDrive, a as setVetraPackageManager, b as getNodeTarget, c as addSelectedDriveIdEventHandler, d as setSelectedDrive, f as setSelectedDriveId, g as useSelectedDriveSafe, h as useSelectedDriveId, i as onVetraPackageManager, j as addDrivesEventHandler, l as preloadDrive, m as useSelectedDrive, n as useDocumentModelModules, o as useVetraPackageManager, p as usePreloadDrive, r as addVetraPackageManagerEventHandler, s as useVetraPackages, t as useDocumentModelModuleById, u as selectDrive, v as addResetSelectedNodeEventHandler, w as selectNodeIn, x as getNodeTargetIn, y as addSelectedNodeIdEventHandler, z as UnsupportedDocumentTypeError } from "./document-model-modules-Wjh92XAb.js";
|
|
4
|
+
import { A as extractNodeIdFromSlug, C as setSearchParams, D as extractDriveIdFromSlug, E as extractDriveIdFromPath, F as getPathWithoutBase, I as makeDriveSlug, L as makeDriveUrlComponent, M as findDerivedId, N as findDriveBySlug, O as extractDriveSlugFromPath, P as findUuid, R as makeNodeSlug, S as setBrowserOpenSync, T as createUrlWithPreservedParams, _ as openedFromIndex, a as SETTINGS_PATH, b as resolveSearchUpdate, c as getCurrentPathname, d as getTargetHref, f as hasHostNavigation, g as openTargetWith, h as openTarget, i as PH_LOCATION_CHANGE_EVENT, j as extractNodeSlugFromPath, k as extractNodeIdFromPath, l as getNavigationOf, m as isSettingsTarget, n as GLOBAL_SEARCH_PARAMS, o as applySearchUpdate, p as isGlobalSearchParam, r as OPENED_FROM_STATE_KEY, s as browserNavigation, t as FEATURE_FLAG_PARAM_PREFIX, u as getPHNavigation, v as preloadTarget, w as targetPathname, x as searchToRecord, y as recordToSearch, z as resolveUrlPathname } from "./navigation-B4fHR-Tm.js";
|
|
5
|
+
import { $ as addIsAddDriveEnabledEventHandler, $i as useSync, $n as useIsDeleteLocalDrivesEnabled, $r as subgraphUrlFromGraphqlUrl, $t as setIsAnalyticsDatabaseWorkerEnabled, A as setGraphQLReactorClient, Ai as extractInitialState, An as setSwitchboardUrl, Ar as addIsDragAndDropEnabledEventHandler, At as addSentryEnvEventHandler, B as setAttachmentService, Bi as isDocumentTypeSupported, Bn as useDrivesPreserveStrategy, Br as useAllowedDocumentTypes, Bt as setAnalyticsDatabaseName, C as setRevisionHistoryVisible, Ci as DRIVE_DOCUMENT_TYPES, Cn as setRenownUrl, Cr as useSentryRelease, Ct as addRenownAdaptersEventHandler, D as setPackageDiscoveryService, Di as copyNode$1, Dn as setSentryEnv, Dr as useVersionCheckInterval, Dt as addRequiresHardRefreshEventHandler, E as addPackageDiscoveryServiceEventHandler, Ei as addFolder, En as setSentryDsn, Er as useVersion, Et as addRenownUrlEventHandler, F as useDropTarget, Fi as renameDriveNode, Fn as useAnalyticsDatabaseName, Fr as phDocumentEditorConfigHooks, Ft as addVersionEventHandler, G as addCliVersionEventHandler, Gi as setFullReactorClient, Gn as useIsAddDriveEnabled, Gr as isGraphQLReactorClient, Gt as setDrivesPreserveStrategy, H as addAllowListEventHandler, Hi as addReactorClientEventHandler, Hn as useFileUploadOperationsChunkSize, Hr as useIsExternalControlsEnabled, Ht as setCliVersion, I as addFeaturesEventHandler, Ii as renameNode, In as useBasePath, Ir as phDocumentEditorConfigSetters, It as addWarnOutdatedAppEventHandler, J as addDrivesPreserveStrategyEventHandler, Ji as useDatabase, Jn as useIsAnalyticsDatabaseWorkerEnabled, Jr as makeAuthConnectionParams, Jt as setGaTrackingId, K as addDefaultDrivesUrlEventHandler, Ki as setReactorClient, Kn as useIsAddLocalDrivesEnabled, Kr as viewFilterInputFromViewFilter, Kt as setEnabledEditors, L as setFeatures, Li as setPreferredEditorOnNode, Ln as useCliVersion, Lr as setAllowedDocumentTypes, Lt as phGlobalConfigHooks, M as addDraggingNodeEventHandler, Mi as getDocumentExtension, Mn as setVersionCheckInterval, Mr as isExternalControlsEnabledEventFunctions, Mt as addStudioModeEventHandler, N as useDragNode, Ni as loadFile, Nn as setWarnOutdatedApp, Nr as phAppConfigHooks, Nt as addSwitchboardUrlEventHandler, O as usePackageDiscoveryService, Oi as deleteNode, On as setSentryRelease, Or as useWarnOutdatedApp, Ot as addRouterBasenameEventHandler, P as useDropNode, Pi as moveNode$1, Pn as useAllowList, Pr as phAppConfigSetters, Pt as addVersionCheckIntervalEventHandler, Q as addIsAddCloudDrivesEnabledEventHandler, Qi as useReactorClientModule, Qn as useIsDeleteCloudDrivesEnabled, Qr as describeGraphQLDocument, Qt as setIsAddPublicDrivesEnabled, R as useFeatures, Ri as upgradeDocument, Rn as useDefaultDrivesUrl, Rr as setIsDragAndDropEnabled, Rt as phGlobalConfigSetters, S as hideRevisionHistory, Si as DEFAULT_DRIVE_EDITOR_ID, Sn as setRenownNetworkId, Sr as useSentryEnv, St as addLogLevelEventHandler, T as useRevisionHistoryVisible, Ti as addFileWithProgress, Tn as setRouterBasename, Tr as useSwitchboardUrl, Tt as addRenownNetworkIdEventHandler, U as addAnalyticsDatabaseNameEventHandler, Ui as addReactorClientModuleEventHandler, Un as useGaTrackingId, Ur as GraphQLReactorClient, Ut as setDefaultDrivesUrl, V as useAttachmentService, Vi as addFullReactorClientEventHandler, Vn as useEnabledEditors, Vr as useIsDragAndDropEnabled, Vt as setBasePath, W as addBasePathEventHandler, Wi as getFullReactorClient, Wn as useIsAddCloudDrivesEnabled, Wr as findIsServableOverGraphQL, Wt as setDisabledEditors, X as addFileUploadOperationsChunkSizeEventHandler, Xi as usePGlite, Xn as useIsAnalyticsExternalProcessorsEnabled, Xr as subscriptionsUrlFromGraphqlUrl, Xt as setIsAddDriveEnabled, Y as addEnabledEditorsEventHandler, Yi as useModelRegistry, Yn as useIsAnalyticsEnabled, Yr as startDocumentChangesSubscription, Yt as setIsAddCloudDrivesEnabled, Z as addGaTrackingIdEventHandler, Zi as useReactorClient, Zn as useIsCloudDrivesEnabled, Zr as SubgraphSdkRegistry, Zt as setIsAddLocalDrivesEnabled, _ as addSetSelectedDriveOnPopStateEventHandler, _i as convertRemoteOperations, _n as setIsSentryTracingEnabled, _r as useRenownNetworkId, _t as addIsLocalDrivesEnabledEventHandler, a as addPHEventHandlers, aa as showDeleteNodeModal, ai as stampAction, an as setIsDeletePublicDrivesEnabled, ar as useIsEditorReadModeEnabled, at as addIsCloudDrivesEnabledEventHandler, b as syncSelectionFromPath, bi as screamingSnakeToCamel, bn as setRenownAdapters, br as useRouterBasename, bt as addIsSentryTracingEnabledEventHandler, c as addToastEventHandler, ci as BatchJobFailedError, cn as setIsDriveAnalyticsEnabled, cr as useIsExternalRelationalProcessorsEnabled, ct as addIsDeletePublicDrivesEnabledEventHandler, d as addSelectedTimelineRevisionEventHandler, di as isoStringFromDateTime, dn as setIsExternalPackagesEnabled, dr as useIsRelationalProcessorsEnabled, dt as addIsDriveAnalyticsEnabledEventHandler, ea as useSyncList, ei as StaticPackageManager, en as setIsAnalyticsEnabled, er as useIsDeletePublicDrivesEnabled, et as addIsAddLocalDrivesEnabledEventHandler, f as setSelectedTimelineRevision, fi as phDocumentFromGetDocument, fn as setIsExternalProcessorsEnabled, fr as useIsSentryTracingEnabled, ft as addIsEditorDebugModeEnabledEventHandler, g as useSelectedTimelineItem, gi as buildPulledDocument, gn as setIsRelationalProcessorsEnabled, gr as useRenownChainId, gt as addIsExternalRelationalProcessorsEnabledEventHandler, h as setSelectedTimelineItem, hi as ConflictError, hn as setIsPublicDrivesEnabled, hr as useRenownAdapters, ht as addIsExternalProcessorsEnabledEventHandler, i as useSwitchboardClient, ia as showCreateDocumentModal, ii as signStampedAction, in as setIsDeleteLocalDrivesEnabled, ir as useIsEditorDebugModeEnabled, it as addIsAnalyticsExternalProcessorsEnabledEventHandler, j as useGraphQLReactorClient, ji as fetchDocumentOperations, jn as setVersion, jr as addIsExternalControlsEnabledEventHandler, jt as addSentryReleaseEventHandler, k as addGraphQLReactorClientEventHandler, ki as exportFile, kn as setStudioMode, kr as addAllowedDocumentTypesEventHandler, kt as addSentryDsnEventHandler, l as setPHToast, li as GraphQLOperationNotSupportedError, ln as setIsEditorDebugModeEnabled, lr as useIsLocalDrivesEnabled, lt as addIsDiffAnalyticsEnabledEventHandler, m as addSelectedTimelineItemEventHandler, mi as revisionMapFromRevisionsList, mn as setIsLocalDrivesEnabled, mr as useLogLevel, mt as addIsExternalPackagesEnabledEventHandler, n as GraphQLReactorProvider, na as closePHModal, ni as resolveDocumentModelModule, nn as setIsCloudDrivesEnabled, nr as useIsDocumentModelSelectionSettingsEnabled, nt as addIsAnalyticsDatabaseWorkerEnabledEventHandler, o as callEventHandlerRegisterFunctions, oa as showPHModal, oi as MutateDocumentWithOperationsDocument, on as setIsDiffAnalyticsEnabled, or as useIsExternalPackagesEnabled, ot as addIsDeleteCloudDrivesEnabledEventHandler, p as useSelectedTimelineRevision, pi as phDocumentFromMutation, pn as setIsExternalRelationalProcessorsEnabled, pr as useLocalDrivesEnabled, pt as addIsEditorReadModeEnabledEventHandler, q as addDisabledEditorsEventHandler, qi as setReactorClientModule, qn as useIsAddPublicDrivesEnabled, qr as isAuthRefusalClose, qt as setFileUploadOperationsChunkSize, r as ensurePHEventHandlers, ra as setPHModal, ri as prepareSignedActions, rn as setIsDeleteCloudDrivesEnabled, rr as useIsDriveAnalyticsEnabled, rt as addIsAnalyticsEnabledEventHandler, s as commonGlobalEventHandlerFunctions, sa as usePHModal, si as ReactorOperationFieldsFragmentDoc, sn as setIsDocumentModelSelectionSettingsEnabled, sr as useIsExternalProcessorsEnabled, st as addIsDeleteLocalDrivesEnabledEventHandler, t as useDocumentOperations, ta as addModalEventHandler, ti as packageFromDocumentModels, tn as setIsAnalyticsExternalProcessorsEnabled, tr as useIsDiffAnalyticsEnabled, tt as addIsAddPublicDrivesEnabledEventHandler, u as usePHToast, ui as GraphQLWrongBackendError, un as setIsEditorReadModeEnabled, ur as useIsPublicDrivesEnabled, ut as addIsDocumentModelSelectionSettingsEnabledEventHandler, v as addSetSelectedNodeOnPopStateEventHandler, vi as extractRevisionMap, vn as setLocalDrivesEnabled, vr as useRenownUrl, vt as addIsPublicDrivesEnabledEventHandler, w as showRevisionHistory, wi as addDocument, wn as setRequiresHardRefresh, wr as useStudioMode, wt as addRenownChainIdEventHandler, x as addRevisionHistoryVisibleEventHandler, xi as COMMON_PACKAGE_ID, xn as setRenownChainId, xr as useSentryDsn, xt as addLocalDrivesEnabledEventHandler, y as addSyncSelectionOnPopStateEventHandler, yi as hasRevisionConflict, yn as setLogLevel, yr as useRequiresHardRefresh, yt as addIsRelationalProcessorsEnabledEventHandler, z as addAttachmentServiceEventHandler, zi as getUserPermissions, zn as useDisabledEditors, zr as setIsExternalControlsEnabled, zt as setAllowList } from "./document-operations--Z0AOyyy.js";
|
|
5
6
|
import { a as setGlobal, i as getGlobal, n as getAnalyticsStore, r as clearGlobal, t as createAnalyticsStore } from "./store-DInXcjal.js";
|
|
6
7
|
import { baseDocumentModels, baseDocumentModelsMap } from "./src/document-model.js";
|
|
7
8
|
import { a as PropagationMode, r as GetDocumentWithOperationsDocument, t as createClient } from "./client-CXDpILj6.js";
|
|
8
|
-
import { a as useRenown, c as RENOWN_INITIAL_UNKNOWN, d as useRenownInitialUser, f as addLoadingEventHandler, h as useLoading, i as useLoginStatus, l as RenownInitialUserProvider, m as setLoading, n as setRenown, o as useUser, p as loading, r as useDid, s as RENOWN_INITIAL_ANONYMOUS, t as addRenownEventHandler, u as useRenownInitialAuth } from "./renown-
|
|
9
|
-
import { _ as useFolderNodesInSelectedDrive, b as isFolderNodeKind, c as useSelectedDocument, d as useSelectedDocumentSafe, f as useDocumentOfType, g as useFileNodesInSelectedDrive, h as useDocumentsInSelectedDrive, l as useSelectedDocumentId, m as useDocumentTypesInSelectedDrive, p as useSelectedNode, t as GQL_CHANNEL_SUFFIX, u as useSelectedDocumentOfType, v as useNodesInSelectedDrive, x as sortNodesByName, y as isFileNodeKind } from "./switchboard-
|
|
10
|
-
import { n as useDocumentsByIds, t as useDocumentById } from "./document-by-id-
|
|
11
|
-
import { A as RENOWN_CHAIN_ID, C as logout, D as CREDENTIAL_TYPES, E as CREDENTIAL_SUBJECT_TYPE, M as RENOWN_RETURN_URL_STRIPPED_PARAMS, N as RENOWN_URL, O as DOMAIN_TYPE, P as VERIFIABLE_CREDENTIAL_EIP712_TYPE, S as login, T as CREDENTIAL_SCHEMA_EIP712_TYPE, _ as RenownLogo, a as Renown, b as useRenownAuth, c as useRenownSessionSynced, d as RenownAuthButton, f as RenownUserButton, g as DisconnectIcon, h as CopyIcon, i as RenownWalletProvider, j as RENOWN_NETWORK_ID, k as ISSUER_TYPE, l as initConnectCrypto, m as ChevronDownIcon, n as useRenownLoginMethods, o as useRenownInit, p as RenownLoginButton, r as RenownProvider, s as useRenownSessionCookie, t as useRenownWalletAdapter, u as initRenownCrypto, v as SpinnerIcon, w as openRenown, x as useRenownAuthAsync, y as UserIcon } from "./renown-
|
|
12
|
-
import { i as setPGliteDB, n as useRelationalQuery, r as useRelationalDb, t as createProcessorQuery } from "./relational-
|
|
13
|
-
import { a as getPackagesByDocumentType, c as trimTrailingSlash, i as getPackages, n as getPackageInfo, o as getPackagesForDocumentType, r as getPackagePage, s as searchPackages, t as RegistryClient } from "./client-
|
|
14
|
-
import {
|
|
9
|
+
import { a as useRenown, c as RENOWN_INITIAL_UNKNOWN, d as useRenownInitialUser, f as addLoadingEventHandler, h as useLoading, i as useLoginStatus, l as RenownInitialUserProvider, m as setLoading, n as setRenown, o as useUser, p as loading, r as useDid, s as RENOWN_INITIAL_ANONYMOUS, t as addRenownEventHandler, u as useRenownInitialAuth } from "./renown-CGQYQsvH.js";
|
|
10
|
+
import { _ as useFolderNodesInSelectedDrive, b as isFolderNodeKind, c as useSelectedDocument, d as useSelectedDocumentSafe, f as useDocumentOfType, g as useFileNodesInSelectedDrive, h as useDocumentsInSelectedDrive, l as useSelectedDocumentId, m as useDocumentTypesInSelectedDrive, p as useSelectedNode, t as GQL_CHANNEL_SUFFIX, u as useSelectedDocumentOfType, v as useNodesInSelectedDrive, x as sortNodesByName, y as isFileNodeKind } from "./switchboard-DAvOdf_g.js";
|
|
11
|
+
import { n as useDocumentsByIds, t as useDocumentById } from "./document-by-id-BqNuTx4S.js";
|
|
12
|
+
import { A as RENOWN_CHAIN_ID, C as logout, D as CREDENTIAL_TYPES, E as CREDENTIAL_SUBJECT_TYPE, M as RENOWN_RETURN_URL_STRIPPED_PARAMS, N as RENOWN_URL, O as DOMAIN_TYPE, P as VERIFIABLE_CREDENTIAL_EIP712_TYPE, S as login, T as CREDENTIAL_SCHEMA_EIP712_TYPE, _ as RenownLogo, a as Renown, b as useRenownAuth, c as useRenownSessionSynced, d as RenownAuthButton, f as RenownUserButton, g as DisconnectIcon, h as CopyIcon, i as RenownWalletProvider, j as RENOWN_NETWORK_ID, k as ISSUER_TYPE, l as initConnectCrypto, m as ChevronDownIcon, n as useRenownLoginMethods, o as useRenownInit, p as RenownLoginButton, r as RenownProvider, s as useRenownSessionCookie, t as useRenownWalletAdapter, u as initRenownCrypto, v as SpinnerIcon, w as openRenown, x as useRenownAuthAsync, y as UserIcon } from "./renown-DlkS61Dp.js";
|
|
13
|
+
import { i as setPGliteDB, n as useRelationalQuery, r as useRelationalDb, t as createProcessorQuery } from "./relational-DZuyKp2y.js";
|
|
14
|
+
import { a as getPackagesByDocumentType, c as trimTrailingSlash, i as getPackages, l as SYNC_REMOTES_CHANGED_EVENT, n as getPackageInfo, o as getPackagesForDocumentType, r as getPackagePage, s as searchPackages, t as RegistryClient } from "./client-Bwiji4R6.js";
|
|
15
|
+
import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
16
|
+
import { AuthEnforcementDisabledError, ChannelScheme, DocumentChangeType, DocumentChangeType as DocumentChangeType$1, DocumentIntegrityService, DriveCollectionId, DriveCollectionId as DriveCollectionId$1, DriveRequestError, GqlRequestChannel, InMemoryQueue, IntervalPollTimer, PollBehavior, PropagationMode as PropagationMode$1, REACTOR_SCHEMA, REACTOR_SCHEMA as REACTOR_SCHEMA$1, ReactorBuilder, ReactorClientBuilder, RelationalDbProcessor, SyncEventTypes, SyncOperationStatus, SyncStatus, driveIdFromUrl, isDriveAuthError, isDriveAuthError as isDriveAuthError$1, parseDriveUrl } from "@powerhousedao/reactor";
|
|
15
17
|
import { DriveDocumentSchema, driveCreateDocument, getDescendants, getNextCopyNumber, isFileNode, isFolderNode, setAvailableOffline, setDriveIcon, setDriveName, setSharingType } from "@powerhousedao/shared/document-drive";
|
|
16
18
|
import { DEFAULT_SIGNATURE_POLICY, actionSignerIdentity, actionSigningTarget, createZip, isDocumentZip, parseBulkArchive, requestedSignaturePolicy, toTransportAction, validateInitialState, validateModules, validateStateSchemaName, withSignaturePolicy, zipEntries } from "@powerhousedao/shared/document-model";
|
|
17
19
|
import { allPass, filter, find, forEach, funnel, hasAtLeast, isArray, isDefined, isIncludedIn, isStrictEqual, isTruthy, last, map, mapToObj, once, pipe, prop, split, unique } from "remeda";
|
|
18
20
|
import { pascalCase } from "change-case";
|
|
19
|
-
import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
20
21
|
import { ClientError } from "graphql-request";
|
|
21
22
|
import { Kind, parse } from "graphql";
|
|
22
23
|
import { z } from "zod";
|
|
@@ -67,7 +68,7 @@ async function expandBulkArchive(file, driveId, targetParent) {
|
|
|
67
68
|
}];
|
|
68
69
|
const entries = await parseBulkArchive(data);
|
|
69
70
|
if (!(await Promise.all(entries.map((entry) => isDocumentZip(entry.data)))).some(Boolean)) throw new Error("Archive contains no Powerhouse documents");
|
|
70
|
-
const reactorClient =
|
|
71
|
+
const reactorClient = getPHStore()?.reactorClient;
|
|
71
72
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
72
73
|
const knownNodes = [...(await reactorClient.get(driveId)).state.global.nodes];
|
|
73
74
|
const dirToNode = /* @__PURE__ */ new Map();
|
|
@@ -178,7 +179,7 @@ async function buildFolderZip(drive, folderNode, fetchDocument, onProgress) {
|
|
|
178
179
|
* showSaveFilePicker (fallback: blob download), mirroring exportFile.
|
|
179
180
|
*/
|
|
180
181
|
async function downloadFolderZip(drive, folderNode, onProgress) {
|
|
181
|
-
const reactorClient =
|
|
182
|
+
const reactorClient = getPHStore()?.reactorClient;
|
|
182
183
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
183
184
|
const result = await buildFolderZip(drive, folderNode, async (id) => {
|
|
184
185
|
const doc = await reactorClient.get(id);
|
|
@@ -269,7 +270,7 @@ async function createProtocolVersions() {
|
|
|
269
270
|
async function addDrive(input, preferredEditor) {
|
|
270
271
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
271
272
|
if (!isAllowedToCreateDocuments) throw new Error("User is not allowed to create drives");
|
|
272
|
-
const reactorClient =
|
|
273
|
+
const reactorClient = getPHStore()?.reactorClient;
|
|
273
274
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
274
275
|
const driveDoc = withSignaturePolicy(driveCreateDocument({ global: {
|
|
275
276
|
name: input.global.name || "",
|
|
@@ -288,7 +289,7 @@ async function addDrive(input, preferredEditor) {
|
|
|
288
289
|
async function addRemoteDrive(url, driveId, options) {
|
|
289
290
|
const reactorClient = getFullReactorClient();
|
|
290
291
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
291
|
-
const sync =
|
|
292
|
+
const sync = getPHStore()?.reactorClientModule?.reactorModule?.syncModule?.syncManager;
|
|
292
293
|
if (!sync) throw new Error("Sync not initialized");
|
|
293
294
|
let driveInfo;
|
|
294
295
|
try {
|
|
@@ -324,9 +325,9 @@ async function addRemoteDrive(url, driveId, options) {
|
|
|
324
325
|
async function deleteDrive(driveId) {
|
|
325
326
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
326
327
|
if (!isAllowedToCreateDocuments) throw new Error("User is not allowed to delete drives");
|
|
327
|
-
const reactorClient =
|
|
328
|
+
const reactorClient = getPHStore()?.reactorClient;
|
|
328
329
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
329
|
-
const sync =
|
|
330
|
+
const sync = getPHStore()?.reactorClientModule?.reactorModule?.syncModule?.syncManager;
|
|
330
331
|
if (sync) {
|
|
331
332
|
const collectionId = DriveCollectionId$1.forDrive(driveId);
|
|
332
333
|
const remotes = sync.list().filter((remote) => remote.meta.collectionId.equals(collectionId));
|
|
@@ -344,21 +345,21 @@ async function renameDrive(driveId, name) {
|
|
|
344
345
|
async function setDriveAvailableOffline(driveId, availableOffline) {
|
|
345
346
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
346
347
|
if (!isAllowedToCreateDocuments) throw new Error("User is not allowed to change drive availability");
|
|
347
|
-
const reactorClient =
|
|
348
|
+
const reactorClient = getPHStore()?.reactorClient;
|
|
348
349
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
349
350
|
return await reactorClient.execute(driveId, "main", [setAvailableOffline({ availableOffline })]);
|
|
350
351
|
}
|
|
351
352
|
async function setDriveSharingType(driveId, sharingType) {
|
|
352
353
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
353
354
|
if (!isAllowedToCreateDocuments) throw new Error("User is not allowed to change drive sharing type");
|
|
354
|
-
const reactorClient =
|
|
355
|
+
const reactorClient = getPHStore()?.reactorClient;
|
|
355
356
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
356
357
|
return await reactorClient.execute(driveId, "main", [setSharingType({ type: sharingType })]);
|
|
357
358
|
}
|
|
358
359
|
async function setDriveMetadata(driveId, metadata) {
|
|
359
360
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
360
361
|
if (!isAllowedToCreateDocuments) throw new Error("User is not allowed to update drive metadata");
|
|
361
|
-
const reactorClient =
|
|
362
|
+
const reactorClient = getPHStore()?.reactorClient;
|
|
362
363
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
363
364
|
const actions = [];
|
|
364
365
|
if (metadata.name) actions.push(setDriveName({ name: metadata.name }));
|
|
@@ -426,7 +427,7 @@ const graphqlDocumentsEvents = ["DeleteDocuments"];
|
|
|
426
427
|
//#endregion
|
|
427
428
|
//#region src/graphql/fetchers.ts
|
|
428
429
|
async function reactorGraphqlFetchDocument(identifier, documentSchema) {
|
|
429
|
-
const client =
|
|
430
|
+
const client = getPHStore()?.reactorGraphQLClient;
|
|
430
431
|
if (!client) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
431
432
|
try {
|
|
432
433
|
const document = (await client.GetDocument({ identifier })).document?.document;
|
|
@@ -437,7 +438,7 @@ async function reactorGraphqlFetchDocument(identifier, documentSchema) {
|
|
|
437
438
|
}
|
|
438
439
|
}
|
|
439
440
|
async function reactorGraphqlBatchFetchDocuments(identifiers) {
|
|
440
|
-
if (!
|
|
441
|
+
if (!getPHStore()?.reactorGraphQLClient) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
441
442
|
const promises = map(identifiers, (identifier) => reactorGraphqlFetchDocument(identifier));
|
|
442
443
|
return await Promise.all(promises);
|
|
443
444
|
}
|
|
@@ -526,7 +527,7 @@ function isMissingDocumentMessage(message) {
|
|
|
526
527
|
return message.includes("Document not found") || /Document \S+ was purged/.test(message);
|
|
527
528
|
}
|
|
528
529
|
async function fetchDocumentForRefetch(identifier) {
|
|
529
|
-
const client =
|
|
530
|
+
const client = getPHStore()?.reactorGraphQLClient;
|
|
530
531
|
if (!client) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
531
532
|
const notFound = (cause) => new Error(`Document not found: ${identifier}`, { cause });
|
|
532
533
|
let result;
|
|
@@ -642,7 +643,7 @@ var GraphQLClientDocumentCache = class {
|
|
|
642
643
|
//#endregion
|
|
643
644
|
//#region src/graphql/mutators.ts
|
|
644
645
|
async function reactorGraphqlCreateDocument(document, parentIdentifier = DEFAULT_DRIVE_ID) {
|
|
645
|
-
const client =
|
|
646
|
+
const client = getPHStore()?.reactorGraphQLClient;
|
|
646
647
|
if (!client) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
647
648
|
return await client.CreateDocument({
|
|
648
649
|
document,
|
|
@@ -650,17 +651,17 @@ async function reactorGraphqlCreateDocument(document, parentIdentifier = DEFAULT
|
|
|
650
651
|
});
|
|
651
652
|
}
|
|
652
653
|
async function reactorGraphqlDeleteDocument(identifier) {
|
|
653
|
-
const client =
|
|
654
|
+
const client = getPHStore()?.reactorGraphQLClient;
|
|
654
655
|
if (!client) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
655
656
|
return await client.DeleteDocument({ identifier });
|
|
656
657
|
}
|
|
657
658
|
async function reactorGraphqlDeleteDocuments(identifiers) {
|
|
658
|
-
const client =
|
|
659
|
+
const client = getPHStore()?.reactorGraphQLClient;
|
|
659
660
|
if (!client) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
660
661
|
return await client.DeleteDocuments({ identifiers });
|
|
661
662
|
}
|
|
662
663
|
async function reactorGraphqlMutateDocument(documentIdentifier, ...actions) {
|
|
663
|
-
const client =
|
|
664
|
+
const client = getPHStore()?.reactorGraphQLClient;
|
|
664
665
|
if (!client) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
665
666
|
return await client.MutateDocument({
|
|
666
667
|
documentIdentifier,
|
|
@@ -1210,25 +1211,24 @@ function useInitReactorGraphqlClient(switchboardUrl = DEFAULT_SWITCHBOARD_URL, d
|
|
|
1210
1211
|
return hasInit;
|
|
1211
1212
|
}
|
|
1212
1213
|
async function reactorGraphqlFetchDrive(identifier) {
|
|
1213
|
-
const client =
|
|
1214
|
+
const client = getPHStore()?.reactorGraphQLClient;
|
|
1214
1215
|
if (!client) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
1215
1216
|
const result = await client.GetDocument({ identifier });
|
|
1216
1217
|
if (!result.document?.document) throw new Error("Could not fetch drive with id: " + identifier);
|
|
1217
1218
|
return phDocumentFromQuery(result.document.document, DriveDocumentSchema);
|
|
1218
1219
|
}
|
|
1219
1220
|
async function reactorGraphqlSyncDrive(driveId) {
|
|
1220
|
-
if (!
|
|
1221
|
+
if (!getPHStore()?.reactorGraphQLClient) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
1221
1222
|
const drive = await reactorGraphqlFetchDrive(driveId);
|
|
1222
1223
|
setDrives([drive]);
|
|
1223
|
-
|
|
1224
|
+
selectDrive(drive);
|
|
1224
1225
|
}
|
|
1225
1226
|
async function initGraphQLReactorClientWithDocumentCache(switchboardUrl, driveId) {
|
|
1226
|
-
if (!window.ph) window.ph = {};
|
|
1227
1227
|
callEventHandlerRegisterFunctions(commonGlobalEventHandlerFunctions);
|
|
1228
1228
|
const client = createClient(switchboardUrl, documentCacheClientMiddleware);
|
|
1229
1229
|
setGraphQLReactorClient(client);
|
|
1230
1230
|
await reactorGraphqlSyncDrive(driveId);
|
|
1231
|
-
|
|
1231
|
+
selectNode(void 0);
|
|
1232
1232
|
setDocumentCache(new GraphQLClientDocumentCache());
|
|
1233
1233
|
forEach(graphqlEventsToSyncDrive, (name) => {
|
|
1234
1234
|
window.addEventListener(name, () => {
|
|
@@ -1269,6 +1269,7 @@ function resolveNode(driveId, node) {
|
|
|
1269
1269
|
return node?.id !== driveId ? node : void 0;
|
|
1270
1270
|
}
|
|
1271
1271
|
function useNodeActions() {
|
|
1272
|
+
const store = usePHStore();
|
|
1272
1273
|
const [selectedDrive] = useSelectedDriveSafe();
|
|
1273
1274
|
const selectedFolder = useSelectedFolder();
|
|
1274
1275
|
const selectedParentFolder = useFolderById(useSelectedNode()?.parentFolder);
|
|
@@ -1328,7 +1329,7 @@ function useNodeActions() {
|
|
|
1328
1329
|
const resolvedTarget = resolveNode(selectedDriveId, selectedFolder ?? selectedParentFolder);
|
|
1329
1330
|
if (!resolvedTarget) return;
|
|
1330
1331
|
const newFolder = await onAddFolder(name, resolvedTarget);
|
|
1331
|
-
if (newFolder)
|
|
1332
|
+
if (newFolder) selectNodeIn(store, newFolder);
|
|
1332
1333
|
}
|
|
1333
1334
|
async function onRenameDriveNodes(newName, nodeId) {
|
|
1334
1335
|
if (!drives) return;
|
|
@@ -1380,6 +1381,21 @@ function useParentFolderForSelectedNode() {
|
|
|
1380
1381
|
return useNodeParentFolderById(useSelectedNode()?.id);
|
|
1381
1382
|
}
|
|
1382
1383
|
//#endregion
|
|
1384
|
+
//#region src/hooks/url-state.ts
|
|
1385
|
+
/** The nearest store's navigation, else the bound store's, else the browser's.
|
|
1386
|
+
* Hosts set it once, so hook order holds. */
|
|
1387
|
+
function usePHNavigation() {
|
|
1388
|
+
return getNavigationOf(usePHStore());
|
|
1389
|
+
}
|
|
1390
|
+
/** The current query params. */
|
|
1391
|
+
function useSearchParams() {
|
|
1392
|
+
return usePHNavigation().useSearchParams();
|
|
1393
|
+
}
|
|
1394
|
+
/** Sets query params: an object merges into them, a function returns them all. */
|
|
1395
|
+
function useSetSearchParams() {
|
|
1396
|
+
return usePHNavigation().useSetSearchParams();
|
|
1397
|
+
}
|
|
1398
|
+
//#endregion
|
|
1383
1399
|
//#region src/hooks/subgraph-modules.ts
|
|
1384
1400
|
function useSubgraphModules() {
|
|
1385
1401
|
return useVetraPackages().flatMap((pkg) => pkg.subgraphs || []);
|
|
@@ -1747,13 +1763,17 @@ function getSyncStatus(documentId, sharingType) {
|
|
|
1747
1763
|
return Promise.resolve(getSyncStatusSync(documentId, sharingType));
|
|
1748
1764
|
}
|
|
1749
1765
|
function getSyncStatusSync(documentId, sharingType) {
|
|
1750
|
-
if (sharingType === "LOCAL") return;
|
|
1751
|
-
const syncManager =
|
|
1766
|
+
if (sharingType === "LOCAL" || typeof window === "undefined") return;
|
|
1767
|
+
const syncManager = getPHStore()?.reactorClientModule?.reactorModule?.syncModule?.syncManager;
|
|
1752
1768
|
if (!syncManager) return;
|
|
1753
1769
|
const status = syncManager.getSyncStatus(documentId);
|
|
1754
1770
|
if (status === void 0) return;
|
|
1755
1771
|
return syncStatusToUI[status];
|
|
1756
1772
|
}
|
|
1773
|
+
/** A drive's display name: the header's (renames set it), else its creation name. */
|
|
1774
|
+
function getDriveName(drive) {
|
|
1775
|
+
return drive.header.name || drive.state.global.name;
|
|
1776
|
+
}
|
|
1757
1777
|
//#endregion
|
|
1758
1778
|
//#region src/utils/get-revision-from-date.ts
|
|
1759
1779
|
const getRevisionFromDate = (startDate, endDate, operations = []) => {
|
|
@@ -2136,6 +2156,45 @@ function useUserPermissions() {
|
|
|
2136
2156
|
};
|
|
2137
2157
|
}
|
|
2138
2158
|
//#endregion
|
|
2159
|
+
//#region src/hooks/close-node.ts
|
|
2160
|
+
/** Leaves a node's view: back to the entry it was opened from, past entries
|
|
2161
|
+
* pushed inside it; else, e.g. after a deep link, to its parent in place. */
|
|
2162
|
+
function useCloseNode(nodeId) {
|
|
2163
|
+
const store = usePHStore();
|
|
2164
|
+
const navigation = usePHNavigation();
|
|
2165
|
+
const parentFolder = useNodeParentFolderById(nodeId);
|
|
2166
|
+
return () => {
|
|
2167
|
+
if (navigation.closeOpened?.()) return;
|
|
2168
|
+
selectNodeIn(store, parentFolder, { replace: true });
|
|
2169
|
+
};
|
|
2170
|
+
}
|
|
2171
|
+
//#endregion
|
|
2172
|
+
//#region src/hooks/link-props.ts
|
|
2173
|
+
/** A plain primary click; modified and other-button clicks stay the browser's. */
|
|
2174
|
+
function isPlainClick(event) {
|
|
2175
|
+
return !event.defaultPrevented && event.button === 0 && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey;
|
|
2176
|
+
}
|
|
2177
|
+
/** Props for an `<a>` that opens `target` in the app on a plain click, and
|
|
2178
|
+
* leaves new tabs and windows to the browser; acts on the store in context. */
|
|
2179
|
+
function useLinkProps(target, open) {
|
|
2180
|
+
const navigation = usePHNavigation();
|
|
2181
|
+
const href = navigation.hrefFor?.(target) ?? targetPathname(target);
|
|
2182
|
+
const isCurrent = navigation.useIsCurrent?.(target) ?? false;
|
|
2183
|
+
const preload = () => navigation.preload?.(target);
|
|
2184
|
+
const openTarget = open ?? (() => openTargetWith(navigation, target));
|
|
2185
|
+
return {
|
|
2186
|
+
href,
|
|
2187
|
+
onClick: (event) => {
|
|
2188
|
+
if (!isPlainClick(event)) return;
|
|
2189
|
+
event.preventDefault();
|
|
2190
|
+
openTarget();
|
|
2191
|
+
},
|
|
2192
|
+
onMouseEnter: preload,
|
|
2193
|
+
onFocus: preload,
|
|
2194
|
+
"aria-current": isCurrent ? "page" : void 0
|
|
2195
|
+
};
|
|
2196
|
+
}
|
|
2197
|
+
//#endregion
|
|
2139
2198
|
//#region src/hooks/attachment-progress.ts
|
|
2140
2199
|
const IDLE_PROGRESS = {
|
|
2141
2200
|
percent: 0,
|
|
@@ -2534,6 +2593,215 @@ function createDebouncedRefreshReactorDataClient(debounceDelayMs = DEFAULT_DEBOU
|
|
|
2534
2593
|
const refreshReactorData = createDebouncedRefreshReactorData();
|
|
2535
2594
|
const refreshReactorDataClient = createDebouncedRefreshReactorDataClient();
|
|
2536
2595
|
//#endregion
|
|
2596
|
+
//#region src/routing/drive-arrivals.ts
|
|
2597
|
+
let pendingAdds = 0;
|
|
2598
|
+
const addListeners = /* @__PURE__ */ new Set();
|
|
2599
|
+
function notifyAdds() {
|
|
2600
|
+
for (const listener of [...addListeners]) listener();
|
|
2601
|
+
}
|
|
2602
|
+
/** Counts a background drive addition as pending until it settles. */
|
|
2603
|
+
function trackDriveArrival(promise) {
|
|
2604
|
+
pendingAdds++;
|
|
2605
|
+
notifyAdds();
|
|
2606
|
+
return promise.finally(() => {
|
|
2607
|
+
pendingAdds--;
|
|
2608
|
+
notifyAdds();
|
|
2609
|
+
});
|
|
2610
|
+
}
|
|
2611
|
+
/** Resolves once `store.drives` lists `driveId`, or after `maxWaitMs`: a
|
|
2612
|
+
* finished first pull does not mean the drive is listed yet. */
|
|
2613
|
+
function untilDriveListed(store, driveId, maxWaitMs = 15e3) {
|
|
2614
|
+
const listed = () => !!store.drives?.some((d) => d.header.id === driveId);
|
|
2615
|
+
if (listed()) return Promise.resolve();
|
|
2616
|
+
return new Promise((resolve) => {
|
|
2617
|
+
const finish = () => {
|
|
2618
|
+
clearTimeout(timer);
|
|
2619
|
+
unsubscribe();
|
|
2620
|
+
resolve();
|
|
2621
|
+
};
|
|
2622
|
+
const timer = setTimeout(finish, maxWaitMs);
|
|
2623
|
+
const unsubscribe = subscribePHStore(store, () => {
|
|
2624
|
+
if (listed()) finish();
|
|
2625
|
+
}, "drives");
|
|
2626
|
+
});
|
|
2627
|
+
}
|
|
2628
|
+
const REMOTE_EVENTS = [SyncEventTypes.CONNECTION_STATE_CHANGED, SYNC_REMOTES_CHANGED_EVENT];
|
|
2629
|
+
/** Drives still on their way into `store`: being added or first syncing. */
|
|
2630
|
+
function createDriveArrivals(store) {
|
|
2631
|
+
return {
|
|
2632
|
+
isPending: () => store.drives === void 0 || pendingAdds > 0 || isInitialSyncInFlight(store),
|
|
2633
|
+
isDrivePending: (driveId) => isInitialSyncInFlight(store, driveId),
|
|
2634
|
+
subscribe(listener) {
|
|
2635
|
+
const watched = /* @__PURE__ */ new Map();
|
|
2636
|
+
const listenToRemotes = () => {
|
|
2637
|
+
const channels = /* @__PURE__ */ new Set();
|
|
2638
|
+
for (const { channel } of listSyncRemotes(store)) {
|
|
2639
|
+
channels.add(channel);
|
|
2640
|
+
if (watched.has(channel)) continue;
|
|
2641
|
+
try {
|
|
2642
|
+
watched.set(channel, channel.onConnectionStateChange(listener));
|
|
2643
|
+
} catch {
|
|
2644
|
+
watched.set(channel, () => {});
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
for (const [channel, unsubscribe] of watched) {
|
|
2648
|
+
if (channels.has(channel)) continue;
|
|
2649
|
+
unsubscribe();
|
|
2650
|
+
watched.delete(channel);
|
|
2651
|
+
}
|
|
2652
|
+
};
|
|
2653
|
+
const onChange = () => {
|
|
2654
|
+
listenToRemotes();
|
|
2655
|
+
listener();
|
|
2656
|
+
};
|
|
2657
|
+
let unsubscribeBus = [];
|
|
2658
|
+
const listenToBus = () => {
|
|
2659
|
+
for (const unsubscribe of unsubscribeBus) unsubscribe();
|
|
2660
|
+
const bus = store.reactorClientModule?.reactorModule?.eventBus;
|
|
2661
|
+
unsubscribeBus = bus ? REMOTE_EVENTS.map((type) => bus.subscribe(type, onChange)) : [];
|
|
2662
|
+
};
|
|
2663
|
+
const onModuleChange = () => {
|
|
2664
|
+
listenToBus();
|
|
2665
|
+
onChange();
|
|
2666
|
+
};
|
|
2667
|
+
listenToRemotes();
|
|
2668
|
+
listenToBus();
|
|
2669
|
+
addListeners.add(onChange);
|
|
2670
|
+
const unsubscribes = [subscribePHStore(store, onChange, "drives"), subscribePHStore(store, onModuleChange, "reactorClientModule")];
|
|
2671
|
+
return () => {
|
|
2672
|
+
addListeners.delete(onChange);
|
|
2673
|
+
for (const unsubscribe of unsubscribes) unsubscribe();
|
|
2674
|
+
for (const unsubscribe of unsubscribeBus) unsubscribe();
|
|
2675
|
+
for (const unsubscribe of watched.values()) unsubscribe();
|
|
2676
|
+
watched.clear();
|
|
2677
|
+
};
|
|
2678
|
+
}
|
|
2679
|
+
};
|
|
2680
|
+
}
|
|
2681
|
+
//#endregion
|
|
2682
|
+
//#region src/routing/resolve-drive-route.ts
|
|
2683
|
+
/** How long a navigation waits for its document and editor before it shows;
|
|
2684
|
+
* past it the view commits and renders them as they load. */
|
|
2685
|
+
const PREFETCH_WAIT_MS = 3e3;
|
|
2686
|
+
const DRIVE_ARRIVAL_MAX_WAIT_MS = 15e3;
|
|
2687
|
+
/** A listed drive by slug, id, or a `<name>-<id>` slug's trailing id. */
|
|
2688
|
+
function findDriveBySlugOrId(store, ref) {
|
|
2689
|
+
return findDriveBySlug(store.drives, ref);
|
|
2690
|
+
}
|
|
2691
|
+
function findNode(drive, nodeId) {
|
|
2692
|
+
return drive?.state.global.nodes.find((node) => node.id === nodeId);
|
|
2693
|
+
}
|
|
2694
|
+
/** Resolves with `read()` once it is defined, nothing is still arriving, the
|
|
2695
|
+
* signal aborts or the cap passes. */
|
|
2696
|
+
function waitForArrival(read, arrivals, signal, maxWaitMs = DRIVE_ARRIVAL_MAX_WAIT_MS) {
|
|
2697
|
+
const value = read();
|
|
2698
|
+
if (value !== void 0 || !arrivals?.isPending() || signal.aborted) return Promise.resolve(value);
|
|
2699
|
+
return new Promise((resolve) => {
|
|
2700
|
+
let unsubscribe = () => {};
|
|
2701
|
+
const finish = (result) => {
|
|
2702
|
+
clearTimeout(timer);
|
|
2703
|
+
unsubscribe();
|
|
2704
|
+
signal.removeEventListener("abort", onAbort);
|
|
2705
|
+
resolve(result);
|
|
2706
|
+
};
|
|
2707
|
+
const onAbort = () => finish(void 0);
|
|
2708
|
+
const timer = setTimeout(onAbort, maxWaitMs);
|
|
2709
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
2710
|
+
unsubscribe = arrivals.subscribe(() => {
|
|
2711
|
+
const next = read();
|
|
2712
|
+
if (next !== void 0 || !arrivals.isPending()) finish(next);
|
|
2713
|
+
});
|
|
2714
|
+
});
|
|
2715
|
+
}
|
|
2716
|
+
/** Asks the reactor directly: a just-created drive may not be listed yet. */
|
|
2717
|
+
async function fetchDrive(store, ref, signal) {
|
|
2718
|
+
try {
|
|
2719
|
+
const document = await store.reactorClient?.get(ref, void 0, signal);
|
|
2720
|
+
return DRIVE_DOCUMENT_TYPES.includes(document?.header.documentType ?? "") ? document : void 0;
|
|
2721
|
+
} catch {
|
|
2722
|
+
return;
|
|
2723
|
+
}
|
|
2724
|
+
}
|
|
2725
|
+
function editorModules(store) {
|
|
2726
|
+
return store.vetraPackageManager?.packages.flatMap((pkg) => pkg.editors) ?? [];
|
|
2727
|
+
}
|
|
2728
|
+
async function preloadModule(module) {
|
|
2729
|
+
try {
|
|
2730
|
+
await (module ? preloadEditorModule(module) : void 0);
|
|
2731
|
+
} catch {}
|
|
2732
|
+
}
|
|
2733
|
+
function documentEditor(store, document) {
|
|
2734
|
+
const { documentType, meta } = document.header;
|
|
2735
|
+
const modules = editorModules(store);
|
|
2736
|
+
return modules.find((module) => module.config.id === meta?.preferredEditor) ?? modules.find((module) => module.documentTypes.includes(documentType));
|
|
2737
|
+
}
|
|
2738
|
+
function driveApp(store, drive) {
|
|
2739
|
+
const id = drive.header.meta?.preferredEditor ?? "powerhouse/generic-drive-explorer";
|
|
2740
|
+
return editorModules(store).find((module) => module.config.id === id);
|
|
2741
|
+
}
|
|
2742
|
+
/** Loads a drive's app module so its view renders without suspending;
|
|
2743
|
+
* undefined when it is already loaded, so a warm open waits on nothing. */
|
|
2744
|
+
function preloadDriveApp(store, drive) {
|
|
2745
|
+
const module = driveApp(store, drive);
|
|
2746
|
+
return module && preloadEditorModule(module)?.then(noop, noop);
|
|
2747
|
+
}
|
|
2748
|
+
const noop = () => void 0;
|
|
2749
|
+
/** Warms a file node's document and its editor module. */
|
|
2750
|
+
async function prefetchDocument(store, node) {
|
|
2751
|
+
if (!isFileNode(node)) return;
|
|
2752
|
+
try {
|
|
2753
|
+
const document = await store.documentCache?.get(node.id);
|
|
2754
|
+
if (document) await preloadModule(documentEditor(store, document));
|
|
2755
|
+
} catch {}
|
|
2756
|
+
}
|
|
2757
|
+
/** Resolves once `work` settles, `ms` pass or `signal` aborts. */
|
|
2758
|
+
function settleWithin(work, ms, signal) {
|
|
2759
|
+
if (signal.aborted) return Promise.resolve();
|
|
2760
|
+
return new Promise((resolve) => {
|
|
2761
|
+
const done = () => {
|
|
2762
|
+
clearTimeout(timer);
|
|
2763
|
+
signal.removeEventListener("abort", done);
|
|
2764
|
+
resolve();
|
|
2765
|
+
};
|
|
2766
|
+
const timer = setTimeout(done, ms);
|
|
2767
|
+
signal.addEventListener("abort", done, { once: true });
|
|
2768
|
+
work.then(done, done);
|
|
2769
|
+
});
|
|
2770
|
+
}
|
|
2771
|
+
/** Resolves a drive route's slugs, waiting for drives that are still syncing,
|
|
2772
|
+
* and warms what the resolved view needs. */
|
|
2773
|
+
async function resolveDriveRoute(options) {
|
|
2774
|
+
const { store, driveSlug, nodeSlug, signal } = options;
|
|
2775
|
+
const arrivals = options.preload ? void 0 : options.arrivals;
|
|
2776
|
+
const drive = await waitForArrival(() => findDriveBySlugOrId(store, driveSlug), arrivals, signal) ?? await fetchDrive(store, extractDriveIdFromSlug(driveSlug) ?? driveSlug, signal);
|
|
2777
|
+
if (!drive) return { kind: "drive-not-found" };
|
|
2778
|
+
const driveId = drive.header.id;
|
|
2779
|
+
const appPreload = preloadDriveApp(store, drive);
|
|
2780
|
+
if (!nodeSlug) {
|
|
2781
|
+
if (appPreload) await settleWithin(appPreload, PREFETCH_WAIT_MS, signal);
|
|
2782
|
+
return {
|
|
2783
|
+
kind: "drive",
|
|
2784
|
+
driveId
|
|
2785
|
+
};
|
|
2786
|
+
}
|
|
2787
|
+
const nodeId = extractNodeIdFromSlug(nodeSlug) ?? drive.state.global.nodes.find((n) => n.id === nodeSlug || makeNodeSlug(n) === nodeSlug)?.id;
|
|
2788
|
+
const driveArrivals = arrivals && {
|
|
2789
|
+
...arrivals,
|
|
2790
|
+
isPending: () => arrivals.isDrivePending(driveId)
|
|
2791
|
+
};
|
|
2792
|
+
const node = nodeId ? await waitForArrival(() => findNode(findDriveBySlugOrId(store, driveId) ?? drive, nodeId), driveArrivals, signal) ?? findNode(await fetchDrive(store, driveId, signal), nodeId) : void 0;
|
|
2793
|
+
if (!node) return {
|
|
2794
|
+
kind: "node-not-found",
|
|
2795
|
+
driveId
|
|
2796
|
+
};
|
|
2797
|
+
await settleWithin(Promise.all([appPreload, prefetchDocument(store, node)]), PREFETCH_WAIT_MS, signal);
|
|
2798
|
+
return {
|
|
2799
|
+
kind: "drive",
|
|
2800
|
+
driveId,
|
|
2801
|
+
nodeId: node.id
|
|
2802
|
+
};
|
|
2803
|
+
}
|
|
2804
|
+
//#endregion
|
|
2537
2805
|
//#region src/remote-controller/action-tracker.ts
|
|
2538
2806
|
/**
|
|
2539
2807
|
* Tracks pending actions with their operation context (prevOpHash, prevOpIndex).
|
|
@@ -3205,6 +3473,6 @@ var BrowserLocalStorage = class extends BaseStorage {
|
|
|
3205
3473
|
}
|
|
3206
3474
|
};
|
|
3207
3475
|
//#endregion
|
|
3208
|
-
export { ActionTracker, BaseStorage, BatchJobFailedError, 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, DRIVE_DOCUMENT_TYPES, DisconnectIcon, DocumentCache, DocumentChangeType, DocumentIntegrityService, DocumentModelNotFoundError, DocumentTypeMismatchError, DriveCollectionId, EDITOR_FILE_DROP_OPT_OUT_ATTR, GqlRequestChannel, GraphQLClientDocumentCache, GraphQLOperationNotSupportedError, GraphQLReactorClient, GraphQLReactorProvider, GraphQLWrongBackendError, IDLE_OPERATIONS_ENTRY, IDLE_REFETCH_STATE, ISSUER_TYPE, InMemoryQueue, IntervalPollTimer, MutateDocumentWithOperationsDocument, NoSelectedDocumentError, PollBehavior, PropagationMode, REACTOR_SCHEMA, RENOWN_CHAIN_ID, RENOWN_INITIAL_ANONYMOUS, RENOWN_INITIAL_UNKNOWN, RENOWN_NETWORK_ID, RENOWN_RETURN_URL_STRIPPED_PARAMS, RENOWN_URL, ReactorBuilder, ReactorClientBuilder, ReactorOperationFieldsFragmentDoc, RegistryClient, RelationalDbProcessor, RemoteClient, RemoteDocumentController, Renown, RenownAuthButton, RenownInitialUserProvider, RenownLoginButton, RenownLogo, RenownProvider, RenownUserButton, RenownWalletProvider, SpinnerIcon, StaticPackageManager, SubgraphSdkRegistry, SyncOperationStatus, UnsupportedDocumentTypeError, UserIcon, VERIFIABLE_CREDENTIAL_EIP712_TYPE, addAllowListEventHandler, addAllowedDocumentTypesEventHandler, addAnalyticsDatabaseNameEventHandler, addAttachmentServiceEventHandler, addBasePathEventHandler, addCliVersionEventHandler, addDefaultDrivesUrlEventHandler, addDisabledEditorsEventHandler, addDocument, addDocumentCacheEventHandler, addDraggingNodeEventHandler, addDrive, addDrivesEventHandler, addDrivesPreserveStrategyEventHandler, addEnabledEditorsEventHandler, addFeaturesEventHandler, addFileUploadOperationsChunkSizeEventHandler, addFileWithProgress, addFolder, addFullReactorClientEventHandler, 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, addRenownAdaptersEventHandler, addRenownChainIdEventHandler, addRenownEventHandler, addRenownNetworkIdEventHandler, addRenownUrlEventHandler, addRequiresHardRefreshEventHandler, addResetSelectedNodeEventHandler, addRevisionHistoryVisibleEventHandler, addRouterBasenameEventHandler, addSelectedDriveIdEventHandler, addSelectedNodeIdEventHandler, addSelectedTimelineItemEventHandler, addSelectedTimelineRevisionEventHandler, addSentryDsnEventHandler, addSentryEnvEventHandler, addSentryReleaseEventHandler, addSetSelectedDriveOnPopStateEventHandler, addSetSelectedNodeOnPopStateEventHandler, addStudioModeEventHandler, addSwitchboardUrlEventHandler, addToastEventHandler, addVersionCheckIntervalEventHandler, addVersionEventHandler, addVetraPackageManagerEventHandler, addWarnOutdatedAppEventHandler, ambientRenownTokenProvider, baseDocumentModels, baseDocumentModelsMap, buildDocumentSubgraphQuery, buildDocumentSubgraphUrl, buildFolderZip, callEventHandlerRegisterFunctions, callGlobalSetterForKey, clearGlobal, closePHModal, commonGlobalEventHandlerFunctions, convertRemoteOperations, createAnalyticsStore, createClient, createProcessorQuery, createUrlWithPreservedParams, deleteDrive, deleteNode, deriveSystemUrl, describeGraphQLDocument, diffStateShapes, dispatchActions, downloadDocument, downloadFolderZip, driveIdFromUrl, dropAllReactorStorage, ensurePHEventHandlers, expandBulkArchive, exportFile, extractDriveIdFromPath, extractDriveIdFromSlug, extractDriveSlugFromPath, extractNodeIdFromPath, extractNodeIdFromSlug, extractNodeSlugFromPath, fetchDriveInfo, findDerivedId, findIsServableOverGraphQL, findUuid, getAnalyticsStore, getDocumentExtension, getDocumentGraphqlQuery, getDocumentStateSelection, getDocumentUpgradePreview, getDocumentVersionStatus, getDriveIdBySlug, getDrives, getFullReactorClient, getGlobal, getPackageInfo, getPackagePage, getPackages, getPackagesByDocumentType, getPackagesForDocumentType, getPathWithoutBase, getRevisionFromDate, getSlugFromDriveUrl, getSwitchboardBaseFromChannelUrl, getSwitchboardGatewayUrlFromDriveUrl, getSyncStatus, getSyncStatusSync, getUserPermissions, graphqlDocumentEvents, graphqlDocumentsEvents, graphqlEventsToSyncDrive, hasPreloadBandwidth, hideRevisionHistory, identifierFromMutateDocumentOperationVariables, initConnectCrypto, initRenownCrypto, initTheme, isAuthRefusalClose, isDocumentTypeSupported, isDriveAuthError, isExternalControlsEnabledEventFunctions, isFileNodeKind, isFolderNodeKind, isGraphQLReactorClient, isOperationCache, isoStringFromDateTime, loadFile, loading, login, logout, makeAuthConnectionParams, makeAuthMiddleware, makeDriveUrlComponent, makeNodeSlug, makePHEventFunctions, onVetraPackageManager, openRenown, packageFromDocumentModels, parseDriveUrl, phAppConfigHooks, phAppConfigSetters, phDocumentEditorConfigHooks, phDocumentEditorConfigSetters, phDocumentFromGetDocument, phDocumentFromMutation, phDocumentFromQuery, phDocumentsFromQuery, phGlobalConfigHooks, phGlobalConfigSetters, preloadEditorModule, prepareSignedActions, reactorGraphqlBatchFetchDocuments, reactorGraphqlCreateDocument, reactorGraphqlDeleteDocument, reactorGraphqlDeleteDocuments, reactorGraphqlFetchDocument, reactorGraphqlMutateDocument, readPromiseState, refreshReactorData, refreshReactorDataClient, renameDrive, renameDriveNode, resolveDocumentModelModule, resolveUrlPathname, revisionMapFromRevisionsList, searchPackages, setAllowList, setAllowedDocumentTypes, setAnalyticsDatabaseName, setAttachmentService, setBasePath, setCliVersion, setDefaultDrivesUrl, setDefaultPHGlobalConfig, setDisabledEditors, setDocumentCache, setDriveAvailableOffline, setDriveMetadata, setDriveSharingType, setDrives, setDrivesPreserveStrategy, setEnabledEditors, setFeatures, setFileUploadOperationsChunkSize, setFullReactorClient, 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, setPGliteDB, setPHAppConfig, setPHAppConfigByKey, setPHDocumentEditorConfig, setPHDocumentEditorConfigByKey, setPHGlobalConfig, setPHGlobalConfigByKey, setPHModal, setPHToast, setPackageDiscoveryService, setPreferredEditorOnNode, setReactorClient, setReactorClientModule, setRenown, setRenownAdapters, setRenownChainId, setRenownNetworkId, setRenownUrl, setRequiresHardRefresh, setRevisionHistoryVisible, setRouterBasename, setSelectedDrive, setSelectedDriveId, setSelectedNode, setSelectedTimelineItem, setSelectedTimelineRevision, setSentryDsn, setSentryEnv, setSentryRelease, setStudioMode, setSwitchboardUrl, setVersion, setVersionCheckInterval, setVetraPackageManager, setWarnOutdatedApp, showCreateDocumentModal, showDeleteNodeModal, showPHModal, showRevisionHistory, signStampedAction, sortNodesByName, stampAction, startDocumentChangesSubscription, subgraphUrlFromGraphqlUrl, subscriptionsUrlFromGraphqlUrl, trimTrailingSlash, truncateAllTables, upgradeDocument, useAllowList, useAllowedDocumentModelModules, useAllowedDocumentTypes, useAnalyticsDatabaseName, useAppModuleById, useAppModules, useAttachmentPreview, useAttachmentService, useAttachmentUpload, useAttachments, useBasePath, useCanExecute, useCliVersion, useConnectionState, useConnectionStates, useDatabase, useDefaultAppModule, useDefaultDrivesUrl, useDid, useDisabledEditors, useDispatch, useDocument, useDocumentById, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOfType, useDocumentOperations, useDocumentSafe, useDocumentTypes, useDocumentTypesInSelectedDrive, useDocumentVersionStatus, useDocuments, useDocumentsByIds, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useDownloadDocument, useDownloadFolder, useDragNode, useDriveById, useDriveSystemInfo, useDrives, useDrivesPreserveStrategy, useDropFile, useDropNode, useEditorFileDrop, useEditorModuleById, useEditorModules, useEditorModulesForDocumentType, useEditorPreloader, 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, useRenownAdapters, useRenownAuth, useRenownAuthAsync, useRenownChainId, useRenownInit, useRenownInitialAuth, useRenownInitialUser, useRenownLoginMethods, useRenownNetworkId, useRenownSessionCookie, useRenownSessionSynced, useRenownUrl, useRenownWalletAdapter, 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, useSwitchboardClient, useSwitchboardUrl, useSync, useSyncList, useTheme, useUser, useUserPermissions, useVersion, useVersionCheckInterval, useVetraPackageManager, useVetraPackages, useWarnOutdatedApp, validateDocument, viewFilterInputFromViewFilter, waitForDocumentReady };
|
|
3476
|
+
export { ActionTracker, BaseStorage, BatchJobFailedError, 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, DRIVE_ARRIVAL_MAX_WAIT_MS, DRIVE_DOCUMENT_TYPES, DisconnectIcon, DocumentCache, DocumentChangeType, DocumentIntegrityService, DocumentModelNotFoundError, DocumentTypeMismatchError, DriveCollectionId, EDITOR_FILE_DROP_OPT_OUT_ATTR, FEATURE_FLAG_PARAM_PREFIX, GLOBAL_SEARCH_PARAMS, GqlRequestChannel, GraphQLClientDocumentCache, GraphQLOperationNotSupportedError, GraphQLReactorClient, GraphQLReactorProvider, GraphQLWrongBackendError, IDLE_OPERATIONS_ENTRY, IDLE_REFETCH_STATE, ISSUER_TYPE, InMemoryQueue, IntervalPollTimer, MutateDocumentWithOperationsDocument, NoSelectedDocumentError, OPENED_FROM_STATE_KEY, PHStoreProvider, PH_LOCATION_CHANGE_EVENT, PREFETCH_WAIT_MS, PollBehavior, PropagationMode, REACTOR_SCHEMA, RENOWN_CHAIN_ID, RENOWN_INITIAL_ANONYMOUS, RENOWN_INITIAL_UNKNOWN, RENOWN_NETWORK_ID, RENOWN_RETURN_URL_STRIPPED_PARAMS, RENOWN_URL, ReactorBuilder, ReactorClientBuilder, ReactorOperationFieldsFragmentDoc, RegistryClient, RelationalDbProcessor, RemoteClient, RemoteDocumentController, Renown, RenownAuthButton, RenownInitialUserProvider, RenownLoginButton, RenownLogo, RenownProvider, RenownUserButton, RenownWalletProvider, SCOPED_PH_KEYS, SETTINGS_PATH, SpinnerIcon, StaticPackageManager, SubgraphSdkRegistry, SyncOperationStatus, UnsupportedDocumentTypeError, UserIcon, VERIFIABLE_CREDENTIAL_EIP712_TYPE, addAllowListEventHandler, addAllowedDocumentTypesEventHandler, addAnalyticsDatabaseNameEventHandler, addAttachmentServiceEventHandler, addBasePathEventHandler, addCliVersionEventHandler, addDefaultDrivesUrlEventHandler, addDisabledEditorsEventHandler, addDocument, addDocumentCacheEventHandler, addDraggingNodeEventHandler, addDrive, addDrivesEventHandler, addDrivesPreserveStrategyEventHandler, addEnabledEditorsEventHandler, addFeaturesEventHandler, addFileUploadOperationsChunkSizeEventHandler, addFileWithProgress, addFolder, addFullReactorClientEventHandler, 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, addRenownAdaptersEventHandler, addRenownChainIdEventHandler, addRenownEventHandler, addRenownNetworkIdEventHandler, addRenownUrlEventHandler, addRequiresHardRefreshEventHandler, addResetSelectedNodeEventHandler, addRevisionHistoryVisibleEventHandler, addRouterBasenameEventHandler, addSelectedDriveIdEventHandler, addSelectedNodeIdEventHandler, addSelectedTimelineItemEventHandler, addSelectedTimelineRevisionEventHandler, addSentryDsnEventHandler, addSentryEnvEventHandler, addSentryReleaseEventHandler, addSetSelectedDriveOnPopStateEventHandler, addSetSelectedNodeOnPopStateEventHandler, addStudioModeEventHandler, addSwitchboardUrlEventHandler, addSyncSelectionOnPopStateEventHandler, addToastEventHandler, addVersionCheckIntervalEventHandler, addVersionEventHandler, addVetraPackageManagerEventHandler, addWarnOutdatedAppEventHandler, ambientRenownTokenProvider, applySearchUpdate, baseDocumentModels, baseDocumentModelsMap, bindPHStoreToWindow, browserNavigation, buildDocumentSubgraphQuery, buildDocumentSubgraphUrl, buildFolderZip, callEventHandlerRegisterFunctions, callGlobalSetterForKey, clearGlobal, closePHModal, commonGlobalEventHandlerFunctions, convertRemoteOperations, createAnalyticsStore, createClient, createDriveArrivals, createPHStore, createProcessorQuery, createScopedPHStore, createUrlWithPreservedParams, deleteDrive, deleteNode, deriveSystemUrl, describeGraphQLDocument, diffStateShapes, dispatchActions, downloadDocument, downloadFolderZip, driveIdFromUrl, dropAllReactorStorage, ensurePHEventHandlers, ensurePHStore, expandBulkArchive, exportFile, extractDriveIdFromPath, extractDriveIdFromSlug, extractDriveSlugFromPath, extractNodeIdFromPath, extractNodeIdFromSlug, extractNodeSlugFromPath, fetchDrive, fetchDriveInfo, findDerivedId, findDriveBySlug, findDriveBySlugOrId, findIsServableOverGraphQL, findUuid, getActivePHStore, getAnalyticsStore, getCurrentPathname, getDocumentExtension, getDocumentGraphqlQuery, getDocumentStateSelection, getDocumentUpgradePreview, getDocumentVersionStatus, getDriveIdBySlug, getDriveName, getDrives, getFullReactorClient, getGlobal, getNavigationOf, getNodeTarget, getNodeTargetIn, getPHNavigation, getPHStore, getPHStoreSubscribe, getPackageInfo, getPackagePage, getPackages, getPackagesByDocumentType, getPackagesForDocumentType, getPathWithoutBase, getRevisionFromDate, getSlugFromDriveUrl, getSwitchboardBaseFromChannelUrl, getSwitchboardGatewayUrlFromDriveUrl, getSyncStatus, getSyncStatusSync, getTargetHref, getUserPermissions, graphqlDocumentEvents, graphqlDocumentsEvents, graphqlEventsToSyncDrive, hasHostNavigation, hasPreloadBandwidth, hideRevisionHistory, identifierFromMutateDocumentOperationVariables, initConnectCrypto, initRenownCrypto, initTheme, isAuthRefusalClose, isDocumentTypeSupported, isDriveAuthError, isExternalControlsEnabledEventFunctions, isFileNodeKind, isFolderNodeKind, isGlobalSearchParam, isGraphQLReactorClient, isOperationCache, isPlainClick, isScopedPHStore, isSettingsTarget, isoStringFromDateTime, loadFile, loading, login, logout, makeAuthConnectionParams, makeAuthMiddleware, makeDriveSlug, makeDriveUrlComponent, makeNodeSlug, makePHEventFunctions, notifyPHStore, onVetraPackageManager, openRenown, openTarget, openTargetWith, openedFromIndex, packageFromDocumentModels, parseDriveUrl, phAppConfigHooks, phAppConfigSetters, phDocumentEditorConfigHooks, phDocumentEditorConfigSetters, phDocumentFromGetDocument, phDocumentFromMutation, phDocumentFromQuery, phDocumentsFromQuery, phGlobalConfigHooks, phGlobalConfigSetters, prefetchDocument, preloadDrive, preloadDriveApp, preloadEditorModule, preloadNode, preloadTarget, prepareSignedActions, reactorGraphqlBatchFetchDocuments, reactorGraphqlCreateDocument, reactorGraphqlDeleteDocument, reactorGraphqlDeleteDocuments, reactorGraphqlFetchDocument, reactorGraphqlMutateDocument, readPromiseState, recordToSearch, refreshReactorData, refreshReactorDataClient, renameDrive, renameDriveNode, resolveDocumentModelModule, resolveDriveRoute, resolveSearchUpdate, resolveUrlPathname, revisionMapFromRevisionsList, searchPackages, searchToRecord, setAllowList, setAllowedDocumentTypes, setAnalyticsDatabaseName, setAttachmentService, setBasePath, setBrowserOpenSync, setCliVersion, setDefaultDrivesUrl, setDefaultPHGlobalConfig, setDisabledEditors, setDocumentCache, setDriveAvailableOffline, setDriveMetadata, setDriveSharingType, setDrives, setDrivesPreserveStrategy, setEnabledEditors, setFeatures, setFileUploadOperationsChunkSize, setFullReactorClient, 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, setPGliteDB, setPHAppConfig, setPHAppConfigByKey, setPHDocumentEditorConfig, setPHDocumentEditorConfigByKey, setPHGlobalConfig, setPHGlobalConfigByKey, setPHModal, setPHToast, setPackageDiscoveryService, setPreferredEditorOnNode, setReactorClient, setReactorClientModule, setRenown, setRenownAdapters, setRenownChainId, setRenownNetworkId, setRenownUrl, setRequiresHardRefresh, setRevisionHistoryVisible, setRouterBasename, setSearchParams, setSelectedDrive, setSelectedDriveId, setSelectedNode, setSelectedNodeId, setSelectedTimelineItem, setSelectedTimelineRevision, setSentryDsn, setSentryEnv, setSentryRelease, setStudioMode, setSwitchboardUrl, setVersion, setVersionCheckInterval, setVetraPackageManager, setWarnOutdatedApp, showCreateDocumentModal, showDeleteNodeModal, showPHModal, showRevisionHistory, signStampedAction, sortNodesByName, stampAction, startDocumentChangesSubscription, subgraphUrlFromGraphqlUrl, subscribePHStore, subscribeToPHValue, subscriptionsUrlFromGraphqlUrl, syncSelectionFromPath, targetPathname, trackDriveArrival, trimTrailingSlash, truncateAllTables, untilDriveListed, upgradeDocument, useAllowList, useAllowedDocumentModelModules, useAllowedDocumentTypes, useAnalyticsDatabaseName, useAppModuleById, useAppModules, useAttachmentPreview, useAttachmentService, useAttachmentUpload, useAttachments, useBasePath, useCanExecute, useCliVersion, useCloseNode, useConnectionState, useConnectionStates, useDatabase, useDefaultAppModule, useDefaultDrivesUrl, useDid, useDisabledEditors, useDispatch, useDocument, useDocumentById, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOfType, useDocumentOperations, useDocumentSafe, useDocumentTypes, useDocumentTypesInSelectedDrive, useDocumentVersionStatus, useDocuments, useDocumentsByIds, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useDownloadDocument, useDownloadFolder, useDragNode, useDriveById, useDriveSystemInfo, useDrives, useDrivesPreserveStrategy, useDropFile, useDropNode, useEditorFileDrop, useEditorModuleById, useEditorModules, useEditorModulesForDocumentType, useEditorPreloader, 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, useLinkProps, useLoading, useLocalDrivesEnabled, useLogLevel, useLoginStatus, useModelRegistry, useNodeActions, useNodeById, useNodeParentFolderById, useNodePathById, useNodesInSelectedDrive, useNodesInSelectedDriveOrFolder, useNodesInSelectedFolder, useOnDropFile, useOpenNode, usePGlite, usePHAppConfigByKey, usePHDocumentEditorConfigByKey, usePHGlobalConfigByKey, usePHModal, usePHNavigation, usePHStore, usePHToast, usePackageDiscoveryService, useParentFolderForSelectedNode, usePreloadDrive, usePreloadNode, useReactorClient, useReactorClientModule, useRelationalDb, useRelationalQuery, useRenown, useRenownAdapters, useRenownAuth, useRenownAuthAsync, useRenownChainId, useRenownInit, useRenownInitialAuth, useRenownInitialUser, useRenownLoginMethods, useRenownNetworkId, useRenownSessionCookie, useRenownSessionSynced, useRenownUrl, useRenownWalletAdapter, useRequiresHardRefresh, useResetPHGlobalConfig, useRevisionHistoryVisible, useRouterBasename, useSearchParams, useSelectedDocument, useSelectedDocumentId, useSelectedDocumentOfType, useSelectedDocumentSafe, useSelectedDrive, useSelectedDriveId, useSelectedDriveSafe, useSelectedFolder, useSelectedNode, useSelectedNodePath, useSelectedTimelineItem, useSelectedTimelineRevision, useSentryDsn, useSentryEnv, useSentryRelease, useSetDefaultPHGlobalConfig, useSetPHAppConfig, useSetPHDocumentEditorConfig, useSetPHGlobalConfig, useSetSearchParams, useSetSelectedDrive, useSetSelectedNode, useStudioMode, useSubgraphModules, useSupportedDocumentTypesInReactor, useSwitchboardClient, useSwitchboardUrl, useSync, useSyncList, useTheme, useUser, useUserPermissions, useVersion, useVersionCheckInterval, useVetraPackageManager, useVetraPackages, useWarnOutdatedApp, validateDocument, viewFilterInputFromViewFilter, waitForArrival, waitForDocumentReady, warnGlobalSetterInScope };
|
|
3209
3477
|
|
|
3210
3478
|
//# sourceMappingURL=index.js.map
|