@powerhousedao/ph-clint-app 0.1.0-dev.89 → 0.1.0-dev.90
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/browser/{editor-BuHwuzRa.js → editor-Bp2wUo8R.js} +748 -522
- package/dist/browser/editor-Bp2wUo8R.js.map +1 -0
- package/dist/browser/editors/ph-clint-project-editor/module.js +1 -1
- package/dist/connect/assets/{AddDriveModal-BoKLJyUY-DwlVwt2n.js → AddDriveModal-BoKLJyUY-cGJwd_2F.js} +2 -2
- package/dist/connect/assets/{AddDriveModal-BoKLJyUY-DwlVwt2n.js.map → AddDriveModal-BoKLJyUY-cGJwd_2F.js.map} +1 -1
- package/dist/connect/assets/{ClearStorageModal-CXoNWmRe-lBEW3sSH.js → ClearStorageModal-CXoNWmRe-D3ifKRm-.js} +2 -2
- package/dist/connect/assets/{ClearStorageModal-CXoNWmRe-lBEW3sSH.js.map → ClearStorageModal-CXoNWmRe-D3ifKRm-.js.map} +1 -1
- package/dist/connect/assets/{CookiesPolicyModal-1nOh6oN3-BYSDp-5J.js → CookiesPolicyModal-1nOh6oN3-kK_sx5mz.js} +2 -2
- package/dist/connect/assets/{CookiesPolicyModal-1nOh6oN3-BYSDp-5J.js.map → CookiesPolicyModal-1nOh6oN3-kK_sx5mz.js.map} +1 -1
- package/dist/connect/assets/{CreateDocumentModal-nQbLVDq3-DJbJhlYp.js → CreateDocumentModal-nQbLVDq3-DFAye2CX.js} +2 -2
- package/dist/connect/assets/{CreateDocumentModal-nQbLVDq3-DJbJhlYp.js.map → CreateDocumentModal-nQbLVDq3-DFAye2CX.js.map} +1 -1
- package/dist/connect/assets/{DebugSettingsModal-5SDhy5gt-Du3PKhbh.js → DebugSettingsModal-5SDhy5gt-DLMPdDQB.js} +2 -2
- package/dist/connect/assets/{DebugSettingsModal-5SDhy5gt-Du3PKhbh.js.map → DebugSettingsModal-5SDhy5gt-DLMPdDQB.js.map} +1 -1
- package/dist/connect/assets/{DeleteDriveModal-6P0T1QgD-CaEKmseP.js → DeleteDriveModal-6P0T1QgD-CK6cPXbT.js} +2 -2
- package/dist/connect/assets/{DeleteDriveModal-6P0T1QgD-CaEKmseP.js.map → DeleteDriveModal-6P0T1QgD-CK6cPXbT.js.map} +1 -1
- package/dist/connect/assets/{DeleteItemModal-BmV1aQyZ-B01dssV-.js → DeleteItemModal-BmV1aQyZ-Ld9lHNhl.js} +2 -2
- package/dist/connect/assets/{DeleteItemModal-BmV1aQyZ-B01dssV-.js.map → DeleteItemModal-BmV1aQyZ-Ld9lHNhl.js.map} +1 -1
- package/dist/connect/assets/{DisclaimerModal-CVTFfN0_-CfPGYzP1.js → DisclaimerModal-CVTFfN0_-D7N9TDI4.js} +2 -2
- package/dist/connect/assets/{DisclaimerModal-CVTFfN0_-CfPGYzP1.js.map → DisclaimerModal-CVTFfN0_-D7N9TDI4.js.map} +1 -1
- package/dist/connect/assets/{DownloadDocumentWithErrorsModal-CXeFUtaz-UexzRqQT.js → DownloadDocumentWithErrorsModal-CXeFUtaz-CYIIl42M.js} +2 -2
- package/dist/connect/assets/{DownloadDocumentWithErrorsModal-CXeFUtaz-UexzRqQT.js.map → DownloadDocumentWithErrorsModal-CXeFUtaz-CYIIl42M.js.map} +1 -1
- package/dist/connect/assets/{DriveAuthRequiredModal-B3VdLwSH-C5FZCMC5.js → DriveAuthRequiredModal-B3VdLwSH-fqmI_4sF.js} +2 -2
- package/dist/connect/assets/{DriveAuthRequiredModal-B3VdLwSH-C5FZCMC5.js.map → DriveAuthRequiredModal-B3VdLwSH-fqmI_4sF.js.map} +1 -1
- package/dist/connect/assets/{DriveSettingsModal-CsNFEJ9E-BoXSbW1c.js → DriveSettingsModal-CsNFEJ9E-BR2vyeU8.js} +2 -2
- package/dist/connect/assets/{DriveSettingsModal-CsNFEJ9E-BoXSbW1c.js.map → DriveSettingsModal-CsNFEJ9E-BR2vyeU8.js.map} +1 -1
- package/dist/connect/assets/{InspectorModal-BsSihzuc-hukmcBoP.js → InspectorModal-BsSihzuc-B0n5gbGB.js} +2 -2
- package/dist/connect/assets/{InspectorModal-BsSihzuc-hukmcBoP.js.map → InspectorModal-BsSihzuc-B0n5gbGB.js.map} +1 -1
- package/dist/connect/assets/{MissingPackageModal-Bn036mWQ-BOXHWmFa.js → MissingPackageModal-Bn036mWQ-C021G1nV.js} +2 -2
- package/dist/connect/assets/{MissingPackageModal-Bn036mWQ-BOXHWmFa.js.map → MissingPackageModal-Bn036mWQ-C021G1nV.js.map} +1 -1
- package/dist/connect/assets/{SettingsModal-S_A5qf95-Fz0f2CXX.js → SettingsModal-S_A5qf95-uzigz0nk.js} +2 -2
- package/dist/connect/assets/{SettingsModal-S_A5qf95-Fz0f2CXX.js.map → SettingsModal-S_A5qf95-uzigz0nk.js.map} +1 -1
- package/dist/connect/assets/{UpgradeDriveModal-C7lV4rAX-BkeBWpDi.js → UpgradeDriveModal-C7lV4rAX-CTIf4duw.js} +2 -2
- package/dist/connect/assets/{UpgradeDriveModal-C7lV4rAX-BkeBWpDi.js.map → UpgradeDriveModal-C7lV4rAX-CTIf4duw.js.map} +1 -1
- package/dist/connect/assets/build-info-cc1PjSvF-DtAGzh0W.js.map +1 -1
- package/dist/connect/assets/chunk-pbuEa-1d-KEQyMDN_.js.map +1 -1
- package/dist/connect/assets/{components-ByEUkO4U-Mc23VVA-.js → components-ByEUkO4U-xPZUVkzr.js} +4 -4
- package/dist/connect/assets/{components-ByEUkO4U-Mc23VVA-.js.map → components-ByEUkO4U-xPZUVkzr.js.map} +1 -1
- package/dist/connect/assets/{components-HCKyLh9m.js → components-Djrujufg.js} +2 -2
- package/dist/connect/assets/{components-HCKyLh9m.js.map → components-Djrujufg.js.map} +1 -1
- package/dist/connect/assets/{connect-pRAhId57.js → connect-CGvtDtZh.js} +2 -2
- package/dist/connect/assets/{connect-pRAhId57.js.map → connect-CGvtDtZh.js.map} +1 -1
- package/dist/connect/assets/{connect.config-Bt4pvvWV-CAyer5pZ.js → connect.config-Bt4pvvWV-Dj3FkjaZ.js} +2 -2
- package/dist/connect/assets/{connect.config-Bt4pvvWV-CAyer5pZ.js.map → connect.config-Bt4pvvWV-Dj3FkjaZ.js.map} +1 -1
- package/dist/connect/assets/{dist-DmhUSVtT.js → dist-t-ezfpxv.js} +3 -3
- package/dist/connect/assets/{dist-DmhUSVtT.js.map → dist-t-ezfpxv.js.map} +1 -1
- package/dist/connect/assets/{editor-B560eld_-CIE3_3II.js → editor-B560eld_-DLpKHubk.js} +2 -2
- package/dist/connect/assets/{editor-B560eld_-CIE3_3II.js.map → editor-B560eld_-DLpKHubk.js.map} +1 -1
- package/dist/connect/assets/editor-BaQ62r3i.js +2 -0
- package/dist/connect/assets/editor-BaQ62r3i.js.map +1 -0
- package/dist/connect/assets/{editor-CAVHtR-v-ClzvSfK5.js → editor-CAVHtR-v-D33T9vW0.js} +2 -2
- package/dist/connect/assets/{editor-CAVHtR-v-ClzvSfK5.js.map → editor-CAVHtR-v-D33T9vW0.js.map} +1 -1
- package/dist/connect/assets/{editor-CVCLxUhe-C6nP7EPN.js → editor-CVCLxUhe-C9Ftgu1S.js} +2 -2
- package/dist/connect/assets/{editor-CVCLxUhe-C6nP7EPN.js.map → editor-CVCLxUhe-C9Ftgu1S.js.map} +1 -1
- package/dist/connect/assets/{editor-DnG2Zzet-CRhirYbH.js → editor-DnG2Zzet-CQ38uSti.js} +2 -2
- package/dist/connect/assets/{editor-DnG2Zzet-CRhirYbH.js.map → editor-DnG2Zzet-CQ38uSti.js.map} +1 -1
- package/dist/connect/assets/{editor-mor7dV6n-DDigdbLM.js → editor-mor7dV6n-NTU9k1uj.js} +2 -2
- package/dist/connect/assets/{editor-mor7dV6n-DDigdbLM.js.map → editor-mor7dV6n-NTU9k1uj.js.map} +1 -1
- package/dist/connect/assets/{editor-xCnDas6c-CyHuSL7M.js → editor-xCnDas6c-DdGhx--5.js} +2 -2
- package/dist/connect/assets/{editor-xCnDas6c-CyHuSL7M.js.map → editor-xCnDas6c-DdGhx--5.js.map} +1 -1
- package/dist/connect/assets/esm-dD38MHAT.js +10 -0
- package/dist/connect/assets/esm-dD38MHAT.js.map +1 -0
- package/dist/connect/assets/{hooks-Btogj1f0-CMXQZV6d.js → hooks-Btogj1f0-BKAAmyt-.js} +2 -2
- package/dist/connect/assets/{hooks-Btogj1f0-CMXQZV6d.js.map → hooks-Btogj1f0-BKAAmyt-.js.map} +1 -1
- package/dist/connect/assets/index-NB86TKkT.js +3 -0
- package/dist/connect/assets/{index-DS7vbdaR.js.map → index-NB86TKkT.js.map} +1 -1
- package/dist/connect/assets/{load-BWibkoFV-BVilFVpD.js → load-BWibkoFV-CDRjWwYQ.js} +2 -2
- package/dist/connect/assets/{load-BWibkoFV-BVilFVpD.js.map → load-BWibkoFV-CDRjWwYQ.js.map} +1 -1
- package/dist/connect/assets/module-1hr_ne9w-CWAVsMzZ.js.map +1 -1
- package/dist/connect/assets/{module-DP3LMNU7.js → module-7zCQE1MC.js} +2 -2
- package/dist/connect/assets/{module-DP3LMNU7.js.map → module-7zCQE1MC.js.map} +1 -1
- package/dist/connect/assets/module-CRq_lUkG-D61oeRlC.js.map +1 -1
- package/dist/connect/assets/module-DP3bVbak-VbUPIBZP.js.map +1 -1
- package/dist/connect/assets/package-BZLLR0Ma-B7vswMvI.js.map +1 -1
- package/dist/connect/assets/{pglite-seed-BWk7yOwr-T-NGWlGh.js → pglite-seed-BWk7yOwr-b2F0oJiP.js} +2 -2
- package/dist/connect/assets/{pglite-seed-BWk7yOwr-T-NGWlGh.js.map → pglite-seed-BWk7yOwr-b2F0oJiP.js.map} +1 -1
- package/dist/connect/assets/pglite.worker-BuyZ0d7u.js.map +1 -1
- package/dist/connect/assets/pglite.worker.legacy-D5InEf0i.js.map +1 -1
- package/dist/connect/assets/{ph-clint-project-BZ5X7dVQ.js → ph-clint-project-p1zY6e17.js} +2 -2
- package/dist/connect/assets/{ph-clint-project-BZ5X7dVQ.js.map → ph-clint-project-p1zY6e17.js.map} +1 -1
- package/dist/connect/assets/{reactor-BxNvHOKC-DmVBqCt_.js → reactor-BxNvHOKC-CeMF1M2u.js} +4 -4
- package/dist/connect/assets/{reactor-BxNvHOKC-DmVBqCt_.js.map → reactor-BxNvHOKC-CeMF1M2u.js.map} +1 -1
- package/dist/connect/assets/{registerServiceWorker-D9l1kja7-oC4nicB2.js → registerServiceWorker-D9l1kja7-DG3DqQna.js} +2 -2
- package/dist/connect/assets/{registerServiceWorker-D9l1kja7-oC4nicB2.js.map → registerServiceWorker-D9l1kja7-DG3DqQna.js.map} +1 -1
- package/dist/connect/assets/reload-connect-toast-CwvSc6F--BQcqGaN_.js.map +1 -1
- package/dist/connect/assets/runtime-config-DL3QjcfM-D9g4VFtY.js.map +1 -1
- package/dist/connect/assets/toast-BEy42aYx-Dg_jZf6v.js.map +1 -1
- package/dist/connect/assets/{useRegistryPackages-B-gFECmd-CXOBKziY.js → useRegistryPackages-B-gFECmd-C8h2M5qM.js} +2 -2
- package/dist/connect/assets/{useRegistryPackages-B-gFECmd-CXOBKziY.js.map → useRegistryPackages-B-gFECmd-C8h2M5qM.js.map} +1 -1
- package/dist/connect/assets/{useVetraDocument-tpjMF571-DT5T1mNT.js → useVetraDocument-tpjMF571-DxT9GgCx.js} +2 -2
- package/dist/connect/assets/{useVetraDocument-tpjMF571-DT5T1mNT.js.map → useVetraDocument-tpjMF571-DxT9GgCx.js.map} +1 -1
- package/dist/connect/assets/utils-BiV3cs9Y-B7i9WJ1b.js.map +1 -1
- package/dist/connect/assets/{utils-CkWB3DRk-CxqNKFWP.js → utils-CkWB3DRk-BURJYofr.js} +2 -2
- package/dist/connect/assets/{utils-CkWB3DRk-CxqNKFWP.js.map → utils-CkWB3DRk-BURJYofr.js.map} +1 -1
- package/dist/connect/index.html +3 -3
- package/dist/connect/powerhouse.config.json +1 -1
- package/dist/node/{editor-Bev0bZuJ.mjs → editor-BC9t7D3T.mjs} +748 -517
- package/dist/node/editor-BC9t7D3T.mjs.map +1 -0
- package/dist/node/editors/ph-clint-project-editor/module.mjs +1 -1
- package/package.json +2 -2
- package/dist/browser/editor-BuHwuzRa.js.map +0 -1
- package/dist/connect/assets/editor-BrPMvNFl.js +0 -2
- package/dist/connect/assets/editor-BrPMvNFl.js.map +0 -1
- package/dist/connect/assets/esm-mbrYcWED.js +0 -10
- package/dist/connect/assets/esm-mbrYcWED.js.map +0 -1
- package/dist/connect/assets/index-DS7vbdaR.js +0 -3
- package/dist/node/editor-Bev0bZuJ.mjs.map +0 -1
|
@@ -2,7 +2,7 @@ import { lazy } from "react";
|
|
|
2
2
|
//#region editors/ph-clint-project-editor/module.ts
|
|
3
3
|
/** Document editor module for the "["powerhouse/ph-clint-project"]" document type */
|
|
4
4
|
const PhClintProjectEditor = {
|
|
5
|
-
Component: lazy(() => import("../../editor-
|
|
5
|
+
Component: lazy(() => import("../../editor-Bp2wUo8R.js")),
|
|
6
6
|
documentTypes: ["powerhouse/ph-clint-project"],
|
|
7
7
|
config: {
|
|
8
8
|
id: "ph-clint-project-editor",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Bt as e,G as t,I as n,Jt as r,Yt as i,_t as a,a as o,c as s,f as c,m as l,s as u}from"./dist-
|
|
2
|
-
//# sourceMappingURL=AddDriveModal-BoKLJyUY-
|
|
1
|
+
import{Bt as e,G as t,I as n,Jt as r,Yt as i,_t as a,a as o,c as s,f as c,m as l,s as u}from"./dist-t-ezfpxv.js";import{n as d}from"./connect-CGvtDtZh.js";import{n as f}from"./toast-BEy42aYx-Dg_jZf6v.js";import{r as p}from"./i18next-kqPoxo7u.js";import{jsx as m}from"react/jsx-runtime";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`091b4f86-3bca-5268-ba71-42bcc1c80636`)}catch{}})();var h=3e4;async function g(e,t){let n=await fetch(e,{headers:t??{}});if(!n.ok)throw Error(`HTTP ${n.status}`);return await n.json()}function _(){let _=a()?.type===`addDrive`,v=i(),y=r(),b=t(),x=async e=>{try{let t=b?.find(t=>t.config.id===e.id),r=await o({id:``,slug:``,global:{name:e.name,icon:null},local:{availableOffline:e.availableOffline,sharingType:e.sharingType.toLowerCase(),listeners:[],triggers:[]}},t?.config.id);if(f(p(`notifications.addDriveSuccess`),{type:`connect-success`}),!r)return;n(r)}catch(e){console.error(e)}},S=async t=>{try{let r=await u(t.url,t.id);f(p(`notifications.addDriveSuccess`),{type:`connect-success`});let i=window.ph?.reactorClient,a=()=>!window.ph?.selectedDriveId&&!c(window.location.pathname);(async()=>{try{if(!i)return;await e(i,r,{timeoutMs:h});let t=(await l(i)).find(e=>e.header.id===r);t&&a()&&n(t)}catch{}})()}catch(e){console.error(e)}};async function C(e){await x(e),s()}async function w(e){await S(e),s()}let T=!!b?.length;return m(d,{open:_&&T,onAddLocalDrive:e=>{C(e)},onAddRemoteDrive:e=>{w(e)},requestPublicDrive:async e=>{try{return v?g(e,{Authorization:`Bearer ${await y?.getBearerToken?.({expiresIn:10})}`}):g(e)}catch(t){return console.error(t),g(e)}},onOpenChange:e=>{if(!e)return s()},appOptions:b?.map(e=>({id:e.config.id,name:e.config.name,sharingType:`LOCAL`,availableOffline:!1}))||[]})}export{_ as AddDriveModal};
|
|
2
|
+
//# sourceMappingURL=AddDriveModal-BoKLJyUY-cGJwd_2F.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddDriveModal-BoKLJyUY-
|
|
1
|
+
{"version":3,"file":"AddDriveModal-BoKLJyUY-cGJwd_2F.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@parcel+watcher@2.5.6_@sentry_92fbcdab943457b0ffd54c0864a4f38d/node_modules/@powerhousedao/connect/dist/AddDriveModal-BoKLJyUY.js"],"sourcesContent":["\n!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]=\"091b4f86-3bca-5268-ba71-42bcc1c80636\")}catch(e){}}();\nimport { n as toast } from \"./toast-BEy42aYx.js\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { t } from \"i18next\";\nimport { addDrive, addRemoteDrive, closePHModal, extractDriveSlugFromPath, getDrives, setSelectedDrive, useAppModules, usePHModal, useRenown, useUser, waitForDocumentReady } from \"@powerhousedao/reactor-browser\";\nimport { AddDriveModal as AddDriveModal$1 } from \"@powerhousedao/design-system/connect\";\n//#region src/components/modal/modals/AddDriveModal.tsx\nconst REMOTE_DRIVE_NAV_TIMEOUT_MS = 3e4;\nasync function requestPublicDriveFromReactor(url, headers) {\n\tconst response = await fetch(url, { headers: headers ?? {} });\n\tif (!response.ok) throw new Error(`HTTP ${response.status}`);\n\treturn await response.json();\n}\nfunction AddDriveModal() {\n\tconst open = usePHModal()?.type === \"addDrive\";\n\tconst user = useUser();\n\tconst renown = useRenown();\n\tconst appModules = useAppModules();\n\tconst onAddLocalDrive = async (data) => {\n\t\ttry {\n\t\t\tconst app = appModules?.find((a) => a.config.id === data.id);\n\t\t\tconst newDrive = await addDrive({\n\t\t\t\tid: \"\",\n\t\t\t\tslug: \"\",\n\t\t\t\tglobal: {\n\t\t\t\t\tname: data.name,\n\t\t\t\t\ticon: null\n\t\t\t\t},\n\t\t\t\tlocal: {\n\t\t\t\t\tavailableOffline: data.availableOffline,\n\t\t\t\t\tsharingType: data.sharingType.toLowerCase(),\n\t\t\t\t\tlisteners: [],\n\t\t\t\t\ttriggers: []\n\t\t\t\t}\n\t\t\t}, app?.config.id);\n\t\t\ttoast(t(\"notifications.addDriveSuccess\"), { type: \"connect-success\" });\n\t\t\tif (!newDrive) return;\n\t\t\tsetSelectedDrive(newDrive);\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\tconst onAddRemoteDrive = async (data) => {\n\t\ttry {\n\t\t\tconst driveId = await addRemoteDrive(data.url, data.id);\n\t\t\ttoast(t(\"notifications.addDriveSuccess\"), { type: \"connect-success\" });\n\t\t\tconst reactorClient = window.ph?.reactorClient;\n\t\t\tconst stillOnHome = () => !window.ph?.selectedDriveId && !extractDriveSlugFromPath(window.location.pathname);\n\t\t\t(async () => {\n\t\t\t\ttry {\n\t\t\t\t\tif (!reactorClient) return;\n\t\t\t\t\tawait waitForDocumentReady(reactorClient, driveId, { timeoutMs: REMOTE_DRIVE_NAV_TIMEOUT_MS });\n\t\t\t\t\tconst drive = (await getDrives(reactorClient)).find((d) => d.header.id === driveId);\n\t\t\t\t\tif (drive && stillOnHome()) setSelectedDrive(drive);\n\t\t\t\t} catch {}\n\t\t\t})();\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\tasync function onAddLocalDriveSubmit(data) {\n\t\tawait onAddLocalDrive(data);\n\t\tclosePHModal();\n\t}\n\tasync function onAddRemoteDriveSubmit(data) {\n\t\tawait onAddRemoteDrive(data);\n\t\tclosePHModal();\n\t}\n\tconst ready = !!appModules?.length;\n\treturn /* @__PURE__ */ jsx(AddDriveModal$1, {\n\t\topen: open && ready,\n\t\tonAddLocalDrive: (data) => {\n\t\t\tonAddLocalDriveSubmit(data);\n\t\t},\n\t\tonAddRemoteDrive: (data) => {\n\t\t\tonAddRemoteDriveSubmit(data);\n\t\t},\n\t\trequestPublicDrive: async (url) => {\n\t\t\ttry {\n\t\t\t\tif (user) return requestPublicDriveFromReactor(url, { Authorization: `Bearer ${await renown?.getBearerToken?.({ expiresIn: 10 })}` });\n\t\t\t\treturn requestPublicDriveFromReactor(url);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error);\n\t\t\t\treturn requestPublicDriveFromReactor(url);\n\t\t\t}\n\t\t},\n\t\tonOpenChange: (status) => {\n\t\t\tif (!status) return closePHModal();\n\t\t},\n\t\tappOptions: appModules?.map((pkg) => ({\n\t\t\tid: pkg.config.id,\n\t\t\tname: pkg.config.name,\n\t\t\tsharingType: \"LOCAL\",\n\t\t\tavailableOffline: false\n\t\t})) || []\n\t});\n}\n//#endregion\nexport { AddDriveModal };\n\n//# sourceMappingURL=AddDriveModal-BoKLJyUY.js.map\n//# debugId=091b4f86-3bca-5268-ba71-42bcc1c80636\n"],"x_google_ignoreList":[0],"mappings":"+RACC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAe,OAAO,OAApB,IAA2B,OAAoB,OAAO,OAApB,IAA2B,OAAoB,OAAO,WAApB,IAA+B,WAAwB,OAAO,KAApB,IAAyB,KAAK,EAAE,CAAC,EAAG,IAAI,EAAE,OAAK,CAAE,MAAM,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC,EAAE,gBAAgB,GAAG,6CAAgD,MAAK,CAOjT,IAAM,EAA8B,IACpC,eAAe,EAA8B,EAAK,EAAS,CAC1D,IAAM,EAAW,MAAM,MAAM,EAAK,CAAE,QAAS,GAAW,EAAE,CAAE,CAAC,CAC7D,GAAI,CAAC,EAAS,GAAI,MAAU,MAAM,QAAQ,EAAS,SAAS,CAC5D,OAAO,MAAM,EAAS,MAAM,CAE7B,SAAS,GAAgB,CACxB,IAAM,EAAO,GAAY,EAAE,OAAS,WAC9B,EAAO,GAAS,CAChB,EAAS,GAAW,CACpB,EAAa,GAAe,CAC5B,EAAkB,KAAO,IAAS,CACvC,GAAI,CACH,IAAM,EAAM,GAAY,KAAM,GAAM,EAAE,OAAO,KAAO,EAAK,GAAG,CACtD,EAAW,MAAM,EAAS,CAC/B,GAAI,GACJ,KAAM,GACN,OAAQ,CACP,KAAM,EAAK,KACX,KAAM,KACN,CACD,MAAO,CACN,iBAAkB,EAAK,iBACvB,YAAa,EAAK,YAAY,aAAa,CAC3C,UAAW,EAAE,CACb,SAAU,EAAE,CACZ,CACD,CAAE,GAAK,OAAO,GAAG,CAElB,GADA,EAAM,EAAE,gCAAgC,C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AK,IAAS,CACrC,GAAI,EAAI,OAAO,GACf,KAAM,EAAI,OAAO,KACjB,YAAa,QACb,iBAAkB,GAClB,EAAE,EAAI,EAAE,CACT,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as e,L as t,V as n,_t as r,c as i}from"./dist-
|
|
2
|
-
//# sourceMappingURL=ClearStorageModal-CXoNWmRe-
|
|
1
|
+
import{I as e,L as t,V as n,_t as r,c as i}from"./dist-t-ezfpxv.js";import{i as a}from"./connect-CGvtDtZh.js";import{r as o}from"./dist-Cb4AoJ-8.js";import{t as s}from"./reactor-BxNvHOKC-CeMF1M2u.js";import{t as c}from"./useTranslation-DQCCLfKw.js";import{jsx as l}from"react/jsx-runtime";import{useState as u}from"react";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`12a59e3b-9586-5c13-a195-20f1d19afbd7`)}catch{}})();var d=o([`ClearStorage`]);function f(){let o=r()?.type===`clearStorage`,{t:f}=c(),[p,m]=u(!1);function h(){m(!0),s().then(()=>{d.info(`Storage cleared`),e(void 0),t(void 0),window.location.reload()}).catch(e=>{d.error(`Error clearing storage: @error`,e),m(!1)})}return l(a,{open:o,header:f(`modals.connectSettings.clearStorage.confirmation.title`),body:f(`modals.connectSettings.clearStorage.confirmation.body`),cancelLabel:f(`common.cancel`),continueLabel:f(`modals.connectSettings.clearStorage.confirmation.clearButton`),onCancel:()=>n({type:`settings`}),onContinue:h,onOpenChange:e=>{if(!e)return i()},continueDisabled:p})}export{f as ClearStorageModal};
|
|
2
|
+
//# sourceMappingURL=ClearStorageModal-CXoNWmRe-D3ifKRm-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClearStorageModal-CXoNWmRe-
|
|
1
|
+
{"version":3,"file":"ClearStorageModal-CXoNWmRe-D3ifKRm-.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@parcel+watcher@2.5.6_@sentry_92fbcdab943457b0ffd54c0864a4f38d/node_modules/@powerhousedao/connect/dist/ClearStorageModal-CXoNWmRe.js"],"sourcesContent":["\n!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]=\"12a59e3b-9586-5c13-a195-20f1d19afbd7\")}catch(e){}}();\nimport { t as clearReactorStorage } from \"./reactor-BxNvHOKC.js\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useTranslation } from \"react-i18next\";\nimport { useState } from \"react\";\nimport { closePHModal, setSelectedDrive, setSelectedNode, showPHModal, usePHModal } from \"@powerhousedao/reactor-browser\";\nimport { childLogger } from \"document-model\";\nimport { ConnectConfirmationModal } from \"@powerhousedao/design-system/connect\";\n//#region src/components/modal/modals/ClearStorageModal.tsx\nconst logger$1 = childLogger([\"ClearStorage\"]);\nfunction ClearStorageModal() {\n\tconst open = usePHModal()?.type === \"clearStorage\";\n\tconst { t } = useTranslation();\n\tconst [loading, setLoading] = useState(false);\n\tfunction clearStorage() {\n\t\tsetLoading(true);\n\t\tclearReactorStorage().then(() => {\n\t\t\tlogger$1.info(\"Storage cleared\");\n\t\t\tsetSelectedDrive(void 0);\n\t\t\tsetSelectedNode(void 0);\n\t\t\twindow.location.reload();\n\t\t}).catch((error) => {\n\t\t\tlogger$1.error(\"Error clearing storage: @error\", error);\n\t\t\tsetLoading(false);\n\t\t});\n\t}\n\treturn /* @__PURE__ */ jsx(ConnectConfirmationModal, {\n\t\topen,\n\t\theader: t(\"modals.connectSettings.clearStorage.confirmation.title\"),\n\t\tbody: t(\"modals.connectSettings.clearStorage.confirmation.body\"),\n\t\tcancelLabel: t(\"common.cancel\"),\n\t\tcontinueLabel: t(\"modals.connectSettings.clearStorage.confirmation.clearButton\"),\n\t\tonCancel: () => showPHModal({ type: \"settings\" }),\n\t\tonContinue: clearStorage,\n\t\tonOpenChange: (status) => {\n\t\t\tif (!status) return closePHModal();\n\t\t},\n\t\tcontinueDisabled: loading\n\t});\n}\n//#endregion\nexport { ClearStorageModal };\n\n//# sourceMappingURL=ClearStorageModal-CXoNWmRe.js.map\n//# debugId=12a59e3b-9586-5c13-a195-20f1d19afbd7\n"],"x_google_ignoreList":[0],"mappings":"mUACC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAe,OAAO,OAApB,IAA2B,OAAoB,OAAO,OAApB,IAA2B,OAAoB,OAAO,WAApB,IAA+B,WAAwB,OAAO,KAApB,IAAyB,KAAK,EAAE,CAAC,EAAG,IAAI,EAAE,OAAK,CAAE,MAAM,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC,EAAE,gBAAgB,GAAG,6CAAgD,MAAK,CASjT,IAAM,EAAW,EAAY,CAAC,eAAe,CAAC,CAC9C,SAAS,GAAoB,CAC5B,IAAM,EAAO,GAAY,EAAE,OAAS,eAC9B,CAAE,KAAM,GAAgB,CACxB,CAAC,EAAS,GAAc,EAAS,GAAM,CAC7C,SAAS,GAAe,CACvB,EAAW,GAAK,CAChB,GAAqB,CAAC,SAAW,CAChC,EAAS,KAAK,kBAAkB,CAChC,EAAiB,IAAK,GAAE,CACxB,EAAgB,IAAK,GAAE,CACvB,OAAO,SAAS,QAAQ,EACvB,CAAC,MAAO,GAAU,CACnB,EAAS,MAAM,iCAAkC,EAAM,CACvD,EAAW,GAAM,EAChB,CAEH,OAAuB,EAAI,EAA0B,CACpD,OACA,OAAQ,EAAE,yDAAyD,CACnE,KAAM,EAAE,wDAAwD,CAChE,YAAa,EAAE,gBAAgB,CAC/B,cAAe,EAAE,+DAA+D,CAChF,aAAgB,EAAY,CAAE,KAAM,WAAY,CAAC,CACjD,WAAY,EACZ,aAAe,GAAW,CACzB,GAAI,CAAC,EAAQ,OAAO,GAAc,EAEnC,iBAAkB,EAClB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_t as e,c as t}from"./dist-
|
|
2
|
-
//# sourceMappingURL=CookiesPolicyModal-1nOh6oN3-
|
|
1
|
+
import{_t as e,c as t}from"./dist-t-ezfpxv.js";import{O as n}from"./connect-CGvtDtZh.js";import{t as r}from"./Trans-DDyWfeQm.js";import{t as i}from"./useTranslation-DQCCLfKw.js";import{jsx as a}from"react/jsx-runtime";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`d4df4344-189f-5267-8482-f15c3c5fb447`)}catch{}})();var o=()=>{let o=e()?.type===`cookiesPolicy`,{t:s}=i();return a(n,{open:o,header:s(`modals.cookiesPolicy.title`),body:a(r,{i18nKey:`modals.cookiesPolicy.body`,components:{subtitle:a(`h2`,{className:`mb-4 text-lg font-bold`}),p:a(`p`,{className:`mb-2`}),list:a(`ul`,{className:`mb-4 list-disc pl-6`}),bullet:a(`li`,{})}}),bodyClassName:`text-left`,closeLabel:`Close`,onContinue:()=>t(),overlayProps:{style:{zIndex:1e4}}})};export{o as CookiesPolicyModal};
|
|
2
|
+
//# sourceMappingURL=CookiesPolicyModal-1nOh6oN3-kK_sx5mz.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CookiesPolicyModal-1nOh6oN3-
|
|
1
|
+
{"version":3,"file":"CookiesPolicyModal-1nOh6oN3-kK_sx5mz.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@parcel+watcher@2.5.6_@sentry_92fbcdab943457b0ffd54c0864a4f38d/node_modules/@powerhousedao/connect/dist/CookiesPolicyModal-1nOh6oN3.js"],"sourcesContent":["\n!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]=\"d4df4344-189f-5267-8482-f15c3c5fb447\")}catch(e){}}();\nimport { jsx } from \"react/jsx-runtime\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { closePHModal, usePHModal } from \"@powerhousedao/reactor-browser\";\nimport { ReadRequiredModal } from \"@powerhousedao/design-system/connect\";\n//#region src/components/modal/modals/CookiesPolicyModal.tsx\nconst CookiesPolicyModal = () => {\n\tconst open = usePHModal()?.type === \"cookiesPolicy\";\n\tconst { t } = useTranslation();\n\treturn /* @__PURE__ */ jsx(ReadRequiredModal, {\n\t\topen,\n\t\theader: t(\"modals.cookiesPolicy.title\"),\n\t\tbody: /* @__PURE__ */ jsx(Trans, {\n\t\t\ti18nKey: \"modals.cookiesPolicy.body\",\n\t\t\tcomponents: {\n\t\t\t\tsubtitle: /* @__PURE__ */ jsx(\"h2\", { className: \"mb-4 text-lg font-bold\" }),\n\t\t\t\tp: /* @__PURE__ */ jsx(\"p\", { className: \"mb-2\" }),\n\t\t\t\tlist: /* @__PURE__ */ jsx(\"ul\", { className: \"mb-4 list-disc pl-6\" }),\n\t\t\t\tbullet: /* @__PURE__ */ jsx(\"li\", {})\n\t\t\t}\n\t\t}),\n\t\tbodyClassName: \"text-left\",\n\t\tcloseLabel: \"Close\",\n\t\tonContinue: () => closePHModal(),\n\t\toverlayProps: { style: { zIndex: 1e4 } }\n\t});\n};\n//#endregion\nexport { CookiesPolicyModal };\n\n//# sourceMappingURL=CookiesPolicyModal-1nOh6oN3.js.map\n//# debugId=d4df4344-189f-5267-8482-f15c3c5fb447\n"],"x_google_ignoreList":[0],"mappings":"2NACC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAe,OAAO,OAApB,IAA2B,OAAoB,OAAO,OAApB,IAA2B,OAAoB,OAAO,WAApB,IAA+B,WAAwB,OAAO,KAApB,IAAyB,KAAK,EAAE,CAAC,EAAG,IAAI,EAAE,OAAK,CAAE,MAAM,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC,EAAE,gBAAgB,GAAG,6CAAgD,MAAK,CAMjT,IAAM,MAA2B,CAChC,IAAM,EAAO,GAAY,EAAE,OAAS,gBAC9B,CAAE,KAAM,GAAgB,CAC9B,OAAuB,EAAI,EAAmB,CAC7C,OACA,OAAQ,EAAE,6BAA6B,CACvC,KAAsB,EAAI,EAAO,CAChC,QAAS,4BACT,WAAY,CACX,SAA0B,EAAI,KAAM,CAAE,UAAW,yBAA0B,CAAC,CAC5E,EAAmB,EAAI,IAAK,CAAE,UAAW,OAAQ,CAAC,CAClD,KAAsB,EAAI,KAAM,CAAE,UAAW,sBAAuB,CAAC,CACrE,OAAwB,EAAI,KAAM,EAAE,CAAC,CACrC,CACD,CAAC,CACF,cAAe,YACf,WAAY,QACZ,eAAkB,GAAc,CAChC,aAAc,CAAE,MAAO,CAAE,OAAQ,IAAK,CAAE,CACxC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{L as e,Ot as t,Y as n,_t as r,bt as i,c as a,i as o,kt as s}from"./dist-
|
|
2
|
-
//# sourceMappingURL=CreateDocumentModal-nQbLVDq3-
|
|
1
|
+
import{L as e,Ot as t,Y as n,_t as r,bt as i,c as a,i as o,kt as s}from"./dist-t-ezfpxv.js";import{f as c}from"./connect-CGvtDtZh.js";import{jsx as l}from"react/jsx-runtime";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`de1a1a50-6082-5719-9aff-a89fb7df007b`)}catch{}})();var u=()=>{let u=r(),d=u?.type===`createDocument`,f=n(d?u.documentType:void 0),[p]=t(),m=s(),h=i(),g=async t=>{a(),!(!p||!f)&&e(await o(p.header.id,t||`New ${f.documentModel.global.name}`,f.documentModel.global.id,m?.id??h?.id))};return l(c,{open:d,onContinue:e=>{g(e)},onOpenChange:e=>{if(!e)return a()}})};export{u as CreateDocumentModal};
|
|
2
|
+
//# sourceMappingURL=CreateDocumentModal-nQbLVDq3-DFAye2CX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateDocumentModal-nQbLVDq3-
|
|
1
|
+
{"version":3,"file":"CreateDocumentModal-nQbLVDq3-DFAye2CX.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@parcel+watcher@2.5.6_@sentry_92fbcdab943457b0ffd54c0864a4f38d/node_modules/@powerhousedao/connect/dist/CreateDocumentModal-nQbLVDq3.js"],"sourcesContent":["\n!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]=\"de1a1a50-6082-5719-9aff-a89fb7df007b\")}catch(e){}}();\nimport { jsx } from \"react/jsx-runtime\";\nimport { addDocument, closePHModal, setSelectedNode, useDocumentModelModuleById, usePHModal, useParentFolderForSelectedNode, useSelectedDriveSafe, useSelectedFolder } from \"@powerhousedao/reactor-browser\";\nimport { CreateDocumentModal as CreateDocumentModal$1 } from \"@powerhousedao/design-system/connect\";\n//#region src/components/modal/modals/CreateDocumentModal.tsx\nconst CreateDocumentModal = () => {\n\tconst phModal = usePHModal();\n\tconst open = phModal?.type === \"createDocument\";\n\tconst documentModel = useDocumentModelModuleById(open ? phModal.documentType : void 0);\n\tconst [selectedDrive] = useSelectedDriveSafe();\n\tconst selectedFolder = useSelectedFolder();\n\tconst parentFolder = useParentFolderForSelectedNode();\n\tconst onCreateDocument = async (documentName) => {\n\t\tclosePHModal();\n\t\tif (!selectedDrive || !documentModel) return;\n\t\tsetSelectedNode(await addDocument(selectedDrive.header.id, documentName || `New ${documentModel.documentModel.global.name}`, documentModel.documentModel.global.id, selectedFolder?.id ?? parentFolder?.id));\n\t};\n\treturn /* @__PURE__ */ jsx(CreateDocumentModal$1, {\n\t\topen,\n\t\tonContinue: (documentName) => {\n\t\t\tonCreateDocument(documentName);\n\t\t},\n\t\tonOpenChange: (status) => {\n\t\t\tif (!status) return closePHModal();\n\t\t}\n\t});\n};\n//#endregion\nexport { CreateDocumentModal };\n\n//# sourceMappingURL=CreateDocumentModal-nQbLVDq3.js.map\n//# debugId=de1a1a50-6082-5719-9aff-a89fb7df007b\n"],"x_google_ignoreList":[0],"mappings":"+KACC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAe,OAAO,OAApB,IAA2B,OAAoB,OAAO,OAApB,IAA2B,OAAoB,OAAO,WAApB,IAA+B,WAAwB,OAAO,KAApB,IAAyB,KAAK,EAAE,CAAC,EAAG,IAAI,EAAE,OAAK,CAAE,MAAM,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC,EAAE,gBAAgB,GAAG,6CAAgD,MAAK,CAKjT,IAAM,MAA4B,CACjC,IAAM,EAAU,GAAY,CACtB,EAAO,GAAS,OAAS,iBACzB,EAAgB,EAA2B,EAAO,EAAQ,aAAe,IAAK,GAAE,CAChF,CAAC,GAAiB,GAAsB,CACxC,EAAiB,GAAmB,CACpC,EAAe,GAAgC,CAC/C,EAAmB,KAAO,IAAiB,CAChD,GAAc,CACV,GAAC,GAAiB,CAAC,IACvB,EAAgB,MAAM,EAAY,EAAc,OAAO,GAAI,GAAgB,OAAO,EAAc,cAAc,OAAO,OAAQ,EAAc,cAAc,OAAO,GAAI,GAAgB,IAAM,GAAc,GAAG,CAAC,EAE7M,OAAuB,EAAI,EAAuB,CACjD,OACA,WAAa,GAAiB,CAC7B,EAAiB,EAAa,EAE/B,aAAe,GAAW,CACzB,GAAI,CAAC,EAAQ,OAAO,GAAc,EAEnC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_t as e,c as t}from"./dist-
|
|
2
|
-
//# sourceMappingURL=DebugSettingsModal-5SDhy5gt-
|
|
1
|
+
import{_t as e,c as t}from"./dist-t-ezfpxv.js";import{L as n,R as r,b as i,r as a}from"./connect-CGvtDtZh.js";import{n as o}from"./clsx-CtFH8AOT.js";import{r as s}from"./connect.config-Bt4pvvWV-Dj3FkjaZ.js";import{n as c,r as l,t as u}from"./build-info-cc1PjSvF-DtAGzh0W.js";import{t as d}from"./registerServiceWorker-D9l1kja7-DG3DqQna.js";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{useEffect as m,useState as h}from"react";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`46fc1fe5-b003-554a-8eb3-88c674da49ab`)}catch{}})();var g=()=>{let g=e()?.type===`debugSettings`,[_,v]=h(s.appVersion),[y,b]=h({label:d.debug?`Enabled`:`Disabled`,value:d.debug});return m(()=>{d.setDebug(y.value)},[y]),f(n,{open:g,onOpenChange:e=>{if(!e)return t()},contentProps:{className:`rounded-2xl`},children:p(`div`,{className:`w-[700px] rounded-2xl bg-background p-6`,children:[p(`div`,{className:`mb-6 flex justify-between`,children:[f(`div`,{className:`text-xl font-bold`,children:`Debug Tools`}),f(`button`,{id:`close-modal`,onClick:()=>t(),children:f(o,{name:`Xmark`,size:28})})]}),p(`div`,{className:`flex text-sm font-bold`,children:[f(o,{name:`Ring`,size:22}),p(`span`,{className:`ml-2`,children:[`App Version: `,s.appVersion]}),(()=>{let e=u();if(e===`unknown`)return null;let t=c(),n=l(e);return t?p(`a`,{className:`ml-2 font-mono text-xs font-normal text-info hover:underline`,href:t,target:`_blank`,rel:`noreferrer noopener`,title:e,children:[`(`,n,`)`]}):p(`span`,{className:`ml-2 font-mono text-xs font-normal text-muted-foreground`,title:e,children:[`(`,n,`)`]})})()]}),p(`div`,{className:`mt-4 flex text-sm font-bold`,children:[f(o,{name:`Hdd`,size:22}),f(`span`,{className:`ml-2`,children:`Drive Tools:`})]}),p(`div`,{className:`mt-4 flex text-sm font-bold`,children:[f(o,{name:`Gear`,size:22}),f(`span`,{className:`ml-2`,children:`Service Worker Tools:`})]}),f(`div`,{className:`mt-2 flex items-end justify-between pl-4`,children:p(`div`,{className:`w-[400px]`,children:[f(`label`,{htmlFor:`serviceWorkerDebugMode`,className:`text-xs`,children:`Service Worker Debug Mode:`}),f(a,{id:`serviceWorkerDebugMode`,onChange:e=>{b(e)},value:y,options:[{label:`Enabled`,value:!0},{label:`Disabled`,value:!1}]})]})}),p(`div`,{className:`mt-2 flex items-end justify-between pl-4`,children:[p(`div`,{className:`w-[400px]`,children:[f(`label`,{htmlFor:`appVersion`,className:`text-xs`,children:`Set invalid app version:`}),f(i,{containerClassName:`rounded-md border border-border bg-background p-1 text-sm`,inputClassName:`text-xs font-normal`,id:`appVersion`,icon:f(`div`,{className:`flex h-full items-center text-xs`,children:`Version:`}),value:_,onChange:e=>v(e.target.value)})]}),f(`div`,{className:`mb-1 flex items-center justify-center`,children:f(r,{color:_===``?`light`:`red`,size:`small`,disabled:_===``,onClick:()=>{d.sendMessage({type:`SET_APP_VERSION`,version:_}),v(``)},children:`Add Invalid App Version`})})]})]})})};export{g as DebugSettingsModal};
|
|
2
|
+
//# sourceMappingURL=DebugSettingsModal-5SDhy5gt-DLMPdDQB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DebugSettingsModal-5SDhy5gt-
|
|
1
|
+
{"version":3,"file":"DebugSettingsModal-5SDhy5gt-DLMPdDQB.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@parcel+watcher@2.5.6_@sentry_92fbcdab943457b0ffd54c0864a4f38d/node_modules/@powerhousedao/connect/dist/DebugSettingsModal-5SDhy5gt.js"],"sourcesContent":["\n!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]=\"46fc1fe5-b003-554a-8eb3-88c674da49ab\")}catch(e){}}();\nimport { n as getGitUrl, r as shortGitSha, t as getGitSha } from \"./build-info-cc1PjSvF.js\";\nimport { r as connectConfig } from \"./connect.config-Bt4pvvWV.js\";\nimport { t as serviceWorkerManager } from \"./registerServiceWorker-D9l1kja7.js\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { useEffect, useState } from \"react\";\nimport { closePHModal, usePHModal } from \"@powerhousedao/reactor-browser\";\nimport { Combobox, FormInput } from \"@powerhousedao/design-system/connect\";\nimport { Icon, Modal, PowerhouseButton } from \"@powerhousedao/design-system\";\n//#region src/components/modal/modals/DebugSettingsModal.tsx\nconst DebugSettingsModal = () => {\n\tconst open = usePHModal()?.type === \"debugSettings\";\n\tconst [appVersion, setAppVersion] = useState(connectConfig.appVersion);\n\tconst [serviceWorkerDebugMode, setServiceWorkerDebugMode] = useState({\n\t\tlabel: serviceWorkerManager.debug ? \"Enabled\" : \"Disabled\",\n\t\tvalue: serviceWorkerManager.debug\n\t});\n\tuseEffect(() => {\n\t\tserviceWorkerManager.setDebug(serviceWorkerDebugMode.value);\n\t}, [serviceWorkerDebugMode]);\n\treturn /* @__PURE__ */ jsx(Modal, {\n\t\topen,\n\t\tonOpenChange: (status) => {\n\t\t\tif (!status) return closePHModal();\n\t\t},\n\t\tcontentProps: { className: \"rounded-2xl\" },\n\t\tchildren: /* @__PURE__ */ jsxs(\"div\", {\n\t\t\tclassName: \"w-[700px] rounded-2xl bg-background p-6\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ jsxs(\"div\", {\n\t\t\t\t\tclassName: \"mb-6 flex justify-between\",\n\t\t\t\t\tchildren: [/* @__PURE__ */ jsx(\"div\", {\n\t\t\t\t\t\tclassName: \"text-xl font-bold\",\n\t\t\t\t\t\tchildren: \"Debug Tools\"\n\t\t\t\t\t}), /* @__PURE__ */ jsx(\"button\", {\n\t\t\t\t\t\tid: \"close-modal\",\n\t\t\t\t\t\tonClick: () => closePHModal(),\n\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(Icon, {\n\t\t\t\t\t\t\tname: \"Xmark\",\n\t\t\t\t\t\t\tsize: 28\n\t\t\t\t\t\t})\n\t\t\t\t\t})]\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ jsxs(\"div\", {\n\t\t\t\t\tclassName: \"flex text-sm font-bold\",\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t/* @__PURE__ */ jsx(Icon, {\n\t\t\t\t\t\t\tname: \"Ring\",\n\t\t\t\t\t\t\tsize: 22\n\t\t\t\t\t\t}),\n\t\t\t\t\t\t/* @__PURE__ */ jsxs(\"span\", {\n\t\t\t\t\t\t\tclassName: \"ml-2\",\n\t\t\t\t\t\t\tchildren: [\"App Version: \", connectConfig.appVersion]\n\t\t\t\t\t\t}),\n\t\t\t\t\t\t(() => {\n\t\t\t\t\t\t\tconst sha = getGitSha();\n\t\t\t\t\t\t\tif (sha === \"unknown\") return null;\n\t\t\t\t\t\t\tconst url = getGitUrl();\n\t\t\t\t\t\t\tconst label = shortGitSha(sha);\n\t\t\t\t\t\t\treturn url ? /* @__PURE__ */ jsxs(\"a\", {\n\t\t\t\t\t\t\t\tclassName: \"ml-2 font-mono text-xs font-normal text-info hover:underline\",\n\t\t\t\t\t\t\t\thref: url,\n\t\t\t\t\t\t\t\ttarget: \"_blank\",\n\t\t\t\t\t\t\t\trel: \"noreferrer noopener\",\n\t\t\t\t\t\t\t\ttitle: sha,\n\t\t\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t\t\t\"(\",\n\t\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\t\t\")\"\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}) : /* @__PURE__ */ jsxs(\"span\", {\n\t\t\t\t\t\t\t\tclassName: \"ml-2 font-mono text-xs font-normal text-muted-foreground\",\n\t\t\t\t\t\t\t\ttitle: sha,\n\t\t\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t\t\t\"(\",\n\t\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\t\t\")\"\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t})()\n\t\t\t\t\t]\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ jsxs(\"div\", {\n\t\t\t\t\tclassName: \"mt-4 flex text-sm font-bold\",\n\t\t\t\t\tchildren: [/* @__PURE__ */ jsx(Icon, {\n\t\t\t\t\t\tname: \"Hdd\",\n\t\t\t\t\t\tsize: 22\n\t\t\t\t\t}), /* @__PURE__ */ jsx(\"span\", {\n\t\t\t\t\t\tclassName: \"ml-2\",\n\t\t\t\t\t\tchildren: \"Drive Tools:\"\n\t\t\t\t\t})]\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ jsxs(\"div\", {\n\t\t\t\t\tclassName: \"mt-4 flex text-sm font-bold\",\n\t\t\t\t\tchildren: [/* @__PURE__ */ jsx(Icon, {\n\t\t\t\t\t\tname: \"Gear\",\n\t\t\t\t\t\tsize: 22\n\t\t\t\t\t}), /* @__PURE__ */ jsx(\"span\", {\n\t\t\t\t\t\tclassName: \"ml-2\",\n\t\t\t\t\t\tchildren: \"Service Worker Tools:\"\n\t\t\t\t\t})]\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ jsx(\"div\", {\n\t\t\t\t\tclassName: \"mt-2 flex items-end justify-between pl-4\",\n\t\t\t\t\tchildren: /* @__PURE__ */ jsxs(\"div\", {\n\t\t\t\t\t\tclassName: \"w-[400px]\",\n\t\t\t\t\t\tchildren: [/* @__PURE__ */ jsx(\"label\", {\n\t\t\t\t\t\t\thtmlFor: \"serviceWorkerDebugMode\",\n\t\t\t\t\t\t\tclassName: \"text-xs\",\n\t\t\t\t\t\t\tchildren: \"Service Worker Debug Mode:\"\n\t\t\t\t\t\t}), /* @__PURE__ */ jsx(Combobox, {\n\t\t\t\t\t\t\tid: \"serviceWorkerDebugMode\",\n\t\t\t\t\t\t\tonChange: (value) => {\n\t\t\t\t\t\t\t\tsetServiceWorkerDebugMode(value);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tvalue: serviceWorkerDebugMode,\n\t\t\t\t\t\t\toptions: [{\n\t\t\t\t\t\t\t\tlabel: \"Enabled\",\n\t\t\t\t\t\t\t\tvalue: true\n\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\tlabel: \"Disabled\",\n\t\t\t\t\t\t\t\tvalue: false\n\t\t\t\t\t\t\t}]\n\t\t\t\t\t\t})]\n\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ jsxs(\"div\", {\n\t\t\t\t\tclassName: \"mt-2 flex items-end justify-between pl-4\",\n\t\t\t\t\tchildren: [/* @__PURE__ */ jsxs(\"div\", {\n\t\t\t\t\t\tclassName: \"w-[400px]\",\n\t\t\t\t\t\tchildren: [/* @__PURE__ */ jsx(\"label\", {\n\t\t\t\t\t\t\thtmlFor: \"appVersion\",\n\t\t\t\t\t\t\tclassName: \"text-xs\",\n\t\t\t\t\t\t\tchildren: \"Set invalid app version:\"\n\t\t\t\t\t\t}), /* @__PURE__ */ jsx(FormInput, {\n\t\t\t\t\t\t\tcontainerClassName: \"rounded-md border border-border bg-background p-1 text-sm\",\n\t\t\t\t\t\t\tinputClassName: \"text-xs font-normal\",\n\t\t\t\t\t\t\tid: \"appVersion\",\n\t\t\t\t\t\t\ticon: /* @__PURE__ */ jsx(\"div\", {\n\t\t\t\t\t\t\t\tclassName: \"flex h-full items-center text-xs\",\n\t\t\t\t\t\t\t\tchildren: \"Version:\"\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tvalue: appVersion,\n\t\t\t\t\t\t\tonChange: (element) => setAppVersion(element.target.value)\n\t\t\t\t\t\t})]\n\t\t\t\t\t}), /* @__PURE__ */ jsx(\"div\", {\n\t\t\t\t\t\tclassName: \"mb-1 flex items-center justify-center\",\n\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(PowerhouseButton, {\n\t\t\t\t\t\t\tcolor: appVersion === \"\" ? \"light\" : \"red\",\n\t\t\t\t\t\t\tsize: \"small\",\n\t\t\t\t\t\t\tdisabled: appVersion === \"\",\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\tserviceWorkerManager.sendMessage({\n\t\t\t\t\t\t\t\t\ttype: \"SET_APP_VERSION\",\n\t\t\t\t\t\t\t\t\tversion: appVersion\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tsetAppVersion(\"\");\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tchildren: \"Add Invalid App Version\"\n\t\t\t\t\t\t})\n\t\t\t\t\t})]\n\t\t\t\t})\n\t\t\t]\n\t\t})\n\t});\n};\n//#endregion\nexport { DebugSettingsModal };\n\n//# sourceMappingURL=DebugSettingsModal-5SDhy5gt.js.map\n//# debugId=46fc1fe5-b003-554a-8eb3-88c674da49ab\n"],"x_google_ignoreList":[0],"mappings":"ubACC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAe,OAAO,OAApB,IAA2B,OAAoB,OAAO,OAApB,IAA2B,OAAoB,OAAO,WAApB,IAA+B,WAAwB,OAAO,KAApB,IAAyB,KAAK,EAAE,CAAC,EAAG,IAAI,EAAE,OAAK,CAAE,MAAM,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC,EAAE,gBAAgB,GAAG,6CAAgD,MAAK,CAUjT,IAAM,MAA2B,CAChC,IAAM,EAAO,GAAY,EAAE,OAAS,gBAC9B,CAAC,EAAY,GAAiB,EAAS,EAAc,WAAW,CAChE,CAAC,EAAwB,GAA6B,EAAS,CACpE,MAAO,EAAqB,MAAQ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Modal-6P0T1QgD-
|
|
1
|
+
import{I as e,_t as t,at as n,c as r,l as i,rt as a}from"./dist-t-ezfpxv.js";import{a as o}from"./connect-CGvtDtZh.js";import{n as s}from"./toast-BEy42aYx-Dg_jZf6v.js";import{t as c}from"./useTranslation-DQCCLfKw.js";import{jsx as l}from"react/jsx-runtime";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`cf203997-2a38-5ffa-a0f9-f5439b8ae8a7`)}catch{}})();var u=()=>{let u=t(),d=u?.type===`deleteDrive`,f=d?u.driveId:void 0,[p]=a(f),m=n(),{t:h}=c();if(!p)return null;async function g(){f&&(await i(f),e(m?.[0]),r(),s(h(`notifications.deleteDriveSuccess`),{type:`connect-deleted`}))}return l(o,{open:d,driveName:p.header.name,onCancel:r,header:h(`modals.deleteDrive.title`,{label:p.header.name}),body:h(`modals.deleteDrive.body`),inputPlaceholder:h(`modals.deleteDrive.inputPlaceholder`),cancelLabel:h(`common.cancel`),continueLabel:h(`common.delete`),onContinue:()=>{g()},onOpenChange:e=>{if(!e)return r()}})};export{u as DeleteDriveModal};
|
|
2
|
+
//# sourceMappingURL=DeleteDriveModal-6P0T1QgD-CK6cPXbT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteDriveModal-6P0T1QgD-
|
|
1
|
+
{"version":3,"file":"DeleteDriveModal-6P0T1QgD-CK6cPXbT.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@parcel+watcher@2.5.6_@sentry_92fbcdab943457b0ffd54c0864a4f38d/node_modules/@powerhousedao/connect/dist/DeleteDriveModal-6P0T1QgD.js"],"sourcesContent":["\n!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]=\"cf203997-2a38-5ffa-a0f9-f5439b8ae8a7\")}catch(e){}}();\nimport { n as toast } from \"./toast-BEy42aYx.js\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useTranslation } from \"react-i18next\";\nimport { closePHModal, deleteDrive, setSelectedDrive, useDriveById, useDrives, usePHModal } from \"@powerhousedao/reactor-browser\";\nimport { ConnectDeleteDriveModal } from \"@powerhousedao/design-system/connect\";\n//#region src/components/modal/modals/DeleteDriveModal.tsx\nconst DeleteDriveModal = () => {\n\tconst phModal = usePHModal();\n\tconst open = phModal?.type === \"deleteDrive\";\n\tconst driveId = open ? phModal.driveId : void 0;\n\tconst [drive] = useDriveById(driveId);\n\tconst drives = useDrives();\n\tconst { t } = useTranslation();\n\tif (!drive) return null;\n\tasync function onDeleteDrive() {\n\t\tif (!driveId) return;\n\t\tawait deleteDrive(driveId);\n\t\tsetSelectedDrive(drives?.[0]);\n\t\tclosePHModal();\n\t\ttoast(t(\"notifications.deleteDriveSuccess\"), { type: \"connect-deleted\" });\n\t}\n\treturn /* @__PURE__ */ jsx(ConnectDeleteDriveModal, {\n\t\topen,\n\t\tdriveName: drive.header.name,\n\t\tonCancel: closePHModal,\n\t\theader: t(\"modals.deleteDrive.title\", { label: drive.header.name }),\n\t\tbody: t(\"modals.deleteDrive.body\"),\n\t\tinputPlaceholder: t(\"modals.deleteDrive.inputPlaceholder\"),\n\t\tcancelLabel: t(\"common.cancel\"),\n\t\tcontinueLabel: t(\"common.delete\"),\n\t\tonContinue: () => {\n\t\t\tonDeleteDrive();\n\t\t},\n\t\tonOpenChange: (status) => {\n\t\t\tif (!status) return closePHModal();\n\t\t}\n\t});\n};\n//#endregion\nexport { DeleteDriveModal };\n\n//# sourceMappingURL=DeleteDriveModal-6P0T1QgD.js.map\n//# debugId=cf203997-2a38-5ffa-a0f9-f5439b8ae8a7\n"],"x_google_ignoreList":[0],"mappings":"kQACC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAe,OAAO,OAApB,IAA2B,OAAoB,OAAO,OAApB,IAA2B,OAAoB,OAAO,WAApB,IAA+B,WAAwB,OAAO,KAApB,IAAyB,KAAK,EAAE,CAAC,EAAG,IAAI,EAAE,OAAK,CAAE,MAAM,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC,EAAE,gBAAgB,GAAG,6CAAgD,MAAK,CAOjT,IAAM,MAAyB,CAC9B,IAAM,EAAU,GAAY,CACtB,EAAO,GAAS,OAAS,cACzB,EAAU,EAAO,EAAQ,QAAU,IAAK,GACxC,CAAC,GAAS,EAAa,EAAQ,CAC/B,EAAS,GAAW,CACpB,CAAE,KAAM,GAAgB,CAC9B,GAAI,CAAC,EAAO,OAAO,KACnB,eAAe,GAAgB,CACzB,IACL,MAAM,EAAY,EAAQ,CAC1B,EAAiB,IAAS,GAAG,CAC7B,GAAc,CACd,EAAM,EAAE,mCAAmC,CAAE,CAAE,KAAM,kBAAmB,CAAC,EAE1E,OAAuB,EAAI,EAAyB,CACnD,OACA,UAAW,EAAM,OAAO,KACxB,SAAU,EACV,OAAQ,EAAE,2BAA4B,CAAE,MAAO,EAAM,OAAO,KAAM,CAAC,CACnE,KAAM,EAAE,0BAA0B,CAClC,iBAAkB,EAAE,sCAAsC,CAC1D,YAAa,EAAE,gBAAgB,CAC/B,cAAe,EAAE,gBAAgB,CACjC,eAAkB,CACjB,GAAe,EAEhB,aAAe,GAAW,CACzB,GAAI,CAAC,EAAQ,OAAO,GAAc,EAEnC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Dt as e,L as t,_t as n,c as r,mt as i,pt as a,u as o}from"./dist-
|
|
2
|
-
//# sourceMappingURL=DeleteItemModal-BmV1aQyZ-
|
|
1
|
+
import{Dt as e,L as t,_t as n,c as r,mt as i,pt as a,u as o}from"./dist-t-ezfpxv.js";import{o as s}from"./connect-CGvtDtZh.js";import{n as c}from"./toast-BEy42aYx-Dg_jZf6v.js";import{t as l}from"./useTranslation-DQCCLfKw.js";import{jsx as u}from"react/jsx-runtime";import"react";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`e2df0048-6314-521e-ba60-170bf1406bb7`)}catch{}})();var d=()=>{let d=n(),f=d?.type===`deleteItem`,p=f?d.id:void 0,{t:m}=l(),h=a(p),g=h?.name,_=h?.kind,v=e(),y=i(h?.parentFolder);async function b(){if(!v||!p)return;r();let e=_===`FOLDER`?`notifications.deleteFolderSuccess`:`notifications.fileDeleteSuccess`;await o(v,p),t(y),c(m(e),{type:`connect-deleted`})}return u(s,{open:f,onDelete:()=>{b()},onCancel:()=>r(),header:m(`modals.deleteItem.${_?.toLowerCase()}.header`,{item:g}),body:m(`modals.deleteItem.${_?.toLowerCase()}.body`),cancelLabel:m(`common.cancel`),deleteLabel:m(`common.delete`)})};export{d as DeleteItemModal};
|
|
2
|
+
//# sourceMappingURL=DeleteItemModal-BmV1aQyZ-Ld9lHNhl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteItemModal-BmV1aQyZ-
|
|
1
|
+
{"version":3,"file":"DeleteItemModal-BmV1aQyZ-Ld9lHNhl.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@parcel+watcher@2.5.6_@sentry_92fbcdab943457b0ffd54c0864a4f38d/node_modules/@powerhousedao/connect/dist/DeleteItemModal-BmV1aQyZ.js"],"sourcesContent":["\n!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]=\"e2df0048-6314-521e-ba60-170bf1406bb7\")}catch(e){}}();\nimport { n as toast } from \"./toast-BEy42aYx.js\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useTranslation } from \"react-i18next\";\nimport \"react\";\nimport { closePHModal, deleteNode, setSelectedNode, useNodeById, useNodeParentFolderById, usePHModal, useSelectedDriveId } from \"@powerhousedao/reactor-browser\";\nimport { ConnectDeleteItemModal } from \"@powerhousedao/design-system/connect\";\n//#region src/components/modal/modals/DeleteItemModal.tsx\nconst DeleteItemModal = () => {\n\tconst phModal = usePHModal();\n\tconst open = phModal?.type === \"deleteItem\";\n\tconst id = open ? phModal.id : void 0;\n\tconst { t } = useTranslation();\n\tconst node = useNodeById(id);\n\tconst name = node?.name;\n\tconst kind = node?.kind;\n\tconst selectedDriveId = useSelectedDriveId();\n\tconst nodeParentFolder = useNodeParentFolderById(node?.parentFolder);\n\tasync function onDelete() {\n\t\tif (!selectedDriveId || !id) return;\n\t\tclosePHModal();\n\t\tconst i18nKey = kind === \"FOLDER\" ? \"notifications.deleteFolderSuccess\" : \"notifications.fileDeleteSuccess\";\n\t\tawait deleteNode(selectedDriveId, id);\n\t\tsetSelectedNode(nodeParentFolder);\n\t\ttoast(t(i18nKey), { type: \"connect-deleted\" });\n\t}\n\treturn /* @__PURE__ */ jsx(ConnectDeleteItemModal, {\n\t\topen,\n\t\tonDelete: () => {\n\t\t\tonDelete();\n\t\t},\n\t\tonCancel: () => closePHModal(),\n\t\theader: t(`modals.deleteItem.${kind?.toLowerCase()}.header`, { item: name }),\n\t\tbody: t(`modals.deleteItem.${kind?.toLowerCase()}.body`),\n\t\tcancelLabel: t(\"common.cancel\"),\n\t\tdeleteLabel: t(\"common.delete\")\n\t});\n};\n//#endregion\nexport { DeleteItemModal };\n\n//# sourceMappingURL=DeleteItemModal-BmV1aQyZ.js.map\n//# debugId=e2df0048-6314-521e-ba60-170bf1406bb7\n"],"x_google_ignoreList":[0],"mappings":"wRACC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAe,OAAO,OAApB,IAA2B,OAAoB,OAAO,OAApB,IAA2B,OAAoB,OAAO,WAApB,IAA+B,WAAwB,OAAO,KAApB,IAAyB,KAAK,EAAE,CAAC,EAAG,IAAI,EAAE,OAAK,CAAE,MAAM,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC,EAAE,gBAAgB,GAAG,6CAAgD,MAAK,CAQjT,IAAM,MAAwB,CAC7B,IAAM,EAAU,GAAY,CACtB,EAAO,GAAS,OAAS,aACzB,EAAK,EAAO,EAAQ,GAAK,IAAK,GAC9B,CAAE,KAAM,GAAgB,CACxB,EAAO,EAAY,EAAG,CACtB,EAAO,GAAM,KACb,EAAO,GAAM,KACb,EAAkB,GAAoB,CACtC,EAAmB,EAAwB,GAAM,aAAa,CACpE,eAAe,GAAW,CACzB,GAAI,CAAC,GAAmB,CAAC,EAAI,OAC7B,GAAc,CACd,IAAM,EAAU,IAAS,SAAW,oCAAsC,kCAC1E,MAAM,EAAW,EAAiB,EAAG,CACrC,EAAgB,EAAiB,CACjC,EAAM,EAAE,EAAQ,CAAE,CAAE,KAAM,kBAAmB,CAAC,CAE/C,OAAuB,EAAI,EAAwB,CAClD,OACA,aAAgB,CACf,GAAU,EAEX,aAAgB,GAAc,CAC9B,OAAQ,EAAE,qBAAqB,GAAM,aAAa,CAAC,SAAU,CAAE,KAAM,EAAM,CAAC,CAC5E,KAAM,EAAE,qBAAqB,GAAM,aAAa,CAAC,OAAO,CACxD,YAAa,EAAE,gBAAgB,CAC/B,YAAa,EAAE,gBAAgB,CAC/B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_t as e,c as t}from"./dist-
|
|
2
|
-
//# sourceMappingURL=DisclaimerModal-CVTFfN0_-
|
|
1
|
+
import{_t as e,c as t}from"./dist-t-ezfpxv.js";import{O as n}from"./connect-CGvtDtZh.js";import{t as r}from"./useTranslation-DQCCLfKw.js";import{jsx as i}from"react/jsx-runtime";import"react";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`91029662-c8e8-586b-a1f0-66fd09015a03`)}catch{}})();var a=()=>{let a=e()?.type===`disclaimer`,{t:o}=r();return i(n,{open:a,header:o(`modals.disclaimer.title`),body:o(`modals.disclaimer.body`),closeLabel:`Close`,onContinue:()=>t()})};export{a as DisclaimerModal};
|
|
2
|
+
//# sourceMappingURL=DisclaimerModal-CVTFfN0_-D7N9TDI4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisclaimerModal-CVTFfN0_-
|
|
1
|
+
{"version":3,"file":"DisclaimerModal-CVTFfN0_-D7N9TDI4.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@parcel+watcher@2.5.6_@sentry_92fbcdab943457b0ffd54c0864a4f38d/node_modules/@powerhousedao/connect/dist/DisclaimerModal-CVTFfN0_.js"],"sourcesContent":["\n!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]=\"91029662-c8e8-586b-a1f0-66fd09015a03\")}catch(e){}}();\nimport { jsx } from \"react/jsx-runtime\";\nimport { useTranslation } from \"react-i18next\";\nimport \"react\";\nimport { closePHModal, usePHModal } from \"@powerhousedao/reactor-browser\";\nimport { ReadRequiredModal } from \"@powerhousedao/design-system/connect\";\n//#region src/components/modal/modals/DisclaimerModal.tsx\nconst DisclaimerModal = () => {\n\tconst open = usePHModal()?.type === \"disclaimer\";\n\tconst { t } = useTranslation();\n\treturn /* @__PURE__ */ jsx(ReadRequiredModal, {\n\t\topen,\n\t\theader: t(\"modals.disclaimer.title\"),\n\t\tbody: t(\"modals.disclaimer.body\"),\n\t\tcloseLabel: \"Close\",\n\t\tonContinue: () => closePHModal()\n\t});\n};\n//#endregion\nexport { DisclaimerModal };\n\n//# sourceMappingURL=DisclaimerModal-CVTFfN0_.js.map\n//# debugId=91029662-c8e8-586b-a1f0-66fd09015a03\n"],"x_google_ignoreList":[0],"mappings":"iMACC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAe,OAAO,OAApB,IAA2B,OAAoB,OAAO,OAApB,IAA2B,OAAoB,OAAO,WAApB,IAA+B,WAAwB,OAAO,KAApB,IAAyB,KAAK,EAAE,CAAC,EAAG,IAAI,EAAE,OAAK,CAAE,MAAM,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC,EAAE,gBAAgB,GAAG,6CAAgD,MAAK,CAOjT,IAAM,MAAwB,CAC7B,IAAM,EAAO,GAAY,EAAE,OAAS,aAC9B,CAAE,KAAM,GAAgB,CAC9B,OAAuB,EAAI,EAAmB,CAC7C,OACA,OAAQ,EAAE,0BAA0B,CACpC,KAAM,EAAE,yBAAyB,CACjC,WAAY,QACZ,eAAkB,GAAc,CAChC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_t as e,c as t,d as n,on as r,zt as i}from"./dist-
|
|
2
|
-
//# sourceMappingURL=DownloadDocumentWithErrorsModal-CXeFUtaz-
|
|
1
|
+
import{_t as e,c as t,d as n,on as r,zt as i}from"./dist-t-ezfpxv.js";import{i as a}from"./connect-CGvtDtZh.js";import{t as o}from"./useTranslation-DQCCLfKw.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`a7b55a6e-52a1-5c09-acdf-913dafce0c61`)}catch{}})();function l(){let l=e(),u=l?.type===`downloadDocumentWithErrors`,[d]=r(u?l.documentId:void 0),{t:f}=o();if(!d)return null;let p=i(d);return s(a,{header:f(`modals.downloadDocumentWithErrors.title`),body:c(`div`,{children:[s(`p`,{children:f(`modals.downloadDocumentWithErrors.body`)}),s(`ul`,{className:`mt-4 flex list-disc flex-col items-start px-4 text-xs`,children:p.map((e,t)=>s(`li`,{children:e.message},t))})]}),cancelLabel:f(`common.cancel`),continueLabel:f(`common.export`),onCancel:()=>t(),onContinue:()=>{(async()=>{try{await n(d)}catch(e){console.error(e)}finally{t()}})()},open:u,onOpenChange:e=>{if(!e)return t()}})}export{l as DownloadDocumentWithErrorsModal};
|
|
2
|
+
//# sourceMappingURL=DownloadDocumentWithErrorsModal-CXeFUtaz-CYIIl42M.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloadDocumentWithErrorsModal-CXeFUtaz-
|
|
1
|
+
{"version":3,"file":"DownloadDocumentWithErrorsModal-CXeFUtaz-CYIIl42M.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@parcel+watcher@2.5.6_@sentry_92fbcdab943457b0ffd54c0864a4f38d/node_modules/@powerhousedao/connect/dist/DownloadDocumentWithErrorsModal-CXeFUtaz.js"],"sourcesContent":["\n!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]=\"a7b55a6e-52a1-5c09-acdf-913dafce0c61\")}catch(e){}}();\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { useTranslation } from \"react-i18next\";\nimport { closePHModal, exportFile, useDocumentById, usePHModal, validateDocument } from \"@powerhousedao/reactor-browser\";\nimport { ConnectConfirmationModal } from \"@powerhousedao/design-system/connect\";\n//#region src/components/modal/modals/DownloadDocumentWithErrorsModal.tsx\nfunction DownloadDocumentWithErrorsModal() {\n\tconst phModal = usePHModal();\n\tconst open = phModal?.type === \"downloadDocumentWithErrors\";\n\tconst [document] = useDocumentById(open ? phModal.documentId : void 0);\n\tconst { t } = useTranslation();\n\tif (!document) return null;\n\tconst validationErrors = validateDocument(document);\n\treturn /* @__PURE__ */ jsx(ConnectConfirmationModal, {\n\t\theader: t(\"modals.downloadDocumentWithErrors.title\"),\n\t\tbody: /* @__PURE__ */ jsxs(\"div\", { children: [/* @__PURE__ */ jsx(\"p\", { children: t(\"modals.downloadDocumentWithErrors.body\") }), /* @__PURE__ */ jsx(\"ul\", {\n\t\t\tclassName: \"mt-4 flex list-disc flex-col items-start px-4 text-xs\",\n\t\t\tchildren: validationErrors.map((error, index) => /* @__PURE__ */ jsx(\"li\", { children: error.message }, index))\n\t\t})] }),\n\t\tcancelLabel: t(\"common.cancel\"),\n\t\tcontinueLabel: t(\"common.export\"),\n\t\tonCancel: () => closePHModal(),\n\t\tonContinue: () => {\n\t\t\t(async () => {\n\t\t\t\ttry {\n\t\t\t\t\tawait exportFile(document);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error(error);\n\t\t\t\t} finally {\n\t\t\t\t\tclosePHModal();\n\t\t\t\t}\n\t\t\t})();\n\t\t},\n\t\topen,\n\t\tonOpenChange: (status) => {\n\t\t\tif (!status) return closePHModal();\n\t\t}\n\t});\n}\n//#endregion\nexport { DownloadDocumentWithErrorsModal };\n\n//# sourceMappingURL=DownloadDocumentWithErrorsModal-CXeFUtaz.js.map\n//# debugId=a7b55a6e-52a1-5c09-acdf-913dafce0c61\n"],"x_google_ignoreList":[0],"mappings":"oNACC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAe,OAAO,OAApB,IAA2B,OAAoB,OAAO,OAApB,IAA2B,OAAoB,OAAO,WAApB,IAA+B,WAAwB,OAAO,KAApB,IAAyB,KAAK,EAAE,CAAC,EAAG,IAAI,EAAE,OAAK,CAAE,MAAM,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC,EAAE,gBAAgB,GAAG,6CAAgD,MAAK,CAMjT,SAAS,GAAkC,CAC1C,IAAM,EAAU,GAAY,CACtB,EAAO,GAAS,OAAS,6BACzB,CAAC,GAAY,EAAgB,EAAO,EAAQ,WAAa,IAAK,GAAE,CAChE,CAAE,KAAM,GAAgB,CAC9B,GAAI,CAAC,EAAU,OAAO,KACtB,IAAM,EAAmB,EAAiB,EAAS,CACnD,OAAuB,EAAI,EAA0B,CACpD,OAAQ,EAAE,0CAA0C,CACpD,KAAsB,EAAK,MAAO,CAAE,SAAU,CAAiB,EAAI,IAAK,CAAE,SAAU,EAAE,yCAAyC,CAAE,CAAC,CAAkB,EAAI,KAAM,CAC7J,UAAW,wDACX,SAAU,EAAiB,KAAK,EAAO,IAA0B,EAAI,KAAM,CAAE,SAAU,EAAM,QAAS,CAAE,EAAM,CAAC,CAC/G,CAAC,CAAC,CAAE,CAAC,CACN,YAAa,EAAE,gBAAgB,CAC/B,cAAe,EAAE,gBAAgB,CACjC,aAAgB,GAAc,CAC9B,eAAkB,EAChB,SAAY,CACZ,GAAI,CACH,MAAM,EAAW,EAAS,OAClB,EAAO,CACf,QAAQ,MAAM,EAAM,QACX,CACT,GAAc,KAEZ,EAEL,OACA,aAAe,GAAW,CACzB,GAAI,CAAC,EAAQ,OAAO,GAAc,EAEnC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Kt as e,_t as t}from"./dist-
|
|
2
|
-
//# sourceMappingURL=DriveAuthRequiredModal-B3VdLwSH-
|
|
1
|
+
import{Kt as e,_t as t}from"./dist-t-ezfpxv.js";import{_ as n}from"./connect-CGvtDtZh.js";import{jsx as r}from"react/jsx-runtime";import"react";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`9c0b151a-51cc-5fce-acac-6c24bf72eeed`)}catch{}})();var i=()=>t()?.type===`driveAuthRequired`?r(`div`,{role:`dialog`,"aria-modal":`false`,"aria-label":`Log in to access this drive`,className:`pointer-events-none fixed inset-0 z-50 grid place-items-center bg-primary/30`,children:r(n,{onLogin:()=>e(),className:`pointer-events-auto`})}):null;export{i as DriveAuthRequiredModal};
|
|
2
|
+
//# sourceMappingURL=DriveAuthRequiredModal-B3VdLwSH-fqmI_4sF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DriveAuthRequiredModal-B3VdLwSH-
|
|
1
|
+
{"version":3,"file":"DriveAuthRequiredModal-B3VdLwSH-fqmI_4sF.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@parcel+watcher@2.5.6_@sentry_92fbcdab943457b0ffd54c0864a4f38d/node_modules/@powerhousedao/connect/dist/DriveAuthRequiredModal-B3VdLwSH.js"],"sourcesContent":["\n!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]=\"9c0b151a-51cc-5fce-acac-6c24bf72eeed\")}catch(e){}}();\nimport { jsx } from \"react/jsx-runtime\";\nimport \"react\";\nimport { openRenown, usePHModal } from \"@powerhousedao/reactor-browser\";\nimport { DriveAuthGate } from \"@powerhousedao/design-system/connect\";\n//#region src/components/modal/modals/DriveAuthRequiredModal.tsx\n/**\n* Shown when a protected drive can't be added because the user isn't logged in.\n*\n* Deliberately NOT a Radix modal dialog: a modal dialog blocks all outside\n* interaction, which would trap the cookie banner (rendered above at z-10000)\n* and prevent accepting/rejecting it. Instead this is a non-blocking overlay —\n* `pointer-events-none` on the backdrop (so the banner and page stay clickable)\n* with `pointer-events-auto` on the card — sitting below the cookie banner. The\n* card itself is the shared {@link DriveAuthGate}, identical to the full-page\n* gate. It stays up until login (the Renown CTA full-page-redirects).\n*/\nconst DriveAuthRequiredModal = () => {\n\tif (usePHModal()?.type !== \"driveAuthRequired\") return null;\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\trole: \"dialog\",\n\t\t\"aria-modal\": \"false\",\n\t\t\"aria-label\": \"Log in to access this drive\",\n\t\tclassName: \"pointer-events-none fixed inset-0 z-50 grid place-items-center bg-primary/30\",\n\t\tchildren: /* @__PURE__ */ jsx(DriveAuthGate, {\n\t\t\tonLogin: () => openRenown(),\n\t\t\tclassName: \"pointer-events-auto\"\n\t\t})\n\t});\n};\n//#endregion\nexport { DriveAuthRequiredModal };\n\n//# sourceMappingURL=DriveAuthRequiredModal-B3VdLwSH.js.map\n//# debugId=9c0b151a-51cc-5fce-acac-6c24bf72eeed\n"],"x_google_ignoreList":[0],"mappings":"iJACC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAe,OAAO,OAApB,IAA2B,OAAoB,OAAO,OAApB,IAA2B,OAAoB,OAAO,WAApB,IAA+B,WAAwB,OAAO,KAApB,IAAyB,KAAK,EAAE,CAAC,EAAG,IAAI,EAAE,OAAK,CAAE,MAAM,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC,EAAE,gBAAgB,GAAG,6CAAgD,MAAK,CAiBjT,IAAM,MACD,GAAY,EAAE,OAAS,oBACJ,EAAI,MAAO,CACjC,KAAM,SACN,aAAc,QACd,aAAc,8BACd,UAAW,+EACX,SAA0B,EAAI,EAAe,CAC5C,YAAe,GAAY,CAC3B,UAAW,sBACX,CAAC,CACF,CAAC,CAVqD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as e,Ft as t,T as n,V as r,_t as i,b as a,c as o,it as s,rt as c}from"./dist-
|
|
2
|
-
//# sourceMappingURL=DriveSettingsModal-CsNFEJ9E-
|
|
1
|
+
import{C as e,Ft as t,T as n,V as r,_t as i,b as a,c as o,it as s,rt as c}from"./dist-t-ezfpxv.js";import{v as l}from"./connect-CGvtDtZh.js";import{l as u}from"./worker-XYrQaEmt-w0FhumYk.js";import{jsx as d}from"react/jsx-runtime";import{useMemo as f}from"react";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`167ef96a-1596-51b6-b58b-b94eb3bdea90`)}catch{}})();function p(){let p=i(),m=p?.type===`driveSettings`,h=m?p.driveId:void 0,[g]=c(h),_=t(),v=f(()=>g?_.some(e=>e.collectionId.equals(u.forDrive(g.header.id))):!1,[_,g]),y=s(g);if(!h||!g)return null;async function b(e,t){await a(e.header.id,t)}async function x(e,t){await n(e.header.id,t)}async function S(t,n){await e(t.header.id,n)}return d(l,{drive:g,sharingType:v?`PUBLIC`:`LOCAL`,availableOffline:!v,systemInfo:y,open:m,onRenameDrive:(e,t)=>{b(e,t)},onDeleteDrive:()=>r({type:`deleteDrive`,driveId:h}),onChangeAvailableOffline:(e,t)=>{S(e,t)},onChangeSharingType:(e,t)=>{x(e,t)},onOpenChange:e=>{if(!e)return o()}})}export{p as DriveSettingsModal};
|
|
2
|
+
//# sourceMappingURL=DriveSettingsModal-CsNFEJ9E-BR2vyeU8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DriveSettingsModal-CsNFEJ9E-
|
|
1
|
+
{"version":3,"file":"DriveSettingsModal-CsNFEJ9E-BR2vyeU8.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@parcel+watcher@2.5.6_@sentry_92fbcdab943457b0ffd54c0864a4f38d/node_modules/@powerhousedao/connect/dist/DriveSettingsModal-CsNFEJ9E.js"],"sourcesContent":["\n!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]=\"167ef96a-1596-51b6-b58b-b94eb3bdea90\")}catch(e){}}();\nimport { jsx } from \"react/jsx-runtime\";\nimport { useMemo } from \"react\";\nimport { DriveCollectionId, closePHModal, renameDrive, setDriveAvailableOffline, setDriveSharingType, showPHModal, useDriveById, useDriveSystemInfo, usePHModal, useSyncList } from \"@powerhousedao/reactor-browser\";\nimport { DriveSettingsModal as DriveSettingsModal$1 } from \"@powerhousedao/design-system/connect\";\n//#region src/components/modal/modals/DriveSettingsModal.tsx\nfunction DriveSettingsModal() {\n\tconst phModal = usePHModal();\n\tconst open = phModal?.type === \"driveSettings\";\n\tconst driveId = open ? phModal.driveId : void 0;\n\tconst [drive] = useDriveById(driveId);\n\tconst remotes = useSyncList();\n\tconst isRemoteDrive = useMemo(() => {\n\t\tif (!drive) return false;\n\t\treturn remotes.some((remote) => remote.collectionId.equals(DriveCollectionId.forDrive(drive.header.id)));\n\t}, [remotes, drive]);\n\tconst systemInfo = useDriveSystemInfo(drive);\n\tif (!driveId || !drive) return null;\n\tasync function onRenameDrive(drive, newName) {\n\t\tawait renameDrive(drive.header.id, newName);\n\t}\n\tasync function onChangeSharingType(drive, newSharingType) {\n\t\tawait setDriveSharingType(drive.header.id, newSharingType);\n\t}\n\tasync function onChangeAvailableOffline(drive, newAvailableOffline) {\n\t\tawait setDriveAvailableOffline(drive.header.id, newAvailableOffline);\n\t}\n\treturn /* @__PURE__ */ jsx(DriveSettingsModal$1, {\n\t\tdrive,\n\t\tsharingType: isRemoteDrive ? \"PUBLIC\" : \"LOCAL\",\n\t\tavailableOffline: !isRemoteDrive,\n\t\tsystemInfo,\n\t\topen,\n\t\tonRenameDrive: (d, newName) => {\n\t\t\tonRenameDrive(d, newName);\n\t\t},\n\t\tonDeleteDrive: () => showPHModal({\n\t\t\ttype: \"deleteDrive\",\n\t\t\tdriveId\n\t\t}),\n\t\tonChangeAvailableOffline: (d, newAvailableOffline) => {\n\t\t\tonChangeAvailableOffline(d, newAvailableOffline);\n\t\t},\n\t\tonChangeSharingType: (d, newSharingType) => {\n\t\t\tonChangeSharingType(d, newSharingType);\n\t\t},\n\t\tonOpenChange: (status) => {\n\t\t\tif (!status) return closePHModal();\n\t\t}\n\t});\n}\n//#endregion\nexport { DriveSettingsModal };\n\n//# sourceMappingURL=DriveSettingsModal-CsNFEJ9E.js.map\n//# debugId=167ef96a-1596-51b6-b58b-b94eb3bdea90\n"],"x_google_ignoreList":[0],"mappings":"wQACC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAe,OAAO,OAApB,IAA2B,OAAoB,OAAO,OAApB,IAA2B,OAAoB,OAAO,WAApB,IAA+B,WAAwB,OAAO,KAApB,IAAyB,KAAK,EAAE,CAAC,EAAG,IAAI,EAAE,OAAK,CAAE,MAAM,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC,EAAE,gBAAgB,GAAG,6CAAgD,MAAK,CAMjT,SAAS,GAAqB,CAC7B,IAAM,EAAU,GAAY,CACtB,EAAO,GAAS,OAAS,gBACzB,EAAU,EAAO,EAAQ,QAAU,IAAK,GACxC,CAAC,GAAS,EAAa,EAAQ,CAC/B,EAAU,GAAa,CACvB,EAAgB,MAChB,EACE,EAAQ,KAAM,GAAW,EAAO,aAAa,OAAO,EAAkB,SAAS,EAAM,OAAO,GAAG,CAAC,CAAC,CADrF,GAEjB,CAAC,EAAS,EAAM,CAAC,CACd,EAAa,EAAmB,EAAM,CAC5C,GAAI,CAAC,GAAW,CAAC,EAAO,OAAO,KAC/B,eAAe,EAAc,EAAO,EAAS,CAC5C,MAAM,EAAY,EAAM,OAAO,GAAI,EAAQ,CAE5C,eAAe,EAAoB,EAAO,EAAgB,CACzD,MAAM,EAAoB,EAAM,OAAO,GAAI,EAAe,CAE3D,eAAe,EAAyB,EAAO,EAAqB,CACnE,MAAM,EAAyB,EAAM,OAAO,GAAI,EAAoB,CAErE,OAAuB,EAAI,EAAsB,CAChD,QACA,YAAa,EAAgB,SAAW,QACxC,iBAAkB,CAAC,EACnB,aACA,OACA,eAAgB,EAAG,IAAY,CAC9B,EAAc,EAAG,EAAQ,EAE1B,kBAAqB,EAAY,CAChC,KAAM,cACN,UACA,CAAC,CACF,0BAA2B,EAAG,IAAwB,CACrD,EAAyB,EAAG,EAAoB,EAEjD,qBAAsB,EAAG,IAAmB,CAC3C,EAAoB,EAAG,EAAe,EAEvC,aAAe,GAAW,CACzB,GAAI,CAAC,EAAQ,OAAO,GAAc,EAEnC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{K as e,Pt as t,_t as n,c as r,dn as i,gt as a,ln as o,q as s,s as c,un as l,xt as u}from"./dist-
|
|
1
|
+
import{K as e,Pt as t,_t as n,c as r,dn as i,gt as a,ln as o,q as s,s as c,un as l,xt as u}from"./dist-t-ezfpxv.js";import{w as d}from"./connect-CGvtDtZh.js";import{y as f}from"./worker-XYrQaEmt-w0FhumYk.js";import{m as p}from"./esm-0nAQjFUV.js";import{_ as m,g as h,l as g,p as _}from"./module-7zCQE1MC.js";import{t as v}from"./reactor-BxNvHOKC-CeMF1M2u.js";import{t as y}from"./pglite-seed-BWk7yOwr-b2F0oJiP.js";import{jsx as b}from"react/jsx-runtime";import{useCallback as x,useMemo as S,useSyncExternalStore as C}from"react";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`92a6ca0a-6b25-50be-8118-6da0537f14f9`)}catch{}})();async function w(e){await new Promise(t=>e.block(()=>t()))}async function T(e){await new Promise((t,n)=>{e.Module.FS.syncfs(!1,e=>e?n(e):t())})}var E=[`documentType`,`documentId`,`scope`,`branch`,`index`,`skip`];function D(){let e=s(),t=a(),n=u(),r=n?.reactorModule?.reactor,i=n?.reactorModule?.queue,o=x(async()=>{if(!e)return[];let t=await p`
|
|
2
2
|
SELECT
|
|
3
3
|
c.table_name,
|
|
4
4
|
c.column_name,
|
|
@@ -27,4 +27,4 @@ import{K as e,Pt as t,_t as n,c as r,dn as i,gt as a,ln as o,q as s,s as c,un as
|
|
|
27
27
|
WHERE nspname NOT IN ('pg_catalog', 'pg_toast', 'information_schema', 'public')
|
|
28
28
|
AND nspname NOT LIKE 'pg_temp_%'
|
|
29
29
|
AND nspname NOT LIKE 'pg_toast_temp_%'`);for(let{nspname:e}of n.rows)await t.exec(`DROP SCHEMA IF EXISTS "${e}" CASCADE`);try{await t.exec(`SET standard_conforming_strings = off;`)}catch{}await t.exec(e),await t.exec(`SET search_path TO ${f}`)}),await T(t),window.location.reload(),await new Promise(()=>{}))},[t,i,r]);return{getTables:o,getTableRows:c,getDefaultSort:x(e=>{if(e===`Operation`)return{column:`timestampUtcMs`,direction:`desc`}},[]),onExportDb:l,onImportDb:d}}var O=[16,17];function k(){let e=C(m,g,()=>void 0),t=x(async e=>{console.info(`[debug-inspector] Reset requested: PG${e}`);try{localStorage.setItem(y,String(e)),console.info(`[debug-inspector] Clearing reactor storage...`),await v(),console.info(`[debug-inspector] Storage cleared. Reloading...`),window.location.reload()}catch(e){throw console.error(`[debug-inspector] Reset failed:`,e),localStorage.removeItem(y),e}},[]);return{supportedPgVersions:O,currentPgVersion:e??null,onResetToPgVersion:t}}function A(){let e=u()?.reactorModule,t=S(()=>{if(e)return new o(e.keyframeStore,e.operationStore,e.writeCache,e.documentView,e.documentModelRegistry)},[e]),n=x(async(e,n)=>{if(!t)throw Error(`Reactor module not available`);return t.validateDocument(e,n)},[t]),r=x(async(e,n)=>{if(!t)throw Error(`Reactor module not available`);return t.rebuildKeyframes(e,n)},[t]),i=x(async(e,n)=>{if(!t)throw Error(`Reactor module not available`);return t.rebuildSnapshots(e,n)},[t]);if(t)return{onValidate:n,onRebuildKeyframes:r,onRebuildSnapshots:i}}function j(){let e=u()?.reactorModule?.processorManager,t=S(()=>e!=null,[e]),n=x(()=>e?Promise.resolve(e.getAll().map(e=>({processorId:e.processorId,factoryId:e.factoryId,driveId:e.driveId,processorIndex:e.processorIndex,lastOrdinal:e.lastOrdinal,status:e.status,lastError:e.lastError,lastErrorTimestamp:e.lastErrorTimestamp}))):Promise.resolve([]),[e]),r=x(async t=>{if(!e)return;let n=e.get(t);n&&await n.retry()},[e]);if(t)return{getProcessors:n,onRetry:r}}function M(){let e=u()?.reactorModule?.queue,t=S(()=>{if(e instanceof l)return e},[e]),n=x(()=>{if(!t)return Promise.resolve({isPaused:!1,pendingJobs:[],executingJobs:[],totalPending:0,totalExecuting:0});let e=t.getPendingJobs(),n=t.getExecutingJobIds(),r=[];for(let e of n.values())for(let n of e){let e=t.getJob(n);e&&r.push(e)}return Promise.resolve({isPaused:t.paused,pendingJobs:e,executingJobs:r,totalPending:e.length,totalExecuting:r.length})},[t]),r=x(()=>(t&&t.pause(),Promise.resolve()),[t]),i=x(async()=>{t&&await t.resume()},[t]);if(t)return{getQueueState:n,onPause:r,onResume:i}}function N(){let n=t();if(!n)throw Error(`Sync manager not found`);let r=e();return{getRemotes:x(()=>Promise.resolve(n.list()),[n]),removeRemote:x(e=>n.remove(e),[n]),addRemoteManual:x(async e=>{await c(e,void 0,{pollBehavior:i.Manual})},[]),triggerPull:x(e=>n.triggerPull(e),[n]),connectionStates:r}}var P=25,F=()=>{let e=n()?.type===`inspector`,{getTables:t,getTableRows:i,getDefaultSort:a,onExportDb:o,onImportDb:s}=D(),{getRemotes:c,removeRemote:l,addRemoteManual:u,triggerPull:p,connectionStates:m}=N(),h=M(),g=j(),_=A(),{currentPgVersion:v,supportedPgVersions:y,onResetToPgVersion:x}=k();return b(d,{open:e,onOpenChange:e=>{e||r()},dbExplorerProps:{schema:f,getTables:t,getTableRows:i,getDefaultSort:a,pageSize:P,onExportDb:o,onImportDb:s,pgVersionControl:{currentPgVersion:v,supportedPgVersions:y,onResetToPgVersion:x}},remotesInspectorProps:{getRemotes:c,removeRemote:l,addRemoteManual:u,triggerPull:p,connectionStates:m},queueInspectorProps:h,processorsInspectorProps:g,integrityInspectorProps:_})};export{F as InspectorModal};
|
|
30
|
-
//# sourceMappingURL=InspectorModal-BsSihzuc-
|
|
30
|
+
//# sourceMappingURL=InspectorModal-BsSihzuc-B0n5gbGB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InspectorModal-BsSihzuc-hukmcBoP.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@fastify+websocket@11.2.0_@pa_aece1239503ec1d247219d4d3615d518/node_modules/@powerhousedao/connect/dist/InspectorModal-BsSihzuc.js"],"sourcesContent":["\n!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]=\"92a6ca0a-6b25-50be-8118-6da0537f14f9\")}catch(e){}}();\nimport { c as subscribeReactorPgMajor, o as loadPgDump, r as getCachedReactorPgMajor, s as resolvePgMajorForRuntime } from \"./pglite-runtime-Ch2YeUAA.js\";\nimport { t as PENDING_PG_SEED_KEY } from \"./pglite-seed-BWk7yOwr.js\";\nimport { t as clearReactorStorage } from \"./reactor-BxNvHOKC.js\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useCallback, useMemo, useSyncExternalStore } from \"react\";\nimport { DocumentIntegrityService, InMemoryQueue, PollBehavior, REACTOR_SCHEMA, addRemoteDrive, closePHModal, useConnectionStates, useDatabase, usePGlite, usePHModal, useReactorClientModule, useSync } from \"@powerhousedao/reactor-browser\";\nimport { InspectorModal as InspectorModal$1 } from \"@powerhousedao/design-system/connect\";\nimport { sql } from \"kysely\";\n//#region src/components/modal/modals/InspectorModal/useDbExplorer.ts\nasync function quiesceQueue(queue) {\n\tawait new Promise((resolve) => queue.block(() => resolve()));\n}\nasync function syncPgliteToIdb(pglite) {\n\tawait new Promise((resolve, reject) => {\n\t\tpglite.Module.FS.syncfs(false, (err) => err ? reject(err) : resolve());\n\t});\n}\nconst PRIORITY_COLUMNS = [\n\t\"documentType\",\n\t\"documentId\",\n\t\"scope\",\n\t\"branch\",\n\t\"index\",\n\t\"skip\"\n];\nfunction useDbExplorer() {\n\tconst database = useDatabase();\n\tconst pglite = usePGlite();\n\tconst reactorClientModule = useReactorClientModule();\n\tconst reactor = reactorClientModule?.reactorModule?.reactor;\n\tconst queue = reactorClientModule?.reactorModule?.queue;\n\tconst getTables = useCallback(async () => {\n\t\tif (!database) return [];\n\t\tconst result = await sql`\n SELECT\n c.table_name,\n c.column_name,\n c.data_type,\n c.is_nullable\n FROM information_schema.columns c\n INNER JOIN information_schema.tables t\n ON c.table_name = t.table_name\n AND c.table_schema = t.table_schema\n WHERE c.table_schema = ${REACTOR_SCHEMA}\n AND t.table_type = 'BASE TABLE'\n ORDER BY c.table_name, c.ordinal_position\n `.execute(database);\n\t\tconst tableMap = /* @__PURE__ */ new Map();\n\t\tfor (const row of result.rows) {\n\t\t\tif (!tableMap.has(row.table_name)) tableMap.set(row.table_name, []);\n\t\t\ttableMap.get(row.table_name).push({\n\t\t\t\tname: row.column_name,\n\t\t\t\tdataType: row.data_type,\n\t\t\t\tisNullable: row.is_nullable === \"YES\"\n\t\t\t});\n\t\t}\n\t\treturn Array.from(tableMap).map(([name, columns]) => {\n\t\t\tconst columnNames = columns.map((col) => col.name);\n\t\t\treturn {\n\t\t\t\tname,\n\t\t\t\tcolumns: [...PRIORITY_COLUMNS.filter((col) => columnNames.includes(col)).map((col) => columns.find((c) => c.name === col)), ...columns.filter((col) => !PRIORITY_COLUMNS.includes(col.name))]\n\t\t\t};\n\t\t});\n\t}, [database]);\n\tconst getTableRows = useCallback(async (table, options) => {\n\t\tif (!database) return {\n\t\t\tcolumns: [],\n\t\t\trows: [],\n\t\t\ttotal: null\n\t\t};\n\t\tconst limit = options.limit;\n\t\tconst offset = options.offset;\n\t\tconst sort = options.sort;\n\t\tconst filters = options.filters;\n\t\tconst tableRef = sql.raw(`${REACTOR_SCHEMA}.\"${table}\"`);\n\t\tlet whereClause = sql``;\n\t\tif (filters?.clauses && filters.clauses.length > 0) {\n\t\t\tconst conditions = [];\n\t\t\tfor (let i = 0; i < filters.clauses.length; i++) {\n\t\t\t\tconst clause = filters.clauses[i];\n\t\t\t\tif (!clause) continue;\n\t\t\t\tconst columnRef = sql.raw(`\"${clause.column}\"`);\n\t\t\t\tlet condition;\n\t\t\t\tif (clause.operator === \"IS NULL\") condition = sql`${columnRef} IS NULL`;\n\t\t\t\telse if (clause.operator === \"IS NOT NULL\") condition = sql`${columnRef} IS NOT NULL`;\n\t\t\t\telse if (clause.operator === \"LIKE\" || clause.operator === \"ILIKE\") {\n\t\t\t\t\tconst value = clause.value;\n\t\t\t\t\tcondition = sql`${columnRef} ${clause.operator === \"LIKE\" ? sql`LIKE` : sql`ILIKE`} ${value}`;\n\t\t\t\t} else {\n\t\t\t\t\tconst operator = sql.raw(clause.operator);\n\t\t\t\t\tconst value = clause.value;\n\t\t\t\t\tlet parsedValue = value;\n\t\t\t\t\tif (value !== \"\" && !isNaN(Number(value)) && value.trim() !== \"\") parsedValue = Number(value);\n\t\t\t\t\tcondition = sql`${columnRef} ${operator} ${parsedValue}`;\n\t\t\t\t}\n\t\t\t\tconditions.push(condition);\n\t\t\t\tif (i < filters.clauses.length - 1) {\n\t\t\t\t\tconst connector = filters.connectors?.[i] ?? \"AND\";\n\t\t\t\t\tconditions.push(sql.raw(connector));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (conditions.length > 0) whereClause = sql`WHERE ${sql.join(conditions, sql` `)}`;\n\t\t}\n\t\tlet query;\n\t\tif (sort) {\n\t\t\tconst columnRef = sql.raw(`\"${sort.column}\"`);\n\t\t\tconst direction = sort.direction === \"desc\" ? sql`DESC` : sql`ASC`;\n\t\t\tquery = sql`\n SELECT * FROM ${tableRef}\n ${whereClause}\n ORDER BY ${columnRef} ${direction}\n LIMIT ${limit} OFFSET ${offset}\n `;\n\t\t} else query = sql`\n SELECT * FROM ${tableRef}\n ${whereClause}\n LIMIT ${limit} OFFSET ${offset}\n `;\n\t\tconst result = await query.execute(database);\n\t\tconst countResult = await sql`\n SELECT COUNT(*) as count FROM ${tableRef}\n ${whereClause}\n `.execute(database);\n\t\tconst total = countResult.rows[0] ? parseInt(countResult.rows[0].count, 10) : null;\n\t\tconst rawColumns = result.rows.length > 0 ? Object.keys(result.rows[0]) : [];\n\t\treturn {\n\t\t\tcolumns: [...PRIORITY_COLUMNS.filter((col) => rawColumns.includes(col)), ...rawColumns.filter((col) => !PRIORITY_COLUMNS.includes(col))],\n\t\t\trows: result.rows,\n\t\t\ttotal\n\t\t};\n\t}, [database]);\n\tconst onExportDb = useCallback(async () => {\n\t\tif (!pglite) return;\n\t\tif (queue) await quiesceQueue(queue);\n\t\ttry {\n\t\t\tconst sqlContent = await (await (await loadPgDump(resolvePgMajorForRuntime(getCachedReactorPgMajor() ?? null)))({ pg: pglite })).text();\n\t\t\tconst blob = new Blob([sqlContent], { type: \"text/sql\" });\n\t\t\tconst url = URL.createObjectURL(blob);\n\t\t\tconst a = document.createElement(\"a\");\n\t\t\ta.href = url;\n\t\t\ta.download = `database-export-${Date.now()}.sql`;\n\t\t\ta.click();\n\t\t\tURL.revokeObjectURL(url);\n\t\t} finally {\n\t\t\tqueue?.unblock();\n\t\t}\n\t}, [pglite, queue]);\n\tconst onImportDb = useCallback(async (sqlContent) => {\n\t\tif (!pglite) return;\n\t\tif (queue) await quiesceQueue(queue);\n\t\tif (reactor) await reactor.kill().completed;\n\t\tawait pglite.transaction(async (tx) => {\n\t\t\tconst schemas = await tx.query(`SELECT nspname FROM pg_namespace\n WHERE nspname NOT IN ('pg_catalog', 'pg_toast', 'information_schema', 'public')\n AND nspname NOT LIKE 'pg_temp_%'\n AND nspname NOT LIKE 'pg_toast_temp_%'`);\n\t\t\tfor (const { nspname } of schemas.rows) await tx.exec(`DROP SCHEMA IF EXISTS \"${nspname}\" CASCADE`);\n\t\t\ttry {\n\t\t\t\tawait tx.exec(\"SET standard_conforming_strings = off;\");\n\t\t\t} catch {}\n\t\t\tawait tx.exec(sqlContent);\n\t\t\tawait tx.exec(`SET search_path TO ${REACTOR_SCHEMA}`);\n\t\t});\n\t\tawait syncPgliteToIdb(pglite);\n\t\twindow.location.reload();\n\t\tawait new Promise(() => {});\n\t}, [\n\t\tpglite,\n\t\tqueue,\n\t\treactor\n\t]);\n\treturn {\n\t\tgetTables,\n\t\tgetTableRows,\n\t\tgetDefaultSort: useCallback((table) => {\n\t\t\tif (table === \"Operation\") return {\n\t\t\t\tcolumn: \"timestampUtcMs\",\n\t\t\t\tdirection: \"desc\"\n\t\t\t};\n\t\t}, []),\n\t\tonExportDb,\n\t\tonImportDb\n\t};\n}\n//#endregion\n//#region src/components/modal/modals/InspectorModal/useDebugInspector.ts\nconst SUPPORTED_PG_VERSIONS = [16, 17];\nfunction useDebugInspector() {\n\tconst currentPgVersion = useSyncExternalStore(subscribeReactorPgMajor, getCachedReactorPgMajor, () => void 0);\n\tconst onResetToPgVersion = useCallback(async (major) => {\n\t\tconsole.info(`[debug-inspector] Reset requested: PG${major}`);\n\t\ttry {\n\t\t\tlocalStorage.setItem(PENDING_PG_SEED_KEY, String(major));\n\t\t\tconsole.info(`[debug-inspector] Clearing reactor storage...`);\n\t\t\tawait clearReactorStorage();\n\t\t\tconsole.info(`[debug-inspector] Storage cleared. Reloading...`);\n\t\t\twindow.location.reload();\n\t\t} catch (err) {\n\t\t\tconsole.error(\"[debug-inspector] Reset failed:\", err);\n\t\t\tlocalStorage.removeItem(PENDING_PG_SEED_KEY);\n\t\t\tthrow err;\n\t\t}\n\t}, []);\n\treturn {\n\t\tsupportedPgVersions: SUPPORTED_PG_VERSIONS,\n\t\tcurrentPgVersion: currentPgVersion ?? null,\n\t\tonResetToPgVersion\n\t};\n}\n//#endregion\n//#region src/components/modal/modals/InspectorModal/useIntegrityInspector.ts\nfunction useIntegrityInspector() {\n\tconst reactorModule = useReactorClientModule()?.reactorModule;\n\tconst service = useMemo(() => {\n\t\tif (!reactorModule) return void 0;\n\t\treturn new DocumentIntegrityService(reactorModule.keyframeStore, reactorModule.operationStore, reactorModule.writeCache, reactorModule.documentView, reactorModule.documentModelRegistry);\n\t}, [reactorModule]);\n\tconst onValidate = useCallback(async (documentId, branch) => {\n\t\tif (!service) throw new Error(\"Reactor module not available\");\n\t\treturn service.validateDocument(documentId, branch);\n\t}, [service]);\n\tconst onRebuildKeyframes = useCallback(async (documentId, branch) => {\n\t\tif (!service) throw new Error(\"Reactor module not available\");\n\t\treturn service.rebuildKeyframes(documentId, branch);\n\t}, [service]);\n\tconst onRebuildSnapshots = useCallback(async (documentId, branch) => {\n\t\tif (!service) throw new Error(\"Reactor module not available\");\n\t\treturn service.rebuildSnapshots(documentId, branch);\n\t}, [service]);\n\tif (!service) return;\n\treturn {\n\t\tonValidate,\n\t\tonRebuildKeyframes,\n\t\tonRebuildSnapshots\n\t};\n}\n//#endregion\n//#region src/components/modal/modals/InspectorModal/useProcessorsInspector.ts\nfunction useProcessorsInspector() {\n\tconst processorManager = useReactorClientModule()?.reactorModule?.processorManager;\n\tconst hasProcessorManager = useMemo(() => processorManager != null, [processorManager]);\n\tconst getProcessors = useCallback(() => {\n\t\tif (!processorManager) return Promise.resolve([]);\n\t\treturn Promise.resolve(processorManager.getAll().map((tracked) => ({\n\t\t\tprocessorId: tracked.processorId,\n\t\t\tfactoryId: tracked.factoryId,\n\t\t\tdriveId: tracked.driveId,\n\t\t\tprocessorIndex: tracked.processorIndex,\n\t\t\tlastOrdinal: tracked.lastOrdinal,\n\t\t\tstatus: tracked.status,\n\t\t\tlastError: tracked.lastError,\n\t\t\tlastErrorTimestamp: tracked.lastErrorTimestamp\n\t\t})));\n\t}, [processorManager]);\n\tconst onRetry = useCallback(async (processorId) => {\n\t\tif (!processorManager) return;\n\t\tconst tracked = processorManager.get(processorId);\n\t\tif (tracked) await tracked.retry();\n\t}, [processorManager]);\n\tif (!hasProcessorManager) return;\n\treturn {\n\t\tgetProcessors,\n\t\tonRetry\n\t};\n}\n//#endregion\n//#region src/components/modal/modals/InspectorModal/useQueueInspector.ts\nfunction useQueueInspector() {\n\tconst queue = useReactorClientModule()?.reactorModule?.queue;\n\tconst inMemoryQueue = useMemo(() => {\n\t\tif (queue instanceof InMemoryQueue) return queue;\n\t}, [queue]);\n\tconst getQueueState = useCallback(() => {\n\t\tif (!inMemoryQueue) return Promise.resolve({\n\t\t\tisPaused: false,\n\t\t\tpendingJobs: [],\n\t\t\texecutingJobs: [],\n\t\t\ttotalPending: 0,\n\t\t\ttotalExecuting: 0\n\t\t});\n\t\tconst pendingJobs = inMemoryQueue.getPendingJobs();\n\t\tconst executingJobIds = inMemoryQueue.getExecutingJobIds();\n\t\tconst executingJobs = [];\n\t\tfor (const jobIdSet of executingJobIds.values()) for (const jobId of jobIdSet) {\n\t\t\tconst job = inMemoryQueue.getJob(jobId);\n\t\t\tif (job) executingJobs.push(job);\n\t\t}\n\t\treturn Promise.resolve({\n\t\t\tisPaused: inMemoryQueue.paused,\n\t\t\tpendingJobs,\n\t\t\texecutingJobs,\n\t\t\ttotalPending: pendingJobs.length,\n\t\t\ttotalExecuting: executingJobs.length\n\t\t});\n\t}, [inMemoryQueue]);\n\tconst onPause = useCallback(() => {\n\t\tif (inMemoryQueue) inMemoryQueue.pause();\n\t\treturn Promise.resolve();\n\t}, [inMemoryQueue]);\n\tconst onResume = useCallback(async () => {\n\t\tif (inMemoryQueue) await inMemoryQueue.resume();\n\t}, [inMemoryQueue]);\n\tif (!inMemoryQueue) return;\n\treturn {\n\t\tgetQueueState,\n\t\tonPause,\n\t\tonResume\n\t};\n}\n//#endregion\n//#region src/components/modal/modals/InspectorModal/useRemotesInspector.ts\nfunction useRemotesInspector() {\n\tconst syncManager = useSync();\n\tif (!syncManager) throw new Error(\"Sync manager not found\");\n\tconst connectionStates = useConnectionStates();\n\treturn {\n\t\tgetRemotes: useCallback(() => {\n\t\t\treturn Promise.resolve(syncManager.list());\n\t\t}, [syncManager]),\n\t\tremoveRemote: useCallback((name) => syncManager.remove(name), [syncManager]),\n\t\taddRemoteManual: useCallback(async (url) => {\n\t\t\tawait addRemoteDrive(url, void 0, { pollBehavior: PollBehavior.Manual });\n\t\t}, []),\n\t\ttriggerPull: useCallback((name) => syncManager.triggerPull(name), [syncManager]),\n\t\tconnectionStates\n\t};\n}\n//#endregion\n//#region src/components/modal/modals/InspectorModal/InspectorModal.tsx\nconst DEFAULT_PAGE_SIZE = 25;\nconst InspectorModal = () => {\n\tconst open = usePHModal()?.type === \"inspector\";\n\tconst { getTables, getTableRows, getDefaultSort, onExportDb, onImportDb } = useDbExplorer();\n\tconst { getRemotes, removeRemote, addRemoteManual, triggerPull, connectionStates } = useRemotesInspector();\n\tconst queueInspectorProps = useQueueInspector();\n\tconst processorsInspectorProps = useProcessorsInspector();\n\tconst integrityInspectorProps = useIntegrityInspector();\n\tconst { currentPgVersion, supportedPgVersions, onResetToPgVersion } = useDebugInspector();\n\treturn /* @__PURE__ */ jsx(InspectorModal$1, {\n\t\topen,\n\t\tonOpenChange: (status) => {\n\t\t\tif (!status) closePHModal();\n\t\t},\n\t\tdbExplorerProps: {\n\t\t\tschema: REACTOR_SCHEMA,\n\t\t\tgetTables,\n\t\t\tgetTableRows,\n\t\t\tgetDefaultSort,\n\t\t\tpageSize: DEFAULT_PAGE_SIZE,\n\t\t\tonExportDb,\n\t\t\tonImportDb,\n\t\t\tpgVersionControl: {\n\t\t\t\tcurrentPgVersion,\n\t\t\t\tsupportedPgVersions,\n\t\t\t\tonResetToPgVersion\n\t\t\t}\n\t\t},\n\t\tremotesInspectorProps: {\n\t\t\tgetRemotes,\n\t\t\tremoveRemote,\n\t\t\taddRemoteManual,\n\t\t\ttriggerPull,\n\t\t\tconnectionStates\n\t\t},\n\t\tqueueInspectorProps,\n\t\tprocessorsInspectorProps,\n\t\tintegrityInspectorProps\n\t});\n};\n//#endregion\nexport { InspectorModal };\n\n//# sourceMappingUR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,QAAQ,EAAY,MAAM,CAAC,CACxC,CAAC,EAAY,CAAC,CACjB,aAAc,EAAa,GAAS,EAAY,OAAO,EAAK,CAAE,CAAC,EAAY,CAAC,CAC5E,gBAAiB,EAAY,KAAO,IAAQ,CAC3C,MAAM,EAAe,EAAK,IAAK,GAAG,CAAE,aAAc,EAAa,OAAQ,CAAC,EACtE,EAAE,CAAC,CACN,YAAa,EAAa,GAAS,EAAY,YAAY,EAAK,CAAE,CAAC,EAAY,CAAC,CAChF,mBACA,CAIF,IAAM,EAAoB,GACpB,MAAuB,CAC5B,IAAM,EAAO,GAAY,EAAE,OAAS,YAC9B,CAAE,YAAW,eAAc,iBAAgB,aAAY,cAAe,GAAe,CACrF,CAAE,aAAY,eAAc,kBAAiB,cAAa,oBAAqB,GAAqB,CACpG,EAAsB,GAAmB,CACzC,EAA2B,GAAwB,CACnD,EAA0B,GAAuB,CACjD,CAAE,mBAAkB,sBAAqB,sBAAuB,GAAmB,CACzF,OAAuB,EAAI,EAAkB,CAC5C,OACA,aAAe,GAAW,CACpB,GAAQ,GAAc,EAE5B,gBAAiB,CAChB,OAAQ,EACR,YACA,eACA,iBACA,SAAU,EACV,aACA,aACA,iBAAkB,CACjB,mBACA,sBACA,qBACA,CACD,CACD,sBAAuB,CACtB,aACA,eACA,kBACA,cACA,mBACA,CACD,sBACA,2BACA,0BACA,CAAC"}
|
|
1
|
+
{"version":3,"file":"InspectorModal-BsSihzuc-B0n5gbGB.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@parcel+watcher@2.5.6_@sentry_92fbcdab943457b0ffd54c0864a4f38d/node_modules/@powerhousedao/connect/dist/InspectorModal-BsSihzuc.js"],"sourcesContent":["\n!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]=\"92a6ca0a-6b25-50be-8118-6da0537f14f9\")}catch(e){}}();\nimport { c as subscribeReactorPgMajor, o as loadPgDump, r as getCachedReactorPgMajor, s as resolvePgMajorForRuntime } from \"./pglite-runtime-Ch2YeUAA.js\";\nimport { t as PENDING_PG_SEED_KEY } from \"./pglite-seed-BWk7yOwr.js\";\nimport { t as clearReactorStorage } from \"./reactor-BxNvHOKC.js\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useCallback, useMemo, useSyncExternalStore } from \"react\";\nimport { DocumentIntegrityService, InMemoryQueue, PollBehavior, REACTOR_SCHEMA, addRemoteDrive, closePHModal, useConnectionStates, useDatabase, usePGlite, usePHModal, useReactorClientModule, useSync } from \"@powerhousedao/reactor-browser\";\nimport { InspectorModal as InspectorModal$1 } from \"@powerhousedao/design-system/connect\";\nimport { sql } from \"kysely\";\n//#region src/components/modal/modals/InspectorModal/useDbExplorer.ts\nasync function quiesceQueue(queue) {\n\tawait new Promise((resolve) => queue.block(() => resolve()));\n}\nasync function syncPgliteToIdb(pglite) {\n\tawait new Promise((resolve, reject) => {\n\t\tpglite.Module.FS.syncfs(false, (err) => err ? reject(err) : resolve());\n\t});\n}\nconst PRIORITY_COLUMNS = [\n\t\"documentType\",\n\t\"documentId\",\n\t\"scope\",\n\t\"branch\",\n\t\"index\",\n\t\"skip\"\n];\nfunction useDbExplorer() {\n\tconst database = useDatabase();\n\tconst pglite = usePGlite();\n\tconst reactorClientModule = useReactorClientModule();\n\tconst reactor = reactorClientModule?.reactorModule?.reactor;\n\tconst queue = reactorClientModule?.reactorModule?.queue;\n\tconst getTables = useCallback(async () => {\n\t\tif (!database) return [];\n\t\tconst result = await sql`\n SELECT\n c.table_name,\n c.column_name,\n c.data_type,\n c.is_nullable\n FROM information_schema.columns c\n INNER JOIN information_schema.tables t\n ON c.table_name = t.table_name\n AND c.table_schema = t.table_schema\n WHERE c.table_schema = ${REACTOR_SCHEMA}\n AND t.table_type = 'BASE TABLE'\n ORDER BY c.table_name, c.ordinal_position\n `.execute(database);\n\t\tconst tableMap = /* @__PURE__ */ new Map();\n\t\tfor (const row of result.rows) {\n\t\t\tif (!tableMap.has(row.table_name)) tableMap.set(row.table_name, []);\n\t\t\ttableMap.get(row.table_name).push({\n\t\t\t\tname: row.column_name,\n\t\t\t\tdataType: row.data_type,\n\t\t\t\tisNullable: row.is_nullable === \"YES\"\n\t\t\t});\n\t\t}\n\t\treturn Array.from(tableMap).map(([name, columns]) => {\n\t\t\tconst columnNames = columns.map((col) => col.name);\n\t\t\treturn {\n\t\t\t\tname,\n\t\t\t\tcolumns: [...PRIORITY_COLUMNS.filter((col) => columnNames.includes(col)).map((col) => columns.find((c) => c.name === col)), ...columns.filter((col) => !PRIORITY_COLUMNS.includes(col.name))]\n\t\t\t};\n\t\t});\n\t}, [database]);\n\tconst getTableRows = useCallback(async (table, options) => {\n\t\tif (!database) return {\n\t\t\tcolumns: [],\n\t\t\trows: [],\n\t\t\ttotal: null\n\t\t};\n\t\tconst limit = options.limit;\n\t\tconst offset = options.offset;\n\t\tconst sort = options.sort;\n\t\tconst filters = options.filters;\n\t\tconst tableRef = sql.raw(`${REACTOR_SCHEMA}.\"${table}\"`);\n\t\tlet whereClause = sql``;\n\t\tif (filters?.clauses && filters.clauses.length > 0) {\n\t\t\tconst conditions = [];\n\t\t\tfor (let i = 0; i < filters.clauses.length; i++) {\n\t\t\t\tconst clause = filters.clauses[i];\n\t\t\t\tif (!clause) continue;\n\t\t\t\tconst columnRef = sql.raw(`\"${clause.column}\"`);\n\t\t\t\tlet condition;\n\t\t\t\tif (clause.operator === \"IS NULL\") condition = sql`${columnRef} IS NULL`;\n\t\t\t\telse if (clause.operator === \"IS NOT NULL\") condition = sql`${columnRef} IS NOT NULL`;\n\t\t\t\telse if (clause.operator === \"LIKE\" || clause.operator === \"ILIKE\") {\n\t\t\t\t\tconst value = clause.value;\n\t\t\t\t\tcondition = sql`${columnRef} ${clause.operator === \"LIKE\" ? sql`LIKE` : sql`ILIKE`} ${value}`;\n\t\t\t\t} else {\n\t\t\t\t\tconst operator = sql.raw(clause.operator);\n\t\t\t\t\tconst value = clause.value;\n\t\t\t\t\tlet parsedValue = value;\n\t\t\t\t\tif (value !== \"\" && !isNaN(Number(value)) && value.trim() !== \"\") parsedValue = Number(value);\n\t\t\t\t\tcondition = sql`${columnRef} ${operator} ${parsedValue}`;\n\t\t\t\t}\n\t\t\t\tconditions.push(condition);\n\t\t\t\tif (i < filters.clauses.length - 1) {\n\t\t\t\t\tconst connector = filters.connectors?.[i] ?? \"AND\";\n\t\t\t\t\tconditions.push(sql.raw(connector));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (conditions.length > 0) whereClause = sql`WHERE ${sql.join(conditions, sql` `)}`;\n\t\t}\n\t\tlet query;\n\t\tif (sort) {\n\t\t\tconst columnRef = sql.raw(`\"${sort.column}\"`);\n\t\t\tconst direction = sort.direction === \"desc\" ? sql`DESC` : sql`ASC`;\n\t\t\tquery = sql`\n SELECT * FROM ${tableRef}\n ${whereClause}\n ORDER BY ${columnRef} ${direction}\n LIMIT ${limit} OFFSET ${offset}\n `;\n\t\t} else query = sql`\n SELECT * FROM ${tableRef}\n ${whereClause}\n LIMIT ${limit} OFFSET ${offset}\n `;\n\t\tconst result = await query.execute(database);\n\t\tconst countResult = await sql`\n SELECT COUNT(*) as count FROM ${tableRef}\n ${whereClause}\n `.execute(database);\n\t\tconst total = countResult.rows[0] ? parseInt(countResult.rows[0].count, 10) : null;\n\t\tconst rawColumns = result.rows.length > 0 ? Object.keys(result.rows[0]) : [];\n\t\treturn {\n\t\t\tcolumns: [...PRIORITY_COLUMNS.filter((col) => rawColumns.includes(col)), ...rawColumns.filter((col) => !PRIORITY_COLUMNS.includes(col))],\n\t\t\trows: result.rows,\n\t\t\ttotal\n\t\t};\n\t}, [database]);\n\tconst onExportDb = useCallback(async () => {\n\t\tif (!pglite) return;\n\t\tif (queue) await quiesceQueue(queue);\n\t\ttry {\n\t\t\tconst sqlContent = await (await (await loadPgDump(resolvePgMajorForRuntime(getCachedReactorPgMajor() ?? null)))({ pg: pglite })).text();\n\t\t\tconst blob = new Blob([sqlContent], { type: \"text/sql\" });\n\t\t\tconst url = URL.createObjectURL(blob);\n\t\t\tconst a = document.createElement(\"a\");\n\t\t\ta.href = url;\n\t\t\ta.download = `database-export-${Date.now()}.sql`;\n\t\t\ta.click();\n\t\t\tURL.revokeObjectURL(url);\n\t\t} finally {\n\t\t\tqueue?.unblock();\n\t\t}\n\t}, [pglite, queue]);\n\tconst onImportDb = useCallback(async (sqlContent) => {\n\t\tif (!pglite) return;\n\t\tif (queue) await quiesceQueue(queue);\n\t\tif (reactor) await reactor.kill().completed;\n\t\tawait pglite.transaction(async (tx) => {\n\t\t\tconst schemas = await tx.query(`SELECT nspname FROM pg_namespace\n WHERE nspname NOT IN ('pg_catalog', 'pg_toast', 'information_schema', 'public')\n AND nspname NOT LIKE 'pg_temp_%'\n AND nspname NOT LIKE 'pg_toast_temp_%'`);\n\t\t\tfor (const { nspname } of schemas.rows) await tx.exec(`DROP SCHEMA IF EXISTS \"${nspname}\" CASCADE`);\n\t\t\ttry {\n\t\t\t\tawait tx.exec(\"SET standard_conforming_strings = off;\");\n\t\t\t} catch {}\n\t\t\tawait tx.exec(sqlContent);\n\t\t\tawait tx.exec(`SET search_path TO ${REACTOR_SCHEMA}`);\n\t\t});\n\t\tawait syncPgliteToIdb(pglite);\n\t\twindow.location.reload();\n\t\tawait new Promise(() => {});\n\t}, [\n\t\tpglite,\n\t\tqueue,\n\t\treactor\n\t]);\n\treturn {\n\t\tgetTables,\n\t\tgetTableRows,\n\t\tgetDefaultSort: useCallback((table) => {\n\t\t\tif (table === \"Operation\") return {\n\t\t\t\tcolumn: \"timestampUtcMs\",\n\t\t\t\tdirection: \"desc\"\n\t\t\t};\n\t\t}, []),\n\t\tonExportDb,\n\t\tonImportDb\n\t};\n}\n//#endregion\n//#region src/components/modal/modals/InspectorModal/useDebugInspector.ts\nconst SUPPORTED_PG_VERSIONS = [16, 17];\nfunction useDebugInspector() {\n\tconst currentPgVersion = useSyncExternalStore(subscribeReactorPgMajor, getCachedReactorPgMajor, () => void 0);\n\tconst onResetToPgVersion = useCallback(async (major) => {\n\t\tconsole.info(`[debug-inspector] Reset requested: PG${major}`);\n\t\ttry {\n\t\t\tlocalStorage.setItem(PENDING_PG_SEED_KEY, String(major));\n\t\t\tconsole.info(`[debug-inspector] Clearing reactor storage...`);\n\t\t\tawait clearReactorStorage();\n\t\t\tconsole.info(`[debug-inspector] Storage cleared. Reloading...`);\n\t\t\twindow.location.reload();\n\t\t} catch (err) {\n\t\t\tconsole.error(\"[debug-inspector] Reset failed:\", err);\n\t\t\tlocalStorage.removeItem(PENDING_PG_SEED_KEY);\n\t\t\tthrow err;\n\t\t}\n\t}, []);\n\treturn {\n\t\tsupportedPgVersions: SUPPORTED_PG_VERSIONS,\n\t\tcurrentPgVersion: currentPgVersion ?? null,\n\t\tonResetToPgVersion\n\t};\n}\n//#endregion\n//#region src/components/modal/modals/InspectorModal/useIntegrityInspector.ts\nfunction useIntegrityInspector() {\n\tconst reactorModule = useReactorClientModule()?.reactorModule;\n\tconst service = useMemo(() => {\n\t\tif (!reactorModule) return void 0;\n\t\treturn new DocumentIntegrityService(reactorModule.keyframeStore, reactorModule.operationStore, reactorModule.writeCache, reactorModule.documentView, reactorModule.documentModelRegistry);\n\t}, [reactorModule]);\n\tconst onValidate = useCallback(async (documentId, branch) => {\n\t\tif (!service) throw new Error(\"Reactor module not available\");\n\t\treturn service.validateDocument(documentId, branch);\n\t}, [service]);\n\tconst onRebuildKeyframes = useCallback(async (documentId, branch) => {\n\t\tif (!service) throw new Error(\"Reactor module not available\");\n\t\treturn service.rebuildKeyframes(documentId, branch);\n\t}, [service]);\n\tconst onRebuildSnapshots = useCallback(async (documentId, branch) => {\n\t\tif (!service) throw new Error(\"Reactor module not available\");\n\t\treturn service.rebuildSnapshots(documentId, branch);\n\t}, [service]);\n\tif (!service) return;\n\treturn {\n\t\tonValidate,\n\t\tonRebuildKeyframes,\n\t\tonRebuildSnapshots\n\t};\n}\n//#endregion\n//#region src/components/modal/modals/InspectorModal/useProcessorsInspector.ts\nfunction useProcessorsInspector() {\n\tconst processorManager = useReactorClientModule()?.reactorModule?.processorManager;\n\tconst hasProcessorManager = useMemo(() => processorManager != null, [processorManager]);\n\tconst getProcessors = useCallback(() => {\n\t\tif (!processorManager) return Promise.resolve([]);\n\t\treturn Promise.resolve(processorManager.getAll().map((tracked) => ({\n\t\t\tprocessorId: tracked.processorId,\n\t\t\tfactoryId: tracked.factoryId,\n\t\t\tdriveId: tracked.driveId,\n\t\t\tprocessorIndex: tracked.processorIndex,\n\t\t\tlastOrdinal: tracked.lastOrdinal,\n\t\t\tstatus: tracked.status,\n\t\t\tlastError: tracked.lastError,\n\t\t\tlastErrorTimestamp: tracked.lastErrorTimestamp\n\t\t})));\n\t}, [processorManager]);\n\tconst onRetry = useCallback(async (processorId) => {\n\t\tif (!processorManager) return;\n\t\tconst tracked = processorManager.get(processorId);\n\t\tif (tracked) await tracked.retry();\n\t}, [processorManager]);\n\tif (!hasProcessorManager) return;\n\treturn {\n\t\tgetProcessors,\n\t\tonRetry\n\t};\n}\n//#endregion\n//#region src/components/modal/modals/InspectorModal/useQueueInspector.ts\nfunction useQueueInspector() {\n\tconst queue = useReactorClientModule()?.reactorModule?.queue;\n\tconst inMemoryQueue = useMemo(() => {\n\t\tif (queue instanceof InMemoryQueue) return queue;\n\t}, [queue]);\n\tconst getQueueState = useCallback(() => {\n\t\tif (!inMemoryQueue) return Promise.resolve({\n\t\t\tisPaused: false,\n\t\t\tpendingJobs: [],\n\t\t\texecutingJobs: [],\n\t\t\ttotalPending: 0,\n\t\t\ttotalExecuting: 0\n\t\t});\n\t\tconst pendingJobs = inMemoryQueue.getPendingJobs();\n\t\tconst executingJobIds = inMemoryQueue.getExecutingJobIds();\n\t\tconst executingJobs = [];\n\t\tfor (const jobIdSet of executingJobIds.values()) for (const jobId of jobIdSet) {\n\t\t\tconst job = inMemoryQueue.getJob(jobId);\n\t\t\tif (job) executingJobs.push(job);\n\t\t}\n\t\treturn Promise.resolve({\n\t\t\tisPaused: inMemoryQueue.paused,\n\t\t\tpendingJobs,\n\t\t\texecutingJobs,\n\t\t\ttotalPending: pendingJobs.length,\n\t\t\ttotalExecuting: executingJobs.length\n\t\t});\n\t}, [inMemoryQueue]);\n\tconst onPause = useCallback(() => {\n\t\tif (inMemoryQueue) inMemoryQueue.pause();\n\t\treturn Promise.resolve();\n\t}, [inMemoryQueue]);\n\tconst onResume = useCallback(async () => {\n\t\tif (inMemoryQueue) await inMemoryQueue.resume();\n\t}, [inMemoryQueue]);\n\tif (!inMemoryQueue) return;\n\treturn {\n\t\tgetQueueState,\n\t\tonPause,\n\t\tonResume\n\t};\n}\n//#endregion\n//#region src/components/modal/modals/InspectorModal/useRemotesInspector.ts\nfunction useRemotesInspector() {\n\tconst syncManager = useSync();\n\tif (!syncManager) throw new Error(\"Sync manager not found\");\n\tconst connectionStates = useConnectionStates();\n\treturn {\n\t\tgetRemotes: useCallback(() => {\n\t\t\treturn Promise.resolve(syncManager.list());\n\t\t}, [syncManager]),\n\t\tremoveRemote: useCallback((name) => syncManager.remove(name), [syncManager]),\n\t\taddRemoteManual: useCallback(async (url) => {\n\t\t\tawait addRemoteDrive(url, void 0, { pollBehavior: PollBehavior.Manual });\n\t\t}, []),\n\t\ttriggerPull: useCallback((name) => syncManager.triggerPull(name), [syncManager]),\n\t\tconnectionStates\n\t};\n}\n//#endregion\n//#region src/components/modal/modals/InspectorModal/InspectorModal.tsx\nconst DEFAULT_PAGE_SIZE = 25;\nconst InspectorModal = () => {\n\tconst open = usePHModal()?.type === \"inspector\";\n\tconst { getTables, getTableRows, getDefaultSort, onExportDb, onImportDb } = useDbExplorer();\n\tconst { getRemotes, removeRemote, addRemoteManual, triggerPull, connectionStates } = useRemotesInspector();\n\tconst queueInspectorProps = useQueueInspector();\n\tconst processorsInspectorProps = useProcessorsInspector();\n\tconst integrityInspectorProps = useIntegrityInspector();\n\tconst { currentPgVersion, supportedPgVersions, onResetToPgVersion } = useDebugInspector();\n\treturn /* @__PURE__ */ jsx(InspectorModal$1, {\n\t\topen,\n\t\tonOpenChange: (status) => {\n\t\t\tif (!status) closePHModal();\n\t\t},\n\t\tdbExplorerProps: {\n\t\t\tschema: REACTOR_SCHEMA,\n\t\t\tgetTables,\n\t\t\tgetTableRows,\n\t\t\tgetDefaultSort,\n\t\t\tpageSize: DEFAULT_PAGE_SIZE,\n\t\t\tonExportDb,\n\t\t\tonImportDb,\n\t\t\tpgVersionControl: {\n\t\t\t\tcurrentPgVersion,\n\t\t\t\tsupportedPgVersions,\n\t\t\t\tonResetToPgVersion\n\t\t\t}\n\t\t},\n\t\tremotesInspectorProps: {\n\t\t\tgetRemotes,\n\t\t\tremoveRemote,\n\t\t\taddRemoteManual,\n\t\t\ttriggerPull,\n\t\t\tconnectionStates\n\t\t},\n\t\tqueueInspectorProps,\n\t\tprocessorsInspectorProps,\n\t\tintegrityInspectorProps\n\t});\n};\n//#endregion\nexport { InspectorModal };\n\n//# sourceMappingURL=InspectorModal-BsSihzuc.js.map\n//# debugId=92a6ca0a-6b25-50be-8118-6da0537f14f9\n"],"x_google_ignoreList":[0],"mappings":"khBACC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAe,OAAO,OAApB,IAA2B,OAAoB,OAAO,OAApB,IAA2B,OAAoB,OAAO,WAApB,IAA+B,WAAwB,OAAO,KAApB,IAAyB,KAAK,EAAE,CAAC,EAAG,IAAI,EAAE,OAAK,CAAE,MAAM,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC,EAAE,gBAAgB,GAAG,6CAAgD,MAAK,CAUjT,eAAe,EAAa,EAAO,CAClC,MAAM,IAAI,QAAS,GAAY,EAAM,UAAY,GAAS,CAAC,CAAC,CAE7D,eAAe,EAAgB,EAAQ,CACtC,MAAM,IAAI,SAAS,EAAS,IAAW,CACtC,EAAO,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CACnD,EAA0B,GAAuB,CACjD,CAAE,mBAAkB,sBAAqB,sBAAuB,GAAmB,CACzF,OAAuB,EAAI,EAAkB,CAC5C,OACA,aAAe,GAAW,CACpB,GAAQ,GAAc,EAE5B,gBAAiB,CAChB,OAAQ,EACR,YACA,eACA,iBACA,SAAU,EACV,aACA,aACA,iBAAkB,CACjB,mBACA,sBACA,qBACA,CACD,CACD,sBAAuB,CACtB,aACA,eACA,kBACA,cACA,mBACA,CACD,sBACA,2BACA,0BACA,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Lt as e,_t as t,c as n}from"./dist-
|
|
2
|
-
//# sourceMappingURL=MissingPackageModal-Bn036mWQ-
|
|
1
|
+
import{Lt as e,_t as t,c as n}from"./dist-t-ezfpxv.js";import{E as r}from"./connect-CGvtDtZh.js";import{t as i}from"./useRegistryPackages-B-gFECmd-C8h2M5qM.js";import{jsx as a}from"react/jsx-runtime";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`7bca2e2d-003c-5f8a-ac47-599074d6a710`)}catch{}})();function o(){let o=t(),{registryPackageList:s,updateRegistryPackageStatus:c}=i(),l=e(),u=o?.type===`missingPackage`?o.documentType:void 0;if(!l||!u)return null;let d=s.filter(e=>e.documentTypes.includes(u)).map(e=>({documentType:u,packageName:e.name}));async function f(e){(await l?.addPackage(e))?.type===`success`&&c(e,`registry-install`)}function p(e){c(e,`dismissed`)}return a(r,{pendingInstallations:d,onInstall:f,onDismiss:p,onOpenChange:e=>{if(!e)return n()}})}export{o as ConnectMissingPackageModal};
|
|
2
|
+
//# sourceMappingURL=MissingPackageModal-Bn036mWQ-C021G1nV.js.map
|