@powerhousedao/connect 6.1.0-dev.9 → 6.1.0

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 (52) hide show
  1. package/dist/{AddDriveModal-ZK9-BWMB.js → AddDriveModal-Cg2qcYp6.js} +9 -5
  2. package/dist/AddDriveModal-Cg2qcYp6.js.map +1 -0
  3. package/dist/{ClearStorageModal-Dx_kY08P.js → ClearStorageModal-D2K3LkHV.js} +5 -6
  4. package/dist/ClearStorageModal-D2K3LkHV.js.map +1 -0
  5. package/dist/{CookiesPolicyModal-DiXQV82b.js → CookiesPolicyModal-4QzcllDR.js} +4 -4
  6. package/dist/{CookiesPolicyModal-DiXQV82b.js.map → CookiesPolicyModal-4QzcllDR.js.map} +1 -1
  7. package/dist/{CreateDocumentModal-BhJh4nWt.js → CreateDocumentModal-7vgZ8nbM.js} +6 -4
  8. package/dist/{CreateDocumentModal-BhJh4nWt.js.map → CreateDocumentModal-7vgZ8nbM.js.map} +1 -1
  9. package/dist/{DebugSettingsModal-D2TozI0o.js → DebugSettingsModal-B1FRL4rp.js} +9 -9
  10. package/dist/DebugSettingsModal-B1FRL4rp.js.map +1 -0
  11. package/dist/{DeleteDriveModal-CbuIdjKY.js → DeleteDriveModal-ABue_rOY.js} +6 -4
  12. package/dist/{DeleteDriveModal-CbuIdjKY.js.map → DeleteDriveModal-ABue_rOY.js.map} +1 -1
  13. package/dist/{DeleteItemModal-9ErYlauT.js → DeleteItemModal-B6aHnYPD.js} +6 -4
  14. package/dist/{DeleteItemModal-9ErYlauT.js.map → DeleteItemModal-B6aHnYPD.js.map} +1 -1
  15. package/dist/{DownloadDocumentWithErrorsModal-KZGWQ4J7.js → DownloadDocumentWithErrorsModal-CaAPGg04.js} +13 -12
  16. package/dist/DownloadDocumentWithErrorsModal-CaAPGg04.js.map +1 -0
  17. package/dist/{DriveSettingsModal-DEk05PS7.js → DriveSettingsModal-CNtCO4-y.js} +12 -6
  18. package/dist/{DriveSettingsModal-DEk05PS7.js.map → DriveSettingsModal-CNtCO4-y.js.map} +1 -1
  19. package/dist/{InspectorModal-DRoE6sso.js → InspectorModal-ywEL5GKA.js} +15 -14
  20. package/dist/InspectorModal-ywEL5GKA.js.map +1 -0
  21. package/dist/{SettingsModal-B-uWoxSI.js → SettingsModal-5dMD1lq9.js} +25 -26
  22. package/dist/SettingsModal-5dMD1lq9.js.map +1 -0
  23. package/dist/{build-info-BERZooDe.js → build-info-B3CWTvMu.js} +4 -4
  24. package/dist/{build-info-BERZooDe.js.map → build-info-B3CWTvMu.js.map} +1 -1
  25. package/dist/{load-DZUI_Umw.js → load-D-7n7rPU.js} +8 -7
  26. package/dist/{load-DZUI_Umw.js.map → load-D-7n7rPU.js.map} +1 -1
  27. package/dist/main.js +1 -1
  28. package/dist/{package-DT0VGtRf.js → package-Dk3L0oWJ.js} +6 -5
  29. package/dist/package-Dk3L0oWJ.js.map +1 -0
  30. package/dist/pglite.worker.js +7 -6
  31. package/dist/pglite.worker.js.map +1 -1
  32. package/dist/pglite.worker.legacy.js +7 -6
  33. package/dist/pglite.worker.legacy.js.map +1 -1
  34. package/dist/{reactor-BqTMQT3A.js → reactor-BixVsAMj.js} +10 -11
  35. package/dist/reactor-BixVsAMj.js.map +1 -0
  36. package/dist/{registerServiceWorker-5FDz0DvH.js → registerServiceWorker-BkUnxLqB.js} +12 -10
  37. package/dist/{registerServiceWorker-5FDz0DvH.js.map → registerServiceWorker-BkUnxLqB.js.map} +1 -1
  38. package/dist/{sidebar-CZLMU1VL.js → sidebar-CO3JjI3G.js} +61 -56
  39. package/dist/sidebar-CO3JjI3G.js.map +1 -0
  40. package/dist/start-connect.js +1 -1
  41. package/dist/style.css +4872 -12777
  42. package/package.json +11 -10
  43. package/style.css +28 -0
  44. package/dist/AddDriveModal-ZK9-BWMB.js.map +0 -1
  45. package/dist/ClearStorageModal-Dx_kY08P.js.map +0 -1
  46. package/dist/DebugSettingsModal-D2TozI0o.js.map +0 -1
  47. package/dist/DownloadDocumentWithErrorsModal-KZGWQ4J7.js.map +0 -1
  48. package/dist/InspectorModal-DRoE6sso.js.map +0 -1
  49. package/dist/SettingsModal-B-uWoxSI.js.map +0 -1
  50. package/dist/package-DT0VGtRf.js.map +0 -1
  51. package/dist/reactor-BqTMQT3A.js.map +0 -1
  52. package/dist/sidebar-CZLMU1VL.js.map +0 -1
@@ -1,11 +1,11 @@
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]="9ec07267-610c-5785-aa26-92ef6dc6c948")}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]="239c52db-b664-5e9c-ac37-c27d54ef59b8")}catch(e){}}();
3
3
  import { n as defaultPHAppConfig, r as defaultPHDocumentEditorConfig, t as connectConfig } from "./connect.config-B2xP5Iez.js";
4
4
  import { n as toast, t as ToastContainer } from "./toast-DnODOv28.js";
5
5
  import { t as i18n } from "./i18n-BuVT7wFQ.js";
6
6
  import { c as subscribeReactorPgMajor, d as createFileDataStore, f as idbError, l as IDB_STORE_NAME, m as readPgVersionFile, p as openIdb, r as getCachedReactorPgMajor, u as PRIMARY_IDB_NAMES } from "./pglite-runtime-Btp8ZXVH.js";
7
- import { t as serviceWorkerManager } from "./registerServiceWorker-5FDz0DvH.js";
8
- import { driveCollectionId, getRevisionFromDate, logout, openRenown, setPHAppConfig, setPHDocumentEditorConfig, setRevisionHistoryVisible, setSelectedDrive, setSelectedNode, showPHModal, useAppModuleById, useDefaultAppModule, useDocumentById, useDocumentModelModuleById, useDocumentOperations, useDrives, useEditorModuleById, useFallbackEditorModule, useNodeParentFolderById, usePHModal, usePackageDiscoveryService, useReactorClientModule, useRevisionHistoryVisible, useSelectedDocument, useSelectedDocumentId, useSelectedDriveSafe, useSelectedFolder, useSelectedTimelineItem, useSyncList, useUser, useVetraPackageManager, useVetraPackages } from "@powerhousedao/reactor-browser";
7
+ import { t as serviceWorkerManager } from "./registerServiceWorker-BkUnxLqB.js";
8
+ import { driveCollectionId, getRevisionFromDate, initTheme, logout, openRenown, setPHAppConfig, setPHDocumentEditorConfig, setRevisionHistoryVisible, setSelectedDrive, setSelectedNode, showPHModal, useAppModuleById, useDefaultAppModule, useDocumentById, useDocumentModelModuleById, useDocumentOperations, useDrives, useEditorModuleById, useFallbackEditorModule, useNodeParentFolderById, usePHModal, usePackageDiscoveryService, useReactorClientModule, useRevisionHistoryVisible, useSelectedDocument, useSelectedDocumentId, useSelectedDriveSafe, useSelectedFolder, useSelectedTimelineItem, useSyncList, useTheme, useUser, useVetraPackageManager, useVetraPackages } from "@powerhousedao/reactor-browser";
9
9
  import { childLogger } from "document-model";
10
10
  import React, { StrictMode, Suspense, lazy, useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
11
11
  import { z } from "zod";
@@ -13,7 +13,7 @@ import { Trans, useTranslation } from "react-i18next";
13
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
14
  import { Outlet, RouterProvider, createBrowserRouter, createRoutesFromChildren, matchRoutes, useLocation, useNavigationType } from "react-router-dom";
15
15
  import { useHotkeys } from "react-hotkeys-hook";
16
- import { AnimatedLoader, ConnectSidebar, ConnectTooltipProvider, CookieBanner, DefaultEditorLoader, DropZoneWrapper, HomeScreen, HomeScreenAddDriveItem, HomeScreenItem, PackageInstallModal, RevisionHistory, SidebarAddDriveItem, SidebarItem, useEns } from "@powerhousedao/design-system/connect";
16
+ import { ConnectSidebar, ConnectTooltipProvider, CookieBanner, DefaultEditorLoader, DropZoneWrapper, HomeScreen, HomeScreenAddDriveItem, HomeScreenItem, LogoAnimation, PackageInstallModal, RevisionHistory, SidebarAddDriveItem, SidebarItem, useEns } from "@powerhousedao/design-system/connect";
17
17
  import { GenericDriveExplorer } from "@powerhousedao/powerhouse-vetra-packages/editors";
18
18
  import { Icon, Modal, PowerhouseButton } from "@powerhousedao/design-system";
19
19
  import { ErrorBoundary } from "react-error-boundary";
@@ -252,8 +252,9 @@ var OpenPanelProcessor = class {
252
252
  }
253
253
  }
254
254
  }
255
- async onDisconnect() {
255
+ onDisconnect() {
256
256
  this.client.flush?.();
257
+ return Promise.resolve();
257
258
  }
258
259
  };
259
260
  //#endregion
@@ -595,7 +596,7 @@ function DocumentEditorContainer() {
595
596
  }, []);
596
597
  useCallback(() => {
597
598
  setSelectedNode(parentFolder);
598
- }, [parentFolder, setSelectedNode]);
599
+ }, [parentFolder]);
599
600
  return /* @__PURE__ */ jsx("div", {
600
601
  id: "document-editor-container",
601
602
  className: "flex-1",
@@ -647,7 +648,7 @@ function DetailedFallback({ error, resetErrorBoundary }) {
647
648
  return /* @__PURE__ */ jsx("div", {
648
649
  className: "z-10 mx-auto flex max-w-[80%] flex-1 items-center justify-center p-6",
649
650
  children: /* @__PURE__ */ jsxs("div", {
650
- className: "w-full max-w-lg rounded-lg border border-gray-500 bg-white p-6 shadow-sm",
651
+ className: "w-full max-w-lg rounded-lg border border-gray-500 bg-gray-50 p-6 shadow-sm dark:border-slate-400 dark:bg-slate-800",
651
652
  children: [
652
653
  /* @__PURE__ */ jsxs("div", {
653
654
  className: "mb-3 flex items-center gap-2",
@@ -660,16 +661,16 @@ function DetailedFallback({ error, resetErrorBoundary }) {
660
661
  })]
661
662
  }),
662
663
  /* @__PURE__ */ jsx("p", {
663
- className: "mb-4 text-sm text-gray-700",
664
+ className: "mb-4 text-sm text-gray-700 dark:text-slate-200",
664
665
  children: errorMessage
665
666
  }),
666
667
  errorDetails !== "{}" && /* @__PURE__ */ jsxs("details", {
667
668
  className: "group",
668
669
  children: [/* @__PURE__ */ jsx("summary", {
669
- className: "cursor-pointer text-sm font-medium text-gray-700 underline select-none hover:text-gray-700",
670
+ className: "cursor-pointer text-sm font-medium text-gray-700 underline select-none hover:text-gray-700 dark:text-slate-200 dark:hover:text-slate-200",
670
671
  children: "Show details"
671
672
  }), /* @__PURE__ */ jsx("pre", {
672
- className: "mt-2 max-h-48 overflow-auto rounded-sm bg-gray-100 p-3 text-xs",
673
+ className: "mt-2 max-h-48 overflow-auto rounded-sm bg-gray-100 p-3 text-xs dark:bg-slate-700",
673
674
  children: errorDetails
674
675
  })]
675
676
  }),
@@ -1098,12 +1099,12 @@ const MigrationOverlay = () => {
1098
1099
  return /* @__PURE__ */ jsx("div", {
1099
1100
  className: "absolute inset-0 z-20 flex items-center justify-center",
1100
1101
  children: /* @__PURE__ */ jsxs("div", {
1101
- className: "rounded-lg bg-white/90 px-6 py-4 text-sm text-gray-900 shadow-lg",
1102
+ className: "rounded-lg bg-white/90 px-6 py-4 text-sm text-gray-900 shadow-lg dark:bg-slate-900/90 dark:text-slate-50",
1102
1103
  children: [/* @__PURE__ */ jsx("div", {
1103
1104
  className: "font-medium",
1104
1105
  children: "Upgrading local database…"
1105
1106
  }), /* @__PURE__ */ jsx("div", {
1106
- className: "text-gray-600",
1107
+ className: "text-gray-700 dark:text-slate-200",
1107
1108
  children: PHASE_LABEL[status.phase]
1108
1109
  })]
1109
1110
  })
@@ -1112,6 +1113,7 @@ const MigrationOverlay = () => {
1112
1113
  const Loader = ({ delay = LOADER_DELAY }) => {
1113
1114
  const isSSR = typeof window === "undefined";
1114
1115
  const showInitialLoader = typeof document !== "undefined" && document.body.getAttribute("data-show-loader") === "true";
1116
+ if (!isSSR) initTheme();
1115
1117
  const [showLoading, setShowLoading] = useState(!delay || showInitialLoader);
1116
1118
  useEffect(() => {
1117
1119
  const id = setTimeout(() => {
@@ -1123,7 +1125,7 @@ const Loader = ({ delay = LOADER_DELAY }) => {
1123
1125
  className: `skeleton-loader absolute inset-0 z-10 flex items-center justify-center ${showLoading ? "" : "hidden"}`,
1124
1126
  children: [/* @__PURE__ */ jsx("div", {
1125
1127
  className: "animate-pulse overflow-hidden rounded-full shadow-lg",
1126
- children: /* @__PURE__ */ jsx(AnimatedLoader, {})
1128
+ children: /* @__PURE__ */ jsx(LogoAnimation, {})
1127
1129
  }), isSSR ? /* @__PURE__ */ jsx("script", { dangerouslySetInnerHTML: { __html: `setTimeout(() => {
1128
1130
  document.querySelector('.skeleton-loader')?.classList.remove('hidden');
1129
1131
  document.body.setAttribute('data-show-loader', 'true');
@@ -1134,7 +1136,7 @@ const AppSkeleton = (props) => {
1134
1136
  const isSSR = typeof window === "undefined";
1135
1137
  const isHomeScreen = !isSSR && window.location.pathname === getBasePath();
1136
1138
  return /* @__PURE__ */ jsxs("div", {
1137
- className: "flex h-screen overflow-hidden",
1139
+ className: "flex h-screen overflow-hidden bg-gray-50 dark:bg-slate-700",
1138
1140
  children: [
1139
1141
  !(!isSSR && getIsEmbedded()) && /* @__PURE__ */ jsx(ConnectSidebar, {
1140
1142
  className: "animate-pulse",
@@ -1199,7 +1201,7 @@ const MigrationBanner = () => {
1199
1201
  return /* @__PURE__ */ jsx("div", {
1200
1202
  className: "absolute inset-x-0 top-0 z-30 flex justify-center p-3",
1201
1203
  children: /* @__PURE__ */ jsxs("div", {
1202
- className: "flex max-w-3xl items-center gap-3 rounded-lg border border-yellow-500 bg-yellow-400 px-4 py-3 text-sm text-gray-900 shadow-lg",
1204
+ className: "flex max-w-3xl items-center gap-3 rounded-lg border border-yellow-500 bg-yellow-400 px-4 py-3 text-sm text-gray-900 shadow-lg dark:border-yellow-400 dark:bg-yellow-500 dark:text-slate-50",
1203
1205
  children: [
1204
1206
  /* @__PURE__ */ jsxs("div", {
1205
1207
  className: "flex-1",
@@ -1213,7 +1215,7 @@ const MigrationBanner = () => {
1213
1215
  ]
1214
1216
  }),
1215
1217
  /* @__PURE__ */ jsxs("div", {
1216
- className: "text-gray-800",
1218
+ className: "text-gray-900 dark:text-slate-100",
1217
1219
  children: [
1218
1220
  "Migrate to Postgres ",
1219
1221
  17,
@@ -1221,7 +1223,7 @@ const MigrationBanner = () => {
1221
1223
  ]
1222
1224
  }),
1223
1225
  error && /* @__PURE__ */ jsxs("div", {
1224
- className: "mt-2 font-medium text-red-900",
1226
+ className: "mt-2 font-medium text-red-900 dark:text-red-400",
1225
1227
  children: ["Migration failed: ", error]
1226
1228
  })
1227
1229
  ]
@@ -1230,14 +1232,14 @@ const MigrationBanner = () => {
1230
1232
  type: "button",
1231
1233
  disabled: migrating,
1232
1234
  onClick: handleMigrate,
1233
- className: "rounded-sm bg-gray-900 px-3 py-1 text-sm font-medium text-white hover:bg-gray-800 disabled:opacity-50",
1235
+ className: "rounded-sm bg-gray-900 px-3 py-1 text-sm font-medium text-white hover:bg-gray-800 disabled:opacity-50 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-100",
1234
1236
  children: migrating ? "Migrating…" : "Migrate now"
1235
1237
  }),
1236
1238
  /* @__PURE__ */ jsx("button", {
1237
1239
  type: "button",
1238
1240
  disabled: migrating,
1239
1241
  onClick: dismiss,
1240
- className: "rounded-sm border border-gray-900 bg-transparent px-3 py-1 text-sm font-medium text-gray-900 hover:bg-gray-900/10 disabled:opacity-50",
1242
+ className: "rounded-sm border border-gray-900 bg-transparent px-3 py-1 text-sm font-medium text-gray-900 hover:bg-gray-900/10 disabled:opacity-50 dark:border-slate-50 dark:text-slate-50",
1241
1243
  children: "Dismiss"
1242
1244
  })
1243
1245
  ]
@@ -1246,17 +1248,17 @@ const MigrationBanner = () => {
1246
1248
  };
1247
1249
  //#endregion
1248
1250
  //#region src/components/modal/modals-container.tsx
1249
- const AddDriveModal$1 = lazy(() => import("./AddDriveModal-ZK9-BWMB.js").then((m) => ({ default: m.AddDriveModal })));
1250
- const ClearStorageModal = lazy(() => import("./ClearStorageModal-Dx_kY08P.js").then((m) => ({ default: m.ClearStorageModal })));
1251
- const CookiesPolicyModal = lazy(() => import("./CookiesPolicyModal-DiXQV82b.js").then((m) => ({ default: m.CookiesPolicyModal })));
1252
- const CreateDocumentModal$1 = lazy(() => import("./CreateDocumentModal-BhJh4nWt.js").then((m) => ({ default: m.CreateDocumentModal })));
1253
- const DebugSettingsModal = lazy(() => import("./DebugSettingsModal-D2TozI0o.js").then((m) => ({ default: m.DebugSettingsModal })));
1254
- const DeleteDriveModal = lazy(() => import("./DeleteDriveModal-CbuIdjKY.js").then((m) => ({ default: m.DeleteDriveModal })));
1255
- const DeleteItemModal = lazy(() => import("./DeleteItemModal-9ErYlauT.js").then((m) => ({ default: m.DeleteItemModal })));
1251
+ const AddDriveModal$1 = lazy(() => import("./AddDriveModal-Cg2qcYp6.js").then((m) => ({ default: m.AddDriveModal })));
1252
+ const ClearStorageModal = lazy(() => import("./ClearStorageModal-D2K3LkHV.js").then((m) => ({ default: m.ClearStorageModal })));
1253
+ const CookiesPolicyModal = lazy(() => import("./CookiesPolicyModal-4QzcllDR.js").then((m) => ({ default: m.CookiesPolicyModal })));
1254
+ const CreateDocumentModal$1 = lazy(() => import("./CreateDocumentModal-7vgZ8nbM.js").then((m) => ({ default: m.CreateDocumentModal })));
1255
+ const DebugSettingsModal = lazy(() => import("./DebugSettingsModal-B1FRL4rp.js").then((m) => ({ default: m.DebugSettingsModal })));
1256
+ const DeleteDriveModal = lazy(() => import("./DeleteDriveModal-ABue_rOY.js").then((m) => ({ default: m.DeleteDriveModal })));
1257
+ const DeleteItemModal = lazy(() => import("./DeleteItemModal-B6aHnYPD.js").then((m) => ({ default: m.DeleteItemModal })));
1256
1258
  const DisclaimerModal = lazy(() => import("./DisclaimerModal-CfDeiBz8.js").then((m) => ({ default: m.DisclaimerModal })));
1257
- const DriveSettingsModal$1 = lazy(() => import("./DriveSettingsModal-DEk05PS7.js").then((m) => ({ default: m.DriveSettingsModal })));
1258
- const DownloadDocumentWithErrorsModal = lazy(() => import("./DownloadDocumentWithErrorsModal-KZGWQ4J7.js").then((m) => ({ default: m.DownloadDocumentWithErrorsModal })));
1259
- const SettingsModal$1 = lazy(() => import("./SettingsModal-B-uWoxSI.js").then((m) => ({ default: m.SettingsModal })));
1259
+ const DriveSettingsModal$1 = lazy(() => import("./DriveSettingsModal-CNtCO4-y.js").then((m) => ({ default: m.DriveSettingsModal })));
1260
+ const DownloadDocumentWithErrorsModal = lazy(() => import("./DownloadDocumentWithErrorsModal-CaAPGg04.js").then((m) => ({ default: m.DownloadDocumentWithErrorsModal })));
1261
+ const SettingsModal$1 = lazy(() => import("./SettingsModal-5dMD1lq9.js").then((m) => ({ default: m.SettingsModal })));
1260
1262
  const UpgradeDriveModal = lazy(() => import("./UpgradeDriveModal-BwI5E5k3.js").then((m) => ({ default: m.UpgradeDriveModal })));
1261
1263
  const modalComponents = {
1262
1264
  addDrive: AddDriveModal$1,
@@ -1269,13 +1271,13 @@ const modalComponents = {
1269
1271
  disclaimer: DisclaimerModal,
1270
1272
  driveSettings: DriveSettingsModal$1,
1271
1273
  downloadDocumentWithErrors: DownloadDocumentWithErrorsModal,
1272
- inspector: lazy(() => import("./InspectorModal-DRoE6sso.js").then((m) => ({ default: m.InspectorModal }))),
1274
+ inspector: lazy(() => import("./InspectorModal-ywEL5GKA.js").then((m) => ({ default: m.InspectorModal }))),
1273
1275
  settings: SettingsModal$1,
1274
1276
  upgradeDrive: UpgradeDriveModal,
1275
1277
  missingPackage: lazy(() => import("./MissingPackageModal-CUdcDjSO.js").then((m) => ({ default: m.ConnectMissingPackageModal })))
1276
1278
  };
1277
- const ModalsContainer = lazy(async () => {
1278
- return { default: () => {
1279
+ const ModalsContainer = lazy(() => {
1280
+ return Promise.resolve({ default: () => {
1279
1281
  const phModal = usePHModal();
1280
1282
  if (!phModal?.type) return null;
1281
1283
  const ModalComponent = modalComponents[phModal.type];
@@ -1287,12 +1289,12 @@ const ModalsContainer = lazy(async () => {
1287
1289
  children: /* @__PURE__ */ jsx(ModalComponent, {})
1288
1290
  })
1289
1291
  }) : null;
1290
- } };
1292
+ } });
1291
1293
  });
1292
1294
  //#endregion
1293
1295
  //#region src/components/app-loader.tsx
1294
1296
  const AppLoader = (props) => {
1295
- const Load = lazy(() => import("./load-DZUI_Umw.js").then((m) => m.loadComponent(props.localPackage)));
1297
+ const Load = lazy(() => import("./load-D-7n7rPU.js").then((m) => m.loadComponent(props.localPackage)));
1296
1298
  return /* @__PURE__ */ jsx(StrictMode, { children: /* @__PURE__ */ jsxs(ErrorBoundary$1, {
1297
1299
  fallbackRender: (props) => /* @__PURE__ */ jsx(AppSkeleton, { children: /* @__PURE__ */ jsx(DetailedFallback, { ...props }) }),
1298
1300
  resetKeys: [props.localPackage],
@@ -1341,11 +1343,11 @@ function MissingModelBanner() {
1341
1343
  const [open, setOpen] = useState(false);
1342
1344
  if (failed.length === 0) return null;
1343
1345
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
1344
- className: "flex items-center justify-between gap-3 bg-amber-100 px-4 py-2 text-sm text-amber-900",
1346
+ className: "flex items-center justify-between gap-3 bg-amber-100 px-4 py-2 text-sm text-amber-900 dark:bg-amber-800 dark:text-amber-100",
1345
1347
  children: [/* @__PURE__ */ jsx("span", { children: failed.length === 1 ? "1 document type couldn't load (missing model)." : `${failed.length} document types couldn't load (missing models).` }), /* @__PURE__ */ jsx("button", {
1346
1348
  type: "button",
1347
1349
  onClick: () => setOpen(true),
1348
- className: "rounded-md border border-amber-300 bg-white px-3 py-1 text-amber-900 hover:bg-amber-50",
1350
+ className: "rounded-md border border-amber-300 bg-gray-50 px-3 py-1 text-amber-900 hover:bg-amber-50 dark:border-amber-600 dark:bg-slate-800 dark:text-amber-100 dark:hover:bg-amber-900",
1349
1351
  children: "View"
1350
1352
  })]
1351
1353
  }), /* @__PURE__ */ jsx(MissingModelDetailsModal, {
@@ -1378,18 +1380,18 @@ function MissingModelDetailsModal(props) {
1378
1380
  },
1379
1381
  contentProps: { className: "rounded-3xl" },
1380
1382
  children: /* @__PURE__ */ jsxs("div", {
1381
- className: "w-[520px] max-w-[90vw] bg-white p-6",
1383
+ className: "w-[520px] max-w-[90vw] bg-gray-50 p-6 dark:bg-slate-800",
1382
1384
  children: [
1383
1385
  /* @__PURE__ */ jsx("div", {
1384
- className: "border-b border-slate-100 pb-2 text-2xl font-bold text-gray-800",
1386
+ className: "border-b border-gray-100 pb-2 text-2xl font-bold text-gray-900 dark:border-slate-500 dark:bg-slate-600 dark:text-slate-100",
1385
1387
  children: "Missing document models"
1386
1388
  }),
1387
1389
  /* @__PURE__ */ jsx("div", {
1388
- className: "my-4 text-sm text-gray-600",
1390
+ className: "my-4 text-sm text-gray-700 dark:text-slate-200",
1389
1391
  children: "The following document types couldn't be loaded. Documents using them won't display until the underlying package is installed."
1390
1392
  }),
1391
1393
  failed.length === 0 ? /* @__PURE__ */ jsx("div", {
1392
- className: "rounded-xl bg-slate-50 p-4 text-sm text-gray-600",
1394
+ className: "rounded-xl bg-gray-50 p-4 text-sm text-gray-700 dark:bg-slate-800 dark:text-slate-200",
1393
1395
  children: "No outstanding failures."
1394
1396
  }) : /* @__PURE__ */ jsx("div", {
1395
1397
  className: "flex max-h-[60vh] flex-col gap-3 overflow-y-auto",
@@ -1397,18 +1399,18 @@ function MissingModelDetailsModal(props) {
1397
1399
  const isRetrying = retrying.has(entry.documentType);
1398
1400
  const retryDisabled = !canRetry(entry.reason) || isRetrying;
1399
1401
  return /* @__PURE__ */ jsxs("div", {
1400
- className: "rounded-xl bg-slate-50 p-4",
1402
+ className: "rounded-xl bg-gray-50 p-4 dark:bg-slate-800",
1401
1403
  children: [
1402
1404
  /* @__PURE__ */ jsx("div", {
1403
- className: "mb-1 font-mono text-sm font-semibold text-gray-800",
1405
+ className: "mb-1 font-mono text-sm font-semibold text-gray-900 dark:text-slate-100",
1404
1406
  children: entry.documentType
1405
1407
  }),
1406
1408
  /* @__PURE__ */ jsx("div", {
1407
- className: "mb-2 text-xs text-gray-600",
1409
+ className: "mb-2 text-xs text-gray-700 dark:text-slate-200",
1408
1410
  children: reasonLabels[entry.reason]
1409
1411
  }),
1410
1412
  entry.packageNames.length > 0 ? /* @__PURE__ */ jsxs("div", {
1411
- className: "mb-2 text-xs text-gray-500",
1413
+ className: "mb-2 text-xs text-gray-500 dark:text-slate-400",
1412
1414
  children: [
1413
1415
  "Package",
1414
1416
  entry.packageNames.length > 1 ? "s" : "",
@@ -1418,7 +1420,7 @@ function MissingModelDetailsModal(props) {
1418
1420
  ]
1419
1421
  }) : null,
1420
1422
  entry.error ? /* @__PURE__ */ jsx("div", {
1421
- className: "mb-2 font-mono text-xs wrap-break-word text-red-700",
1423
+ className: "mb-2 font-mono text-xs wrap-break-word text-red-700 dark:text-red-100",
1422
1424
  children: entry.error.message
1423
1425
  }) : null,
1424
1426
  /* @__PURE__ */ jsx("div", {
@@ -1428,7 +1430,7 @@ function MissingModelDetailsModal(props) {
1428
1430
  onClick: () => void handleRetry(entry.documentType),
1429
1431
  disabled: retryDisabled,
1430
1432
  title: canRetry(entry.reason) ? void 0 : "No registry is configured; nothing to retry against.",
1431
- className: twMerge("min-h-[32px] rounded-xl px-3 py-1 text-sm font-semibold text-white transition-all hover:scale-105", retryDisabled ? "cursor-not-allowed bg-gray-300 hover:scale-100" : "bg-gray-800 active:opacity-75"),
1433
+ className: twMerge("min-h-[32px] rounded-xl px-3 py-1 text-sm font-semibold text-white transition-all hover:scale-105 dark:text-slate-900", retryDisabled ? "cursor-not-allowed bg-gray-300 hover:scale-100 dark:bg-slate-600 dark:text-slate-100" : "bg-gray-800 active:opacity-75 dark:bg-slate-100"),
1432
1434
  children: isRetrying ? "Retrying..." : "Try install again"
1433
1435
  })
1434
1436
  })
@@ -1441,7 +1443,7 @@ function MissingModelDetailsModal(props) {
1441
1443
  children: /* @__PURE__ */ jsx("button", {
1442
1444
  type: "button",
1443
1445
  onClick: onClose,
1444
- className: "min-h-[36px] rounded-xl border border-slate-200 bg-white px-4 py-2 text-sm font-semibold text-slate-800 hover:bg-slate-50",
1446
+ className: "min-h-[36px] rounded-xl border border-gray-200 bg-gray-50 px-4 py-2 text-sm font-semibold text-gray-800 hover:bg-gray-50 dark:border-slate-500 dark:bg-slate-600 dark:text-slate-100 dark:hover:bg-slate-800",
1445
1447
  children: "Close"
1446
1448
  })
1447
1449
  })
@@ -1467,10 +1469,11 @@ function PackageInstallPrompt() {
1467
1469
  //#endregion
1468
1470
  //#region src/components/app.tsx
1469
1471
  const App = () => {
1472
+ useTheme();
1470
1473
  useEffect(() => {
1471
1474
  const handlePreloadError = (event) => {
1472
1475
  const payload = event.payload;
1473
- const failedUrl = (payload instanceof Error ? payload.message : String(payload ?? "")).match(/https?:\/\/[^\s"']+/)?.[0];
1476
+ const failedUrl = (payload instanceof Error ? payload.message : typeof payload === "string" ? payload : "").match(/https?:\/\/[^\s"']+/)?.[0];
1474
1477
  if (failedUrl && !failedUrl.startsWith(window.location.origin)) {
1475
1478
  console.debug(`[Connect] Skipping reload — vite:preloadError for off-origin URL: ${failedUrl}`);
1476
1479
  return;
@@ -1531,8 +1534,8 @@ const CookieBanner$1 = () => {
1531
1534
  if (!showBanner) return null;
1532
1535
  return /* @__PURE__ */ jsxs("div", {
1533
1536
  className: "absolute inset-0 z-10000 backdrop-blur-sm",
1534
- children: [/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-black opacity-15" }), /* @__PURE__ */ jsx("div", {
1535
- className: "absolute inset-x-0 bottom-0 flex justify-center bg-white px-10 pt-10 pb-16 shadow-lg",
1537
+ children: [/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gray-900 opacity-15 dark:bg-slate-50" }), /* @__PURE__ */ jsx("div", {
1538
+ className: "absolute inset-x-0 bottom-0 flex justify-center bg-gray-50 px-10 pt-10 pb-16 shadow-lg dark:bg-slate-800",
1536
1539
  children: /* @__PURE__ */ jsx(CookieBanner, {
1537
1540
  className: "max-w-[1024px]",
1538
1541
  cookies: cookiesInput,
@@ -1541,12 +1544,12 @@ const CookieBanner$1 = () => {
1541
1544
  submitLabel: t("cookieBanner.accept"),
1542
1545
  rejectLabel: t("cookieBanner.reject"),
1543
1546
  children: /* @__PURE__ */ jsx("p", {
1544
- className: "font-semibold text-gray-500",
1547
+ className: "font-semibold text-gray-500 dark:text-slate-400",
1545
1548
  children: /* @__PURE__ */ jsx(Trans, {
1546
1549
  i18nKey: "cookieBanner.message",
1547
1550
  components: { a: /* @__PURE__ */ jsx("a", {
1548
1551
  onClick: () => showPHModal({ type: "cookiesPolicy" }),
1549
- className: "cursor-pointer text-gray-900 hover:underline"
1552
+ className: "cursor-pointer text-gray-900 hover:underline dark:text-slate-50"
1550
1553
  }, "cookieBanner.message-link") }
1551
1554
  }, "cookieBanner.message")
1552
1555
  })
@@ -1725,7 +1728,7 @@ const DocumentEditor = (props) => {
1725
1728
  //#region src/components/root.tsx
1726
1729
  function Root() {
1727
1730
  return /* @__PURE__ */ jsx("div", {
1728
- className: "h-screen",
1731
+ className: "h-screen bg-gray-50 dark:bg-slate-800",
1729
1732
  children: /* @__PURE__ */ jsx("div", {
1730
1733
  className: `flex h-screen items-stretch overflow-auto`,
1731
1734
  role: "presentation",
@@ -1832,7 +1835,9 @@ function Sidebar() {
1832
1835
  onClickSettings,
1833
1836
  address: user?.address,
1834
1837
  onLogin: openRenown,
1835
- onDisconnect: logout,
1838
+ onDisconnect: () => {
1839
+ logout();
1840
+ },
1836
1841
  ensName: ensName || ensInfo.data?.ens,
1837
1842
  avatarUrl: avatarUrl || ensInfo.data?.avatar_small || ensInfo.data?.avatar_url || void 0,
1838
1843
  etherscanUrl,
@@ -1854,5 +1859,5 @@ function Sidebar() {
1854
1859
  //#endregion
1855
1860
  export { AppLoader as t };
1856
1861
 
1857
- //# sourceMappingURL=sidebar-CZLMU1VL.js.map
1858
- //# debugId=9ec07267-610c-5785-aa26-92ef6dc6c948
1862
+ //# sourceMappingURL=sidebar-CO3JjI3G.js.map
1863
+ //# debugId=239c52db-b664-5e9c-ac37-c27d54ef59b8