@powerhousedao/reactor-browser 6.2.2-dev.5 → 6.2.2-dev.50

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.
Files changed (66) hide show
  1. package/README.md +283 -0
  2. package/dist/attachment-service-CghxHYta.d.ts +970 -0
  3. package/dist/attachment-service-CghxHYta.d.ts.map +1 -0
  4. package/dist/client-BaHKLGy5.d.ts +14 -0
  5. package/dist/client-BaHKLGy5.d.ts.map +1 -0
  6. package/dist/{client-u13cr-Vg.js → client-Zz_l9QzI.js} +30 -3
  7. package/dist/client-Zz_l9QzI.js.map +1 -0
  8. package/dist/{client-_Gh2Uf0E.js → client-s_ISz_Zs.js} +30 -4
  9. package/dist/client-s_ISz_Zs.js.map +1 -0
  10. package/dist/{document-by-id-dLYFX-xz.js → document-by-id-DWEQI7wn.js} +48 -43
  11. package/dist/document-by-id-DWEQI7wn.js.map +1 -0
  12. package/dist/document-operations-D0ePGjbp.js +2778 -0
  13. package/dist/document-operations-D0ePGjbp.js.map +1 -0
  14. package/dist/global-CbyAMlZd.d.ts +400 -0
  15. package/dist/global-CbyAMlZd.d.ts.map +1 -0
  16. package/dist/index-CxxxP14A.d.ts +144 -0
  17. package/dist/index-CxxxP14A.d.ts.map +1 -0
  18. package/dist/index-DPq1VjpB.d.ts +345 -0
  19. package/dist/index-DPq1VjpB.d.ts.map +1 -0
  20. package/dist/index.d.ts +177 -695
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +256 -1627
  23. package/dist/index.js.map +1 -1
  24. package/dist/{inspector-proxy-CvQDDxmT.d.ts → inspector-proxy-CaCFdEG4.d.ts} +4 -2
  25. package/dist/inspector-proxy-CaCFdEG4.d.ts.map +1 -0
  26. package/dist/{make-ph-event-functions-BHoLPif5.js → make-ph-event-functions-DBq3iWYn.js} +1 -1
  27. package/dist/{make-ph-event-functions-BHoLPif5.js.map → make-ph-event-functions-DBq3iWYn.js.map} +1 -1
  28. package/dist/{index-DS4W07Y8.d.ts → pglite-CntadC_p-BtEalg1H.d.ts} +2 -142
  29. package/dist/pglite-CntadC_p-BtEalg1H.d.ts.map +1 -0
  30. package/dist/{relational-Dj06-YkI.js → relational-C_0GdGVN.js} +2 -2
  31. package/dist/{relational-Dj06-YkI.js.map → relational-C_0GdGVN.js.map} +1 -1
  32. package/dist/renown-BZabzj4l.js +68 -0
  33. package/dist/renown-BZabzj4l.js.map +1 -0
  34. package/dist/{renown-D-1c_Bvx.js → renown-C7a1ygsj.js} +471 -57
  35. package/dist/renown-C7a1ygsj.js.map +1 -0
  36. package/dist/src/analytics/index.d.ts +1 -1
  37. package/dist/src/analytics/index.js +2 -1
  38. package/dist/src/analytics/index.js.map +1 -1
  39. package/dist/src/graphql/client.d.ts +3 -2
  40. package/dist/src/graphql/client.js +1 -1
  41. package/dist/src/graphql-client/entry.d.ts +4 -0
  42. package/dist/src/graphql-client/entry.js +3 -0
  43. package/dist/src/relational/index.d.ts +1 -1
  44. package/dist/src/relational/index.js +1 -1
  45. package/dist/src/renown/index.d.ts +2 -2
  46. package/dist/src/renown/index.js +3 -2
  47. package/dist/src/rpc/index.d.ts +5 -3
  48. package/dist/src/rpc/index.d.ts.map +1 -1
  49. package/dist/src/rpc/index.js +37 -10
  50. package/dist/src/rpc/index.js.map +1 -1
  51. package/dist/store-DAJq6vSs.js +37 -0
  52. package/dist/store-DAJq6vSs.js.map +1 -0
  53. package/dist/{client-09xv0Dq6.d.ts → types-Bitg5Z5j.d.ts} +25 -13
  54. package/dist/types-Bitg5Z5j.d.ts.map +1 -0
  55. package/dist/{types-CPV0Cnsy.d.ts → types-wGaiXwjh.d.ts} +1 -1
  56. package/dist/{types-CPV0Cnsy.d.ts.map → types-wGaiXwjh.d.ts.map} +1 -1
  57. package/package.json +15 -9
  58. package/dist/client-09xv0Dq6.d.ts.map +0 -1
  59. package/dist/client-_Gh2Uf0E.js.map +0 -1
  60. package/dist/client-u13cr-Vg.js.map +0 -1
  61. package/dist/document-by-id-dLYFX-xz.js.map +0 -1
  62. package/dist/index-D3bV5rcl.d.ts +0 -216
  63. package/dist/index-D3bV5rcl.d.ts.map +0 -1
  64. package/dist/index-DS4W07Y8.d.ts.map +0 -1
  65. package/dist/inspector-proxy-CvQDDxmT.d.ts.map +0 -1
  66. package/dist/renown-D-1c_Bvx.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,25 +1,26 @@
1
- import { a as getAnalyticsStore, i as createAnalyticsStore, n as IPowerhouseAnalytics, r as CreateStoreOptions } from "./types-CPV0Cnsy.js";
1
+ import { a as getAnalyticsStore, i as createAnalyticsStore, n as IPowerhouseAnalytics, r as CreateStoreOptions } from "./types-wGaiXwjh.js";
2
+ import { $ as PHProcessorsGlobalConfig, A as FailedInstallation, B as PHAppConfigSetters, C as PHToastOptions, D as TimelineItem, E as TimelineDividerItem, F as FullPHGlobalConfig, G as PHDocumentEditorConfigSetters, H as PHDocumentEditorConfig, I as PHAnalyticsGlobalConfig, J as PHGlobalConfigHooks, K as PHDrivesGlobalConfig, L as PHAppConfig, M as IPackageDiscoveryService, N as PendingInstallation, O as DiscoveryEvent, P as PHModal, Q as PHGlobalConfigSettersForKey, R as PHAppConfigHooks, S as PHToastFn, T as TimelineBarItem, U as PHDocumentEditorConfigHooks, V as PHCommonGlobalConfig, W as PHDocumentEditorConfigKey, X as PHGlobalConfigKey, Y as PHGlobalConfigHooksForKey, Z as PHGlobalConfigSetters, _ as useDropNode, a as PHGlobal, at as FulfilledPromise, b as IPackagesListener, c as PHGlobalValue, ct as PromiseWithState, d as UsePHGlobalValue, et as PHRelationalProcessorsGlobalConfig, f as WorkerReactorClientModule, g as useDragNode, h as addDraggingNodeEventHandler, i as LOADING, it as DocumentDispatch, j as FailedInstallationReason, k as DiscoveryEventListener, l as SetEvent, lt as RejectedPromise, m as DraggingNode, n as BrowserReactorClientModule, nt as PHSentryGlobalConfig, o as PHGlobalEventHandlerAdders, ot as IDocumentCache, p as WorkerReactorModule, q as PHGlobalConfig, r as BrowserReactorModule, rt as IReactorBrowserClient, s as PHGlobalKey, st as PromiseState, t as AddPHGlobalEventHandler, tt as PHRenownGlobalConfig, u as SetPHGlobalValue, v as IPackageListerUnsubscribe, w as PHToastType, x as PackageManagerInstallResult, y as IPackageManager, z as PHAppConfigKey } from "./global-CbyAMlZd.js";
3
+ import { $ as GraphQLRequestOptions, A as useGetDocuments, At as SyncStatus, B as stampAction, C as setDocumentCache, Ct as PushResult, D as useDocuments, Dt as RemoteDocumentData, E as useDocumentSafe, Et as RemoteDocumentChangeEvent, F as startDocumentChangesSubscription, G as GraphQLReactorProvider, H as MutateDocumentWithOperationsResult, I as subscriptionsUrlFromGraphqlUrl, J as useSwitchboardClient, K as GraphQLReactorProviderProps, L as StaticPackageManager, M as DocumentChangesEventPayload, Mt as DocumentCache, N as DocumentChangesSubscriptionOptions, Nt as addPromiseState, O as useGetDocument, Ot as RemoteOperation, P as makeAuthConnectionParams, Pt as readPromiseState, Q as viewFilterInputFromViewFilter, R as packageFromDocumentModels, S as addDocumentCacheEventHandler, St as MergeHandler, T as useDocumentCache, Tt as RemoteControllerOptions, U as MutateDocumentWithOperationsVariables, V as MutateDocumentWithOperationsDocument, W as ReactorOperationFieldsFragmentDoc, X as GraphQLReactorClientOptions, Y as GraphQLReactorClient, Z as isGraphQLReactorClient, _ as usePGlite, _t as GetDocumentResult, a as useDocumentOperations, at as BearerTokenProvider, b as useSync, bt as IRemoteClient, c as DispatchFn, ct as GetDocumentQueryFields, d as addReactorClientEventHandler, dt as phDocumentFromGetDocument, et as SubgraphSdkFactory, f as addReactorClientModuleEventHandler, ft as phDocumentFromMutation, g as useModelRegistry, gt as DocumentChangeListener, h as useDatabase, ht as ConflictStrategy, i as DocumentOperationsState, it as subgraphUrlFromGraphqlUrl, j as ConnectionParams, jt as TrackedAction, k as useGetDocumentAsync, kt as RemoteOperationResultPage, l as UseDispatchResult, lt as GetDocumentQueryResult, m as setReactorClientModule, mt as ConflictInfo, n as setAttachmentService, nt as TypedGraphQLDocument, o as useDocumentModelModuleById, ot as ambientRenownTokenProvider, p as setReactorClient, pt as revisionMapFromRevisionsList, q as ensurePHEventHandlers, r as useAttachmentService, rt as describeGraphQLDocument, s as useDocumentModelModules, st as makeAuthMiddleware, t as addAttachmentServiceEventHandler, tt as SubgraphSdkRegistry, u as useDispatch, ut as RevisionsListSelection, v as useReactorClient, vt as GetDocumentWithOperationsResult, w as useDocument, wt as RemoteControllerGraphQLClient, x as useSyncList, xt as IRemoteController, y as useReactorClientModule, yt as GetOperationsResult, z as signStampedAction } from "./attachment-service-CghxHYta.js";
2
4
  import { baseDocumentModels, baseDocumentModelsMap } from "./src/document-model.js";
3
- import { i as PGlite, r as PGliteWithLive } from "./index-DS4W07Y8.js";
4
- import { C as PhDocumentFieldsFragment, S as MutateDocumentMutation, T as Scalars, _ as DeleteDocumentMutation, a as GraphQLDocumentEventOperationName, b as GetDocumentOperationsQuery, c as GraphQLDocumentsEvents, d as DEFAULT_DRIVE_ID, f as DEFAULT_SWITCHBOARD_URL, g as CreateDocumentMutation, h as graphqlEventsToSyncDrive, i as GraphQLClientWindowEvents, l as ReactorGraphQLClient, m as graphqlDocumentsEvents, n as GraphQLClientDocumentEvent, o as GraphQLDocumentEvents, p as graphqlDocumentEvents, r as GraphQLClientDocumentsEvent, s as GraphQLDocumentEventsOperationName, t as createClient, u as TStateSchemaZodObject, v as DeleteDocumentsMutation, w as PropagationMode, x as GetDocumentWithOperationsQuery, y as FindDocumentsQuery } from "./client-09xv0Dq6.js";
5
- import { A as logout, C as RenownUserButtonMenuItem, D as RenownAuthButton, E as RenownLoginButtonProps, M as RenownAuth, N as RenownAuthStatus, O as RenownAuthButtonProps, P as useRenownAuth, S as RenownUserButton, T as RenownLoginButton, _ as CopyIcon, a as CREDENTIAL_SCHEMA_EIP712_TYPE, b as SpinnerIcon, c as DOMAIN_TYPE, d as RENOWN_NETWORK_ID, f as RENOWN_URL, g as ChevronDownIcon, h as initRenownCrypto, i as useRenownInit, j as openRenown, k as login, l as ISSUER_TYPE, m as initConnectCrypto, n as RenownProps, o as CREDENTIAL_SUBJECT_TYPE, p as VERIFIABLE_CREDENTIAL_EIP712_TYPE, r as RenownInitOptions, s as CREDENTIAL_TYPES, t as Renown, u as RENOWN_CHAIN_ID, v as DisconnectIcon, w as RenownUserButtonProps, x as UserIcon, y as RenownLogo } from "./index-D3bV5rcl.js";
6
- import { r as IWorkerAdminClient, t as IInspectorProxy } from "./inspector-proxy-CvQDDxmT.js";
5
+ import { t as PGlite } from "./pglite-CntadC_p-BtEalg1H.js";
6
+ import { r as PGliteWithLive } from "./index-CxxxP14A.js";
7
+ import { C as GetDocumentWithOperationsQuery, D as Scalars, E as PropagationMode, O as SdkFunctionWrapper, _ as DeleteDocumentMutation, a as GraphQLDocumentEvents, b as FindDocumentsQuery, c as ReactorGraphQLClient, d as DEFAULT_DRIVE_ID, f as DEFAULT_SWITCHBOARD_URL, g as CreateDocumentMutation, 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, v as DeleteDocumentsMutation, w as MutateDocumentMutation } from "./types-Bitg5Z5j.js";
8
+ import { t as createClient } from "./client-BaHKLGy5.js";
9
+ import { $ as logout, A as VERIFIABLE_CREDENTIAL_EIP712_TYPE, B as RenownUserButtonMenuItem, C as CREDENTIAL_SUBJECT_TYPE, D as RENOWN_CHAIN_ID, E as ISSUER_TYPE, F as DisconnectIcon, G as RenownAuthButtonProps, H as RenownLoginButton, I as RenownLogo, J as useDid, K as addRenownEventHandler, L as SpinnerIcon, M as initRenownCrypto, N as ChevronDownIcon, O as RENOWN_NETWORK_ID, P as CopyIcon, Q as login, R as UserIcon, S as CREDENTIAL_SCHEMA_EIP712_TYPE, T as DOMAIN_TYPE, U as RenownLoginButtonProps, V as RenownUserButtonProps, W as RenownAuthButton, X as useRenown, Y as useLoginStatus, Z as useUser, _ as RenownInitialAuth, a as RenownProvider, at as useRenownAuth, b as useRenownInitialAuth, c as RenownProps, d as RenownSessionCookieOptions, et as openRenown, f as RenownSessionCookieState, g as RENOWN_INITIAL_UNKNOWN, h as RENOWN_INITIAL_ANONYMOUS, i as RenownWalletProviderProps, it as RenownAuthStatus, j as initConnectCrypto, k as RENOWN_URL, l as RenownInitOptions, m as useRenownSessionSynced, n as useRenownLoginMethods, nt as RenownAuthAsync, o as RenownProviderProps, ot as useRenownAuthAsync, p as useRenownSessionCookie, q as setRenown, r as RenownWalletProvider, rt as RenownAuthResolution, s as Renown, t as RenownLoginMethod, tt as RenownAuth, u as useRenownInit, v as RenownInitialUserProvider, w as CREDENTIAL_TYPES, x as useRenownInitialUser, y as RenownInitialUserProviderProps, z as RenownUserButton } from "./index-DPq1VjpB.js";
7
10
  import { QueryCallbackReturnType, RelationalDbWithLive, createProcessorQuery, useRelationalDb, useRelationalQuery, useRelationalQueryOptions } from "./src/relational/index.js";
8
11
  import * as document_model0 from "document-model";
9
- import { DocumentModelLib, DocumentModelModule, EditorModule, PHDocument, PHDocumentController } from "document-model";
10
- import { Action, DocumentAction, DocumentModelModule as DocumentModelModule$1, DocumentOperations, ISigner, Operation, PHBaseState, PHDocument as PHDocument$1, PHDocumentHeader, SubgraphModule, ValidationError } from "@powerhousedao/shared/document-model";
12
+ import { DocumentModelLib, EditorModule, PHDocument, PHDocumentController } from "document-model";
13
+ import { Action as Action$1, DocumentOperations, Operation as Operation$1, PHBaseState, PHDocument as PHDocument$1, PHDocumentHeader, SubgraphModule, ValidationError } from "@powerhousedao/shared/document-model";
11
14
  import * as _powerhousedao_shared_document_drive0 from "@powerhousedao/shared/document-drive";
12
15
  import { DocumentDriveAction, DocumentDriveDocument, DriveInput, FileNode, FolderNode, Node, SharingType } from "@powerhousedao/shared/document-drive";
13
- import * as _powerhousedao_reactor0 from "@powerhousedao/reactor";
14
- import { ChannelScheme, ConnectionState, ConnectionStateSnapshot, ConnectionStateSnapshot as ConnectionStateSnapshot$1, Database, Database as Database$1, DocumentChangeType, DocumentIntegrityService, DriveCollectionId, GqlRequestChannel, IChannel, IDocumentModelLoader, IDocumentModelLoader as IDocumentModelLoader$1, IDocumentModelRegistry, IProcessor, IProcessorHostModule, IProcessorHostModule as IProcessorHostModule$1, IQueue, IReactorClient, IReactorClient as IReactorClient$1, IRelationalDb, ISyncManager, InMemoryQueue, InProcessReactorClientModule, InProcessReactorModule, IntervalPollTimer, Job, JwtHandler, KeyframeValidationIssue, OperationWithContext, ParsedDriveUrl, PollBehavior, PollBehavior as PollBehavior$1, ProcessorApp, ProcessorFactory, ProcessorFactoryBuilder, ProcessorFilter, ProcessorRecord, REACTOR_SCHEMA, ReactorBuilder, ReactorClientBuilder, ReactorClientModule, ReactorModule, RebuildResult, RelationalDbProcessor, Remote, RemoteFilter, RemoteMeta, SignerConfig, SnapshotValidationIssue, SyncOperation, SyncOperationStatus, ValidationResult, driveIdFromUrl, isDriveAuthError, parseDriveUrl } from "@powerhousedao/reactor";
15
- import { DragEventHandler, ReactNode } from "react";
16
- import { IRenown, LoginStatus, User } from "@renown/sdk";
17
- import { IAttachmentClient, IAttachmentService, PreprocessResult } from "@powerhousedao/reactor-attachments/client";
18
- import { Kysely } from "kysely";
16
+ import { DragEventHandler } from "react";
17
+ import { ChannelScheme, ConnectionState, ConnectionStateSnapshot, ConnectionStateSnapshot as ConnectionStateSnapshot$1, Database, DocumentChangeType, DocumentIntegrityService, DriveCollectionId, GqlRequestChannel, IChannel, IDocumentModelLoader, IDocumentModelRegistry, IProcessor, IProcessorHostModule, IProcessorHostModule as IProcessorHostModule$1, IQueue, IReactorClient, IReactorClient as IReactorClient$1, IRelationalDb, InMemoryQueue, IntervalPollTimer, Job, JwtHandler, KeyframeValidationIssue, OperationWithContext, ParsedDriveUrl, PollBehavior, PollBehavior as PollBehavior$1, ProcessorApp, ProcessorFactory, ProcessorFactoryBuilder, ProcessorFilter, ProcessorRecord, REACTOR_SCHEMA, ReactorBuilder, ReactorClientBuilder, ReactorFeatureFlags, RebuildResult, RelationalDbProcessor, Remote, RemoteFilter, RemoteMeta, SignerConfig, SnapshotValidationIssue, SyncOperation, SyncOperationStatus, ValidationResult, driveIdFromUrl, isDriveAuthError, parseDriveUrl } from "@powerhousedao/reactor";
18
+ import { AttachmentDownloadInput, AttachmentHeader, IAttachmentClient, PreprocessResult } from "@powerhousedao/reactor-attachments/client";
19
19
  import * as _powerhousedao_reactor_browser0 from "@powerhousedao/reactor-browser";
20
- import { AddPHGlobalEventHandler as AddPHGlobalEventHandler$1, BrowserReactorClientModule as BrowserReactorClientModule$1, DocumentDispatch as DocumentDispatch$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, SetPHGlobalValue as SetPHGlobalValue$1, UsePHGlobalValue as UsePHGlobalValue$1, WorkerReactorClientModule as WorkerReactorClientModule$1 } from "@powerhousedao/reactor-browser";
21
- import { DocumentModelLib as DocumentModelLib$1, Node as Node$1, RegistryPackageSource } from "@powerhousedao/shared";
22
- import { PackageInfo } from "@powerhousedao/shared/registry";
20
+ import { ConflictResolution as ConflictResolution$1, DocumentDispatch as DocumentDispatch$1, FileUploadProgressCallback as FileUploadProgressCallback$1, IReactorBrowserClient as IReactorBrowserClient$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 } from "@powerhousedao/reactor-browser";
21
+ import * as _powerhousedao_shared0 from "@powerhousedao/shared";
22
+ import { Node as Node$1 } from "@powerhousedao/shared";
23
+ import { PackageInfo, PackagePage } from "@powerhousedao/shared/registry";
23
24
 
24
25
  //#region src/actions/dispatch.d.ts
25
26
  /**
@@ -29,7 +30,7 @@ import { PackageInfo } from "@powerhousedao/shared/registry";
29
30
  * @param onErrors - Callback invoked with any errors that occurred during action execution.
30
31
  * @returns The updated document, or undefined if the dispatch failed.
31
32
  */
32
- declare function dispatchActions<TDocument = PHDocument$1, TAction = Action>(actionOrActions: TAction[] | TAction | undefined, document: TDocument | undefined, onErrors?: (errors: Error[]) => void, onSuccess?: (result: PHDocument$1) => void): Promise<PHDocument$1 | undefined>;
33
+ 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>;
33
34
  /**
34
35
  * Dispatches actions to a document.
35
36
  * @param actionOrActions - The action or actions to dispatch.
@@ -37,20 +38,38 @@ declare function dispatchActions<TDocument = PHDocument$1, TAction = Action>(act
37
38
  * @param onErrors - Callback invoked with any errors that occurred during action execution.
38
39
  * @returns The updated document, or undefined if the dispatch failed.
39
40
  */
40
- declare function dispatchActions(actionOrActions: Action[] | Action | undefined, documentId: string, onErrors?: (errors: Error[]) => void, onSuccess?: (result: PHDocument$1) => void): Promise<PHDocument$1 | undefined>;
41
+ declare function dispatchActions(actionOrActions: Action$1[] | Action$1 | undefined, documentId: string, onErrors?: (errors: Error[]) => void, onSuccess?: (result: PHDocument$1) => void): Promise<PHDocument$1 | undefined>;
41
42
  //#endregion
42
43
  //#region src/actions/document.d.ts
43
44
  declare function exportFile(document: PHDocument$1, suggestedName?: string): Promise<void | FileSystemFileHandle>;
44
- declare function addDocument(driveId: string, name: string, documentType: string, parentFolder?: string, document?: PHDocument$1, id?: string, preferredEditor?: string): Promise<{
45
+ /**
46
+ * Loads a document file and replays it with version-aware reducers from the registry.
47
+ * Falls back to single-version legacy replay when no upgrade manifest is registered for
48
+ * the document type.
49
+ */
50
+ declare function loadFile(path: string | File): Promise<PHDocument$1<PHBaseState>>;
51
+ declare function addDocument(driveId: string, name: string, documentType: string, parentFolder?: string, document?: PHDocument$1, id?: string, preferredEditor?: string, documentModelVersion?: number): Promise<{
45
52
  id: string;
46
53
  name: string;
47
54
  documentType: string;
48
55
  parentFolder: string | null;
49
56
  kind: "file";
50
57
  }>;
58
+ declare function addFileWithProgress(file: string | File, driveId: string, name?: string, parentFolder?: string, onProgress?: FileUploadProgressCallback$1, documentTypes?: string[], resolveConflict?: ConflictResolution$1): Promise<{
59
+ id: string;
60
+ name: string;
61
+ documentType: string;
62
+ parentFolder: string | null;
63
+ kind: "file";
64
+ } | undefined>;
51
65
  declare function addFolder(driveId: string, name: string, parentFolder?: string): Promise<Node>;
52
66
  declare function deleteNode(driveId: string, nodeId: string): Promise<void>;
53
67
  declare function renameDriveNode(driveId: string, nodeId: string, name: string): Promise<Node | undefined>;
68
+ /**
69
+ * Upgrades a document to a newer document model version. Defaults to the
70
+ * latest registered version for the document's type.
71
+ */
72
+ declare function upgradeDocument(documentId: string, toVersion?: number): Promise<PHDocument$1>;
54
73
  //#endregion
55
74
  //#region src/actions/drive.d.ts
56
75
  type AddRemoteDriveOptions = {
@@ -91,59 +110,25 @@ declare const COMMON_PACKAGE_ID = "powerhouse/common";
91
110
  /** Document types that represent a "drive": a container of nodes. */
92
111
  declare const DRIVE_DOCUMENT_TYPES: readonly ["powerhouse/document-drive", "powerhouse/reactor-drive"];
93
112
  //#endregion
94
- //#region src/types/documents.d.ts
95
- type DocumentDispatch<TAction extends Action> = (actionOrActions: TAction | TAction[] | DocumentAction | DocumentAction[] | undefined, onErrors?: (errors: Error[]) => void, onSuccess?: (result: PHDocument$1) => void) => void;
96
- type PromiseWithState<T> = Promise<T> & PromiseState<T>;
97
- type FulfilledPromise<T> = Promise<T> & {
98
- status: "fulfilled";
99
- value: T;
100
- };
101
- type RejectedPromise<T> = Promise<T> & {
102
- status: "rejected";
103
- reason: unknown;
104
- };
105
- type PromiseState<T> = {
106
- status: "pending";
107
- } | {
108
- status: "fulfilled";
109
- value: T;
110
- } | {
111
- status: "rejected";
112
- reason: unknown;
113
- };
114
- interface IDocumentCache {
115
- get(id: string, refetch?: boolean): Promise<PHDocument$1>;
116
- getBatch(ids: string[], refetch?: boolean): Promise<PHDocument$1[]>;
117
- subscribe(id: string | string[], callback: () => void): () => void;
113
+ //#region src/errors.d.ts
114
+ declare class UnsupportedDocumentTypeError extends Error {
115
+ constructor(documentType: string);
116
+ static isError(error: unknown): error is UnsupportedDocumentTypeError;
118
117
  }
119
- //#endregion
120
- //#region src/document-cache.d.ts
121
- declare function addPromiseState<T>(promise: Promise<T>): PromiseWithState<T>;
122
- declare function readPromiseState<T>(promise: Promise<T> | PromiseWithState<T>): PromiseState<T>;
123
- /**
124
- * Document cache implementation that uses the new ReactorClient API.
125
- *
126
- * This cache subscribes to document change events via IReactorClient.subscribe()
127
- * and automatically updates the cache when documents are created, updated, or deleted.
128
- */
129
- declare class DocumentCache implements IDocumentCache {
130
- private client;
131
- private documents;
132
- private batchPromises;
133
- private listeners;
134
- private unsubscribe;
135
- constructor(client: IReactorClient$1);
136
- private handleDocumentChange;
137
- private handleDocumentDeleted;
138
- private handleDocumentUpdated;
139
- private invalidateBatchesContaining;
140
- get(id: string, refetch?: boolean): Promise<PHDocument$1>;
141
- getBatch(ids: string[]): Promise<PHDocument$1[]>;
142
- subscribe(id: string | string[], callback: () => void): () => void;
143
- /**
144
- * Disposes of the cache and unsubscribes from document change events.
145
- */
146
- dispose(): void;
118
+ declare class DocumentNotFoundError extends Error {
119
+ constructor(documentId: string);
120
+ }
121
+ declare class DocumentModelNotFoundError extends Error {
122
+ readonly documentType: string;
123
+ readonly name = "DocumentModelNotFoundError";
124
+ constructor(documentType: string);
125
+ static isError(error: unknown): error is DocumentModelNotFoundError;
126
+ }
127
+ declare class DocumentTypeMismatchError extends Error {
128
+ constructor(documentId: string, expectedType: string, actualType: string);
129
+ }
130
+ declare class NoSelectedDocumentError extends Error {
131
+ constructor();
147
132
  }
148
133
  //#endregion
149
134
  //#region src/global/types.d.ts
@@ -254,6 +239,8 @@ declare const useIsDriveAnalyticsEnabled: () => boolean | undefined, setIsDriveA
254
239
  declare const useRenownUrl: () => string | undefined, setRenownUrl: (value: string | undefined) => void, addRenownUrlEventHandler: () => void;
255
240
  declare const useRenownNetworkId: () => string | undefined, setRenownNetworkId: (value: string | undefined) => void, addRenownNetworkIdEventHandler: () => void;
256
241
  declare const useRenownChainId: () => number | undefined, setRenownChainId: (value: number | undefined) => void, addRenownChainIdEventHandler: () => void;
242
+ declare const useSwitchboardUrl: () => string | undefined, setSwitchboardUrl: (value: string | undefined) => void, addSwitchboardUrlEventHandler: () => void;
243
+ declare const useRenownAdapters: () => _powerhousedao_shared0.PHConnectRenownAdapters | undefined, setRenownAdapters: (value: _powerhousedao_shared0.PHConnectRenownAdapters | undefined) => void, addRenownAdaptersEventHandler: () => void;
257
244
  declare const useSentryRelease: () => string | undefined, setSentryRelease: (value: string | undefined) => void, addSentryReleaseEventHandler: () => void;
258
245
  declare const useSentryDsn: () => string | undefined, setSentryDsn: (value: string | undefined) => void, addSentryDsnEventHandler: () => void;
259
246
  declare const useSentryEnv: () => string | undefined, setSentryEnv: (value: string | undefined) => void, addSentryEnvEventHandler: () => void;
@@ -401,451 +388,6 @@ declare function usePHDocumentEditorConfigByKey<TKey extends PHDocumentEditorCon
401
388
  //#region src/hooks/config/utils.d.ts
402
389
  declare function callGlobalSetterForKey<TKey extends PHGlobalConfigKey$1>(key: TKey, value: PHGlobalConfig$1[TKey] | undefined): void;
403
390
  //#endregion
404
- //#region src/types/config.d.ts
405
- type PHGlobalConfig = PHCommonGlobalConfig & PHAppConfig & PHDocumentEditorConfig & PHDrivesGlobalConfig & PHAnalyticsGlobalConfig & PHRelationalProcessorsGlobalConfig & PHProcessorsGlobalConfig & PHRenownGlobalConfig & PHSentryGlobalConfig;
406
- type PHGlobalConfigKey = keyof PHGlobalConfig;
407
- type PHGlobalConfigSetters = PHGlobalConfigSettersForKey<PHGlobalConfigKey>;
408
- type PHGlobalConfigHooks = PHGlobalConfigHooksForKey<PHGlobalConfigKey>;
409
- /**
410
- * Editor configuration settings which are globally available to your custom apps.
411
- *
412
- * Setting these will override the defaults when your editor is mounted.
413
- */
414
- type PHAppConfig = {
415
- /** Allows you to specify the document types that are allowed to be added to the drive.
416
- * An empty array means that any document type is allowed.
417
- */
418
- allowedDocumentTypes?: string[]; /** Whether drag and drop is enabled for the app. */
419
- isDragAndDropEnabled?: boolean;
420
- };
421
- type PHAppConfigKey = keyof PHAppConfig;
422
- type PHAppConfigSetters = PHGlobalConfigSettersForKey<PHAppConfigKey>;
423
- type PHAppConfigHooks = PHGlobalConfigHooksForKey<PHAppConfigKey>;
424
- type PHDocumentEditorConfig = {
425
- /** Whether external controls are enabled for the document editor. */isExternalControlsEnabled?: boolean;
426
- };
427
- type PHDocumentEditorConfigKey = keyof PHDocumentEditorConfig;
428
- type PHDocumentEditorConfigSetters = PHGlobalConfigSettersForKey<PHDocumentEditorConfigKey>;
429
- type PHDocumentEditorConfigHooks = PHGlobalConfigHooksForKey<PHDocumentEditorConfigKey>;
430
- type PHCommonGlobalConfig = {
431
- basePath?: string;
432
- routerBasename?: string;
433
- version?: string;
434
- requiresHardRefresh?: boolean;
435
- warnOutdatedApp?: boolean;
436
- studioMode?: boolean;
437
- versionCheckInterval?: number;
438
- cliVersion?: string;
439
- fileUploadOperationsChunkSize?: number;
440
- gaTrackingId?: string;
441
- isDocumentModelSelectionSettingsEnabled?: boolean;
442
- isAddDriveEnabled?: boolean;
443
- isPublicDrivesEnabled?: boolean;
444
- isAddPublicDrivesEnabled?: boolean;
445
- isDeletePublicDrivesEnabled?: boolean;
446
- isCloudDrivesEnabled?: boolean;
447
- isAddCloudDrivesEnabled?: boolean;
448
- isDeleteCloudDrivesEnabled?: boolean;
449
- isLocalDrivesEnabled?: boolean;
450
- isAddLocalDrivesEnabled?: boolean;
451
- isDeleteLocalDrivesEnabled?: boolean;
452
- allowList?: string[];
453
- analyticsDatabaseName?: string;
454
- logLevel?: "debug" | "info" | "warn" | "error";
455
- isEditorDebugModeEnabled?: boolean;
456
- isEditorReadModeEnabled?: boolean;
457
- disabledEditors?: string[];
458
- enabledEditors?: string[];
459
- };
460
- type PHDrivesGlobalConfig = {
461
- defaultDrivesUrl?: string;
462
- drivesPreserveStrategy?: string;
463
- };
464
- type PHAnalyticsGlobalConfig = {
465
- isAnalyticsEnabled?: boolean;
466
- isAnalyticsDatabaseWorkerEnabled?: boolean;
467
- isDiffAnalyticsEnabled?: boolean;
468
- isDriveAnalyticsEnabled?: boolean;
469
- isAnalyticsExternalProcessorsEnabled?: boolean;
470
- };
471
- type PHRelationalProcessorsGlobalConfig = {
472
- isRelationalProcessorsEnabled?: boolean;
473
- isExternalRelationalProcessorsEnabled?: boolean;
474
- };
475
- type PHProcessorsGlobalConfig = {
476
- isExternalProcessorsEnabled?: boolean;
477
- isExternalPackagesEnabled?: boolean;
478
- };
479
- type PHRenownGlobalConfig = {
480
- renownUrl?: string;
481
- renownNetworkId?: string;
482
- renownChainId?: number;
483
- };
484
- type PHSentryGlobalConfig = {
485
- sentryRelease?: string;
486
- sentryDsn?: string;
487
- sentryEnv?: string;
488
- isSentryTracingEnabled?: boolean;
489
- };
490
- type PHGlobalConfigSettersForKey<T extends PHGlobalConfigKey> = { [K in T]: (value: PHGlobalConfig[K]) => void };
491
- type PHGlobalConfigHooksForKey<TKey extends PHGlobalConfigKey> = { [K in TKey]: () => PHGlobalConfig[K] };
492
- /** Helper type for ensuring keys are all present while still allowing them to be set */
493
- type FullPHGlobalConfig = Record<PHGlobalConfigKey, PHGlobalConfig[PHGlobalConfigKey]>;
494
- //#endregion
495
- //#region src/types/modals.d.ts
496
- type PHModal = {
497
- type: "createDocument";
498
- documentType: string;
499
- } | {
500
- type: "deleteItem";
501
- id: string;
502
- } | {
503
- type: "addDrive";
504
- } | {
505
- type: "upgradeDrive";
506
- driveId: string;
507
- } | {
508
- type: "deleteDrive";
509
- driveId: string;
510
- } | {
511
- type: "driveSettings";
512
- driveId: string;
513
- } | {
514
- type: "settings";
515
- } | {
516
- type: "clearStorage";
517
- } | {
518
- type: "debugSettings";
519
- } | {
520
- type: "disclaimer";
521
- } | {
522
- type: "cookiesPolicy";
523
- } | {
524
- type: "downloadDocumentWithErrors";
525
- documentId: string;
526
- } | {
527
- type: "inspector";
528
- } | {
529
- type: "missingPackage";
530
- documentType: string;
531
- } | {
532
- type: "driveAuthRequired";
533
- };
534
- //#endregion
535
- //#region src/types/package-discovery.d.ts
536
- type PendingInstallation = {
537
- documentType: string;
538
- packageNames: string[];
539
- };
540
- type FailedInstallationReason = "no-registry" | "not-in-registry" | "registry-error" | "install-failed" | "dismissed" | "offline";
541
- type FailedInstallation = {
542
- documentType: string;
543
- reason: FailedInstallationReason;
544
- packageNames: string[];
545
- error: Error | null;
546
- };
547
- type DiscoveryEvent = {
548
- type: "type-discovered";
549
- documentType: string;
550
- packageNames: string[];
551
- } | {
552
- type: "installation-prompted";
553
- documentType: string;
554
- packageNames: string[];
555
- } | {
556
- type: "installation-approved";
557
- packageName: string;
558
- documentTypes: string[];
559
- } | {
560
- type: "installation-dismissed";
561
- packageName: string;
562
- documentTypes: string[];
563
- } | {
564
- type: "installation-failed";
565
- packageName: string;
566
- error: Error;
567
- } | {
568
- type: "registry-query-failed";
569
- documentType: string;
570
- error: Error;
571
- } | {
572
- type: "load-failed";
573
- documentType: string;
574
- reason: FailedInstallationReason;
575
- };
576
- type DiscoveryEventListener = (event: DiscoveryEvent) => void;
577
- interface IPackageDiscoveryService {
578
- load(documentType: string): Promise<DocumentModelModule$1<any>>;
579
- getPendingInstallations(): PendingInstallation[];
580
- subscribePending(listener: () => void): () => void;
581
- getFailedInstallations(): FailedInstallation[];
582
- subscribeFailed(listener: () => void): () => void;
583
- subscribeEvents(listener: DiscoveryEventListener): () => void;
584
- approveInstallation(packageName: string): Promise<void>;
585
- dismissInstallation(packageName: string): void;
586
- promptInstallation(documentType: string): void;
587
- retryInstallation(documentType: string): Promise<void>;
588
- }
589
- //#endregion
590
- //#region src/types/timeline.d.ts
591
- type TimelineBarItem = {
592
- id: string;
593
- type: "bar";
594
- addSize?: 0 | 1 | 2 | 3 | 4;
595
- delSize?: 0 | 1 | 2 | 3 | 4;
596
- timestampUtcMs?: string;
597
- additions?: number;
598
- deletions?: number;
599
- revision?: number;
600
- startDate?: Date;
601
- endDate?: Date;
602
- };
603
- type TimelineDividerItem = {
604
- id: string;
605
- type: "divider";
606
- timestampUtcMs?: string;
607
- title?: string;
608
- subtitle?: string;
609
- revision?: number;
610
- startDate?: Date;
611
- endDate?: Date;
612
- };
613
- type TimelineItem = TimelineBarItem | TimelineDividerItem;
614
- //#endregion
615
- //#region src/types/toast.d.ts
616
- type PHToastType = "default" | "success" | "error" | "warning" | "info" | "connect-success" | "connect-warning" | "connect-loading" | "connect-deleted";
617
- type PHToastOptions = {
618
- type?: PHToastType;
619
- autoClose?: number | false;
620
- containerId?: string;
621
- };
622
- type PHToastFn = (content: ReactNode | string, options?: PHToastOptions) => void;
623
- //#endregion
624
- //#region src/types/vetra.d.ts
625
- type IPackagesListener = (data: {
626
- packages: DocumentModelLib$1[];
627
- }) => void;
628
- type IPackageListerUnsubscribe = () => void;
629
- type PackageManagerInstallResult = {
630
- type: "success";
631
- package: DocumentModelLib$1;
632
- } | {
633
- type: "error";
634
- error: Error;
635
- };
636
- interface IPackageManager extends IDocumentModelLoader$1 {
637
- registryUrl: string | null;
638
- packages: DocumentModelLib$1[];
639
- addPackage(packageName: string): Promise<PackageManagerInstallResult> | PackageManagerInstallResult;
640
- addPackages(packageNames: string[]): Promise<PackageManagerInstallResult[]> | PackageManagerInstallResult[];
641
- removePackage(name: string): void;
642
- updateLocalPackage(pkg: DocumentModelLib$1, version?: string): void;
643
- subscribe(handler: IPackagesListener): IPackageListerUnsubscribe;
644
- getPackageSource: (packageName: string) => RegistryPackageSource | null;
645
- getPackageVersion: (packageName: string) => string | undefined;
646
- /**
647
- * Registry-installed packages keyed by their storage name (the registry
648
- * spec, e.g. "@powerhousedao/clint-common"). Used by callers that need to
649
- * diff against an external source of truth such as the publish-reload
650
- * channel's `/__packages` SSE feed.
651
- */
652
- getRegistryPackages: () => {
653
- name: string;
654
- version: string | undefined;
655
- }[];
656
- addLocalPackage: (name: string, loadedPackage: DocumentModelLib$1, version?: string) => void;
657
- }
658
- //#endregion
659
- //#region src/hooks/node-drag-and-drop.d.ts
660
- type DraggingNode = {
661
- srcId: string;
662
- parentId: string | null | undefined;
663
- };
664
- declare const addDraggingNodeEventHandler: () => void;
665
- declare function useDragNode(args: {
666
- srcId: string | undefined;
667
- parentId: string | null | undefined;
668
- }): {
669
- isDragging: boolean;
670
- draggable: boolean;
671
- onDragStart: DragEventHandler;
672
- onDragEnd: DragEventHandler;
673
- };
674
- declare function useDropNode(targetId: string | undefined): {
675
- isDropTarget: boolean;
676
- onDragEnter: DragEventHandler;
677
- onDragOver: DragEventHandler;
678
- onDragLeave: DragEventHandler;
679
- onDrop: DragEventHandler;
680
- };
681
- //#endregion
682
- //#region src/types/global.d.ts
683
- interface BrowserReactorModule extends InProcessReactorModule {
684
- pg: PGlite;
685
- }
686
- interface BrowserReactorClientModule extends InProcessReactorClientModule {
687
- kind: "browser";
688
- reactorModule: BrowserReactorModule | undefined;
689
- }
690
- type WorkerReactorModule = ReactorModule;
691
- interface WorkerReactorClientModule extends ReactorClientModule {
692
- kind: "worker";
693
- reactorModule: WorkerReactorModule;
694
- adminClient: IWorkerAdminClient;
695
- inspector: IInspectorProxy;
696
- }
697
- type LOADING = null;
698
- type PHGlobal = PHGlobalConfig & {
699
- loading?: boolean;
700
- reactorClientModule?: BrowserReactorClientModule | WorkerReactorClientModule;
701
- reactorClient?: IReactorClient$1;
702
- attachmentService?: IAttachmentService;
703
- reactorGraphQLClient?: ReactorGraphQLClient | undefined;
704
- renown?: IRenown | LOADING;
705
- vetraPackageManager?: IPackageManager;
706
- drives?: DocumentDriveDocument[];
707
- documentCache?: IDocumentCache;
708
- selectedDriveId?: string;
709
- selectedNodeId?: string;
710
- draggingNode?: DraggingNode;
711
- modal?: PHModal;
712
- selectedTimelineRevision?: string | number | null;
713
- revisionHistoryVisible?: boolean;
714
- selectedTimelineItem?: TimelineItem | null;
715
- packageDiscoveryService?: IPackageDiscoveryService;
716
- features?: Map<string, boolean>;
717
- toast?: PHToastFn;
718
- };
719
- type PHGlobalKey = keyof PHGlobal;
720
- type PHGlobalValue = PHGlobal[PHGlobalKey];
721
- type UsePHGlobalValue<TValue extends PHGlobalValue> = () => TValue | undefined;
722
- type SetPHGlobalValue<TValue extends PHGlobalValue> = (value: TValue | undefined) => void;
723
- type AddPHGlobalEventHandler = () => void;
724
- type PHGlobalEventHandlerAdders = Record<PHGlobalKey, AddPHGlobalEventHandler>;
725
- type SetEvent<TKey extends PHGlobalKey> = CustomEvent<{ [key in TKey]: PHGlobal[TKey] | undefined }>;
726
- declare global {
727
- interface Window {
728
- ph?: PHGlobal;
729
- }
730
- interface WindowEventMap extends GraphQLClientWindowEvents {}
731
- } //# sourceMappingURL=global.d.ts.map
732
- //#endregion
733
- //#region src/hooks/document-cache.d.ts
734
- /** Returns all documents in the reactor. */
735
- declare const useDocumentCache: UsePHGlobalValue<IDocumentCache>;
736
- /** Sets all of the documents in the reactor. */
737
- declare const setDocumentCache: SetPHGlobalValue<IDocumentCache>;
738
- /** Adds an event handler for all of the documents in the reactor. */
739
- declare const addDocumentCacheEventHandler: () => void;
740
- /**
741
- * Retrieves a document from the reactor and subscribes to changes using React Suspense.
742
- * This hook will suspend rendering while the document is loading.
743
- * @param id - The document ID to retrieve, or null/undefined to skip retrieval
744
- * @returns The document if found, or undefined if id is null/undefined
745
- */
746
- declare function useDocument(id: string | null | undefined): PHDocument$1 | undefined;
747
- /**
748
- * Retrieves a document from the reactor and subscribes to changes without
749
- * suspending or throwing. Use this when the ID might be stale (e.g., a
750
- * previously selected node that has since been deleted) and the consumer
751
- * wants to render a placeholder instead of crashing.
752
- *
753
- * Unlike {@link useGetDocumentAsync}, this hook subscribes to cache
754
- * updates, so the returned state stays in sync with reactor changes.
755
- *
756
- * @param id - The document ID to retrieve, or null/undefined to skip retrieval
757
- * @returns An object containing:
758
- * - status: "initial" | "pending" | "success" | "error"
759
- * - data: The document if successfully loaded
760
- * - isPending: Whether the document is currently loading
761
- * - error: Any error that occurred during loading (e.g., document not found)
762
- * - reload: Function to force a refetch, or undefined when no id is supplied
763
- */
764
- declare function useDocumentSafe(id: string | null | undefined): {
765
- readonly status: "initial";
766
- readonly isPending: false;
767
- readonly error: undefined;
768
- readonly data: undefined;
769
- readonly reload: undefined;
770
- } | {
771
- readonly reload: () => Promise<PHDocument$1>;
772
- readonly status: "pending";
773
- readonly isPending: true;
774
- readonly error: undefined;
775
- readonly data: undefined;
776
- } | {
777
- readonly reload: () => Promise<PHDocument$1>;
778
- readonly status: "success";
779
- readonly isPending: false;
780
- readonly error: undefined;
781
- readonly data: PHDocument$1;
782
- } | {
783
- readonly reload: () => Promise<PHDocument$1>;
784
- readonly status: "error";
785
- readonly isPending: false;
786
- readonly error: unknown;
787
- readonly data: undefined;
788
- };
789
- /**
790
- * Retrieves multiple documents from the reactor using React Suspense.
791
- * This hook will suspend rendering while any of the documents are loading.
792
- *
793
- * Uses getBatch from the document cache which handles promise caching internally,
794
- * ensuring stable references for useSyncExternalStore.
795
- *
796
- * @param ids - Array of document IDs to retrieve, or null/undefined to skip retrieval
797
- * @returns An array of documents if found, or empty array if ids is null/undefined
798
- */
799
- declare function useDocuments(ids: string[] | null | undefined): PHDocument$1[];
800
- /**
801
- * Returns a function to retrieve a document from the cache.
802
- * The returned function fetches and returns a document by ID.
803
- * @returns A function that takes a document ID and returns a Promise of the document
804
- */
805
- declare function useGetDocument(): (id: string) => Promise<PHDocument$1>;
806
- /**
807
- * Returns a function to retrieve multiple documents from the cache.
808
- * The returned function fetches and returns documents by their IDs.
809
- * @returns A function that takes an array of document IDs and returns a Promise of the documents
810
- */
811
- declare function useGetDocuments(): (ids: string[]) => Promise<PHDocument$1[]>;
812
- /**
813
- * Retrieves a document from the reactor without suspending rendering.
814
- * Returns the current state of the document loading operation.
815
- * @param id - The document ID to retrieve, or null/undefined to skip retrieval
816
- * @returns An object containing:
817
- * - status: "initial" | "pending" | "success" | "error"
818
- * - data: The document if successfully loaded
819
- * - isPending: Boolean indicating if the document is currently loading
820
- * - error: Any error that occurred during loading
821
- * - reload: Function to force reload the document from cache
822
- */
823
- declare function useGetDocumentAsync(id: string | null | undefined): {
824
- readonly status: "initial";
825
- readonly data: undefined;
826
- readonly isPending: false;
827
- readonly error: undefined;
828
- readonly reload: undefined;
829
- } | {
830
- readonly reload: () => Promise<PHDocument$1>;
831
- readonly status: "pending";
832
- readonly isPending: true;
833
- readonly error: undefined;
834
- readonly data: undefined;
835
- } | {
836
- readonly reload: () => Promise<PHDocument$1>;
837
- readonly status: "success";
838
- readonly isPending: false;
839
- readonly error: undefined;
840
- readonly data: PHDocument$1;
841
- } | {
842
- readonly reload: () => Promise<PHDocument$1>;
843
- readonly status: "error";
844
- readonly isPending: false;
845
- readonly error: unknown;
846
- readonly data: undefined;
847
- };
848
- //#endregion
849
391
  //#region src/hooks/drives.d.ts
850
392
  /** Returns all of the drives in the reactor */
851
393
  declare const useDrives: UsePHGlobalValue<DocumentDriveDocument[]>;
@@ -858,25 +400,6 @@ declare const addDrivesEventHandler: () => void;
858
400
  declare const useLoading: () => boolean | undefined, setLoading: (value: boolean | undefined) => void, addLoadingEventHandler: () => void;
859
401
  declare const loading: LOADING;
860
402
  //#endregion
861
- //#region src/hooks/reactor.d.ts
862
- /** Returns the reactor client module (in-process or worker-backed) */
863
- declare const useReactorClientModule: UsePHGlobalValue$1<BrowserReactorClientModule$1 | WorkerReactorClientModule$1>;
864
- /** Sets the reactor client module */
865
- declare const setReactorClientModule: SetPHGlobalValue$1<BrowserReactorClientModule$1 | WorkerReactorClientModule$1>;
866
- /** Adds an event handler for the reactor client module */
867
- declare const addReactorClientModuleEventHandler: AddPHGlobalEventHandler$1;
868
- /** Returns the reactor client */
869
- declare const useReactorClient: UsePHGlobalValue$1<IReactorClient$1>;
870
- /** Sets the reactor client */
871
- declare const setReactorClient: SetPHGlobalValue$1<IReactorClient$1>;
872
- /** Adds an event handler for the reactor client */
873
- declare const addReactorClientEventHandler: AddPHGlobalEventHandler$1;
874
- declare const useSync: () => ISyncManager | undefined;
875
- declare const useSyncList: () => _powerhousedao_reactor0.Remote[];
876
- declare const useModelRegistry: () => IDocumentModelRegistry | undefined;
877
- declare const useDatabase: () => Kysely<Database$1> | undefined;
878
- declare const usePGlite: () => PGlite | undefined;
879
- //#endregion
880
403
  //#region src/hooks/connection-state.d.ts
881
404
  /**
882
405
  * Returns a map of remote name to connection state snapshot for all remotes.
@@ -888,63 +411,15 @@ declare function useConnectionStates(): ReadonlyMap<string, ConnectionStateSnaps
888
411
  */
889
412
  declare function useConnectionState(remoteName: string): ConnectionStateSnapshot$1 | undefined;
890
413
  //#endregion
891
- //#region src/hooks/renown.d.ts
892
- /** Adds an event handler for the renown instance */
893
- declare const addRenownEventHandler: () => void;
894
- /** Returns the renown instance */
895
- declare const useRenown: () => IRenown | LOADING | undefined;
896
- /** Sets the renown instance */
897
- declare const setRenown: (value: IRenown | LOADING | undefined) => void;
898
- /** Returns the DID from the renown instance */
899
- declare function useDid(): string | undefined;
900
- /** Returns the current user from the renown instance, subscribing to user events */
901
- declare function useUser(): User | undefined;
902
- /** Returns the login status, subscribing to renown status events */
903
- declare function useLoginStatus(): LoginStatus | "loading" | undefined;
904
- //#endregion
905
- //#region src/hooks/dispatch.d.ts
906
- /**
907
- * Returns a dispatch function for dispatching actions to a document.
908
- * Used internally by other hooks to provide action dispatching capabilities.
909
- * @param document - The document to dispatch actions to.
910
- * @returns A tuple containing the document and a dispatch function.
911
- */
912
- type DispatchFn<TAction> = (actionOrActions: TAction[] | TAction | undefined, onErrors?: (errors: Error[]) => void, onSuccess?: (result: PHDocument$1) => void) => void;
913
- type UseDispatchResult<TDocument, TAction> = readonly [TDocument | undefined, DispatchFn<TAction>];
914
- declare function useDispatch<TDocument = PHDocument$1, TAction = Action>(document: TDocument | undefined): UseDispatchResult<TDocument, TAction>;
915
- //#endregion
916
414
  //#region src/hooks/document-by-id.d.ts
917
415
  /** Returns a document by id. */
918
- declare function useDocumentById(id: string | null | undefined): UseDispatchResult<PHDocument$1, Action>;
416
+ declare function useDocumentById(id: string | null | undefined): UseDispatchResult<PHDocument$1, Action$1>;
919
417
  /** Returns documents by ids. */
920
418
  declare function useDocumentsByIds(ids: string[] | null | undefined): PHDocument$1[];
921
419
  //#endregion
922
- //#region src/hooks/document-model-modules.d.ts
923
- declare function useDocumentModelModules(): DocumentModelModule[] | undefined;
924
- declare function useDocumentModelModuleById(id: string | null | undefined): DocumentModelModule | undefined;
925
- //#endregion
926
420
  //#region src/hooks/document-of-type.d.ts
927
421
  /** Returns a document of a specific type, throws an error if the found document has a different type */
928
- declare function useDocumentOfType<TDocument extends PHDocument$1, TAction extends Action>(documentId: string | null | undefined, documentType: string | null | undefined): never[] | [TDocument, DocumentDispatch$1<TAction>];
929
- //#endregion
930
- //#region src/hooks/document-operations.d.ts
931
- type InternalState = {
932
- globalOperations: Operation[];
933
- localOperations: Operation[];
934
- isLoading: boolean;
935
- error: Error | undefined;
936
- };
937
- type DocumentOperationsState = InternalState & {
938
- refetch: () => void;
939
- };
940
- /**
941
- * Hook to fetch document operations via the reactor client.
942
- * Operations are no longer auto-populated on documents and must be fetched explicitly.
943
- *
944
- * @param documentId - The document ID to fetch operations for
945
- * @returns Object containing globalOperations, localOperations, isLoading, and error
946
- */
947
- declare function useDocumentOperations(documentId: string | null | undefined): DocumentOperationsState;
422
+ declare function useDocumentOfType<TDocument extends PHDocument$1, TAction extends Action$1>(documentId: string | null | undefined, documentType: string | null | undefined): never[] | [TDocument, DocumentDispatch$1<TAction>];
948
423
  //#endregion
949
424
  //#region src/hooks/document-types.d.ts
950
425
  /** Returns the document types a app supports.
@@ -954,6 +429,32 @@ declare function useDocumentOperations(documentId: string | null | undefined): D
954
429
  */
955
430
  declare function useDocumentTypes(): string[] | undefined;
956
431
  //#endregion
432
+ //#region src/hooks/document-version-status.d.ts
433
+ type DocumentVersionStatus = {
434
+ kind: "current";
435
+ documentVersion: number;
436
+ } | {
437
+ kind: "upgrade-available";
438
+ documentVersion: number;
439
+ latestVersion: number;
440
+ canUpgrade: boolean;
441
+ } | {
442
+ kind: "unsupported";
443
+ documentVersion: number;
444
+ availableVersions: number[];
445
+ };
446
+ /**
447
+ * Classifies a document's model version against the installed module
448
+ * versions. Pure logic, extracted for testing.
449
+ */
450
+ declare function getDocumentVersionStatus(documentVersion: number, availableVersions: number[], hasUpgradePath: (fromVersion: number, toVersion: number) => boolean): DocumentVersionStatus | undefined;
451
+ /**
452
+ * Compares the given document's model version against the versions available
453
+ * from installed Vetra packages. Returns undefined while packages load or
454
+ * when the document type has no installed modules.
455
+ */
456
+ declare function useDocumentVersionStatus(document: PHDocument$1 | undefined): DocumentVersionStatus | undefined;
457
+ //#endregion
957
458
  //#region src/hooks/download-document.d.ts
958
459
  declare function useDownloadDocument(id: string | undefined): () => Promise<void>;
959
460
  //#endregion
@@ -1039,7 +540,7 @@ declare function showPHModal(modal: PHModal$1): void;
1039
540
  /** Closes the current modal */
1040
541
  declare function closePHModal(): void;
1041
542
  /** Shows the create document modal */
1042
- declare function showCreateDocumentModal(documentType: string): void;
543
+ declare function showCreateDocumentModal(documentType: string, documentModelVersion?: number): void;
1043
544
  /** Shows the delete node modal */
1044
545
  declare function showDeleteNodeModal(nodeOrId: Node | string): void;
1045
546
  //#endregion
@@ -1090,12 +591,12 @@ declare function hideRevisionHistory(): void;
1090
591
  /** Returns the selected document id */
1091
592
  declare function useSelectedDocumentId(): string | undefined;
1092
593
  /** Returns the selected document. */
1093
- declare function useSelectedDocument(): readonly [PHDocument$1, DispatchFn<Action>];
594
+ declare function useSelectedDocument(): readonly [PHDocument$1, DispatchFn<Action$1>];
1094
595
  /** Returns the selected document. */
1095
- declare function useSelectedDocumentSafe(): UseDispatchResult<PHDocument$1, Action>;
596
+ declare function useSelectedDocumentSafe(): UseDispatchResult<PHDocument$1, Action$1>;
1096
597
  /** Returns the selected document of a specific type, throws an error if the found document has a different type */
1097
598
  declare function useSelectedDocumentOfType(documentType: null | undefined): never[];
1098
- declare function useSelectedDocumentOfType<TDocument extends PHDocument$1, TAction extends Action>(documentType: string): [TDocument, DocumentDispatch$1<TAction>];
599
+ declare function useSelectedDocumentOfType<TDocument extends PHDocument$1, TAction extends Action$1>(documentType: string): [TDocument, DocumentDispatch$1<TAction>];
1099
600
  //#endregion
1100
601
  //#region src/hooks/selected-drive.d.ts
1101
602
  /** Returns the selected drive id */
@@ -1276,17 +777,42 @@ declare const addVetraPackageManagerEventHandler: () => void;
1276
777
  /** Sets the Vetra package manager and registers its packages */
1277
778
  declare function setVetraPackageManager(packageManager: IPackageManager): void;
1278
779
  //#endregion
1279
- //#region src/hooks/attachment-service.d.ts
1280
- /** Returns the attachment service from window.ph */
1281
- declare const useAttachmentService: UsePHGlobalValue$1<IAttachmentService>;
1282
- /** Sets the attachment service on window.ph */
1283
- declare const setAttachmentService: SetPHGlobalValue$1<IAttachmentService>;
1284
- /** Registers the attachmentService window event handler */
1285
- declare const addAttachmentServiceEventHandler: AddPHGlobalEventHandler$1;
1286
- //#endregion
1287
780
  //#region src/hooks/use-attachments.d.ts
1288
781
  /** Returns an IAttachmentClient wrapping the current IAttachmentService, or undefined if none is set. */
1289
782
  declare function useAttachments(): IAttachmentClient | undefined;
783
+ type UseAttachmentPreviewInput = {
784
+ documentId: string; /** Pass null/undefined to render nothing (the hook stays idle). */
785
+ ref: AttachmentDownloadInput["ref"] | null | undefined;
786
+ /**
787
+ * How many times a failed attempt is retried before the hook settles on
788
+ * error. Retrying matters because a freshly attached ref is not
789
+ * immediately downloadable: the server's reference index authorizes
790
+ * downloads and only learns the (document, ref) pair once the operation
791
+ * has synced and been projected. Defaults to 3.
792
+ */
793
+ retries?: number; /** Fixed delay between attempts, in milliseconds. Defaults to 3000. */
794
+ retryDelayMs?: number;
795
+ };
796
+ type UseAttachmentPreviewReturn = {
797
+ /** Object URL ready for img/iframe/video src; undefined while loading or on error. */url: string | undefined;
798
+ header: AttachmentHeader | undefined;
799
+ loading: boolean;
800
+ error: Error | undefined;
801
+ };
802
+ /**
803
+ * Document-authorized inline preview of an attachment. Downloads the bytes
804
+ * through the normal authorized flow, exposes them as an object URL, and
805
+ * revokes it automatically on unmount and whenever documentId/ref change —
806
+ * editors never touch blobs or URL lifecycles. Failed attempts are retried
807
+ * (`retries` × `retryDelayMs`) so a preview requested right after attaching
808
+ * appears as soon as the server's reference index catches up.
809
+ */
810
+ declare function useAttachmentPreview({
811
+ documentId,
812
+ ref,
813
+ retries,
814
+ retryDelayMs
815
+ }: UseAttachmentPreviewInput): UseAttachmentPreviewReturn;
1290
816
  /** Upload lifecycle status. progress is coarse (0 before/during, 1 on Done) because RemoteAttachmentUpload buffers the full body before issuing a single PUT. */
1291
817
  declare enum UploadStatus {
1292
818
  None = "None",
@@ -1347,105 +873,24 @@ declare class RegistryClient {
1347
873
  //#region src/registry/fetchers.d.ts
1348
874
  declare function trimTrailingSlash(url: string): string;
1349
875
  declare function getPackages(registryUrl: string): Promise<PackageInfo[]>;
1350
- declare function getPackagesByDocumentType(registryUrl: string, documentType: string): Promise<string[]>;
1351
- //#endregion
1352
- //#region src/remote-controller/types.d.ts
1353
- type RemoteControllerGraphQLClient = Pick<ReactorGraphQLClient, "GetDocument" | "GetDocumentWithOperations" | "GetDocumentOperations" | "MutateDocument" | "CreateDocument" | "CreateEmptyDocument" | "DeleteDocument" | "BatchGetDocumentOperations" | "BatchGetDocumentWithOperations">;
1354
- type RemoteDocumentData = PhDocumentFieldsFragment;
1355
- type RemoteOperation = GetDocumentOperationsQuery["documentOperations"]["items"][number];
1356
- type RemoteOperationResultPage = GetDocumentOperationsQuery["documentOperations"];
1357
876
  /**
1358
- * Options for creating a RemoteDocumentController.
877
+ * Fetch one page of the registry listing (trimmed items). Backed by the
878
+ * paginated `GET /packages?limit=&offset=&search=` mode. Used by the Package
879
+ * Manager's Available tab for infinite scroll + server-side search.
1359
880
  */
1360
- type RemoteControllerOptions = {
1361
- client: RemoteControllerGraphQLClient; /** Remote document id. Omit for new documents. */
1362
- documentId?: string; /** "batch" requires explicit push(), "streaming" auto-pushes after actions. Defaults to "batch" */
1363
- mode?: "batch" | "streaming"; /** Optional signer for action signing. */
1364
- signer?: ISigner; /** Branch name, defaults to "main". */
1365
- branch?: string; /** Parent document identifier for creating new documents. */
1366
- parentIdentifier?: string; /** Conflict resolution strategy when remote has new operations. Default: no check (current behavior). */
1367
- onConflict?: ConflictStrategy; /** Called when a streaming-mode push fails. If not provided, errors are silently swallowed. */
1368
- onPushError?: (error: unknown) => void; /** Number of operations to fetch per page. Defaults to 100. */
1369
- operationsPageSize?: number;
1370
- };
881
+ declare function getPackagePage(registryUrl: string, params: {
882
+ limit: number;
883
+ offset: number;
884
+ search?: string;
885
+ }): Promise<PackagePage>;
1371
886
  /**
1372
- * Result of a push operation.
887
+ * Fetch full package info for every package exposing a given document type,
888
+ * via the legacy `?documentType=` filter (returns full PackageInfo objects,
889
+ * not just names). Used by the MissingPackageModal to offer installs without
890
+ * loading the entire paginated listing.
1373
891
  */
1374
- type PushResult = {
1375
- remoteDocument: RemoteDocumentData;
1376
- actionCount: number; /** The actions that were sent to the server (after signing, if applicable). */
1377
- operations: ReadonlyArray<Action>;
1378
- };
1379
- /**
1380
- * Sync status of the controller.
1381
- */
1382
- type SyncStatus = {
1383
- pendingActionCount: number;
1384
- connected: boolean;
1385
- documentId: string;
1386
- remoteRevision: Record<string, number>;
1387
- };
1388
- /**
1389
- * A tracked action with operation context for signing.
1390
- */
1391
- type TrackedAction = {
1392
- action: Action;
1393
- prevOpHash: string;
1394
- prevOpIndex: number;
1395
- };
1396
- /** Information about a detected conflict. */
1397
- type ConflictInfo = {
1398
- /** Remote operations added since the last pull, grouped by scope. */remoteOperations: Record<string, RemoteOperation[]>; /** Local actions pending push. */
1399
- localActions: TrackedAction[]; /** Remote revision at last pull. */
1400
- knownRevision: Record<string, number>; /** Current remote revision. */
1401
- currentRevision: Record<string, number>;
1402
- };
1403
- /** Custom merge handler receives conflict info and returns actions to push (or throws to abort). */
1404
- type MergeHandler = (conflict: ConflictInfo) => Action[] | Promise<Action[]>;
1405
- /** Conflict resolution strategy. */
1406
- type ConflictStrategy = "reject" | "rebase" | MergeHandler;
1407
- /** Event emitted when the document changes. */
1408
- type RemoteDocumentChangeEvent = {
1409
- source: "action" | "pull";
1410
- document: PHDocument$1<PHBaseState>;
1411
- };
1412
- /** Listener for document change events. */
1413
- type DocumentChangeListener = (event: RemoteDocumentChangeEvent) => void;
1414
- /** Result of fetching operations. */
1415
- type GetOperationsResult = {
1416
- operationsByScope: Record<string, RemoteOperation[]>;
1417
- };
1418
- /** Result of fetching a document together with its operations. */
1419
- type GetDocumentWithOperationsResult = {
1420
- document: RemoteDocumentData;
1421
- childIds: ReadonlyArray<string>;
1422
- operations: GetOperationsResult;
1423
- };
1424
- interface IRemoteClient {
1425
- getDocument(identifier: string, branch?: string): Promise<GetDocumentResult | null>;
1426
- /** Fetch document metadata and operations in a single call. */
1427
- getDocumentWithOperations(identifier: string, branch?: string, sinceRevision?: Record<string, number>, scopes?: string[]): Promise<GetDocumentWithOperationsResult | null>;
1428
- getAllOperations(documentId: string, branch?: string, sinceRevision?: Record<string, number>, scopes?: string[]): Promise<GetOperationsResult>;
1429
- pushActions(documentIdentifier: string, actions: ReadonlyArray<NonNullable<unknown>>, branch?: string): Promise<RemoteDocumentData>;
1430
- createDocument(document: NonNullable<unknown>, parentIdentifier?: string): Promise<RemoteDocumentData>;
1431
- createEmptyDocument(documentType: string, parentIdentifier?: string): Promise<RemoteDocumentData>;
1432
- deleteDocument(identifier: string, propagate?: PropagationMode): Promise<boolean>;
1433
- }
1434
- type GetDocumentResult = {
1435
- document: RemoteDocumentData;
1436
- childIds: ReadonlyArray<string>;
1437
- };
1438
- interface IRemoteController<TState extends PHBaseState = PHBaseState> {
1439
- readonly header: PHDocumentHeader;
1440
- readonly state: TState;
1441
- readonly operations: DocumentOperations;
1442
- readonly document: PHDocument$1<TState>;
1443
- readonly status: SyncStatus;
1444
- onChange(listener: DocumentChangeListener): () => void;
1445
- push(): Promise<PushResult>;
1446
- pull(): Promise<RemoteDocumentData>;
1447
- delete(propagate?: PropagationMode): Promise<boolean>;
1448
- }
892
+ declare function getPackagesForDocumentType(registryUrl: string, documentType: string): Promise<PackageInfo[]>;
893
+ declare function getPackagesByDocumentType(registryUrl: string, documentType: string): Promise<string[]>;
1449
894
  //#endregion
1450
895
  //#region src/remote-controller/action-tracker.d.ts
1451
896
  /**
@@ -1455,7 +900,7 @@ interface IRemoteController<TState extends PHBaseState = PHBaseState> {
1455
900
  declare class ActionTracker {
1456
901
  private pending;
1457
902
  /** Track a new action with its operation context. */
1458
- track(action: Action, prevOpHash: string, prevOpIndex: number): void;
903
+ track(action: Action$1, prevOpHash: string, prevOpIndex: number): void;
1459
904
  /** Flush all pending actions and return them. Clears the internal queue. */
1460
905
  flush(): TrackedAction[];
1461
906
  /** Number of pending actions. */
@@ -1696,7 +1141,7 @@ declare function defaultHandleError(error: Error): void;
1696
1141
  declare function downloadDocument(document: PHDocument$1 | undefined, handleError?: typeof defaultHandleError): void;
1697
1142
  //#endregion
1698
1143
  //#region src/utils/get-revision-from-date.d.ts
1699
- declare const getRevisionFromDate: (startDate?: Date, endDate?: Date, operations?: Operation[]) => number;
1144
+ declare const getRevisionFromDate: (startDate?: Date, endDate?: Date, operations?: Operation$1[]) => number;
1700
1145
  //#endregion
1701
1146
  //#region src/utils/nodes.d.ts
1702
1147
  /** Sorts nodes by name. */
@@ -1718,6 +1163,43 @@ declare function getDocumentGraphqlQuery(): string;
1718
1163
  declare function buildDocumentSubgraphQuery(identifier: string, authToken?: string): string;
1719
1164
  declare function buildDocumentSubgraphUrl(driveUrl: string, identifier: string, authToken?: string): string;
1720
1165
  //#endregion
1166
+ //#region src/utils/upgrade-preview.d.ts
1167
+ type UpgradeStepInfo = {
1168
+ toVersion: number;
1169
+ description: string;
1170
+ };
1171
+ type DocumentUpgradePreview = {
1172
+ fromVersion: number;
1173
+ toVersion: number;
1174
+ steps: UpgradeStepInfo[];
1175
+ addedFields: string[];
1176
+ removedFields: string[];
1177
+ };
1178
+ /**
1179
+ * Recursively diffs the structural shape of two values, returning dot-paths
1180
+ * of keys present in `after` but not `before` (added) and vice versa
1181
+ * (removed). Array fields are compared by the shape of a representative
1182
+ * element (the first element on each side, when both sides have one) using
1183
+ * the `path[]` notation, e.g. `todos[].status`. Only key presence is
1184
+ * compared — array length and primitive values are ignored.
1185
+ */
1186
+ declare function diffStateShapes(before: unknown, after: unknown): {
1187
+ added: string[];
1188
+ removed: string[];
1189
+ };
1190
+ /**
1191
+ * Computes a dry-run preview of upgrading `document` to the latest
1192
+ * registered version of its document model: the version jump, the upgrade
1193
+ * steps that will run, and which state fields will be added or removed.
1194
+ * Applies the upgrade reducers against a deep clone of the document, so the
1195
+ * original is left untouched.
1196
+ *
1197
+ * Returns undefined when the registry is unavailable, the document is
1198
+ * already at (or above) the latest registered version, or the upgrade path
1199
+ * cannot be computed.
1200
+ */
1201
+ declare function getDocumentUpgradePreview(document: PHDocument$1, registry: IDocumentModelRegistry | undefined): DocumentUpgradePreview | undefined;
1202
+ //#endregion
1721
1203
  //#region src/utils/url.d.ts
1722
1204
  declare function resolveUrlPathname(path: string): string;
1723
1205
  /** Returns the current path without the base path */
@@ -1756,5 +1238,5 @@ declare function getUserPermissions(): {
1756
1238
  //#region src/utils/validate-document.d.ts
1757
1239
  declare const validateDocument: (document: PHDocument$1) => ValidationError[];
1758
1240
  //#endregion
1759
- export { ActionTracker, AddPHGlobalEventHandler, BaseStorage, BrowserLocalStorage, BrowserReactorClientModule, BrowserReactorModule, COMMON_PACKAGE_ID, CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, CREDENTIAL_TYPES, ChannelScheme, ChevronDownIcon, ConflictError, type ConflictInfo, ConflictResolution, type ConflictStrategy, type ConnectionState, type ConnectionStateSnapshot, CopyIcon, CreateStoreOptions, DEFAULT_DRIVE_EDITOR_ID, DEFAULT_DRIVE_ID, DEFAULT_SWITCHBOARD_URL, DOMAIN_TYPE, DRIVE_DOCUMENT_TYPES, type Database, DisconnectIcon, DiscoveryEvent, DiscoveryEventListener, DispatchFn, DocumentCache, type RemoteDocumentChangeEvent as DocumentChangeEvent, type DocumentChangeListener, DocumentChangeType, DocumentDispatch, DocumentIntegrityService, DocumentTypeIcon, DraggingNode, DriveCollectionId, DriveSystemInfoState, EDITOR_FILE_DROP_OPT_OUT_ATTR, FailedInstallation, FailedInstallationReason, FileUploadProgress, FileUploadProgressCallback, FulfilledPromise, FullPHGlobalConfig, type GetDocumentResult, type GetDocumentWithOperationsResult, type GetOperationsResult, GqlRequestChannel, GraphQLClientDocumentCache, GraphQLClientDocumentEvent, GraphQLClientDocumentsEvent, GraphQLClientWindowEvents, GraphQLDocumentEventOperationName, GraphQLDocumentEvents, GraphQLDocumentEventsOperationName, GraphQLDocumentsEvents, type IChannel, IDocumentCache, type IDocumentModelLoader, IPackageDiscoveryService, IPackageListerUnsubscribe, IPackageManager, IPackagesListener, type IProcessor, type IProcessorHostModule, type IQueue, type IReactorClient, IReactorProcessorHostModule, type IRelationalDb, type IRemoteClient, type IRemoteController, ISSUER_TYPE, IStorage, InMemoryQueue, IntervalPollTimer, type Job, type JwtHandler, type KeyframeValidationIssue, LOADING, type MergeHandler, NodeKind, type OperationWithContext, PHAnalyticsGlobalConfig, PHAppConfig, PHAppConfigHooks, PHAppConfigKey, PHAppConfigSetters, PHCommonGlobalConfig, PHDocumentEditorConfig, PHDocumentEditorConfigHooks, PHDocumentEditorConfigKey, PHDocumentEditorConfigSetters, PHDrivesGlobalConfig, PHGlobal, PHGlobalConfig, PHGlobalConfigHooks, PHGlobalConfigHooksForKey, PHGlobalConfigKey, PHGlobalConfigSetters, PHGlobalConfigSettersForKey, PHGlobalEventHandlerAdders, PHGlobalKey, PHGlobalValue, PHModal, PHProcessorsGlobalConfig, PHRelationalProcessorsGlobalConfig, PHRenownGlobalConfig, PHSentryGlobalConfig, PHToastFn, PHToastOptions, PHToastType, PackageManagerInstallResult, type ParsedDriveUrl, PendingInstallation, PollBehavior, type ProcessorApp, type ProcessorFactory, type ProcessorFactoryBuilder, type ProcessorFilter, type ProcessorRecord, PromiseState, PromiseWithState, PropagationMode, PublishEvent, type PushResult, QueryCallbackReturnType, REACTOR_SCHEMA, RENOWN_CHAIN_ID, RENOWN_NETWORK_ID, RENOWN_URL, ReactorBuilder, ReactorClientBuilder, ReactorDefaultDrivesConfig, ReactorGraphQLClient, type RebuildResult, RefreshReactorDataConfig, RegistryClient, RejectedPromise, RelationalDbProcessor, RelationalDbWithLive, type Remote, RemoteClient, type RemoteControllerGraphQLClient, type RemoteControllerOptions, RemoteDocumentController, type RemoteDocumentControllerWith, type RemoteDocumentData, type RemoteFilter, type RemoteMeta, type RemoteOperation, type RemoteOperationResultPage, Renown, RenownAuth, RenownAuthButton, RenownAuthButtonProps, RenownAuthStatus, RenownInitOptions, RenownLoginButton, RenownLoginButtonProps, RenownLogo, RenownProps, RenownUserButton, RenownUserButtonMenuItem, RenownUserButtonProps, SetEvent, SetPHGlobalValue, type SignerConfig, type SnapshotValidationIssue, SpinnerIcon, type SyncOperation, SyncOperationStatus, type SyncStatus, TStateSchemaZodObject, TimelineBarItem, TimelineDividerItem, TimelineItem, type TrackedAction, UISyncStatus, UploadStatus, UseAttachmentUploadReturn, UseDispatchResult, UseEditorFileDropOptions, UseEditorFileDropResult, UseOnDropFile, UsePHGlobalValue, UserIcon, VERIFIABLE_CREDENTIAL_EIP712_TYPE, type ValidationResult, WorkerReactorClientModule, WorkerReactorModule, addAllowListEventHandler, addAllowedDocumentTypesEventHandler, addAnalyticsDatabaseNameEventHandler, addAttachmentServiceEventHandler, addBasePathEventHandler, addCliVersionEventHandler, addDefaultDrivesUrlEventHandler, addDisabledEditorsEventHandler, addDocument, addDocumentCacheEventHandler, addDraggingNodeEventHandler, addDrive, addDrivesEventHandler, addDrivesPreserveStrategyEventHandler, addEnabledEditorsEventHandler, addFeaturesEventHandler, addFileUploadOperationsChunkSizeEventHandler, addFolder, addGaTrackingIdEventHandler, addGraphQLReactorClientEventHandler, addIsAddCloudDrivesEnabledEventHandler, addIsAddDriveEnabledEventHandler, addIsAddLocalDrivesEnabledEventHandler, addIsAddPublicDrivesEnabledEventHandler, addIsAnalyticsDatabaseWorkerEnabledEventHandler, addIsAnalyticsEnabledEventHandler, addIsAnalyticsExternalProcessorsEnabledEventHandler, addIsCloudDrivesEnabledEventHandler, addIsDeleteCloudDrivesEnabledEventHandler, addIsDeleteLocalDrivesEnabledEventHandler, addIsDeletePublicDrivesEnabledEventHandler, addIsDiffAnalyticsEnabledEventHandler, addIsDocumentModelSelectionSettingsEnabledEventHandler, addIsDragAndDropEnabledEventHandler, addIsDriveAnalyticsEnabledEventHandler, addIsEditorDebugModeEnabledEventHandler, addIsEditorReadModeEnabledEventHandler, addIsExternalControlsEnabledEventHandler, addIsExternalPackagesEnabledEventHandler, addIsExternalProcessorsEnabledEventHandler, addIsExternalRelationalProcessorsEnabledEventHandler, addIsLocalDrivesEnabledEventHandler, addIsPublicDrivesEnabledEventHandler, addIsRelationalProcessorsEnabledEventHandler, addIsSentryTracingEnabledEventHandler, addLoadingEventHandler, addLocalDrivesEnabledEventHandler, addLogLevelEventHandler, addModalEventHandler, addPHEventHandlers, addPackageDiscoveryServiceEventHandler, addPromiseState, addReactorClientEventHandler, addReactorClientModuleEventHandler, addRemoteDrive, addRenownChainIdEventHandler, addRenownEventHandler, addRenownNetworkIdEventHandler, addRenownUrlEventHandler, addRequiresHardRefreshEventHandler, addResetSelectedNodeEventHandler, addRevisionHistoryVisibleEventHandler, addRouterBasenameEventHandler, addSelectedDriveIdEventHandler, addSelectedNodeIdEventHandler, addSelectedTimelineItemEventHandler, addSelectedTimelineRevisionEventHandler, addSentryDsnEventHandler, addSentryEnvEventHandler, addSentryReleaseEventHandler, addSetSelectedDriveOnPopStateEventHandler, addSetSelectedNodeOnPopStateEventHandler, addStudioModeEventHandler, addToastEventHandler, addVersionCheckIntervalEventHandler, addVersionEventHandler, addVetraPackageManagerEventHandler, addWarnOutdatedAppEventHandler, baseDocumentModels, baseDocumentModelsMap, buildDocumentSubgraphQuery, buildDocumentSubgraphUrl, callEventHandlerRegisterFunctions, callGlobalSetterForKey, clearGlobal, closePHModal, commonGlobalEventHandlerFunctions, convertRemoteOperations, createAnalyticsStore, createClient, createProcessorQuery, createUrlWithPreservedParams, deleteDrive, deleteNode, deriveSystemUrl, dispatchActions, downloadDocument, driveIdFromUrl, dropAllReactorStorage, exportFile, extractDriveIdFromPath, extractDriveIdFromSlug, extractDriveSlugFromPath, extractNodeIdFromPath, extractNodeIdFromSlug, extractNodeSlugFromPath, findUuid, getAnalyticsStore, getDocumentGraphqlQuery, getDriveIdBySlug, getDrives, getGlobal, getPackages, getPackagesByDocumentType, getPathWithoutBase, getRevisionFromDate, getSlugFromDriveUrl, getSwitchboardGatewayUrlFromDriveUrl, getSyncStatus, getSyncStatusSync, getUserPermissions, graphqlDocumentEvents, graphqlDocumentsEvents, graphqlEventsToSyncDrive, hasPreloadBandwidth, hideRevisionHistory, identifierFromMutateDocumentOperationVariables, initConnectCrypto, initRenownCrypto, initTheme, isDocumentTypeSupported, isDriveAuthError, isExternalControlsEnabledEventFunctions, isFileNodeKind, isFolderNodeKind, loading, login, logout, makeDriveUrlComponent, makeNodeSlug, makePHEventFunctions, openRenown, parseDriveUrl, phAppConfigHooks, phAppConfigSetters, phDocumentEditorConfigHooks, phDocumentEditorConfigSetters, phDocumentFromQuery, phDocumentsFromQuery, phGlobalConfigHooks, phGlobalConfigSetters, preloadEditorModule, reactorGraphqlBatchFetchDocuments, reactorGraphqlCreateDocument, reactorGraphqlDeleteDocument, reactorGraphqlDeleteDocuments, reactorGraphqlFetchDocument, reactorGraphqlMutateDocument, readPromiseState, refreshReactorData, refreshReactorDataClient, renameDrive, renameDriveNode, resolveUrlPathname, setAllowList, setAllowedDocumentTypes, setAnalyticsDatabaseName, setAttachmentService, setBasePath, setCliVersion, setDefaultDrivesUrl, setDefaultPHGlobalConfig, setDisabledEditors, setDocumentCache, setDriveAvailableOffline, setDriveMetadata, setDriveSharingType, setDrives, setDrivesPreserveStrategy, setEnabledEditors, setFeatures, setFileUploadOperationsChunkSize, setGaTrackingId, setGlobal, setGraphQLReactorClient, setIsAddCloudDrivesEnabled, setIsAddDriveEnabled, setIsAddLocalDrivesEnabled, setIsAddPublicDrivesEnabled, setIsAnalyticsDatabaseWorkerEnabled, setIsAnalyticsEnabled, setIsAnalyticsExternalProcessorsEnabled, setIsCloudDrivesEnabled, setIsDeleteCloudDrivesEnabled, setIsDeleteLocalDrivesEnabled, setIsDeletePublicDrivesEnabled, setIsDiffAnalyticsEnabled, setIsDocumentModelSelectionSettingsEnabled, setIsDragAndDropEnabled, setIsDriveAnalyticsEnabled, setIsEditorDebugModeEnabled, setIsEditorReadModeEnabled, setIsExternalControlsEnabled, setIsExternalPackagesEnabled, setIsExternalProcessorsEnabled, setIsExternalRelationalProcessorsEnabled, setIsLocalDrivesEnabled, setIsPublicDrivesEnabled, setIsRelationalProcessorsEnabled, setIsSentryTracingEnabled, setLoading, setLocalDrivesEnabled, setLogLevel, setPGliteDB, setPHAppConfig, setPHAppConfigByKey, setPHDocumentEditorConfig, setPHDocumentEditorConfigByKey, setPHGlobalConfig, setPHGlobalConfigByKey, setPHModal, setPHToast, setPackageDiscoveryService, setReactorClient, setReactorClientModule, setRenown, setRenownChainId, setRenownNetworkId, setRenownUrl, setRequiresHardRefresh, setRevisionHistoryVisible, setRouterBasename, setSelectedDrive, setSelectedDriveId, setSelectedNode, setSelectedTimelineItem, setSelectedTimelineRevision, setSentryDsn, setSentryEnv, setSentryRelease, setStudioMode, setVersion, setVersionCheckInterval, setVetraPackageManager, setWarnOutdatedApp, showCreateDocumentModal, showDeleteNodeModal, showPHModal, showRevisionHistory, sortNodesByName, trimTrailingSlash, truncateAllTables, useAllowList, useAllowedDocumentModelModules, useAllowedDocumentTypes, useAnalyticsDatabaseName, useAppModuleById, useAppModules, useAttachmentService, useAttachmentUpload, useAttachments, useBasePath, useCliVersion, useConnectionState, useConnectionStates, useDatabase, useDefaultAppModule, useDefaultDrivesUrl, useDid, useDisabledEditors, useDispatch, useDocument, useDocumentById, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOfType, useDocumentOperations, useDocumentSafe, useDocumentTypes, useDocumentTypesInSelectedDrive, useDocuments, useDocumentsByIds, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useDownloadDocument, useDragNode, useDriveById, useDriveSystemInfo, useDrives, useDrivesPreserveStrategy, useDropFile, useDropNode, useEditorFileDrop, useEditorModuleById, useEditorModules, useEditorModulesForDocumentType, useEditorPreloader, useEnabledEditors, useFallbackEditorModule, useFeatures, useFileNodesInSelectedDrive, useFileNodesInSelectedFolder, useFileUploadOperationsChunkSize, useFolderById, useFolderNodesInSelectedDrive, useFolderNodesInSelectedFolder, useGaTrackingId, useGetDocument, useGetDocumentAsync, useGetDocuments, useGetSwitchboardLink, useGraphQLReactorClient, useInitReactorGraphqlClient, useIsAddCloudDrivesEnabled, useIsAddDriveEnabled, useIsAddLocalDrivesEnabled, useIsAddPublicDrivesEnabled, useIsAnalyticsDatabaseWorkerEnabled, useIsAnalyticsEnabled, useIsAnalyticsExternalProcessorsEnabled, useIsCloudDrivesEnabled, useIsDeleteCloudDrivesEnabled, useIsDeleteLocalDrivesEnabled, useIsDeletePublicDrivesEnabled, useIsDiffAnalyticsEnabled, useIsDocumentModelSelectionSettingsEnabled, useIsDragAndDropEnabled, useIsDriveAnalyticsEnabled, useIsEditorDebugModeEnabled, useIsEditorReadModeEnabled, useIsExternalControlsEnabled, useIsExternalPackagesEnabled, useIsExternalProcessorsEnabled, useIsExternalRelationalProcessorsEnabled, useIsLocalDrivesEnabled, useIsPublicDrivesEnabled, useIsRelationalProcessorsEnabled, useIsSentryTracingEnabled, useLoading, useLocalDrivesEnabled, useLogLevel, useLoginStatus, useModelRegistry, useNodeActions, useNodeById, useNodeParentFolderById, useNodePathById, useNodesInSelectedDrive, useNodesInSelectedDriveOrFolder, useNodesInSelectedFolder, useOnDropFile, usePGlite, usePHAppConfigByKey, usePHDocumentEditorConfigByKey, usePHGlobalConfigByKey, usePHModal, usePHToast, usePackageDiscoveryService, useParentFolderForSelectedNode, useReactorClient, useReactorClientModule, useRelationalDb, useRelationalQuery, useRelationalQueryOptions, useRenown, useRenownAuth, useRenownChainId, useRenownInit, useRenownNetworkId, useRenownUrl, useRequiresHardRefresh, useResetPHGlobalConfig, useRevisionHistoryVisible, useRouterBasename, useSelectedDocument, useSelectedDocumentId, useSelectedDocumentOfType, useSelectedDocumentSafe, useSelectedDrive, useSelectedDriveId, useSelectedDriveSafe, useSelectedFolder, useSelectedNode, useSelectedNodePath, useSelectedTimelineItem, useSelectedTimelineRevision, useSentryDsn, useSentryEnv, useSentryRelease, useSetDefaultPHGlobalConfig, useSetPHAppConfig, useSetPHDocumentEditorConfig, useSetPHGlobalConfig, useStudioMode, useSubgraphModules, useSupportedDocumentTypesInReactor, useSync, useSyncList, useTheme, useUser, useUserPermissions, useVersion, useVersionCheckInterval, useVetraPackageManager, useVetraPackages, useWarnOutdatedApp, validateDocument, waitForDocumentReady };
1241
+ export { ActionTracker, AddPHGlobalEventHandler, BaseStorage, BearerTokenProvider, BrowserLocalStorage, BrowserReactorClientModule, BrowserReactorModule, COMMON_PACKAGE_ID, CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, CREDENTIAL_TYPES, ChannelScheme, ChevronDownIcon, ConflictError, type ConflictInfo, ConflictResolution, type ConflictStrategy, ConnectionParams, type ConnectionState, type ConnectionStateSnapshot, CopyIcon, CreateStoreOptions, DEFAULT_DRIVE_EDITOR_ID, DEFAULT_DRIVE_ID, DEFAULT_SWITCHBOARD_URL, DOMAIN_TYPE, DRIVE_DOCUMENT_TYPES, type Database, DisconnectIcon, DiscoveryEvent, DiscoveryEventListener, DispatchFn, DocumentCache, type RemoteDocumentChangeEvent as DocumentChangeEvent, type DocumentChangeListener, DocumentChangeType, DocumentChangesEventPayload, DocumentChangesSubscriptionOptions, DocumentDispatch, DocumentIntegrityService, DocumentModelNotFoundError, DocumentNotFoundError, DocumentOperationsState, DocumentTypeIcon, DocumentTypeMismatchError, DocumentUpgradePreview, DocumentVersionStatus, DraggingNode, DriveCollectionId, DriveSystemInfoState, EDITOR_FILE_DROP_OPT_OUT_ATTR, FailedInstallation, FailedInstallationReason, FileUploadProgress, FileUploadProgressCallback, FulfilledPromise, FullPHGlobalConfig, GetDocumentQueryFields, GetDocumentQueryResult, type GetDocumentResult, type GetDocumentWithOperationsResult, type GetOperationsResult, GqlRequestChannel, GraphQLClientDocumentCache, GraphQLClientDocumentEvent, GraphQLClientDocumentsEvent, GraphQLClientWindowEvents, GraphQLDocumentEventOperationName, GraphQLDocumentEvents, GraphQLDocumentEventsOperationName, GraphQLDocumentsEvents, GraphQLReactorClient, GraphQLReactorClientOptions, GraphQLReactorProvider, GraphQLReactorProviderProps, GraphQLRequestOptions, type IChannel, IDocumentCache, type IDocumentModelLoader, IPackageDiscoveryService, IPackageListerUnsubscribe, IPackageManager, IPackagesListener, type IProcessor, type IProcessorHostModule, type IQueue, IReactorBrowserClient, type IReactorClient, IReactorProcessorHostModule, type IRelationalDb, type IRemoteClient, type IRemoteController, ISSUER_TYPE, IStorage, InMemoryQueue, IntervalPollTimer, type Job, type JwtHandler, type KeyframeValidationIssue, LOADING, type MergeHandler, MutateDocumentWithOperationsDocument, MutateDocumentWithOperationsResult, MutateDocumentWithOperationsVariables, NoSelectedDocumentError, NodeKind, type OperationWithContext, PHAnalyticsGlobalConfig, PHAppConfig, PHAppConfigHooks, PHAppConfigKey, PHAppConfigSetters, PHCommonGlobalConfig, PHDocumentEditorConfig, PHDocumentEditorConfigHooks, PHDocumentEditorConfigKey, PHDocumentEditorConfigSetters, PHDrivesGlobalConfig, PHGlobal, PHGlobalConfig, PHGlobalConfigHooks, PHGlobalConfigHooksForKey, PHGlobalConfigKey, PHGlobalConfigSetters, PHGlobalConfigSettersForKey, PHGlobalEventHandlerAdders, PHGlobalKey, PHGlobalValue, PHModal, PHProcessorsGlobalConfig, PHRelationalProcessorsGlobalConfig, PHRenownGlobalConfig, PHSentryGlobalConfig, PHToastFn, PHToastOptions, PHToastType, PackageManagerInstallResult, type ParsedDriveUrl, PendingInstallation, PollBehavior, type ProcessorApp, type ProcessorFactory, type ProcessorFactoryBuilder, type ProcessorFilter, type ProcessorRecord, PromiseState, PromiseWithState, PropagationMode, PublishEvent, type PushResult, QueryCallbackReturnType, REACTOR_SCHEMA, RENOWN_CHAIN_ID, RENOWN_INITIAL_ANONYMOUS, RENOWN_INITIAL_UNKNOWN, RENOWN_NETWORK_ID, RENOWN_URL, ReactorBuilder, ReactorClientBuilder, ReactorDefaultDrivesConfig, type ReactorFeatureFlags, ReactorGraphQLClient, ReactorOperationFieldsFragmentDoc, type RebuildResult, RefreshReactorDataConfig, RegistryClient, RejectedPromise, RelationalDbProcessor, RelationalDbWithLive, type Remote, RemoteClient, type RemoteControllerGraphQLClient, type RemoteControllerOptions, RemoteDocumentController, type RemoteDocumentControllerWith, type RemoteDocumentData, type RemoteFilter, type RemoteMeta, type RemoteOperation, type RemoteOperationResultPage, Renown, RenownAuth, RenownAuthAsync, RenownAuthButton, RenownAuthButtonProps, RenownAuthResolution, RenownAuthStatus, RenownInitOptions, RenownInitialAuth, RenownInitialUserProvider, RenownInitialUserProviderProps, RenownLoginButton, RenownLoginButtonProps, RenownLoginMethod, RenownLogo, RenownProps, RenownProvider, RenownProviderProps, RenownSessionCookieOptions, RenownSessionCookieState, RenownUserButton, RenownUserButtonMenuItem, RenownUserButtonProps, RenownWalletProvider, RenownWalletProviderProps, RevisionsListSelection, RunDocumentOptions, SdkFunctionWrapper, SetEvent, SetPHGlobalValue, type SignerConfig, type SnapshotValidationIssue, SpinnerIcon, StaticPackageManager, SubgraphSdkFactory, SubgraphSdkRegistry, type SyncOperation, SyncOperationStatus, type SyncStatus, TStateSchemaZodObject, TimelineBarItem, TimelineDividerItem, TimelineItem, type TrackedAction, TypedGraphQLDocument, UISyncStatus, UnsupportedDocumentTypeError, UpgradeStepInfo, UploadStatus, UseAttachmentPreviewInput, UseAttachmentPreviewReturn, UseAttachmentUploadReturn, UseDispatchResult, UseEditorFileDropOptions, UseEditorFileDropResult, UseOnDropFile, UsePHGlobalValue, UserIcon, VERIFIABLE_CREDENTIAL_EIP712_TYPE, type ValidationResult, WorkerReactorClientModule, WorkerReactorModule, addAllowListEventHandler, addAllowedDocumentTypesEventHandler, addAnalyticsDatabaseNameEventHandler, addAttachmentServiceEventHandler, addBasePathEventHandler, addCliVersionEventHandler, addDefaultDrivesUrlEventHandler, addDisabledEditorsEventHandler, addDocument, addDocumentCacheEventHandler, addDraggingNodeEventHandler, addDrive, addDrivesEventHandler, addDrivesPreserveStrategyEventHandler, addEnabledEditorsEventHandler, addFeaturesEventHandler, addFileUploadOperationsChunkSizeEventHandler, addFileWithProgress, addFolder, addGaTrackingIdEventHandler, addGraphQLReactorClientEventHandler, addIsAddCloudDrivesEnabledEventHandler, addIsAddDriveEnabledEventHandler, addIsAddLocalDrivesEnabledEventHandler, addIsAddPublicDrivesEnabledEventHandler, addIsAnalyticsDatabaseWorkerEnabledEventHandler, addIsAnalyticsEnabledEventHandler, addIsAnalyticsExternalProcessorsEnabledEventHandler, addIsCloudDrivesEnabledEventHandler, addIsDeleteCloudDrivesEnabledEventHandler, addIsDeleteLocalDrivesEnabledEventHandler, addIsDeletePublicDrivesEnabledEventHandler, addIsDiffAnalyticsEnabledEventHandler, addIsDocumentModelSelectionSettingsEnabledEventHandler, addIsDragAndDropEnabledEventHandler, addIsDriveAnalyticsEnabledEventHandler, addIsEditorDebugModeEnabledEventHandler, addIsEditorReadModeEnabledEventHandler, addIsExternalControlsEnabledEventHandler, addIsExternalPackagesEnabledEventHandler, addIsExternalProcessorsEnabledEventHandler, addIsExternalRelationalProcessorsEnabledEventHandler, addIsLocalDrivesEnabledEventHandler, addIsPublicDrivesEnabledEventHandler, addIsRelationalProcessorsEnabledEventHandler, addIsSentryTracingEnabledEventHandler, addLoadingEventHandler, addLocalDrivesEnabledEventHandler, addLogLevelEventHandler, addModalEventHandler, addPHEventHandlers, addPackageDiscoveryServiceEventHandler, addPromiseState, addReactorClientEventHandler, addReactorClientModuleEventHandler, addRemoteDrive, addRenownAdaptersEventHandler, addRenownChainIdEventHandler, addRenownEventHandler, addRenownNetworkIdEventHandler, addRenownUrlEventHandler, addRequiresHardRefreshEventHandler, addResetSelectedNodeEventHandler, addRevisionHistoryVisibleEventHandler, addRouterBasenameEventHandler, addSelectedDriveIdEventHandler, addSelectedNodeIdEventHandler, addSelectedTimelineItemEventHandler, addSelectedTimelineRevisionEventHandler, addSentryDsnEventHandler, addSentryEnvEventHandler, addSentryReleaseEventHandler, addSetSelectedDriveOnPopStateEventHandler, addSetSelectedNodeOnPopStateEventHandler, addStudioModeEventHandler, addSwitchboardUrlEventHandler, addToastEventHandler, addVersionCheckIntervalEventHandler, addVersionEventHandler, addVetraPackageManagerEventHandler, addWarnOutdatedAppEventHandler, ambientRenownTokenProvider, baseDocumentModels, baseDocumentModelsMap, buildDocumentSubgraphQuery, buildDocumentSubgraphUrl, callEventHandlerRegisterFunctions, callGlobalSetterForKey, clearGlobal, closePHModal, commonGlobalEventHandlerFunctions, convertRemoteOperations, createAnalyticsStore, createClient, createProcessorQuery, createUrlWithPreservedParams, deleteDrive, deleteNode, deriveSystemUrl, describeGraphQLDocument, diffStateShapes, dispatchActions, downloadDocument, driveIdFromUrl, dropAllReactorStorage, ensurePHEventHandlers, exportFile, extractDriveIdFromPath, extractDriveIdFromSlug, extractDriveSlugFromPath, extractNodeIdFromPath, extractNodeIdFromSlug, extractNodeSlugFromPath, findUuid, getAnalyticsStore, getDocumentGraphqlQuery, getDocumentUpgradePreview, getDocumentVersionStatus, getDriveIdBySlug, getDrives, getGlobal, getPackagePage, getPackages, getPackagesByDocumentType, getPackagesForDocumentType, getPathWithoutBase, getRevisionFromDate, getSlugFromDriveUrl, getSwitchboardGatewayUrlFromDriveUrl, getSyncStatus, getSyncStatusSync, getUserPermissions, graphqlDocumentEvents, graphqlDocumentsEvents, graphqlEventsToSyncDrive, hasPreloadBandwidth, hideRevisionHistory, identifierFromMutateDocumentOperationVariables, initConnectCrypto, initRenownCrypto, initTheme, isDocumentTypeSupported, isDriveAuthError, isExternalControlsEnabledEventFunctions, isFileNodeKind, isFolderNodeKind, isGraphQLReactorClient, loadFile, loading, login, logout, makeAuthConnectionParams, makeAuthMiddleware, makeDriveUrlComponent, makeNodeSlug, makePHEventFunctions, openRenown, packageFromDocumentModels, parseDriveUrl, phAppConfigHooks, phAppConfigSetters, phDocumentEditorConfigHooks, phDocumentEditorConfigSetters, phDocumentFromGetDocument, phDocumentFromMutation, phDocumentFromQuery, phDocumentsFromQuery, phGlobalConfigHooks, phGlobalConfigSetters, preloadEditorModule, reactorGraphqlBatchFetchDocuments, reactorGraphqlCreateDocument, reactorGraphqlDeleteDocument, reactorGraphqlDeleteDocuments, reactorGraphqlFetchDocument, reactorGraphqlMutateDocument, readPromiseState, refreshReactorData, refreshReactorDataClient, renameDrive, renameDriveNode, resolveUrlPathname, revisionMapFromRevisionsList, setAllowList, setAllowedDocumentTypes, setAnalyticsDatabaseName, setAttachmentService, setBasePath, setCliVersion, setDefaultDrivesUrl, setDefaultPHGlobalConfig, setDisabledEditors, setDocumentCache, setDriveAvailableOffline, setDriveMetadata, setDriveSharingType, setDrives, setDrivesPreserveStrategy, setEnabledEditors, setFeatures, setFileUploadOperationsChunkSize, setGaTrackingId, setGlobal, setGraphQLReactorClient, setIsAddCloudDrivesEnabled, setIsAddDriveEnabled, setIsAddLocalDrivesEnabled, setIsAddPublicDrivesEnabled, setIsAnalyticsDatabaseWorkerEnabled, setIsAnalyticsEnabled, setIsAnalyticsExternalProcessorsEnabled, setIsCloudDrivesEnabled, setIsDeleteCloudDrivesEnabled, setIsDeleteLocalDrivesEnabled, setIsDeletePublicDrivesEnabled, setIsDiffAnalyticsEnabled, setIsDocumentModelSelectionSettingsEnabled, setIsDragAndDropEnabled, setIsDriveAnalyticsEnabled, setIsEditorDebugModeEnabled, setIsEditorReadModeEnabled, setIsExternalControlsEnabled, setIsExternalPackagesEnabled, setIsExternalProcessorsEnabled, setIsExternalRelationalProcessorsEnabled, setIsLocalDrivesEnabled, setIsPublicDrivesEnabled, setIsRelationalProcessorsEnabled, setIsSentryTracingEnabled, setLoading, setLocalDrivesEnabled, setLogLevel, setPGliteDB, setPHAppConfig, setPHAppConfigByKey, setPHDocumentEditorConfig, setPHDocumentEditorConfigByKey, setPHGlobalConfig, setPHGlobalConfigByKey, setPHModal, setPHToast, setPackageDiscoveryService, setReactorClient, setReactorClientModule, setRenown, setRenownAdapters, setRenownChainId, setRenownNetworkId, setRenownUrl, setRequiresHardRefresh, setRevisionHistoryVisible, setRouterBasename, setSelectedDrive, setSelectedDriveId, setSelectedNode, setSelectedTimelineItem, setSelectedTimelineRevision, setSentryDsn, setSentryEnv, setSentryRelease, setStudioMode, setSwitchboardUrl, setVersion, setVersionCheckInterval, setVetraPackageManager, setWarnOutdatedApp, showCreateDocumentModal, showDeleteNodeModal, showPHModal, showRevisionHistory, signStampedAction, sortNodesByName, stampAction, startDocumentChangesSubscription, subgraphUrlFromGraphqlUrl, subscriptionsUrlFromGraphqlUrl, trimTrailingSlash, truncateAllTables, upgradeDocument, useAllowList, useAllowedDocumentModelModules, useAllowedDocumentTypes, useAnalyticsDatabaseName, useAppModuleById, useAppModules, useAttachmentPreview, useAttachmentService, useAttachmentUpload, useAttachments, useBasePath, useCliVersion, useConnectionState, useConnectionStates, useDatabase, useDefaultAppModule, useDefaultDrivesUrl, useDid, useDisabledEditors, useDispatch, useDocument, useDocumentById, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOfType, useDocumentOperations, useDocumentSafe, useDocumentTypes, useDocumentTypesInSelectedDrive, useDocumentVersionStatus, useDocuments, useDocumentsByIds, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useDownloadDocument, useDragNode, useDriveById, useDriveSystemInfo, useDrives, useDrivesPreserveStrategy, useDropFile, useDropNode, useEditorFileDrop, useEditorModuleById, useEditorModules, useEditorModulesForDocumentType, useEditorPreloader, useEnabledEditors, useFallbackEditorModule, useFeatures, useFileNodesInSelectedDrive, useFileNodesInSelectedFolder, useFileUploadOperationsChunkSize, useFolderById, useFolderNodesInSelectedDrive, useFolderNodesInSelectedFolder, useGaTrackingId, useGetDocument, useGetDocumentAsync, useGetDocuments, useGetSwitchboardLink, useGraphQLReactorClient, useInitReactorGraphqlClient, useIsAddCloudDrivesEnabled, useIsAddDriveEnabled, useIsAddLocalDrivesEnabled, useIsAddPublicDrivesEnabled, useIsAnalyticsDatabaseWorkerEnabled, useIsAnalyticsEnabled, useIsAnalyticsExternalProcessorsEnabled, useIsCloudDrivesEnabled, useIsDeleteCloudDrivesEnabled, useIsDeleteLocalDrivesEnabled, useIsDeletePublicDrivesEnabled, useIsDiffAnalyticsEnabled, useIsDocumentModelSelectionSettingsEnabled, useIsDragAndDropEnabled, useIsDriveAnalyticsEnabled, useIsEditorDebugModeEnabled, useIsEditorReadModeEnabled, useIsExternalControlsEnabled, useIsExternalPackagesEnabled, useIsExternalProcessorsEnabled, useIsExternalRelationalProcessorsEnabled, useIsLocalDrivesEnabled, useIsPublicDrivesEnabled, useIsRelationalProcessorsEnabled, useIsSentryTracingEnabled, useLoading, useLocalDrivesEnabled, useLogLevel, useLoginStatus, useModelRegistry, useNodeActions, useNodeById, useNodeParentFolderById, useNodePathById, useNodesInSelectedDrive, useNodesInSelectedDriveOrFolder, useNodesInSelectedFolder, useOnDropFile, usePGlite, usePHAppConfigByKey, usePHDocumentEditorConfigByKey, usePHGlobalConfigByKey, usePHModal, usePHToast, usePackageDiscoveryService, useParentFolderForSelectedNode, useReactorClient, useReactorClientModule, useRelationalDb, useRelationalQuery, useRelationalQueryOptions, useRenown, useRenownAdapters, useRenownAuth, useRenownAuthAsync, useRenownChainId, useRenownInit, useRenownInitialAuth, useRenownInitialUser, useRenownLoginMethods, useRenownNetworkId, useRenownSessionCookie, useRenownSessionSynced, useRenownUrl, useRequiresHardRefresh, useResetPHGlobalConfig, useRevisionHistoryVisible, useRouterBasename, useSelectedDocument, useSelectedDocumentId, useSelectedDocumentOfType, useSelectedDocumentSafe, useSelectedDrive, useSelectedDriveId, useSelectedDriveSafe, useSelectedFolder, useSelectedNode, useSelectedNodePath, useSelectedTimelineItem, useSelectedTimelineRevision, useSentryDsn, useSentryEnv, useSentryRelease, useSetDefaultPHGlobalConfig, useSetPHAppConfig, useSetPHDocumentEditorConfig, useSetPHGlobalConfig, useStudioMode, useSubgraphModules, useSupportedDocumentTypesInReactor, useSwitchboardClient, useSwitchboardUrl, useSync, useSyncList, useTheme, useUser, useUserPermissions, useVersion, useVersionCheckInterval, useVetraPackageManager, useVetraPackages, useWarnOutdatedApp, validateDocument, viewFilterInputFromViewFilter, waitForDocumentReady };
1760
1242
  //# sourceMappingURL=index.d.ts.map