@powerhousedao/reactor-browser 6.2.3-staging.0 → 6.3.0-dev.1
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-But1Xljo.d.ts → attachment-service-B-AmTrs2.d.ts} +605 -56
- package/dist/attachment-service-B-AmTrs2.d.ts.map +1 -0
- package/dist/auth-DRbzRdeC.d.ts +32 -0
- package/dist/auth-DRbzRdeC.d.ts.map +1 -0
- package/dist/{client-BiJAJ9dW.js → client-BFnMV-EO.js} +39 -22
- package/dist/client-BFnMV-EO.js.map +1 -0
- package/dist/{client-CngU4mtn.d.ts → client-BP0hXjqq.d.ts} +3 -2
- package/dist/client-BP0hXjqq.d.ts.map +1 -0
- package/dist/client-wwavHFfs.js +135 -0
- package/dist/client-wwavHFfs.js.map +1 -0
- package/dist/{dispatch-qRXS70fh.js → dispatch-Cylwl2Dk.js} +363 -44
- package/dist/dispatch-Cylwl2Dk.js.map +1 -0
- package/dist/{document-by-id-B_8DA4yZ.js → document-by-id-DdvqanGR.js} +2 -2
- package/dist/{document-by-id-B_8DA4yZ.js.map → document-by-id-DdvqanGR.js.map} +1 -1
- package/dist/document-model-modules-BG-61uke.js +710 -0
- package/dist/document-model-modules-BG-61uke.js.map +1 -0
- package/dist/{document-operations-Bt-1-ThH.js → document-operations-DRMMwmGZ.js} +2160 -181
- package/dist/document-operations-DRMMwmGZ.js.map +1 -0
- package/dist/global-iARBhxNI.d.ts +612 -0
- package/dist/global-iARBhxNI.d.ts.map +1 -0
- package/dist/{index-BABMK8cO.d.ts → index-CNS_9THu.d.ts} +14 -4
- package/dist/index-CNS_9THu.d.ts.map +1 -0
- package/dist/index.d.ts +560 -79
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +790 -317
- 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/{relational-ChC_AWAK.js → relational-DZuyKp2y.js} +65 -5
- package/dist/relational-DZuyKp2y.js.map +1 -0
- package/dist/{renown-C9pYZRqf.js → renown-B3MUaiq7.js} +56 -25
- package/dist/renown-B3MUaiq7.js.map +1 -0
- package/dist/renown-CBoTdGrg.js +394 -0
- package/dist/renown-CBoTdGrg.js.map +1 -0
- package/dist/{client-VV9M73s_.js → schema-B5lftDPf.js} +295 -195
- package/dist/schema-B5lftDPf.js.map +1 -0
- package/dist/{types-B7-_l_wE.d.ts → schema-C6ECceaN.d.ts} +272 -82
- package/dist/schema-C6ECceaN.d.ts.map +1 -0
- package/dist/src/ai/index.d.ts +269 -24
- package/dist/src/ai/index.d.ts.map +1 -1
- package/dist/src/ai/index.js +1028 -168
- package/dist/src/ai/index.js.map +1 -1
- package/dist/src/analytics/index.js +3 -3
- package/dist/src/graphql/client.d.ts +2 -2
- package/dist/src/graphql/client.js +1 -1
- package/dist/src/graphql-client/entry.d.ts +6 -4
- package/dist/src/graphql-client/entry.js +4 -4
- package/dist/src/relational/index.d.ts +8 -1
- 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 +2 -2
- package/dist/src/renown/index.js +3 -3
- package/dist/src/rpc/index.d.ts +201 -144
- package/dist/src/rpc/index.d.ts.map +1 -1
- package/dist/src/rpc/index.js +562 -634
- package/dist/src/rpc/index.js.map +1 -1
- package/dist/switchboard-directory-vH6qtkh-.js +435 -0
- package/dist/switchboard-directory-vH6qtkh-.js.map +1 -0
- package/dist/switchboards-D-_JBUbF.d.ts +75 -0
- package/dist/switchboards-D-_JBUbF.d.ts.map +1 -0
- package/dist/types-BWx6FPO4.d.ts +63 -0
- package/dist/types-BWx6FPO4.d.ts.map +1 -0
- package/package.json +19 -17
- package/dist/attachment-service-But1Xljo.d.ts.map +0 -1
- package/dist/client-BiJAJ9dW.js.map +0 -1
- package/dist/client-CngU4mtn.d.ts.map +0 -1
- package/dist/client-VV9M73s_.js.map +0 -1
- package/dist/dispatch-qRXS70fh.js.map +0 -1
- package/dist/document-model-modules-D6I-UUXq.js +0 -386
- package/dist/document-model-modules-D6I-UUXq.js.map +0 -1
- package/dist/document-operations-Bt-1-ThH.js.map +0 -1
- package/dist/global-fql2bmb0.d.ts +0 -438
- package/dist/global-fql2bmb0.d.ts.map +0 -1
- package/dist/index-BABMK8cO.d.ts.map +0 -1
- package/dist/inspector-proxy-DCowaeeH.d.ts +0 -264
- package/dist/inspector-proxy-DCowaeeH.d.ts.map +0 -1
- package/dist/make-ph-event-functions-FzpvQtj6.js +0 -53
- package/dist/make-ph-event-functions-FzpvQtj6.js.map +0 -1
- package/dist/relational-ChC_AWAK.js.map +0 -1
- package/dist/renown-C9pYZRqf.js.map +0 -1
- package/dist/renown-Def5iO8k.js +0 -97
- package/dist/renown-Def5iO8k.js.map +0 -1
- package/dist/switchboard-CFyD_5_e.js +0 -323
- package/dist/switchboard-CFyD_5_e.js.map +0 -1
- package/dist/types-B7-_l_wE.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,41 +1,25 @@
|
|
|
1
|
+
import { $ as createJobChangesSocket, $t as GetDocumentQueryFields, A as addDocumentCacheEventHandler, An as isDocumentTypeCache, At as GraphQLRequestOptions, B as DEFAULT_BREAKER, Bt as switchboardFetch, C as useModelRegistry, Cn as TrackedAction, Ct as GraphQLReactorClientOptions, D as useReactorHalves, Dn as IDLE_OPERATIONS_ENTRY, Dt as findIsServableOverGraphQL, E as useReactorClientModule, En as IDLE_DOCUMENTS_OF_TYPE_ENTRY, Et as createGraphQLDriveNodeSource, F as useDocuments, Ft as subgraphUrlFromGraphqlUrl, G as SwitchboardUnreachableError, Gt as GraphQLWrongBackendError, H as SwitchboardBackend, Ht as withStreamedBodies, I as useGetDocument, It as GraphQLFetch, J as DocumentChangesEventPayload, Jt as queriesUnknownField, K as createSwitchboardBackend, Kt as JobFailedError, L as useGetDocumentAsync, Lt as globalFetch, M as useDocument, Mn as readPromiseState, Mt as SubgraphSdkRegistry, N as useDocumentCache, Nn as IDLE_REFETCH_STATE, Nt as TypedGraphQLDocument, O as useSync, On as IDocumentCacheReader, Ot as isGraphQLReactorClient, P as useDocumentSafe, Pn as dispatchActions, Pt as describeGraphQLDocument, Q as JobChangesSocketOptions, Qt as toLegacyNode, R as useGetDocuments, Rt as isDeadlineError, S as useDatabase, Sn as SyncStatus, St as GraphQLReactorClient, T as useReactorClient, Tn as GET_MANY_CHUNK_SIZE, Tt as ambientRenownSigner, U as SwitchboardBackendDescriptor, Ut as BatchJobFailedError, V as DEFAULT_REQUEST_TIMEOUT_MS, Vt as withRequestDeadline, W as SwitchboardBreaker, Wt as GraphQLOperationNotSupportedError, X as IJobChangesSocket, Xt as GraphQLDriveNodeSource, Y as DocumentChangesSubscriptionOptions, Yt as DriveNodeQueries, Z as JobChangesEventPayload, Zt as GraphQLDriveReadClient, _ as addReactorHalvesEventHandler, _n as RemoteControllerOptions, _t as GraphQLReactorProvider, a as DocumentOperationsState, an as revisionMapFromRevisionsList, at as packageFromDocumentModels, b as setReactorClient, bn as RemoteOperation, bt as useSwitchboardClient, c as useDocumentModelModuleById, cn as DocumentChangeListener, ct as signStampedAction, d as UseDispatchResult, dn as GetOperationsResult, dt as GetDocumentAtConsistencyResult, en as GetDocumentQueryResult, et as isAuthRefusalClose, f as createDispatch, fn as IRemoteClient, ft as GetDocumentAtConsistencyVariables, g as addReactorClientModuleEventHandler, gn as RemoteControllerGraphQLClient, gt as ReactorOperationFieldsFragmentDoc, h as addReactorClientEventHandler, hn as PushResult, ht as MutateDocumentWithOperationsVariables, i as DocumentOperationsResult, in as phDocumentFromMutation, it as StaticPackageManager, j as setDocumentCache, jn as isOperationCache, jt as SubgraphSdkFactory, k as useSyncList, kn as addPromiseState, kt as viewFilterInputFromViewFilter, l as useDocumentModelModules, ln as GetDocumentResult, lt as stampAction, m as addFullReactorClientEventHandler, mn as MergeHandler, mt as MutateDocumentWithOperationsResult, n as setAttachmentService, nn as isoStringFromDateTime, nt as startDocumentChangesSubscription, o as UseDocumentOperationsOptions, on as ConflictInfo, ot as resolveDocumentModelModule, p as useDispatch, pn as IRemoteController, pt as MutateDocumentWithOperationsDocument, q as ConnectionParams, qt as queriesUnknownArgument, r as useAttachmentService, rn as phDocumentFromGetDocument, rt as subscriptionsUrlFromGraphqlUrl, s as useDocumentOperations, sn as ConflictStrategy, st as prepareSignedActions, t as addAttachmentServiceEventHandler, tn as RevisionsListSelection, tt as makeAuthConnectionParams, u as DispatchFn, un as GetDocumentWithOperationsResult, ut as GetDocumentAtConsistencyDocument, v as getFullReactorClient, vn as RemoteDocumentChangeEvent, vt as GraphQLReactorProviderProps, w as usePGlite, wn as DocumentCache, wt as GraphQLReactorReadClient, x as setReactorClientModule, xn as RemoteOperationResultPage, xt as DriveIdCall, y as setFullReactorClient, yn as RemoteDocumentData, yt as ensurePHEventHandlers, z as DEFAULT_BATCH_REQUEST_TIMEOUT_MS, zt as isNodeFetch } from "./attachment-service-B-AmTrs2.js";
|
|
2
|
+
import { d as MutateDocumentMutation, h as PropagationMode, i as DeleteDocumentsMutation, l as GetDocumentWithOperationsQuery, n as CreateDocumentMutation, o as FindDocumentsQuery, r as DeleteDocumentMutation, t as ActionInput, v as SdkFunctionWrapper } from "./schema-C6ECceaN.js";
|
|
3
|
+
import { n as ambientRenownTokenProvider, r as makeAuthMiddleware, t as BearerTokenProvider } from "./auth-DRbzRdeC.js";
|
|
1
4
|
import { a as getAnalyticsStore, i as createAnalyticsStore, n as IPowerhouseAnalytics, r as CreateStoreOptions } from "./types-520nWrB3.js";
|
|
2
|
-
import { $ as
|
|
3
|
-
import {
|
|
5
|
+
import { $ as IPackageManager, A as loadDriveNodes, At as PHGlobalConfigKey, B as createPHStore, Bt as FulfilledPromise, C as DriveNodesCache, Ct as PHDocumentEditorConfigHooks, D as dropDriveNode, Dt as PHGlobalConfig, E as addDriveNodesEventHandler, Et as PHDrivesGlobalConfig, F as useDriveNodes, Ft as PHRenownGlobalConfig, G as notifyPHStore, Gt as PromiseState, H as getActivePHStore, Ht as IDocumentTypeCache, I as useDriveNodesCache, It as PHSentryGlobalConfig, J as DraggingNode, K as subscribePHStore, Kt as PromiseWithState, L as PHStore, Lt as DocumentDispatch, M as peekDriveNode, Mt as PHGlobalConfigSettersForKey, N as takeLocalDriveWrite, Nt as PHProcessorsGlobalConfig, O as getDriveNode, Ot as PHGlobalConfigHooks, P as useDriveNode, Pt as PHRelationalProcessorsGlobalConfig, Q as IPackageListerUnsubscribe, R as PHStoreProvider, Rt as DocumentRefetchState, S as WorkerReactorModule, St as PHDocumentEditorConfig, T as DriveNodesOptions, Tt as PHDocumentEditorConfigSetters, U as getPHStore, Ut as IOperationCache, V as ensurePHStore, Vt as IDocumentCache, W as getPHStoreSubscribe, Wt as OperationsCacheEntry, X as useDragNode, Y as addDraggingNodeEventHandler, Z as useDropNode, _ as SetEvent, _t as PHAppConfig, a as LOADING, at as TimelineBarItem, b as UsePHGlobalValue, bt as PHAppConfigSetters, c as PHGlobalEventHandlerAdders, ct as DiscoveryEvent, d as PHNavigateOptions, dt as FailedInstallationReason, et as IPackagesListener, f as PHNavigation, ft as IPackageDiscoveryService, g as SearchParamsUpdate, gt as PHAnalyticsGlobalConfig, h as PHSettingsTarget, ht as FullPHGlobalConfig, i as BrowserReactorModule, it as PHToastType, j as markLocalDriveWrite, jt as PHGlobalConfigSetters, k as invalidateDriveNodes, kt as PHGlobalConfigHooksForKey, l as PHGlobalKey, lt as DiscoveryEventListener, m as PHSearchUpdate, mt as PHModal, n as BackendAuthState, nt as PHToastFn, o as PHDriveTarget, ot as TimelineDividerItem, p as PHNavigationTarget, pt as PendingInstallation, q as usePHStore, qt as RejectedPromise, r as BrowserReactorClientModule, rt as PHToastOptions, s as PHGlobal, st as TimelineItem, t as AddPHGlobalEventHandler, tt as PackageManagerInstallResult, u as PHGlobalValue, ut as FailedInstallation, v as SetPHGlobalValue, vt as PHAppConfigHooks, w as DriveNodesEntry, wt as PHDocumentEditorConfigKey, x as WorkerReactorClientModule, xt as PHCommonGlobalConfig, y as SetSearchParams, yt as PHAppConfigKey, z as bindPHStoreToWindow, zt as DocumentsOfTypeEntry } from "./global-iARBhxNI.js";
|
|
6
|
+
import { a as IReactorBrowserReadClient, i as IReactorBrowserClient, n as SwitchboardEntry, o as IReactorBrowserWriteClient, r as SwitchboardWorkflows, s as ReactorBrowserHalves, t as SwitchboardDirectory } from "./switchboards-D-_JBUbF.js";
|
|
4
7
|
import { baseDocumentModels, baseDocumentModelsMap } from "./src/document-model.js";
|
|
5
8
|
import { t as PGlite } from "./pglite-CntadC_p-DTkdF8sr.js";
|
|
6
9
|
import { r as PGliteWithLive } from "./index-rtDmzViP.js";
|
|
7
|
-
import {
|
|
8
|
-
import { t as createClient } from "./client-
|
|
9
|
-
import { $ as
|
|
10
|
-
import { QueryCallbackReturnType, RelationalDbWithLive, createProcessorQuery, useRelationalDb, useRelationalQuery, useRelationalQueryOptions } from "./src/relational/index.js";
|
|
10
|
+
import { a as GraphQLDocumentEvents, c as ReactorGraphQLClient, d as DEFAULT_DRIVE_ID, f as DEFAULT_SWITCHBOARD_URL, h as graphqlEventsToSyncDrive, i as GraphQLDocumentEventOperationName, l as RunDocumentOptions, m as graphqlDocumentsEvents, n as GraphQLClientDocumentsEvent, o as GraphQLDocumentEventsOperationName, p as graphqlDocumentEvents, r as GraphQLClientWindowEvents, s as GraphQLDocumentsEvents, t as GraphQLClientDocumentEvent, u as TStateSchemaZodObject } from "./types-BWx6FPO4.js";
|
|
11
|
+
import { t as createClient } from "./client-BP0hXjqq.js";
|
|
12
|
+
import { $ as setRenown, A as DOMAIN_TYPE, B as CopyIcon, C as RenownInitialUserProvider, D as CREDENTIAL_SCHEMA_EIP712_TYPE, E as useRenownInitialUser, F as RENOWN_URL, G as RenownUserButton, H as RenownLogo, I as VERIFIABLE_CREDENTIAL_EIP712_TYPE, J as RenownLoginButton, K as RenownUserButtonMenuItem, L as initConnectCrypto, M as RENOWN_CHAIN_ID, N as RENOWN_NETWORK_ID, O as CREDENTIAL_SUBJECT_TYPE, P as RENOWN_RETURN_URL_STRIPPED_PARAMS, Q as addRenownEventHandler, R as initRenownCrypto, S as RenownInitialAuth, T as useRenownInitialAuth, U as SpinnerIcon, V as DisconnectIcon, W as UserIcon, X as RenownAuthButton, Y as RenownLoginButtonProps, Z as RenownAuthButtonProps, _ as RenownSessionCookieState, a as useRenownWalletAdapter, at as desktopShell, b as RENOWN_INITIAL_ANONYMOUS, c as RenownWalletProvider, ct as openRenown, d as RenownProviderProps, dt as RenownAuthResolution, et as useDid, f as Renown, ft as RenownAuthStatus, g as RenownSessionCookieOptions, h as useRenownInit, i as decodeDelegation, it as DesktopShell, j as ISSUER_TYPE, k as CREDENTIAL_TYPES, l as RenownWalletProviderProps, lt as RenownAuth, m as RenownInitOptions, mt as useRenownAuthAsync, n as DelegationScope, nt as useRenown, o as RenownLoginMethod, ot as login, p as RenownProps, pt as useRenownAuth, q as RenownUserButtonProps, r as createDelegation, rt as useUser, s as useRenownLoginMethods, st as logout, t as DelegationClaims, tt as useLoginStatus, u as RenownProvider, ut as RenownAuthAsync, v as useRenownSessionCookie, w as RenownInitialUserProviderProps, x as RENOWN_INITIAL_UNKNOWN, y as useRenownSessionSynced, z as ChevronDownIcon } from "./index-CNS_9THu.js";
|
|
13
|
+
import { QueryCallbackReturnType, RelationalDbOptions, RelationalDbWithLive, createProcessorQuery, useRelationalDb, useRelationalQuery, useRelationalQueryOptions } from "./src/relational/index.js";
|
|
14
|
+
import { DragEventHandler, MouseEvent, ReactNode } from "react";
|
|
11
15
|
import { DocumentModelLib, DocumentModelModule, EditorModule, PHDocument, PHDocumentController } from "document-model";
|
|
12
|
-
import {
|
|
16
|
+
import { Action as Action$1, AuthSubject, DocumentDispatch as DocumentDispatch$1, DocumentModelModule as DocumentModelModule$1, DocumentOperations, Operation as Operation$1, PHBaseState, PHDocument as PHDocument$1, PHDocumentHeader, SignaturePolicy, SubgraphModule, ValidationError } from "@powerhousedao/shared/document-model";
|
|
17
|
+
import { ActionCandidate, ChannelScheme, ConnectionState, ConnectionStateSnapshot, ConnectionStateSnapshot as ConnectionStateSnapshot$1, Database, DocumentChangeEvent, DocumentChangeType, DocumentIntegrityService, DriveCollectionId, Evaluation, GqlRequestChannel, IChannel, IDocumentModelLoader, IDocumentModelRegistry, IDriveReadClient, IPeerAgreement, IProcessor, IProcessorHostModuleBase, IQueue, IReactorClient, IReactorProcessorHostModuleBase, IReactorReadClient, IReactorReadClient as IReactorReadClient$1, IReactorWriteClient, IRelationalDb, ISyncManager, InMemoryQueue, IntervalPollTimer, Job, JwtHandler, KeyframeValidationIssue, OperationWithContext, ParsedDriveUrl, PollBehavior, PollBehavior as PollBehavior$1, ProcessorApp, ProcessorFactory, ProcessorFactoryBuilder as ProcessorFactoryBuilder$1, ProcessorFilter, ProcessorRecord, REACTOR_SCHEMA, ReactorBuilder, ReactorClientBuilder, ReactorFeatureFlags, RebuildResult, RelationalDbProcessor, Remote, RemoteFilter, RemoteMeta, RemotePeer, SignerConfig, SnapshotValidationIssue, SyncHold, SyncOperation, SyncOperationStatus, ValidationResult, WriteHandle, WriteReceipt, driveIdFromUrl, isDriveAuthError, parseDriveUrl } from "@powerhousedao/reactor";
|
|
13
18
|
import { DocumentDriveAction, DocumentDriveDocument, DriveInput, FileNode, FolderNode, Node, SharingType } from "@powerhousedao/shared/document-drive";
|
|
14
|
-
import { Action as Action$1, AuthSubject, DocumentOperations, Operation as Operation$1, PHBaseState, PHDocument as PHDocument$1, PHDocumentHeader, SubgraphModule, ValidationError } from "@powerhousedao/shared/document-model";
|
|
15
|
-
import { DragEventHandler } from "react";
|
|
16
19
|
import { AttachmentDownloadInput, AttachmentHeader, AttachmentUploadResult, IAttachmentClient, PreprocessResult } from "@powerhousedao/reactor-attachments/client";
|
|
17
|
-
import {
|
|
20
|
+
import { AddPHGlobalEventHandler as AddPHGlobalEventHandler$1, ConflictResolution as ConflictResolution$1, DocumentDispatch as DocumentDispatch$2, FileUploadProgressCallback as FileUploadProgressCallback$1, PHAppConfig as PHAppConfig$1, PHAppConfigHooks as PHAppConfigHooks$1, PHAppConfigKey as PHAppConfigKey$1, PHAppConfigSetters as PHAppConfigSetters$1, PHDocumentEditorConfig as PHDocumentEditorConfig$1, PHDocumentEditorConfigHooks as PHDocumentEditorConfigHooks$1, PHDocumentEditorConfigKey as PHDocumentEditorConfigKey$1, PHDocumentEditorConfigSetters as PHDocumentEditorConfigSetters$1, PHGlobal as PHGlobal$1, PHGlobalConfig as PHGlobalConfig$1, PHGlobalConfigHooks as PHGlobalConfigHooks$1, PHGlobalConfigKey as PHGlobalConfigKey$1, PHGlobalConfigSetters as PHGlobalConfigSetters$1, PHGlobalKey as PHGlobalKey$1, PHModal as PHModal$1, PHNavigateOptions as PHNavigateOptions$1, PHNavigation as PHNavigation$1, PHNavigationTarget as PHNavigationTarget$1, PHSearchUpdate as PHSearchUpdate$1, PHSettingsTarget as PHSettingsTarget$1, SearchParamsUpdate as SearchParamsUpdate$1, SetPHGlobalValue as SetPHGlobalValue$1, SetSearchParams as SetSearchParams$1, SwitchboardDirectory as SwitchboardDirectory$1, UsePHGlobalValue as UsePHGlobalValue$1 } from "@powerhousedao/reactor-browser";
|
|
18
21
|
import { Node as Node$1 } from "@powerhousedao/shared";
|
|
19
22
|
import { PackageInfo, PackagePage } from "@powerhousedao/shared/registry";
|
|
20
|
-
//#region src/actions/dispatch.d.ts
|
|
21
|
-
/**
|
|
22
|
-
* Dispatches actions to a document.
|
|
23
|
-
* @param actionOrActions - The action or actions to dispatch.
|
|
24
|
-
* @param document - The document to dispatch actions to.
|
|
25
|
-
* @param onErrors - Callback invoked with any errors that occurred during action execution,
|
|
26
|
-
* or with why nothing was dispatched.
|
|
27
|
-
* @returns The updated document, or undefined if the dispatch failed.
|
|
28
|
-
*/
|
|
29
|
-
export declare function dispatchActions<TDocument = PHDocument$1, TAction = Action$1>(actionOrActions: TAction[] | TAction | undefined, document: TDocument | undefined, onErrors?: (errors: Error[]) => void, onSuccess?: (result: PHDocument$1) => void): Promise<PHDocument$1 | undefined>;
|
|
30
|
-
/**
|
|
31
|
-
* Dispatches actions to a document.
|
|
32
|
-
* @param actionOrActions - The action or actions to dispatch.
|
|
33
|
-
* @param documentId - The ID of the document to dispatch actions to.
|
|
34
|
-
* @param onErrors - Callback invoked with any errors that occurred during action execution.
|
|
35
|
-
* @returns The updated document, or undefined if the dispatch failed.
|
|
36
|
-
*/
|
|
37
|
-
export declare function dispatchActions(actionOrActions: Action$1[] | Action$1 | undefined, documentId: string, onErrors?: (errors: Error[]) => void, onSuccess?: (result: PHDocument$1) => void): Promise<PHDocument$1 | undefined>;
|
|
38
|
-
//#endregion
|
|
39
23
|
//#region src/actions/drive-info.d.ts
|
|
40
24
|
/**
|
|
41
25
|
* The drive info endpoint's response: `GET <switchboard>/d/:drive`.
|
|
@@ -71,7 +55,7 @@ type DriveInfo = {
|
|
|
71
55
|
* `isDriveAuthError` can tell a refusal from an unreachable host and the
|
|
72
56
|
* caller can prompt for a login instead of reporting a network fault.
|
|
73
57
|
*/
|
|
74
|
-
export declare function fetchDriveInfo(url: string): Promise<DriveInfo>;
|
|
58
|
+
export declare function fetchDriveInfo(url: string, tokenProvider?: BearerTokenProvider): Promise<DriveInfo>;
|
|
75
59
|
//#endregion
|
|
76
60
|
//#region src/actions/document.d.ts
|
|
77
61
|
export declare function getDocumentExtension(document: PHDocument$1): Promise<string>;
|
|
@@ -167,7 +151,7 @@ type AddRemoteDriveOptions = {
|
|
|
167
151
|
* reactor client. Subscribes to Created events filtered by id and
|
|
168
152
|
* short-circuits if the document already exists.
|
|
169
153
|
*/
|
|
170
|
-
export declare function waitForDocumentReady(reactorClient:
|
|
154
|
+
export declare function waitForDocumentReady(reactorClient: IReactorReadClient$1, documentId: string, options?: {
|
|
171
155
|
timeoutMs?: number;
|
|
172
156
|
signal?: AbortSignal;
|
|
173
157
|
}): Promise<void>;
|
|
@@ -205,6 +189,21 @@ export declare class DocumentTypeMismatchError extends Error {
|
|
|
205
189
|
export declare class NoSelectedDocumentError extends Error {
|
|
206
190
|
constructor();
|
|
207
191
|
}
|
|
192
|
+
/** A dispatched action the document did not apply: its operation is stored at `index`, state
|
|
193
|
+
* unchanged, because the reducer threw (`reducer-error`) or the write was denied (`denied`). */
|
|
194
|
+
export declare class OperationRejectedError extends Error {
|
|
195
|
+
readonly documentId: string;
|
|
196
|
+
readonly scope: string;
|
|
197
|
+
readonly name = "OperationRejectedError";
|
|
198
|
+
readonly actionId: string;
|
|
199
|
+
readonly actionType: string;
|
|
200
|
+
readonly index: number;
|
|
201
|
+
readonly kind: "reducer-error" | "denied";
|
|
202
|
+
private constructor();
|
|
203
|
+
/** The rejection `operation` records, or undefined when it applied. */
|
|
204
|
+
static fromOperation(documentId: string, scope: string, operation: Operation$1): OperationRejectedError | undefined;
|
|
205
|
+
static isError(error: unknown): error is OperationRejectedError;
|
|
206
|
+
}
|
|
208
207
|
//#endregion
|
|
209
208
|
//#region src/global/types.d.ts
|
|
210
209
|
interface PGliteState$1 {
|
|
@@ -267,6 +266,8 @@ export declare function reactorGraphqlMutateDocument(documentIdentifier: string,
|
|
|
267
266
|
export declare const commonGlobalEventHandlerFunctions: {
|
|
268
267
|
loading: () => void;
|
|
269
268
|
drives: () => void;
|
|
269
|
+
backendAuth: () => void;
|
|
270
|
+
driveNodes: () => void;
|
|
270
271
|
selectedDriveId: () => void;
|
|
271
272
|
selectedNodeId: () => void;
|
|
272
273
|
documentCache: () => void;
|
|
@@ -317,7 +318,27 @@ export declare const useRenownUrl: () => string | undefined, setRenownUrl: (valu
|
|
|
317
318
|
export declare const useRenownNetworkId: () => string | undefined, setRenownNetworkId: (value: string | undefined) => void, addRenownNetworkIdEventHandler: () => void;
|
|
318
319
|
export declare const useRenownChainId: () => number | undefined, setRenownChainId: (value: number | undefined) => void, addRenownChainIdEventHandler: () => void;
|
|
319
320
|
export declare const useSwitchboardUrl: () => string | undefined, setSwitchboardUrl: (value: string | undefined) => void, addSwitchboardUrlEventHandler: () => void;
|
|
320
|
-
export declare const useRenownAdapters: () =>
|
|
321
|
+
export declare const useRenownAdapters: () => {
|
|
322
|
+
rainbow?: {
|
|
323
|
+
walletConnectProjectId?: string | undefined;
|
|
324
|
+
infuraProjectId?: string | undefined;
|
|
325
|
+
} | undefined;
|
|
326
|
+
privy?: {
|
|
327
|
+
appId?: string | undefined;
|
|
328
|
+
clientId?: string | undefined;
|
|
329
|
+
methods?: string[] | undefined;
|
|
330
|
+
} | undefined;
|
|
331
|
+
} | undefined, setRenownAdapters: (value: {
|
|
332
|
+
rainbow?: {
|
|
333
|
+
walletConnectProjectId?: string | undefined;
|
|
334
|
+
infuraProjectId?: string | undefined;
|
|
335
|
+
} | undefined;
|
|
336
|
+
privy?: {
|
|
337
|
+
appId?: string | undefined;
|
|
338
|
+
clientId?: string | undefined;
|
|
339
|
+
methods?: string[] | undefined;
|
|
340
|
+
} | undefined;
|
|
341
|
+
} | undefined) => void, addRenownAdaptersEventHandler: () => void;
|
|
321
342
|
export declare const useSentryRelease: () => string | undefined, setSentryRelease: (value: string | undefined) => void, addSentryReleaseEventHandler: () => void;
|
|
322
343
|
export declare const useSentryDsn: () => string | undefined, setSentryDsn: (value: string | undefined) => void, addSentryDsnEventHandler: () => void;
|
|
323
344
|
export declare const useSentryEnv: () => string | undefined, setSentryEnv: (value: string | undefined) => void, addSentryEnvEventHandler: () => void;
|
|
@@ -386,6 +407,8 @@ export declare const isExternalControlsEnabledEventFunctions: {
|
|
|
386
407
|
useValue: () => boolean | undefined;
|
|
387
408
|
setValue: (value: boolean | undefined) => void;
|
|
388
409
|
addEventHandler: () => void;
|
|
410
|
+
subscribeToValue: (onStoreChange: () => void) => () => void;
|
|
411
|
+
getSnapshot: () => boolean | undefined;
|
|
389
412
|
};
|
|
390
413
|
/** Sets whether external controls are enabled for a given editor. */
|
|
391
414
|
export declare const setIsExternalControlsEnabled: (value: boolean | undefined) => void;
|
|
@@ -403,7 +426,7 @@ export declare const addIsDragAndDropEnabledEventHandler: () => void;
|
|
|
403
426
|
export declare const setAllowedDocumentTypes: (value: string[] | undefined) => void;
|
|
404
427
|
/** Defines the document types a drive supports.
|
|
405
428
|
*
|
|
406
|
-
*
|
|
429
|
+
* Unset or empty, it means every document type registered in the reactor.
|
|
407
430
|
*/
|
|
408
431
|
export declare function useAllowedDocumentTypes(): string[] | undefined;
|
|
409
432
|
/** Adds an event handler for when the allowed document types for a given app changes. */
|
|
@@ -494,15 +517,61 @@ export declare function useDocumentById(id: string | null | undefined): UseDispa
|
|
|
494
517
|
/** Returns documents by ids. */
|
|
495
518
|
export declare function useDocumentsByIds(ids: string[] | null | undefined): PHDocument$1[];
|
|
496
519
|
//#endregion
|
|
520
|
+
//#region src/hooks/link-props.d.ts
|
|
521
|
+
type ClickLike = Pick<MouseEvent, "button" | "metaKey" | "ctrlKey" | "shiftKey" | "altKey" | "defaultPrevented" | "preventDefault">;
|
|
522
|
+
/** A plain primary click; modified and other-button clicks stay the browser's. */
|
|
523
|
+
export declare function isPlainClick(event: ClickLike): boolean;
|
|
524
|
+
export type LinkProps = {
|
|
525
|
+
href: string;
|
|
526
|
+
onClick: (event: ClickLike) => void;
|
|
527
|
+
onMouseEnter: () => void;
|
|
528
|
+
onFocus: () => void;
|
|
529
|
+
"aria-current"?: "page";
|
|
530
|
+
};
|
|
531
|
+
/** Props for an `<a>` that opens `target` in the app on a plain click, and
|
|
532
|
+
* leaves new tabs and windows to the browser; acts on the store in context. */
|
|
533
|
+
export declare function useLinkProps(target: PHNavigationTarget$1 | undefined, open?: () => void): LinkProps;
|
|
534
|
+
//#endregion
|
|
535
|
+
//#region src/hooks/document-link.d.ts
|
|
536
|
+
/** Where a document opens: the loaded drive that lists it, or undefined while none does. */
|
|
537
|
+
export declare function useDocumentTarget(documentId: string | null | undefined): PHDriveTarget | undefined;
|
|
538
|
+
/** `useLinkProps` for a document by id, e.g. a `useDocumentsOfType` row;
|
|
539
|
+
* undefined while no loaded drive lists it. */
|
|
540
|
+
export declare function useDocumentLinkProps(documentId: string | null | undefined): LinkProps | undefined;
|
|
541
|
+
//#endregion
|
|
542
|
+
//#region src/hooks/documents-of-type.d.ts
|
|
543
|
+
export type DocumentsOfTypeOptions = {
|
|
544
|
+
/** Documents per page; 25 by default. */
|
|
545
|
+
limit?: number;
|
|
546
|
+
};
|
|
547
|
+
export type DocumentsOfType<TState extends PHBaseState> = {
|
|
548
|
+
/** The loaded pages' documents that pass the module's schema. */
|
|
549
|
+
documents: PHDocument$1<TState>[];
|
|
550
|
+
/** Documents of the type that fail it, e.g. written by another version of the model. */
|
|
551
|
+
invalid: PHDocument$1[];
|
|
552
|
+
hasNextPage: boolean;
|
|
553
|
+
isLoadingNextPage: boolean;
|
|
554
|
+
/** Loads the next page; does nothing while one loads or when there is none. */
|
|
555
|
+
loadNextPage: () => void;
|
|
556
|
+
/** The last failure loading a further page; a failed first page throws. */
|
|
557
|
+
error: unknown;
|
|
558
|
+
};
|
|
559
|
+
type ModelOf = Pick<DocumentModelModule$1, "documentModel">;
|
|
560
|
+
/** The documents of `module`'s type across every drive, a page at a time and
|
|
561
|
+
* checked against its schema; suspends until the first page has loaded. */
|
|
562
|
+
export declare function useDocumentsOfType<TState extends PHBaseState>(module: DocumentModelModule$1<TState>, { limit }?: DocumentsOfTypeOptions): DocumentsOfType<TState>;
|
|
563
|
+
/** Loads the first page `useDocumentsOfType` reads, e.g. in a route loader, so it doesn't suspend. */
|
|
564
|
+
export declare function loadDocumentsOfType(module: ModelOf, { limit }?: DocumentsOfTypeOptions): Promise<void>;
|
|
565
|
+
//#endregion
|
|
497
566
|
//#region src/hooks/document-of-type.d.ts
|
|
498
567
|
/** Returns a document of a specific type, throws an error if the found document has a different type */
|
|
499
|
-
export declare function useDocumentOfType<TDocument extends PHDocument$1, TAction extends Action$1>(documentId: string | null | undefined, documentType: string | null | undefined): never[] | [TDocument, DocumentDispatch$
|
|
568
|
+
export declare function useDocumentOfType<TDocument extends PHDocument$1, TAction extends Action$1>(documentId: string | null | undefined, documentType: string | null | undefined): never[] | [TDocument, DocumentDispatch$2<TAction>];
|
|
500
569
|
//#endregion
|
|
501
570
|
//#region src/hooks/document-types.d.ts
|
|
502
571
|
/** Returns the document types a app supports.
|
|
503
572
|
*
|
|
504
|
-
*
|
|
505
|
-
*
|
|
573
|
+
* Uses the `allowedDocumentTypes` config value when it lists any types.
|
|
574
|
+
* Unset or empty, it means every type, so the reactor's supported types are used.
|
|
506
575
|
*/
|
|
507
576
|
export declare function useDocumentTypes(): string[] | undefined;
|
|
508
577
|
//#endregion
|
|
@@ -545,6 +614,41 @@ export declare function useDownloadFolder(folderNode?: FolderNode): () => Promis
|
|
|
545
614
|
//#region src/hooks/drive-by-id.d.ts
|
|
546
615
|
export declare function useDriveById(driveId: string | undefined | null): [DocumentDriveDocument, DocumentDispatch<DocumentDriveAction>];
|
|
547
616
|
//#endregion
|
|
617
|
+
//#region src/hooks/drive-context.d.ts
|
|
618
|
+
/** The drive a drive app shows. `open`/`preload` replace the app's navigation,
|
|
619
|
+
* e.g. for a host that keeps the open node in local state. */
|
|
620
|
+
export type DriveContextValue = {
|
|
621
|
+
drive: DocumentDriveDocument;
|
|
622
|
+
dispatch: DocumentDispatch$1<DocumentDriveAction>;
|
|
623
|
+
/** The open folder; undefined at the drive's root or on a document. */
|
|
624
|
+
folder?: FolderNode;
|
|
625
|
+
/** The open node, a folder or a document. */
|
|
626
|
+
nodeId?: string;
|
|
627
|
+
open?: (node: Node | undefined, options?: PHNavigateOptions) => void;
|
|
628
|
+
preload?: (node: Node | undefined) => void;
|
|
629
|
+
};
|
|
630
|
+
/** Hosts render a drive app inside this; `useSelectedDrive`, `useSelectedNode`
|
|
631
|
+
* and `useSelectedFolder` below read it, and opening nodes calls its `open`. */
|
|
632
|
+
export declare function DriveProvider(props: {
|
|
633
|
+
value: DriveContextValue;
|
|
634
|
+
children: ReactNode;
|
|
635
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
636
|
+
/** The nearest drive app's drive, or undefined outside one. */
|
|
637
|
+
export declare function useDriveContext(): DriveContextValue | undefined;
|
|
638
|
+
//#endregion
|
|
639
|
+
//#region src/hooks/editor-context.d.ts
|
|
640
|
+
/** The document an editor is rendered with, and a dispatch bound to it. */
|
|
641
|
+
export type EditorDocumentContextValue = readonly [PHDocument$1, DocumentDispatch$1];
|
|
642
|
+
/** Hosts render an editor inside this, with the same `document` and `dispatch`
|
|
643
|
+
* as its props; `useSelected*Document` hooks below read them. */
|
|
644
|
+
export declare function EditorDocumentProvider(props: {
|
|
645
|
+
document: PHDocument$1;
|
|
646
|
+
dispatch: DocumentDispatch$1;
|
|
647
|
+
children: ReactNode;
|
|
648
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
649
|
+
/** The nearest editor's document and dispatch, or undefined outside one. */
|
|
650
|
+
export declare function useEditorDocumentContext(): EditorDocumentContextValue | undefined;
|
|
651
|
+
//#endregion
|
|
548
652
|
//#region src/hooks/editor-modules.d.ts
|
|
549
653
|
export declare function useEditorModules(): EditorModule[] | undefined;
|
|
550
654
|
export declare function useAppModules(): EditorModule[] | undefined;
|
|
@@ -553,6 +657,9 @@ export declare function useAppModuleById(id: string | null | undefined): EditorM
|
|
|
553
657
|
export declare function useDefaultAppModule(): EditorModule | undefined;
|
|
554
658
|
export declare function useEditorModuleById(id: string | null | undefined): EditorModule | undefined;
|
|
555
659
|
export declare function useEditorModulesForDocumentType(documentType: string | null | undefined): EditorModule[] | undefined;
|
|
660
|
+
/** The editor for `document`: its preferred editor if that edits its type,
|
|
661
|
+
* else the first editor for its type. */
|
|
662
|
+
export declare function useEditorModuleFor(document: PHDocument$1 | null | undefined): EditorModule | undefined;
|
|
556
663
|
//#endregion
|
|
557
664
|
//#region src/hooks/use-editor-preloader.d.ts
|
|
558
665
|
export declare function useEditorPreloader(): void;
|
|
@@ -585,7 +692,7 @@ export declare function useInitReactorGraphqlClient(switchboardUrl?: "http://loc
|
|
|
585
692
|
//#endregion
|
|
586
693
|
//#region src/hooks/items-in-selected-drive.d.ts
|
|
587
694
|
/** Returns the nodes in the selected drive. */
|
|
588
|
-
export declare function useNodesInSelectedDrive():
|
|
695
|
+
export declare function useNodesInSelectedDrive(): Node[] | undefined;
|
|
589
696
|
/** Returns the file nodes in the selected drive. */
|
|
590
697
|
export declare function useFileNodesInSelectedDrive(): FileNode[] | undefined;
|
|
591
698
|
/** Returns the folder nodes in the selected drive. */
|
|
@@ -606,10 +713,15 @@ export declare function useFolderNodesInSelectedFolder(): FolderNode[] | undefin
|
|
|
606
713
|
export declare function useDocumentsInSelectedFolder(): PHDocument$1[] | undefined;
|
|
607
714
|
//#endregion
|
|
608
715
|
//#region src/hooks/make-ph-event-functions.d.ts
|
|
716
|
+
/** Calls `onChange` whenever `key` is set: through the bound store, or the
|
|
717
|
+
* `ph:<key>Updated` event on pages that bound none. */
|
|
718
|
+
export declare function subscribeToPHValue(key: PHGlobalKey$1, onChange: () => void): () => void;
|
|
609
719
|
export declare function makePHEventFunctions<TKey extends PHGlobalKey$1>(key: TKey): {
|
|
610
720
|
useValue: () => PHGlobal$1[TKey] | undefined;
|
|
611
721
|
setValue: (value: PHGlobal$1[TKey] | undefined) => void;
|
|
612
722
|
addEventHandler: () => void;
|
|
723
|
+
subscribeToValue: (onStoreChange: () => void) => () => void;
|
|
724
|
+
getSnapshot: () => PHGlobal$1[TKey] | undefined;
|
|
613
725
|
};
|
|
614
726
|
//#endregion
|
|
615
727
|
//#region src/hooks/modals.d.ts
|
|
@@ -619,10 +731,27 @@ export declare const usePHModal: () => PHModal$1 | undefined;
|
|
|
619
731
|
export declare const setPHModal: (value: PHModal$1 | undefined) => void;
|
|
620
732
|
/** Adds an event handler for the modal */
|
|
621
733
|
export declare const addModalEventHandler: () => void;
|
|
622
|
-
/**
|
|
734
|
+
/** The query param that names a routed modal. */
|
|
735
|
+
export declare const MODAL_SEARCH_PARAM = "modal";
|
|
736
|
+
/** Whether `modal` lives in the URL rather than the store. */
|
|
737
|
+
export declare function isRoutedModal(modal: PHModal$1 | undefined): boolean;
|
|
738
|
+
/** The query params that open `modal`; undefined for one the store holds. */
|
|
739
|
+
export declare function modalSearch(modal: PHModal$1): Record<string, string> | undefined;
|
|
740
|
+
/** The routed modal `search` opens, if any. */
|
|
741
|
+
export declare function modalFromSearch(search: Record<string, unknown>): PHModal$1 | undefined;
|
|
742
|
+
/** `search` without a routed modal's params. */
|
|
743
|
+
export declare function withoutModalSearch(search: Record<string, string>): PHSearchUpdate$1;
|
|
744
|
+
/** Shows a modal. With a host navigation, a routed one opens in the URL, in
|
|
745
|
+
* place of the current entry, and "settings" opens the settings page. */
|
|
623
746
|
export declare function showPHModal(modal: PHModal$1): void;
|
|
624
|
-
/** Closes the current modal
|
|
747
|
+
/** Closes the current modal; a routed one leaves the URL in place of the entry,
|
|
748
|
+
* and a confirmation opened over it closes with it. */
|
|
625
749
|
export declare function closePHModal(): void;
|
|
750
|
+
/** The href that opens `modal` over the current page. */
|
|
751
|
+
export declare function modalHref(modal: PHModal$1): string;
|
|
752
|
+
/** Props for an `<a>` that opens a routed `modal` over the current page on a
|
|
753
|
+
* plain click; new tabs and copied links get its URL. */
|
|
754
|
+
export declare function useModalLinkProps(modal: PHModal$1): Pick<LinkProps, "href" | "onClick">;
|
|
626
755
|
/** Shows the create document modal */
|
|
627
756
|
export declare function showCreateDocumentModal(documentType: string, documentModelVersion?: number): void;
|
|
628
757
|
/** Shows the delete node modal */
|
|
@@ -660,52 +789,160 @@ export declare function useNodeParentFolderById(id: string | null | undefined):
|
|
|
660
789
|
export declare function useParentFolderForSelectedNode(): FolderNode | undefined;
|
|
661
790
|
//#endregion
|
|
662
791
|
//#region src/hooks/revision-history.d.ts
|
|
663
|
-
/**
|
|
664
|
-
export declare const
|
|
665
|
-
/**
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
792
|
+
/** The query param that opens the document's revision history: `?history`. */
|
|
793
|
+
export declare const REVISION_HISTORY_PARAM = "history";
|
|
794
|
+
/** The history page shown, from 1 (the newest operations): `?history&historyPage=2`.
|
|
795
|
+
* Its own name: a drive app or editor may page by `page`. */
|
|
796
|
+
export declare const REVISION_HISTORY_PAGE_PARAM = "historyPage";
|
|
797
|
+
/** The page a `page` param names: a positive integer, else the first. */
|
|
798
|
+
export declare function parseRevisionHistoryPage(value: string | undefined): number;
|
|
799
|
+
/** Whether the URL opens the revision history. */
|
|
800
|
+
export declare function useRevisionHistoryVisible(): boolean;
|
|
801
|
+
/** The revision history page the URL names, from 1. */
|
|
802
|
+
export declare function useRevisionHistoryPage(): number;
|
|
803
|
+
/** Shows the revision history: a new history entry, so Back closes it. */
|
|
670
804
|
export declare function showRevisionHistory(): void;
|
|
671
|
-
/** Hides the revision history */
|
|
805
|
+
/** Hides the revision history. */
|
|
672
806
|
export declare function hideRevisionHistory(): void;
|
|
807
|
+
/** Opens history page `page`, from 1; Back returns to the page before. */
|
|
808
|
+
export declare function setRevisionHistoryPage(page: number): void;
|
|
809
|
+
/** Shows or hides the revision history. */
|
|
810
|
+
export declare function setRevisionHistoryVisible(visible: boolean | undefined): void;
|
|
811
|
+
/** @deprecated The revision history is a URL param now; there is no store value to watch. */
|
|
812
|
+
export declare function addRevisionHistoryVisibleEventHandler(): void;
|
|
673
813
|
//#endregion
|
|
674
814
|
//#region src/hooks/selected-document.d.ts
|
|
675
|
-
/** Returns the selected document id
|
|
815
|
+
/** Returns the selected document id: the editor's document, else the drive
|
|
816
|
+
* app's open document, else the app's selection. */
|
|
676
817
|
export declare function useSelectedDocumentId(): string | undefined;
|
|
677
818
|
/** Returns the selected document. */
|
|
678
819
|
export declare function useSelectedDocument(): readonly [PHDocument$1, DispatchFn<Action$1>];
|
|
679
|
-
/** Returns the selected document. */
|
|
820
|
+
/** Returns the selected document: the editor's, else the app's selection. */
|
|
680
821
|
export declare function useSelectedDocumentSafe(): UseDispatchResult<PHDocument$1, Action$1>;
|
|
681
822
|
/** Returns the selected document of a specific type, throws an error if the found document has a different type */
|
|
682
823
|
export declare function useSelectedDocumentOfType(documentType: null | undefined): never[];
|
|
683
|
-
export declare function useSelectedDocumentOfType<TDocument extends PHDocument$1, TAction extends Action$1>(documentType: string): [TDocument, DocumentDispatch$
|
|
824
|
+
export declare function useSelectedDocumentOfType<TDocument extends PHDocument$1, TAction extends Action$1>(documentType: string): [TDocument, DocumentDispatch$2<TAction>];
|
|
825
|
+
//#endregion
|
|
826
|
+
//#region src/hooks/navigation.d.ts
|
|
827
|
+
/** Fired on `window` when the fallback navigator rewrites the URL. */
|
|
828
|
+
export declare const PH_LOCATION_CHANGE_EVENT = "ph:locationchange";
|
|
829
|
+
/** Params read at boot or app-wide; they survive every navigation. Others,
|
|
830
|
+
* e.g. a document's own, are dropped when the target changes. */
|
|
831
|
+
export declare const GLOBAL_SEARCH_PARAMS: readonly ["driveUrl", "theme", "embed", "LOG_LEVEL", "reactorWorker"];
|
|
832
|
+
/** Feature flags are any `FEATURE_*` param, so they are retained by prefix. */
|
|
833
|
+
export declare const FEATURE_FLAG_PARAM_PREFIX = "FEATURE_";
|
|
834
|
+
/** Whether `key` is a param every navigation keeps. */
|
|
835
|
+
export declare function isGlobalSearchParam(key: string): boolean;
|
|
836
|
+
/** A query string's params; repeated keys keep their last value. */
|
|
837
|
+
export declare function searchToRecord(search: string): Record<string, string>;
|
|
838
|
+
/** `prev` with `update` applied; an `undefined` value removes the key. */
|
|
839
|
+
export declare function applySearchUpdate(prev: Record<string, string>, update: PHSearchUpdate$1): Record<string, string>;
|
|
840
|
+
/** `params` as a query string, with an empty value as a bare key: `history`, not `history=`. */
|
|
841
|
+
export declare function searchParamsToString(params: URLSearchParams): string;
|
|
842
|
+
/** `?a=1&b=2`, or an empty string for no params. */
|
|
843
|
+
export declare function recordToSearch(record: Record<string, string>): string;
|
|
844
|
+
/** The settings page's path; its tabs are below it. */
|
|
845
|
+
export declare const SETTINGS_PATH = "/settings";
|
|
846
|
+
export declare function isSettingsTarget(target: PHNavigationTarget$1 | undefined): target is PHSettingsTarget$1;
|
|
847
|
+
/** The pathname a target opens at, base path included. */
|
|
848
|
+
export declare function targetPathname(target: PHNavigationTarget$1 | undefined): string;
|
|
849
|
+
/** History state key: the index of the entry a document was opened from. */
|
|
850
|
+
export declare const OPENED_FROM_STATE_KEY = "phOpenedFrom";
|
|
851
|
+
/** The index to go back to from `index`, when it lies before it. */
|
|
852
|
+
export declare function openedFromIndex(state: object | undefined, index: number): number | undefined;
|
|
853
|
+
/** @internal Selects what the browser fallback opens; sync-selection.ts sets it. */
|
|
854
|
+
export declare function setBrowserOpenSync(sync: () => void): void;
|
|
855
|
+
export declare const browserNavigation: PHNavigation$1;
|
|
856
|
+
/** True when the store has a host navigation, not the browser fallback. */
|
|
857
|
+
export declare function hasHostNavigation(): boolean;
|
|
858
|
+
/** The app store's navigation, else the browser fallback. */
|
|
859
|
+
export declare function getPHNavigation(): PHNavigation$1;
|
|
860
|
+
/** The current pathname as the navigation sees it, base path included. */
|
|
861
|
+
export declare function getCurrentPathname(): string;
|
|
862
|
+
/** Opens `target`; without `search`, a target already open is left alone. */
|
|
863
|
+
export declare function openTarget(target: PHNavigationTarget$1 | undefined, options?: PHNavigateOptions$1): void;
|
|
864
|
+
/** Opens `target` through `navigation`, unless it is open already. */
|
|
865
|
+
export declare function openTargetWith(navigation: PHNavigation$1, target: PHNavigationTarget$1 | undefined, options?: PHNavigateOptions$1): void;
|
|
866
|
+
/** Asks the host navigation to warm `target`; a no-op without one. */
|
|
867
|
+
export declare function preloadTarget(target: PHNavigationTarget$1 | undefined): void;
|
|
868
|
+
/** The href `target` opens at through `navigation`, base path included. */
|
|
869
|
+
export declare function getTargetHref(target: PHNavigationTarget$1 | undefined, navigation?: PHNavigation$1): string;
|
|
870
|
+
export declare function resolveSearchUpdate(prev: Record<string, string>, update: SearchParamsUpdate$1): Record<string, string>;
|
|
871
|
+
/** Rewrites the current query params through the app store's navigation. */
|
|
872
|
+
export declare function setSearchParams(update: SearchParamsUpdate$1, options?: {
|
|
873
|
+
replace?: boolean;
|
|
874
|
+
}): void;
|
|
875
|
+
//#endregion
|
|
876
|
+
//#region src/hooks/url-state.d.ts
|
|
877
|
+
/** The nearest store's navigation, else the bound store's, else the browser's.
|
|
878
|
+
* Hosts set it once, so hook order holds. */
|
|
879
|
+
export declare function usePHNavigation(): PHNavigation$1;
|
|
880
|
+
/** The current query params. */
|
|
881
|
+
export declare function useSearchParams(): Record<string, string>;
|
|
882
|
+
/** Sets query params: an object merges into them, a function returns them all. */
|
|
883
|
+
export declare function useSetSearchParams(): SetSearchParams$1;
|
|
684
884
|
//#endregion
|
|
685
885
|
//#region src/hooks/selected-drive.d.ts
|
|
686
|
-
/** Returns the selected drive id */
|
|
687
|
-
export declare
|
|
886
|
+
/** Returns the selected drive id: the drive app's drive, else the app's selection. */
|
|
887
|
+
export declare function useSelectedDriveId(): string | undefined;
|
|
688
888
|
/** Sets the selected drive id */
|
|
689
889
|
export declare const setSelectedDriveId: (value: string | undefined) => void;
|
|
690
|
-
/** Adds an event handler for the selected drive id
|
|
890
|
+
/** Adds an event handler for the selected drive id
|
|
891
|
+
* @deprecated `ph:setSelectedDriveId` bypasses the URL; use `setSelectedDrive`. */
|
|
691
892
|
export declare const addSelectedDriveIdEventHandler: () => void;
|
|
692
893
|
/** Returns the selected drive */
|
|
693
|
-
export declare function useSelectedDrive(): [DocumentDriveDocument, DocumentDispatch$
|
|
894
|
+
export declare function useSelectedDrive(): [DocumentDriveDocument, DocumentDispatch$2<DocumentDriveAction>];
|
|
694
895
|
/** Returns the selected drive, or undefined if no drive is selected */
|
|
695
|
-
export declare function useSelectedDriveSafe(): [DocumentDriveDocument, DocumentDispatch$
|
|
696
|
-
|
|
697
|
-
|
|
896
|
+
export declare function useSelectedDriveSafe(): [DocumentDriveDocument, DocumentDispatch$2<DocumentDriveAction>] | readonly [undefined, undefined];
|
|
897
|
+
type DriveRef = string | DocumentDriveDocument | undefined;
|
|
898
|
+
/** Selects a drive in the app's store. */
|
|
899
|
+
export declare function setSelectedDrive(driveOrDriveSlug: DriveRef): void;
|
|
900
|
+
/** `setSelectedDrive`, as a hook. */
|
|
901
|
+
export declare function useSetSelectedDrive(): (drive: DriveRef) => void;
|
|
902
|
+
/** Warms a drive's view before it is opened, e.g. on hover. */
|
|
903
|
+
export declare function preloadDrive(drive: DocumentDriveDocument | undefined): void;
|
|
904
|
+
/** `preloadDrive`, as a hook. */
|
|
905
|
+
export declare function usePreloadDrive(): (drive: DocumentDriveDocument | undefined) => void;
|
|
698
906
|
//#endregion
|
|
699
907
|
//#region src/hooks/selected-folder.d.ts
|
|
700
|
-
/** Returns the selected folder. */
|
|
908
|
+
/** Returns the selected folder: the drive app's open folder, else the app's. */
|
|
701
909
|
export declare function useSelectedFolder(): FolderNode | undefined;
|
|
702
910
|
//#endregion
|
|
703
911
|
//#region src/hooks/set-selected-node.d.ts
|
|
912
|
+
/** Sets the selected node id without touching the URL. */
|
|
913
|
+
export declare const setSelectedNodeId: (value: string | undefined) => void;
|
|
914
|
+
/** @deprecated `ph:setSelectedNodeId` bypasses the URL; use `setSelectedNode`. */
|
|
704
915
|
export declare const addSelectedNodeIdEventHandler: () => void;
|
|
705
|
-
|
|
706
|
-
|
|
916
|
+
type NodeRef = Node | string | undefined;
|
|
917
|
+
/** Sets the selected node (file or folder) of the app's store; `search` sets
|
|
918
|
+
* the params it opens with. Inside a drive app, use `useSetSelectedNode`. */
|
|
919
|
+
export declare function setSelectedNode(node: NodeRef, options?: PHNavigateOptions$1): void;
|
|
920
|
+
/** Opens a node: through the drive app's `open` when it has one, else the
|
|
921
|
+
* app's navigation in the drive app's drive. */
|
|
922
|
+
export declare function useSetSelectedNode(): (node: NodeRef, options?: PHNavigateOptions$1) => void;
|
|
923
|
+
/** Opens a node, or with `undefined` its drive. */
|
|
924
|
+
export declare const useOpenNode: () => (node: Node | undefined, options?: PHNavigateOptions$1) => void;
|
|
925
|
+
/** Where a node of `drive`, else of the open drive, navigates to. */
|
|
926
|
+
export declare function getNodeTarget(node: Node | undefined, drive?: DocumentDriveDocument): PHNavigationTarget$1 | undefined;
|
|
927
|
+
/** Where a node navigates to: in the drive app's drive, else the open drive. */
|
|
928
|
+
export declare function useNodeTarget(node: Node | undefined): PHNavigationTarget$1 | undefined;
|
|
929
|
+
/** Warms a node's view before it is opened, e.g. on hover. */
|
|
930
|
+
export declare function preloadNode(node: Node | undefined, drive?: DocumentDriveDocument): void;
|
|
931
|
+
/** `preloadNode` through the drive app's `preload`, if it has one. */
|
|
932
|
+
export declare function usePreloadNode(): (node: Node | undefined) => void;
|
|
707
933
|
export declare function addResetSelectedNodeEventHandler(): void;
|
|
708
|
-
|
|
934
|
+
//#endregion
|
|
935
|
+
//#region src/hooks/sync-selection.d.ts
|
|
936
|
+
/** Applies a path's selection without writing the URL; idempotent.
|
|
937
|
+
* @deprecated Set the store's `navigation`; its route loaders write the selection. */
|
|
938
|
+
export declare function syncSelectionFromPath(pathname?: string): void;
|
|
939
|
+
/** Syncs the selection on back/forward when no host navigation is set.
|
|
940
|
+
* @deprecated Set the store's `navigation`; its router handles back/forward. */
|
|
941
|
+
export declare function addSyncSelectionOnPopStateEventHandler(): void;
|
|
942
|
+
/** @deprecated Set the store's `navigation`; its router handles back/forward. */
|
|
943
|
+
export declare const addSetSelectedDriveOnPopStateEventHandler: typeof addSyncSelectionOnPopStateEventHandler;
|
|
944
|
+
/** @deprecated Set the store's `navigation`; its router handles back/forward. */
|
|
945
|
+
export declare const addSetSelectedNodeOnPopStateEventHandler: typeof addSyncSelectionOnPopStateEventHandler;
|
|
709
946
|
//#endregion
|
|
710
947
|
//#region src/hooks/selected-node.d.ts
|
|
711
948
|
/** Returns the selected node. */
|
|
@@ -926,9 +1163,29 @@ export declare const useVetraPackageManager: () => IPackageManager | undefined;
|
|
|
926
1163
|
export declare const useVetraPackages: () => DocumentModelLib[];
|
|
927
1164
|
/** Adds the Vetra package manager event handler */
|
|
928
1165
|
export declare const addVetraPackageManagerEventHandler: () => void;
|
|
1166
|
+
/**
|
|
1167
|
+
* Non-react access to the Vetra package manager: calls `callback` once a
|
|
1168
|
+
* manager is available - immediately when already set, otherwise when
|
|
1169
|
+
* `setVetraPackageManager` publishes one. Returns an unsubscribe. The worker
|
|
1170
|
+
* wiring uses this to forward package updates from plain boot code.
|
|
1171
|
+
*/
|
|
1172
|
+
export declare function onVetraPackageManager(callback: (packageManager: IPackageManager) => void): () => void;
|
|
929
1173
|
/** Sets the Vetra package manager and registers its packages */
|
|
930
1174
|
export declare function setVetraPackageManager(packageManager: IPackageManager): void;
|
|
931
1175
|
//#endregion
|
|
1176
|
+
//#region src/hooks/switchboards.d.ts
|
|
1177
|
+
/** The switchboards the app reaches, from the provided store. */
|
|
1178
|
+
export declare const useSwitchboards: UsePHGlobalValue$1<SwitchboardDirectory$1>;
|
|
1179
|
+
/** Sets the app's switchboard directory; the host does this at boot. */
|
|
1180
|
+
export declare const setSwitchboards: SetPHGlobalValue$1<SwitchboardDirectory$1>;
|
|
1181
|
+
/** Registers the switchboards window event handler */
|
|
1182
|
+
export declare const addSwitchboardsEventHandler: AddPHGlobalEventHandler$1;
|
|
1183
|
+
//#endregion
|
|
1184
|
+
//#region src/hooks/close-node.d.ts
|
|
1185
|
+
/** Leaves a node's view: back to the entry it was opened from, past entries
|
|
1186
|
+
* pushed inside it; else, e.g. after a deep link, to its parent in place. */
|
|
1187
|
+
export declare function useCloseNode(nodeId: string | null | undefined): () => void;
|
|
1188
|
+
//#endregion
|
|
932
1189
|
//#region src/hooks/attachment-progress.d.ts
|
|
933
1190
|
/**
|
|
934
1191
|
* Progress in both units. `percent` is the house unit (0-100, matching
|
|
@@ -952,6 +1209,8 @@ type AttachmentProgressState = {
|
|
|
952
1209
|
//#region src/hooks/use-attachments.d.ts
|
|
953
1210
|
/** Returns an IAttachmentClient wrapping the current IAttachmentService, or undefined if none is set. */
|
|
954
1211
|
export declare function useAttachments(): IAttachmentClient | undefined;
|
|
1212
|
+
/** The client {@link useAttachments} returns, for code outside React. */
|
|
1213
|
+
export declare function getAttachmentClient(): IAttachmentClient | undefined;
|
|
955
1214
|
/**
|
|
956
1215
|
* Upload lifecycle stage, derived from the client's own `AttachmentStage` plus
|
|
957
1216
|
* an `idle` state the client has no reason to model.
|
|
@@ -1007,7 +1266,10 @@ export type UseAttachmentPreviewReturn = {
|
|
|
1007
1266
|
*/
|
|
1008
1267
|
export declare function useAttachmentPreview({ documentId, ref, retries, retryDelayMs }: UseAttachmentPreviewInput): UseAttachmentPreviewReturn;
|
|
1009
1268
|
export type UseAttachmentUploadReturn = {
|
|
1010
|
-
|
|
1269
|
+
/** `documentId` names the document the file is for, so it is stored where that document lives. */
|
|
1270
|
+
preprocess: (file: Blob, options?: {
|
|
1271
|
+
documentId?: string;
|
|
1272
|
+
}) => Promise<PreprocessResult>;
|
|
1011
1273
|
upload: (results: PreprocessResult) => Promise<void>;
|
|
1012
1274
|
/** Aborts the transfer in flight; the upload promise rejects. */
|
|
1013
1275
|
cancel: () => void;
|
|
@@ -1032,6 +1294,28 @@ export type UseAttachmentUploadReturn = {
|
|
|
1032
1294
|
*/
|
|
1033
1295
|
export declare function useAttachmentUpload(): UseAttachmentUploadReturn;
|
|
1034
1296
|
//#endregion
|
|
1297
|
+
//#region src/hooks/backend-auth.d.ts
|
|
1298
|
+
/** Whether the app's backend refused this tab's caller, and how. */
|
|
1299
|
+
export declare const useBackendAuth: UsePHGlobalValue<BackendAuthState>;
|
|
1300
|
+
/** Records (or clears, with `undefined`) a backend's refusal of the caller. */
|
|
1301
|
+
export declare const setBackendAuth: SetPHGlobalValue<BackendAuthState>;
|
|
1302
|
+
export declare const addBackendAuthEventHandler: () => void;
|
|
1303
|
+
/**
|
|
1304
|
+
* The HTTP status with which a backend refused the caller, or null when the
|
|
1305
|
+
* error is something else.
|
|
1306
|
+
*
|
|
1307
|
+
* Covers every shape a refusal reaches the browser in: the sync layer's
|
|
1308
|
+
* errors (`isDriveAuthError`), graphql-request's `ClientError` from the
|
|
1309
|
+
* remote GraphQL client (`response.status`, and "(Code: 401)" in its
|
|
1310
|
+
* message), and the router's partial-failure error that wraps one such
|
|
1311
|
+
* failure per backend.
|
|
1312
|
+
*/
|
|
1313
|
+
export declare function backendAuthStatusOf(error: unknown): 401 | 403 | null;
|
|
1314
|
+
/** True when a backend refused the caller as unauthenticated or unauthorized. */
|
|
1315
|
+
export declare function isBackendAuthError(error: unknown): boolean;
|
|
1316
|
+
/** Records the refusal `error` carries, if it is one; returns whether it was. */
|
|
1317
|
+
export declare function recordBackendAuthError(error: unknown, backend?: string): boolean;
|
|
1318
|
+
//#endregion
|
|
1035
1319
|
//#region src/pglite/drop.d.ts
|
|
1036
1320
|
export declare function truncateAllTables(pg: PGlite, schema?: string): Promise<void>;
|
|
1037
1321
|
export declare function dropAllReactorStorage(pg: PGlite): Promise<void>;
|
|
@@ -1052,8 +1336,92 @@ export type RefreshReactorDataConfig = {
|
|
|
1052
1336
|
debounceDelayMs?: number;
|
|
1053
1337
|
immediateThresholdMs?: number;
|
|
1054
1338
|
};
|
|
1055
|
-
export declare const refreshReactorData: (reactor:
|
|
1056
|
-
export declare const refreshReactorDataClient: (reactor:
|
|
1339
|
+
export declare const refreshReactorData: (reactor: IReactorReadClient$1, immediate?: boolean) => Promise<void>;
|
|
1340
|
+
export declare const refreshReactorDataClient: (reactor: IReactorReadClient$1 | undefined, immediate?: boolean) => Promise<void>;
|
|
1341
|
+
/**
|
|
1342
|
+
* Re-reads one drive and replaces it in the drives store. Only that drive
|
|
1343
|
+
* crosses the wire: the list used to be re-fetched whole on any drive change,
|
|
1344
|
+
* every drive's node tree included, which on a large mail drive was ten
|
|
1345
|
+
* megabytes per change. Without a store (before init) the whole list loads.
|
|
1346
|
+
*/
|
|
1347
|
+
export declare function refreshDrive(reactor: IReactorReadClient$1, driveId: string): Promise<void>;
|
|
1348
|
+
/**
|
|
1349
|
+
* Brings the drives store in line with which drives exist: ids come from a
|
|
1350
|
+
* headers-only listing, a drive not held yet is loaded on its own, and a drive
|
|
1351
|
+
* no longer listed is dropped. Drives already held are kept as they are.
|
|
1352
|
+
*/
|
|
1353
|
+
export declare function refreshDriveMembership(reactor: IReactorReadClient$1): Promise<void>;
|
|
1354
|
+
export type DriveChangeHandlerOptions = {
|
|
1355
|
+
/** The least time between two re-reads of the same drive; default 10 s. */
|
|
1356
|
+
minIntervalMs?: number;
|
|
1357
|
+
onError?: (error: unknown) => void;
|
|
1358
|
+
};
|
|
1359
|
+
/**
|
|
1360
|
+
* Routes a drive-type document change to the smallest refresh: an update
|
|
1361
|
+
* re-reads that one drive and invalidates its node cache, at most once per
|
|
1362
|
+
* `minIntervalMs` while it keeps changing (at once after a write from this
|
|
1363
|
+
* tab, see `markLocalDriveWrite`); a creation or deletion refreshes the
|
|
1364
|
+
* membership and loads only what is new.
|
|
1365
|
+
*/
|
|
1366
|
+
export declare function createDriveChangeHandler(reactor: IReactorReadClient$1, options?: DriveChangeHandlerOptions): (event: DocumentChangeEvent) => void;
|
|
1367
|
+
//#endregion
|
|
1368
|
+
//#region src/routing/drive-arrivals.d.ts
|
|
1369
|
+
/** Drives that may still arrive, e.g. while the first sync runs. */
|
|
1370
|
+
export type DriveArrivals = {
|
|
1371
|
+
isPending(): boolean;
|
|
1372
|
+
/** Whether more of `driveId`'s content may arrive: its remote's first sync. */
|
|
1373
|
+
isDrivePending(driveId: string): boolean;
|
|
1374
|
+
/** Calls `listener` whenever the drives or `isPending()` may have changed. */
|
|
1375
|
+
subscribe(listener: () => void): () => void;
|
|
1376
|
+
};
|
|
1377
|
+
/** Counts a background drive addition as pending until it settles. */
|
|
1378
|
+
export declare function trackDriveArrival<T>(promise: Promise<T>): Promise<T>;
|
|
1379
|
+
/** Resolves once `store.drives` lists `driveId`, or after `maxWaitMs`: a
|
|
1380
|
+
* finished first pull does not mean the drive is listed yet. */
|
|
1381
|
+
export declare function untilDriveListed(store: PHStore, driveId: string, maxWaitMs?: number): Promise<void>;
|
|
1382
|
+
/** Drives still on their way into `store`: being added or first syncing. */
|
|
1383
|
+
export declare function createDriveArrivals(store: PHStore): DriveArrivals;
|
|
1384
|
+
//#endregion
|
|
1385
|
+
//#region src/routing/resolve-drive-route.d.ts
|
|
1386
|
+
export type DriveRouteResult = {
|
|
1387
|
+
kind: "drive";
|
|
1388
|
+
driveId: string;
|
|
1389
|
+
nodeId?: string;
|
|
1390
|
+
} | {
|
|
1391
|
+
kind: "drive-not-found";
|
|
1392
|
+
} | {
|
|
1393
|
+
kind: "node-not-found";
|
|
1394
|
+
driveId: string;
|
|
1395
|
+
};
|
|
1396
|
+
export type ResolveDriveRouteOptions = {
|
|
1397
|
+
store: PHStore;
|
|
1398
|
+
/** Without it, a missing drive is never waited for. */
|
|
1399
|
+
arrivals?: DriveArrivals;
|
|
1400
|
+
driveSlug: string;
|
|
1401
|
+
nodeSlug?: string;
|
|
1402
|
+
signal: AbortSignal;
|
|
1403
|
+
/** A preload only uses what is already here. */
|
|
1404
|
+
preload?: boolean;
|
|
1405
|
+
};
|
|
1406
|
+
/** How long a navigation waits for its document and editor before it shows;
|
|
1407
|
+
* past it the view commits and renders them as they load. */
|
|
1408
|
+
export declare const PREFETCH_WAIT_MS = 3000;
|
|
1409
|
+
export declare const DRIVE_ARRIVAL_MAX_WAIT_MS = 15000;
|
|
1410
|
+
/** A listed drive by slug, id, or a `<name>-<id>` slug's trailing id. */
|
|
1411
|
+
export declare function findDriveBySlugOrId(store: PHStore, ref: string): DocumentDriveDocument | undefined;
|
|
1412
|
+
/** Resolves with `read()` once it is defined, nothing is still arriving, the
|
|
1413
|
+
* signal aborts or the cap passes. */
|
|
1414
|
+
export declare function waitForArrival<T>(read: () => T | undefined, arrivals: DriveArrivals | undefined, signal: AbortSignal, maxWaitMs?: number): Promise<T | undefined>;
|
|
1415
|
+
/** Asks the reactor directly: a just-created drive may not be listed yet. */
|
|
1416
|
+
export declare function fetchDrive(store: PHStore, ref: string, signal?: AbortSignal): Promise<DocumentDriveDocument | undefined>;
|
|
1417
|
+
/** Loads a drive's app module so its view renders without suspending;
|
|
1418
|
+
* undefined when it is already loaded, so a warm open waits on nothing. */
|
|
1419
|
+
export declare function preloadDriveApp(store: PHStore, drive: DocumentDriveDocument): Promise<undefined> | undefined;
|
|
1420
|
+
/** Warms a file node's document and its editor module. */
|
|
1421
|
+
export declare function prefetchDocument(store: PHStore, node: Node): Promise<void>;
|
|
1422
|
+
/** Resolves a drive route's slugs, waiting for drives that are still syncing,
|
|
1423
|
+
* and warms what the resolved view needs. */
|
|
1424
|
+
export declare function resolveDriveRoute(options: ResolveDriveRouteOptions): Promise<DriveRouteResult>;
|
|
1057
1425
|
//#endregion
|
|
1058
1426
|
//#region src/registry/types.d.ts
|
|
1059
1427
|
interface PublishEvent {
|
|
@@ -1074,9 +1442,9 @@ export declare class RegistryClient {
|
|
|
1074
1442
|
//#region src/registry/fetchers.d.ts
|
|
1075
1443
|
export declare function trimTrailingSlash(url: string): string;
|
|
1076
1444
|
export declare function getPackages(registryUrl: string): Promise<PackageInfo[]>;
|
|
1445
|
+
export declare function searchPackages(registryUrl: string, search: string): Promise<PackageInfo[]>;
|
|
1077
1446
|
/**
|
|
1078
|
-
*
|
|
1079
|
-
* paginated `GET /packages?limit=&offset=&search=` mode. Used by the Package
|
|
1447
|
+
* One page of the registry listing (trimmed items). Used by the Package
|
|
1080
1448
|
* Manager's Available tab for infinite scroll + server-side search.
|
|
1081
1449
|
*/
|
|
1082
1450
|
export declare function getPackagePage(registryUrl: string, params: {
|
|
@@ -1085,10 +1453,8 @@ export declare function getPackagePage(registryUrl: string, params: {
|
|
|
1085
1453
|
search?: string;
|
|
1086
1454
|
}): Promise<PackagePage>;
|
|
1087
1455
|
/**
|
|
1088
|
-
*
|
|
1089
|
-
*
|
|
1090
|
-
* not just names). Used by the MissingPackageModal to offer installs without
|
|
1091
|
-
* loading the entire paginated listing.
|
|
1456
|
+
* Full package info for every package exposing a given document type, to offer
|
|
1457
|
+
* installs without loading the whole listing.
|
|
1092
1458
|
*/
|
|
1093
1459
|
export declare function getPackagesForDocumentType(registryUrl: string, documentType: string): Promise<PackageInfo[]>;
|
|
1094
1460
|
export declare function getPackagesByDocumentType(registryUrl: string, documentType: string): Promise<string[]>;
|
|
@@ -1176,7 +1542,7 @@ type InferState<C> = C extends PHDocumentController<infer S> ? S : never;
|
|
|
1176
1542
|
* Extract action methods from a controller type.
|
|
1177
1543
|
* These are the dynamically-added methods (not on the base PHDocumentController prototype).
|
|
1178
1544
|
*/
|
|
1179
|
-
type ActionMethodsOf<C, TRemote> = { [K in Exclude<keyof C, keyof PHDocumentController<any
|
|
1545
|
+
type ActionMethodsOf<C, TRemote> = { [K in Exclude<keyof C, keyof PHDocumentController<any> | "undo" | "redo">]: C[K] extends ((input: infer I) => unknown) ? (input: I) => TRemote & ActionMethodsOf<C, TRemote> : C[K]; };
|
|
1180
1546
|
/** The full return type: RemoteDocumentController + action methods. */
|
|
1181
1547
|
type RemoteDocumentControllerWith<C extends PHDocumentController<any>> = RemoteDocumentController<C> & ActionMethodsOf<C, RemoteDocumentController<C>>;
|
|
1182
1548
|
/**
|
|
@@ -1192,6 +1558,10 @@ export declare class RemoteDocumentController<TController extends PHDocumentCont
|
|
|
1192
1558
|
/** The remote's id for the document; `documentId` may be a slug. */
|
|
1193
1559
|
private canonicalDocumentId?;
|
|
1194
1560
|
private remoteRevision;
|
|
1561
|
+
/** What the first push creates the remote from, until it has. */
|
|
1562
|
+
private uncreated?;
|
|
1563
|
+
/** A wrapped new document takes the host's signature policy at its first push. */
|
|
1564
|
+
private takesHostPolicy;
|
|
1195
1565
|
private hasPulled;
|
|
1196
1566
|
private pushScheduled;
|
|
1197
1567
|
private pushQueue;
|
|
@@ -1211,6 +1581,17 @@ export declare class RemoteDocumentController<TController extends PHDocumentCont
|
|
|
1211
1581
|
delete(propagate?: PropagationMode): Promise<boolean>;
|
|
1212
1582
|
/** Pull latest state from remote, replacing local document. Returns the remote document data. */
|
|
1213
1583
|
pull(): Promise<RemoteDocumentData>;
|
|
1584
|
+
/**
|
|
1585
|
+
* Undoes the last `count` operations of `scope`. Below base-reducer 3 (or
|
|
1586
|
+
* with no version) it applies the model's UNDO, as the action method did; on
|
|
1587
|
+
* 3, or an unknown number run as 3, it applies a RETRACT per step, each
|
|
1588
|
+
* resolved from this controller's own log, pending actions included.
|
|
1589
|
+
*/
|
|
1590
|
+
undo(count?: number, scope?: string): this;
|
|
1591
|
+
/** Redoes the last `count` undos of `scope`; see {@link undo}. */
|
|
1592
|
+
redo(count?: number, scope?: string): this;
|
|
1593
|
+
private undoOrRedo;
|
|
1594
|
+
private stateReducer;
|
|
1214
1595
|
/**
|
|
1215
1596
|
* Pull an existing document from remote and create a controller for it.
|
|
1216
1597
|
*/
|
|
@@ -1219,12 +1600,26 @@ export declare class RemoteDocumentController<TController extends PHDocumentCont
|
|
|
1219
1600
|
* Wrap an existing controller instance with remote capabilities.
|
|
1220
1601
|
* Pending local actions on the inner controller are NOT tracked
|
|
1221
1602
|
* (only new actions through the remote controller are tracked).
|
|
1603
|
+
* Without a `documentId`, the first push creates the remote from the
|
|
1604
|
+
* wrapped document's header, under the host's create signature policy.
|
|
1222
1605
|
*/
|
|
1223
1606
|
static from<C extends PHDocumentController<any>>(controller: C, options: RemoteControllerOptions): RemoteDocumentControllerWith<C>;
|
|
1224
|
-
/**
|
|
1607
|
+
/** Heads the new document with the host's versions for its type, as `newDocument` does; a host without `createDefaults` creates it with `createEmptyDocument`. */
|
|
1608
|
+
private headNewDocument;
|
|
1609
|
+
/** Creates the remote from the local header, so both run the versions its creator chose. */
|
|
1225
1610
|
private ensureRemoteDocument;
|
|
1611
|
+
/** Puts the uncreated document under the host's policy; a host without `createDefaults` creates it with `createEmptyDocument`. */
|
|
1612
|
+
private takeHostSignaturePolicy;
|
|
1226
1613
|
/** Set up interceptors for all action methods on the inner controller. */
|
|
1227
1614
|
private setupActionInterceptors;
|
|
1615
|
+
/** Applies the model's `actionType` action method locally and tracks it. */
|
|
1616
|
+
private dispatchModelAction;
|
|
1617
|
+
/** Applies `action` locally through the model's reducer and tracks it. */
|
|
1618
|
+
private applyAction;
|
|
1619
|
+
/** Runs `apply`, then tracks the operation it added for push. */
|
|
1620
|
+
private applyAndTrack;
|
|
1621
|
+
/** Recreates the inner controller over `document` and re-intercepts it. */
|
|
1622
|
+
private replaceInner;
|
|
1228
1623
|
/**
|
|
1229
1624
|
* Find the new operation added after applying an action,
|
|
1230
1625
|
* by comparing current operation counts against a previous snapshot.
|
|
@@ -1245,6 +1640,7 @@ export declare class RemoteDocumentController<TController extends PHDocumentCont
|
|
|
1245
1640
|
* Returns newly tracked actions with correct prevOpHash values.
|
|
1246
1641
|
*/
|
|
1247
1642
|
private pullAndReplay;
|
|
1643
|
+
private replayAction;
|
|
1248
1644
|
/** Prepare actions for push, optionally signing them. */
|
|
1249
1645
|
private prepareActionsForPush;
|
|
1250
1646
|
/**
|
|
@@ -1354,9 +1750,20 @@ export declare function isDocumentTypeSupported(documentType: string, supportedD
|
|
|
1354
1750
|
//#endregion
|
|
1355
1751
|
//#region src/utils/drives.d.ts
|
|
1356
1752
|
export type UISyncStatus = "INITIAL_SYNC" | "SUCCESS" | "CONFLICT" | "MISSING" | "ERROR" | "SYNCING";
|
|
1357
|
-
export declare function getDrives(reactor:
|
|
1753
|
+
export declare function getDrives(reactor: IReactorReadClient$1): Promise<DocumentDriveDocument[]>;
|
|
1754
|
+
/**
|
|
1755
|
+
* The id of every drive, from a listing that carries headers only: a drive's
|
|
1756
|
+
* node tree can be megabytes (a mail drive with tens of thousands of files),
|
|
1757
|
+
* so membership is learned without it and a new drive is then loaded on its
|
|
1758
|
+
* own.
|
|
1759
|
+
*/
|
|
1760
|
+
export declare function listDriveIds(reactor: IReactorReadClient$1): Promise<string[]>;
|
|
1761
|
+
/** One drive in full, or undefined once it is gone. */
|
|
1762
|
+
export declare function getDrive(reactor: IReactorReadClient$1, driveId: string): Promise<DocumentDriveDocument | undefined>;
|
|
1358
1763
|
export declare function getSyncStatus(documentId: string, sharingType: SharingType): Promise<UISyncStatus | undefined>;
|
|
1359
1764
|
export declare function getSyncStatusSync(documentId: string, sharingType: SharingType): UISyncStatus | undefined;
|
|
1765
|
+
/** A drive's display name: the header's (renames set it), else its creation name. */
|
|
1766
|
+
export declare function getDriveName(drive: DocumentDriveDocument): string;
|
|
1360
1767
|
//#endregion
|
|
1361
1768
|
//#region src/utils/download-document.d.ts
|
|
1362
1769
|
declare function defaultHandleError(error: Error): void;
|
|
@@ -1372,6 +1779,12 @@ export declare function sortNodesByName<T extends Node>(nodes: T[]): T[];
|
|
|
1372
1779
|
export declare function isFileNodeKind(node: Node | null | undefined): node is FileNode;
|
|
1373
1780
|
/** Returns whether a node is a folder. */
|
|
1374
1781
|
export declare function isFolderNodeKind(node: Node | null | undefined): node is FolderNode;
|
|
1782
|
+
/** Every node of a drive from `read.drives`, paged until the last page;
|
|
1783
|
+
* `parentFolder` narrows it as `listNodes` does (null: the root level). */
|
|
1784
|
+
export declare function listAllDriveNodes(reader: IDriveReadClient, driveId: string, options?: {
|
|
1785
|
+
parentFolder?: string | null;
|
|
1786
|
+
signal?: AbortSignal;
|
|
1787
|
+
}): Promise<Node[]>;
|
|
1375
1788
|
//#endregion
|
|
1376
1789
|
//#region src/utils/preload-editor.d.ts
|
|
1377
1790
|
export declare function preloadEditorModule(module: EditorModule): Promise<unknown> | undefined;
|
|
@@ -1400,6 +1813,67 @@ export declare function getDocumentStateSelection(model: DocumentModelModule): s
|
|
|
1400
1813
|
export declare function buildDocumentSubgraphQuery(documentType: string, identifier: string, model?: DocumentModelModule, authToken?: string): string;
|
|
1401
1814
|
export declare function buildDocumentSubgraphUrl(channelUrl: string, documentType: string, identifier: string, model?: DocumentModelModule, authToken?: string): string;
|
|
1402
1815
|
//#endregion
|
|
1816
|
+
//#region src/utils/switchboard-directory.d.ts
|
|
1817
|
+
/** What a router says about its backends; structural, so hosts pass their own. */
|
|
1818
|
+
export interface SwitchboardRouter {
|
|
1819
|
+
readonly backends: readonly {
|
|
1820
|
+
readonly name: string;
|
|
1821
|
+
readonly facts: {
|
|
1822
|
+
readonly known: boolean;
|
|
1823
|
+
readonly reactor: {
|
|
1824
|
+
readonly workflows: boolean;
|
|
1825
|
+
};
|
|
1826
|
+
};
|
|
1827
|
+
}[];
|
|
1828
|
+
/** The name of the backend that serves `identifier`. */
|
|
1829
|
+
locate(identifier: string, signal?: AbortSignal): Promise<string>;
|
|
1830
|
+
}
|
|
1831
|
+
export interface SwitchboardDirectoryOptions {
|
|
1832
|
+
/**
|
|
1833
|
+
* The host's remote backends, as the served config lists them
|
|
1834
|
+
* (`instance.remoteBackends`): a name and one of the switchboard's drive
|
|
1835
|
+
* addresses, `<base>/d/<slug>`.
|
|
1836
|
+
*/
|
|
1837
|
+
remoteBackends?: readonly {
|
|
1838
|
+
readonly name: string;
|
|
1839
|
+
readonly url: string;
|
|
1840
|
+
}[];
|
|
1841
|
+
/** The router over those backends, for their facts and for `locate`. */
|
|
1842
|
+
router?: SwitchboardRouter;
|
|
1843
|
+
/** The tab's sync manager, read on each call: every gql remote's switchboard. */
|
|
1844
|
+
syncManager?: () => Pick<ISyncManager, "list"> | undefined;
|
|
1845
|
+
/** What `${origin}` stands for; defaults to the page's origin. */
|
|
1846
|
+
origin?: string;
|
|
1847
|
+
}
|
|
1848
|
+
/**
|
|
1849
|
+
* Builds the directory from the host's remote backends and the tab's synced
|
|
1850
|
+
* drives. A backend's facts are read on each `list`, so a refresh shows.
|
|
1851
|
+
*/
|
|
1852
|
+
export declare function createSwitchboardDirectory(options: SwitchboardDirectoryOptions): SwitchboardDirectory;
|
|
1853
|
+
export type SwitchboardLookupErrorCode = "NO_DIRECTORY" | "NO_SWITCHBOARD" | "UNKNOWN_SWITCHBOARD" | "AMBIGUOUS_SWITCHBOARD" | "NO_WORKFLOW_RUNTIME";
|
|
1854
|
+
/** Why no switchboard could be picked, with the ones there are. */
|
|
1855
|
+
export declare class SwitchboardLookupError extends Error {
|
|
1856
|
+
readonly code: SwitchboardLookupErrorCode;
|
|
1857
|
+
readonly switchboards: readonly SwitchboardEntry[];
|
|
1858
|
+
constructor(message: string, code: SwitchboardLookupErrorCode, switchboards?: readonly SwitchboardEntry[]);
|
|
1859
|
+
}
|
|
1860
|
+
export interface SwitchboardRequest {
|
|
1861
|
+
/** A name from the directory, or a URL on the switchboard (its base, GraphQL or any path under it). */
|
|
1862
|
+
switchboard?: string;
|
|
1863
|
+
/** The document or drive the call is about: its switchboard, when the directory can place it. */
|
|
1864
|
+
documentId?: string;
|
|
1865
|
+
/** What the switchboard must run. */
|
|
1866
|
+
need?: "workflows";
|
|
1867
|
+
signal?: AbortSignal;
|
|
1868
|
+
}
|
|
1869
|
+
/**
|
|
1870
|
+
* The switchboard a call goes to: the one named, else the one serving the
|
|
1871
|
+
* document, else the only one there is (or the only one running what `need`
|
|
1872
|
+
* asks for). Throws a {@link SwitchboardLookupError} that lists the
|
|
1873
|
+
* switchboards whenever it can't pick one; there is no default URL.
|
|
1874
|
+
*/
|
|
1875
|
+
export declare function resolveSwitchboard(directory: SwitchboardDirectory | undefined, request?: SwitchboardRequest): Promise<SwitchboardEntry>;
|
|
1876
|
+
//#endregion
|
|
1403
1877
|
//#region src/utils/upgrade-preview.d.ts
|
|
1404
1878
|
export type UpgradeStepInfo = {
|
|
1405
1879
|
toVersion: number;
|
|
@@ -1439,10 +1913,16 @@ export declare function getDocumentUpgradePreview(document: PHDocument$1, regist
|
|
|
1439
1913
|
//#endregion
|
|
1440
1914
|
//#region src/utils/url.d.ts
|
|
1441
1915
|
export declare function resolveUrlPathname(path: string): string;
|
|
1442
|
-
/** Returns the
|
|
1916
|
+
/** Returns the path without a leading base path */
|
|
1443
1917
|
export declare function getPathWithoutBase(path: string): string;
|
|
1444
|
-
/** Makes a URL component for a drive.
|
|
1918
|
+
/** Makes a URL component for a drive.
|
|
1919
|
+
* @deprecated Open drives through the store's `navigation`; it builds the path. */
|
|
1445
1920
|
export declare function makeDriveUrlComponent(drive: DocumentDriveDocument | undefined): string;
|
|
1921
|
+
/** A drive's URL component: its slug, else its id, prefixed with the slugged
|
|
1922
|
+
* name as `<name>-<id>` when the id is opaque (a UUID or derived id). */
|
|
1923
|
+
export declare function makeDriveSlug(drive: DocumentDriveDocument): string;
|
|
1924
|
+
/** The drive a URL slug names: its own slug, its id, or `<name>-<id>`. */
|
|
1925
|
+
export declare function findDriveBySlug(drives: readonly DocumentDriveDocument[] | undefined, ref: string | undefined): DocumentDriveDocument | undefined;
|
|
1446
1926
|
/**
|
|
1447
1927
|
* Makes a URL component for a node: `<slugged name>-<id>`. The id is kept
|
|
1448
1928
|
* verbatim, since a v2-required id is case-sensitive base64url.
|
|
@@ -1458,6 +1938,7 @@ export declare function findUuid(input: string | undefined): string | undefined;
|
|
|
1458
1938
|
/** The v2-required document id a slug ends with, if any. */
|
|
1459
1939
|
export declare function findDerivedId(input: string | undefined): string | undefined;
|
|
1460
1940
|
export declare function extractNodeIdFromSlug(nodeSlug: string | undefined): string | undefined;
|
|
1941
|
+
/** @deprecated Route loaders resolve the node; use `extractNodeIdFromSlug`. */
|
|
1461
1942
|
export declare function extractNodeIdFromPath(path: string): string | undefined;
|
|
1462
1943
|
/** Extracts the drive slug from a path.
|
|
1463
1944
|
* Used for extracting drive ids from drive slugs in the URL.
|
|
@@ -1465,10 +1946,10 @@ export declare function extractNodeIdFromPath(path: string): string | undefined;
|
|
|
1465
1946
|
*/
|
|
1466
1947
|
export declare function extractDriveSlugFromPath(path: string): string;
|
|
1467
1948
|
export declare function extractDriveIdFromSlug(driveSlug: string | undefined): string | undefined;
|
|
1949
|
+
/** @deprecated Route loaders resolve the drive; use `extractDriveIdFromSlug`. */
|
|
1468
1950
|
export declare function extractDriveIdFromPath(path: string): string | undefined;
|
|
1469
|
-
/**
|
|
1470
|
-
*
|
|
1471
|
-
*/
|
|
1951
|
+
/** Creates a URL string with the given pathname, keeping the query string.
|
|
1952
|
+
* @deprecated The store's `navigation` keeps global params across navigations. */
|
|
1472
1953
|
export declare function createUrlWithPreservedParams(pathname: string): string;
|
|
1473
1954
|
//#endregion
|
|
1474
1955
|
//#region src/utils/user.d.ts
|
|
@@ -1480,6 +1961,6 @@ export declare function getUserPermissions(): {
|
|
|
1480
1961
|
//#region src/utils/validate-document.d.ts
|
|
1481
1962
|
export declare const validateDocument: (document: PHDocument$1) => ValidationError[];
|
|
1482
1963
|
//#endregion
|
|
1483
|
-
export { type AddPHGlobalEventHandler, BearerTokenProvider, type BrowserReactorClientModule, type BrowserReactorModule, type BulkImportJob, CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, CREDENTIAL_TYPES, ChannelScheme, ChevronDownIcon, type ConflictInfo, type ConflictResolution, type ConflictStrategy, ConnectionParams, type ConnectionState, type ConnectionStateSnapshot, CopyIcon, CreateStoreOptions, DEFAULT_DRIVE_ID, DEFAULT_SWITCHBOARD_URL, DOMAIN_TYPE, type Database, DisconnectIcon, type DiscoveryEvent, type DiscoveryEventListener, DispatchFn, DocumentCache, type RemoteDocumentChangeEvent as DocumentChangeEvent, type DocumentChangeListener, DocumentChangeType, DocumentChangesEventPayload, DocumentChangesSubscriptionOptions, type DocumentDispatch, DocumentIntegrityService, DocumentOperationsResult, DocumentOperationsState, type DocumentRefetchState, type DocumentTypeIcon, DraggingNode, DriveCollectionId, type DriveInfo, type FailedInstallation, type FailedInstallationReason, type FileUploadProgress, type FileUploadProgressCallback, type FolderZipResult, type FulfilledPromise, type FullPHGlobalConfig, GetDocumentQueryFields, GetDocumentQueryResult, type GetDocumentResult, type GetDocumentWithOperationsResult, type GetOperationsResult, GqlRequestChannel, type GraphQLClientDocumentEvent, type GraphQLClientDocumentsEvent, type GraphQLClientWindowEvents, type GraphQLDocumentEventOperationName, type GraphQLDocumentEvents, type GraphQLDocumentEventsOperationName, type GraphQLDocumentsEvents, GraphQLReactorClient, GraphQLReactorClientOptions, GraphQLReactorProvider, GraphQLReactorProviderProps, GraphQLRequestOptions, type IChannel, IDLE_OPERATIONS_ENTRY, IDLE_REFETCH_STATE, type IDocumentCache, type IDocumentModelLoader, type IOperationCache, type IPackageDiscoveryService, type IPackageListerUnsubscribe, type IPackageManager, type IPackagesListener, type IPeerAgreement, type IProcessor, type IProcessorHostModule, type IProcessorHostModuleBase, type IQueue, type IReactorBrowserClient, type IReactorClient, type IReactorProcessorHostModule, type IRelationalDb, type IRemoteClient, type IRemoteController, ISSUER_TYPE, InMemoryQueue, IntervalPollTimer, type Job, type JwtHandler, type KeyframeValidationIssue, type LOADING, type MergeHandler, MutateDocumentWithOperationsDocument, MutateDocumentWithOperationsResult, MutateDocumentWithOperationsVariables, type NodeKind, type OperationWithContext, type OperationsCacheEntry, type PHAnalyticsGlobalConfig, type PHAppConfig, type PHAppConfigHooks, type PHAppConfigKey, type PHAppConfigSetters, type PHCommonGlobalConfig, type PHDocumentEditorConfig, type PHDocumentEditorConfigHooks, type PHDocumentEditorConfigKey, type PHDocumentEditorConfigSetters, type PHDrivesGlobalConfig, type PHGlobal, type PHGlobalConfig, type PHGlobalConfigHooks, type PHGlobalConfigHooksForKey, type PHGlobalConfigKey, type PHGlobalConfigSetters, type PHGlobalConfigSettersForKey, type PHGlobalEventHandlerAdders, type PHGlobalKey, type PHGlobalValue, type PHModal, type PHProcessorsGlobalConfig, type PHRelationalProcessorsGlobalConfig, type PHRenownGlobalConfig, type PHSentryGlobalConfig, type PHToastFn, type PHToastOptions, type PHToastType, type PackageManagerInstallResult, type ParsedDriveUrl, type PendingInstallation, PollBehavior, type ProcessorApp, type ProcessorFactory, type ProcessorFactoryBuilder, type ProcessorFilter, type ProcessorRecord, type PromiseState, type PromiseWithState, PropagationMode, type PublishEvent, type PushResult, QueryCallbackReturnType, REACTOR_SCHEMA, RENOWN_CHAIN_ID, RENOWN_INITIAL_ANONYMOUS, RENOWN_INITIAL_UNKNOWN, RENOWN_NETWORK_ID, RENOWN_RETURN_URL_STRIPPED_PARAMS, RENOWN_URL, ReactorBuilder, ReactorClientBuilder, type ReactorFeatureFlags, type ReactorGraphQLClient, ReactorOperationFieldsFragmentDoc, type RebuildResult, type RejectedPromise, RelationalDbProcessor, RelationalDbWithLive, type Remote, type RemoteControllerGraphQLClient, type RemoteControllerOptions, type RemoteDocumentControllerWith, type RemoteDocumentData, type RemoteFilter, type RemoteMeta, type RemoteOperation, type RemoteOperationResultPage, type RemotePeer, Renown, RenownAuth, RenownAuthAsync, RenownAuthButton, type RenownAuthButtonProps, RenownAuthResolution, RenownAuthStatus, type RenownInitOptions, type RenownInitialAuth, RenownInitialUserProvider, type RenownInitialUserProviderProps, RenownLoginButton, type RenownLoginButtonProps, type RenownLoginMethod, RenownLogo, type RenownProps, RenownProvider, type RenownProviderProps, type RenownSessionCookieOptions, type RenownSessionCookieState, RenownUserButton, type RenownUserButtonMenuItem, type RenownUserButtonProps, RenownWalletProvider, type RenownWalletProviderProps, RevisionsListSelection, type RunDocumentOptions, type SdkFunctionWrapper, type SetEvent, type SetPHGlobalValue, type SignerConfig, type SnapshotValidationIssue, SpinnerIcon, StaticPackageManager, SubgraphSdkFactory, SubgraphSdkRegistry, type SyncHold, type SyncOperation, SyncOperationStatus, type SyncStatus, type TStateSchemaZodObject, type TimelineBarItem, type TimelineDividerItem, type TimelineItem, type TrackedAction, TypedGraphQLDocument, UseDispatchResult, UseDocumentOperationsOptions, type UseOnDropFile, type UsePHGlobalValue, UserIcon, VERIFIABLE_CREDENTIAL_EIP712_TYPE, type ValidationResult, type WorkerReactorClientModule, type WorkerReactorModule, addAttachmentServiceEventHandler, addDocumentCacheEventHandler, addDraggingNodeEventHandler, addPromiseState, addReactorClientEventHandler, addReactorClientModuleEventHandler, addRenownEventHandler, ambientRenownTokenProvider, baseDocumentModels, baseDocumentModelsMap, createAnalyticsStore, createClient, createProcessorQuery, describeGraphQLDocument, driveIdFromUrl, ensurePHEventHandlers, getAnalyticsStore, graphqlDocumentEvents, graphqlDocumentsEvents, graphqlEventsToSyncDrive, initConnectCrypto, initRenownCrypto, isAuthRefusalClose, isDriveAuthError, isGraphQLReactorClient, isOperationCache, login, logout, makeAuthConnectionParams, makeAuthMiddleware, openRenown, packageFromDocumentModels, parseDriveUrl, phDocumentFromGetDocument, phDocumentFromMutation, prepareSignedActions, readPromiseState, resolveDocumentModelModule, revisionMapFromRevisionsList, setAttachmentService, setDocumentCache, setReactorClient, setReactorClientModule, setRenown, signStampedAction, stampAction, startDocumentChangesSubscription, subgraphUrlFromGraphqlUrl, subscriptionsUrlFromGraphqlUrl, useAttachmentService, useDatabase, useDid, useDispatch, useDocument, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOperations, useDocumentSafe, useDocuments, useDragNode, useDropNode, useGetDocument, useGetDocumentAsync, useGetDocuments, useLoginStatus, useModelRegistry, usePGlite, useReactorClient, useReactorClientModule, useRelationalDb, useRelationalQuery, useRelationalQueryOptions, useRenown, useRenownAuth, useRenownAuthAsync, useRenownInit, useRenownInitialAuth, useRenownInitialUser, useRenownLoginMethods, useRenownSessionCookie, useRenownSessionSynced, useRenownWalletAdapter, useSwitchboardClient, useSync, useSyncList, useUser, viewFilterInputFromViewFilter };
|
|
1964
|
+
export { type AddPHGlobalEventHandler, type BackendAuthState, BatchJobFailedError, BearerTokenProvider, type BrowserReactorClientModule, type BrowserReactorModule, type BulkImportJob, CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, CREDENTIAL_TYPES, ChannelScheme, ChevronDownIcon, type ConflictInfo, type ConflictResolution, type ConflictStrategy, ConnectionParams, type ConnectionState, type ConnectionStateSnapshot, CopyIcon, CreateStoreOptions, DEFAULT_BATCH_REQUEST_TIMEOUT_MS, DEFAULT_BREAKER, DEFAULT_DRIVE_ID, DEFAULT_REQUEST_TIMEOUT_MS, DEFAULT_SWITCHBOARD_URL, DOMAIN_TYPE, type Database, type DelegationClaims, type DelegationScope, type DesktopShell, DisconnectIcon, type DiscoveryEvent, type DiscoveryEventListener, DispatchFn, DocumentCache, type RemoteDocumentChangeEvent as DocumentChangeEvent, type DocumentChangeListener, DocumentChangeType, DocumentChangesEventPayload, DocumentChangesSubscriptionOptions, type DocumentDispatch, DocumentIntegrityService, DocumentOperationsResult, DocumentOperationsState, type DocumentRefetchState, type DocumentTypeIcon, type DocumentsOfTypeEntry, DraggingNode, DriveCollectionId, DriveIdCall, type DriveInfo, DriveNodeQueries, DriveNodesCache, DriveNodesEntry, DriveNodesOptions, type FailedInstallation, type FailedInstallationReason, type FileUploadProgress, type FileUploadProgressCallback, type FolderZipResult, type FulfilledPromise, type FullPHGlobalConfig, GET_MANY_CHUNK_SIZE, GetDocumentAtConsistencyDocument, GetDocumentAtConsistencyResult, GetDocumentAtConsistencyVariables, GetDocumentQueryFields, GetDocumentQueryResult, type GetDocumentResult, type GetDocumentWithOperationsResult, type GetOperationsResult, GqlRequestChannel, type GraphQLClientDocumentEvent, type GraphQLClientDocumentsEvent, type GraphQLClientWindowEvents, type GraphQLDocumentEventOperationName, type GraphQLDocumentEvents, type GraphQLDocumentEventsOperationName, type GraphQLDocumentsEvents, GraphQLDriveNodeSource, GraphQLDriveReadClient, GraphQLFetch, GraphQLOperationNotSupportedError, GraphQLReactorClient, GraphQLReactorClientOptions, GraphQLReactorProvider, GraphQLReactorProviderProps, GraphQLReactorReadClient, GraphQLRequestOptions, GraphQLWrongBackendError, type IChannel, IDLE_DOCUMENTS_OF_TYPE_ENTRY, IDLE_OPERATIONS_ENTRY, IDLE_REFETCH_STATE, type IDocumentCache, IDocumentCacheReader, type IDocumentModelLoader, type IDocumentTypeCache, IJobChangesSocket, type IOperationCache, type IPackageDiscoveryService, type IPackageListerUnsubscribe, type IPackageManager, type IPackagesListener, type IPeerAgreement, type IProcessor, type IProcessorHostModule, type IProcessorHostModuleBase, type IQueue, type IReactorBrowserClient, type IReactorBrowserReadClient, type IReactorBrowserWriteClient, type IReactorClient, type IReactorProcessorHostModule, type IReactorReadClient, type IReactorWriteClient, type IRelationalDb, type IRemoteClient, type IRemoteController, ISSUER_TYPE, InMemoryQueue, IntervalPollTimer, type Job, JobChangesEventPayload, JobChangesSocketOptions, JobFailedError, type JwtHandler, type KeyframeValidationIssue, type LOADING, type MergeHandler, MutateDocumentWithOperationsDocument, MutateDocumentWithOperationsResult, MutateDocumentWithOperationsVariables, type NodeKind, type OperationWithContext, type OperationsCacheEntry, type PHAnalyticsGlobalConfig, type PHAppConfig, type PHAppConfigHooks, type PHAppConfigKey, type PHAppConfigSetters, type PHCommonGlobalConfig, type PHDocumentEditorConfig, type PHDocumentEditorConfigHooks, type PHDocumentEditorConfigKey, type PHDocumentEditorConfigSetters, type PHDriveTarget, type PHDrivesGlobalConfig, type PHGlobal, type PHGlobalConfig, type PHGlobalConfigHooks, type PHGlobalConfigHooksForKey, type PHGlobalConfigKey, type PHGlobalConfigSetters, type PHGlobalConfigSettersForKey, type PHGlobalEventHandlerAdders, type PHGlobalKey, type PHGlobalValue, type PHModal, type PHNavigateOptions, type PHNavigation, type PHNavigationTarget, type PHProcessorsGlobalConfig, type PHRelationalProcessorsGlobalConfig, type PHRenownGlobalConfig, type PHSearchUpdate, type PHSentryGlobalConfig, type PHSettingsTarget, PHStore, PHStoreProvider, type PHToastFn, type PHToastOptions, type PHToastType, type PackageManagerInstallResult, type ParsedDriveUrl, type PendingInstallation, PollBehavior, type ProcessorApp, type ProcessorFactory, type ProcessorFactoryBuilder, type ProcessorFilter, type ProcessorRecord, type PromiseState, type PromiseWithState, PropagationMode, type PublishEvent, type PushResult, QueryCallbackReturnType, REACTOR_SCHEMA, RENOWN_CHAIN_ID, RENOWN_INITIAL_ANONYMOUS, RENOWN_INITIAL_UNKNOWN, RENOWN_NETWORK_ID, RENOWN_RETURN_URL_STRIPPED_PARAMS, RENOWN_URL, type ReactorBrowserHalves, ReactorBuilder, ReactorClientBuilder, type ReactorFeatureFlags, type ReactorGraphQLClient, ReactorOperationFieldsFragmentDoc, type RebuildResult, type RejectedPromise, RelationalDbOptions, RelationalDbProcessor, RelationalDbWithLive, type Remote, type RemoteControllerGraphQLClient, type RemoteControllerOptions, type RemoteDocumentControllerWith, type RemoteDocumentData, type RemoteFilter, type RemoteMeta, type RemoteOperation, type RemoteOperationResultPage, type RemotePeer, Renown, RenownAuth, RenownAuthAsync, RenownAuthButton, type RenownAuthButtonProps, RenownAuthResolution, RenownAuthStatus, type RenownInitOptions, type RenownInitialAuth, RenownInitialUserProvider, type RenownInitialUserProviderProps, RenownLoginButton, type RenownLoginButtonProps, type RenownLoginMethod, RenownLogo, type RenownProps, RenownProvider, type RenownProviderProps, type RenownSessionCookieOptions, type RenownSessionCookieState, RenownUserButton, type RenownUserButtonMenuItem, type RenownUserButtonProps, RenownWalletProvider, type RenownWalletProviderProps, RevisionsListSelection, type RunDocumentOptions, type SdkFunctionWrapper, type SearchParamsUpdate, type SetEvent, type SetPHGlobalValue, type SetSearchParams, type SignerConfig, type SnapshotValidationIssue, SpinnerIcon, StaticPackageManager, SubgraphSdkFactory, SubgraphSdkRegistry, SwitchboardBackend, SwitchboardBackendDescriptor, SwitchboardBreaker, type SwitchboardDirectory, type SwitchboardEntry, SwitchboardUnreachableError, type SwitchboardWorkflows, type SyncHold, type SyncOperation, SyncOperationStatus, type SyncStatus, type TStateSchemaZodObject, type TimelineBarItem, type TimelineDividerItem, type TimelineItem, type TrackedAction, TypedGraphQLDocument, UseDispatchResult, UseDocumentOperationsOptions, type UseOnDropFile, type UsePHGlobalValue, UserIcon, VERIFIABLE_CREDENTIAL_EIP712_TYPE, type ValidationResult, type WorkerReactorClientModule, type WorkerReactorModule, type WriteHandle, type WriteReceipt, addAttachmentServiceEventHandler, addDocumentCacheEventHandler, addDraggingNodeEventHandler, addDriveNodesEventHandler, addFullReactorClientEventHandler, addPromiseState, addReactorClientEventHandler, addReactorClientModuleEventHandler, addReactorHalvesEventHandler, addRenownEventHandler, ambientRenownSigner, ambientRenownTokenProvider, baseDocumentModels, baseDocumentModelsMap, bindPHStoreToWindow, createAnalyticsStore, createClient, createDelegation, createDispatch, createGraphQLDriveNodeSource, createJobChangesSocket, createPHStore, createProcessorQuery, createSwitchboardBackend, decodeDelegation, describeGraphQLDocument, desktopShell, dispatchActions, driveIdFromUrl, dropDriveNode, ensurePHEventHandlers, ensurePHStore, findIsServableOverGraphQL, getActivePHStore, getAnalyticsStore, getDriveNode, getFullReactorClient, getPHStore, getPHStoreSubscribe, globalFetch, graphqlDocumentEvents, graphqlDocumentsEvents, graphqlEventsToSyncDrive, initConnectCrypto, initRenownCrypto, invalidateDriveNodes, isAuthRefusalClose, isDeadlineError, isDocumentTypeCache, isDriveAuthError, isGraphQLReactorClient, isNodeFetch, isOperationCache, isoStringFromDateTime, loadDriveNodes, login, logout, makeAuthConnectionParams, makeAuthMiddleware, markLocalDriveWrite, notifyPHStore, openRenown, packageFromDocumentModels, parseDriveUrl, peekDriveNode, phDocumentFromGetDocument, phDocumentFromMutation, prepareSignedActions, queriesUnknownArgument, queriesUnknownField, readPromiseState, resolveDocumentModelModule, revisionMapFromRevisionsList, setAttachmentService, setDocumentCache, setFullReactorClient, setReactorClient, setReactorClientModule, setRenown, signStampedAction, stampAction, startDocumentChangesSubscription, subgraphUrlFromGraphqlUrl, subscribePHStore, subscriptionsUrlFromGraphqlUrl, switchboardFetch, takeLocalDriveWrite, toLegacyNode, useAttachmentService, useDatabase, useDid, useDispatch, useDocument, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOperations, useDocumentSafe, useDocuments, useDragNode, useDriveNode, useDriveNodes, useDriveNodesCache, useDropNode, useGetDocument, useGetDocumentAsync, useGetDocuments, useLoginStatus, useModelRegistry, usePGlite, usePHStore, useReactorClient, useReactorClientModule, useReactorHalves, useRelationalDb, useRelationalQuery, useRelationalQueryOptions, useRenown, useRenownAuth, useRenownAuthAsync, useRenownInit, useRenownInitialAuth, useRenownInitialUser, useRenownLoginMethods, useRenownSessionCookie, useRenownSessionSynced, useRenownWalletAdapter, useSwitchboardClient, useSync, useSyncList, useUser, viewFilterInputFromViewFilter, withRequestDeadline, withStreamedBodies };
|
|
1484
1965
|
export {};
|
|
1485
1966
|
//# sourceMappingURL=index.d.ts.map
|