@powerhousedao/connect 6.2.0-dev.38 → 6.2.0-dev.39

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 (75) hide show
  1. package/dist/{AddDriveModal-BoKLJyUY.js → AddDriveModal-D-nbV40j.js} +4 -4
  2. package/dist/{AddDriveModal-BoKLJyUY.js.map → AddDriveModal-D-nbV40j.js.map} +1 -1
  3. package/dist/{ClearStorageModal-kAd_wAOs.js → ClearStorageModal-Y34xFYii.js} +4 -4
  4. package/dist/{ClearStorageModal-kAd_wAOs.js.map → ClearStorageModal-Y34xFYii.js.map} +1 -1
  5. package/dist/{CookiesPolicyModal-1nOh6oN3.js → CookiesPolicyModal-CkcUKPLb.js} +3 -3
  6. package/dist/{CookiesPolicyModal-1nOh6oN3.js.map → CookiesPolicyModal-CkcUKPLb.js.map} +1 -1
  7. package/dist/{CreateDocumentModal-nQbLVDq3.js → CreateDocumentModal-CvsTh0HM.js} +3 -3
  8. package/dist/{CreateDocumentModal-nQbLVDq3.js.map → CreateDocumentModal-CvsTh0HM.js.map} +1 -1
  9. package/dist/{DebugSettingsModal-COZ8ehrF.js → DebugSettingsModal-CwLH5KC9.js} +6 -6
  10. package/dist/{DebugSettingsModal-COZ8ehrF.js.map → DebugSettingsModal-CwLH5KC9.js.map} +1 -1
  11. package/dist/{DeleteDriveModal-6P0T1QgD.js → DeleteDriveModal-DSTK8FYk.js} +4 -4
  12. package/dist/{DeleteDriveModal-6P0T1QgD.js.map → DeleteDriveModal-DSTK8FYk.js.map} +1 -1
  13. package/dist/{DeleteItemModal-BmV1aQyZ.js → DeleteItemModal-B2nJmjsP.js} +4 -4
  14. package/dist/{DeleteItemModal-BmV1aQyZ.js.map → DeleteItemModal-B2nJmjsP.js.map} +1 -1
  15. package/dist/{DisclaimerModal-CVTFfN0_.js → DisclaimerModal-D5FO34u9.js} +3 -3
  16. package/dist/{DisclaimerModal-CVTFfN0_.js.map → DisclaimerModal-D5FO34u9.js.map} +1 -1
  17. package/dist/{DownloadDocumentWithErrorsModal-CXeFUtaz.js → DownloadDocumentWithErrorsModal-tEr3bbtN.js} +3 -3
  18. package/dist/{DownloadDocumentWithErrorsModal-CXeFUtaz.js.map → DownloadDocumentWithErrorsModal-tEr3bbtN.js.map} +1 -1
  19. package/dist/{DriveAuthRequiredModal-B3VdLwSH.js → DriveAuthRequiredModal-B5-ZfKsb.js} +3 -3
  20. package/dist/{DriveAuthRequiredModal-B3VdLwSH.js.map → DriveAuthRequiredModal-B5-ZfKsb.js.map} +1 -1
  21. package/dist/{DriveSettingsModal-CsNFEJ9E.js → DriveSettingsModal-kR3hQnh4.js} +4 -4
  22. package/dist/DriveSettingsModal-kR3hQnh4.js.map +1 -0
  23. package/dist/{InspectorModal-so7krTny.js → InspectorModal-C1MvTLQV.js} +84 -35
  24. package/dist/InspectorModal-C1MvTLQV.js.map +1 -0
  25. package/dist/{MissingPackageModal-Bn036mWQ.js → MissingPackageModal-BQcCQbOn.js} +4 -4
  26. package/dist/{MissingPackageModal-Bn036mWQ.js.map → MissingPackageModal-BQcCQbOn.js.map} +1 -1
  27. package/dist/{SettingsModal-CZ4zSICk.js → SettingsModal-C0gXNY6D.js} +9 -9
  28. package/dist/SettingsModal-C0gXNY6D.js.map +1 -0
  29. package/dist/{UpgradeDriveModal-C7lV4rAX.js → UpgradeDriveModal-BZGSE9_r.js} +3 -3
  30. package/dist/{UpgradeDriveModal-C7lV4rAX.js.map → UpgradeDriveModal-BZGSE9_r.js.map} +1 -1
  31. package/dist/app-loader-BVgVR-WX.js +4 -0
  32. package/dist/{app-loader-BcXcehGe.js → app-loader-BeaPtqWb.js} +193 -258
  33. package/dist/app-loader-BeaPtqWb.js.map +1 -0
  34. package/dist/{build-info-BCK6n_XY.js → build-info-BNG5pRW5.js} +8 -5
  35. package/dist/{build-info-BCK6n_XY.js.map → build-info-BNG5pRW5.js.map} +1 -1
  36. package/dist/components-DGNTgcZV.js +5 -0
  37. package/dist/{connect.config-Bt4pvvWV.js → connect.config-BG681xG9.js} +3 -3
  38. package/dist/{connect.config-Bt4pvvWV.js.map → connect.config-BG681xG9.js.map} +1 -1
  39. package/dist/connection-state-Cig644T0.js +126 -0
  40. package/dist/connection-state-Cig644T0.js.map +1 -0
  41. package/dist/{load-BRBI6pnT.js → load-C-XbtAd4.js} +11 -11
  42. package/dist/{load-BRBI6pnT.js.map → load-C-XbtAd4.js.map} +1 -1
  43. package/dist/main.js +1 -1
  44. package/dist/{package-B-TZdzz9.js → package-DUieCgZv.js} +5 -4
  45. package/dist/package-DUieCgZv.js.map +1 -0
  46. package/dist/{pglite-runtime-Ch2YeUAA.js → pglite-major-B39aOEiE.js} +8 -51
  47. package/dist/pglite-major-B39aOEiE.js.map +1 -0
  48. package/dist/pglite-migrate-core-Boxqqx-c.js +143 -0
  49. package/dist/pglite-migrate-core-Boxqqx-c.js.map +1 -0
  50. package/dist/{pglite-seed-BWk7yOwr.js → pglite-seed-9rjhdCs5.js} +4 -4
  51. package/dist/{pglite-seed-BWk7yOwr.js.map → pglite-seed-9rjhdCs5.js.map} +1 -1
  52. package/dist/{reactor-BkaNhcsJ.js → reactor-DCmBjI53.js} +229 -17
  53. package/dist/reactor-DCmBjI53.js.map +1 -0
  54. package/dist/reactor.worker.d.ts +1 -0
  55. package/dist/reactor.worker.js +316 -0
  56. package/dist/reactor.worker.js.map +1 -0
  57. package/dist/{registerServiceWorker-D9l1kja7.js → registerServiceWorker-2tRbkdJj.js} +4 -4
  58. package/dist/{registerServiceWorker-D9l1kja7.js.map → registerServiceWorker-2tRbkdJj.js.map} +1 -1
  59. package/dist/{reload-connect-toast-CwvSc6F-.js → reload-connect-toast-qibmlgQm.js} +3 -3
  60. package/dist/{reload-connect-toast-CwvSc6F-.js.map → reload-connect-toast-qibmlgQm.js.map} +1 -1
  61. package/dist/start-connect.js +1 -1
  62. package/dist/{toast-BEy42aYx.js → toast-4t-VimvD.js} +3 -3
  63. package/dist/{toast-BEy42aYx.js.map → toast-4t-VimvD.js.map} +1 -1
  64. package/dist/{useRegistryPackages-B-gFECmd.js → useRegistryPackages-BaYtekjQ.js} +3 -3
  65. package/dist/{useRegistryPackages-B-gFECmd.js.map → useRegistryPackages-BaYtekjQ.js.map} +1 -1
  66. package/package.json +11 -10
  67. package/dist/DriveSettingsModal-CsNFEJ9E.js.map +0 -1
  68. package/dist/InspectorModal-so7krTny.js.map +0 -1
  69. package/dist/SettingsModal-CZ4zSICk.js.map +0 -1
  70. package/dist/app-loader-BcXcehGe.js.map +0 -1
  71. package/dist/app-loader-gIHublFd.js +0 -4
  72. package/dist/components-Chon07yw.js +0 -5
  73. package/dist/package-B-TZdzz9.js.map +0 -1
  74. package/dist/pglite-runtime-Ch2YeUAA.js.map +0 -1
  75. package/dist/reactor-BkaNhcsJ.js.map +0 -1
@@ -1,13 +1,15 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fc3a92c7-c046-5d11-94bb-d0dff7f3a6ea")}catch(e){}}();
3
- import { c as subscribeReactorPgMajor, o as loadPgDump, r as getCachedReactorPgMajor, s as resolvePgMajorForRuntime } from "./pglite-runtime-Ch2YeUAA.js";
4
- import { t as PENDING_PG_SEED_KEY } from "./pglite-seed-BWk7yOwr.js";
5
- import { t as clearReactorStorage } from "./reactor-BkaNhcsJ.js";
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2c37574f-0c78-5d64-bf24-7f53df2dd46b")}catch(e){}}();
3
+ import { a as resolvePgMajorForRuntime, i as loadPgDump } from "./pglite-major-B39aOEiE.js";
4
+ import { c as getCachedReactorPgMajor, d as subscribeReactorPgMajor } from "./connection-state-Cig644T0.js";
5
+ import { t as PENDING_PG_SEED_KEY } from "./pglite-seed-9rjhdCs5.js";
6
+ import { t as clearReactorStorage } from "./reactor-DCmBjI53.js";
6
7
  import { jsx } from "react/jsx-runtime";
8
+ import { Kysely, sql } from "kysely";
9
+ import { PGliteDialect } from "kysely-pglite-dialect";
7
10
  import { useCallback, useMemo, useSyncExternalStore } from "react";
8
11
  import { DocumentIntegrityService, InMemoryQueue, PollBehavior, REACTOR_SCHEMA, addRemoteDrive, closePHModal, useConnectionStates, useDatabase, usePGlite, usePHModal, useReactorClientModule, useSync } from "@powerhousedao/reactor-browser";
9
12
  import { InspectorModal as InspectorModal$1 } from "@powerhousedao/design-system/connect";
10
- import { sql } from "kysely";
11
13
  //#region src/components/modal/modals/InspectorModal/useDbExplorer.ts
12
14
  async function quiesceQueue(queue) {
13
15
  await new Promise((resolve) => queue.block(() => resolve()));
@@ -25,12 +27,19 @@ const PRIORITY_COLUMNS = [
25
27
  "index",
26
28
  "skip"
27
29
  ];
30
+ function createWorkerReactorDatabase(inspector) {
31
+ return new Kysely({ dialect: new PGliteDialect({ query: async (statement, params) => ({ rows: await inspector.queryReactorDb(statement, params) }) }) });
32
+ }
28
33
  function useDbExplorer() {
29
- const database = useDatabase();
34
+ const browserDatabase = useDatabase();
30
35
  const pglite = usePGlite();
31
- const reactorClientModule = useReactorClientModule();
36
+ const module = useReactorClientModule();
37
+ const reactorClientModule = module?.kind === "browser" ? module : void 0;
32
38
  const reactor = reactorClientModule?.reactorModule?.reactor;
33
39
  const queue = reactorClientModule?.reactorModule?.queue;
40
+ const workerModule = module?.kind === "worker" ? module : void 0;
41
+ const workerDatabase = useMemo(() => workerModule ? createWorkerReactorDatabase(workerModule.inspector) : void 0, [workerModule]);
42
+ const database = browserDatabase ?? workerDatabase;
34
43
  const getTables = useCallback(async () => {
35
44
  if (!database) return [];
36
45
  const result = await sql`
@@ -171,17 +180,19 @@ function useDbExplorer() {
171
180
  queue,
172
181
  reactor
173
182
  ]);
183
+ const getDefaultSort = useCallback((table) => {
184
+ if (table === "Operation") return {
185
+ column: "timestampUtcMs",
186
+ direction: "desc"
187
+ };
188
+ }, []);
189
+ const canModifyDb = !!pglite;
174
190
  return {
175
191
  getTables,
176
192
  getTableRows,
177
- getDefaultSort: useCallback((table) => {
178
- if (table === "Operation") return {
179
- column: "timestampUtcMs",
180
- direction: "desc"
181
- };
182
- }, []),
183
- onExportDb,
184
- onImportDb
193
+ getDefaultSort,
194
+ onExportDb: canModifyDb ? onExportDb : void 0,
195
+ onImportDb: canModifyDb ? onImportDb : void 0
185
196
  };
186
197
  }
187
198
  //#endregion
@@ -212,24 +223,29 @@ function useDebugInspector() {
212
223
  //#endregion
213
224
  //#region src/components/modal/modals/InspectorModal/useIntegrityInspector.ts
214
225
  function useIntegrityInspector() {
215
- const reactorModule = useReactorClientModule()?.reactorModule;
226
+ const module = useReactorClientModule();
227
+ const reactorModule = module?.kind === "browser" ? module.reactorModule : void 0;
228
+ const inspector = module?.kind === "worker" ? module.inspector : void 0;
216
229
  const service = useMemo(() => {
217
230
  if (!reactorModule) return void 0;
218
231
  return new DocumentIntegrityService(reactorModule.keyframeStore, reactorModule.operationStore, reactorModule.writeCache, reactorModule.documentView, reactorModule.documentModelRegistry);
219
232
  }, [reactorModule]);
220
233
  const onValidate = useCallback(async (documentId, branch) => {
234
+ if (inspector) return await inspector.validateDocument(documentId, branch);
221
235
  if (!service) throw new Error("Reactor module not available");
222
236
  return service.validateDocument(documentId, branch);
223
- }, [service]);
237
+ }, [service, inspector]);
224
238
  const onRebuildKeyframes = useCallback(async (documentId, branch) => {
239
+ if (inspector) return await inspector.rebuildKeyframes(documentId, branch);
225
240
  if (!service) throw new Error("Reactor module not available");
226
241
  return service.rebuildKeyframes(documentId, branch);
227
- }, [service]);
242
+ }, [service, inspector]);
228
243
  const onRebuildSnapshots = useCallback(async (documentId, branch) => {
244
+ if (inspector) return await inspector.rebuildSnapshots(documentId, branch);
229
245
  if (!service) throw new Error("Reactor module not available");
230
246
  return service.rebuildSnapshots(documentId, branch);
231
- }, [service]);
232
- if (!service) return;
247
+ }, [service, inspector]);
248
+ if (!service && !inspector) return;
233
249
  return {
234
250
  onValidate,
235
251
  onRebuildKeyframes,
@@ -239,9 +255,12 @@ function useIntegrityInspector() {
239
255
  //#endregion
240
256
  //#region src/components/modal/modals/InspectorModal/useProcessorsInspector.ts
241
257
  function useProcessorsInspector() {
242
- const processorManager = useReactorClientModule()?.reactorModule?.processorManager;
243
- const hasProcessorManager = useMemo(() => processorManager != null, [processorManager]);
258
+ const module = useReactorClientModule();
259
+ const processorManager = module?.kind === "browser" ? module.reactorModule?.processorManager : void 0;
260
+ const inspector = module?.kind === "worker" ? module.inspector : void 0;
261
+ const available = useMemo(() => processorManager != null || inspector != null, [processorManager, inspector]);
244
262
  const getProcessors = useCallback(() => {
263
+ if (inspector) return inspector.getProcessors();
245
264
  if (!processorManager) return Promise.resolve([]);
246
265
  return Promise.resolve(processorManager.getAll().map((tracked) => ({
247
266
  processorId: tracked.processorId,
@@ -253,13 +272,17 @@ function useProcessorsInspector() {
253
272
  lastError: tracked.lastError,
254
273
  lastErrorTimestamp: tracked.lastErrorTimestamp
255
274
  })));
256
- }, [processorManager]);
275
+ }, [processorManager, inspector]);
257
276
  const onRetry = useCallback(async (processorId) => {
277
+ if (inspector) {
278
+ await inspector.retryProcessor(processorId);
279
+ return;
280
+ }
258
281
  if (!processorManager) return;
259
282
  const tracked = processorManager.get(processorId);
260
283
  if (tracked) await tracked.retry();
261
- }, [processorManager]);
262
- if (!hasProcessorManager) return;
284
+ }, [processorManager, inspector]);
285
+ if (!available) return;
263
286
  return {
264
287
  getProcessors,
265
288
  onRetry
@@ -268,11 +291,15 @@ function useProcessorsInspector() {
268
291
  //#endregion
269
292
  //#region src/components/modal/modals/InspectorModal/useQueueInspector.ts
270
293
  function useQueueInspector() {
271
- const queue = useReactorClientModule()?.reactorModule?.queue;
294
+ const module = useReactorClientModule();
295
+ const reactorClientModule = module?.kind === "browser" ? module : void 0;
296
+ const inspector = module?.kind === "worker" ? module.inspector : void 0;
297
+ const queue = reactorClientModule?.reactorModule?.queue;
272
298
  const inMemoryQueue = useMemo(() => {
273
299
  if (queue instanceof InMemoryQueue) return queue;
274
300
  }, [queue]);
275
301
  const getQueueState = useCallback(() => {
302
+ if (inspector) return inspector.getQueueState();
276
303
  if (!inMemoryQueue) return Promise.resolve({
277
304
  isPaused: false,
278
305
  pendingJobs: [],
@@ -294,15 +321,22 @@ function useQueueInspector() {
294
321
  totalPending: pendingJobs.length,
295
322
  totalExecuting: executingJobs.length
296
323
  });
297
- }, [inMemoryQueue]);
298
- const onPause = useCallback(() => {
324
+ }, [inMemoryQueue, inspector]);
325
+ const onPause = useCallback(async () => {
326
+ if (inspector) {
327
+ await inspector.pauseQueue();
328
+ return;
329
+ }
299
330
  if (inMemoryQueue) inMemoryQueue.pause();
300
- return Promise.resolve();
301
- }, [inMemoryQueue]);
331
+ }, [inMemoryQueue, inspector]);
302
332
  const onResume = useCallback(async () => {
333
+ if (inspector) {
334
+ await inspector.resumeQueue();
335
+ return;
336
+ }
303
337
  if (inMemoryQueue) await inMemoryQueue.resume();
304
- }, [inMemoryQueue]);
305
- if (!inMemoryQueue) return;
338
+ }, [inMemoryQueue, inspector]);
339
+ if (!inMemoryQueue && !inspector) return;
306
340
  return {
307
341
  getQueueState,
308
342
  onPause,
@@ -328,6 +362,19 @@ function useRemotesInspector() {
328
362
  };
329
363
  }
330
364
  //#endregion
365
+ //#region src/components/modal/modals/InspectorModal/useWorkerInspector.ts
366
+ function useWorkerInspector() {
367
+ const module = useReactorClientModule();
368
+ const adminClient = module?.kind === "worker" ? module.adminClient : void 0;
369
+ return useMemo(() => {
370
+ if (!adminClient) return;
371
+ return {
372
+ getInfo: () => adminClient.info(),
373
+ onRestart: () => adminClient.restart()
374
+ };
375
+ }, [adminClient]);
376
+ }
377
+ //#endregion
331
378
  //#region src/components/modal/modals/InspectorModal/InspectorModal.tsx
332
379
  const DEFAULT_PAGE_SIZE = 25;
333
380
  const InspectorModal = () => {
@@ -337,6 +384,7 @@ const InspectorModal = () => {
337
384
  const queueInspectorProps = useQueueInspector();
338
385
  const processorsInspectorProps = useProcessorsInspector();
339
386
  const integrityInspectorProps = useIntegrityInspector();
387
+ const workerInspectorProps = useWorkerInspector();
340
388
  const { currentPgVersion, supportedPgVersions, onResetToPgVersion } = useDebugInspector();
341
389
  return /* @__PURE__ */ jsx(InspectorModal$1, {
342
390
  open,
@@ -366,11 +414,12 @@ const InspectorModal = () => {
366
414
  },
367
415
  queueInspectorProps,
368
416
  processorsInspectorProps,
369
- integrityInspectorProps
417
+ integrityInspectorProps,
418
+ workerInspectorProps
370
419
  });
371
420
  };
372
421
  //#endregion
373
422
  export { InspectorModal };
374
423
 
375
- //# sourceMappingURL=InspectorModal-so7krTny.js.map
376
- //# debugId=fc3a92c7-c046-5d11-94bb-d0dff7f3a6ea
424
+ //# sourceMappingURL=InspectorModal-C1MvTLQV.js.map
425
+ //# debugId=2c37574f-0c78-5d64-bf24-7f53df2dd46b
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InspectorModal-C1MvTLQV.js","sources":["../src/components/modal/modals/InspectorModal/useDbExplorer.ts","../src/components/modal/modals/InspectorModal/useDebugInspector.ts","../src/components/modal/modals/InspectorModal/useIntegrityInspector.ts","../src/components/modal/modals/InspectorModal/useProcessorsInspector.ts","../src/components/modal/modals/InspectorModal/useQueueInspector.ts","../src/components/modal/modals/InspectorModal/useRemotesInspector.ts","../src/components/modal/modals/InspectorModal/useWorkerInspector.ts","../src/components/modal/modals/InspectorModal/InspectorModal.tsx"],"sourcesContent":["import type { PGlite } from \"@electric-sql/pglite\";\nimport {\n getCachedReactorPgMajor,\n loadPgDump,\n resolvePgMajorForRuntime,\n} from \"@powerhousedao/connect/utils\";\nimport type {\n FilterGroup,\n SortOptions,\n} from \"@powerhousedao/design-system/connect\";\nimport type { Database } from \"@powerhousedao/reactor\";\nimport {\n REACTOR_SCHEMA,\n useDatabase,\n usePGlite,\n useReactorClientModule,\n type IQueue,\n} from \"@powerhousedao/reactor-browser\";\nimport type { IInspectorProxy } from \"@powerhousedao/reactor-browser/rpc\";\nimport { Kysely, sql } from \"kysely\";\nimport { PGliteDialect } from \"kysely-pglite-dialect\";\nimport { useCallback, useMemo } from \"react\";\n\nasync function quiesceQueue(queue: IQueue): Promise<void> {\n await new Promise<void>((resolve) => queue.block(() => resolve()));\n}\n\n// The reactor runs with `relaxedDurability: true`, which makes PGlite's\n// `syncToFs()` fire the IDBFS→IndexedDB write and return without awaiting\n// Emscripten's syncfs callback. `close()` also doesn't flush. Calling\n// `FS.syncfs(false, cb)` directly gives us a callback that fires from the\n// IDBFS transaction's `oncomplete` — i.e. after IDB has actually committed.\nasync function syncPgliteToIdb(pglite: {\n readonly Module: {\n readonly FS: {\n syncfs(populate: boolean, cb: (err: Error | null) => void): void;\n };\n };\n}): Promise<void> {\n await new Promise<void>((resolve, reject) => {\n pglite.Module.FS.syncfs(false, (err) => (err ? reject(err) : resolve()));\n });\n}\n\ntype ColumnInfo = {\n readonly name: string;\n readonly dataType: string;\n readonly isNullable: boolean;\n};\n\ntype TableInfo = {\n readonly name: string;\n readonly columns: ColumnInfo[];\n};\n\ntype ColumnRow = {\n table_name: string;\n column_name: string;\n data_type: string;\n is_nullable: string;\n};\n\ntype GetTableRowsOptions = {\n readonly schema?: string;\n readonly limit: number;\n readonly offset: number;\n readonly sort?: SortOptions;\n readonly filters?: FilterGroup;\n};\n\ntype TablePage = {\n readonly columns: string[];\n readonly rows: Record<string, unknown>[];\n readonly total: number | null;\n};\n\nconst PRIORITY_COLUMNS = [\n \"documentType\",\n \"documentId\",\n \"scope\",\n \"branch\",\n \"index\",\n \"skip\",\n] as const;\n\ntype ReactorPgliteAdapter = {\n query: (\n sql: string,\n params?: unknown[],\n ) => Promise<{ rows: unknown[]; affectedRows?: number }>;\n};\n\nfunction createWorkerReactorDatabase(\n inspector: IInspectorProxy,\n): Kysely<Database> {\n const adapter: ReactorPgliteAdapter = {\n query: async (statement, params) => ({\n rows: (await inspector.queryReactorDb(statement, params)) as unknown[],\n }),\n };\n return new Kysely<Database>({\n dialect: new PGliteDialect(adapter as unknown as PGlite),\n });\n}\n\nexport function useDbExplorer() {\n const browserDatabase = useDatabase();\n const pglite = usePGlite();\n const module = useReactorClientModule();\n const reactorClientModule = module?.kind === \"browser\" ? module : undefined;\n const reactor = reactorClientModule?.reactorModule?.reactor;\n const queue = reactorClientModule?.reactorModule?.queue;\n const workerModule = module?.kind === \"worker\" ? module : undefined;\n const workerDatabase = useMemo(\n () =>\n workerModule\n ? createWorkerReactorDatabase(workerModule.inspector)\n : undefined,\n [workerModule],\n );\n const database = browserDatabase ?? workerDatabase;\n\n const getTables = useCallback(async (): Promise<TableInfo[]> => {\n if (!database) return [];\n\n const result = await sql<ColumnRow>`\n SELECT\n c.table_name,\n c.column_name,\n c.data_type,\n c.is_nullable\n FROM information_schema.columns c\n INNER JOIN information_schema.tables t\n ON c.table_name = t.table_name\n AND c.table_schema = t.table_schema\n WHERE c.table_schema = ${REACTOR_SCHEMA}\n AND t.table_type = 'BASE TABLE'\n ORDER BY c.table_name, c.ordinal_position\n `.execute(database);\n\n const tableMap = new Map<string, ColumnInfo[]>();\n for (const row of result.rows) {\n if (!tableMap.has(row.table_name)) {\n tableMap.set(row.table_name, []);\n }\n tableMap.get(row.table_name)!.push({\n name: row.column_name,\n dataType: row.data_type,\n isNullable: row.is_nullable === \"YES\",\n });\n }\n\n return Array.from(tableMap).map(([name, columns]) => {\n const columnNames = columns.map((col) => col.name);\n const orderedColumns = [\n ...PRIORITY_COLUMNS.filter((col) => columnNames.includes(col)).map(\n (col) => columns.find((c) => c.name === col)!,\n ),\n ...columns.filter(\n (col) =>\n !PRIORITY_COLUMNS.includes(\n col.name as (typeof PRIORITY_COLUMNS)[number],\n ),\n ),\n ];\n return {\n name,\n columns: orderedColumns,\n };\n });\n }, [database]);\n\n const getTableRows = useCallback(\n async (table: string, options: GetTableRowsOptions): Promise<TablePage> => {\n if (!database) {\n return { columns: [], rows: [], total: null };\n }\n\n const limit = options.limit;\n const offset = options.offset;\n const sort = options.sort;\n const filters = options.filters;\n const tableRef = sql.raw(`${REACTOR_SCHEMA}.\"${table}\"`);\n\n // Build WHERE clause from filters\n let whereClause = sql``;\n if (filters?.clauses && filters.clauses.length > 0) {\n const conditions: ReturnType<typeof sql>[] = [];\n\n for (let i = 0; i < filters.clauses.length; i++) {\n const clause = filters.clauses[i];\n if (!clause) continue;\n\n const columnRef = sql.raw(`\"${clause.column}\"`);\n\n let condition: ReturnType<typeof sql>;\n\n if (clause.operator === \"IS NULL\") {\n condition = sql`${columnRef} IS NULL`;\n } else if (clause.operator === \"IS NOT NULL\") {\n condition = sql`${columnRef} IS NOT NULL`;\n } else if (\n clause.operator === \"LIKE\" ||\n clause.operator === \"ILIKE\"\n ) {\n const value = clause.value;\n const operator =\n clause.operator === \"LIKE\" ? sql`LIKE` : sql`ILIKE`;\n condition = sql`${columnRef} ${operator} ${value}`;\n } else {\n // For =, !=, >, <, >=, <=\n const operator = sql.raw(clause.operator);\n const value = clause.value;\n\n // Try to parse as number if it looks like a number\n let parsedValue: string | number = value;\n if (value !== \"\" && !isNaN(Number(value)) && value.trim() !== \"\") {\n parsedValue = Number(value);\n }\n\n condition = sql`${columnRef} ${operator} ${parsedValue}`;\n }\n\n conditions.push(condition);\n\n // Add connector if not the last clause\n if (i < filters.clauses.length - 1) {\n const connector = filters.connectors?.[i] ?? \"AND\";\n conditions.push(sql.raw(connector));\n }\n }\n\n // Combine all conditions\n if (conditions.length > 0) {\n whereClause = sql`WHERE ${sql.join(conditions, sql` `)}`;\n }\n }\n\n // Build main query\n let query;\n if (sort) {\n const columnRef = sql.raw(`\"${sort.column}\"`);\n const direction = sort.direction === \"desc\" ? sql`DESC` : sql`ASC`;\n query = sql<Record<string, unknown>>`\n SELECT * FROM ${tableRef}\n ${whereClause}\n ORDER BY ${columnRef} ${direction}\n LIMIT ${limit} OFFSET ${offset}\n `;\n } else {\n query = sql<Record<string, unknown>>`\n SELECT * FROM ${tableRef}\n ${whereClause}\n LIMIT ${limit} OFFSET ${offset}\n `;\n }\n\n const result = await query.execute(database);\n\n // Build count query with same filters\n const countQuery = sql<{ count: string }>`\n SELECT COUNT(*) as count FROM ${tableRef}\n ${whereClause}\n `;\n const countResult = await countQuery.execute(database);\n const total = countResult.rows[0]\n ? parseInt(countResult.rows[0].count, 10)\n : null;\n\n const rawColumns =\n result.rows.length > 0 ? Object.keys(result.rows[0]) : [];\n const columns = [\n ...PRIORITY_COLUMNS.filter((col) => rawColumns.includes(col)),\n ...rawColumns.filter(\n (col) =>\n !PRIORITY_COLUMNS.includes(\n col as (typeof PRIORITY_COLUMNS)[number],\n ),\n ),\n ];\n\n return {\n columns,\n rows: result.rows,\n total,\n };\n },\n [database],\n );\n\n const onExportDb = useCallback(async () => {\n if (!pglite) return;\n\n if (queue) await quiesceQueue(queue);\n\n try {\n const major = resolvePgMajorForRuntime(getCachedReactorPgMajor() ?? null);\n const pgDump = await loadPgDump(major);\n const dump = await pgDump({ pg: pglite });\n const sqlContent = await dump.text();\n\n const blob = new Blob([sqlContent], { type: \"text/sql\" });\n const url = URL.createObjectURL(blob);\n const a = document.createElement(\"a\");\n a.href = url;\n a.download = `database-export-${Date.now()}.sql`;\n a.click();\n URL.revokeObjectURL(url);\n } finally {\n queue?.unblock();\n }\n }, [pglite, queue]);\n\n const onImportDb = useCallback(\n async (sqlContent: string) => {\n if (!pglite) return;\n\n if (queue) await quiesceQueue(queue);\n\n if (reactor) {\n const status = reactor.kill();\n await status.completed;\n }\n\n // drop every user-created schema before restoring\n await pglite.transaction(async (tx) => {\n const schemas = await tx.query<{ nspname: string }>(\n `SELECT nspname FROM pg_namespace\n WHERE nspname NOT IN ('pg_catalog', 'pg_toast', 'information_schema', 'public')\n AND nspname NOT LIKE 'pg_temp_%'\n AND nspname NOT LIKE 'pg_toast_temp_%'`,\n );\n for (const { nspname } of schemas.rows) {\n await tx.exec(`DROP SCHEMA IF EXISTS \"${nspname}\" CASCADE`);\n }\n try {\n await tx.exec(\"SET standard_conforming_strings = off;\");\n } catch {\n // PG17 still accepts this but log if it ever fails.\n }\n await tx.exec(sqlContent);\n await tx.exec(`SET search_path TO ${REACTOR_SCHEMA}`);\n });\n\n // flush IDBFS → IndexedDB synchronously\n await syncPgliteToIdb(pglite);\n\n window.location.reload();\n\n // reload() is asynchronous; without blocking here the DBExplorer caller\n // would continue and call loadTables() against an in-flight shutdown.\n await new Promise(() => {});\n },\n [pglite, queue, reactor],\n );\n\n const getDefaultSort = useCallback(\n (table: string): SortOptions | undefined => {\n if (table === \"Operation\") {\n return { column: \"timestampUtcMs\", direction: \"desc\" };\n }\n return undefined;\n },\n [],\n );\n\n const canModifyDb = !!pglite;\n\n return {\n getTables,\n getTableRows,\n getDefaultSort,\n onExportDb: canModifyDb ? onExportDb : undefined,\n onImportDb: canModifyDb ? onImportDb : undefined,\n };\n}\n","import { clearReactorStorage } from \"@powerhousedao/connect/store\";\nimport {\n getCachedReactorPgMajor,\n PENDING_PG_SEED_KEY,\n subscribeReactorPgMajor,\n} from \"@powerhousedao/connect/utils\";\nimport { useCallback, useSyncExternalStore } from \"react\";\n\nconst SUPPORTED_PG_VERSIONS = [16, 17] as const;\n\nexport function useDebugInspector() {\n const currentPgVersion = useSyncExternalStore(\n subscribeReactorPgMajor,\n getCachedReactorPgMajor,\n () => undefined,\n );\n\n const onResetToPgVersion = useCallback(async (major: number) => {\n console.info(`[debug-inspector] Reset requested: PG${major}`);\n try {\n localStorage.setItem(PENDING_PG_SEED_KEY, String(major));\n console.info(`[debug-inspector] Clearing reactor storage...`);\n await clearReactorStorage();\n console.info(`[debug-inspector] Storage cleared. Reloading...`);\n window.location.reload();\n } catch (err) {\n console.error(\"[debug-inspector] Reset failed:\", err);\n localStorage.removeItem(PENDING_PG_SEED_KEY);\n throw err;\n }\n }, []);\n\n return {\n supportedPgVersions: SUPPORTED_PG_VERSIONS,\n currentPgVersion: currentPgVersion ?? null,\n onResetToPgVersion,\n };\n}\n","import type { IntegrityInspectorProps } from \"@powerhousedao/design-system/connect\";\nimport {\n DocumentIntegrityService,\n useReactorClientModule,\n type RebuildResult,\n type ValidationResult,\n} from \"@powerhousedao/reactor-browser\";\nimport { useCallback, useMemo } from \"react\";\n\nexport function useIntegrityInspector(): IntegrityInspectorProps | undefined {\n const module = useReactorClientModule();\n const reactorModule =\n module?.kind === \"browser\" ? module.reactorModule : undefined;\n const inspector = module?.kind === \"worker\" ? module.inspector : undefined;\n\n const service = useMemo(() => {\n if (!reactorModule) return undefined;\n\n return new DocumentIntegrityService(\n reactorModule.keyframeStore,\n reactorModule.operationStore,\n reactorModule.writeCache,\n reactorModule.documentView,\n reactorModule.documentModelRegistry,\n );\n }, [reactorModule]);\n\n const onValidate = useCallback(\n async (documentId: string, branch?: string): Promise<ValidationResult> => {\n if (inspector) {\n return (await inspector.validateDocument(\n documentId,\n branch,\n )) as ValidationResult;\n }\n if (!service) {\n throw new Error(\"Reactor module not available\");\n }\n return service.validateDocument(documentId, branch);\n },\n [service, inspector],\n );\n\n const onRebuildKeyframes = useCallback(\n async (documentId: string, branch?: string): Promise<RebuildResult> => {\n if (inspector) {\n return (await inspector.rebuildKeyframes(\n documentId,\n branch,\n )) as RebuildResult;\n }\n if (!service) {\n throw new Error(\"Reactor module not available\");\n }\n return service.rebuildKeyframes(documentId, branch);\n },\n [service, inspector],\n );\n\n const onRebuildSnapshots = useCallback(\n async (documentId: string, branch?: string): Promise<RebuildResult> => {\n if (inspector) {\n return (await inspector.rebuildSnapshots(\n documentId,\n branch,\n )) as RebuildResult;\n }\n if (!service) {\n throw new Error(\"Reactor module not available\");\n }\n return service.rebuildSnapshots(documentId, branch);\n },\n [service, inspector],\n );\n\n if (!service && !inspector) {\n return undefined;\n }\n\n return {\n onValidate,\n onRebuildKeyframes,\n onRebuildSnapshots,\n };\n}\n","import type {\n ProcessorInfo,\n ProcessorsInspectorProps,\n} from \"@powerhousedao/design-system/connect\";\nimport { useReactorClientModule } from \"@powerhousedao/reactor-browser\";\nimport { useCallback, useMemo } from \"react\";\n\nexport function useProcessorsInspector(): ProcessorsInspectorProps | undefined {\n const module = useReactorClientModule();\n const processorManager =\n module?.kind === \"browser\"\n ? module.reactorModule?.processorManager\n : undefined;\n const inspector = module?.kind === \"worker\" ? module.inspector : undefined;\n\n const available = useMemo(\n () => processorManager != null || inspector != null,\n [processorManager, inspector],\n );\n\n const getProcessors = useCallback((): Promise<ProcessorInfo[]> => {\n if (inspector) {\n return inspector.getProcessors() as Promise<ProcessorInfo[]>;\n }\n if (!processorManager) {\n return Promise.resolve([]);\n }\n return Promise.resolve(\n processorManager.getAll().map((tracked) => ({\n processorId: tracked.processorId,\n factoryId: tracked.factoryId,\n driveId: tracked.driveId,\n processorIndex: tracked.processorIndex,\n lastOrdinal: tracked.lastOrdinal,\n status: tracked.status,\n lastError: tracked.lastError,\n lastErrorTimestamp: tracked.lastErrorTimestamp,\n })),\n );\n }, [processorManager, inspector]);\n\n const onRetry = useCallback(\n async (processorId: string) => {\n if (inspector) {\n await inspector.retryProcessor(processorId);\n return;\n }\n if (!processorManager) return;\n const tracked = processorManager.get(processorId);\n if (tracked) {\n await tracked.retry();\n }\n },\n [processorManager, inspector],\n );\n\n if (!available) {\n return undefined;\n }\n\n return {\n getProcessors,\n onRetry,\n };\n}\n","import type {\n QueueInspectorProps,\n QueueState,\n} from \"@powerhousedao/design-system/connect\";\nimport {\n InMemoryQueue,\n useReactorClientModule,\n type Job,\n} from \"@powerhousedao/reactor-browser\";\nimport { useCallback, useMemo } from \"react\";\n\nexport function useQueueInspector(): QueueInspectorProps | undefined {\n const module = useReactorClientModule();\n const reactorClientModule = module?.kind === \"browser\" ? module : undefined;\n const inspector = module?.kind === \"worker\" ? module.inspector : undefined;\n const queue = reactorClientModule?.reactorModule?.queue;\n\n const inMemoryQueue = useMemo(() => {\n if (queue instanceof InMemoryQueue) {\n return queue;\n }\n return undefined;\n }, [queue]);\n\n const getQueueState = useCallback((): Promise<QueueState> => {\n if (inspector) {\n return inspector.getQueueState() as Promise<QueueState>;\n }\n if (!inMemoryQueue) {\n return Promise.resolve({\n isPaused: false,\n pendingJobs: [],\n executingJobs: [],\n totalPending: 0,\n totalExecuting: 0,\n });\n }\n\n const pendingJobs = inMemoryQueue.getPendingJobs();\n const executingJobIds = inMemoryQueue.getExecutingJobIds();\n\n const executingJobs: Job[] = [];\n for (const jobIdSet of executingJobIds.values()) {\n for (const jobId of jobIdSet) {\n const job = inMemoryQueue.getJob(jobId);\n if (job) {\n executingJobs.push(job);\n }\n }\n }\n\n return Promise.resolve({\n isPaused: inMemoryQueue.paused,\n pendingJobs,\n executingJobs,\n totalPending: pendingJobs.length,\n totalExecuting: executingJobs.length,\n });\n }, [inMemoryQueue, inspector]);\n\n const onPause = useCallback(async (): Promise<void> => {\n if (inspector) {\n await inspector.pauseQueue();\n return;\n }\n if (inMemoryQueue) {\n inMemoryQueue.pause();\n }\n }, [inMemoryQueue, inspector]);\n\n const onResume = useCallback(async (): Promise<void> => {\n if (inspector) {\n await inspector.resumeQueue();\n return;\n }\n if (inMemoryQueue) {\n await inMemoryQueue.resume();\n }\n }, [inMemoryQueue, inspector]);\n\n if (!inMemoryQueue && !inspector) {\n return undefined;\n }\n\n return {\n getQueueState,\n onPause,\n onResume,\n };\n}\n","import type {\n ConnectionStateSnapshot,\n Remote,\n} from \"@powerhousedao/reactor-browser\";\nimport {\n addRemoteDrive,\n PollBehavior,\n useConnectionStates,\n useSync,\n} from \"@powerhousedao/reactor-browser\";\nimport { useCallback } from \"react\";\n\nexport function useRemotesInspector(): {\n getRemotes: () => Promise<Remote[]>;\n removeRemote: (name: string) => Promise<void>;\n addRemoteManual: (url: string) => Promise<void>;\n triggerPull: (name: string) => void;\n connectionStates: ReadonlyMap<string, ConnectionStateSnapshot>;\n} {\n const syncManager = useSync();\n if (!syncManager) {\n throw new Error(\"Sync manager not found\");\n }\n\n const connectionStates = useConnectionStates();\n\n const getRemotes = useCallback(() => {\n return Promise.resolve(syncManager.list());\n }, [syncManager]);\n\n const removeRemote = useCallback(\n (name: string) => syncManager.remove(name),\n [syncManager],\n );\n\n const addRemoteManual = useCallback(async (url: string) => {\n await addRemoteDrive(url, undefined, {\n pollBehavior: PollBehavior.Manual,\n });\n }, []);\n\n const triggerPull = useCallback(\n (name: string) => syncManager.triggerPull(name),\n [syncManager],\n );\n\n return {\n getRemotes,\n removeRemote,\n addRemoteManual,\n triggerPull,\n connectionStates,\n };\n}\n","import type { WorkerInspectorProps } from \"@powerhousedao/design-system/connect\";\nimport { useReactorClientModule } from \"@powerhousedao/reactor-browser\";\nimport { useMemo } from \"react\";\n\nexport function useWorkerInspector(): WorkerInspectorProps | undefined {\n const module = useReactorClientModule();\n const adminClient =\n module?.kind === \"worker\" ? module.adminClient : undefined;\n\n return useMemo(() => {\n if (!adminClient) {\n return undefined;\n }\n return {\n getInfo: () => adminClient.info(),\n onRestart: () => adminClient.restart(),\n };\n }, [adminClient]);\n}\n","import { InspectorModal as ConnectInspectorModal } from \"@powerhousedao/design-system/connect\";\nimport {\n closePHModal,\n REACTOR_SCHEMA,\n usePHModal,\n} from \"@powerhousedao/reactor-browser\";\nimport { useDbExplorer } from \"./useDbExplorer.js\";\nimport { useDebugInspector } from \"./useDebugInspector.js\";\nimport { useIntegrityInspector } from \"./useIntegrityInspector.js\";\nimport { useProcessorsInspector } from \"./useProcessorsInspector.js\";\nimport { useQueueInspector } from \"./useQueueInspector.js\";\nimport { useRemotesInspector } from \"./useRemotesInspector.js\";\nimport { useWorkerInspector } from \"./useWorkerInspector.js\";\n\nconst DEFAULT_PAGE_SIZE = 25;\n\nexport const InspectorModal: React.FC = () => {\n const phModal = usePHModal();\n const open = phModal?.type === \"inspector\";\n\n const { getTables, getTableRows, getDefaultSort, onExportDb, onImportDb } =\n useDbExplorer();\n const {\n getRemotes,\n removeRemote,\n addRemoteManual,\n triggerPull,\n connectionStates,\n } = useRemotesInspector();\n const queueInspectorProps = useQueueInspector();\n const processorsInspectorProps = useProcessorsInspector();\n const integrityInspectorProps = useIntegrityInspector();\n const workerInspectorProps = useWorkerInspector();\n const { currentPgVersion, supportedPgVersions, onResetToPgVersion } =\n useDebugInspector();\n\n return (\n <ConnectInspectorModal\n open={open}\n onOpenChange={(status) => {\n if (!status) closePHModal();\n }}\n dbExplorerProps={{\n schema: REACTOR_SCHEMA,\n getTables,\n getTableRows,\n getDefaultSort,\n pageSize: DEFAULT_PAGE_SIZE,\n onExportDb,\n onImportDb,\n pgVersionControl: {\n currentPgVersion,\n supportedPgVersions,\n onResetToPgVersion,\n },\n }}\n remotesInspectorProps={{\n getRemotes,\n removeRemote,\n addRemoteManual,\n triggerPull,\n connectionStates,\n }}\n queueInspectorProps={queueInspectorProps}\n processorsInspectorProps={processorsInspectorProps}\n integrityInspectorProps={integrityInspectorProps}\n workerInspectorProps={workerInspectorProps}\n />\n );\n};\n"],"names":["ConnectInspectorModal"],"mappings":";;;;;;;;;;;;;AAuBA,eAAe,aAAa,OAA8B;AACxD,OAAM,IAAI,SAAe,YAAY,MAAM,YAAY,SAAS,CAAC,CAAC;;AAQpE,eAAe,gBAAgB,QAMb;AAChB,OAAM,IAAI,SAAe,SAAS,WAAW;AAC3C,SAAO,OAAO,GAAG,OAAO,QAAQ,QAAS,MAAM,OAAO,IAAI,GAAG,SAAS,CAAE;GACxE;;AAmCJ,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACA;CACA;CACD;AASD,SAAS,4BACP,WACkB;AAMlB,QAAO,IAAI,OAAiB,EAC1B,SAAS,IAAI,cANuB,EACpC,OAAO,OAAO,WAAW,YAAY,EACnC,MAAO,MAAM,UAAU,eAAe,WAAW,OAAO,EACzD,GACF,CAEyD,EACzD,CAAC;;AAGJ,SAAgB,gBAAgB;CAC9B,MAAM,kBAAkB,aAAa;CACrC,MAAM,SAAS,WAAW;CAC1B,MAAM,SAAS,wBAAwB;CACvC,M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EAAE,CAAC;EAWJ,aATkB,aACjB,SAAiB,YAAY,YAAY,KAAK,EAC/C,CAAC,YAAY,CACd;EAOC;EACD;;;;AChDH,SAAgB,qBAAuD;CACrE,MAAM,SAAS,wBAAwB;CACvC,MAAM,cACJ,QAAQ,SAAS,WAAW,OAAO,cAAc,KAAA;AAEnD,QAAO,cAAc;AACnB,MAAI,CAAC,YACH;AAEF,SAAO;GACL,eAAe,YAAY,MAAM;GACjC,iBAAiB,YAAY,SAAS;GACvC;IACA,CAAC,YAAY,CAAC;;;;ACHnB,MAAM,oBAAoB;AAE1B,MAAa,uBAAiC;CAE5C,MAAM,OADU,YAAY,EACN,SAAS;CAE/B,MAAM,EAAE,WAAW,cAAc,gBAAgB,YAAY,eAC3D,eAAe;CACjB,MAAM,EACJ,YACA,cACA,iBACA,aACA,qBACE,qBAAqB;CACzB,MAAM,sBAAsB,mBAAmB;CAC/C,MAAM,2BAA2B,wBAAwB;CACzD,MAAM,0BAA0B,uBAAuB;CACvD,MAAM,uBAAuB,oBAAoB;CACjD,MAAM,EAAE,kBAAkB,qBAAqB,uBAC7C,mBAAmB;AAErB,QACE,oBAACA,kBAAD;EACQ;EACN,eAAe,WAAW;AACxB,OAAI,CAAC,OAAQ,eAAc;;EAE7B,iBAAiB;GACf,QAAQ;GACR;GACA;GACA;GACA,UAAU;GACV;GACA;GACA,kBAAkB;IAChB;IACA;IACA;IACD;GACF;EACD,uBAAuB;GACrB;GACA;GACA;GACA;GACA;GACD;EACoB;EACK;EACD;EACH;EACtB,CAAA","debug_id":"2c37574f-0c78-5d64-bf24-7f53df2dd46b"}
@@ -1,6 +1,6 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7bca2e2d-003c-5f8a-ac47-599074d6a710")}catch(e){}}();
3
- import { t as useRegistryPackages } from "./useRegistryPackages-B-gFECmd.js";
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="bd7d533f-489c-56c6-b228-c4fb25a21177")}catch(e){}}();
3
+ import { t as useRegistryPackages } from "./useRegistryPackages-BaYtekjQ.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { closePHModal, usePHModal, useVetraPackageManager } from "@powerhousedao/reactor-browser";
6
6
  import { PackageInstallModal } from "@powerhousedao/design-system/connect";
@@ -33,5 +33,5 @@ function ConnectMissingPackageModal() {
33
33
  //#endregion
34
34
  export { ConnectMissingPackageModal };
35
35
 
36
- //# sourceMappingURL=MissingPackageModal-Bn036mWQ.js.map
37
- //# debugId=7bca2e2d-003c-5f8a-ac47-599074d6a710
36
+ //# sourceMappingURL=MissingPackageModal-BQcCQbOn.js.map
37
+ //# debugId=bd7d533f-489c-56c6-b228-c4fb25a21177
@@ -1 +1 @@
1
- {"version":3,"file":"MissingPackageModal-Bn036mWQ.js","sources":["../src/components/modal/modals/MissingPackageModal.tsx"],"sourcesContent":["import { useRegistryPackages } from \"@powerhousedao/connect/hooks\";\nimport {\n PackageInstallModal,\n type PendingPackageInstallation,\n} from \"@powerhousedao/design-system/connect\";\nimport {\n closePHModal,\n usePHModal,\n useVetraPackageManager,\n} from \"@powerhousedao/reactor-browser\";\n\nexport function ConnectMissingPackageModal() {\n const phModal = usePHModal();\n const { registryPackageList, updateRegistryPackageStatus } =\n useRegistryPackages();\n const packageManager = useVetraPackageManager();\n const open = phModal?.type === \"missingPackage\";\n\n const documentType = open ? phModal.documentType : undefined;\n\n if (!packageManager || !documentType) return null;\n\n const pendingInstallations: PendingPackageInstallation[] = registryPackageList\n .filter((rp) => rp.documentTypes.includes(documentType))\n .map((rp) => ({\n documentType,\n packageName: rp.name,\n }));\n\n async function onInstall(packageName: string) {\n const result = await packageManager?.addPackage(packageName);\n if (result?.type === \"success\") {\n updateRegistryPackageStatus(packageName, \"registry-install\");\n }\n }\n\n function onDismiss(packageName: string) {\n updateRegistryPackageStatus(packageName, \"dismissed\");\n }\n\n return (\n <PackageInstallModal\n pendingInstallations={pendingInstallations}\n onInstall={onInstall}\n onDismiss={onDismiss}\n onOpenChange={(status: boolean) => {\n if (!status) return closePHModal();\n }}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AAWA,SAAgB,6BAA6B;CAC3C,MAAM,UAAU,YAAY;CAC5B,MAAM,EAAE,qBAAqB,gCAC3B,qBAAqB;CACvB,MAAM,iBAAiB,wBAAwB;CAG/C,MAAM,eAFO,SAAS,SAAS,mBAEH,QAAQ,eAAe,KAAA;AAEnD,KAAI,CAAC,kBAAkB,CAAC,aAAc,QAAO;CAE7C,MAAM,uBAAqD,oBACxD,QAAQ,OAAO,GAAG,cAAc,SAAS,aAAa,CAAC,CACvD,KAAK,QAAQ;EACZ;EACA,aAAa,GAAG;EACjB,EAAE;CAEL,eAAe,UAAU,aAAqB;AAE5C,OADe,MAAM,gBAAgB,WAAW,YAAY,GAChD,SAAS,UACnB,6BAA4B,aAAa,mBAAmB;;CAIhE,SAAS,UAAU,aAAqB;AACtC,8BAA4B,aAAa,YAAY;;AAGvD,QACE,oBAAC,qBAAD;EACwB;EACX;EACA;EACX,eAAe,WAAoB;AACjC,OAAI,CAAC,OAAQ,QAAO,cAAc;;EAEpC,CAAA","debug_id":"7bca2e2d-003c-5f8a-ac47-599074d6a710"}
1
+ {"version":3,"file":"MissingPackageModal-BQcCQbOn.js","sources":["../src/components/modal/modals/MissingPackageModal.tsx"],"sourcesContent":["import { useRegistryPackages } from \"@powerhousedao/connect/hooks\";\nimport {\n PackageInstallModal,\n type PendingPackageInstallation,\n} from \"@powerhousedao/design-system/connect\";\nimport {\n closePHModal,\n usePHModal,\n useVetraPackageManager,\n} from \"@powerhousedao/reactor-browser\";\n\nexport function ConnectMissingPackageModal() {\n const phModal = usePHModal();\n const { registryPackageList, updateRegistryPackageStatus } =\n useRegistryPackages();\n const packageManager = useVetraPackageManager();\n const open = phModal?.type === \"missingPackage\";\n\n const documentType = open ? phModal.documentType : undefined;\n\n if (!packageManager || !documentType) return null;\n\n const pendingInstallations: PendingPackageInstallation[] = registryPackageList\n .filter((rp) => rp.documentTypes.includes(documentType))\n .map((rp) => ({\n documentType,\n packageName: rp.name,\n }));\n\n async function onInstall(packageName: string) {\n const result = await packageManager?.addPackage(packageName);\n if (result?.type === \"success\") {\n updateRegistryPackageStatus(packageName, \"registry-install\");\n }\n }\n\n function onDismiss(packageName: string) {\n updateRegistryPackageStatus(packageName, \"dismissed\");\n }\n\n return (\n <PackageInstallModal\n pendingInstallations={pendingInstallations}\n onInstall={onInstall}\n onDismiss={onDismiss}\n onOpenChange={(status: boolean) => {\n if (!status) return closePHModal();\n }}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AAWA,SAAgB,6BAA6B;CAC3C,MAAM,UAAU,YAAY;CAC5B,MAAM,EAAE,qBAAqB,gCAC3B,qBAAqB;CACvB,MAAM,iBAAiB,wBAAwB;CAG/C,MAAM,eAFO,SAAS,SAAS,mBAEH,QAAQ,eAAe,KAAA;AAEnD,KAAI,CAAC,kBAAkB,CAAC,aAAc,QAAO;CAE7C,MAAM,uBAAqD,oBACxD,QAAQ,OAAO,GAAG,cAAc,SAAS,aAAa,CAAC,CACvD,KAAK,QAAQ;EACZ;EACA,aAAa,GAAG;EACjB,EAAE;CAEL,eAAe,UAAU,aAAqB;AAE5C,OADe,MAAM,gBAAgB,WAAW,YAAY,GAChD,SAAS,UACnB,6BAA4B,aAAa,mBAAmB;;CAIhE,SAAS,UAAU,aAAqB;AACtC,8BAA4B,aAAa,YAAY;;AAGvD,QACE,oBAAC,qBAAD;EACwB;EACX;EACA;EACX,eAAe,WAAoB;AACjC,OAAI,CAAC,OAAQ,QAAO,cAAc;;EAEpC,CAAA","debug_id":"bd7d533f-489c-56c6-b228-c4fb25a21177"}
@@ -1,10 +1,10 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a02bc50a-c53b-5069-ace7-89d53e0e1540")}catch(e){}}();
3
- import { t as package_default } from "./package-B-TZdzz9.js";
4
- import { n as getGitUrl, r as shortGitSha, t as getGitSha } from "./build-info-BCK6n_XY.js";
5
- import { r as connectConfig } from "./connect.config-Bt4pvvWV.js";
6
- import { n as toast } from "./toast-BEy42aYx.js";
7
- import { t as useRegistryPackages } from "./useRegistryPackages-B-gFECmd.js";
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e7cd3c1b-0961-575b-aee2-29794882b0e5")}catch(e){}}();
3
+ import { t as package_default } from "./package-DUieCgZv.js";
4
+ import { i as shortGitSha, n as getGitUrl, t as getGitSha } from "./build-info-BNG5pRW5.js";
5
+ import { r as connectConfig } from "./connect.config-BG681xG9.js";
6
+ import { n as toast } from "./toast-4t-VimvD.js";
7
+ import { t as useRegistryPackages } from "./useRegistryPackages-BaYtekjQ.js";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { t } from "i18next";
10
10
  import { useCallback, useMemo, useState } from "react";
@@ -76,7 +76,7 @@ function AppGitHash() {
76
76
  function ConnectedDrives() {
77
77
  const drives = useDrives() ?? [];
78
78
  const remotes = useSyncList();
79
- const remoteDrives = useMemo(() => drives.filter((d) => remotes.some((r) => r.collectionId.equals(DriveCollectionId.forDrive(d.header.id)))), [drives, remotes]);
79
+ const remoteDrives = useMemo(() => drives.filter((d) => remotes.some((r) => r.meta.collectionId.equals(DriveCollectionId.forDrive(d.header.id)))), [drives, remotes]);
80
80
  return /* @__PURE__ */ jsxs("div", {
81
81
  className: "my-4 bg-background p-3",
82
82
  children: [/* @__PURE__ */ jsx("h2", {
@@ -285,5 +285,5 @@ const SettingsModal = () => {
285
285
  //#endregion
286
286
  export { SettingsModal };
287
287
 
288
- //# sourceMappingURL=SettingsModal-CZ4zSICk.js.map
289
- //# debugId=a02bc50a-c53b-5069-ace7-89d53e0e1540
288
+ //# sourceMappingURL=SettingsModal-C0gXNY6D.js.map
289
+ //# debugId=e7cd3c1b-0961-575b-aee2-29794882b0e5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsModal-C0gXNY6D.js","sources":["../src/components/modal/modals/settings/about.tsx","../src/components/modal/modals/settings/danger-zone.tsx","../src/components/modal/modals/settings/default-editor.tsx","../src/components/modal/modals/settings/package-manager.tsx","../src/components/modal/modals/SettingsModal.tsx"],"sourcesContent":["import { connectConfig } from \"@powerhousedao/connect/config\";\nimport {\n getGitSha,\n getGitUrl,\n packageJson,\n shortGitSha,\n} from \"@powerhousedao/connect/utils\";\nimport { Icon } from \"@powerhousedao/design-system\";\nimport { About as BaseAbout } from \"@powerhousedao/design-system/connect\";\nimport {\n closePHModal,\n DriveCollectionId,\n showPHModal,\n useDrives,\n useDriveSystemInfo,\n useSyncList,\n} from \"@powerhousedao/reactor-browser\";\nimport type { DocumentDriveDocument } from \"@powerhousedao/shared/document-drive\";\nimport { useMemo } from \"react\";\n\nexport const About: React.FC = () => {\n const onOpenInspector = () => {\n closePHModal();\n showPHModal({ type: \"inspector\" });\n };\n\n return (\n <div>\n <BaseAbout\n packageJson={packageJson}\n phCliVersion={\n typeof connectConfig.phCliVersion === \"string\"\n ? connectConfig.phCliVersion\n : undefined\n }\n />\n <AppGitHash />\n <ConnectedDrives />\n <div className=\"bg-background p-3\">\n <h2 className=\"mb-2 font-semibold text-foreground\">Inspector</h2>\n <p className=\"mb-3 text-sm font-normal text-foreground\">\n Explore the local database and sync state for debugging.\n </p>\n <button\n className=\"flex items-center gap-x-2 rounded-md border border-border bg-transparent px-3 py-1 text-sm font-medium text-foreground transition-colors hover:hover-effect\"\n onClick={onOpenInspector}\n type=\"button\"\n >\n Open Inspector <Icon name=\"CircleInfo\" size={16} />\n </button>\n </div>\n </div>\n );\n};\n\nfunction AppGitHash() {\n const sha = getGitSha();\n if (sha === \"unknown\") return null;\n const url = getGitUrl();\n const label = shortGitSha(sha);\n return (\n <div className=\"bg-background p-3 text-sm\">\n <span className=\"font-semibold\">Git hash: </span>\n {url ? (\n <a\n className=\"font-mono underline\"\n href={url}\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n title={sha}\n >\n {label}\n </a>\n ) : (\n <span className=\"font-mono\" title={sha}>\n {label}\n </span>\n )}\n </div>\n );\n}\n\nfunction ConnectedDrives() {\n const drives = useDrives() ?? [];\n const remotes = useSyncList();\n\n const remoteDrives = useMemo(\n () =>\n drives.filter((d) =>\n remotes.some((r) =>\n r.meta.collectionId.equals(DriveCollectionId.forDrive(d.header.id)),\n ),\n ),\n [drives, remotes],\n );\n\n return (\n <div className=\"my-4 bg-background p-3\">\n <h2 className=\"mb-2 font-semibold text-foreground\">Connected drives</h2>\n {remoteDrives.length === 0 ? (\n <p className=\"text-sm font-normal text-foreground\">\n No connected remote drives.\n </p>\n ) : (\n <ul className=\"flex flex-col gap-3\">\n {remoteDrives.map((drive) => (\n <DriveAboutEntry key={drive.header.id} drive={drive} />\n ))}\n </ul>\n )}\n </div>\n );\n}\n\nfunction DriveAboutEntry({ drive }: { drive: DocumentDriveDocument }) {\n const info = useDriveSystemInfo(drive);\n const name = drive.state.global.name || drive.header.name;\n\n return (\n <li className=\"text-sm text-foreground\">\n <div className=\"flex items-baseline gap-2\">\n <span className=\"font-medium\">{name}</span>\n {info.status === \"ready\" && (\n <span className=\"text-xs text-muted-foreground\">{info.host}</span>\n )}\n </div>\n {info.status === \"loading\" && (\n <div className=\"mt-1 text-xs text-muted-foreground\">Loading…</div>\n )}\n {info.status === \"error\" && (\n <div className=\"mt-1 text-xs text-destructive\">\n Could not load system info\n </div>\n )}\n {info.status === \"ready\" && (\n <div className=\"mt-1 text-xs text-foreground\">\n <div>\n <span className=\"font-medium\">Version:</span> {info.version}\n </div>\n <div>\n <span className=\"font-medium\">Git hash: </span>\n {info.gitUrl ? (\n <a\n className=\"font-mono hover:underline\"\n href={info.gitUrl}\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n title={info.gitHash}\n >\n {shortGitSha(info.gitHash)}\n </a>\n ) : (\n <span className=\"font-mono\" title={info.gitHash}>\n {shortGitSha(info.gitHash)}\n </span>\n )}\n </div>\n </div>\n )}\n {info.status === \"local\" && (\n <div className=\"mt-1 text-xs text-muted-foreground\">\n Local drive — N/A\n </div>\n )}\n </li>\n );\n}\n","import { DangerZone as BaseDangerZone } from \"@powerhousedao/design-system/connect\";\nimport {\n deleteDrive,\n setSelectedDrive,\n showPHModal,\n useDrives,\n} from \"@powerhousedao/reactor-browser\";\nimport type { DocumentDriveDocument } from \"@powerhousedao/shared/document-drive\";\n\nexport const DangerZone: React.FC = () => {\n const drives = useDrives();\n\n const handleDeleteDrive = async (drive: DocumentDriveDocument) => {\n await deleteDrive(drive.header.id);\n setSelectedDrive(undefined);\n };\n\n const handleClearStorage = () => {\n showPHModal({ type: \"clearStorage\" });\n };\n\n return (\n <BaseDangerZone\n drives={drives ?? []}\n onDeleteDrive={(drive) => {\n void handleDeleteDrive(drive);\n }}\n onClearStorage={handleClearStorage}\n />\n );\n};\n","import { DefaultEditor as BaseDefaultEditor } from \"@powerhousedao/design-system/connect\";\nimport { useCallback, useState } from \"react\";\n\nconst documentModelEditorOptions = [\n { label: \"V1\", value: \"document-model-editor\" },\n { label: \"V2\", value: \"document-model-editor-v2\" },\n] as const;\n\nexport const DefaultEditor: React.FC = () => {\n const [documentModelEditor, setDocumentModelEditor] = useState<\n (typeof documentModelEditorOptions)[number]\n >(documentModelEditorOptions[1]);\n\n const handleSetDocumentEditor = useCallback((value: string) => {\n const option = documentModelEditorOptions.find((dm) => dm.value == value);\n if (option) {\n setDocumentModelEditor(option);\n }\n }, []);\n\n return (\n <BaseDefaultEditor\n documentModelEditor={documentModelEditor.value}\n setDocumentModelEditor={handleSetDocumentEditor}\n documentModelEditorOptions={\n documentModelEditorOptions as unknown as {\n value: string;\n label: string;\n }[]\n }\n />\n );\n};\n","import { useRegistryPackages } from \"@powerhousedao/connect/hooks\";\nimport { toast } from \"@powerhousedao/connect/services\";\nimport { PackageManager } from \"@powerhousedao/design-system/connect\";\nimport { useVetraPackageManager } from \"@powerhousedao/reactor-browser\";\nimport React from \"react\";\n\n/**\n * Split a `name@tag` spec into its bare package name. Mirrors the design-system's\n * `parsePackageSpec` — duplicated here to avoid reaching into a deep subpath\n * export. Scoped names split on the LAST `@`, unscoped on the first.\n */\nfunction parseBareName(spec: string): string {\n const trimmed = spec.trim();\n const at = trimmed.startsWith(\"@\")\n ? trimmed.lastIndexOf(\"@\")\n : trimmed.indexOf(\"@\");\n return at > 0 ? trimmed.slice(0, at) : trimmed;\n}\n\nexport const ConnectPackageManager: React.FC = () => {\n const packageManager = useVetraPackageManager();\n const {\n registryPackageList,\n updateRegistryPackageStatus,\n registerFallbackRegistryPackage,\n } = useRegistryPackages();\n\n async function handleInstall(packageSpec: string) {\n if (!packageManager) return;\n\n // The spec may include an explicit `@tag` / `@version` suffix from the\n // search input. Pass it through to the package manager as-is (the CDN\n // route already handles `name@tag` specs), but track status under the\n // bare name so the Settings list doesn't fragment.\n const bareName = parseBareName(packageSpec);\n // Packages that were in `/packages` when the user clicked Install go\n // through `updateRegistryPackageStatus` and hit an existing entry.\n // Packages that landed via the npm-uplink fallback weren't in the list,\n // so we register them explicitly rather than silently upserting a\n // placeholder — keeping the \"does not exist\" error as a signal for any\n // other code path that reaches update without a matching entry.\n const wasKnownToRegistry = registryPackageList.some(\n (p) => p.name === bareName,\n );\n const result = await packageManager.addPackage(packageSpec);\n if (result.type === \"success\") {\n if (wasKnownToRegistry) {\n updateRegistryPackageStatus(bareName, \"registry-install\");\n } else {\n registerFallbackRegistryPackage(\n bareName,\n result.package,\n packageManager.getPackageVersion(bareName) ??\n packageManager.getPackageVersion(packageSpec),\n \"registry-install\",\n );\n }\n toast(`Package \"${packageSpec}\" installed successfully`, {\n type: \"connect-success\",\n });\n } else {\n const message = result.error.message;\n // `BrowserPackageManager` raises a generic \"Failed to fetch dynamically\n // imported module\" when the registry CDN returns an error. That covers\n // both \"the name exists nowhere (not on this registry AND not on the\n // npmjs uplink)\" and \"the tarball is there but doesn't look like a\n // Powerhouse package\". Tell the user in plain terms before dumping the\n // raw error so the \"install from npm\" fallback case is self-explanatory.\n const isLikelyNotFound = /failed to fetch|404|not found/i.test(message);\n const userMessage = isLikelyNotFound\n ? `Could not install \"${packageSpec}\". The package isn't available on this registry, and the npmjs.org fallback could not resolve it either.`\n : `Failed to install \"${packageSpec}\": ${message}`;\n toast(userMessage, { type: \"error\" });\n }\n }\n\n function handleUninstall(packageName: string) {\n if (!packageManager) return;\n try {\n packageManager.removePackage(packageName);\n updateRegistryPackageStatus(packageName, \"available\");\n\n toast(`Package \"${packageName}\" uninstalled successfully`, {\n type: \"connect-success\",\n });\n } catch (error) {\n const message = error instanceof Error ? error.message : \"Unknown error\";\n toast(`Failed to uninstall \"${packageName}\": ${message}`, {\n type: \"error\",\n });\n }\n }\n\n return (\n <div className=\"flex h-full flex-1 flex-col\">\n <PackageManager\n mutable={true}\n registryPackageList={registryPackageList}\n onInstall={handleInstall}\n onUninstall={handleUninstall}\n />\n </div>\n );\n};\n","import {\n SettingsModal as SettingsModalV2,\n ThemeSwitch,\n} from \"@powerhousedao/design-system/connect\";\nimport { closePHModal, usePHModal } from \"@powerhousedao/reactor-browser\";\nimport { t } from \"i18next\";\nimport { CircleHelp, Package, PenLine, TriangleAlert } from \"lucide-react\";\nimport React, { useMemo } from \"react\";\nimport { About } from \"./settings/about.js\";\nimport { DangerZone } from \"./settings/danger-zone.js\";\nimport { DefaultEditor } from \"./settings/default-editor.js\";\nimport { ConnectPackageManager } from \"./settings/package-manager.js\";\n\nconst iconProps = { size: 16 } as const;\n\nexport const SettingsModal: React.FC = () => {\n const phModal = usePHModal();\n const open = phModal?.type === \"settings\";\n\n const tabs = useMemo(\n () => [\n {\n id: \"package-manager\",\n icon: <Package {...iconProps} />,\n label: \"Package Manager\",\n content: ConnectPackageManager,\n },\n {\n id: \"default-editors\",\n icon: <PenLine {...iconProps} />,\n label: \"Default Editors\",\n content: DefaultEditor,\n },\n {\n id: \"danger-zone\",\n icon: <TriangleAlert {...iconProps} className=\"text-destructive\" />,\n label: <span className=\"text-destructive\">Danger Zone</span>,\n content: () => <DangerZone />,\n },\n {\n id: \"about\",\n icon: <CircleHelp {...iconProps} />,\n label: \"About\",\n content: About,\n },\n ],\n [],\n );\n\n return (\n <SettingsModalV2\n open={open}\n title={t(\"modals.connectSettings.title\")}\n onOpenChange={(status: boolean) => {\n if (!status) return closePHModal();\n }}\n tabs={tabs}\n navFooter={<ThemeSwitch horizontal />}\n />\n );\n};\n"],"names":["About","BaseAbout","packageJson","DangerZone","BaseDangerZone","DefaultEditor","BaseDefaultEditor","DefaultEditor","DangerZone","About","SettingsModalV2"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAaA,gBAAwB;CACnC,MAAM,wBAAwB;AAC5B,gBAAc;AACd,cAAY,EAAE,MAAM,aAAa,CAAC;;AAGpC,QACE,qBAAC,OAAD,EAAA,UAAA;EACE,oBAACC,OAAD;GACE,aAAaC;GACb,cACE,OAAO,cAAc,iBAAiB,WAClC,cAAc,eACd,KAAA;GAEN,CAAA;EACF,oBAAC,YAAD,EAAc,CAAA;EACd,oBAAC,iBAAD,EAAmB,CAAA;EACnB,qBAAC,OAAD;GAAK,WAAU;aAAf;IACE,oBAAC,MAAD;KAAI,WAAU;eAAqC;KAAc,CAAA;IACjE,oBAAC,KAAD;KAAG,WAAU;eAA2C;KAEpD,CAAA;IACJ,qBAAC,UAAD;KACE,WAAU;KACV,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function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c6e40a20-1073-5d21-ba94-170c9adec293")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d0cff9c7-cc95-58d8-a8e7-1950202bec87")}catch(e){}}();
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import "react";
@@ -30,5 +30,5 @@ const UpgradeDriveModal = () => {
30
30
  //#endregion
31
31
  export { UpgradeDriveModal };
32
32
 
33
- //# sourceMappingURL=UpgradeDriveModal-C7lV4rAX.js.map
34
- //# debugId=c6e40a20-1073-5d21-ba94-170c9adec293
33
+ //# sourceMappingURL=UpgradeDriveModal-BZGSE9_r.js.map
34
+ //# debugId=d0cff9c7-cc95-58d8-a8e7-1950202bec87
@@ -1 +1 @@
1
- {"version":3,"file":"UpgradeDriveModal-C7lV4rAX.js","sources":["../src/components/modal/modals/UpgradeDriveModal.tsx"],"sourcesContent":["import { ConnectUpgradeDriveModal } from \"@powerhousedao/design-system/connect\";\nimport { closePHModal, usePHModal } from \"@powerhousedao/reactor-browser\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\nexport const UpgradeDriveModal: React.FC = () => {\n const phModal = usePHModal();\n const open = phModal?.type === \"upgradeDrive\";\n const driveId = open ? phModal.driveId : undefined;\n\n const { t } = useTranslation();\n\n const onContinue = () => {\n // TODO: Implement upgrade drive\n console.log(\"Upgrade drive: \", driveId);\n closePHModal();\n };\n\n return (\n <ConnectUpgradeDriveModal\n open={open}\n onContinue={onContinue}\n header={t(\"modals.upgradeDrive.header\")}\n body={t(\"modals.upgradeDrive.body\")}\n cancelLabel={t(\"common.cancel\")}\n continueLabel={t(\"common.continue\")}\n onOpenChange={(status: boolean) => {\n if (!status) return closePHModal();\n }}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAKA,MAAa,0BAAoC;CAC/C,MAAM,UAAU,YAAY;CAC5B,MAAM,OAAO,SAAS,SAAS;CAC/B,MAAM,UAAU,OAAO,QAAQ,UAAU,KAAA;CAEzC,MAAM,EAAE,MAAM,gBAAgB;CAE9B,MAAM,mBAAmB;AAEvB,UAAQ,IAAI,mBAAmB,QAAQ;AACvC,gBAAc;;AAGhB,QACE,oBAAC,0BAAD;EACQ;EACM;EACZ,QAAQ,EAAE,6BAA6B;EACvC,MAAM,EAAE,2BAA2B;EACnC,aAAa,EAAE,gBAAgB;EAC/B,eAAe,EAAE,kBAAkB;EACnC,eAAe,WAAoB;AACjC,OAAI,CAAC,OAAQ,QAAO,cAAc;;EAEpC,CAAA","debug_id":"c6e40a20-1073-5d21-ba94-170c9adec293"}
1
+ {"version":3,"file":"UpgradeDriveModal-BZGSE9_r.js","sources":["../src/components/modal/modals/UpgradeDriveModal.tsx"],"sourcesContent":["import { ConnectUpgradeDriveModal } from \"@powerhousedao/design-system/connect\";\nimport { closePHModal, usePHModal } from \"@powerhousedao/reactor-browser\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\nexport const UpgradeDriveModal: React.FC = () => {\n const phModal = usePHModal();\n const open = phModal?.type === \"upgradeDrive\";\n const driveId = open ? phModal.driveId : undefined;\n\n const { t } = useTranslation();\n\n const onContinue = () => {\n // TODO: Implement upgrade drive\n console.log(\"Upgrade drive: \", driveId);\n closePHModal();\n };\n\n return (\n <ConnectUpgradeDriveModal\n open={open}\n onContinue={onContinue}\n header={t(\"modals.upgradeDrive.header\")}\n body={t(\"modals.upgradeDrive.body\")}\n cancelLabel={t(\"common.cancel\")}\n continueLabel={t(\"common.continue\")}\n onOpenChange={(status: boolean) => {\n if (!status) return closePHModal();\n }}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAKA,MAAa,0BAAoC;CAC/C,MAAM,UAAU,YAAY;CAC5B,MAAM,OAAO,SAAS,SAAS;CAC/B,MAAM,UAAU,OAAO,QAAQ,UAAU,KAAA;CAEzC,MAAM,EAAE,MAAM,gBAAgB;CAE9B,MAAM,mBAAmB;AAEvB,UAAQ,IAAI,mBAAmB,QAAQ;AACvC,gBAAc;;AAGhB,QACE,oBAAC,0BAAD;EACQ;EACM;EACZ,QAAQ,EAAE,6BAA6B;EACvC,MAAM,EAAE,2BAA2B;EACnC,aAAa,EAAE,gBAAgB;EAC/B,eAAe,EAAE,kBAAkB;EACnC,eAAe,WAAoB;AACjC,OAAI,CAAC,OAAQ,QAAO,cAAc;;EAEpC,CAAA","debug_id":"d0cff9c7-cc95-58d8-a8e7-1950202bec87"}
@@ -0,0 +1,4 @@
1
+ import { t as AppLoader } from "./app-loader-BeaPtqWb.js";
2
+ export { AppLoader };
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="71cec8a9-024c-5037-aaec-d3efabecfd05")}catch(e){}}();
4
+ //# debugId=71cec8a9-024c-5037-aaec-d3efabecfd05