@powerhousedao/connect 6.2.2-dev.7 → 6.2.2-dev.70
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.
- package/assets/document-icon-192x192.png +0 -0
- package/assets/document-icon-512x512.png +0 -0
- package/assets/pwa-192x192.png +0 -0
- package/assets/pwa-512x512-maskable.png +0 -0
- package/assets/pwa-512x512.png +0 -0
- package/dist/{AddDriveModal-MMHlkJBJ.js → AddDriveModal-Bw0YuxZg.js} +5 -5
- package/dist/AddDriveModal-Bw0YuxZg.js.map +1 -0
- package/dist/{ClearStorageModal-BxOW6Sr6.js → ClearStorageModal-sv_RLIBW.js} +4 -4
- package/dist/{ClearStorageModal-BxOW6Sr6.js.map → ClearStorageModal-sv_RLIBW.js.map} +1 -1
- package/dist/ConfirmDocumentUpgradeModal-9AaaQJTs.js +114 -0
- package/dist/ConfirmDocumentUpgradeModal-9AaaQJTs.js.map +1 -0
- package/dist/{CookiesPolicyModal-CkcUKPLb.js → CookiesPolicyModal-CQ-zHJdw.js} +3 -3
- package/dist/{CookiesPolicyModal-CkcUKPLb.js.map → CookiesPolicyModal-CQ-zHJdw.js.map} +1 -1
- package/dist/{CreateDocumentModal-CvsTh0HM.js → CreateDocumentModal-NNi4p6EI.js} +7 -5
- package/dist/CreateDocumentModal-NNi4p6EI.js.map +1 -0
- package/dist/{DebugSettingsModal-BGB0gcLr.js → DebugSettingsModal-N6_S1I93.js} +6 -6
- package/dist/{DebugSettingsModal-BGB0gcLr.js.map → DebugSettingsModal-N6_S1I93.js.map} +1 -1
- package/dist/{DeleteDriveModal-DSTK8FYk.js → DeleteDriveModal-C7fnXMsR.js} +4 -4
- package/dist/{DeleteDriveModal-DSTK8FYk.js.map → DeleteDriveModal-C7fnXMsR.js.map} +1 -1
- package/dist/{DeleteItemModal-B2nJmjsP.js → DeleteItemModal-BK_Y8Thj.js} +4 -4
- package/dist/{DeleteItemModal-B2nJmjsP.js.map → DeleteItemModal-BK_Y8Thj.js.map} +1 -1
- package/dist/{DisclaimerModal-D5FO34u9.js → DisclaimerModal-DJPHCnFY.js} +3 -3
- package/dist/{DisclaimerModal-D5FO34u9.js.map → DisclaimerModal-DJPHCnFY.js.map} +1 -1
- package/dist/DocumentVersionUnsupportedModal-tBHLK6b1.js +32 -0
- package/dist/DocumentVersionUnsupportedModal-tBHLK6b1.js.map +1 -0
- package/dist/{DownloadDocumentWithErrorsModal-tEr3bbtN.js → DownloadDocumentWithErrorsModal-sWu46HVB.js} +3 -3
- package/dist/{DownloadDocumentWithErrorsModal-tEr3bbtN.js.map → DownloadDocumentWithErrorsModal-sWu46HVB.js.map} +1 -1
- package/dist/DriveAuthRequiredModal-D3IPAst0.js +36 -0
- package/dist/DriveAuthRequiredModal-D3IPAst0.js.map +1 -0
- package/dist/{DriveSettingsModal-kR3hQnh4.js → DriveSettingsModal-7OKx8foy.js} +3 -3
- package/dist/{DriveSettingsModal-kR3hQnh4.js.map → DriveSettingsModal-7OKx8foy.js.map} +1 -1
- package/dist/{InspectorModal-C8APjWYF.js → InspectorModal-DT_TY0EA.js} +6 -6
- package/dist/{InspectorModal-C8APjWYF.js.map → InspectorModal-DT_TY0EA.js.map} +1 -1
- package/dist/LoginModal-Cd2wGgG4.js +75 -0
- package/dist/LoginModal-Cd2wGgG4.js.map +1 -0
- package/dist/{MissingPackageModal-BQcCQbOn.js → MissingPackageModal-DyP2-Ojb.js} +18 -6
- package/dist/MissingPackageModal-DyP2-Ojb.js.map +1 -0
- package/dist/OpenFileDocumentsModal-CnwqIFlk.js +311 -0
- package/dist/OpenFileDocumentsModal-CnwqIFlk.js.map +1 -0
- package/dist/{SettingsModal-BFck2YNG.js → SettingsModal-CdH7gYfl.js} +26 -13
- package/dist/SettingsModal-CdH7gYfl.js.map +1 -0
- package/dist/{UpgradeDriveModal-BZGSE9_r.js → UpgradeDriveModal-wo5oO9mg.js} +3 -3
- package/dist/{UpgradeDriveModal-BZGSE9_r.js.map → UpgradeDriveModal-wo5oO9mg.js.map} +1 -1
- package/dist/app-loader-DRcaakT5.js +4 -0
- package/dist/{app-loader-BI9LbEnT.js → app-loader-DZjWOssg.js} +458 -89
- package/dist/app-loader-DZjWOssg.js.map +1 -0
- package/dist/{build-info-B8h78xbQ.js → build-info-DkBYoE00.js} +5 -5
- package/dist/{build-info-B8h78xbQ.js.map → build-info-DkBYoE00.js.map} +1 -1
- package/dist/components-DkoZFIlp.js +5 -0
- package/dist/{connect.config-vgUeFoNp.js → connect.config-C-b_Yhd6.js} +9 -4
- package/dist/connect.config-C-b_Yhd6.js.map +1 -0
- package/dist/{connection-state-DO_2lAEJ.js → connection-state-KCa1yljA.js} +4 -4
- package/dist/{connection-state-DO_2lAEJ.js.map → connection-state-KCa1yljA.js.map} +1 -1
- package/dist/{load-_dpLo8DZ.js → load-YL5iNy62.js} +10 -10
- package/dist/{load-_dpLo8DZ.js.map → load-YL5iNy62.js.map} +1 -1
- package/dist/main.js +1 -1
- package/dist/{package-B9IyLCZE.js → package-DpvCqyYB.js} +10 -5
- package/dist/package-DpvCqyYB.js.map +1 -0
- package/dist/{pglite-seed-z3B1JA38.js → pglite-seed-DRXPe7p-.js} +4 -4
- package/dist/{pglite-seed-z3B1JA38.js.map → pglite-seed-DRXPe7p-.js.map} +1 -1
- package/dist/pwa-manifest-link-CG8UajMz.js +34 -0
- package/dist/pwa-manifest-link-CG8UajMz.js.map +1 -0
- package/dist/{reactor-DpVQKcX7.js → reactor-BgpVxD7A.js} +179 -40
- package/dist/reactor-BgpVxD7A.js.map +1 -0
- package/dist/reactor.worker.js +11 -6
- package/dist/reactor.worker.js.map +1 -1
- package/dist/{registerServiceWorker-nJIc0yEY.js → registerServiceWorker-Bn1KWmk0.js} +6 -4
- package/dist/registerServiceWorker-Bn1KWmk0.js.map +1 -0
- package/dist/{reload-connect-toast-D1Iqw9E_.js → reload-connect-toast-DDQEupCN.js} +23 -5
- package/dist/{reload-connect-toast-D1Iqw9E_.js.map → reload-connect-toast-DDQEupCN.js.map} +1 -1
- package/dist/start-connect.js +1 -1
- package/dist/style.css +100 -7
- package/dist/{toast-4t-VimvD.js → toast-CO6ChlzE.js} +8 -5
- package/dist/toast-CO6ChlzE.js.map +1 -0
- package/dist/use-renown-login-BtGljnB4.js +52 -0
- package/dist/use-renown-login-BtGljnB4.js.map +1 -0
- package/dist/useRegistryPackages-DMhCvTWq.js +314 -0
- package/dist/useRegistryPackages-DMhCvTWq.js.map +1 -0
- package/package.json +18 -13
- package/dist/AddDriveModal-MMHlkJBJ.js.map +0 -1
- package/dist/CreateDocumentModal-CvsTh0HM.js.map +0 -1
- package/dist/DriveAuthRequiredModal-BA2vS3oF.js +0 -40
- package/dist/DriveAuthRequiredModal-BA2vS3oF.js.map +0 -1
- package/dist/MissingPackageModal-BQcCQbOn.js.map +0 -1
- package/dist/SettingsModal-BFck2YNG.js.map +0 -1
- package/dist/app-loader-BAjPPbXx.js +0 -4
- package/dist/app-loader-BI9LbEnT.js.map +0 -1
- package/dist/components-D5-Rnhml.js +0 -5
- package/dist/connect.config-vgUeFoNp.js.map +0 -1
- package/dist/package-B9IyLCZE.js.map +0 -1
- package/dist/reactor-DpVQKcX7.js.map +0 -1
- package/dist/registerServiceWorker-nJIc0yEY.js.map +0 -1
- package/dist/toast-4t-VimvD.js.map +0 -1
- package/dist/useRegistryPackages-BaYtekjQ.js +0 -179
- 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]="
|
|
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]="b1f6c970-f278-56fc-abed-561f112e55d0")}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-
|
|
7
|
-
import { a as defaultPHDocumentEditorConfig, i as defaultPHAppConfig, r as connectConfig } from "./connect.config-
|
|
8
|
-
import { f as PRIMARY_IDB_NAMES, r as subscribeWorkerConnection, s as getCachedMigrationMajor, t as getWorkerConnectionStatus, u as subscribeMigrationMajor } from "./connection-state-
|
|
9
|
-
import { n as serviceWorkerManager, r as subscribeServiceWorkerUpdate, t as getServiceWorkerUpdateAvailable } from "./registerServiceWorker-
|
|
10
|
-
import { n as toast, t as ToastContainer } from "./toast-
|
|
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,
|
|
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__ */
|
|
1112
|
-
className: "
|
|
1113
|
-
children:
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
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,88 @@ 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
|
+
chain: chains?.[0]
|
|
1496
|
+
})));
|
|
1497
|
+
}
|
|
1498
|
+
if (mock) descriptors.push(...describe("mock", () => mockAdapter({
|
|
1499
|
+
...mock,
|
|
1500
|
+
methods: mock.methods
|
|
1501
|
+
})));
|
|
1502
|
+
return descriptors;
|
|
1503
|
+
}
|
|
1504
|
+
//#endregion
|
|
1505
|
+
//#region src/components/renown-wallet-providers.tsx
|
|
1506
|
+
function resolveColor(expr, fallback) {
|
|
1507
|
+
if (typeof document === "undefined") return fallback;
|
|
1508
|
+
const probe = document.createElement("span");
|
|
1509
|
+
probe.style.color = fallback;
|
|
1510
|
+
probe.style.color = expr;
|
|
1511
|
+
probe.style.display = "none";
|
|
1512
|
+
document.body.appendChild(probe);
|
|
1513
|
+
const resolved = getComputedStyle(probe).color;
|
|
1514
|
+
probe.remove();
|
|
1515
|
+
return resolved || fallback;
|
|
1516
|
+
}
|
|
1517
|
+
function RenownWalletProviders({ children }) {
|
|
1518
|
+
const config = getRuntimeConfig().connect.renown?.adapters;
|
|
1519
|
+
const chainId = getRuntimeConfig().connect.renown?.chainId;
|
|
1520
|
+
const { theme } = useTheme();
|
|
1521
|
+
const adapters = useMemo(() => configToDescriptors(config, chainId), [config, chainId]);
|
|
1522
|
+
const walletTheme = useMemo(() => adapters.length > 0 ? {
|
|
1523
|
+
mode: theme,
|
|
1524
|
+
accentColor: resolveColor("var(--primary)", "#0084ff"),
|
|
1525
|
+
accentColorForeground: resolveColor("var(--primary-foreground)", "#ffffff")
|
|
1526
|
+
} : void 0, [theme, adapters]);
|
|
1527
|
+
if (adapters.length === 0) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
1528
|
+
return /* @__PURE__ */ jsx(RenownWalletProvider, {
|
|
1529
|
+
adapters,
|
|
1530
|
+
theme: walletTheme,
|
|
1531
|
+
children
|
|
1532
|
+
});
|
|
1533
|
+
}
|
|
1534
|
+
//#endregion
|
|
1236
1535
|
//#region src/components/app.tsx
|
|
1237
1536
|
const App = () => {
|
|
1238
1537
|
useTheme();
|
|
@@ -1258,14 +1557,18 @@ const App = () => {
|
|
|
1258
1557
|
else if (connectConfig.offline) serviceWorkerManager.registerServiceWorker(false);
|
|
1259
1558
|
else serviceWorkerManager.unregisterAll();
|
|
1260
1559
|
}, []);
|
|
1261
|
-
|
|
1560
|
+
useEffect(() => {
|
|
1561
|
+
initLaunchQueueFileHandling();
|
|
1562
|
+
}, []);
|
|
1563
|
+
return /* @__PURE__ */ jsx(SentryProvider, { children: /* @__PURE__ */ jsxs(RenownWalletProviders, { children: [
|
|
1262
1564
|
/* @__PURE__ */ jsx(ToastContainer, { position: "bottom-right" }),
|
|
1263
1565
|
/* @__PURE__ */ jsx(MissingModelBanner, {}),
|
|
1264
1566
|
/* @__PURE__ */ jsx(Router, {}),
|
|
1567
|
+
/* @__PURE__ */ jsx(OpenFileUploadList, {}),
|
|
1265
1568
|
/* @__PURE__ */ jsx(PackageInstallPrompt, {}),
|
|
1266
1569
|
/* @__PURE__ */ jsx(Analytics, {}),
|
|
1267
1570
|
/* @__PURE__ */ jsx(OpenPanel, {})
|
|
1268
|
-
] });
|
|
1571
|
+
] }) });
|
|
1269
1572
|
};
|
|
1270
1573
|
//#endregion
|
|
1271
1574
|
//#region src/components/cookie-banner.tsx
|
|
@@ -1350,16 +1653,56 @@ function DriveIcon({ drive }) {
|
|
|
1350
1653
|
});
|
|
1351
1654
|
}
|
|
1352
1655
|
//#endregion
|
|
1656
|
+
//#region src/components/document-upgrade-toast.tsx
|
|
1657
|
+
const DocumentUpgradeToast = ({ documentId }) => {
|
|
1658
|
+
const { t } = useTranslation();
|
|
1659
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
|
|
1660
|
+
className: "font-medium",
|
|
1661
|
+
children: t("notifications.documentUpgradeAvailable")
|
|
1662
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
1663
|
+
onClick: () => {
|
|
1664
|
+
showPHModal({
|
|
1665
|
+
type: "confirmDocumentUpgrade",
|
|
1666
|
+
documentId
|
|
1667
|
+
});
|
|
1668
|
+
},
|
|
1669
|
+
className: "underline decoration-solid underline-offset-2",
|
|
1670
|
+
children: t("common.updateDocument")
|
|
1671
|
+
})] });
|
|
1672
|
+
};
|
|
1673
|
+
//#endregion
|
|
1353
1674
|
//#region src/components/editors.tsx
|
|
1354
|
-
function EditorError({
|
|
1675
|
+
function EditorError({ title, children }) {
|
|
1355
1676
|
return /* @__PURE__ */ jsx("div", {
|
|
1356
|
-
className: "flex size-full items-center justify-center",
|
|
1357
|
-
children: /* @__PURE__ */
|
|
1358
|
-
className: "
|
|
1359
|
-
children:
|
|
1677
|
+
className: "flex size-full items-center justify-center p-6",
|
|
1678
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1679
|
+
className: "w-full max-w-lg rounded-lg border border-border bg-card p-6 text-foreground shadow-sm",
|
|
1680
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1681
|
+
className: "mb-3 flex items-center gap-2",
|
|
1682
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
1683
|
+
name: "Error",
|
|
1684
|
+
className: "size-5 shrink-0 text-destructive"
|
|
1685
|
+
}), /* @__PURE__ */ jsx("h3", {
|
|
1686
|
+
className: "min-w-0 text-lg font-semibold wrap-break-word text-foreground",
|
|
1687
|
+
children: title
|
|
1688
|
+
})]
|
|
1689
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1690
|
+
className: "wrap-break-word",
|
|
1691
|
+
children
|
|
1692
|
+
})]
|
|
1360
1693
|
})
|
|
1361
1694
|
});
|
|
1362
1695
|
}
|
|
1696
|
+
function OpenPackageManagerButton() {
|
|
1697
|
+
return /* @__PURE__ */ jsx(PowerhouseButton, {
|
|
1698
|
+
className: "px-3 py-1.5 text-base font-medium",
|
|
1699
|
+
onClick: () => {
|
|
1700
|
+
showPHModal({ type: "settings" });
|
|
1701
|
+
},
|
|
1702
|
+
type: "button",
|
|
1703
|
+
children: "Open package manager"
|
|
1704
|
+
});
|
|
1705
|
+
}
|
|
1363
1706
|
const DocumentEditor = (props) => {
|
|
1364
1707
|
const { document: initialDocument } = props;
|
|
1365
1708
|
const selectedTimelineItem = useSelectedTimelineItem();
|
|
@@ -1379,6 +1722,21 @@ const DocumentEditor = (props) => {
|
|
|
1379
1722
|
const preferredEditorModule = useEditorModuleById(preferredEditor);
|
|
1380
1723
|
const fallbackEditorModule = useFallbackEditorModule(documentType);
|
|
1381
1724
|
const editorModule = preferredEditorModule ?? fallbackEditorModule;
|
|
1725
|
+
const versionStatus = useDocumentVersionStatus(document ?? void 0);
|
|
1726
|
+
const versionStatusKind = versionStatus?.kind;
|
|
1727
|
+
const upgradeAvailable = versionStatus?.kind === "upgrade-available" && versionStatus.canUpgrade;
|
|
1728
|
+
useEffect(() => {
|
|
1729
|
+
if (upgradeAvailable && documentId) toast(createElement(DocumentUpgradeToast, { documentId }), {
|
|
1730
|
+
type: "connect-warning",
|
|
1731
|
+
toastId: `outdated-document-${documentId}`,
|
|
1732
|
+
autoClose: false
|
|
1733
|
+
});
|
|
1734
|
+
else if (versionStatusKind && versionStatusKind !== "upgrade-available" && documentId) dismissToast(`outdated-document-${documentId}`);
|
|
1735
|
+
}, [
|
|
1736
|
+
upgradeAvailable,
|
|
1737
|
+
versionStatusKind,
|
|
1738
|
+
documentId
|
|
1739
|
+
]);
|
|
1382
1740
|
const vetraPackages = useVetraPackages();
|
|
1383
1741
|
const packageManager = useVetraPackageManager();
|
|
1384
1742
|
const owningPackageName = editorModule ? vetraPackages.find((pkg) => pkg.editors.includes(editorModule))?.manifest.name : void 0;
|
|
@@ -1414,46 +1772,49 @@ const DocumentEditor = (props) => {
|
|
|
1414
1772
|
};
|
|
1415
1773
|
if (isLoadingEditor) return /* @__PURE__ */ jsx(EditorLoader, { message: "Loading editor" });
|
|
1416
1774
|
if (isLoadingDocument) return /* @__PURE__ */ jsx(EditorLoader, { message: "Loading document" });
|
|
1417
|
-
if (!documentModelModule) return /* @__PURE__ */
|
|
1418
|
-
|
|
1419
|
-
children: [/* @__PURE__ */ jsxs("p", {
|
|
1420
|
-
"
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
"
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1775
|
+
if (!documentModelModule) return /* @__PURE__ */ jsxs(EditorError, {
|
|
1776
|
+
title: "Document type not supported",
|
|
1777
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
1778
|
+
className: "mb-4 text-sm text-foreground",
|
|
1779
|
+
children: [
|
|
1780
|
+
"This document can't be opened because the \"",
|
|
1781
|
+
documentType,
|
|
1782
|
+
"\" document model isn't installed. Install the package that provides it to open the document."
|
|
1783
|
+
]
|
|
1784
|
+
}), /* @__PURE__ */ jsx(OpenPackageManagerButton, {})]
|
|
1785
|
+
});
|
|
1786
|
+
if (versionStatus?.kind === "unsupported") return /* @__PURE__ */ jsxs(EditorError, {
|
|
1787
|
+
title: "Document version not supported",
|
|
1788
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
1789
|
+
className: "mb-4 text-sm text-foreground",
|
|
1790
|
+
children: [
|
|
1791
|
+
"This document requires version ",
|
|
1792
|
+
versionStatus.documentVersion,
|
|
1793
|
+
" of the \"",
|
|
1794
|
+
documentType,
|
|
1795
|
+
"\" document model, but only version",
|
|
1796
|
+
versionStatus.availableVersions.length > 1 ? "s" : "",
|
|
1797
|
+
" ",
|
|
1798
|
+
versionStatus.availableVersions.join(", "),
|
|
1799
|
+
" ",
|
|
1800
|
+
versionStatus.availableVersions.length > 1 ? "are" : "is",
|
|
1801
|
+
" installed. Update the package that provides \"",
|
|
1802
|
+
documentType,
|
|
1803
|
+
"\" to open it."
|
|
1804
|
+
]
|
|
1805
|
+
}), /* @__PURE__ */ jsx(OpenPackageManagerButton, {})]
|
|
1806
|
+
});
|
|
1807
|
+
if (!editorModule) return /* @__PURE__ */ jsxs(EditorError, {
|
|
1808
|
+
title: "No editor available",
|
|
1809
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
1810
|
+
className: "mb-4 text-sm text-foreground",
|
|
1811
|
+
children: [
|
|
1812
|
+
"The \"",
|
|
1813
|
+
documentType,
|
|
1814
|
+
"\" document model is installed, but no editor for it was found. Install a package that provides an editor for this document type."
|
|
1815
|
+
]
|
|
1816
|
+
}), /* @__PURE__ */ jsx(OpenPackageManagerButton, {})]
|
|
1817
|
+
});
|
|
1457
1818
|
const EditorComponent = editorModule.Component;
|
|
1458
1819
|
return /* @__PURE__ */ jsx("div", {
|
|
1459
1820
|
className: "relative h-full",
|
|
@@ -1532,6 +1893,7 @@ function useDriveAuthGate() {
|
|
|
1532
1893
|
//#region src/pages/content.tsx
|
|
1533
1894
|
function Content() {
|
|
1534
1895
|
const { gate } = useDriveAuthGate();
|
|
1896
|
+
const openLogin = useOpenRenownLogin();
|
|
1535
1897
|
const [selectedDrive] = useSelectedDriveSafe();
|
|
1536
1898
|
const selectedFolder = useSelectedFolder();
|
|
1537
1899
|
const selectedDocumentId = useSelectedDocumentId();
|
|
@@ -1545,7 +1907,7 @@ function Content() {
|
|
|
1545
1907
|
className: "flex h-full items-center justify-center p-4",
|
|
1546
1908
|
children: /* @__PURE__ */ jsx(DriveAuthGate, {
|
|
1547
1909
|
mode: gate,
|
|
1548
|
-
onLogin:
|
|
1910
|
+
onLogin: openLogin,
|
|
1549
1911
|
onLogout: () => void logout()
|
|
1550
1912
|
})
|
|
1551
1913
|
}) : !selectedDocumentId && !selectedDrive && !selectedFolder ? /* @__PURE__ */ jsx(HomeScreenContainer, {}) : /* @__PURE__ */ jsx(AppContainer, {}) });
|
|
@@ -1613,6 +1975,7 @@ const Router = () => {
|
|
|
1613
1975
|
//#region src/components/sidebar.tsx
|
|
1614
1976
|
function Sidebar() {
|
|
1615
1977
|
const user = useUser();
|
|
1978
|
+
const openLogin = useOpenRenownLogin();
|
|
1616
1979
|
const drives = useDrives();
|
|
1617
1980
|
const isAddDriveEnabled = useIsAddDriveEnabled();
|
|
1618
1981
|
const [selectedDrive] = useSelectedDriveSafe();
|
|
@@ -1632,7 +1995,7 @@ function Sidebar() {
|
|
|
1632
1995
|
onClick: () => setSelectedDrive(void 0),
|
|
1633
1996
|
onClickSettings,
|
|
1634
1997
|
address: user?.address,
|
|
1635
|
-
onLogin:
|
|
1998
|
+
onLogin: openLogin,
|
|
1636
1999
|
onDisconnect: () => {
|
|
1637
2000
|
logout();
|
|
1638
2001
|
},
|
|
@@ -1789,18 +2152,20 @@ const MigrationBanner = () => {
|
|
|
1789
2152
|
};
|
|
1790
2153
|
//#endregion
|
|
1791
2154
|
//#region src/components/modal/modals-container.tsx
|
|
1792
|
-
const AddDriveModal$1 = lazy(() => import("./AddDriveModal-
|
|
1793
|
-
const ClearStorageModal = lazy(() => import("./ClearStorageModal-
|
|
1794
|
-
const CookiesPolicyModal = lazy(() => import("./CookiesPolicyModal-
|
|
1795
|
-
const CreateDocumentModal$1 = lazy(() => import("./CreateDocumentModal-
|
|
1796
|
-
const DebugSettingsModal = lazy(() => import("./DebugSettingsModal-
|
|
1797
|
-
const DeleteDriveModal = lazy(() => import("./DeleteDriveModal-
|
|
1798
|
-
const DeleteItemModal = lazy(() => import("./DeleteItemModal-
|
|
1799
|
-
const DisclaimerModal = lazy(() => import("./DisclaimerModal-
|
|
1800
|
-
const DriveSettingsModal$1 = lazy(() => import("./DriveSettingsModal-
|
|
1801
|
-
const DownloadDocumentWithErrorsModal = lazy(() => import("./DownloadDocumentWithErrorsModal-
|
|
1802
|
-
const
|
|
1803
|
-
const
|
|
2155
|
+
const AddDriveModal$1 = lazy(() => import("./AddDriveModal-Bw0YuxZg.js").then((m) => ({ default: m.AddDriveModal })));
|
|
2156
|
+
const ClearStorageModal = lazy(() => import("./ClearStorageModal-sv_RLIBW.js").then((m) => ({ default: m.ClearStorageModal })));
|
|
2157
|
+
const CookiesPolicyModal = lazy(() => import("./CookiesPolicyModal-CQ-zHJdw.js").then((m) => ({ default: m.CookiesPolicyModal })));
|
|
2158
|
+
const CreateDocumentModal$1 = lazy(() => import("./CreateDocumentModal-NNi4p6EI.js").then((m) => ({ default: m.CreateDocumentModal })));
|
|
2159
|
+
const DebugSettingsModal = lazy(() => import("./DebugSettingsModal-N6_S1I93.js").then((m) => ({ default: m.DebugSettingsModal })));
|
|
2160
|
+
const DeleteDriveModal = lazy(() => import("./DeleteDriveModal-C7fnXMsR.js").then((m) => ({ default: m.DeleteDriveModal })));
|
|
2161
|
+
const DeleteItemModal = lazy(() => import("./DeleteItemModal-BK_Y8Thj.js").then((m) => ({ default: m.DeleteItemModal })));
|
|
2162
|
+
const DisclaimerModal = lazy(() => import("./DisclaimerModal-DJPHCnFY.js").then((m) => ({ default: m.DisclaimerModal })));
|
|
2163
|
+
const DriveSettingsModal$1 = lazy(() => import("./DriveSettingsModal-7OKx8foy.js").then((m) => ({ default: m.DriveSettingsModal })));
|
|
2164
|
+
const DownloadDocumentWithErrorsModal = lazy(() => import("./DownloadDocumentWithErrorsModal-sWu46HVB.js").then((m) => ({ default: m.DownloadDocumentWithErrorsModal })));
|
|
2165
|
+
const DocumentVersionUnsupportedModal = lazy(() => import("./DocumentVersionUnsupportedModal-tBHLK6b1.js").then((m) => ({ default: m.DocumentVersionUnsupportedModal })));
|
|
2166
|
+
const ConfirmDocumentUpgradeModal = lazy(() => import("./ConfirmDocumentUpgradeModal-9AaaQJTs.js").then((m) => ({ default: m.ConfirmDocumentUpgradeModal })));
|
|
2167
|
+
const SettingsModal$1 = lazy(() => import("./SettingsModal-CdH7gYfl.js").then((m) => ({ default: m.SettingsModal })));
|
|
2168
|
+
const UpgradeDriveModal = lazy(() => import("./UpgradeDriveModal-wo5oO9mg.js").then((m) => ({ default: m.UpgradeDriveModal })));
|
|
1804
2169
|
const modalComponents = {
|
|
1805
2170
|
addDrive: AddDriveModal$1,
|
|
1806
2171
|
clearStorage: ClearStorageModal,
|
|
@@ -1812,11 +2177,15 @@ const modalComponents = {
|
|
|
1812
2177
|
disclaimer: DisclaimerModal,
|
|
1813
2178
|
driveSettings: DriveSettingsModal$1,
|
|
1814
2179
|
downloadDocumentWithErrors: DownloadDocumentWithErrorsModal,
|
|
1815
|
-
|
|
2180
|
+
documentVersionUnsupported: DocumentVersionUnsupportedModal,
|
|
2181
|
+
confirmDocumentUpgrade: ConfirmDocumentUpgradeModal,
|
|
2182
|
+
inspector: lazy(() => import("./InspectorModal-DT_TY0EA.js").then((m) => ({ default: m.InspectorModal }))),
|
|
1816
2183
|
settings: SettingsModal$1,
|
|
1817
2184
|
upgradeDrive: UpgradeDriveModal,
|
|
1818
|
-
missingPackage: lazy(() => import("./MissingPackageModal-
|
|
1819
|
-
driveAuthRequired: lazy(() => import("./DriveAuthRequiredModal-
|
|
2185
|
+
missingPackage: lazy(() => import("./MissingPackageModal-DyP2-Ojb.js").then((m) => ({ default: m.ConnectMissingPackageModal }))),
|
|
2186
|
+
driveAuthRequired: lazy(() => import("./DriveAuthRequiredModal-D3IPAst0.js").then((m) => ({ default: m.DriveAuthRequiredModal }))),
|
|
2187
|
+
openFileDocuments: lazy(() => import("./OpenFileDocumentsModal-CnwqIFlk.js").then((m) => ({ default: m.OpenFileDocumentsModal }))),
|
|
2188
|
+
login: lazy(() => import("./LoginModal-Cd2wGgG4.js").then((m) => ({ default: m.LoginModal })))
|
|
1820
2189
|
};
|
|
1821
2190
|
const ModalsContainer = lazy(() => {
|
|
1822
2191
|
return Promise.resolve({ default: () => {
|
|
@@ -1856,7 +2225,7 @@ const ServiceWorkerUpdatePrompt = () => {
|
|
|
1856
2225
|
//#endregion
|
|
1857
2226
|
//#region src/components/app-loader.tsx
|
|
1858
2227
|
const AppLoader = (props) => {
|
|
1859
|
-
const Load = lazy(() => import("./load-
|
|
2228
|
+
const Load = lazy(() => import("./load-YL5iNy62.js").then((m) => m.loadComponent(props.localPackage)));
|
|
1860
2229
|
return /* @__PURE__ */ jsx(StrictMode, { children: /* @__PURE__ */ jsxs(ErrorBoundary$1, {
|
|
1861
2230
|
fallbackRender: (props) => /* @__PURE__ */ jsx(AppSkeleton, { children: /* @__PURE__ */ jsx(DetailedFallback, { ...props }) }),
|
|
1862
2231
|
resetKeys: [props.localPackage],
|
|
@@ -1885,7 +2254,7 @@ const AppLoader = (props) => {
|
|
|
1885
2254
|
}) });
|
|
1886
2255
|
};
|
|
1887
2256
|
//#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 };
|
|
2257
|
+
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
2258
|
|
|
1890
|
-
//# sourceMappingURL=app-loader-
|
|
1891
|
-
//# debugId=
|
|
2259
|
+
//# sourceMappingURL=app-loader-DZjWOssg.js.map
|
|
2260
|
+
//# debugId=b1f6c970-f278-56fc-abed-561f112e55d0
|