@powerhousedao/connect 6.2.0-dev.5 → 6.2.0-dev.51

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 (79) hide show
  1. package/dist/{AddDriveModal-kzL41qdg.js → AddDriveModal-D-nbV40j.js} +5 -8
  2. package/dist/{AddDriveModal-kzL41qdg.js.map → AddDriveModal-D-nbV40j.js.map} +1 -1
  3. package/dist/{ClearStorageModal-BSNg-Ymg.js → ClearStorageModal-D40SSzsa.js} +4 -4
  4. package/dist/{ClearStorageModal-BSNg-Ymg.js.map → ClearStorageModal-D40SSzsa.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-BuAYgDSn.js → DebugSettingsModal-uI0wbST1.js} +10 -10
  10. package/dist/DebugSettingsModal-uI0wbST1.js.map +1 -0
  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-B5-ZfKsb.js +36 -0
  20. package/dist/DriveAuthRequiredModal-B5-ZfKsb.js.map +1 -0
  21. package/dist/{DriveSettingsModal-L5sM-rIh.js → DriveSettingsModal-kR3hQnh4.js} +5 -5
  22. package/dist/DriveSettingsModal-kR3hQnh4.js.map +1 -0
  23. package/dist/{InspectorModal-DyrVQ4fu.js → InspectorModal-CtzrfT0O.js} +84 -35
  24. package/dist/InspectorModal-CtzrfT0O.js.map +1 -0
  25. package/dist/{MissingPackageModal-D_N96M6a.js → MissingPackageModal-BQcCQbOn.js} +4 -4
  26. package/dist/{MissingPackageModal-D_N96M6a.js.map → MissingPackageModal-BQcCQbOn.js.map} +1 -1
  27. package/dist/{SettingsModal-xaWk_n_D.js → SettingsModal-CPbdBRon.js} +36 -43
  28. package/dist/SettingsModal-CPbdBRon.js.map +1 -0
  29. package/dist/{UpgradeDriveModal-CyAUDCU7.js → UpgradeDriveModal-BZGSE9_r.js} +3 -3
  30. package/dist/{UpgradeDriveModal-CyAUDCU7.js.map → UpgradeDriveModal-BZGSE9_r.js.map} +1 -1
  31. package/dist/app-loader-D0B2KMz8.js +4 -0
  32. package/dist/{app-loader-0E0DoHDu.js → app-loader-N0kkedYA.js} +241 -286
  33. package/dist/app-loader-N0kkedYA.js.map +1 -0
  34. package/dist/{build-info-AU2BqmyC.js → build-info-Bhdpc4-E.js} +8 -5
  35. package/dist/{build-info-AU2BqmyC.js.map → build-info-Bhdpc4-E.js.map} +1 -1
  36. package/dist/components-X3EnrDp4.js +5 -0
  37. package/dist/{connect.config-aPx3rHZQ.js → connect.config-BG681xG9.js} +9 -5
  38. package/dist/connect.config-BG681xG9.js.map +1 -0
  39. package/dist/connection-state-Cig644T0.js +126 -0
  40. package/dist/connection-state-Cig644T0.js.map +1 -0
  41. package/dist/{load-BBnRfGjk.js → load-Cd1vLUR-.js} +11 -11
  42. package/dist/{load-BBnRfGjk.js.map → load-Cd1vLUR-.js.map} +1 -1
  43. package/dist/main.js +1 -1
  44. package/dist/{package-Z50_4mCC.js → package-B2ziXT-m.js} +7 -5
  45. package/dist/package-B2ziXT-m.js.map +1 -0
  46. package/dist/{pglite-runtime-toc1-TWa.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-D8oSKkep.js → pglite-seed-9rjhdCs5.js} +4 -4
  51. package/dist/{pglite-seed-D8oSKkep.js.map → pglite-seed-9rjhdCs5.js.map} +1 -1
  52. package/dist/{reactor-RZaraEfU.js → reactor-9Le-f3E4.js} +239 -36
  53. package/dist/reactor-9Le-f3E4.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-B7uKpkci.js → registerServiceWorker-2tRbkdJj.js} +4 -4
  58. package/dist/{registerServiceWorker-B7uKpkci.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/style.css +851 -2392
  63. package/dist/{toast-BEy42aYx.js → toast-4t-VimvD.js} +3 -3
  64. package/dist/{toast-BEy42aYx.js.map → toast-4t-VimvD.js.map} +1 -1
  65. package/dist/{useRegistryPackages-Bh0luCvV.js → useRegistryPackages-BaYtekjQ.js} +44 -8
  66. package/dist/useRegistryPackages-BaYtekjQ.js.map +1 -0
  67. package/package.json +13 -11
  68. package/dist/DebugSettingsModal-BuAYgDSn.js.map +0 -1
  69. package/dist/DriveSettingsModal-L5sM-rIh.js.map +0 -1
  70. package/dist/InspectorModal-DyrVQ4fu.js.map +0 -1
  71. package/dist/SettingsModal-xaWk_n_D.js.map +0 -1
  72. package/dist/app-loader-0E0DoHDu.js.map +0 -1
  73. package/dist/app-loader-Gype1CUN.js +0 -4
  74. package/dist/components-9-WKOGBP.js +0 -5
  75. package/dist/connect.config-aPx3rHZQ.js.map +0 -1
  76. package/dist/package-Z50_4mCC.js.map +0 -1
  77. package/dist/pglite-runtime-toc1-TWa.js.map +0 -1
  78. package/dist/reactor-RZaraEfU.js.map +0 -1
  79. package/dist/useRegistryPackages-Bh0luCvV.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]="5aa56f9b-5ea7-5546-b87c-20428186997d")}catch(e){}}();
3
- import { c as subscribeReactorPgMajor, o as loadPgDump, r as getCachedReactorPgMajor, s as resolvePgMajorForRuntime } from "./pglite-runtime-toc1-TWa.js";
4
- import { t as PENDING_PG_SEED_KEY } from "./pglite-seed-D8oSKkep.js";
5
- import { t as clearReactorStorage } from "./reactor-RZaraEfU.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]="4b2f992d-46d3-5749-8c1a-c9b5620b05f1")}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-9Le-f3E4.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-DyrVQ4fu.js.map
376
- //# debugId=5aa56f9b-5ea7-5546-b87c-20428186997d
424
+ //# sourceMappingURL=InspectorModal-CtzrfT0O.js.map
425
+ //# debugId=4b2f992d-46d3-5749-8c1a-c9b5620b05f1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InspectorModal-CtzrfT0O.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,MAAM,sBAA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C;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":"4b2f992d-46d3-5749-8c1a-c9b5620b05f1"}
@@ -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]="d9bccd72-b798-50bd-b420-2ca911a686e8")}catch(e){}}();
3
- import { t as useRegistryPackages } from "./useRegistryPackages-Bh0luCvV.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-D_N96M6a.js.map
37
- //# debugId=d9bccd72-b798-50bd-b420-2ca911a686e8
36
+ //# sourceMappingURL=MissingPackageModal-BQcCQbOn.js.map
37
+ //# debugId=bd7d533f-489c-56c6-b228-c4fb25a21177
@@ -1 +1 @@
1
- {"version":3,"file":"MissingPackageModal-D_N96M6a.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":"d9bccd72-b798-50bd-b420-2ca911a686e8"}
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,16 +1,17 @@
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]="6591c14e-8cbe-5bf0-acb0-ce03c587f069")}catch(e){}}();
3
- import { t as package_default } from "./package-Z50_4mCC.js";
4
- import { n as getGitUrl, r as shortGitSha, t as getGitSha } from "./build-info-AU2BqmyC.js";
5
- import { r as connectConfig } from "./connect.config-aPx3rHZQ.js";
6
- import { n as toast } from "./toast-BEy42aYx.js";
7
- import { t as useRegistryPackages } from "./useRegistryPackages-Bh0luCvV.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]="8a259ab2-1703-5a79-bd93-11c83104dce2")}catch(e){}}();
3
+ import { t as package_default } from "./package-B2ziXT-m.js";
4
+ import { i as shortGitSha, n as getGitUrl, t as getGitSha } from "./build-info-Bhdpc4-E.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";
11
- import { closePHModal, deleteDrive, driveCollectionId, setSelectedDrive, showPHModal, useDriveSystemInfo, useDrives, usePHModal, useSyncList, useVetraPackageManager } from "@powerhousedao/reactor-browser";
12
- import { About, DangerZone, DefaultEditor, PackageManager, SettingsModal as SettingsModal$1 } from "@powerhousedao/design-system/connect";
11
+ import { DriveCollectionId, closePHModal, deleteDrive, setSelectedDrive, showPHModal, useDriveSystemInfo, useDrives, usePHModal, useSyncList, useVetraPackageManager } from "@powerhousedao/reactor-browser";
12
+ import { About, DangerZone, DefaultEditor, PackageManager, SettingsModal as SettingsModal$1, ThemeSwitch } from "@powerhousedao/design-system/connect";
13
13
  import { Icon } from "@powerhousedao/design-system";
14
+ import { CircleHelp, Package, PenLine, TriangleAlert } from "lucide-react";
14
15
  //#region src/components/modal/modals/settings/about.tsx
15
16
  const About$1 = () => {
16
17
  const onOpenInspector = () => {
@@ -25,18 +26,18 @@ const About$1 = () => {
25
26
  /* @__PURE__ */ jsx(AppGitHash, {}),
26
27
  /* @__PURE__ */ jsx(ConnectedDrives, {}),
27
28
  /* @__PURE__ */ jsxs("div", {
28
- className: "bg-gray-50 p-3 dark:bg-slate-800",
29
+ className: "bg-background p-3",
29
30
  children: [
30
31
  /* @__PURE__ */ jsx("h2", {
31
- className: "mb-2 font-semibold text-gray-700 dark:text-slate-200",
32
+ className: "mb-2 font-semibold text-foreground",
32
33
  children: "Inspector"
33
34
  }),
34
35
  /* @__PURE__ */ jsx("p", {
35
- className: "mb-3 text-sm font-normal text-gray-700 dark:text-slate-200",
36
+ className: "mb-3 text-sm font-normal text-foreground",
36
37
  children: "Explore the local database and sync state for debugging."
37
38
  }),
38
39
  /* @__PURE__ */ jsxs("button", {
39
- className: "flex items-center gap-x-2 rounded-md border border-gray-300 bg-transparent px-3 py-1 text-sm font-medium text-gray-900 transition-colors hover:bg-gray-100 dark:border-slate-500 dark:bg-slate-600 dark:text-slate-100 dark:hover:bg-slate-700",
40
+ 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",
40
41
  onClick: onOpenInspector,
41
42
  type: "button",
42
43
  children: ["Open Inspector ", /* @__PURE__ */ jsx(Icon, {
@@ -54,7 +55,7 @@ function AppGitHash() {
54
55
  const url = getGitUrl();
55
56
  const label = shortGitSha(sha);
56
57
  return /* @__PURE__ */ jsxs("div", {
57
- className: "bg-gray-50 p-3 text-sm dark:bg-slate-800",
58
+ className: "bg-background p-3 text-sm",
58
59
  children: [/* @__PURE__ */ jsx("span", {
59
60
  className: "font-semibold",
60
61
  children: "Git hash: "
@@ -75,14 +76,14 @@ function AppGitHash() {
75
76
  function ConnectedDrives() {
76
77
  const drives = useDrives() ?? [];
77
78
  const remotes = useSyncList();
78
- const remoteDrives = useMemo(() => drives.filter((d) => remotes.some((r) => r.collectionId === driveCollectionId("main", 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]);
79
80
  return /* @__PURE__ */ jsxs("div", {
80
- className: "my-4 bg-gray-50 p-3 dark:bg-slate-800",
81
+ className: "my-4 bg-background p-3",
81
82
  children: [/* @__PURE__ */ jsx("h2", {
82
- className: "mb-2 font-semibold text-gray-700 dark:text-slate-200",
83
+ className: "mb-2 font-semibold text-foreground",
83
84
  children: "Connected drives"
84
85
  }), remoteDrives.length === 0 ? /* @__PURE__ */ jsx("p", {
85
- className: "text-sm font-normal text-gray-700 dark:text-slate-200",
86
+ className: "text-sm font-normal text-foreground",
86
87
  children: "No connected remote drives."
87
88
  }) : /* @__PURE__ */ jsx("ul", {
88
89
  className: "flex flex-col gap-3",
@@ -93,7 +94,7 @@ function ConnectedDrives() {
93
94
  function DriveAboutEntry({ drive }) {
94
95
  const info = useDriveSystemInfo(drive);
95
96
  return /* @__PURE__ */ jsxs("li", {
96
- className: "text-sm text-gray-700 dark:text-slate-200",
97
+ className: "text-sm text-foreground",
97
98
  children: [
98
99
  /* @__PURE__ */ jsxs("div", {
99
100
  className: "flex items-baseline gap-2",
@@ -101,20 +102,20 @@ function DriveAboutEntry({ drive }) {
101
102
  className: "font-medium",
102
103
  children: drive.state.global.name || drive.header.name
103
104
  }), info.status === "ready" && /* @__PURE__ */ jsx("span", {
104
- className: "text-xs text-gray-500 dark:text-slate-400",
105
+ className: "text-xs text-muted-foreground",
105
106
  children: info.host
106
107
  })]
107
108
  }),
108
109
  info.status === "loading" && /* @__PURE__ */ jsx("div", {
109
- className: "mt-1 text-xs text-gray-400 dark:text-slate-500",
110
+ className: "mt-1 text-xs text-muted-foreground",
110
111
  children: "Loading…"
111
112
  }),
112
113
  info.status === "error" && /* @__PURE__ */ jsx("div", {
113
- className: "mt-1 text-xs text-red-600 dark:text-red-100",
114
+ className: "mt-1 text-xs text-destructive",
114
115
  children: "Could not load system info"
115
116
  }),
116
117
  info.status === "ready" && /* @__PURE__ */ jsxs("div", {
117
- className: "mt-1 text-xs text-gray-700 dark:text-slate-200",
118
+ className: "mt-1 text-xs text-foreground",
118
119
  children: [/* @__PURE__ */ jsxs("div", { children: [
119
120
  /* @__PURE__ */ jsx("span", {
120
121
  className: "font-medium",
@@ -139,7 +140,7 @@ function DriveAboutEntry({ drive }) {
139
140
  })] })]
140
141
  }),
141
142
  info.status === "local" && /* @__PURE__ */ jsx("div", {
142
- className: "mt-1 text-xs text-gray-400 dark:text-slate-500",
143
+ className: "mt-1 text-xs text-muted-foreground",
143
144
  children: "Local drive — N/A"
144
145
  })
145
146
  ]
@@ -236,46 +237,37 @@ const ConnectPackageManager = () => {
236
237
  };
237
238
  //#endregion
238
239
  //#region src/components/modal/modals/SettingsModal.tsx
240
+ const iconProps = { size: 16 };
239
241
  const SettingsModal = () => {
240
242
  const open = usePHModal()?.type === "settings";
241
243
  const tabs = useMemo(() => [
242
244
  {
243
245
  id: "package-manager",
244
- icon: /* @__PURE__ */ jsx(Icon, {
245
- name: "PackageManager",
246
- size: 12
247
- }),
246
+ icon: /* @__PURE__ */ jsx(Package, { ...iconProps }),
248
247
  label: "Package Manager",
249
248
  content: ConnectPackageManager
250
249
  },
251
250
  {
252
251
  id: "default-editors",
253
- icon: /* @__PURE__ */ jsx(Icon, {
254
- name: "Edit",
255
- size: 12
256
- }),
252
+ icon: /* @__PURE__ */ jsx(PenLine, { ...iconProps }),
257
253
  label: "Default Editors",
258
254
  content: DefaultEditor$1
259
255
  },
260
256
  {
261
257
  id: "danger-zone",
262
- icon: /* @__PURE__ */ jsx(Icon, {
263
- name: "Danger",
264
- size: 12,
265
- className: "text-red-900 dark:text-red-400"
258
+ icon: /* @__PURE__ */ jsx(TriangleAlert, {
259
+ ...iconProps,
260
+ className: "text-destructive"
266
261
  }),
267
262
  label: /* @__PURE__ */ jsx("span", {
268
- className: "text-red-900 dark:text-red-400",
263
+ className: "text-destructive",
269
264
  children: "Danger Zone"
270
265
  }),
271
266
  content: () => /* @__PURE__ */ jsx(DangerZone$1, {})
272
267
  },
273
268
  {
274
269
  id: "about",
275
- icon: /* @__PURE__ */ jsx(Icon, {
276
- name: "QuestionSquare",
277
- size: 12
278
- }),
270
+ icon: /* @__PURE__ */ jsx(CircleHelp, { ...iconProps }),
279
271
  label: "About",
280
272
  content: About$1
281
273
  }
@@ -286,11 +278,12 @@ const SettingsModal = () => {
286
278
  onOpenChange: (status) => {
287
279
  if (!status) return closePHModal();
288
280
  },
289
- tabs
281
+ tabs,
282
+ navFooter: /* @__PURE__ */ jsx(ThemeSwitch, { horizontal: true })
290
283
  });
291
284
  };
292
285
  //#endregion
293
286
  export { SettingsModal };
294
287
 
295
- //# sourceMappingURL=SettingsModal-xaWk_n_D.js.map
296
- //# debugId=6591c14e-8cbe-5bf0-acb0-ce03c587f069
288
+ //# sourceMappingURL=SettingsModal-CPbdBRon.js.map
289
+ //# debugId=8a259ab2-1703-5a79-bd93-11c83104dce2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsModal-CPbdBRon.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","DefaultEdit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GACJ,MAAM,oBAAC,eAAD;IAAe,GAAI;IAAW,WAAU;IAAqB,CAAA;GACnE,OAAO,oBAAC,QAAD;IAAM,WAAU;cAAmB;IAAkB,CAAA;GAC5D,eAAe,oBAACC,cAAD,EAAc,CAAA;GAC9B;EACD;GACE,IAAI;GACJ,MAAM,oBAAC,YAAD,EAAY,GAAI,WAAa,CAAA;GACnC,OAAO;GACP,SAASC;GACV;EACF,EACD,EAAE,CACH;AAED,QACE,oBAACC,iBAAD;EACQ;EACN,OAAO,EAAE,+BAA+B;EACxC,eAAe,WAAoB;AACjC,OAAI,CAAC,OAAQ,QAAO,cAAc;;EAE9B;EACN,WAAW,oBAAC,aAAD,EAAa,YAAA,MAAa,CAAA;EACrC,CAAA","debug_id":"8a259ab2-1703-5a79-bd93-11c83104dce2"}
@@ -1,5 +1,5 @@
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]="e2bb15c6-0657-58b8-a11a-db584d53a8fe")}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-CyAUDCU7.js.map
34
- //# debugId=e2bb15c6-0657-58b8-a11a-db584d53a8fe
33
+ //# sourceMappingURL=UpgradeDriveModal-BZGSE9_r.js.map
34
+ //# debugId=d0cff9c7-cc95-58d8-a8e7-1950202bec87
@@ -1 +1 @@
1
- {"version":3,"file":"UpgradeDriveModal-CyAUDCU7.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":"e2bb15c6-0657-58b8-a11a-db584d53a8fe"}
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-N0kkedYA.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]="6dc7d254-2759-5522-b476-b9da6b3a6129")}catch(e){}}();
4
+ //# debugId=6dc7d254-2759-5522-b476-b9da6b3a6129