kaizenai 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/FeatureOverviewPage-BxSLmFjE.js +6 -0
- package/dist/client/assets/FeatureOverviewPage-BxSLmFjE.js.br +0 -0
- package/dist/client/assets/FeatureOverviewPage-BxSLmFjE.js.gz +0 -0
- package/dist/client/assets/{LocalProjectsPage-FaTau-jU.js → LocalProjectsPage-zbE9M1lS.js} +2 -2
- package/dist/client/assets/LocalProjectsPage-zbE9M1lS.js.br +0 -0
- package/dist/client/assets/LocalProjectsPage-zbE9M1lS.js.gz +0 -0
- package/dist/client/assets/SettingsPage-B1hOripb.js +51 -0
- package/dist/client/assets/SettingsPage-B1hOripb.js.br +0 -0
- package/dist/client/assets/SettingsPage-B1hOripb.js.gz +0 -0
- package/dist/client/assets/_baseUniq-C2w2LY4t.js +1 -0
- package/dist/client/assets/_baseUniq-C2w2LY4t.js.br +0 -0
- package/dist/client/assets/_baseUniq-C2w2LY4t.js.gz +0 -0
- package/dist/client/assets/arc-kI82hC2U.js +1 -0
- package/dist/client/assets/arc-kI82hC2U.js.br +0 -0
- package/dist/client/assets/arc-kI82hC2U.js.gz +0 -0
- package/dist/client/assets/architectureDiagram-Q4EWVU46-Dt-scLmE.js +36 -0
- package/dist/client/assets/architectureDiagram-Q4EWVU46-Dt-scLmE.js.br +0 -0
- package/dist/client/assets/architectureDiagram-Q4EWVU46-Dt-scLmE.js.gz +0 -0
- package/dist/client/assets/blockDiagram-DXYQGD6D-Ceg04fxp.js +132 -0
- package/dist/client/assets/blockDiagram-DXYQGD6D-Ceg04fxp.js.br +0 -0
- package/dist/client/assets/blockDiagram-DXYQGD6D-Ceg04fxp.js.gz +0 -0
- package/dist/client/assets/c4Diagram-AHTNJAMY-D1qS_y2O.js +10 -0
- package/dist/client/assets/c4Diagram-AHTNJAMY-D1qS_y2O.js.br +0 -0
- package/dist/client/assets/c4Diagram-AHTNJAMY-D1qS_y2O.js.gz +0 -0
- package/dist/client/assets/channel-DFe4698G.js +1 -0
- package/dist/client/assets/chunk-4BX2VUAB-BzCF8Bhx.js +1 -0
- package/dist/client/assets/chunk-4BX2VUAB-BzCF8Bhx.js.br +0 -0
- package/dist/client/assets/chunk-4BX2VUAB-BzCF8Bhx.js.gz +0 -0
- package/dist/client/assets/chunk-4TB4RGXK-I9HBW3GS.js +206 -0
- package/dist/client/assets/chunk-4TB4RGXK-I9HBW3GS.js.br +0 -0
- package/dist/client/assets/chunk-4TB4RGXK-I9HBW3GS.js.gz +0 -0
- package/dist/client/assets/chunk-55IACEB6-DBrZB3xA.js +1 -0
- package/dist/client/assets/chunk-55IACEB6-DBrZB3xA.js.br +0 -0
- package/dist/client/assets/chunk-55IACEB6-DBrZB3xA.js.gz +0 -0
- package/dist/client/assets/chunk-EDXVE4YY-DIwETEEu.js +1 -0
- package/dist/client/assets/chunk-EDXVE4YY-DIwETEEu.js.br +4 -0
- package/dist/client/assets/chunk-EDXVE4YY-DIwETEEu.js.gz +0 -0
- package/dist/client/assets/chunk-FMBD7UC4-o4TABTop.js +15 -0
- package/dist/client/assets/chunk-FMBD7UC4-o4TABTop.js.br +3 -0
- package/dist/client/assets/chunk-FMBD7UC4-o4TABTop.js.gz +0 -0
- package/dist/client/assets/chunk-OYMX7WX6-DyxvSos-.js +231 -0
- package/dist/client/assets/chunk-OYMX7WX6-DyxvSos-.js.br +0 -0
- package/dist/client/assets/chunk-OYMX7WX6-DyxvSos-.js.gz +0 -0
- package/dist/client/assets/chunk-QZHKN3VN-WCcD-5Oe.js +1 -0
- package/dist/client/assets/chunk-QZHKN3VN-WCcD-5Oe.js.br +0 -0
- package/dist/client/assets/chunk-QZHKN3VN-WCcD-5Oe.js.gz +0 -0
- package/dist/client/assets/chunk-YZCP3GAM-BQzJEIQ2.js +1 -0
- package/dist/client/assets/chunk-YZCP3GAM-BQzJEIQ2.js.br +0 -0
- package/dist/client/assets/chunk-YZCP3GAM-BQzJEIQ2.js.gz +0 -0
- package/dist/client/assets/classDiagram-6PBFFD2Q-W3DhPKCy.js +1 -0
- package/dist/client/assets/classDiagram-6PBFFD2Q-W3DhPKCy.js.br +2 -0
- package/dist/client/assets/classDiagram-6PBFFD2Q-W3DhPKCy.js.gz +0 -0
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-W3DhPKCy.js +1 -0
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-W3DhPKCy.js.br +2 -0
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-W3DhPKCy.js.gz +0 -0
- package/dist/client/assets/clone-OEkyv13U.js +1 -0
- package/dist/client/assets/cose-bilkent-S5V4N54A-CB2BC0Fz.js +1 -0
- package/dist/client/assets/cose-bilkent-S5V4N54A-CB2BC0Fz.js.br +0 -0
- package/dist/client/assets/cose-bilkent-S5V4N54A-CB2BC0Fz.js.gz +0 -0
- package/dist/client/assets/cytoscape.esm-cJLYqCaY.js +331 -0
- package/dist/client/assets/cytoscape.esm-cJLYqCaY.js.br +0 -0
- package/dist/client/assets/cytoscape.esm-cJLYqCaY.js.gz +0 -0
- package/dist/client/assets/dagre-KV5264BT-GM3o4wKD.js +4 -0
- package/dist/client/assets/dagre-KV5264BT-GM3o4wKD.js.br +0 -0
- package/dist/client/assets/dagre-KV5264BT-GM3o4wKD.js.gz +0 -0
- package/dist/client/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/client/assets/defaultLocale-DX6XiGOO.js.br +0 -0
- package/dist/client/assets/defaultLocale-DX6XiGOO.js.gz +0 -0
- package/dist/client/assets/diagram-5BDNPKRD-BR7a9HbO.js +10 -0
- package/dist/client/assets/diagram-5BDNPKRD-BR7a9HbO.js.br +0 -0
- package/dist/client/assets/diagram-5BDNPKRD-BR7a9HbO.js.gz +0 -0
- package/dist/client/assets/diagram-G4DWMVQ6-jvXNcST5.js +24 -0
- package/dist/client/assets/diagram-G4DWMVQ6-jvXNcST5.js.br +0 -0
- package/dist/client/assets/diagram-G4DWMVQ6-jvXNcST5.js.gz +0 -0
- package/dist/client/assets/diagram-MMDJMWI5-IKtd4IJw.js +43 -0
- package/dist/client/assets/diagram-MMDJMWI5-IKtd4IJw.js.br +0 -0
- package/dist/client/assets/diagram-MMDJMWI5-IKtd4IJw.js.gz +0 -0
- package/dist/client/assets/diagram-TYMM5635-kaGAX7fz.js +24 -0
- package/dist/client/assets/diagram-TYMM5635-kaGAX7fz.js.br +0 -0
- package/dist/client/assets/diagram-TYMM5635-kaGAX7fz.js.gz +0 -0
- package/dist/client/assets/erDiagram-SMLLAGMA-DgSI8NcK.js +85 -0
- package/dist/client/assets/erDiagram-SMLLAGMA-DgSI8NcK.js.br +0 -0
- package/dist/client/assets/erDiagram-SMLLAGMA-DgSI8NcK.js.gz +0 -0
- package/dist/client/assets/{eye-l365F6h6.js → eye-Chg9E8Pp.js} +1 -1
- package/dist/client/assets/eye-Chg9E8Pp.js.br +0 -0
- package/dist/client/assets/eye-Chg9E8Pp.js.gz +0 -0
- package/dist/client/assets/flowDiagram-DWJPFMVM-BIHN8zd-.js +162 -0
- package/dist/client/assets/flowDiagram-DWJPFMVM-BIHN8zd-.js.br +0 -0
- package/dist/client/assets/flowDiagram-DWJPFMVM-BIHN8zd-.js.gz +0 -0
- package/dist/client/assets/ganttDiagram-T4ZO3ILL-CxIhVwuV.js +292 -0
- package/dist/client/assets/ganttDiagram-T4ZO3ILL-CxIhVwuV.js.br +0 -0
- package/dist/client/assets/ganttDiagram-T4ZO3ILL-CxIhVwuV.js.gz +0 -0
- package/dist/client/assets/gitGraphDiagram-UUTBAWPF-a31qmh2C.js +106 -0
- package/dist/client/assets/gitGraphDiagram-UUTBAWPF-a31qmh2C.js.br +0 -0
- package/dist/client/assets/gitGraphDiagram-UUTBAWPF-a31qmh2C.js.gz +0 -0
- package/dist/client/assets/graph-DAJmXGHa.js +1 -0
- package/dist/client/assets/graph-DAJmXGHa.js.br +0 -0
- package/dist/client/assets/graph-DAJmXGHa.js.gz +0 -0
- package/dist/client/assets/{index-BNHZTMos.js → index-BZRkF5A6.js} +181 -175
- package/dist/client/assets/index-BZRkF5A6.js.br +0 -0
- package/dist/client/assets/index-BZRkF5A6.js.gz +0 -0
- package/dist/client/assets/index-CuRj9_7h.css +32 -0
- package/dist/client/assets/index-CuRj9_7h.css.br +0 -0
- package/dist/client/assets/index-CuRj9_7h.css.gz +0 -0
- package/dist/client/assets/infoDiagram-42DDH7IO-cLNxh5KZ.js +2 -0
- package/dist/client/assets/infoDiagram-42DDH7IO-cLNxh5KZ.js.br +0 -0
- package/dist/client/assets/infoDiagram-42DDH7IO-cLNxh5KZ.js.gz +0 -0
- package/dist/client/assets/init-Gi6I4Gst.js +1 -0
- package/dist/client/assets/init-Gi6I4Gst.js.br +0 -0
- package/dist/client/assets/init-Gi6I4Gst.js.gz +0 -0
- package/dist/client/assets/ishikawaDiagram-UXIWVN3A-CcxhP4Br.js +70 -0
- package/dist/client/assets/ishikawaDiagram-UXIWVN3A-CcxhP4Br.js.br +0 -0
- package/dist/client/assets/ishikawaDiagram-UXIWVN3A-CcxhP4Br.js.gz +0 -0
- package/dist/client/assets/journeyDiagram-VCZTEJTY-D46KbIti.js +139 -0
- package/dist/client/assets/journeyDiagram-VCZTEJTY-D46KbIti.js.br +0 -0
- package/dist/client/assets/journeyDiagram-VCZTEJTY-D46KbIti.js.gz +0 -0
- package/dist/client/assets/kanban-definition-6JOO6SKY-Dybz1m9J.js +89 -0
- package/dist/client/assets/kanban-definition-6JOO6SKY-Dybz1m9J.js.br +0 -0
- package/dist/client/assets/kanban-definition-6JOO6SKY-Dybz1m9J.js.gz +0 -0
- package/dist/client/assets/katex-DkKDou_j.js +257 -0
- package/dist/client/assets/katex-DkKDou_j.js.br +0 -0
- package/dist/client/assets/katex-DkKDou_j.js.gz +0 -0
- package/dist/client/assets/layout-C-M8Av8W.js +1 -0
- package/dist/client/assets/layout-C-M8Av8W.js.br +0 -0
- package/dist/client/assets/layout-C-M8Av8W.js.gz +0 -0
- package/dist/client/assets/linear-C3yBilRF.js +1 -0
- package/dist/client/assets/linear-C3yBilRF.js.br +0 -0
- package/dist/client/assets/linear-C3yBilRF.js.gz +0 -0
- package/dist/client/assets/mermaid.core-Dsp_nHq1.js +309 -0
- package/dist/client/assets/mermaid.core-Dsp_nHq1.js.br +0 -0
- package/dist/client/assets/mermaid.core-Dsp_nHq1.js.gz +0 -0
- package/dist/client/assets/min-BSlwwCfB.js +1 -0
- package/dist/client/assets/min-BSlwwCfB.js.br +0 -0
- package/dist/client/assets/min-BSlwwCfB.js.gz +0 -0
- package/dist/client/assets/mindmap-definition-QFDTVHPH-XtKE_1_l.js +96 -0
- package/dist/client/assets/mindmap-definition-QFDTVHPH-XtKE_1_l.js.br +0 -0
- package/dist/client/assets/mindmap-definition-QFDTVHPH-XtKE_1_l.js.gz +0 -0
- package/dist/client/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/client/assets/ordinal-Cboi1Yqb.js.br +0 -0
- package/dist/client/assets/ordinal-Cboi1Yqb.js.gz +0 -0
- package/dist/client/assets/pieDiagram-DEJITSTG-qet2Ts4X.js +30 -0
- package/dist/client/assets/pieDiagram-DEJITSTG-qet2Ts4X.js.br +0 -0
- package/dist/client/assets/pieDiagram-DEJITSTG-qet2Ts4X.js.gz +0 -0
- package/dist/client/assets/quadrantDiagram-34T5L4WZ-mkJwXSt4.js +7 -0
- package/dist/client/assets/quadrantDiagram-34T5L4WZ-mkJwXSt4.js.br +0 -0
- package/dist/client/assets/quadrantDiagram-34T5L4WZ-mkJwXSt4.js.gz +0 -0
- package/dist/client/assets/requirementDiagram-MS252O5E-DI4iiflo.js +84 -0
- package/dist/client/assets/requirementDiagram-MS252O5E-DI4iiflo.js.br +0 -0
- package/dist/client/assets/requirementDiagram-MS252O5E-DI4iiflo.js.gz +0 -0
- package/dist/client/assets/sankeyDiagram-XADWPNL6-B7UGXnbh.js +10 -0
- package/dist/client/assets/sankeyDiagram-XADWPNL6-B7UGXnbh.js.br +0 -0
- package/dist/client/assets/sankeyDiagram-XADWPNL6-B7UGXnbh.js.gz +0 -0
- package/dist/client/assets/sequenceDiagram-FGHM5R23-EwEEFH2U.js +157 -0
- package/dist/client/assets/sequenceDiagram-FGHM5R23-EwEEFH2U.js.br +0 -0
- package/dist/client/assets/sequenceDiagram-FGHM5R23-EwEEFH2U.js.gz +0 -0
- package/dist/client/assets/stateDiagram-FHFEXIEX-CEyL8vFk.js +1 -0
- package/dist/client/assets/stateDiagram-FHFEXIEX-CEyL8vFk.js.br +0 -0
- package/dist/client/assets/stateDiagram-FHFEXIEX-CEyL8vFk.js.gz +0 -0
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-CKPSFeVE.js +1 -0
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-CKPSFeVE.js.br +0 -0
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-CKPSFeVE.js.gz +0 -0
- package/dist/client/assets/timeline-definition-GMOUNBTQ-BE3n-S3r.js +120 -0
- package/dist/client/assets/timeline-definition-GMOUNBTQ-BE3n-S3r.js.br +0 -0
- package/dist/client/assets/timeline-definition-GMOUNBTQ-BE3n-S3r.js.gz +0 -0
- package/dist/client/assets/vennDiagram-DHZGUBPP-SvGW77xZ.js +34 -0
- package/dist/client/assets/vennDiagram-DHZGUBPP-SvGW77xZ.js.br +0 -0
- package/dist/client/assets/vennDiagram-DHZGUBPP-SvGW77xZ.js.gz +0 -0
- package/dist/client/assets/wardley-RL74JXVD-BtIcY1Az.js +162 -0
- package/dist/client/assets/wardley-RL74JXVD-BtIcY1Az.js.br +0 -0
- package/dist/client/assets/wardley-RL74JXVD-BtIcY1Az.js.gz +0 -0
- package/dist/client/assets/wardleyDiagram-NUSXRM2D-BCW7yeFk.js +20 -0
- package/dist/client/assets/wardleyDiagram-NUSXRM2D-BCW7yeFk.js.br +0 -0
- package/dist/client/assets/wardleyDiagram-NUSXRM2D-BCW7yeFk.js.gz +0 -0
- package/dist/client/assets/xychartDiagram-5P7HB3ND-hVj249NG.js +7 -0
- package/dist/client/assets/xychartDiagram-5P7HB3ND-hVj249NG.js.br +0 -0
- package/dist/client/assets/xychartDiagram-5P7HB3ND-hVj249NG.js.gz +0 -0
- package/dist/client/index.html +2 -2
- package/dist/server/build-target.json +1 -1
- package/dist/server/cli-supervisor.js +2 -1
- package/dist/server/cli.js +21294 -20523
- package/package.json +2 -1
- package/dist/client/assets/FeatureOverviewPage-DxI5AEWA.js +0 -11
- package/dist/client/assets/FeatureOverviewPage-DxI5AEWA.js.br +0 -0
- package/dist/client/assets/FeatureOverviewPage-DxI5AEWA.js.gz +0 -0
- package/dist/client/assets/LocalProjectsPage-FaTau-jU.js.br +0 -0
- package/dist/client/assets/LocalProjectsPage-FaTau-jU.js.gz +0 -0
- package/dist/client/assets/SettingsPage-BXc56ART.js +0 -51
- package/dist/client/assets/SettingsPage-BXc56ART.js.br +0 -0
- package/dist/client/assets/SettingsPage-BXc56ART.js.gz +0 -0
- package/dist/client/assets/eye-l365F6h6.js.br +0 -0
- package/dist/client/assets/eye-l365F6h6.js.gz +0 -0
- package/dist/client/assets/index-BNHZTMos.js.br +0 -0
- package/dist/client/assets/index-BNHZTMos.js.gz +0 -0
- package/dist/client/assets/index-nHIRve5t.css +0 -32
- package/dist/client/assets/index-nHIRve5t.css.br +0 -0
- package/dist/client/assets/index-nHIRve5t.css.gz +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as Ue,a as Ve,u as De,b as Be,d as qe,e as He,f as Ge,r as c,g as Ke,h as $e,i as Z,j as Qe,k as l,B as Pe,E as Je,l as We,m as Xe,S as Ye,M as Ze,T as et,C as tt,n as lt,A as st,P as ze,R as nt,o as Ie,p as it}from"./index-BZRkF5A6.js";import{E as Te}from"./eye-Chg9E8Pp.js";/**
|
|
2
|
+
* @license lucide-react v0.562.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const at=[["rect",{width:"7",height:"18",x:"3",y:"3",rx:"1",key:"2obqm"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}]],rt=Ue("layout-panel-left",at);function ot(e){return e==="localhost"||e==="127.0.0.1"||e==="::1"}const ct=700,dt=1500;function mt(){const e=Ve.c(140),N=De(),Ne=Be(),Se=qe(),m=He();let ee;e[0]!==Ne||e[1]!==Se||e[2]!==m?(ee={...Ne,...Se,...m},e[0]=Ne,e[1]=Se,e[2]=m,e[3]=ee):ee=e[3];const u=ee,t=u.featureOverviewSnapshot,i=Ge("(min-width: 768px)");let te;e[4]===Symbol.for("react.memo_cache_sentinel")?(te=typeof window>"u"?!0:ot(window.location.hostname),e[4]=te):te=e[4];const Fe=te,[a,Re]=c.useState("view"),[r,ye]=c.useState(""),[f,ke]=c.useState(!1),[o,p]=c.useState("idle"),[le,X]=c.useState(null),se=c.useRef(""),ne=c.useRef(0),_e=c.useRef(m.handleUpdateFeatureOverview);t==null||t.featureId;let ie;e[5]!==(t==null?void 0:t.featureId)?(ie=Ke.featureOverviewSave((t==null?void 0:t.featureId)??"feature-overview"),e[5]=t==null?void 0:t.featureId,e[6]=ie):ie=e[6];const b=ie,Ee=$e(b);let ae,re;e[7]!==m.handleUpdateFeatureOverview?(ae=()=>{_e.current=m.handleUpdateFeatureOverview},re=[m.handleUpdateFeatureOverview],e[7]=m.handleUpdateFeatureOverview,e[8]=ae,e[9]=re):(ae=e[8],re=e[9]),c.useEffect(ae,re);let oe;e[10]!==t?(oe=()=>{t&&(se.current=t.content,ye(t.content),ke(!1),p("idle"),X(null))},e[10]=t,e[11]=oe):oe=e[11];const Le=t==null?void 0:t.featureId;let ce;e[12]!==Le?(ce=[Le],e[12]=Le,e[13]=ce):ce=e[13],c.useEffect(oe,ce);let de,ue;e[14]!==f||e[15]!==t?(de=()=>{t&&(se.current=t.content,ye(s=>f?s:t.content),f||(p("idle"),X(null)))},ue=[f,t],e[14]=f,e[15]=t,e[16]=de,e[17]=ue):(de=e[16],ue=e[17]),c.useEffect(de,ue);let fe;e[18]!==r||e[19]!==f||e[20]!==b||e[21]!==t?(fe=()=>{if(!t||!f)return;const s=ne.current+1;ne.current=s,p("saving"),X(null);const n=window.setTimeout(()=>{We(b,()=>_e.current(t.featureId,r),{statusLabel:"Saving overview...",dedupe:!1}).then(d=>{ne.current!==s||!d||(se.current=d.content,ke(!1),p("saved"))}).catch(d=>{ne.current===s&&(p("error"),X(d instanceof Error?d.message:String(d)))})},ct);return()=>window.clearTimeout(n)},e[18]=r,e[19]=f,e[20]=b,e[21]=t,e[22]=fe):fe=e[22];const Oe=t==null?void 0:t.featureId;let me;e[23]!==r||e[24]!==f||e[25]!==b||e[26]!==Oe?(me=[r,f,b,Oe],e[23]=r,e[24]=f,e[25]=b,e[26]=Oe,e[27]=me):me=e[27],c.useEffect(fe,me);let xe,ve;e[28]!==o?(xe=()=>{if(o!=="saved")return;const s=window.setTimeout(()=>{p("idle")},dt);return()=>window.clearTimeout(s)},ve=[o],e[28]=o,e[29]=xe,e[30]=ve):(xe=e[29],ve=e[30]),c.useEffect(xe,ve);let he,pe;if(e[31]!==i||e[32]!==a?(he=()=>{i||a!=="split"||Re("view")},pe=[i,a],e[31]=i,e[32]=a,e[33]=he,e[34]=pe):(he=e[33],pe=e[34]),c.useEffect(he,pe),!t){const s=u.sidebarReady?"Overview not found.":"Loading overview…";let n;return e[35]!==s?(n=l.jsx("div",{className:"flex flex-1 items-center justify-center",children:l.jsx("div",{className:"text-sm text-muted-foreground",children:s})}),e[35]=s,e[36]=n):n=e[36],n}const Ce=a==="view"||a==="split",S=o==="saving"?"Saving changes…":o==="saved"?"Saved just now":o==="error"?"Autosave failed":f?"Unsaved changes":"All changes saved";let y,k,w,g,j,E,x,L,O,C,v,R,_,A,P;if(e[37]!==r||e[38]!==i||e[39]!==Ee||e[40]!==a||e[41]!==N||e[42]!==S||e[43]!==o||e[44]!==t.title||e[45]!==u.handleOpenLocalLink){j=Z("shrink-0 rounded-full border px-2.5 py-1 text-[11px] md:text-xs",o==="error"?"border-destructive/30 bg-destructive/5 text-destructive":o==="saved"?"border-emerald-500/20 bg-emerald-500/5 text-emerald-600 dark:text-emerald-300":Ee?"border-border bg-muted text-foreground":"border-border/80 bg-muted/40 text-muted-foreground");let s;e[61]===Symbol.for("react.memo_cache_sentinel")?(s=[Xe],e[61]=s):s=e[61];let n;e[62]!==u.handleOpenLocalLink?(n=Qe({onOpenLocalLink:u.handleOpenLocalLink}),e[62]=u.handleOpenLocalLink,e[63]=n):n=e[63];let d;e[64]!==r||e[65]!==n?(d=l.jsx(Ye,{className:"h-full min-h-0",children:l.jsx("div",{className:"mx-auto max-w-4xl px-4 py-5",children:l.jsx("div",{className:"prose prose-slate max-w-none dark:prose-invert",children:l.jsx(Ze,{remarkPlugins:s,components:n,children:r})})})}),e[64]=r,e[65]=n,e[66]=d):d=e[66],g=d;const Y=a==="split"?"bg-muted/15 dark:bg-muted/10":"bg-muted/10 dark:bg-muted/5 md:bg-transparent";let h;e[67]!==Y?(h=Z("flex h-full min-h-0 flex-col",Y),e[67]=Y,e[68]=h):h=e[68];let Q;e[69]!==o?(Q=Me=>{const Ae=Me.target.value;ye(Ae),ke(Ae!==se.current),o!=="saving"&&p("idle"),X(null)},e[69]=o,e[70]=Q):Q=e[70];let we;e[71]===Symbol.for("react.memo_cache_sentinel")?(we=Z("h-full min-h-0 w-full resize-none rounded-none border-0 border-transparent bg-transparent px-0 py-0 font-mono text-base leading-7 shadow-none","outline-none focus:outline-none focus-visible:outline-none","ring-0 ring-offset-0 focus-visible:ring-0 focus-visible:ring-offset-0","selection:bg-accent/30 dark:selection:bg-accent/40 md:text-[13px] md:leading-6"),e[71]=we):we=e[71];let J;e[72]!==r||e[73]!==Q?(J=l.jsx("div",{className:"mx-auto flex h-full min-h-0 w-full max-w-4xl px-4 py-5",children:l.jsx(et,{value:r,onChange:Q,spellCheck:!1,className:we})}),e[72]=r,e[73]=Q,e[74]=J):J=e[74];let ge;e[75]!==h||e[76]!==J?(ge=l.jsx("div",{className:h,children:J}),e[75]=h,e[76]=J,e[77]=ge):ge=e[77],w=ge,P="flex flex-1 min-w-0 flex-col",k=tt,A="h-full rounded-none border-0 bg-background",y=lt,_="flex h-full min-h-0 flex-col p-0",R="flex flex-col gap-3 border-b border-border px-4 py-3 md:flex-row md:items-center md:justify-between",C="flex min-w-0 items-start gap-2 md:flex-1";let W;e[78]!==N?(W=()=>{if(window.history.length>1){N(-1);return}N("/")},e[78]=N,e[79]=W):W=e[79];let je;e[80]===Symbol.for("react.memo_cache_sentinel")?(je=l.jsx(st,{className:"size-4"}),e[80]=je):je=e[80],e[81]!==W?(v=l.jsx(Pe,{variant:"ghost",size:"icon",className:"mt-0.5 h-8 w-8 shrink-0 rounded-full",title:"Back",onClick:W,children:je}),e[81]=W,e[82]=v):v=e[82],O="min-w-0",E="flex items-center gap-2",e[83]!==t.title?(x=l.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:t.title}),e[83]=t.title,e[84]=x):x=e[84],L=i?null:l.jsx("div",{className:Z(j,"text-right"),children:S}),e[37]=r,e[38]=i,e[39]=Ee,e[40]=a,e[41]=N,e[42]=S,e[43]=o,e[44]=t.title,e[45]=u.handleOpenLocalLink,e[46]=y,e[47]=k,e[48]=w,e[49]=g,e[50]=j,e[51]=E,e[52]=x,e[53]=L,e[54]=O,e[55]=C,e[56]=v,e[57]=R,e[58]=_,e[59]=A,e[60]=P}else y=e[46],k=e[47],w=e[48],g=e[49],j=e[50],E=e[51],x=e[52],L=e[53],O=e[54],C=e[55],v=e[56],R=e[57],_=e[58],A=e[59],P=e[60];let z;e[85]!==E||e[86]!==x||e[87]!==L?(z=l.jsxs("div",{className:E,children:[x,L]}),e[85]=E,e[86]=x,e[87]=L,e[88]=z):z=e[88];let I;e[89]!==t.overviewRelativePath?(I=l.jsx("div",{className:"truncate text-xs text-muted-foreground",children:t.overviewRelativePath}),e[89]=t.overviewRelativePath,e[90]=I):I=e[90];let T;e[91]!==O||e[92]!==z||e[93]!==I?(T=l.jsxs("div",{className:O,children:[z,I]}),e[91]=O,e[92]=z,e[93]=I,e[94]=T):T=e[94];let F;e[95]!==C||e[96]!==v||e[97]!==T?(F=l.jsxs("div",{className:C,children:[v,T]}),e[95]=C,e[96]=v,e[97]=T,e[98]=F):F=e[98];let M;e[99]!==i||e[100]!==S||e[101]!==j?(M=i?l.jsx("div",{className:j,children:S}):null,e[99]=i,e[100]=S,e[101]=j,e[102]=M):M=e[102];let U;e[103]!==i?(U=i?[{mode:"view",label:"View",icon:Te},{mode:"edit",label:"Edit",icon:ze},{mode:"split",label:"Split",icon:rt}]:[{mode:"view",label:"View",icon:Te},{mode:"edit",label:"Edit",icon:ze}],e[103]=i,e[104]=U):U=e[104];let V;e[105]!==a||e[106]!==U?(V=l.jsx("div",{className:"flex min-w-0 flex-1 items-center rounded-lg border border-border p-1 md:flex-none",children:U.map(s=>{const{mode:n,label:d,icon:Y}=s,h=a===n;return l.jsxs("button",{type:"button",onClick:()=>Re(n),className:Z("inline-flex flex-1 items-center justify-center gap-2 rounded-md px-3 py-1.5 text-sm transition-colors md:flex-none",h?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground"),children:[l.jsx(Y,{className:"size-4"}),l.jsx("span",{children:d})]},n)})}),e[105]=a,e[106]=U,e[107]=V):V=e[107];let D;e[108]!==t.localPath||e[109]!==u?(D=Fe?l.jsxs(Pe,{variant:"outline",size:"sm",className:"shrink-0 px-2.5 md:px-3",title:`Open in ${u.editorLabel}`,onClick:()=>{u.handleOpenExternalPath("open_editor",t.localPath)},children:[l.jsx(Je,{className:"size-4"}),l.jsxs("span",{className:"hidden md:inline",children:["Open in ",u.editorLabel]})]}):null,e[108]=t.localPath,e[109]=u,e[110]=D):D=e[110];let B;e[111]!==M||e[112]!==V||e[113]!==D?(B=l.jsxs("div",{className:"flex items-center gap-2 md:shrink-0 md:gap-3",children:[M,V,D]}),e[111]=M,e[112]=V,e[113]=D,e[114]=B):B=e[114];let q;e[115]!==R||e[116]!==F||e[117]!==B?(q=l.jsxs("div",{className:R,children:[F,B]}),e[115]=R,e[116]=F,e[117]=B,e[118]=q):q=e[118];let H;e[119]!==le?(H=le?l.jsxs("div",{className:"border-b border-destructive/20 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:[l.jsx("div",{className:"font-medium",children:"Autosave failed"}),l.jsx("div",{className:"mt-1",children:le})]}):null,e[119]=le,e[120]=H):H=e[120];let G;e[121]!==w||e[122]!==i||e[123]!==a||e[124]!==g||e[125]!==Ce?(G=l.jsx("div",{className:"flex-1 min-h-0",children:i&&a==="split"?l.jsxs(nt,{orientation:"horizontal",className:"h-full",children:[l.jsx(Ie,{defaultSize:"50%",minSize:"25%",className:"min-w-0",children:g}),l.jsx(it,{orientation:"horizontal",withHandle:!0}),l.jsx(Ie,{defaultSize:"50%",minSize:"25%",className:"min-w-0",children:w})]}):Ce?g:w}),e[121]=w,e[122]=i,e[123]=a,e[124]=g,e[125]=Ce,e[126]=G):G=e[126];let K;e[127]!==y||e[128]!==_||e[129]!==q||e[130]!==H||e[131]!==G?(K=l.jsxs(y,{className:_,children:[q,H,G]}),e[127]=y,e[128]=_,e[129]=q,e[130]=H,e[131]=G,e[132]=K):K=e[132];let $;e[133]!==k||e[134]!==A||e[135]!==K?($=l.jsx(k,{className:A,children:K}),e[133]=k,e[134]=A,e[135]=K,e[136]=$):$=e[136];let be;return e[137]!==P||e[138]!==$?(be=l.jsx("div",{className:P,children:$}),e[137]=P,e[138]=$,e[139]=be):be=e[139],be}export{mt as FeatureOverviewPage};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as M,a as H,i as R,k as t,
|
|
1
|
+
import{c as M,a as H,i as R,k as t,s as he,r as f,D as Pe,t as ve,v as we,w as ye,x as Ce,y as ke,I as le,B as T,S as Se,L as D,z as Ee,F as fe,G as Le,H as Ie,J as S,K as A,N as He,O as $e,l as q,g as F,Q as Re,U as Te,h as oe,V as Oe,W as ce,X as De,Y as Fe,Z as Ae,_ as _e,$ as Me,a0 as ze,b as Ue,e as We,a1 as Be,a2 as Ke}from"./index-BZRkF5A6.js";/**
|
|
2
2
|
* @license lucide-react v0.562.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -18,4 +18,4 @@ import{c as M,a as H,i as R,k as t,q as he,r as f,D as Pe,s as ve,t as we,v as y
|
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const Ye=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],ge=M("monitor",Ye);function de(n){const e=H.c(19),{narrow:s,title:o,subtitle:d,icon:i}=n,a=s===void 0?!1:s,c=i===void 0?ge:i,u=a?"max-w-2xl px-6 pt-16 mx-auto":"px-6 pt-16 mb-10";let r;e[0]!==u?(r=R("w-full",u),e[0]=u,e[1]=r):r=e[1];const p=a&&"justify-center";let y;e[2]!==p?(y=R("flex items-center gap-1 mb-2",p),e[2]=p,e[3]=y):y=e[3];let h;e[4]!==c?(h=t.jsx("div",{className:"p-2 pl-0 rounded-lg",children:t.jsx(c,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=c,e[5]=h):h=e[5];let N;e[6]!==o?(N=t.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:o}),e[6]=o,e[7]=N):N=e[7];let j;e[8]!==y||e[9]!==h||e[10]!==N?(j=t.jsxs("div",{className:y,children:[h,N]}),e[8]=y,e[9]=h,e[10]=N,e[11]=j):j=e[11];let b;e[12]!==a||e[13]!==d?(b=d&&t.jsx("p",{className:R("text-muted-foreground",a&&"mb-10 text-center"),children:d}),e[12]=a,e[13]=d,e[14]=b):b=e[14];let g;return e[15]!==b||e[16]!==r||e[17]!==j?(g=t.jsxs("div",{className:r,children:[j,b]}),e[15]=b,e[16]=r,e[17]=j,e[18]=g):g=e[18],g}function Ze(n){return n.open&&!n.wasOpen}function Ge(n){var d,i;const e=((d=n.inputValue)==null?void 0:d.trim())??"";if(e)return e;const s=n.selectedExistingPath.trim();return s||(((i=n.pendingSelectedExistingPath)==null?void 0:i.trim())??"")}function Qe(n){return n.toLowerCase().replace(/[\s_]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}function et(n){const e=n.split("/").filter(Boolean);return e[e.length-1]||n}function tt({open:n,onOpenChange:e,initialDirectory:s,onListDirectories:o,onConfirm:d,isSubmitting:i=!1}){var se;const a=he("localProjects.newProjectModal"),[c,u]=f.useState("new"),[r,p]=f.useState(""),[y,h]=f.useState([]),[N,j]=f.useState({}),[b,g]=f.useState([]),[v,C]=f.useState(null),[P,E]=f.useState(""),[m,w]=f.useState(null),[L,I]=f.useState(null),[$,O]=f.useState(null),z=f.useRef(null),Y=f.useRef(null),U=f.useRef(""),Z=f.useRef(!1);f.useEffect(()=>{const l=Ze({open:n,wasOpen:Z.current});Z.current=n,l&&(u("new"),p(""),h(s?s.roots:[]),j(s?{[s.currentPath]:s.entries}:{}),g(s?[s.currentPath]:[]),C((s==null?void 0:s.currentPath)??null),E(""),U.current="",w(null),I(null),O(null),setTimeout(()=>{var x;return(x=z.current)==null?void 0:x.focus()},0))},[s,n]),f.useEffect(()=>{n&&setTimeout(()=>{var l;c==="new"&&((l=z.current)==null||l.focus())},0)},[c,n]);const W=Qe(r),B=W?`${ke}/${W}`:"",je=P.trim(),G=c==="new"?!!W:!!je,K=async l=>{w(null),O(l??"__root__");try{const x=await o(l);if(!l){h(x.roots),C(x.currentPath),j({[x.currentPath]:x.entries}),g([x.currentPath]);return}y.length===0&&(h([{name:et(x.currentPath),localPath:x.currentPath}]),C(x.currentPath)),j(k=>({...k,[x.currentPath]:x.entries})),g(k=>k.includes(x.currentPath)?k:[...k,x.currentPath])}catch(x){w(x instanceof Error?x.message:String(x))}finally{O(null)}},Q=l=>{U.current=l,E(l)},be=async l=>{if(b.includes(l)){g(x=>x.filter(k=>k!==l));return}if(N[l]){g(x=>[...x,l]);return}await K(l)},ee=(l,x,k)=>{const V=b.includes(l),Ne=P===l,ne=N[l]??[],ae=$===l;return t.jsxs("div",{children:[t.jsxs("div",{className:R("grid grid-cols-[auto_1fr] items-center gap-2 px-3 py-2",Ne?"bg-muted":"hover:bg-muted/50"),style:{paddingLeft:`${12+k*16}px`},children:[t.jsx("button",{type:"button",className:"flex h-6 w-6 items-center justify-center rounded hover:bg-background disabled:opacity-50",onClick:()=>void be(l),disabled:ae,children:ae?t.jsx(A,{className:"h-4 w-4 animate-spin text-muted-foreground"}):t.jsx(fe,{className:R("h-4 w-4 text-muted-foreground transition-transform",V&&"rotate-90")})}),t.jsxs("button",{type:"button",className:"flex min-w-0 items-center gap-2 text-left",onClick:()=>Q(l),children:[V?t.jsx(Le,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):t.jsx(pe,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),t.jsx("span",{className:"truncate",children:x})]})]}),V&&ne.length>0?ne.map(re=>ee(re.localPath,re.name,k+1)):null]},l)},te=async()=>{var l;if(G){I(null);try{if(c==="new")await d({mode:"new",localPath:B,title:r.trim()});else{const x=Ge({selectedExistingPath:P,pendingSelectedExistingPath:U.current,inputValue:(l=Y.current)==null?void 0:l.value});if(!x)throw new Error("Project path is required (existing-folder modal submit resolved an empty path before command dispatch)");const k=x.split("/").pop()||x;await d({mode:"existing",localPath:x,title:k})}e(!1)}catch(x){I(x instanceof Error?x.message:a("errors.addFailed"))}}};return t.jsx(Pe,{open:n,onOpenChange:l=>!i&&e(l),children:t.jsxs(ve,{size:"sm",children:[t.jsxs(we,{className:"space-y-4",children:[t.jsx(ye,{children:a("title")}),t.jsx(Ce,{value:c,onValueChange:u,options:[{value:"new",label:a("tabs.new")},{value:"existing",label:a("tabs.existing")}],className:"w-full mb-2",optionClassName:"flex-1 justify-center"}),c==="new"?t.jsxs("div",{className:"space-y-2",children:[t.jsx(le,{ref:z,type:"text",value:r,onChange:l=>p(l.target.value),onKeyDown:l=>{l.key==="Enter"&&!l.nativeEvent.isComposing&&te(),l.key==="Escape"&&!l.nativeEvent.isComposing&&!i&&e(!1)},disabled:i,placeholder:a("fields.projectName")}),B&&t.jsx("p",{className:"text-xs text-muted-foreground font-mono",children:B})]}):t.jsxs("div",{className:"space-y-2",children:[t.jsx(le,{ref:Y,type:"text",value:P,onChange:l=>Q(l.target.value),onKeyDown:l=>{l.key==="Enter"&&!l.nativeEvent.isComposing&&K(P||void 0)},disabled:i,placeholder:a("fields.existingPathPlaceholder")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("fields.existingPathHelp")}),t.jsx("div",{className:"flex justify-end",children:t.jsx(T,{type:"button",variant:"ghost",size:"sm",onClick:()=>void K("~"),disabled:$!==null||i,children:a("actions.loadRoot")})}),y.length>0?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:a("serverFolders")}),t.jsxs(Se,{className:"max-h-64 rounded-xl border border-border",children:[y.map(l=>ee(l.localPath,l.name,0)),v&&((se=N[v])==null?void 0:se.length)===0?t.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:a("emptySubfolders")}):null]})]}):$?t.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-border px-3 py-2 text-sm text-muted-foreground",children:[t.jsx(A,{className:"h-4 w-4 animate-spin"}),a("loadingFolders")]}):null,m?t.jsx("p",{className:"text-xs text-destructive",children:m}):null]}),L?t.jsx("p",{className:"text-xs text-destructive",children:L}):null]}),t.jsxs(Ee,{children:[t.jsx(T,{type:"button",variant:"ghost",onClick:()=>e(!1),disabled:i,children:a("actions.cancel")}),t.jsxs(T,{type:"button",onClick:()=>void te(),disabled:!G||i,children:[i?t.jsx(A,{className:"mr-2 h-4 w-4 animate-spin"}):null,a(i?"actions.adding":"actions.addProject")]})]})]})})}function st(n){const e=H.c(9),{text:s}=n,[o,d]=f.useState(!1);let i;e[0]!==s?(i=async function(){await navigator.clipboard.writeText(s),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=s,e[1]=i):i=e[1];const a=i;let c;e[2]!==a?(c=()=>void a(),e[2]=a,e[3]=c):c=e[3];let u;e[4]!==o?(u=o?t.jsx(Me,{className:"h-4 w-4 text-green-400"}):t.jsx(ze,{className:"h-4 w-4"}),e[4]=o,e[5]=u):u=e[5];let r;return e[6]!==c||e[7]!==u?(r=t.jsx(T,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground",onClick:c,children:u}),e[6]=c,e[7]=u,e[8]=r):r=e[8],r}function ue(n){const e=H.c(3),{children:s}=n;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(fe,{className:"inline h-4 w-4 opacity-40"}),e[0]=o):o=e[0];let d;return e[1]!==s?(d=t.jsxs("div",{className:"grid grid-cols-[1fr_auto] items-center group bg-background border border-border text-foreground rounded-xl p-1.5 pl-3 font-mono text-sm",children:[t.jsxs("pre",{className:"inline-flex items-center gap-2 overflow-x-auto",children:[o,t.jsx("code",{children:s})]}),t.jsx(st,{text:s})]}),e[1]=s,e[2]=d):d=e[2],d}function _(n){const e=H.c(2),{children:s}=n;let o;return e[0]!==s?(o=t.jsx("div",{className:"bg-card border border-border rounded-2xl p-4",children:s}),e[0]=s,e[1]=o):o=e[1],o}function J(n){const e=H.c(2),{children:s}=n;let o;return e[0]!==s?(o=t.jsx("h2",{className:"text-[13px] font-medium text-muted-foreground uppercase tracking-wider mb-3",children:s}),e[0]=s,e[1]=o):o=e[1],o}function X(n){const e=H.c(11),{icon:s,title:o,subtitle:d,iconClassName:i}=n,a=i||"h-8 w-8 text-muted-foreground";let c;e[0]!==s||e[1]!==a?(c=t.jsx("div",{className:"p-3 mb-2 rounded-xl bg-background border border-border",children:t.jsx(s,{className:a})}),e[0]=s,e[1]=a,e[2]=c):c=e[2];let u;e[3]!==o?(u=t.jsx("span",{className:"text-sm font-medium",children:o}),e[3]=o,e[4]=u):u=e[4];let r;e[5]!==d?(r=t.jsx("span",{className:"text-xs text-muted-foreground",children:d}),e[5]=d,e[6]=r):r=e[6];let p;return e[7]!==c||e[8]!==u||e[9]!==r?(p=t.jsxs("div",{className:"flex flex-col items-center gap-0",children:[c,u,r]}),e[7]=c,e[8]=u,e[9]=r,e[10]=p):p=e[10],p}function xe(){const n=H.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(qe,{className:"h-4 w-4 text-muted-foreground"}),n[0]=e):e=n[0],e}function me(n){const e=H.c(12),{number:s,title:o,children:d}=n;let i;e[0]!==s?(i=t.jsxs("div",{className:"flex-shrink-0 flex items-center justify-center font-medium text-logo",children:[s,"."]}),e[0]=s,e[1]=i):i=e[1];let a;e[2]!==o?(a=t.jsx("h3",{className:"font-medium text-foreground mb-2",children:o}),e[2]=o,e[3]=a):a=e[3];let c;e[4]!==i||e[5]!==a?(c=t.jsxs("div",{className:"grid grid-cols-[auto_1fr] items-baseline gap-3",children:[i,a]}),e[4]=i,e[5]=a,e[6]=c):c=e[6];let u;e[7]!==d?(u=t.jsx("div",{className:"text-muted-foreground text-sm space-y-3",children:d}),e[7]=d,e[8]=u):u=e[8];let r;return e[9]!==c||e[10]!==u?(r=t.jsx("div",{className:"flex gap-4",children:t.jsxs("div",{className:"flex-1 min-w-0",children:[c,u]})}),e[9]=c,e[10]=u,e[11]=r):r=e[11],r}function nt(n){const e=H.c(37),{localPath:s,iconDataUrl:o,loading:d,onClick:i,onHide:a}=n,c=Te(at);let u;e[0]!==s?(u=D.localProjectOpen(s),e[0]=s,e[1]=u):u=e[1];const r=oe(u);let p;e[2]!==s?(p=D.localProjectHide(s),e[2]=s,e[3]=p):p=e[3];const y=oe(p),h=d||r||y,N=h&&"opacity-50 cursor-not-allowed";let j;e[4]!==N?(j=R("border border-border hover:border-primary/30 rounded-lg bg-card px-4 py-3 flex items-center gap-3 w-full text-left hover:bg-muted/50 transition-colors",N),e[4]=N,e[5]=j):j=e[5];let b;e[6]!==o||e[7]!==s||e[8]!==c?(b=c?t.jsx(Oe,{iconDataUrl:o,alt:`${ce(s)} icon`,className:"h-5.5 w-5.5",fallback:t.jsx(pe,{className:"h-5.5 w-5.5 text-muted-foreground flex-shrink-0"})}):null,e[6]=o,e[7]=s,e[8]=c,e[9]=b):b=e[9];let g;e[10]!==s?(g=ce(s),e[10]=s,e[11]=g):g=e[11];let v;e[12]!==g?(v=t.jsx("span",{className:"font-medium text-foreground truncate flex-1 pr-10",children:g}),e[12]=g,e[13]=v):v=e[13];let C;e[14]!==h?(C=h?t.jsx(A,{className:"h-4 w-4 text-muted-foreground group-hover:text-primary animate-spin flex-shrink-0"}):null,e[14]=h,e[15]=C):C=e[15];let P;e[16]!==h||e[17]!==i||e[18]!==j||e[19]!==b||e[20]!==v||e[21]!==C?(P=t.jsx(Ae,{asChild:!0,children:t.jsxs("button",{className:j,disabled:h,onClick:i,children:[b,v,C]})}),e[16]=h,e[17]=i,e[18]=j,e[19]=b,e[20]=v,e[21]=C,e[22]=P):P=e[22];let E;e[23]!==s?(E=t.jsx(De,{children:t.jsx("p",{children:s})}),e[23]=s,e[24]=E):E=e[24];let m;e[25]!==E||e[26]!==P?(m=t.jsxs(Fe,{children:[P,E]}),e[25]=E,e[26]=P,e[27]=m):m=e[27];let w;e[28]!==a?(w=O=>{O.stopPropagation(),a()},e[28]=a,e[29]=w):w=e[29];let L;e[30]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(_e,{className:"h-4 w-4"}),e[30]=L):L=e[30];let I;e[31]!==h||e[32]!==w?(I=t.jsx(T,{variant:"ghost",size:"icon",className:"absolute right-2 top-1/2 h-7 w-7 -translate-y-1/2 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity",disabled:h,onClick:w,children:L}),e[31]=h,e[32]=w,e[33]=I):I=e[33];let $;return e[34]!==m||e[35]!==I?($=t.jsxs("div",{className:"relative group",children:[m,I]}),e[34]=m,e[35]=I,e[36]=$):$=e[36],$}function at(n){return n.showProjectIconsInSidebar}function rt({connectionStatus:n,ready:e,snapshot:s,startingLocalPath:o,commandError:d,onOpenProject:i,onHideProject:a,onListDirectories:c,onCreateProject:u}){const r=he("localProjects"),[p,y]=Ie(),[h,N]=f.useState(!1),[j,b]=f.useState(null),g=f.useMemo(()=>(s==null?void 0:s.projects)??[],[s==null?void 0:s.projects]),v=n==="connecting"||!e,C=n==="connected"&&e,P=p.get("newProject")==="1";f.useEffect(()=>{C&&P&&N(!0)},[C,P]);const E=m=>{if(N(m),!m&&P){const w=new URLSearchParams(p);w.delete("newProject"),y(w,{replace:!0})}};return t.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-y-auto",children:[C?t.jsxs(t.Fragment,{children:[t.jsx(de,{title:(s==null?void 0:s.machine.displayName)??r("connected.title"),subtitle:r("connected.subtitle",{appName:S})}),t.jsxs("div",{className:"w-full px-6 mb-10",children:[t.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[t.jsx("h2",{className:"text-[13px] font-medium text-muted-foreground uppercase tracking-wider",children:r("connected.projectsTitle")}),t.jsxs(T,{variant:"default",size:"sm",onClick:()=>N(!0),children:[t.jsx($e,{className:"h-4 w-4 mr-1.5"}),r("actions.addProject")]})]}),g.length>0?t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-4 3xl:grid-cols-5 gap-2",children:g.map(m=>t.jsx(nt,{localPath:m.localPath,iconDataUrl:m.iconDataUrl,loading:o===m.localPath,onClick:()=>{q(D.localProjectOpen(m.localPath),()=>i(m.localPath),{statusLabel:r("actions.openingProject")})},onHide:()=>{q(D.localProjectHide(m.localPath),()=>a(m.localPath),{statusLabel:r("actions.hidingProject")})}},m.localPath))}):t.jsx(_,{children:t.jsx("p",{className:"text-sm text-muted-foreground",children:r("connected.empty")})}),d?t.jsx("div",{className:"text-sm text-destructive border border-destructive/20 bg-destructive/5 rounded-xl px-4 py-3 mt-4",children:d}):null]})]}):t.jsxs(t.Fragment,{children:[t.jsx(de,{narrow:!0,icon:ie,title:v?r("pageHeader.connectingTitle",{appName:S}):r("pageHeader.connectTitle",{appName:S}),subtitle:v?r("pageHeader.connectingSubtitle",{appName:S}):r("pageHeader.connectSubtitle",{appName:S})}),t.jsxs("div",{className:"max-w-2xl w-full mx-auto pb-12 px-6",children:[t.jsx(J,{children:r("status.title")}),t.jsx("div",{className:"mb-8",children:t.jsx(_,{children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(A,{className:"h-4 w-4 text-muted-foreground animate-spin"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:v?r("status.connecting",{appName:S}):t.jsx(t.Fragment,{children:r.rich("status.notConnected",{appName:S,cli:()=>t.jsx("code",{className:"bg-background border border-border rounded-md mx-0.5 p-1 font-mono text-xs text-foreground",children:F()})})})})]})})}),v?null:t.jsxs("div",{className:"mb-10",children:[t.jsx(J,{children:r("howItWorks.title")}),t.jsx(_,{children:t.jsxs("div",{className:"flex items-center justify-around gap-6 py-4 px-2",children:[t.jsx(X,{icon:He,title:`${S} CLI`,subtitle:r("howItWorks.onYourMachine")}),t.jsx(xe,{}),t.jsx(X,{icon:ge,title:`${S} Server`,subtitle:r("howItWorks.localWebSocket")}),t.jsx(xe,{}),t.jsx(X,{icon:ie,title:`${S} UI`,subtitle:r("howItWorks.projectChat")})]})})]}),v?null:t.jsxs("div",{className:"mb-10",children:[t.jsx(J,{children:r("setup.title")}),t.jsx(_,{children:t.jsxs("div",{className:"space-y-4",children:[t.jsxs(me,{number:1,title:r("setup.steps.start.title",{appName:S}),children:[t.jsx("p",{children:r("setup.steps.start.description")}),t.jsx(ue,{children:F()})]}),t.jsxs(me,{number:2,title:r("setup.steps.openUi.title"),children:[t.jsx("p",{children:r("setup.steps.openUi.description",{appName:S})}),t.jsx(ue,{children:"http://localhost:3210/local"})]}),t.jsxs("div",{className:"mt-8",children:[t.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-4",children:r("setup.notesTitle")}),t.jsxs("div",{className:"space-y-3 text-sm",children:[t.jsxs("div",{className:"flex gap-4",children:[t.jsx("code",{className:"font-mono text-foreground whitespace-nowrap",children:F("").trim()}),t.jsx("span",{className:"text-muted-foreground",children:r("setup.notes.currentDirectory")})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("code",{className:"font-mono text-foreground whitespace-nowrap",children:F("--no-open")}),t.jsx("span",{className:"text-muted-foreground",children:r("setup.notes.noOpen")})]})]})]})]})})]})]})]}),t.jsx(tt,{open:h,onOpenChange:E,initialDirectory:(s==null?void 0:s.rootDirectory)??null,onListDirectories:c,isSubmitting:j!==null,onConfirm:async m=>{const w=D.localProjectCreate(m.localPath);b(m.localPath);try{await q(w,()=>u(m),{statusLabel:r("actions.addingProject")})}finally{b(L=>L===m.localPath?null:L)}}}),t.jsx("div",{className:"py-4 text-center",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v",Re.split("/")[1]]})})]})}function ot(){const n=H.c(15),e=Ue(),s=We(),o=Be(),d=Ke();let i;n[0]!==o||n[1]!==e||n[2]!==s||n[3]!==d?(i={...e,...s,...o,...d},n[0]=o,n[1]=e,n[2]=s,n[3]=d,n[4]=i):i=n[4];const a=i;let c;return n[5]!==a.commandError||n[6]!==a.connectionStatus||n[7]!==a.handleCreateProject||n[8]!==a.handleHideLocalProject||n[9]!==a.handleListDirectories||n[10]!==a.handleOpenLocalProject||n[11]!==a.localProjects||n[12]!==a.localProjectsReady||n[13]!==a.startingLocalPath?(c=t.jsx("div",{className:"flex-1 flex flex-col min-w-0 relative",children:t.jsx(rt,{connectionStatus:a.connectionStatus,ready:a.localProjectsReady,snapshot:a.localProjects,startingLocalPath:a.startingLocalPath,commandError:a.commandError,onOpenProject:a.handleOpenLocalProject,onHideProject:a.handleHideLocalProject,onListDirectories:a.handleListDirectories,onCreateProject:a.handleCreateProject})}),n[5]=a.commandError,n[6]=a.connectionStatus,n[7]=a.handleCreateProject,n[8]=a.handleHideLocalProject,n[9]=a.handleListDirectories,n[10]=a.handleOpenLocalProject,n[11]=a.localProjects,n[12]=a.localProjectsReady,n[13]=a.startingLocalPath,n[14]=c):c=n[14],c}export{ot as LocalProjectsPage};
|
|
21
|
+
*/const Ye=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],ge=M("monitor",Ye);function de(n){const e=H.c(19),{narrow:s,title:o,subtitle:d,icon:i}=n,a=s===void 0?!1:s,c=i===void 0?ge:i,u=a?"max-w-2xl px-6 pt-16 mx-auto":"px-6 pt-16 mb-10";let r;e[0]!==u?(r=R("w-full",u),e[0]=u,e[1]=r):r=e[1];const p=a&&"justify-center";let y;e[2]!==p?(y=R("flex items-center gap-1 mb-2",p),e[2]=p,e[3]=y):y=e[3];let h;e[4]!==c?(h=t.jsx("div",{className:"p-2 pl-0 rounded-lg",children:t.jsx(c,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=c,e[5]=h):h=e[5];let N;e[6]!==o?(N=t.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:o}),e[6]=o,e[7]=N):N=e[7];let j;e[8]!==y||e[9]!==h||e[10]!==N?(j=t.jsxs("div",{className:y,children:[h,N]}),e[8]=y,e[9]=h,e[10]=N,e[11]=j):j=e[11];let b;e[12]!==a||e[13]!==d?(b=d&&t.jsx("p",{className:R("text-muted-foreground",a&&"mb-10 text-center"),children:d}),e[12]=a,e[13]=d,e[14]=b):b=e[14];let g;return e[15]!==b||e[16]!==r||e[17]!==j?(g=t.jsxs("div",{className:r,children:[j,b]}),e[15]=b,e[16]=r,e[17]=j,e[18]=g):g=e[18],g}function Ze(n){return n.open&&!n.wasOpen}function Ge(n){var d,i;const e=((d=n.inputValue)==null?void 0:d.trim())??"";if(e)return e;const s=n.selectedExistingPath.trim();return s||(((i=n.pendingSelectedExistingPath)==null?void 0:i.trim())??"")}function Qe(n){return n.toLowerCase().replace(/[\s_]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}function et(n){const e=n.split("/").filter(Boolean);return e[e.length-1]||n}function tt({open:n,onOpenChange:e,initialDirectory:s,onListDirectories:o,onConfirm:d,isSubmitting:i=!1}){var se;const a=he("localProjects.newProjectModal"),[c,u]=f.useState("new"),[r,p]=f.useState(""),[y,h]=f.useState([]),[N,j]=f.useState({}),[b,g]=f.useState([]),[v,C]=f.useState(null),[P,E]=f.useState(""),[m,w]=f.useState(null),[L,I]=f.useState(null),[$,O]=f.useState(null),z=f.useRef(null),Y=f.useRef(null),U=f.useRef(""),Z=f.useRef(!1);f.useEffect(()=>{const l=Ze({open:n,wasOpen:Z.current});Z.current=n,l&&(u("new"),p(""),h(s?s.roots:[]),j(s?{[s.currentPath]:s.entries}:{}),g(s?[s.currentPath]:[]),C((s==null?void 0:s.currentPath)??null),E(""),U.current="",w(null),I(null),O(null),setTimeout(()=>{var x;return(x=z.current)==null?void 0:x.focus()},0))},[s,n]),f.useEffect(()=>{n&&setTimeout(()=>{var l;c==="new"&&((l=z.current)==null||l.focus())},0)},[c,n]);const W=Qe(r),B=W?`${ke}/${W}`:"",je=P.trim(),G=c==="new"?!!W:!!je,K=async l=>{w(null),O(l??"__root__");try{const x=await o(l);if(!l){h(x.roots),C(x.currentPath),j({[x.currentPath]:x.entries}),g([x.currentPath]);return}y.length===0&&(h([{name:et(x.currentPath),localPath:x.currentPath}]),C(x.currentPath)),j(k=>({...k,[x.currentPath]:x.entries})),g(k=>k.includes(x.currentPath)?k:[...k,x.currentPath])}catch(x){w(x instanceof Error?x.message:String(x))}finally{O(null)}},Q=l=>{U.current=l,E(l)},be=async l=>{if(b.includes(l)){g(x=>x.filter(k=>k!==l));return}if(N[l]){g(x=>[...x,l]);return}await K(l)},ee=(l,x,k)=>{const V=b.includes(l),Ne=P===l,ne=N[l]??[],ae=$===l;return t.jsxs("div",{children:[t.jsxs("div",{className:R("grid grid-cols-[auto_1fr] items-center gap-2 px-3 py-2",Ne?"bg-muted":"hover:bg-muted/50"),style:{paddingLeft:`${12+k*16}px`},children:[t.jsx("button",{type:"button",className:"flex h-6 w-6 items-center justify-center rounded hover:bg-background disabled:opacity-50",onClick:()=>void be(l),disabled:ae,children:ae?t.jsx(D,{className:"h-4 w-4 animate-spin text-muted-foreground"}):t.jsx(fe,{className:R("h-4 w-4 text-muted-foreground transition-transform",V&&"rotate-90")})}),t.jsxs("button",{type:"button",className:"flex min-w-0 items-center gap-2 text-left",onClick:()=>Q(l),children:[V?t.jsx(Le,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):t.jsx(pe,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),t.jsx("span",{className:"truncate",children:x})]})]}),V&&ne.length>0?ne.map(re=>ee(re.localPath,re.name,k+1)):null]},l)},te=async()=>{var l;if(G){I(null);try{if(c==="new")await d({mode:"new",localPath:B,title:r.trim()});else{const x=Ge({selectedExistingPath:P,pendingSelectedExistingPath:U.current,inputValue:(l=Y.current)==null?void 0:l.value});if(!x)throw new Error("Project path is required (existing-folder modal submit resolved an empty path before command dispatch)");const k=x.split("/").pop()||x;await d({mode:"existing",localPath:x,title:k})}e(!1)}catch(x){I(x instanceof Error?x.message:a("errors.addFailed"))}}};return t.jsx(Pe,{open:n,onOpenChange:l=>!i&&e(l),children:t.jsxs(ve,{size:"sm",children:[t.jsxs(we,{className:"space-y-4",children:[t.jsx(ye,{children:a("title")}),t.jsx(Ce,{value:c,onValueChange:u,options:[{value:"new",label:a("tabs.new")},{value:"existing",label:a("tabs.existing")}],className:"w-full mb-2",optionClassName:"flex-1 justify-center"}),c==="new"?t.jsxs("div",{className:"space-y-2",children:[t.jsx(le,{ref:z,type:"text",value:r,onChange:l=>p(l.target.value),onKeyDown:l=>{l.key==="Enter"&&!l.nativeEvent.isComposing&&te(),l.key==="Escape"&&!l.nativeEvent.isComposing&&!i&&e(!1)},disabled:i,placeholder:a("fields.projectName")}),B&&t.jsx("p",{className:"text-xs text-muted-foreground font-mono",children:B})]}):t.jsxs("div",{className:"space-y-2",children:[t.jsx(le,{ref:Y,type:"text",value:P,onChange:l=>Q(l.target.value),onKeyDown:l=>{l.key==="Enter"&&!l.nativeEvent.isComposing&&K(P||void 0)},disabled:i,placeholder:a("fields.existingPathPlaceholder")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("fields.existingPathHelp")}),t.jsx("div",{className:"flex justify-end",children:t.jsx(T,{type:"button",variant:"ghost",size:"sm",onClick:()=>void K("~"),disabled:$!==null||i,children:a("actions.loadRoot")})}),y.length>0?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:a("serverFolders")}),t.jsxs(Se,{className:"max-h-64 rounded-xl border border-border",children:[y.map(l=>ee(l.localPath,l.name,0)),v&&((se=N[v])==null?void 0:se.length)===0?t.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:a("emptySubfolders")}):null]})]}):$?t.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-border px-3 py-2 text-sm text-muted-foreground",children:[t.jsx(D,{className:"h-4 w-4 animate-spin"}),a("loadingFolders")]}):null,m?t.jsx("p",{className:"text-xs text-destructive",children:m}):null]}),L?t.jsx("p",{className:"text-xs text-destructive",children:L}):null]}),t.jsxs(Ee,{children:[t.jsx(T,{type:"button",variant:"ghost",onClick:()=>e(!1),disabled:i,children:a("actions.cancel")}),t.jsxs(T,{type:"button",onClick:()=>void te(),disabled:!G||i,children:[i?t.jsx(D,{className:"mr-2 h-4 w-4 animate-spin"}):null,a(i?"actions.adding":"actions.addProject")]})]})]})})}function st(n){const e=H.c(9),{text:s}=n,[o,d]=f.useState(!1);let i;e[0]!==s?(i=async function(){await navigator.clipboard.writeText(s),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=s,e[1]=i):i=e[1];const a=i;let c;e[2]!==a?(c=()=>void a(),e[2]=a,e[3]=c):c=e[3];let u;e[4]!==o?(u=o?t.jsx(Me,{className:"h-4 w-4 text-green-400"}):t.jsx(ze,{className:"h-4 w-4"}),e[4]=o,e[5]=u):u=e[5];let r;return e[6]!==c||e[7]!==u?(r=t.jsx(T,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground",onClick:c,children:u}),e[6]=c,e[7]=u,e[8]=r):r=e[8],r}function ue(n){const e=H.c(3),{children:s}=n;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(fe,{className:"inline h-4 w-4 opacity-40"}),e[0]=o):o=e[0];let d;return e[1]!==s?(d=t.jsxs("div",{className:"grid grid-cols-[1fr_auto] items-center group bg-background border border-border text-foreground rounded-xl p-1.5 pl-3 font-mono text-sm",children:[t.jsxs("pre",{className:"inline-flex items-center gap-2 overflow-x-auto",children:[o,t.jsx("code",{children:s})]}),t.jsx(st,{text:s})]}),e[1]=s,e[2]=d):d=e[2],d}function _(n){const e=H.c(2),{children:s}=n;let o;return e[0]!==s?(o=t.jsx("div",{className:"bg-card border border-border rounded-2xl p-4",children:s}),e[0]=s,e[1]=o):o=e[1],o}function J(n){const e=H.c(2),{children:s}=n;let o;return e[0]!==s?(o=t.jsx("h2",{className:"text-[13px] font-medium text-muted-foreground uppercase tracking-wider mb-3",children:s}),e[0]=s,e[1]=o):o=e[1],o}function X(n){const e=H.c(11),{icon:s,title:o,subtitle:d,iconClassName:i}=n,a=i||"h-8 w-8 text-muted-foreground";let c;e[0]!==s||e[1]!==a?(c=t.jsx("div",{className:"p-3 mb-2 rounded-xl bg-background border border-border",children:t.jsx(s,{className:a})}),e[0]=s,e[1]=a,e[2]=c):c=e[2];let u;e[3]!==o?(u=t.jsx("span",{className:"text-sm font-medium",children:o}),e[3]=o,e[4]=u):u=e[4];let r;e[5]!==d?(r=t.jsx("span",{className:"text-xs text-muted-foreground",children:d}),e[5]=d,e[6]=r):r=e[6];let p;return e[7]!==c||e[8]!==u||e[9]!==r?(p=t.jsxs("div",{className:"flex flex-col items-center gap-0",children:[c,u,r]}),e[7]=c,e[8]=u,e[9]=r,e[10]=p):p=e[10],p}function xe(){const n=H.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(qe,{className:"h-4 w-4 text-muted-foreground"}),n[0]=e):e=n[0],e}function me(n){const e=H.c(12),{number:s,title:o,children:d}=n;let i;e[0]!==s?(i=t.jsxs("div",{className:"flex-shrink-0 flex items-center justify-center font-medium text-logo",children:[s,"."]}),e[0]=s,e[1]=i):i=e[1];let a;e[2]!==o?(a=t.jsx("h3",{className:"font-medium text-foreground mb-2",children:o}),e[2]=o,e[3]=a):a=e[3];let c;e[4]!==i||e[5]!==a?(c=t.jsxs("div",{className:"grid grid-cols-[auto_1fr] items-baseline gap-3",children:[i,a]}),e[4]=i,e[5]=a,e[6]=c):c=e[6];let u;e[7]!==d?(u=t.jsx("div",{className:"text-muted-foreground text-sm space-y-3",children:d}),e[7]=d,e[8]=u):u=e[8];let r;return e[9]!==c||e[10]!==u?(r=t.jsx("div",{className:"flex gap-4",children:t.jsxs("div",{className:"flex-1 min-w-0",children:[c,u]})}),e[9]=c,e[10]=u,e[11]=r):r=e[11],r}function nt(n){const e=H.c(37),{localPath:s,iconDataUrl:o,loading:d,onClick:i,onHide:a}=n,c=Te(at);let u;e[0]!==s?(u=F.localProjectOpen(s),e[0]=s,e[1]=u):u=e[1];const r=oe(u);let p;e[2]!==s?(p=F.localProjectHide(s),e[2]=s,e[3]=p):p=e[3];const y=oe(p),h=d||r||y,N=h&&"opacity-50 cursor-not-allowed";let j;e[4]!==N?(j=R("border border-border hover:border-primary/30 rounded-lg bg-card px-4 py-3 flex items-center gap-3 w-full text-left hover:bg-muted/50 transition-colors",N),e[4]=N,e[5]=j):j=e[5];let b;e[6]!==o||e[7]!==s||e[8]!==c?(b=c?t.jsx(Oe,{iconDataUrl:o,alt:`${ce(s)} icon`,className:"h-5.5 w-5.5",fallback:t.jsx(pe,{className:"h-5.5 w-5.5 text-muted-foreground flex-shrink-0"})}):null,e[6]=o,e[7]=s,e[8]=c,e[9]=b):b=e[9];let g;e[10]!==s?(g=ce(s),e[10]=s,e[11]=g):g=e[11];let v;e[12]!==g?(v=t.jsx("span",{className:"font-medium text-foreground truncate flex-1 pr-10",children:g}),e[12]=g,e[13]=v):v=e[13];let C;e[14]!==h?(C=h?t.jsx(D,{className:"h-4 w-4 text-muted-foreground group-hover:text-primary animate-spin flex-shrink-0"}):null,e[14]=h,e[15]=C):C=e[15];let P;e[16]!==h||e[17]!==i||e[18]!==j||e[19]!==b||e[20]!==v||e[21]!==C?(P=t.jsx(De,{asChild:!0,children:t.jsxs("button",{className:j,disabled:h,onClick:i,children:[b,v,C]})}),e[16]=h,e[17]=i,e[18]=j,e[19]=b,e[20]=v,e[21]=C,e[22]=P):P=e[22];let E;e[23]!==s?(E=t.jsx(Fe,{children:t.jsx("p",{children:s})}),e[23]=s,e[24]=E):E=e[24];let m;e[25]!==E||e[26]!==P?(m=t.jsxs(Ae,{children:[P,E]}),e[25]=E,e[26]=P,e[27]=m):m=e[27];let w;e[28]!==a?(w=O=>{O.stopPropagation(),a()},e[28]=a,e[29]=w):w=e[29];let L;e[30]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(_e,{className:"h-4 w-4"}),e[30]=L):L=e[30];let I;e[31]!==h||e[32]!==w?(I=t.jsx(T,{variant:"ghost",size:"icon",className:"absolute right-2 top-1/2 h-7 w-7 -translate-y-1/2 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity",disabled:h,onClick:w,children:L}),e[31]=h,e[32]=w,e[33]=I):I=e[33];let $;return e[34]!==m||e[35]!==I?($=t.jsxs("div",{className:"relative group",children:[m,I]}),e[34]=m,e[35]=I,e[36]=$):$=e[36],$}function at(n){return n.showProjectIconsInSidebar}function rt({connectionStatus:n,ready:e,snapshot:s,startingLocalPath:o,commandError:d,onOpenProject:i,onHideProject:a,onListDirectories:c,onCreateProject:u}){const r=he("localProjects"),[p,y]=Ie(),[h,N]=f.useState(!1),[j,b]=f.useState(null),g=f.useMemo(()=>(s==null?void 0:s.projects)??[],[s==null?void 0:s.projects]),v=n==="connecting"||!e,C=n==="connected"&&e,P=p.get("newProject")==="1";f.useEffect(()=>{C&&P&&N(!0)},[C,P]);const E=m=>{if(N(m),!m&&P){const w=new URLSearchParams(p);w.delete("newProject"),y(w,{replace:!0})}};return t.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-y-auto",children:[C?t.jsxs(t.Fragment,{children:[t.jsx(de,{title:(s==null?void 0:s.machine.displayName)??r("connected.title"),subtitle:r("connected.subtitle",{appName:S})}),t.jsxs("div",{className:"w-full px-6 mb-10",children:[t.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[t.jsx("h2",{className:"text-[13px] font-medium text-muted-foreground uppercase tracking-wider",children:r("connected.projectsTitle")}),t.jsxs(T,{variant:"default",size:"sm",onClick:()=>N(!0),children:[t.jsx($e,{className:"h-4 w-4 mr-1.5"}),r("actions.addProject")]})]}),g.length>0?t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-4 3xl:grid-cols-5 gap-2",children:g.map(m=>t.jsx(nt,{localPath:m.localPath,iconDataUrl:m.iconDataUrl,loading:o===m.localPath,onClick:()=>{q(F.localProjectOpen(m.localPath),()=>i(m.localPath),{statusLabel:r("actions.openingProject")})},onHide:()=>{q(F.localProjectHide(m.localPath),()=>a(m.localPath),{statusLabel:r("actions.hidingProject")})}},m.localPath))}):t.jsx(_,{children:t.jsx("p",{className:"text-sm text-muted-foreground",children:r("connected.empty")})}),d?t.jsx("div",{className:"text-sm text-destructive border border-destructive/20 bg-destructive/5 rounded-xl px-4 py-3 mt-4",children:d}):null]})]}):t.jsxs(t.Fragment,{children:[t.jsx(de,{narrow:!0,icon:ie,title:v?r("pageHeader.connectingTitle",{appName:S}):r("pageHeader.connectTitle",{appName:S}),subtitle:v?r("pageHeader.connectingSubtitle",{appName:S}):r("pageHeader.connectSubtitle",{appName:S})}),t.jsxs("div",{className:"max-w-2xl w-full mx-auto pb-12 px-6",children:[t.jsx(J,{children:r("status.title")}),t.jsx("div",{className:"mb-8",children:t.jsx(_,{children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(D,{className:"h-4 w-4 text-muted-foreground animate-spin"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:v?r("status.connecting",{appName:S}):t.jsx(t.Fragment,{children:r.rich("status.notConnected",{appName:S,cli:()=>t.jsx("code",{className:"bg-background border border-border rounded-md mx-0.5 p-1 font-mono text-xs text-foreground",children:A()})})})})]})})}),v?null:t.jsxs("div",{className:"mb-10",children:[t.jsx(J,{children:r("howItWorks.title")}),t.jsx(_,{children:t.jsxs("div",{className:"flex items-center justify-around gap-6 py-4 px-2",children:[t.jsx(X,{icon:He,title:`${S} CLI`,subtitle:r("howItWorks.onYourMachine")}),t.jsx(xe,{}),t.jsx(X,{icon:ge,title:`${S} Server`,subtitle:r("howItWorks.localWebSocket")}),t.jsx(xe,{}),t.jsx(X,{icon:ie,title:`${S} UI`,subtitle:r("howItWorks.projectChat")})]})})]}),v?null:t.jsxs("div",{className:"mb-10",children:[t.jsx(J,{children:r("setup.title")}),t.jsx(_,{children:t.jsxs("div",{className:"space-y-4",children:[t.jsxs(me,{number:1,title:r("setup.steps.start.title",{appName:S}),children:[t.jsx("p",{children:r("setup.steps.start.description")}),t.jsx(ue,{children:A()})]}),t.jsxs(me,{number:2,title:r("setup.steps.openUi.title"),children:[t.jsx("p",{children:r("setup.steps.openUi.description",{appName:S})}),t.jsx(ue,{children:"http://localhost:3210/local"})]}),t.jsxs("div",{className:"mt-8",children:[t.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-4",children:r("setup.notesTitle")}),t.jsxs("div",{className:"space-y-3 text-sm",children:[t.jsxs("div",{className:"flex gap-4",children:[t.jsx("code",{className:"font-mono text-foreground whitespace-nowrap",children:A("").trim()}),t.jsx("span",{className:"text-muted-foreground",children:r("setup.notes.currentDirectory")})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("code",{className:"font-mono text-foreground whitespace-nowrap",children:A("--no-open")}),t.jsx("span",{className:"text-muted-foreground",children:r("setup.notes.noOpen")})]})]})]})]})})]})]})]}),t.jsx(tt,{open:h,onOpenChange:E,initialDirectory:(s==null?void 0:s.rootDirectory)??null,onListDirectories:c,isSubmitting:j!==null,onConfirm:async m=>{const w=F.localProjectCreate(m.localPath);b(m.localPath);try{await q(w,()=>u(m),{statusLabel:r("actions.addingProject")})}finally{b(L=>L===m.localPath?null:L)}}}),t.jsx("div",{className:"py-4 text-center",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v",Re.split("/")[1]]})})]})}function ot(){const n=H.c(15),e=Ue(),s=We(),o=Be(),d=Ke();let i;n[0]!==o||n[1]!==e||n[2]!==s||n[3]!==d?(i={...e,...s,...o,...d},n[0]=o,n[1]=e,n[2]=s,n[3]=d,n[4]=i):i=n[4];const a=i;let c;return n[5]!==a.commandError||n[6]!==a.connectionStatus||n[7]!==a.handleCreateProject||n[8]!==a.handleHideLocalProject||n[9]!==a.handleListDirectories||n[10]!==a.handleOpenLocalProject||n[11]!==a.localProjects||n[12]!==a.localProjectsReady||n[13]!==a.startingLocalPath?(c=t.jsx("div",{className:"flex-1 flex flex-col min-w-0 relative",children:t.jsx(rt,{connectionStatus:a.connectionStatus,ready:a.localProjectsReady,snapshot:a.localProjects,startingLocalPath:a.startingLocalPath,commandError:a.commandError,onOpenProject:a.handleOpenLocalProject,onHideProject:a.handleHideLocalProject,onListDirectories:a.handleListDirectories,onCreateProject:a.handleCreateProject})}),n[5]=a.commandError,n[6]=a.connectionStatus,n[7]=a.handleCreateProject,n[8]=a.handleHideLocalProject,n[9]=a.handleListDirectories,n[10]=a.handleOpenLocalProject,n[11]=a.localProjects,n[12]=a.localProjectsReady,n[13]=a.startingLocalPath,n[14]=c):c=n[14],c}export{ot as LocalProjectsPage};
|
|
Binary file
|
|
Binary file
|