@fabiofiorita/porcelain 0.76.0 → 0.78.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/README.md +1 -1
- package/package.json +1 -1
- package/server/src/cli/main.mjs +8291 -7641
- package/web/dist/assets/_-CSJHpFdT.js +1 -0
- package/web/dist/assets/_layerId-DODyO-4v.js +1 -0
- package/web/dist/assets/_paired-BQ0y29Xb.js +1 -0
- package/web/dist/assets/_paired-Bse7nsmg.js +1 -0
- package/web/dist/assets/_paired-CmZDjtRz.js +1 -0
- package/web/dist/assets/_paired-CrNFab02.js +1 -0
- package/web/dist/assets/_reviewId-CBVBAvNp.js +1 -0
- package/web/dist/assets/{_revision-1wivYK0j.js → _revision-BMXAJq_Z.js} +1 -1
- package/web/dist/assets/{_section-BQ20AKhJ.js → _section-DdvA8EEA.js} +1 -1
- package/web/dist/assets/_worktreeId-B27bXYEK.js +1 -0
- package/web/dist/assets/_worktreeId-Bse7nsmg.js +1 -0
- package/web/dist/assets/_worktreeId-C8Q6GcvL.js +1 -0
- package/web/dist/assets/_worktreeId-CmZDjtRz.js +1 -0
- package/web/dist/assets/access-E2mYEqnl.js +19 -0
- package/web/dist/assets/connected-workspace-8ch85vkt.js +1 -0
- package/web/dist/assets/desktop-actions-BPv0J8RL.js +1 -0
- package/web/dist/assets/{edit-file-rWLFkawP.js → edit-file-Bcu9LCmp.js} +20 -20
- package/web/dist/assets/{file-editor-CmaAI7mD.js → file-editor-B_jE48tv.js} +11 -11
- package/web/dist/assets/index-BHlOFndd.js +10 -0
- package/web/dist/assets/index-Bg-CecA5.css +2 -0
- package/web/dist/assets/{lazyRouteComponent-DF1peoaD.js → lazyRouteComponent-C0NLdQ95.js} +1 -1
- package/web/dist/assets/pair-Bse7nsmg.js +1 -0
- package/web/dist/assets/pair-CbpILDh2.js +1 -0
- package/web/dist/assets/review-route-CZyVDwAY.js +1 -0
- package/web/dist/assets/reviews-DCiXZMLG.js +1404 -0
- package/web/dist/assets/useMatch-CPSFM0JI.js +1 -0
- package/web/dist/assets/useRouterState-DtsAJKLm.js +1 -0
- package/web/dist/assets/workspace-error-DIuDMViV.js +1 -0
- package/web/dist/assets/{workspace-pending-DnmDeSe-.js → workspace-pending-DgQgV-cu.js} +1 -1
- package/web/dist/index.html +8 -8
- package/web/dist/assets/_-mTAQQLxa.js +0 -1
- package/web/dist/assets/_layerId-D-Ld4zoA.js +0 -1
- package/web/dist/assets/_paired-DQq2L_lM.js +0 -1
- package/web/dist/assets/_paired-DwQfzpPo.js +0 -1
- package/web/dist/assets/_paired-P-FUnX-y.js +0 -1
- package/web/dist/assets/_paired-VrOGlA1G.js +0 -1
- package/web/dist/assets/_reviewId-CR5Y2cjT.js +0 -1
- package/web/dist/assets/_worktreeId-BPp_s24t.js +0 -1
- package/web/dist/assets/_worktreeId-DQq2L_lM.js +0 -1
- package/web/dist/assets/_worktreeId-Dfp8EiPX.js +0 -1
- package/web/dist/assets/_worktreeId-P-FUnX-y.js +0 -1
- package/web/dist/assets/access-CPhumIOz.js +0 -19
- package/web/dist/assets/connected-workspace-Cqk_MV5h.js +0 -1
- package/web/dist/assets/desktop-actions-DEpOe60L.js +0 -1
- package/web/dist/assets/index-DbOyN2aI.js +0 -10
- package/web/dist/assets/index-Dz_rBtGK.css +0 -2
- package/web/dist/assets/pair-CwRRIQuD.js +0 -1
- package/web/dist/assets/pair-DQq2L_lM.js +0 -1
- package/web/dist/assets/review-route-CilLpBvt.js +0 -1
- package/web/dist/assets/reviews-Knu80SJM.js +0 -1396
- package/web/dist/assets/useMatch-CmjLPEeI.js +0 -1
- package/web/dist/assets/useRouterState-CFV0Nv_N.js +0 -1
- package/web/dist/assets/workspace-error-B0KK7kzA.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Dn as t,F as n,H as r,Io as i,Lo as a,Tc as o,Xi as s,Zi as c,_ as l,_n as ee,c as u,g as d,gc as f,is as p,nl as m,ns as h,oc as te,os as ne,pc as g,qi as re,rs as ie,wn as ae,yc as oe,z as se,zo as _}from"./access-E2mYEqnl.js";import{A as ce,C as v,D as le,E as y,N as ue,O as b,P as de,T as x,b as S,k as fe,l as pe,m as me,o as he,s as ge,t as _e,v as ve,w as C,x as w,y as ye}from"./reviews-DCiXZMLG.js";import{Gr as be,Jr as T,R as E,Xr as D,Yr as O,Zr as k,z as A}from"./edit-file-Bcu9LCmp.js";import{n as xe,r as Se}from"./desktop-actions-BPv0J8RL.js";var j={name:`compass`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]};j.node;var M=h(j),N={name:`folder-x`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}],[`path`,{d:`m9.5 10.5 5 5`,key:`ra9qjz`}],[`path`,{d:`m14.5 10.5-5 5`,key:`l2rkpq`}]]};N.node;var P=h(N),Ce=e(m(),1),F=g();function we(e){let t=(0,F.c)(2),r;t[0]===e?r=t[1]:(r=n(e),t[0]=e,t[1]=r),te(r)}var I=o();function L(e){let t=(0,F.c)(7),{icon:n,tone:r}=e,i=(r===void 0?`default`:r)===`destructive`?`bg-destructive/10 text-destructive`:`bg-muted text-foreground`,a;t[0]===i?a=t[1]:(a=ne(`grid size-10 shrink-0 place-items-center rounded-xl`,i),t[0]=i,t[1]=a);let o;t[2]===n?o=t[3]:(o=(0,I.jsx)(n,{className:`size-5`}),t[2]=n,t[3]=o);let s;return t[4]!==a||t[5]!==o?(s=(0,I.jsx)(`span`,{"aria-hidden":`true`,className:a,children:o}),t[4]=a,t[5]=o,t[6]=s):s=t[6],s}function R(e){let t=(0,F.c)(4),{keys:n}=e,r;t[0]===n?r=t[1]:(r=n.split(`+`).map(z),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,I.jsx)(w,{children:r}),t[2]=r,t[3]=i),i}function z(e){return(0,I.jsx)(S,{className:`min-w-6 justify-center`,children:T(e)},e)}function Te(e){let t=(0,F.c)(6),{open:n,onOpenChange:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,I.jsx)(L,{icon:ue}),t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,I.jsxs)(le,{className:`flex-row items-center text-left`,children:[i,(0,I.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,I.jsx)(b,{children:`Keyboard shortcuts`}),(0,I.jsx)(y,{children:`None of them fire while you are typing.`})]})]}),t[1]=a):a=t[1];let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,I.jsxs)(x,{className:`max-h-[85svh] grid-rows-[auto_minmax(0,1fr)] overflow-hidden sm:max-w-xl`,children:[a,(0,I.jsx)(v,{className:`-mr-3 min-h-0`,children:(0,I.jsx)(`div`,{className:`flex flex-col gap-5 pr-3`,children:A.map(Ee)})})]}),t[2]=o):o=t[2];let s;return t[3]!==r||t[4]!==n?(s=(0,I.jsx)(C,{open:n,onOpenChange:r,children:o}),t[3]=r,t[4]=n,t[5]=s):s=t[5],s}function Ee(e){return(0,I.jsxs)(`section`,{"aria-labelledby":`shortcuts-${e.title}`,children:[(0,I.jsx)(`h3`,{id:`shortcuts-${e.title}`,className:`mb-1 text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:e.title}),(0,I.jsx)(`dl`,{className:`divide-y rounded-xl border`,children:e.items.map(B)})]},e.title)}function B(e){return(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-4 px-3 py-2`,children:[(0,I.jsx)(`dt`,{className:`text-sm`,children:e.label}),(0,I.jsx)(`dd`,{className:`shrink-0`,children:(0,I.jsx)(R,{keys:e.keys})})]},e.keys)}var De={"not-found":{title:`Page not found`,description:`This URL does not open a page in Porcelain.`,icon:M},"missing-worktree":{title:`Worktree not found`,description:`This URL has an invalid or unavailable worktree ID.`,icon:P},empty:{title:`Select a worktree`,description:`Choose one on the left to open its review.`,icon:de}};function V(e){let n=(0,F.c)(101),{review:i,openReview:a,remote:o,unavailable:d,notice:m,children:h,settingsOpen:te}=e,g=te!==void 0&&te,_=ye(),[v,le]=(0,Ce.useState)(!1),[y,ue]=(0,Ce.useState)(!1),{setOpenMobile:b,isMobile:x,open:S,openMobile:C}=l(),w;n[0]===b?w=n[1]:(w=(e,t)=>{le(!e&&t.reason===`escape-key`),b(e)},n[0]=b,n[1]=w);let T;n[2]!==_||n[3]!==v?(T=e=>{!e&&v&&(le(!1),_.element?.focus())},n[2]=_,n[3]=v,n[4]=T):T=n[4];let D;n[5]!==w||n[6]!==T?(D={onOpenChange:w,onOpenChangeComplete:T},n[5]=w,n[6]=T,n[7]=D):D=n[7];let O=D,k=oe(),A=ae(),j=fe(A.connection),M,N,P,L,R;if(n[8]!==j||n[9]!==m){L=s(j,re(j)?.id),N=!m&&j.projects.length===0;let e;n[15]!==N||n[16]!==m?(e=N?{title:`Open your first project`,description:`Open a Git repository to see its worktrees and review changes.`,icon:de}:De[m??`empty`],n[15]=N,n[16]=m,n[17]=e):e=n[17],P=e,M=P.icon,R=c(L?.worktree.branch||void 0),n[8]=j,n[9]=m,n[10]=M,n[11]=N,n[12]=P,n[13]=L,n[14]=R}else M=n[10],N=n[11],P=n[12],L=n[13],R=n[14];let z=R,Ee=t(),B=ae(o?.connection),V=o?.remote.environmentId??null,ke;n[18]!==i||n[19]!==V?(ke=i&&{remote:V,projectId:i.selection.projectId,worktreeId:i.selection.worktree.id},n[18]=i,n[19]=V,n[20]=ke):ke=n[20];let H=ke,Ae;n[21]!==o||n[22]!==i?(Ae=i?ge({entry:i.search.entry,surface:i.search.surface,project:i.inventory.projects.find(e=>e.id===i.selection.projectId)?.name,environment:o||i.inventory.environment.custom?i.inventory.environment.name:void 0}):`Porcelain`,n[21]=o,n[22]=i,n[23]=Ae):Ae=n[23],we(Ae);let je;n[24]!==k||n[25]!==i?(je=e=>k({...Se(e),replace:i===void 0}),n[24]=k,n[25]=i,n[26]=je):je=n[26];let U=je,W=xe(A.connection,U),Me;n[27]!==k||n[28]!==b?(Me=e=>{let t=e===void 0?pe:e;b(!1),k({to:`/settings/$section`,params:{section:t}})},n[27]=k,n[28]=b,n[29]=Me):Me=n[29];let G=Me,K,q;if(n[30]!==A.connection||n[31]!==k||n[32]!==W||n[33]!==a||n[34]!==G||n[35]!==Ee||n[36]!==b||n[37]!==g||n[38]!==H){let e;n[41]===W?e=n[42]:(e=e=>e?ce.openWithPayload({remote:e.remote.environmentId}):W(),n[41]=W,n[42]=e);let t;n[43]===G?t=n[44]:(t=()=>G(),n[43]=G,n[44]=t);let r;n[45]!==k||n[46]!==b?(r=e=>{b(!1),k({to:`/settings/$section/$environmentId`,params:{section:`computers`,environmentId:e}})},n[45]=k,n[46]=b,n[47]=r):r=n[47];let i;n[48]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>ue(!0),n[48]=i):i=n[48],K={settingsOpen:g,remotes:void 0,selected:H,openReview:a,onOpenPullRequest:e=>{if(e.review.state!==`available`||!e.review.pullRequestNumber)return;let t=he({kind:`pull-request`,reviewId:e.review.reviewId,number:e.review.pullRequestNumber,environmentId:e.environmentId});b(!1),H?q({entry:t}):k({to:`/reviews/$reviewId`,params:{reviewId:e.review.reviewId},search:{environment:e.environmentId===A.connection.environmentId?void 0:e.environmentId,decision:void 0,entry:t}})},onOpenProject:e,onOpenSettings:t,onOpenRemotes:r,onOpenShortcuts:i},q=(e,t)=>{H&&k({...Se(H),search:t=>({...t,...e}),...t})},n[30]=A.connection,n[31]=k,n[32]=W,n[33]=a,n[34]=G,n[35]=Ee,n[36]=b,n[37]=g,n[38]=H,n[39]=K,n[40]=q}else K=n[39],q=n[40];let Ne;n[49]===G?Ne=n[50]:(Ne=()=>G(),n[49]=G,n[50]=Ne);let Pe;n[51]===Symbol.for(`react.memo_cache_sentinel`)?(Pe={ignoreInputs:!0},n[51]=Pe):Pe=n[51],be(E.openSettings,Ne,Pe);let Fe,Ie;n[52]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=()=>ue(!0),Ie={ignoreInputs:!0},n[52]=Fe,n[53]=Ie):(Fe=n[52],Ie=n[53]),be(E.openShortcuts,Fe,Ie);let Le;n[54]!==h||n[55]!==_?(Le=typeof h==`function`?h(_):h,n[54]=h,n[55]=_,n[56]=Le):Le=n[56];let Re=Le,J;n[57]!==x||n[58]!==O||n[59]!==K||n[60]!==U||n[61]!==b?(J=x&&(0,I.jsx)(u,{variant:`floating`,...O,children:(0,I.jsx)(ve,{...K,onSelect:e=>{U(e),b(!1)}})}),n[57]=x,n[58]=O,n[59]=K,n[60]=U,n[61]=b,n[62]=J):J=n[62];let Y;n[63]===U?Y=n[64]:(Y=e=>void U(e),n[63]=U,n[64]=Y);let X;n[65]!==K||n[66]!==Y?(X={...K,onSelect:Y},n[65]=K,n[66]=Y,n[67]=X):X=n[67];let Z;n[68]!==M||n[69]!==Re||n[70]!==B||n[71]!==N||n[72]!==x||n[73]!==P.description||n[74]!==P.title||n[75]!==_||n[76]!==K||n[77]!==m||n[78]!==q||n[79]!==S||n[80]!==W||n[81]!==C||n[82]!==L||n[83]!==z||n[84]!==o||n[85]!==i||n[86]!==b||n[87]!==V||n[88]!==d?(Z=Re??(i?(0,I.jsx)(_e,{navigationTrigger:_,worktree:i.selection.worktree,projectId:i.selection.projectId,search:i.search,onSearch:q,context:B},`${V??``}:${i.selection.worktree.id}`):(0,I.jsx)(Oe,{navigationTrigger:_,isMobile:x,open:S,openMobile:C,children:o&&d?(0,I.jsx)(se,{name:o.remote.name,status:d,onOpenRemotes:()=>K.onOpenRemotes(o.remote.environmentId)}):(0,I.jsxs)(r,{title:P.title,description:P.description,icon:(0,I.jsx)(M,{}),children:[N&&(0,I.jsx)(ie,{variant:`outline`,onClick:()=>{b(!1),W()},children:`Open project`}),!m&&L&&(0,I.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col gap-2`,children:[(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`First that needs you`}),(0,I.jsx)(f,{className:`flex min-w-0 flex-col rounded-lg border p-3 text-ui hover:bg-accent`,to:`/$projectId/$worktreeId`,params:{projectId:L.projectId,worktreeId:L.worktree.id},children:(0,I.jsx)(ee,{text:z,className:`font-medium`})})]}),m===`missing-worktree`&&L&&(0,I.jsx)(f,{className:ne(p()),to:`/$projectId/$worktreeId`,params:{projectId:L.projectId,worktreeId:L.worktree.id},children:`Open available worktree`}),m&&(0,I.jsx)(f,{className:ne(p({variant:`outline`})),to:`/`,search:{},children:`Back to workspace`})]})})),n[68]=M,n[69]=Re,n[70]=B,n[71]=N,n[72]=x,n[73]=P.description,n[74]=P.title,n[75]=_,n[76]=K,n[77]=m,n[78]=q,n[79]=S,n[80]=W,n[81]=C,n[82]=L,n[83]=z,n[84]=o,n[85]=i,n[86]=b,n[87]=V,n[88]=d,n[89]=Z):Z=n[89];let Q;n[90]!==x||n[91]!==S||n[92]!==X||n[93]!==Z?(Q=(0,I.jsx)(me,{navigator:X,isMobile:x,open:S,children:Z}),n[90]=x,n[91]=S,n[92]=X,n[93]=Z,n[94]=Q):Q=n[94];let $;n[95]===y?$=n[96]:($=(0,I.jsx)(Te,{open:y,onOpenChange:ue}),n[95]=y,n[96]=$);let ze;return n[97]!==J||n[98]!==Q||n[99]!==$?(ze=(0,I.jsxs)(I.Fragment,{children:[J,Q,$]}),n[97]=J,n[98]=Q,n[99]=$,n[100]=ze):ze=n[100],ze}function Oe(e){let t=(0,F.c)(12),{navigationTrigger:n,isMobile:r,open:o,openMobile:s,children:c}=e,l;t[0]===n?l=t[1]:(l=e=>n.attach(e),t[0]=n,t[1]=l);let ee=r?s:o,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=O(D(E.toggleNavigator,k())),t[2]=u):u=t[2];let f;t[3]!==l||t[4]!==ee?(f=(0,I.jsx)(_,{render:(0,I.jsx)(d,{ref:l,className:`absolute top-3 left-3`,"aria-label":`Toggle Sidebar`,"aria-expanded":ee,"aria-keyshortcuts":u})}),t[3]=l,t[4]=ee,t[5]=f):f=t[5];let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,I.jsxs)(a,{side:`right`,children:[`Toggle sidebar`,(0,I.jsx)(S,{children:T(E.toggleNavigator)})]}),t[6]=p):p=t[6];let m;t[7]===f?m=t[8]:(m=(0,I.jsxs)(i,{children:[f,p]}),t[7]=f,t[8]=m);let h;return t[9]!==c||t[10]!==m?(h=(0,I.jsxs)(`div`,{className:`relative grid h-full min-h-0 place-items-center rounded-paper border bg-card p-8`,children:[m,c]}),t[9]=c,t[10]=m,t[11]=h):h=t[11],h}export{we as n,V as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Dn as e,Nr as t,Tc as n,_c as r,kr as i,lo as a,oc as o,pc as s,yc as c}from"./access-E2mYEqnl.js";import{A as l,S as u,j as d,l as f}from"./reviews-DCiXZMLG.js";import{Br as p}from"./edit-file-Bcu9LCmp.js";var m=s(),h=n();function g(e){let t={projectId:e.projectId,worktreeId:e.worktreeId};return e.remote===null?r({to:`/$projectId/$worktreeId`,params:t}):r({to:`/remotes/$environmentId/$projectId/$worktreeId`,params:{environmentId:e.remote,...t}})}function _(e,t){let n=(0,m.c)(2),r=d(e,t,v),i;return n[0]===r?i=n[1]:(i=()=>r?r():l.openWithPayload({remote:null}),n[0]=r,n[1]=i),i}function v(e){return p.add({title:`Could not open the project`,description:a(e),type:`error`})}function y(n){let r=(0,m.c)(11),{connection:a,empty:s}=n,l=c(),d=e(),p;r[0]!==s||r[1]!==l?(p=e=>l({...g(e),replace:s}),r[0]=s,r[1]=l,r[2]=p):p=r[2];let v=p,y=_(a,v),b;r[3]!==a||r[4]!==l||r[5]!==y?(b=i(e=>{if(typeof e==`object`){let n=t(e.url);if(!n)return;let r=n.environmentId===a.environmentId?void 0:n.environmentId;n.revision===void 0?l({to:`/reviews/$reviewId`,params:{reviewId:n.reviewId},search:{environment:r,decision:n.decision}}):l({to:`/reviews/$reviewId/$revision`,params:{reviewId:n.reviewId,revision:String(n.revision)},search:{environment:r,decision:n.decision}})}else e===`open-settings`?l({to:`/settings/$section`,params:{section:f}}):y()}),r[3]=a,r[4]=l,r[5]=y,r[6]=b):b=r[6],o(b);let x;return r[7]!==a||r[8]!==v||r[9]!==d?(x=(0,h.jsx)(u,{connection:a,remotes:d,onOpened:v}),r[7]=a,r[8]=v,r[9]=d,r[10]=x):x=r[10],x}export{_ as n,g as r,y as t};
|