@powerhousedao/reactor-browser 6.2.3-dev.1 → 6.2.3-dev.100

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 (107) hide show
  1. package/dist/attachment-service-DXfpfp98.d.ts +1757 -0
  2. package/dist/attachment-service-DXfpfp98.d.ts.map +1 -0
  3. package/dist/auth-DzIYxeEJ.d.ts +32 -0
  4. package/dist/auth-DzIYxeEJ.d.ts.map +1 -0
  5. package/dist/client-1n_ZUXeu.js +135 -0
  6. package/dist/client-1n_ZUXeu.js.map +1 -0
  7. package/dist/{client-BIHN_UyR.d.ts → client-BFk0MY6A.d.ts} +4 -3
  8. package/dist/client-BFk0MY6A.d.ts.map +1 -0
  9. package/dist/{client-DjK30EQ-.js → client-BFnMV-EO.js} +39 -22
  10. package/dist/client-BFnMV-EO.js.map +1 -0
  11. package/dist/dispatch-Cylwl2Dk.js +1173 -0
  12. package/dist/dispatch-Cylwl2Dk.js.map +1 -0
  13. package/dist/document-by-id-DdvqanGR.js +16 -0
  14. package/dist/document-by-id-DdvqanGR.js.map +1 -0
  15. package/dist/document-model-modules-BG-61uke.js +710 -0
  16. package/dist/document-model-modules-BG-61uke.js.map +1 -0
  17. package/dist/document-operations-D5QXcJbV.js +4609 -0
  18. package/dist/document-operations-D5QXcJbV.js.map +1 -0
  19. package/dist/global-DAAmZGCO.d.ts +612 -0
  20. package/dist/global-DAAmZGCO.d.ts.map +1 -0
  21. package/dist/{index-CkJNhsQo.d.ts → index-Bj1poVfa.d.ts} +32 -100
  22. package/dist/index-Bj1poVfa.d.ts.map +1 -0
  23. package/dist/{index-BIVDXw3K.d.ts → index-rtDmzViP.d.ts} +3 -3
  24. package/dist/index-rtDmzViP.d.ts.map +1 -0
  25. package/dist/index.d.ts +938 -405
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +883 -307
  28. package/dist/index.js.map +1 -1
  29. package/dist/inspector-proxy-DODqs15F.d.ts +25 -0
  30. package/dist/inspector-proxy-DODqs15F.d.ts.map +1 -0
  31. package/dist/make-ph-event-functions-B5GU5xcR.js +180 -0
  32. package/dist/make-ph-event-functions-B5GU5xcR.js.map +1 -0
  33. package/dist/{pglite-CntadC_p-9NDG14dS.d.ts → pglite-CntadC_p-DTkdF8sr.d.ts} +11 -33
  34. package/dist/pglite-CntadC_p-DTkdF8sr.d.ts.map +1 -0
  35. package/dist/{relational-D4sxGPz7.js → relational-DZuyKp2y.js} +66 -5
  36. package/dist/relational-DZuyKp2y.js.map +1 -0
  37. package/dist/{renown-BIEv6bSI.js → renown-B3MUaiq7.js} +78 -33
  38. package/dist/renown-B3MUaiq7.js.map +1 -0
  39. package/dist/renown-CBoTdGrg.js +394 -0
  40. package/dist/renown-CBoTdGrg.js.map +1 -0
  41. package/dist/{types-Dcv1ZLoW.d.ts → schema-Bn6L3QR1.d.ts} +324 -64
  42. package/dist/schema-Bn6L3QR1.d.ts.map +1 -0
  43. package/dist/{client-D66jVnot.js → schema-D0G1oAo9.js} +358 -150
  44. package/dist/schema-D0G1oAo9.js.map +1 -0
  45. package/dist/src/ai/index.d.ts +313 -79
  46. package/dist/src/ai/index.d.ts.map +1 -1
  47. package/dist/src/ai/index.js +1030 -173
  48. package/dist/src/ai/index.js.map +1 -1
  49. package/dist/src/analytics/index.d.ts +36 -44
  50. package/dist/src/analytics/index.d.ts.map +1 -1
  51. package/dist/src/analytics/index.js +4 -4
  52. package/dist/src/analytics/index.js.map +1 -1
  53. package/dist/src/document-model.d.ts +3 -4
  54. package/dist/src/document-model.d.ts.map +1 -1
  55. package/dist/src/document-model.js.map +1 -1
  56. package/dist/src/graphql/client.d.ts +4 -3
  57. package/dist/src/graphql/client.js +1 -1
  58. package/dist/src/graphql-client/entry.d.ts +7 -4
  59. package/dist/src/graphql-client/entry.js +4 -4
  60. package/dist/src/relational/index.d.ts +15 -9
  61. package/dist/src/relational/index.d.ts.map +1 -1
  62. package/dist/src/relational/index.js +1 -1
  63. package/dist/src/renown/index.d.ts +3 -2
  64. package/dist/src/renown/index.js +3 -3
  65. package/dist/src/rpc/index.d.ts +217 -140
  66. package/dist/src/rpc/index.d.ts.map +1 -1
  67. package/dist/src/rpc/index.js +602 -623
  68. package/dist/src/rpc/index.js.map +1 -1
  69. package/dist/{store-BJYcr_FL.js → store-DInXcjal.js} +1 -1
  70. package/dist/{store-BJYcr_FL.js.map → store-DInXcjal.js.map} +1 -1
  71. package/dist/switchboard-directory-CWf5SRo7.js +435 -0
  72. package/dist/switchboard-directory-CWf5SRo7.js.map +1 -0
  73. package/dist/switchboards-D-_JBUbF.d.ts +75 -0
  74. package/dist/switchboards-D-_JBUbF.d.ts.map +1 -0
  75. package/dist/{types-6vDzbRRS.d.ts → types-520nWrB3.d.ts} +2 -2
  76. package/dist/types-520nWrB3.d.ts.map +1 -0
  77. package/dist/types-CyPDurGV.d.ts +63 -0
  78. package/dist/types-CyPDurGV.d.ts.map +1 -0
  79. package/package.json +24 -23
  80. package/dist/attachment-service-CdwHrbDH.d.ts +0 -1063
  81. package/dist/attachment-service-CdwHrbDH.d.ts.map +0 -1
  82. package/dist/client-BIHN_UyR.d.ts.map +0 -1
  83. package/dist/client-D66jVnot.js.map +0 -1
  84. package/dist/client-DjK30EQ-.js.map +0 -1
  85. package/dist/document-by-id-BSZqTN66.js +0 -517
  86. package/dist/document-by-id-BSZqTN66.js.map +0 -1
  87. package/dist/document-model-modules-DfQBNGc-.js +0 -419
  88. package/dist/document-model-modules-DfQBNGc-.js.map +0 -1
  89. package/dist/document-operations-Bgo6A6W2.js +0 -2545
  90. package/dist/document-operations-Bgo6A6W2.js.map +0 -1
  91. package/dist/global-BggszP4X.d.ts +0 -401
  92. package/dist/global-BggszP4X.d.ts.map +0 -1
  93. package/dist/index-BIVDXw3K.d.ts.map +0 -1
  94. package/dist/index-CkJNhsQo.d.ts.map +0 -1
  95. package/dist/inspector-proxy-6h5VKAwt.d.ts +0 -257
  96. package/dist/inspector-proxy-6h5VKAwt.d.ts.map +0 -1
  97. package/dist/make-ph-event-functions-DBq3iWYn.js +0 -53
  98. package/dist/make-ph-event-functions-DBq3iWYn.js.map +0 -1
  99. package/dist/pglite-CntadC_p-9NDG14dS.d.ts.map +0 -1
  100. package/dist/relational-D4sxGPz7.js.map +0 -1
  101. package/dist/renown-BHxwP7xU.js +0 -97
  102. package/dist/renown-BHxwP7xU.js.map +0 -1
  103. package/dist/renown-BIEv6bSI.js.map +0 -1
  104. package/dist/switchboard-D4-_jwk-.js +0 -271
  105. package/dist/switchboard-D4-_jwk-.js.map +0 -1
  106. package/dist/types-6vDzbRRS.d.ts.map +0 -1
  107. package/dist/types-Dcv1ZLoW.d.ts.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,55 +1,72 @@
1
- import { a as getAnalyticsStore, i as createAnalyticsStore, n as IPowerhouseAnalytics, r as CreateStoreOptions } from "./types-6vDzbRRS.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-BggszP4X.js";
3
- import { $ as isGraphQLReactorClient, A as useGetDocuments, At as RemoteOperation, B as prepareSignedActions, C as setDocumentCache, Ct as IRemoteController, D as useDocuments, Dt as RemoteControllerOptions, E as useDocumentSafe, Et as RemoteControllerGraphQLClient, F as startDocumentChangesSubscription, Ft as addPromiseState, G as MutateDocumentWithOperationsVariables, H as stampAction, I as subscriptionsUrlFromGraphqlUrl, It as readPromiseState, J as GraphQLReactorProviderProps, K as ReactorOperationFieldsFragmentDoc, L as StaticPackageManager, M as DocumentChangesEventPayload, Mt as SyncStatus, N as DocumentChangesSubscriptionOptions, Nt as TrackedAction, O as useGetDocument, Ot as RemoteDocumentChangeEvent, P as makeAuthConnectionParams, Pt as DocumentCache, Q as GraphQLReactorClientOptions, R as packageFromDocumentModels, S as addDocumentCacheEventHandler, St as IRemoteClient, T as useDocumentCache, Tt as PushResult, U as MutateDocumentWithOperationsDocument, V as signStampedAction, W as MutateDocumentWithOperationsResult, X as useSwitchboardClient, Y as ensurePHEventHandlers, Z as GraphQLReactorClient, _ as usePGlite, _t as ConflictStrategy, a as useDocumentOperations, at as describeGraphQLDocument, b as useSync, bt as GetDocumentWithOperationsResult, c as DispatchFn, ct as ambientRenownTokenProvider, d as addReactorClientEventHandler, dt as GetDocumentQueryResult, et as viewFilterInputFromViewFilter, f as addReactorClientModuleEventHandler, ft as RevisionsListSelection, g as useModelRegistry, gt as ConflictInfo, h as useDatabase, ht as revisionMapFromRevisionsList, i as DocumentOperationsState, it as TypedGraphQLDocument, j as ConnectionParams, jt as RemoteOperationResultPage, k as useGetDocumentAsync, kt as RemoteDocumentData, l as UseDispatchResult, lt as makeAuthMiddleware, m as setReactorClientModule, mt as phDocumentFromMutation, n as setAttachmentService, nt as SubgraphSdkFactory, o as useDocumentModelModuleById, ot as subgraphUrlFromGraphqlUrl, p as setReactorClient, pt as phDocumentFromGetDocument, q as GraphQLReactorProvider, r as useAttachmentService, rt as SubgraphSdkRegistry, s as useDocumentModelModules, st as BearerTokenProvider, t as addAttachmentServiceEventHandler, tt as GraphQLRequestOptions, u as useDispatch, ut as GetDocumentQueryFields, v as useReactorClient, vt as DocumentChangeListener, w as useDocument, wt as MergeHandler, x as useSyncList, xt as GetOperationsResult, y as useReactorClientModule, yt as GetDocumentResult, z as resolveDocumentModelModule } from "./attachment-service-CdwHrbDH.js";
1
+ import { $ as createJobChangesSocket, $t as GetDocumentQueryFields, A as addDocumentCacheEventHandler, An as isDocumentTypeCache, At as GraphQLRequestOptions, B as DEFAULT_BREAKER, Bt as switchboardFetch, C as useModelRegistry, Cn as TrackedAction, Ct as GraphQLReactorClientOptions, D as useReactorHalves, Dn as IDLE_OPERATIONS_ENTRY, Dt as findIsServableOverGraphQL, E as useReactorClientModule, En as IDLE_DOCUMENTS_OF_TYPE_ENTRY, Et as createGraphQLDriveNodeSource, F as useDocuments, Ft as subgraphUrlFromGraphqlUrl, G as SwitchboardUnreachableError, Gt as GraphQLWrongBackendError, H as SwitchboardBackend, Ht as withStreamedBodies, I as useGetDocument, It as GraphQLFetch, J as DocumentChangesEventPayload, Jt as queriesUnknownField, K as createSwitchboardBackend, Kt as JobFailedError, L as useGetDocumentAsync, Lt as globalFetch, M as useDocument, Mn as readPromiseState, Mt as SubgraphSdkRegistry, N as useDocumentCache, Nn as IDLE_REFETCH_STATE, Nt as TypedGraphQLDocument, O as useSync, On as IDocumentCacheReader, Ot as isGraphQLReactorClient, P as useDocumentSafe, Pn as dispatchActions, Pt as describeGraphQLDocument, Q as JobChangesSocketOptions, Qt as toLegacyNode, R as useGetDocuments, Rt as isDeadlineError, S as useDatabase, Sn as SyncStatus, St as GraphQLReactorClient, T as useReactorClient, Tn as GET_MANY_CHUNK_SIZE, Tt as ambientRenownSigner, U as SwitchboardBackendDescriptor, Ut as BatchJobFailedError, V as DEFAULT_REQUEST_TIMEOUT_MS, Vt as withRequestDeadline, W as SwitchboardBreaker, Wt as GraphQLOperationNotSupportedError, X as IJobChangesSocket, Xt as GraphQLDriveNodeSource, Y as DocumentChangesSubscriptionOptions, Yt as DriveNodeQueries, Z as JobChangesEventPayload, Zt as GraphQLDriveReadClient, _ as addReactorHalvesEventHandler, _n as RemoteControllerOptions, _t as GraphQLReactorProvider, a as DocumentOperationsState, an as revisionMapFromRevisionsList, at as packageFromDocumentModels, b as setReactorClient, bn as RemoteOperation, bt as useSwitchboardClient, c as useDocumentModelModuleById, cn as DocumentChangeListener, ct as signStampedAction, d as UseDispatchResult, dn as GetOperationsResult, dt as GetDocumentAtConsistencyResult, en as GetDocumentQueryResult, et as isAuthRefusalClose, f as createDispatch, fn as IRemoteClient, ft as GetDocumentAtConsistencyVariables, g as addReactorClientModuleEventHandler, gn as RemoteControllerGraphQLClient, gt as ReactorOperationFieldsFragmentDoc, h as addReactorClientEventHandler, hn as PushResult, ht as MutateDocumentWithOperationsVariables, i as DocumentOperationsResult, in as phDocumentFromMutation, it as StaticPackageManager, j as setDocumentCache, jn as isOperationCache, jt as SubgraphSdkFactory, k as useSyncList, kn as addPromiseState, kt as viewFilterInputFromViewFilter, l as useDocumentModelModules, ln as GetDocumentResult, lt as stampAction, m as addFullReactorClientEventHandler, mn as MergeHandler, mt as MutateDocumentWithOperationsResult, n as setAttachmentService, nn as isoStringFromDateTime, nt as startDocumentChangesSubscription, o as UseDocumentOperationsOptions, on as ConflictInfo, ot as resolveDocumentModelModule, p as useDispatch, pn as IRemoteController, pt as MutateDocumentWithOperationsDocument, q as ConnectionParams, qt as queriesUnknownArgument, r as useAttachmentService, rn as phDocumentFromGetDocument, rt as subscriptionsUrlFromGraphqlUrl, s as useDocumentOperations, sn as ConflictStrategy, st as prepareSignedActions, t as addAttachmentServiceEventHandler, tn as RevisionsListSelection, tt as makeAuthConnectionParams, u as DispatchFn, un as GetDocumentWithOperationsResult, ut as GetDocumentAtConsistencyDocument, v as getFullReactorClient, vn as RemoteDocumentChangeEvent, vt as GraphQLReactorProviderProps, w as usePGlite, wn as DocumentCache, wt as GraphQLReactorReadClient, x as setReactorClientModule, xn as RemoteOperationResultPage, xt as DriveIdCall, y as setFullReactorClient, yn as RemoteDocumentData, yt as ensurePHEventHandlers, z as DEFAULT_BATCH_REQUEST_TIMEOUT_MS, zt as isNodeFetch } from "./attachment-service-DXfpfp98.js";
2
+ import { d as MutateDocumentMutation, h as PropagationMode, i as DeleteDocumentsMutation, l as GetDocumentWithOperationsQuery, n as CreateDocumentMutation, o as FindDocumentsQuery, r as DeleteDocumentMutation, t as ActionInput, v as SdkFunctionWrapper } from "./schema-Bn6L3QR1.js";
3
+ import { n as ambientRenownTokenProvider, r as makeAuthMiddleware, t as BearerTokenProvider } from "./auth-DzIYxeEJ.js";
4
+ import { a as getAnalyticsStore, i as createAnalyticsStore, n as IPowerhouseAnalytics, r as CreateStoreOptions } from "./types-520nWrB3.js";
5
+ import { $ as IPackageManager, A as loadDriveNodes, At as PHGlobalConfigKey, B as createPHStore, Bt as FulfilledPromise, C as DriveNodesCache, Ct as PHDocumentEditorConfigHooks, D as dropDriveNode, Dt as PHGlobalConfig, E as addDriveNodesEventHandler, Et as PHDrivesGlobalConfig, F as useDriveNodes, Ft as PHRenownGlobalConfig, G as notifyPHStore, Gt as PromiseState, H as getActivePHStore, Ht as IDocumentTypeCache, I as useDriveNodesCache, It as PHSentryGlobalConfig, J as DraggingNode, K as subscribePHStore, Kt as PromiseWithState, L as PHStore, Lt as DocumentDispatch, M as peekDriveNode, Mt as PHGlobalConfigSettersForKey, N as takeLocalDriveWrite, Nt as PHProcessorsGlobalConfig, O as getDriveNode, Ot as PHGlobalConfigHooks, P as useDriveNode, Pt as PHRelationalProcessorsGlobalConfig, Q as IPackageListerUnsubscribe, R as PHStoreProvider, Rt as DocumentRefetchState, S as WorkerReactorModule, St as PHDocumentEditorConfig, T as DriveNodesOptions, Tt as PHDocumentEditorConfigSetters, U as getPHStore, Ut as IOperationCache, V as ensurePHStore, Vt as IDocumentCache, W as getPHStoreSubscribe, Wt as OperationsCacheEntry, X as useDragNode, Y as addDraggingNodeEventHandler, Z as useDropNode, _ as SetEvent, _t as PHAppConfig, a as LOADING, at as TimelineBarItem, b as UsePHGlobalValue, bt as PHAppConfigSetters, c as PHGlobalEventHandlerAdders, ct as DiscoveryEvent, d as PHNavigateOptions, dt as FailedInstallationReason, et as IPackagesListener, f as PHNavigation, ft as IPackageDiscoveryService, g as SearchParamsUpdate, gt as PHAnalyticsGlobalConfig, h as PHSettingsTarget, ht as FullPHGlobalConfig, i as BrowserReactorModule, it as PHToastType, j as markLocalDriveWrite, jt as PHGlobalConfigSetters, k as invalidateDriveNodes, kt as PHGlobalConfigHooksForKey, l as PHGlobalKey, lt as DiscoveryEventListener, m as PHSearchUpdate, mt as PHModal, n as BackendAuthState, nt as PHToastFn, o as PHDriveTarget, ot as TimelineDividerItem, p as PHNavigationTarget, pt as PendingInstallation, q as usePHStore, qt as RejectedPromise, r as BrowserReactorClientModule, rt as PHToastOptions, s as PHGlobal, st as TimelineItem, t as AddPHGlobalEventHandler, tt as PackageManagerInstallResult, u as PHGlobalValue, ut as FailedInstallation, v as SetPHGlobalValue, vt as PHAppConfigHooks, w as DriveNodesEntry, wt as PHDocumentEditorConfigKey, x as WorkerReactorClientModule, xt as PHCommonGlobalConfig, y as SetSearchParams, yt as PHAppConfigKey, z as bindPHStoreToWindow, zt as DocumentsOfTypeEntry } from "./global-DAAmZGCO.js";
6
+ import { a as IReactorBrowserReadClient, i as IReactorBrowserClient, n as SwitchboardEntry, o as IReactorBrowserWriteClient, r as SwitchboardWorkflows, s as ReactorBrowserHalves, t as SwitchboardDirectory } from "./switchboards-D-_JBUbF.js";
4
7
  import { baseDocumentModels, baseDocumentModelsMap } from "./src/document-model.js";
5
- import { t as PGlite } from "./pglite-CntadC_p-9NDG14dS.js";
6
- import { r as PGliteWithLive } from "./index-BIVDXw3K.js";
7
- import { D as PropagationMode, T as MutateDocumentMutation, _ as CreateDocumentMutation, a as GraphQLDocumentEvents, c as ReactorGraphQLClient, d as DEFAULT_DRIVE_ID, f as DEFAULT_SWITCHBOARD_URL, g as ActionInput, h as graphqlEventsToSyncDrive, i as GraphQLDocumentEventOperationName, k as SdkFunctionWrapper, 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 DeleteDocumentMutation, w as GetDocumentWithOperationsQuery, x as FindDocumentsQuery, y as DeleteDocumentsMutation } from "./types-Dcv1ZLoW.js";
8
- import { t as createClient } from "./client-BIHN_UyR.js";
9
- import { $ as login, A as RENOWN_URL, B as RenownUserButton, C as CREDENTIAL_SCHEMA_EIP712_TYPE, D as ISSUER_TYPE, E as DOMAIN_TYPE, F as CopyIcon, G as RenownAuthButton, H as RenownUserButtonProps, I as DisconnectIcon, J as setRenown, K as RenownAuthButtonProps, L as RenownLogo, M as initConnectCrypto, N as initRenownCrypto, O as RENOWN_CHAIN_ID, P as ChevronDownIcon, Q as useUser, R as SpinnerIcon, S as useRenownInitialUser, T as CREDENTIAL_TYPES, U as RenownLoginButton, V as RenownUserButtonMenuItem, W as RenownLoginButtonProps, X as useLoginStatus, Y as useDid, Z as useRenown, _ as RENOWN_INITIAL_UNKNOWN, a as RenownWalletProviderProps, at as RenownAuthStatus, b as RenownInitialUserProviderProps, c as Renown, d as useRenownInit, et as logout, f as RenownSessionCookieOptions, g as RENOWN_INITIAL_ANONYMOUS, h as useRenownSessionSynced, i as RenownWalletProvider, it as RenownAuthResolution, j as VERIFIABLE_CREDENTIAL_EIP712_TYPE, k as RENOWN_NETWORK_ID, l as RenownProps, m as useRenownSessionCookie, n as RenownLoginMethod, nt as RenownAuth, o as RenownProvider, ot as useRenownAuth, p as RenownSessionCookieState, q as addRenownEventHandler, r as useRenownLoginMethods, rt as RenownAuthAsync, s as RenownProviderProps, st as useRenownAuthAsync, t as useRenownWalletAdapter, tt as openRenown, u as RenownInitOptions, v as RenownInitialAuth, w as CREDENTIAL_SUBJECT_TYPE, x as useRenownInitialAuth, y as RenownInitialUserProvider, z as UserIcon } from "./index-CkJNhsQo.js";
10
- import { QueryCallbackReturnType, RelationalDbWithLive, createProcessorQuery, useRelationalDb, useRelationalQuery, useRelationalQueryOptions } from "./src/relational/index.js";
11
- import * as document_model0 from "document-model";
8
+ import { t as PGlite } from "./pglite-CntadC_p-DTkdF8sr.js";
9
+ import { r as PGliteWithLive } from "./index-rtDmzViP.js";
10
+ import { a as GraphQLDocumentEvents, c as ReactorGraphQLClient, d as DEFAULT_DRIVE_ID, f as DEFAULT_SWITCHBOARD_URL, h as graphqlEventsToSyncDrive, i as GraphQLDocumentEventOperationName, l as RunDocumentOptions, m as graphqlDocumentsEvents, n as GraphQLClientDocumentsEvent, o as GraphQLDocumentEventsOperationName, p as graphqlDocumentEvents, r as GraphQLClientWindowEvents, s as GraphQLDocumentsEvents, t as GraphQLClientDocumentEvent, u as TStateSchemaZodObject } from "./types-CyPDurGV.js";
11
+ import { t as createClient } from "./client-BFk0MY6A.js";
12
+ import { $ as setRenown, A as DOMAIN_TYPE, B as CopyIcon, C as RenownInitialUserProvider, D as CREDENTIAL_SCHEMA_EIP712_TYPE, E as useRenownInitialUser, F as RENOWN_URL, G as RenownUserButton, H as RenownLogo, I as VERIFIABLE_CREDENTIAL_EIP712_TYPE, J as RenownLoginButton, K as RenownUserButtonMenuItem, L as initConnectCrypto, M as RENOWN_CHAIN_ID, N as RENOWN_NETWORK_ID, O as CREDENTIAL_SUBJECT_TYPE, P as RENOWN_RETURN_URL_STRIPPED_PARAMS, Q as addRenownEventHandler, R as initRenownCrypto, S as RenownInitialAuth, T as useRenownInitialAuth, U as SpinnerIcon, V as DisconnectIcon, W as UserIcon, X as RenownAuthButton, Y as RenownLoginButtonProps, Z as RenownAuthButtonProps, _ as RenownSessionCookieState, a as useRenownWalletAdapter, at as desktopShell, b as RENOWN_INITIAL_ANONYMOUS, c as RenownWalletProvider, ct as openRenown, d as RenownProviderProps, dt as RenownAuthResolution, et as useDid, f as Renown, ft as RenownAuthStatus, g as RenownSessionCookieOptions, h as useRenownInit, i as decodeDelegation, it as DesktopShell, j as ISSUER_TYPE, k as CREDENTIAL_TYPES, l as RenownWalletProviderProps, lt as RenownAuth, m as RenownInitOptions, mt as useRenownAuthAsync, n as DelegationScope, nt as useRenown, o as RenownLoginMethod, ot as login, p as RenownProps, pt as useRenownAuth, q as RenownUserButtonProps, r as createDelegation, rt as useUser, s as useRenownLoginMethods, st as logout, t as DelegationClaims, tt as useLoginStatus, u as RenownProvider, ut as RenownAuthAsync, v as useRenownSessionCookie, w as RenownInitialUserProviderProps, x as RENOWN_INITIAL_UNKNOWN, y as useRenownSessionSynced, z as ChevronDownIcon } from "./index-Bj1poVfa.js";
13
+ import { QueryCallbackReturnType, RelationalDbOptions, RelationalDbWithLive, createProcessorQuery, useRelationalDb, useRelationalQuery, useRelationalQueryOptions } from "./src/relational/index.js";
14
+ import { DragEventHandler, MouseEvent, ReactNode } from "react";
12
15
  import { DocumentModelLib, DocumentModelModule, EditorModule, PHDocument, PHDocumentController } from "document-model";
13
- import { Action as Action$1, AuthSubject, DocumentOperations, Operation as Operation$1, PHBaseState, PHDocument as PHDocument$1, PHDocumentHeader, SubgraphModule, ValidationError } from "@powerhousedao/shared/document-model";
14
- import * as _powerhousedao_shared_document_drive0 from "@powerhousedao/shared/document-drive";
16
+ import { Action as Action$1, AuthSubject, DocumentDispatch as DocumentDispatch$1, DocumentModelModule as DocumentModelModule$1, DocumentOperations, Operation as Operation$1, PHBaseState, PHDocument as PHDocument$1, PHDocumentHeader, SignaturePolicy, SubgraphModule, ValidationError } from "@powerhousedao/shared/document-model";
17
+ import { ActionCandidate, ChannelScheme, ConnectionState, ConnectionStateSnapshot, ConnectionStateSnapshot as ConnectionStateSnapshot$1, Database, DocumentChangeEvent, DocumentChangeType, DocumentIntegrityService, DriveCollectionId, Evaluation, GqlRequestChannel, IChannel, IDocumentModelLoader, IDocumentModelRegistry, IDriveReadClient, IPeerAgreement, IProcessor, IProcessorHostModuleBase, IQueue, IReactorClient, IReactorProcessorHostModuleBase, IReactorReadClient, IReactorReadClient as IReactorReadClient$1, IReactorWriteClient, IRelationalDb, ISyncManager, InMemoryQueue, IntervalPollTimer, Job, JwtHandler, KeyframeValidationIssue, OperationWithContext, ParsedDriveUrl, PollBehavior, PollBehavior as PollBehavior$1, ProcessorApp, ProcessorFactory, ProcessorFactoryBuilder as ProcessorFactoryBuilder$1, ProcessorFilter, ProcessorRecord, REACTOR_SCHEMA, ReactorBuilder, ReactorClientBuilder, ReactorFeatureFlags, RebuildResult, RelationalDbProcessor, Remote, RemoteFilter, RemoteMeta, RemotePeer, SignerConfig, SnapshotValidationIssue, SyncHold, SyncOperation, SyncOperationStatus, ValidationResult, WriteHandle, WriteReceipt, driveIdFromUrl, isDriveAuthError, parseDriveUrl } from "@powerhousedao/reactor";
15
18
  import { DocumentDriveAction, DocumentDriveDocument, DriveInput, FileNode, FolderNode, Node, SharingType } from "@powerhousedao/shared/document-drive";
16
- import { DragEventHandler } from "react";
17
- import { ActionCandidate, ChannelScheme, ConnectionState, ConnectionStateSnapshot, ConnectionStateSnapshot as ConnectionStateSnapshot$1, Database, DocumentChangeType, DocumentIntegrityService, DriveCollectionId, Evaluation, GqlRequestChannel, IChannel, IDocumentModelLoader, IDocumentModelRegistry, IProcessor, IProcessorHostModuleBase, IQueue, IReactorClient, IReactorClient as IReactorClient$1, IReactorProcessorHostModuleBase, IRelationalDb, InMemoryQueue, IntervalPollTimer, Job, JwtHandler, KeyframeValidationIssue, OperationWithContext, ParsedDriveUrl, PollBehavior, PollBehavior as PollBehavior$1, ProcessorApp, ProcessorFactory, ProcessorFactoryBuilder as ProcessorFactoryBuilder$1, ProcessorFilter, ProcessorRecord, REACTOR_SCHEMA, ReactorBuilder, ReactorClientBuilder, ReactorFeatureFlags, RebuildResult, RelationalDbProcessor, Remote, RemoteFilter, RemoteMeta, SignerConfig, SnapshotValidationIssue, SyncOperation, SyncOperationStatus, ValidationResult, driveIdFromUrl, isDriveAuthError, parseDriveUrl } from "@powerhousedao/reactor";
18
19
  import { AttachmentDownloadInput, AttachmentHeader, AttachmentUploadResult, IAttachmentClient, PreprocessResult } from "@powerhousedao/reactor-attachments/client";
19
- import * as _powerhousedao_reactor_browser0 from "@powerhousedao/reactor-browser";
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";
20
+ import { AddPHGlobalEventHandler as AddPHGlobalEventHandler$1, ConflictResolution as ConflictResolution$1, DocumentDispatch as DocumentDispatch$2, FileUploadProgressCallback as FileUploadProgressCallback$1, PHAppConfig as PHAppConfig$1, PHAppConfigHooks as PHAppConfigHooks$1, PHAppConfigKey as PHAppConfigKey$1, PHAppConfigSetters as PHAppConfigSetters$1, PHDocumentEditorConfig as PHDocumentEditorConfig$1, PHDocumentEditorConfigHooks as PHDocumentEditorConfigHooks$1, PHDocumentEditorConfigKey as PHDocumentEditorConfigKey$1, PHDocumentEditorConfigSetters as PHDocumentEditorConfigSetters$1, PHGlobal as PHGlobal$1, PHGlobalConfig as PHGlobalConfig$1, PHGlobalConfigHooks as PHGlobalConfigHooks$1, PHGlobalConfigKey as PHGlobalConfigKey$1, PHGlobalConfigSetters as PHGlobalConfigSetters$1, PHGlobalKey as PHGlobalKey$1, PHModal as PHModal$1, PHNavigateOptions as PHNavigateOptions$1, PHNavigation as PHNavigation$1, PHNavigationTarget as PHNavigationTarget$1, PHSearchUpdate as PHSearchUpdate$1, PHSettingsTarget as PHSettingsTarget$1, SearchParamsUpdate as SearchParamsUpdate$1, SetPHGlobalValue as SetPHGlobalValue$1, SetSearchParams as SetSearchParams$1, SwitchboardDirectory as SwitchboardDirectory$1, UsePHGlobalValue as UsePHGlobalValue$1 } from "@powerhousedao/reactor-browser";
22
21
  import { Node as Node$1 } from "@powerhousedao/shared";
23
22
  import { PackageInfo, PackagePage } from "@powerhousedao/shared/registry";
24
-
25
- //#region src/actions/dispatch.d.ts
23
+ //#region src/actions/drive-info.d.ts
26
24
  /**
27
- * Dispatches actions to a document.
28
- * @param actionOrActions - The action or actions to dispatch.
29
- * @param document - The document to dispatch actions to.
30
- * @param onErrors - Callback invoked with any errors that occurred during action execution.
31
- * @returns The updated document, or undefined if the dispatch failed.
25
+ * The drive info endpoint's response: `GET <switchboard>/d/:drive`.
26
+ *
27
+ * Mirrors what the handler actually sends (graphql-manager.ts): `icon` is
28
+ * emitted as `?? undefined` so it can be absent, while the rest are always
29
+ * written.
32
30
  */
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>;
31
+ type DriveInfo = {
32
+ id: string;
33
+ slug: string;
34
+ name: string;
35
+ icon?: string;
36
+ meta: Record<string, unknown>;
37
+ graphqlEndpoint: string;
38
+ };
34
39
  /**
35
- * Dispatches actions to a document.
36
- * @param actionOrActions - The action or actions to dispatch.
37
- * @param documentId - The ID of the document to dispatch actions to.
38
- * @param onErrors - Callback invoked with any errors that occurred during action execution.
39
- * @returns The updated document, or undefined if the dispatch failed.
40
+ * Reads a drive's info from a switchboard's REST endpoint.
41
+ *
42
+ * Drive discovery is the one read a client makes before it can authenticate
43
+ * anything else: `graphqlEndpoint` is what the sync remote is registered with,
44
+ * so nothing authenticated can happen until this call returns. That makes it
45
+ * the one request most likely to be sent logged-out — and it is exactly the
46
+ * call that must NOT be, because a switchboard running
47
+ * `DOCUMENT_PERMISSIONS` refuses a protected drive to an anonymous caller
48
+ * even when the logged-in user holds a grant on it.
49
+ *
50
+ * So the token goes out whenever there is one, with no `if (user)` guard: the
51
+ * provider already answers `undefined` when logged out, and an open
52
+ * switchboard serves that anonymously exactly as before.
53
+ *
54
+ * A failure throws `DriveRequestError` carrying the status, so
55
+ * `isDriveAuthError` can tell a refusal from an unreachable host and the
56
+ * caller can prompt for a login instead of reporting a network fault.
40
57
  */
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>;
58
+ export declare function fetchDriveInfo(url: string, tokenProvider?: BearerTokenProvider): Promise<DriveInfo>;
42
59
  //#endregion
43
60
  //#region src/actions/document.d.ts
44
- declare function getDocumentExtension(document: PHDocument$1): Promise<string>;
45
- declare function exportFile(document: PHDocument$1, suggestedName?: string): Promise<void | FileSystemFileHandle>;
61
+ export declare function getDocumentExtension(document: PHDocument$1): Promise<string>;
62
+ export declare function exportFile(document: PHDocument$1, suggestedName?: string): Promise<void | FileSystemFileHandle>;
46
63
  /**
47
64
  * Loads a document file and replays it with version-aware reducers from the registry.
48
65
  * Falls back to single-version legacy replay when no upgrade manifest is registered for
49
66
  * the document type.
50
67
  */
51
- declare function loadFile(path: string | File): Promise<PHDocument$1<PHBaseState>>;
52
- declare function addDocument(driveId: string, name: string, documentType: string, parentFolder?: string, document?: PHDocument$1, id?: string, preferredEditor?: string, documentModelVersion?: number): Promise<{
68
+ export declare function loadFile(path: string | File): Promise<PHDocument$1<PHBaseState>>;
69
+ export declare function addDocument(driveId: string, name: string, documentType: string, parentFolder?: string, document?: PHDocument$1, id?: string, preferredEditor?: string, documentModelVersion?: number): Promise<{
53
70
  id: string;
54
71
  name: string;
55
72
  documentType: string;
@@ -64,16 +81,16 @@ type AddedFileNode = {
64
81
  parentFolder: string | null;
65
82
  kind: "file";
66
83
  };
67
- declare function addFileWithProgress(file: string | File, driveId: string, name?: string, parentFolder?: string, onProgress?: FileUploadProgressCallback$1, documentTypes?: string[], resolveConflict?: ConflictResolution$1): Promise<AddedFileNode | undefined>;
68
- declare function addFolder(driveId: string, name: string, parentFolder?: string): Promise<Node>;
69
- declare function deleteNode(driveId: string, nodeId: string): Promise<void>;
70
- declare function renameDriveNode(driveId: string, nodeId: string, name: string): Promise<Node | undefined>;
71
- declare function setPreferredEditorOnNode(nodeId: string, preferredEditor: string | null): Promise<PHDocument$1>;
84
+ export declare function addFileWithProgress(file: string | File, driveId: string, name?: string, parentFolder?: string, onProgress?: FileUploadProgressCallback$1, documentTypes?: string[], resolveConflict?: ConflictResolution$1): Promise<AddedFileNode | undefined>;
85
+ export declare function addFolder(driveId: string, name: string, parentFolder?: string): Promise<Node>;
86
+ export declare function deleteNode(driveId: string, nodeId: string): Promise<void>;
87
+ export declare function renameDriveNode(driveId: string, nodeId: string, name: string): Promise<Node | undefined>;
88
+ export declare function setPreferredEditorOnNode(nodeId: string, preferredEditor: string | null): Promise<PHDocument$1>;
72
89
  /**
73
90
  * Upgrades a document to a newer document model version. Defaults to the
74
91
  * latest registered version for the document's type.
75
92
  */
76
- declare function upgradeDocument(documentId: string, toVersion?: number): Promise<PHDocument$1>;
93
+ export declare function upgradeDocument(documentId: string, toVersion?: number): Promise<PHDocument$1>;
77
94
  //#endregion
78
95
  //#region src/actions/bulk-archive.d.ts
79
96
  type BulkImportJob = {
@@ -88,7 +105,7 @@ type BulkImportJob = {
88
105
  * and each leaf becomes one job targeting its recreated folder. Throws
89
106
  * without touching the drive when no leaf is a document zip.
90
107
  */
91
- declare function expandBulkArchive(file: File, driveId: string, targetParent: Node | undefined): Promise<BulkImportJob[]>;
108
+ export declare function expandBulkArchive(file: File, driveId: string, targetParent: Node | undefined): Promise<BulkImportJob[]>;
92
109
  //#endregion
93
110
  //#region src/actions/folder-zip.d.ts
94
111
  type FolderZipResult = {
@@ -107,13 +124,13 @@ type FolderZipResult = {
107
124
  * `fetchDocument` must return the document WITH its full operations and
108
125
  * initialState (see downloadFolderZip).
109
126
  */
110
- declare function buildFolderZip(drive: DocumentDriveDocument, folderNode: FolderNode | undefined, fetchDocument: (id: string) => Promise<PHDocument$1>, onProgress?: (done: number, total: number) => void): Promise<FolderZipResult>;
127
+ export declare function buildFolderZip(drive: DocumentDriveDocument, folderNode: FolderNode | undefined, fetchDocument: (id: string) => Promise<PHDocument$1>, onProgress?: (done: number, total: number) => void): Promise<FolderZipResult>;
111
128
  /**
112
129
  * Export a folder (or whole drive) to disk: fetches every document with its
113
130
  * full operation history, builds the archive, and saves it via
114
131
  * showSaveFilePicker (fallback: blob download), mirroring exportFile.
115
132
  */
116
- declare function downloadFolderZip(drive: DocumentDriveDocument, folderNode?: FolderNode, onProgress?: (done: number, total: number) => void): Promise<FolderZipResult>;
133
+ export declare function downloadFolderZip(drive: DocumentDriveDocument, folderNode?: FolderNode, onProgress?: (done: number, total: number) => void): Promise<FolderZipResult>;
117
134
  //#endregion
118
135
  //#region src/actions/drive.d.ts
119
136
  type AddRemoteDriveOptions = {
@@ -124,7 +141,8 @@ type AddRemoteDriveOptions = {
124
141
  * `addRemoteDrive` returns as soon as the remote is registered with
125
142
  * the sync manager, before initial backfill delivers the drive.
126
143
  */
127
- awaitInitialSync?: boolean; /** Timeout for the initial-sync wait. Defaults to 30s. */
144
+ awaitInitialSync?: boolean;
145
+ /** Timeout for the initial-sync wait. Defaults to 30s. */
128
146
  initialSyncTimeoutMs?: number;
129
147
  signal?: AbortSignal;
130
148
  };
@@ -133,44 +151,59 @@ type AddRemoteDriveOptions = {
133
151
  * reactor client. Subscribes to Created events filtered by id and
134
152
  * short-circuits if the document already exists.
135
153
  */
136
- declare function waitForDocumentReady(reactorClient: IReactorClient$1, documentId: string, options?: {
154
+ export declare function waitForDocumentReady(reactorClient: IReactorReadClient$1, documentId: string, options?: {
137
155
  timeoutMs?: number;
138
156
  signal?: AbortSignal;
139
157
  }): Promise<void>;
140
- declare function addDrive(input: DriveInput, preferredEditor?: string): Promise<DocumentDriveDocument>;
141
- declare function addRemoteDrive(url: string, driveId?: string, options?: AddRemoteDriveOptions): Promise<string>;
142
- declare function deleteDrive(driveId: string): Promise<void>;
143
- declare function renameDrive(driveId: string, name: string): Promise<PHDocument$1 | undefined>;
144
- declare function setDriveAvailableOffline(driveId: string, availableOffline: boolean): Promise<PHDocument$1 | undefined>;
145
- declare function setDriveSharingType(driveId: string, sharingType: SharingType): Promise<PHDocument$1 | undefined>;
146
- declare function setDriveMetadata(driveId: string, metadata: {
158
+ export declare function addDrive(input: DriveInput, preferredEditor?: string): Promise<DocumentDriveDocument>;
159
+ export declare function addRemoteDrive(url: string, driveId?: string, options?: AddRemoteDriveOptions): Promise<string>;
160
+ export declare function deleteDrive(driveId: string): Promise<void>;
161
+ export declare function renameDrive(driveId: string, name: string): Promise<PHDocument$1 | undefined>;
162
+ export declare function setDriveAvailableOffline(driveId: string, availableOffline: boolean): Promise<PHDocument$1 | undefined>;
163
+ export declare function setDriveSharingType(driveId: string, sharingType: SharingType): Promise<PHDocument$1 | undefined>;
164
+ export declare function setDriveMetadata(driveId: string, metadata: {
147
165
  name?: string | null;
148
166
  icon?: string | null;
149
167
  }): Promise<PHDocument$1 | undefined>;
150
168
  //#endregion
151
169
  //#region src/constants.d.ts
152
- declare const DEFAULT_DRIVE_EDITOR_ID = "powerhouse/generic-drive-explorer";
153
- declare const COMMON_PACKAGE_ID = "powerhouse/common";
170
+ export declare const DEFAULT_DRIVE_EDITOR_ID = "powerhouse/generic-drive-explorer";
171
+ export declare const COMMON_PACKAGE_ID = "powerhouse/common";
154
172
  /** Document types that represent a "drive": a container of nodes. */
155
- declare const DRIVE_DOCUMENT_TYPES: readonly ["powerhouse/document-drive", "powerhouse/reactor-drive"];
173
+ export declare const DRIVE_DOCUMENT_TYPES: readonly ["powerhouse/document-drive", "powerhouse/reactor-drive"];
156
174
  //#endregion
157
175
  //#region src/errors.d.ts
158
- declare class UnsupportedDocumentTypeError extends Error {
176
+ export declare class UnsupportedDocumentTypeError extends Error {
159
177
  constructor(documentType: string);
160
178
  static isError(error: unknown): error is UnsupportedDocumentTypeError;
161
179
  }
162
- declare class DocumentModelNotFoundError extends Error {
180
+ export declare class DocumentModelNotFoundError extends Error {
163
181
  readonly documentType: string;
164
182
  readonly name = "DocumentModelNotFoundError";
165
183
  constructor(documentType: string);
166
184
  static isError(error: unknown): error is DocumentModelNotFoundError;
167
185
  }
168
- declare class DocumentTypeMismatchError extends Error {
186
+ export declare class DocumentTypeMismatchError extends Error {
169
187
  constructor(documentId: string, expectedType: string, actualType: string);
170
188
  }
171
- declare class NoSelectedDocumentError extends Error {
189
+ export declare class NoSelectedDocumentError extends Error {
172
190
  constructor();
173
191
  }
192
+ /** A dispatched action the document did not apply: its operation is stored at `index`, state
193
+ * unchanged, because the reducer threw (`reducer-error`) or the write was denied (`denied`). */
194
+ export declare class OperationRejectedError extends Error {
195
+ readonly documentId: string;
196
+ readonly scope: string;
197
+ readonly name = "OperationRejectedError";
198
+ readonly actionId: string;
199
+ readonly actionType: string;
200
+ readonly index: number;
201
+ readonly kind: "reducer-error" | "denied";
202
+ private constructor();
203
+ /** The rejection `operation` records, or undefined when it applied. */
204
+ static fromOperation(documentId: string, scope: string, operation: Operation$1): OperationRejectedError | undefined;
205
+ static isError(error: unknown): error is OperationRejectedError;
206
+ }
174
207
  //#endregion
175
208
  //#region src/global/types.d.ts
176
209
  interface PGliteState$1 {
@@ -186,32 +219,34 @@ declare global {
186
219
  interface Window {
187
220
  powerhouse?: PowerhouseGlobal;
188
221
  }
189
- } //# sourceMappingURL=types.d.ts.map
222
+ }
190
223
  //#endregion
191
224
  //#region src/global/core.d.ts
192
- declare function getGlobal<K extends keyof PowerhouseGlobal>(namespace: K): PowerhouseGlobal[K] | undefined;
193
- declare function setGlobal<K extends keyof PowerhouseGlobal>(namespace: K, value: PowerhouseGlobal[K]): void;
194
- declare function clearGlobal(namespace: keyof PowerhouseGlobal): void;
225
+ export declare function getGlobal<K extends keyof PowerhouseGlobal>(namespace: K): PowerhouseGlobal[K] | undefined;
226
+ export declare function setGlobal<K extends keyof PowerhouseGlobal>(namespace: K, value: PowerhouseGlobal[K]): void;
227
+ export declare function clearGlobal(namespace: keyof PowerhouseGlobal): void;
195
228
  //#endregion
196
229
  //#region src/graphql/adapters.d.ts
197
230
  type QueryDocumentResult = NonNullable<GetDocumentWithOperationsQuery["document"]>["document"];
198
231
  type FindDocumentsItems = NonNullable<FindDocumentsQuery["findDocuments"]>["items"];
199
- declare function phDocumentFromQuery<TDocumentSchema extends TStateSchemaZodObject>(document: QueryDocumentResult, documentSchema?: TDocumentSchema): PHDocument;
200
- declare function phDocumentsFromQuery<TDocumentSchema extends TStateSchemaZodObject>(items: FindDocumentsItems, documentSchema?: TDocumentSchema): PHDocument[];
201
- declare function identifierFromMutateDocumentOperationVariables(variables: unknown): string;
232
+ export declare function phDocumentFromQuery<TDocumentSchema extends TStateSchemaZodObject>(document: QueryDocumentResult, documentSchema?: TDocumentSchema): PHDocument;
233
+ export declare function phDocumentsFromQuery<TDocumentSchema extends TStateSchemaZodObject>(items: FindDocumentsItems, documentSchema?: TDocumentSchema): PHDocument[];
234
+ export declare function identifierFromMutateDocumentOperationVariables(variables: unknown): string;
202
235
  //#endregion
203
236
  //#region src/graphql/fetchers.d.ts
204
- declare function reactorGraphqlFetchDocument<TDocumentSchema extends TStateSchemaZodObject>(identifier: string, documentSchema?: TDocumentSchema): Promise<document_model0.PHDocument | undefined>;
205
- declare function reactorGraphqlBatchFetchDocuments(identifiers: readonly string[]): Promise<(document_model0.PHDocument | undefined)[]>;
237
+ export declare function reactorGraphqlFetchDocument<TDocumentSchema extends TStateSchemaZodObject>(identifier: string, documentSchema?: TDocumentSchema): Promise<import("document-model").PHDocument | undefined>;
238
+ export declare function reactorGraphqlBatchFetchDocuments(identifiers: readonly string[]): Promise<(import("document-model").PHDocument | undefined)[]>;
206
239
  //#endregion
207
240
  //#region src/graphql/graphql-client-document-cache.d.ts
208
- declare class GraphQLClientDocumentCache implements IDocumentCache {
241
+ export declare class GraphQLClientDocumentCache implements IDocumentCache {
209
242
  private fetcher;
210
243
  private documents;
211
244
  private batchPromises;
212
245
  private listeners;
246
+ private refetcher;
213
247
  constructor();
214
248
  get(id: string, refetch?: boolean): Promise<PHDocument>;
249
+ getRefetchState(id: string): DocumentRefetchState;
215
250
  getBatch(ids: string[]): Promise<PHDocument[]>;
216
251
  private invalidateBatchesContaining;
217
252
  subscribe(id: string | string[], callback: () => void): () => void;
@@ -222,256 +257,326 @@ declare class GraphQLClientDocumentCache implements IDocumentCache {
222
257
  }
223
258
  //#endregion
224
259
  //#region src/graphql/mutators.d.ts
225
- declare function reactorGraphqlCreateDocument<TDocument extends PHDocument>(document: TDocument, parentIdentifier?: "powerhouse"): Promise<CreateDocumentMutation>;
226
- declare function reactorGraphqlDeleteDocument(identifier: string): Promise<DeleteDocumentMutation>;
227
- declare function reactorGraphqlDeleteDocuments(identifiers: string[]): Promise<DeleteDocumentsMutation>;
228
- declare function reactorGraphqlMutateDocument(documentIdentifier: string, ...actions: ReadonlyArray<ActionInput>): Promise<MutateDocumentMutation>;
260
+ export declare function reactorGraphqlCreateDocument<TDocument extends PHDocument>(document: TDocument, parentIdentifier?: "powerhouse"): Promise<CreateDocumentMutation>;
261
+ export declare function reactorGraphqlDeleteDocument(identifier: string): Promise<DeleteDocumentMutation>;
262
+ export declare function reactorGraphqlDeleteDocuments(identifiers: string[]): Promise<DeleteDocumentsMutation>;
263
+ export declare function reactorGraphqlMutateDocument(documentIdentifier: string, ...actions: ReadonlyArray<ActionInput>): Promise<MutateDocumentMutation>;
229
264
  //#endregion
230
265
  //#region src/hooks/add-ph-event-handlers.d.ts
231
- declare const commonGlobalEventHandlerFunctions: {
266
+ export declare const commonGlobalEventHandlerFunctions: {
232
267
  loading: () => void;
233
268
  drives: () => void;
269
+ backendAuth: () => void;
270
+ driveNodes: () => void;
234
271
  selectedDriveId: () => void;
235
272
  selectedNodeId: () => void;
236
273
  documentCache: () => void;
237
274
  reactorGraphQLClient: () => void;
238
275
  draggingNode: () => void;
239
276
  };
240
- declare function addPHEventHandlers(): void;
241
- declare function callEventHandlerRegisterFunctions(registerFunctions: Record<string, () => void>): void;
277
+ export declare function addPHEventHandlers(): void;
278
+ export declare function callEventHandlerRegisterFunctions(registerFunctions: Record<string, () => void>): void;
242
279
  //#endregion
243
280
  //#region src/hooks/allowed-document-model-modules.d.ts
244
- declare function useAllowedDocumentModelModules(): document_model0.DocumentModelModule[] | undefined;
281
+ export declare function useAllowedDocumentModelModules(): import("document-model").DocumentModelModule[] | undefined;
245
282
  //#endregion
246
283
  //#region src/hooks/child-nodes.d.ts
247
284
  /** Returns the child nodes for the selected drive or folder. */
248
- declare function useNodesInSelectedDriveOrFolder(): Node[];
285
+ export declare function useNodesInSelectedDriveOrFolder(): Node[];
249
286
  //#endregion
250
287
  //#region src/hooks/config/connect.d.ts
251
- declare const useRouterBasename: () => string | undefined, setRouterBasename: (value: string | undefined) => void, addRouterBasenameEventHandler: () => void;
252
- declare const useVersion: () => string | undefined, setVersion: (value: string | undefined) => void, addVersionEventHandler: () => void;
253
- declare const useRequiresHardRefresh: () => boolean | undefined, setRequiresHardRefresh: (value: boolean | undefined) => void, addRequiresHardRefreshEventHandler: () => void;
254
- declare const useWarnOutdatedApp: () => boolean | undefined, setWarnOutdatedApp: (value: boolean | undefined) => void, addWarnOutdatedAppEventHandler: () => void;
255
- declare const useStudioMode: () => boolean | undefined, setStudioMode: (value: boolean | undefined) => void, addStudioModeEventHandler: () => void;
256
- declare const useBasePath: () => string | undefined, setBasePath: (value: string | undefined) => void, addBasePathEventHandler: () => void;
257
- declare const useVersionCheckInterval: () => number | undefined, setVersionCheckInterval: (value: number | undefined) => void, addVersionCheckIntervalEventHandler: () => void;
258
- declare const useCliVersion: () => string | undefined, setCliVersion: (value: string | undefined) => void, addCliVersionEventHandler: () => void;
259
- declare const useFileUploadOperationsChunkSize: () => number | undefined, setFileUploadOperationsChunkSize: (value: number | undefined) => void, addFileUploadOperationsChunkSizeEventHandler: () => void;
260
- declare const useIsDocumentModelSelectionSettingsEnabled: () => boolean | undefined, setIsDocumentModelSelectionSettingsEnabled: (value: boolean | undefined) => void, addIsDocumentModelSelectionSettingsEnabledEventHandler: () => void;
261
- declare const useGaTrackingId: () => string | undefined, setGaTrackingId: (value: string | undefined) => void, addGaTrackingIdEventHandler: () => void;
262
- declare const useDefaultDrivesUrl: () => string | undefined, setDefaultDrivesUrl: (value: string | undefined) => void, addDefaultDrivesUrlEventHandler: () => void;
263
- declare const useDrivesPreserveStrategy: () => string | undefined, setDrivesPreserveStrategy: (value: string | undefined) => void, addDrivesPreserveStrategyEventHandler: () => void;
264
- declare const useIsLocalDrivesEnabled: () => boolean | undefined, setIsLocalDrivesEnabled: (value: boolean | undefined) => void, addIsLocalDrivesEnabledEventHandler: () => void;
265
- declare const useIsAddDriveEnabled: () => boolean | undefined, setIsAddDriveEnabled: (value: boolean | undefined) => void, addIsAddDriveEnabledEventHandler: () => void;
266
- declare const useIsPublicDrivesEnabled: () => boolean | undefined, setIsPublicDrivesEnabled: (value: boolean | undefined) => void, addIsPublicDrivesEnabledEventHandler: () => void;
267
- declare const useIsAddPublicDrivesEnabled: () => boolean | undefined, setIsAddPublicDrivesEnabled: (value: boolean | undefined) => void, addIsAddPublicDrivesEnabledEventHandler: () => void;
268
- declare const useIsDeletePublicDrivesEnabled: () => boolean | undefined, setIsDeletePublicDrivesEnabled: (value: boolean | undefined) => void, addIsDeletePublicDrivesEnabledEventHandler: () => void;
269
- declare const useIsCloudDrivesEnabled: () => boolean | undefined, setIsCloudDrivesEnabled: (value: boolean | undefined) => void, addIsCloudDrivesEnabledEventHandler: () => void;
270
- declare const useIsAddCloudDrivesEnabled: () => boolean | undefined, setIsAddCloudDrivesEnabled: (value: boolean | undefined) => void, addIsAddCloudDrivesEnabledEventHandler: () => void;
271
- declare const useIsDeleteCloudDrivesEnabled: () => boolean | undefined, setIsDeleteCloudDrivesEnabled: (value: boolean | undefined) => void, addIsDeleteCloudDrivesEnabledEventHandler: () => void;
272
- declare const useLocalDrivesEnabled: () => boolean | undefined, setLocalDrivesEnabled: (value: boolean | undefined) => void, addLocalDrivesEnabledEventHandler: () => void;
273
- declare const useIsAddLocalDrivesEnabled: () => boolean | undefined, setIsAddLocalDrivesEnabled: (value: boolean | undefined) => void, addIsAddLocalDrivesEnabledEventHandler: () => void;
274
- declare const useIsDeleteLocalDrivesEnabled: () => boolean | undefined, setIsDeleteLocalDrivesEnabled: (value: boolean | undefined) => void, addIsDeleteLocalDrivesEnabledEventHandler: () => void;
275
- declare const useIsEditorDebugModeEnabled: () => boolean | undefined, setIsEditorDebugModeEnabled: (value: boolean | undefined) => void, addIsEditorDebugModeEnabledEventHandler: () => void;
276
- declare const useIsEditorReadModeEnabled: () => boolean | undefined, setIsEditorReadModeEnabled: (value: boolean | undefined) => void, addIsEditorReadModeEnabledEventHandler: () => void;
277
- declare const useIsAnalyticsDatabaseWorkerEnabled: () => boolean | undefined, setIsAnalyticsDatabaseWorkerEnabled: (value: boolean | undefined) => void, addIsAnalyticsDatabaseWorkerEnabledEventHandler: () => void;
278
- declare const useIsDiffAnalyticsEnabled: () => boolean | undefined, setIsDiffAnalyticsEnabled: (value: boolean | undefined) => void, addIsDiffAnalyticsEnabledEventHandler: () => void;
279
- declare const useIsDriveAnalyticsEnabled: () => boolean | undefined, setIsDriveAnalyticsEnabled: (value: boolean | undefined) => void, addIsDriveAnalyticsEnabledEventHandler: () => void;
280
- declare const useRenownUrl: () => string | undefined, setRenownUrl: (value: string | undefined) => void, addRenownUrlEventHandler: () => void;
281
- declare const useRenownNetworkId: () => string | undefined, setRenownNetworkId: (value: string | undefined) => void, addRenownNetworkIdEventHandler: () => void;
282
- declare const useRenownChainId: () => number | undefined, setRenownChainId: (value: number | undefined) => void, addRenownChainIdEventHandler: () => void;
283
- declare const useSwitchboardUrl: () => string | undefined, setSwitchboardUrl: (value: string | undefined) => void, addSwitchboardUrlEventHandler: () => void;
284
- declare const useRenownAdapters: () => _powerhousedao_shared0.PHConnectRenownAdapters | undefined, setRenownAdapters: (value: _powerhousedao_shared0.PHConnectRenownAdapters | undefined) => void, addRenownAdaptersEventHandler: () => void;
285
- declare const useSentryRelease: () => string | undefined, setSentryRelease: (value: string | undefined) => void, addSentryReleaseEventHandler: () => void;
286
- declare const useSentryDsn: () => string | undefined, setSentryDsn: (value: string | undefined) => void, addSentryDsnEventHandler: () => void;
287
- declare const useSentryEnv: () => string | undefined, setSentryEnv: (value: string | undefined) => void, addSentryEnvEventHandler: () => void;
288
- declare const useIsSentryTracingEnabled: () => boolean | undefined, setIsSentryTracingEnabled: (value: boolean | undefined) => void, addIsSentryTracingEnabledEventHandler: () => void;
289
- declare const useIsExternalProcessorsEnabled: () => boolean | undefined, setIsExternalProcessorsEnabled: (value: boolean | undefined) => void, addIsExternalProcessorsEnabledEventHandler: () => void;
290
- declare const useIsExternalPackagesEnabled: () => boolean | undefined, setIsExternalPackagesEnabled: (value: boolean | undefined) => void, addIsExternalPackagesEnabledEventHandler: () => void;
288
+ export declare const useRouterBasename: () => string | undefined, setRouterBasename: (value: string | undefined) => void, addRouterBasenameEventHandler: () => void;
289
+ export declare const useVersion: () => string | undefined, setVersion: (value: string | undefined) => void, addVersionEventHandler: () => void;
290
+ export declare const useRequiresHardRefresh: () => boolean | undefined, setRequiresHardRefresh: (value: boolean | undefined) => void, addRequiresHardRefreshEventHandler: () => void;
291
+ export declare const useWarnOutdatedApp: () => boolean | undefined, setWarnOutdatedApp: (value: boolean | undefined) => void, addWarnOutdatedAppEventHandler: () => void;
292
+ export declare const useStudioMode: () => boolean | undefined, setStudioMode: (value: boolean | undefined) => void, addStudioModeEventHandler: () => void;
293
+ export declare const useBasePath: () => string | undefined, setBasePath: (value: string | undefined) => void, addBasePathEventHandler: () => void;
294
+ export declare const useVersionCheckInterval: () => number | undefined, setVersionCheckInterval: (value: number | undefined) => void, addVersionCheckIntervalEventHandler: () => void;
295
+ export declare const useCliVersion: () => string | undefined, setCliVersion: (value: string | undefined) => void, addCliVersionEventHandler: () => void;
296
+ export declare const useFileUploadOperationsChunkSize: () => number | undefined, setFileUploadOperationsChunkSize: (value: number | undefined) => void, addFileUploadOperationsChunkSizeEventHandler: () => void;
297
+ export declare const useIsDocumentModelSelectionSettingsEnabled: () => boolean | undefined, setIsDocumentModelSelectionSettingsEnabled: (value: boolean | undefined) => void, addIsDocumentModelSelectionSettingsEnabledEventHandler: () => void;
298
+ export declare const useGaTrackingId: () => string | undefined, setGaTrackingId: (value: string | undefined) => void, addGaTrackingIdEventHandler: () => void;
299
+ export declare const useDefaultDrivesUrl: () => string | undefined, setDefaultDrivesUrl: (value: string | undefined) => void, addDefaultDrivesUrlEventHandler: () => void;
300
+ export declare const useDrivesPreserveStrategy: () => string | undefined, setDrivesPreserveStrategy: (value: string | undefined) => void, addDrivesPreserveStrategyEventHandler: () => void;
301
+ export declare const useIsLocalDrivesEnabled: () => boolean | undefined, setIsLocalDrivesEnabled: (value: boolean | undefined) => void, addIsLocalDrivesEnabledEventHandler: () => void;
302
+ export declare const useIsAddDriveEnabled: () => boolean | undefined, setIsAddDriveEnabled: (value: boolean | undefined) => void, addIsAddDriveEnabledEventHandler: () => void;
303
+ export declare const useIsPublicDrivesEnabled: () => boolean | undefined, setIsPublicDrivesEnabled: (value: boolean | undefined) => void, addIsPublicDrivesEnabledEventHandler: () => void;
304
+ export declare const useIsAddPublicDrivesEnabled: () => boolean | undefined, setIsAddPublicDrivesEnabled: (value: boolean | undefined) => void, addIsAddPublicDrivesEnabledEventHandler: () => void;
305
+ export declare const useIsDeletePublicDrivesEnabled: () => boolean | undefined, setIsDeletePublicDrivesEnabled: (value: boolean | undefined) => void, addIsDeletePublicDrivesEnabledEventHandler: () => void;
306
+ export declare const useIsCloudDrivesEnabled: () => boolean | undefined, setIsCloudDrivesEnabled: (value: boolean | undefined) => void, addIsCloudDrivesEnabledEventHandler: () => void;
307
+ export declare const useIsAddCloudDrivesEnabled: () => boolean | undefined, setIsAddCloudDrivesEnabled: (value: boolean | undefined) => void, addIsAddCloudDrivesEnabledEventHandler: () => void;
308
+ export declare const useIsDeleteCloudDrivesEnabled: () => boolean | undefined, setIsDeleteCloudDrivesEnabled: (value: boolean | undefined) => void, addIsDeleteCloudDrivesEnabledEventHandler: () => void;
309
+ export declare const useLocalDrivesEnabled: () => boolean | undefined, setLocalDrivesEnabled: (value: boolean | undefined) => void, addLocalDrivesEnabledEventHandler: () => void;
310
+ export declare const useIsAddLocalDrivesEnabled: () => boolean | undefined, setIsAddLocalDrivesEnabled: (value: boolean | undefined) => void, addIsAddLocalDrivesEnabledEventHandler: () => void;
311
+ export declare const useIsDeleteLocalDrivesEnabled: () => boolean | undefined, setIsDeleteLocalDrivesEnabled: (value: boolean | undefined) => void, addIsDeleteLocalDrivesEnabledEventHandler: () => void;
312
+ export declare const useIsEditorDebugModeEnabled: () => boolean | undefined, setIsEditorDebugModeEnabled: (value: boolean | undefined) => void, addIsEditorDebugModeEnabledEventHandler: () => void;
313
+ export declare const useIsEditorReadModeEnabled: () => boolean | undefined, setIsEditorReadModeEnabled: (value: boolean | undefined) => void, addIsEditorReadModeEnabledEventHandler: () => void;
314
+ export declare const useIsAnalyticsDatabaseWorkerEnabled: () => boolean | undefined, setIsAnalyticsDatabaseWorkerEnabled: (value: boolean | undefined) => void, addIsAnalyticsDatabaseWorkerEnabledEventHandler: () => void;
315
+ export declare const useIsDiffAnalyticsEnabled: () => boolean | undefined, setIsDiffAnalyticsEnabled: (value: boolean | undefined) => void, addIsDiffAnalyticsEnabledEventHandler: () => void;
316
+ export declare const useIsDriveAnalyticsEnabled: () => boolean | undefined, setIsDriveAnalyticsEnabled: (value: boolean | undefined) => void, addIsDriveAnalyticsEnabledEventHandler: () => void;
317
+ export declare const useRenownUrl: () => string | undefined, setRenownUrl: (value: string | undefined) => void, addRenownUrlEventHandler: () => void;
318
+ export declare const useRenownNetworkId: () => string | undefined, setRenownNetworkId: (value: string | undefined) => void, addRenownNetworkIdEventHandler: () => void;
319
+ export declare const useRenownChainId: () => number | undefined, setRenownChainId: (value: number | undefined) => void, addRenownChainIdEventHandler: () => void;
320
+ export declare const useSwitchboardUrl: () => string | undefined, setSwitchboardUrl: (value: string | undefined) => void, addSwitchboardUrlEventHandler: () => void;
321
+ export declare const useRenownAdapters: () => {
322
+ rainbow?: {
323
+ walletConnectProjectId?: string | undefined;
324
+ infuraProjectId?: string | undefined;
325
+ } | undefined;
326
+ privy?: {
327
+ appId?: string | undefined;
328
+ clientId?: string | undefined;
329
+ methods?: string[] | undefined;
330
+ } | undefined;
331
+ } | undefined, setRenownAdapters: (value: {
332
+ rainbow?: {
333
+ walletConnectProjectId?: string | undefined;
334
+ infuraProjectId?: string | undefined;
335
+ } | undefined;
336
+ privy?: {
337
+ appId?: string | undefined;
338
+ clientId?: string | undefined;
339
+ methods?: string[] | undefined;
340
+ } | undefined;
341
+ } | undefined) => void, addRenownAdaptersEventHandler: () => void;
342
+ export declare const useSentryRelease: () => string | undefined, setSentryRelease: (value: string | undefined) => void, addSentryReleaseEventHandler: () => void;
343
+ export declare const useSentryDsn: () => string | undefined, setSentryDsn: (value: string | undefined) => void, addSentryDsnEventHandler: () => void;
344
+ export declare const useSentryEnv: () => string | undefined, setSentryEnv: (value: string | undefined) => void, addSentryEnvEventHandler: () => void;
345
+ export declare const useIsSentryTracingEnabled: () => boolean | undefined, setIsSentryTracingEnabled: (value: boolean | undefined) => void, addIsSentryTracingEnabledEventHandler: () => void;
346
+ export declare const useIsExternalProcessorsEnabled: () => boolean | undefined, setIsExternalProcessorsEnabled: (value: boolean | undefined) => void, addIsExternalProcessorsEnabledEventHandler: () => void;
347
+ export declare const useIsExternalPackagesEnabled: () => boolean | undefined, setIsExternalPackagesEnabled: (value: boolean | undefined) => void, addIsExternalPackagesEnabledEventHandler: () => void;
291
348
  /** Sets the enabled editors for Connect. */
292
- declare const setEnabledEditors: (value: string[] | undefined) => void;
349
+ export declare const setEnabledEditors: (value: string[] | undefined) => void;
293
350
  /** Gets the enabled editors for Connect. */
294
- declare const useEnabledEditors: () => string[] | undefined;
351
+ export declare const useEnabledEditors: () => string[] | undefined;
295
352
  /** Adds an event handler for when the enabled editors for Connect changes. */
296
- declare const addEnabledEditorsEventHandler: () => void;
353
+ export declare const addEnabledEditorsEventHandler: () => void;
297
354
  /** Sets the disabled editors for Connect. */
298
- declare const setDisabledEditors: (value: string[] | undefined) => void;
355
+ export declare const setDisabledEditors: (value: string[] | undefined) => void;
299
356
  /** Gets the disabled editors for Connect. */
300
- declare const useDisabledEditors: () => string[] | undefined;
357
+ export declare const useDisabledEditors: () => string[] | undefined;
301
358
  /** Adds an event handler for when the disabled editors for Connect changes. */
302
- declare const addDisabledEditorsEventHandler: () => void;
359
+ export declare const addDisabledEditorsEventHandler: () => void;
303
360
  /** Sets the isRelationalProcessorsEnabled for Connect. */
304
- declare const setIsRelationalProcessorsEnabled: (value: boolean | undefined) => void;
361
+ export declare const setIsRelationalProcessorsEnabled: (value: boolean | undefined) => void;
305
362
  /** Gets the isRelationalProcessorsEnabled for Connect. */
306
- declare const useIsRelationalProcessorsEnabled: () => boolean | undefined;
363
+ export declare const useIsRelationalProcessorsEnabled: () => boolean | undefined;
307
364
  /** Adds an event handler for when the isRelationalProcessorsEnabled for Connect changes. */
308
- declare const addIsRelationalProcessorsEnabledEventHandler: () => void;
365
+ export declare const addIsRelationalProcessorsEnabledEventHandler: () => void;
309
366
  /** Sets the isExternalRelationalProcessorsEnabled for Connect. */
310
- declare const setIsExternalRelationalProcessorsEnabled: (value: boolean | undefined) => void;
367
+ export declare const setIsExternalRelationalProcessorsEnabled: (value: boolean | undefined) => void;
311
368
  /** Gets the isExternalRelationalProcessorsEnabled for Connect. */
312
- declare const useIsExternalRelationalProcessorsEnabled: () => boolean | undefined;
369
+ export declare const useIsExternalRelationalProcessorsEnabled: () => boolean | undefined;
313
370
  /** Adds an event handler for when the isExternalRelationalProcessorsEnabled for Connect changes. */
314
- declare const addIsExternalRelationalProcessorsEnabledEventHandler: () => void;
371
+ export declare const addIsExternalRelationalProcessorsEnabledEventHandler: () => void;
315
372
  /** Sets the isAnalyticsEnabled for Connect. */
316
- declare const setIsAnalyticsEnabled: (value: boolean | undefined) => void;
373
+ export declare const setIsAnalyticsEnabled: (value: boolean | undefined) => void;
317
374
  /** Gets the isAnalyticsEnabled for Connect. */
318
- declare const useIsAnalyticsEnabled: () => boolean | undefined;
375
+ export declare const useIsAnalyticsEnabled: () => boolean | undefined;
319
376
  /** Adds an event handler for when the isAnalyticsEnabled for Connect changes. */
320
- declare const addIsAnalyticsEnabledEventHandler: () => void;
377
+ export declare const addIsAnalyticsEnabledEventHandler: () => void;
321
378
  /** Sets the isAnalyticsExternalProcessorsEnabled for Connect. */
322
- declare const setIsAnalyticsExternalProcessorsEnabled: (value: boolean | undefined) => void;
379
+ export declare const setIsAnalyticsExternalProcessorsEnabled: (value: boolean | undefined) => void;
323
380
  /** Gets the isAnalyticsExternalProcessorsEnabled for Connect. */
324
- declare const useIsAnalyticsExternalProcessorsEnabled: () => boolean | undefined;
381
+ export declare const useIsAnalyticsExternalProcessorsEnabled: () => boolean | undefined;
325
382
  /** Adds an event handler for when the isAnalyticsExternalProcessorsEnabled for Connect changes. */
326
- declare const addIsAnalyticsExternalProcessorsEnabledEventHandler: () => void;
383
+ export declare const addIsAnalyticsExternalProcessorsEnabledEventHandler: () => void;
327
384
  /** Sets the analytics database name for Connect. */
328
- declare const setAnalyticsDatabaseName: (value: string | undefined) => void;
385
+ export declare const setAnalyticsDatabaseName: (value: string | undefined) => void;
329
386
  /** Gets the analytics database name for Connect. */
330
- declare const useAnalyticsDatabaseName: () => string | undefined;
387
+ export declare const useAnalyticsDatabaseName: () => string | undefined;
331
388
  /** Adds an event handler for when the analytics database name for Connect changes. */
332
- declare const addAnalyticsDatabaseNameEventHandler: () => void;
389
+ export declare const addAnalyticsDatabaseNameEventHandler: () => void;
333
390
  /** Sets the log level for Connect. */
334
- declare const setLogLevel: (value: "error" | "debug" | "info" | "warn" | undefined) => void;
391
+ export declare const setLogLevel: (value: "debug" | "error" | "info" | "warn" | undefined) => void;
335
392
  /** Gets the log level for Connect. */
336
- declare const useLogLevel: () => "error" | "debug" | "info" | "warn" | undefined;
393
+ export declare const useLogLevel: () => "debug" | "error" | "info" | "warn" | undefined;
337
394
  /** Adds an event handler for when the log level for Connect changes. */
338
- declare const addLogLevelEventHandler: () => void;
395
+ export declare const addLogLevelEventHandler: () => void;
339
396
  /** Sets the allow list for Connect. */
340
- declare const setAllowList: (value: string[] | undefined) => void;
397
+ export declare const setAllowList: (value: string[] | undefined) => void;
341
398
  /** Gets the allow list for Connect. */
342
- declare const useAllowList: () => string[] | undefined;
399
+ export declare const useAllowList: () => string[] | undefined;
343
400
  /** Adds an event handler for when the allow list for Connect changes. */
344
- declare const addAllowListEventHandler: () => void;
345
- declare const phGlobalConfigSetters: PHGlobalConfigSetters$1;
346
- declare const phGlobalConfigHooks: PHGlobalConfigHooks$1;
401
+ export declare const addAllowListEventHandler: () => void;
402
+ export declare const phGlobalConfigSetters: PHGlobalConfigSetters$1;
403
+ export declare const phGlobalConfigHooks: PHGlobalConfigHooks$1;
347
404
  //#endregion
348
405
  //#region src/hooks/config/editor.d.ts
349
- declare const isExternalControlsEnabledEventFunctions: {
406
+ export declare const isExternalControlsEnabledEventFunctions: {
350
407
  useValue: () => boolean | undefined;
351
408
  setValue: (value: boolean | undefined) => void;
352
409
  addEventHandler: () => void;
410
+ subscribeToValue: (onStoreChange: () => void) => () => void;
411
+ getSnapshot: () => boolean | undefined;
353
412
  };
354
413
  /** Sets whether external controls are enabled for a given editor. */
355
- declare const setIsExternalControlsEnabled: (value: boolean | undefined) => void;
414
+ export declare const setIsExternalControlsEnabled: (value: boolean | undefined) => void;
356
415
  /** Gets whether external controls are enabled for a given editor. */
357
- declare const useIsExternalControlsEnabled: () => boolean | undefined;
416
+ export declare const useIsExternalControlsEnabled: () => boolean | undefined;
358
417
  /** Adds an event handler for when the external controls enabled state changes. */
359
- declare const addIsExternalControlsEnabledEventHandler: () => void;
418
+ export declare const addIsExternalControlsEnabledEventHandler: () => void;
360
419
  /** Sets whether drag and drop is enabled for a given app. */
361
- declare const setIsDragAndDropEnabled: (value: boolean | undefined) => void;
420
+ export declare const setIsDragAndDropEnabled: (value: boolean | undefined) => void;
362
421
  /** Gets whether drag and drop is enabled for a given app. */
363
- declare const useIsDragAndDropEnabled: () => boolean | undefined;
422
+ export declare const useIsDragAndDropEnabled: () => boolean | undefined;
364
423
  /** Adds an event handler for when the drag and drop enabled state changes. */
365
- declare const addIsDragAndDropEnabledEventHandler: () => void;
424
+ export declare const addIsDragAndDropEnabledEventHandler: () => void;
366
425
  /** Sets the allowed document types for a given app. */
367
- declare const setAllowedDocumentTypes: (value: string[] | undefined) => void;
426
+ export declare const setAllowedDocumentTypes: (value: string[] | undefined) => void;
368
427
  /** Defines the document types a drive supports.
369
428
  *
370
- * Defaults to all of the document types registered in the reactor.
429
+ * Unset or empty, it means every document type registered in the reactor.
371
430
  */
372
- declare function useAllowedDocumentTypes(): string[] | undefined;
431
+ export declare function useAllowedDocumentTypes(): string[] | undefined;
373
432
  /** Adds an event handler for when the allowed document types for a given app changes. */
374
- declare const addAllowedDocumentTypesEventHandler: () => void;
375
- declare const phAppConfigSetters: PHAppConfigSetters$1;
376
- declare const phDocumentEditorConfigSetters: PHDocumentEditorConfigSetters$1;
377
- declare const phAppConfigHooks: PHAppConfigHooks$1;
378
- declare const phDocumentEditorConfigHooks: PHDocumentEditorConfigHooks$1;
433
+ export declare const addAllowedDocumentTypesEventHandler: () => void;
434
+ export declare const phAppConfigSetters: PHAppConfigSetters$1;
435
+ export declare const phDocumentEditorConfigSetters: PHDocumentEditorConfigSetters$1;
436
+ export declare const phAppConfigHooks: PHAppConfigHooks$1;
437
+ export declare const phDocumentEditorConfigHooks: PHDocumentEditorConfigHooks$1;
379
438
  //#endregion
380
439
  //#region src/hooks/config/set-config-by-key.d.ts
381
- declare function setPHGlobalConfigByKey<TKey extends PHGlobalConfigKey$1>(key: TKey, value: PHGlobalConfig$1[TKey] | undefined): void;
382
- declare function setPHAppConfigByKey<TKey extends PHAppConfigKey$1>(key: TKey, value: PHAppConfig$1[TKey] | undefined): void;
383
- declare function setPHDocumentEditorConfigByKey<TKey extends PHDocumentEditorConfigKey$1>(key: TKey, value: PHDocumentEditorConfig$1[TKey] | undefined): void;
440
+ export declare function setPHGlobalConfigByKey<TKey extends PHGlobalConfigKey$1>(key: TKey, value: PHGlobalConfig$1[TKey] | undefined): void;
441
+ export declare function setPHAppConfigByKey<TKey extends PHAppConfigKey$1>(key: TKey, value: PHAppConfig$1[TKey] | undefined): void;
442
+ export declare function setPHDocumentEditorConfigByKey<TKey extends PHDocumentEditorConfigKey$1>(key: TKey, value: PHDocumentEditorConfig$1[TKey] | undefined): void;
384
443
  //#endregion
385
444
  //#region src/hooks/config/set-config-by-object.d.ts
386
- declare function setDefaultPHGlobalConfig(config: PHGlobalConfig$1): void;
387
- declare function useSetDefaultPHGlobalConfig(config: PHGlobalConfig$1): void;
388
- declare function useResetPHGlobalConfig(defaultConfigForReset: PHGlobalConfig$1): () => void;
389
- declare function setPHGlobalConfig(config: Partial<PHGlobalConfig$1>): void;
390
- declare function useSetPHGlobalConfig(config: Partial<PHGlobalConfig$1>): void;
445
+ export declare function setDefaultPHGlobalConfig(config: PHGlobalConfig$1): void;
446
+ export declare function useSetDefaultPHGlobalConfig(config: PHGlobalConfig$1): void;
447
+ export declare function useResetPHGlobalConfig(defaultConfigForReset: PHGlobalConfig$1): () => void;
448
+ export declare function setPHGlobalConfig(config: Partial<PHGlobalConfig$1>): void;
449
+ export declare function useSetPHGlobalConfig(config: Partial<PHGlobalConfig$1>): void;
391
450
  /** Sets the global drive config.
392
451
  *
393
452
  * Pass in a partial object of the global drive config to set.
394
453
  */
395
- declare function setPHAppConfig(config: Partial<PHAppConfig$1>): void;
454
+ export declare function setPHAppConfig(config: Partial<PHAppConfig$1>): void;
396
455
  /** Sets the global document config.
397
456
  *
398
457
  * Pass in a partial object of the global document config to set.
399
458
  */
400
- declare function setPHDocumentEditorConfig(config: Partial<PHDocumentEditorConfig$1>): void;
459
+ export declare function setPHDocumentEditorConfig(config: Partial<PHDocumentEditorConfig$1>): void;
401
460
  /** Wrapper hook for setting the global app config.
402
461
  *
403
462
  * Automatically sets the global app config when the component mounts.
404
463
  *
405
464
  * Pass in a partial object of the global app config to set.
406
465
  */
407
- declare function useSetPHAppConfig(config: Partial<PHAppConfig$1>): void;
466
+ export declare function useSetPHAppConfig(config: Partial<PHAppConfig$1>): void;
408
467
  /** Wrapper hook for setting the global document editor config.
409
468
  *
410
469
  * Automatically sets the global document editor config when the component mounts.
411
470
  *
412
471
  * Pass in a partial object of the global document editor config to set.
413
472
  */
414
- declare function useSetPHDocumentEditorConfig(config: Partial<PHDocumentEditorConfig$1>): void;
473
+ export declare function useSetPHDocumentEditorConfig(config: Partial<PHDocumentEditorConfig$1>): void;
415
474
  //#endregion
416
475
  //#region src/hooks/config/use-value-by-key.d.ts
417
- declare function usePHGlobalConfigByKey<TKey extends PHGlobalConfigKey$1>(key: TKey): _powerhousedao_reactor_browser0.PHGlobalConfig[TKey];
476
+ export declare function usePHGlobalConfigByKey<TKey extends PHGlobalConfigKey$1>(key: TKey): import("@powerhousedao/reactor-browser").PHGlobalConfig[TKey];
418
477
  /** Gets the value of an item in the global drive config for a given key.
419
478
  *
420
479
  * Strongly typed, inferred from type definition for the key.
421
480
  */
422
- declare function usePHAppConfigByKey<TKey extends PHAppConfigKey$1>(key: TKey): _powerhousedao_reactor_browser0.PHGlobalConfig[TKey];
481
+ export declare function usePHAppConfigByKey<TKey extends PHAppConfigKey$1>(key: TKey): import("@powerhousedao/reactor-browser").PHGlobalConfig[TKey];
423
482
  /** Gets the value of an item in the global document config for a given key.
424
483
  *
425
484
  * Strongly typed, inferred from type definition for the key.
426
485
  */
427
- declare function usePHDocumentEditorConfigByKey<TKey extends PHDocumentEditorConfigKey$1>(key: TKey): _powerhousedao_reactor_browser0.PHGlobalConfig[TKey];
486
+ export declare function usePHDocumentEditorConfigByKey<TKey extends PHDocumentEditorConfigKey$1>(key: TKey): import("@powerhousedao/reactor-browser").PHGlobalConfig[TKey];
428
487
  //#endregion
429
488
  //#region src/hooks/config/utils.d.ts
430
- declare function callGlobalSetterForKey<TKey extends PHGlobalConfigKey$1>(key: TKey, value: PHGlobalConfig$1[TKey] | undefined): void;
489
+ export declare function callGlobalSetterForKey<TKey extends PHGlobalConfigKey$1>(key: TKey, value: PHGlobalConfig$1[TKey] | undefined): void;
431
490
  //#endregion
432
491
  //#region src/hooks/drives.d.ts
433
492
  /** Returns all of the drives in the reactor */
434
- declare const useDrives: UsePHGlobalValue<DocumentDriveDocument[]>;
493
+ export declare const useDrives: UsePHGlobalValue<DocumentDriveDocument[]>;
435
494
  /** Sets the drives in the reactor */
436
- declare const setDrives: SetPHGlobalValue<DocumentDriveDocument[]>;
495
+ export declare const setDrives: SetPHGlobalValue<DocumentDriveDocument[]>;
437
496
  /** Adds an event handler for the drives */
438
- declare const addDrivesEventHandler: () => void;
497
+ export declare const addDrivesEventHandler: () => void;
439
498
  //#endregion
440
499
  //#region src/hooks/loading.d.ts
441
- declare const useLoading: () => boolean | undefined, setLoading: (value: boolean | undefined) => void, addLoadingEventHandler: () => void;
442
- declare const loading: LOADING;
500
+ export declare const useLoading: () => boolean | undefined, setLoading: (value: boolean | undefined) => void, addLoadingEventHandler: () => void;
501
+ export declare const loading: LOADING;
443
502
  //#endregion
444
503
  //#region src/hooks/connection-state.d.ts
445
504
  /**
446
505
  * Returns a map of remote name to connection state snapshot for all remotes.
447
506
  * Re-renders when any remote's connection state changes.
448
507
  */
449
- declare function useConnectionStates(): ReadonlyMap<string, ConnectionStateSnapshot$1>;
508
+ export declare function useConnectionStates(): ReadonlyMap<string, ConnectionStateSnapshot$1>;
450
509
  /**
451
510
  * Returns the connection state snapshot for a specific remote by name.
452
511
  */
453
- declare function useConnectionState(remoteName: string): ConnectionStateSnapshot$1 | undefined;
512
+ export declare function useConnectionState(remoteName: string): ConnectionStateSnapshot$1 | undefined;
454
513
  //#endregion
455
514
  //#region src/hooks/document-by-id.d.ts
456
515
  /** Returns a document by id. */
457
- declare function useDocumentById(id: string | null | undefined): UseDispatchResult<PHDocument$1, Action$1>;
516
+ export declare function useDocumentById(id: string | null | undefined): UseDispatchResult<PHDocument$1, Action$1>;
458
517
  /** Returns documents by ids. */
459
- declare function useDocumentsByIds(ids: string[] | null | undefined): PHDocument$1[];
518
+ export declare function useDocumentsByIds(ids: string[] | null | undefined): PHDocument$1[];
519
+ //#endregion
520
+ //#region src/hooks/link-props.d.ts
521
+ type ClickLike = Pick<MouseEvent, "button" | "metaKey" | "ctrlKey" | "shiftKey" | "altKey" | "defaultPrevented" | "preventDefault">;
522
+ /** A plain primary click; modified and other-button clicks stay the browser's. */
523
+ export declare function isPlainClick(event: ClickLike): boolean;
524
+ export type LinkProps = {
525
+ href: string;
526
+ onClick: (event: ClickLike) => void;
527
+ onMouseEnter: () => void;
528
+ onFocus: () => void;
529
+ "aria-current"?: "page";
530
+ };
531
+ /** Props for an `<a>` that opens `target` in the app on a plain click, and
532
+ * leaves new tabs and windows to the browser; acts on the store in context. */
533
+ export declare function useLinkProps(target: PHNavigationTarget$1 | undefined, open?: () => void): LinkProps;
534
+ //#endregion
535
+ //#region src/hooks/document-link.d.ts
536
+ /** Where a document opens: the loaded drive that lists it, or undefined while none does. */
537
+ export declare function useDocumentTarget(documentId: string | null | undefined): PHDriveTarget | undefined;
538
+ /** `useLinkProps` for a document by id, e.g. a `useDocumentsOfType` row;
539
+ * undefined while no loaded drive lists it. */
540
+ export declare function useDocumentLinkProps(documentId: string | null | undefined): LinkProps | undefined;
541
+ //#endregion
542
+ //#region src/hooks/documents-of-type.d.ts
543
+ export type DocumentsOfTypeOptions = {
544
+ /** Documents per page; 25 by default. */
545
+ limit?: number;
546
+ };
547
+ export type DocumentsOfType<TState extends PHBaseState> = {
548
+ /** The loaded pages' documents that pass the module's schema. */
549
+ documents: PHDocument$1<TState>[];
550
+ /** Documents of the type that fail it, e.g. written by another version of the model. */
551
+ invalid: PHDocument$1[];
552
+ hasNextPage: boolean;
553
+ isLoadingNextPage: boolean;
554
+ /** Loads the next page; does nothing while one loads or when there is none. */
555
+ loadNextPage: () => void;
556
+ /** The last failure loading a further page; a failed first page throws. */
557
+ error: unknown;
558
+ };
559
+ type ModelOf = Pick<DocumentModelModule$1, "documentModel">;
560
+ /** The documents of `module`'s type across every drive, a page at a time and
561
+ * checked against its schema; suspends until the first page has loaded. */
562
+ export declare function useDocumentsOfType<TState extends PHBaseState>(module: DocumentModelModule$1<TState>, { limit }?: DocumentsOfTypeOptions): DocumentsOfType<TState>;
563
+ /** Loads the first page `useDocumentsOfType` reads, e.g. in a route loader, so it doesn't suspend. */
564
+ export declare function loadDocumentsOfType(module: ModelOf, { limit }?: DocumentsOfTypeOptions): Promise<void>;
460
565
  //#endregion
461
566
  //#region src/hooks/document-of-type.d.ts
462
567
  /** Returns a document of a specific type, throws an error if the found document has a different type */
463
- declare function useDocumentOfType<TDocument extends PHDocument$1, TAction extends Action$1>(documentId: string | null | undefined, documentType: string | null | undefined): never[] | [TDocument, DocumentDispatch$1<TAction>];
568
+ export declare function useDocumentOfType<TDocument extends PHDocument$1, TAction extends Action$1>(documentId: string | null | undefined, documentType: string | null | undefined): never[] | [TDocument, DocumentDispatch$2<TAction>];
464
569
  //#endregion
465
570
  //#region src/hooks/document-types.d.ts
466
571
  /** Returns the document types a app supports.
467
572
  *
468
- * If present, uses the `allowedDocumentTypes` config value.
469
- * Otherwise, uses the supported document types from the reactor.
573
+ * Uses the `allowedDocumentTypes` config value when it lists any types.
574
+ * Unset or empty, it means every type, so the reactor's supported types are used.
470
575
  */
471
- declare function useDocumentTypes(): string[] | undefined;
576
+ export declare function useDocumentTypes(): string[] | undefined;
472
577
  //#endregion
473
578
  //#region src/hooks/document-version-status.d.ts
474
- type DocumentVersionStatus = {
579
+ export type DocumentVersionStatus = {
475
580
  kind: "current";
476
581
  documentVersion: number;
477
582
  } | {
@@ -488,47 +593,85 @@ type DocumentVersionStatus = {
488
593
  * Classifies a document's model version against the installed module
489
594
  * versions. Pure logic, extracted for testing.
490
595
  */
491
- declare function getDocumentVersionStatus(documentVersion: number, availableVersions: number[], hasUpgradePath: (fromVersion: number, toVersion: number) => boolean): DocumentVersionStatus | undefined;
596
+ export declare function getDocumentVersionStatus(documentVersion: number, availableVersions: number[], hasUpgradePath: (fromVersion: number, toVersion: number) => boolean): DocumentVersionStatus | undefined;
492
597
  /**
493
598
  * Compares the given document's model version against the versions available
494
599
  * from installed Vetra packages. Returns undefined while packages load or
495
600
  * when the document type has no installed modules.
496
601
  */
497
- declare function useDocumentVersionStatus(document: PHDocument$1 | undefined): DocumentVersionStatus | undefined;
602
+ export declare function useDocumentVersionStatus(document: PHDocument$1 | undefined): DocumentVersionStatus | undefined;
498
603
  //#endregion
499
604
  //#region src/hooks/download-document.d.ts
500
- declare function useDownloadDocument(id: string | undefined): () => Promise<void>;
605
+ export declare function useDownloadDocument(id: string | undefined): () => Promise<void>;
501
606
  //#endregion
502
607
  //#region src/hooks/download-folder.d.ts
503
608
  /**
504
609
  * Downloads the selected drive's folder (or the whole drive when no folder
505
610
  * is given) as a single zip archive mirroring the folder tree.
506
611
  */
507
- declare function useDownloadFolder(folderNode?: FolderNode): () => Promise<void>;
612
+ export declare function useDownloadFolder(folderNode?: FolderNode): () => Promise<void>;
508
613
  //#endregion
509
614
  //#region src/hooks/drive-by-id.d.ts
510
- declare function useDriveById(driveId: string | undefined | null): [DocumentDriveDocument, DocumentDispatch<DocumentDriveAction>];
615
+ export declare function useDriveById(driveId: string | undefined | null): [DocumentDriveDocument, DocumentDispatch<DocumentDriveAction>];
616
+ //#endregion
617
+ //#region src/hooks/drive-context.d.ts
618
+ /** The drive a drive app shows. `open`/`preload` replace the app's navigation,
619
+ * e.g. for a host that keeps the open node in local state. */
620
+ export type DriveContextValue = {
621
+ drive: DocumentDriveDocument;
622
+ dispatch: DocumentDispatch$1<DocumentDriveAction>;
623
+ /** The open folder; undefined at the drive's root or on a document. */
624
+ folder?: FolderNode;
625
+ /** The open node, a folder or a document. */
626
+ nodeId?: string;
627
+ open?: (node: Node | undefined, options?: PHNavigateOptions) => void;
628
+ preload?: (node: Node | undefined) => void;
629
+ };
630
+ /** Hosts render a drive app inside this; `useSelectedDrive`, `useSelectedNode`
631
+ * and `useSelectedFolder` below read it, and opening nodes calls its `open`. */
632
+ export declare function DriveProvider(props: {
633
+ value: DriveContextValue;
634
+ children: ReactNode;
635
+ }): import("react/jsx-runtime").JSX.Element;
636
+ /** The nearest drive app's drive, or undefined outside one. */
637
+ export declare function useDriveContext(): DriveContextValue | undefined;
638
+ //#endregion
639
+ //#region src/hooks/editor-context.d.ts
640
+ /** The document an editor is rendered with, and a dispatch bound to it. */
641
+ export type EditorDocumentContextValue = readonly [PHDocument$1, DocumentDispatch$1];
642
+ /** Hosts render an editor inside this, with the same `document` and `dispatch`
643
+ * as its props; `useSelected*Document` hooks below read them. */
644
+ export declare function EditorDocumentProvider(props: {
645
+ document: PHDocument$1;
646
+ dispatch: DocumentDispatch$1;
647
+ children: ReactNode;
648
+ }): import("react/jsx-runtime").JSX.Element;
649
+ /** The nearest editor's document and dispatch, or undefined outside one. */
650
+ export declare function useEditorDocumentContext(): EditorDocumentContextValue | undefined;
511
651
  //#endregion
512
652
  //#region src/hooks/editor-modules.d.ts
513
- declare function useEditorModules(): EditorModule[] | undefined;
514
- declare function useAppModules(): EditorModule[] | undefined;
515
- declare function useFallbackEditorModule(documentType: string | null | undefined): EditorModule | undefined;
516
- declare function useAppModuleById(id: string | null | undefined): EditorModule | undefined;
517
- declare function useDefaultAppModule(): EditorModule | undefined;
518
- declare function useEditorModuleById(id: string | null | undefined): EditorModule | undefined;
519
- declare function useEditorModulesForDocumentType(documentType: string | null | undefined): EditorModule[] | undefined;
653
+ export declare function useEditorModules(): EditorModule[] | undefined;
654
+ export declare function useAppModules(): EditorModule[] | undefined;
655
+ export declare function useFallbackEditorModule(documentType: string | null | undefined): EditorModule | undefined;
656
+ export declare function useAppModuleById(id: string | null | undefined): EditorModule | undefined;
657
+ export declare function useDefaultAppModule(): EditorModule | undefined;
658
+ export declare function useEditorModuleById(id: string | null | undefined): EditorModule | undefined;
659
+ export declare function useEditorModulesForDocumentType(documentType: string | null | undefined): EditorModule[] | undefined;
660
+ /** The editor for `document`: its preferred editor if that edits its type,
661
+ * else the first editor for its type. */
662
+ export declare function useEditorModuleFor(document: PHDocument$1 | null | undefined): EditorModule | undefined;
520
663
  //#endregion
521
664
  //#region src/hooks/use-editor-preloader.d.ts
522
- declare function useEditorPreloader(): void;
665
+ export declare function useEditorPreloader(): void;
523
666
  //#endregion
524
667
  //#region src/hooks/features.d.ts
525
- declare const useFeatures: UsePHGlobalValue<Map<string, boolean>>;
526
- declare const setFeatures: SetPHGlobalValue<Map<string, boolean>>;
527
- declare const addFeaturesEventHandler: AddPHGlobalEventHandler;
668
+ export declare const useFeatures: UsePHGlobalValue<Map<string, boolean>>;
669
+ export declare const setFeatures: SetPHGlobalValue<Map<string, boolean>>;
670
+ export declare const addFeaturesEventHandler: AddPHGlobalEventHandler;
528
671
  //#endregion
529
672
  //#region src/hooks/file-drag-and-drop.d.ts
530
- declare const EDITOR_FILE_DROP_OPT_OUT_ATTR = "data-accepts-files";
531
- declare function useDropFile(handleAddFile: (file: File, parent: Node$1 | undefined) => Promise<void>): {
673
+ export declare const EDITOR_FILE_DROP_OPT_OUT_ATTR = "data-accepts-files";
674
+ export declare function useDropFile(handleAddFile: (file: File, parent: Node$1 | undefined) => Promise<void>): {
532
675
  onDragEnter: DragEventHandler;
533
676
  onDragOver: DragEventHandler;
534
677
  onDragLeave: DragEventHandler;
@@ -537,65 +680,87 @@ declare function useDropFile(handleAddFile: (file: File, parent: Node$1 | undefi
537
680
  };
538
681
  //#endregion
539
682
  //#region src/hooks/folder-by-id.d.ts
540
- declare function useFolderById(id: string | null | undefined): FolderNode | undefined;
683
+ export declare function useFolderById(id: string | null | undefined): FolderNode | undefined;
541
684
  //#endregion
542
685
  //#region src/hooks/graphql-reactor-client.d.ts
543
- declare const useGraphQLReactorClient: UsePHGlobalValue<ReactorGraphQLClient>;
544
- declare const setGraphQLReactorClient: SetPHGlobalValue<ReactorGraphQLClient>;
545
- declare const addGraphQLReactorClientEventHandler: () => void;
686
+ export declare const useGraphQLReactorClient: UsePHGlobalValue<ReactorGraphQLClient>;
687
+ export declare const setGraphQLReactorClient: SetPHGlobalValue<ReactorGraphQLClient>;
688
+ export declare const addGraphQLReactorClientEventHandler: () => void;
546
689
  //#endregion
547
690
  //#region src/hooks/init-graphql-reactor-client.d.ts
548
- declare function useInitReactorGraphqlClient(switchboardUrl?: "http://localhost:4001/graphql", driveId?: "powerhouse"): boolean;
691
+ export declare function useInitReactorGraphqlClient(switchboardUrl?: "http://localhost:4001/graphql", driveId?: "powerhouse"): boolean;
549
692
  //#endregion
550
693
  //#region src/hooks/items-in-selected-drive.d.ts
551
694
  /** Returns the nodes in the selected drive. */
552
- declare function useNodesInSelectedDrive(): _powerhousedao_shared_document_drive0.Node[] | undefined;
695
+ export declare function useNodesInSelectedDrive(): Node[] | undefined;
553
696
  /** Returns the file nodes in the selected drive. */
554
- declare function useFileNodesInSelectedDrive(): FileNode[] | undefined;
697
+ export declare function useFileNodesInSelectedDrive(): FileNode[] | undefined;
555
698
  /** Returns the folder nodes in the selected drive. */
556
- declare function useFolderNodesInSelectedDrive(): FolderNode[] | undefined;
699
+ export declare function useFolderNodesInSelectedDrive(): FolderNode[] | undefined;
557
700
  /** Returns the documents in the selected drive. */
558
- declare function useDocumentsInSelectedDrive(): PHDocument$1[] | undefined;
701
+ export declare function useDocumentsInSelectedDrive(): PHDocument$1[] | undefined;
559
702
  /** Returns the document types supported by the selected drive, as defined by the document model documents present in the drive */
560
- declare function useDocumentTypesInSelectedDrive(): string[] | undefined;
703
+ export declare function useDocumentTypesInSelectedDrive(): string[] | undefined;
561
704
  //#endregion
562
705
  //#region src/hooks/items-in-selected-folder.d.ts
563
706
  /** Returns the nodes in the selected folder. */
564
- declare function useNodesInSelectedFolder(): Node[] | undefined;
707
+ export declare function useNodesInSelectedFolder(): Node[] | undefined;
565
708
  /** Returns the file nodes in the selected folder. */
566
- declare function useFileNodesInSelectedFolder(): FileNode[] | undefined;
709
+ export declare function useFileNodesInSelectedFolder(): FileNode[] | undefined;
567
710
  /** Returns the folder nodes in the selected folder. */
568
- declare function useFolderNodesInSelectedFolder(): FolderNode[] | undefined;
711
+ export declare function useFolderNodesInSelectedFolder(): FolderNode[] | undefined;
569
712
  /** Returns the documents in the selected folder. */
570
- declare function useDocumentsInSelectedFolder(): PHDocument$1[] | undefined;
713
+ export declare function useDocumentsInSelectedFolder(): PHDocument$1[] | undefined;
571
714
  //#endregion
572
715
  //#region src/hooks/make-ph-event-functions.d.ts
573
- declare function makePHEventFunctions<TKey extends PHGlobalKey$1>(key: TKey): {
716
+ /** Calls `onChange` whenever `key` is set: through the bound store, or the
717
+ * `ph:<key>Updated` event on pages that bound none. */
718
+ export declare function subscribeToPHValue(key: PHGlobalKey$1, onChange: () => void): () => void;
719
+ export declare function makePHEventFunctions<TKey extends PHGlobalKey$1>(key: TKey): {
574
720
  useValue: () => PHGlobal$1[TKey] | undefined;
575
721
  setValue: (value: PHGlobal$1[TKey] | undefined) => void;
576
722
  addEventHandler: () => void;
723
+ subscribeToValue: (onStoreChange: () => void) => () => void;
724
+ getSnapshot: () => PHGlobal$1[TKey] | undefined;
577
725
  };
578
726
  //#endregion
579
727
  //#region src/hooks/modals.d.ts
580
728
  /** Returns the current modal */
581
- declare const usePHModal: () => PHModal$1 | undefined;
729
+ export declare const usePHModal: () => PHModal$1 | undefined;
582
730
  /** Sets the current modal */
583
- declare const setPHModal: (value: PHModal$1 | undefined) => void;
731
+ export declare const setPHModal: (value: PHModal$1 | undefined) => void;
584
732
  /** Adds an event handler for the modal */
585
- declare const addModalEventHandler: () => void;
586
- /** Shows a modal */
587
- declare function showPHModal(modal: PHModal$1): void;
588
- /** Closes the current modal */
589
- declare function closePHModal(): void;
733
+ export declare const addModalEventHandler: () => void;
734
+ /** The query param that names a routed modal. */
735
+ export declare const MODAL_SEARCH_PARAM = "modal";
736
+ /** Whether `modal` lives in the URL rather than the store. */
737
+ export declare function isRoutedModal(modal: PHModal$1 | undefined): boolean;
738
+ /** The query params that open `modal`; undefined for one the store holds. */
739
+ export declare function modalSearch(modal: PHModal$1): Record<string, string> | undefined;
740
+ /** The routed modal `search` opens, if any. */
741
+ export declare function modalFromSearch(search: Record<string, unknown>): PHModal$1 | undefined;
742
+ /** `search` without a routed modal's params. */
743
+ export declare function withoutModalSearch(search: Record<string, string>): PHSearchUpdate$1;
744
+ /** Shows a modal. With a host navigation, a routed one opens in the URL, in
745
+ * place of the current entry, and "settings" opens the settings page. */
746
+ export declare function showPHModal(modal: PHModal$1): void;
747
+ /** Closes the current modal; a routed one leaves the URL in place of the entry,
748
+ * and a confirmation opened over it closes with it. */
749
+ export declare function closePHModal(): void;
750
+ /** The href that opens `modal` over the current page. */
751
+ export declare function modalHref(modal: PHModal$1): string;
752
+ /** Props for an `<a>` that opens a routed `modal` over the current page on a
753
+ * plain click; new tabs and copied links get its URL. */
754
+ export declare function useModalLinkProps(modal: PHModal$1): Pick<LinkProps, "href" | "onClick">;
590
755
  /** Shows the create document modal */
591
- declare function showCreateDocumentModal(documentType: string, documentModelVersion?: number): void;
756
+ export declare function showCreateDocumentModal(documentType: string, documentModelVersion?: number): void;
592
757
  /** Shows the delete node modal */
593
- declare function showDeleteNodeModal(nodeOrId: Node | string): void;
758
+ export declare function showDeleteNodeModal(nodeOrId: Node | string): void;
594
759
  //#endregion
595
760
  //#region src/hooks/node-actions.d.ts
596
- declare function useNodeActions(): {
761
+ export declare function useNodeActions(): {
597
762
  onAddFile: (file: File, parent: Node | undefined) => Promise<AddedFileNode | undefined>;
598
- onAddFolder: (name: string, parent: Node | undefined) => Promise<_powerhousedao_shared_document_drive0.FolderNode | undefined>;
763
+ onAddFolder: (name: string, parent: Node | undefined) => Promise<import("@powerhousedao/shared/document-drive").FolderNode | undefined>;
599
764
  onRenameNode: (newName: string, node: Node) => Promise<Node | undefined>;
600
765
  onCopyNode: (src: Node, target: Node | undefined) => Promise<void>;
601
766
  onMoveNode: (src: Node, target: Node | undefined) => Promise<void>;
@@ -606,89 +771,197 @@ declare function useNodeActions(): {
606
771
  //#endregion
607
772
  //#region src/hooks/node-by-id.d.ts
608
773
  /** Returns a node in the selected drive by id. */
609
- declare function useNodeById(id: string | null | undefined): Node | undefined;
774
+ export declare function useNodeById(id: string | null | undefined): Node | undefined;
610
775
  //#endregion
611
776
  //#region src/hooks/node-path.d.ts
612
777
  /** Returns the path to a node in the selected drive */
613
- declare function useNodePathById(id: string | null | undefined): Node[];
778
+ export declare function useNodePathById(id: string | null | undefined): Node[];
614
779
  /** Returns the path to the currently selected node in the selected drive. */
615
- declare function useSelectedNodePath(): Node[];
780
+ export declare function useSelectedNodePath(): Node[];
616
781
  //#endregion
617
782
  //#region src/hooks/package-discovery.d.ts
618
- declare const usePackageDiscoveryService: () => IPackageDiscoveryService | undefined;
619
- declare const setPackageDiscoveryService: (value: IPackageDiscoveryService | undefined) => void;
620
- declare const addPackageDiscoveryServiceEventHandler: () => void;
783
+ export declare const usePackageDiscoveryService: () => IPackageDiscoveryService | undefined;
784
+ export declare const setPackageDiscoveryService: (value: IPackageDiscoveryService | undefined) => void;
785
+ export declare const addPackageDiscoveryServiceEventHandler: () => void;
621
786
  //#endregion
622
787
  //#region src/hooks/parent-folder.d.ts
623
- declare function useNodeParentFolderById(id: string | null | undefined): FolderNode | undefined;
624
- declare function useParentFolderForSelectedNode(): FolderNode | undefined;
788
+ export declare function useNodeParentFolderById(id: string | null | undefined): FolderNode | undefined;
789
+ export declare function useParentFolderForSelectedNode(): FolderNode | undefined;
625
790
  //#endregion
626
791
  //#region src/hooks/revision-history.d.ts
627
- /** Returns whether revision history is visible */
628
- declare const useRevisionHistoryVisible: () => boolean | undefined;
629
- /** Sets revision history visibility */
630
- declare const setRevisionHistoryVisible: (value: boolean | undefined) => void;
631
- /** Adds event handler for revision history visibility */
632
- declare const addRevisionHistoryVisibleEventHandler: () => void;
633
- /** Shows the revision history */
634
- declare function showRevisionHistory(): void;
635
- /** Hides the revision history */
636
- declare function hideRevisionHistory(): void;
792
+ /** The query param that opens the document's revision history: `?history`. */
793
+ export declare const REVISION_HISTORY_PARAM = "history";
794
+ /** The history page shown, from 1 (the newest operations): `?history&historyPage=2`.
795
+ * Its own name: a drive app or editor may page by `page`. */
796
+ export declare const REVISION_HISTORY_PAGE_PARAM = "historyPage";
797
+ /** The page a `page` param names: a positive integer, else the first. */
798
+ export declare function parseRevisionHistoryPage(value: string | undefined): number;
799
+ /** Whether the URL opens the revision history. */
800
+ export declare function useRevisionHistoryVisible(): boolean;
801
+ /** The revision history page the URL names, from 1. */
802
+ export declare function useRevisionHistoryPage(): number;
803
+ /** Shows the revision history: a new history entry, so Back closes it. */
804
+ export declare function showRevisionHistory(): void;
805
+ /** Hides the revision history. */
806
+ export declare function hideRevisionHistory(): void;
807
+ /** Opens history page `page`, from 1; Back returns to the page before. */
808
+ export declare function setRevisionHistoryPage(page: number): void;
809
+ /** Shows or hides the revision history. */
810
+ export declare function setRevisionHistoryVisible(visible: boolean | undefined): void;
811
+ /** @deprecated The revision history is a URL param now; there is no store value to watch. */
812
+ export declare function addRevisionHistoryVisibleEventHandler(): void;
637
813
  //#endregion
638
814
  //#region src/hooks/selected-document.d.ts
639
- /** Returns the selected document id */
640
- declare function useSelectedDocumentId(): string | undefined;
641
- /** Returns the selected document. */
642
- declare function useSelectedDocument(): readonly [PHDocument$1, DispatchFn<Action$1>];
815
+ /** Returns the selected document id: the editor's document, else the drive
816
+ * app's open document, else the app's selection. */
817
+ export declare function useSelectedDocumentId(): string | undefined;
643
818
  /** Returns the selected document. */
644
- declare function useSelectedDocumentSafe(): UseDispatchResult<PHDocument$1, Action$1>;
819
+ export declare function useSelectedDocument(): readonly [PHDocument$1, DispatchFn<Action$1>];
820
+ /** Returns the selected document: the editor's, else the app's selection. */
821
+ export declare function useSelectedDocumentSafe(): UseDispatchResult<PHDocument$1, Action$1>;
645
822
  /** Returns the selected document of a specific type, throws an error if the found document has a different type */
646
- declare function useSelectedDocumentOfType(documentType: null | undefined): never[];
647
- declare function useSelectedDocumentOfType<TDocument extends PHDocument$1, TAction extends Action$1>(documentType: string): [TDocument, DocumentDispatch$1<TAction>];
823
+ export declare function useSelectedDocumentOfType(documentType: null | undefined): never[];
824
+ export declare function useSelectedDocumentOfType<TDocument extends PHDocument$1, TAction extends Action$1>(documentType: string): [TDocument, DocumentDispatch$2<TAction>];
825
+ //#endregion
826
+ //#region src/hooks/navigation.d.ts
827
+ /** Fired on `window` when the fallback navigator rewrites the URL. */
828
+ export declare const PH_LOCATION_CHANGE_EVENT = "ph:locationchange";
829
+ /** Params read at boot or app-wide; they survive every navigation. Others,
830
+ * e.g. a document's own, are dropped when the target changes. */
831
+ export declare const GLOBAL_SEARCH_PARAMS: readonly ["driveUrl", "theme", "embed", "LOG_LEVEL", "reactorWorker"];
832
+ /** Feature flags are any `FEATURE_*` param, so they are retained by prefix. */
833
+ export declare const FEATURE_FLAG_PARAM_PREFIX = "FEATURE_";
834
+ /** Whether `key` is a param every navigation keeps. */
835
+ export declare function isGlobalSearchParam(key: string): boolean;
836
+ /** A query string's params; repeated keys keep their last value. */
837
+ export declare function searchToRecord(search: string): Record<string, string>;
838
+ /** `prev` with `update` applied; an `undefined` value removes the key. */
839
+ export declare function applySearchUpdate(prev: Record<string, string>, update: PHSearchUpdate$1): Record<string, string>;
840
+ /** `params` as a query string, with an empty value as a bare key: `history`, not `history=`. */
841
+ export declare function searchParamsToString(params: URLSearchParams): string;
842
+ /** `?a=1&b=2`, or an empty string for no params. */
843
+ export declare function recordToSearch(record: Record<string, string>): string;
844
+ /** The settings page's path; its tabs are below it. */
845
+ export declare const SETTINGS_PATH = "/settings";
846
+ export declare function isSettingsTarget(target: PHNavigationTarget$1 | undefined): target is PHSettingsTarget$1;
847
+ /** The pathname a target opens at, base path included. */
848
+ export declare function targetPathname(target: PHNavigationTarget$1 | undefined): string;
849
+ /** History state key: the index of the entry a document was opened from. */
850
+ export declare const OPENED_FROM_STATE_KEY = "phOpenedFrom";
851
+ /** The index to go back to from `index`, when it lies before it. */
852
+ export declare function openedFromIndex(state: object | undefined, index: number): number | undefined;
853
+ /** @internal Selects what the browser fallback opens; sync-selection.ts sets it. */
854
+ export declare function setBrowserOpenSync(sync: () => void): void;
855
+ export declare const browserNavigation: PHNavigation$1;
856
+ /** True when the store has a host navigation, not the browser fallback. */
857
+ export declare function hasHostNavigation(): boolean;
858
+ /** The app store's navigation, else the browser fallback. */
859
+ export declare function getPHNavigation(): PHNavigation$1;
860
+ /** The current pathname as the navigation sees it, base path included. */
861
+ export declare function getCurrentPathname(): string;
862
+ /** Opens `target`; without `search`, a target already open is left alone. */
863
+ export declare function openTarget(target: PHNavigationTarget$1 | undefined, options?: PHNavigateOptions$1): void;
864
+ /** Opens `target` through `navigation`, unless it is open already. */
865
+ export declare function openTargetWith(navigation: PHNavigation$1, target: PHNavigationTarget$1 | undefined, options?: PHNavigateOptions$1): void;
866
+ /** Asks the host navigation to warm `target`; a no-op without one. */
867
+ export declare function preloadTarget(target: PHNavigationTarget$1 | undefined): void;
868
+ /** The href `target` opens at through `navigation`, base path included. */
869
+ export declare function getTargetHref(target: PHNavigationTarget$1 | undefined, navigation?: PHNavigation$1): string;
870
+ export declare function resolveSearchUpdate(prev: Record<string, string>, update: SearchParamsUpdate$1): Record<string, string>;
871
+ /** Rewrites the current query params through the app store's navigation. */
872
+ export declare function setSearchParams(update: SearchParamsUpdate$1, options?: {
873
+ replace?: boolean;
874
+ }): void;
875
+ //#endregion
876
+ //#region src/hooks/url-state.d.ts
877
+ /** The nearest store's navigation, else the bound store's, else the browser's.
878
+ * Hosts set it once, so hook order holds. */
879
+ export declare function usePHNavigation(): PHNavigation$1;
880
+ /** The current query params. */
881
+ export declare function useSearchParams(): Record<string, string>;
882
+ /** Sets query params: an object merges into them, a function returns them all. */
883
+ export declare function useSetSearchParams(): SetSearchParams$1;
648
884
  //#endregion
649
885
  //#region src/hooks/selected-drive.d.ts
650
- /** Returns the selected drive id */
651
- declare const useSelectedDriveId: () => string | undefined;
886
+ /** Returns the selected drive id: the drive app's drive, else the app's selection. */
887
+ export declare function useSelectedDriveId(): string | undefined;
652
888
  /** Sets the selected drive id */
653
- declare const setSelectedDriveId: (value: string | undefined) => void;
654
- /** Adds an event handler for the selected drive id */
655
- declare const addSelectedDriveIdEventHandler: () => void;
889
+ export declare const setSelectedDriveId: (value: string | undefined) => void;
890
+ /** Adds an event handler for the selected drive id
891
+ * @deprecated `ph:setSelectedDriveId` bypasses the URL; use `setSelectedDrive`. */
892
+ export declare const addSelectedDriveIdEventHandler: () => void;
656
893
  /** Returns the selected drive */
657
- declare function useSelectedDrive(): [DocumentDriveDocument, DocumentDispatch$1<DocumentDriveAction>];
894
+ export declare function useSelectedDrive(): [DocumentDriveDocument, DocumentDispatch$2<DocumentDriveAction>];
658
895
  /** Returns the selected drive, or undefined if no drive is selected */
659
- declare function useSelectedDriveSafe(): readonly [undefined, undefined] | [DocumentDriveDocument, DocumentDispatch$1<DocumentDriveAction>];
660
- declare function setSelectedDrive(driveOrDriveSlug: string | DocumentDriveDocument | undefined): void;
661
- declare function addSetSelectedDriveOnPopStateEventHandler(): void;
896
+ export declare function useSelectedDriveSafe(): [DocumentDriveDocument, DocumentDispatch$2<DocumentDriveAction>] | readonly [undefined, undefined];
897
+ type DriveRef = string | DocumentDriveDocument | undefined;
898
+ /** Selects a drive in the app's store. */
899
+ export declare function setSelectedDrive(driveOrDriveSlug: DriveRef): void;
900
+ /** `setSelectedDrive`, as a hook. */
901
+ export declare function useSetSelectedDrive(): (drive: DriveRef) => void;
902
+ /** Warms a drive's view before it is opened, e.g. on hover. */
903
+ export declare function preloadDrive(drive: DocumentDriveDocument | undefined): void;
904
+ /** `preloadDrive`, as a hook. */
905
+ export declare function usePreloadDrive(): (drive: DocumentDriveDocument | undefined) => void;
662
906
  //#endregion
663
907
  //#region src/hooks/selected-folder.d.ts
664
- /** Returns the selected folder. */
665
- declare function useSelectedFolder(): FolderNode | undefined;
908
+ /** Returns the selected folder: the drive app's open folder, else the app's. */
909
+ export declare function useSelectedFolder(): FolderNode | undefined;
666
910
  //#endregion
667
911
  //#region src/hooks/set-selected-node.d.ts
668
- declare const addSelectedNodeIdEventHandler: () => void;
669
- /** Sets the selected node (file or folder). */
670
- declare function setSelectedNode(nodeOrNodeSlug: Node | string | undefined): void;
671
- declare function addResetSelectedNodeEventHandler(): void;
672
- declare function addSetSelectedNodeOnPopStateEventHandler(): void;
912
+ /** Sets the selected node id without touching the URL. */
913
+ export declare const setSelectedNodeId: (value: string | undefined) => void;
914
+ /** @deprecated `ph:setSelectedNodeId` bypasses the URL; use `setSelectedNode`. */
915
+ export declare const addSelectedNodeIdEventHandler: () => void;
916
+ type NodeRef = Node | string | undefined;
917
+ /** Sets the selected node (file or folder) of the app's store; `search` sets
918
+ * the params it opens with. Inside a drive app, use `useSetSelectedNode`. */
919
+ export declare function setSelectedNode(node: NodeRef, options?: PHNavigateOptions$1): void;
920
+ /** Opens a node: through the drive app's `open` when it has one, else the
921
+ * app's navigation in the drive app's drive. */
922
+ export declare function useSetSelectedNode(): (node: NodeRef, options?: PHNavigateOptions$1) => void;
923
+ /** Opens a node, or with `undefined` its drive. */
924
+ export declare const useOpenNode: () => (node: Node | undefined, options?: PHNavigateOptions$1) => void;
925
+ /** Where a node of `drive`, else of the open drive, navigates to. */
926
+ export declare function getNodeTarget(node: Node | undefined, drive?: DocumentDriveDocument): PHNavigationTarget$1 | undefined;
927
+ /** Where a node navigates to: in the drive app's drive, else the open drive. */
928
+ export declare function useNodeTarget(node: Node | undefined): PHNavigationTarget$1 | undefined;
929
+ /** Warms a node's view before it is opened, e.g. on hover. */
930
+ export declare function preloadNode(node: Node | undefined, drive?: DocumentDriveDocument): void;
931
+ /** `preloadNode` through the drive app's `preload`, if it has one. */
932
+ export declare function usePreloadNode(): (node: Node | undefined) => void;
933
+ export declare function addResetSelectedNodeEventHandler(): void;
934
+ //#endregion
935
+ //#region src/hooks/sync-selection.d.ts
936
+ /** Applies a path's selection without writing the URL; idempotent.
937
+ * @deprecated Set the store's `navigation`; its route loaders write the selection. */
938
+ export declare function syncSelectionFromPath(pathname?: string): void;
939
+ /** Syncs the selection on back/forward when no host navigation is set.
940
+ * @deprecated Set the store's `navigation`; its router handles back/forward. */
941
+ export declare function addSyncSelectionOnPopStateEventHandler(): void;
942
+ /** @deprecated Set the store's `navigation`; its router handles back/forward. */
943
+ export declare const addSetSelectedDriveOnPopStateEventHandler: typeof addSyncSelectionOnPopStateEventHandler;
944
+ /** @deprecated Set the store's `navigation`; its router handles back/forward. */
945
+ export declare const addSetSelectedNodeOnPopStateEventHandler: typeof addSyncSelectionOnPopStateEventHandler;
673
946
  //#endregion
674
947
  //#region src/hooks/selected-node.d.ts
675
948
  /** Returns the selected node. */
676
- declare function useSelectedNode(): Node | undefined;
949
+ export declare function useSelectedNode(): Node | undefined;
677
950
  //#endregion
678
951
  //#region src/hooks/selected-timeline-item.d.ts
679
952
  /** Returns the selected timeline item */
680
- declare const useSelectedTimelineItem: () => TimelineItem | null | undefined;
953
+ export declare const useSelectedTimelineItem: () => TimelineItem | null | undefined;
681
954
  /** Sets the selected timeline item */
682
- declare const setSelectedTimelineItem: (value: TimelineItem | null | undefined) => void;
955
+ export declare const setSelectedTimelineItem: (value: TimelineItem | null | undefined) => void;
683
956
  /** Adds event handler for selected timeline item */
684
- declare const addSelectedTimelineItemEventHandler: () => void;
957
+ export declare const addSelectedTimelineItemEventHandler: () => void;
685
958
  //#endregion
686
959
  //#region src/hooks/subgraph-modules.d.ts
687
- declare function useSubgraphModules(): SubgraphModule[] | undefined;
960
+ export declare function useSubgraphModules(): SubgraphModule[] | undefined;
688
961
  //#endregion
689
962
  //#region src/hooks/supported-document-types.d.ts
690
963
  /** Returns the supported document types for the reactor (derived from the document model modules) */
691
- declare function useSupportedDocumentTypesInReactor(): string[] | undefined;
964
+ export declare function useSupportedDocumentTypesInReactor(): string[] | undefined;
692
965
  //#endregion
693
966
  //#region src/hooks/theme.d.ts
694
967
  type Theme = "light" | "dark";
@@ -715,8 +988,8 @@ declare global {
715
988
  interface WindowEventMap extends ThemeWindowEvents {}
716
989
  }
717
990
  declare function setTheme(storedTheme: StoredTheme): void;
718
- declare function initTheme(): void;
719
- declare function useTheme(): {
991
+ export declare function initTheme(): void;
992
+ export declare function useTheme(): {
720
993
  readonly theme: Theme;
721
994
  readonly isSystem: boolean;
722
995
  readonly setTheme: typeof setTheme;
@@ -724,19 +997,19 @@ declare function useTheme(): {
724
997
  //#endregion
725
998
  //#region src/hooks/timeline-revision.d.ts
726
999
  /** Returns the selected timeline revision. */
727
- declare const useSelectedTimelineRevision: () => string | number | null | undefined;
1000
+ export declare const useSelectedTimelineRevision: () => string | number | null | undefined;
728
1001
  /** Sets the selected timeline revision. */
729
- declare const setSelectedTimelineRevision: (value: string | number | null | undefined) => void;
1002
+ export declare const setSelectedTimelineRevision: (value: string | number | null | undefined) => void;
730
1003
  /** Adds an event handler for the selected timeline revision. */
731
- declare const addSelectedTimelineRevisionEventHandler: () => void;
1004
+ export declare const addSelectedTimelineRevisionEventHandler: () => void;
732
1005
  //#endregion
733
1006
  //#region src/hooks/toast.d.ts
734
1007
  /** Returns the toast function */
735
- declare const usePHToast: () => PHToastFn | undefined;
1008
+ export declare const usePHToast: () => PHToastFn | undefined;
736
1009
  /** Sets the toast function */
737
- declare const setPHToast: (value: PHToastFn | undefined) => void;
1010
+ export declare const setPHToast: (value: PHToastFn | undefined) => void;
738
1011
  /** Adds an event handler for the toast */
739
- declare const addToastEventHandler: () => void;
1012
+ export declare const addToastEventHandler: () => void;
740
1013
  //#endregion
741
1014
  //#region src/hooks/use-can-execute.d.ts
742
1015
  /**
@@ -748,7 +1021,7 @@ declare const addToastEventHandler: () => void;
748
1021
  * controls as it did before it asked, and let the submit path refuse. Reading it
749
1022
  * as a denial would disable every control wherever enforcement is off.
750
1023
  */
751
- type CanExecuteStatus = "idle" | "loading" | "ready" | "unsupported" | "error";
1024
+ export type CanExecuteStatus = "idle" | "loading" | "ready" | "unsupported" | "error";
752
1025
  type InternalState = {
753
1026
  status: CanExecuteStatus;
754
1027
  evaluations?: Evaluation[];
@@ -759,7 +1032,7 @@ type InternalState = {
759
1032
  error?: Error;
760
1033
  };
761
1034
  /** What `useCanExecute` returns; exported so consumers can name it. */
762
- type CanExecuteState = InternalState & {
1035
+ export type CanExecuteState = InternalState & {
763
1036
  refetch: () => void;
764
1037
  };
765
1038
  /**
@@ -796,10 +1069,10 @@ type CanExecuteState = InternalState & {
796
1069
  * @param branch - Branch to evaluate against, defaulting to main
797
1070
  * @param subject - Optional subject to decide for instead of the client's signer
798
1071
  */
799
- declare function useCanExecute(documentId: string | null | undefined, candidates: ActionCandidate[], branch?: string, subject?: AuthSubject): CanExecuteState;
1072
+ export declare function useCanExecute(documentId: string | null | undefined, candidates: ActionCandidate[], branch?: string, subject?: AuthSubject): CanExecuteState;
800
1073
  //#endregion
801
1074
  //#region src/hooks/use-drive-system-info.d.ts
802
- type DriveSystemInfoState = {
1075
+ export type DriveSystemInfoState = {
803
1076
  status: "local";
804
1077
  } | {
805
1078
  status: "loading";
@@ -813,17 +1086,18 @@ type DriveSystemInfoState = {
813
1086
  gitUrl: string | null;
814
1087
  host: string;
815
1088
  };
816
- declare function deriveSystemUrl(channelUrl: string): string | null;
817
- declare function useDriveSystemInfo(drive: DocumentDriveDocument | undefined): DriveSystemInfoState;
1089
+ export declare function deriveSystemUrl(channelUrl: string): string | null;
1090
+ export declare function useDriveSystemInfo(drive: DocumentDriveDocument | undefined): DriveSystemInfoState;
818
1091
  //#endregion
819
1092
  //#region src/hooks/use-editor-file-drop.d.ts
820
- type UseEditorFileDropOptions = {
1093
+ export type UseEditorFileDropOptions = {
821
1094
  /** Lowercase file extensions including the dot (e.g. [".png", ".pdf"]).
822
1095
  * When omitted, all files are accepted. */
823
- accept?: readonly string[]; /** Called with the files that passed the extension filter. */
1096
+ accept?: readonly string[];
1097
+ /** Called with the files that passed the extension filter. */
824
1098
  onFiles: (files: File[]) => void;
825
1099
  };
826
- type UseEditorFileDropResult = {
1100
+ export type UseEditorFileDropResult = {
827
1101
  /** Spread onto the editor's root element. Includes the opt-out attribute
828
1102
  * so the outer DropZone leaves file drops alone within this subtree. */
829
1103
  dragProps: {
@@ -831,10 +1105,11 @@ type UseEditorFileDropResult = {
831
1105
  onDragOver: DragEventHandler<Element>;
832
1106
  onDragLeave: DragEventHandler<Element>;
833
1107
  onDrop: DragEventHandler<Element>;
834
- } & Record<typeof EDITOR_FILE_DROP_OPT_OUT_ATTR, "">; /** True while a file drag is hovering anywhere inside the editor root. */
1108
+ } & Record<typeof EDITOR_FILE_DROP_OPT_OUT_ATTR, "">;
1109
+ /** True while a file drag is hovering anywhere inside the editor root. */
835
1110
  isDragOver: boolean;
836
1111
  };
837
- declare function useEditorFileDrop(options: UseEditorFileDropOptions): UseEditorFileDropResult;
1112
+ export declare function useEditorFileDrop(options: UseEditorFileDropOptions): UseEditorFileDropResult;
838
1113
  //#endregion
839
1114
  //#region src/hooks/use-get-switchboard-link.d.ts
840
1115
  /**
@@ -848,7 +1123,7 @@ declare function useEditorFileDrop(options: UseEditorFileDropOptions): UseEditor
848
1123
  * @param document - The document to create a switchboard URL generator for
849
1124
  * @returns An async function that returns the switchboard URL, or null if not applicable
850
1125
  */
851
- declare function useGetSwitchboardLink(document: PHDocument$1 | undefined): (() => Promise<string>) | null;
1126
+ export declare function useGetSwitchboardLink(document: PHDocument$1 | undefined): (() => Promise<string>) | null;
852
1127
  //#endregion
853
1128
  //#region src/types/upload.d.ts
854
1129
  type DocumentTypeIcon = "analytics-processor" | "relational-processor" | "codegen-processor" | "app" | "document-model" | "editor" | "package" | "subgraph";
@@ -868,16 +1143,16 @@ type FileUploadProgressCallback = (progress: FileUploadProgress) => void;
868
1143
  type UseOnDropFile = (documentTypesOverride?: string[]) => (file: File, targetFolder?: Node, onProgress?: FileUploadProgressCallback, resolveConflict?: ConflictResolution) => Promise<FileNode | undefined>;
869
1144
  //#endregion
870
1145
  //#region src/hooks/use-on-drop-file.d.ts
871
- declare const useOnDropFile: UseOnDropFile;
1146
+ export declare const useOnDropFile: UseOnDropFile;
872
1147
  //#endregion
873
1148
  //#region src/hooks/user-permissions.d.ts
874
- declare function useUserPermissions(): {
1149
+ export declare function useUserPermissions(): {
875
1150
  isAllowedToCreateDocuments: boolean;
876
1151
  isAllowedToEditDocuments: boolean;
877
1152
  };
878
1153
  //#endregion
879
1154
  //#region src/hooks/vetra-packages.d.ts
880
- declare const useVetraPackageManager: () => IPackageManager | undefined;
1155
+ export declare const useVetraPackageManager: () => IPackageManager | undefined;
881
1156
  /**
882
1157
  * Returns all of the Vetra packages loaded by the Connect instance.
883
1158
  *
@@ -885,11 +1160,31 @@ declare const useVetraPackageManager: () => IPackageManager | undefined;
885
1160
  * manager is registered: `useSyncExternalStore` loops when the snapshot
886
1161
  * changes on every read, which a fresh `[]` does.
887
1162
  */
888
- declare const useVetraPackages: () => DocumentModelLib[];
1163
+ export declare const useVetraPackages: () => DocumentModelLib[];
889
1164
  /** Adds the Vetra package manager event handler */
890
- declare const addVetraPackageManagerEventHandler: () => void;
1165
+ export declare const addVetraPackageManagerEventHandler: () => void;
1166
+ /**
1167
+ * Non-react access to the Vetra package manager: calls `callback` once a
1168
+ * manager is available - immediately when already set, otherwise when
1169
+ * `setVetraPackageManager` publishes one. Returns an unsubscribe. The worker
1170
+ * wiring uses this to forward package updates from plain boot code.
1171
+ */
1172
+ export declare function onVetraPackageManager(callback: (packageManager: IPackageManager) => void): () => void;
891
1173
  /** Sets the Vetra package manager and registers its packages */
892
- declare function setVetraPackageManager(packageManager: IPackageManager): void;
1174
+ export declare function setVetraPackageManager(packageManager: IPackageManager): void;
1175
+ //#endregion
1176
+ //#region src/hooks/switchboards.d.ts
1177
+ /** The switchboards the app reaches, from the provided store. */
1178
+ export declare const useSwitchboards: UsePHGlobalValue$1<SwitchboardDirectory$1>;
1179
+ /** Sets the app's switchboard directory; the host does this at boot. */
1180
+ export declare const setSwitchboards: SetPHGlobalValue$1<SwitchboardDirectory$1>;
1181
+ /** Registers the switchboards window event handler */
1182
+ export declare const addSwitchboardsEventHandler: AddPHGlobalEventHandler$1;
1183
+ //#endregion
1184
+ //#region src/hooks/close-node.d.ts
1185
+ /** Leaves a node's view: back to the entry it was opened from, past entries
1186
+ * pushed inside it; else, e.g. after a deep link, to its parent in place. */
1187
+ export declare function useCloseNode(nodeId: string | null | undefined): () => void;
893
1188
  //#endregion
894
1189
  //#region src/hooks/attachment-progress.d.ts
895
1190
  /**
@@ -904,7 +1199,8 @@ declare function setVetraPackageManager(packageManager: IPackageManager): void;
904
1199
  * silently scaling by 100.
905
1200
  */
906
1201
  type AttachmentProgressState = {
907
- /** 0-100. Always 0 while `indeterminate`, since no position is known. */percent: number;
1202
+ /** 0-100. Always 0 while `indeterminate`, since no position is known. */
1203
+ percent: number;
908
1204
  loaded: number;
909
1205
  total: number | undefined;
910
1206
  indeterminate: boolean;
@@ -912,7 +1208,9 @@ type AttachmentProgressState = {
912
1208
  //#endregion
913
1209
  //#region src/hooks/use-attachments.d.ts
914
1210
  /** Returns an IAttachmentClient wrapping the current IAttachmentService, or undefined if none is set. */
915
- declare function useAttachments(): IAttachmentClient | undefined;
1211
+ export declare function useAttachments(): IAttachmentClient | undefined;
1212
+ /** The client {@link useAttachments} returns, for code outside React. */
1213
+ export declare function getAttachmentClient(): IAttachmentClient | undefined;
916
1214
  /**
917
1215
  * Upload lifecycle stage, derived from the client's own `AttachmentStage` plus
918
1216
  * an `idle` state the client has no reason to model.
@@ -922,10 +1220,11 @@ declare function useAttachments(): IAttachmentClient | undefined;
922
1220
  * `UploadStatus` enum was a parallel vocabulary that had already drifted (it
923
1221
  * never gained `Reserving`).
924
1222
  */
925
- type AttachmentUploadStage = "idle" | "hashing" | "reserving" | "uploading" | "done" | "error";
926
- type AttachmentDownloadStage = "idle" | "requesting-download-target" | "downloading" | "done" | "error";
927
- type UseAttachmentPreviewInput = {
928
- documentId: string; /** Pass null/undefined to render nothing (the hook stays idle). */
1223
+ export type AttachmentUploadStage = "idle" | "hashing" | "reserving" | "uploading" | "done" | "error";
1224
+ export type AttachmentDownloadStage = "idle" | "requesting-download-target" | "downloading" | "done" | "error";
1225
+ export type UseAttachmentPreviewInput = {
1226
+ documentId: string;
1227
+ /** Pass null/undefined to render nothing (the hook stays idle). */
929
1228
  ref: AttachmentDownloadInput["ref"] | null | undefined;
930
1229
  /**
931
1230
  * How many times a failed attempt is retried before the hook settles on
@@ -934,16 +1233,19 @@ type UseAttachmentPreviewInput = {
934
1233
  * downloads and only learns the (document, ref) pair once the operation
935
1234
  * has synced and been projected. Defaults to 3.
936
1235
  */
937
- retries?: number; /** Fixed delay between attempts, in milliseconds. Defaults to 3000. */
1236
+ retries?: number;
1237
+ /** Fixed delay between attempts, in milliseconds. Defaults to 3000. */
938
1238
  retryDelayMs?: number;
939
1239
  };
940
- type UseAttachmentPreviewReturn = {
941
- /** Object URL ready for img/iframe/video src; undefined while loading or on error. */url: string | undefined;
1240
+ export type UseAttachmentPreviewReturn = {
1241
+ /** Object URL ready for img/iframe/video src; undefined while loading or on error. */
1242
+ url: string | undefined;
942
1243
  header: AttachmentHeader | undefined;
943
1244
  loading: boolean;
944
1245
  error: Error | undefined;
945
1246
  stage: AttachmentDownloadStage;
946
- progress: AttachmentProgressState; /** 1-based attempt currently in flight; 0 while idle. */
1247
+ progress: AttachmentProgressState;
1248
+ /** 1-based attempt currently in flight; 0 while idle. */
947
1249
  attempt: number;
948
1250
  maxAttempts: number;
949
1251
  /**
@@ -962,15 +1264,14 @@ type UseAttachmentPreviewReturn = {
962
1264
  * appears as soon as the server's reference index catches up. Progress resets
963
1265
  * per attempt; nothing resumes.
964
1266
  */
965
- declare function useAttachmentPreview({
966
- documentId,
967
- ref,
968
- retries,
969
- retryDelayMs
970
- }: UseAttachmentPreviewInput): UseAttachmentPreviewReturn;
971
- type UseAttachmentUploadReturn = {
972
- preprocess: (file: Blob) => Promise<PreprocessResult>;
973
- upload: (results: PreprocessResult) => Promise<void>; /** Aborts the transfer in flight; the upload promise rejects. */
1267
+ export declare function useAttachmentPreview({ documentId, ref, retries, retryDelayMs }: UseAttachmentPreviewInput): UseAttachmentPreviewReturn;
1268
+ export type UseAttachmentUploadReturn = {
1269
+ /** `documentId` names the document the file is for, so it is stored where that document lives. */
1270
+ preprocess: (file: Blob, options?: {
1271
+ documentId?: string;
1272
+ }) => Promise<PreprocessResult>;
1273
+ upload: (results: PreprocessResult) => Promise<void>;
1274
+ /** Aborts the transfer in flight; the upload promise rejects. */
974
1275
  cancel: () => void;
975
1276
  /**
976
1277
  * Returns to idle, discarding the previous result and error. Aborts a
@@ -991,11 +1292,33 @@ type UseAttachmentUploadReturn = {
991
1292
  * rather than reimplementing the flow, which is what makes progress, dedup
992
1293
  * reporting and cancellation identical to the non-React path.
993
1294
  */
994
- declare function useAttachmentUpload(): UseAttachmentUploadReturn;
1295
+ export declare function useAttachmentUpload(): UseAttachmentUploadReturn;
1296
+ //#endregion
1297
+ //#region src/hooks/backend-auth.d.ts
1298
+ /** Whether the app's backend refused this tab's caller, and how. */
1299
+ export declare const useBackendAuth: UsePHGlobalValue<BackendAuthState>;
1300
+ /** Records (or clears, with `undefined`) a backend's refusal of the caller. */
1301
+ export declare const setBackendAuth: SetPHGlobalValue<BackendAuthState>;
1302
+ export declare const addBackendAuthEventHandler: () => void;
1303
+ /**
1304
+ * The HTTP status with which a backend refused the caller, or null when the
1305
+ * error is something else.
1306
+ *
1307
+ * Covers every shape a refusal reaches the browser in: the sync layer's
1308
+ * errors (`isDriveAuthError`), graphql-request's `ClientError` from the
1309
+ * remote GraphQL client (`response.status`, and "(Code: 401)" in its
1310
+ * message), and the router's partial-failure error that wraps one such
1311
+ * failure per backend.
1312
+ */
1313
+ export declare function backendAuthStatusOf(error: unknown): 401 | 403 | null;
1314
+ /** True when a backend refused the caller as unauthenticated or unauthorized. */
1315
+ export declare function isBackendAuthError(error: unknown): boolean;
1316
+ /** Records the refusal `error` carries, if it is one; returns whether it was. */
1317
+ export declare function recordBackendAuthError(error: unknown, backend?: string): boolean;
995
1318
  //#endregion
996
1319
  //#region src/pglite/drop.d.ts
997
- declare function truncateAllTables(pg: PGlite, schema?: string): Promise<void>;
998
- declare function dropAllReactorStorage(pg: PGlite): Promise<void>;
1320
+ export declare function truncateAllTables(pg: PGlite, schema?: string): Promise<void>;
1321
+ export declare function dropAllReactorStorage(pg: PGlite): Promise<void>;
999
1322
  //#endregion
1000
1323
  //#region src/pglite/usePGlite.d.ts
1001
1324
  interface PGliteState {
@@ -1003,18 +1326,102 @@ interface PGliteState {
1003
1326
  isLoading: boolean;
1004
1327
  error: Error | null;
1005
1328
  }
1006
- declare function setPGliteDB(pglite: Partial<PGliteState>): void;
1329
+ export declare function setPGliteDB(pglite: Partial<PGliteState>): void;
1007
1330
  //#endregion
1008
1331
  //#region src/reactor.d.ts
1009
- type ReactorDefaultDrivesConfig = {
1332
+ export type ReactorDefaultDrivesConfig = {
1010
1333
  defaultDrivesUrl?: string[];
1011
1334
  };
1012
- type RefreshReactorDataConfig = {
1335
+ export type RefreshReactorDataConfig = {
1013
1336
  debounceDelayMs?: number;
1014
1337
  immediateThresholdMs?: number;
1015
1338
  };
1016
- declare const refreshReactorData: (reactor: IReactorClient$1, immediate?: boolean) => Promise<void>;
1017
- declare const refreshReactorDataClient: (reactor: IReactorClient$1 | undefined, immediate?: boolean) => Promise<void>;
1339
+ export declare const refreshReactorData: (reactor: IReactorReadClient$1, immediate?: boolean) => Promise<void>;
1340
+ export declare const refreshReactorDataClient: (reactor: IReactorReadClient$1 | undefined, immediate?: boolean) => Promise<void>;
1341
+ /**
1342
+ * Re-reads one drive and replaces it in the drives store. Only that drive
1343
+ * crosses the wire: the list used to be re-fetched whole on any drive change,
1344
+ * every drive's node tree included, which on a large mail drive was ten
1345
+ * megabytes per change. Without a store (before init) the whole list loads.
1346
+ */
1347
+ export declare function refreshDrive(reactor: IReactorReadClient$1, driveId: string): Promise<void>;
1348
+ /**
1349
+ * Brings the drives store in line with which drives exist: ids come from a
1350
+ * headers-only listing, a drive not held yet is loaded on its own, and a drive
1351
+ * no longer listed is dropped. Drives already held are kept as they are.
1352
+ */
1353
+ export declare function refreshDriveMembership(reactor: IReactorReadClient$1): Promise<void>;
1354
+ export type DriveChangeHandlerOptions = {
1355
+ /** The least time between two re-reads of the same drive; default 10 s. */
1356
+ minIntervalMs?: number;
1357
+ onError?: (error: unknown) => void;
1358
+ };
1359
+ /**
1360
+ * Routes a drive-type document change to the smallest refresh: an update
1361
+ * re-reads that one drive and invalidates its node cache, at most once per
1362
+ * `minIntervalMs` while it keeps changing (at once after a write from this
1363
+ * tab, see `markLocalDriveWrite`); a creation or deletion refreshes the
1364
+ * membership and loads only what is new.
1365
+ */
1366
+ export declare function createDriveChangeHandler(reactor: IReactorReadClient$1, options?: DriveChangeHandlerOptions): (event: DocumentChangeEvent) => void;
1367
+ //#endregion
1368
+ //#region src/routing/drive-arrivals.d.ts
1369
+ /** Drives that may still arrive, e.g. while the first sync runs. */
1370
+ export type DriveArrivals = {
1371
+ isPending(): boolean;
1372
+ /** Whether more of `driveId`'s content may arrive: its remote's first sync. */
1373
+ isDrivePending(driveId: string): boolean;
1374
+ /** Calls `listener` whenever the drives or `isPending()` may have changed. */
1375
+ subscribe(listener: () => void): () => void;
1376
+ };
1377
+ /** Counts a background drive addition as pending until it settles. */
1378
+ export declare function trackDriveArrival<T>(promise: Promise<T>): Promise<T>;
1379
+ /** Resolves once `store.drives` lists `driveId`, or after `maxWaitMs`: a
1380
+ * finished first pull does not mean the drive is listed yet. */
1381
+ export declare function untilDriveListed(store: PHStore, driveId: string, maxWaitMs?: number): Promise<void>;
1382
+ /** Drives still on their way into `store`: being added or first syncing. */
1383
+ export declare function createDriveArrivals(store: PHStore): DriveArrivals;
1384
+ //#endregion
1385
+ //#region src/routing/resolve-drive-route.d.ts
1386
+ export type DriveRouteResult = {
1387
+ kind: "drive";
1388
+ driveId: string;
1389
+ nodeId?: string;
1390
+ } | {
1391
+ kind: "drive-not-found";
1392
+ } | {
1393
+ kind: "node-not-found";
1394
+ driveId: string;
1395
+ };
1396
+ export type ResolveDriveRouteOptions = {
1397
+ store: PHStore;
1398
+ /** Without it, a missing drive is never waited for. */
1399
+ arrivals?: DriveArrivals;
1400
+ driveSlug: string;
1401
+ nodeSlug?: string;
1402
+ signal: AbortSignal;
1403
+ /** A preload only uses what is already here. */
1404
+ preload?: boolean;
1405
+ };
1406
+ /** How long a navigation waits for its document and editor before it shows;
1407
+ * past it the view commits and renders them as they load. */
1408
+ export declare const PREFETCH_WAIT_MS = 3000;
1409
+ export declare const DRIVE_ARRIVAL_MAX_WAIT_MS = 15000;
1410
+ /** A listed drive by slug, id, or a `<name>-<id>` slug's trailing id. */
1411
+ export declare function findDriveBySlugOrId(store: PHStore, ref: string): DocumentDriveDocument | undefined;
1412
+ /** Resolves with `read()` once it is defined, nothing is still arriving, the
1413
+ * signal aborts or the cap passes. */
1414
+ export declare function waitForArrival<T>(read: () => T | undefined, arrivals: DriveArrivals | undefined, signal: AbortSignal, maxWaitMs?: number): Promise<T | undefined>;
1415
+ /** Asks the reactor directly: a just-created drive may not be listed yet. */
1416
+ export declare function fetchDrive(store: PHStore, ref: string, signal?: AbortSignal): Promise<DocumentDriveDocument | undefined>;
1417
+ /** Loads a drive's app module so its view renders without suspending;
1418
+ * undefined when it is already loaded, so a warm open waits on nothing. */
1419
+ export declare function preloadDriveApp(store: PHStore, drive: DocumentDriveDocument): Promise<undefined> | undefined;
1420
+ /** Warms a file node's document and its editor module. */
1421
+ export declare function prefetchDocument(store: PHStore, node: Node): Promise<void>;
1422
+ /** Resolves a drive route's slugs, waiting for drives that are still syncing,
1423
+ * and warms what the resolved view needs. */
1424
+ export declare function resolveDriveRoute(options: ResolveDriveRouteOptions): Promise<DriveRouteResult>;
1018
1425
  //#endregion
1019
1426
  //#region src/registry/types.d.ts
1020
1427
  interface PublishEvent {
@@ -1023,7 +1430,7 @@ interface PublishEvent {
1023
1430
  }
1024
1431
  //#endregion
1025
1432
  //#region src/registry/client.d.ts
1026
- declare class RegistryClient {
1433
+ export declare class RegistryClient {
1027
1434
  readonly apiUrl: string;
1028
1435
  constructor(cdnUrl: string);
1029
1436
  getPackages(): Promise<PackageInfo[]>;
@@ -1033,39 +1440,37 @@ declare class RegistryClient {
1033
1440
  }
1034
1441
  //#endregion
1035
1442
  //#region src/registry/fetchers.d.ts
1036
- declare function trimTrailingSlash(url: string): string;
1037
- declare function getPackages(registryUrl: string): Promise<PackageInfo[]>;
1443
+ export declare function trimTrailingSlash(url: string): string;
1444
+ export declare function getPackages(registryUrl: string): Promise<PackageInfo[]>;
1445
+ export declare function searchPackages(registryUrl: string, search: string): Promise<PackageInfo[]>;
1038
1446
  /**
1039
- * Fetch one page of the registry listing (trimmed items). Backed by the
1040
- * paginated `GET /packages?limit=&offset=&search=` mode. Used by the Package
1447
+ * One page of the registry listing (trimmed items). Used by the Package
1041
1448
  * Manager's Available tab for infinite scroll + server-side search.
1042
1449
  */
1043
- declare function getPackagePage(registryUrl: string, params: {
1450
+ export declare function getPackagePage(registryUrl: string, params: {
1044
1451
  limit: number;
1045
1452
  offset: number;
1046
1453
  search?: string;
1047
1454
  }): Promise<PackagePage>;
1048
1455
  /**
1049
- * Fetch full package info for every package exposing a given document type,
1050
- * via the legacy `?documentType=` filter (returns full PackageInfo objects,
1051
- * not just names). Used by the MissingPackageModal to offer installs without
1052
- * loading the entire paginated listing.
1456
+ * Full package info for every package exposing a given document type, to offer
1457
+ * installs without loading the whole listing.
1053
1458
  */
1054
- declare function getPackagesForDocumentType(registryUrl: string, documentType: string): Promise<PackageInfo[]>;
1055
- declare function getPackagesByDocumentType(registryUrl: string, documentType: string): Promise<string[]>;
1459
+ export declare function getPackagesForDocumentType(registryUrl: string, documentType: string): Promise<PackageInfo[]>;
1460
+ export declare function getPackagesByDocumentType(registryUrl: string, documentType: string): Promise<string[]>;
1056
1461
  /**
1057
1462
  * Fetch full metadata (versions + dist-tags) for one package from the
1058
1463
  * single-package endpoint. Returns null when the package no longer exists
1059
1464
  * upstream.
1060
1465
  */
1061
- declare function getPackageInfo(registryUrl: string, name: string): Promise<PackageInfo | null>;
1466
+ export declare function getPackageInfo(registryUrl: string, name: string): Promise<PackageInfo | null>;
1062
1467
  //#endregion
1063
1468
  //#region src/remote-controller/action-tracker.d.ts
1064
1469
  /**
1065
1470
  * Tracks pending actions with their operation context (prevOpHash, prevOpIndex).
1066
1471
  * Actions are accumulated until flushed (on push).
1067
1472
  */
1068
- declare class ActionTracker {
1473
+ export declare class ActionTracker {
1069
1474
  private pending;
1070
1475
  /** Track a new action with its operation context. */
1071
1476
  track(action: Action$1, prevOpHash: string, prevOpIndex: number): void;
@@ -1080,7 +1485,7 @@ declare class ActionTracker {
1080
1485
  }
1081
1486
  //#endregion
1082
1487
  //#region src/remote-controller/remote-client.d.ts
1083
- declare class RemoteClient implements IRemoteClient {
1488
+ export declare class RemoteClient implements IRemoteClient {
1084
1489
  private readonly client;
1085
1490
  private readonly pageSize;
1086
1491
  constructor(client: RemoteControllerGraphQLClient, pageSize?: number);
@@ -1137,20 +1542,26 @@ type InferState<C> = C extends PHDocumentController<infer S> ? S : never;
1137
1542
  * Extract action methods from a controller type.
1138
1543
  * These are the dynamically-added methods (not on the base PHDocumentController prototype).
1139
1544
  */
1140
- type ActionMethodsOf<C, TRemote> = { [K in Exclude<keyof C, keyof PHDocumentController<any>>]: C[K] extends ((input: infer I) => unknown) ? (input: I) => TRemote & ActionMethodsOf<C, TRemote> : C[K] };
1545
+ type ActionMethodsOf<C, TRemote> = { [K in Exclude<keyof C, keyof PHDocumentController<any> | "undo" | "redo">]: C[K] extends ((input: infer I) => unknown) ? (input: I) => TRemote & ActionMethodsOf<C, TRemote> : C[K]; };
1141
1546
  /** The full return type: RemoteDocumentController + action methods. */
1142
1547
  type RemoteDocumentControllerWith<C extends PHDocumentController<any>> = RemoteDocumentController<C> & ActionMethodsOf<C, RemoteDocumentController<C>>;
1143
1548
  /**
1144
1549
  * A controller that wraps a PHDocumentController with remote push/pull capabilities.
1145
1550
  * Composes a local controller and adds GraphQL-based sync with a reactor server.
1146
1551
  */
1147
- declare class RemoteDocumentController<TController extends PHDocumentController<any>> implements IRemoteController<InferState<TController>> {
1552
+ export declare class RemoteDocumentController<TController extends PHDocumentController<any>> implements IRemoteController<InferState<TController>> {
1148
1553
  private inner;
1149
1554
  private readonly remoteClient;
1150
1555
  private readonly tracker;
1151
1556
  private readonly options;
1152
1557
  private documentId;
1558
+ /** The remote's id for the document; `documentId` may be a slug. */
1559
+ private canonicalDocumentId?;
1153
1560
  private remoteRevision;
1561
+ /** What the first push creates the remote from, until it has. */
1562
+ private uncreated?;
1563
+ /** A wrapped new document takes the host's signature policy at its first push. */
1564
+ private takesHostPolicy;
1154
1565
  private hasPulled;
1155
1566
  private pushScheduled;
1156
1567
  private pushQueue;
@@ -1170,6 +1581,17 @@ declare class RemoteDocumentController<TController extends PHDocumentController<
1170
1581
  delete(propagate?: PropagationMode): Promise<boolean>;
1171
1582
  /** Pull latest state from remote, replacing local document. Returns the remote document data. */
1172
1583
  pull(): Promise<RemoteDocumentData>;
1584
+ /**
1585
+ * Undoes the last `count` operations of `scope`. Below base-reducer 3 (or
1586
+ * with no version) it applies the model's UNDO, as the action method did; on
1587
+ * 3, or an unknown number run as 3, it applies a RETRACT per step, each
1588
+ * resolved from this controller's own log, pending actions included.
1589
+ */
1590
+ undo(count?: number, scope?: string): this;
1591
+ /** Redoes the last `count` undos of `scope`; see {@link undo}. */
1592
+ redo(count?: number, scope?: string): this;
1593
+ private undoOrRedo;
1594
+ private stateReducer;
1173
1595
  /**
1174
1596
  * Pull an existing document from remote and create a controller for it.
1175
1597
  */
@@ -1178,12 +1600,26 @@ declare class RemoteDocumentController<TController extends PHDocumentController<
1178
1600
  * Wrap an existing controller instance with remote capabilities.
1179
1601
  * Pending local actions on the inner controller are NOT tracked
1180
1602
  * (only new actions through the remote controller are tracked).
1603
+ * Without a `documentId`, the first push creates the remote from the
1604
+ * wrapped document's header, under the host's create signature policy.
1181
1605
  */
1182
1606
  static from<C extends PHDocumentController<any>>(controller: C, options: RemoteControllerOptions): RemoteDocumentControllerWith<C>;
1183
- /** Create the document on the remote if it doesn't exist yet. */
1607
+ /** Heads the new document with the host's versions for its type, as `newDocument` does; a host without `createDefaults` creates it with `createEmptyDocument`. */
1608
+ private headNewDocument;
1609
+ /** Creates the remote from the local header, so both run the versions its creator chose. */
1184
1610
  private ensureRemoteDocument;
1611
+ /** Puts the uncreated document under the host's policy; a host without `createDefaults` creates it with `createEmptyDocument`. */
1612
+ private takeHostSignaturePolicy;
1185
1613
  /** Set up interceptors for all action methods on the inner controller. */
1186
1614
  private setupActionInterceptors;
1615
+ /** Applies the model's `actionType` action method locally and tracks it. */
1616
+ private dispatchModelAction;
1617
+ /** Applies `action` locally through the model's reducer and tracks it. */
1618
+ private applyAction;
1619
+ /** Runs `apply`, then tracks the operation it added for push. */
1620
+ private applyAndTrack;
1621
+ /** Recreates the inner controller over `document` and re-intercepts it. */
1622
+ private replaceInner;
1187
1623
  /**
1188
1624
  * Find the new operation added after applying an action,
1189
1625
  * by comparing current operation counts against a previous snapshot.
@@ -1204,8 +1640,14 @@ declare class RemoteDocumentController<TController extends PHDocumentController<
1204
1640
  * Returns newly tracked actions with correct prevOpHash values.
1205
1641
  */
1206
1642
  private pullAndReplay;
1643
+ private replayAction;
1207
1644
  /** Prepare actions for push, optionally signing them. */
1208
1645
  private prepareActionsForPush;
1646
+ /**
1647
+ * The remote's id for `documentId`, which may be a slug. A signature binds
1648
+ * the id the remote verifies against, so a slug is never signed.
1649
+ */
1650
+ private resolveCanonicalDocumentId;
1209
1651
  /** Sign an action using the configured signer, preserving existing signatures. */
1210
1652
  private signAction;
1211
1653
  /**
@@ -1244,15 +1686,15 @@ declare class RemoteDocumentController<TController extends PHDocumentController<
1244
1686
  //#endregion
1245
1687
  //#region src/remote-controller/utils.d.ts
1246
1688
  /** Error thrown when a push conflict is detected with the "reject" strategy. */
1247
- declare class ConflictError extends Error {
1689
+ export declare class ConflictError extends Error {
1248
1690
  readonly conflict: ConflictInfo;
1249
1691
  constructor(conflict: ConflictInfo);
1250
1692
  }
1251
1693
  /** Convert remote operations to local DocumentOperations format. */
1252
- declare function convertRemoteOperations(operationsByScope: Record<string, RemoteOperation[]>): DocumentOperations;
1694
+ export declare function convertRemoteOperations(operationsByScope: Record<string, RemoteOperation[]>): DocumentOperations;
1253
1695
  //#endregion
1254
1696
  //#region src/storage/base-storage.d.ts
1255
- declare abstract class BaseStorage<V> implements Iterable<[string, V]> {
1697
+ export declare abstract class BaseStorage<V> implements Iterable<[string, V]> {
1256
1698
  abstract get(key: string): V | undefined;
1257
1699
  abstract set(key: string, value: V): void;
1258
1700
  abstract delete(key: string): boolean;
@@ -1266,7 +1708,7 @@ declare abstract class BaseStorage<V> implements Iterable<[string, V]> {
1266
1708
  }
1267
1709
  //#endregion
1268
1710
  //#region src/storage/local-storage.d.ts
1269
- declare class BrowserLocalStorage<V> extends BaseStorage<V> {
1711
+ export declare class BrowserLocalStorage<V> extends BaseStorage<V> {
1270
1712
  #private;
1271
1713
  constructor(namespace: string);
1272
1714
  get(key: string): V | undefined;
@@ -1281,7 +1723,7 @@ declare class BrowserLocalStorage<V> extends BaseStorage<V> {
1281
1723
  }
1282
1724
  //#endregion
1283
1725
  //#region src/storage/types.d.ts
1284
- interface IStorage<TValue> {
1726
+ export interface IStorage<TValue> {
1285
1727
  get(key: string): TValue | undefined;
1286
1728
  set(key: string, value: TValue): void;
1287
1729
  delete(key: string): void;
@@ -1304,38 +1746,55 @@ type IReactorProcessorHostModule = IProcessorHostModule;
1304
1746
  type ProcessorFactoryBuilder = ProcessorFactoryBuilder$1<IProcessorHostModule>;
1305
1747
  //#endregion
1306
1748
  //#region src/utils/documents.d.ts
1307
- declare function isDocumentTypeSupported(documentType: string, supportedDocuments: string[] | null | undefined): boolean;
1749
+ export declare function isDocumentTypeSupported(documentType: string, supportedDocuments: string[] | null | undefined): boolean;
1308
1750
  //#endregion
1309
1751
  //#region src/utils/drives.d.ts
1310
- type UISyncStatus = "INITIAL_SYNC" | "SUCCESS" | "CONFLICT" | "MISSING" | "ERROR" | "SYNCING";
1311
- declare function getDrives(reactor: IReactorClient$1): Promise<DocumentDriveDocument[]>;
1312
- declare function getSyncStatus(documentId: string, sharingType: SharingType): Promise<UISyncStatus | undefined>;
1313
- declare function getSyncStatusSync(documentId: string, sharingType: SharingType): UISyncStatus | undefined;
1752
+ export type UISyncStatus = "INITIAL_SYNC" | "SUCCESS" | "CONFLICT" | "MISSING" | "ERROR" | "SYNCING";
1753
+ export declare function getDrives(reactor: IReactorReadClient$1): Promise<DocumentDriveDocument[]>;
1754
+ /**
1755
+ * The id of every drive, from a listing that carries headers only: a drive's
1756
+ * node tree can be megabytes (a mail drive with tens of thousands of files),
1757
+ * so membership is learned without it and a new drive is then loaded on its
1758
+ * own.
1759
+ */
1760
+ export declare function listDriveIds(reactor: IReactorReadClient$1): Promise<string[]>;
1761
+ /** One drive in full, or undefined once it is gone. */
1762
+ export declare function getDrive(reactor: IReactorReadClient$1, driveId: string): Promise<DocumentDriveDocument | undefined>;
1763
+ export declare function getSyncStatus(documentId: string, sharingType: SharingType): Promise<UISyncStatus | undefined>;
1764
+ export declare function getSyncStatusSync(documentId: string, sharingType: SharingType): UISyncStatus | undefined;
1765
+ /** A drive's display name: the header's (renames set it), else its creation name. */
1766
+ export declare function getDriveName(drive: DocumentDriveDocument): string;
1314
1767
  //#endregion
1315
1768
  //#region src/utils/download-document.d.ts
1316
1769
  declare function defaultHandleError(error: Error): void;
1317
- declare function downloadDocument(document: PHDocument$1 | undefined, handleError?: typeof defaultHandleError): void;
1770
+ export declare function downloadDocument(document: PHDocument$1 | undefined, handleError?: typeof defaultHandleError): void;
1318
1771
  //#endregion
1319
1772
  //#region src/utils/get-revision-from-date.d.ts
1320
- declare const getRevisionFromDate: (startDate?: Date, endDate?: Date, operations?: Operation$1[]) => number;
1773
+ export declare const getRevisionFromDate: (startDate?: Date, endDate?: Date, operations?: readonly Operation$1[]) => number;
1321
1774
  //#endregion
1322
1775
  //#region src/utils/nodes.d.ts
1323
1776
  /** Sorts nodes by name. */
1324
- declare function sortNodesByName<T extends Node>(nodes: T[]): T[];
1777
+ export declare function sortNodesByName<T extends Node>(nodes: T[]): T[];
1325
1778
  /** Returns whether a node is a file. */
1326
- declare function isFileNodeKind(node: Node | null | undefined): node is FileNode;
1779
+ export declare function isFileNodeKind(node: Node | null | undefined): node is FileNode;
1327
1780
  /** Returns whether a node is a folder. */
1328
- declare function isFolderNodeKind(node: Node | null | undefined): node is FolderNode;
1781
+ export declare function isFolderNodeKind(node: Node | null | undefined): node is FolderNode;
1782
+ /** Every node of a drive from `read.drives`, paged until the last page;
1783
+ * `parentFolder` narrows it as `listNodes` does (null: the root level). */
1784
+ export declare function listAllDriveNodes(reader: IDriveReadClient, driveId: string, options?: {
1785
+ parentFolder?: string | null;
1786
+ signal?: AbortSignal;
1787
+ }): Promise<Node[]>;
1329
1788
  //#endregion
1330
1789
  //#region src/utils/preload-editor.d.ts
1331
- declare function preloadEditorModule(module: EditorModule): Promise<unknown> | undefined;
1332
- declare function hasPreloadBandwidth(): boolean;
1790
+ export declare function preloadEditorModule(module: EditorModule): Promise<unknown> | undefined;
1791
+ export declare function hasPreloadBandwidth(): boolean;
1333
1792
  //#endregion
1334
1793
  //#region src/utils/switchboard.d.ts
1335
- declare function getDriveIdBySlug(driveUrl: string, slug: string): Promise<string | undefined>;
1336
- declare function getSlugFromDriveUrl(driveUrl: string): string | undefined;
1337
- declare function getSwitchboardGatewayUrlFromDriveUrl(driveUrl: string): string;
1338
- declare function getDocumentGraphqlQuery(): string;
1794
+ export declare function getDriveIdBySlug(driveUrl: string, slug: string): Promise<string | undefined>;
1795
+ export declare function getSlugFromDriveUrl(driveUrl: string): string | undefined;
1796
+ export declare function getSwitchboardGatewayUrlFromDriveUrl(driveUrl: string): string;
1797
+ export declare function getDocumentGraphqlQuery(): string;
1339
1798
  /**
1340
1799
  * The base URL of the switchboard that serves a drive's GraphQL channel.
1341
1800
  *
@@ -1343,23 +1802,84 @@ declare function getDocumentGraphqlQuery(): string;
1343
1802
  * suffix preserves any proxy prefix (e.g. `/api/reactor`). A URL that does
1344
1803
  * not end with the suffix is unexpected — fall back to its origin.
1345
1804
  */
1346
- declare function getSwitchboardBaseFromChannelUrl(channelUrl: string): string;
1805
+ export declare function getSwitchboardBaseFromChannelUrl(channelUrl: string): string;
1347
1806
  /**
1348
1807
  * Derives the subselection for the document's `global` state scope from the
1349
1808
  * model's state SDL (e.g. `name total`), expanding object fields
1350
1809
  * recursively. Throws when the schema is missing, unparseable, or has no
1351
1810
  * root object type — the caller falls back to the generic document query.
1352
1811
  */
1353
- declare function getDocumentStateSelection(model: DocumentModelModule): string;
1354
- declare function buildDocumentSubgraphQuery(documentType: string, identifier: string, model?: DocumentModelModule, authToken?: string): string;
1355
- declare function buildDocumentSubgraphUrl(channelUrl: string, documentType: string, identifier: string, model?: DocumentModelModule, authToken?: string): string;
1812
+ export declare function getDocumentStateSelection(model: DocumentModelModule): string;
1813
+ export declare function buildDocumentSubgraphQuery(documentType: string, identifier: string, model?: DocumentModelModule, authToken?: string): string;
1814
+ export declare function buildDocumentSubgraphUrl(channelUrl: string, documentType: string, identifier: string, model?: DocumentModelModule, authToken?: string): string;
1815
+ //#endregion
1816
+ //#region src/utils/switchboard-directory.d.ts
1817
+ /** What a router says about its backends; structural, so hosts pass their own. */
1818
+ export interface SwitchboardRouter {
1819
+ readonly backends: readonly {
1820
+ readonly name: string;
1821
+ readonly facts: {
1822
+ readonly known: boolean;
1823
+ readonly reactor: {
1824
+ readonly workflows: boolean;
1825
+ };
1826
+ };
1827
+ }[];
1828
+ /** The name of the backend that serves `identifier`. */
1829
+ locate(identifier: string, signal?: AbortSignal): Promise<string>;
1830
+ }
1831
+ export interface SwitchboardDirectoryOptions {
1832
+ /**
1833
+ * The host's remote backends, as the served config lists them
1834
+ * (`instance.remoteBackends`): a name and one of the switchboard's drive
1835
+ * addresses, `<base>/d/<slug>`.
1836
+ */
1837
+ remoteBackends?: readonly {
1838
+ readonly name: string;
1839
+ readonly url: string;
1840
+ }[];
1841
+ /** The router over those backends, for their facts and for `locate`. */
1842
+ router?: SwitchboardRouter;
1843
+ /** The tab's sync manager, read on each call: every gql remote's switchboard. */
1844
+ syncManager?: () => Pick<ISyncManager, "list"> | undefined;
1845
+ /** What `${origin}` stands for; defaults to the page's origin. */
1846
+ origin?: string;
1847
+ }
1848
+ /**
1849
+ * Builds the directory from the host's remote backends and the tab's synced
1850
+ * drives. A backend's facts are read on each `list`, so a refresh shows.
1851
+ */
1852
+ export declare function createSwitchboardDirectory(options: SwitchboardDirectoryOptions): SwitchboardDirectory;
1853
+ export type SwitchboardLookupErrorCode = "NO_DIRECTORY" | "NO_SWITCHBOARD" | "UNKNOWN_SWITCHBOARD" | "AMBIGUOUS_SWITCHBOARD" | "NO_WORKFLOW_RUNTIME";
1854
+ /** Why no switchboard could be picked, with the ones there are. */
1855
+ export declare class SwitchboardLookupError extends Error {
1856
+ readonly code: SwitchboardLookupErrorCode;
1857
+ readonly switchboards: readonly SwitchboardEntry[];
1858
+ constructor(message: string, code: SwitchboardLookupErrorCode, switchboards?: readonly SwitchboardEntry[]);
1859
+ }
1860
+ export interface SwitchboardRequest {
1861
+ /** A name from the directory, or a URL on the switchboard (its base, GraphQL or any path under it). */
1862
+ switchboard?: string;
1863
+ /** The document or drive the call is about: its switchboard, when the directory can place it. */
1864
+ documentId?: string;
1865
+ /** What the switchboard must run. */
1866
+ need?: "workflows";
1867
+ signal?: AbortSignal;
1868
+ }
1869
+ /**
1870
+ * The switchboard a call goes to: the one named, else the one serving the
1871
+ * document, else the only one there is (or the only one running what `need`
1872
+ * asks for). Throws a {@link SwitchboardLookupError} that lists the
1873
+ * switchboards whenever it can't pick one; there is no default URL.
1874
+ */
1875
+ export declare function resolveSwitchboard(directory: SwitchboardDirectory | undefined, request?: SwitchboardRequest): Promise<SwitchboardEntry>;
1356
1876
  //#endregion
1357
1877
  //#region src/utils/upgrade-preview.d.ts
1358
- type UpgradeStepInfo = {
1878
+ export type UpgradeStepInfo = {
1359
1879
  toVersion: number;
1360
1880
  description: string;
1361
1881
  };
1362
- type DocumentUpgradePreview = {
1882
+ export type DocumentUpgradePreview = {
1363
1883
  fromVersion: number;
1364
1884
  toVersion: number;
1365
1885
  steps: UpgradeStepInfo[];
@@ -1374,7 +1894,7 @@ type DocumentUpgradePreview = {
1374
1894
  * the `path[]` notation, e.g. `todos[].status`. Only key presence is
1375
1895
  * compared — array length and primitive values are ignored.
1376
1896
  */
1377
- declare function diffStateShapes(before: unknown, after: unknown): {
1897
+ export declare function diffStateShapes(before: unknown, after: unknown): {
1378
1898
  added: string[];
1379
1899
  removed: string[];
1380
1900
  };
@@ -1389,45 +1909,58 @@ declare function diffStateShapes(before: unknown, after: unknown): {
1389
1909
  * already at (or above) the latest registered version, or the upgrade path
1390
1910
  * cannot be computed.
1391
1911
  */
1392
- declare function getDocumentUpgradePreview(document: PHDocument$1, registry: IDocumentModelRegistry | undefined): DocumentUpgradePreview | undefined;
1912
+ export declare function getDocumentUpgradePreview(document: PHDocument$1, registry: IDocumentModelRegistry | undefined): DocumentUpgradePreview | undefined;
1393
1913
  //#endregion
1394
1914
  //#region src/utils/url.d.ts
1395
- declare function resolveUrlPathname(path: string): string;
1396
- /** Returns the current path without the base path */
1397
- declare function getPathWithoutBase(path: string): string;
1398
- /** Makes a URL component for a drive. */
1399
- declare function makeDriveUrlComponent(drive: DocumentDriveDocument | undefined): string;
1400
- /** Makes a URL component for a node. */
1401
- declare function makeNodeSlug(node: Node | undefined): string;
1915
+ export declare function resolveUrlPathname(path: string): string;
1916
+ /** Returns the path without a leading base path */
1917
+ export declare function getPathWithoutBase(path: string): string;
1918
+ /** Makes a URL component for a drive.
1919
+ * @deprecated Open drives through the store's `navigation`; it builds the path. */
1920
+ export declare function makeDriveUrlComponent(drive: DocumentDriveDocument | undefined): string;
1921
+ /** A drive's URL component: its slug, else its id, prefixed with the slugged
1922
+ * name as `<name>-<id>` when the id is opaque (a UUID or derived id). */
1923
+ export declare function makeDriveSlug(drive: DocumentDriveDocument): string;
1924
+ /** The drive a URL slug names: its own slug, its id, or `<name>-<id>`. */
1925
+ export declare function findDriveBySlug(drives: readonly DocumentDriveDocument[] | undefined, ref: string | undefined): DocumentDriveDocument | undefined;
1926
+ /**
1927
+ * Makes a URL component for a node: `<slugged name>-<id>`. The id is kept
1928
+ * verbatim, since a v2-required id is case-sensitive base64url.
1929
+ */
1930
+ export declare function makeNodeSlug(node: Node | undefined): string;
1402
1931
  /** Extracts the node slug from a path.
1403
1932
  *
1404
1933
  * The path is expected to be in the format `/d/<drive-slug>/<node-slug>`.
1405
1934
  */
1406
- declare function extractNodeSlugFromPath(path: string): string | undefined;
1935
+ export declare function extractNodeSlugFromPath(path: string): string | undefined;
1407
1936
  /** Finds a UUID in a string, used for extracting node ids from node slugs in the URL. */
1408
- declare function findUuid(input: string | undefined): string | undefined;
1409
- declare function extractNodeIdFromSlug(nodeSlug: string | undefined): string | undefined;
1410
- declare function extractNodeIdFromPath(path: string): string | undefined;
1937
+ export declare function findUuid(input: string | undefined): string | undefined;
1938
+ /** The v2-required document id a slug ends with, if any. */
1939
+ export declare function findDerivedId(input: string | undefined): string | undefined;
1940
+ export declare function extractNodeIdFromSlug(nodeSlug: string | undefined): string | undefined;
1941
+ /** @deprecated Route loaders resolve the node; use `extractNodeIdFromSlug`. */
1942
+ export declare function extractNodeIdFromPath(path: string): string | undefined;
1411
1943
  /** Extracts the drive slug from a path.
1412
1944
  * Used for extracting drive ids from drive slugs in the URL.
1413
1945
  * Expects the path to be in the format `/d/<drive-slug>`.
1414
1946
  */
1415
- declare function extractDriveSlugFromPath(path: string): string;
1416
- declare function extractDriveIdFromSlug(driveSlug: string | undefined): string | undefined;
1417
- declare function extractDriveIdFromPath(path: string): string | undefined;
1418
- /**
1419
- * Creates a URL string with the given pathname while preserving existing query parameters.
1420
- */
1421
- declare function createUrlWithPreservedParams(pathname: string): string;
1947
+ export declare function extractDriveSlugFromPath(path: string): string;
1948
+ export declare function extractDriveIdFromSlug(driveSlug: string | undefined): string | undefined;
1949
+ /** @deprecated Route loaders resolve the drive; use `extractDriveIdFromSlug`. */
1950
+ export declare function extractDriveIdFromPath(path: string): string | undefined;
1951
+ /** Creates a URL string with the given pathname, keeping the query string.
1952
+ * @deprecated The store's `navigation` keeps global params across navigations. */
1953
+ export declare function createUrlWithPreservedParams(pathname: string): string;
1422
1954
  //#endregion
1423
1955
  //#region src/utils/user.d.ts
1424
- declare function getUserPermissions(): {
1956
+ export declare function getUserPermissions(): {
1425
1957
  isAllowedToCreateDocuments: boolean;
1426
1958
  isAllowedToEditDocuments: boolean;
1427
1959
  };
1428
1960
  //#endregion
1429
1961
  //#region src/utils/validate-document.d.ts
1430
- declare const validateDocument: (document: PHDocument$1) => ValidationError[];
1962
+ export declare const validateDocument: (document: PHDocument$1) => ValidationError[];
1431
1963
  //#endregion
1432
- export { ActionTracker, AddPHGlobalEventHandler, AttachmentDownloadStage, AttachmentUploadStage, BaseStorage, BearerTokenProvider, BrowserLocalStorage, BrowserReactorClientModule, BrowserReactorModule, type BulkImportJob, COMMON_PACKAGE_ID, CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, CREDENTIAL_TYPES, CanExecuteState, CanExecuteStatus, 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, DocumentOperationsState, DocumentTypeIcon, DocumentTypeMismatchError, DocumentUpgradePreview, DocumentVersionStatus, DraggingNode, DriveCollectionId, DriveSystemInfoState, EDITOR_FILE_DROP_OPT_OUT_ATTR, FailedInstallation, FailedInstallationReason, FileUploadProgress, FileUploadProgressCallback, type FolderZipResult, 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, IProcessorHostModule, type IProcessorHostModuleBase, 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, 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, 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, buildFolderZip, callEventHandlerRegisterFunctions, callGlobalSetterForKey, clearGlobal, closePHModal, commonGlobalEventHandlerFunctions, convertRemoteOperations, createAnalyticsStore, createClient, createProcessorQuery, createUrlWithPreservedParams, deleteDrive, deleteNode, deriveSystemUrl, describeGraphQLDocument, diffStateShapes, dispatchActions, downloadDocument, downloadFolderZip, driveIdFromUrl, dropAllReactorStorage, ensurePHEventHandlers, expandBulkArchive, exportFile, extractDriveIdFromPath, extractDriveIdFromSlug, extractDriveSlugFromPath, extractNodeIdFromPath, extractNodeIdFromSlug, extractNodeSlugFromPath, findUuid, getAnalyticsStore, getDocumentExtension, getDocumentGraphqlQuery, getDocumentStateSelection, getDocumentUpgradePreview, getDocumentVersionStatus, getDriveIdBySlug, getDrives, getGlobal, getPackageInfo, getPackagePage, getPackages, getPackagesByDocumentType, getPackagesForDocumentType, getPathWithoutBase, getRevisionFromDate, getSlugFromDriveUrl, getSwitchboardBaseFromChannelUrl, getSwitchboardGatewayUrlFromDriveUrl, getSyncStatus, getSyncStatusSync, getUserPermissions, graphqlDocumentEvents, graphqlDocumentsEvents, graphqlEventsToSyncDrive, hasPreloadBandwidth, hideRevisionHistory, identifierFromMutateDocumentOperationVariables, initConnectCrypto, initRenownCrypto, initTheme, isDocumentTypeSupported, isDriveAuthError, isExternalControlsEnabledEventFunctions, isFileNodeKind, isFolderNodeKind, isGraphQLReactorClient, loadFile, loading, login, logout, makeAuthConnectionParams, makeAuthMiddleware, makeDriveUrlComponent, makeNodeSlug, makePHEventFunctions, openRenown, packageFromDocumentModels, parseDriveUrl, phAppConfigHooks, phAppConfigSetters, phDocumentEditorConfigHooks, phDocumentEditorConfigSetters, phDocumentFromGetDocument, phDocumentFromMutation, phDocumentFromQuery, phDocumentsFromQuery, phGlobalConfigHooks, phGlobalConfigSetters, preloadEditorModule, prepareSignedActions, reactorGraphqlBatchFetchDocuments, reactorGraphqlCreateDocument, reactorGraphqlDeleteDocument, reactorGraphqlDeleteDocuments, reactorGraphqlFetchDocument, reactorGraphqlMutateDocument, readPromiseState, refreshReactorData, refreshReactorDataClient, renameDrive, renameDriveNode, resolveDocumentModelModule, resolveUrlPathname, revisionMapFromRevisionsList, setAllowList, setAllowedDocumentTypes, setAnalyticsDatabaseName, setAttachmentService, setBasePath, setCliVersion, setDefaultDrivesUrl, setDefaultPHGlobalConfig, setDisabledEditors, setDocumentCache, setDriveAvailableOffline, setDriveMetadata, setDriveSharingType, setDrives, setDrivesPreserveStrategy, setEnabledEditors, setFeatures, setFileUploadOperationsChunkSize, setGaTrackingId, setGlobal, setGraphQLReactorClient, setIsAddCloudDrivesEnabled, setIsAddDriveEnabled, setIsAddLocalDrivesEnabled, setIsAddPublicDrivesEnabled, setIsAnalyticsDatabaseWorkerEnabled, setIsAnalyticsEnabled, setIsAnalyticsExternalProcessorsEnabled, setIsCloudDrivesEnabled, setIsDeleteCloudDrivesEnabled, setIsDeleteLocalDrivesEnabled, setIsDeletePublicDrivesEnabled, setIsDiffAnalyticsEnabled, setIsDocumentModelSelectionSettingsEnabled, setIsDragAndDropEnabled, setIsDriveAnalyticsEnabled, setIsEditorDebugModeEnabled, setIsEditorReadModeEnabled, setIsExternalControlsEnabled, setIsExternalPackagesEnabled, setIsExternalProcessorsEnabled, setIsExternalRelationalProcessorsEnabled, setIsLocalDrivesEnabled, setIsPublicDrivesEnabled, setIsRelationalProcessorsEnabled, setIsSentryTracingEnabled, setLoading, setLocalDrivesEnabled, setLogLevel, setPGliteDB, setPHAppConfig, setPHAppConfigByKey, setPHDocumentEditorConfig, setPHDocumentEditorConfigByKey, setPHGlobalConfig, setPHGlobalConfigByKey, setPHModal, setPHToast, setPackageDiscoveryService, setPreferredEditorOnNode, setReactorClient, setReactorClientModule, setRenown, setRenownAdapters, setRenownChainId, setRenownNetworkId, setRenownUrl, setRequiresHardRefresh, setRevisionHistoryVisible, setRouterBasename, setSelectedDrive, setSelectedDriveId, setSelectedNode, setSelectedTimelineItem, setSelectedTimelineRevision, setSentryDsn, setSentryEnv, setSentryRelease, setStudioMode, setSwitchboardUrl, setVersion, setVersionCheckInterval, setVetraPackageManager, setWarnOutdatedApp, showCreateDocumentModal, showDeleteNodeModal, showPHModal, showRevisionHistory, signStampedAction, sortNodesByName, stampAction, startDocumentChangesSubscription, subgraphUrlFromGraphqlUrl, subscriptionsUrlFromGraphqlUrl, trimTrailingSlash, truncateAllTables, upgradeDocument, useAllowList, useAllowedDocumentModelModules, useAllowedDocumentTypes, useAnalyticsDatabaseName, useAppModuleById, useAppModules, useAttachmentPreview, useAttachmentService, useAttachmentUpload, useAttachments, useBasePath, useCanExecute, useCliVersion, useConnectionState, useConnectionStates, useDatabase, useDefaultAppModule, useDefaultDrivesUrl, useDid, useDisabledEditors, useDispatch, useDocument, useDocumentById, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOfType, useDocumentOperations, useDocumentSafe, useDocumentTypes, useDocumentTypesInSelectedDrive, useDocumentVersionStatus, useDocuments, useDocumentsByIds, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useDownloadDocument, useDownloadFolder, useDragNode, useDriveById, useDriveSystemInfo, useDrives, useDrivesPreserveStrategy, useDropFile, useDropNode, useEditorFileDrop, useEditorModuleById, useEditorModules, useEditorModulesForDocumentType, useEditorPreloader, useEnabledEditors, useFallbackEditorModule, useFeatures, useFileNodesInSelectedDrive, useFileNodesInSelectedFolder, useFileUploadOperationsChunkSize, useFolderById, useFolderNodesInSelectedDrive, useFolderNodesInSelectedFolder, useGaTrackingId, useGetDocument, useGetDocumentAsync, useGetDocuments, useGetSwitchboardLink, useGraphQLReactorClient, useInitReactorGraphqlClient, useIsAddCloudDrivesEnabled, useIsAddDriveEnabled, useIsAddLocalDrivesEnabled, useIsAddPublicDrivesEnabled, useIsAnalyticsDatabaseWorkerEnabled, useIsAnalyticsEnabled, useIsAnalyticsExternalProcessorsEnabled, useIsCloudDrivesEnabled, useIsDeleteCloudDrivesEnabled, useIsDeleteLocalDrivesEnabled, useIsDeletePublicDrivesEnabled, useIsDiffAnalyticsEnabled, useIsDocumentModelSelectionSettingsEnabled, useIsDragAndDropEnabled, useIsDriveAnalyticsEnabled, useIsEditorDebugModeEnabled, useIsEditorReadModeEnabled, useIsExternalControlsEnabled, useIsExternalPackagesEnabled, useIsExternalProcessorsEnabled, useIsExternalRelationalProcessorsEnabled, useIsLocalDrivesEnabled, useIsPublicDrivesEnabled, useIsRelationalProcessorsEnabled, useIsSentryTracingEnabled, useLoading, useLocalDrivesEnabled, useLogLevel, useLoginStatus, useModelRegistry, useNodeActions, useNodeById, useNodeParentFolderById, useNodePathById, useNodesInSelectedDrive, useNodesInSelectedDriveOrFolder, useNodesInSelectedFolder, useOnDropFile, usePGlite, usePHAppConfigByKey, usePHDocumentEditorConfigByKey, usePHGlobalConfigByKey, usePHModal, usePHToast, usePackageDiscoveryService, useParentFolderForSelectedNode, useReactorClient, useReactorClientModule, useRelationalDb, useRelationalQuery, useRelationalQueryOptions, useRenown, useRenownAdapters, useRenownAuth, useRenownAuthAsync, useRenownChainId, useRenownInit, useRenownInitialAuth, useRenownInitialUser, useRenownLoginMethods, useRenownNetworkId, useRenownSessionCookie, useRenownSessionSynced, useRenownUrl, useRenownWalletAdapter, useRequiresHardRefresh, useResetPHGlobalConfig, useRevisionHistoryVisible, useRouterBasename, useSelectedDocument, useSelectedDocumentId, useSelectedDocumentOfType, useSelectedDocumentSafe, useSelectedDrive, useSelectedDriveId, useSelectedDriveSafe, useSelectedFolder, useSelectedNode, useSelectedNodePath, useSelectedTimelineItem, useSelectedTimelineRevision, useSentryDsn, useSentryEnv, useSentryRelease, useSetDefaultPHGlobalConfig, useSetPHAppConfig, useSetPHDocumentEditorConfig, useSetPHGlobalConfig, useStudioMode, useSubgraphModules, useSupportedDocumentTypesInReactor, useSwitchboardClient, useSwitchboardUrl, useSync, useSyncList, useTheme, useUser, useUserPermissions, useVersion, useVersionCheckInterval, useVetraPackageManager, useVetraPackages, useWarnOutdatedApp, validateDocument, viewFilterInputFromViewFilter, waitForDocumentReady };
1964
+ export { type AddPHGlobalEventHandler, type BackendAuthState, BatchJobFailedError, BearerTokenProvider, type BrowserReactorClientModule, type BrowserReactorModule, type BulkImportJob, CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, CREDENTIAL_TYPES, ChannelScheme, ChevronDownIcon, type ConflictInfo, type ConflictResolution, type ConflictStrategy, ConnectionParams, type ConnectionState, type ConnectionStateSnapshot, CopyIcon, CreateStoreOptions, DEFAULT_BATCH_REQUEST_TIMEOUT_MS, DEFAULT_BREAKER, DEFAULT_DRIVE_ID, DEFAULT_REQUEST_TIMEOUT_MS, DEFAULT_SWITCHBOARD_URL, DOMAIN_TYPE, type Database, type DelegationClaims, type DelegationScope, type DesktopShell, DisconnectIcon, type DiscoveryEvent, type DiscoveryEventListener, DispatchFn, DocumentCache, type RemoteDocumentChangeEvent as DocumentChangeEvent, type DocumentChangeListener, DocumentChangeType, DocumentChangesEventPayload, DocumentChangesSubscriptionOptions, type DocumentDispatch, DocumentIntegrityService, DocumentOperationsResult, DocumentOperationsState, type DocumentRefetchState, type DocumentTypeIcon, type DocumentsOfTypeEntry, DraggingNode, DriveCollectionId, DriveIdCall, type DriveInfo, DriveNodeQueries, DriveNodesCache, DriveNodesEntry, DriveNodesOptions, type FailedInstallation, type FailedInstallationReason, type FileUploadProgress, type FileUploadProgressCallback, type FolderZipResult, type FulfilledPromise, type FullPHGlobalConfig, GET_MANY_CHUNK_SIZE, GetDocumentAtConsistencyDocument, GetDocumentAtConsistencyResult, GetDocumentAtConsistencyVariables, GetDocumentQueryFields, GetDocumentQueryResult, type GetDocumentResult, type GetDocumentWithOperationsResult, type GetOperationsResult, GqlRequestChannel, type GraphQLClientDocumentEvent, type GraphQLClientDocumentsEvent, type GraphQLClientWindowEvents, type GraphQLDocumentEventOperationName, type GraphQLDocumentEvents, type GraphQLDocumentEventsOperationName, type GraphQLDocumentsEvents, GraphQLDriveNodeSource, GraphQLDriveReadClient, GraphQLFetch, GraphQLOperationNotSupportedError, GraphQLReactorClient, GraphQLReactorClientOptions, GraphQLReactorProvider, GraphQLReactorProviderProps, GraphQLReactorReadClient, GraphQLRequestOptions, GraphQLWrongBackendError, type IChannel, IDLE_DOCUMENTS_OF_TYPE_ENTRY, IDLE_OPERATIONS_ENTRY, IDLE_REFETCH_STATE, type IDocumentCache, IDocumentCacheReader, type IDocumentModelLoader, type IDocumentTypeCache, IJobChangesSocket, type IOperationCache, type IPackageDiscoveryService, type IPackageListerUnsubscribe, type IPackageManager, type IPackagesListener, type IPeerAgreement, type IProcessor, type IProcessorHostModule, type IProcessorHostModuleBase, type IQueue, type IReactorBrowserClient, type IReactorBrowserReadClient, type IReactorBrowserWriteClient, type IReactorClient, type IReactorProcessorHostModule, type IReactorReadClient, type IReactorWriteClient, type IRelationalDb, type IRemoteClient, type IRemoteController, ISSUER_TYPE, InMemoryQueue, IntervalPollTimer, type Job, JobChangesEventPayload, JobChangesSocketOptions, JobFailedError, type JwtHandler, type KeyframeValidationIssue, type LOADING, type MergeHandler, MutateDocumentWithOperationsDocument, MutateDocumentWithOperationsResult, MutateDocumentWithOperationsVariables, type NodeKind, type OperationWithContext, type OperationsCacheEntry, type PHAnalyticsGlobalConfig, type PHAppConfig, type PHAppConfigHooks, type PHAppConfigKey, type PHAppConfigSetters, type PHCommonGlobalConfig, type PHDocumentEditorConfig, type PHDocumentEditorConfigHooks, type PHDocumentEditorConfigKey, type PHDocumentEditorConfigSetters, type PHDriveTarget, type PHDrivesGlobalConfig, type PHGlobal, type PHGlobalConfig, type PHGlobalConfigHooks, type PHGlobalConfigHooksForKey, type PHGlobalConfigKey, type PHGlobalConfigSetters, type PHGlobalConfigSettersForKey, type PHGlobalEventHandlerAdders, type PHGlobalKey, type PHGlobalValue, type PHModal, type PHNavigateOptions, type PHNavigation, type PHNavigationTarget, type PHProcessorsGlobalConfig, type PHRelationalProcessorsGlobalConfig, type PHRenownGlobalConfig, type PHSearchUpdate, type PHSentryGlobalConfig, type PHSettingsTarget, PHStore, PHStoreProvider, type PHToastFn, type PHToastOptions, type PHToastType, type PackageManagerInstallResult, type ParsedDriveUrl, type PendingInstallation, PollBehavior, type ProcessorApp, type ProcessorFactory, type ProcessorFactoryBuilder, type ProcessorFilter, type ProcessorRecord, type PromiseState, type PromiseWithState, PropagationMode, type PublishEvent, type PushResult, QueryCallbackReturnType, REACTOR_SCHEMA, RENOWN_CHAIN_ID, RENOWN_INITIAL_ANONYMOUS, RENOWN_INITIAL_UNKNOWN, RENOWN_NETWORK_ID, RENOWN_RETURN_URL_STRIPPED_PARAMS, RENOWN_URL, type ReactorBrowserHalves, ReactorBuilder, ReactorClientBuilder, type ReactorFeatureFlags, type ReactorGraphQLClient, ReactorOperationFieldsFragmentDoc, type RebuildResult, type RejectedPromise, RelationalDbOptions, RelationalDbProcessor, RelationalDbWithLive, type Remote, type RemoteControllerGraphQLClient, type RemoteControllerOptions, type RemoteDocumentControllerWith, type RemoteDocumentData, type RemoteFilter, type RemoteMeta, type RemoteOperation, type RemoteOperationResultPage, type RemotePeer, Renown, RenownAuth, RenownAuthAsync, RenownAuthButton, type RenownAuthButtonProps, RenownAuthResolution, RenownAuthStatus, type RenownInitOptions, type RenownInitialAuth, RenownInitialUserProvider, type RenownInitialUserProviderProps, RenownLoginButton, type RenownLoginButtonProps, type RenownLoginMethod, RenownLogo, type RenownProps, RenownProvider, type RenownProviderProps, type RenownSessionCookieOptions, type RenownSessionCookieState, RenownUserButton, type RenownUserButtonMenuItem, type RenownUserButtonProps, RenownWalletProvider, type RenownWalletProviderProps, RevisionsListSelection, type RunDocumentOptions, type SdkFunctionWrapper, type SearchParamsUpdate, type SetEvent, type SetPHGlobalValue, type SetSearchParams, type SignerConfig, type SnapshotValidationIssue, SpinnerIcon, StaticPackageManager, SubgraphSdkFactory, SubgraphSdkRegistry, SwitchboardBackend, SwitchboardBackendDescriptor, SwitchboardBreaker, type SwitchboardDirectory, type SwitchboardEntry, SwitchboardUnreachableError, type SwitchboardWorkflows, type SyncHold, type SyncOperation, SyncOperationStatus, type SyncStatus, type TStateSchemaZodObject, type TimelineBarItem, type TimelineDividerItem, type TimelineItem, type TrackedAction, TypedGraphQLDocument, UseDispatchResult, UseDocumentOperationsOptions, type UseOnDropFile, type UsePHGlobalValue, UserIcon, VERIFIABLE_CREDENTIAL_EIP712_TYPE, type ValidationResult, type WorkerReactorClientModule, type WorkerReactorModule, type WriteHandle, type WriteReceipt, addAttachmentServiceEventHandler, addDocumentCacheEventHandler, addDraggingNodeEventHandler, addDriveNodesEventHandler, addFullReactorClientEventHandler, addPromiseState, addReactorClientEventHandler, addReactorClientModuleEventHandler, addReactorHalvesEventHandler, addRenownEventHandler, ambientRenownSigner, ambientRenownTokenProvider, baseDocumentModels, baseDocumentModelsMap, bindPHStoreToWindow, createAnalyticsStore, createClient, createDelegation, createDispatch, createGraphQLDriveNodeSource, createJobChangesSocket, createPHStore, createProcessorQuery, createSwitchboardBackend, decodeDelegation, describeGraphQLDocument, desktopShell, dispatchActions, driveIdFromUrl, dropDriveNode, ensurePHEventHandlers, ensurePHStore, findIsServableOverGraphQL, getActivePHStore, getAnalyticsStore, getDriveNode, getFullReactorClient, getPHStore, getPHStoreSubscribe, globalFetch, graphqlDocumentEvents, graphqlDocumentsEvents, graphqlEventsToSyncDrive, initConnectCrypto, initRenownCrypto, invalidateDriveNodes, isAuthRefusalClose, isDeadlineError, isDocumentTypeCache, isDriveAuthError, isGraphQLReactorClient, isNodeFetch, isOperationCache, isoStringFromDateTime, loadDriveNodes, login, logout, makeAuthConnectionParams, makeAuthMiddleware, markLocalDriveWrite, notifyPHStore, openRenown, packageFromDocumentModels, parseDriveUrl, peekDriveNode, phDocumentFromGetDocument, phDocumentFromMutation, prepareSignedActions, queriesUnknownArgument, queriesUnknownField, readPromiseState, resolveDocumentModelModule, revisionMapFromRevisionsList, setAttachmentService, setDocumentCache, setFullReactorClient, setReactorClient, setReactorClientModule, setRenown, signStampedAction, stampAction, startDocumentChangesSubscription, subgraphUrlFromGraphqlUrl, subscribePHStore, subscriptionsUrlFromGraphqlUrl, switchboardFetch, takeLocalDriveWrite, toLegacyNode, useAttachmentService, useDatabase, useDid, useDispatch, useDocument, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOperations, useDocumentSafe, useDocuments, useDragNode, useDriveNode, useDriveNodes, useDriveNodesCache, useDropNode, useGetDocument, useGetDocumentAsync, useGetDocuments, useLoginStatus, useModelRegistry, usePGlite, usePHStore, useReactorClient, useReactorClientModule, useReactorHalves, useRelationalDb, useRelationalQuery, useRelationalQueryOptions, useRenown, useRenownAuth, useRenownAuthAsync, useRenownInit, useRenownInitialAuth, useRenownInitialUser, useRenownLoginMethods, useRenownSessionCookie, useRenownSessionSynced, useRenownWalletAdapter, useSwitchboardClient, useSync, useSyncList, useUser, viewFilterInputFromViewFilter, withRequestDeadline, withStreamedBodies };
1965
+ export {};
1433
1966
  //# sourceMappingURL=index.d.ts.map