@powerhousedao/reactor-browser 6.2.3-dev.9 → 6.2.3-dev.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/{attachment-service-D3EhiAJ7.d.ts → attachment-service-10Qn5nIw.d.ts} +766 -108
  2. package/dist/attachment-service-10Qn5nIw.d.ts.map +1 -0
  3. package/dist/auth-DzIYxeEJ.d.ts +32 -0
  4. package/dist/auth-DzIYxeEJ.d.ts.map +1 -0
  5. package/dist/{client-DjK30EQ-.js → client-BFnMV-EO.js} +39 -22
  6. package/dist/client-BFnMV-EO.js.map +1 -0
  7. package/dist/{client-D66jVnot.js → client-BNMyQ_Z2.js} +372 -33
  8. package/dist/client-BNMyQ_Z2.js.map +1 -0
  9. package/dist/{client-BIHN_UyR.d.ts → client-C-NgSjoc.d.ts} +4 -3
  10. package/dist/client-C-NgSjoc.d.ts.map +1 -0
  11. package/dist/dispatch-Cylwl2Dk.js +1173 -0
  12. package/dist/dispatch-Cylwl2Dk.js.map +1 -0
  13. package/dist/document-by-id-DdvqanGR.js +16 -0
  14. package/dist/document-by-id-DdvqanGR.js.map +1 -0
  15. package/dist/document-model-modules-ChmfyIxT.js +644 -0
  16. package/dist/document-model-modules-ChmfyIxT.js.map +1 -0
  17. package/dist/document-operations-QtU34A52.js +4664 -0
  18. package/dist/document-operations-QtU34A52.js.map +1 -0
  19. package/dist/global-bbfp3_1x.d.ts +649 -0
  20. package/dist/global-bbfp3_1x.d.ts.map +1 -0
  21. package/dist/{index-B33TKEqp.d.ts → index-Bfr_cWdi.d.ts} +31 -100
  22. package/dist/index-Bfr_cWdi.d.ts.map +1 -0
  23. package/dist/{index-BIVDXw3K.d.ts → index-rtDmzViP.d.ts} +3 -3
  24. package/dist/index-rtDmzViP.d.ts.map +1 -0
  25. package/dist/index.d.ts +837 -411
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +851 -129
  28. package/dist/index.js.map +1 -1
  29. package/dist/inspector-proxy-DODqs15F.d.ts +25 -0
  30. package/dist/inspector-proxy-DODqs15F.d.ts.map +1 -0
  31. package/dist/make-ph-event-functions-B5GU5xcR.js +180 -0
  32. package/dist/make-ph-event-functions-B5GU5xcR.js.map +1 -0
  33. package/dist/{pglite-CntadC_p-9NDG14dS.d.ts → pglite-CntadC_p-DTkdF8sr.d.ts} +11 -33
  34. package/dist/pglite-CntadC_p-DTkdF8sr.d.ts.map +1 -0
  35. package/dist/{relational-D1RB45sA.js → relational-DZuyKp2y.js} +66 -5
  36. package/dist/relational-DZuyKp2y.js.map +1 -0
  37. package/dist/{renown-rqK8sokh.js → renown-B3MUaiq7.js} +61 -31
  38. package/dist/renown-B3MUaiq7.js.map +1 -0
  39. package/dist/renown-CBoTdGrg.js +394 -0
  40. package/dist/renown-CBoTdGrg.js.map +1 -0
  41. package/dist/{types-Dcv1ZLoW.d.ts → schema-Bn6L3QR1.d.ts} +324 -64
  42. package/dist/schema-Bn6L3QR1.d.ts.map +1 -0
  43. package/dist/src/ai/index.d.ts +276 -75
  44. package/dist/src/ai/index.d.ts.map +1 -1
  45. package/dist/src/ai/index.js +733 -172
  46. package/dist/src/ai/index.js.map +1 -1
  47. package/dist/src/analytics/index.d.ts +36 -44
  48. package/dist/src/analytics/index.d.ts.map +1 -1
  49. package/dist/src/analytics/index.js +4 -4
  50. package/dist/src/analytics/index.js.map +1 -1
  51. package/dist/src/document-model.d.ts +3 -4
  52. package/dist/src/document-model.d.ts.map +1 -1
  53. package/dist/src/document-model.js.map +1 -1
  54. package/dist/src/graphql/client.d.ts +4 -3
  55. package/dist/src/graphql/client.js +1 -1
  56. package/dist/src/graphql-client/entry.d.ts +6 -4
  57. package/dist/src/graphql-client/entry.js +4 -4
  58. package/dist/src/relational/index.d.ts +15 -9
  59. package/dist/src/relational/index.d.ts.map +1 -1
  60. package/dist/src/relational/index.js +1 -1
  61. package/dist/src/renown/index.d.ts +3 -2
  62. package/dist/src/renown/index.js +3 -3
  63. package/dist/src/rpc/index.d.ts +217 -140
  64. package/dist/src/rpc/index.d.ts.map +1 -1
  65. package/dist/src/rpc/index.js +600 -623
  66. package/dist/src/rpc/index.js.map +1 -1
  67. package/dist/{store-BJYcr_FL.js → store-DInXcjal.js} +1 -1
  68. package/dist/{store-BJYcr_FL.js.map → store-DInXcjal.js.map} +1 -1
  69. package/dist/{switchboard-CaXQ4-5Q.js → switchboard-B640iT1L.js} +61 -11
  70. package/dist/switchboard-B640iT1L.js.map +1 -0
  71. package/dist/{types-6vDzbRRS.d.ts → types-520nWrB3.d.ts} +2 -2
  72. package/dist/types-520nWrB3.d.ts.map +1 -0
  73. package/dist/types-CT44EMmw.d.ts +59 -0
  74. package/dist/types-CT44EMmw.d.ts.map +1 -0
  75. package/package.json +24 -23
  76. package/dist/attachment-service-D3EhiAJ7.d.ts.map +0 -1
  77. package/dist/client-BIHN_UyR.d.ts.map +0 -1
  78. package/dist/client-D66jVnot.js.map +0 -1
  79. package/dist/client-DjK30EQ-.js.map +0 -1
  80. package/dist/document-by-id-B4FIzG1w.js +0 -519
  81. package/dist/document-by-id-B4FIzG1w.js.map +0 -1
  82. package/dist/document-model-modules-bTP87nyr.js +0 -419
  83. package/dist/document-model-modules-bTP87nyr.js.map +0 -1
  84. package/dist/document-operations-WeE6wIDt.js +0 -2603
  85. package/dist/document-operations-WeE6wIDt.js.map +0 -1
  86. package/dist/global-OuINvEGT.d.ts +0 -401
  87. package/dist/global-OuINvEGT.d.ts.map +0 -1
  88. package/dist/index-B33TKEqp.d.ts.map +0 -1
  89. package/dist/index-BIVDXw3K.d.ts.map +0 -1
  90. package/dist/inspector-proxy-6h5VKAwt.d.ts +0 -257
  91. package/dist/inspector-proxy-6h5VKAwt.d.ts.map +0 -1
  92. package/dist/make-ph-event-functions-DBq3iWYn.js +0 -53
  93. package/dist/make-ph-event-functions-DBq3iWYn.js.map +0 -1
  94. package/dist/pglite-CntadC_p-9NDG14dS.d.ts.map +0 -1
  95. package/dist/relational-D1RB45sA.js.map +0 -1
  96. package/dist/renown-BHxwP7xU.js +0 -97
  97. package/dist/renown-BHxwP7xU.js.map +0 -1
  98. package/dist/renown-rqK8sokh.js.map +0 -1
  99. package/dist/switchboard-CaXQ4-5Q.js.map +0 -1
  100. package/dist/types-6vDzbRRS.d.ts.map +0 -1
  101. package/dist/types-Dcv1ZLoW.d.ts.map +0 -1
@@ -0,0 +1,649 @@
1
+ import { t as PGlite } from "./pglite-CntadC_p-DTkdF8sr.js";
2
+ import { c as ReactorGraphQLClient, r as GraphQLClientWindowEvents } from "./types-CT44EMmw.js";
3
+ import { r as IWorkerAdminClient, t as IInspectorProxy } from "./inspector-proxy-DODqs15F.js";
4
+ import { DragEventHandler, ReactNode } from "react";
5
+ import { DocumentDispatch as DocumentDispatch$2, DocumentModelModule, Operation, PHDocument, PhAiToolDescriptor } from "@powerhousedao/shared/document-model";
6
+ import { IDocumentModelLoader, IReactorClient, IReactorReadClient, IReactorWriteClient, InProcessReactorClientModule, InProcessReactorModule, ReactorClientModule, ReactorModule } from "@powerhousedao/reactor";
7
+ import { DocumentDriveDocument, Node } from "@powerhousedao/shared/document-drive";
8
+ import { IRenown } from "@renown/sdk";
9
+ import { IAttachmentService } from "@powerhousedao/reactor-attachments/client";
10
+ import { WorkerPackageSource } from "@powerhousedao/reactor/rpc";
11
+ import { PHGlobal, PHGlobalKey } from "@powerhousedao/reactor-browser";
12
+ import { PHConnectRenownAdapters } from "@powerhousedao/shared/clis";
13
+ import { DocumentModelLib, RegistryPackageSource } from "@powerhousedao/shared";
14
+ //#region src/types/documents.d.ts
15
+ type PromiseWithState<T> = Promise<T> & PromiseState<T>;
16
+ type FulfilledPromise<T> = Promise<T> & {
17
+ status: "fulfilled";
18
+ value: T;
19
+ };
20
+ type RejectedPromise<T> = Promise<T> & {
21
+ status: "rejected";
22
+ reason: unknown;
23
+ };
24
+ type PromiseState<T> = {
25
+ status: "pending";
26
+ } | {
27
+ status: "fulfilled";
28
+ value: T;
29
+ } | {
30
+ status: "rejected";
31
+ reason: unknown;
32
+ };
33
+ /** A refetch of an already-loaded document. `error` is the last failure that kept the loaded document. */
34
+ type DocumentRefetchState = {
35
+ isRefetching: boolean;
36
+ error: unknown;
37
+ };
38
+ interface IDocumentCache {
39
+ get(id: string, refetch?: boolean): Promise<PHDocument>;
40
+ getBatch(ids: string[], refetch?: boolean): Promise<PHDocument[]>;
41
+ subscribe(id: string | string[], callback: () => void): () => void;
42
+ /** Stable snapshot of the refetch of `id`. Optional: not every cache refetches in the background. */
43
+ getRefetchState?(id: string): DocumentRefetchState;
44
+ }
45
+ /** Snapshot of one document scope's operations as the cache knows them. */
46
+ type OperationsCacheEntry = {
47
+ /** `idle` means nothing has been requested since the last invalidation. */
48
+ status: "idle" | "pending" | "success" | "error";
49
+ /** Every operation loaded so far, oldest first, across all loaded pages. */
50
+ operations: readonly Operation[];
51
+ /** The rejection reason of the last failed page; `undefined` otherwise. */
52
+ error: unknown;
53
+ /** Whether the last loaded page reported a further page. */
54
+ hasNextPage: boolean;
55
+ };
56
+ /** The documents of one type loaded so far, in `find`'s order, across loaded pages. */
57
+ type DocumentsOfTypeEntry = {
58
+ /** `idle` means nothing has been requested yet. */
59
+ status: "idle" | "pending" | "success" | "error";
60
+ /** The ids loaded so far; the documents themselves are in the document cache. */
61
+ ids: readonly string[];
62
+ /** The rejection reason of the last failed page; `undefined` otherwise. */
63
+ error: unknown;
64
+ /** Whether the last loaded page reported a further page. */
65
+ hasNextPage: boolean;
66
+ };
67
+ /** Documents by type, a page at a time; loaded pages reload when one of the
68
+ * type is created or deleted, and a changed one updates in the document cache. */
69
+ interface IDocumentTypeCache {
70
+ /** Current snapshot of `type` paged by `limit`; a shared idle entry when nothing is loaded. */
71
+ getDocumentsOfTypeState(type: string, limit: number): DocumentsOfTypeEntry;
72
+ /** Loads the first page, once; settles when it has loaded or failed. */
73
+ loadDocumentsOfType(type: string, limit: number): Promise<void>;
74
+ /** Loads the page after the last one; no-op unless loaded with a next page. */
75
+ loadMoreDocumentsOfType(type: string, limit: number): void;
76
+ /** Subscribes to changes of `type` paged by `limit`. Returns the unsubscribe function. */
77
+ subscribeDocumentsOfType(type: string, limit: number, callback: () => void): () => void;
78
+ }
79
+ /**
80
+ * Operation history keyed by document id and scope. Pages are fetched
81
+ * oldest first and appended. A document change event drops every scope of
82
+ * that document so the next read starts from the first page again.
83
+ */
84
+ interface IOperationCache {
85
+ /** Current snapshot; a shared idle entry when nothing is cached. */
86
+ getOperationsState(documentId: string, scope: string): OperationsCacheEntry;
87
+ /** Loads the first page. No-op unless the entry is idle. */
88
+ loadOperations(documentId: string, scope: string, limit: number): void;
89
+ /** Loads the page after the last one and appends it. No-op unless the entry is loaded and has a next page. */
90
+ loadMoreOperations(documentId: string, scope: string): void;
91
+ /** Drops every cached scope of the document, aborts in-flight requests, notifies listeners. */
92
+ invalidateOperations(documentId: string): void;
93
+ /** Subscribes to changes of any scope of the document. Returns the unsubscribe function. */
94
+ subscribeOperations(documentId: string, callback: () => void): () => void;
95
+ }
96
+ //#endregion
97
+ //#region src/types/reactor-browser-client.d.ts
98
+ /**
99
+ * The reads the reactor-browser hooks make: a derived subset of
100
+ * {@link IReactorReadClient}, so the signatures can never drift from the
101
+ * reactor's own.
102
+ */
103
+ interface IReactorBrowserReadClient extends Pick<IReactorReadClient, "get" | "getMany" | "find" | "getOperations" | "subscribe" | "waitForJob" | "getJobStatus" | "drives"> {}
104
+ /**
105
+ * The writes the reactor-browser hooks make: a derived subset of
106
+ * {@link IReactorWriteClient}. Each resolves once its job is accepted and
107
+ * hands back a `WriteHandle`; a caller that needs the document reads it back
108
+ * with `handle.document()`.
109
+ */
110
+ interface IReactorBrowserWriteClient extends Pick<IReactorWriteClient, "execute" | "create" | "deleteDocument"> {}
111
+ /**
112
+ * Minimal client contract the reactor-browser hooks depend on.
113
+ *
114
+ * It is a derived subset of {@link IReactorClient}, so the member signatures
115
+ * can never drift from the reactor's own. Two implementations satisfy it: the
116
+ * full in-browser reactor client (automatically, since it implements
117
+ * `IReactorClient`) and `GraphQLReactorClient`, which talks plain GraphQL to a
118
+ * Switchboard without bundling a reactor.
119
+ *
120
+ * `read` and `write` are the client halves the hooks use. The picked facade
121
+ * methods are kept for callers that have not moved to the halves.
122
+ *
123
+ * Deliberately excluded: `drives`, relationships, `resolveIdOrSlug`,
124
+ * `executeAsync`/`executeBatch`, `createEmpty`, `rename` and the document
125
+ * model module getters.
126
+ */
127
+ interface IReactorBrowserClient$1 extends Pick<IReactorClient, "get" | "find" | "subscribe" | "execute" | "getOperations" | "newDocument" | "create" | "deleteDocument" | "undo" | "redo" | "undoRedoTargets" | "undoRedoAvailability"> {
128
+ readonly read: IReactorBrowserReadClient;
129
+ readonly write: IReactorBrowserWriteClient;
130
+ }
131
+ /** The client halves `window.ph.reactor` holds. */
132
+ type ReactorBrowserHalves$1 = {
133
+ read: IReactorBrowserReadClient;
134
+ write: IReactorBrowserWriteClient;
135
+ };
136
+ //#endregion
137
+ //#region src/types/config.d.ts
138
+ type PHGlobalConfig$1 = PHCommonGlobalConfig & PHAppConfig$1 & PHDocumentEditorConfig$1 & PHDrivesGlobalConfig & PHAnalyticsGlobalConfig & PHRelationalProcessorsGlobalConfig & PHProcessorsGlobalConfig & PHRenownGlobalConfig & PHSentryGlobalConfig;
139
+ type PHGlobalConfigKey$1 = keyof PHGlobalConfig$1;
140
+ type PHGlobalConfigSetters$1 = PHGlobalConfigSettersForKey<PHGlobalConfigKey$1>;
141
+ type PHGlobalConfigHooks$1 = PHGlobalConfigHooksForKey<PHGlobalConfigKey$1>;
142
+ /**
143
+ * Editor configuration settings which are globally available to your custom apps.
144
+ *
145
+ * Setting these will override the defaults when your editor is mounted.
146
+ */
147
+ type PHAppConfig$1 = {
148
+ /** Allows you to specify the document types that are allowed to be added to the drive.
149
+ * An empty array means that any document type is allowed.
150
+ */
151
+ allowedDocumentTypes?: string[];
152
+ /** Whether drag and drop is enabled for the app. */
153
+ isDragAndDropEnabled?: boolean;
154
+ };
155
+ type PHAppConfigKey$1 = keyof PHAppConfig$1;
156
+ type PHAppConfigSetters$1 = PHGlobalConfigSettersForKey<PHAppConfigKey$1>;
157
+ type PHAppConfigHooks$1 = PHGlobalConfigHooksForKey<PHAppConfigKey$1>;
158
+ type PHDocumentEditorConfig$1 = {
159
+ /** Whether external controls are enabled for the document editor. */
160
+ isExternalControlsEnabled?: boolean;
161
+ };
162
+ type PHDocumentEditorConfigKey$1 = keyof PHDocumentEditorConfig$1;
163
+ type PHDocumentEditorConfigSetters$1 = PHGlobalConfigSettersForKey<PHDocumentEditorConfigKey$1>;
164
+ type PHDocumentEditorConfigHooks$1 = PHGlobalConfigHooksForKey<PHDocumentEditorConfigKey$1>;
165
+ type PHCommonGlobalConfig = {
166
+ basePath?: string;
167
+ routerBasename?: string;
168
+ version?: string;
169
+ requiresHardRefresh?: boolean;
170
+ warnOutdatedApp?: boolean;
171
+ studioMode?: boolean;
172
+ versionCheckInterval?: number;
173
+ cliVersion?: string;
174
+ fileUploadOperationsChunkSize?: number;
175
+ gaTrackingId?: string;
176
+ isDocumentModelSelectionSettingsEnabled?: boolean;
177
+ isAddDriveEnabled?: boolean;
178
+ isPublicDrivesEnabled?: boolean;
179
+ isAddPublicDrivesEnabled?: boolean;
180
+ isDeletePublicDrivesEnabled?: boolean;
181
+ isCloudDrivesEnabled?: boolean;
182
+ isAddCloudDrivesEnabled?: boolean;
183
+ isDeleteCloudDrivesEnabled?: boolean;
184
+ isLocalDrivesEnabled?: boolean;
185
+ isAddLocalDrivesEnabled?: boolean;
186
+ isDeleteLocalDrivesEnabled?: boolean;
187
+ allowList?: string[];
188
+ analyticsDatabaseName?: string;
189
+ logLevel?: "debug" | "info" | "warn" | "error";
190
+ isEditorDebugModeEnabled?: boolean;
191
+ isEditorReadModeEnabled?: boolean;
192
+ disabledEditors?: string[];
193
+ enabledEditors?: string[];
194
+ };
195
+ type PHDrivesGlobalConfig = {
196
+ defaultDrivesUrl?: string;
197
+ drivesPreserveStrategy?: string;
198
+ };
199
+ type PHAnalyticsGlobalConfig = {
200
+ isAnalyticsEnabled?: boolean;
201
+ isAnalyticsDatabaseWorkerEnabled?: boolean;
202
+ isDiffAnalyticsEnabled?: boolean;
203
+ isDriveAnalyticsEnabled?: boolean;
204
+ isAnalyticsExternalProcessorsEnabled?: boolean;
205
+ };
206
+ type PHRelationalProcessorsGlobalConfig = {
207
+ isRelationalProcessorsEnabled?: boolean;
208
+ isExternalRelationalProcessorsEnabled?: boolean;
209
+ };
210
+ type PHProcessorsGlobalConfig = {
211
+ isExternalProcessorsEnabled?: boolean;
212
+ isExternalPackagesEnabled?: boolean;
213
+ };
214
+ type PHRenownGlobalConfig = {
215
+ renownUrl?: string;
216
+ renownNetworkId?: string;
217
+ renownChainId?: number;
218
+ switchboardUrl?: string;
219
+ renownAdapters?: PHConnectRenownAdapters;
220
+ };
221
+ type PHSentryGlobalConfig = {
222
+ sentryRelease?: string;
223
+ sentryDsn?: string;
224
+ sentryEnv?: string;
225
+ isSentryTracingEnabled?: boolean;
226
+ };
227
+ type PHGlobalConfigSettersForKey<T extends PHGlobalConfigKey$1> = { [K in T]: (value: PHGlobalConfig$1[K]) => void; };
228
+ type PHGlobalConfigHooksForKey<TKey extends PHGlobalConfigKey$1> = { [K in TKey]: () => PHGlobalConfig$1[K]; };
229
+ /** Helper type for ensuring keys are all present while still allowing them to be set */
230
+ type FullPHGlobalConfig = Record<PHGlobalConfigKey$1, PHGlobalConfig$1[PHGlobalConfigKey$1]>;
231
+ //#endregion
232
+ //#region src/types/modals.d.ts
233
+ type PHModal$1 = {
234
+ type: "createDocument";
235
+ documentType: string;
236
+ documentModelVersion?: number;
237
+ /** The drive to create it in; else the open drive, else the user picks one. */
238
+ driveId?: string;
239
+ } | {
240
+ type: "deleteItem";
241
+ id: string;
242
+ } | {
243
+ type: "addDrive";
244
+ } | {
245
+ type: "upgradeDrive";
246
+ driveId: string;
247
+ } | {
248
+ type: "deleteDrive";
249
+ driveId: string;
250
+ } | {
251
+ type: "driveSettings";
252
+ driveId: string;
253
+ } |
254
+ /** @deprecated Open `{ settings: true }` through the navigation instead. */
255
+ {
256
+ type: "settings";
257
+ } | {
258
+ type: "clearStorage";
259
+ } | {
260
+ type: "debugSettings";
261
+ } | {
262
+ type: "disclaimer";
263
+ } | {
264
+ type: "cookiesPolicy";
265
+ } | {
266
+ type: "downloadDocumentWithErrors";
267
+ documentId: string;
268
+ } | {
269
+ type: "inspector";
270
+ } | {
271
+ type: "documentVersionUnsupported";
272
+ documentType: string;
273
+ requiredVersion: number;
274
+ availableVersions: number[];
275
+ } | {
276
+ type: "confirmDocumentUpgrade";
277
+ documentId: string;
278
+ } | {
279
+ type: "driveAuthRequired";
280
+ } | {
281
+ type: "openFileDocuments";
282
+ } | {
283
+ type: "login";
284
+ };
285
+ //#endregion
286
+ //#region src/types/package-discovery.d.ts
287
+ type PendingInstallation = {
288
+ documentType: string;
289
+ packageNames: string[];
290
+ };
291
+ type FailedInstallationReason = "no-registry" | "not-in-registry" | "registry-error" | "install-failed" | "dismissed" | "offline";
292
+ type FailedInstallation = {
293
+ documentType: string;
294
+ reason: FailedInstallationReason;
295
+ packageNames: string[];
296
+ error: Error | null;
297
+ };
298
+ type DiscoveryEvent = {
299
+ type: "type-discovered";
300
+ documentType: string;
301
+ packageNames: string[];
302
+ } | {
303
+ type: "installation-prompted";
304
+ documentType: string;
305
+ packageNames: string[];
306
+ } | {
307
+ type: "installation-approved";
308
+ packageName: string;
309
+ documentTypes: string[];
310
+ } | {
311
+ type: "installation-dismissed";
312
+ packageName: string;
313
+ documentTypes: string[];
314
+ } | {
315
+ type: "installation-failed";
316
+ packageName: string;
317
+ error: Error;
318
+ } | {
319
+ type: "registry-query-failed";
320
+ documentType: string;
321
+ error: Error;
322
+ } | {
323
+ type: "load-failed";
324
+ documentType: string;
325
+ reason: FailedInstallationReason;
326
+ };
327
+ type DiscoveryEventListener = (event: DiscoveryEvent) => void;
328
+ interface IPackageDiscoveryService {
329
+ load(documentType: string): Promise<DocumentModelModule<any>>;
330
+ getPendingInstallations(): PendingInstallation[];
331
+ subscribePending(listener: () => void): () => void;
332
+ getFailedInstallations(): FailedInstallation[];
333
+ subscribeFailed(listener: () => void): () => void;
334
+ subscribeEvents(listener: DiscoveryEventListener): () => void;
335
+ approveInstallation(packageName: string): Promise<void>;
336
+ dismissInstallation(packageName: string): void;
337
+ promptInstallation(documentType: string): void;
338
+ retryInstallation(documentType: string): Promise<void>;
339
+ }
340
+ //#endregion
341
+ //#region src/types/timeline.d.ts
342
+ type TimelineBarItem = {
343
+ id: string;
344
+ type: "bar";
345
+ addSize?: 0 | 1 | 2 | 3 | 4;
346
+ delSize?: 0 | 1 | 2 | 3 | 4;
347
+ timestampUtcMs?: string;
348
+ additions?: number;
349
+ deletions?: number;
350
+ revision?: number;
351
+ startDate?: Date;
352
+ endDate?: Date;
353
+ };
354
+ type TimelineDividerItem = {
355
+ id: string;
356
+ type: "divider";
357
+ timestampUtcMs?: string;
358
+ title?: string;
359
+ subtitle?: string;
360
+ revision?: number;
361
+ startDate?: Date;
362
+ endDate?: Date;
363
+ };
364
+ type TimelineItem = TimelineBarItem | TimelineDividerItem;
365
+ //#endregion
366
+ //#region src/types/toast.d.ts
367
+ type PHToastType = "default" | "success" | "error" | "warning" | "info" | "connect-success" | "connect-warning" | "connect-loading" | "connect-deleted";
368
+ type PHToastOptions = {
369
+ type?: PHToastType;
370
+ autoClose?: number | false;
371
+ containerId?: string;
372
+ };
373
+ type PHToastFn = (content: ReactNode | string, options?: PHToastOptions) => void;
374
+ //#endregion
375
+ //#region src/types/vetra.d.ts
376
+ type IPackagesListener = (data: {
377
+ packages: DocumentModelLib[];
378
+ }) => void;
379
+ type IPackageListerUnsubscribe = () => void;
380
+ type PackageManagerInstallResult = {
381
+ type: "success";
382
+ package: DocumentModelLib;
383
+ } | {
384
+ type: "error";
385
+ error: Error;
386
+ };
387
+ interface IPackageManager extends IDocumentModelLoader {
388
+ registryUrl: string | null;
389
+ packages: DocumentModelLib[];
390
+ addPackage(packageName: string): Promise<PackageManagerInstallResult> | PackageManagerInstallResult;
391
+ addPackages(packageNames: string[]): Promise<PackageManagerInstallResult[]> | PackageManagerInstallResult[];
392
+ removePackage(name: string): void;
393
+ updateLocalPackage(pkg: DocumentModelLib, version?: string): void;
394
+ subscribe(handler: IPackagesListener): IPackageListerUnsubscribe;
395
+ getPackageSource: (packageName: string) => RegistryPackageSource | null;
396
+ getPackageVersion: (packageName: string) => string | undefined;
397
+ getPackageSpec: (packageName: string) => string | undefined;
398
+ /**
399
+ * Registry-installed packages keyed by their storage name (the registry
400
+ * spec, e.g. "@powerhousedao/clint-common"). Used by callers that need to
401
+ * diff against an external source of truth such as the publish-reload
402
+ * channel's `/__packages` SSE feed.
403
+ */
404
+ getRegistryPackages: () => {
405
+ name: string;
406
+ version: string | undefined;
407
+ }[];
408
+ addLocalPackage: (name: string, loadedPackage: DocumentModelLib, version?: string) => void;
409
+ }
410
+ //#endregion
411
+ //#region src/hooks/node-drag-and-drop.d.ts
412
+ type DraggingNode = {
413
+ srcId: string;
414
+ parentId: string | null | undefined;
415
+ };
416
+ declare const addDraggingNodeEventHandler: () => void;
417
+ declare function useDragNode(args: {
418
+ srcId: string | undefined;
419
+ parentId: string | null | undefined;
420
+ }): {
421
+ isDragging: boolean;
422
+ draggable: boolean;
423
+ onDragStart: DragEventHandler;
424
+ onDragEnd: DragEventHandler;
425
+ };
426
+ declare function useDropNode(targetId: string | undefined): {
427
+ isDropTarget: boolean;
428
+ onDragEnter: DragEventHandler;
429
+ onDragOver: DragEventHandler;
430
+ onDragLeave: DragEventHandler;
431
+ onDrop: DragEventHandler;
432
+ };
433
+ //#endregion
434
+ //#region src/hooks/ph-store.d.ts
435
+ /** PH state of one app (or one server request); assigning a key notifies. */
436
+ type PHStore = PHGlobal;
437
+ declare const ALL_KEYS: unique symbol;
438
+ declare function createPHStore(initial?: PHGlobal): PHStore;
439
+ /** Subscribes to changes of `key`, or of every key when omitted. */
440
+ declare function subscribePHStore(store: PHStore, listener: () => void, key?: PHGlobalKey | typeof ALL_KEYS): () => void;
441
+ /** Notifies `key`'s listeners without a change, as re-setting a value does. */
442
+ declare function notifyPHStore(store: PHStore, key: PHGlobalKey): void;
443
+ /** A subscribe for `key`, stable per store as useSyncExternalStore expects. */
444
+ declare function getPHStoreSubscribe(store: PHStore, key?: PHGlobalKey): (listener: () => void) => () => void;
445
+ /** The store bound with {@link bindPHStoreToWindow}, if any. */
446
+ declare function getActivePHStore(): PHGlobal | undefined;
447
+ /** The app's state outside React: the bound store, else `window.ph`. */
448
+ declare function getPHStore(): PHStore | undefined;
449
+ /** The bound store; otherwise binds `window.ph` if it is a store, else a new
450
+ * store that takes over a plain `window.ph`'s values. */
451
+ declare function ensurePHStore(): PHStore;
452
+ /** Makes `store` the app's state and `window.ph`; values set on a plain
453
+ * `window.ph` carry over where `store` has none. */
454
+ declare function bindPHStoreToWindow(store: PHStore): void;
455
+ /** Hooks below read from `store`; without a provider they read `window.ph`. */
456
+ declare function PHStoreProvider(props: {
457
+ store: PHStore;
458
+ children: ReactNode;
459
+ }): import("react/jsx-runtime").JSX.Element;
460
+ declare function usePHStore(): PHGlobal | undefined;
461
+ //#endregion
462
+ //#region src/hooks/drive-nodes.d.ts
463
+ /** One drive's cached nodes, read through `read.drives`. */
464
+ type DriveNodesEntry = {
465
+ readonly byId: ReadonlyMap<string, Node>;
466
+ /** "all" once a full listing landed; "partial" holds single fetches or a
467
+ * listing being refreshed. */
468
+ readonly loaded: "none" | "partial" | "all";
469
+ /** The drive's nodes from the last full listing, kept while it refreshes. */
470
+ readonly nodes?: Node[];
471
+ readonly loading?: Promise<Node[]>;
472
+ /** The drive changed while `loading` was in flight: that listing may miss
473
+ * the change, so another one follows as soon as it lands. */
474
+ readonly stale?: true;
475
+ /** The last full listing failed; hooks do not retry until invalidated. */
476
+ readonly error?: unknown;
477
+ };
478
+ /** Node caches by drive id; replaced, never mutated, so hooks see changes. */
479
+ type DriveNodesCache = ReadonlyMap<string, DriveNodesEntry>;
480
+ type DriveNodesOptions = {
481
+ /** Skip the cache and read through `read.drives`. */
482
+ refresh?: boolean;
483
+ store?: PHStore;
484
+ };
485
+ /** Returns the per-drive node caches */
486
+ declare const useDriveNodesCache: () => DriveNodesCache | undefined;
487
+ /** Adds an event handler for the drive node cache */
488
+ declare const addDriveNodesEventHandler: () => void;
489
+ /** Loads every node of a drive into the cache, paging through
490
+ * `read.drives.listNodes`; served from the cache once loaded. */
491
+ declare function loadDriveNodes(driveId: string, options?: DriveNodesOptions): Promise<Node[]>;
492
+ /** A node from the cache, else read through `read.drives.getNode`;
493
+ * undefined when the drive does not hold it. */
494
+ declare function getDriveNode(driveId: string, nodeId: string, options?: DriveNodesOptions): Promise<Node | undefined>;
495
+ /** A node from the cache only, without reading; for synchronous callers. */
496
+ declare function peekDriveNode(driveId: string, nodeId: string, store?: PHStore | undefined): Node | undefined;
497
+ /** Drops a drive's cached nodes; while a hook shows them, they reload and
498
+ * the old nodes stay visible until the new listing lands. */
499
+ declare function invalidateDriveNodes(driveId: string, store?: PHStore | undefined): void;
500
+ /**
501
+ * Notes that this tab wrote to a drive, so the drive change handler re-reads
502
+ * it on the change that follows instead of waiting out its interval: the
503
+ * person who added, renamed or removed a node expects to see it, while a
504
+ * drive being filled by someone else can wait.
505
+ */
506
+ declare function markLocalDriveWrite(driveId: string): void;
507
+ /** Spends a drive's local-write mark; true when one was set. */
508
+ declare function takeLocalDriveWrite(driveId: string): boolean;
509
+ /** Takes a node out of a drive's cache after this tab removed it, so the
510
+ * listing drops it at once instead of after the next drive refresh. */
511
+ declare function dropDriveNode(driveId: string, nodeId: string, store?: PHStore | undefined): void;
512
+ /** Every node of a drive, loaded on first use; undefined until loaded. */
513
+ declare function useDriveNodes(driveId: string | null | undefined): Node[] | undefined;
514
+ /** One node of a drive, from the cache or read on its own. */
515
+ declare function useDriveNode(driveId: string | null | undefined, nodeId: string | null | undefined): Node | undefined;
516
+ //#endregion
517
+ //#region src/types/global.d.ts
518
+ interface BrowserReactorModule extends InProcessReactorModule {
519
+ pg: PGlite;
520
+ }
521
+ interface BrowserReactorClientModule$1 extends InProcessReactorClientModule {
522
+ kind: "browser";
523
+ reactorModule: BrowserReactorModule | undefined;
524
+ }
525
+ type WorkerReactorModule = ReactorModule;
526
+ interface WorkerReactorClientModule$1 extends ReactorClientModule {
527
+ kind: "worker";
528
+ reactorModule: WorkerReactorModule;
529
+ adminClient: IWorkerAdminClient;
530
+ inspector: IInspectorProxy;
531
+ /**
532
+ * Loads (or, for a source already loaded, REPLACES) URL-addressed packages
533
+ * in the worker's registry. A vetra watch rebuild re-sends the project's
534
+ * models through this with a cache-busted URL. `specs` are registry packages
535
+ * (`name@version`), replaced when their version changes.
536
+ */
537
+ registerPackages: (sources: WorkerPackageSource[], specs?: string[]) => Promise<void>;
538
+ }
539
+ type LOADING = null;
540
+ /** A drive, or a node in it. */
541
+ type PHDriveTarget = {
542
+ driveSlug: string;
543
+ nodeSlug?: string;
544
+ };
545
+ /** A settings tab by id; `true` opens the first one. */
546
+ type PHSettingsTarget$1 = {
547
+ settings: string | true;
548
+ };
549
+ /** What the app shows; `undefined` targets home. */
550
+ type PHNavigationTarget$1 = PHDriveTarget | PHSettingsTarget$1;
551
+ /** Query params to write; an `undefined` value removes the param. */
552
+ type PHSearchUpdate$1 = Record<string, string | undefined>;
553
+ type PHNavigateOptions$1 = {
554
+ replace?: boolean;
555
+ /** The target's own query params; the host decides which others survive. */
556
+ search?: PHSearchUpdate$1;
557
+ };
558
+ /** Merges an object into the current query params; a function returns them all. */
559
+ type SearchParamsUpdate$1 = PHSearchUpdate$1 | ((prev: Record<string, string>) => PHSearchUpdate$1);
560
+ type SetSearchParams$1 = (update: SearchParamsUpdate$1, options?: {
561
+ replace?: boolean;
562
+ }) => void;
563
+ /** Host-owned navigation and URL state; without one, the browser history is used.
564
+ * Set once on the store; its hooks must not change between renders. */
565
+ type PHNavigation$1 = {
566
+ location(): {
567
+ pathname: string;
568
+ search: string;
569
+ };
570
+ open(target: PHNavigationTarget$1 | undefined, options?: PHNavigateOptions$1): void;
571
+ /** The public href that opens `target`, base path included. */
572
+ hrefFor?(target: PHNavigationTarget$1 | undefined): string;
573
+ /** Whether `target` is what the location shows now; search params aside. */
574
+ useIsCurrent?(target: PHNavigationTarget$1 | undefined): boolean;
575
+ /** Warms what `target` shows, e.g. on hover; optional. */
576
+ preload?(target: PHNavigationTarget$1 | undefined): void;
577
+ /** Replaces the query params with what `update` returns, keeping the path. */
578
+ setSearch(update: (prev: Record<string, string>) => PHSearchUpdate$1, options?: {
579
+ replace?: boolean;
580
+ }): void;
581
+ /** The current query params. */
582
+ useSearchParams(): Record<string, string>;
583
+ /** A stable setter for the query params. */
584
+ useSetSearchParams(): SetSearchParams$1;
585
+ /** Returns to the entry from before the open document was opened, past any
586
+ * pushed inside it; false when this session didn't open it. */
587
+ closeOpened?(): boolean;
588
+ };
589
+ /** The backend (a Switchboard) refused this tab's caller. */
590
+ type BackendAuthState = {
591
+ requiresAuth: true;
592
+ /** The HTTP status that refused: 401 (anonymous) or 403 (known, not allowed). */
593
+ status: 401 | 403 | null;
594
+ /** The backend's name or URL, for the message. */
595
+ backend?: string;
596
+ /** When it was refused, ISO. */
597
+ at: string;
598
+ };
599
+ type PHGlobal$1 = PHGlobalConfig$1 & {
600
+ navigation?: PHNavigation$1;
601
+ loading?: boolean;
602
+ reactorClientModule?: BrowserReactorClientModule$1 | WorkerReactorClientModule$1;
603
+ reactorClient?: IReactorBrowserClient$1;
604
+ /** The client halves of `reactorClient`, set with it: reads and writes. */
605
+ reactor?: ReactorBrowserHalves$1;
606
+ /** Replaces `reactorClientModule.client` in full-client actions; Connect's router. */
607
+ fullReactorClient?: IReactorClient;
608
+ attachmentService?: IAttachmentService;
609
+ reactorGraphQLClient?: ReactorGraphQLClient | undefined;
610
+ renown?: IRenown | LOADING;
611
+ vetraPackageManager?: IPackageManager;
612
+ /** The tools the host app gives the AI agent; see `getHostAiTools`. */
613
+ aiTools?: () => Promise<PhAiToolDescriptor[]>;
614
+ drives?: DocumentDriveDocument[];
615
+ /**
616
+ * Set when the app's backend refused the caller (401/403): the UI shows a
617
+ * sign-in gate instead of the drives. See `hooks/backend-auth.ts`.
618
+ */
619
+ backendAuth?: BackendAuthState;
620
+ /** Per-drive node caches; see `hooks/drive-nodes.ts`. */
621
+ driveNodes?: DriveNodesCache;
622
+ documentCache?: IDocumentCache;
623
+ selectedDriveId?: string;
624
+ selectedNodeId?: string;
625
+ draggingNode?: DraggingNode;
626
+ modal?: PHModal$1;
627
+ selectedTimelineRevision?: string | number | null;
628
+ selectedTimelineItem?: TimelineItem | null;
629
+ packageDiscoveryService?: IPackageDiscoveryService;
630
+ features?: Map<string, boolean>;
631
+ toast?: PHToastFn;
632
+ };
633
+ type PHGlobalKey$1 = keyof PHGlobal$1;
634
+ type PHGlobalValue = PHGlobal$1[PHGlobalKey$1];
635
+ type UsePHGlobalValue$1<TValue extends PHGlobalValue> = () => TValue | undefined;
636
+ type SetPHGlobalValue$1<TValue extends PHGlobalValue> = (value: TValue | undefined) => void;
637
+ type AddPHGlobalEventHandler$1 = () => void;
638
+ type PHGlobalEventHandlerAdders = Record<PHGlobalKey$1, AddPHGlobalEventHandler$1>;
639
+ type SetEvent<TKey extends PHGlobalKey$1> = CustomEvent<{ [key in TKey]: PHGlobal$1[TKey] | undefined; }>;
640
+ declare global {
641
+ interface Window {
642
+ ph?: PHGlobal$1;
643
+ }
644
+ interface WindowEventMap extends GraphQLClientWindowEvents {}
645
+ }
646
+ //#endregion
647
+ export { IPackageManager as $, loadDriveNodes as A, PHGlobalConfigKey$1 as At, createPHStore as B, ReactorBrowserHalves$1 as Bt, DriveNodesCache as C, PHDocumentEditorConfigHooks$1 as Ct, dropDriveNode as D, PHGlobalConfig$1 as Dt, addDriveNodesEventHandler as E, PHDrivesGlobalConfig as Et, useDriveNodes as F, PHRenownGlobalConfig as Ft, notifyPHStore as G, IDocumentCache as Gt, getActivePHStore as H, DocumentRefetchState as Ht, useDriveNodesCache as I, PHSentryGlobalConfig as It, DraggingNode as J, OperationsCacheEntry as Jt, subscribePHStore as K, IDocumentTypeCache as Kt, PHStore as L, IReactorBrowserClient$1 as Lt, peekDriveNode as M, PHGlobalConfigSettersForKey as Mt, takeLocalDriveWrite as N, PHProcessorsGlobalConfig as Nt, getDriveNode as O, PHGlobalConfigHooks$1 as Ot, useDriveNode as P, PHRelationalProcessorsGlobalConfig as Pt, IPackageListerUnsubscribe as Q, PHStoreProvider as R, IReactorBrowserReadClient as Rt, WorkerReactorModule as S, PHDocumentEditorConfig$1 as St, DriveNodesOptions as T, PHDocumentEditorConfigSetters$1 as Tt, getPHStore as U, DocumentsOfTypeEntry as Ut, ensurePHStore as V, DocumentDispatch$2 as Vt, getPHStoreSubscribe as W, FulfilledPromise as Wt, useDragNode as X, PromiseWithState as Xt, addDraggingNodeEventHandler as Y, PromiseState as Yt, useDropNode as Z, RejectedPromise as Zt, SetEvent as _, PHAppConfig$1 as _t, LOADING as a, TimelineBarItem as at, UsePHGlobalValue$1 as b, PHAppConfigSetters$1 as bt, PHGlobalEventHandlerAdders as c, DiscoveryEvent as ct, PHNavigateOptions$1 as d, FailedInstallationReason as dt, IPackagesListener as et, PHNavigation$1 as f, IPackageDiscoveryService as ft, SearchParamsUpdate$1 as g, PHAnalyticsGlobalConfig as gt, PHSettingsTarget$1 as h, FullPHGlobalConfig as ht, BrowserReactorModule as i, PHToastType as it, markLocalDriveWrite as j, PHGlobalConfigSetters$1 as jt, invalidateDriveNodes as k, PHGlobalConfigHooksForKey as kt, PHGlobalKey$1 as l, DiscoveryEventListener as lt, PHSearchUpdate$1 as m, PHModal$1 as mt, BackendAuthState as n, PHToastFn as nt, PHDriveTarget as o, TimelineDividerItem as ot, PHNavigationTarget$1 as p, PendingInstallation as pt, usePHStore as q, IOperationCache as qt, BrowserReactorClientModule$1 as r, PHToastOptions as rt, PHGlobal$1 as s, TimelineItem as st, AddPHGlobalEventHandler$1 as t, PackageManagerInstallResult as tt, PHGlobalValue as u, FailedInstallation as ut, SetPHGlobalValue$1 as v, PHAppConfigHooks$1 as vt, DriveNodesEntry as w, PHDocumentEditorConfigKey$1 as wt, WorkerReactorClientModule$1 as x, PHCommonGlobalConfig as xt, SetSearchParams$1 as y, PHAppConfigKey$1 as yt, bindPHStoreToWindow as z, IReactorBrowserWriteClient as zt };
648
+ export {};
649
+ //# sourceMappingURL=global-bbfp3_1x.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global-bbfp3_1x.d.ts","names":[],"sources":["../src/types/documents.ts","../src/types/reactor-browser-client.ts","../src/types/config.ts","../src/types/modals.ts","../src/types/package-discovery.ts","../src/types/timeline.ts","../src/types/toast.ts","../src/types/vetra.ts","../src/hooks/node-drag-and-drop.ts","../src/hooks/ph-store.tsx","../src/hooks/drive-nodes.ts","../src/types/global.ts"],"mappings":";;;;;;;;;;;;;;KAOY,iBAAiB,KAAK,QAAQ,KAAK,aAAa;KAEhD,iBAAiB,KAAK,QAAQ;EACxC;EACA,OAAO;;KAGG,gBAAgB,KAAK,QAAQ;EACvC;EACA;;KAGU,aAAa;EAEnB;;EAEA;EAAqB,OAAO;;EAC5B;EAAoB;;;KAGd;EACV;EACA;;UAGe;EACf,IAAI,YAAY,oBAAoB,QAAQ;EAC5C,SAAS,eAAe,oBAAoB,QAAQ;EACpD,UAAU,uBAAuB;;EAEjC,iBAAiB,aAAa;;;KAIpB;;EAEV;;EAEA,qBAAqB;;EAErB;;EAEA;;;KAIU;;EAEV;;EAEA;;EAEA;;EAEA;;;;UAKe;;EAEf,wBAAwB,cAAc,gBAAgB;;EAEtD,oBAAoB,cAAc,gBAAgB;;EAElD,wBAAwB,cAAc;;EAEtC,yBACE,cACA,eACA;;;;;;;UASa;;EAEf,mBAAmB,oBAAoB,gBAAgB;;EAEvD,eAAe,oBAAoB,eAAe;;EAElD,mBAAmB,oBAAoB;;EAEvC,qBAAqB;;EAErB,oBAAoB,oBAAoB;;;;;;;;;UCrFzB,kCAAk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