@powerhousedao/connect 4.1.0-dev.107 → 4.1.0-dev.109
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/assets/{AddDriveModal-C2fZqOQI.js → AddDriveModal-CPvaNH6Y.js} +1 -1
- package/dist/assets/{ClearStorageModal-DjjEBXBS.js → ClearStorageModal-YTs1k-Rl.js} +1 -1
- package/dist/assets/{CookiesPolicyModal-BrOPPvzy.js → CookiesPolicyModal-DElFJVXD.js} +1 -1
- package/dist/assets/{DebugSettingsModal-PbDxwRkN.js → DebugSettingsModal-Bx9NT9Ky.js} +1 -1
- package/dist/assets/{DeleteDriveModal-x5WgUnZq.js → DeleteDriveModal-Bf1gE91q.js} +1 -1
- package/dist/assets/{DeleteItemModal-BBYKOKsF.js → DeleteItemModal-CNXFTEYJ.js} +1 -1
- package/dist/assets/{DisclaimerModal-CteySYvG.js → DisclaimerModal-DDEyWnKN.js} +1 -1
- package/dist/assets/{ExportDocumentWithErrorsModal-B7IfIoUE.js → ExportDocumentWithErrorsModal-C6qbJb3Q.js} +1 -1
- package/dist/assets/{SettingsModal-BrdAtrxz.js → SettingsModal-DYv5jD8W.js} +1 -1
- package/dist/assets/{UpgradeDriveModal-fqiiEuOr.js → UpgradeDriveModal-Cpk1OypL.js} +1 -1
- package/dist/assets/{index-BSTajiPh.js → index-D7p9xwW5.js} +3 -3
- package/dist/index.html +1 -1
- package/lib/package.copy.json +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.copy.json +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as D,C as b,B as g,ai as w,j as A,aj as i,af as T,s,ak as M}from"./reactor_browser-BbZdm6Aa.js";import{t as c,a as d}from"./index-
|
|
1
|
+
import{Q as D,C as b,B as g,ai as w,j as A,aj as i,af as T,s,ak as M}from"./reactor_browser-BbZdm6Aa.js";import{t as c,a as d}from"./index-D7p9xwW5.js";import{g as S}from"./design_system_connect-DHQbQvgv.js";import{x as l}from"./document_drive-CP6paqKN.js";import"./document_model-DLxR7ZLO.js";import"./zod-C6yxFxyo.js";import"./sentry_react-C4W8xEsl.js";import"./sentry_browser-BFJlXALZ.js";import"./drive_explorer-IB_BS5Au.js";import"./design_system-CZfmC8Ij.js";import"./common-n2B-GsjO.js";import"./graphql_request-9RNJ00DB.js";import"./graphql-BS4Brs_E.js";import"./document_model_editor-ButtI7kP.js";import"./config-CU-aFfVJ.js";function U(){const p=D()?.type==="addDrive",n=b(),a=g(),t=w(),u=async e=>{try{const r=t?.find(h=>h.id===e.appId),o=await M({id:"",slug:"",global:{name:e.name,icon:null},local:{availableOffline:e.availableOffline,sharingType:e.sharingType.toLowerCase(),listeners:[],triggers:[]}},r?.id);if(c(d("notifications.addDriveSuccess"),{type:"connect-success"}),!o)return;s(o)}catch(r){console.error(r)}},m=async e=>{try{const r=await T(e.url,{sharingType:e.sharingType,availableOffline:e.availableOffline,listeners:[{block:!0,callInfo:{data:e.url,name:"switchboard-push",transmitterType:"SwitchboardPush"},filter:{branch:["main"],documentId:["*"],documentType:["*"],scope:["global"]},label:"Switchboard Sync",listenerId:"1",system:!0}],triggers:[]});if(c(d("notifications.addDriveSuccess"),{type:"connect-success"}),!r)return;s(r)}catch(r){console.error(r)}};async function v(e){await u(e),i()}async function f(e){await m(e),i()}const y=!!t?.length;return A.jsx(S,{open:p&&y,onAddLocalDrive:v,onAddRemoteDrive:f,requestPublicDrive:async e=>{try{const r=await a?.getBearerToken?.(e,n?.address,!0,{expiresIn:10});return l(e,{Authorization:`Bearer ${r}`})}catch(r){console.error(r);const o=await a?.getBearerToken?.(e,n?.address,!0,{expiresIn:10});return l(e,{Authorization:`Bearer ${o}`})}},onOpenChange:e=>{if(!e)return i()},appOptions:t?.map(e=>({id:e.id,name:e.name,driveEditor:e.id}))||[]})}export{U as AddDriveModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as l,j as s,v as c,aj as m,s as d,d as p}from"./reactor_browser-BbZdm6Aa.js";import{r as g}from"./sentry_react-C4W8xEsl.js";import{u,c as S}from"./index-
|
|
1
|
+
import{Q as l,j as s,v as c,aj as m,s as d,d as p}from"./reactor_browser-BbZdm6Aa.js";import{r as g}from"./sentry_react-C4W8xEsl.js";import{u,c as S}from"./index-D7p9xwW5.js";import{h as f}from"./design_system_connect-DHQbQvgv.js";import{t as h}from"./document_drive-CP6paqKN.js";import"./document_model-DLxR7ZLO.js";import"./zod-C6yxFxyo.js";import"./sentry_browser-BFJlXALZ.js";import"./drive_explorer-IB_BS5Au.js";import"./design_system-CZfmC8Ij.js";import"./common-n2B-GsjO.js";import"./graphql_request-9RNJ00DB.js";import"./graphql-BS4Brs_E.js";import"./document_model_editor-ButtI7kP.js";import"./config-CU-aFfVJ.js";const r=h(["ClearStorage"]);function O(){const a=l()?.type==="clearStorage",{t:o}=u(),[n,e]=g.useState(!1);function i(){e(!0),S().then(()=>{r.info("Storage cleared"),d(void 0),p(void 0),window.location.reload()}).catch(t=>{r.error("Error clearing storage",t),e(!1)})}return s.jsx(f,{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:()=>c({type:"settings"}),onContinue:i,onOpenChange:t=>{if(!t)return m()},continueButtonProps:{disabled:n}})}export{O as ClearStorageModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as e,j as o,aj as i}from"./reactor_browser-BbZdm6Aa.js";import{u as l,T as a}from"./index-
|
|
1
|
+
import{Q as e,j as o,aj as i}from"./reactor_browser-BbZdm6Aa.js";import{u as l,T as a}from"./index-D7p9xwW5.js";import{i as m}from"./design_system_connect-DHQbQvgv.js";import"./document_drive-CP6paqKN.js";import"./sentry_browser-BFJlXALZ.js";import"./document_model-DLxR7ZLO.js";import"./zod-C6yxFxyo.js";import"./sentry_react-C4W8xEsl.js";import"./graphql-BS4Brs_E.js";import"./config-CU-aFfVJ.js";import"./drive_explorer-IB_BS5Au.js";import"./design_system-CZfmC8Ij.js";import"./common-n2B-GsjO.js";import"./graphql_request-9RNJ00DB.js";import"./document_model_editor-ButtI7kP.js";const C=()=>{const s=e()?.type==="cookiesPolicy",{t}=l();return o.jsx(m,{open:s,header:t("modals.cookiesPolicy.title"),body:o.jsx(a,{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:()=>i(),overlayProps:{style:{zIndex:1e4}}})};export{C as CookiesPolicyModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as M,ad as A,j as e,aj as R,an as U,ao as V,ap as D}from"./reactor_browser-BbZdm6Aa.js";import{b as S,s as o}from"./index-
|
|
1
|
+
import{Q as M,ad as A,j as e,aj as R,an as U,ao as V,ap as D}from"./reactor_browser-BbZdm6Aa.js";import{b as S,s as o}from"./index-D7p9xwW5.js";import{r}from"./sentry_react-C4W8xEsl.js";import{k as c,F as T}from"./design_system_connect-DHQbQvgv.js";import{M as z,I as m,z as x}from"./design_system-CZfmC8Ij.js";import{g as F}from"./document_model-DLxR7ZLO.js";import"./document_drive-CP6paqKN.js";import"./sentry_browser-BFJlXALZ.js";import"./graphql-BS4Brs_E.js";import"./zod-C6yxFxyo.js";import"./config-CU-aFfVJ.js";import"./drive_explorer-IB_BS5Au.js";import"./graphql_request-9RNJ00DB.js";import"./document_model_editor-ButtI7kP.js";import"./common-n2B-GsjO.js";const le=()=>{const w=M()?.type==="debugSettings",g=localStorage.getItem("AUTO_REGISTER_PULL_RESPONDER")!=="false",[t,v]=r.useState(S.appVersion),[u,y]=r.useState({label:o.debug?"Enabled":"Disabled",value:o.debug}),[l,h]=r.useState(),[i,n]=r.useState(null),[a,p]=r.useState(""),[E,C]=r.useState({label:g?"Enabled":"Disabled",value:g?"true":"false"}),b=A();r.useEffect(()=>{o.setDebug(u.value)},[u]);const P=b?.find(s=>s.header.id===l)?.state.local.triggers||[],d=!l||a==="",k=async()=>{!i||!l||(await U(l,i.value),n(null))},j=async(s=!1)=>{if(!a||a===""||!l)return;if(!s){const N=await V(l,a,{pullInterval:3e3});if(!N)return;await D(l,N),p("");return}const f=F();await D(l,{id:`invalid-trigger-${f}`,type:"PullResponder",data:{interval:"3000",listenerId:`invalid-listener-${f}`,url:a}}),p("")},I=s=>{C(s),localStorage.setItem("AUTO_REGISTER_PULL_RESPONDER",s.value)};return e.jsx(z,{open:w,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: ",S.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),n(null);return}h(s.value),n(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=>{I(s)},value:E,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=>{n(s)},value:i,options:P.map(s=>({label:`${s.id} - ${s.type}`,value:s.id}))})]}),e.jsx("div",{children:e.jsx(x,{onClick:k,color:i?"red":"light",disabled:!i,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(T,{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:a,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:d?"light":"blue",size:"small",disabled:d,onClick:()=>j(),children:"Add Trigger"}),e.jsx(x,{color:d?"light":"red",size:"small",disabled:d,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=>{y(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(T,{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:t,onChange:s=>v(s.target.value)})]}),e.jsx("div",{className:"mb-1 flex items-center justify-center",children:e.jsx(x,{color:t===""?"light":"red",size:"small",disabled:t==="",onClick:()=>{o.sendMessage({type:"SET_APP_VERSION",version:t}),v("")},children:"Add Invalid App Version"})})]})]})})};export{le as DebugSettingsModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as d,aq as m,ad as c,j as p,aj as r,ar as v,s as u}from"./reactor_browser-BbZdm6Aa.js";import{u as D,t as f}from"./index-
|
|
1
|
+
import{Q as d,aq as m,ad as c,j as p,aj as r,ar as v,s as u}from"./reactor_browser-BbZdm6Aa.js";import{u as D,t as f}from"./index-D7p9xwW5.js";import{l as h}from"./design_system_connect-DHQbQvgv.js";import"./document_drive-CP6paqKN.js";import"./sentry_browser-BFJlXALZ.js";import"./document_model-DLxR7ZLO.js";import"./zod-C6yxFxyo.js";import"./sentry_react-C4W8xEsl.js";import"./graphql-BS4Brs_E.js";import"./config-CU-aFfVJ.js";import"./drive_explorer-IB_BS5Au.js";import"./design_system-CZfmC8Ij.js";import"./common-n2B-GsjO.js";import"./graphql_request-9RNJ00DB.js";import"./document_model_editor-ButtI7kP.js";const E=()=>{const i=d(),a=i?.type==="deleteDrive",t=a?i.driveId:void 0,[o]=m(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 p.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{E as DeleteDriveModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as p,as as u,b as I,h as f,j as y,aj as r,at as D,d as b}from"./reactor_browser-BbZdm6Aa.js";import"./sentry_react-C4W8xEsl.js";import{u as F,t as L}from"./index-
|
|
1
|
+
import{Q as p,as as u,b as I,h as f,j as y,aj as r,at as D,d as b}from"./reactor_browser-BbZdm6Aa.js";import"./sentry_react-C4W8xEsl.js";import{u as F,t as L}from"./index-D7p9xwW5.js";import{m as M}from"./design_system_connect-DHQbQvgv.js";import"./document_drive-CP6paqKN.js";import"./sentry_browser-BFJlXALZ.js";import"./document_model-DLxR7ZLO.js";import"./zod-C6yxFxyo.js";import"./graphql-BS4Brs_E.js";import"./config-CU-aFfVJ.js";import"./drive_explorer-IB_BS5Au.js";import"./design_system-CZfmC8Ij.js";import"./common-n2B-GsjO.js";import"./graphql_request-9RNJ00DB.js";import"./document_model_editor-ButtI7kP.js";const K=()=>{const n=p(),a=n?.type==="deleteItem",t=a?n.id:void 0,{t:e}=F(),o=u(t),i=o?.name,s=o?.kind,d=I(),l=f(o?.parentFolder);async function m(){if(!d||!t)return;r();const c=s==="FOLDER"?"notifications.deleteFolderSuccess":"notifications.fileDeleteSuccess";await D(d,t),b(l),L(e(c),{type:"connect-deleted"})}return y.jsx(M,{open:a,onDelete:()=>m(),onCancel:()=>r(),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{K as DeleteItemModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as r,j as t,aj as m}from"./reactor_browser-BbZdm6Aa.js";import"./sentry_react-C4W8xEsl.js";import{u as s}from"./index-
|
|
1
|
+
import{Q as r,j as t,aj as m}from"./reactor_browser-BbZdm6Aa.js";import"./sentry_react-C4W8xEsl.js";import{u as s}from"./index-D7p9xwW5.js";import{i as a}from"./design_system_connect-DHQbQvgv.js";import"./document_drive-CP6paqKN.js";import"./sentry_browser-BFJlXALZ.js";import"./document_model-DLxR7ZLO.js";import"./zod-C6yxFxyo.js";import"./graphql-BS4Brs_E.js";import"./config-CU-aFfVJ.js";import"./drive_explorer-IB_BS5Au.js";import"./design_system-CZfmC8Ij.js";import"./common-n2B-GsjO.js";import"./graphql_request-9RNJ00DB.js";import"./document_model_editor-ButtI7kP.js";const H=()=>{const i=r()?.type==="disclaimer",{t:o}=s();return t.jsx(a,{open:i,header:o("modals.disclaimer.title"),body:o("modals.disclaimer.body"),closeLabel:"Close",onContinue:()=>m()})};export{H as DisclaimerModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as l,f as p,E as d,j as r,aj as n,F as u}from"./reactor_browser-BbZdm6Aa.js";import{u as x}from"./index-
|
|
1
|
+
import{Q as l,f as p,E as d,j as r,aj as n,F as u}from"./reactor_browser-BbZdm6Aa.js";import{u as x}from"./index-D7p9xwW5.js";import{h}from"./design_system_connect-DHQbQvgv.js";import"./document_drive-CP6paqKN.js";import"./sentry_browser-BFJlXALZ.js";import"./document_model-DLxR7ZLO.js";import"./zod-C6yxFxyo.js";import"./sentry_react-C4W8xEsl.js";import"./graphql-BS4Brs_E.js";import"./config-CU-aFfVJ.js";import"./drive_explorer-IB_BS5Au.js";import"./design_system-CZfmC8Ij.js";import"./common-n2B-GsjO.js";import"./graphql_request-9RNJ00DB.js";import"./document_model_editor-ButtI7kP.js";function P(){const i=l(),s=i?.type==="exportDocumentWithErrors",m=s?i.documentId:void 0,[e]=p(m),{t:o}=x();if(!e)return null;const a=d(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:()=>n(),onContinue:async()=>{try{await u(e)}catch(t){console.error(t)}finally{n()}},open:s,onOpenChange:t=>{if(!t)return n()}})}export{P as ExportDocumentWithErrorsModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,ad as b,v as k,ar as j,s as E,ay as C,az as P,Q as D,aj as M}from"./reactor_browser-BbZdm6Aa.js";import{b as g,d as A,r as S,a as O}from"./index-
|
|
1
|
+
import{j as t,ad as b,v as k,ar as j,s as E,ay as C,az as P,Q as D,aj as M}from"./reactor_browser-BbZdm6Aa.js";import{b as g,d as A,r as S,a as O}from"./index-D7p9xwW5.js";import{r as n}from"./sentry_react-C4W8xEsl.js";import{P as L}from"./config-CU-aFfVJ.js";import{o as _,p as R,q as z,P as H,r as V}from"./design_system_connect-DHQbQvgv.js";import{I as d}from"./design_system-CZfmC8Ij.js";import"./document_drive-CP6paqKN.js";import"./sentry_browser-BFJlXALZ.js";import"./document_model-DLxR7ZLO.js";import"./zod-C6yxFxyo.js";import"./graphql-BS4Brs_E.js";import"./drive_explorer-IB_BS5Au.js";import"./graphql_request-9RNJ00DB.js";import"./document_model_editor-ButtI7kP.js";import"./common-n2B-GsjO.js";const q="@powerhousedao/connect",U="Powerhouse-Connect",I="4.1.0-dev.108",T="Powerhouse Connect",$="dist/index.html",N="module",B={node:">=22.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":"./src/index.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"},Q=!1,J="AGPL-3.0-only",K="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",postinstall:"cp ./package.json ./package.copy.json",dev:"vite dev","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":"0.2.17","@openfeature/core":"^1.9.1","@openfeature/web-sdk":"^1.6.2","@powerhousedao/analytics-engine-core":"^0.5.0","@powerhousedao/common":"workspace:*","@powerhousedao/config":"workspace:*","@powerhousedao/design-system":"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":"^4.1.14","@types/node":"^24.7.0","@types/react":"^19.2.0","@types/react-dom":"^19.2.0","@types/wicg-file-system-access":"^2023.10.7","@vitejs/plugin-react":"^5.0.4","document-drive":"workspace:*","document-model":"workspace:*","fast-deep-equal":"^3.1.3",graphql:"^16.11.0","graphql-request":"^7.2.0",i18next:"^25.5.3",react:"^19.2.0","react-dom":"^19.2.0","react-error-boundary":"^4.0.11","react-hotkeys-hook":"^4.5.0","react-i18next":"^16.0.0","react-router-dom":"^6.11.2","tailwind-merge":"^3.0.2",tailwindcss:"^4.1.14",vite:"^7.1.9","vite-plugin-html":"^3.2.2","vite-plugin-node-polyfills":"^0.24.0","vite-plugin-svgr":"^4.5.0",zod:"^3.24.3","@powerhousedao/builder-tools":"workspace:*","@powerhousedao/document-engineering":"^1.39.0","@types/cypress":"^1.1.6",cypress:"^14.5.4","vite-bundle-analyzer":"^1.2.3"},se={name:q,productName:U,version:I,description:T,main:$,type:N,engines:B,files:G,exports:Z,sideEffects:Q,license:J,author:K,repository:F,bugs:W,homepage:X,scripts:Y,dependencies:ee},te=()=>t.jsx(_,{packageJson:se,phCliVersion:typeof g.phCliVersion=="string"?g.phCliVersion:void 0}),oe=()=>{const c=b(),r=async a=>{await j(a.header.id),E(void 0)},s=()=>{k({type:"clearStorage"})};return t.jsx(R,{drives:c??[],onDeleteDrive:r,onClearStorage:s})},u=[{label:"V1",value:"document-model-editor"},{label:"V2",value:"document-model-editor-v2"}],ne=()=>{const[c,r]=n.useState(u[1]),s=n.useCallback(a=>{const o=u.find(p=>p.value==a);o&&r(o)},[]);return t.jsx(z,{documentModelEditor:c.value,setDocumentModelEditor:s,documentModelEditorOptions:u})},m="local-reactor",re="Local Reactor",ae=()=>{const c=C(),r=b(),[s,a]=n.useState(""),o=n.useMemo(()=>r?.reduce((e,l)=>{const i=l.state.local.triggers.find(y=>y.data?.url);if(!i?.data?.url)return e;const f=i.data.url,w=l.state.global.name;return e.push({value:f,label:w,disabled:!0}),e},[{value:m,label:re,disabled:!1}]),[r]);n.useEffect(()=>{a(e=>{const l=o?.find(i=>!i.disabled);return e&&o?.find(i=>i.value===e)?e:l?.value??""})},[s,o]);const p=c?.map(e=>P(e)),h=n.useCallback(e=>a(e??""),[]),x=n.useCallback(e=>{if(s!==m)throw new Error("Cannot install external package on a remote reactor");return A(e)},[s]),v=n.useCallback(e=>{if(s!==m)throw new Error("Cannot delete external package on a remote reactor");return S(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(i=>i.name)),removable:!0}))??[],onReactorChange:h,onInstall:x,onUninstall:v,packageOptions:L})},ke=()=>{const r=D()?.type==="settings";function s(){window.location.reload()}const a=n.useMemo(()=>[{id:"package-manager",icon:t.jsx(d,{name:"PackageManager",size:12}),label:"Package Manager",content:ae},{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(oe,{})},{id:"about",icon:t.jsx(d,{name:"QuestionSquare",size:12}),label:"About",content:te}],[s]);return t.jsx(V,{open:r,title:O("modals.connectSettings.title"),onOpenChange:o=>{if(!o)return M()},tabs:a})};export{ke as SettingsModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as p,j as m,aj as t}from"./reactor_browser-BbZdm6Aa.js";import"./sentry_react-C4W8xEsl.js";import{u as d}from"./index-
|
|
1
|
+
import{Q as p,j as m,aj as t}from"./reactor_browser-BbZdm6Aa.js";import"./sentry_react-C4W8xEsl.js";import{u as d}from"./index-D7p9xwW5.js";import{s}from"./design_system_connect-DHQbQvgv.js";import"./document_drive-CP6paqKN.js";import"./sentry_browser-BFJlXALZ.js";import"./document_model-DLxR7ZLO.js";import"./zod-C6yxFxyo.js";import"./graphql-BS4Brs_E.js";import"./config-CU-aFfVJ.js";import"./drive_explorer-IB_BS5Au.js";import"./design_system-CZfmC8Ij.js";import"./common-n2B-GsjO.js";import"./graphql_request-9RNJ00DB.js";import"./document_model_editor-ButtI7kP.js";const H=()=>{const r=p(),e=r?.type==="upgradeDrive",i=e?r.driveId:void 0,{t:o}=d(),n=()=>{console.log("Upgrade drive: ",i),t()};return m.jsx(s,{open:e,onContinue:n,header:o("modals.upgradeDrive.header"),body:o("modals.upgradeDrive.body"),cancelLabel:o("common.cancel"),continueLabel:o("common.continue"),onOpenChange:a=>{if(!a)return t()}})};export{H as UpgradeDriveModal};
|