@powerhousedao/reactor-browser 6.2.3-dev.8 → 6.2.3-dev.81
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-D3EhiAJ7.d.ts → attachment-service-DPWkKp3y.d.ts} +636 -83
- package/dist/attachment-service-DPWkKp3y.d.ts.map +1 -0
- package/dist/{client-DjK30EQ-.js → client-BFnMV-EO.js} +39 -22
- package/dist/client-BFnMV-EO.js.map +1 -0
- package/dist/{client-D66jVnot.js → client-BUpynoY6.js} +345 -33
- package/dist/client-BUpynoY6.js.map +1 -0
- package/dist/{client-BIHN_UyR.d.ts → client-XPGQrO4a.d.ts} +3 -3
- package/dist/client-XPGQrO4a.d.ts.map +1 -0
- package/dist/dispatch-C8J9jQ-o.js +1171 -0
- package/dist/dispatch-C8J9jQ-o.js.map +1 -0
- package/dist/document-by-id-Dpp76ZNE.js +16 -0
- package/dist/document-by-id-Dpp76ZNE.js.map +1 -0
- package/dist/document-model-modules-XrYfGXt8.js +644 -0
- package/dist/document-model-modules-XrYfGXt8.js.map +1 -0
- package/dist/{document-operations-WeE6wIDt.js → document-operations-CdfiLNQN.js} +1919 -278
- package/dist/document-operations-CdfiLNQN.js.map +1 -0
- package/dist/global-BSyOOTvL.d.ts +647 -0
- package/dist/global-BSyOOTvL.d.ts.map +1 -0
- package/dist/{index-B33TKEqp.d.ts → index-Bjm0bSzf.d.ts} +19 -98
- package/dist/index-Bjm0bSzf.d.ts.map +1 -0
- package/dist/{index-BIVDXw3K.d.ts → index-rtDmzViP.d.ts} +3 -3
- package/dist/index-rtDmzViP.d.ts.map +1 -0
- package/dist/index.d.ts +813 -410
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +771 -119
- package/dist/index.js.map +1 -1
- package/dist/inspector-proxy-DODqs15F.d.ts +25 -0
- package/dist/inspector-proxy-DODqs15F.d.ts.map +1 -0
- package/dist/make-ph-event-functions-B5GU5xcR.js +180 -0
- package/dist/make-ph-event-functions-B5GU5xcR.js.map +1 -0
- package/dist/navigation-BqphkrOB.js +302 -0
- package/dist/navigation-BqphkrOB.js.map +1 -0
- package/dist/{pglite-CntadC_p-9NDG14dS.d.ts → pglite-CntadC_p-DTkdF8sr.d.ts} +11 -33
- package/dist/pglite-CntadC_p-DTkdF8sr.d.ts.map +1 -0
- package/dist/{relational-D1RB45sA.js → relational-DZuyKp2y.js} +66 -5
- package/dist/relational-DZuyKp2y.js.map +1 -0
- package/dist/{renown-rqK8sokh.js → renown-BtjgHBjH.js} +33 -28
- package/dist/{renown-rqK8sokh.js.map → renown-BtjgHBjH.js.map} +1 -1
- package/dist/{renown-BHxwP7xU.js → renown-BxkZYzbQ.js} +2 -2
- package/dist/{renown-BHxwP7xU.js.map → renown-BxkZYzbQ.js.map} +1 -1
- package/dist/src/ai/index.d.ts +53 -70
- package/dist/src/ai/index.d.ts.map +1 -1
- package/dist/src/ai/index.js +12 -28
- package/dist/src/ai/index.js.map +1 -1
- package/dist/src/analytics/index.d.ts +36 -44
- package/dist/src/analytics/index.d.ts.map +1 -1
- package/dist/src/analytics/index.js +4 -4
- package/dist/src/analytics/index.js.map +1 -1
- package/dist/src/document-model.d.ts +3 -4
- package/dist/src/document-model.d.ts.map +1 -1
- package/dist/src/document-model.js.map +1 -1
- package/dist/src/graphql/client.d.ts +4 -3
- package/dist/src/graphql/client.js +1 -1
- package/dist/src/graphql-client/entry.d.ts +5 -4
- package/dist/src/graphql-client/entry.js +4 -4
- package/dist/src/relational/index.d.ts +15 -9
- package/dist/src/relational/index.d.ts.map +1 -1
- package/dist/src/relational/index.js +1 -1
- package/dist/src/renown/index.d.ts +3 -2
- package/dist/src/renown/index.js +2 -2
- package/dist/src/rpc/index.d.ts +214 -140
- package/dist/src/rpc/index.d.ts.map +1 -1
- package/dist/src/rpc/index.js +587 -622
- package/dist/src/rpc/index.js.map +1 -1
- package/dist/{store-BJYcr_FL.js → store-DInXcjal.js} +1 -1
- package/dist/{store-BJYcr_FL.js.map → store-DInXcjal.js.map} +1 -1
- package/dist/{switchboard-CaXQ4-5Q.js → switchboard-CYTCYt4Z.js} +61 -11
- package/dist/switchboard-CYTCYt4Z.js.map +1 -0
- package/dist/{types-6vDzbRRS.d.ts → types-520nWrB3.d.ts} +2 -2
- package/dist/types-520nWrB3.d.ts.map +1 -0
- package/dist/{types-Dcv1ZLoW.d.ts → types-BNVqRNli.d.ts} +320 -18
- package/dist/types-BNVqRNli.d.ts.map +1 -0
- package/package.json +23 -23
- package/dist/attachment-service-D3EhiAJ7.d.ts.map +0 -1
- package/dist/client-BIHN_UyR.d.ts.map +0 -1
- package/dist/client-D66jVnot.js.map +0 -1
- package/dist/client-DjK30EQ-.js.map +0 -1
- package/dist/document-by-id-B4FIzG1w.js +0 -519
- package/dist/document-by-id-B4FIzG1w.js.map +0 -1
- package/dist/document-model-modules-bTP87nyr.js +0 -419
- package/dist/document-model-modules-bTP87nyr.js.map +0 -1
- package/dist/document-operations-WeE6wIDt.js.map +0 -1
- package/dist/global-OuINvEGT.d.ts +0 -401
- package/dist/global-OuINvEGT.d.ts.map +0 -1
- package/dist/index-B33TKEqp.d.ts.map +0 -1
- package/dist/index-BIVDXw3K.d.ts.map +0 -1
- package/dist/inspector-proxy-6h5VKAwt.d.ts +0 -257
- package/dist/inspector-proxy-6h5VKAwt.d.ts.map +0 -1
- package/dist/make-ph-event-functions-DBq3iWYn.js +0 -53
- package/dist/make-ph-event-functions-DBq3iWYn.js.map +0 -1
- package/dist/pglite-CntadC_p-9NDG14dS.d.ts.map +0 -1
- package/dist/relational-D1RB45sA.js.map +0 -1
- package/dist/switchboard-CaXQ4-5Q.js.map +0 -1
- package/dist/types-6vDzbRRS.d.ts.map +0 -1
- package/dist/types-Dcv1ZLoW.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { A as
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
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 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-C8J9jQ-o.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-XrYfGXt8.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 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 getUserPermissions, $n as useIsEditorDebugModeEnabled, $r as subscriptionsUrlFromGraphqlUrl, $t as setIsDeleteLocalDrivesEnabled, A as useDropTarget, Aa as withoutModalSearch, Ai as DEFAULT_DRIVE_EDITOR_ID, An as useAnalyticsDatabaseName, Ar as phDocumentEditorConfigHooks, At as addVersionEventHandler, B as addCliVersionEventHandler, Bi as addFolder, Bn as useIsAddDriveEnabled, Br as isBackendAuthError, Bt as setDrivesPreserveStrategy, C as usePackageDiscoveryService, Ca as modalSearch, Ci as convertRemoteOperations, Cn as setSentryRelease, Cr as useWarnOutdatedApp, Ct as addRouterBasenameEventHandler, D as addDraggingNodeEventHandler, Da as showPHModal, Di as uncreatedDocument, Dn as setVersionCheckInterval, Dr as isExternalControlsEnabledEventFunctions, Dt as addStudioModeEventHandler, E as useGraphQLReactorClient, Ea as showDeleteNodeModal, Ei as screamingSnakeToCamel, En as setVersion, Er as addIsExternalControlsEnabledEventHandler, Et as addSentryReleaseEventHandler, F as setAttachmentService, Fa as useSetSearchParams, Fi as JobFailedError, Fn as useDrivesPreserveStrategy, Fr as useAllowedDocumentTypes, Ft as setAnalyticsDatabaseName, G as addFileUploadOperationsChunkSizeEventHandler, Gi as fetchDocumentOperations, Gn as useIsAnalyticsExternalProcessorsEnabled, Gr as createGraphQLDriveNodeSource, Gt as setIsAddDriveEnabled, H as addDisabledEditorsEventHandler, Hi as deleteNode, Hn as useIsAddPublicDrivesEnabled, Hr as setBackendAuth, Ht as setFileUploadOperationsChunkSize, I as useAttachmentService, Ii as queriesUnknownArgument, In as useEnabledEditors, Ir as useIsDragAndDropEnabled, It as setBasePath, J as addIsAddDriveEnabledEventHandler, Ji as moveNode$1, Jn as useIsDeleteLocalDrivesEnabled, Jr as viewFilterInputFromViewFilter, Jt as setIsAnalyticsDatabaseWorkerEnabled, K as addGaTrackingIdEventHandler, Ki as getDocumentExtension, Kn as useIsCloudDrivesEnabled, Kr as findIsServableOverGraphQL, Kt as setIsAddLocalDrivesEnabled, L as addAllowListEventHandler, Li as queriesUnknownField, Ln as useFileUploadOperationsChunkSize, Lr as useIsExternalControlsEnabled, Lt as setCliVersion, M as setFeatures, Ma as useLinkProps, Mi as BatchJobFailedError, Mn as useCliVersion, Mr as setAllowedDocumentTypes, Mt as phGlobalConfigHooks, N as useFeatures, Na as usePHNavigation, Ni as GraphQLOperationNotSupportedError, Nn as useDefaultDrivesUrl, Nr as setIsDragAndDropEnabled, Nt as phGlobalConfigSetters, O as useDragNode, Oa as useModalLinkProps, Oi as underSignaturePolicy, On as setWarnOutdatedApp, Or as phAppConfigHooks, Ot as addSwitchboardUrlEventHandler, P as addAttachmentServiceEventHandler, Pa as useSearchParams, Pi as GraphQLWrongBackendError, Pn as useDisabledEditors, Pr as setIsExternalControlsEnabled, Pt as setAllowList, Q as addIsAnalyticsEnabledEventHandler, Qi as upgradeDocument, Qn as useIsDriveAnalyticsEnabled, Qr as startDocumentChangesSubscription, Qt as setIsDeleteCloudDrivesEnabled, R as addAnalyticsDatabaseNameEventHandler, Ri as addDocument, Rn as useGaTrackingId, Rr as addBackendAuthEventHandler, Rt as setDefaultDrivesUrl, S as setPackageDiscoveryService, Sa as modalHref, Si as buildPulledDocument, Sn as setSentryEnv, Sr as useVersionCheckInterval, St as addRequiresHardRefreshEventHandler, T as setGraphQLReactorClient, Ta as showCreateDocumentModal, Ti as hasRevisionConflict, Tn as setSwitchboardUrl, Tr as addIsDragAndDropEnabledEventHandler, Tt as addSentryEnvEventHandler, U as addDrivesPreserveStrategyEventHandler, Ui as exportFile, Un as useIsAnalyticsDatabaseWorkerEnabled, Ur as useBackendAuth, Ut as setGaTrackingId, V as addDefaultDrivesUrlEventHandler, Vi as copyNode$1, Vn as useIsAddLocalDrivesEnabled, Vr as recordBackendAuthError, Vt as setEnabledEditors, W as addEnabledEditorsEventHandler, Wi as extractInitialState, Wn as useIsAnalyticsEnabled, Wr as GraphQLReactorClient, Wt as setIsAddCloudDrivesEnabled, X as addIsAddPublicDrivesEnabledEventHandler, Xi as renameNode, Xn as useIsDiffAnalyticsEnabled, Xr as isAuthRefusalClose, Xt as setIsAnalyticsExternalProcessorsEnabled, Y as addIsAddLocalDrivesEnabledEventHandler, Yi as renameDriveNode, Yn as useIsDeletePublicDrivesEnabled, Yr as createJobChangesSocket, Yt as setIsAnalyticsEnabled, Z as addIsAnalyticsDatabaseWorkerEnabledEventHandler, Zi as setPreferredEditorOnNode, Zn as useIsDocumentModelSelectionSettingsEnabled, Zr as makeAuthConnectionParams, Zt as setIsCloudDrivesEnabled, _ as addSetSelectedDriveOnPopStateEventHandler, _a as MODAL_SEARCH_PARAM, _i as isoStringFromDateTime, _n as setRenownNetworkId, _r as useSentryEnv, _t as addLogLevelEventHandler, a as addPHEventHandlers, aa as getFullReactorClient, ai as resolveDocumentModelModule, an as setIsEditorReadModeEnabled, ar as useIsPublicDrivesEnabled, at as addIsDocumentModelSelectionSettingsEnabledEventHandler, b as syncSelectionFromPath, ba as isRoutedModal, bi as revisionMapFromRevisionsList, bn as setRouterBasename, br as useSwitchboardUrl, bt as addRenownNetworkIdEventHandler, c as addToastEventHandler, ca as setReactorClientModule, ci as stampAction, cn as setIsExternalRelationalProcessorsEnabled, cr as useLocalDrivesEnabled, ct as addIsEditorReadModeEnabledEventHandler, d as addSelectedTimelineRevisionEventHandler, da as usePGlite, di as ReactorOperationFieldsFragmentDoc, dn as setIsRelationalProcessorsEnabled, dr as useRenownChainId, dt as addIsExternalRelationalProcessorsEnabledEventHandler, ea as isDocumentTypeSupported, ei as SubgraphSdkRegistry, en as setIsDeletePublicDrivesEnabled, er as useIsEditorReadModeEnabled, et as addIsCloudDrivesEnabledEventHandler, f as setSelectedTimelineRevision, fa as useReactorClient, fi as readCreateProtocolVersions, fn as setIsSentryTracingEnabled, fr as useRenownNetworkId, ft as addIsLocalDrivesEnabledEventHandler, g as useSelectedTimelineItem, ga as useSyncList, gi as toLegacyNode, gn as setRenownChainId, gr as useSentryDsn, gt as addLocalDrivesEnabledEventHandler, h as setSelectedTimelineItem, ha as useSync, hi as GraphQLDriveReadClient, hn as setRenownAdapters, hr as useRouterBasename, ht as addIsSentryTracingEnabledEventHandler, i as useSwitchboardClient, ia as addReactorHalvesEventHandler, ii as packageFromDocumentModels, in as setIsEditorDebugModeEnabled, ir as useIsLocalDrivesEnabled, it as addIsDiffAnalyticsEnabledEventHandler, j as addFeaturesEventHandler, ja as isPlainClick, ji as DRIVE_DOCUMENT_TYPES, jn as useBasePath, jr as phDocumentEditorConfigSetters, jt as addWarnOutdatedAppEventHandler, k as useDropNode, ka as usePHModal, ki as COMMON_PACKAGE_ID, kn as useAllowList, kr as phAppConfigSetters, kt as addVersionCheckIntervalEventHandler, l as setPHToast, la as useDatabase, li as GetDocumentAtConsistencyDocument, ln as setIsLocalDrivesEnabled, lr as useLogLevel, lt as addIsExternalPackagesEnabledEventHandler, m as addSelectedTimelineItemEventHandler, ma as useReactorHalves, mi as GraphQLDriveNodeSource, mn as setLogLevel, mr as useRequiresHardRefresh, mt as addIsRelationalProcessorsEnabledEventHandler, n as GraphQLReactorProvider, na as addReactorClientEventHandler, ni as subgraphUrlFromGraphqlUrl, nn as setIsDocumentModelSelectionSettingsEnabled, nr as useIsExternalProcessorsEnabled, nt as addIsDeleteLocalDrivesEnabledEventHandler, o as callEventHandlerRegisterFunctions, oa as setFullReactorClient, oi as prepareSignedActions, on as setIsExternalPackagesEnabled, or as useIsRelationalProcessorsEnabled, ot as addIsDriveAnalyticsEnabledEventHandler, p as useSelectedTimelineRevision, pa as useReactorClientModule, pi as readCreateSignaturePolicy, pn as setLocalDrivesEnabled, pr as useRenownUrl, pt as addIsPublicDrivesEnabledEventHandler, q as addIsAddCloudDrivesEnabledEventHandler, qi as loadFile, qn as useIsDeleteCloudDrivesEnabled, qr as isGraphQLReactorClient, qt as setIsAddPublicDrivesEnabled, r as ensurePHEventHandlers, ra as addReactorClientModuleEventHandler, ri as StaticPackageManager, rn as setIsDriveAnalyticsEnabled, rr as useIsExternalRelationalProcessorsEnabled, rt as addIsDeletePublicDrivesEnabledEventHandler, s as commonGlobalEventHandlerFunctions, sa as setReactorClient, si as signStampedAction, sn as setIsExternalProcessorsEnabled, sr as useIsSentryTracingEnabled, st as addIsEditorDebugModeEnabledEventHandler, t as useDocumentOperations, ta as addFullReactorClientEventHandler, ti as describeGraphQLDocument, tn as setIsDiffAnalyticsEnabled, tr as useIsExternalPackagesEnabled, tt as addIsDeleteCloudDrivesEnabledEventHandler, u as usePHToast, ua as useModelRegistry, ui as MutateDocumentWithOperationsDocument, un as setIsPublicDrivesEnabled, ur as useRenownAdapters, ut as addIsExternalProcessorsEnabledEventHandler, v as addSetSelectedNodeOnPopStateEventHandler, va as addModalEventHandler, vi as phDocumentFromGetDocument, vn as setRenownUrl, vr as useSentryRelease, vt as addRenownAdaptersEventHandler, w as addGraphQLReactorClientEventHandler, wa as setPHModal, wi as extractRevisionMap, wn as setStudioMode, wr as addAllowedDocumentTypesEventHandler, wt as addSentryDsnEventHandler, x as addPackageDiscoveryServiceEventHandler, xa as modalFromSearch, xi as ConflictError, xn as setSentryDsn, xr as useVersion, xt as addRenownUrlEventHandler, y as addSyncSelectionOnPopStateEventHandler, ya as closePHModal, yi as phDocumentFromMutation, yn as setRequiresHardRefresh, yr as useStudioMode, yt as addRenownChainIdEventHandler, z as addBasePathEventHandler, zi as addFileWithProgress, zn as useIsAddCloudDrivesEnabled, zr as backendAuthStatusOf, zt as setDisabledEditors } from "./document-operations-CdfiLNQN.js";
|
|
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
|
-
import {
|
|
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 {
|
|
10
|
-
import { c as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
8
|
+
import { o as PropagationMode, r as GetDocumentWithOperationsDocument, t as createClient } from "./client-BUpynoY6.js";
|
|
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 { 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-CYTCYt4Z.js";
|
|
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-Dpp76ZNE.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-BFnMV-EO.js";
|
|
15
|
+
import { use, useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
16
|
+
import { DEFAULT_SIGNATURE_POLICY, actionSignerIdentity, actionSigningTarget, createZip, headNewDocument, isDocumentZip, parseBulkArchive, requestedSignaturePolicy, toTransportAction, validateInitialState, validateModules, validateStateSchemaName, zipEntries } from "@powerhousedao/shared/document-model";
|
|
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";
|
|
17
18
|
import { pascalCase } from "change-case";
|
|
18
|
-
import {
|
|
19
|
+
import { DriveDocumentSchema, driveDocumentType, getDescendants, getNextCopyNumber, isFileNode, isFolderNode, setAvailableOffline, setDriveIcon, setDriveName, setSharingType } from "@powerhousedao/shared/document-drive";
|
|
20
|
+
import { allPass, filter, find, forEach, funnel, hasAtLeast, isArray, isDefined, isIncludedIn, isStrictEqual, isTruthy, last, map, mapToObj, once, pipe, prop, split, unique } from "remeda";
|
|
19
21
|
import { Kind, parse } from "graphql";
|
|
22
|
+
import { ClientError } from "graphql-request";
|
|
20
23
|
import { z } from "zod";
|
|
21
24
|
import normalizeException from "normalize-exception";
|
|
22
25
|
import lzString from "lz-string";
|
|
@@ -65,9 +68,8 @@ async function expandBulkArchive(file, driveId, targetParent) {
|
|
|
65
68
|
}];
|
|
66
69
|
const entries = await parseBulkArchive(data);
|
|
67
70
|
if (!(await Promise.all(entries.map((entry) => isDocumentZip(entry.data)))).some(Boolean)) throw new Error("Archive contains no Powerhouse documents");
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
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 })];
|
|
71
73
|
const dirToNode = /* @__PURE__ */ new Map();
|
|
72
74
|
const ensureDir = async (dirPath, parent) => {
|
|
73
75
|
const cached = dirToNode.get(dirPath);
|
|
@@ -124,14 +126,14 @@ function segmentsBelow(root, node, allNodes) {
|
|
|
124
126
|
* initialState (see downloadFolderZip).
|
|
125
127
|
*/
|
|
126
128
|
async function buildFolderZip(drive, folderNode, fetchDocument, onProgress) {
|
|
127
|
-
const allNodes = drive.
|
|
129
|
+
const allNodes = await loadDriveNodes(drive.header.id, { refresh: true });
|
|
128
130
|
const topName = sanitize(folderNode?.name ?? (drive.state.global.name || drive.header.name));
|
|
129
131
|
const subtree = folderNode ? [folderNode, ...getDescendants(folderNode, allNodes)] : allNodes;
|
|
130
|
-
const entries = { [topName + "/"]: new Uint8Array(0) };
|
|
132
|
+
const entries = { [topName + "/"]: /* @__PURE__ */ new Uint8Array(0) };
|
|
131
133
|
for (const node of subtree) {
|
|
132
134
|
if (!isFolderNode(node)) continue;
|
|
133
135
|
const dir = [topName, ...segmentsBelow(folderNode, node, allNodes)].join("/");
|
|
134
|
-
entries[dir + "/"] = new Uint8Array(0);
|
|
136
|
+
entries[dir + "/"] = /* @__PURE__ */ new Uint8Array(0);
|
|
135
137
|
}
|
|
136
138
|
const files = subtree.filter(isFileNode);
|
|
137
139
|
const failed = [];
|
|
@@ -176,11 +178,11 @@ async function buildFolderZip(drive, folderNode, fetchDocument, onProgress) {
|
|
|
176
178
|
* showSaveFilePicker (fallback: blob download), mirroring exportFile.
|
|
177
179
|
*/
|
|
178
180
|
async function downloadFolderZip(drive, folderNode, onProgress) {
|
|
179
|
-
const reactorClient =
|
|
181
|
+
const reactorClient = getPHStore()?.reactorClient;
|
|
180
182
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
181
183
|
const result = await buildFolderZip(drive, folderNode, async (id) => {
|
|
182
184
|
const doc = await reactorClient.get(id);
|
|
183
|
-
const operations = await fetchDocumentOperations(reactorClient, doc);
|
|
185
|
+
const operations = await fetchDocumentOperations(reactorClient.read, doc);
|
|
184
186
|
const initialState = extractInitialState(operations["document"] ?? []);
|
|
185
187
|
return {
|
|
186
188
|
...doc,
|
|
@@ -257,21 +259,36 @@ async function waitForDocumentReady(reactorClient, documentId, options) {
|
|
|
257
259
|
async function addDrive(input, preferredEditor) {
|
|
258
260
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
259
261
|
if (!isAllowedToCreateDocuments) throw new Error("User is not allowed to create drives");
|
|
260
|
-
const reactorClient =
|
|
262
|
+
const reactorClient = getPHStore()?.reactorClient;
|
|
261
263
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
264
|
+
const options = {
|
|
265
|
+
initialState: { global: {
|
|
266
|
+
name: input.global.name || "",
|
|
267
|
+
icon: input.global.icon ?? null,
|
|
268
|
+
nodes: []
|
|
269
|
+
} },
|
|
270
|
+
signaturePolicy: input.id ? requestedSignaturePolicy(input, "legacy") : input.signaturePolicy,
|
|
271
|
+
id: input.id || void 0,
|
|
272
|
+
protocolVersions: input.protocolVersions
|
|
273
|
+
};
|
|
274
|
+
let driveDoc;
|
|
275
|
+
try {
|
|
276
|
+
driveDoc = await reactorClient.newDocument(driveDocumentType, options);
|
|
277
|
+
} catch (error) {
|
|
278
|
+
if (getFullReactorClient() || !GraphQLOperationNotSupportedError.isError(error)) throw error;
|
|
279
|
+
driveDoc = await reactorClient.newDocument(driveDocumentType, {
|
|
280
|
+
...options,
|
|
281
|
+
signaturePolicy: DEFAULT_SIGNATURE_POLICY
|
|
282
|
+
});
|
|
283
|
+
}
|
|
268
284
|
if (preferredEditor) driveDoc.header.meta = { preferredEditor };
|
|
269
|
-
|
|
285
|
+
if (input.global.name) driveDoc.header.name = input.global.name;
|
|
286
|
+
return await (await reactorClient.write.create(driveDoc)).document();
|
|
270
287
|
}
|
|
271
288
|
async function addRemoteDrive(url, driveId, options) {
|
|
272
|
-
const reactorClient =
|
|
289
|
+
const reactorClient = getFullReactorClient();
|
|
273
290
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
274
|
-
const sync =
|
|
291
|
+
const sync = getPHStore()?.reactorClientModule?.reactorModule?.syncModule?.syncManager;
|
|
275
292
|
if (!sync) throw new Error("Sync not initialized");
|
|
276
293
|
let driveInfo;
|
|
277
294
|
try {
|
|
@@ -298,7 +315,7 @@ async function addRemoteDrive(url, driveId, options) {
|
|
|
298
315
|
if (isDriveAuthError$1(error)) showPHModal({ type: "driveAuthRequired" });
|
|
299
316
|
throw error;
|
|
300
317
|
}
|
|
301
|
-
if (options?.awaitInitialSync) await waitForDocumentReady(reactorClient, resolvedDriveId, {
|
|
318
|
+
if (options?.awaitInitialSync) await waitForDocumentReady(reactorClient.read, resolvedDriveId, {
|
|
302
319
|
timeoutMs: options.initialSyncTimeoutMs,
|
|
303
320
|
signal: options.signal
|
|
304
321
|
});
|
|
@@ -307,55 +324,49 @@ async function addRemoteDrive(url, driveId, options) {
|
|
|
307
324
|
async function deleteDrive(driveId) {
|
|
308
325
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
309
326
|
if (!isAllowedToCreateDocuments) throw new Error("User is not allowed to delete drives");
|
|
310
|
-
const reactorClient =
|
|
327
|
+
const reactorClient = getPHStore()?.reactorClient;
|
|
311
328
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
312
|
-
const sync =
|
|
329
|
+
const sync = getPHStore()?.reactorClientModule?.reactorModule?.syncModule?.syncManager;
|
|
313
330
|
if (sync) {
|
|
314
331
|
const collectionId = DriveCollectionId$1.forDrive(driveId);
|
|
315
332
|
const remotes = sync.list().filter((remote) => remote.meta.collectionId.equals(collectionId));
|
|
316
333
|
for (const remote of remotes) await sync.remove(remote.meta.name);
|
|
317
334
|
}
|
|
318
|
-
await reactorClient.deleteDocument(driveId, PropagationMode$1.Cascade);
|
|
335
|
+
await (await reactorClient.write.deleteDocument(driveId, PropagationMode$1.Cascade)).readable;
|
|
319
336
|
}
|
|
320
337
|
async function renameDrive(driveId, name) {
|
|
321
338
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
322
339
|
if (!isAllowedToCreateDocuments) throw new Error("User is not allowed to rename drives");
|
|
323
|
-
const reactorClient =
|
|
340
|
+
const reactorClient = getFullReactorClient();
|
|
324
341
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
325
|
-
return await reactorClient.rename(driveId, name);
|
|
342
|
+
return await (await reactorClient.write.rename(driveId, name)).document();
|
|
326
343
|
}
|
|
327
344
|
async function setDriveAvailableOffline(driveId, availableOffline) {
|
|
328
345
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
329
346
|
if (!isAllowedToCreateDocuments) throw new Error("User is not allowed to change drive availability");
|
|
330
|
-
const reactorClient =
|
|
347
|
+
const reactorClient = getPHStore()?.reactorClient;
|
|
331
348
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
332
|
-
return await reactorClient.execute(driveId, "main", [setAvailableOffline({ availableOffline })]);
|
|
349
|
+
return await (await reactorClient.write.execute(driveId, "main", [setAvailableOffline({ availableOffline })])).document();
|
|
333
350
|
}
|
|
334
351
|
async function setDriveSharingType(driveId, sharingType) {
|
|
335
352
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
336
353
|
if (!isAllowedToCreateDocuments) throw new Error("User is not allowed to change drive sharing type");
|
|
337
|
-
const reactorClient =
|
|
354
|
+
const reactorClient = getPHStore()?.reactorClient;
|
|
338
355
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
339
|
-
return await reactorClient.execute(driveId, "main", [setSharingType({ type: sharingType })]);
|
|
356
|
+
return await (await reactorClient.write.execute(driveId, "main", [setSharingType({ type: sharingType })])).document();
|
|
340
357
|
}
|
|
341
358
|
async function setDriveMetadata(driveId, metadata) {
|
|
342
359
|
const { isAllowedToCreateDocuments } = getUserPermissions();
|
|
343
360
|
if (!isAllowedToCreateDocuments) throw new Error("User is not allowed to update drive metadata");
|
|
344
|
-
const reactorClient =
|
|
361
|
+
const reactorClient = getPHStore()?.reactorClient;
|
|
345
362
|
if (!reactorClient) throw new Error("ReactorClient not initialized");
|
|
346
363
|
const actions = [];
|
|
347
364
|
if (metadata.name) actions.push(setDriveName({ name: metadata.name }));
|
|
348
365
|
if (metadata.icon !== void 0) actions.push(setDriveIcon({ icon: metadata.icon }));
|
|
349
366
|
if (actions.length === 0) return;
|
|
350
|
-
return await reactorClient.execute(driveId, "main", actions);
|
|
367
|
+
return await (await reactorClient.write.execute(driveId, "main", actions)).document();
|
|
351
368
|
}
|
|
352
369
|
//#endregion
|
|
353
|
-
//#region src/constants.ts
|
|
354
|
-
const DEFAULT_DRIVE_EDITOR_ID = "powerhouse/generic-drive-explorer";
|
|
355
|
-
const COMMON_PACKAGE_ID = "powerhouse/common";
|
|
356
|
-
/** Document types that represent a "drive": a container of nodes. */
|
|
357
|
-
const DRIVE_DOCUMENT_TYPES = ["powerhouse/document-drive", "powerhouse/reactor-drive"];
|
|
358
|
-
//#endregion
|
|
359
370
|
//#region src/graphql/adapters.ts
|
|
360
371
|
function phDocumentFromQuery(document, documentSchema) {
|
|
361
372
|
const phDocument = {
|
|
@@ -415,7 +426,7 @@ const graphqlDocumentsEvents = ["DeleteDocuments"];
|
|
|
415
426
|
//#endregion
|
|
416
427
|
//#region src/graphql/fetchers.ts
|
|
417
428
|
async function reactorGraphqlFetchDocument(identifier, documentSchema) {
|
|
418
|
-
const client =
|
|
429
|
+
const client = getPHStore()?.reactorGraphQLClient;
|
|
419
430
|
if (!client) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
420
431
|
try {
|
|
421
432
|
const document = (await client.GetDocument({ identifier })).document?.document;
|
|
@@ -426,7 +437,7 @@ async function reactorGraphqlFetchDocument(identifier, documentSchema) {
|
|
|
426
437
|
}
|
|
427
438
|
}
|
|
428
439
|
async function reactorGraphqlBatchFetchDocuments(identifiers) {
|
|
429
|
-
if (!
|
|
440
|
+
if (!getPHStore()?.reactorGraphQLClient) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
430
441
|
const promises = map(identifiers, (identifier) => reactorGraphqlFetchDocument(identifier));
|
|
431
442
|
return await Promise.all(promises);
|
|
432
443
|
}
|
|
@@ -511,11 +522,34 @@ var DocumentFetcher = class {
|
|
|
511
522
|
};
|
|
512
523
|
//#endregion
|
|
513
524
|
//#region src/graphql/graphql-client-document-cache.ts
|
|
525
|
+
function isMissingDocumentMessage(message) {
|
|
526
|
+
return message.includes("Document not found") || /Document \S+ was purged/.test(message);
|
|
527
|
+
}
|
|
528
|
+
async function fetchDocumentForRefetch(identifier) {
|
|
529
|
+
const client = getPHStore()?.reactorGraphQLClient;
|
|
530
|
+
if (!client) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
531
|
+
const notFound = (cause) => new Error(`Document not found: ${identifier}`, { cause });
|
|
532
|
+
let result;
|
|
533
|
+
try {
|
|
534
|
+
result = await client.GetDocument({ identifier });
|
|
535
|
+
} catch (error) {
|
|
536
|
+
if ((error instanceof ClientError ? (error.response.errors ?? []).map((e) => e.message) : []).some(isMissingDocumentMessage)) throw notFound(error);
|
|
537
|
+
throw error;
|
|
538
|
+
}
|
|
539
|
+
const document = result.document?.document;
|
|
540
|
+
if (!document) throw notFound();
|
|
541
|
+
return phDocumentFromQuery(document);
|
|
542
|
+
}
|
|
514
543
|
var GraphQLClientDocumentCache = class {
|
|
515
544
|
fetcher;
|
|
516
545
|
documents = /* @__PURE__ */ new Map();
|
|
517
546
|
batchPromises = /* @__PURE__ */ new Map();
|
|
518
547
|
listeners = /* @__PURE__ */ new Map();
|
|
548
|
+
refetcher = new DocumentRefetcher({
|
|
549
|
+
documents: this.documents,
|
|
550
|
+
fetch: fetchDocumentForRefetch,
|
|
551
|
+
notify: (id) => this.notify(id)
|
|
552
|
+
});
|
|
519
553
|
constructor() {
|
|
520
554
|
this.fetcher = new DocumentFetcher();
|
|
521
555
|
window.addEventListener("MutateDocument", (event) => {
|
|
@@ -527,10 +561,9 @@ var GraphQLClientDocumentCache = class {
|
|
|
527
561
|
}
|
|
528
562
|
get(id, refetch) {
|
|
529
563
|
const current = this.documents.get(id);
|
|
530
|
-
if (current)
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
}
|
|
564
|
+
if (current && !refetch) return current;
|
|
565
|
+
if (current && current.status !== "rejected") return this.refetcher.refetch(id);
|
|
566
|
+
this.refetcher.forget(id);
|
|
534
567
|
const promise = addPromiseState(this.fetcher.get(id).then((document) => {
|
|
535
568
|
this.invalidateBatchesContaining(id);
|
|
536
569
|
return document;
|
|
@@ -538,6 +571,9 @@ var GraphQLClientDocumentCache = class {
|
|
|
538
571
|
this.documents.set(id, promise);
|
|
539
572
|
return promise;
|
|
540
573
|
}
|
|
574
|
+
getRefetchState(id) {
|
|
575
|
+
return this.refetcher.getState(id);
|
|
576
|
+
}
|
|
541
577
|
getBatch(ids) {
|
|
542
578
|
const key = ids.join(",");
|
|
543
579
|
const cached = this.batchPromises.get(key);
|
|
@@ -590,12 +626,12 @@ var GraphQLClientDocumentCache = class {
|
|
|
590
626
|
for (const listener of listeners) listener();
|
|
591
627
|
}
|
|
592
628
|
async handleDocumentMutated(id) {
|
|
593
|
-
this.
|
|
594
|
-
await this.get(id);
|
|
595
|
-
this.notify(id);
|
|
629
|
+
if (!this.documents.has(id)) return;
|
|
630
|
+
await this.get(id, true);
|
|
596
631
|
}
|
|
597
632
|
handleDocumentDeleted(id) {
|
|
598
633
|
this.documents.delete(id);
|
|
634
|
+
this.refetcher.forget(id);
|
|
599
635
|
this.invalidateBatchesContaining(id);
|
|
600
636
|
this.notify(id);
|
|
601
637
|
}
|
|
@@ -606,7 +642,7 @@ var GraphQLClientDocumentCache = class {
|
|
|
606
642
|
//#endregion
|
|
607
643
|
//#region src/graphql/mutators.ts
|
|
608
644
|
async function reactorGraphqlCreateDocument(document, parentIdentifier = DEFAULT_DRIVE_ID) {
|
|
609
|
-
const client =
|
|
645
|
+
const client = getPHStore()?.reactorGraphQLClient;
|
|
610
646
|
if (!client) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
611
647
|
return await client.CreateDocument({
|
|
612
648
|
document,
|
|
@@ -614,17 +650,17 @@ async function reactorGraphqlCreateDocument(document, parentIdentifier = DEFAULT
|
|
|
614
650
|
});
|
|
615
651
|
}
|
|
616
652
|
async function reactorGraphqlDeleteDocument(identifier) {
|
|
617
|
-
const client =
|
|
653
|
+
const client = getPHStore()?.reactorGraphQLClient;
|
|
618
654
|
if (!client) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
619
655
|
return await client.DeleteDocument({ identifier });
|
|
620
656
|
}
|
|
621
657
|
async function reactorGraphqlDeleteDocuments(identifiers) {
|
|
622
|
-
const client =
|
|
658
|
+
const client = getPHStore()?.reactorGraphQLClient;
|
|
623
659
|
if (!client) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
624
660
|
return await client.DeleteDocuments({ identifiers });
|
|
625
661
|
}
|
|
626
662
|
async function reactorGraphqlMutateDocument(documentIdentifier, ...actions) {
|
|
627
|
-
const client =
|
|
663
|
+
const client = getPHStore()?.reactorGraphQLClient;
|
|
628
664
|
if (!client) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
629
665
|
return await client.MutateDocument({
|
|
630
666
|
documentIdentifier,
|
|
@@ -640,10 +676,38 @@ function useAllowedDocumentModelModules() {
|
|
|
640
676
|
return documentModelModules?.filter((module) => allowedDocumentTypes.includes(module.documentModel.global.id));
|
|
641
677
|
}
|
|
642
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
|
|
643
705
|
//#region src/hooks/selected-folder.ts
|
|
644
|
-
/** Returns the selected folder. */
|
|
706
|
+
/** Returns the selected folder: the drive app's open folder, else the app's. */
|
|
645
707
|
function useSelectedFolder() {
|
|
708
|
+
const context = useDriveContext();
|
|
646
709
|
const selectedNode = useSelectedNode();
|
|
710
|
+
if (context?.folder) return context.folder;
|
|
647
711
|
if (isFolderNodeKind(selectedNode)) return selectedNode;
|
|
648
712
|
}
|
|
649
713
|
//#endregion
|
|
@@ -816,6 +880,91 @@ function buildSnapshot(syncManager) {
|
|
|
816
880
|
return map;
|
|
817
881
|
}
|
|
818
882
|
//#endregion
|
|
883
|
+
//#region src/hooks/document-link.ts
|
|
884
|
+
/** Where a document opens: the loaded drive that lists it, or undefined while none does. */
|
|
885
|
+
function useDocumentTarget(documentId) {
|
|
886
|
+
const store = usePHStore() ?? getPHStore();
|
|
887
|
+
const drives = useDrives();
|
|
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;
|
|
911
|
+
}
|
|
912
|
+
/** `useLinkProps` for a document by id, e.g. a `useDocumentsOfType` row;
|
|
913
|
+
* undefined while no loaded drive lists it. */
|
|
914
|
+
function useDocumentLinkProps(documentId) {
|
|
915
|
+
const target = useDocumentTarget(documentId);
|
|
916
|
+
const props = useLinkProps(target);
|
|
917
|
+
return target ? props : void 0;
|
|
918
|
+
}
|
|
919
|
+
//#endregion
|
|
920
|
+
//#region src/hooks/documents-of-type.ts
|
|
921
|
+
const DEFAULT_LIMIT = 25;
|
|
922
|
+
const NO_DOCUMENTS = {
|
|
923
|
+
documents: [],
|
|
924
|
+
invalid: [],
|
|
925
|
+
hasNextPage: false,
|
|
926
|
+
isLoadingNextPage: false,
|
|
927
|
+
loadNextPage: () => void 0,
|
|
928
|
+
error: void 0
|
|
929
|
+
};
|
|
930
|
+
const typeOf = (module) => module.documentModel.global.id;
|
|
931
|
+
function typeCacheOf(cache) {
|
|
932
|
+
if (!cache) return void 0;
|
|
933
|
+
if (!isDocumentTypeCache(cache)) throw new Error("This document cache can't list documents by type.");
|
|
934
|
+
return cache;
|
|
935
|
+
}
|
|
936
|
+
/** The documents of `module`'s type across every drive, a page at a time and
|
|
937
|
+
* checked against its schema; suspends until the first page has loaded. */
|
|
938
|
+
function useDocumentsOfType(module, { limit = DEFAULT_LIMIT } = {}) {
|
|
939
|
+
const cache = typeCacheOf(useDocumentCache());
|
|
940
|
+
const type = typeOf(module);
|
|
941
|
+
const read = () => cache?.getDocumentsOfTypeState(type, limit) ?? IDLE_DOCUMENTS_OF_TYPE_ENTRY;
|
|
942
|
+
const entry = useSyncExternalStore((onChange) => cache ? cache.subscribeDocumentsOfType(type, limit, onChange) : () => {}, read, read);
|
|
943
|
+
if (cache) use(cache.loadDocumentsOfType(type, limit));
|
|
944
|
+
if (entry.status === "error" && entry.ids.length === 0) throw entry.error;
|
|
945
|
+
const loaded = useDocuments(entry.ids);
|
|
946
|
+
const [documents, invalid] = useMemo(() => {
|
|
947
|
+
const valid = [];
|
|
948
|
+
const other = [];
|
|
949
|
+
for (const document of loaded) if (module.utils.isDocumentOfType(document)) valid.push(document);
|
|
950
|
+
else other.push(document);
|
|
951
|
+
return [valid, other];
|
|
952
|
+
}, [loaded, module]);
|
|
953
|
+
if (!cache) return NO_DOCUMENTS;
|
|
954
|
+
return {
|
|
955
|
+
documents,
|
|
956
|
+
invalid,
|
|
957
|
+
hasNextPage: entry.hasNextPage,
|
|
958
|
+
isLoadingNextPage: entry.status === "pending",
|
|
959
|
+
loadNextPage: () => cache.loadMoreDocumentsOfType(type, limit),
|
|
960
|
+
error: entry.status === "error" ? entry.error : void 0
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
/** Loads the first page `useDocumentsOfType` reads, e.g. in a route loader, so it doesn't suspend. */
|
|
964
|
+
async function loadDocumentsOfType(module, { limit = DEFAULT_LIMIT } = {}) {
|
|
965
|
+
await typeCacheOf(getPHStore()?.documentCache)?.loadDocumentsOfType(typeOf(module), limit);
|
|
966
|
+
}
|
|
967
|
+
//#endregion
|
|
819
968
|
//#region src/hooks/supported-document-types.ts
|
|
820
969
|
/** Returns the supported document types for the reactor (derived from the document model modules) */
|
|
821
970
|
function useSupportedDocumentTypesInReactor() {
|
|
@@ -825,13 +974,13 @@ function useSupportedDocumentTypesInReactor() {
|
|
|
825
974
|
//#region src/hooks/document-types.ts
|
|
826
975
|
/** Returns the document types a app supports.
|
|
827
976
|
*
|
|
828
|
-
*
|
|
829
|
-
*
|
|
977
|
+
* Uses the `allowedDocumentTypes` config value when it lists any types.
|
|
978
|
+
* Unset or empty, it means every type, so the reactor's supported types are used.
|
|
830
979
|
*/
|
|
831
980
|
function useDocumentTypes() {
|
|
832
981
|
const allowedDocumentTypes = useAllowedDocumentTypes();
|
|
833
982
|
const supportedDocumentTypes = useSupportedDocumentTypesInReactor();
|
|
834
|
-
return allowedDocumentTypes
|
|
983
|
+
return allowedDocumentTypes?.length ? allowedDocumentTypes : supportedDocumentTypes;
|
|
835
984
|
}
|
|
836
985
|
//#endregion
|
|
837
986
|
//#region src/hooks/document-version-status.ts
|
|
@@ -1013,6 +1162,14 @@ function useEditorModulesForDocumentType(documentType) {
|
|
|
1013
1162
|
if (!documentType) return void 0;
|
|
1014
1163
|
return editorModules?.filter((module) => module.documentTypes.includes(documentType));
|
|
1015
1164
|
}
|
|
1165
|
+
/** The editor for `document`: its preferred editor if that edits its type,
|
|
1166
|
+
* else the first editor for its type. */
|
|
1167
|
+
function useEditorModuleFor(document) {
|
|
1168
|
+
const documentType = document?.header.documentType;
|
|
1169
|
+
const preferred = useEditorModuleById(document?.header.meta?.preferredEditor);
|
|
1170
|
+
const fallback = useFallbackEditorModule(documentType);
|
|
1171
|
+
return !!documentType && !!preferred && (preferred.documentTypes.includes(documentType) || preferred.documentTypes.includes("*")) ? preferred : fallback;
|
|
1172
|
+
}
|
|
1016
1173
|
//#endregion
|
|
1017
1174
|
//#region src/utils/preload-editor.ts
|
|
1018
1175
|
function preloadEditorModule(module) {
|
|
@@ -1142,7 +1299,8 @@ function useDropFile(handleAddFile) {
|
|
|
1142
1299
|
//#endregion
|
|
1143
1300
|
//#region src/hooks/folder-by-id.ts
|
|
1144
1301
|
function useFolderById(id) {
|
|
1145
|
-
|
|
1302
|
+
const node = useNodeById(id);
|
|
1303
|
+
return isFolderNodeKind(node) ? node : void 0;
|
|
1146
1304
|
}
|
|
1147
1305
|
//#endregion
|
|
1148
1306
|
//#region src/graphql/events.ts
|
|
@@ -1174,24 +1332,24 @@ function useInitReactorGraphqlClient(switchboardUrl = DEFAULT_SWITCHBOARD_URL, d
|
|
|
1174
1332
|
return hasInit;
|
|
1175
1333
|
}
|
|
1176
1334
|
async function reactorGraphqlFetchDrive(identifier) {
|
|
1177
|
-
const client =
|
|
1335
|
+
const client = getPHStore()?.reactorGraphQLClient;
|
|
1178
1336
|
if (!client) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
1179
1337
|
const result = await client.GetDocument({ identifier });
|
|
1180
1338
|
if (!result.document?.document) throw new Error("Could not fetch drive with id: " + identifier);
|
|
1181
1339
|
return phDocumentFromQuery(result.document.document, DriveDocumentSchema);
|
|
1182
1340
|
}
|
|
1183
1341
|
async function reactorGraphqlSyncDrive(driveId) {
|
|
1184
|
-
if (!
|
|
1342
|
+
if (!getPHStore()?.reactorGraphQLClient) throw new Error("Please call `useInitReactorGraphqlClient` to use its functions");
|
|
1185
1343
|
const drive = await reactorGraphqlFetchDrive(driveId);
|
|
1186
1344
|
setDrives([drive]);
|
|
1187
|
-
|
|
1345
|
+
selectDrive(drive);
|
|
1188
1346
|
}
|
|
1189
1347
|
async function initGraphQLReactorClientWithDocumentCache(switchboardUrl, driveId) {
|
|
1190
|
-
if (!window.ph) window.ph = {};
|
|
1191
1348
|
callEventHandlerRegisterFunctions(commonGlobalEventHandlerFunctions);
|
|
1192
|
-
|
|
1349
|
+
const client = createClient(switchboardUrl, documentCacheClientMiddleware);
|
|
1350
|
+
setGraphQLReactorClient(client);
|
|
1193
1351
|
await reactorGraphqlSyncDrive(driveId);
|
|
1194
|
-
|
|
1352
|
+
selectNode(void 0);
|
|
1195
1353
|
setDocumentCache(new GraphQLClientDocumentCache());
|
|
1196
1354
|
forEach(graphqlEventsToSyncDrive, (name) => {
|
|
1197
1355
|
window.addEventListener(name, () => {
|
|
@@ -1232,6 +1390,7 @@ function resolveNode(driveId, node) {
|
|
|
1232
1390
|
return node?.id !== driveId ? node : void 0;
|
|
1233
1391
|
}
|
|
1234
1392
|
function useNodeActions() {
|
|
1393
|
+
const setSelectedNode = useSetSelectedNode();
|
|
1235
1394
|
const [selectedDrive] = useSelectedDriveSafe();
|
|
1236
1395
|
const selectedFolder = useSelectedFolder();
|
|
1237
1396
|
const selectedParentFolder = useFolderById(useSelectedNode()?.parentFolder);
|
|
@@ -1239,7 +1398,8 @@ function useNodeActions() {
|
|
|
1239
1398
|
const drives = useDrives();
|
|
1240
1399
|
async function onAddFile(file, parent) {
|
|
1241
1400
|
if (!selectedDriveId) return;
|
|
1242
|
-
|
|
1401
|
+
const fileName = file.name.replace(/\..+/gim, "");
|
|
1402
|
+
return addFileWithProgress(file, selectedDriveId, fileName, resolveNode(selectedDriveId, parent)?.id, void 0, void 0, "duplicate");
|
|
1243
1403
|
}
|
|
1244
1404
|
async function onAddFolder(name, parent) {
|
|
1245
1405
|
if (!selectedDriveId) return;
|
|
@@ -1260,7 +1420,8 @@ function useNodeActions() {
|
|
|
1260
1420
|
console.error(`Node ${src.id} not found`);
|
|
1261
1421
|
return;
|
|
1262
1422
|
}
|
|
1263
|
-
|
|
1423
|
+
const resolvedTarget = resolveNode(selectedDriveId, target);
|
|
1424
|
+
await copyNode$1(selectedDriveId, resolvedSrc, resolvedTarget);
|
|
1264
1425
|
}
|
|
1265
1426
|
async function onMoveNode(src, target) {
|
|
1266
1427
|
if (!selectedDriveId) return;
|
|
@@ -1280,7 +1441,8 @@ function useNodeActions() {
|
|
|
1280
1441
|
console.error(`Node ${src.id} not found`);
|
|
1281
1442
|
return;
|
|
1282
1443
|
}
|
|
1283
|
-
|
|
1444
|
+
const target = resolveNode(selectedDriveId, selectedFolder ?? selectedParentFolder);
|
|
1445
|
+
await copyNode$1(selectedDriveId, resolvedSrc, target);
|
|
1284
1446
|
}
|
|
1285
1447
|
async function onAddAndSelectNewFolder(name) {
|
|
1286
1448
|
if (!name) return;
|
|
@@ -1292,8 +1454,10 @@ function useNodeActions() {
|
|
|
1292
1454
|
}
|
|
1293
1455
|
async function onRenameDriveNodes(newName, nodeId) {
|
|
1294
1456
|
if (!drives) return;
|
|
1295
|
-
const
|
|
1296
|
-
|
|
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)));
|
|
1297
1461
|
}
|
|
1298
1462
|
return {
|
|
1299
1463
|
onAddFile,
|
|
@@ -1307,12 +1471,6 @@ function useNodeActions() {
|
|
|
1307
1471
|
};
|
|
1308
1472
|
}
|
|
1309
1473
|
//#endregion
|
|
1310
|
-
//#region src/hooks/node-by-id.ts
|
|
1311
|
-
/** Returns a node in the selected drive by id. */
|
|
1312
|
-
function useNodeById(id) {
|
|
1313
|
-
return useNodesInSelectedDrive()?.find((n) => n.id === id);
|
|
1314
|
-
}
|
|
1315
|
-
//#endregion
|
|
1316
1474
|
//#region src/hooks/node-path.ts
|
|
1317
1475
|
/** Returns the path to a node in the selected drive */
|
|
1318
1476
|
function useNodePathById(id) {
|
|
@@ -1340,6 +1498,56 @@ function useParentFolderForSelectedNode() {
|
|
|
1340
1498
|
return useNodeParentFolderById(useSelectedNode()?.id);
|
|
1341
1499
|
}
|
|
1342
1500
|
//#endregion
|
|
1501
|
+
//#region src/hooks/revision-history.ts
|
|
1502
|
+
/** The query param that opens the document's revision history: `?history`. */
|
|
1503
|
+
const REVISION_HISTORY_PARAM = "history";
|
|
1504
|
+
/** The history page shown, from 1 (the newest operations): `?history&historyPage=2`.
|
|
1505
|
+
* Its own name: a drive app or editor may page by `page`. */
|
|
1506
|
+
const REVISION_HISTORY_PAGE_PARAM = "historyPage";
|
|
1507
|
+
/** The page a `page` param names: a positive integer, else the first. */
|
|
1508
|
+
function parseRevisionHistoryPage(value) {
|
|
1509
|
+
const page = Number(value);
|
|
1510
|
+
return Number.isSafeInteger(page) && page > 0 ? page : 1;
|
|
1511
|
+
}
|
|
1512
|
+
/** Whether the URL opens the revision history. */
|
|
1513
|
+
function useRevisionHistoryVisible() {
|
|
1514
|
+
return useSearchParams()[REVISION_HISTORY_PARAM] !== void 0;
|
|
1515
|
+
}
|
|
1516
|
+
/** The revision history page the URL names, from 1. */
|
|
1517
|
+
function useRevisionHistoryPage() {
|
|
1518
|
+
return parseRevisionHistoryPage(useSearchParams()[REVISION_HISTORY_PAGE_PARAM]);
|
|
1519
|
+
}
|
|
1520
|
+
/** Shows the revision history: a new history entry, so Back closes it. */
|
|
1521
|
+
function showRevisionHistory() {
|
|
1522
|
+
setSearchParams((prev) => ({
|
|
1523
|
+
...prev,
|
|
1524
|
+
[REVISION_HISTORY_PARAM]: ""
|
|
1525
|
+
}));
|
|
1526
|
+
}
|
|
1527
|
+
/** Hides the revision history. */
|
|
1528
|
+
function hideRevisionHistory() {
|
|
1529
|
+
setSearchParams((prev) => ({
|
|
1530
|
+
...prev,
|
|
1531
|
+
[REVISION_HISTORY_PARAM]: void 0,
|
|
1532
|
+
[REVISION_HISTORY_PAGE_PARAM]: void 0
|
|
1533
|
+
}));
|
|
1534
|
+
}
|
|
1535
|
+
/** Opens history page `page`, from 1; Back returns to the page before. */
|
|
1536
|
+
function setRevisionHistoryPage(page) {
|
|
1537
|
+
setSearchParams((prev) => ({
|
|
1538
|
+
...prev,
|
|
1539
|
+
[REVISION_HISTORY_PARAM]: "",
|
|
1540
|
+
[REVISION_HISTORY_PAGE_PARAM]: page > 1 ? String(page) : void 0
|
|
1541
|
+
}));
|
|
1542
|
+
}
|
|
1543
|
+
/** Shows or hides the revision history. */
|
|
1544
|
+
function setRevisionHistoryVisible(visible) {
|
|
1545
|
+
if (visible) showRevisionHistory();
|
|
1546
|
+
else hideRevisionHistory();
|
|
1547
|
+
}
|
|
1548
|
+
/** @deprecated The revision history is a URL param now; there is no store value to watch. */
|
|
1549
|
+
function addRevisionHistoryVisibleEventHandler() {}
|
|
1550
|
+
//#endregion
|
|
1343
1551
|
//#region src/hooks/subgraph-modules.ts
|
|
1344
1552
|
function useSubgraphModules() {
|
|
1345
1553
|
return useVetraPackages().flatMap((pkg) => pkg.subgraphs || []);
|
|
@@ -1703,17 +1911,38 @@ const syncStatusToUI = {
|
|
|
1703
1911
|
async function getDrives(reactor) {
|
|
1704
1912
|
return (await Promise.all(DRIVE_DOCUMENT_TYPES.map((type) => reactor.find({ type })))).flatMap((r) => r.results);
|
|
1705
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
|
+
}
|
|
1706
1931
|
function getSyncStatus(documentId, sharingType) {
|
|
1707
1932
|
return Promise.resolve(getSyncStatusSync(documentId, sharingType));
|
|
1708
1933
|
}
|
|
1709
1934
|
function getSyncStatusSync(documentId, sharingType) {
|
|
1710
|
-
if (sharingType === "LOCAL") return;
|
|
1711
|
-
const syncManager =
|
|
1935
|
+
if (sharingType === "LOCAL" || typeof window === "undefined") return;
|
|
1936
|
+
const syncManager = getPHStore()?.reactorClientModule?.reactorModule?.syncModule?.syncManager;
|
|
1712
1937
|
if (!syncManager) return;
|
|
1713
1938
|
const status = syncManager.getSyncStatus(documentId);
|
|
1714
1939
|
if (status === void 0) return;
|
|
1715
1940
|
return syncStatusToUI[status];
|
|
1716
1941
|
}
|
|
1942
|
+
/** A drive's display name: the header's (renames set it), else its creation name. */
|
|
1943
|
+
function getDriveName(drive) {
|
|
1944
|
+
return drive.header.name || drive.state.global.name;
|
|
1945
|
+
}
|
|
1717
1946
|
//#endregion
|
|
1718
1947
|
//#region src/utils/get-revision-from-date.ts
|
|
1719
1948
|
const getRevisionFromDate = (startDate, endDate, operations = []) => {
|
|
@@ -1783,7 +2012,7 @@ function getDocumentModelSchemaName(model) {
|
|
|
1783
2012
|
}
|
|
1784
2013
|
function buildStateTypeMap(definitions) {
|
|
1785
2014
|
const typeMap = /* @__PURE__ */ new Map();
|
|
1786
|
-
for (const def of definitions) if (def.kind === Kind.OBJECT_TYPE_DEFINITION) typeMap.set(def.name.value, def);
|
|
2015
|
+
for (const def of definitions) if (def.kind === Kind.OBJECT_TYPE_DEFINITION || def.kind === Kind.INTERFACE_TYPE_DEFINITION || def.kind === Kind.UNION_TYPE_DEFINITION) typeMap.set(def.name.value, def);
|
|
1787
2016
|
return typeMap;
|
|
1788
2017
|
}
|
|
1789
2018
|
/**
|
|
@@ -1792,6 +2021,7 @@ function buildStateTypeMap(definitions) {
|
|
|
1792
2021
|
* type); enums, scalars, and built-ins are leaves.
|
|
1793
2022
|
*/
|
|
1794
2023
|
function expandStateFields(typeDef, typeMap) {
|
|
2024
|
+
if (typeDef.kind !== Kind.OBJECT_TYPE_DEFINITION) throw new Error(`Abstract state type requires the generic document query: ${typeDef.name.value}`);
|
|
1795
2025
|
return (typeDef.fields ?? []).map((field) => {
|
|
1796
2026
|
const fieldName = field.name.value;
|
|
1797
2027
|
let typeNode = field.type;
|
|
@@ -1904,7 +2134,7 @@ function buildDocumentSubgraphUrl(channelUrl, documentType, identifier, model, a
|
|
|
1904
2134
|
}
|
|
1905
2135
|
//#endregion
|
|
1906
2136
|
//#region src/utils/upgrade-preview.ts
|
|
1907
|
-
const NON_DOMAIN_SCOPES = new Set(["auth", "document"]);
|
|
2137
|
+
const NON_DOMAIN_SCOPES = /* @__PURE__ */ new Set(["auth", "document"]);
|
|
1908
2138
|
function isPlainObject(value) {
|
|
1909
2139
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1910
2140
|
}
|
|
@@ -1992,7 +2222,7 @@ function getDocumentUpgradePreview(document, registry) {
|
|
|
1992
2222
|
}
|
|
1993
2223
|
const addedFields = [];
|
|
1994
2224
|
const removedFields = [];
|
|
1995
|
-
const scopes = new Set([...Object.keys(document.state), ...Object.keys(upgraded.state)]);
|
|
2225
|
+
const scopes = /* @__PURE__ */ new Set([...Object.keys(document.state), ...Object.keys(upgraded.state)]);
|
|
1996
2226
|
for (const scope of scopes) {
|
|
1997
2227
|
if (NON_DOMAIN_SCOPES.has(scope)) continue;
|
|
1998
2228
|
const beforeScope = document.state[scope];
|
|
@@ -2075,7 +2305,9 @@ const useOnDropFile = (documentTypesOverride) => {
|
|
|
2075
2305
|
console.warn("No selected drive - upload skipped");
|
|
2076
2306
|
return;
|
|
2077
2307
|
}
|
|
2078
|
-
|
|
2308
|
+
const fileName = file.name.replace(/\..+/gim, "");
|
|
2309
|
+
const targetNodeId = targetFolder?.id ?? selectedFolder?.id;
|
|
2310
|
+
return await addFileWithProgress(file, selectedDriveId, fileName, targetNodeId, onProgress, documentTypesOverride ?? documentTypes, resolveConflict);
|
|
2079
2311
|
};
|
|
2080
2312
|
return onDropFile;
|
|
2081
2313
|
};
|
|
@@ -2094,6 +2326,19 @@ function useUserPermissions() {
|
|
|
2094
2326
|
};
|
|
2095
2327
|
}
|
|
2096
2328
|
//#endregion
|
|
2329
|
+
//#region src/hooks/close-node.ts
|
|
2330
|
+
/** Leaves a node's view: back to the entry it was opened from, past entries
|
|
2331
|
+
* pushed inside it; else, e.g. after a deep link, to its parent in place. */
|
|
2332
|
+
function useCloseNode(nodeId) {
|
|
2333
|
+
const navigation = usePHNavigation();
|
|
2334
|
+
const setSelectedNode = useSetSelectedNode();
|
|
2335
|
+
const parentFolder = useNodeParentFolderById(nodeId);
|
|
2336
|
+
return () => {
|
|
2337
|
+
if (navigation.closeOpened?.()) return;
|
|
2338
|
+
setSelectedNode(parentFolder, { replace: true });
|
|
2339
|
+
};
|
|
2340
|
+
}
|
|
2341
|
+
//#endregion
|
|
2097
2342
|
//#region src/hooks/attachment-progress.ts
|
|
2098
2343
|
const IDLE_PROGRESS = {
|
|
2099
2344
|
percent: 0,
|
|
@@ -2444,7 +2689,8 @@ async function dropAllReactorStorage(pg) {
|
|
|
2444
2689
|
const DEFAULT_DEBOUNCE_DELAY_MS = 200;
|
|
2445
2690
|
const DEFAULT_IMMEDIATE_THRESHOLD_MS = 1e3;
|
|
2446
2691
|
async function _refreshReactorData(reactor) {
|
|
2447
|
-
|
|
2692
|
+
const drives = await getDrives(reactor);
|
|
2693
|
+
setDrives(drives);
|
|
2448
2694
|
}
|
|
2449
2695
|
async function _refreshReactorDataClient(reactor) {
|
|
2450
2696
|
if (!reactor) return;
|
|
@@ -2490,6 +2736,331 @@ function createDebouncedRefreshReactorDataClient(debounceDelayMs = DEFAULT_DEBOU
|
|
|
2490
2736
|
}
|
|
2491
2737
|
const refreshReactorData = createDebouncedRefreshReactorData();
|
|
2492
2738
|
const refreshReactorDataClient = createDebouncedRefreshReactorDataClient();
|
|
2739
|
+
/** How often one drive is re-read while it keeps changing (a drive being filled). */
|
|
2740
|
+
const DEFAULT_DRIVE_REFRESH_MIN_INTERVAL_MS = 1e4;
|
|
2741
|
+
function currentDrives() {
|
|
2742
|
+
return getPHStore()?.drives;
|
|
2743
|
+
}
|
|
2744
|
+
/**
|
|
2745
|
+
* Re-reads one drive and replaces it in the drives store. Only that drive
|
|
2746
|
+
* crosses the wire: the list used to be re-fetched whole on any drive change,
|
|
2747
|
+
* every drive's node tree included, which on a large mail drive was ten
|
|
2748
|
+
* megabytes per change. Without a store (before init) the whole list loads.
|
|
2749
|
+
*/
|
|
2750
|
+
async function refreshDrive(reactor, driveId) {
|
|
2751
|
+
const drives = currentDrives();
|
|
2752
|
+
if (!drives) return _refreshReactorDataClient(reactor);
|
|
2753
|
+
const fresh = await getDrive(reactor, driveId);
|
|
2754
|
+
if (!fresh) {
|
|
2755
|
+
setDrives(drives.filter((d) => d.header.id !== driveId));
|
|
2756
|
+
return;
|
|
2757
|
+
}
|
|
2758
|
+
const at = drives.findIndex((d) => d.header.id === driveId);
|
|
2759
|
+
setDrives(at < 0 ? [...drives, fresh] : drives.map((d, i) => i === at ? fresh : d));
|
|
2760
|
+
}
|
|
2761
|
+
/**
|
|
2762
|
+
* Brings the drives store in line with which drives exist: ids come from a
|
|
2763
|
+
* headers-only listing, a drive not held yet is loaded on its own, and a drive
|
|
2764
|
+
* no longer listed is dropped. Drives already held are kept as they are.
|
|
2765
|
+
*/
|
|
2766
|
+
async function refreshDriveMembership(reactor) {
|
|
2767
|
+
const drives = currentDrives();
|
|
2768
|
+
if (!drives) return _refreshReactorDataClient(reactor);
|
|
2769
|
+
const ids = await listDriveIds(reactor);
|
|
2770
|
+
const known = new Map(drives.map((d) => [d.header.id, d]));
|
|
2771
|
+
const added = await Promise.all(ids.filter((id) => !known.has(id)).map((id) => getDrive(reactor, id)));
|
|
2772
|
+
const loaded = new Map(added.filter((d) => d !== void 0).map((d) => [d.header.id, d]));
|
|
2773
|
+
setDrives(ids.map((id) => known.get(id) ?? loaded.get(id)).filter((d) => d !== void 0));
|
|
2774
|
+
}
|
|
2775
|
+
/**
|
|
2776
|
+
* Routes a drive-type document change to the smallest refresh: an update
|
|
2777
|
+
* re-reads that one drive and invalidates its node cache, at most once per
|
|
2778
|
+
* `minIntervalMs` while it keeps changing (at once after a write from this
|
|
2779
|
+
* tab, see `markLocalDriveWrite`); a creation or deletion refreshes the
|
|
2780
|
+
* membership and loads only what is new.
|
|
2781
|
+
*/
|
|
2782
|
+
function createDriveChangeHandler(reactor, options = {}) {
|
|
2783
|
+
const minIntervalMs = options.minIntervalMs ?? DEFAULT_DRIVE_REFRESH_MIN_INTERVAL_MS;
|
|
2784
|
+
const onError = options.onError ?? (() => void 0);
|
|
2785
|
+
const lastAt = /* @__PURE__ */ new Map();
|
|
2786
|
+
const pending = /* @__PURE__ */ new Map();
|
|
2787
|
+
const run = (driveId) => {
|
|
2788
|
+
lastAt.set(driveId, Date.now());
|
|
2789
|
+
const timer = pending.get(driveId);
|
|
2790
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
2791
|
+
pending.delete(driveId);
|
|
2792
|
+
refreshDrive(reactor, driveId).then(() => invalidateDriveNodes(driveId)).catch(onError);
|
|
2793
|
+
};
|
|
2794
|
+
const schedule = (driveId) => {
|
|
2795
|
+
if (takeLocalDriveWrite(driveId)) {
|
|
2796
|
+
run(driveId);
|
|
2797
|
+
return;
|
|
2798
|
+
}
|
|
2799
|
+
if (pending.has(driveId)) return;
|
|
2800
|
+
const wait = (lastAt.get(driveId) ?? 0) + minIntervalMs - Date.now();
|
|
2801
|
+
if (wait <= 0) {
|
|
2802
|
+
run(driveId);
|
|
2803
|
+
return;
|
|
2804
|
+
}
|
|
2805
|
+
pending.set(driveId, setTimeout(() => run(driveId), wait));
|
|
2806
|
+
};
|
|
2807
|
+
return (event) => {
|
|
2808
|
+
if (event.type === DOCUMENT_CHANGE_TYPE.Updated) {
|
|
2809
|
+
for (const document of event.documents) schedule(document.header.id);
|
|
2810
|
+
return;
|
|
2811
|
+
}
|
|
2812
|
+
refreshDriveMembership(reactor).catch(onError);
|
|
2813
|
+
};
|
|
2814
|
+
}
|
|
2815
|
+
//#endregion
|
|
2816
|
+
//#region src/routing/drive-arrivals.ts
|
|
2817
|
+
let pendingAdds = 0;
|
|
2818
|
+
const addListeners = /* @__PURE__ */ new Set();
|
|
2819
|
+
function notifyAdds() {
|
|
2820
|
+
for (const listener of [...addListeners]) listener();
|
|
2821
|
+
}
|
|
2822
|
+
/** Counts a background drive addition as pending until it settles. */
|
|
2823
|
+
function trackDriveArrival(promise) {
|
|
2824
|
+
pendingAdds++;
|
|
2825
|
+
notifyAdds();
|
|
2826
|
+
return promise.finally(() => {
|
|
2827
|
+
pendingAdds--;
|
|
2828
|
+
notifyAdds();
|
|
2829
|
+
});
|
|
2830
|
+
}
|
|
2831
|
+
/** Resolves once `store.drives` lists `driveId`, or after `maxWaitMs`: a
|
|
2832
|
+
* finished first pull does not mean the drive is listed yet. */
|
|
2833
|
+
function untilDriveListed(store, driveId, maxWaitMs = 15e3) {
|
|
2834
|
+
const listed = () => !!store.drives?.some((d) => d.header.id === driveId);
|
|
2835
|
+
if (listed()) return Promise.resolve();
|
|
2836
|
+
return new Promise((resolve) => {
|
|
2837
|
+
const finish = () => {
|
|
2838
|
+
clearTimeout(timer);
|
|
2839
|
+
unsubscribe();
|
|
2840
|
+
resolve();
|
|
2841
|
+
};
|
|
2842
|
+
const timer = setTimeout(finish, maxWaitMs);
|
|
2843
|
+
const unsubscribe = subscribePHStore(store, () => {
|
|
2844
|
+
if (listed()) finish();
|
|
2845
|
+
}, "drives");
|
|
2846
|
+
});
|
|
2847
|
+
}
|
|
2848
|
+
const REMOTE_EVENTS = [SyncEventTypes.CONNECTION_STATE_CHANGED, SYNC_REMOTES_CHANGED_EVENT];
|
|
2849
|
+
/** Drives still on their way into `store`: being added or first syncing. */
|
|
2850
|
+
function createDriveArrivals(store) {
|
|
2851
|
+
return {
|
|
2852
|
+
isPending: () => store.drives === void 0 || pendingAdds > 0 || isInitialSyncInFlight(store),
|
|
2853
|
+
isDrivePending: (driveId) => isInitialSyncInFlight(store, driveId),
|
|
2854
|
+
subscribe(listener) {
|
|
2855
|
+
const watched = /* @__PURE__ */ new Map();
|
|
2856
|
+
const listenToRemotes = () => {
|
|
2857
|
+
const channels = /* @__PURE__ */ new Set();
|
|
2858
|
+
for (const { channel } of listSyncRemotes(store)) {
|
|
2859
|
+
channels.add(channel);
|
|
2860
|
+
if (watched.has(channel)) continue;
|
|
2861
|
+
try {
|
|
2862
|
+
watched.set(channel, channel.onConnectionStateChange(listener));
|
|
2863
|
+
} catch {
|
|
2864
|
+
watched.set(channel, () => {});
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2867
|
+
for (const [channel, unsubscribe] of watched) {
|
|
2868
|
+
if (channels.has(channel)) continue;
|
|
2869
|
+
unsubscribe();
|
|
2870
|
+
watched.delete(channel);
|
|
2871
|
+
}
|
|
2872
|
+
};
|
|
2873
|
+
const onChange = () => {
|
|
2874
|
+
listenToRemotes();
|
|
2875
|
+
listener();
|
|
2876
|
+
};
|
|
2877
|
+
let unsubscribeBus = [];
|
|
2878
|
+
const listenToBus = () => {
|
|
2879
|
+
for (const unsubscribe of unsubscribeBus) unsubscribe();
|
|
2880
|
+
const bus = store.reactorClientModule?.reactorModule?.eventBus;
|
|
2881
|
+
unsubscribeBus = bus ? REMOTE_EVENTS.map((type) => bus.subscribe(type, onChange)) : [];
|
|
2882
|
+
};
|
|
2883
|
+
const onModuleChange = () => {
|
|
2884
|
+
listenToBus();
|
|
2885
|
+
onChange();
|
|
2886
|
+
};
|
|
2887
|
+
listenToRemotes();
|
|
2888
|
+
listenToBus();
|
|
2889
|
+
addListeners.add(onChange);
|
|
2890
|
+
const unsubscribes = [subscribePHStore(store, onChange, "drives"), subscribePHStore(store, onModuleChange, "reactorClientModule")];
|
|
2891
|
+
return () => {
|
|
2892
|
+
addListeners.delete(onChange);
|
|
2893
|
+
for (const unsubscribe of unsubscribes) unsubscribe();
|
|
2894
|
+
for (const unsubscribe of unsubscribeBus) unsubscribe();
|
|
2895
|
+
for (const unsubscribe of watched.values()) unsubscribe();
|
|
2896
|
+
watched.clear();
|
|
2897
|
+
};
|
|
2898
|
+
}
|
|
2899
|
+
};
|
|
2900
|
+
}
|
|
2901
|
+
//#endregion
|
|
2902
|
+
//#region src/routing/resolve-drive-route.ts
|
|
2903
|
+
/** How long a navigation waits for its document and editor before it shows;
|
|
2904
|
+
* past it the view commits and renders them as they load. */
|
|
2905
|
+
const PREFETCH_WAIT_MS = 3e3;
|
|
2906
|
+
const DRIVE_ARRIVAL_MAX_WAIT_MS = 15e3;
|
|
2907
|
+
/** A listed drive by slug, id, or a `<name>-<id>` slug's trailing id. */
|
|
2908
|
+
function findDriveBySlugOrId(store, ref) {
|
|
2909
|
+
return findDriveBySlug(store.drives, ref);
|
|
2910
|
+
}
|
|
2911
|
+
async function findNode(store, driveId, nodeId) {
|
|
2912
|
+
const cached = peekDriveNode(driveId, nodeId, store);
|
|
2913
|
+
if (cached) return cached;
|
|
2914
|
+
try {
|
|
2915
|
+
return await getDriveNode(driveId, nodeId, {
|
|
2916
|
+
store,
|
|
2917
|
+
refresh: true
|
|
2918
|
+
});
|
|
2919
|
+
} catch {
|
|
2920
|
+
return;
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2923
|
+
async function findNodeBySlug(store, driveId, slug) {
|
|
2924
|
+
try {
|
|
2925
|
+
return (await loadDriveNodes(driveId, { store })).find((n) => n.id === slug || makeNodeSlug(n) === slug);
|
|
2926
|
+
} catch {
|
|
2927
|
+
return;
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
/** `waitForArrival` for an async read, re-run on each arrival. */
|
|
2931
|
+
function waitForNodeArrival(read, arrivals, signal, maxWaitMs = DRIVE_ARRIVAL_MAX_WAIT_MS) {
|
|
2932
|
+
if (!arrivals?.isPending() || signal.aborted) return Promise.resolve(void 0);
|
|
2933
|
+
return new Promise((resolve) => {
|
|
2934
|
+
let settled = false;
|
|
2935
|
+
let unsubscribe = () => {};
|
|
2936
|
+
const finish = (result) => {
|
|
2937
|
+
if (settled) return;
|
|
2938
|
+
settled = true;
|
|
2939
|
+
clearTimeout(timer);
|
|
2940
|
+
unsubscribe();
|
|
2941
|
+
signal.removeEventListener("abort", onAbort);
|
|
2942
|
+
resolve(result);
|
|
2943
|
+
};
|
|
2944
|
+
const onAbort = () => finish(void 0);
|
|
2945
|
+
const timer = setTimeout(onAbort, maxWaitMs);
|
|
2946
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
2947
|
+
unsubscribe = arrivals.subscribe(() => {
|
|
2948
|
+
read().then((next) => {
|
|
2949
|
+
if (next !== void 0 || !arrivals.isPending()) finish(next);
|
|
2950
|
+
});
|
|
2951
|
+
});
|
|
2952
|
+
});
|
|
2953
|
+
}
|
|
2954
|
+
/** Resolves with `read()` once it is defined, nothing is still arriving, the
|
|
2955
|
+
* signal aborts or the cap passes. */
|
|
2956
|
+
function waitForArrival(read, arrivals, signal, maxWaitMs = DRIVE_ARRIVAL_MAX_WAIT_MS) {
|
|
2957
|
+
const value = read();
|
|
2958
|
+
if (value !== void 0 || !arrivals?.isPending() || signal.aborted) return Promise.resolve(value);
|
|
2959
|
+
return new Promise((resolve) => {
|
|
2960
|
+
let unsubscribe = () => {};
|
|
2961
|
+
const finish = (result) => {
|
|
2962
|
+
clearTimeout(timer);
|
|
2963
|
+
unsubscribe();
|
|
2964
|
+
signal.removeEventListener("abort", onAbort);
|
|
2965
|
+
resolve(result);
|
|
2966
|
+
};
|
|
2967
|
+
const onAbort = () => finish(void 0);
|
|
2968
|
+
const timer = setTimeout(onAbort, maxWaitMs);
|
|
2969
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
2970
|
+
unsubscribe = arrivals.subscribe(() => {
|
|
2971
|
+
const next = read();
|
|
2972
|
+
if (next !== void 0 || !arrivals.isPending()) finish(next);
|
|
2973
|
+
});
|
|
2974
|
+
});
|
|
2975
|
+
}
|
|
2976
|
+
/** Asks the reactor directly: a just-created drive may not be listed yet. */
|
|
2977
|
+
async function fetchDrive(store, ref, signal) {
|
|
2978
|
+
try {
|
|
2979
|
+
const document = await store.reactorClient?.get(ref, void 0, signal);
|
|
2980
|
+
return DRIVE_DOCUMENT_TYPES.includes(document?.header.documentType ?? "") ? document : void 0;
|
|
2981
|
+
} catch {
|
|
2982
|
+
return;
|
|
2983
|
+
}
|
|
2984
|
+
}
|
|
2985
|
+
function editorModules(store) {
|
|
2986
|
+
return store.vetraPackageManager?.packages.flatMap((pkg) => pkg.editors) ?? [];
|
|
2987
|
+
}
|
|
2988
|
+
async function preloadModule(module) {
|
|
2989
|
+
try {
|
|
2990
|
+
await (module ? preloadEditorModule(module) : void 0);
|
|
2991
|
+
} catch {}
|
|
2992
|
+
}
|
|
2993
|
+
function documentEditor(store, document) {
|
|
2994
|
+
const { documentType, meta } = document.header;
|
|
2995
|
+
const modules = editorModules(store);
|
|
2996
|
+
return modules.find((module) => module.config.id === meta?.preferredEditor) ?? modules.find((module) => module.documentTypes.includes(documentType));
|
|
2997
|
+
}
|
|
2998
|
+
function driveApp(store, drive) {
|
|
2999
|
+
const id = drive.header.meta?.preferredEditor ?? "powerhouse/generic-drive-explorer";
|
|
3000
|
+
return editorModules(store).find((module) => module.config.id === id);
|
|
3001
|
+
}
|
|
3002
|
+
/** Loads a drive's app module so its view renders without suspending;
|
|
3003
|
+
* undefined when it is already loaded, so a warm open waits on nothing. */
|
|
3004
|
+
function preloadDriveApp(store, drive) {
|
|
3005
|
+
const module = driveApp(store, drive);
|
|
3006
|
+
return module && preloadEditorModule(module)?.then(noop, noop);
|
|
3007
|
+
}
|
|
3008
|
+
const noop = () => void 0;
|
|
3009
|
+
/** Warms a file node's document and its editor module. */
|
|
3010
|
+
async function prefetchDocument(store, node) {
|
|
3011
|
+
if (!isFileNode(node)) return;
|
|
3012
|
+
try {
|
|
3013
|
+
const document = await store.documentCache?.get(node.id);
|
|
3014
|
+
if (document) await preloadModule(documentEditor(store, document));
|
|
3015
|
+
} catch {}
|
|
3016
|
+
}
|
|
3017
|
+
/** Resolves once `work` settles, `ms` pass or `signal` aborts. */
|
|
3018
|
+
function settleWithin(work, ms, signal) {
|
|
3019
|
+
if (signal.aborted) return Promise.resolve();
|
|
3020
|
+
return new Promise((resolve) => {
|
|
3021
|
+
const done = () => {
|
|
3022
|
+
clearTimeout(timer);
|
|
3023
|
+
signal.removeEventListener("abort", done);
|
|
3024
|
+
resolve();
|
|
3025
|
+
};
|
|
3026
|
+
const timer = setTimeout(done, ms);
|
|
3027
|
+
signal.addEventListener("abort", done, { once: true });
|
|
3028
|
+
work.then(done, done);
|
|
3029
|
+
});
|
|
3030
|
+
}
|
|
3031
|
+
/** Resolves a drive route's slugs, waiting for drives that are still syncing,
|
|
3032
|
+
* and warms what the resolved view needs. */
|
|
3033
|
+
async function resolveDriveRoute(options) {
|
|
3034
|
+
const { store, driveSlug, nodeSlug, signal } = options;
|
|
3035
|
+
const arrivals = options.preload ? void 0 : options.arrivals;
|
|
3036
|
+
const drive = await waitForArrival(() => findDriveBySlugOrId(store, driveSlug), arrivals, signal) ?? await fetchDrive(store, extractDriveIdFromSlug(driveSlug) ?? driveSlug, signal);
|
|
3037
|
+
if (!drive) return { kind: "drive-not-found" };
|
|
3038
|
+
const driveId = drive.header.id;
|
|
3039
|
+
const appPreload = preloadDriveApp(store, drive);
|
|
3040
|
+
if (!nodeSlug) {
|
|
3041
|
+
if (appPreload) await settleWithin(appPreload, PREFETCH_WAIT_MS, signal);
|
|
3042
|
+
return {
|
|
3043
|
+
kind: "drive",
|
|
3044
|
+
driveId
|
|
3045
|
+
};
|
|
3046
|
+
}
|
|
3047
|
+
const nodeId = extractNodeIdFromSlug(nodeSlug) ?? (await findNodeBySlug(store, driveId, nodeSlug))?.id;
|
|
3048
|
+
const driveArrivals = arrivals && {
|
|
3049
|
+
...arrivals,
|
|
3050
|
+
isPending: () => arrivals.isDrivePending(driveId)
|
|
3051
|
+
};
|
|
3052
|
+
const node = nodeId ? await findNode(store, driveId, nodeId) ?? await waitForNodeArrival(() => findNode(store, driveId, nodeId), driveArrivals, signal) : void 0;
|
|
3053
|
+
if (!node) return {
|
|
3054
|
+
kind: "node-not-found",
|
|
3055
|
+
driveId
|
|
3056
|
+
};
|
|
3057
|
+
await settleWithin(Promise.all([appPreload, prefetchDocument(store, node)]), PREFETCH_WAIT_MS, signal);
|
|
3058
|
+
return {
|
|
3059
|
+
kind: "drive",
|
|
3060
|
+
driveId,
|
|
3061
|
+
nodeId: node.id
|
|
3062
|
+
};
|
|
3063
|
+
}
|
|
2493
3064
|
//#endregion
|
|
2494
3065
|
//#region src/remote-controller/action-tracker.ts
|
|
2495
3066
|
/**
|
|
@@ -2532,6 +3103,7 @@ var ActionTracker = class {
|
|
|
2532
3103
|
*/
|
|
2533
3104
|
const DEFAULT_PAGE_SIZE = 100;
|
|
2534
3105
|
var RemoteClient = class {
|
|
3106
|
+
client;
|
|
2535
3107
|
pageSize;
|
|
2536
3108
|
constructor(client, pageSize) {
|
|
2537
3109
|
this.client = client;
|
|
@@ -2757,7 +3329,13 @@ var RemoteDocumentController = class RemoteDocumentController {
|
|
|
2757
3329
|
tracker = new ActionTracker();
|
|
2758
3330
|
options;
|
|
2759
3331
|
documentId;
|
|
3332
|
+
/** The remote's id for the document; `documentId` may be a slug. */
|
|
3333
|
+
canonicalDocumentId;
|
|
2760
3334
|
remoteRevision = {};
|
|
3335
|
+
/** What the first push creates the remote from, until it has. */
|
|
3336
|
+
uncreated;
|
|
3337
|
+
/** A wrapped new document takes the host's signature policy at its first push. */
|
|
3338
|
+
takesHostPolicy = false;
|
|
2761
3339
|
hasPulled = false;
|
|
2762
3340
|
pushScheduled = false;
|
|
2763
3341
|
pushQueue = Promise.resolve();
|
|
@@ -2766,6 +3344,7 @@ var RemoteDocumentController = class RemoteDocumentController {
|
|
|
2766
3344
|
this.inner = inner;
|
|
2767
3345
|
this.options = options;
|
|
2768
3346
|
this.documentId = options.documentId ?? "";
|
|
3347
|
+
if (this.documentId === "") this.uncreated = uncreatedDocument(inner.document);
|
|
2769
3348
|
this.remoteClient = new RemoteClient(options.client, options.operationsPageSize);
|
|
2770
3349
|
this.setupActionInterceptors();
|
|
2771
3350
|
}
|
|
@@ -2815,6 +3394,7 @@ var RemoteDocumentController = class RemoteDocumentController {
|
|
|
2815
3394
|
try {
|
|
2816
3395
|
await this.ensureRemoteDocument();
|
|
2817
3396
|
if (this.options.onConflict && tracked.length > 0) tracked = await this.handleConflicts(tracked, this.options.onConflict);
|
|
3397
|
+
if (this.options.signer && tracked.length > 0) await this.resolveCanonicalDocumentId();
|
|
2818
3398
|
} catch (error) {
|
|
2819
3399
|
this.tracker.restore(tracked);
|
|
2820
3400
|
throw error;
|
|
@@ -2845,10 +3425,10 @@ var RemoteDocumentController = class RemoteDocumentController {
|
|
|
2845
3425
|
async pull() {
|
|
2846
3426
|
if (this.documentId === "") throw new Error("Cannot pull: no document ID set");
|
|
2847
3427
|
const { remoteDoc, operations } = await this.fetchDocumentAndOperations();
|
|
2848
|
-
|
|
2849
|
-
const
|
|
2850
|
-
this.
|
|
2851
|
-
this.
|
|
3428
|
+
this.canonicalDocumentId = remoteDoc.id;
|
|
3429
|
+
const initialDoc = this.inner.module.utils.createDocument();
|
|
3430
|
+
const pulledDocument = buildPulledDocument(remoteDoc, operations, initialDoc, this.options.branch ?? "main");
|
|
3431
|
+
this.replaceInner(pulledDocument);
|
|
2852
3432
|
this.tracker.clear();
|
|
2853
3433
|
this.remoteRevision = extractRevisionMap(remoteDoc.revisionsList);
|
|
2854
3434
|
this.notifyListeners("pull");
|
|
@@ -2858,22 +3438,67 @@ var RemoteDocumentController = class RemoteDocumentController {
|
|
|
2858
3438
|
* Pull an existing document from remote and create a controller for it.
|
|
2859
3439
|
*/
|
|
2860
3440
|
static async pull(ControllerClass, options) {
|
|
2861
|
-
const
|
|
3441
|
+
const temp = new ControllerClass();
|
|
3442
|
+
const remote = new RemoteDocumentController(temp, options);
|
|
2862
3443
|
if (options.documentId) await remote.pull();
|
|
3444
|
+
else await remote.headNewDocument();
|
|
2863
3445
|
return remote;
|
|
2864
3446
|
}
|
|
2865
3447
|
/**
|
|
2866
3448
|
* Wrap an existing controller instance with remote capabilities.
|
|
2867
3449
|
* Pending local actions on the inner controller are NOT tracked
|
|
2868
3450
|
* (only new actions through the remote controller are tracked).
|
|
3451
|
+
* Without a `documentId`, the first push creates the remote from the
|
|
3452
|
+
* wrapped document's header, under the host's create signature policy.
|
|
2869
3453
|
*/
|
|
2870
3454
|
static from(controller, options) {
|
|
2871
|
-
|
|
3455
|
+
const remote = new RemoteDocumentController(controller, options);
|
|
3456
|
+
remote.takesHostPolicy = remote.documentId === "";
|
|
3457
|
+
return remote;
|
|
2872
3458
|
}
|
|
2873
|
-
/**
|
|
3459
|
+
/** Heads the new document with the host's versions for its type, as `newDocument` does; a host without `createDefaults` creates it with `createEmptyDocument`. */
|
|
3460
|
+
async headNewDocument() {
|
|
3461
|
+
const module = this.inner.module;
|
|
3462
|
+
let policy;
|
|
3463
|
+
let versions;
|
|
3464
|
+
try {
|
|
3465
|
+
[policy, versions] = await Promise.all([readCreateSignaturePolicy(this.options.client), readCreateProtocolVersions(this.options.client, {
|
|
3466
|
+
documentType: this.inner.header.documentType,
|
|
3467
|
+
parentIdentifier: this.options.parentIdentifier
|
|
3468
|
+
}, [module])]);
|
|
3469
|
+
} catch (error) {
|
|
3470
|
+
if (!GraphQLOperationNotSupportedError.isError(error)) throw error;
|
|
3471
|
+
this.uncreated = void 0;
|
|
3472
|
+
return;
|
|
3473
|
+
}
|
|
3474
|
+
const document = headNewDocument(module, void 0, policy, versions);
|
|
3475
|
+
this.uncreated = structuredClone(document);
|
|
3476
|
+
this.replaceInner(document);
|
|
3477
|
+
}
|
|
3478
|
+
/** Creates the remote from the local header, so both run the versions its creator chose. */
|
|
2874
3479
|
async ensureRemoteDocument() {
|
|
2875
3480
|
if (this.documentId !== "") return;
|
|
2876
|
-
|
|
3481
|
+
if (this.takesHostPolicy) {
|
|
3482
|
+
await this.takeHostSignaturePolicy();
|
|
3483
|
+
this.takesHostPolicy = false;
|
|
3484
|
+
}
|
|
3485
|
+
const remoteDoc = this.uncreated === void 0 ? await this.remoteClient.createEmptyDocument(this.inner.header.documentType, this.options.parentIdentifier) : await this.remoteClient.createDocument(this.uncreated, this.options.parentIdentifier);
|
|
3486
|
+
this.documentId = remoteDoc.id;
|
|
3487
|
+
this.canonicalDocumentId = remoteDoc.id;
|
|
3488
|
+
this.uncreated = void 0;
|
|
3489
|
+
}
|
|
3490
|
+
/** Puts the uncreated document under the host's policy; a host without `createDefaults` creates it with `createEmptyDocument`. */
|
|
3491
|
+
async takeHostSignaturePolicy() {
|
|
3492
|
+
if (this.uncreated === void 0) return;
|
|
3493
|
+
let policy;
|
|
3494
|
+
try {
|
|
3495
|
+
policy = await readCreateSignaturePolicy(this.options.client);
|
|
3496
|
+
} catch (error) {
|
|
3497
|
+
if (!GraphQLOperationNotSupportedError.isError(error)) throw error;
|
|
3498
|
+
this.uncreated = void 0;
|
|
3499
|
+
return;
|
|
3500
|
+
}
|
|
3501
|
+
this.uncreated = underSignaturePolicy(this.uncreated, policy);
|
|
2877
3502
|
}
|
|
2878
3503
|
/** Set up interceptors for all action methods on the inner controller. */
|
|
2879
3504
|
setupActionInterceptors() {
|
|
@@ -2881,25 +3506,35 @@ var RemoteDocumentController = class RemoteDocumentController {
|
|
|
2881
3506
|
for (const actionType in module.actions) {
|
|
2882
3507
|
if (actionType in RemoteDocumentController.prototype) continue;
|
|
2883
3508
|
Object.defineProperty(this, actionType, {
|
|
2884
|
-
value: (input) => {
|
|
2885
|
-
const opCountsBefore = {};
|
|
2886
|
-
for (const scope in this.inner.operations) opCountsBefore[scope] = this.inner.operations[scope].length;
|
|
3509
|
+
value: (input) => this.applyAndTrack(() => {
|
|
2887
3510
|
this.inner[actionType](input);
|
|
2888
|
-
|
|
2889
|
-
const prevOp = newOp ? this.getLastOperationInScope(newOp.action.scope, newOp) : void 0;
|
|
2890
|
-
const prevOpHash = prevOp?.hash ?? "";
|
|
2891
|
-
const prevOpIndex = prevOp?.index ?? -1;
|
|
2892
|
-
if (!newOp) return this;
|
|
2893
|
-
this.tracker.track(newOp.action, prevOpHash, prevOpIndex);
|
|
2894
|
-
this.notifyListeners("action");
|
|
2895
|
-
if (this.options.mode === "streaming") this.schedulePush();
|
|
2896
|
-
return this;
|
|
2897
|
-
},
|
|
3511
|
+
}),
|
|
2898
3512
|
enumerable: true,
|
|
2899
3513
|
configurable: true
|
|
2900
3514
|
});
|
|
2901
3515
|
}
|
|
2902
3516
|
}
|
|
3517
|
+
/** Runs `apply`, then tracks the operation it added for push. */
|
|
3518
|
+
applyAndTrack(apply) {
|
|
3519
|
+
const opCountsBefore = {};
|
|
3520
|
+
for (const scope in this.inner.operations) opCountsBefore[scope] = this.inner.operations[scope].length;
|
|
3521
|
+
apply();
|
|
3522
|
+
const newOp = this.findNewOperation(opCountsBefore);
|
|
3523
|
+
const prevOp = newOp ? this.getLastOperationInScope(newOp.action.scope, newOp) : void 0;
|
|
3524
|
+
const prevOpHash = prevOp?.hash ?? "";
|
|
3525
|
+
const prevOpIndex = prevOp?.index ?? -1;
|
|
3526
|
+
if (!newOp) return this;
|
|
3527
|
+
this.tracker.track(newOp.action, prevOpHash, prevOpIndex);
|
|
3528
|
+
this.notifyListeners("action");
|
|
3529
|
+
if (this.options.mode === "streaming") this.schedulePush();
|
|
3530
|
+
return this;
|
|
3531
|
+
}
|
|
3532
|
+
/** Recreates the inner controller over `document` and re-intercepts it. */
|
|
3533
|
+
replaceInner(document) {
|
|
3534
|
+
const ControllerClass = this.inner.constructor;
|
|
3535
|
+
this.inner = new ControllerClass(document);
|
|
3536
|
+
this.setupActionInterceptors();
|
|
3537
|
+
}
|
|
2903
3538
|
/**
|
|
2904
3539
|
* Find the new operation added after applying an action,
|
|
2905
3540
|
* by comparing current operation counts against a previous snapshot.
|
|
@@ -2928,6 +3563,7 @@ var RemoteDocumentController = class RemoteDocumentController {
|
|
|
2928
3563
|
async handleConflicts(localTracked, strategy) {
|
|
2929
3564
|
const remoteResult = await this.remoteClient.getDocument(this.documentId, this.options.branch);
|
|
2930
3565
|
if (!remoteResult) throw new Error(`Document "${this.documentId}" not found on remote`);
|
|
3566
|
+
this.canonicalDocumentId ??= remoteResult.document.id;
|
|
2931
3567
|
const currentRevision = extractRevisionMap(remoteResult.document.revisionsList);
|
|
2932
3568
|
const localScopes = new Set(localTracked.map((t) => t.action.scope));
|
|
2933
3569
|
if (!hasRevisionConflict(currentRevision, this.remoteRevision, localScopes)) return localTracked;
|
|
@@ -2976,18 +3612,34 @@ var RemoteDocumentController = class RemoteDocumentController {
|
|
|
2976
3612
|
}
|
|
2977
3613
|
return actions;
|
|
2978
3614
|
}
|
|
3615
|
+
/**
|
|
3616
|
+
* The remote's id for `documentId`, which may be a slug. A signature binds
|
|
3617
|
+
* the id the remote verifies against, so a slug is never signed.
|
|
3618
|
+
*/
|
|
3619
|
+
async resolveCanonicalDocumentId() {
|
|
3620
|
+
if (this.canonicalDocumentId) return this.canonicalDocumentId;
|
|
3621
|
+
let result;
|
|
3622
|
+
try {
|
|
3623
|
+
result = await this.remoteClient.getDocument(this.documentId, this.options.branch);
|
|
3624
|
+
} catch (error) {
|
|
3625
|
+
throw new Error(`Cannot sign for "${this.documentId}": its document id could not be resolved on the remote`, { cause: error });
|
|
3626
|
+
}
|
|
3627
|
+
if (!result) throw new Error(`Cannot sign for "${this.documentId}": no document with that identifier on the remote`);
|
|
3628
|
+
this.canonicalDocumentId = result.document.id;
|
|
3629
|
+
return result.document.id;
|
|
3630
|
+
}
|
|
2979
3631
|
/** Sign an action using the configured signer, preserving existing signatures. */
|
|
2980
3632
|
async signAction(action) {
|
|
2981
3633
|
const signer = this.options.signer;
|
|
2982
|
-
const
|
|
3634
|
+
const target = actionSigningTarget(action, await this.resolveCanonicalDocumentId(), this.options.branch ?? "main");
|
|
3635
|
+
const signature = await signer.signAction(action, target);
|
|
2983
3636
|
const existingSignatures = action.context?.signer?.signatures ?? [];
|
|
2984
3637
|
return {
|
|
2985
3638
|
...action,
|
|
2986
3639
|
context: {
|
|
2987
3640
|
...action.context,
|
|
2988
3641
|
signer: {
|
|
2989
|
-
|
|
2990
|
-
app: signer.app,
|
|
3642
|
+
...actionSignerIdentity(signer),
|
|
2991
3643
|
signatures: [...existingSignatures, signature]
|
|
2992
3644
|
}
|
|
2993
3645
|
}
|
|
@@ -3136,6 +3788,6 @@ var BrowserLocalStorage = class extends BaseStorage {
|
|
|
3136
3788
|
}
|
|
3137
3789
|
};
|
|
3138
3790
|
//#endregion
|
|
3139
|
-
export { ActionTracker, BaseStorage, BrowserLocalStorage, COMMON_PACKAGE_ID, CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, CREDENTIAL_TYPES, ChannelScheme, ChevronDownIcon, ConflictError, CopyIcon, DEFAULT_DRIVE_EDITOR_ID, DEFAULT_DRIVE_ID, DEFAULT_SWITCHBOARD_URL, DOMAIN_TYPE, DRIVE_DOCUMENT_TYPES, DisconnectIcon, DocumentCache, DocumentChangeType, DocumentIntegrityService, DocumentModelNotFoundError, DocumentTypeMismatchError, DriveCollectionId, EDITOR_FILE_DROP_OPT_OUT_ATTR, GqlRequestChannel, GraphQLClientDocumentCache, GraphQLReactorClient, GraphQLReactorProvider, 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, 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, findUuid, getAnalyticsStore, getDocumentExtension, getDocumentGraphqlQuery, getDocumentStateSelection, getDocumentUpgradePreview, getDocumentVersionStatus, getDriveIdBySlug, getDrives, 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, loadFile, loading, login, logout, makeAuthConnectionParams, makeAuthMiddleware, makeDriveUrlComponent, makeNodeSlug, makePHEventFunctions, 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, setAllowList, setAllowedDocumentTypes, setAnalyticsDatabaseName, setAttachmentService, setBasePath, setCliVersion, setDefaultDrivesUrl, setDefaultPHGlobalConfig, setDisabledEditors, setDocumentCache, setDriveAvailableOffline, setDriveMetadata, setDriveSharingType, setDrives, setDrivesPreserveStrategy, setEnabledEditors, setFeatures, setFileUploadOperationsChunkSize, setGaTrackingId, setGlobal, setGraphQLReactorClient, setIsAddCloudDrivesEnabled, setIsAddDriveEnabled, setIsAddLocalDrivesEnabled, setIsAddPublicDrivesEnabled, setIsAnalyticsDatabaseWorkerEnabled, setIsAnalyticsEnabled, setIsAnalyticsExternalProcessorsEnabled, setIsCloudDrivesEnabled, setIsDeleteCloudDrivesEnabled, setIsDeleteLocalDrivesEnabled, setIsDeletePublicDrivesEnabled, setIsDiffAnalyticsEnabled, setIsDocumentModelSelectionSettingsEnabled, setIsDragAndDropEnabled, setIsDriveAnalyticsEnabled, setIsEditorDebugModeEnabled, setIsEditorReadModeEnabled, setIsExternalControlsEnabled, setIsExternalPackagesEnabled, setIsExternalProcessorsEnabled, setIsExternalRelationalProcessorsEnabled, setIsLocalDrivesEnabled, setIsPublicDrivesEnabled, setIsRelationalProcessorsEnabled, setIsSentryTracingEnabled, setLoading, setLocalDrivesEnabled, setLogLevel, 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 };
|
|
3791
|
+
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, addBackendAuthEventHandler, 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, backendAuthStatusOf, 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, isBackendAuthError, 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, queriesUnknownArgument, queriesUnknownField, reactorGraphqlBatchFetchDocuments, reactorGraphqlCreateDocument, reactorGraphqlDeleteDocument, reactorGraphqlDeleteDocuments, reactorGraphqlFetchDocument, reactorGraphqlMutateDocument, readPromiseState, recordBackendAuthError, recordToSearch, refreshDrive, refreshDriveMembership, refreshReactorData, refreshReactorDataClient, renameDrive, renameDriveNode, resolveDocumentModelModule, resolveDriveRoute, resolveSearchUpdate, resolveUrlPathname, revisionMapFromRevisionsList, searchPackages, searchParamsToString, searchToRecord, setAllowList, setAllowedDocumentTypes, setAnalyticsDatabaseName, setAttachmentService, setBackendAuth, 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, useBackendAuth, 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 };
|
|
3140
3792
|
|
|
3141
3793
|
//# sourceMappingURL=index.js.map
|