@powerhousedao/connect 6.0.2-staging.8 → 6.1.0-dev.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.
- package/dist/{AddDriveModal-B9BPORvo.js → AddDriveModal-ZK9-BWMB.js} +3 -3
- package/dist/{AddDriveModal-B9BPORvo.js.map → AddDriveModal-ZK9-BWMB.js.map} +1 -1
- package/dist/{ClearStorageModal-K1H6NgT6.js → ClearStorageModal-BLr3sRfl.js} +4 -4
- package/dist/{ClearStorageModal-K1H6NgT6.js.map → ClearStorageModal-BLr3sRfl.js.map} +1 -1
- package/dist/{CookiesPolicyModal-CnVx2R_8.js → CookiesPolicyModal-DiXQV82b.js} +3 -3
- package/dist/{CookiesPolicyModal-CnVx2R_8.js.map → CookiesPolicyModal-DiXQV82b.js.map} +1 -1
- package/dist/{CreateDocumentModal-TtG7E62x.js → CreateDocumentModal-BhJh4nWt.js} +3 -3
- package/dist/{CreateDocumentModal-TtG7E62x.js.map → CreateDocumentModal-BhJh4nWt.js.map} +1 -1
- package/dist/{DebugSettingsModal-Bx-xJ3sz.js → DebugSettingsModal-nkZL0AFY.js} +6 -6
- package/dist/DebugSettingsModal-nkZL0AFY.js.map +1 -0
- package/dist/{DeleteDriveModal-Cb43NeNu.js → DeleteDriveModal-CbuIdjKY.js} +4 -4
- package/dist/{DeleteDriveModal-Cb43NeNu.js.map → DeleteDriveModal-CbuIdjKY.js.map} +1 -1
- package/dist/{DeleteItemModal-Brq4QKdd.js → DeleteItemModal-9ErYlauT.js} +3 -3
- package/dist/{DeleteItemModal-Brq4QKdd.js.map → DeleteItemModal-9ErYlauT.js.map} +1 -1
- package/dist/{DisclaimerModal-Dk6PpkZU.js → DisclaimerModal-CfDeiBz8.js} +3 -3
- package/dist/{DisclaimerModal-Dk6PpkZU.js.map → DisclaimerModal-CfDeiBz8.js.map} +1 -1
- package/dist/{DownloadDocumentWithErrorsModal-B8ZKi2Xy.js → DownloadDocumentWithErrorsModal-KZGWQ4J7.js} +3 -3
- package/dist/{DownloadDocumentWithErrorsModal-B8ZKi2Xy.js.map → DownloadDocumentWithErrorsModal-KZGWQ4J7.js.map} +1 -1
- package/dist/{DriveSettingsModal-Bnug5LXo.js → DriveSettingsModal-DEk05PS7.js} +3 -3
- package/dist/{DriveSettingsModal-Bnug5LXo.js.map → DriveSettingsModal-DEk05PS7.js.map} +1 -1
- package/dist/{InspectorModal-EDrjiXPs.js → InspectorModal-DrBnrYZl.js} +6 -6
- package/dist/{InspectorModal-EDrjiXPs.js.map → InspectorModal-DrBnrYZl.js.map} +1 -1
- package/dist/{MissingPackageModal-BfblPbd8.js → MissingPackageModal-CUdcDjSO.js} +5 -5
- package/dist/MissingPackageModal-CUdcDjSO.js.map +1 -0
- package/dist/{SettingsModal-VC8CffV6.js → SettingsModal-Do3GTReR.js} +6 -6
- package/dist/{SettingsModal-VC8CffV6.js.map → SettingsModal-Do3GTReR.js.map} +1 -1
- package/dist/{UpgradeDriveModal-CBLALaaQ.js → UpgradeDriveModal-BwI5E5k3.js} +3 -3
- package/dist/{UpgradeDriveModal-CBLALaaQ.js.map → UpgradeDriveModal-BwI5E5k3.js.map} +1 -1
- package/dist/{build-info-CHI729S8.js → build-info-HpD0_mze.js} +4 -4
- package/dist/{build-info-CHI729S8.js.map → build-info-HpD0_mze.js.map} +1 -1
- package/dist/{i18n-DLmohU39.js → i18n-4rfcgnb9.js} +3 -3
- package/dist/{i18n-DLmohU39.js.map → i18n-4rfcgnb9.js.map} +1 -1
- package/dist/{load-BVST7c3H.js → load-BoBY3jk8.js} +7 -7
- package/dist/{load-BVST7c3H.js.map → load-BoBY3jk8.js.map} +1 -1
- package/dist/main.js +1 -1
- package/dist/{package-CrVlJAwq.js → package-BYMjy1FR.js} +6 -6
- package/dist/package-BYMjy1FR.js.map +1 -0
- package/dist/packages.config-CiH8KJVN.js +32 -0
- package/dist/packages.config-CiH8KJVN.js.map +1 -0
- package/dist/{pglite-runtime-C1g-4Jxl.js → pglite-runtime-Btp8ZXVH.js} +3 -3
- package/dist/{pglite-runtime-C1g-4Jxl.js.map → pglite-runtime-Btp8ZXVH.js.map} +1 -1
- package/dist/{pglite-seed-BtXWFpHf.js → pglite-seed-b1mJUaip.js} +4 -4
- package/dist/{pglite-seed-BtXWFpHf.js.map → pglite-seed-b1mJUaip.js.map} +1 -1
- package/dist/{reactor-Nm3jOev1.js → reactor-CppbYt7w.js} +257 -36
- package/dist/reactor-CppbYt7w.js.map +1 -0
- package/dist/{registerServiceWorker-LI8_JXt3.js → registerServiceWorker-CMRF2LWE.js} +3 -3
- package/dist/{registerServiceWorker-LI8_JXt3.js.map → registerServiceWorker-CMRF2LWE.js.map} +1 -1
- package/dist/{sidebar-DAtgbNId.js → sidebar-dOJMIiCv.js} +181 -257
- package/dist/sidebar-dOJMIiCv.js.map +1 -0
- package/dist/start-connect.js +1 -1
- package/dist/style.css +624 -346
- package/dist/{useRegistryPackages-BOX4NMAb.js → useRegistryPackages-PUiMxd73.js} +25 -10
- package/dist/useRegistryPackages-PUiMxd73.js.map +1 -0
- package/package.json +12 -12
- package/public/ph-packages.json +2 -1
- package/dist/DebugSettingsModal-Bx-xJ3sz.js.map +0 -1
- package/dist/MissingPackageModal-BfblPbd8.js.map +0 -1
- package/dist/package-CrVlJAwq.js.map +0 -1
- package/dist/reactor-Nm3jOev1.js.map +0 -1
- package/dist/sidebar-DAtgbNId.js.map +0 -1
- package/dist/useRegistryPackages-BOX4NMAb.js.map +0 -1
package/dist/{registerServiceWorker-LI8_JXt3.js.map → registerServiceWorker-CMRF2LWE.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerServiceWorker-
|
|
1
|
+
{"version":3,"file":"registerServiceWorker-CMRF2LWE.js","sources":["../src/utils/registerServiceWorker.ts"],"sourcesContent":["import { connectConfig } from \"@powerhousedao/connect/config\";\n\nconst basePath = connectConfig.routerBasename;\n\nconst serviceWorkerScriptPath = [basePath, \"service-worker.js\"]\n .join(\"/\")\n .replace(/\\/{2,}/gm, \"/\");\n\nclass ServiceWorkerManager {\n ready = false;\n debug = false;\n registration: ServiceWorkerRegistration | null = null;\n\n constructor(debug = false) {\n this.debug = debug;\n }\n\n setDebug(debug: boolean) {\n this.debug = debug;\n }\n\n #handleServiceWorkerMessage(\n event: MessageEvent<{\n type: \"NEW_VERSION_AVAILABLE\";\n version: string;\n requiresHardRefresh: boolean;\n }>,\n ) {\n if (this.debug) {\n console.log(\"ServiceWorker message: \", event);\n }\n const message = \"type\" in event.data ? event : null;\n switch (message?.data.type) {\n case \"NEW_VERSION_AVAILABLE\": {\n if (message.data.version === connectConfig.appVersion) {\n return;\n }\n if (message.data.requiresHardRefresh) {\n if (this.debug) {\n console.log(\"New version available\");\n }\n\n window.location.reload(); // Reload the page to load the new version\n }\n break;\n }\n default: {\n console.warn(\"Unhandled message:\", message);\n break;\n }\n }\n }\n\n #handleServiceWorker(registration: ServiceWorkerRegistration) {\n {\n // Listen for messages from the service worker\n if (this.debug) {\n console.log(\"ServiceWorker registered: \", registration);\n }\n\n navigator.serviceWorker.addEventListener(\n \"message\",\n this.#handleServiceWorkerMessage.bind(this),\n );\n\n this.registration = registration;\n this.ready = true;\n }\n }\n\n async #register() {\n try {\n // checks if there is a service worker installed already and calls\n // its the update method to check if there is a new version available\n const existingRegistration =\n await navigator.serviceWorker.getRegistration();\n if (existingRegistration) {\n await existingRegistration.update();\n this.#handleServiceWorker(existingRegistration);\n }\n\n // if no service worker is installed then registers the service worker\n else {\n const registration = await navigator.serviceWorker.register(\n serviceWorkerScriptPath,\n );\n this.#handleServiceWorker(registration);\n\n registration.addEventListener(\"updatefound\", () => {\n this.#handleServiceWorker(registration);\n });\n }\n\n // calls the update on an interval to force\n // the browser to check for a new version\n const intervalId = setInterval(async () => {\n const existingRegistration =\n await navigator.serviceWorker.getRegistration();\n if (existingRegistration) {\n await existingRegistration.update();\n } else {\n clearInterval(intervalId);\n this.registerServiceWorker();\n }\n }, connectConfig.appVersionCheckInterval);\n } catch (error) {\n console.error(\"ServiceWorker registration failed: \", error);\n }\n }\n\n registerServiceWorker(debug = false) {\n this.debug = debug;\n\n if (!(\"serviceWorker\" in navigator)) {\n console.warn(\"Service Worker not available\");\n return;\n }\n window.addEventListener(\"load\", () => {\n this.#register().catch(console.error);\n });\n }\n}\n\nexport const serviceWorkerManager = new ServiceWorkerManager();\n"],"names":["#handleServiceWorkerMessage","#register","#handleServiceWorker"],"mappings":";;;;AAIA,MAAM,0BAA0B,CAFf,cAAc,gBAEY,oBAAoB,CAC5D,KAAK,IAAI,CACT,QAAQ,YAAY,IAAI;AAE3B,IAAM,uBAAN,MAA2B;CACzB,QAAQ;CACR,QAAQ;CACR,eAAiD;CAEjD,YAAY,QAAQ,OAAO;AACzB,OAAK,QAAQ;;CAGf,SAAS,OAAgB;AACvB,OAAK,QAAQ;;CAGf,4BACE,OAKA;AACA,MAAI,KAAK,MACP,SAAQ,IAAI,2BAA2B,MAAM;EAE/C,MAAM,UAAU,UAAU,MAAM,OAAO,QAAQ;AAC/C,UAAQ,SAAS,KAAK,MAAtB;GACE,KAAK;AACH,QAAI,QAAQ,KAAK,YAAY,cAAc,WACzC;AAEF,QAAI,QAAQ,KAAK,qBAAqB;AACpC,SAAI,KAAK,MACP,SAAQ,IAAI,wBAAwB;AAGtC,YAAO,SAAS,QAAQ;;AAE1B;GAEF;AACE,YAAQ,KAAK,sBAAsB,QAAQ;AAC3C;;;CAKN,qBAAqB,cAAyC;AAG1D,MAAI,KAAK,MACP,SAAQ,IAAI,8BAA8B,aAAa;AAGzD,YAAU,cAAc,iBACtB,WACA,MAAA,2BAAiC,KAAK,KAAK,CAC5C;AAED,OAAK,eAAe;AACpB,OAAK,QAAQ;;CAIjB,OAAA,WAAkB;AAChB,MAAI;GAGF,MAAM,uBACJ,MAAM,UAAU,cAAc,iBAAiB;AACjD,OAAI,sBAAsB;AACxB,UAAM,qBAAqB,QAAQ;AACnC,UAAA,oBAA0B,qBAAqB;UAI5C;IACH,MAAM,eAAe,MAAM,UAAU,cAAc,SACjD,wBACD;AACD,UAAA,oBAA0B,aAAa;AAEvC,iBAAa,iBAAiB,qBAAqB;AACjD,WAAA,oBAA0B,aAAa;MACvC;;GAKJ,MAAM,aAAa,YAAY,YAAY;IACzC,MAAM,uBACJ,MAAM,UAAU,cAAc,iBAAiB;AACjD,QAAI,qBACF,OAAM,qBAAqB,QAAQ;SAC9B;AACL,mBAAc,WAAW;AACzB,UAAK,uBAAuB;;MAE7B,cAAc,wBAAwB;WAClC,OAAO;AACd,WAAQ,MAAM,uCAAuC,MAAM;;;CAI/D,sBAAsB,QAAQ,OAAO;AACnC,OAAK,QAAQ;AAEb,MAAI,EAAE,mBAAmB,YAAY;AACnC,WAAQ,KAAK,+BAA+B;AAC5C;;AAEF,SAAO,iBAAiB,cAAc;AACpC,SAAA,UAAgB,CAAC,MAAM,QAAQ,MAAM;IACrC;;;AAIN,MAAa,uBAAuB,IAAI,sBAAsB","debug_id":"503d8e5c-e8ae-5b96-a93c-db27439a88d3"}
|
|
@@ -1,25 +1,24 @@
|
|
|
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]="88578c00-badb-59e1-ab57-190a6e1ea2c8")}catch(e){}}();
|
|
3
3
|
import { n as defaultPHAppConfig, r as defaultPHDocumentEditorConfig, t as connectConfig } from "./connect.config-Cuh0hj_Q.js";
|
|
4
4
|
import { n as toast, t as ToastContainer } from "./toast-DnODOv28.js";
|
|
5
|
-
import { t as i18n } from "./i18n-
|
|
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-
|
|
7
|
-
import { t as serviceWorkerManager } from "./registerServiceWorker-
|
|
8
|
-
import {
|
|
5
|
+
import { t as i18n } from "./i18n-4rfcgnb9.js";
|
|
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-CMRF2LWE.js";
|
|
8
|
+
import { driveCollectionId, getRevisionFromDate, logout, openRenown, setPHAppConfig, setPHDocumentEditorConfig, setRevisionHistoryVisible, setSelectedDrive, setSelectedNode, showPHModal, useAppModuleById, useDefaultAppModule, useDocumentById, useDocumentModelModuleById, useDocumentOperations, useDrives, useEditorModuleById, useFallbackEditorModule, useNodeParentFolderById, usePHModal, usePackageDiscoveryService, useRevisionHistoryVisible, useSelectedDocument, useSelectedDocumentId, useSelectedDrive, useSelectedDriveSafe, useSelectedFolder, useSelectedTimelineItem, useSyncList, 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 { Trans, useTranslation } from "react-i18next";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { Outlet, RouterProvider, createBrowserRouter, createRoutesFromChildren, matchRoutes, useLocation,
|
|
13
|
+
import { Outlet, RouterProvider, createBrowserRouter, createRoutesFromChildren, matchRoutes, useLocation, useNavigationType } from "react-router-dom";
|
|
14
14
|
import { useHotkeys } from "react-hotkeys-hook";
|
|
15
|
-
import { AnimatedLoader, ConnectSidebar, ConnectTooltipProvider, CookieBanner, DefaultEditorLoader, DropZoneWrapper, HomeScreen, HomeScreenAddDriveItem, HomeScreenItem, RevisionHistory, SidebarAddDriveItem, SidebarItem, useEns } from "@powerhousedao/design-system/connect";
|
|
15
|
+
import { AnimatedLoader, ConnectSidebar, ConnectTooltipProvider, CookieBanner, DefaultEditorLoader, DropZoneWrapper, HomeScreen, HomeScreenAddDriveItem, HomeScreenItem, PackageInstallModal, RevisionHistory, SidebarAddDriveItem, SidebarItem, useEns } from "@powerhousedao/design-system/connect";
|
|
16
16
|
import { GenericDriveExplorer } from "@powerhousedao/powerhouse-vetra-packages/editors";
|
|
17
|
-
import { Icon, PowerhouseButton } from "@powerhousedao/design-system";
|
|
17
|
+
import { Icon, Modal, PowerhouseButton } from "@powerhousedao/design-system";
|
|
18
18
|
import { ErrorBoundary } from "react-error-boundary";
|
|
19
19
|
import { PGlite } from "@electric-sql/pglite";
|
|
20
|
-
import {
|
|
20
|
+
import { twMerge } from "tailwind-merge";
|
|
21
21
|
import { redo, undo } from "@powerhousedao/shared/document-model";
|
|
22
|
-
import { gql, request } from "graphql-request";
|
|
23
22
|
//#region src/hooks/useAcceptedCookies.ts
|
|
24
23
|
const ACCEPTED_COOKIES_KEY_STORAGE = `${connectConfig.routerBasename}:acceptedCookies`;
|
|
25
24
|
const listeners$3 = /* @__PURE__ */ new Set();
|
|
@@ -81,6 +80,13 @@ const useCookieBanner = () => {
|
|
|
81
80
|
return [useSyncExternalStore(subscribe, getCookieBannerState, getCookieBannerState), setCookieBannerState];
|
|
82
81
|
};
|
|
83
82
|
//#endregion
|
|
83
|
+
//#region src/hooks/useFailedInstallations.ts
|
|
84
|
+
const emptyArray$1 = [];
|
|
85
|
+
function useFailedInstallations() {
|
|
86
|
+
const discoveryService = usePackageDiscoveryService();
|
|
87
|
+
return useSyncExternalStore((cb) => discoveryService?.subscribeFailed(cb) ?? (() => {}), () => discoveryService?.getFailedInstallations() ?? emptyArray$1);
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
84
90
|
//#region src/hooks/useInitSentry.ts
|
|
85
91
|
const logger$2 = childLogger(["sentry"]);
|
|
86
92
|
let clientStarted = false;
|
|
@@ -146,7 +152,15 @@ function useInitSentry() {
|
|
|
146
152
|
const emptyArray = [];
|
|
147
153
|
function usePendingInstallations() {
|
|
148
154
|
const discoveryService = usePackageDiscoveryService();
|
|
149
|
-
|
|
155
|
+
const cacheRef = useRef(emptyArray);
|
|
156
|
+
return useSyncExternalStore((cb) => discoveryService?.subscribePending(cb) ?? (() => {}), useCallback(() => {
|
|
157
|
+
if (!discoveryService) return emptyArray;
|
|
158
|
+
const next = discoveryService.getPendingInstallations() ?? emptyArray;
|
|
159
|
+
const prev = cacheRef.current;
|
|
160
|
+
if (next === prev || next.length === prev.length && next.every((p, i) => p === prev[i])) return prev;
|
|
161
|
+
cacheRef.current = next;
|
|
162
|
+
return next;
|
|
163
|
+
}, [discoveryService]));
|
|
150
164
|
}
|
|
151
165
|
//#endregion
|
|
152
166
|
//#region src/hooks/useUndoRedoShortcuts.ts
|
|
@@ -274,17 +288,17 @@ function DetailedFallback({ error, resetErrorBoundary }) {
|
|
|
274
288
|
errorDetails !== "{}" && /* @__PURE__ */ jsxs("details", {
|
|
275
289
|
className: "group",
|
|
276
290
|
children: [/* @__PURE__ */ jsx("summary", {
|
|
277
|
-
className: "cursor-pointer
|
|
291
|
+
className: "cursor-pointer text-sm font-medium text-gray-700 underline select-none hover:text-gray-700",
|
|
278
292
|
children: "Show details"
|
|
279
293
|
}), /* @__PURE__ */ jsx("pre", {
|
|
280
|
-
className: "mt-2 max-h-48 overflow-auto rounded bg-gray-100 p-3 text-xs",
|
|
294
|
+
className: "mt-2 max-h-48 overflow-auto rounded-sm bg-gray-100 p-3 text-xs",
|
|
281
295
|
children: errorDetails
|
|
282
296
|
})]
|
|
283
297
|
}),
|
|
284
298
|
/* @__PURE__ */ jsx(PowerhouseButton, {
|
|
285
299
|
type: "button",
|
|
286
300
|
onClick: resetErrorBoundary,
|
|
287
|
-
className: "
|
|
301
|
+
className: "mt-4 px-3 py-1.5 text-base font-medium",
|
|
288
302
|
children: "Try again"
|
|
289
303
|
})
|
|
290
304
|
]
|
|
@@ -837,14 +851,14 @@ const MigrationBanner = () => {
|
|
|
837
851
|
type: "button",
|
|
838
852
|
disabled: migrating,
|
|
839
853
|
onClick: handleMigrate,
|
|
840
|
-
className: "rounded bg-gray-900 px-3 py-1 text-sm font-medium text-white hover:bg-gray-800 disabled:opacity-50",
|
|
854
|
+
className: "rounded-sm bg-gray-900 px-3 py-1 text-sm font-medium text-white hover:bg-gray-800 disabled:opacity-50",
|
|
841
855
|
children: migrating ? "Migrating…" : "Migrate now"
|
|
842
856
|
}),
|
|
843
857
|
/* @__PURE__ */ jsx("button", {
|
|
844
858
|
type: "button",
|
|
845
859
|
disabled: migrating,
|
|
846
860
|
onClick: dismiss,
|
|
847
|
-
className: "rounded 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",
|
|
861
|
+
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",
|
|
848
862
|
children: "Dismiss"
|
|
849
863
|
})
|
|
850
864
|
]
|
|
@@ -853,18 +867,18 @@ const MigrationBanner = () => {
|
|
|
853
867
|
};
|
|
854
868
|
//#endregion
|
|
855
869
|
//#region src/components/modal/modals-container.tsx
|
|
856
|
-
const AddDriveModal$1 = lazy(() => import("./AddDriveModal-
|
|
857
|
-
const ClearStorageModal = lazy(() => import("./ClearStorageModal-
|
|
858
|
-
const CookiesPolicyModal = lazy(() => import("./CookiesPolicyModal-
|
|
859
|
-
const CreateDocumentModal$1 = lazy(() => import("./CreateDocumentModal-
|
|
860
|
-
const DebugSettingsModal = lazy(() => import("./DebugSettingsModal-
|
|
861
|
-
const DeleteDriveModal = lazy(() => import("./DeleteDriveModal-
|
|
862
|
-
const DeleteItemModal = lazy(() => import("./DeleteItemModal-
|
|
863
|
-
const DisclaimerModal = lazy(() => import("./DisclaimerModal-
|
|
864
|
-
const DriveSettingsModal$1 = lazy(() => import("./DriveSettingsModal-
|
|
865
|
-
const DownloadDocumentWithErrorsModal = lazy(() => import("./DownloadDocumentWithErrorsModal-
|
|
866
|
-
const SettingsModal$1 = lazy(() => import("./SettingsModal-
|
|
867
|
-
const UpgradeDriveModal = lazy(() => import("./UpgradeDriveModal-
|
|
870
|
+
const AddDriveModal$1 = lazy(() => import("./AddDriveModal-ZK9-BWMB.js").then((m) => ({ default: m.AddDriveModal })));
|
|
871
|
+
const ClearStorageModal = lazy(() => import("./ClearStorageModal-BLr3sRfl.js").then((m) => ({ default: m.ClearStorageModal })));
|
|
872
|
+
const CookiesPolicyModal = lazy(() => import("./CookiesPolicyModal-DiXQV82b.js").then((m) => ({ default: m.CookiesPolicyModal })));
|
|
873
|
+
const CreateDocumentModal$1 = lazy(() => import("./CreateDocumentModal-BhJh4nWt.js").then((m) => ({ default: m.CreateDocumentModal })));
|
|
874
|
+
const DebugSettingsModal = lazy(() => import("./DebugSettingsModal-nkZL0AFY.js").then((m) => ({ default: m.DebugSettingsModal })));
|
|
875
|
+
const DeleteDriveModal = lazy(() => import("./DeleteDriveModal-CbuIdjKY.js").then((m) => ({ default: m.DeleteDriveModal })));
|
|
876
|
+
const DeleteItemModal = lazy(() => import("./DeleteItemModal-9ErYlauT.js").then((m) => ({ default: m.DeleteItemModal })));
|
|
877
|
+
const DisclaimerModal = lazy(() => import("./DisclaimerModal-CfDeiBz8.js").then((m) => ({ default: m.DisclaimerModal })));
|
|
878
|
+
const DriveSettingsModal$1 = lazy(() => import("./DriveSettingsModal-DEk05PS7.js").then((m) => ({ default: m.DriveSettingsModal })));
|
|
879
|
+
const DownloadDocumentWithErrorsModal = lazy(() => import("./DownloadDocumentWithErrorsModal-KZGWQ4J7.js").then((m) => ({ default: m.DownloadDocumentWithErrorsModal })));
|
|
880
|
+
const SettingsModal$1 = lazy(() => import("./SettingsModal-Do3GTReR.js").then((m) => ({ default: m.SettingsModal })));
|
|
881
|
+
const UpgradeDriveModal = lazy(() => import("./UpgradeDriveModal-BwI5E5k3.js").then((m) => ({ default: m.UpgradeDriveModal })));
|
|
868
882
|
const modalComponents = {
|
|
869
883
|
addDrive: AddDriveModal$1,
|
|
870
884
|
clearStorage: ClearStorageModal,
|
|
@@ -876,10 +890,10 @@ const modalComponents = {
|
|
|
876
890
|
disclaimer: DisclaimerModal,
|
|
877
891
|
driveSettings: DriveSettingsModal$1,
|
|
878
892
|
downloadDocumentWithErrors: DownloadDocumentWithErrorsModal,
|
|
879
|
-
inspector: lazy(() => import("./InspectorModal-
|
|
893
|
+
inspector: lazy(() => import("./InspectorModal-DrBnrYZl.js").then((m) => ({ default: m.InspectorModal }))),
|
|
880
894
|
settings: SettingsModal$1,
|
|
881
895
|
upgradeDrive: UpgradeDriveModal,
|
|
882
|
-
missingPackage: lazy(() => import("./MissingPackageModal-
|
|
896
|
+
missingPackage: lazy(() => import("./MissingPackageModal-CUdcDjSO.js").then((m) => ({ default: m.ConnectMissingPackageModal })))
|
|
883
897
|
};
|
|
884
898
|
const ModalsContainer = lazy(async () => {
|
|
885
899
|
return { default: () => {
|
|
@@ -899,7 +913,7 @@ const ModalsContainer = lazy(async () => {
|
|
|
899
913
|
//#endregion
|
|
900
914
|
//#region src/components/app-loader.tsx
|
|
901
915
|
const AppLoader = (props) => {
|
|
902
|
-
const Load = lazy(() => import("./load-
|
|
916
|
+
const Load = lazy(() => import("./load-BoBY3jk8.js").then((m) => m.loadComponent(props.localPackage)));
|
|
903
917
|
return /* @__PURE__ */ jsx(StrictMode, { children: /* @__PURE__ */ jsxs(ErrorBoundary$1, {
|
|
904
918
|
fallbackRender: (props) => /* @__PURE__ */ jsx(AppSkeleton, { children: /* @__PURE__ */ jsx(DetailedFallback, { ...props }) }),
|
|
905
919
|
resetKeys: [props.localPackage],
|
|
@@ -932,6 +946,131 @@ const SentryProvider = ({ children }) => {
|
|
|
932
946
|
return children;
|
|
933
947
|
};
|
|
934
948
|
//#endregion
|
|
949
|
+
//#region src/components/missing-model-banner.tsx
|
|
950
|
+
const reasonLabels = {
|
|
951
|
+
"no-registry": "No package registry is configured.",
|
|
952
|
+
"not-in-registry": "No matching package found in the registry.",
|
|
953
|
+
"registry-error": "Couldn't reach the package registry.",
|
|
954
|
+
"install-failed": "Package failed to install.",
|
|
955
|
+
dismissed: "Installation was dismissed."
|
|
956
|
+
};
|
|
957
|
+
function canRetry(reason) {
|
|
958
|
+
return reason !== "no-registry";
|
|
959
|
+
}
|
|
960
|
+
function MissingModelBanner() {
|
|
961
|
+
const failed = useFailedInstallations();
|
|
962
|
+
const [open, setOpen] = useState(false);
|
|
963
|
+
if (failed.length === 0) return null;
|
|
964
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
965
|
+
className: "flex items-center justify-between gap-3 bg-amber-100 px-4 py-2 text-sm text-amber-900",
|
|
966
|
+
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", {
|
|
967
|
+
type: "button",
|
|
968
|
+
onClick: () => setOpen(true),
|
|
969
|
+
className: "rounded-md border border-amber-300 bg-white px-3 py-1 text-amber-900 hover:bg-amber-50",
|
|
970
|
+
children: "View"
|
|
971
|
+
})]
|
|
972
|
+
}), /* @__PURE__ */ jsx(MissingModelDetailsModal, {
|
|
973
|
+
open,
|
|
974
|
+
failed,
|
|
975
|
+
onClose: () => setOpen(false)
|
|
976
|
+
})] });
|
|
977
|
+
}
|
|
978
|
+
function MissingModelDetailsModal(props) {
|
|
979
|
+
const { open, failed, onClose } = props;
|
|
980
|
+
const discoveryService = usePackageDiscoveryService();
|
|
981
|
+
const [retrying, setRetrying] = useState(() => /* @__PURE__ */ new Set());
|
|
982
|
+
async function handleRetry(documentType) {
|
|
983
|
+
if (!discoveryService) return;
|
|
984
|
+
setRetrying((prev) => new Set(prev).add(documentType));
|
|
985
|
+
try {
|
|
986
|
+
await discoveryService.retryInstallation(documentType);
|
|
987
|
+
} finally {
|
|
988
|
+
setRetrying((prev) => {
|
|
989
|
+
const next = new Set(prev);
|
|
990
|
+
next.delete(documentType);
|
|
991
|
+
return next;
|
|
992
|
+
});
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
return /* @__PURE__ */ jsx(Modal, {
|
|
996
|
+
open,
|
|
997
|
+
onOpenChange: (isOpen) => {
|
|
998
|
+
if (!isOpen) onClose();
|
|
999
|
+
},
|
|
1000
|
+
contentProps: { className: "rounded-3xl" },
|
|
1001
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1002
|
+
className: "w-[520px] max-w-[90vw] bg-white p-6",
|
|
1003
|
+
children: [
|
|
1004
|
+
/* @__PURE__ */ jsx("div", {
|
|
1005
|
+
className: "border-b border-slate-100 pb-2 text-2xl font-bold text-gray-800",
|
|
1006
|
+
children: "Missing document models"
|
|
1007
|
+
}),
|
|
1008
|
+
/* @__PURE__ */ jsx("div", {
|
|
1009
|
+
className: "my-4 text-sm text-gray-600",
|
|
1010
|
+
children: "The following document types couldn't be loaded. Documents using them won't display until the underlying package is installed."
|
|
1011
|
+
}),
|
|
1012
|
+
failed.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
1013
|
+
className: "rounded-xl bg-slate-50 p-4 text-sm text-gray-600",
|
|
1014
|
+
children: "No outstanding failures."
|
|
1015
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
1016
|
+
className: "flex max-h-[60vh] flex-col gap-3 overflow-y-auto",
|
|
1017
|
+
children: failed.map((entry) => {
|
|
1018
|
+
const isRetrying = retrying.has(entry.documentType);
|
|
1019
|
+
const retryDisabled = !canRetry(entry.reason) || isRetrying;
|
|
1020
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1021
|
+
className: "rounded-xl bg-slate-50 p-4",
|
|
1022
|
+
children: [
|
|
1023
|
+
/* @__PURE__ */ jsx("div", {
|
|
1024
|
+
className: "mb-1 font-mono text-sm font-semibold text-gray-800",
|
|
1025
|
+
children: entry.documentType
|
|
1026
|
+
}),
|
|
1027
|
+
/* @__PURE__ */ jsx("div", {
|
|
1028
|
+
className: "mb-2 text-xs text-gray-600",
|
|
1029
|
+
children: reasonLabels[entry.reason]
|
|
1030
|
+
}),
|
|
1031
|
+
entry.packageNames.length > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
1032
|
+
className: "mb-2 text-xs text-gray-500",
|
|
1033
|
+
children: [
|
|
1034
|
+
"Package",
|
|
1035
|
+
entry.packageNames.length > 1 ? "s" : "",
|
|
1036
|
+
":",
|
|
1037
|
+
" ",
|
|
1038
|
+
entry.packageNames.join(", ")
|
|
1039
|
+
]
|
|
1040
|
+
}) : null,
|
|
1041
|
+
entry.error ? /* @__PURE__ */ jsx("div", {
|
|
1042
|
+
className: "mb-2 font-mono text-xs wrap-break-word text-red-700",
|
|
1043
|
+
children: entry.error.message
|
|
1044
|
+
}) : null,
|
|
1045
|
+
/* @__PURE__ */ jsx("div", {
|
|
1046
|
+
className: "flex justify-end",
|
|
1047
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
1048
|
+
type: "button",
|
|
1049
|
+
onClick: () => void handleRetry(entry.documentType),
|
|
1050
|
+
disabled: retryDisabled,
|
|
1051
|
+
title: canRetry(entry.reason) ? void 0 : "No registry is configured; nothing to retry against.",
|
|
1052
|
+
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"),
|
|
1053
|
+
children: isRetrying ? "Retrying..." : "Try install again"
|
|
1054
|
+
})
|
|
1055
|
+
})
|
|
1056
|
+
]
|
|
1057
|
+
}, entry.documentType);
|
|
1058
|
+
})
|
|
1059
|
+
}),
|
|
1060
|
+
/* @__PURE__ */ jsx("div", {
|
|
1061
|
+
className: "mt-4 flex justify-end",
|
|
1062
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
1063
|
+
type: "button",
|
|
1064
|
+
onClick: onClose,
|
|
1065
|
+
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",
|
|
1066
|
+
children: "Close"
|
|
1067
|
+
})
|
|
1068
|
+
})
|
|
1069
|
+
]
|
|
1070
|
+
})
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
//#endregion
|
|
935
1074
|
//#region src/components/package-install-prompt.tsx
|
|
936
1075
|
function PackageInstallPrompt() {
|
|
937
1076
|
const pendingInstallations = usePendingInstallations();
|
|
@@ -971,6 +1110,7 @@ const App = () => {
|
|
|
971
1110
|
}, []);
|
|
972
1111
|
return /* @__PURE__ */ jsxs(SentryProvider, { children: [
|
|
973
1112
|
/* @__PURE__ */ jsx(ToastContainer, { position: "bottom-right" }),
|
|
1113
|
+
/* @__PURE__ */ jsx(MissingModelBanner, {}),
|
|
974
1114
|
/* @__PURE__ */ jsx(Router, {}),
|
|
975
1115
|
/* @__PURE__ */ jsx(PackageInstallPrompt, {}),
|
|
976
1116
|
/* @__PURE__ */ jsx(Analytics, {})
|
|
@@ -1010,9 +1150,9 @@ const CookieBanner$1 = () => {
|
|
|
1010
1150
|
};
|
|
1011
1151
|
if (!showBanner) return null;
|
|
1012
1152
|
return /* @__PURE__ */ jsxs("div", {
|
|
1013
|
-
className: "absolute inset-0 z-
|
|
1153
|
+
className: "absolute inset-0 z-10000 backdrop-blur-sm",
|
|
1014
1154
|
children: [/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-black opacity-15" }), /* @__PURE__ */ jsx("div", {
|
|
1015
|
-
className: "absolute inset-x-0 bottom-0 flex justify-center bg-white px-10 pb-16
|
|
1155
|
+
className: "absolute inset-x-0 bottom-0 flex justify-center bg-white px-10 pt-10 pb-16 shadow-lg",
|
|
1016
1156
|
children: /* @__PURE__ */ jsx(CookieBanner, {
|
|
1017
1157
|
className: "max-w-[1024px]",
|
|
1018
1158
|
cookies: cookiesInput,
|
|
@@ -1088,6 +1228,11 @@ const DocumentEditor = (props) => {
|
|
|
1088
1228
|
const preferredEditorModule = useEditorModuleById(preferredEditor);
|
|
1089
1229
|
const fallbackEditorModule = useFallbackEditorModule(documentType);
|
|
1090
1230
|
const editorModule = preferredEditorModule ?? fallbackEditorModule;
|
|
1231
|
+
const vetraPackages = useVetraPackages();
|
|
1232
|
+
const packageManager = useVetraPackageManager();
|
|
1233
|
+
const owningPackageName = editorModule ? vetraPackages.find((pkg) => pkg.editors.includes(editorModule))?.manifest.name : void 0;
|
|
1234
|
+
const owningPackageVersion = owningPackageName && packageManager ? packageManager.getPackageVersion(owningPackageName) : void 0;
|
|
1235
|
+
const editorBundleKey = owningPackageName ? `${owningPackageName}@${owningPackageVersion ?? "unknown"}` : editorModule?.config.id ?? "no-editor";
|
|
1091
1236
|
const isLoadingDocument = !document;
|
|
1092
1237
|
const isLoadingEditor = editorModule && documentType && !editorModule.documentTypes.includes(documentType) && !editorModule.documentTypes.includes("*");
|
|
1093
1238
|
const canUndo = globalRevisionNumber > 0 || localRevisionNumber > 0;
|
|
@@ -1191,7 +1336,7 @@ const DocumentEditor = (props) => {
|
|
|
1191
1336
|
selectedTimelineRevision: getRevisionFromDate(selectedTimelineItem?.startDate, selectedTimelineItem?.endDate, globalOperations)
|
|
1192
1337
|
},
|
|
1193
1338
|
documentId: document.header.id
|
|
1194
|
-
}, documentId)
|
|
1339
|
+
}, `${editorBundleKey}:${documentId}`)
|
|
1195
1340
|
})
|
|
1196
1341
|
})
|
|
1197
1342
|
});
|
|
@@ -1253,221 +1398,6 @@ function HomeScreenContainer() {
|
|
|
1253
1398
|
}), config.drives.addDriveEnabled && /* @__PURE__ */ jsx(HomeScreenAddDriveItem, {})] });
|
|
1254
1399
|
}
|
|
1255
1400
|
//#endregion
|
|
1256
|
-
//#region src/pages/demo/atlas-import.tsx
|
|
1257
|
-
const REACTOR_URL = "https://apps.powerhouse.io/sky-atlas/staging/switchboard";
|
|
1258
|
-
const MIN_LOADING_TIME = 2e3;
|
|
1259
|
-
function useReactorUrl() {
|
|
1260
|
-
const { search } = useLocation();
|
|
1261
|
-
return useMemo(() => {
|
|
1262
|
-
const url = new URLSearchParams(search).get("reactorUrl") ?? REACTOR_URL;
|
|
1263
|
-
return url.endsWith("/") ? url : `${url}/`;
|
|
1264
|
-
}, [search]);
|
|
1265
|
-
}
|
|
1266
|
-
async function forkAtlas(docId, reactorUrl) {
|
|
1267
|
-
const document = gql`
|
|
1268
|
-
mutation ForkAtlas($docId: PHID) {
|
|
1269
|
-
ForkAtlas(docId: $docId)
|
|
1270
|
-
}
|
|
1271
|
-
`;
|
|
1272
|
-
return await request(`${reactorUrl}graphql`, document, { docId });
|
|
1273
|
-
}
|
|
1274
|
-
function AtlasImport() {
|
|
1275
|
-
const status = useRef("initial");
|
|
1276
|
-
const reactor = useReactorClient();
|
|
1277
|
-
const { documentId } = useParams();
|
|
1278
|
-
const reactorUrl = useReactorUrl();
|
|
1279
|
-
const navigate = useNavigate();
|
|
1280
|
-
const [driveId, setDriveId] = useState(void 0);
|
|
1281
|
-
const [error, setError] = useState(void 0);
|
|
1282
|
-
const [loading, setLoading] = useState(true);
|
|
1283
|
-
const hasError = status.current === "error";
|
|
1284
|
-
useEffect(() => {
|
|
1285
|
-
if (error) {
|
|
1286
|
-
console.error("Error forking Atlas:", error);
|
|
1287
|
-
toast("Error forking Atlas", { type: "error" });
|
|
1288
|
-
}
|
|
1289
|
-
}, [error]);
|
|
1290
|
-
async function forkAtlasDocument(documentId) {
|
|
1291
|
-
const driveId = (await forkAtlas(documentId, reactorUrl)).ForkAtlas;
|
|
1292
|
-
status.current = "forked";
|
|
1293
|
-
setDriveId(driveId);
|
|
1294
|
-
}
|
|
1295
|
-
const redirectToDrive = useCallback(() => {
|
|
1296
|
-
if (driveId && !loading) navigate(`/d/${driveId}`, { replace: true });
|
|
1297
|
-
}, [
|
|
1298
|
-
driveId,
|
|
1299
|
-
navigate,
|
|
1300
|
-
loading
|
|
1301
|
-
]);
|
|
1302
|
-
const addForkDrive = useCallback(async (driveId) => {
|
|
1303
|
-
console.log("Adding remote drive:", driveId);
|
|
1304
|
-
const driveUrl = `${reactorUrl}d/${driveId}`;
|
|
1305
|
-
try {
|
|
1306
|
-
const addedDrive = await addRemoteDrive(driveUrl);
|
|
1307
|
-
status.current = "done";
|
|
1308
|
-
console.log("Added remote drive:", addedDrive);
|
|
1309
|
-
setTimeout(() => {
|
|
1310
|
-
setLoading(false);
|
|
1311
|
-
}, MIN_LOADING_TIME);
|
|
1312
|
-
} catch (error) {
|
|
1313
|
-
status.current = "error";
|
|
1314
|
-
setLoading(false);
|
|
1315
|
-
setError(error);
|
|
1316
|
-
}
|
|
1317
|
-
}, [
|
|
1318
|
-
addRemoteDrive,
|
|
1319
|
-
navigate,
|
|
1320
|
-
reactorUrl
|
|
1321
|
-
]);
|
|
1322
|
-
useEffect(() => {
|
|
1323
|
-
if (!documentId || status.current !== "initial") return;
|
|
1324
|
-
status.current = "forking";
|
|
1325
|
-
forkAtlasDocument(documentId).catch((error) => {
|
|
1326
|
-
status.current = "error";
|
|
1327
|
-
setError(error);
|
|
1328
|
-
});
|
|
1329
|
-
}, [documentId, status]);
|
|
1330
|
-
useEffect(() => {
|
|
1331
|
-
if (!driveId || !reactor || status.current !== "forked") return;
|
|
1332
|
-
status.current = "addingDrive";
|
|
1333
|
-
new Promise((resolve) => {
|
|
1334
|
-
setTimeout(resolve, 500);
|
|
1335
|
-
}).then(() => addForkDrive(driveId)).catch((error) => {
|
|
1336
|
-
status.current = "error";
|
|
1337
|
-
setError(error);
|
|
1338
|
-
});
|
|
1339
|
-
}, [
|
|
1340
|
-
driveId,
|
|
1341
|
-
reactor,
|
|
1342
|
-
status
|
|
1343
|
-
]);
|
|
1344
|
-
return /* @__PURE__ */ jsx("div", {
|
|
1345
|
-
className: "flex size-full justify-center gap-x-4 bg-gray-50",
|
|
1346
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
1347
|
-
className: "w-full max-w-[850px] rounded-2xl bg-white p-6 drop-shadow-sm",
|
|
1348
|
-
children: [/* @__PURE__ */ jsx("h1", {
|
|
1349
|
-
className: "text-lg font-medium text-gray-900",
|
|
1350
|
-
children: "Welcome to the Atlas Explorer"
|
|
1351
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
1352
|
-
className: "mt-4 rounded-xl border border-gray-200 bg-gray-50 p-6",
|
|
1353
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
1354
|
-
className: "flex min-h-80 flex-col items-center justify-center rounded-2xl bg-slate-50",
|
|
1355
|
-
children: [
|
|
1356
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("svg", {
|
|
1357
|
-
width: "28",
|
|
1358
|
-
height: "32",
|
|
1359
|
-
viewBox: "0 0 28 32",
|
|
1360
|
-
fill: "none",
|
|
1361
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1362
|
-
children: [
|
|
1363
|
-
/* @__PURE__ */ jsx("path", {
|
|
1364
|
-
fillRule: "evenodd",
|
|
1365
|
-
clipRule: "evenodd",
|
|
1366
|
-
d: "M0.05092 23.7286L0.000163347 23.9993L0 23.9995L0.207853 24.067L27.6823 24.067L27.9995 23.9995L27.9161 23.6913L14.2182 0.209032L13.9998 0L13.749 0.246353L0.05092 23.7286ZM20.9994 11.9999L7.0003 11.9999L13.9998 23.999L20.9994 11.9999Z",
|
|
1367
|
-
fill: "url(#paint0_radial_319_20865)"
|
|
1368
|
-
}),
|
|
1369
|
-
/* @__PURE__ */ jsx("path", {
|
|
1370
|
-
d: "M14 0L0 23.9998V7.99993L14 0Z",
|
|
1371
|
-
fill: "url(#paint1_linear_319_20865)"
|
|
1372
|
-
}),
|
|
1373
|
-
/* @__PURE__ */ jsx("path", {
|
|
1374
|
-
d: "M28 24L7.82013e-05 24L14 31.9999L28 24Z",
|
|
1375
|
-
fill: "url(#paint2_linear_319_20865)"
|
|
1376
|
-
}),
|
|
1377
|
-
/* @__PURE__ */ jsx("path", {
|
|
1378
|
-
d: "M14 0L28 23.9998V7.99993L14 0Z",
|
|
1379
|
-
fill: "url(#paint3_linear_319_20865)"
|
|
1380
|
-
}),
|
|
1381
|
-
/* @__PURE__ */ jsxs("defs", { children: [
|
|
1382
|
-
/* @__PURE__ */ jsxs("radialGradient", {
|
|
1383
|
-
id: "paint0_radial_319_20865",
|
|
1384
|
-
cx: "0",
|
|
1385
|
-
cy: "0",
|
|
1386
|
-
r: "1",
|
|
1387
|
-
gradientUnits: "userSpaceOnUse",
|
|
1388
|
-
gradientTransform: "translate(13.9994 16.0344) rotate(-89.9988) scale(16.0344 16.201)",
|
|
1389
|
-
children: [/* @__PURE__ */ jsx("stop", {
|
|
1390
|
-
offset: "0.181008",
|
|
1391
|
-
stopColor: "#FFCD6B"
|
|
1392
|
-
}), /* @__PURE__ */ jsx("stop", {
|
|
1393
|
-
offset: "1",
|
|
1394
|
-
stopColor: "#EB5EDF"
|
|
1395
|
-
})]
|
|
1396
|
-
}),
|
|
1397
|
-
/* @__PURE__ */ jsxs("linearGradient", {
|
|
1398
|
-
id: "paint1_linear_319_20865",
|
|
1399
|
-
x1: "-0.031454",
|
|
1400
|
-
y1: "24.041",
|
|
1401
|
-
x2: "13.801",
|
|
1402
|
-
y2: "-0.142908",
|
|
1403
|
-
gradientUnits: "userSpaceOnUse",
|
|
1404
|
-
children: [/* @__PURE__ */ jsx("stop", { stopColor: "#4331E9" }), /* @__PURE__ */ jsx("stop", {
|
|
1405
|
-
offset: "1",
|
|
1406
|
-
stopColor: "#A273FF"
|
|
1407
|
-
})]
|
|
1408
|
-
}),
|
|
1409
|
-
/* @__PURE__ */ jsxs("linearGradient", {
|
|
1410
|
-
id: "paint2_linear_319_20865",
|
|
1411
|
-
x1: "-0.0310093",
|
|
1412
|
-
y1: "24",
|
|
1413
|
-
x2: "28.0444",
|
|
1414
|
-
y2: "24",
|
|
1415
|
-
gradientUnits: "userSpaceOnUse",
|
|
1416
|
-
children: [/* @__PURE__ */ jsx("stop", { stopColor: "#A273FF" }), /* @__PURE__ */ jsx("stop", {
|
|
1417
|
-
offset: "1",
|
|
1418
|
-
stopColor: "#4331E9"
|
|
1419
|
-
})]
|
|
1420
|
-
}),
|
|
1421
|
-
/* @__PURE__ */ jsxs("linearGradient", {
|
|
1422
|
-
id: "paint3_linear_319_20865",
|
|
1423
|
-
x1: "28.0315",
|
|
1424
|
-
y1: "24.041",
|
|
1425
|
-
x2: "14.199",
|
|
1426
|
-
y2: "-0.142908",
|
|
1427
|
-
gradientUnits: "userSpaceOnUse",
|
|
1428
|
-
children: [/* @__PURE__ */ jsx("stop", { stopColor: "#A273FF" }), /* @__PURE__ */ jsx("stop", {
|
|
1429
|
-
offset: "1",
|
|
1430
|
-
stopColor: "#4331E9"
|
|
1431
|
-
})]
|
|
1432
|
-
})
|
|
1433
|
-
] })
|
|
1434
|
-
]
|
|
1435
|
-
}) }),
|
|
1436
|
-
hasError ? /* @__PURE__ */ jsx("div", {
|
|
1437
|
-
className: "mt-3 text-sm text-gray-800",
|
|
1438
|
-
children: "Error forking Atlas scope. Please try again."
|
|
1439
|
-
}) : /* @__PURE__ */ jsx("div", {
|
|
1440
|
-
className: "mt-3 text-sm text-gray-500",
|
|
1441
|
-
children: "Forking Atlas scope..."
|
|
1442
|
-
}),
|
|
1443
|
-
/* @__PURE__ */ jsx(PowerhouseButton, {
|
|
1444
|
-
onClick: hasError ? window.location.reload.bind(window.location) : redirectToDrive,
|
|
1445
|
-
size: "small",
|
|
1446
|
-
color: "light",
|
|
1447
|
-
className: "mt-4 h-9 border border-gray-200 bg-white px-3 text-gray-600",
|
|
1448
|
-
children: hasError ? "Retry" : loading ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("svg", {
|
|
1449
|
-
className: "animate-spin",
|
|
1450
|
-
width: "16",
|
|
1451
|
-
height: "16",
|
|
1452
|
-
viewBox: "0 0 16 16",
|
|
1453
|
-
fill: "none",
|
|
1454
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1455
|
-
children: [/* @__PURE__ */ jsx("path", {
|
|
1456
|
-
d: "M15.6867 8.03333C15.4933 7.83999 15.1733 7.83999 14.98 8.03333L14.6733 8.34001V8C14.6733 4.32 11.68 1.32666 7.99999 1.32666C5.96666 1.32666 4.06666 2.23999 2.79333 3.82666C2.61999 4.03999 2.65332 4.35999 2.87332 4.52665C3.08666 4.69999 3.40666 4.66666 3.57332 4.44666C4.65999 3.09332 6.27332 2.31999 7.99999 2.31999C11.1267 2.31999 13.6733 4.86666 13.6733 7.99333V8.32666L13.3667 8.02002C13.1733 7.82669 12.8533 7.82669 12.66 8.02002C12.4667 8.21335 12.4667 8.53335 12.66 8.72668L13.82 9.88668C13.8667 9.93334 13.92 9.96666 13.98 9.99333C14.04 10.02 14.1067 10.0333 14.1733 10.0333C14.24 10.0333 14.3 10.02 14.3667 9.99333C14.4267 9.96666 14.48 9.93334 14.5267 9.88668L15.6867 8.72668C15.88 8.54668 15.88 8.22666 15.6867 8.03333Z",
|
|
1457
|
-
fill: "#6C7275"
|
|
1458
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
1459
|
-
d: "M13.1267 11.4666C12.9133 11.2933 12.5933 11.3266 12.4267 11.5466C11.34 12.9 9.72665 13.6733 7.99998 13.6733C4.87332 13.6733 2.32665 11.1266 2.32665 7.99996V7.66663L2.63332 7.97331C2.73332 8.07331 2.85999 8.11996 2.98665 8.11996C3.11332 8.11996 3.23999 8.07331 3.33999 7.97331C3.53332 7.77998 3.53332 7.45998 3.33999 7.26664L2.17998 6.10661C2.13332 6.05994 2.07998 6.02663 2.01998 5.99996C1.89998 5.94663 1.75998 5.94663 1.63998 5.99996C1.57998 6.02663 1.52665 6.05994 1.47999 6.10661L0.319988 7.26664C0.126654 7.45998 0.126654 7.77998 0.319988 7.97331C0.513321 8.16664 0.833319 8.16664 1.02665 7.97331L1.33332 7.66663V7.99996C1.33332 11.68 4.32665 14.6733 8.00665 14.6733C10.04 14.6733 11.94 13.76 13.2133 12.1733C13.38 11.96 13.3467 11.64 13.1267 11.4666Z",
|
|
1460
|
-
fill: "#6C7275"
|
|
1461
|
-
})]
|
|
1462
|
-
}), "Loading"] }) : "Continue"
|
|
1463
|
-
})
|
|
1464
|
-
]
|
|
1465
|
-
})
|
|
1466
|
-
})]
|
|
1467
|
-
})
|
|
1468
|
-
});
|
|
1469
|
-
}
|
|
1470
|
-
//#endregion
|
|
1471
1401
|
//#region src/components/router.tsx
|
|
1472
1402
|
function createRouter(routes) {
|
|
1473
1403
|
const routerBasename = connectConfig.routerBasename;
|
|
@@ -1492,12 +1422,6 @@ function createRoutes() {
|
|
|
1492
1422
|
name: "Drive",
|
|
1493
1423
|
children: /* @__PURE__ */ jsx(Content, {})
|
|
1494
1424
|
})
|
|
1495
|
-
}, {
|
|
1496
|
-
path: "import/:documentId",
|
|
1497
|
-
element: /* @__PURE__ */ jsx(Suspense, {
|
|
1498
|
-
name: "AtlasImport",
|
|
1499
|
-
children: /* @__PURE__ */ jsx(AtlasImport, {})
|
|
1500
|
-
})
|
|
1501
1425
|
}]
|
|
1502
1426
|
}];
|
|
1503
1427
|
}
|
|
@@ -1550,5 +1474,5 @@ function Sidebar() {
|
|
|
1550
1474
|
//#endregion
|
|
1551
1475
|
export { AppLoader as t };
|
|
1552
1476
|
|
|
1553
|
-
//# sourceMappingURL=sidebar-
|
|
1554
|
-
//# debugId=
|
|
1477
|
+
//# sourceMappingURL=sidebar-dOJMIiCv.js.map
|
|
1478
|
+
//# debugId=88578c00-badb-59e1-ab57-190a6e1ea2c8
|