@powerhousedao/reactor-browser 6.2.3-dev.81 → 6.2.3-dev.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{attachment-service-DPWkKp3y.d.ts → attachment-service-DEJPb14N.d.ts} +96 -6
- package/dist/attachment-service-DEJPb14N.d.ts.map +1 -0
- package/dist/{dispatch-C8J9jQ-o.js → dispatch-Cylwl2Dk.js} +4 -2
- package/dist/dispatch-Cylwl2Dk.js.map +1 -0
- package/dist/{document-by-id-Dpp76ZNE.js → document-by-id-DdvqanGR.js} +2 -2
- package/dist/{document-by-id-Dpp76ZNE.js.map → document-by-id-DdvqanGR.js.map} +1 -1
- package/dist/{document-model-modules-XrYfGXt8.js → document-model-modules-D-VXC3ET.js} +2 -2
- package/dist/{document-model-modules-XrYfGXt8.js.map → document-model-modules-D-VXC3ET.js.map} +1 -1
- package/dist/{document-operations-CdfiLNQN.js → document-operations-CsiIPsx9.js} +321 -16
- package/dist/document-operations-CsiIPsx9.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/src/ai/index.js +2 -2
- package/dist/src/analytics/index.js +1 -1
- package/dist/src/graphql-client/entry.d.ts +2 -2
- package/dist/src/graphql-client/entry.js +4 -4
- package/dist/{switchboard-CYTCYt4Z.js → switchboard-DnvOmOx5.js} +4 -4
- package/dist/{switchboard-CYTCYt4Z.js.map → switchboard-DnvOmOx5.js.map} +1 -1
- package/package.json +10 -9
- package/dist/attachment-service-DPWkKp3y.d.ts.map +0 -1
- package/dist/dispatch-C8J9jQ-o.js.map +0 -1
- package/dist/document-operations-CdfiLNQN.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as makeAuthConnectionParams, $t as makeAuthMiddleware, A as addDocumentCacheEventHandler, An as addPromiseState, At as SubgraphSdkRegistry, B as DEFAULT_REQUEST_TIMEOUT_MS, Bt as withStreamedBodies, C as useModelRegistry, Cn as SyncStatus, Ct as ambientRenownSigner, D as useReactorHalves, Dn as IDLE_DOCUMENTS_OF_TYPE_ENTRY, Dt as viewFilterInputFromViewFilter, E as useReactorClientModule, En as GET_MANY_CHUNK_SIZE, Et as isGraphQLReactorClient, F as useDocuments, Fn as dispatchActions, Ft as globalFetch, G as ConnectionParams, Gt as queriesUnknownArgument, H as SwitchboardBackendDescriptor, Ht as GraphQLOperationNotSupportedError, I as useGetDocument, It as isDeadlineError, J as IJobChangesSocket, Jt as GraphQLDriveNodeSource, K as DocumentChangesEventPayload, Kt as queriesUnknownField, L as useGetDocumentAsync, Lt as isNodeFetch, M as useDocument, Mn as isOperationCache, Mt as describeGraphQLDocument, N as useDocumentCache, Nn as readPromiseState, Nt as subgraphUrlFromGraphqlUrl, O as useSync, On as IDLE_OPERATIONS_ENTRY, Ot as GraphQLRequestOptions, P as useDocumentSafe, Pn as IDLE_REFETCH_STATE, Pt as GraphQLFetch, Q as isAuthRefusalClose, Qt as ambientRenownTokenProvider, R as useGetDocuments, Rt as switchboardFetch, S as useDatabase, Sn as RemoteOperationResultPage, St as GraphQLReactorReadClient, T as useReactorClient, Tn as DocumentCache, Tt as findIsServableOverGraphQL, U as SwitchboardUnreachableError, Ut as GraphQLWrongBackendError, V as SwitchboardBackend, Vt as BatchJobFailedError, W as createSwitchboardBackend, Wt as JobFailedError, X as JobChangesSocketOptions, Xt as toLegacyNode, Y as JobChangesEventPayload, Yt as GraphQLDriveReadClient, Z as createJobChangesSocket, Zt as BearerTokenProvider, _ as addReactorHalvesEventHandler, _n as RemoteControllerGraphQLClient, _t as ensurePHEventHandlers, a as DocumentOperationsState, an as phDocumentFromMutation, at as prepareSignedActions, b as setReactorClient, bn as RemoteDocumentData, bt as GraphQLReactorClient, c as useDocumentModelModuleById, cn as ConflictStrategy, ct as GetDocumentAtConsistencyDocument, d as UseDispatchResult, dn as GetDocumentWithOperationsResult, dt as MutateDocumentWithOperationsDocument, en as GetDocumentQueryFields, et as startDocumentChangesSubscription, f as createDispatch, fn as GetOperationsResult, ft as MutateDocumentWithOperationsResult, g as addReactorClientModuleEventHandler, gn as PushResult, gt as GraphQLReactorProviderProps, h as addReactorClientEventHandler, hn as MergeHandler, ht as GraphQLReactorProvider, i as DocumentOperationsResult, in as phDocumentFromGetDocument, it as resolveDocumentModelModule, j as setDocumentCache, jn as isDocumentTypeCache, jt as TypedGraphQLDocument, k as useSyncList, kn as IDocumentCacheReader, kt as SubgraphSdkFactory, l as useDocumentModelModules, ln as DocumentChangeListener, lt as GetDocumentAtConsistencyResult, m as addFullReactorClientEventHandler, mn as IRemoteController, mt as ReactorOperationFieldsFragmentDoc, n as setAttachmentService, nn as RevisionsListSelection, nt as StaticPackageManager, o as UseDocumentOperationsOptions, on as revisionMapFromRevisionsList, ot as signStampedAction, p as useDispatch, pn as IRemoteClient, pt as MutateDocumentWithOperationsVariables, q as DocumentChangesSubscriptionOptions, qt as DriveNodeQueries, r as useAttachmentService, rn as isoStringFromDateTime, rt as packageFromDocumentModels, s as useDocumentOperations, sn as ConflictInfo, st as stampAction, t as addAttachmentServiceEventHandler, tn as GetDocumentQueryResult, tt as subscriptionsUrlFromGraphqlUrl, u as DispatchFn, un as GetDocumentResult, ut as GetDocumentAtConsistencyVariables, v as getFullReactorClient, vn as RemoteControllerOptions, vt as useSwitchboardClient, w as usePGlite, wn as TrackedAction, wt as createGraphQLDriveNodeSource, x as setReactorClientModule, xn as RemoteOperation, xt as GraphQLReactorClientOptions, y as setFullReactorClient, yn as RemoteDocumentChangeEvent, yt as DriveIdCall, z as DEFAULT_BREAKER, zt as withRequestDeadline } from "./attachment-service-DEJPb14N.js";
|
|
2
2
|
import { a as getAnalyticsStore, i as createAnalyticsStore, n as IPowerhouseAnalytics, r as CreateStoreOptions } from "./types-520nWrB3.js";
|
|
3
3
|
import { $ as IPackageManager, A as loadDriveNodes, At as PHGlobalConfigKey, B as createPHStore, Bt as ReactorBrowserHalves, 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 IDocumentCache, H as getActivePHStore, Ht as DocumentRefetchState, I as useDriveNodesCache, It as PHSentryGlobalConfig, J as DraggingNode, Jt as OperationsCacheEntry, K as subscribePHStore, Kt as IDocumentTypeCache, L as PHStore, Lt as IReactorBrowserClient, 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 IReactorBrowserReadClient, S as WorkerReactorModule, St as PHDocumentEditorConfig, T as DriveNodesOptions, Tt as PHDocumentEditorConfigSetters, U as getPHStore, Ut as DocumentsOfTypeEntry, V as ensurePHStore, Vt as DocumentDispatch, W as getPHStoreSubscribe, Wt as FulfilledPromise, X as useDragNode, Xt as PromiseWithState, Y as addDraggingNodeEventHandler, Yt as PromiseState, Z as useDropNode, Zt as RejectedPromise, _ 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 IOperationCache, 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 IReactorBrowserWriteClient } from "./global-BSyOOTvL.js";
|
|
4
4
|
import { baseDocumentModels, baseDocumentModelsMap } from "./src/document-model.js";
|
|
@@ -1868,6 +1868,6 @@ export declare function getUserPermissions(): {
|
|
|
1868
1868
|
//#region src/utils/validate-document.d.ts
|
|
1869
1869
|
export declare const validateDocument: (document: PHDocument$1) => ValidationError[];
|
|
1870
1870
|
//#endregion
|
|
1871
|
-
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_DRIVE_ID, DEFAULT_SWITCHBOARD_URL, DOMAIN_TYPE, type Database, DisconnectIcon, type DiscoveryEvent, type DiscoveryEventListener, DispatchFn, DocumentCache, type RemoteDocumentChangeEvent as DocumentChangeEvent, type DocumentChangeListener, DocumentChangeType, DocumentChangesEventPayload, DocumentChangesSubscriptionOptions, type DocumentDispatch, DocumentIntegrityService, DocumentOperationsResult, DocumentOperationsState, type DocumentRefetchState, type DocumentTypeIcon, 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, 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, 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, ambientRenownTokenProvider, baseDocumentModels, baseDocumentModelsMap, bindPHStoreToWindow, createAnalyticsStore, createClient, createDispatch, createGraphQLDriveNodeSource, createJobChangesSocket, createPHStore, createProcessorQuery, describeGraphQLDocument, dispatchActions, driveIdFromUrl, dropDriveNode, ensurePHEventHandlers, ensurePHStore, findIsServableOverGraphQL, getActivePHStore, getAnalyticsStore, getDriveNode, getFullReactorClient, getPHStore, getPHStoreSubscribe, graphqlDocumentEvents, graphqlDocumentsEvents, graphqlEventsToSyncDrive, initConnectCrypto, initRenownCrypto, invalidateDriveNodes, isAuthRefusalClose, isDocumentTypeCache, isDriveAuthError, isGraphQLReactorClient, 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, 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 };
|
|
1871
|
+
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_BREAKER, DEFAULT_DRIVE_ID, DEFAULT_REQUEST_TIMEOUT_MS, DEFAULT_SWITCHBOARD_URL, DOMAIN_TYPE, type Database, DisconnectIcon, type DiscoveryEvent, type DiscoveryEventListener, DispatchFn, DocumentCache, type RemoteDocumentChangeEvent as DocumentChangeEvent, type DocumentChangeListener, DocumentChangeType, DocumentChangesEventPayload, DocumentChangesSubscriptionOptions, type DocumentDispatch, DocumentIntegrityService, DocumentOperationsResult, DocumentOperationsState, type DocumentRefetchState, type DocumentTypeIcon, 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, SwitchboardUnreachableError, 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, createDispatch, createGraphQLDriveNodeSource, createJobChangesSocket, createPHStore, createProcessorQuery, createSwitchboardBackend, describeGraphQLDocument, 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 };
|
|
1872
1872
|
export {};
|
|
1873
1873
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { a as createPHStore, c as getPHStore, d as subscribePHStore, f as usePHStore, i as bindPHStoreToWindow, l as getPHStoreSubscribe, n as subscribeToPHValue, o as ensurePHStore, r as PHStoreProvider, s as getActivePHStore, t as makePHEventFunctions, u as notifyPHStore } from "./make-ph-event-functions-B5GU5xcR.js";
|
|
2
|
-
import { A as
|
|
3
|
-
import { $ as makeAuthMiddleware, A as addDrivesEventHandler, B as invalidateDriveNodes, C as setSelectedNode, D as usePreloadNode, E as useOpenNode, F as isInitialSyncInFlight, G as useDriveNode, H as markLocalDriveWrite, I as listSyncRemotes, J as isFileNodeKind, K as useDriveNodes, L as addDriveNodesEventHandler, M as useDrives, N as DriveProvider, P as useDriveContext, Q as ambientRenownTokenProvider, R as dropDriveNode, S as selectNode, T as useNodeTarget, U as peekDriveNode, V as loadDriveNodes, W as takeLocalDriveWrite, X as listAllDriveNodes, Y as isFolderNodeKind, Z as sortNodesByName, _ as useSetSelectedDrive, a as setVetraPackageManager, b as getNodeTarget, c as addSelectedDriveIdEventHandler, d as setSelectedDrive, f as setSelectedDriveId, g as useSelectedDriveSafe, h as useSelectedDriveId, i as onVetraPackageManager, j as setDrives, k as useSetSelectedNode, l as preloadDrive, m as useSelectedDrive, n as useDocumentModelModules, o as useVetraPackageManager, p as usePreloadDrive, q as useDriveNodesCache, r as addVetraPackageManagerEventHandler, s as useVetraPackages, t as useDocumentModelModuleById, u as selectDrive, v as addResetSelectedNodeEventHandler, w as setSelectedNodeId, x as preloadNode, y as addSelectedNodeIdEventHandler, z as getDriveNode } from "./document-model-modules-
|
|
2
|
+
import { A as DocumentModelNotFoundError, E as dispatchActions, M as NoSelectedDocumentError, N as OperationRejectedError, P as UnsupportedDocumentTypeError, T as IDLE_REFETCH_STATE, _ as isDocumentTypeCache, a as useDocument, b as DOCUMENT_CHANGE_TYPE, c as useDocuments, d as useGetDocuments, f as DocumentCache, g as addPromiseState, h as IDLE_OPERATIONS_ENTRY, i as setDocumentCache, j as DocumentTypeMismatchError, l as useGetDocument, m as IDLE_DOCUMENTS_OF_TYPE_ENTRY, n as useDispatch, o as useDocumentCache, p as GET_MANY_CHUNK_SIZE, r as addDocumentCacheEventHandler, s as useDocumentSafe, t as createDispatch, u as useGetDocumentAsync, v as isOperationCache, w as DocumentRefetcher, y as readPromiseState } from "./dispatch-Cylwl2Dk.js";
|
|
3
|
+
import { $ as makeAuthMiddleware, A as addDrivesEventHandler, B as invalidateDriveNodes, C as setSelectedNode, D as usePreloadNode, E as useOpenNode, F as isInitialSyncInFlight, G as useDriveNode, H as markLocalDriveWrite, I as listSyncRemotes, J as isFileNodeKind, K as useDriveNodes, L as addDriveNodesEventHandler, M as useDrives, N as DriveProvider, P as useDriveContext, Q as ambientRenownTokenProvider, R as dropDriveNode, S as selectNode, T as useNodeTarget, U as peekDriveNode, V as loadDriveNodes, W as takeLocalDriveWrite, X as listAllDriveNodes, Y as isFolderNodeKind, Z as sortNodesByName, _ as useSetSelectedDrive, a as setVetraPackageManager, b as getNodeTarget, c as addSelectedDriveIdEventHandler, d as setSelectedDrive, f as setSelectedDriveId, g as useSelectedDriveSafe, h as useSelectedDriveId, i as onVetraPackageManager, j as setDrives, k as useSetSelectedNode, l as preloadDrive, m as useSelectedDrive, n as useDocumentModelModules, o as useVetraPackageManager, p as usePreloadDrive, q as useDriveNodesCache, r as addVetraPackageManagerEventHandler, s as useVetraPackages, t as useDocumentModelModuleById, u as selectDrive, v as addResetSelectedNodeEventHandler, w as setSelectedNodeId, x as preloadNode, y as addSelectedNodeIdEventHandler, z as getDriveNode } from "./document-model-modules-D-VXC3ET.js";
|
|
4
4
|
import { A as extractNodeIdFromSlug, C as setSearchParams, D as extractDriveIdFromSlug, E as extractDriveIdFromPath, F as getPathWithoutBase, I as makeDriveSlug, L as makeDriveUrlComponent, M as findDerivedId, N as findDriveBySlug, O as extractDriveSlugFromPath, P as findUuid, R as makeNodeSlug, S as setBrowserOpenSync, T as createUrlWithPreservedParams, _ as preloadTarget, a as SETTINGS_PATH, b as searchParamsToString, c as getCurrentPathname, d as hasHostNavigation, f as isGlobalSearchParam, g as openedFromIndex, h as openTargetWith, i as PH_LOCATION_CHANGE_EVENT, j as extractNodeSlugFromPath, k as extractNodeIdFromPath, l as getPHNavigation, m as openTarget, n as GLOBAL_SEARCH_PARAMS, o as applySearchUpdate, p as isSettingsTarget, r as OPENED_FROM_STATE_KEY, s as browserNavigation, t as FEATURE_FLAG_PARAM_PREFIX, u as getTargetHref, v as recordToSearch, w as targetPathname, x as searchToRecord, y as resolveSearchUpdate, z as resolveUrlPathname } from "./navigation-BqphkrOB.js";
|
|
5
|
-
import { $ as
|
|
5
|
+
import { $ as addIsAddLocalDrivesEnabledEventHandler, $i as deleteNode, $n as useIsDeletePublicDrivesEnabled, $r as viewFilterInputFromViewFilter, $t as setIsAnalyticsEnabled, A as useGraphQLReactorClient, Aa as closePHModal, Ai as phDocumentFromMutation, An as setVersion, Ar as addIsExternalControlsEnabledEventHandler, At as addSentryReleaseEventHandler, B as useAttachmentService, Ba as usePHModal, Bi as COMMON_PACKAGE_ID, Bn as useEnabledEditors, Br as useIsDragAndDropEnabled, Bt as setBasePath, C as addSyncSelectionOnPopStateEventHandler, Ca as useReactorClient, Ci as withRequestDeadline, Cn as setRequiresHardRefresh, Cr as useStudioMode, Ct as addRenownChainIdEventHandler, D as usePackageDiscoveryService, Da as useSyncList, Di as toLegacyNode, Dn as setSentryRelease, Dr as useWarnOutdatedApp, Dt as addRouterBasenameEventHandler, E as setPackageDiscoveryService, Ea as useSync, Ei as GraphQLDriveReadClient, En as setSentryEnv, Er as useVersionCheckInterval, Et as addRequiresHardRefreshEventHandler, F as addFeaturesEventHandler, Fa as setPHModal, Fi as extractRevisionMap, Fn as useBasePath, Fr as phDocumentEditorConfigSetters, Ft as addWarnOutdatedAppEventHandler, G as addDefaultDrivesUrlEventHandler, Ga as useSearchParams, Gi as GraphQLWrongBackendError, Gn as useIsAddLocalDrivesEnabled, Gr as recordBackendAuthError, Gt as setEnabledEditors, H as addAnalyticsDatabaseNameEventHandler, Ha as isPlainClick, Hi as DRIVE_DOCUMENT_TYPES, Hn as useGaTrackingId, Hr as addBackendAuthEventHandler, Ht as setDefaultDrivesUrl, I as setFeatures, Ia as showCreateDocumentModal, Ii as hasRevisionConflict, In as useCliVersion, Ir as setAllowedDocumentTypes, It as phGlobalConfigHooks, J as addEnabledEditorsEventHandler, Ji as queriesUnknownField, Jn as useIsAnalyticsEnabled, Jr as GraphQLReactorClient, Jt as setIsAddCloudDrivesEnabled, K as addDisabledEditorsEventHandler, Ka as useSetSearchParams, Ki as JobFailedError, Kn as useIsAddPublicDrivesEnabled, Kr as setBackendAuth, Kt as setFileUploadOperationsChunkSize, L as useFeatures, La as showDeleteNodeModal, Li as screamingSnakeToCamel, Ln as useDefaultDrivesUrl, Lr as setIsDragAndDropEnabled, Lt as phGlobalConfigSetters, M as useDragNode, Ma as modalFromSearch, Mi as ConflictError, Mn as setWarnOutdatedApp, Mr as phAppConfigHooks, Mt as addSwitchboardUrlEventHandler, N as useDropNode, Na as modalHref, Ni as buildPulledDocument, Nn as useAllowList, Nr as phAppConfigSetters, Nt as addVersionCheckIntervalEventHandler, O as addGraphQLReactorClientEventHandler, Oa as MODAL_SEARCH_PARAM, Oi as isoStringFromDateTime, On as setStudioMode, Or as addAllowedDocumentTypesEventHandler, Ot as addSentryDsnEventHandler, P as useDropTarget, Pa as modalSearch, Pi as convertRemoteOperations, Pn as useAnalyticsDatabaseName, Pr as phDocumentEditorConfigHooks, Pt as addVersionEventHandler, Q as addIsAddDriveEnabledEventHandler, Qi as copyNode$1, Qn as useIsDeleteLocalDrivesEnabled, Qr as isGraphQLReactorClient, Qt as setIsAnalyticsDatabaseWorkerEnabled, R as addAttachmentServiceEventHandler, Ra as showPHModal, Ri as uncreatedDocument, Rn as useDisabledEditors, Rr as setIsExternalControlsEnabled, Rt as setAllowList, S as addSetSelectedNodeOnPopStateEventHandler, Sa as usePGlite, Si as switchboardFetch, Sn as setRenownUrl, Sr as useSentryRelease, St as addRenownAdaptersEventHandler, T as addPackageDiscoveryServiceEventHandler, Ta as useReactorHalves, Ti as GraphQLDriveNodeSource, Tn as setSentryDsn, Tr as useVersion, Tt as addRenownUrlEventHandler, U as addBasePathEventHandler, Ua as useLinkProps, Ui as BatchJobFailedError, Un as useIsAddCloudDrivesEnabled, Ur as backendAuthStatusOf, Ut as setDisabledEditors, V as addAllowListEventHandler, Va as withoutModalSearch, Vi as DEFAULT_DRIVE_EDITOR_ID, Vn as useFileUploadOperationsChunkSize, Vr as useIsExternalControlsEnabled, Vt as setCliVersion, W as addCliVersionEventHandler, Wa as usePHNavigation, Wi as GraphQLOperationNotSupportedError, Wn as useIsAddDriveEnabled, Wr as isBackendAuthError, Wt as setDrivesPreserveStrategy, X as addGaTrackingIdEventHandler, Xi as addFileWithProgress, Xn as useIsCloudDrivesEnabled, Xr as createGraphQLDriveNodeSource, Xt as setIsAddLocalDrivesEnabled, Y as addFileUploadOperationsChunkSizeEventHandler, Yi as addDocument, Yn as useIsAnalyticsExternalProcessorsEnabled, Yr as ambientRenownSigner, Yt as setIsAddDriveEnabled, Z as addIsAddCloudDrivesEnabledEventHandler, Zi as addFolder, Zn as useIsDeleteCloudDrivesEnabled, Zr as findIsServableOverGraphQL, Zt as setIsAddPublicDrivesEnabled, _ as useSelectedTimelineRevision, _a as setFullReactorClient, _i as readCreateProtocolVersions, _n as setLocalDrivesEnabled, _r as useRenownUrl, _t as addIsPublicDrivesEnabledEventHandler, a as createSwitchboardBackend, aa as moveNode$1, ai as SubgraphSdkRegistry, an as setIsDiffAnalyticsEnabled, ar as useIsExternalPackagesEnabled, at as addIsDeleteCloudDrivesEnabledEventHandler, b as useSelectedTimelineItem, ba as useDatabase, bi as isDeadlineError, bn as setRenownChainId, br as useSentryDsn, bt as addLocalDrivesEnabledEventHandler, c as useSwitchboardClient, ca as setPreferredEditorOnNode, ci as StaticPackageManager, cn as setIsEditorDebugModeEnabled, cr as useIsLocalDrivesEnabled, ct as addIsDiffAnalyticsEnabledEventHandler, d as commonGlobalEventHandlerFunctions, da as isDocumentTypeSupported, di as prepareSignedActions, dn as setIsExternalProcessorsEnabled, dr as useIsSentryTracingEnabled, dt as addIsEditorDebugModeEnabledEventHandler, ea as exportFile, ei as createJobChangesSocket, en as setIsAnalyticsExternalProcessorsEnabled, er as useIsDiffAnalyticsEnabled, et as addIsAddPublicDrivesEnabledEventHandler, f as addToastEventHandler, fa as addFullReactorClientEventHandler, fi as signStampedAction, fn as setIsExternalRelationalProcessorsEnabled, fr as useLocalDrivesEnabled, ft as addIsEditorReadModeEnabledEventHandler, g as setSelectedTimelineRevision, ga as getFullReactorClient, gi as ReactorOperationFieldsFragmentDoc, gn as setIsSentryTracingEnabled, gr as useRenownNetworkId, gt as addIsLocalDrivesEnabledEventHandler, h as addSelectedTimelineRevisionEventHandler, ha as addReactorHalvesEventHandler, hi as MutateDocumentWithOperationsDocument, hn as setIsRelationalProcessorsEnabled, hr as useRenownChainId, ht as addIsExternalRelationalProcessorsEnabledEventHandler, i as SwitchboardUnreachableError, ia as loadFile, ii as subscriptionsUrlFromGraphqlUrl, in as setIsDeletePublicDrivesEnabled, ir as useIsEditorReadModeEnabled, it as addIsCloudDrivesEnabledEventHandler, j as addDraggingNodeEventHandler, ja as isRoutedModal, ji as revisionMapFromRevisionsList, jn as setVersionCheckInterval, jr as isExternalControlsEnabledEventFunctions, jt as addStudioModeEventHandler, k as setGraphQLReactorClient, ka as addModalEventHandler, ki as phDocumentFromGetDocument, kn as setSwitchboardUrl, kr as addIsDragAndDropEnabledEventHandler, kt as addSentryEnvEventHandler, l as addPHEventHandlers, la as upgradeDocument, li as packageFromDocumentModels, ln as setIsEditorReadModeEnabled, lr as useIsPublicDrivesEnabled, lt as addIsDocumentModelSelectionSettingsEnabledEventHandler, m as usePHToast, ma as addReactorClientModuleEventHandler, mi as GetDocumentAtConsistencyDocument, mn as setIsPublicDrivesEnabled, mr as useRenownAdapters, mt as addIsExternalProcessorsEnabledEventHandler, n as DEFAULT_BREAKER, na as fetchDocumentOperations, ni as makeAuthConnectionParams, nn as setIsDeleteCloudDrivesEnabled, nr as useIsDriveAnalyticsEnabled, nt as addIsAnalyticsEnabledEventHandler, o as GraphQLReactorProvider, oa as renameDriveNode, oi as describeGraphQLDocument, on as setIsDocumentModelSelectionSettingsEnabled, or as useIsExternalProcessorsEnabled, ot as addIsDeleteLocalDrivesEnabledEventHandler, p as setPHToast, pa as addReactorClientEventHandler, pi as stampAction, pn as setIsLocalDrivesEnabled, pr as useLogLevel, pt as addIsExternalPackagesEnabledEventHandler, q as addDrivesPreserveStrategyEventHandler, qi as queriesUnknownArgument, qn as useIsAnalyticsDatabaseWorkerEnabled, qr as useBackendAuth, qt as setGaTrackingId, r as DEFAULT_REQUEST_TIMEOUT_MS, ra as getDocumentExtension, ri as startDocumentChangesSubscription, rn as setIsDeleteLocalDrivesEnabled, rr as useIsEditorDebugModeEnabled, rt as addIsAnalyticsExternalProcessorsEnabledEventHandler, s as ensurePHEventHandlers, sa as renameNode, si as subgraphUrlFromGraphqlUrl, sn as setIsDriveAnalyticsEnabled, sr as useIsExternalRelationalProcessorsEnabled, st as addIsDeletePublicDrivesEnabledEventHandler, t as useDocumentOperations, ta as extractInitialState, ti as isAuthRefusalClose, tn as setIsCloudDrivesEnabled, tr as useIsDocumentModelSelectionSettingsEnabled, tt as addIsAnalyticsDatabaseWorkerEnabledEventHandler, u as callEventHandlerRegisterFunctions, ua as getUserPermissions, ui as resolveDocumentModelModule, un as setIsExternalPackagesEnabled, ur as useIsRelationalProcessorsEnabled, ut as addIsDriveAnalyticsEnabledEventHandler, v as addSelectedTimelineItemEventHandler, va as setReactorClient, vi as readCreateSignaturePolicy, vn as setLogLevel, vr as useRequiresHardRefresh, vt as addIsRelationalProcessorsEnabledEventHandler, w as syncSelectionFromPath, wa as useReactorClientModule, wi as withStreamedBodies, wn as setRouterBasename, wr as useSwitchboardUrl, wt as addRenownNetworkIdEventHandler, x as addSetSelectedDriveOnPopStateEventHandler, xa as useModelRegistry, xi as isNodeFetch, xn as setRenownNetworkId, xr as useSentryEnv, xt as addLogLevelEventHandler, y as setSelectedTimelineItem, ya as setReactorClientModule, yi as globalFetch, yn as setRenownAdapters, yr as useRouterBasename, yt as addIsSentryTracingEnabledEventHandler, z as setAttachmentService, za as useModalLinkProps, zi as underSignaturePolicy, zn as useDrivesPreserveStrategy, zr as useAllowedDocumentTypes, zt as setAnalyticsDatabaseName } from "./document-operations-CsiIPsx9.js";
|
|
6
6
|
import { a as setGlobal, i as getGlobal, n as getAnalyticsStore, r as clearGlobal, t as createAnalyticsStore } from "./store-DInXcjal.js";
|
|
7
7
|
import { baseDocumentModels, baseDocumentModelsMap } from "./src/document-model.js";
|
|
8
8
|
import { o as PropagationMode, r as GetDocumentWithOperationsDocument, t as createClient } from "./client-BUpynoY6.js";
|
|
9
9
|
import { a as useRenown, c as RENOWN_INITIAL_UNKNOWN, d as useRenownInitialUser, f as addLoadingEventHandler, h as useLoading, i as useLoginStatus, l as RenownInitialUserProvider, m as setLoading, n as setRenown, o as useUser, p as loading, r as useDid, s as RENOWN_INITIAL_ANONYMOUS, t as addRenownEventHandler, u as useRenownInitialAuth } from "./renown-BxkZYzbQ.js";
|
|
10
|
-
import { c as useSelectedDocument, d as useSelectedDocumentSafe, f as EditorDocumentProvider, g as useNodeById, h as useSelectedNode, l as useSelectedDocumentId, m as useDocumentOfType, p as useEditorDocumentContext, t as GQL_CHANNEL_SUFFIX, u as useSelectedDocumentOfType } from "./switchboard-
|
|
10
|
+
import { c as useSelectedDocument, d as useSelectedDocumentSafe, f as EditorDocumentProvider, g as useNodeById, h as useSelectedNode, l as useSelectedDocumentId, m as useDocumentOfType, p as useEditorDocumentContext, t as GQL_CHANNEL_SUFFIX, u as useSelectedDocumentOfType } from "./switchboard-DnvOmOx5.js";
|
|
11
11
|
import { A as RENOWN_CHAIN_ID, C as logout, D as CREDENTIAL_TYPES, E as CREDENTIAL_SUBJECT_TYPE, M as RENOWN_RETURN_URL_STRIPPED_PARAMS, N as RENOWN_URL, O as DOMAIN_TYPE, P as VERIFIABLE_CREDENTIAL_EIP712_TYPE, S as login, T as CREDENTIAL_SCHEMA_EIP712_TYPE, _ as RenownLogo, a as Renown, b as useRenownAuth, c as useRenownSessionSynced, d as RenownAuthButton, f as RenownUserButton, g as DisconnectIcon, h as CopyIcon, i as RenownWalletProvider, j as RENOWN_NETWORK_ID, k as ISSUER_TYPE, l as initConnectCrypto, m as ChevronDownIcon, n as useRenownLoginMethods, o as useRenownInit, p as RenownLoginButton, r as RenownProvider, s as useRenownSessionCookie, t as useRenownWalletAdapter, u as initRenownCrypto, v as SpinnerIcon, w as openRenown, x as useRenownAuthAsync, y as UserIcon } from "./renown-BtjgHBjH.js";
|
|
12
|
-
import { n as useDocumentsByIds, t as useDocumentById } from "./document-by-id-
|
|
12
|
+
import { n as useDocumentsByIds, t as useDocumentById } from "./document-by-id-DdvqanGR.js";
|
|
13
13
|
import { i as setPGliteDB, n as useRelationalQuery, r as useRelationalDb, t as createProcessorQuery } from "./relational-DZuyKp2y.js";
|
|
14
14
|
import { a as getPackagesByDocumentType, c as trimTrailingSlash, i as getPackages, l as SYNC_REMOTES_CHANGED_EVENT, n as getPackageInfo, o as getPackagesForDocumentType, r as getPackagePage, s as searchPackages, t as RegistryClient } from "./client-BFnMV-EO.js";
|
|
15
15
|
import { use, useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
@@ -3788,6 +3788,6 @@ var BrowserLocalStorage = class extends BaseStorage {
|
|
|
3788
3788
|
}
|
|
3789
3789
|
};
|
|
3790
3790
|
//#endregion
|
|
3791
|
-
export { ActionTracker, BaseStorage, BatchJobFailedError, BrowserLocalStorage, COMMON_PACKAGE_ID, CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, CREDENTIAL_TYPES, ChannelScheme, ChevronDownIcon, ConflictError, CopyIcon, DEFAULT_DRIVE_EDITOR_ID, DEFAULT_DRIVE_ID, DEFAULT_SWITCHBOARD_URL, DOMAIN_TYPE, DRIVE_ARRIVAL_MAX_WAIT_MS, DRIVE_DOCUMENT_TYPES, DisconnectIcon, DocumentCache, DocumentChangeType, DocumentIntegrityService, DocumentModelNotFoundError, DocumentTypeMismatchError, DriveCollectionId, DriveProvider, EDITOR_FILE_DROP_OPT_OUT_ATTR, EditorDocumentProvider, FEATURE_FLAG_PARAM_PREFIX, GET_MANY_CHUNK_SIZE, GLOBAL_SEARCH_PARAMS, GetDocumentAtConsistencyDocument, GqlRequestChannel, GraphQLClientDocumentCache, GraphQLDriveNodeSource, GraphQLDriveReadClient, GraphQLOperationNotSupportedError, GraphQLReactorClient, GraphQLReactorProvider, GraphQLWrongBackendError, IDLE_DOCUMENTS_OF_TYPE_ENTRY, IDLE_OPERATIONS_ENTRY, IDLE_REFETCH_STATE, ISSUER_TYPE, InMemoryQueue, IntervalPollTimer, JobFailedError, MODAL_SEARCH_PARAM, MutateDocumentWithOperationsDocument, NoSelectedDocumentError, OPENED_FROM_STATE_KEY, OperationRejectedError, PHStoreProvider, PH_LOCATION_CHANGE_EVENT, PREFETCH_WAIT_MS, PollBehavior, PropagationMode, REACTOR_SCHEMA, RENOWN_CHAIN_ID, RENOWN_INITIAL_ANONYMOUS, RENOWN_INITIAL_UNKNOWN, RENOWN_NETWORK_ID, RENOWN_RETURN_URL_STRIPPED_PARAMS, RENOWN_URL, REVISION_HISTORY_PAGE_PARAM, REVISION_HISTORY_PARAM, ReactorBuilder, ReactorClientBuilder, ReactorOperationFieldsFragmentDoc, RegistryClient, RelationalDbProcessor, RemoteClient, RemoteDocumentController, Renown, RenownAuthButton, RenownInitialUserProvider, RenownLoginButton, RenownLogo, RenownProvider, RenownUserButton, RenownWalletProvider, SETTINGS_PATH, SpinnerIcon, StaticPackageManager, SubgraphSdkRegistry, SyncOperationStatus, UnsupportedDocumentTypeError, UserIcon, VERIFIABLE_CREDENTIAL_EIP712_TYPE, addAllowListEventHandler, addAllowedDocumentTypesEventHandler, addAnalyticsDatabaseNameEventHandler, addAttachmentServiceEventHandler, addBackendAuthEventHandler, addBasePathEventHandler, addCliVersionEventHandler, addDefaultDrivesUrlEventHandler, addDisabledEditorsEventHandler, addDocument, addDocumentCacheEventHandler, addDraggingNodeEventHandler, addDrive, addDriveNodesEventHandler, addDrivesEventHandler, addDrivesPreserveStrategyEventHandler, addEnabledEditorsEventHandler, addFeaturesEventHandler, addFileUploadOperationsChunkSizeEventHandler, addFileWithProgress, addFolder, addFullReactorClientEventHandler, addGaTrackingIdEventHandler, addGraphQLReactorClientEventHandler, addIsAddCloudDrivesEnabledEventHandler, addIsAddDriveEnabledEventHandler, addIsAddLocalDrivesEnabledEventHandler, addIsAddPublicDrivesEnabledEventHandler, addIsAnalyticsDatabaseWorkerEnabledEventHandler, addIsAnalyticsEnabledEventHandler, addIsAnalyticsExternalProcessorsEnabledEventHandler, addIsCloudDrivesEnabledEventHandler, addIsDeleteCloudDrivesEnabledEventHandler, addIsDeleteLocalDrivesEnabledEventHandler, addIsDeletePublicDrivesEnabledEventHandler, addIsDiffAnalyticsEnabledEventHandler, addIsDocumentModelSelectionSettingsEnabledEventHandler, addIsDragAndDropEnabledEventHandler, addIsDriveAnalyticsEnabledEventHandler, addIsEditorDebugModeEnabledEventHandler, addIsEditorReadModeEnabledEventHandler, addIsExternalControlsEnabledEventHandler, addIsExternalPackagesEnabledEventHandler, addIsExternalProcessorsEnabledEventHandler, addIsExternalRelationalProcessorsEnabledEventHandler, addIsLocalDrivesEnabledEventHandler, addIsPublicDrivesEnabledEventHandler, addIsRelationalProcessorsEnabledEventHandler, addIsSentryTracingEnabledEventHandler, addLoadingEventHandler, addLocalDrivesEnabledEventHandler, addLogLevelEventHandler, addModalEventHandler, addPHEventHandlers, addPackageDiscoveryServiceEventHandler, addPromiseState, addReactorClientEventHandler, addReactorClientModuleEventHandler, addReactorHalvesEventHandler, addRemoteDrive, addRenownAdaptersEventHandler, addRenownChainIdEventHandler, addRenownEventHandler, addRenownNetworkIdEventHandler, addRenownUrlEventHandler, addRequiresHardRefreshEventHandler, addResetSelectedNodeEventHandler, addRevisionHistoryVisibleEventHandler, addRouterBasenameEventHandler, addSelectedDriveIdEventHandler, addSelectedNodeIdEventHandler, addSelectedTimelineItemEventHandler, addSelectedTimelineRevisionEventHandler, addSentryDsnEventHandler, addSentryEnvEventHandler, addSentryReleaseEventHandler, addSetSelectedDriveOnPopStateEventHandler, addSetSelectedNodeOnPopStateEventHandler, addStudioModeEventHandler, addSwitchboardUrlEventHandler, addSyncSelectionOnPopStateEventHandler, addToastEventHandler, addVersionCheckIntervalEventHandler, addVersionEventHandler, addVetraPackageManagerEventHandler, addWarnOutdatedAppEventHandler, ambientRenownTokenProvider, applySearchUpdate, backendAuthStatusOf, baseDocumentModels, baseDocumentModelsMap, bindPHStoreToWindow, browserNavigation, buildDocumentSubgraphQuery, buildDocumentSubgraphUrl, buildFolderZip, callEventHandlerRegisterFunctions, callGlobalSetterForKey, clearGlobal, closePHModal, commonGlobalEventHandlerFunctions, convertRemoteOperations, createAnalyticsStore, createClient, createDispatch, createDriveArrivals, createDriveChangeHandler, createGraphQLDriveNodeSource, createJobChangesSocket, createPHStore, createProcessorQuery, createUrlWithPreservedParams, deleteDrive, deleteNode, deriveSystemUrl, describeGraphQLDocument, diffStateShapes, dispatchActions, downloadDocument, downloadFolderZip, driveIdFromUrl, dropAllReactorStorage, dropDriveNode, ensurePHEventHandlers, ensurePHStore, expandBulkArchive, exportFile, extractDriveIdFromPath, extractDriveIdFromSlug, extractDriveSlugFromPath, extractNodeIdFromPath, extractNodeIdFromSlug, extractNodeSlugFromPath, fetchDrive, fetchDriveInfo, findDerivedId, findDriveBySlug, findDriveBySlugOrId, findIsServableOverGraphQL, findUuid, getActivePHStore, getAnalyticsStore, getCurrentPathname, getDocumentExtension, getDocumentGraphqlQuery, getDocumentStateSelection, getDocumentUpgradePreview, getDocumentVersionStatus, getDrive, getDriveIdBySlug, getDriveName, getDriveNode, getDrives, getFullReactorClient, getGlobal, getNodeTarget, getPHNavigation, getPHStore, getPHStoreSubscribe, getPackageInfo, getPackagePage, getPackages, getPackagesByDocumentType, getPackagesForDocumentType, getPathWithoutBase, getRevisionFromDate, getSlugFromDriveUrl, getSwitchboardBaseFromChannelUrl, getSwitchboardGatewayUrlFromDriveUrl, getSyncStatus, getSyncStatusSync, getTargetHref, getUserPermissions, graphqlDocumentEvents, graphqlDocumentsEvents, graphqlEventsToSyncDrive, hasHostNavigation, hasPreloadBandwidth, hideRevisionHistory, identifierFromMutateDocumentOperationVariables, initConnectCrypto, initRenownCrypto, initTheme, invalidateDriveNodes, isAuthRefusalClose, isBackendAuthError, isDocumentTypeCache, isDocumentTypeSupported, isDriveAuthError, isExternalControlsEnabledEventFunctions, isFileNodeKind, isFolderNodeKind, isGlobalSearchParam, isGraphQLReactorClient, isOperationCache, isPlainClick, isRoutedModal, isSettingsTarget, isoStringFromDateTime, listAllDriveNodes, listDriveIds, loadDocumentsOfType, loadDriveNodes, loadFile, loading, login, logout, makeAuthConnectionParams, makeAuthMiddleware, makeDriveSlug, makeDriveUrlComponent, makeNodeSlug, makePHEventFunctions, markLocalDriveWrite, modalFromSearch, modalHref, modalSearch, notifyPHStore, onVetraPackageManager, openRenown, openTarget, openTargetWith, openedFromIndex, packageFromDocumentModels, parseDriveUrl, parseRevisionHistoryPage, peekDriveNode, phAppConfigHooks, phAppConfigSetters, phDocumentEditorConfigHooks, phDocumentEditorConfigSetters, phDocumentFromGetDocument, phDocumentFromMutation, phDocumentFromQuery, phDocumentsFromQuery, phGlobalConfigHooks, phGlobalConfigSetters, prefetchDocument, preloadDrive, preloadDriveApp, preloadEditorModule, preloadNode, preloadTarget, prepareSignedActions, queriesUnknownArgument, queriesUnknownField, reactorGraphqlBatchFetchDocuments, reactorGraphqlCreateDocument, reactorGraphqlDeleteDocument, reactorGraphqlDeleteDocuments, reactorGraphqlFetchDocument, reactorGraphqlMutateDocument, readPromiseState, recordBackendAuthError, recordToSearch, refreshDrive, refreshDriveMembership, refreshReactorData, refreshReactorDataClient, renameDrive, renameDriveNode, resolveDocumentModelModule, resolveDriveRoute, resolveSearchUpdate, resolveUrlPathname, revisionMapFromRevisionsList, searchPackages, searchParamsToString, searchToRecord, setAllowList, setAllowedDocumentTypes, setAnalyticsDatabaseName, setAttachmentService, setBackendAuth, setBasePath, setBrowserOpenSync, setCliVersion, setDefaultDrivesUrl, setDefaultPHGlobalConfig, setDisabledEditors, setDocumentCache, setDriveAvailableOffline, setDriveMetadata, setDriveSharingType, setDrives, setDrivesPreserveStrategy, setEnabledEditors, setFeatures, setFileUploadOperationsChunkSize, setFullReactorClient, setGaTrackingId, setGlobal, setGraphQLReactorClient, setIsAddCloudDrivesEnabled, setIsAddDriveEnabled, setIsAddLocalDrivesEnabled, setIsAddPublicDrivesEnabled, setIsAnalyticsDatabaseWorkerEnabled, setIsAnalyticsEnabled, setIsAnalyticsExternalProcessorsEnabled, setIsCloudDrivesEnabled, setIsDeleteCloudDrivesEnabled, setIsDeleteLocalDrivesEnabled, setIsDeletePublicDrivesEnabled, setIsDiffAnalyticsEnabled, setIsDocumentModelSelectionSettingsEnabled, setIsDragAndDropEnabled, setIsDriveAnalyticsEnabled, setIsEditorDebugModeEnabled, setIsEditorReadModeEnabled, setIsExternalControlsEnabled, setIsExternalPackagesEnabled, setIsExternalProcessorsEnabled, setIsExternalRelationalProcessorsEnabled, setIsLocalDrivesEnabled, setIsPublicDrivesEnabled, setIsRelationalProcessorsEnabled, setIsSentryTracingEnabled, setLoading, setLocalDrivesEnabled, setLogLevel, setPGliteDB, setPHAppConfig, setPHAppConfigByKey, setPHDocumentEditorConfig, setPHDocumentEditorConfigByKey, setPHGlobalConfig, setPHGlobalConfigByKey, setPHModal, setPHToast, setPackageDiscoveryService, setPreferredEditorOnNode, setReactorClient, setReactorClientModule, setRenown, setRenownAdapters, setRenownChainId, setRenownNetworkId, setRenownUrl, setRequiresHardRefresh, setRevisionHistoryPage, setRevisionHistoryVisible, setRouterBasename, setSearchParams, setSelectedDrive, setSelectedDriveId, setSelectedNode, setSelectedNodeId, setSelectedTimelineItem, setSelectedTimelineRevision, setSentryDsn, setSentryEnv, setSentryRelease, setStudioMode, setSwitchboardUrl, setVersion, setVersionCheckInterval, setVetraPackageManager, setWarnOutdatedApp, showCreateDocumentModal, showDeleteNodeModal, showPHModal, showRevisionHistory, signStampedAction, sortNodesByName, stampAction, startDocumentChangesSubscription, subgraphUrlFromGraphqlUrl, subscribePHStore, subscribeToPHValue, subscriptionsUrlFromGraphqlUrl, syncSelectionFromPath, takeLocalDriveWrite, targetPathname, toLegacyNode, trackDriveArrival, trimTrailingSlash, truncateAllTables, untilDriveListed, upgradeDocument, useAllowList, useAllowedDocumentModelModules, useAllowedDocumentTypes, useAnalyticsDatabaseName, useAppModuleById, useAppModules, useAttachmentPreview, useAttachmentService, useAttachmentUpload, useAttachments, useBackendAuth, useBasePath, useCanExecute, useCliVersion, useCloseNode, useConnectionState, useConnectionStates, useDatabase, useDefaultAppModule, useDefaultDrivesUrl, useDid, useDisabledEditors, useDispatch, useDocument, useDocumentById, useDocumentCache, useDocumentLinkProps, useDocumentModelModuleById, useDocumentModelModules, useDocumentOfType, useDocumentOperations, useDocumentSafe, useDocumentTarget, useDocumentTypes, useDocumentTypesInSelectedDrive, useDocumentVersionStatus, useDocuments, useDocumentsByIds, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useDocumentsOfType, useDownloadDocument, useDownloadFolder, useDragNode, useDriveById, useDriveContext, useDriveNode, useDriveNodes, useDriveNodesCache, useDriveSystemInfo, useDrives, useDrivesPreserveStrategy, useDropFile, useDropNode, useEditorDocumentContext, useEditorFileDrop, useEditorModuleById, useEditorModuleFor, useEditorModules, useEditorModulesForDocumentType, useEditorPreloader, useEnabledEditors, useFallbackEditorModule, useFeatures, useFileNodesInSelectedDrive, useFileNodesInSelectedFolder, useFileUploadOperationsChunkSize, useFolderById, useFolderNodesInSelectedDrive, useFolderNodesInSelectedFolder, useGaTrackingId, useGetDocument, useGetDocumentAsync, useGetDocuments, useGetSwitchboardLink, useGraphQLReactorClient, useInitReactorGraphqlClient, useIsAddCloudDrivesEnabled, useIsAddDriveEnabled, useIsAddLocalDrivesEnabled, useIsAddPublicDrivesEnabled, useIsAnalyticsDatabaseWorkerEnabled, useIsAnalyticsEnabled, useIsAnalyticsExternalProcessorsEnabled, useIsCloudDrivesEnabled, useIsDeleteCloudDrivesEnabled, useIsDeleteLocalDrivesEnabled, useIsDeletePublicDrivesEnabled, useIsDiffAnalyticsEnabled, useIsDocumentModelSelectionSettingsEnabled, useIsDragAndDropEnabled, useIsDriveAnalyticsEnabled, useIsEditorDebugModeEnabled, useIsEditorReadModeEnabled, useIsExternalControlsEnabled, useIsExternalPackagesEnabled, useIsExternalProcessorsEnabled, useIsExternalRelationalProcessorsEnabled, useIsLocalDrivesEnabled, useIsPublicDrivesEnabled, useIsRelationalProcessorsEnabled, useIsSentryTracingEnabled, useLinkProps, useLoading, useLocalDrivesEnabled, useLogLevel, useLoginStatus, useModalLinkProps, useModelRegistry, useNodeActions, useNodeById, useNodeParentFolderById, useNodePathById, useNodeTarget, useNodesInSelectedDrive, useNodesInSelectedDriveOrFolder, useNodesInSelectedFolder, useOnDropFile, useOpenNode, usePGlite, usePHAppConfigByKey, usePHDocumentEditorConfigByKey, usePHGlobalConfigByKey, usePHModal, usePHNavigation, usePHStore, usePHToast, usePackageDiscoveryService, useParentFolderForSelectedNode, usePreloadDrive, usePreloadNode, useReactorClient, useReactorClientModule, useReactorHalves, useRelationalDb, useRelationalQuery, useRenown, useRenownAdapters, useRenownAuth, useRenownAuthAsync, useRenownChainId, useRenownInit, useRenownInitialAuth, useRenownInitialUser, useRenownLoginMethods, useRenownNetworkId, useRenownSessionCookie, useRenownSessionSynced, useRenownUrl, useRenownWalletAdapter, useRequiresHardRefresh, useResetPHGlobalConfig, useRevisionHistoryPage, useRevisionHistoryVisible, useRouterBasename, useSearchParams, useSelectedDocument, useSelectedDocumentId, useSelectedDocumentOfType, useSelectedDocumentSafe, useSelectedDrive, useSelectedDriveId, useSelectedDriveSafe, useSelectedFolder, useSelectedNode, useSelectedNodePath, useSelectedTimelineItem, useSelectedTimelineRevision, useSentryDsn, useSentryEnv, useSentryRelease, useSetDefaultPHGlobalConfig, useSetPHAppConfig, useSetPHDocumentEditorConfig, useSetPHGlobalConfig, useSetSearchParams, useSetSelectedDrive, useSetSelectedNode, useStudioMode, useSubgraphModules, useSupportedDocumentTypesInReactor, useSwitchboardClient, useSwitchboardUrl, useSync, useSyncList, useTheme, useUser, useUserPermissions, useVersion, useVersionCheckInterval, useVetraPackageManager, useVetraPackages, useWarnOutdatedApp, validateDocument, viewFilterInputFromViewFilter, waitForArrival, waitForDocumentReady, withoutModalSearch };
|
|
3791
|
+
export { ActionTracker, BaseStorage, BatchJobFailedError, BrowserLocalStorage, COMMON_PACKAGE_ID, CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, CREDENTIAL_TYPES, ChannelScheme, ChevronDownIcon, ConflictError, CopyIcon, DEFAULT_BREAKER, DEFAULT_DRIVE_EDITOR_ID, DEFAULT_DRIVE_ID, DEFAULT_REQUEST_TIMEOUT_MS, DEFAULT_SWITCHBOARD_URL, DOMAIN_TYPE, DRIVE_ARRIVAL_MAX_WAIT_MS, DRIVE_DOCUMENT_TYPES, DisconnectIcon, DocumentCache, DocumentChangeType, DocumentIntegrityService, DocumentModelNotFoundError, DocumentTypeMismatchError, DriveCollectionId, DriveProvider, EDITOR_FILE_DROP_OPT_OUT_ATTR, EditorDocumentProvider, FEATURE_FLAG_PARAM_PREFIX, GET_MANY_CHUNK_SIZE, GLOBAL_SEARCH_PARAMS, GetDocumentAtConsistencyDocument, GqlRequestChannel, GraphQLClientDocumentCache, GraphQLDriveNodeSource, GraphQLDriveReadClient, GraphQLOperationNotSupportedError, GraphQLReactorClient, GraphQLReactorProvider, GraphQLWrongBackendError, IDLE_DOCUMENTS_OF_TYPE_ENTRY, IDLE_OPERATIONS_ENTRY, IDLE_REFETCH_STATE, ISSUER_TYPE, InMemoryQueue, IntervalPollTimer, JobFailedError, MODAL_SEARCH_PARAM, MutateDocumentWithOperationsDocument, NoSelectedDocumentError, OPENED_FROM_STATE_KEY, OperationRejectedError, PHStoreProvider, PH_LOCATION_CHANGE_EVENT, PREFETCH_WAIT_MS, PollBehavior, PropagationMode, REACTOR_SCHEMA, RENOWN_CHAIN_ID, RENOWN_INITIAL_ANONYMOUS, RENOWN_INITIAL_UNKNOWN, RENOWN_NETWORK_ID, RENOWN_RETURN_URL_STRIPPED_PARAMS, RENOWN_URL, REVISION_HISTORY_PAGE_PARAM, REVISION_HISTORY_PARAM, ReactorBuilder, ReactorClientBuilder, ReactorOperationFieldsFragmentDoc, RegistryClient, RelationalDbProcessor, RemoteClient, RemoteDocumentController, Renown, RenownAuthButton, RenownInitialUserProvider, RenownLoginButton, RenownLogo, RenownProvider, RenownUserButton, RenownWalletProvider, SETTINGS_PATH, SpinnerIcon, StaticPackageManager, SubgraphSdkRegistry, SwitchboardUnreachableError, SyncOperationStatus, UnsupportedDocumentTypeError, UserIcon, VERIFIABLE_CREDENTIAL_EIP712_TYPE, addAllowListEventHandler, addAllowedDocumentTypesEventHandler, addAnalyticsDatabaseNameEventHandler, addAttachmentServiceEventHandler, addBackendAuthEventHandler, addBasePathEventHandler, addCliVersionEventHandler, addDefaultDrivesUrlEventHandler, addDisabledEditorsEventHandler, addDocument, addDocumentCacheEventHandler, addDraggingNodeEventHandler, addDrive, addDriveNodesEventHandler, addDrivesEventHandler, addDrivesPreserveStrategyEventHandler, addEnabledEditorsEventHandler, addFeaturesEventHandler, addFileUploadOperationsChunkSizeEventHandler, addFileWithProgress, addFolder, addFullReactorClientEventHandler, addGaTrackingIdEventHandler, addGraphQLReactorClientEventHandler, addIsAddCloudDrivesEnabledEventHandler, addIsAddDriveEnabledEventHandler, addIsAddLocalDrivesEnabledEventHandler, addIsAddPublicDrivesEnabledEventHandler, addIsAnalyticsDatabaseWorkerEnabledEventHandler, addIsAnalyticsEnabledEventHandler, addIsAnalyticsExternalProcessorsEnabledEventHandler, addIsCloudDrivesEnabledEventHandler, addIsDeleteCloudDrivesEnabledEventHandler, addIsDeleteLocalDrivesEnabledEventHandler, addIsDeletePublicDrivesEnabledEventHandler, addIsDiffAnalyticsEnabledEventHandler, addIsDocumentModelSelectionSettingsEnabledEventHandler, addIsDragAndDropEnabledEventHandler, addIsDriveAnalyticsEnabledEventHandler, addIsEditorDebugModeEnabledEventHandler, addIsEditorReadModeEnabledEventHandler, addIsExternalControlsEnabledEventHandler, addIsExternalPackagesEnabledEventHandler, addIsExternalProcessorsEnabledEventHandler, addIsExternalRelationalProcessorsEnabledEventHandler, addIsLocalDrivesEnabledEventHandler, addIsPublicDrivesEnabledEventHandler, addIsRelationalProcessorsEnabledEventHandler, addIsSentryTracingEnabledEventHandler, addLoadingEventHandler, addLocalDrivesEnabledEventHandler, addLogLevelEventHandler, addModalEventHandler, addPHEventHandlers, addPackageDiscoveryServiceEventHandler, addPromiseState, addReactorClientEventHandler, addReactorClientModuleEventHandler, addReactorHalvesEventHandler, addRemoteDrive, addRenownAdaptersEventHandler, addRenownChainIdEventHandler, addRenownEventHandler, addRenownNetworkIdEventHandler, addRenownUrlEventHandler, addRequiresHardRefreshEventHandler, addResetSelectedNodeEventHandler, addRevisionHistoryVisibleEventHandler, addRouterBasenameEventHandler, addSelectedDriveIdEventHandler, addSelectedNodeIdEventHandler, addSelectedTimelineItemEventHandler, addSelectedTimelineRevisionEventHandler, addSentryDsnEventHandler, addSentryEnvEventHandler, addSentryReleaseEventHandler, addSetSelectedDriveOnPopStateEventHandler, addSetSelectedNodeOnPopStateEventHandler, addStudioModeEventHandler, addSwitchboardUrlEventHandler, addSyncSelectionOnPopStateEventHandler, addToastEventHandler, addVersionCheckIntervalEventHandler, addVersionEventHandler, addVetraPackageManagerEventHandler, addWarnOutdatedAppEventHandler, ambientRenownSigner, ambientRenownTokenProvider, applySearchUpdate, backendAuthStatusOf, baseDocumentModels, baseDocumentModelsMap, bindPHStoreToWindow, browserNavigation, buildDocumentSubgraphQuery, buildDocumentSubgraphUrl, buildFolderZip, callEventHandlerRegisterFunctions, callGlobalSetterForKey, clearGlobal, closePHModal, commonGlobalEventHandlerFunctions, convertRemoteOperations, createAnalyticsStore, createClient, createDispatch, createDriveArrivals, createDriveChangeHandler, createGraphQLDriveNodeSource, createJobChangesSocket, createPHStore, createProcessorQuery, createSwitchboardBackend, createUrlWithPreservedParams, deleteDrive, deleteNode, deriveSystemUrl, describeGraphQLDocument, diffStateShapes, dispatchActions, downloadDocument, downloadFolderZip, driveIdFromUrl, dropAllReactorStorage, dropDriveNode, ensurePHEventHandlers, ensurePHStore, expandBulkArchive, exportFile, extractDriveIdFromPath, extractDriveIdFromSlug, extractDriveSlugFromPath, extractNodeIdFromPath, extractNodeIdFromSlug, extractNodeSlugFromPath, fetchDrive, fetchDriveInfo, findDerivedId, findDriveBySlug, findDriveBySlugOrId, findIsServableOverGraphQL, findUuid, getActivePHStore, getAnalyticsStore, getCurrentPathname, getDocumentExtension, getDocumentGraphqlQuery, getDocumentStateSelection, getDocumentUpgradePreview, getDocumentVersionStatus, getDrive, getDriveIdBySlug, getDriveName, getDriveNode, getDrives, getFullReactorClient, getGlobal, getNodeTarget, getPHNavigation, getPHStore, getPHStoreSubscribe, getPackageInfo, getPackagePage, getPackages, getPackagesByDocumentType, getPackagesForDocumentType, getPathWithoutBase, getRevisionFromDate, getSlugFromDriveUrl, getSwitchboardBaseFromChannelUrl, getSwitchboardGatewayUrlFromDriveUrl, getSyncStatus, getSyncStatusSync, getTargetHref, getUserPermissions, globalFetch, graphqlDocumentEvents, graphqlDocumentsEvents, graphqlEventsToSyncDrive, hasHostNavigation, hasPreloadBandwidth, hideRevisionHistory, identifierFromMutateDocumentOperationVariables, initConnectCrypto, initRenownCrypto, initTheme, invalidateDriveNodes, isAuthRefusalClose, isBackendAuthError, isDeadlineError, isDocumentTypeCache, isDocumentTypeSupported, isDriveAuthError, isExternalControlsEnabledEventFunctions, isFileNodeKind, isFolderNodeKind, isGlobalSearchParam, isGraphQLReactorClient, isNodeFetch, isOperationCache, isPlainClick, isRoutedModal, isSettingsTarget, isoStringFromDateTime, listAllDriveNodes, listDriveIds, loadDocumentsOfType, loadDriveNodes, loadFile, loading, login, logout, makeAuthConnectionParams, makeAuthMiddleware, makeDriveSlug, makeDriveUrlComponent, makeNodeSlug, makePHEventFunctions, markLocalDriveWrite, modalFromSearch, modalHref, modalSearch, notifyPHStore, onVetraPackageManager, openRenown, openTarget, openTargetWith, openedFromIndex, packageFromDocumentModels, parseDriveUrl, parseRevisionHistoryPage, peekDriveNode, phAppConfigHooks, phAppConfigSetters, phDocumentEditorConfigHooks, phDocumentEditorConfigSetters, phDocumentFromGetDocument, phDocumentFromMutation, phDocumentFromQuery, phDocumentsFromQuery, phGlobalConfigHooks, phGlobalConfigSetters, prefetchDocument, preloadDrive, preloadDriveApp, preloadEditorModule, preloadNode, preloadTarget, prepareSignedActions, queriesUnknownArgument, queriesUnknownField, reactorGraphqlBatchFetchDocuments, reactorGraphqlCreateDocument, reactorGraphqlDeleteDocument, reactorGraphqlDeleteDocuments, reactorGraphqlFetchDocument, reactorGraphqlMutateDocument, readPromiseState, recordBackendAuthError, recordToSearch, refreshDrive, refreshDriveMembership, refreshReactorData, refreshReactorDataClient, renameDrive, renameDriveNode, resolveDocumentModelModule, resolveDriveRoute, resolveSearchUpdate, resolveUrlPathname, revisionMapFromRevisionsList, searchPackages, searchParamsToString, searchToRecord, setAllowList, setAllowedDocumentTypes, setAnalyticsDatabaseName, setAttachmentService, setBackendAuth, setBasePath, setBrowserOpenSync, setCliVersion, setDefaultDrivesUrl, setDefaultPHGlobalConfig, setDisabledEditors, setDocumentCache, setDriveAvailableOffline, setDriveMetadata, setDriveSharingType, setDrives, setDrivesPreserveStrategy, setEnabledEditors, setFeatures, setFileUploadOperationsChunkSize, setFullReactorClient, setGaTrackingId, setGlobal, setGraphQLReactorClient, setIsAddCloudDrivesEnabled, setIsAddDriveEnabled, setIsAddLocalDrivesEnabled, setIsAddPublicDrivesEnabled, setIsAnalyticsDatabaseWorkerEnabled, setIsAnalyticsEnabled, setIsAnalyticsExternalProcessorsEnabled, setIsCloudDrivesEnabled, setIsDeleteCloudDrivesEnabled, setIsDeleteLocalDrivesEnabled, setIsDeletePublicDrivesEnabled, setIsDiffAnalyticsEnabled, setIsDocumentModelSelectionSettingsEnabled, setIsDragAndDropEnabled, setIsDriveAnalyticsEnabled, setIsEditorDebugModeEnabled, setIsEditorReadModeEnabled, setIsExternalControlsEnabled, setIsExternalPackagesEnabled, setIsExternalProcessorsEnabled, setIsExternalRelationalProcessorsEnabled, setIsLocalDrivesEnabled, setIsPublicDrivesEnabled, setIsRelationalProcessorsEnabled, setIsSentryTracingEnabled, setLoading, setLocalDrivesEnabled, setLogLevel, setPGliteDB, setPHAppConfig, setPHAppConfigByKey, setPHDocumentEditorConfig, setPHDocumentEditorConfigByKey, setPHGlobalConfig, setPHGlobalConfigByKey, setPHModal, setPHToast, setPackageDiscoveryService, setPreferredEditorOnNode, setReactorClient, setReactorClientModule, setRenown, setRenownAdapters, setRenownChainId, setRenownNetworkId, setRenownUrl, setRequiresHardRefresh, setRevisionHistoryPage, setRevisionHistoryVisible, setRouterBasename, setSearchParams, setSelectedDrive, setSelectedDriveId, setSelectedNode, setSelectedNodeId, setSelectedTimelineItem, setSelectedTimelineRevision, setSentryDsn, setSentryEnv, setSentryRelease, setStudioMode, setSwitchboardUrl, setVersion, setVersionCheckInterval, setVetraPackageManager, setWarnOutdatedApp, showCreateDocumentModal, showDeleteNodeModal, showPHModal, showRevisionHistory, signStampedAction, sortNodesByName, stampAction, startDocumentChangesSubscription, subgraphUrlFromGraphqlUrl, subscribePHStore, subscribeToPHValue, subscriptionsUrlFromGraphqlUrl, switchboardFetch, syncSelectionFromPath, takeLocalDriveWrite, targetPathname, toLegacyNode, trackDriveArrival, trimTrailingSlash, truncateAllTables, untilDriveListed, upgradeDocument, useAllowList, useAllowedDocumentModelModules, useAllowedDocumentTypes, useAnalyticsDatabaseName, useAppModuleById, useAppModules, useAttachmentPreview, useAttachmentService, useAttachmentUpload, useAttachments, useBackendAuth, useBasePath, useCanExecute, useCliVersion, useCloseNode, useConnectionState, useConnectionStates, useDatabase, useDefaultAppModule, useDefaultDrivesUrl, useDid, useDisabledEditors, useDispatch, useDocument, useDocumentById, useDocumentCache, useDocumentLinkProps, useDocumentModelModuleById, useDocumentModelModules, useDocumentOfType, useDocumentOperations, useDocumentSafe, useDocumentTarget, useDocumentTypes, useDocumentTypesInSelectedDrive, useDocumentVersionStatus, useDocuments, useDocumentsByIds, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useDocumentsOfType, useDownloadDocument, useDownloadFolder, useDragNode, useDriveById, useDriveContext, useDriveNode, useDriveNodes, useDriveNodesCache, useDriveSystemInfo, useDrives, useDrivesPreserveStrategy, useDropFile, useDropNode, useEditorDocumentContext, useEditorFileDrop, useEditorModuleById, useEditorModuleFor, useEditorModules, useEditorModulesForDocumentType, useEditorPreloader, useEnabledEditors, useFallbackEditorModule, useFeatures, useFileNodesInSelectedDrive, useFileNodesInSelectedFolder, useFileUploadOperationsChunkSize, useFolderById, useFolderNodesInSelectedDrive, useFolderNodesInSelectedFolder, useGaTrackingId, useGetDocument, useGetDocumentAsync, useGetDocuments, useGetSwitchboardLink, useGraphQLReactorClient, useInitReactorGraphqlClient, useIsAddCloudDrivesEnabled, useIsAddDriveEnabled, useIsAddLocalDrivesEnabled, useIsAddPublicDrivesEnabled, useIsAnalyticsDatabaseWorkerEnabled, useIsAnalyticsEnabled, useIsAnalyticsExternalProcessorsEnabled, useIsCloudDrivesEnabled, useIsDeleteCloudDrivesEnabled, useIsDeleteLocalDrivesEnabled, useIsDeletePublicDrivesEnabled, useIsDiffAnalyticsEnabled, useIsDocumentModelSelectionSettingsEnabled, useIsDragAndDropEnabled, useIsDriveAnalyticsEnabled, useIsEditorDebugModeEnabled, useIsEditorReadModeEnabled, useIsExternalControlsEnabled, useIsExternalPackagesEnabled, useIsExternalProcessorsEnabled, useIsExternalRelationalProcessorsEnabled, useIsLocalDrivesEnabled, useIsPublicDrivesEnabled, useIsRelationalProcessorsEnabled, useIsSentryTracingEnabled, useLinkProps, useLoading, useLocalDrivesEnabled, useLogLevel, useLoginStatus, useModalLinkProps, useModelRegistry, useNodeActions, useNodeById, useNodeParentFolderById, useNodePathById, useNodeTarget, useNodesInSelectedDrive, useNodesInSelectedDriveOrFolder, useNodesInSelectedFolder, useOnDropFile, useOpenNode, usePGlite, usePHAppConfigByKey, usePHDocumentEditorConfigByKey, usePHGlobalConfigByKey, usePHModal, usePHNavigation, usePHStore, usePHToast, usePackageDiscoveryService, useParentFolderForSelectedNode, usePreloadDrive, usePreloadNode, useReactorClient, useReactorClientModule, useReactorHalves, useRelationalDb, useRelationalQuery, useRenown, useRenownAdapters, useRenownAuth, useRenownAuthAsync, useRenownChainId, useRenownInit, useRenownInitialAuth, useRenownInitialUser, useRenownLoginMethods, useRenownNetworkId, useRenownSessionCookie, useRenownSessionSynced, useRenownUrl, useRenownWalletAdapter, useRequiresHardRefresh, useResetPHGlobalConfig, useRevisionHistoryPage, useRevisionHistoryVisible, useRouterBasename, useSearchParams, useSelectedDocument, useSelectedDocumentId, useSelectedDocumentOfType, useSelectedDocumentSafe, useSelectedDrive, useSelectedDriveId, useSelectedDriveSafe, useSelectedFolder, useSelectedNode, useSelectedNodePath, useSelectedTimelineItem, useSelectedTimelineRevision, useSentryDsn, useSentryEnv, useSentryRelease, useSetDefaultPHGlobalConfig, useSetPHAppConfig, useSetPHDocumentEditorConfig, useSetPHGlobalConfig, useSetSearchParams, useSetSelectedDrive, useSetSelectedNode, useStudioMode, useSubgraphModules, useSupportedDocumentTypesInReactor, useSwitchboardClient, useSwitchboardUrl, useSync, useSyncList, useTheme, useUser, useUserPermissions, useVersion, useVersionCheckInterval, useVetraPackageManager, useVetraPackages, useWarnOutdatedApp, validateDocument, viewFilterInputFromViewFilter, waitForArrival, waitForDocumentReady, withRequestDeadline, withStreamedBodies, withoutModalSearch };
|
|
3792
3792
|
|
|
3793
3793
|
//# sourceMappingURL=index.js.map
|
package/dist/src/ai/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as useSelectedDriveSafe } from "../../document-model-modules-
|
|
2
|
-
import { a as getBrowserSyncManager, h as useSelectedNode, i as createSwitchboardSchemaTool, l as useSelectedDocumentId, n as SWITCHBOARD_INTROSPECTION_QUERY, o as resolveDriveSwitchboard, r as SWITCHBOARD_SCHEMA_TOOL_NAME, s as summarizeIntrospectionSchema, t as GQL_CHANNEL_SUFFIX } from "../../switchboard-
|
|
1
|
+
import { g as useSelectedDriveSafe } from "../../document-model-modules-D-VXC3ET.js";
|
|
2
|
+
import { a as getBrowserSyncManager, h as useSelectedNode, i as createSwitchboardSchemaTool, l as useSelectedDocumentId, n as SWITCHBOARD_INTROSPECTION_QUERY, o as resolveDriveSwitchboard, r as SWITCHBOARD_SCHEMA_TOOL_NAME, s as summarizeIntrospectionSchema, t as GQL_CHANNEL_SUFFIX } from "../../switchboard-DnvOmOx5.js";
|
|
3
3
|
import { useCallback, useEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { isFileNode, isFolderNode } from "@powerhousedao/shared/document-drive";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as getGlobal, n as getAnalyticsStore, t as createAnalyticsStore } from "../../store-DInXcjal.js";
|
|
2
|
-
import { t as useDocumentById } from "../../document-by-id-
|
|
2
|
+
import { t as useDocumentById } from "../../document-by-id-DdvqanGR.js";
|
|
3
3
|
import { useEffect } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { childLogger } from "document-model";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as makeAuthConnectionParams, $t as makeAuthMiddleware, An as addPromiseState, At as SubgraphSdkRegistry, B as DEFAULT_REQUEST_TIMEOUT_MS, Bt as withStreamedBodies, Ct as ambientRenownSigner, Dt as viewFilterInputFromViewFilter, Et as isGraphQLReactorClient, F as useDocuments, Ft as globalFetch, G as ConnectionParams, Gt as queriesUnknownArgument, H as SwitchboardBackendDescriptor, Ht as GraphQLOperationNotSupportedError, I as useGetDocument, It as isDeadlineError, J as IJobChangesSocket, Jt as GraphQLDriveNodeSource, K as DocumentChangesEventPayload, Kt as queriesUnknownField, L as useGetDocumentAsync, Lt as isNodeFetch, M as useDocument, Mn as isOperationCache, Mt as describeGraphQLDocument, N as useDocumentCache, Nn as readPromiseState, Nt as subgraphUrlFromGraphqlUrl, On as IDLE_OPERATIONS_ENTRY, Ot as GraphQLRequestOptions, P as useDocumentSafe, Pt as GraphQLFetch, Q as isAuthRefusalClose, Qt as ambientRenownTokenProvider, R as useGetDocuments, Rt as switchboardFetch, St as GraphQLReactorReadClient, T as useReactorClient, Tn as DocumentCache, Tt as findIsServableOverGraphQL, U as SwitchboardUnreachableError, Ut as GraphQLWrongBackendError, V as SwitchboardBackend, Vt as BatchJobFailedError, W as createSwitchboardBackend, Wt as JobFailedError, X as JobChangesSocketOptions, Xt as toLegacyNode, Y as JobChangesEventPayload, Yt as GraphQLDriveReadClient, Z as createJobChangesSocket, Zt as BearerTokenProvider, _t as ensurePHEventHandlers, a as DocumentOperationsState, an as phDocumentFromMutation, at as prepareSignedActions, b as setReactorClient, bt as GraphQLReactorClient, c as useDocumentModelModuleById, ct as GetDocumentAtConsistencyDocument, d as UseDispatchResult, dt as MutateDocumentWithOperationsDocument, en as GetDocumentQueryFields, et as startDocumentChangesSubscription, ft as MutateDocumentWithOperationsResult, gt as GraphQLReactorProviderProps, ht as GraphQLReactorProvider, i as DocumentOperationsResult, in as phDocumentFromGetDocument, it as resolveDocumentModelModule, j as setDocumentCache, jt as TypedGraphQLDocument, kt as SubgraphSdkFactory, l as useDocumentModelModules, lt as GetDocumentAtConsistencyResult, mt as ReactorOperationFieldsFragmentDoc, nn as RevisionsListSelection, nt as StaticPackageManager, o as UseDocumentOperationsOptions, on as revisionMapFromRevisionsList, ot as signStampedAction, p as useDispatch, pt as MutateDocumentWithOperationsVariables, q as DocumentChangesSubscriptionOptions, qt as DriveNodeQueries, r as useAttachmentService, rn as isoStringFromDateTime, rt as packageFromDocumentModels, s as useDocumentOperations, st as stampAction, tn as GetDocumentQueryResult, tt as subscriptionsUrlFromGraphqlUrl, u as DispatchFn, ut as GetDocumentAtConsistencyVariables, vt as useSwitchboardClient, wt as createGraphQLDriveNodeSource, xt as GraphQLReactorClientOptions, yt as DriveIdCall, z as DEFAULT_BREAKER, zt as withRequestDeadline } from "../../attachment-service-DEJPb14N.js";
|
|
2
2
|
import { Jt as OperationsCacheEntry, Lt as IReactorBrowserClient, qt as IOperationCache } from "../../global-BSyOOTvL.js";
|
|
3
3
|
import { j as SdkFunctionWrapper } from "../../types-BNVqRNli.js";
|
|
4
|
-
export { BatchJobFailedError, BearerTokenProvider, ConnectionParams, type DispatchFn, DocumentCache, DocumentChangesEventPayload, DocumentChangesSubscriptionOptions, type DocumentOperationsResult, type DocumentOperationsState, DriveIdCall, DriveNodeQueries, GetDocumentAtConsistencyDocument, GetDocumentAtConsistencyResult, GetDocumentAtConsistencyVariables, GetDocumentQueryFields, GetDocumentQueryResult, GraphQLDriveNodeSource, GraphQLDriveReadClient, GraphQLOperationNotSupportedError, GraphQLReactorClient, GraphQLReactorClientOptions, GraphQLReactorProvider, GraphQLReactorProviderProps, GraphQLReactorReadClient, GraphQLRequestOptions, GraphQLWrongBackendError, IDLE_OPERATIONS_ENTRY, IJobChangesSocket, type IOperationCache, type IReactorBrowserClient, JobChangesEventPayload, JobChangesSocketOptions, JobFailedError, MutateDocumentWithOperationsDocument, MutateDocumentWithOperationsResult, MutateDocumentWithOperationsVariables, type OperationsCacheEntry, ReactorOperationFieldsFragmentDoc, RevisionsListSelection, type SdkFunctionWrapper, StaticPackageManager, SubgraphSdkFactory, SubgraphSdkRegistry, TypedGraphQLDocument, type UseDispatchResult, type UseDocumentOperationsOptions, addPromiseState, ambientRenownTokenProvider, createGraphQLDriveNodeSource, createJobChangesSocket, describeGraphQLDocument, ensurePHEventHandlers, findIsServableOverGraphQL, isAuthRefusalClose, isGraphQLReactorClient, isOperationCache, isoStringFromDateTime, makeAuthConnectionParams, makeAuthMiddleware, packageFromDocumentModels, phDocumentFromGetDocument, phDocumentFromMutation, prepareSignedActions, queriesUnknownArgument, queriesUnknownField, readPromiseState, resolveDocumentModelModule, revisionMapFromRevisionsList, setDocumentCache, setReactorClient, signStampedAction, stampAction, startDocumentChangesSubscription, subgraphUrlFromGraphqlUrl, subscriptionsUrlFromGraphqlUrl, toLegacyNode, useAttachmentService, useDispatch, useDocument, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOperations, useDocumentSafe, useDocuments, useGetDocument, useGetDocumentAsync, useGetDocuments, useReactorClient, useSwitchboardClient, viewFilterInputFromViewFilter };
|
|
4
|
+
export { BatchJobFailedError, BearerTokenProvider, ConnectionParams, DEFAULT_BREAKER, DEFAULT_REQUEST_TIMEOUT_MS, type DispatchFn, DocumentCache, DocumentChangesEventPayload, DocumentChangesSubscriptionOptions, type DocumentOperationsResult, type DocumentOperationsState, DriveIdCall, DriveNodeQueries, GetDocumentAtConsistencyDocument, GetDocumentAtConsistencyResult, GetDocumentAtConsistencyVariables, GetDocumentQueryFields, GetDocumentQueryResult, GraphQLDriveNodeSource, GraphQLDriveReadClient, GraphQLFetch, GraphQLOperationNotSupportedError, GraphQLReactorClient, GraphQLReactorClientOptions, GraphQLReactorProvider, GraphQLReactorProviderProps, GraphQLReactorReadClient, GraphQLRequestOptions, GraphQLWrongBackendError, IDLE_OPERATIONS_ENTRY, IJobChangesSocket, type IOperationCache, type IReactorBrowserClient, JobChangesEventPayload, JobChangesSocketOptions, JobFailedError, MutateDocumentWithOperationsDocument, MutateDocumentWithOperationsResult, MutateDocumentWithOperationsVariables, type OperationsCacheEntry, ReactorOperationFieldsFragmentDoc, RevisionsListSelection, type SdkFunctionWrapper, StaticPackageManager, SubgraphSdkFactory, SubgraphSdkRegistry, SwitchboardBackend, SwitchboardBackendDescriptor, SwitchboardUnreachableError, TypedGraphQLDocument, type UseDispatchResult, type UseDocumentOperationsOptions, addPromiseState, ambientRenownSigner, ambientRenownTokenProvider, createGraphQLDriveNodeSource, createJobChangesSocket, createSwitchboardBackend, describeGraphQLDocument, ensurePHEventHandlers, findIsServableOverGraphQL, globalFetch, isAuthRefusalClose, isDeadlineError, isGraphQLReactorClient, isNodeFetch, isOperationCache, isoStringFromDateTime, makeAuthConnectionParams, makeAuthMiddleware, packageFromDocumentModels, phDocumentFromGetDocument, phDocumentFromMutation, prepareSignedActions, queriesUnknownArgument, queriesUnknownField, readPromiseState, resolveDocumentModelModule, revisionMapFromRevisionsList, setDocumentCache, setReactorClient, signStampedAction, stampAction, startDocumentChangesSubscription, subgraphUrlFromGraphqlUrl, subscriptionsUrlFromGraphqlUrl, switchboardFetch, toLegacyNode, useAttachmentService, useDispatch, useDocument, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOperations, useDocumentSafe, useDocuments, useGetDocument, useGetDocumentAsync, useGetDocuments, useReactorClient, useSwitchboardClient, viewFilterInputFromViewFilter, withRequestDeadline, withStreamedBodies };
|
|
5
5
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as useDocument, c as useDocuments, d as useGetDocuments, f as DocumentCache, g as addPromiseState, h as IDLE_OPERATIONS_ENTRY, i as setDocumentCache, l as useGetDocument, n as useDispatch, o as useDocumentCache, s as useDocumentSafe, u as useGetDocumentAsync, v as isOperationCache, y as readPromiseState } from "../../dispatch-
|
|
2
|
-
import { $ as makeAuthMiddleware, Q as ambientRenownTokenProvider, n as useDocumentModelModules, t as useDocumentModelModuleById } from "../../document-model-modules-
|
|
3
|
-
import { $r as
|
|
4
|
-
export { BatchJobFailedError, DocumentCache, GetDocumentAtConsistencyDocument, GraphQLDriveNodeSource, GraphQLDriveReadClient, GraphQLOperationNotSupportedError, GraphQLReactorClient, GraphQLReactorProvider, GraphQLWrongBackendError, IDLE_OPERATIONS_ENTRY, JobFailedError, MutateDocumentWithOperationsDocument, ReactorOperationFieldsFragmentDoc, StaticPackageManager, SubgraphSdkRegistry, addPromiseState, ambientRenownTokenProvider, createGraphQLDriveNodeSource, createJobChangesSocket, describeGraphQLDocument, ensurePHEventHandlers, findIsServableOverGraphQL, isAuthRefusalClose, isGraphQLReactorClient, isOperationCache, isoStringFromDateTime, makeAuthConnectionParams, makeAuthMiddleware, packageFromDocumentModels, phDocumentFromGetDocument, phDocumentFromMutation, prepareSignedActions, queriesUnknownArgument, queriesUnknownField, readPromiseState, resolveDocumentModelModule, revisionMapFromRevisionsList, setDocumentCache, setReactorClient, signStampedAction, stampAction, startDocumentChangesSubscription, subgraphUrlFromGraphqlUrl, subscriptionsUrlFromGraphqlUrl, toLegacyNode, useAttachmentService, useDispatch, useDocument, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOperations, useDocumentSafe, useDocuments, useGetDocument, useGetDocumentAsync, useGetDocuments, useReactorClient, useSwitchboardClient, viewFilterInputFromViewFilter };
|
|
1
|
+
import { a as useDocument, c as useDocuments, d as useGetDocuments, f as DocumentCache, g as addPromiseState, h as IDLE_OPERATIONS_ENTRY, i as setDocumentCache, l as useGetDocument, n as useDispatch, o as useDocumentCache, s as useDocumentSafe, u as useGetDocumentAsync, v as isOperationCache, y as readPromiseState } from "../../dispatch-Cylwl2Dk.js";
|
|
2
|
+
import { $ as makeAuthMiddleware, Q as ambientRenownTokenProvider, n as useDocumentModelModules, t as useDocumentModelModuleById } from "../../document-model-modules-D-VXC3ET.js";
|
|
3
|
+
import { $r as viewFilterInputFromViewFilter, Ai as phDocumentFromMutation, B as useAttachmentService, Ca as useReactorClient, Ci as withRequestDeadline, Di as toLegacyNode, Ei as GraphQLDriveReadClient, Gi as GraphQLWrongBackendError, Ji as queriesUnknownField, Jr as GraphQLReactorClient, Ki as JobFailedError, Oi as isoStringFromDateTime, Qr as isGraphQLReactorClient, Si as switchboardFetch, Ti as GraphQLDriveNodeSource, Ui as BatchJobFailedError, Wi as GraphQLOperationNotSupportedError, Xr as createGraphQLDriveNodeSource, Yr as ambientRenownSigner, Zr as findIsServableOverGraphQL, a as createSwitchboardBackend, ai as SubgraphSdkRegistry, bi as isDeadlineError, c as useSwitchboardClient, ci as StaticPackageManager, di as prepareSignedActions, ei as createJobChangesSocket, fi as signStampedAction, gi as ReactorOperationFieldsFragmentDoc, hi as MutateDocumentWithOperationsDocument, i as SwitchboardUnreachableError, ii as subscriptionsUrlFromGraphqlUrl, ji as revisionMapFromRevisionsList, ki as phDocumentFromGetDocument, li as packageFromDocumentModels, mi as GetDocumentAtConsistencyDocument, n as DEFAULT_BREAKER, ni as makeAuthConnectionParams, o as GraphQLReactorProvider, oi as describeGraphQLDocument, pi as stampAction, qi as queriesUnknownArgument, r as DEFAULT_REQUEST_TIMEOUT_MS, ri as startDocumentChangesSubscription, s as ensurePHEventHandlers, si as subgraphUrlFromGraphqlUrl, t as useDocumentOperations, ti as isAuthRefusalClose, ui as resolveDocumentModelModule, va as setReactorClient, wi as withStreamedBodies, xi as isNodeFetch, yi as globalFetch } from "../../document-operations-CsiIPsx9.js";
|
|
4
|
+
export { BatchJobFailedError, DEFAULT_BREAKER, DEFAULT_REQUEST_TIMEOUT_MS, DocumentCache, GetDocumentAtConsistencyDocument, GraphQLDriveNodeSource, GraphQLDriveReadClient, GraphQLOperationNotSupportedError, GraphQLReactorClient, GraphQLReactorProvider, GraphQLWrongBackendError, IDLE_OPERATIONS_ENTRY, JobFailedError, MutateDocumentWithOperationsDocument, ReactorOperationFieldsFragmentDoc, StaticPackageManager, SubgraphSdkRegistry, SwitchboardUnreachableError, addPromiseState, ambientRenownSigner, ambientRenownTokenProvider, createGraphQLDriveNodeSource, createJobChangesSocket, createSwitchboardBackend, describeGraphQLDocument, ensurePHEventHandlers, findIsServableOverGraphQL, globalFetch, isAuthRefusalClose, isDeadlineError, isGraphQLReactorClient, isNodeFetch, isOperationCache, isoStringFromDateTime, makeAuthConnectionParams, makeAuthMiddleware, packageFromDocumentModels, phDocumentFromGetDocument, phDocumentFromMutation, prepareSignedActions, queriesUnknownArgument, queriesUnknownField, readPromiseState, resolveDocumentModelModule, revisionMapFromRevisionsList, setDocumentCache, setReactorClient, signStampedAction, stampAction, startDocumentChangesSubscription, subgraphUrlFromGraphqlUrl, subscriptionsUrlFromGraphqlUrl, switchboardFetch, toLegacyNode, useAttachmentService, useDispatch, useDocument, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOperations, useDocumentSafe, useDocuments, useGetDocument, useGetDocumentAsync, useGetDocuments, useReactorClient, useSwitchboardClient, viewFilterInputFromViewFilter, withRequestDeadline, withStreamedBodies };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as getPHStore } from "./make-ph-event-functions-B5GU5xcR.js";
|
|
2
|
-
import {
|
|
3
|
-
import { G as useDriveNode, O as useSelectedNodeId, P as useDriveContext, Q as ambientRenownTokenProvider, h as useSelectedDriveId, t as useDocumentModelModuleById } from "./document-model-modules-
|
|
4
|
-
import { t as useDocumentById } from "./document-by-id-
|
|
2
|
+
import { M as NoSelectedDocumentError, j as DocumentTypeMismatchError } from "./dispatch-Cylwl2Dk.js";
|
|
3
|
+
import { G as useDriveNode, O as useSelectedNodeId, P as useDriveContext, Q as ambientRenownTokenProvider, h as useSelectedDriveId, t as useDocumentModelModuleById } from "./document-model-modules-D-VXC3ET.js";
|
|
4
|
+
import { t as useDocumentById } from "./document-by-id-DdvqanGR.js";
|
|
5
5
|
import { createContext, useContext, useMemo } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { DriveCollectionId, ModuleNotFoundError } from "@powerhousedao/reactor";
|
|
@@ -318,4 +318,4 @@ function createSwitchboardSchemaTool(deps) {
|
|
|
318
318
|
//#endregion
|
|
319
319
|
export { getBrowserSyncManager as a, useSelectedDocument as c, useSelectedDocumentSafe as d, EditorDocumentProvider as f, useNodeById as g, useSelectedNode as h, createSwitchboardSchemaTool as i, useSelectedDocumentId as l, useDocumentOfType as m, SWITCHBOARD_INTROSPECTION_QUERY as n, resolveDriveSwitchboard as o, useEditorDocumentContext as p, SWITCHBOARD_SCHEMA_TOOL_NAME as r, summarizeIntrospectionSchema as s, GQL_CHANNEL_SUFFIX as t, useSelectedDocumentOfType as u };
|
|
320
320
|
|
|
321
|
-
//# sourceMappingURL=switchboard-
|
|
321
|
+
//# sourceMappingURL=switchboard-DnvOmOx5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switchboard-CYTCYt4Z.js","names":[],"sources":["../src/hooks/node-by-id.ts","../src/hooks/selected-node.ts","../src/hooks/document-of-type.ts","../src/hooks/editor-context.tsx","../src/hooks/selected-document.ts","../src/ai/switchboard.ts"],"sourcesContent":["import type { Node } from \"@powerhousedao/shared/document-drive\";\nimport { useDriveNode } from \"./drive-nodes.js\";\nimport { useSelectedDriveId } from \"./selected-drive.js\";\n\n/** Returns a node in the selected drive by id. */\nexport function useNodeById(id: string | null | undefined): Node | undefined {\n return useDriveNode(useSelectedDriveId(), id);\n}\n","import type { Node } from \"@powerhousedao/shared/document-drive\";\nimport { useNodeById } from \"./node-by-id.js\";\nimport { useSelectedNodeId } from \"./set-selected-node.js\";\n\nexport {\n addResetSelectedNodeEventHandler,\n addSelectedNodeIdEventHandler,\n getNodeTarget,\n useNodeTarget,\n preloadNode,\n setSelectedNode,\n setSelectedNodeId,\n useOpenNode,\n usePreloadNode,\n useSetSelectedNode,\n} from \"./set-selected-node.js\";\nexport { addSetSelectedNodeOnPopStateEventHandler } from \"./sync-selection.js\";\n\n/** Returns the selected node. */\nexport function useSelectedNode(): Node | undefined {\n return useNodeById(useSelectedNodeId());\n}\n","import { ModuleNotFoundError } from \"@powerhousedao/reactor\";\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport type { Action, PHDocument } from \"@powerhousedao/shared/document-model\";\nimport { DocumentTypeMismatchError } from \"../errors.js\";\nimport { useDocumentById } from \"./document-by-id.js\";\nimport { useDocumentModelModuleById } from \"./document-model-modules.js\";\n\n/** Returns a document of a specific type, throws an error if the found document has a different type */\nexport function useDocumentOfType<\n TDocument extends PHDocument,\n TAction extends Action,\n>(\n documentId: string | null | undefined,\n documentType: string | null | undefined,\n) {\n const [document, dispatch] = useDocumentById(documentId);\n const documentModelModule = useDocumentModelModuleById(documentType);\n\n if (!documentId || !documentType) return [];\n\n if (!document) {\n throw new Error(`Document not found: ${documentId}`);\n }\n if (!documentModelModule) {\n throw new ModuleNotFoundError(documentType);\n }\n\n if (document.header.documentType !== documentType) {\n throw new DocumentTypeMismatchError(\n documentId,\n documentType,\n document.header.documentType,\n );\n }\n\n return [document, dispatch] as [TDocument, DocumentDispatch<TAction>];\n}\n","import type {\n DocumentDispatch,\n PHDocument,\n} from \"@powerhousedao/shared/document-model\";\nimport type { ReactNode } from \"react\";\nimport { createContext, useContext, useMemo } from \"react\";\n\n/** The document an editor is rendered with, and a dispatch bound to it. */\nexport type EditorDocumentContextValue = readonly [\n PHDocument,\n DocumentDispatch,\n];\n\nconst EditorDocumentContext = createContext<\n EditorDocumentContextValue | undefined\n>(undefined);\n\n/** Hosts render an editor inside this, with the same `document` and `dispatch`\n * as its props; `useSelected*Document` hooks below read them. */\nexport function EditorDocumentProvider(props: {\n document: PHDocument;\n dispatch: DocumentDispatch;\n children: ReactNode;\n}) {\n const { document, dispatch } = props;\n const value = useMemo(\n () => [document, dispatch] as const,\n [document, dispatch],\n );\n return (\n <EditorDocumentContext.Provider value={value}>\n {props.children}\n </EditorDocumentContext.Provider>\n );\n}\n\n/** The nearest editor's document and dispatch, or undefined outside one. */\nexport function useEditorDocumentContext() {\n return useContext(EditorDocumentContext);\n}\n","import { ModuleNotFoundError } from \"@powerhousedao/reactor\";\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport { isFileNode } from \"@powerhousedao/shared/document-drive\";\nimport type { Action, PHDocument } from \"@powerhousedao/shared/document-model\";\nimport {\n DocumentTypeMismatchError,\n NoSelectedDocumentError,\n} from \"../errors.js\";\nimport type { DispatchFn, UseDispatchResult } from \"./dispatch.js\";\nimport { useDocumentById } from \"./document-by-id.js\";\nimport { useDocumentModelModuleById } from \"./document-model-modules.js\";\nimport { useDocumentOfType } from \"./document-of-type.js\";\nimport { useDriveContext } from \"./drive-context.js\";\nimport { useEditorDocumentContext } from \"./editor-context.js\";\nimport { useSelectedNode } from \"./selected-node.js\";\n\n/** Returns the selected document id: the editor's document, else the drive\n * app's open document, else the app's selection. */\nexport function useSelectedDocumentId(): string | undefined {\n const editor = useEditorDocumentContext();\n const drive = useDriveContext();\n const selectedNode = useSelectedNode();\n if (editor) return editor[0].header.id;\n // The drive may not list a document the route opened yet.\n if (drive?.nodeId && !drive.folder) {\n return selectedNode && !isFileNode(selectedNode) ? undefined : drive.nodeId;\n }\n return selectedNode && isFileNode(selectedNode) ? selectedNode.id : undefined;\n}\n\n/** Returns the selected document. */\nexport function useSelectedDocument(): readonly [\n PHDocument,\n DispatchFn<Action>,\n] {\n const [document, dispatch] = useSelectedDocumentSafe();\n if (!document) {\n throw new NoSelectedDocumentError();\n }\n return [document, dispatch] as const;\n}\n\n/** Returns the selected document: the editor's, else the app's selection. */\nexport function useSelectedDocumentSafe(): UseDispatchResult<\n PHDocument,\n Action\n> {\n const editor = useEditorDocumentContext();\n const selectedDocumentId = useSelectedDocumentId();\n const selected = useDocumentById(editor ? null : selectedDocumentId);\n return editor ?? selected;\n}\n\n/** Returns the selected document of a specific type, throws an error if the found document has a different type */\nexport function useSelectedDocumentOfType(\n documentType: null | undefined,\n): never[];\nexport function useSelectedDocumentOfType<\n TDocument extends PHDocument,\n TAction extends Action,\n>(documentType: string): [TDocument, DocumentDispatch<TAction>];\nexport function useSelectedDocumentOfType<\n TDocument extends PHDocument,\n TAction extends Action,\n>(\n documentType: string | null | undefined,\n): never[] | [TDocument, DocumentDispatch<TAction>] {\n const editor = useEditorDocumentContext();\n const documentId = useSelectedDocumentId();\n // Called on every render; without a type, or in an editor, it reads no document.\n const result = useDocumentOfType<TDocument, TAction>(\n documentType && !editor ? documentId : null,\n documentType,\n );\n const documentModelModule = useDocumentModelModuleById(documentType);\n\n if (!documentType) {\n return [];\n }\n if (editor) {\n const [document, dispatch] = editor;\n if (!documentModelModule) {\n throw new ModuleNotFoundError(documentType);\n }\n if (document.header.documentType !== documentType) {\n throw new DocumentTypeMismatchError(\n document.header.id,\n documentType,\n document.header.documentType,\n );\n }\n return [document as TDocument, dispatch];\n }\n if (!documentId) {\n throw new NoSelectedDocumentError();\n }\n return result;\n}\n","import { getPHStore } from \"../hooks/ph-store.js\";\nimport { DriveCollectionId, type ISyncManager } from \"@powerhousedao/reactor\";\nimport { z } from \"zod\";\nimport { ambientRenownTokenProvider } from \"../graphql-client/auth.js\";\nimport type { AiToolDescriptor } from \"./types.js\";\n\n/**\n * The switchboard serving a remote drive: the base URL the browser talks to\n * and its GraphQL supergraph endpoint.\n */\nexport interface DriveSwitchboard {\n /** Switchboard base URL (e.g. `http://localhost:4001`). */\n switchboardUrl: string;\n /** GraphQL supergraph endpoint (`<base>/graphql`). */\n graphqlUrl: string;\n}\n\n/**\n * Reads the tab-side sync manager from the browser global. Returns\n * `undefined` in non-browser environments or before the reactor client\n * module is initialized.\n */\nexport function getBrowserSyncManager(): ISyncManager | undefined {\n if (typeof window === \"undefined\") {\n return undefined;\n }\n return getPHStore()?.reactorClientModule?.reactorModule?.syncModule\n ?.syncManager;\n}\n\n/** Suffix of the per-drive GraphQL channel endpoint the switchboard serves. */\nexport const GQL_CHANNEL_SUFFIX = \"/graphql/r\";\n\n/**\n * Resolves the switchboard that serves a drive, if any.\n *\n * Every remote drive stores its switchboard's exact GraphQL channel\n * endpoint in its sync remote — `channelConfig = { type: \"gql\",\n * parameters: { url: \"<origin>/graphql/r\" } }` — and the switchboard base\n * is that URL minus the `/graphql/r` suffix. Deriving it per drive (rather\n * than from a global setting) is what keeps multi-switchboard deployments\n * correct. Drives that are not synced to a remote switchboard (local\n * drives, other channel types, unexpected shapes) return `undefined`.\n */\nexport function resolveDriveSwitchboard(\n driveId: string | undefined,\n syncManager?: ISyncManager,\n): DriveSwitchboard | undefined {\n const manager = syncManager ?? getBrowserSyncManager();\n if (!driveId || !manager) {\n return undefined;\n }\n const collectionId = DriveCollectionId.forDrive(driveId);\n const remote = manager\n .list()\n .find((r) => r.meta.collectionId.equals(collectionId));\n if (!remote) {\n return undefined;\n }\n const { channelConfig } = remote.meta;\n if (channelConfig.type !== \"gql\") {\n return undefined;\n }\n const url = channelConfig.parameters.url;\n if (typeof url !== \"string\" || !url.endsWith(GQL_CHANNEL_SUFFIX)) {\n return undefined;\n }\n const switchboardUrl = url.slice(0, -GQL_CHANNEL_SUFFIX.length);\n return { switchboardUrl, graphqlUrl: `${switchboardUrl}/graphql` };\n}\n\n/** A bounded introspected GraphQL type reference (see the query below). */\ntype IntrospectedTypeRef = {\n kind: string;\n name: string | null;\n ofType?: IntrospectedTypeRef | null;\n};\n\ntype IntrospectedField = {\n name: string;\n description: string | null;\n args: Array<{ name: string; type: IntrospectedTypeRef }>;\n type: IntrospectedTypeRef;\n};\n\ntype IntrospectedRootType = {\n fields: IntrospectedField[] | null;\n} | null;\n\ntype IntrospectedSchema = {\n queryType?: IntrospectedRootType;\n mutationType?: IntrospectedRootType;\n};\n\n/**\n * Introspection over the switchboard supergraph's root query and mutation\n * fields. Types are requested with three levels of `ofType` nesting so\n * that common shapes like `[X!]!` (LIST(NON_NULL(LIST(X)))) render fully.\n */\nexport const SWITCHBOARD_INTROSPECTION_QUERY: string = /* GraphQL */ `\n query SwitchboardIntrospection {\n __schema {\n queryType {\n fields {\n name\n description\n args {\n name\n type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n mutationType {\n fields {\n name\n description\n args {\n name\n type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n`;\n\n/**\n * Renders an introspected type reference as a GraphQL type string.\n * Recursion is bounded by the `ofType` nesting of the query, so it always\n * terminates.\n */\nfunction renderTypeRef(type: IntrospectedTypeRef | null | undefined): string {\n if (!type) {\n return \"Unknown\";\n }\n switch (type.kind) {\n case \"NON_NULL\":\n return `${renderTypeRef(type.ofType)}!`;\n case \"LIST\":\n return `[${renderTypeRef(type.ofType)}]`;\n default:\n return type.name ?? \"Unknown\";\n }\n}\n\n/** One root query or mutation field, reduced to a prompt-friendly line. */\nexport type SchemaFieldSummary = {\n name: string;\n description?: string;\n args: string;\n returns: string;\n};\n\n/** Cap on the number of fields reported per root type. */\nconst MAX_FIELDS_PER_ROOT = 200;\n\nfunction summarizeFields(fields: IntrospectedField[] | null | undefined): {\n fields: SchemaFieldSummary[];\n truncated: boolean;\n} {\n const list = fields ?? [];\n return {\n fields: list.slice(0, MAX_FIELDS_PER_ROOT).map((field) => ({\n name: field.name,\n ...(field.description ? { description: field.description } : {}),\n args: field.args\n .map((arg) => `${arg.name}: ${renderTypeRef(arg.type)}`)\n .join(\", \"),\n returns: renderTypeRef(field.type),\n })),\n truncated: list.length > MAX_FIELDS_PER_ROOT,\n };\n}\n\n/**\n * Reduces a GraphQL `__schema` introspection payload (the `data.__schema`\n * object) to a compact summary of its root query and mutation fields.\n * Accepts `unknown` because the payload arrives over the wire.\n */\nexport function summarizeIntrospectionSchema(schema: unknown): {\n queries: SchemaFieldSummary[];\n mutations: SchemaFieldSummary[];\n truncated: boolean;\n} {\n const introspection = (schema ?? {}) as IntrospectedSchema;\n const queries = summarizeFields(introspection.queryType?.fields);\n const mutations = summarizeFields(introspection.mutationType?.fields);\n return {\n queries: queries.fields,\n mutations: mutations.fields,\n truncated: queries.truncated || mutations.truncated,\n };\n}\n\nexport const SWITCHBOARD_SCHEMA_TOOL_NAME = \"getSwitchboardSchema\";\n\n/** Test seams for {@link createSwitchboardSchemaTool}. */\nexport interface SwitchboardToolDeps {\n getSyncManager?: () => ISyncManager | undefined;\n getSelectedDriveId?: () => string | undefined;\n tokenProvider?: () => Promise<string | undefined>;\n fetchImpl?: typeof fetch;\n timeoutMs?: number;\n}\n\n/**\n * Creates the read-only `getSwitchboardSchema` tool: it introspects the\n * GraphQL supergraph of the switchboard serving a drive and returns a\n * summary of its root queries and mutations. It reads the schema only and\n * never modifies data.\n */\nexport function createSwitchboardSchemaTool(\n deps?: SwitchboardToolDeps,\n): AiToolDescriptor {\n const getSyncManager = deps?.getSyncManager ?? getBrowserSyncManager;\n const getSelectedDriveId =\n deps?.getSelectedDriveId ??\n ((): string | undefined =>\n typeof window === \"undefined\"\n ? undefined\n : getPHStore()?.selectedDriveId);\n const tokenProvider = deps?.tokenProvider ?? ambientRenownTokenProvider;\n const fetchImpl = deps?.fetchImpl ?? fetch;\n const timeoutMs = deps?.timeoutMs ?? 10_000;\n\n return {\n name: SWITCHBOARD_SCHEMA_TOOL_NAME,\n description:\n \"Introspect the GraphQL endpoint of the switchboard serving a drive and list the queries and mutations it exposes (reactor operations, document-model read models, package subgraphs). Read-only: it reads the schema only and never modifies data. Omit driveId to introspect the currently selected drive.\",\n inputSchema: {\n driveId: z\n .string()\n .describe(\n \"Drive to introspect. Omit to use the currently selected drive.\",\n )\n .optional(),\n },\n annotations: { readOnlyHint: true },\n callback: async (input: { driveId?: string } | undefined) => {\n const driveId = input?.driveId ?? getSelectedDriveId();\n const sb = resolveDriveSwitchboard(driveId, getSyncManager());\n if (!sb) {\n throw new Error(\n driveId\n ? `Drive \"${driveId}\" has no switchboard: it is not synced to a remote switchboard.`\n : \"No drive is currently selected and no driveId was given.\",\n );\n }\n\n const token = await tokenProvider();\n let response: Response;\n try {\n response = await fetchImpl(sb.graphqlUrl, {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n ...(token ? { authorization: `Bearer ${token}` } : {}),\n },\n body: JSON.stringify({ query: SWITCHBOARD_INTROSPECTION_QUERY }),\n signal: AbortSignal.timeout(timeoutMs),\n });\n } catch (error) {\n throw new Error(\n `Switchboard at ${sb.graphqlUrl} is not reachable: ${\n error instanceof Error ? error.message : String(error)\n }`,\n { cause: error },\n );\n }\n\n if (response.status === 401 || response.status === 403) {\n throw new Error(\n `Switchboard at ${sb.graphqlUrl} refused the request (HTTP ${response.status}). Sign in to the switchboard (Renown) and try again.`,\n );\n }\n if (!response.ok) {\n throw new Error(\n `Switchboard introspection failed: HTTP ${response.status} ${response.statusText} from ${sb.graphqlUrl}`,\n );\n }\n\n const body = (await response.json()) as {\n errors?: Array<{ message?: string }>;\n data?: { __schema?: unknown } | null;\n } | null;\n const schemaErrors = body?.errors;\n if (schemaErrors && schemaErrors.length > 0) {\n throw new Error(\n schemaErrors.map((e) => e.message ?? \"unknown error\").join(\"; \"),\n );\n }\n const schema = body?.data?.__schema as\n | IntrospectedSchema\n | null\n | undefined;\n if (!schema?.queryType) {\n throw new Error(\n `Switchboard at ${sb.graphqlUrl} did not return a GraphQL schema.`,\n );\n }\n\n const summary = summarizeIntrospectionSchema(schema);\n return {\n switchboardUrl: sb.switchboardUrl,\n graphqlUrl: sb.graphqlUrl,\n ...summary,\n };\n },\n };\n}\n"],"mappings":";;;;;;;;;;;AAKA,SAAgB,YAAY,IAAiD;CAC3E,OAAO,aAAa,mBAAmB,GAAG,EAAE;AAC9C;;;;ACYA,SAAgB,kBAAoC;CAClD,OAAO,YAAY,kBAAkB,CAAC;AACxC;;;;ACbA,SAAgB,kBAId,YACA,cACA;CACA,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;GAI3B,IAAI,CAAC,QAAQ,WACX,MAAM,IAAI,MACR,kBAAkB,GAAG,WAAW,kCAClC;GAGF,MAAM,UAAU,6BAA6B,MAAM;GACnD,OAAO;IACL,gBAAgB,GAAG;IACnB,YAAY,GAAG;IACf,GAAG;GACL;EACF;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"switchboard-DnvOmOx5.js","names":[],"sources":["../src/hooks/node-by-id.ts","../src/hooks/selected-node.ts","../src/hooks/document-of-type.ts","../src/hooks/editor-context.tsx","../src/hooks/selected-document.ts","../src/ai/switchboard.ts"],"sourcesContent":["import type { Node } from \"@powerhousedao/shared/document-drive\";\nimport { useDriveNode } from \"./drive-nodes.js\";\nimport { useSelectedDriveId } from \"./selected-drive.js\";\n\n/** Returns a node in the selected drive by id. */\nexport function useNodeById(id: string | null | undefined): Node | undefined {\n return useDriveNode(useSelectedDriveId(), id);\n}\n","import type { Node } from \"@powerhousedao/shared/document-drive\";\nimport { useNodeById } from \"./node-by-id.js\";\nimport { useSelectedNodeId } from \"./set-selected-node.js\";\n\nexport {\n addResetSelectedNodeEventHandler,\n addSelectedNodeIdEventHandler,\n getNodeTarget,\n useNodeTarget,\n preloadNode,\n setSelectedNode,\n setSelectedNodeId,\n useOpenNode,\n usePreloadNode,\n useSetSelectedNode,\n} from \"./set-selected-node.js\";\nexport { addSetSelectedNodeOnPopStateEventHandler } from \"./sync-selection.js\";\n\n/** Returns the selected node. */\nexport function useSelectedNode(): Node | undefined {\n return useNodeById(useSelectedNodeId());\n}\n","import { ModuleNotFoundError } from \"@powerhousedao/reactor\";\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport type { Action, PHDocument } from \"@powerhousedao/shared/document-model\";\nimport { DocumentTypeMismatchError } from \"../errors.js\";\nimport { useDocumentById } from \"./document-by-id.js\";\nimport { useDocumentModelModuleById } from \"./document-model-modules.js\";\n\n/** Returns a document of a specific type, throws an error if the found document has a different type */\nexport function useDocumentOfType<\n TDocument extends PHDocument,\n TAction extends Action,\n>(\n documentId: string | null | undefined,\n documentType: string | null | undefined,\n) {\n const [document, dispatch] = useDocumentById(documentId);\n const documentModelModule = useDocumentModelModuleById(documentType);\n\n if (!documentId || !documentType) return [];\n\n if (!document) {\n throw new Error(`Document not found: ${documentId}`);\n }\n if (!documentModelModule) {\n throw new ModuleNotFoundError(documentType);\n }\n\n if (document.header.documentType !== documentType) {\n throw new DocumentTypeMismatchError(\n documentId,\n documentType,\n document.header.documentType,\n );\n }\n\n return [document, dispatch] as [TDocument, DocumentDispatch<TAction>];\n}\n","import type {\n DocumentDispatch,\n PHDocument,\n} from \"@powerhousedao/shared/document-model\";\nimport type { ReactNode } from \"react\";\nimport { createContext, useContext, useMemo } from \"react\";\n\n/** The document an editor is rendered with, and a dispatch bound to it. */\nexport type EditorDocumentContextValue = readonly [\n PHDocument,\n DocumentDispatch,\n];\n\nconst EditorDocumentContext = createContext<\n EditorDocumentContextValue | undefined\n>(undefined);\n\n/** Hosts render an editor inside this, with the same `document` and `dispatch`\n * as its props; `useSelected*Document` hooks below read them. */\nexport function EditorDocumentProvider(props: {\n document: PHDocument;\n dispatch: DocumentDispatch;\n children: ReactNode;\n}) {\n const { document, dispatch } = props;\n const value = useMemo(\n () => [document, dispatch] as const,\n [document, dispatch],\n );\n return (\n <EditorDocumentContext.Provider value={value}>\n {props.children}\n </EditorDocumentContext.Provider>\n );\n}\n\n/** The nearest editor's document and dispatch, or undefined outside one. */\nexport function useEditorDocumentContext() {\n return useContext(EditorDocumentContext);\n}\n","import { ModuleNotFoundError } from \"@powerhousedao/reactor\";\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport { isFileNode } from \"@powerhousedao/shared/document-drive\";\nimport type { Action, PHDocument } from \"@powerhousedao/shared/document-model\";\nimport {\n DocumentTypeMismatchError,\n NoSelectedDocumentError,\n} from \"../errors.js\";\nimport type { DispatchFn, UseDispatchResult } from \"./dispatch.js\";\nimport { useDocumentById } from \"./document-by-id.js\";\nimport { useDocumentModelModuleById } from \"./document-model-modules.js\";\nimport { useDocumentOfType } from \"./document-of-type.js\";\nimport { useDriveContext } from \"./drive-context.js\";\nimport { useEditorDocumentContext } from \"./editor-context.js\";\nimport { useSelectedNode } from \"./selected-node.js\";\n\n/** Returns the selected document id: the editor's document, else the drive\n * app's open document, else the app's selection. */\nexport function useSelectedDocumentId(): string | undefined {\n const editor = useEditorDocumentContext();\n const drive = useDriveContext();\n const selectedNode = useSelectedNode();\n if (editor) return editor[0].header.id;\n // The drive may not list a document the route opened yet.\n if (drive?.nodeId && !drive.folder) {\n return selectedNode && !isFileNode(selectedNode) ? undefined : drive.nodeId;\n }\n return selectedNode && isFileNode(selectedNode) ? selectedNode.id : undefined;\n}\n\n/** Returns the selected document. */\nexport function useSelectedDocument(): readonly [\n PHDocument,\n DispatchFn<Action>,\n] {\n const [document, dispatch] = useSelectedDocumentSafe();\n if (!document) {\n throw new NoSelectedDocumentError();\n }\n return [document, dispatch] as const;\n}\n\n/** Returns the selected document: the editor's, else the app's selection. */\nexport function useSelectedDocumentSafe(): UseDispatchResult<\n PHDocument,\n Action\n> {\n const editor = useEditorDocumentContext();\n const selectedDocumentId = useSelectedDocumentId();\n const selected = useDocumentById(editor ? null : selectedDocumentId);\n return editor ?? selected;\n}\n\n/** Returns the selected document of a specific type, throws an error if the found document has a different type */\nexport function useSelectedDocumentOfType(\n documentType: null | undefined,\n): never[];\nexport function useSelectedDocumentOfType<\n TDocument extends PHDocument,\n TAction extends Action,\n>(documentType: string): [TDocument, DocumentDispatch<TAction>];\nexport function useSelectedDocumentOfType<\n TDocument extends PHDocument,\n TAction extends Action,\n>(\n documentType: string | null | undefined,\n): never[] | [TDocument, DocumentDispatch<TAction>] {\n const editor = useEditorDocumentContext();\n const documentId = useSelectedDocumentId();\n // Called on every render; without a type, or in an editor, it reads no document.\n const result = useDocumentOfType<TDocument, TAction>(\n documentType && !editor ? documentId : null,\n documentType,\n );\n const documentModelModule = useDocumentModelModuleById(documentType);\n\n if (!documentType) {\n return [];\n }\n if (editor) {\n const [document, dispatch] = editor;\n if (!documentModelModule) {\n throw new ModuleNotFoundError(documentType);\n }\n if (document.header.documentType !== documentType) {\n throw new DocumentTypeMismatchError(\n document.header.id,\n documentType,\n document.header.documentType,\n );\n }\n return [document as TDocument, dispatch];\n }\n if (!documentId) {\n throw new NoSelectedDocumentError();\n }\n return result;\n}\n","import { getPHStore } from \"../hooks/ph-store.js\";\nimport { DriveCollectionId, type ISyncManager } from \"@powerhousedao/reactor\";\nimport { z } from \"zod\";\nimport { ambientRenownTokenProvider } from \"../graphql-client/auth.js\";\nimport type { AiToolDescriptor } from \"./types.js\";\n\n/**\n * The switchboard serving a remote drive: the base URL the browser talks to\n * and its GraphQL supergraph endpoint.\n */\nexport interface DriveSwitchboard {\n /** Switchboard base URL (e.g. `http://localhost:4001`). */\n switchboardUrl: string;\n /** GraphQL supergraph endpoint (`<base>/graphql`). */\n graphqlUrl: string;\n}\n\n/**\n * Reads the tab-side sync manager from the browser global. Returns\n * `undefined` in non-browser environments or before the reactor client\n * module is initialized.\n */\nexport function getBrowserSyncManager(): ISyncManager | undefined {\n if (typeof window === \"undefined\") {\n return undefined;\n }\n return getPHStore()?.reactorClientModule?.reactorModule?.syncModule\n ?.syncManager;\n}\n\n/** Suffix of the per-drive GraphQL channel endpoint the switchboard serves. */\nexport const GQL_CHANNEL_SUFFIX = \"/graphql/r\";\n\n/**\n * Resolves the switchboard that serves a drive, if any.\n *\n * Every remote drive stores its switchboard's exact GraphQL channel\n * endpoint in its sync remote — `channelConfig = { type: \"gql\",\n * parameters: { url: \"<origin>/graphql/r\" } }` — and the switchboard base\n * is that URL minus the `/graphql/r` suffix. Deriving it per drive (rather\n * than from a global setting) is what keeps multi-switchboard deployments\n * correct. Drives that are not synced to a remote switchboard (local\n * drives, other channel types, unexpected shapes) return `undefined`.\n */\nexport function resolveDriveSwitchboard(\n driveId: string | undefined,\n syncManager?: ISyncManager,\n): DriveSwitchboard | undefined {\n const manager = syncManager ?? getBrowserSyncManager();\n if (!driveId || !manager) {\n return undefined;\n }\n const collectionId = DriveCollectionId.forDrive(driveId);\n const remote = manager\n .list()\n .find((r) => r.meta.collectionId.equals(collectionId));\n if (!remote) {\n return undefined;\n }\n const { channelConfig } = remote.meta;\n if (channelConfig.type !== \"gql\") {\n return undefined;\n }\n const url = channelConfig.parameters.url;\n if (typeof url !== \"string\" || !url.endsWith(GQL_CHANNEL_SUFFIX)) {\n return undefined;\n }\n const switchboardUrl = url.slice(0, -GQL_CHANNEL_SUFFIX.length);\n return { switchboardUrl, graphqlUrl: `${switchboardUrl}/graphql` };\n}\n\n/** A bounded introspected GraphQL type reference (see the query below). */\ntype IntrospectedTypeRef = {\n kind: string;\n name: string | null;\n ofType?: IntrospectedTypeRef | null;\n};\n\ntype IntrospectedField = {\n name: string;\n description: string | null;\n args: Array<{ name: string; type: IntrospectedTypeRef }>;\n type: IntrospectedTypeRef;\n};\n\ntype IntrospectedRootType = {\n fields: IntrospectedField[] | null;\n} | null;\n\ntype IntrospectedSchema = {\n queryType?: IntrospectedRootType;\n mutationType?: IntrospectedRootType;\n};\n\n/**\n * Introspection over the switchboard supergraph's root query and mutation\n * fields. Types are requested with three levels of `ofType` nesting so\n * that common shapes like `[X!]!` (LIST(NON_NULL(LIST(X)))) render fully.\n */\nexport const SWITCHBOARD_INTROSPECTION_QUERY: string = /* GraphQL */ `\n query SwitchboardIntrospection {\n __schema {\n queryType {\n fields {\n name\n description\n args {\n name\n type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n mutationType {\n fields {\n name\n description\n args {\n name\n type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n`;\n\n/**\n * Renders an introspected type reference as a GraphQL type string.\n * Recursion is bounded by the `ofType` nesting of the query, so it always\n * terminates.\n */\nfunction renderTypeRef(type: IntrospectedTypeRef | null | undefined): string {\n if (!type) {\n return \"Unknown\";\n }\n switch (type.kind) {\n case \"NON_NULL\":\n return `${renderTypeRef(type.ofType)}!`;\n case \"LIST\":\n return `[${renderTypeRef(type.ofType)}]`;\n default:\n return type.name ?? \"Unknown\";\n }\n}\n\n/** One root query or mutation field, reduced to a prompt-friendly line. */\nexport type SchemaFieldSummary = {\n name: string;\n description?: string;\n args: string;\n returns: string;\n};\n\n/** Cap on the number of fields reported per root type. */\nconst MAX_FIELDS_PER_ROOT = 200;\n\nfunction summarizeFields(fields: IntrospectedField[] | null | undefined): {\n fields: SchemaFieldSummary[];\n truncated: boolean;\n} {\n const list = fields ?? [];\n return {\n fields: list.slice(0, MAX_FIELDS_PER_ROOT).map((field) => ({\n name: field.name,\n ...(field.description ? { description: field.description } : {}),\n args: field.args\n .map((arg) => `${arg.name}: ${renderTypeRef(arg.type)}`)\n .join(\", \"),\n returns: renderTypeRef(field.type),\n })),\n truncated: list.length > MAX_FIELDS_PER_ROOT,\n };\n}\n\n/**\n * Reduces a GraphQL `__schema` introspection payload (the `data.__schema`\n * object) to a compact summary of its root query and mutation fields.\n * Accepts `unknown` because the payload arrives over the wire.\n */\nexport function summarizeIntrospectionSchema(schema: unknown): {\n queries: SchemaFieldSummary[];\n mutations: SchemaFieldSummary[];\n truncated: boolean;\n} {\n const introspection = (schema ?? {}) as IntrospectedSchema;\n const queries = summarizeFields(introspection.queryType?.fields);\n const mutations = summarizeFields(introspection.mutationType?.fields);\n return {\n queries: queries.fields,\n mutations: mutations.fields,\n truncated: queries.truncated || mutations.truncated,\n };\n}\n\nexport const SWITCHBOARD_SCHEMA_TOOL_NAME = \"getSwitchboardSchema\";\n\n/** Test seams for {@link createSwitchboardSchemaTool}. */\nexport interface SwitchboardToolDeps {\n getSyncManager?: () => ISyncManager | undefined;\n getSelectedDriveId?: () => string | undefined;\n tokenProvider?: () => Promise<string | undefined>;\n fetchImpl?: typeof fetch;\n timeoutMs?: number;\n}\n\n/**\n * Creates the read-only `getSwitchboardSchema` tool: it introspects the\n * GraphQL supergraph of the switchboard serving a drive and returns a\n * summary of its root queries and mutations. It reads the schema only and\n * never modifies data.\n */\nexport function createSwitchboardSchemaTool(\n deps?: SwitchboardToolDeps,\n): AiToolDescriptor {\n const getSyncManager = deps?.getSyncManager ?? getBrowserSyncManager;\n const getSelectedDriveId =\n deps?.getSelectedDriveId ??\n ((): string | undefined =>\n typeof window === \"undefined\"\n ? undefined\n : getPHStore()?.selectedDriveId);\n const tokenProvider = deps?.tokenProvider ?? ambientRenownTokenProvider;\n const fetchImpl = deps?.fetchImpl ?? fetch;\n const timeoutMs = deps?.timeoutMs ?? 10_000;\n\n return {\n name: SWITCHBOARD_SCHEMA_TOOL_NAME,\n description:\n \"Introspect the GraphQL endpoint of the switchboard serving a drive and list the queries and mutations it exposes (reactor operations, document-model read models, package subgraphs). Read-only: it reads the schema only and never modifies data. Omit driveId to introspect the currently selected drive.\",\n inputSchema: {\n driveId: z\n .string()\n .describe(\n \"Drive to introspect. Omit to use the currently selected drive.\",\n )\n .optional(),\n },\n annotations: { readOnlyHint: true },\n callback: async (input: { driveId?: string } | undefined) => {\n const driveId = input?.driveId ?? getSelectedDriveId();\n const sb = resolveDriveSwitchboard(driveId, getSyncManager());\n if (!sb) {\n throw new Error(\n driveId\n ? `Drive \"${driveId}\" has no switchboard: it is not synced to a remote switchboard.`\n : \"No drive is currently selected and no driveId was given.\",\n );\n }\n\n const token = await tokenProvider();\n let response: Response;\n try {\n response = await fetchImpl(sb.graphqlUrl, {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n ...(token ? { authorization: `Bearer ${token}` } : {}),\n },\n body: JSON.stringify({ query: SWITCHBOARD_INTROSPECTION_QUERY }),\n signal: AbortSignal.timeout(timeoutMs),\n });\n } catch (error) {\n throw new Error(\n `Switchboard at ${sb.graphqlUrl} is not reachable: ${\n error instanceof Error ? error.message : String(error)\n }`,\n { cause: error },\n );\n }\n\n if (response.status === 401 || response.status === 403) {\n throw new Error(\n `Switchboard at ${sb.graphqlUrl} refused the request (HTTP ${response.status}). Sign in to the switchboard (Renown) and try again.`,\n );\n }\n if (!response.ok) {\n throw new Error(\n `Switchboard introspection failed: HTTP ${response.status} ${response.statusText} from ${sb.graphqlUrl}`,\n );\n }\n\n const body = (await response.json()) as {\n errors?: Array<{ message?: string }>;\n data?: { __schema?: unknown } | null;\n } | null;\n const schemaErrors = body?.errors;\n if (schemaErrors && schemaErrors.length > 0) {\n throw new Error(\n schemaErrors.map((e) => e.message ?? \"unknown error\").join(\"; \"),\n );\n }\n const schema = body?.data?.__schema as\n | IntrospectedSchema\n | null\n | undefined;\n if (!schema?.queryType) {\n throw new Error(\n `Switchboard at ${sb.graphqlUrl} did not return a GraphQL schema.`,\n );\n }\n\n const summary = summarizeIntrospectionSchema(schema);\n return {\n switchboardUrl: sb.switchboardUrl,\n graphqlUrl: sb.graphqlUrl,\n ...summary,\n };\n },\n };\n}\n"],"mappings":";;;;;;;;;;;AAKA,SAAgB,YAAY,IAAiD;CAC3E,OAAO,aAAa,mBAAmB,GAAG,EAAE;AAC9C;;;;ACYA,SAAgB,kBAAoC;CAClD,OAAO,YAAY,kBAAkB,CAAC;AACxC;;;;ACbA,SAAgB,kBAId,YACA,cACA;CACA,MAAM,CAAC,UAAU,YAAY,gBAAgB,UAAU;CACvD,MAAM,sBAAsB,2BAA2B,YAAY;CAEnE,IAAI,CAAC,cAAc,CAAC,cAAc,OAAO,CAAC;CAE1C,IAAI,CAAC,UACH,MAAM,IAAI,MAAM,uBAAuB,YAAY;CAErD,IAAI,CAAC,qBACH,MAAM,IAAI,oBAAoB,YAAY;CAG5C,IAAI,SAAS,OAAO,iBAAiB,cACnC,MAAM,IAAI,0BACR,YACA,c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
"version": "6.2.3-dev.
|
|
3
|
+
"version": "6.2.3-dev.82",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -64,17 +64,18 @@
|
|
|
64
64
|
"sideEffects": false,
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@ai-sdk/openai-compatible": "3.0.65",
|
|
67
|
-
"@powerhousedao/analytics-engine-browser": "6.2.3-dev.
|
|
68
|
-
"@powerhousedao/analytics-engine-core": "6.2.3-dev.
|
|
69
|
-
"@powerhousedao/reactor": "6.2.3-dev.
|
|
70
|
-
"@powerhousedao/reactor-attachments": "6.2.3-dev.
|
|
71
|
-
"@powerhousedao/reactor-drive": "6.2.3-dev.
|
|
72
|
-
"@powerhousedao/
|
|
73
|
-
"@
|
|
67
|
+
"@powerhousedao/analytics-engine-browser": "6.2.3-dev.82",
|
|
68
|
+
"@powerhousedao/analytics-engine-core": "6.2.3-dev.82",
|
|
69
|
+
"@powerhousedao/reactor": "6.2.3-dev.82",
|
|
70
|
+
"@powerhousedao/reactor-attachments": "6.2.3-dev.82",
|
|
71
|
+
"@powerhousedao/reactor-drive": "6.2.3-dev.82",
|
|
72
|
+
"@powerhousedao/reactor-router": "6.2.3-dev.82",
|
|
73
|
+
"@powerhousedao/shared": "6.2.3-dev.82",
|
|
74
|
+
"@renown/sdk": "6.2.3-dev.82",
|
|
74
75
|
"@tanstack/react-query": "^5.49.2",
|
|
75
76
|
"ai": "7.0.130",
|
|
76
77
|
"change-case": "5.4.4",
|
|
77
|
-
"document-model": "6.2.3-dev.
|
|
78
|
+
"document-model": "6.2.3-dev.82",
|
|
78
79
|
"es-module-lexer": "^2.0.0",
|
|
79
80
|
"graphql-request": "7.4.0",
|
|
80
81
|
"graphql-ws": "6.0.7",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-service-DPWkKp3y.d.ts","names":[],"sources":["../src/actions/dispatch.ts","../src/document-refetcher.ts","../src/document-cache.ts","../src/remote-controller/types.ts","../src/graphql-client/adapter.ts","../src/graphql-client/auth.ts","../src/graphql-client/drive-nodes.ts","../src/graphql-client/errors.ts","../src/graphql-client/subgraph.ts","../src/graphql-client/graphql-reactor-client.ts","../src/graphql-client/graphql-reactor-provider.tsx","../src/graphql-client/operations.ts","../src/graphql-client/signing.ts","../src/graphql-client/static-package-manager.ts","../src/graphql-client/subscriptions.ts","../src/hooks/document-cache.ts","../src/hooks/reactor.ts","../src/hooks/dispatch.ts","../src/hooks/document-model-modules.ts","../src/hooks/document-operations.ts","../src/hooks/attachment-service.ts"],"mappings":";;;;;;;;;;;;;;;;KAoHY,2BACV,QAAQ,cACR,SAAS;;;;;;;;;;;iBAaW,gBAAgB,YAAY,cAAY,UAAU,UACtE,iBAAiB,YAAY,qBAC7B,UAAU,uBACV,YAAY,QAAQ,kBACpB,YAAY,0BACX,QAAQ;;;;;;;;;;;iBAWW,gBACpB,iBAAiB,aAAW,sBAC5B,oBACA,YAAY,QAAQ,kBACpB,YAAY,0BACX,QAAQ;;;;cC/IE,oBAAoB;;;;;;;UCmBhB,6BAEb,KACE,4EAGF,QAAQ,KAAK;;cAGJ;iBAEG,gBAAgB,GAAG,SAAS,QAAQ,KAAK,iBAAiB;iBAwB1D,iBAAiB,GAC/B,SAAS,QAAQ,KAAK,iBAAiB,KACtC,aAAa;;cA4BH,uBAAuB;;iBAQpB,iBAAiB,iBAAiB,SAAS;;cAa9C,8BAA8B;;iBAU3B,oBACd,iBACC,SAAS;;;;;;;;;;;cAuFC,yBACA,gBAAgB,iBAAiB;UAEpC;UACA;UAIA;UAEA;;;;;;;;UAkBA;;UAGA;;UAKA;UACA;;UAGA;UACA;UACA;UAEA;mBACS;EAEjB,YAAY,QAAQ,0BAAwB;UAUpC;UAwBA;UAeM;UAON;;UAOA;;UAKA;UAMA;EAQR,IAAI,YAAY,oBAAoB,QAAQ;EA0B5C,gBAAgB,aAAa;EAI7B,SAAS,gBAAgB,QAAQ;;;;;;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