@powerhousedao/connect 6.2.2-dev.5 → 6.2.2-dev.50

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 (95) hide show
  1. package/assets/document-icon-192x192.png +0 -0
  2. package/assets/document-icon-512x512.png +0 -0
  3. package/assets/pwa-192x192.png +0 -0
  4. package/assets/pwa-512x512-maskable.png +0 -0
  5. package/assets/pwa-512x512.png +0 -0
  6. package/dist/{AddDriveModal-MMHlkJBJ.js → AddDriveModal-Bw0YuxZg.js} +5 -5
  7. package/dist/AddDriveModal-Bw0YuxZg.js.map +1 -0
  8. package/dist/{ClearStorageModal--Kc9BLDH.js → ClearStorageModal-DDzOvG6T.js} +4 -4
  9. package/dist/{ClearStorageModal--Kc9BLDH.js.map → ClearStorageModal-DDzOvG6T.js.map} +1 -1
  10. package/dist/ConfirmDocumentUpgradeModal-9AaaQJTs.js +114 -0
  11. package/dist/ConfirmDocumentUpgradeModal-9AaaQJTs.js.map +1 -0
  12. package/dist/{CookiesPolicyModal-CkcUKPLb.js → CookiesPolicyModal-CQ-zHJdw.js} +3 -3
  13. package/dist/{CookiesPolicyModal-CkcUKPLb.js.map → CookiesPolicyModal-CQ-zHJdw.js.map} +1 -1
  14. package/dist/{CreateDocumentModal-CvsTh0HM.js → CreateDocumentModal-NNi4p6EI.js} +7 -5
  15. package/dist/CreateDocumentModal-NNi4p6EI.js.map +1 -0
  16. package/dist/{DebugSettingsModal-B7hFn_9k.js → DebugSettingsModal-k1l_X-wO.js} +6 -6
  17. package/dist/{DebugSettingsModal-B7hFn_9k.js.map → DebugSettingsModal-k1l_X-wO.js.map} +1 -1
  18. package/dist/{DeleteDriveModal-DSTK8FYk.js → DeleteDriveModal-C7fnXMsR.js} +4 -4
  19. package/dist/{DeleteDriveModal-DSTK8FYk.js.map → DeleteDriveModal-C7fnXMsR.js.map} +1 -1
  20. package/dist/{DeleteItemModal-B2nJmjsP.js → DeleteItemModal-BK_Y8Thj.js} +4 -4
  21. package/dist/{DeleteItemModal-B2nJmjsP.js.map → DeleteItemModal-BK_Y8Thj.js.map} +1 -1
  22. package/dist/{DisclaimerModal-D5FO34u9.js → DisclaimerModal-DJPHCnFY.js} +3 -3
  23. package/dist/{DisclaimerModal-D5FO34u9.js.map → DisclaimerModal-DJPHCnFY.js.map} +1 -1
  24. package/dist/DocumentVersionUnsupportedModal-tBHLK6b1.js +32 -0
  25. package/dist/DocumentVersionUnsupportedModal-tBHLK6b1.js.map +1 -0
  26. package/dist/{DownloadDocumentWithErrorsModal-tEr3bbtN.js → DownloadDocumentWithErrorsModal-sWu46HVB.js} +3 -3
  27. package/dist/{DownloadDocumentWithErrorsModal-tEr3bbtN.js.map → DownloadDocumentWithErrorsModal-sWu46HVB.js.map} +1 -1
  28. package/dist/DriveAuthRequiredModal-D3IPAst0.js +36 -0
  29. package/dist/DriveAuthRequiredModal-D3IPAst0.js.map +1 -0
  30. package/dist/{DriveSettingsModal-kR3hQnh4.js → DriveSettingsModal-7OKx8foy.js} +3 -3
  31. package/dist/{DriveSettingsModal-kR3hQnh4.js.map → DriveSettingsModal-7OKx8foy.js.map} +1 -1
  32. package/dist/{InspectorModal-DO7xAv0e.js → InspectorModal-DoIShIZU.js} +6 -6
  33. package/dist/{InspectorModal-DO7xAv0e.js.map → InspectorModal-DoIShIZU.js.map} +1 -1
  34. package/dist/LoginModal-Cd2wGgG4.js +75 -0
  35. package/dist/LoginModal-Cd2wGgG4.js.map +1 -0
  36. package/dist/{MissingPackageModal-BQcCQbOn.js → MissingPackageModal-DyP2-Ojb.js} +18 -6
  37. package/dist/MissingPackageModal-DyP2-Ojb.js.map +1 -0
  38. package/dist/OpenFileDocumentsModal-DH6sfJwe.js +311 -0
  39. package/dist/OpenFileDocumentsModal-DH6sfJwe.js.map +1 -0
  40. package/dist/{SettingsModal-5UjMFrlr.js → SettingsModal-CAKQhsAi.js} +26 -13
  41. package/dist/SettingsModal-CAKQhsAi.js.map +1 -0
  42. package/dist/{UpgradeDriveModal-BZGSE9_r.js → UpgradeDriveModal-wo5oO9mg.js} +3 -3
  43. package/dist/{UpgradeDriveModal-BZGSE9_r.js.map → UpgradeDriveModal-wo5oO9mg.js.map} +1 -1
  44. package/dist/{app-loader-C1rnoBbl.js → app-loader-0RTyMrTQ.js} +457 -89
  45. package/dist/app-loader-0RTyMrTQ.js.map +1 -0
  46. package/dist/app-loader-DeTgp8IP.js +4 -0
  47. package/dist/{build-info-COOSxFxb.js → build-info-B5u-94Xv.js} +5 -5
  48. package/dist/{build-info-COOSxFxb.js.map → build-info-B5u-94Xv.js.map} +1 -1
  49. package/dist/components-CqwpIQXY.js +5 -0
  50. package/dist/{connect.config-vgUeFoNp.js → connect.config-C-b_Yhd6.js} +9 -4
  51. package/dist/connect.config-C-b_Yhd6.js.map +1 -0
  52. package/dist/{connection-state-DO_2lAEJ.js → connection-state-KCa1yljA.js} +4 -4
  53. package/dist/{connection-state-DO_2lAEJ.js.map → connection-state-KCa1yljA.js.map} +1 -1
  54. package/dist/{load-BCpNI6yz.js → load-2EH2_hXZ.js} +10 -10
  55. package/dist/{load-BCpNI6yz.js.map → load-2EH2_hXZ.js.map} +1 -1
  56. package/dist/main.js +1 -1
  57. package/dist/{package-BJ5bAWw-.js → package-PM62ZNdm.js} +8 -4
  58. package/dist/package-PM62ZNdm.js.map +1 -0
  59. package/dist/{pglite-seed-z3B1JA38.js → pglite-seed-DRXPe7p-.js} +4 -4
  60. package/dist/{pglite-seed-z3B1JA38.js.map → pglite-seed-DRXPe7p-.js.map} +1 -1
  61. package/dist/pwa-manifest-link-CG8UajMz.js +34 -0
  62. package/dist/pwa-manifest-link-CG8UajMz.js.map +1 -0
  63. package/dist/{reactor-EirLqbNn.js → reactor-BqAu6N6i.js} +167 -20
  64. package/dist/reactor-BqAu6N6i.js.map +1 -0
  65. package/dist/reactor.worker.js +8 -6
  66. package/dist/reactor.worker.js.map +1 -1
  67. package/dist/{registerServiceWorker-nJIc0yEY.js → registerServiceWorker-Bn1KWmk0.js} +6 -4
  68. package/dist/registerServiceWorker-Bn1KWmk0.js.map +1 -0
  69. package/dist/{reload-connect-toast-D1Iqw9E_.js → reload-connect-toast-DDQEupCN.js} +23 -5
  70. package/dist/{reload-connect-toast-D1Iqw9E_.js.map → reload-connect-toast-DDQEupCN.js.map} +1 -1
  71. package/dist/start-connect.js +1 -1
  72. package/dist/style.css +100 -7
  73. package/dist/{toast-4t-VimvD.js → toast-CO6ChlzE.js} +8 -5
  74. package/dist/toast-CO6ChlzE.js.map +1 -0
  75. package/dist/use-renown-login-BtGljnB4.js +52 -0
  76. package/dist/use-renown-login-BtGljnB4.js.map +1 -0
  77. package/dist/useRegistryPackages-DMhCvTWq.js +314 -0
  78. package/dist/useRegistryPackages-DMhCvTWq.js.map +1 -0
  79. package/package.json +15 -11
  80. package/dist/AddDriveModal-MMHlkJBJ.js.map +0 -1
  81. package/dist/CreateDocumentModal-CvsTh0HM.js.map +0 -1
  82. package/dist/DriveAuthRequiredModal-BA2vS3oF.js +0 -40
  83. package/dist/DriveAuthRequiredModal-BA2vS3oF.js.map +0 -1
  84. package/dist/MissingPackageModal-BQcCQbOn.js.map +0 -1
  85. package/dist/SettingsModal-5UjMFrlr.js.map +0 -1
  86. package/dist/app-loader-C1rnoBbl.js.map +0 -1
  87. package/dist/app-loader-CpXJhHIH.js +0 -4
  88. package/dist/components-DHj3ZpJg.js +0 -5
  89. package/dist/connect.config-vgUeFoNp.js.map +0 -1
  90. package/dist/package-BJ5bAWw-.js.map +0 -1
  91. package/dist/reactor-EirLqbNn.js.map +0 -1
  92. package/dist/registerServiceWorker-nJIc0yEY.js.map +0 -1
  93. package/dist/toast-4t-VimvD.js.map +0 -1
  94. package/dist/useRegistryPackages-BaYtekjQ.js +0 -179
  95. package/dist/useRegistryPackages-BaYtekjQ.js.map +0 -1
@@ -1,19 +1,20 @@
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]="dc8c4b13-0dd6-57d4-8c3f-246cd0c114f4")}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]="547308c5-f3db-5bd3-a82b-2dfd3301067d")}catch(e){}}();
3
3
  import { n as getRuntimeConfig } from "./runtime-config-DL3QjcfM.js";
4
4
  import { c as idbError } from "./pglite-major-B39aOEiE.js";
5
5
  import { n as cloneFileData, r as migrateIdb } from "./pglite-migrate-core-Boxqqx-c.js";
6
- import { i as i18n, n as setSentryModule } from "./reload-connect-toast-D1Iqw9E_.js";
7
- import { a as defaultPHDocumentEditorConfig, i as defaultPHAppConfig, r as connectConfig } from "./connect.config-vgUeFoNp.js";
8
- import { f as PRIMARY_IDB_NAMES, r as subscribeWorkerConnection, s as getCachedMigrationMajor, t as getWorkerConnectionStatus, u as subscribeMigrationMajor } from "./connection-state-DO_2lAEJ.js";
9
- import { n as serviceWorkerManager, r as subscribeServiceWorkerUpdate, t as getServiceWorkerUpdateAvailable } from "./registerServiceWorker-nJIc0yEY.js";
10
- import { n as toast, t as ToastContainer } from "./toast-4t-VimvD.js";
6
+ import { i as i18n, n as setSentryModule } from "./reload-connect-toast-DDQEupCN.js";
7
+ import { a as defaultPHDocumentEditorConfig, i as defaultPHAppConfig, r as connectConfig } from "./connect.config-C-b_Yhd6.js";
8
+ import { f as PRIMARY_IDB_NAMES, r as subscribeWorkerConnection, s as getCachedMigrationMajor, t as getWorkerConnectionStatus, u as subscribeMigrationMajor } from "./connection-state-KCa1yljA.js";
9
+ import { n as serviceWorkerManager, r as subscribeServiceWorkerUpdate, t as getServiceWorkerUpdateAvailable } from "./registerServiceWorker-Bn1KWmk0.js";
10
+ import { n as dismissToast, r as toast, t as ToastContainer } from "./toast-CO6ChlzE.js";
11
+ import { t as useOpenRenownLogin } from "./use-renown-login-BtGljnB4.js";
11
12
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
13
  import { Trans, useTranslation } from "react-i18next";
13
- import React, { StrictMode, Suspense, lazy, useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
14
- import { DriveCollectionId, getRevisionFromDate, initTheme, logout, openRenown, setPHAppConfig, setPHDocumentEditorConfig, setRevisionHistoryVisible, setSelectedDrive, setSelectedNode, showPHModal, useAppModuleById, useConnectionStates, useDefaultAppModule, useDocumentById, useDocumentModelModuleById, useDocumentOperations, useDrives, useEditorModuleById, useEditorPreloader, useFallbackEditorModule, useIsAddDriveEnabled, useNodeParentFolderById, usePHModal, usePackageDiscoveryService, useReactorClientModule, useRevisionHistoryVisible, useSelectedDocument, useSelectedDocumentId, useSelectedDriveSafe, useSelectedFolder, useSelectedTimelineItem, useSyncList, useTheme, useUser, useVetraPackageManager, useVetraPackages } from "@powerhousedao/reactor-browser";
14
+ import React, { StrictMode, Suspense, createElement, lazy, useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
15
+ import { DriveCollectionId, RenownWalletProvider, addFileWithProgress, getRevisionFromDate, initTheme, logout, setPHAppConfig, setPHDocumentEditorConfig, setRevisionHistoryVisible, setSelectedDrive, setSelectedNode, showPHModal, useAppModuleById, useConnectionStates, useDefaultAppModule, useDocumentById, useDocumentModelModuleById, useDocumentOperations, useDocumentVersionStatus, useDrives, useEditorModuleById, useEditorPreloader, useFallbackEditorModule, useIsAddDriveEnabled, useNodeParentFolderById, usePHModal, usePackageDiscoveryService, useReactorClientModule, useRevisionHistoryVisible, useSelectedDocument, useSelectedDocumentId, useSelectedDriveSafe, useSelectedFolder, useSelectedTimelineItem, useSyncList, useTheme, useUser, useVetraPackageManager, useVetraPackages } from "@powerhousedao/reactor-browser";
15
16
  import { childLogger } from "document-model";
16
- import { ConnectSidebar, ConnectTooltipProvider, CookieBanner, DefaultEditorLoader, DriveAuthGate, DropZoneWrapper, HomeScreen, HomeScreenAddDriveItem, HomeScreenItem, LogoAnimation, PackageInstallModal, RevisionHistory, SidebarAddDriveItem, SidebarItem, useEns } from "@powerhousedao/design-system/connect";
17
+ import { ConnectSidebar, ConnectTooltipProvider, CookieBanner, DefaultEditorLoader, DriveAuthGate, DropZoneWrapper, HomeScreen, HomeScreenAddDriveItem, HomeScreenItem, LogoAnimation, PackageInstallModal, RevisionHistory, SidebarAddDriveItem, SidebarItem, UploadFileListContainer, formatFileSize, mapProgressStageToStatus, useEns } from "@powerhousedao/design-system/connect";
17
18
  import { z } from "zod";
18
19
  import { Outlet, RouterProvider, createBrowserRouter, createRoutesFromChildren, matchRoutes, useLocation, useNavigationType } from "react-router-dom";
19
20
  import { useHotkeys } from "react-hotkeys-hook";
@@ -21,6 +22,10 @@ import { Icon, Modal, PowerhouseButton } from "@powerhousedao/design-system";
21
22
  import { ErrorBoundary } from "react-error-boundary";
22
23
  import { GenericDriveExplorer } from "@powerhousedao/powerhouse-vetra-packages/editors";
23
24
  import { twMerge } from "tailwind-merge";
25
+ import { mockAdapter } from "@renown/sdk/wallet/mock";
26
+ import { privyAdapter } from "@renown/sdk/wallet/privy";
27
+ import { rainbowAdapter } from "@renown/sdk/wallet/rainbow";
28
+ import { arbitrum, base, mainnet, optimism, polygon, sepolia } from "wagmi/chains";
24
29
  import { redo, undo } from "@powerhousedao/shared/document-model";
25
30
  //#region src/utils/browser.ts
26
31
  function getBasePath() {
@@ -75,6 +80,184 @@ var DocumentEditorDebugTools = class {
75
80
  }
76
81
  };
77
82
  //#endregion
83
+ //#region src/utils/launch-queue.ts
84
+ let pendingImportFiles = [];
85
+ const pendingListeners = /* @__PURE__ */ new Set();
86
+ function notifyPendingListeners() {
87
+ for (const listener of pendingListeners) listener();
88
+ }
89
+ function getPendingImportFiles() {
90
+ return pendingImportFiles;
91
+ }
92
+ /** Stable identity of a pending file (also the picker's pre-check cache key). */
93
+ function pendingFileKey(file) {
94
+ return `${file.name}|${file.size}|${file.lastModified}`;
95
+ }
96
+ function addPendingImportFiles(files) {
97
+ const seen = new Set(pendingImportFiles.map(pendingFileKey));
98
+ const fresh = files.filter((file) => {
99
+ const key = pendingFileKey(file);
100
+ if (seen.has(key)) return false;
101
+ seen.add(key);
102
+ return true;
103
+ });
104
+ if (fresh.length === 0) return;
105
+ pendingImportFiles = [...pendingImportFiles, ...fresh];
106
+ notifyPendingListeners();
107
+ }
108
+ function clearPendingImportFiles() {
109
+ if (pendingImportFiles.length === 0) return;
110
+ pendingImportFiles = [];
111
+ notifyPendingListeners();
112
+ }
113
+ function subscribePendingImportFiles(cb) {
114
+ pendingListeners.add(cb);
115
+ return () => {
116
+ pendingListeners.delete(cb);
117
+ };
118
+ }
119
+ async function handleLaunchParams(params) {
120
+ const handles = params.files.filter((handle) => handle.kind === "file");
121
+ if (handles.length === 0) return;
122
+ const files = [];
123
+ for (const handle of handles) try {
124
+ files.push(await handle.getFile());
125
+ } catch (error) {
126
+ console.error("Failed to read launched file:", handle.name, error);
127
+ }
128
+ if (files.length === 0) return;
129
+ addPendingImportFiles(files);
130
+ showPHModal({ type: "openFileDocuments" });
131
+ }
132
+ function maybeReopenImportModal() {
133
+ if (getPendingImportFiles().length === 0) return;
134
+ if (window.ph?.modal !== void 0) return;
135
+ showPHModal({ type: "openFileDocuments" });
136
+ }
137
+ let initialized = false;
138
+ /**
139
+ * Register the launchQueue consumer that receives files opened with Connect
140
+ * through the OS file association. Idempotent (safe under StrictMode double
141
+ * effects) and a no-op where the File Handling API doesn't exist — Firefox,
142
+ * Safari, and any context without an installed PWA manifest simply never
143
+ * deliver launches.
144
+ */
145
+ function initLaunchQueueFileHandling() {
146
+ if (initialized) return;
147
+ initialized = true;
148
+ window.addEventListener("ph:modalUpdated", maybeReopenImportModal);
149
+ window.launchQueue?.setConsumer((params) => {
150
+ handleLaunchParams(params);
151
+ });
152
+ }
153
+ //#endregion
154
+ //#region src/utils/open-file-uploads.ts
155
+ let uploads = [];
156
+ const listeners$3 = /* @__PURE__ */ new Set();
157
+ function notifyUploadListeners() {
158
+ for (const listener of listeners$3) listener();
159
+ }
160
+ function getOpenFileUploads() {
161
+ return uploads;
162
+ }
163
+ function subscribeOpenFileUploads(cb) {
164
+ listeners$3.add(cb);
165
+ return () => {
166
+ listeners$3.delete(cb);
167
+ };
168
+ }
169
+ function removeOpenFileUpload(id) {
170
+ const next = uploads.filter((upload) => upload.id !== id);
171
+ if (next.length === uploads.length) return;
172
+ uploads = next;
173
+ notifyUploadListeners();
174
+ }
175
+ function clearOpenFileUploads() {
176
+ if (uploads.length === 0) return;
177
+ uploads = [];
178
+ notifyUploadListeners();
179
+ }
180
+ function addOpenFileUploads(rows) {
181
+ uploads = [...uploads, ...rows];
182
+ notifyUploadListeners();
183
+ }
184
+ function patchOpenFileUpload(id, patch) {
185
+ uploads = uploads.map((upload) => upload.id === id ? {
186
+ ...upload,
187
+ ...patch
188
+ } : upload);
189
+ notifyUploadListeners();
190
+ }
191
+ let uploadCounter = 0;
192
+ let importChain = Promise.resolve();
193
+ /**
194
+ * Import one file and resolve once the flow truly ends. Completion is
195
+ * tracked through the progress stages, NOT the returned promise — the
196
+ * package-discovery retry path resolves early and keeps reporting through
197
+ * the callback. `resolveConflict: "duplicate"` is always passed: duplicates
198
+ * were resolved in the picker (rename), so the conflict stage must never
199
+ * fire — this also covers a duplicate appearing between pre-check and import.
200
+ */
201
+ function importOne(row, driveId, documentTypes) {
202
+ return new Promise((resolve) => {
203
+ let settled = false;
204
+ const settle = (fileNode) => {
205
+ if (settled) return;
206
+ settled = true;
207
+ resolve(fileNode);
208
+ };
209
+ addFileWithProgress(row.file, driveId, row.name, void 0, (progress) => {
210
+ patchOpenFileUpload(row.id, {
211
+ status: mapProgressStageToStatus(progress.stage),
212
+ progress: progress.progress,
213
+ ...progress.error ? { errorDetails: progress.error } : {},
214
+ ...progress.documentType ? { documentType: progress.documentType } : {},
215
+ ...progress.fileNode ? { fileNode: progress.fileNode } : {}
216
+ });
217
+ switch (progress.stage) {
218
+ case "complete":
219
+ settle(progress.fileNode);
220
+ break;
221
+ case "failed":
222
+ case "unsupported-document-type":
223
+ settle(void 0);
224
+ break;
225
+ default: break;
226
+ }
227
+ }, documentTypes, "duplicate").catch(() => {
228
+ settle(void 0);
229
+ });
230
+ });
231
+ }
232
+ /**
233
+ * Run a confirmed batch of imports into a drive, feeding the floating upload
234
+ * panel. Rows appear immediately (queued), files import sequentially, and a
235
+ * single-file batch that succeeds opens its document in the editor.
236
+ */
237
+ function runOpenFileImports(args) {
238
+ const { driveId, imports, documentTypes } = args;
239
+ if (imports.length === 0) return importChain;
240
+ const rows = imports.map(({ file, name }) => ({
241
+ id: `open-file-${++uploadCounter}`,
242
+ file,
243
+ name
244
+ }));
245
+ addOpenFileUploads(rows.map((row) => ({
246
+ id: row.id,
247
+ fileName: row.name,
248
+ fileSize: formatFileSize(row.file.size),
249
+ status: "pending",
250
+ progress: 0
251
+ })));
252
+ const run = async () => {
253
+ const results = [];
254
+ for (const row of rows) results.push(await importOne(row, driveId, documentTypes));
255
+ if (rows.length === 1 && results[0]) setSelectedNode(results[0]);
256
+ };
257
+ importChain = importChain.then(run, run);
258
+ return importChain;
259
+ }
260
+ //#endregion
78
261
  //#region src/components/migration-status.ts
79
262
  let current = null;
80
263
  const listeners$2 = /* @__PURE__ */ new Set();
@@ -708,7 +891,7 @@ function SilentFallback() {
708
891
  */
709
892
  function TextFallback({ message = "Something went wrong" }) {
710
893
  return /* @__PURE__ */ jsx("div", {
711
- className: "text-center text-foreground",
894
+ className: "text-center wrap-break-word text-foreground",
712
895
  children: message
713
896
  });
714
897
  }
@@ -736,7 +919,7 @@ function DetailedFallback({ error, resetErrorBoundary }) {
736
919
  })]
737
920
  }),
738
921
  /* @__PURE__ */ jsx("p", {
739
- className: "mb-4 text-sm text-foreground",
922
+ className: "mb-4 text-sm wrap-break-word text-foreground",
740
923
  children: errorMessage
741
924
  }),
742
925
  errorDetails !== "{}" && /* @__PURE__ */ jsxs("details", {
@@ -766,9 +949,9 @@ function DetailedFallback({ error, resetErrorBoundary }) {
766
949
  */
767
950
  function CenteredErrorMessage({ error }) {
768
951
  return /* @__PURE__ */ jsx("div", {
769
- className: "flex size-full items-center justify-center",
952
+ className: "flex size-full items-center justify-center p-6",
770
953
  children: /* @__PURE__ */ jsx("h3", {
771
- className: "text-lg font-semibold text-foreground",
954
+ className: "max-w-lg min-w-0 text-center text-lg font-semibold wrap-break-word text-foreground",
772
955
  children: error instanceof Error ? error.message : String(error)
773
956
  })
774
957
  });
@@ -1106,16 +1289,38 @@ function canRetry(reason) {
1106
1289
  }
1107
1290
  function MissingModelBanner() {
1108
1291
  const failed = useFailedInstallations();
1292
+ const discoveryService = usePackageDiscoveryService();
1109
1293
  const [open, setOpen] = useState(false);
1294
+ const [dismissed, setDismissed] = useState(false);
1295
+ useEffect(() => {
1296
+ return discoveryService?.subscribeEvents((event) => {
1297
+ if (event.type === "load-failed") setDismissed(false);
1298
+ });
1299
+ }, [discoveryService]);
1110
1300
  if (failed.length === 0) return null;
1111
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
1112
- className: "flex items-center justify-between gap-3 bg-warning/10 px-4 py-2 text-sm text-warning",
1113
- 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", {
1114
- type: "button",
1115
- onClick: () => setOpen(true),
1116
- className: "rounded-md border border-warning bg-background px-3 py-1 text-warning hover:hover-effect",
1117
- children: "View"
1118
- })]
1301
+ return /* @__PURE__ */ jsxs(Fragment, { children: [dismissed ? null : /* @__PURE__ */ jsx("div", {
1302
+ className: "absolute inset-x-0 top-0 z-200 bg-background",
1303
+ children: /* @__PURE__ */ jsxs("div", {
1304
+ className: "flex items-center justify-between gap-3 bg-warning/10 px-4 py-2 text-sm text-warning",
1305
+ 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__ */ jsxs("div", {
1306
+ className: "flex items-center gap-2",
1307
+ children: [/* @__PURE__ */ jsx("button", {
1308
+ type: "button",
1309
+ onClick: () => setOpen(true),
1310
+ className: "rounded-md border border-warning bg-background px-3 py-1 text-warning hover:hover-effect",
1311
+ children: "View"
1312
+ }), /* @__PURE__ */ jsx("button", {
1313
+ type: "button",
1314
+ onClick: () => setDismissed(true),
1315
+ "aria-label": "Dismiss",
1316
+ className: "flex items-center text-warning hover:hover-effect",
1317
+ children: /* @__PURE__ */ jsx(Icon, {
1318
+ name: "XmarkLight",
1319
+ size: 16
1320
+ })
1321
+ })]
1322
+ })]
1323
+ })
1119
1324
  }), /* @__PURE__ */ jsx(MissingModelDetailsModal, {
1120
1325
  open,
1121
1326
  failed,
@@ -1218,6 +1423,18 @@ function MissingModelDetailsModal(props) {
1218
1423
  });
1219
1424
  }
1220
1425
  //#endregion
1426
+ //#region src/components/open-file-upload-list.tsx
1427
+ function OpenFileUploadList() {
1428
+ const uploads = useSyncExternalStore(subscribeOpenFileUploads, getOpenFileUploads);
1429
+ return /* @__PURE__ */ jsx(UploadFileListContainer, {
1430
+ uploadsArray: uploads,
1431
+ uploadsCount: uploads.length,
1432
+ removeUpload: removeOpenFileUpload,
1433
+ clearAllUploads: clearOpenFileUploads,
1434
+ setSelectedNode
1435
+ });
1436
+ }
1437
+ //#endregion
1221
1438
  //#region src/components/package-install-prompt.tsx
1222
1439
  function PackageInstallPrompt() {
1223
1440
  const pendingInstallations = usePendingInstallations();
@@ -1233,6 +1450,87 @@ function PackageInstallPrompt() {
1233
1450
  });
1234
1451
  }
1235
1452
  //#endregion
1453
+ //#region src/components/renown-adapter-descriptors.ts
1454
+ function describe(id, build) {
1455
+ try {
1456
+ return [build()];
1457
+ } catch (error) {
1458
+ console.error(`[connect] Ignoring the "${id}" wallet adapter: connect.renown.adapters.${id} was rejected.`, error);
1459
+ return [];
1460
+ }
1461
+ }
1462
+ const CHAINS_BY_ID = new Map([
1463
+ mainnet,
1464
+ sepolia,
1465
+ polygon,
1466
+ optimism,
1467
+ arbitrum,
1468
+ base
1469
+ ].map((chain) => [chain.id, chain]));
1470
+ function chainsFor(chainId) {
1471
+ if (chainId === void 0) return void 0;
1472
+ const chain = CHAINS_BY_ID.get(chainId);
1473
+ if (!chain) {
1474
+ console.error(`[connect] connect.renown.chainId ${chainId} is not a chain Connect can offer, so in-page sign-in will be rejected. Supported: ${[...CHAINS_BY_ID.keys()].join(", ")}.`);
1475
+ return;
1476
+ }
1477
+ return [chain];
1478
+ }
1479
+ /** Map Connect's declarative `connect.renown.adapters` config to the descriptors `RenownWalletProvider` takes. Array order sets the order of the login buttons. A rejected adapter config is dropped (logged), leaving the others working. `chainId` is `connect.renown.chainId`, the chain Renown issues credentials on. */
1480
+ function configToDescriptors(config, chainId) {
1481
+ if (!config) return [];
1482
+ const { rainbow, privy, mock } = config;
1483
+ const descriptors = [];
1484
+ const chains = chainsFor(chainId);
1485
+ if (rainbow) descriptors.push(...describe("rainbow", () => rainbowAdapter({
1486
+ ...rainbow,
1487
+ ...chains ? { chains } : {}
1488
+ })));
1489
+ if (privy) {
1490
+ const { appId, clientId, methods } = privy;
1491
+ if (appId) descriptors.push(...describe("privy", () => privyAdapter({
1492
+ appId,
1493
+ clientId,
1494
+ methods
1495
+ })));
1496
+ }
1497
+ if (mock) descriptors.push(...describe("mock", () => mockAdapter({
1498
+ ...mock,
1499
+ methods: mock.methods
1500
+ })));
1501
+ return descriptors;
1502
+ }
1503
+ //#endregion
1504
+ //#region src/components/renown-wallet-providers.tsx
1505
+ function resolveColor(expr, fallback) {
1506
+ if (typeof document === "undefined") return fallback;
1507
+ const probe = document.createElement("span");
1508
+ probe.style.color = fallback;
1509
+ probe.style.color = expr;
1510
+ probe.style.display = "none";
1511
+ document.body.appendChild(probe);
1512
+ const resolved = getComputedStyle(probe).color;
1513
+ probe.remove();
1514
+ return resolved || fallback;
1515
+ }
1516
+ function RenownWalletProviders({ children }) {
1517
+ const config = getRuntimeConfig().connect.renown?.adapters;
1518
+ const chainId = getRuntimeConfig().connect.renown?.chainId;
1519
+ const { theme } = useTheme();
1520
+ const adapters = useMemo(() => configToDescriptors(config, chainId), [config, chainId]);
1521
+ const walletTheme = useMemo(() => adapters.length > 0 ? {
1522
+ mode: theme,
1523
+ accentColor: resolveColor("var(--primary)", "#0084ff"),
1524
+ accentColorForeground: resolveColor("var(--primary-foreground)", "#ffffff")
1525
+ } : void 0, [theme, adapters]);
1526
+ if (adapters.length === 0) return /* @__PURE__ */ jsx(Fragment, { children });
1527
+ return /* @__PURE__ */ jsx(RenownWalletProvider, {
1528
+ adapters,
1529
+ theme: walletTheme,
1530
+ children
1531
+ });
1532
+ }
1533
+ //#endregion
1236
1534
  //#region src/components/app.tsx
1237
1535
  const App = () => {
1238
1536
  useTheme();
@@ -1258,14 +1556,18 @@ const App = () => {
1258
1556
  else if (connectConfig.offline) serviceWorkerManager.registerServiceWorker(false);
1259
1557
  else serviceWorkerManager.unregisterAll();
1260
1558
  }, []);
1261
- return /* @__PURE__ */ jsxs(SentryProvider, { children: [
1559
+ useEffect(() => {
1560
+ initLaunchQueueFileHandling();
1561
+ }, []);
1562
+ return /* @__PURE__ */ jsx(SentryProvider, { children: /* @__PURE__ */ jsxs(RenownWalletProviders, { children: [
1262
1563
  /* @__PURE__ */ jsx(ToastContainer, { position: "bottom-right" }),
1263
1564
  /* @__PURE__ */ jsx(MissingModelBanner, {}),
1264
1565
  /* @__PURE__ */ jsx(Router, {}),
1566
+ /* @__PURE__ */ jsx(OpenFileUploadList, {}),
1265
1567
  /* @__PURE__ */ jsx(PackageInstallPrompt, {}),
1266
1568
  /* @__PURE__ */ jsx(Analytics, {}),
1267
1569
  /* @__PURE__ */ jsx(OpenPanel, {})
1268
- ] });
1570
+ ] }) });
1269
1571
  };
1270
1572
  //#endregion
1271
1573
  //#region src/components/cookie-banner.tsx
@@ -1350,16 +1652,56 @@ function DriveIcon({ drive }) {
1350
1652
  });
1351
1653
  }
1352
1654
  //#endregion
1655
+ //#region src/components/document-upgrade-toast.tsx
1656
+ const DocumentUpgradeToast = ({ documentId }) => {
1657
+ const { t } = useTranslation();
1658
+ return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
1659
+ className: "font-medium",
1660
+ children: t("notifications.documentUpgradeAvailable")
1661
+ }), /* @__PURE__ */ jsx("button", {
1662
+ onClick: () => {
1663
+ showPHModal({
1664
+ type: "confirmDocumentUpgrade",
1665
+ documentId
1666
+ });
1667
+ },
1668
+ className: "underline decoration-solid underline-offset-2",
1669
+ children: t("common.updateDocument")
1670
+ })] });
1671
+ };
1672
+ //#endregion
1353
1673
  //#region src/components/editors.tsx
1354
- function EditorError({ message }) {
1674
+ function EditorError({ title, children }) {
1355
1675
  return /* @__PURE__ */ jsx("div", {
1356
- className: "flex size-full items-center justify-center",
1357
- children: /* @__PURE__ */ jsx("h3", {
1358
- className: "text-lg font-semibold",
1359
- children: message
1676
+ className: "flex size-full items-center justify-center p-6",
1677
+ children: /* @__PURE__ */ jsxs("div", {
1678
+ className: "w-full max-w-lg rounded-lg border border-border bg-card p-6 text-foreground shadow-sm",
1679
+ children: [/* @__PURE__ */ jsxs("div", {
1680
+ className: "mb-3 flex items-center gap-2",
1681
+ children: [/* @__PURE__ */ jsx(Icon, {
1682
+ name: "Error",
1683
+ className: "size-5 shrink-0 text-destructive"
1684
+ }), /* @__PURE__ */ jsx("h3", {
1685
+ className: "min-w-0 text-lg font-semibold wrap-break-word text-foreground",
1686
+ children: title
1687
+ })]
1688
+ }), /* @__PURE__ */ jsx("div", {
1689
+ className: "wrap-break-word",
1690
+ children
1691
+ })]
1360
1692
  })
1361
1693
  });
1362
1694
  }
1695
+ function OpenPackageManagerButton() {
1696
+ return /* @__PURE__ */ jsx(PowerhouseButton, {
1697
+ className: "px-3 py-1.5 text-base font-medium",
1698
+ onClick: () => {
1699
+ showPHModal({ type: "settings" });
1700
+ },
1701
+ type: "button",
1702
+ children: "Open package manager"
1703
+ });
1704
+ }
1363
1705
  const DocumentEditor = (props) => {
1364
1706
  const { document: initialDocument } = props;
1365
1707
  const selectedTimelineItem = useSelectedTimelineItem();
@@ -1379,6 +1721,21 @@ const DocumentEditor = (props) => {
1379
1721
  const preferredEditorModule = useEditorModuleById(preferredEditor);
1380
1722
  const fallbackEditorModule = useFallbackEditorModule(documentType);
1381
1723
  const editorModule = preferredEditorModule ?? fallbackEditorModule;
1724
+ const versionStatus = useDocumentVersionStatus(document ?? void 0);
1725
+ const versionStatusKind = versionStatus?.kind;
1726
+ const upgradeAvailable = versionStatus?.kind === "upgrade-available" && versionStatus.canUpgrade;
1727
+ useEffect(() => {
1728
+ if (upgradeAvailable && documentId) toast(createElement(DocumentUpgradeToast, { documentId }), {
1729
+ type: "connect-warning",
1730
+ toastId: `outdated-document-${documentId}`,
1731
+ autoClose: false
1732
+ });
1733
+ else if (versionStatusKind && versionStatusKind !== "upgrade-available" && documentId) dismissToast(`outdated-document-${documentId}`);
1734
+ }, [
1735
+ upgradeAvailable,
1736
+ versionStatusKind,
1737
+ documentId
1738
+ ]);
1382
1739
  const vetraPackages = useVetraPackages();
1383
1740
  const packageManager = useVetraPackageManager();
1384
1741
  const owningPackageName = editorModule ? vetraPackages.find((pkg) => pkg.editors.includes(editorModule))?.manifest.name : void 0;
@@ -1414,46 +1771,49 @@ const DocumentEditor = (props) => {
1414
1771
  };
1415
1772
  if (isLoadingEditor) return /* @__PURE__ */ jsx(EditorLoader, { message: "Loading editor" });
1416
1773
  if (isLoadingDocument) return /* @__PURE__ */ jsx(EditorLoader, { message: "Loading document" });
1417
- if (!documentModelModule) return /* @__PURE__ */ jsx(EditorError, { message: /* @__PURE__ */ jsxs("div", {
1418
- className: "text-center leading-10",
1419
- children: [/* @__PURE__ */ jsxs("p", { children: [
1420
- "Unable to open the document because the document model \"",
1421
- documentType,
1422
- "\" is not supported."
1423
- ] }), /* @__PURE__ */ jsxs("p", { children: [
1424
- "Go to the",
1425
- " ",
1426
- /* @__PURE__ */ jsx("button", {
1427
- type: "button",
1428
- className: "cursor-pointer underline",
1429
- onClick: () => {
1430
- showPHModal({ type: "settings" });
1431
- },
1432
- children: "package manager"
1433
- }),
1434
- " ",
1435
- "to install this document model"
1436
- ] })]
1437
- }) });
1438
- if (!editorModule) return /* @__PURE__ */ jsx(EditorError, { message: /* @__PURE__ */ jsxs("div", {
1439
- className: "text-center leading-10",
1440
- children: [/* @__PURE__ */ jsx("p", { children: "Unable to open the document because no editor has been found" }), /* @__PURE__ */ jsxs("p", { children: [
1441
- "Go to the",
1442
- " ",
1443
- /* @__PURE__ */ jsx("button", {
1444
- type: "button",
1445
- className: "cursor-pointer underline",
1446
- onClick: () => {
1447
- showPHModal({ type: "settings" });
1448
- },
1449
- children: "package manager"
1450
- }),
1451
- " ",
1452
- "an editor for the \"$",
1453
- documentType,
1454
- "\" document type"
1455
- ] })]
1456
- }) });
1774
+ if (!documentModelModule) return /* @__PURE__ */ jsxs(EditorError, {
1775
+ title: "Document type not supported",
1776
+ children: [/* @__PURE__ */ jsxs("p", {
1777
+ className: "mb-4 text-sm text-foreground",
1778
+ children: [
1779
+ "This document can't be opened because the \"",
1780
+ documentType,
1781
+ "\" document model isn't installed. Install the package that provides it to open the document."
1782
+ ]
1783
+ }), /* @__PURE__ */ jsx(OpenPackageManagerButton, {})]
1784
+ });
1785
+ if (versionStatus?.kind === "unsupported") return /* @__PURE__ */ jsxs(EditorError, {
1786
+ title: "Document version not supported",
1787
+ children: [/* @__PURE__ */ jsxs("p", {
1788
+ className: "mb-4 text-sm text-foreground",
1789
+ children: [
1790
+ "This document requires version ",
1791
+ versionStatus.documentVersion,
1792
+ " of the \"",
1793
+ documentType,
1794
+ "\" document model, but only version",
1795
+ versionStatus.availableVersions.length > 1 ? "s" : "",
1796
+ " ",
1797
+ versionStatus.availableVersions.join(", "),
1798
+ " ",
1799
+ versionStatus.availableVersions.length > 1 ? "are" : "is",
1800
+ " installed. Update the package that provides \"",
1801
+ documentType,
1802
+ "\" to open it."
1803
+ ]
1804
+ }), /* @__PURE__ */ jsx(OpenPackageManagerButton, {})]
1805
+ });
1806
+ if (!editorModule) return /* @__PURE__ */ jsxs(EditorError, {
1807
+ title: "No editor available",
1808
+ children: [/* @__PURE__ */ jsxs("p", {
1809
+ className: "mb-4 text-sm text-foreground",
1810
+ children: [
1811
+ "The \"",
1812
+ documentType,
1813
+ "\" document model is installed, but no editor for it was found. Install a package that provides an editor for this document type."
1814
+ ]
1815
+ }), /* @__PURE__ */ jsx(OpenPackageManagerButton, {})]
1816
+ });
1457
1817
  const EditorComponent = editorModule.Component;
1458
1818
  return /* @__PURE__ */ jsx("div", {
1459
1819
  className: "relative h-full",
@@ -1532,6 +1892,7 @@ function useDriveAuthGate() {
1532
1892
  //#region src/pages/content.tsx
1533
1893
  function Content() {
1534
1894
  const { gate } = useDriveAuthGate();
1895
+ const openLogin = useOpenRenownLogin();
1535
1896
  const [selectedDrive] = useSelectedDriveSafe();
1536
1897
  const selectedFolder = useSelectedFolder();
1537
1898
  const selectedDocumentId = useSelectedDocumentId();
@@ -1545,7 +1906,7 @@ function Content() {
1545
1906
  className: "flex h-full items-center justify-center p-4",
1546
1907
  children: /* @__PURE__ */ jsx(DriveAuthGate, {
1547
1908
  mode: gate,
1548
- onLogin: openRenown,
1909
+ onLogin: openLogin,
1549
1910
  onLogout: () => void logout()
1550
1911
  })
1551
1912
  }) : !selectedDocumentId && !selectedDrive && !selectedFolder ? /* @__PURE__ */ jsx(HomeScreenContainer, {}) : /* @__PURE__ */ jsx(AppContainer, {}) });
@@ -1613,6 +1974,7 @@ const Router = () => {
1613
1974
  //#region src/components/sidebar.tsx
1614
1975
  function Sidebar() {
1615
1976
  const user = useUser();
1977
+ const openLogin = useOpenRenownLogin();
1616
1978
  const drives = useDrives();
1617
1979
  const isAddDriveEnabled = useIsAddDriveEnabled();
1618
1980
  const [selectedDrive] = useSelectedDriveSafe();
@@ -1632,7 +1994,7 @@ function Sidebar() {
1632
1994
  onClick: () => setSelectedDrive(void 0),
1633
1995
  onClickSettings,
1634
1996
  address: user?.address,
1635
- onLogin: openRenown,
1997
+ onLogin: openLogin,
1636
1998
  onDisconnect: () => {
1637
1999
  logout();
1638
2000
  },
@@ -1789,18 +2151,20 @@ const MigrationBanner = () => {
1789
2151
  };
1790
2152
  //#endregion
1791
2153
  //#region src/components/modal/modals-container.tsx
1792
- const AddDriveModal$1 = lazy(() => import("./AddDriveModal-MMHlkJBJ.js").then((m) => ({ default: m.AddDriveModal })));
1793
- const ClearStorageModal = lazy(() => import("./ClearStorageModal--Kc9BLDH.js").then((m) => ({ default: m.ClearStorageModal })));
1794
- const CookiesPolicyModal = lazy(() => import("./CookiesPolicyModal-CkcUKPLb.js").then((m) => ({ default: m.CookiesPolicyModal })));
1795
- const CreateDocumentModal$1 = lazy(() => import("./CreateDocumentModal-CvsTh0HM.js").then((m) => ({ default: m.CreateDocumentModal })));
1796
- const DebugSettingsModal = lazy(() => import("./DebugSettingsModal-B7hFn_9k.js").then((m) => ({ default: m.DebugSettingsModal })));
1797
- const DeleteDriveModal = lazy(() => import("./DeleteDriveModal-DSTK8FYk.js").then((m) => ({ default: m.DeleteDriveModal })));
1798
- const DeleteItemModal = lazy(() => import("./DeleteItemModal-B2nJmjsP.js").then((m) => ({ default: m.DeleteItemModal })));
1799
- const DisclaimerModal = lazy(() => import("./DisclaimerModal-D5FO34u9.js").then((m) => ({ default: m.DisclaimerModal })));
1800
- const DriveSettingsModal$1 = lazy(() => import("./DriveSettingsModal-kR3hQnh4.js").then((m) => ({ default: m.DriveSettingsModal })));
1801
- const DownloadDocumentWithErrorsModal = lazy(() => import("./DownloadDocumentWithErrorsModal-tEr3bbtN.js").then((m) => ({ default: m.DownloadDocumentWithErrorsModal })));
1802
- const SettingsModal$1 = lazy(() => import("./SettingsModal-5UjMFrlr.js").then((m) => ({ default: m.SettingsModal })));
1803
- const UpgradeDriveModal = lazy(() => import("./UpgradeDriveModal-BZGSE9_r.js").then((m) => ({ default: m.UpgradeDriveModal })));
2154
+ const AddDriveModal$1 = lazy(() => import("./AddDriveModal-Bw0YuxZg.js").then((m) => ({ default: m.AddDriveModal })));
2155
+ const ClearStorageModal = lazy(() => import("./ClearStorageModal-DDzOvG6T.js").then((m) => ({ default: m.ClearStorageModal })));
2156
+ const CookiesPolicyModal = lazy(() => import("./CookiesPolicyModal-CQ-zHJdw.js").then((m) => ({ default: m.CookiesPolicyModal })));
2157
+ const CreateDocumentModal$1 = lazy(() => import("./CreateDocumentModal-NNi4p6EI.js").then((m) => ({ default: m.CreateDocumentModal })));
2158
+ const DebugSettingsModal = lazy(() => import("./DebugSettingsModal-k1l_X-wO.js").then((m) => ({ default: m.DebugSettingsModal })));
2159
+ const DeleteDriveModal = lazy(() => import("./DeleteDriveModal-C7fnXMsR.js").then((m) => ({ default: m.DeleteDriveModal })));
2160
+ const DeleteItemModal = lazy(() => import("./DeleteItemModal-BK_Y8Thj.js").then((m) => ({ default: m.DeleteItemModal })));
2161
+ const DisclaimerModal = lazy(() => import("./DisclaimerModal-DJPHCnFY.js").then((m) => ({ default: m.DisclaimerModal })));
2162
+ const DriveSettingsModal$1 = lazy(() => import("./DriveSettingsModal-7OKx8foy.js").then((m) => ({ default: m.DriveSettingsModal })));
2163
+ const DownloadDocumentWithErrorsModal = lazy(() => import("./DownloadDocumentWithErrorsModal-sWu46HVB.js").then((m) => ({ default: m.DownloadDocumentWithErrorsModal })));
2164
+ const DocumentVersionUnsupportedModal = lazy(() => import("./DocumentVersionUnsupportedModal-tBHLK6b1.js").then((m) => ({ default: m.DocumentVersionUnsupportedModal })));
2165
+ const ConfirmDocumentUpgradeModal = lazy(() => import("./ConfirmDocumentUpgradeModal-9AaaQJTs.js").then((m) => ({ default: m.ConfirmDocumentUpgradeModal })));
2166
+ const SettingsModal$1 = lazy(() => import("./SettingsModal-CAKQhsAi.js").then((m) => ({ default: m.SettingsModal })));
2167
+ const UpgradeDriveModal = lazy(() => import("./UpgradeDriveModal-wo5oO9mg.js").then((m) => ({ default: m.UpgradeDriveModal })));
1804
2168
  const modalComponents = {
1805
2169
  addDrive: AddDriveModal$1,
1806
2170
  clearStorage: ClearStorageModal,
@@ -1812,11 +2176,15 @@ const modalComponents = {
1812
2176
  disclaimer: DisclaimerModal,
1813
2177
  driveSettings: DriveSettingsModal$1,
1814
2178
  downloadDocumentWithErrors: DownloadDocumentWithErrorsModal,
1815
- inspector: lazy(() => import("./InspectorModal-DO7xAv0e.js").then((m) => ({ default: m.InspectorModal }))),
2179
+ documentVersionUnsupported: DocumentVersionUnsupportedModal,
2180
+ confirmDocumentUpgrade: ConfirmDocumentUpgradeModal,
2181
+ inspector: lazy(() => import("./InspectorModal-DoIShIZU.js").then((m) => ({ default: m.InspectorModal }))),
1816
2182
  settings: SettingsModal$1,
1817
2183
  upgradeDrive: UpgradeDriveModal,
1818
- missingPackage: lazy(() => import("./MissingPackageModal-BQcCQbOn.js").then((m) => ({ default: m.ConnectMissingPackageModal }))),
1819
- driveAuthRequired: lazy(() => import("./DriveAuthRequiredModal-BA2vS3oF.js").then((m) => ({ default: m.DriveAuthRequiredModal })))
2184
+ missingPackage: lazy(() => import("./MissingPackageModal-DyP2-Ojb.js").then((m) => ({ default: m.ConnectMissingPackageModal }))),
2185
+ driveAuthRequired: lazy(() => import("./DriveAuthRequiredModal-D3IPAst0.js").then((m) => ({ default: m.DriveAuthRequiredModal }))),
2186
+ openFileDocuments: lazy(() => import("./OpenFileDocumentsModal-DH6sfJwe.js").then((m) => ({ default: m.OpenFileDocumentsModal }))),
2187
+ login: lazy(() => import("./LoginModal-Cd2wGgG4.js").then((m) => ({ default: m.LoginModal })))
1820
2188
  };
1821
2189
  const ModalsContainer = lazy(() => {
1822
2190
  return Promise.resolve({ default: () => {
@@ -1856,7 +2224,7 @@ const ServiceWorkerUpdatePrompt = () => {
1856
2224
  //#endregion
1857
2225
  //#region src/components/app-loader.tsx
1858
2226
  const AppLoader = (props) => {
1859
- const Load = lazy(() => import("./load-BCpNI6yz.js").then((m) => m.loadComponent(props.localPackage)));
2227
+ const Load = lazy(() => import("./load-2EH2_hXZ.js").then((m) => m.loadComponent(props.localPackage)));
1860
2228
  return /* @__PURE__ */ jsx(StrictMode, { children: /* @__PURE__ */ jsxs(ErrorBoundary$1, {
1861
2229
  fallbackRender: (props) => /* @__PURE__ */ jsx(AppSkeleton, { children: /* @__PURE__ */ jsx(DetailedFallback, { ...props }) }),
1862
2230
  resetKeys: [props.localPackage],
@@ -1885,7 +2253,7 @@ const AppLoader = (props) => {
1885
2253
  }) });
1886
2254
  };
1887
2255
  //#endregion
1888
- export { DocumentEditor as a, App as c, DocumentEditorContainer as d, OpenPanel as f, Root as i, AppContainer as l, AppSkeleton as m, Sidebar as n, DriveIcon as o, Analytics as p, Router as r, CookieBanner$1 as s, AppLoader as t, EditorLoader as u };
2256
+ export { getPendingImportFiles as _, DocumentEditor as a, App as c, DocumentEditorContainer as d, OpenPanel as f, clearPendingImportFiles as g, runOpenFileImports as h, Root as i, AppContainer as l, AppSkeleton as m, Sidebar as n, DriveIcon as o, Analytics as p, Router as r, CookieBanner$1 as s, AppLoader as t, EditorLoader as u, pendingFileKey as v, subscribePendingImportFiles as y };
1889
2257
 
1890
- //# sourceMappingURL=app-loader-C1rnoBbl.js.map
1891
- //# debugId=dc8c4b13-0dd6-57d4-8c3f-246cd0c114f4
2258
+ //# sourceMappingURL=app-loader-0RTyMrTQ.js.map
2259
+ //# debugId=547308c5-f3db-5bd3-a82b-2dfd3301067d