@powerhousedao/reactor-browser 6.2.3-dev.76 → 6.2.3-dev.78
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-BsOmg2-v.d.ts → attachment-service-C_8_poEv.d.ts} +223 -12
- package/dist/attachment-service-C_8_poEv.d.ts.map +1 -0
- package/dist/{client-BnGewICj.d.ts → client-Cx43uuSO.d.ts} +2 -2
- package/dist/client-Cx43uuSO.d.ts.map +1 -0
- package/dist/{client-CXDpILj6.js → client-D_cBN8L-.js} +91 -3
- package/dist/client-D_cBN8L-.js.map +1 -0
- package/dist/{dispatch-BEI1Ai2b.js → dispatch-DLD1E-9L.js} +80 -8
- package/dist/dispatch-DLD1E-9L.js.map +1 -0
- package/dist/{document-by-id-bHT2FDHM.js → document-by-id-BGTnMWiG.js} +2 -2
- package/dist/{document-by-id-bHT2FDHM.js.map → document-by-id-BGTnMWiG.js.map} +1 -1
- package/dist/{document-model-modules-DAx3VAm3.js → document-model-modules-D_kT09sv.js} +254 -9
- package/dist/document-model-modules-D_kT09sv.js.map +1 -0
- package/dist/{document-operations-zQKFs_xu.js → document-operations-BdCl99y6.js} +777 -52
- package/dist/document-operations-BdCl99y6.js.map +1 -0
- package/dist/{global-DY0jZmcO.d.ts → global-C4kaLEPb.d.ts} +165 -53
- package/dist/global-C4kaLEPb.d.ts.map +1 -0
- package/dist/{index-DlZsXHpT.d.ts → index-CROGY3XV.d.ts} +2 -2
- package/dist/{index-DlZsXHpT.d.ts.map → index-CROGY3XV.d.ts.map} +1 -1
- package/dist/index.d.ts +55 -41
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +215 -53
- package/dist/index.js.map +1 -1
- package/dist/src/ai/index.js +2 -2
- package/dist/src/analytics/index.js +1 -1
- package/dist/src/graphql/client.d.ts +2 -2
- package/dist/src/graphql/client.js +1 -1
- package/dist/src/graphql-client/entry.d.ts +4 -4
- package/dist/src/graphql-client/entry.js +4 -4
- package/dist/src/renown/index.d.ts +1 -1
- package/dist/{switchboard-G3aKXjNx.js → switchboard-CqUq5pIZ.js} +10 -48
- package/dist/switchboard-CqUq5pIZ.js.map +1 -0
- package/dist/{types-0Fh1tNjy.d.ts → types-Vb8q55oM.d.ts} +69 -2
- package/dist/types-Vb8q55oM.d.ts.map +1 -0
- package/package.json +9 -9
- package/dist/attachment-service-BsOmg2-v.d.ts.map +0 -1
- package/dist/client-BnGewICj.d.ts.map +0 -1
- package/dist/client-CXDpILj6.js.map +0 -1
- package/dist/dispatch-BEI1Ai2b.js.map +0 -1
- package/dist/document-model-modules-DAx3VAm3.js.map +0 -1
- package/dist/document-operations-zQKFs_xu.js.map +0 -1
- package/dist/global-DY0jZmcO.d.ts.map +0 -1
- package/dist/switchboard-G3aKXjNx.js.map +0 -1
- package/dist/types-0Fh1tNjy.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { a as createPHStore, c as getPHStore, d as subscribePHStore, f as usePHStore, i as bindPHStoreToWindow, l as getPHStoreSubscribe, n as subscribeToPHValue, o as ensurePHStore, r as PHStoreProvider, s as getActivePHStore, t as makePHEventFunctions, u as notifyPHStore } from "./make-ph-event-functions-B5GU5xcR.js";
|
|
2
|
-
import { A as
|
|
3
|
-
import { A as addDrivesEventHandler, C as setSelectedNode, D as usePreloadNode, E as useOpenNode, F as isInitialSyncInFlight, I as listSyncRemotes, L as
|
|
2
|
+
import { A as DocumentTypeMismatchError, C as DocumentRefetcher, M as OperationRejectedError, N as UnsupportedDocumentTypeError, T as dispatchActions, _ as isDocumentTypeCache, a as useDocument, b as DOCUMENT_CHANGE_TYPE, c as useDocuments, d as useGetDocuments, f as DocumentCache, g as addPromiseState, h as IDLE_OPERATIONS_ENTRY, i as setDocumentCache, j as NoSelectedDocumentError, k as DocumentModelNotFoundError, l as useGetDocument, m as IDLE_DOCUMENTS_OF_TYPE_ENTRY, n as useDispatch, o as useDocumentCache, p as GET_MANY_CHUNK_SIZE, r as addDocumentCacheEventHandler, s as useDocumentSafe, t as createDispatch, u as useGetDocumentAsync, v as isOperationCache, w as IDLE_REFETCH_STATE, y as readPromiseState } from "./dispatch-DLD1E-9L.js";
|
|
3
|
+
import { $ as makeAuthMiddleware, A as addDrivesEventHandler, B as invalidateDriveNodes, C as setSelectedNode, D as usePreloadNode, E as useOpenNode, F as isInitialSyncInFlight, G as useDriveNode, H as markLocalDriveWrite, I as listSyncRemotes, J as isFileNodeKind, K as useDriveNodes, L as addDriveNodesEventHandler, M as useDrives, N as DriveProvider, P as useDriveContext, Q as ambientRenownTokenProvider, R as dropDriveNode, S as selectNode, T as useNodeTarget, U as peekDriveNode, V as loadDriveNodes, W as takeLocalDriveWrite, X as listAllDriveNodes, Y as isFolderNodeKind, Z as sortNodesByName, _ 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 setDrives, k as useSetSelectedNode, l as preloadDrive, m as useSelectedDrive, n as useDocumentModelModules, o as useVetraPackageManager, p as usePreloadDrive, q as useDriveNodesCache, r as addVetraPackageManagerEventHandler, s as useVetraPackages, t as useDocumentModelModuleById, u as selectDrive, v as addResetSelectedNodeEventHandler, w as setSelectedNodeId, x as preloadNode, y as addSelectedNodeIdEventHandler, z as getDriveNode } from "./document-model-modules-D_kT09sv.js";
|
|
4
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 preloadTarget, a as SETTINGS_PATH, b as searchParamsToString, c as getCurrentPathname, d as hasHostNavigation, f as isGlobalSearchParam, g as openedFromIndex, h as openTargetWith, i as PH_LOCATION_CHANGE_EVENT, j as extractNodeSlugFromPath, k as extractNodeIdFromPath, l as getPHNavigation, m as openTarget, n as GLOBAL_SEARCH_PARAMS, o as applySearchUpdate, p as isSettingsTarget, r as OPENED_FROM_STATE_KEY, s as browserNavigation, t as FEATURE_FLAG_PARAM_PREFIX, u as getTargetHref, v as recordToSearch, w as targetPathname, x as searchToRecord, y as resolveSearchUpdate, z as resolveUrlPathname } from "./navigation-BqphkrOB.js";
|
|
5
|
-
import { $ as addIsAnalyticsExternalProcessorsEnabledEventHandler, $i as
|
|
5
|
+
import { $ as addIsAnalyticsExternalProcessorsEnabledEventHandler, $i as usePGlite, $n as useIsEditorDebugModeEnabled, $r as resolveDocumentModelModule, $t as setIsDeleteLocalDrivesEnabled, A as useDropTarget, Ai as deleteNode, An as useAnalyticsDatabaseName, Ar as phDocumentEditorConfigHooks, At as addVersionEventHandler, B as addCliVersionEventHandler, Bi as upgradeDocument, Bn as useIsAddDriveEnabled, Br as findIsServableOverGraphQL, Bt as setDrivesPreserveStrategy, C as usePackageDiscoveryService, Ca as useSetSearchParams, Ci as COMMON_PACKAGE_ID, Cn as setSentryRelease, Cr as useWarnOutdatedApp, Ct as addRouterBasenameEventHandler, D as addDraggingNodeEventHandler, Di as addFileWithProgress, Dn as setVersionCheckInterval, Dr as isExternalControlsEnabledEventFunctions, Dt as addStudioModeEventHandler, E as useGraphQLReactorClient, Ei as addDocument, En as setVersion, Er as addIsExternalControlsEnabledEventHandler, Et as addSentryReleaseEventHandler, F as setAttachmentService, Fi as loadFile, Fn as useDrivesPreserveStrategy, Fr as useAllowedDocumentTypes, Ft as setAnalyticsDatabaseName, G as addFileUploadOperationsChunkSizeEventHandler, Gi as addReactorClientModuleEventHandler, Gn as useIsAnalyticsExternalProcessorsEnabled, Gr as makeAuthConnectionParams, Gt as setIsAddDriveEnabled, H as addDisabledEditorsEventHandler, Hi as isDocumentTypeSupported, Hn as useIsAddPublicDrivesEnabled, Hr as viewFilterInputFromViewFilter, Ht as setFileUploadOperationsChunkSize, I as useAttachmentService, Ii as moveNode$1, In as useEnabledEditors, Ir as useIsDragAndDropEnabled, It as setBasePath, J as addIsAddDriveEnabledEventHandler, Ji as setFullReactorClient, Jn as useIsDeleteLocalDrivesEnabled, Jr as SubgraphSdkRegistry, Jt as setIsAnalyticsDatabaseWorkerEnabled, K as addGaTrackingIdEventHandler, Ki as addReactorHalvesEventHandler, Kn as useIsCloudDrivesEnabled, Kr as startDocumentChangesSubscription, Kt as setIsAddLocalDrivesEnabled, L as addAllowListEventHandler, Li as renameDriveNode, Ln as useFileUploadOperationsChunkSize, Lr as useIsExternalControlsEnabled, Lt as setCliVersion, M as setFeatures, Mi as extractInitialState, Mn as useCliVersion, Mr as setAllowedDocumentTypes, Mt as phGlobalConfigHooks, N as useFeatures, Ni as fetchDocumentOperations, Nn as useDefaultDrivesUrl, Nr as setIsDragAndDropEnabled, Nt as phGlobalConfigSetters, O as useDragNode, Oi as addFolder, On as setWarnOutdatedApp, Or as phAppConfigHooks, Ot as addSwitchboardUrlEventHandler, P as addAttachmentServiceEventHandler, Pi as getDocumentExtension, Pn as useDisabledEditors, Pr as setIsExternalControlsEnabled, Pt as setAllowList, Q as addIsAnalyticsEnabledEventHandler, Qi as useModelRegistry, Qn as useIsDriveAnalyticsEnabled, Qr as packageFromDocumentModels, Qt as setIsDeleteCloudDrivesEnabled, R as addAnalyticsDatabaseNameEventHandler, Ri as renameNode, Rn as useGaTrackingId, Rr as GraphQLReactorClient, Rt as setDefaultDrivesUrl, S as setPackageDiscoveryService, Sa as useSearchParams, Si as screamingSnakeToCamel, Sn as setSentryEnv, Sr as useVersionCheckInterval, St as addRequiresHardRefreshEventHandler, T as setGraphQLReactorClient, Ti as DRIVE_DOCUMENT_TYPES, Tn as setSwitchboardUrl, Tr as addIsDragAndDropEnabledEventHandler, Tt as addSentryEnvEventHandler, U as addDrivesPreserveStrategyEventHandler, Ui as addFullReactorClientEventHandler, Un as useIsAnalyticsDatabaseWorkerEnabled, Ur as createJobChangesSocket, Ut as setGaTrackingId, V as addDefaultDrivesUrlEventHandler, Vi as getUserPermissions, Vn as useIsAddLocalDrivesEnabled, Vr as isGraphQLReactorClient, Vt as setEnabledEditors, W as addEnabledEditorsEventHandler, Wi as addReactorClientEventHandler, Wn as useIsAnalyticsEnabled, Wr as isAuthRefusalClose, Wt as setIsAddCloudDrivesEnabled, X as addIsAddPublicDrivesEnabledEventHandler, Xi as setReactorClientModule, Xn as useIsDiffAnalyticsEnabled, Xr as subgraphUrlFromGraphqlUrl, Xt as setIsAnalyticsExternalProcessorsEnabled, Y as addIsAddLocalDrivesEnabledEventHandler, Yi as setReactorClient, Yn as useIsDeletePublicDrivesEnabled, Yr as describeGraphQLDocument, Yt as setIsAnalyticsEnabled, Z as addIsAnalyticsDatabaseWorkerEnabledEventHandler, Zi as useDatabase, Zn as useIsDocumentModelSelectionSettingsEnabled, Zr as StaticPackageManager, Zt as setIsCloudDrivesEnabled, _ as addSetSelectedDriveOnPopStateEventHandler, _a as usePHModal, _i as ConflictError, _n as setRenownNetworkId, _r as useSentryEnv, _t as addLogLevelEventHandler, a as addPHEventHandlers, aa as MODAL_SEARCH_PARAM, ai as ReactorOperationFieldsFragmentDoc, an as setIsEditorReadModeEnabled, ar as useIsPublicDrivesEnabled, at as addIsDocumentModelSelectionSettingsEnabledEventHandler, b as syncSelectionFromPath, ba as useLinkProps, bi as extractRevisionMap, bn as setRouterBasename, br as useSwitchboardUrl, bt as addRenownNetworkIdEventHandler, c as addToastEventHandler, ca as isRoutedModal, ci as GraphQLWrongBackendError, cn as setIsExternalRelationalProcessorsEnabled, cr as useLocalDrivesEnabled, ct as addIsEditorReadModeEnabledEventHandler, d as addSelectedTimelineRevisionEventHandler, da as modalSearch, di as GraphQLDriveReadClient, dn as setIsRelationalProcessorsEnabled, dr as useRenownChainId, dt as addIsExternalRelationalProcessorsEnabledEventHandler, ea as useReactorClient, ei as prepareSignedActions, en as setIsDeletePublicDrivesEnabled, er as useIsEditorReadModeEnabled, et as addIsCloudDrivesEnabledEventHandler, f as setSelectedTimelineRevision, fa as setPHModal, fi as toLegacyNode, fn as setIsSentryTracingEnabled, fr as useRenownNetworkId, ft as addIsLocalDrivesEnabledEventHandler, g as useSelectedTimelineItem, ga as useModalLinkProps, gi as revisionMapFromRevisionsList, gn as setRenownChainId, gr as useSentryDsn, gt as addLocalDrivesEnabledEventHandler, h as setSelectedTimelineItem, ha as showPHModal, hi as phDocumentFromMutation, hn as setRenownAdapters, hr as useRouterBasename, ht as addIsSentryTracingEnabledEventHandler, i as useSwitchboardClient, ia as useSyncList, ii as MutateDocumentWithOperationsDocument, in as setIsEditorDebugModeEnabled, ir as useIsLocalDrivesEnabled, it as addIsDiffAnalyticsEnabledEventHandler, j as addFeaturesEventHandler, ji as exportFile, jn as useBasePath, jr as phDocumentEditorConfigSetters, jt as addWarnOutdatedAppEventHandler, k as useDropNode, ki as copyNode$1, kn as useAllowList, kr as phAppConfigSetters, kt as addVersionCheckIntervalEventHandler, l as setPHToast, la as modalFromSearch, li as JobFailedError, ln as setIsLocalDrivesEnabled, lr as useLogLevel, lt as addIsExternalPackagesEnabledEventHandler, m as addSelectedTimelineItemEventHandler, ma as showDeleteNodeModal, mi as phDocumentFromGetDocument, mn as setLogLevel, mr as useRequiresHardRefresh, mt as addIsRelationalProcessorsEnabledEventHandler, n as GraphQLReactorProvider, na as useReactorHalves, ni as stampAction, nn as setIsDocumentModelSelectionSettingsEnabled, nr as useIsExternalProcessorsEnabled, nt as addIsDeleteLocalDrivesEnabledEventHandler, o as callEventHandlerRegisterFunctions, oa as addModalEventHandler, oi as BatchJobFailedError, on as setIsExternalPackagesEnabled, or as useIsRelationalProcessorsEnabled, ot as addIsDriveAnalyticsEnabledEventHandler, p as useSelectedTimelineRevision, pa as showCreateDocumentModal, pi as isoStringFromDateTime, pn as setLocalDrivesEnabled, pr as useRenownUrl, pt as addIsPublicDrivesEnabledEventHandler, q as addIsAddCloudDrivesEnabledEventHandler, qi as getFullReactorClient, qn as useIsDeleteCloudDrivesEnabled, qr as subscriptionsUrlFromGraphqlUrl, qt as setIsAddPublicDrivesEnabled, r as ensurePHEventHandlers, ra as useSync, ri as GetDocumentAtConsistencyDocument, rn as setIsDriveAnalyticsEnabled, rr as useIsExternalRelationalProcessorsEnabled, rt as addIsDeletePublicDrivesEnabledEventHandler, s as commonGlobalEventHandlerFunctions, sa as closePHModal, si as GraphQLOperationNotSupportedError, sn as setIsExternalProcessorsEnabled, sr as useIsSentryTracingEnabled, st as addIsEditorDebugModeEnabledEventHandler, t as useDocumentOperations, ta as useReactorClientModule, ti as signStampedAction, tn as setIsDiffAnalyticsEnabled, tr as useIsExternalPackagesEnabled, tt as addIsDeleteCloudDrivesEnabledEventHandler, u as usePHToast, ua as modalHref, ui as GraphQLDriveNodeSource, un as setIsPublicDrivesEnabled, ur as useRenownAdapters, ut as addIsExternalProcessorsEnabledEventHandler, v as addSetSelectedNodeOnPopStateEventHandler, va as withoutModalSearch, vi as buildPulledDocument, vn as setRenownUrl, vr as useSentryRelease, vt as addRenownAdaptersEventHandler, w as addGraphQLReactorClientEventHandler, wi as DEFAULT_DRIVE_EDITOR_ID, wn as setStudioMode, wr as addAllowedDocumentTypesEventHandler, wt as addSentryDsnEventHandler, x as addPackageDiscoveryServiceEventHandler, xa as usePHNavigation, xi as hasRevisionConflict, xn as setSentryDsn, xr as useVersion, xt as addRenownUrlEventHandler, y as addSyncSelectionOnPopStateEventHandler, ya as isPlainClick, yi as convertRemoteOperations, yn as setRequiresHardRefresh, yr as useStudioMode, yt as addRenownChainIdEventHandler, z as addBasePathEventHandler, zi as setPreferredEditorOnNode, zn as useIsAddCloudDrivesEnabled, zr as createGraphQLDriveNodeSource, zt as setDisabledEditors } from "./document-operations-BdCl99y6.js";
|
|
6
6
|
import { a as setGlobal, i as getGlobal, n as getAnalyticsStore, r as clearGlobal, t as createAnalyticsStore } from "./store-DInXcjal.js";
|
|
7
7
|
import { baseDocumentModels, baseDocumentModelsMap } from "./src/document-model.js";
|
|
8
|
-
import {
|
|
8
|
+
import { o as PropagationMode, r as GetDocumentWithOperationsDocument, t as createClient } from "./client-D_cBN8L-.js";
|
|
9
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-BxkZYzbQ.js";
|
|
10
|
-
import {
|
|
11
|
-
import { n as useDocumentsByIds, t as useDocumentById } from "./document-by-id-bHT2FDHM.js";
|
|
10
|
+
import { c as useSelectedDocument, d as useSelectedDocumentSafe, f as EditorDocumentProvider, g as useNodeById, h as useSelectedNode, l as useSelectedDocumentId, m as useDocumentOfType, p as useEditorDocumentContext, t as GQL_CHANNEL_SUFFIX, u as useSelectedDocumentOfType } from "./switchboard-CqUq5pIZ.js";
|
|
12
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-BtjgHBjH.js";
|
|
12
|
+
import { n as useDocumentsByIds, t as useDocumentById } from "./document-by-id-BGTnMWiG.js";
|
|
13
13
|
import { i as setPGliteDB, n as useRelationalQuery, r as useRelationalDb, t as createProcessorQuery } from "./relational-DZuyKp2y.js";
|
|
14
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-BFnMV-EO.js";
|
|
15
15
|
import { use, useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
16
16
|
import { DEFAULT_SIGNATURE_POLICY, actionSignerIdentity, actionSigningTarget, createZip, isDocumentZip, parseBulkArchive, requestedSignaturePolicy, toTransportAction, validateInitialState, validateModules, validateStateSchemaName, withSignaturePolicy, zipEntries } from "@powerhousedao/shared/document-model";
|
|
17
17
|
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";
|
|
18
|
+
import { pascalCase } from "change-case";
|
|
18
19
|
import { DriveDocumentSchema, driveCreateDocument, getDescendants, getNextCopyNumber, isFileNode, isFolderNode, setAvailableOffline, setDriveIcon, setDriveName, setSharingType } from "@powerhousedao/shared/document-drive";
|
|
19
20
|
import { allPass, filter, find, forEach, funnel, hasAtLeast, isArray, isDefined, isIncludedIn, isStrictEqual, isTruthy, last, map, mapToObj, once, pipe, prop, split, unique } from "remeda";
|
|
20
|
-
import { pascalCase } from "change-case";
|
|
21
|
-
import { ClientError } from "graphql-request";
|
|
22
21
|
import { Kind, parse } from "graphql";
|
|
22
|
+
import { ClientError } from "graphql-request";
|
|
23
23
|
import { z } from "zod";
|
|
24
24
|
import normalizeException from "normalize-exception";
|
|
25
25
|
import lzString from "lz-string";
|
|
@@ -68,9 +68,8 @@ async function expandBulkArchive(file, driveId, targetParent) {
|
|
|
68
68
|
}];
|
|
69
69
|
const entries = await parseBulkArchive(data);
|
|
70
70
|
if (!(await Promise.all(entries.map((entry) => isDocumentZip(entry.data)))).some(Boolean)) throw new Error("Archive contains no Powerhouse documents");
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const knownNodes = [...(await reactorClient.get(driveId)).state.global.nodes];
|
|
71
|
+
if (!getPHStore()?.reactorClient) throw new Error("ReactorClient not initialized");
|
|
72
|
+
const knownNodes = [...await loadDriveNodes(driveId, { refresh: true })];
|
|
74
73
|
const dirToNode = /* @__PURE__ */ new Map();
|
|
75
74
|
const ensureDir = async (dirPath, parent) => {
|
|
76
75
|
const cached = dirToNode.get(dirPath);
|
|
@@ -127,7 +126,7 @@ function segmentsBelow(root, node, allNodes) {
|
|
|
127
126
|
* initialState (see downloadFolderZip).
|
|
128
127
|
*/
|
|
129
128
|
async function buildFolderZip(drive, folderNode, fetchDocument, onProgress) {
|
|
130
|
-
const allNodes = drive.
|
|
129
|
+
const allNodes = await loadDriveNodes(drive.header.id, { refresh: true });
|
|
131
130
|
const topName = sanitize(folderNode?.name ?? (drive.state.global.name || drive.header.name));
|
|
132
131
|
const subtree = folderNode ? [folderNode, ...getDescendants(folderNode, allNodes)] : allNodes;
|
|
133
132
|
const entries = { [topName + "/"]: /* @__PURE__ */ new Uint8Array(0) };
|
|
@@ -183,7 +182,7 @@ async function downloadFolderZip(drive, folderNode, onProgress) {
|
|
|
183
182
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
184
183
|
const result = await buildFolderZip(drive, folderNode, async (id) => {
|
|
185
184
|
const doc = await reactorClient.get(id);
|
|
186
|
-
const operations = await fetchDocumentOperations(reactorClient, doc);
|
|
185
|
+
const operations = await fetchDocumentOperations(reactorClient.read, doc);
|
|
187
186
|
const initialState = extractInitialState(operations["document"] ?? []);
|
|
188
187
|
return {
|
|
189
188
|
...doc,
|
|
@@ -260,12 +259,12 @@ async function waitForDocumentReady(reactorClient, documentId, options) {
|
|
|
260
259
|
/** The full client's creation default, else the library's. */
|
|
261
260
|
async function createSignaturePolicy() {
|
|
262
261
|
const client = getFullReactorClient();
|
|
263
|
-
return client ? client.getCreateSignaturePolicy() : DEFAULT_SIGNATURE_POLICY;
|
|
262
|
+
return client ? client.read.getCreateSignaturePolicy() : DEFAULT_SIGNATURE_POLICY;
|
|
264
263
|
}
|
|
265
264
|
/** What the full client selects for a drive, which has no parent. */
|
|
266
265
|
async function createProtocolVersions() {
|
|
267
266
|
const client = getFullReactorClient();
|
|
268
|
-
return client ? client.getCreateProtocolVersions() : {};
|
|
267
|
+
return client ? client.read.getCreateProtocolVersions() : {};
|
|
269
268
|
}
|
|
270
269
|
async function addDrive(input, preferredEditor) {
|
|
271
270
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
@@ -284,7 +283,7 @@ async function addDrive(input, preferredEditor) {
|
|
|
284
283
|
}
|
|
285
284
|
});
|
|
286
285
|
if (preferredEditor) driveDoc.header.meta = { preferredEditor };
|
|
287
|
-
return await reactorClient.create(driveDoc);
|
|
286
|
+
return await (await reactorClient.write.create(driveDoc)).document();
|
|
288
287
|
}
|
|
289
288
|
async function addRemoteDrive(url, driveId, options) {
|
|
290
289
|
const reactorClient = getFullReactorClient();
|
|
@@ -316,7 +315,7 @@ async function addRemoteDrive(url, driveId, options) {
|
|
|
316
315
|
if (isDriveAuthError$1(error)) showPHModal({ type: "driveAuthRequired" });
|
|
317
316
|
throw error;
|
|
318
317
|
}
|
|
319
|
-
if (options?.awaitInitialSync) await waitForDocumentReady(reactorClient, resolvedDriveId, {
|
|
318
|
+
if (options?.awaitInitialSync) await waitForDocumentReady(reactorClient.read, resolvedDriveId, {
|
|
320
319
|
timeoutMs: options.initialSyncTimeoutMs,
|
|
321
320
|
signal: options.signal
|
|
322
321
|
});
|
|
@@ -333,28 +332,28 @@ async function deleteDrive(driveId) {
|
|
|
333
332
|
const remotes = sync.list().filter((remote) => remote.meta.collectionId.equals(collectionId));
|
|
334
333
|
for (const remote of remotes) await sync.remove(remote.meta.name);
|
|
335
334
|
}
|
|
336
|
-
await reactorClient.deleteDocument(driveId, PropagationMode$1.Cascade);
|
|
335
|
+
await (await reactorClient.write.deleteDocument(driveId, PropagationMode$1.Cascade)).readable;
|
|
337
336
|
}
|
|
338
337
|
async function renameDrive(driveId, name) {
|
|
339
338
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
340
339
|
if (!isAllowedToCreateDocuments) throw new Error("User is not allowed to rename drives");
|
|
341
340
|
const reactorClient = getFullReactorClient();
|
|
342
341
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
343
|
-
return await reactorClient.rename(driveId, name);
|
|
342
|
+
return await (await reactorClient.write.rename(driveId, name)).document();
|
|
344
343
|
}
|
|
345
344
|
async function setDriveAvailableOffline(driveId, availableOffline) {
|
|
346
345
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
347
346
|
if (!isAllowedToCreateDocuments) throw new Error("User is not allowed to change drive availability");
|
|
348
347
|
const reactorClient = getPHStore()?.reactorClient;
|
|
349
348
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
350
|
-
return await reactorClient.execute(driveId, "main", [setAvailableOffline({ availableOffline })]);
|
|
349
|
+
return await (await reactorClient.write.execute(driveId, "main", [setAvailableOffline({ availableOffline })])).document();
|
|
351
350
|
}
|
|
352
351
|
async function setDriveSharingType(driveId, sharingType) {
|
|
353
352
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
354
353
|
if (!isAllowedToCreateDocuments) throw new Error("User is not allowed to change drive sharing type");
|
|
355
354
|
const reactorClient = getPHStore()?.reactorClient;
|
|
356
355
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
357
|
-
return await reactorClient.execute(driveId, "main", [setSharingType({ type: sharingType })]);
|
|
356
|
+
return await (await reactorClient.write.execute(driveId, "main", [setSharingType({ type: sharingType })])).document();
|
|
358
357
|
}
|
|
359
358
|
async function setDriveMetadata(driveId, metadata) {
|
|
360
359
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
@@ -365,7 +364,7 @@ async function setDriveMetadata(driveId, metadata) {
|
|
|
365
364
|
if (metadata.name) actions.push(setDriveName({ name: metadata.name }));
|
|
366
365
|
if (metadata.icon !== void 0) actions.push(setDriveIcon({ icon: metadata.icon }));
|
|
367
366
|
if (actions.length === 0) return;
|
|
368
|
-
return await reactorClient.execute(driveId, "main", actions);
|
|
367
|
+
return await (await reactorClient.write.execute(driveId, "main", actions)).document();
|
|
369
368
|
}
|
|
370
369
|
//#endregion
|
|
371
370
|
//#region src/graphql/adapters.ts
|
|
@@ -677,6 +676,32 @@ function useAllowedDocumentModelModules() {
|
|
|
677
676
|
return documentModelModules?.filter((module) => allowedDocumentTypes.includes(module.documentModel.global.id));
|
|
678
677
|
}
|
|
679
678
|
//#endregion
|
|
679
|
+
//#region src/hooks/items-in-selected-drive.ts
|
|
680
|
+
/** Returns the nodes in the selected drive. */
|
|
681
|
+
function useNodesInSelectedDrive() {
|
|
682
|
+
return useDriveNodes(useSelectedDriveId());
|
|
683
|
+
}
|
|
684
|
+
/** Returns the file nodes in the selected drive. */
|
|
685
|
+
function useFileNodesInSelectedDrive() {
|
|
686
|
+
return useNodesInSelectedDrive()?.filter((n) => isFileNodeKind(n));
|
|
687
|
+
}
|
|
688
|
+
/** Returns the folder nodes in the selected drive. */
|
|
689
|
+
function useFolderNodesInSelectedDrive() {
|
|
690
|
+
return useNodesInSelectedDrive()?.filter((n) => isFolderNodeKind(n));
|
|
691
|
+
}
|
|
692
|
+
/** Returns the documents in the selected drive. */
|
|
693
|
+
function useDocumentsInSelectedDrive() {
|
|
694
|
+
const fileNodeIds = useFileNodesInSelectedDrive()?.map((node) => node.id);
|
|
695
|
+
return useDocumentsByIds(fileNodeIds);
|
|
696
|
+
}
|
|
697
|
+
/** Returns the document types supported by the selected drive, as defined by the document model documents present in the drive */
|
|
698
|
+
function useDocumentTypesInSelectedDrive() {
|
|
699
|
+
return (useDocumentsInSelectedDrive()?.filter(isDocumentModelDocument))?.map((doc) => doc.state.global.id);
|
|
700
|
+
}
|
|
701
|
+
function isDocumentModelDocument(document) {
|
|
702
|
+
return document.header.documentType === "powerhouse/document-model";
|
|
703
|
+
}
|
|
704
|
+
//#endregion
|
|
680
705
|
//#region src/hooks/selected-folder.ts
|
|
681
706
|
/** Returns the selected folder: the drive app's open folder, else the app's. */
|
|
682
707
|
function useSelectedFolder() {
|
|
@@ -856,26 +881,33 @@ function buildSnapshot(syncManager) {
|
|
|
856
881
|
}
|
|
857
882
|
//#endregion
|
|
858
883
|
//#region src/hooks/document-link.ts
|
|
859
|
-
const indexes = /* @__PURE__ */ new WeakMap();
|
|
860
|
-
function documentTargets(drives) {
|
|
861
|
-
let index = indexes.get(drives);
|
|
862
|
-
if (index) return index;
|
|
863
|
-
index = /* @__PURE__ */ new Map();
|
|
864
|
-
for (const drive of drives) for (const node of drive.state.global.nodes) {
|
|
865
|
-
if (!isFileNodeKind(node) || index.has(node.id)) continue;
|
|
866
|
-
index.set(node.id, {
|
|
867
|
-
driveSlug: makeDriveSlug(drive),
|
|
868
|
-
nodeSlug: makeNodeSlug(node)
|
|
869
|
-
});
|
|
870
|
-
}
|
|
871
|
-
indexes.set(drives, index);
|
|
872
|
-
return index;
|
|
873
|
-
}
|
|
874
884
|
/** Where a document opens: the loaded drive that lists it, or undefined while none does. */
|
|
875
885
|
function useDocumentTarget(documentId) {
|
|
886
|
+
const store = usePHStore() ?? getPHStore();
|
|
876
887
|
const drives = useDrives();
|
|
877
|
-
|
|
878
|
-
|
|
888
|
+
const cache = useDriveNodesCache();
|
|
889
|
+
const driveIds = drives?.map((d) => d.header.id).join("\n") ?? "";
|
|
890
|
+
let target;
|
|
891
|
+
if (documentId && drives) for (const drive of drives) {
|
|
892
|
+
const node = cache?.get(drive.header.id)?.byId.get(documentId);
|
|
893
|
+
if (!isFileNodeKind(node)) continue;
|
|
894
|
+
target = {
|
|
895
|
+
driveSlug: makeDriveSlug(drive),
|
|
896
|
+
nodeSlug: makeNodeSlug(node)
|
|
897
|
+
};
|
|
898
|
+
break;
|
|
899
|
+
}
|
|
900
|
+
const found = target !== void 0;
|
|
901
|
+
useEffect(() => {
|
|
902
|
+
if (!documentId || !driveIds || found) return;
|
|
903
|
+
for (const driveId of driveIds.split("\n")) getDriveNode(driveId, documentId, { store }).catch(() => void 0);
|
|
904
|
+
}, [
|
|
905
|
+
documentId,
|
|
906
|
+
driveIds,
|
|
907
|
+
found,
|
|
908
|
+
store
|
|
909
|
+
]);
|
|
910
|
+
return target;
|
|
879
911
|
}
|
|
880
912
|
/** `useLinkProps` for a document by id, e.g. a `useDocumentsOfType` row;
|
|
881
913
|
* undefined while no loaded drive lists it. */
|
|
@@ -1267,7 +1299,8 @@ function useDropFile(handleAddFile) {
|
|
|
1267
1299
|
//#endregion
|
|
1268
1300
|
//#region src/hooks/folder-by-id.ts
|
|
1269
1301
|
function useFolderById(id) {
|
|
1270
|
-
|
|
1302
|
+
const node = useNodeById(id);
|
|
1303
|
+
return isFolderNodeKind(node) ? node : void 0;
|
|
1271
1304
|
}
|
|
1272
1305
|
//#endregion
|
|
1273
1306
|
//#region src/graphql/events.ts
|
|
@@ -1421,8 +1454,10 @@ function useNodeActions() {
|
|
|
1421
1454
|
}
|
|
1422
1455
|
async function onRenameDriveNodes(newName, nodeId) {
|
|
1423
1456
|
if (!drives) return;
|
|
1424
|
-
const
|
|
1425
|
-
|
|
1457
|
+
const holders = await Promise.all(drives.map(async (drive) => {
|
|
1458
|
+
return await getDriveNode(drive.header.id, nodeId).catch(() => void 0) ? drive.header.id : void 0;
|
|
1459
|
+
}));
|
|
1460
|
+
await Promise.all(holders.filter((driveId) => driveId !== void 0).map((driveId) => renameDriveNode(driveId, nodeId, newName)));
|
|
1426
1461
|
}
|
|
1427
1462
|
return {
|
|
1428
1463
|
onAddFile,
|
|
@@ -1436,12 +1471,6 @@ function useNodeActions() {
|
|
|
1436
1471
|
};
|
|
1437
1472
|
}
|
|
1438
1473
|
//#endregion
|
|
1439
|
-
//#region src/hooks/node-by-id.ts
|
|
1440
|
-
/** Returns a node in the selected drive by id. */
|
|
1441
|
-
function useNodeById(id) {
|
|
1442
|
-
return useNodesInSelectedDrive()?.find((n) => n.id === id);
|
|
1443
|
-
}
|
|
1444
|
-
//#endregion
|
|
1445
1474
|
//#region src/hooks/node-path.ts
|
|
1446
1475
|
/** Returns the path to a node in the selected drive */
|
|
1447
1476
|
function useNodePathById(id) {
|
|
@@ -1882,6 +1911,23 @@ const syncStatusToUI = {
|
|
|
1882
1911
|
async function getDrives(reactor) {
|
|
1883
1912
|
return (await Promise.all(DRIVE_DOCUMENT_TYPES.map((type) => reactor.find({ type })))).flatMap((r) => r.results);
|
|
1884
1913
|
}
|
|
1914
|
+
/**
|
|
1915
|
+
* The id of every drive, from a listing that carries headers only: a drive's
|
|
1916
|
+
* node tree can be megabytes (a mail drive with tens of thousands of files),
|
|
1917
|
+
* so membership is learned without it and a new drive is then loaded on its
|
|
1918
|
+
* own.
|
|
1919
|
+
*/
|
|
1920
|
+
async function listDriveIds(reactor) {
|
|
1921
|
+
return (await Promise.all(DRIVE_DOCUMENT_TYPES.map((type) => reactor.find({ type }, { scopes: ["header"] })))).flatMap((r) => r.results.map((d) => d.header.id));
|
|
1922
|
+
}
|
|
1923
|
+
/** One drive in full, or undefined once it is gone. */
|
|
1924
|
+
async function getDrive(reactor, driveId) {
|
|
1925
|
+
try {
|
|
1926
|
+
return await reactor.get(driveId);
|
|
1927
|
+
} catch {
|
|
1928
|
+
return;
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1885
1931
|
function getSyncStatus(documentId, sharingType) {
|
|
1886
1932
|
return Promise.resolve(getSyncStatusSync(documentId, sharingType));
|
|
1887
1933
|
}
|
|
@@ -2689,6 +2735,82 @@ function createDebouncedRefreshReactorDataClient(debounceDelayMs = DEFAULT_DEBOU
|
|
|
2689
2735
|
}
|
|
2690
2736
|
const refreshReactorData = createDebouncedRefreshReactorData();
|
|
2691
2737
|
const refreshReactorDataClient = createDebouncedRefreshReactorDataClient();
|
|
2738
|
+
/** How often one drive is re-read while it keeps changing (a drive being filled). */
|
|
2739
|
+
const DEFAULT_DRIVE_REFRESH_MIN_INTERVAL_MS = 1e4;
|
|
2740
|
+
function currentDrives() {
|
|
2741
|
+
return getPHStore()?.drives;
|
|
2742
|
+
}
|
|
2743
|
+
/**
|
|
2744
|
+
* Re-reads one drive and replaces it in the drives store. Only that drive
|
|
2745
|
+
* crosses the wire: the list used to be re-fetched whole on any drive change,
|
|
2746
|
+
* every drive's node tree included, which on a large mail drive was ten
|
|
2747
|
+
* megabytes per change. Without a store (before init) the whole list loads.
|
|
2748
|
+
*/
|
|
2749
|
+
async function refreshDrive(reactor, driveId) {
|
|
2750
|
+
const drives = currentDrives();
|
|
2751
|
+
if (!drives) return _refreshReactorDataClient(reactor);
|
|
2752
|
+
const fresh = await getDrive(reactor, driveId);
|
|
2753
|
+
if (!fresh) {
|
|
2754
|
+
setDrives(drives.filter((d) => d.header.id !== driveId));
|
|
2755
|
+
return;
|
|
2756
|
+
}
|
|
2757
|
+
const at = drives.findIndex((d) => d.header.id === driveId);
|
|
2758
|
+
setDrives(at < 0 ? [...drives, fresh] : drives.map((d, i) => i === at ? fresh : d));
|
|
2759
|
+
}
|
|
2760
|
+
/**
|
|
2761
|
+
* Brings the drives store in line with which drives exist: ids come from a
|
|
2762
|
+
* headers-only listing, a drive not held yet is loaded on its own, and a drive
|
|
2763
|
+
* no longer listed is dropped. Drives already held are kept as they are.
|
|
2764
|
+
*/
|
|
2765
|
+
async function refreshDriveMembership(reactor) {
|
|
2766
|
+
const drives = currentDrives();
|
|
2767
|
+
if (!drives) return _refreshReactorDataClient(reactor);
|
|
2768
|
+
const ids = await listDriveIds(reactor);
|
|
2769
|
+
const known = new Map(drives.map((d) => [d.header.id, d]));
|
|
2770
|
+
const added = await Promise.all(ids.filter((id) => !known.has(id)).map((id) => getDrive(reactor, id)));
|
|
2771
|
+
const loaded = new Map(added.filter((d) => d !== void 0).map((d) => [d.header.id, d]));
|
|
2772
|
+
setDrives(ids.map((id) => known.get(id) ?? loaded.get(id)).filter((d) => d !== void 0));
|
|
2773
|
+
}
|
|
2774
|
+
/**
|
|
2775
|
+
* Routes a drive-type document change to the smallest refresh: an update
|
|
2776
|
+
* re-reads that one drive and invalidates its node cache, at most once per
|
|
2777
|
+
* `minIntervalMs` while it keeps changing (at once after a write from this
|
|
2778
|
+
* tab, see `markLocalDriveWrite`); a creation or deletion refreshes the
|
|
2779
|
+
* membership and loads only what is new.
|
|
2780
|
+
*/
|
|
2781
|
+
function createDriveChangeHandler(reactor, options = {}) {
|
|
2782
|
+
const minIntervalMs = options.minIntervalMs ?? DEFAULT_DRIVE_REFRESH_MIN_INTERVAL_MS;
|
|
2783
|
+
const onError = options.onError ?? (() => void 0);
|
|
2784
|
+
const lastAt = /* @__PURE__ */ new Map();
|
|
2785
|
+
const pending = /* @__PURE__ */ new Map();
|
|
2786
|
+
const run = (driveId) => {
|
|
2787
|
+
lastAt.set(driveId, Date.now());
|
|
2788
|
+
const timer = pending.get(driveId);
|
|
2789
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
2790
|
+
pending.delete(driveId);
|
|
2791
|
+
refreshDrive(reactor, driveId).then(() => invalidateDriveNodes(driveId)).catch(onError);
|
|
2792
|
+
};
|
|
2793
|
+
const schedule = (driveId) => {
|
|
2794
|
+
if (takeLocalDriveWrite(driveId)) {
|
|
2795
|
+
run(driveId);
|
|
2796
|
+
return;
|
|
2797
|
+
}
|
|
2798
|
+
if (pending.has(driveId)) return;
|
|
2799
|
+
const wait = (lastAt.get(driveId) ?? 0) + minIntervalMs - Date.now();
|
|
2800
|
+
if (wait <= 0) {
|
|
2801
|
+
run(driveId);
|
|
2802
|
+
return;
|
|
2803
|
+
}
|
|
2804
|
+
pending.set(driveId, setTimeout(() => run(driveId), wait));
|
|
2805
|
+
};
|
|
2806
|
+
return (event) => {
|
|
2807
|
+
if (event.type === DOCUMENT_CHANGE_TYPE.Updated) {
|
|
2808
|
+
for (const document of event.documents) schedule(document.header.id);
|
|
2809
|
+
return;
|
|
2810
|
+
}
|
|
2811
|
+
refreshDriveMembership(reactor).catch(onError);
|
|
2812
|
+
};
|
|
2813
|
+
}
|
|
2692
2814
|
//#endregion
|
|
2693
2815
|
//#region src/routing/drive-arrivals.ts
|
|
2694
2816
|
let pendingAdds = 0;
|
|
@@ -2785,8 +2907,48 @@ const DRIVE_ARRIVAL_MAX_WAIT_MS = 15e3;
|
|
|
2785
2907
|
function findDriveBySlugOrId(store, ref) {
|
|
2786
2908
|
return findDriveBySlug(store.drives, ref);
|
|
2787
2909
|
}
|
|
2788
|
-
function findNode(
|
|
2789
|
-
|
|
2910
|
+
async function findNode(store, driveId, nodeId) {
|
|
2911
|
+
const cached = peekDriveNode(driveId, nodeId, store);
|
|
2912
|
+
if (cached) return cached;
|
|
2913
|
+
try {
|
|
2914
|
+
return await getDriveNode(driveId, nodeId, {
|
|
2915
|
+
store,
|
|
2916
|
+
refresh: true
|
|
2917
|
+
});
|
|
2918
|
+
} catch {
|
|
2919
|
+
return;
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2922
|
+
async function findNodeBySlug(store, driveId, slug) {
|
|
2923
|
+
try {
|
|
2924
|
+
return (await loadDriveNodes(driveId, { store })).find((n) => n.id === slug || makeNodeSlug(n) === slug);
|
|
2925
|
+
} catch {
|
|
2926
|
+
return;
|
|
2927
|
+
}
|
|
2928
|
+
}
|
|
2929
|
+
/** `waitForArrival` for an async read, re-run on each arrival. */
|
|
2930
|
+
function waitForNodeArrival(read, arrivals, signal, maxWaitMs = DRIVE_ARRIVAL_MAX_WAIT_MS) {
|
|
2931
|
+
if (!arrivals?.isPending() || signal.aborted) return Promise.resolve(void 0);
|
|
2932
|
+
return new Promise((resolve) => {
|
|
2933
|
+
let settled = false;
|
|
2934
|
+
let unsubscribe = () => {};
|
|
2935
|
+
const finish = (result) => {
|
|
2936
|
+
if (settled) return;
|
|
2937
|
+
settled = true;
|
|
2938
|
+
clearTimeout(timer);
|
|
2939
|
+
unsubscribe();
|
|
2940
|
+
signal.removeEventListener("abort", onAbort);
|
|
2941
|
+
resolve(result);
|
|
2942
|
+
};
|
|
2943
|
+
const onAbort = () => finish(void 0);
|
|
2944
|
+
const timer = setTimeout(onAbort, maxWaitMs);
|
|
2945
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
2946
|
+
unsubscribe = arrivals.subscribe(() => {
|
|
2947
|
+
read().then((next) => {
|
|
2948
|
+
if (next !== void 0 || !arrivals.isPending()) finish(next);
|
|
2949
|
+
});
|
|
2950
|
+
});
|
|
2951
|
+
});
|
|
2790
2952
|
}
|
|
2791
2953
|
/** Resolves with `read()` once it is defined, nothing is still arriving, the
|
|
2792
2954
|
* signal aborts or the cap passes. */
|
|
@@ -2881,12 +3043,12 @@ async function resolveDriveRoute(options) {
|
|
|
2881
3043
|
driveId
|
|
2882
3044
|
};
|
|
2883
3045
|
}
|
|
2884
|
-
const nodeId = extractNodeIdFromSlug(nodeSlug) ??
|
|
3046
|
+
const nodeId = extractNodeIdFromSlug(nodeSlug) ?? (await findNodeBySlug(store, driveId, nodeSlug))?.id;
|
|
2885
3047
|
const driveArrivals = arrivals && {
|
|
2886
3048
|
...arrivals,
|
|
2887
3049
|
isPending: () => arrivals.isDrivePending(driveId)
|
|
2888
3050
|
};
|
|
2889
|
-
const node = nodeId ? await
|
|
3051
|
+
const node = nodeId ? await findNode(store, driveId, nodeId) ?? await waitForNodeArrival(() => findNode(store, driveId, nodeId), driveArrivals, signal) : void 0;
|
|
2890
3052
|
if (!node) return {
|
|
2891
3053
|
kind: "node-not-found",
|
|
2892
3054
|
driveId
|
|
@@ -3570,6 +3732,6 @@ var BrowserLocalStorage = class extends BaseStorage {
|
|
|
3570
3732
|
}
|
|
3571
3733
|
};
|
|
3572
3734
|
//#endregion
|
|
3573
|
-
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, DriveProvider, EDITOR_FILE_DROP_OPT_OUT_ATTR, EditorDocumentProvider, FEATURE_FLAG_PARAM_PREFIX, GLOBAL_SEARCH_PARAMS, GqlRequestChannel, GraphQLClientDocumentCache, GraphQLOperationNotSupportedError, GraphQLReactorClient, GraphQLReactorProvider, GraphQLWrongBackendError, IDLE_DOCUMENTS_OF_TYPE_ENTRY, IDLE_OPERATIONS_ENTRY, IDLE_REFETCH_STATE, ISSUER_TYPE, InMemoryQueue, IntervalPollTimer, MODAL_SEARCH_PARAM, MutateDocumentWithOperationsDocument, NoSelectedDocumentError, OPENED_FROM_STATE_KEY, OperationRejectedError, 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, REVISION_HISTORY_PAGE_PARAM, REVISION_HISTORY_PARAM, ReactorBuilder, ReactorClientBuilder, ReactorOperationFieldsFragmentDoc, RegistryClient, RelationalDbProcessor, RemoteClient, RemoteDocumentController, Renown, RenownAuthButton, RenownInitialUserProvider, RenownLoginButton, RenownLogo, RenownProvider, RenownUserButton, RenownWalletProvider, 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, createDispatch, createDriveArrivals, createPHStore, createProcessorQuery, 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, getNodeTarget, 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, isDocumentTypeCache, isDocumentTypeSupported, isDriveAuthError, isExternalControlsEnabledEventFunctions, isFileNodeKind, isFolderNodeKind, isGlobalSearchParam, isGraphQLReactorClient, isOperationCache, isPlainClick, isRoutedModal, isSettingsTarget, isoStringFromDateTime, loadDocumentsOfType, loadFile, loading, login, logout, makeAuthConnectionParams, makeAuthMiddleware, makeDriveSlug, makeDriveUrlComponent, makeNodeSlug, makePHEventFunctions, modalFromSearch, modalHref, modalSearch, notifyPHStore, onVetraPackageManager, openRenown, openTarget, openTargetWith, openedFromIndex, packageFromDocumentModels, parseDriveUrl, parseRevisionHistoryPage, 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, searchParamsToString, 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, setRevisionHistoryPage, 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, useDocumentLinkProps, useDocumentModelModuleById, useDocumentModelModules, useDocumentOfType, useDocumentOperations, useDocumentSafe, useDocumentTarget, useDocumentTypes, useDocumentTypesInSelectedDrive, useDocumentVersionStatus, useDocuments, useDocumentsByIds, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useDocumentsOfType, useDownloadDocument, useDownloadFolder, useDragNode, useDriveById, useDriveContext, useDriveSystemInfo, useDrives, useDrivesPreserveStrategy, useDropFile, useDropNode, useEditorDocumentContext, useEditorFileDrop, useEditorModuleById, useEditorModuleFor, 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, useModalLinkProps, useModelRegistry, useNodeActions, useNodeById, useNodeParentFolderById, useNodePathById, useNodeTarget, 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, useRevisionHistoryPage, 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, withoutModalSearch };
|
|
3735
|
+
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, DriveProvider, EDITOR_FILE_DROP_OPT_OUT_ATTR, EditorDocumentProvider, FEATURE_FLAG_PARAM_PREFIX, GET_MANY_CHUNK_SIZE, GLOBAL_SEARCH_PARAMS, GetDocumentAtConsistencyDocument, GqlRequestChannel, GraphQLClientDocumentCache, GraphQLDriveNodeSource, GraphQLDriveReadClient, GraphQLOperationNotSupportedError, GraphQLReactorClient, GraphQLReactorProvider, GraphQLWrongBackendError, IDLE_DOCUMENTS_OF_TYPE_ENTRY, IDLE_OPERATIONS_ENTRY, IDLE_REFETCH_STATE, ISSUER_TYPE, InMemoryQueue, IntervalPollTimer, JobFailedError, MODAL_SEARCH_PARAM, MutateDocumentWithOperationsDocument, NoSelectedDocumentError, OPENED_FROM_STATE_KEY, OperationRejectedError, 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, REVISION_HISTORY_PAGE_PARAM, REVISION_HISTORY_PARAM, ReactorBuilder, ReactorClientBuilder, ReactorOperationFieldsFragmentDoc, RegistryClient, RelationalDbProcessor, RemoteClient, RemoteDocumentController, Renown, RenownAuthButton, RenownInitialUserProvider, RenownLoginButton, RenownLogo, RenownProvider, RenownUserButton, RenownWalletProvider, SETTINGS_PATH, SpinnerIcon, StaticPackageManager, SubgraphSdkRegistry, SyncOperationStatus, UnsupportedDocumentTypeError, UserIcon, VERIFIABLE_CREDENTIAL_EIP712_TYPE, addAllowListEventHandler, addAllowedDocumentTypesEventHandler, addAnalyticsDatabaseNameEventHandler, addAttachmentServiceEventHandler, addBasePathEventHandler, addCliVersionEventHandler, addDefaultDrivesUrlEventHandler, addDisabledEditorsEventHandler, addDocument, addDocumentCacheEventHandler, addDraggingNodeEventHandler, addDrive, addDriveNodesEventHandler, 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, addReactorHalvesEventHandler, 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, createDispatch, createDriveArrivals, createDriveChangeHandler, createGraphQLDriveNodeSource, createJobChangesSocket, createPHStore, createProcessorQuery, createUrlWithPreservedParams, deleteDrive, deleteNode, deriveSystemUrl, describeGraphQLDocument, diffStateShapes, dispatchActions, downloadDocument, downloadFolderZip, driveIdFromUrl, dropAllReactorStorage, dropDriveNode, 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, getDrive, getDriveIdBySlug, getDriveName, getDriveNode, getDrives, getFullReactorClient, getGlobal, getNodeTarget, 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, invalidateDriveNodes, isAuthRefusalClose, isDocumentTypeCache, isDocumentTypeSupported, isDriveAuthError, isExternalControlsEnabledEventFunctions, isFileNodeKind, isFolderNodeKind, isGlobalSearchParam, isGraphQLReactorClient, isOperationCache, isPlainClick, isRoutedModal, isSettingsTarget, isoStringFromDateTime, listAllDriveNodes, listDriveIds, loadDocumentsOfType, loadDriveNodes, loadFile, loading, login, logout, makeAuthConnectionParams, makeAuthMiddleware, makeDriveSlug, makeDriveUrlComponent, makeNodeSlug, makePHEventFunctions, markLocalDriveWrite, modalFromSearch, modalHref, modalSearch, notifyPHStore, onVetraPackageManager, openRenown, openTarget, openTargetWith, openedFromIndex, packageFromDocumentModels, parseDriveUrl, parseRevisionHistoryPage, peekDriveNode, 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, refreshDrive, refreshDriveMembership, refreshReactorData, refreshReactorDataClient, renameDrive, renameDriveNode, resolveDocumentModelModule, resolveDriveRoute, resolveSearchUpdate, resolveUrlPathname, revisionMapFromRevisionsList, searchPackages, searchParamsToString, 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, setRevisionHistoryPage, 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, takeLocalDriveWrite, targetPathname, toLegacyNode, 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, useDocumentLinkProps, useDocumentModelModuleById, useDocumentModelModules, useDocumentOfType, useDocumentOperations, useDocumentSafe, useDocumentTarget, useDocumentTypes, useDocumentTypesInSelectedDrive, useDocumentVersionStatus, useDocuments, useDocumentsByIds, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useDocumentsOfType, useDownloadDocument, useDownloadFolder, useDragNode, useDriveById, useDriveContext, useDriveNode, useDriveNodes, useDriveNodesCache, useDriveSystemInfo, useDrives, useDrivesPreserveStrategy, useDropFile, useDropNode, useEditorDocumentContext, useEditorFileDrop, useEditorModuleById, useEditorModuleFor, 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, useModalLinkProps, useModelRegistry, useNodeActions, useNodeById, useNodeParentFolderById, useNodePathById, useNodeTarget, useNodesInSelectedDrive, useNodesInSelectedDriveOrFolder, useNodesInSelectedFolder, useOnDropFile, useOpenNode, usePGlite, usePHAppConfigByKey, usePHDocumentEditorConfigByKey, usePHGlobalConfigByKey, usePHModal, usePHNavigation, usePHStore, usePHToast, usePackageDiscoveryService, useParentFolderForSelectedNode, usePreloadDrive, usePreloadNode, useReactorClient, useReactorClientModule, useReactorHalves, useRelationalDb, useRelationalQuery, useRenown, useRenownAdapters, useRenownAuth, useRenownAuthAsync, useRenownChainId, useRenownInit, useRenownInitialAuth, useRenownInitialUser, useRenownLoginMethods, useRenownNetworkId, useRenownSessionCookie, useRenownSessionSynced, useRenownUrl, useRenownWalletAdapter, useRequiresHardRefresh, useResetPHGlobalConfig, useRevisionHistoryPage, 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, withoutModalSearch };
|
|
3574
3736
|
|
|
3575
3737
|
//# sourceMappingURL=index.js.map
|