@powerhousedao/connect 6.0.0-dev.44 → 6.0.0-dev.45

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.
@@ -1 +1 @@
1
- import{j as h}from"./document_model_editor-B_fRFi56.js";import{t as a,a as s}from"./index-2R4Z5JTm.js";import{a1 as A,ap as w,ay as M,az as b,aA as i,E as g,s as c,aB as R}from"./reactor_browser-CI14TYlI.js";import{m as x}from"./design_system_connect-SoJPzAdw.js";import{r as t}from"./document_drive-B4eFu84b.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./sentry_react-CVx4Qq7f.js";import"./react-D_vzfE_e.js";import"./sentry_browser-TIBDlywD.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./design_system_ui-B4c9YVjt.js";function N(){const d=A()?.type==="addDrive",p=w(),m=M(),r=b(),l=async e=>{try{const o=r?.find(y=>y.id===e.appId),n=await R({id:"",slug:"",global:{name:e.name,icon:null},local:{availableOffline:e.availableOffline,sharingType:e.sharingType.toLowerCase(),listeners:[],triggers:[]}},o?.id);if(a(s("notifications.addDriveSuccess"),{type:"connect-success"}),!n)return;c(n)}catch(o){console.error(o)}},u=async e=>{try{const o=await g(e.url,{},e.id);a(s("notifications.addDriveSuccess"),{type:"connect-success"}),c(o)}catch(o){console.error(o)}};async function v(e){await l(e),i()}async function f(e){await u(e),i()}const D=!!r?.length;return h.jsx(x,{open:d&&D,onAddLocalDrive:v,onAddRemoteDrive:f,requestPublicDrive:async e=>{try{if(p){const o=await m?.getBearerToken?.({expiresIn:10,aud:e});return t(e,{Authorization:`Bearer ${o}`})}return t(e)}catch(o){return console.error(o),t(e)}},onOpenChange:e=>{if(!e)return i()},appOptions:r?.map(e=>({id:e.id,name:e.name,driveEditor:e.id}))||[]})}export{N as AddDriveModal};
1
+ import{j as h}from"./document_model_editor-B_fRFi56.js";import{t as a,a as s}from"./index-Bf7GGgE5.js";import{a1 as A,ap as w,ay as M,az as b,aA as i,E as g,s as c,aB as R}from"./reactor_browser-CI14TYlI.js";import{m as x}from"./design_system_connect-SoJPzAdw.js";import{r as t}from"./document_drive-B4eFu84b.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./sentry_react-CVx4Qq7f.js";import"./react-D_vzfE_e.js";import"./sentry_browser-TIBDlywD.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./design_system_ui-B4c9YVjt.js";function N(){const d=A()?.type==="addDrive",p=w(),m=M(),r=b(),l=async e=>{try{const o=r?.find(y=>y.id===e.appId),n=await R({id:"",slug:"",global:{name:e.name,icon:null},local:{availableOffline:e.availableOffline,sharingType:e.sharingType.toLowerCase(),listeners:[],triggers:[]}},o?.id);if(a(s("notifications.addDriveSuccess"),{type:"connect-success"}),!n)return;c(n)}catch(o){console.error(o)}},u=async e=>{try{const o=await g(e.url,{},e.id);a(s("notifications.addDriveSuccess"),{type:"connect-success"}),c(o)}catch(o){console.error(o)}};async function v(e){await l(e),i()}async function f(e){await u(e),i()}const D=!!r?.length;return h.jsx(x,{open:d&&D,onAddLocalDrive:v,onAddRemoteDrive:f,requestPublicDrive:async e=>{try{if(p){const o=await m?.getBearerToken?.({expiresIn:10,aud:e});return t(e,{Authorization:`Bearer ${o}`})}return t(e)}catch(o){return console.error(o),t(e)}},onOpenChange:e=>{if(!e)return i()},appOptions:r?.map(e=>({id:e.id,name:e.name,driveEditor:e.id}))||[]})}export{N as AddDriveModal};
@@ -1 +1 @@
1
- import{j as l}from"./document_model_editor-B_fRFi56.js";import{r as s}from"./sentry_react-CVx4Qq7f.js";import{u as c,c as m}from"./index-2R4Z5JTm.js";import{n as p}from"./design_system_connect-SoJPzAdw.js";import{a1 as d,x as g,aA as f,s as u,g as S}from"./reactor_browser-CI14TYlI.js";import{$ as h}from"./document_model-C-Ne8Zoy.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./react/jsx-runtime-DldvXD6N.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./zod-Cc38s6JG.js";import"./react-D_vzfE_e.js";import"./react-dom-Cz_KAjfm.js";import"./sentry_browser-TIBDlywD.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./design_system_ui-B4c9YVjt.js";const r=h(["ClearStorage"]);function k(){const a=d()?.type==="clearStorage",{t:o}=c(),[n,e]=s.useState(!1);function i(){e(!0),m().then(()=>{r.info("Storage cleared"),u(void 0),S(void 0),window.location.reload()}).catch(t=>{r.error("Error clearing storage: @error",t),e(!1)})}return l.jsx(p,{open:a,header:o("modals.clearStorage.title"),title:o("modals.clearStorage.title"),body:o("modals.connectSettings.clearStorage.confirmation.body"),cancelLabel:o("common.cancel"),continueLabel:o("modals.connectSettings.clearStorage.confirmation.clearButton"),onCancel:()=>g({type:"settings"}),onContinue:i,onOpenChange:t=>{if(!t)return f()},continueButtonProps:{disabled:n}})}export{k as ClearStorageModal};
1
+ import{j as l}from"./document_model_editor-B_fRFi56.js";import{r as s}from"./sentry_react-CVx4Qq7f.js";import{u as c,c as m}from"./index-Bf7GGgE5.js";import{n as p}from"./design_system_connect-SoJPzAdw.js";import{a1 as d,x as g,aA as f,s as u,g as S}from"./reactor_browser-CI14TYlI.js";import{$ as h}from"./document_model-C-Ne8Zoy.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./react/jsx-runtime-DldvXD6N.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./zod-Cc38s6JG.js";import"./react-D_vzfE_e.js";import"./react-dom-Cz_KAjfm.js";import"./sentry_browser-TIBDlywD.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./design_system_ui-B4c9YVjt.js";const r=h(["ClearStorage"]);function k(){const a=d()?.type==="clearStorage",{t:o}=c(),[n,e]=s.useState(!1);function i(){e(!0),m().then(()=>{r.info("Storage cleared"),u(void 0),S(void 0),window.location.reload()}).catch(t=>{r.error("Error clearing storage: @error",t),e(!1)})}return l.jsx(p,{open:a,header:o("modals.clearStorage.title"),title:o("modals.clearStorage.title"),body:o("modals.connectSettings.clearStorage.confirmation.body"),cancelLabel:o("common.cancel"),continueLabel:o("modals.connectSettings.clearStorage.confirmation.clearButton"),onCancel:()=>g({type:"settings"}),onContinue:i,onOpenChange:t=>{if(!t)return f()},continueButtonProps:{disabled:n}})}export{k as ClearStorageModal};
@@ -1 +1 @@
1
- import{j as o}from"./document_model_editor-B_fRFi56.js";import{u as i,T as e}from"./index-2R4Z5JTm.js";import{o as l}from"./design_system_connect-SoJPzAdw.js";import{a1 as m,aA as r}from"./reactor_browser-CI14TYlI.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./sentry_react-CVx4Qq7f.js";import"./react-D_vzfE_e.js";import"./sentry_browser-TIBDlywD.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./design_system_ui-B4c9YVjt.js";const g=()=>{const s=m()?.type==="cookiesPolicy",{t}=i();return o.jsx(l,{open:s,header:t("modals.cookiesPolicy.title"),body:o.jsx(e,{i18nKey:"modals.cookiesPolicy.body",components:{subtitle:o.jsx("h2",{className:"mb-4 text-lg font-bold"}),p:o.jsx("p",{className:"mb-2"}),list:o.jsx("ul",{className:"mb-4 list-disc pl-6"}),bullet:o.jsx("li",{})}}),bodyProps:{className:"text-left"},closeLabel:"Close",onContinue:()=>r(),overlayProps:{style:{zIndex:1e4}}})};export{g as CookiesPolicyModal};
1
+ import{j as o}from"./document_model_editor-B_fRFi56.js";import{u as i,T as e}from"./index-Bf7GGgE5.js";import{o as l}from"./design_system_connect-SoJPzAdw.js";import{a1 as m,aA as r}from"./reactor_browser-CI14TYlI.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./sentry_react-CVx4Qq7f.js";import"./react-D_vzfE_e.js";import"./sentry_browser-TIBDlywD.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./design_system_ui-B4c9YVjt.js";const g=()=>{const s=m()?.type==="cookiesPolicy",{t}=i();return o.jsx(l,{open:s,header:t("modals.cookiesPolicy.title"),body:o.jsx(e,{i18nKey:"modals.cookiesPolicy.body",components:{subtitle:o.jsx("h2",{className:"mb-4 text-lg font-bold"}),p:o.jsx("p",{className:"mb-2"}),list:o.jsx("ul",{className:"mb-4 list-disc pl-6"}),bullet:o.jsx("li",{})}}),bodyProps:{className:"text-left"},closeLabel:"Close",onContinue:()=>r(),overlayProps:{style:{zIndex:1e4}}})};export{g as CookiesPolicyModal};
@@ -1 +1 @@
1
- import{j as e}from"./document_model_editor-B_fRFi56.js";import{b as f,s as d}from"./index-2R4Z5JTm.js";import{r as l}from"./sentry_react-CVx4Qq7f.js";import{q as c,F as N}from"./design_system_connect-SoJPzAdw.js";import{a1 as A,at as M,aA as R,aE as k,aF as U,aG as D}from"./reactor_browser-CI14TYlI.js";import{M as I,I as m,l as x}from"./design_system-Cvyob7tr.js";import{g as V}from"./document_model-C-Ne8Zoy.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./react/jsx-runtime-DldvXD6N.js";import"./zod-Cc38s6JG.js";import"./react-D_vzfE_e.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./sentry_browser-TIBDlywD.js";import"./design_system_ui-B4c9YVjt.js";const ie=()=>{const S=A()?.type==="debugSettings",g=localStorage.getItem("AUTO_REGISTER_PULL_RESPONDER")!=="false",[i,v]=l.useState(f.appVersion),[u,T]=l.useState({label:d.debug?"Enabled":"Disabled",value:d.debug}),[r,h]=l.useState(),[a,t]=l.useState(null),[n,p]=l.useState(""),[w,E]=l.useState({label:g?"Enabled":"Disabled",value:g?"true":"false"}),b=M();l.useEffect(()=>{d.setDebug(u.value)},[u]);const y=b?.find(s=>s.header.id===r)?.state.local.triggers||[],o=!r||n==="",C=async()=>{!a||!r||(await k(r,a.value),t(null))},j=async(s=!1)=>{if(!(!n||n===""||!r)){if(!s){if(!await U())return;await D(),p("");return}V(),await D(),p("")}},P=s=>{E(s),localStorage.setItem("AUTO_REGISTER_PULL_RESPONDER",s.value)};return e.jsx(I,{open:S,onOpenChange:s=>{if(!s)return R()},contentProps:{className:"rounded-2xl"},children:e.jsxs("div",{className:"w-[700px] rounded-2xl p-6",children:[e.jsxs("div",{className:"mb-6 flex justify-between",children:[e.jsx("div",{className:"text-xl font-bold",children:"Debug Tools"}),e.jsx("button",{id:"close-modal",onClick:()=>R(),children:e.jsx(m,{name:"Xmark",size:28})})]}),e.jsxs("div",{className:"flex text-sm font-bold",children:[e.jsx(m,{name:"Ring",size:22}),e.jsxs("span",{className:"ml-2",children:["App Version: ",f.appVersion]})]}),e.jsxs("div",{className:"mt-4 flex text-sm font-bold",children:[e.jsx(m,{name:"Hdd",size:22}),e.jsx("span",{className:"ml-2",children:"Drive Tools:"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"selectedDrive",className:"text-xs",children:"Selected Drive:"}),e.jsx(c,{id:"selectedDrive",onChange:s=>{if(!s||typeof s!="object"||!("value"in s)){h(void 0),t(null);return}h(s.value),t(null)},options:b?.map(s=>({label:s.header.name,value:s.header.id}))})]}),e.jsx("div",{className:"mt-2 flex items-end justify-between pl-4",children:e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"autoRegisterPullResponder",className:"text-xs",children:"Auto register pull responder:"}),e.jsx(c,{id:"autoRegisterPullResponder",onChange:s=>{P(s)},value:w,options:[{label:"Enabled",value:"true"},{label:"Disabled",value:"false"}]})]})}),e.jsxs("div",{className:"mt-2 flex items-end justify-between pl-4",children:[e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"driveTrigger",className:"text-xs",children:"Drive trigger:"}),e.jsx(c,{id:"driveTrigger",onChange:s=>{t(s)},value:a,options:y.map(s=>({label:`${s.id} - ${s.type}`,value:s.id}))})]}),e.jsx("div",{children:e.jsx(x,{onClick:C,color:a?"red":"light",disabled:!a,size:"small",children:"Remove Trigger"})})]}),e.jsxs("div",{className:"mt-2 flex items-end justify-between pl-4",children:[e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"driveUrl",className:"text-xs",children:"Add drive trigger:"}),e.jsx(N,{containerClassName:"p-1 bg-white border border-gray-200 rounded-md text-sm",inputClassName:"text-xs font-normal",id:"driveUrl",icon:e.jsx("div",{className:"flex h-full items-center text-xs",children:"URL:"}),value:n,onChange:s=>p(s.target.value)})]}),e.jsxs("div",{className:"mb-1 flex items-center justify-center",children:[e.jsx(x,{className:"mr-2",color:o?"light":"blue",size:"small",disabled:o,onClick:()=>j(),children:"Add Trigger"}),e.jsx(x,{color:o?"light":"red",size:"small",disabled:o,onClick:()=>j(!0),children:"Add Invalid Trigger"})]})]}),e.jsxs("div",{className:"mt-4 flex text-sm font-bold",children:[e.jsx(m,{name:"Gear",size:22}),e.jsx("span",{className:"ml-2",children:"Service Worker Tools:"})]}),e.jsx("div",{className:"mt-2 flex items-end justify-between pl-4",children:e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"serviceWorkerDebugMode",className:"text-xs",children:"Service Worker Debug Mode:"}),e.jsx(c,{id:"serviceWorkerDebugMode",onChange:s=>{T(s)},value:u,options:[{label:"Enabled",value:!0},{label:"Disabled",value:!1}]})]})}),e.jsxs("div",{className:"mt-2 flex items-end justify-between pl-4",children:[e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"appVersion",className:"text-xs",children:"Set invalid app version:"}),e.jsx(N,{containerClassName:"p-1 bg-white border border-gray-200 rounded-md text-sm",inputClassName:"text-xs font-normal",id:"appVersion",icon:e.jsx("div",{className:"flex h-full items-center text-xs",children:"Version:"}),value:i,onChange:s=>v(s.target.value)})]}),e.jsx("div",{className:"mb-1 flex items-center justify-center",children:e.jsx(x,{color:i===""?"light":"red",size:"small",disabled:i==="",onClick:()=>{d.sendMessage({type:"SET_APP_VERSION",version:i}),v("")},children:"Add Invalid App Version"})})]})]})})};export{ie as DebugSettingsModal};
1
+ import{j as e}from"./document_model_editor-B_fRFi56.js";import{b as f,s as d}from"./index-Bf7GGgE5.js";import{r as l}from"./sentry_react-CVx4Qq7f.js";import{q as c,F as N}from"./design_system_connect-SoJPzAdw.js";import{a1 as A,at as M,aA as R,aE as k,aF as U,aG as D}from"./reactor_browser-CI14TYlI.js";import{M as I,I as m,l as x}from"./design_system-Cvyob7tr.js";import{g as V}from"./document_model-C-Ne8Zoy.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./react/jsx-runtime-DldvXD6N.js";import"./zod-Cc38s6JG.js";import"./react-D_vzfE_e.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./sentry_browser-TIBDlywD.js";import"./design_system_ui-B4c9YVjt.js";const ie=()=>{const S=A()?.type==="debugSettings",g=localStorage.getItem("AUTO_REGISTER_PULL_RESPONDER")!=="false",[i,v]=l.useState(f.appVersion),[u,T]=l.useState({label:d.debug?"Enabled":"Disabled",value:d.debug}),[r,h]=l.useState(),[a,t]=l.useState(null),[n,p]=l.useState(""),[w,E]=l.useState({label:g?"Enabled":"Disabled",value:g?"true":"false"}),b=M();l.useEffect(()=>{d.setDebug(u.value)},[u]);const y=b?.find(s=>s.header.id===r)?.state.local.triggers||[],o=!r||n==="",C=async()=>{!a||!r||(await k(r,a.value),t(null))},j=async(s=!1)=>{if(!(!n||n===""||!r)){if(!s){if(!await U())return;await D(),p("");return}V(),await D(),p("")}},P=s=>{E(s),localStorage.setItem("AUTO_REGISTER_PULL_RESPONDER",s.value)};return e.jsx(I,{open:S,onOpenChange:s=>{if(!s)return R()},contentProps:{className:"rounded-2xl"},children:e.jsxs("div",{className:"w-[700px] rounded-2xl p-6",children:[e.jsxs("div",{className:"mb-6 flex justify-between",children:[e.jsx("div",{className:"text-xl font-bold",children:"Debug Tools"}),e.jsx("button",{id:"close-modal",onClick:()=>R(),children:e.jsx(m,{name:"Xmark",size:28})})]}),e.jsxs("div",{className:"flex text-sm font-bold",children:[e.jsx(m,{name:"Ring",size:22}),e.jsxs("span",{className:"ml-2",children:["App Version: ",f.appVersion]})]}),e.jsxs("div",{className:"mt-4 flex text-sm font-bold",children:[e.jsx(m,{name:"Hdd",size:22}),e.jsx("span",{className:"ml-2",children:"Drive Tools:"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"selectedDrive",className:"text-xs",children:"Selected Drive:"}),e.jsx(c,{id:"selectedDrive",onChange:s=>{if(!s||typeof s!="object"||!("value"in s)){h(void 0),t(null);return}h(s.value),t(null)},options:b?.map(s=>({label:s.header.name,value:s.header.id}))})]}),e.jsx("div",{className:"mt-2 flex items-end justify-between pl-4",children:e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"autoRegisterPullResponder",className:"text-xs",children:"Auto register pull responder:"}),e.jsx(c,{id:"autoRegisterPullResponder",onChange:s=>{P(s)},value:w,options:[{label:"Enabled",value:"true"},{label:"Disabled",value:"false"}]})]})}),e.jsxs("div",{className:"mt-2 flex items-end justify-between pl-4",children:[e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"driveTrigger",className:"text-xs",children:"Drive trigger:"}),e.jsx(c,{id:"driveTrigger",onChange:s=>{t(s)},value:a,options:y.map(s=>({label:`${s.id} - ${s.type}`,value:s.id}))})]}),e.jsx("div",{children:e.jsx(x,{onClick:C,color:a?"red":"light",disabled:!a,size:"small",children:"Remove Trigger"})})]}),e.jsxs("div",{className:"mt-2 flex items-end justify-between pl-4",children:[e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"driveUrl",className:"text-xs",children:"Add drive trigger:"}),e.jsx(N,{containerClassName:"p-1 bg-white border border-gray-200 rounded-md text-sm",inputClassName:"text-xs font-normal",id:"driveUrl",icon:e.jsx("div",{className:"flex h-full items-center text-xs",children:"URL:"}),value:n,onChange:s=>p(s.target.value)})]}),e.jsxs("div",{className:"mb-1 flex items-center justify-center",children:[e.jsx(x,{className:"mr-2",color:o?"light":"blue",size:"small",disabled:o,onClick:()=>j(),children:"Add Trigger"}),e.jsx(x,{color:o?"light":"red",size:"small",disabled:o,onClick:()=>j(!0),children:"Add Invalid Trigger"})]})]}),e.jsxs("div",{className:"mt-4 flex text-sm font-bold",children:[e.jsx(m,{name:"Gear",size:22}),e.jsx("span",{className:"ml-2",children:"Service Worker Tools:"})]}),e.jsx("div",{className:"mt-2 flex items-end justify-between pl-4",children:e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"serviceWorkerDebugMode",className:"text-xs",children:"Service Worker Debug Mode:"}),e.jsx(c,{id:"serviceWorkerDebugMode",onChange:s=>{T(s)},value:u,options:[{label:"Enabled",value:!0},{label:"Disabled",value:!1}]})]})}),e.jsxs("div",{className:"mt-2 flex items-end justify-between pl-4",children:[e.jsxs("div",{className:"w-[400px]",children:[e.jsx("label",{htmlFor:"appVersion",className:"text-xs",children:"Set invalid app version:"}),e.jsx(N,{containerClassName:"p-1 bg-white border border-gray-200 rounded-md text-sm",inputClassName:"text-xs font-normal",id:"appVersion",icon:e.jsx("div",{className:"flex h-full items-center text-xs",children:"Version:"}),value:i,onChange:s=>v(s.target.value)})]}),e.jsx("div",{className:"mb-1 flex items-center justify-center",children:e.jsx(x,{color:i===""?"light":"red",size:"small",disabled:i==="",onClick:()=>{d.sendMessage({type:"SET_APP_VERSION",version:i}),v("")},children:"Add Invalid App Version"})})]})]})})};export{ie as DebugSettingsModal};
@@ -1 +1 @@
1
- import{j as d}from"./document_model_editor-B_fRFi56.js";import{a1 as m,aH as p,at as c,aA as r,aI as v,s as u}from"./reactor_browser-CI14TYlI.js";import{u as D,t as f}from"./index-2R4Z5JTm.js";import{r as h}from"./design_system_connect-SoJPzAdw.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./sentry_react-CVx4Qq7f.js";import"./react-D_vzfE_e.js";import"./sentry_browser-TIBDlywD.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./document_drive-B4eFu84b.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./design_system_ui-B4c9YVjt.js";const T=()=>{const i=m(),a=i?.type==="deleteDrive",t=a?i.driveId:void 0,[o]=p(t),n=c();if(!o)return null;async function s(){t&&(await v(t),u(n?.[0]),r(),f(e("notifications.deleteDriveSuccess"),{type:"connect-deleted"}))}const{t:e}=D();return d.jsx(h,{open:a,driveName:o.header.name,onCancel:r,header:e("modals.deleteDrive.title",{label:o.header.name}),body:e("modals.deleteDrive.body"),inputPlaceholder:e("modals.deleteDrive.inputPlaceholder"),cancelLabel:e("common.cancel"),continueLabel:e("common.delete"),onContinue:()=>s(),onOpenChange:l=>{if(!l)return r()}})};export{T as DeleteDriveModal};
1
+ import{j as d}from"./document_model_editor-B_fRFi56.js";import{a1 as m,aH as p,at as c,aA as r,aI as v,s as u}from"./reactor_browser-CI14TYlI.js";import{u as D,t as f}from"./index-Bf7GGgE5.js";import{r as h}from"./design_system_connect-SoJPzAdw.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./sentry_react-CVx4Qq7f.js";import"./react-D_vzfE_e.js";import"./sentry_browser-TIBDlywD.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./document_drive-B4eFu84b.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./design_system_ui-B4c9YVjt.js";const T=()=>{const i=m(),a=i?.type==="deleteDrive",t=a?i.driveId:void 0,[o]=p(t),n=c();if(!o)return null;async function s(){t&&(await v(t),u(n?.[0]),r(),f(e("notifications.deleteDriveSuccess"),{type:"connect-deleted"}))}const{t:e}=D();return d.jsx(h,{open:a,driveName:o.header.name,onCancel:r,header:e("modals.deleteDrive.title",{label:o.header.name}),body:e("modals.deleteDrive.body"),inputPlaceholder:e("modals.deleteDrive.inputPlaceholder"),cancelLabel:e("common.cancel"),continueLabel:e("common.delete"),onContinue:()=>s(),onOpenChange:l=>{if(!l)return r()}})};export{T as DeleteDriveModal};
@@ -1 +1 @@
1
- import{j as p}from"./document_model_editor-B_fRFi56.js";import"./sentry_react-CVx4Qq7f.js";import{u,t as f}from"./index-2R4Z5JTm.js";import{a1 as I,aJ as y,e as D,l as F,aA as d,aK as L,g as M}from"./reactor_browser-CI14TYlI.js";import{s as b}from"./design_system_connect-SoJPzAdw.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./react-D_vzfE_e.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./sentry_browser-TIBDlywD.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./design_system_ui-B4c9YVjt.js";const O=()=>{const n=I(),a=n?.type==="deleteItem",o=a?n.id:void 0,{t:e}=u(),t=y(o),i=t?.name,s=t?.kind,r=D(),m=F(t?.parentFolder);async function l(){if(!r||!o)return;d();const c=s==="FOLDER"?"notifications.deleteFolderSuccess":"notifications.fileDeleteSuccess";await L(r,o),M(m),f(e(c),{type:"connect-deleted"})}return p.jsx(b,{open:a,onDelete:()=>l(),onCancel:()=>d(),header:e(`modals.deleteItem.${s?.toLowerCase()}.header`,{item:i}),body:e(`modals.deleteItem.${s?.toLowerCase()}.body`),cancelLabel:e("common.cancel"),deleteLabel:e("common.delete")})};export{O as DeleteItemModal};
1
+ import{j as p}from"./document_model_editor-B_fRFi56.js";import"./sentry_react-CVx4Qq7f.js";import{u,t as f}from"./index-Bf7GGgE5.js";import{a1 as I,aJ as y,e as D,l as F,aA as d,aK as L,g as M}from"./reactor_browser-CI14TYlI.js";import{s as b}from"./design_system_connect-SoJPzAdw.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./react-D_vzfE_e.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./sentry_browser-TIBDlywD.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./design_system_ui-B4c9YVjt.js";const O=()=>{const n=I(),a=n?.type==="deleteItem",o=a?n.id:void 0,{t:e}=u(),t=y(o),i=t?.name,s=t?.kind,r=D(),m=F(t?.parentFolder);async function l(){if(!r||!o)return;d();const c=s==="FOLDER"?"notifications.deleteFolderSuccess":"notifications.fileDeleteSuccess";await L(r,o),M(m),f(e(c),{type:"connect-deleted"})}return p.jsx(b,{open:a,onDelete:()=>l(),onCancel:()=>d(),header:e(`modals.deleteItem.${s?.toLowerCase()}.header`,{item:i}),body:e(`modals.deleteItem.${s?.toLowerCase()}.body`),cancelLabel:e("common.cancel"),deleteLabel:e("common.delete")})};export{O as DeleteItemModal};
@@ -1 +1 @@
1
- import{j as t}from"./document_model_editor-B_fRFi56.js";import"./sentry_react-CVx4Qq7f.js";import{u as i}from"./index-2R4Z5JTm.js";import{a1 as m,aA as p}from"./reactor_browser-CI14TYlI.js";import{o as a}from"./design_system_connect-SoJPzAdw.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./react-D_vzfE_e.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./sentry_browser-TIBDlywD.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./design_system_ui-B4c9YVjt.js";const D=()=>{const r=m()?.type==="disclaimer",{t:o}=i();return t.jsx(a,{open:r,header:o("modals.disclaimer.title"),body:o("modals.disclaimer.body"),closeLabel:"Close",onContinue:()=>p()})};export{D as DisclaimerModal};
1
+ import{j as t}from"./document_model_editor-B_fRFi56.js";import"./sentry_react-CVx4Qq7f.js";import{u as i}from"./index-Bf7GGgE5.js";import{a1 as m,aA as p}from"./reactor_browser-CI14TYlI.js";import{o as a}from"./design_system_connect-SoJPzAdw.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./react-D_vzfE_e.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./sentry_browser-TIBDlywD.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./design_system_ui-B4c9YVjt.js";const D=()=>{const r=m()?.type==="disclaimer",{t:o}=i();return t.jsx(a,{open:r,header:o("modals.disclaimer.title"),body:o("modals.disclaimer.body"),closeLabel:"Close",onContinue:()=>p()})};export{D as DisclaimerModal};
@@ -1 +1 @@
1
- import{j as r}from"./document_model_editor-B_fRFi56.js";import{u as l}from"./index-2R4Z5JTm.js";import{a1 as p,i as d,H as u,aA as i,J as x}from"./reactor_browser-CI14TYlI.js";import{n as h}from"./design_system_connect-SoJPzAdw.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./sentry_react-CVx4Qq7f.js";import"./react-D_vzfE_e.js";import"./sentry_browser-TIBDlywD.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./design_system_ui-B4c9YVjt.js";function J(){const n=p(),m=n?.type==="exportDocumentWithErrors",s=m?n.documentId:void 0,[e]=d(s),{t:o}=l();if(!e)return null;const a=u(e);return r.jsx(h,{header:o("modals.exportDocumentWithErrors.title"),title:o("modals.exportDocumentWithErrors.title"),body:r.jsxs("div",{children:[r.jsx("p",{children:o("modals.exportDocumentWithErrors.body")}),r.jsx("ul",{className:"mt-4 flex list-disc flex-col items-start px-4 text-xs",children:a.map((t,c)=>r.jsx("li",{children:t.message},c))})]}),cancelLabel:o("common.cancel"),continueLabel:o("common.export"),onCancel:()=>i(),onContinue:async()=>{try{await x(e)}catch(t){console.error(t)}finally{i()}},open:m,onOpenChange:t=>{if(!t)return i()}})}export{J as ExportDocumentWithErrorsModal};
1
+ import{j as r}from"./document_model_editor-B_fRFi56.js";import{u as l}from"./index-Bf7GGgE5.js";import{a1 as p,i as d,H as u,aA as i,J as x}from"./reactor_browser-CI14TYlI.js";import{n as h}from"./design_system_connect-SoJPzAdw.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./sentry_react-CVx4Qq7f.js";import"./react-D_vzfE_e.js";import"./sentry_browser-TIBDlywD.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./design_system_ui-B4c9YVjt.js";function J(){const n=p(),m=n?.type==="exportDocumentWithErrors",s=m?n.documentId:void 0,[e]=d(s),{t:o}=l();if(!e)return null;const a=u(e);return r.jsx(h,{header:o("modals.exportDocumentWithErrors.title"),title:o("modals.exportDocumentWithErrors.title"),body:r.jsxs("div",{children:[r.jsx("p",{children:o("modals.exportDocumentWithErrors.body")}),r.jsx("ul",{className:"mt-4 flex list-disc flex-col items-start px-4 text-xs",children:a.map((t,c)=>r.jsx("li",{children:t.message},c))})]}),cancelLabel:o("common.cancel"),continueLabel:o("common.export"),onCancel:()=>i(),onContinue:async()=>{try{await x(e)}catch(t){console.error(t)}finally{i()}},open:m,onOpenChange:t=>{if(!t)return i()}})}export{J as ExportDocumentWithErrorsModal};
@@ -1 +1 @@
1
- import{j as t}from"./document_model_editor-B_fRFi56.js";import{b as m,d as k,r as j,a as E}from"./index-2R4Z5JTm.js";import{r as a}from"./sentry_react-CVx4Qq7f.js";import{P as C}from"./config-0mYxXHFp.js";import{at as b,x as P,aI as D,s as M,aO as A,aP as O,a1 as S,aA as L}from"./reactor_browser-CI14TYlI.js";import{w as _,x as R,y as z,z as H,B as V}from"./design_system_connect-SoJPzAdw.js";import{I as d}from"./design_system-Cvyob7tr.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./react-D_vzfE_e.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./sentry_browser-TIBDlywD.js";import"./design_system_ui-B4c9YVjt.js";const q="@powerhousedao/connect",I="Powerhouse-Connect",U="6.0.0-dev.43",T="Powerhouse Connect",$="dist/index.html",B="module",N={node:">=24.0.0"},G=["dist","lib","nginx.conf","nginx.sh","scripts","assets","public","heroku",".env","./src/index.css","./package.copy.json"],Z={".":{source:"./src/index.ts",import:"./lib/src/index.js",types:"./lib/src/index.d.ts"},"./package.json":"./package.copy.json","./main.js":{source:"./src/main.tsx",import:"./lib/src/main.js",types:"./lib/src/main.d.ts"},"./*.js":{source:"./src/*.ts",import:"./lib/src/*.js",types:"./lib/src/*.d.ts"},"./components":{source:"./src/components/index.ts",import:"./lib/src/components/index.js",types:"./lib/src/components/index.d.ts"},"./pages":{source:"./src/pages/index.ts",import:"./lib/src/pages/index.js",types:"./lib/src/pages/index.d.ts"},"./services":{source:"./src/services/index.ts",import:"./lib/src/services/index.js",types:"./lib/src/services/index.d.ts"},"./context":{source:"./src/context/index.ts",import:"./lib/src/context/index.js",types:"./lib/src/context/index.d.ts"},"./hooks":{source:"./src/hooks/index.ts",import:"./lib/src/hooks/index.js",types:"./lib/src/hooks/index.d.ts"},"./store":{source:"./src/store/index.ts",import:"./lib/src/store/index.js",types:"./lib/src/store/index.d.ts"},"./utils":{source:"./src/utils/index.ts",import:"./lib/src/utils/index.js",types:"./lib/src/utils/index.d.ts"},"./config":{source:"./src/connect.config.ts",import:"./lib/src/connect.config.js",types:"./lib/src/connect.config.d.ts"},"./i18n":{source:"./src/i18n/index.ts",import:"./lib/src/i18n/index.js",types:"./lib/src/i18n/index.d.ts"},"./custom.d.ts":"./lib/custom.d.ts","./style.css":"./lib/style.css","./assets/*.mp4":"./assets/*.mp4","./assets/*.png":"./assets/*.png","./assets/*.svg":"./assets/*.svg","./assets/*.jpg":"./assets/*.jpg","./assets/*.jpeg":"./assets/*.jpeg","./assets/*.gif":"./assets/*.gif","./assets/*.webp":"./assets/*.webp","./assets/*.avif":"./assets/*.avif","./public/icon.ico":"./public/icon.ico"},J=["lib/src/main.js","src/main.tsx"],K="AGPL-3.0-only",Q="powerhouse.inc",F={type:"git",url:"https://github.com/powerhouse-inc/powerhouse"},W={url:"https://github.com/powerhouse-inc/powerhouse/issues"},X="https://github.com/powerhouse-inc/powerhouse#readme",Y={tsc:"tsc",lint:"eslint",test:"vitest --run",postinstall:"cp ./package.json ./package.copy.json",dev:"vite dev","build:css":"pnpm exec tailwindcss -i ./src/index.css -o ./lib/style.css","build:vite":"vite build","build:debug":"PH_DEBUG_BUILD=true vite build",preview:"vite preview","cy:open":"cypress open","docker:build":"docker build -f ./Dockerfile --tag connect-test-dev --build-arg TAG=dev .","docker:run":"docker run -it -p 4000:4000 -v $(realpath ../../../monorepo):/monorepo -v $(pwd)/nginx.conf:/etc/nginx/nginx.conf.template -e PH_USE_LOCAL=true -e PH_CONNECT_BASE_PATH=/develop/powerhouse/connect -e PORT=4000 connect-test-dev"},ee={"@electric-sql/pglite":"catalog:","@electric-sql/pglite-tools":"catalog:","@openfeature/core":"^1.9.1","@openfeature/web-sdk":"^1.6.2","@powerhousedao/analytics-engine-core":"catalog:","@powerhousedao/builder-tools":"workspace:*","@powerhousedao/common":"workspace:*","@powerhousedao/config":"workspace:*","@powerhousedao/design-system":"workspace:*","@powerhousedao/document-engineering":"catalog:","@powerhousedao/reactor":"workspace:*","@powerhousedao/reactor-browser":"workspace:*","@renown/sdk":"workspace:*","@sentry/browser":"^10.17.0","@sentry/react":"^10.17.0","@sentry/vite-plugin":"^4.3.0","@tailwindcss/vite":"catalog:","@types/cypress":"^1.1.6","@types/node":"catalog:","@types/react":"catalog:","@types/react-dom":"catalog:","@types/wicg-file-system-access":"^2023.10.7","@vitejs/plugin-react":"catalog:",cypress:"^14.5.4","document-drive":"workspace:*","document-model":"workspace:*","fast-deep-equal":"^3.1.3",graphql:"catalog:","graphql-request":"catalog:",i18next:"^25.5.3",kysely:"catalog:","kysely-pglite-dialect":"catalog:",react:"catalog:","react-dom":"catalog:","react-error-boundary":"^4.0.11","react-hotkeys-hook":"^4.6.2","react-i18next":"^16.0.0","react-router-dom":"^6.11.2","tailwind-merge":"catalog:",tailwindcss:"catalog:",vite:"catalog:","vite-bundle-analyzer":"^1.3.6","vite-plugin-html":"catalog:","vite-plugin-node-polyfills":"catalog:","vite-plugin-svgr":"catalog:",zod:"catalog:"},se={shared:"workspace:","@tailwindcss/cli":"catalog:"},te={name:q,productName:I,version:U,description:T,main:$,type:B,engines:N,files:G,exports:Z,sideEffects:J,license:K,author:Q,repository:F,bugs:W,homepage:X,scripts:Y,dependencies:ee,devDependencies:se},oe=()=>t.jsx(_,{packageJson:te,phCliVersion:typeof m.phCliVersion=="string"?m.phCliVersion:void 0}),ae=()=>{const i=b(),n=async r=>{await D(r.header.id),M(void 0)},s=()=>{P({type:"clearStorage"})};return t.jsx(R,{drives:i??[],onDeleteDrive:n,onClearStorage:s})},u=[{label:"V1",value:"document-model-editor"},{label:"V2",value:"document-model-editor-v2"}],ne=()=>{const[i,n]=a.useState(u[1]),s=a.useCallback(r=>{const o=u.find(p=>p.value==r);o&&n(o)},[]);return t.jsx(z,{documentModelEditor:i.value,setDocumentModelEditor:s,documentModelEditorOptions:u})},g="local-reactor",re="Local Reactor",ce=()=>{const i=A(),n=b(),[s,r]=a.useState(""),o=a.useMemo(()=>n?.reduce((e,l)=>{const c=l.state.local.triggers.find(y=>y.data?.url);if(!c?.data?.url)return e;const f=c.data.url,w=l.state.global.name;return e.push({value:f,label:w,disabled:!0}),e},[{value:g,label:re,disabled:!1}]),[n]);a.useEffect(()=>{r(e=>{const l=o?.find(c=>!c.disabled);return e&&o?.find(c=>c.value===e)?e:l?.value??""})},[s,o]);const p=i?.map(e=>O(e)),x=a.useCallback(e=>r(e??""),[]),h=a.useCallback(e=>{if(s!==g)throw new Error("Cannot install external package on a remote reactor");return k(e)},[s]),v=a.useCallback(e=>{if(s!==g)throw new Error("Cannot delete external package on a remote reactor");return j(e)},[s]);return t.jsx(H,{mutable:!0,reactorOptions:o??[],reactor:s,packages:p?.map(e=>({id:e.id,name:e.name,description:e.description,category:e.category,publisher:e.author.name,publisherUrl:e.author.website??"",modules:Object.values(e.modules).flatMap(l=>l.map(c=>c.name)),removable:!0}))??[],onReactorChange:x,onInstall:h,onUninstall:v,packageOptions:C})},Me=()=>{const n=S()?.type==="settings";function s(){window.location.reload()}const r=a.useMemo(()=>[{id:"package-manager",icon:t.jsx(d,{name:"PackageManager",size:12}),label:"Package Manager",content:ce},{id:"default-editors",icon:t.jsx(d,{name:"Edit",size:12}),label:"Default Editors",content:ne},{id:"danger-zone",icon:t.jsx(d,{name:"Danger",size:12,className:"text-red-900"}),label:t.jsx("span",{className:"text-red-900",children:"Danger Zone"}),content:()=>t.jsx(ae,{})},{id:"about",icon:t.jsx(d,{name:"QuestionSquare",size:12}),label:"About",content:oe}],[s]);return t.jsx(V,{open:n,title:E("modals.connectSettings.title"),onOpenChange:o=>{if(!o)return L()},tabs:r})};export{Me as SettingsModal};
1
+ import{j as t}from"./document_model_editor-B_fRFi56.js";import{b as m,d as k,r as j,a as E}from"./index-Bf7GGgE5.js";import{r as a}from"./sentry_react-CVx4Qq7f.js";import{P as C}from"./config-0mYxXHFp.js";import{at as b,x as P,aI as D,s as M,aO as A,aP as O,a1 as S,aA as L}from"./reactor_browser-CI14TYlI.js";import{w as _,x as R,y as z,z as H,B as V}from"./design_system_connect-SoJPzAdw.js";import{I as d}from"./design_system-Cvyob7tr.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./react-D_vzfE_e.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./sentry_browser-TIBDlywD.js";import"./design_system_ui-B4c9YVjt.js";const q="@powerhousedao/connect",I="Powerhouse-Connect",U="6.0.0-dev.44",T="Powerhouse Connect",$="dist/index.html",B="module",N={node:">=24.0.0"},G=["dist","lib","nginx.conf","nginx.sh","scripts","assets","public","heroku",".env","./src/index.css","./package.copy.json"],Z={".":{source:"./src/index.ts",import:"./lib/src/index.js",types:"./lib/src/index.d.ts"},"./package.json":"./package.copy.json","./main.js":{source:"./src/main.tsx",import:"./lib/src/main.js",types:"./lib/src/main.d.ts"},"./*.js":{source:"./src/*.ts",import:"./lib/src/*.js",types:"./lib/src/*.d.ts"},"./components":{source:"./src/components/index.ts",import:"./lib/src/components/index.js",types:"./lib/src/components/index.d.ts"},"./pages":{source:"./src/pages/index.ts",import:"./lib/src/pages/index.js",types:"./lib/src/pages/index.d.ts"},"./services":{source:"./src/services/index.ts",import:"./lib/src/services/index.js",types:"./lib/src/services/index.d.ts"},"./context":{source:"./src/context/index.ts",import:"./lib/src/context/index.js",types:"./lib/src/context/index.d.ts"},"./hooks":{source:"./src/hooks/index.ts",import:"./lib/src/hooks/index.js",types:"./lib/src/hooks/index.d.ts"},"./store":{source:"./src/store/index.ts",import:"./lib/src/store/index.js",types:"./lib/src/store/index.d.ts"},"./utils":{source:"./src/utils/index.ts",import:"./lib/src/utils/index.js",types:"./lib/src/utils/index.d.ts"},"./config":{source:"./src/connect.config.ts",import:"./lib/src/connect.config.js",types:"./lib/src/connect.config.d.ts"},"./i18n":{source:"./src/i18n/index.ts",import:"./lib/src/i18n/index.js",types:"./lib/src/i18n/index.d.ts"},"./custom.d.ts":"./lib/custom.d.ts","./style.css":"./lib/style.css","./assets/*.mp4":"./assets/*.mp4","./assets/*.png":"./assets/*.png","./assets/*.svg":"./assets/*.svg","./assets/*.jpg":"./assets/*.jpg","./assets/*.jpeg":"./assets/*.jpeg","./assets/*.gif":"./assets/*.gif","./assets/*.webp":"./assets/*.webp","./assets/*.avif":"./assets/*.avif","./public/icon.ico":"./public/icon.ico"},J=["lib/src/main.js","src/main.tsx"],K="AGPL-3.0-only",Q="powerhouse.inc",F={type:"git",url:"https://github.com/powerhouse-inc/powerhouse"},W={url:"https://github.com/powerhouse-inc/powerhouse/issues"},X="https://github.com/powerhouse-inc/powerhouse#readme",Y={tsc:"tsc",lint:"eslint",test:"vitest --run",postinstall:"cp ./package.json ./package.copy.json",dev:"vite dev","build:css":"pnpm exec tailwindcss -i ./src/index.css -o ./lib/style.css","build:vite":"vite build","build:debug":"PH_DEBUG_BUILD=true vite build",preview:"vite preview","cy:open":"cypress open","docker:build":"docker build -f ./Dockerfile --tag connect-test-dev --build-arg TAG=dev .","docker:run":"docker run -it -p 4000:4000 -v $(realpath ../../../monorepo):/monorepo -v $(pwd)/nginx.conf:/etc/nginx/nginx.conf.template -e PH_USE_LOCAL=true -e PH_CONNECT_BASE_PATH=/develop/powerhouse/connect -e PORT=4000 connect-test-dev"},ee={"@electric-sql/pglite":"catalog:","@electric-sql/pglite-tools":"catalog:","@openfeature/core":"^1.9.1","@openfeature/web-sdk":"^1.6.2","@powerhousedao/analytics-engine-core":"catalog:","@powerhousedao/builder-tools":"workspace:*","@powerhousedao/common":"workspace:*","@powerhousedao/config":"workspace:*","@powerhousedao/design-system":"workspace:*","@powerhousedao/document-engineering":"catalog:","@powerhousedao/reactor":"workspace:*","@powerhousedao/reactor-browser":"workspace:*","@renown/sdk":"workspace:*","@sentry/browser":"^10.17.0","@sentry/react":"^10.17.0","@sentry/vite-plugin":"^4.3.0","@tailwindcss/vite":"catalog:","@types/cypress":"^1.1.6","@types/node":"catalog:","@types/react":"catalog:","@types/react-dom":"catalog:","@types/wicg-file-system-access":"^2023.10.7","@vitejs/plugin-react":"catalog:",cypress:"^14.5.4","document-drive":"workspace:*","document-model":"workspace:*","fast-deep-equal":"^3.1.3",graphql:"catalog:","graphql-request":"catalog:",i18next:"^25.5.3",kysely:"catalog:","kysely-pglite-dialect":"catalog:",react:"catalog:","react-dom":"catalog:","react-error-boundary":"^4.0.11","react-hotkeys-hook":"^4.6.2","react-i18next":"^16.0.0","react-router-dom":"^6.11.2","tailwind-merge":"catalog:",tailwindcss:"catalog:",vite:"catalog:","vite-bundle-analyzer":"^1.3.6","vite-plugin-html":"catalog:","vite-plugin-node-polyfills":"catalog:","vite-plugin-svgr":"catalog:",zod:"catalog:"},se={shared:"workspace:","@tailwindcss/cli":"catalog:"},te={name:q,productName:I,version:U,description:T,main:$,type:B,engines:N,files:G,exports:Z,sideEffects:J,license:K,author:Q,repository:F,bugs:W,homepage:X,scripts:Y,dependencies:ee,devDependencies:se},oe=()=>t.jsx(_,{packageJson:te,phCliVersion:typeof m.phCliVersion=="string"?m.phCliVersion:void 0}),ae=()=>{const i=b(),n=async r=>{await D(r.header.id),M(void 0)},s=()=>{P({type:"clearStorage"})};return t.jsx(R,{drives:i??[],onDeleteDrive:n,onClearStorage:s})},u=[{label:"V1",value:"document-model-editor"},{label:"V2",value:"document-model-editor-v2"}],ne=()=>{const[i,n]=a.useState(u[1]),s=a.useCallback(r=>{const o=u.find(p=>p.value==r);o&&n(o)},[]);return t.jsx(z,{documentModelEditor:i.value,setDocumentModelEditor:s,documentModelEditorOptions:u})},g="local-reactor",re="Local Reactor",ce=()=>{const i=A(),n=b(),[s,r]=a.useState(""),o=a.useMemo(()=>n?.reduce((e,l)=>{const c=l.state.local.triggers.find(y=>y.data?.url);if(!c?.data?.url)return e;const f=c.data.url,w=l.state.global.name;return e.push({value:f,label:w,disabled:!0}),e},[{value:g,label:re,disabled:!1}]),[n]);a.useEffect(()=>{r(e=>{const l=o?.find(c=>!c.disabled);return e&&o?.find(c=>c.value===e)?e:l?.value??""})},[s,o]);const p=i?.map(e=>O(e)),x=a.useCallback(e=>r(e??""),[]),h=a.useCallback(e=>{if(s!==g)throw new Error("Cannot install external package on a remote reactor");return k(e)},[s]),v=a.useCallback(e=>{if(s!==g)throw new Error("Cannot delete external package on a remote reactor");return j(e)},[s]);return t.jsx(H,{mutable:!0,reactorOptions:o??[],reactor:s,packages:p?.map(e=>({id:e.id,name:e.name,description:e.description,category:e.category,publisher:e.author.name,publisherUrl:e.author.website??"",modules:Object.values(e.modules).flatMap(l=>l.map(c=>c.name)),removable:!0}))??[],onReactorChange:x,onInstall:h,onUninstall:v,packageOptions:C})},Me=()=>{const n=S()?.type==="settings";function s(){window.location.reload()}const r=a.useMemo(()=>[{id:"package-manager",icon:t.jsx(d,{name:"PackageManager",size:12}),label:"Package Manager",content:ce},{id:"default-editors",icon:t.jsx(d,{name:"Edit",size:12}),label:"Default Editors",content:ne},{id:"danger-zone",icon:t.jsx(d,{name:"Danger",size:12,className:"text-red-900"}),label:t.jsx("span",{className:"text-red-900",children:"Danger Zone"}),content:()=>t.jsx(ae,{})},{id:"about",icon:t.jsx(d,{name:"QuestionSquare",size:12}),label:"About",content:oe}],[s]);return t.jsx(V,{open:n,title:E("modals.connectSettings.title"),onOpenChange:o=>{if(!o)return L()},tabs:r})};export{Me as SettingsModal};
@@ -1 +1 @@
1
- import{j as a}from"./document_model_editor-B_fRFi56.js";import"./sentry_react-CVx4Qq7f.js";import{u as n}from"./index-2R4Z5JTm.js";import{E as d}from"./design_system_connect-SoJPzAdw.js";import{a1 as s,aA as t}from"./reactor_browser-CI14TYlI.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./react-D_vzfE_e.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./sentry_browser-TIBDlywD.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./design_system_ui-B4c9YVjt.js";const P=()=>{const r=s(),e=r?.type==="upgradeDrive",i=e?r.driveId:void 0,{t:o}=n(),p=()=>{console.log("Upgrade drive: ",i),t()};return a.jsx(d,{open:e,onContinue:p,header:o("modals.upgradeDrive.header"),body:o("modals.upgradeDrive.body"),cancelLabel:o("common.cancel"),continueLabel:o("common.continue"),onOpenChange:m=>{if(!m)return t()}})};export{P as UpgradeDriveModal};
1
+ import{j as a}from"./document_model_editor-B_fRFi56.js";import"./sentry_react-CVx4Qq7f.js";import{u as n}from"./index-Bf7GGgE5.js";import{E as d}from"./design_system_connect-SoJPzAdw.js";import{a1 as s,aA as t}from"./reactor_browser-CI14TYlI.js";import"./graphql-BXSeDpaV.js";import"./drive_explorer-DxDLfh8c.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-C-Ne8Zoy.js";import"./zod-Cc38s6JG.js";import"./react-D_vzfE_e.js";import"./design_system-Cvyob7tr.js";import"./tailwind_merge-CXl88Wxt.js";import"./react-dom-Cz_KAjfm.js";import"./sentry_browser-TIBDlywD.js";import"./react-dom/client-SoBEzBdt.js";import"./graphql_request-BHyPFzlZ.js";import"./document_drive-B4eFu84b.js";import"./design_system_ui-B4c9YVjt.js";const P=()=>{const r=s(),e=r?.type==="upgradeDrive",i=e?r.driveId:void 0,{t:o}=n(),p=()=>{console.log("Upgrade drive: ",i),t()};return a.jsx(d,{open:e,onContinue:p,header:o("modals.upgradeDrive.header"),body:o("modals.upgradeDrive.body"),cancelLabel:o("common.cancel"),continueLabel:o("common.continue"),onOpenChange:m=>{if(!m)return t()}})};export{P as UpgradeDriveModal};