@deslop/workbench 0.0.381 → 0.0.382
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/-workbench-terminal-nnzNYgEY.js +145 -0
- package/dist/client/assets/{agent-BmwIVlVZ.js → agent-CnBPS10_.js} +1 -1
- package/dist/client/assets/{agent-CE67X_hb.js → agent-XCbfwj2z.js} +2 -2
- package/dist/client/assets/{diff-BP9B4x7R.js → diff-C2E3u0uB.js} +2 -2
- package/dist/client/assets/diff-DOMtP9gw.js +221 -0
- package/dist/client/assets/{index-Cc-cDoXa.js → index-AC_6iNUz.js} +1 -1
- package/dist/client/assets/{portless-qyhmpSUj.js → portless-BEzC3sH4.js} +2 -2
- package/dist/client/assets/portless-DLmFLaZz.js +1 -0
- package/dist/client/assets/{run-CCCofwDU.js → run-DY23jobN.js} +2 -2
- package/dist/client/assets/{run-D7w-8aQA.js → run-wjcPjpA5.js} +1 -1
- package/dist/client/assets/{terminal-DJ8tjXNh.js → terminal-BC9WKciF.js} +1 -1
- package/dist/client/assets/{terminal-Dx10AUUW.js → terminal-Bn9lFOEg.js} +2 -2
- package/dist/client/index.html +6 -6
- package/package.json +1 -1
- package/dist/client/assets/-workbench-terminal-YB9hQXjr.js +0 -145
- package/dist/client/assets/diff-OmMK6IL0.js +0 -221
- package/dist/client/assets/portless-4_iTgOr5.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{n as t,r as n,t as r}from"./compiler-runtime-CLAvuQ-D.js";import{Fr as i,Kt as a,M as o,Ma as s,Or as c,_t as l,a as u,es as d,gs as f,hs as p,k as m,lt as h,n as g,nt as _,ps as v,q as y,r as b,tt as x,wt as S,xo as C}from"./fallbacks-DwGmG_0c.js";import{t as w}from"./triangle-alert-cDPYgb7f.js";import{n as T,r as E,t as D,y as O}from"./resizable-A9BpOcmt.js";import{t as k}from"./external-link-D7Q28KpR.js";import{S as A,i as j,t as M}from"./state-_2CmL5IM.js";import{t as N}from"./portless-qyhmpSUj.js";import{t as P}from"./input-CEh4Uy0l.js";var F=f(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),I=f(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),L=f(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),R=f(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),z=f(`file-clock`,[[`path`,{d:`M16 22h2a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v2.85`,key:`ryk6xj`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 14v2.2l1.6 1`,key:`6m4bie`}],[`circle`,{cx:`8`,cy:`16`,r:`6`,key:`10v15b`}]]),B=f(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),V=f(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),H=r(),U=e(n(),1),W=t();function G(e,t){return`${e}${t.startsWith(`/`)?t:`/${t}`}`}function K(e){if(e===``)return`localhost:0000`;try{return new URL(e).host}catch{return e.replace(/^https?:\/\//u,``)}}var q=h([_({deslopBrowserFavicon:y(!0),href:S(x)}),_({deslopBrowserLocation:y(!0),path:S(x)}),_({deslopBrowserLog:y(!0),level:x,message:x})]);function J(e){return e===`error`?`text-destructive`:e===`warn`?`text-chart-2`:e===`info`?`text-chart-1`:e===`debug`?`text-chart-4`:`text-muted-foreground`}function Y(e){let t=(0,H.c)(5);if(e.level===`error`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,W.jsx)(F,{className:`size-3.5`}),t[0]=e):e=t[0],e}if(e.level===`warn`){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,W.jsx)(w,{className:`size-3.5`}),t[1]=e):e=t[1],e}if(e.level===`info`){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,W.jsx)(p,{className:`size-3.5`}),t[2]=e):e=t[2],e}if(e.level===`debug`){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,W.jsx)(R,{className:`size-3.5`}),t[3]=e):e=t[3],e}let n;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,W.jsx)(O,{className:`size-2`}),t[4]=n):n=t[4],n}function X(e){let t=e.toLowerCase();return e.startsWith(`[vite]`)||t.includes(`react scan`)||t.includes(`react-scan`)||t.includes(`react grab`)||t.includes(`react-grab`)}function Z(e){let t=(0,U.useRef)(null),n=(0,U.useRef)(0),r=e.origin??``,[s,f]=(0,U.useState)(()=>r?G(r,`/`):``),[p,h]=(0,U.useState)(0),[_,y]=(0,U.useState)(`/`),[x,S]=(0,U.useState)(),[w,O]=(0,U.useState)(!1),[A,j]=(0,U.useState)(()=>r!==``),[M,N]=(0,U.useState)([]);(0,U.useEffect)(()=>{y(`/`),f(r?G(r,`/`):``),S(void 0),j(r!==``)},[r]),(0,U.useLayoutEffect)(()=>{O(!1);function e(e){e.origin===r&&v(l(q)(e.data),C({onNone:()=>{},onSome:e=>{if(`deslopBrowserFavicon`in e){S(e.href);return}if(`deslopBrowserLocation`in e){y(e.path??`/`);return}ee(e.level,e.message)}}))}return window.addEventListener(`message`,e),O(!0),()=>{window.removeEventListener(`message`,e),O(!1)}},[r]);function F(){if(c(r))return;let e=G(r,i(_)||`/`);N([]),f(e),S(void 0),j(!0)}function R(){N([]),j(!0),h(e=>e+1)}function H(){c(r)||(N([]),t.current?.contentWindow?.postMessage({deslopBrowserClear:!0},r))}function Z(){c(s)||window.open(s,`_blank`,`noopener,noreferrer`)}function Q(){try{t.current?.contentWindow?.history.back()}catch{}}function $(){try{t.current?.contentWindow?.history.forward()}catch{}}function ee(e,t){X(t)||N(r=>[...r.slice(-199),{id:n.current++,level:e,message:t,time:a()}])}return(0,W.jsxs)(`div`,{className:m(`bg-background flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden border`,e.className),children:[(0,W.jsxs)(`form`,{className:`bg-muted/30 flex shrink-0 items-center gap-1 border-b p-2`,onSubmit:e=>{e.preventDefault(),F()},children:[(0,W.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Back`,onClick:Q,children:(0,W.jsx)(I,{className:`size-3.5`})}),(0,W.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Forward`,onClick:$,children:(0,W.jsx)(L,{className:`size-3.5`})}),(0,W.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Reload`,onClick:R,children:(0,W.jsx)(B,{className:`size-3.5`})}),(0,W.jsx)(`div`,{className:`border-border flex h-8 w-8 shrink-0 items-center justify-center border`,children:d(x)&&(0,W.jsx)(`img`,{src:x,alt:``,className:`size-4`})}),(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1`,children:[(0,W.jsx)(`div`,{className:`border-input bg-secondary text-secondary-foreground/70 flex h-8 min-w-0 shrink items-center border px-2 text-xs`,children:(0,W.jsx)(`span`,{className:`min-w-0 overflow-hidden text-ellipsis whitespace-nowrap`,children:K(r)})}),(0,W.jsx)(P,{value:_.startsWith(`/`)?_.slice(1):_,placeholder:``,className:`min-w-[7rem] flex-1 text-xs`,onChange:e=>{y(`/${e.currentTarget.value.replace(/^\/+/,``)}`)}})]}),(0,W.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Open top-level preview`,onClick:Z,children:(0,W.jsx)(k,{className:`size-3.5`})}),r&&(0,W.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Clear cookies`,onClick:H,children:(0,W.jsx)(V,{className:`size-3.5`})})]}),(0,W.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[r===``?(0,W.jsx)(g,{message:`Start a dev server in this worktree terminal to open a browser preview.`}):(0,W.jsxs)(E,{orientation:`vertical`,className:`min-h-0 flex-1`,children:[(0,W.jsx)(T,{defaultSize:`100%`,minSize:`40%`,children:(0,W.jsxs)(`div`,{className:`relative h-full min-h-0 w-full`,children:[(0,W.jsx)(`iframe`,{ref:t,title:s,src:w?s:void 0,className:`bg-background h-full min-h-0 w-full border-0`,onLoad:()=>{j(!1)}},p),A&&(0,W.jsx)(`div`,{className:`bg-background absolute inset-0 flex`,children:(0,W.jsx)(b,{})})]})}),(0,W.jsx)(D,{}),(0,W.jsx)(T,{collapsible:!0,collapsedSize:0,defaultSize:0,minSize:0,maxSize:`50%`,children:(0,W.jsx)(`div`,{className:`flex h-full min-h-0 flex-col overflow-hidden`,children:(0,W.jsx)(`div`,{className:m(`min-h-0 flex-1 overflow-auto font-mono text-xs`,M.length===0&&`hidden`),children:M.map(e=>(0,W.jsxs)(`div`,{className:`grid grid-cols-[8rem_1rem_minmax(0,1fr)] gap-3 px-2 py-1`,children:[(0,W.jsx)(`span`,{className:`overflow-hidden whitespace-nowrap select-none`,children:o(e.time)}),(0,W.jsx)(`span`,{className:m(`flex shrink-0 items-center select-none`,J(e.level)),title:e.level,children:(0,W.jsx)(Y,{level:e.level})}),(0,W.jsx)(`span`,{className:`min-w-0 break-words whitespace-pre-wrap select-text`,children:e.message})]},e.id))})})})]}),(0,W.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center justify-between border-b px-2`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2 font-mono text-xs`,children:[(0,W.jsx)(z,{className:`size-3.5`}),(0,W.jsx)(`span`,{children:M.length})]}),(0,W.jsx)(u,{type:`button`,variant:`ghost`,size:`icon-xs`,"aria-label":`Clear browser logs`,onClick:()=>{N([])},children:(0,W.jsx)(V,{className:`size-3.5`})})]})]})]})}function Q(){let e=(0,H.c)(9),t=N.useParams(),n=N.useSearch(),r;e[0]===t.worktree?r=e[1]:(r=M(t.worktree),e[0]=t.worktree,e[1]=r);let i=A(r),a=i.value.activeWorktree?.root??``,o;e[2]===a?o=e[3]:(o=j(a),e[2]=a,e[3]=o);let c=A(o);if(!i.value.activeWorktree)return;let l;e[4]!==c||e[5]!==n.origin?(l=d(n.origin)&&v(c.value,s(n.origin))?n.origin:c.value[0],e[4]=c,e[5]=n.origin,e[6]=l):l=e[6];let u=l,f;return e[7]===u?f=e[8]:(f=(0,W.jsx)(`div`,{className:`bg-background h-full min-h-0 min-w-0 p-2`,children:(0,W.jsx)(Z,{className:`h-full min-h-0 w-full min-w-0`,origin:u})}),e[7]=u,e[8]=f),f}export{Q as component};
|