@withgraphite/graphite-cli 0.21.5 → 0.22.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/.CHANGELOG.md +6 -0
- package/325.js +3 -0
- package/325.js.map +1 -0
- package/903.js +3 -0
- package/903.js.map +1 -0
- package/build/asset-manifest.json +9 -9
- package/build/index.html +1 -1
- package/build/static/css/{96.dcede1be.chunk.css → 74.67093f40.chunk.css} +1 -1
- package/build/static/css/{96.dcede1be.chunk.css.map → 74.67093f40.chunk.css.map} +1 -1
- package/build/static/css/main.f989ad36.css +2 -0
- package/build/static/css/main.f989ad36.css.map +1 -0
- package/build/static/js/697.d1225ee9.chunk.js +2 -0
- package/build/static/js/697.d1225ee9.chunk.js.map +1 -0
- package/build/static/js/74.ef2afffb.chunk.js +1 -0
- package/build/static/js/{96.3d2fff41.chunk.js.map → 74.ef2afffb.chunk.js.map} +1 -1
- package/build/static/js/main.js +1 -1
- package/build/static/js/main.js.map +1 -1
- package/child.js +1 -1
- package/child.js.map +1 -1
- package/graphite.js +1 -1
- package/install.js +1 -1
- package/install.js.map +1 -1
- package/package.json +1 -1
- package/459.js +0 -3
- package/459.js.map +0 -1
- package/593.js +0 -3
- package/593.js.map +0 -1
- package/build/static/css/main.b3d89104.css +0 -2
- package/build/static/css/main.b3d89104.css.map +0 -1
- package/build/static/js/832.f0d2df0d.chunk.js +0 -2
- package/build/static/js/832.f0d2df0d.chunk.js.map +0 -1
- package/build/static/js/96.3d2fff41.chunk.js +0 -1
- /package/build/static/js/{832.f0d2df0d.chunk.js.LICENSE.txt → 697.d1225ee9.chunk.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkGraphiteInteractive=self.webpackChunkGraphiteInteractive||[]).push([[96],{96:function(e,n,o){o.r(n),o.d(n,{ComparisonView:function(){return Re},lineRange:function(){return Ee}});var t=o(3017),r=o(137),i=(o(7404),o(5655)),a=o(7713),s=o(3435),l=o.n(s),c=o(8192),d=o(3135),u=o(8672),p=o(416),f=o(7532),h=o(4340),m=o(2170),g=o(4857),v=o(6604),b=o(515),x=o(7396),y=o(6286),j=o(1684),O=(o(5029),o(1061)),S=o(8892),w=o(8149),C=o.n(w),k=o(7089);function L(e){return e.map((function(e){return e.includes(" ")?'"'.concat(e,'"'):e})).join(", ")}function N(e){return"string"==typeof e&&/(inset\s|)([0-9.]+(\w*)\s){1,4}(rgb[a]?\(.*\)|\w+)/.test(e)}function T(e,n){return Array.isArray(e)?e.filter(n):Object.entries(e).reduce((function(e,o){var r=(0,t.Z)(o,2),i=r[0],a=r[1];if((0,k.isObject)(a)){var s=T(a,n);(0,k.isEmpty)(s)||(e[i]=s)}else n(a)&&(e[i]=a);return e}),{})}function M(e){return e.scale,function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)n.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(o[t[r]]=e[t[r]])}return o}(e,["scale"])}var E,F,R=C().typography.normal.lineHeight,P={animation:{easeOutCubic:"cubic-bezier(0.33, 1, 0.68, 1)"},borderWidths:[0,"1px"],breakpoints:["544px","768px","1012px","1280px"],fonts:{normal:L(["-apple-system","BlinkMacSystemFont","Segoe UI","Noto Sans","Helvetica","Arial","sans-serif","Apple Color Emoji","Segoe UI Emoji"]),mono:L(["SFMono-Regular","Consolas","Liberation Mono","Menlo","Courier","monospace"])},fontSizes:["12px","14px","16px","20px","24px","32px","40px","48px"],fontWeights:{light:300,normal:400,semibold:500,bold:600},lineHeights:R,radii:["0","3px","6px","100px"],sizes:{small:"544px",medium:"768px",large:"1012px",xlarge:"1280px"},space:["0","4px","8px","16px","24px","32px","40px","48px","64px","80px","96px","112px","128px"],colorSchemes:Object.entries(C().colors).reduce((function(e,n){var o=(0,t.Z)(n,2),r=o[0],i=function(e){return{colors:T(e,(function(e){return function(e){return!(N(e)||!e.startsWith("#")&&!e.startsWith("rgb")&&!e.startsWith("hsl"))}(e)})),shadows:T(e,(function(e){return N(e)}))}}(o[1]),a=i.colors,s=i.shadows;return Object.assign(Object.assign({},e),(0,S.Z)({},r,{colors:M(a),shadows:M(s)}))}),{})},I=(O.U2,O.qC),B=O.By,Z=I(O.Dh,O.$_,O.jf),H=B({whiteSpace:{property:"whiteSpace"}}),A=I(O.cp,H),D=(I(O.Cg,O.AF),O.bK,o(7038)),_=o.n(D),z=o(5028),W="light",J="dark",U=p.createContext({setColorMode:function(){return null},setDayScheme:function(){return null},setNightScheme:function(){return null}}),q=function(e){var n,o,i,a,s,l,c,d,u=e.children,f=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)n.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(o[t[r]]=e[t[r]])}return o}(e,["children"]),h=K(),m=h.theme,g=h.colorMode,v=h.dayScheme,b=h.nightScheme,x=null!==(o=null!==(n=f.theme)&&void 0!==n?n:m)&&void 0!==o?o:P,y=function(){var e;try{var n=null===(e=document.getElementById("__PRIMER_DATA__"))||void 0===e?void 0:e.textContent;if(n)return JSON.parse(n)}catch(e){}return{}}(),O=y.resolvedServerColorMode,S=p.useRef(O),w=p.useState(null!==(a=null!==(i=f.colorMode)&&void 0!==i?i:g)&&void 0!==a?a:"day"),C=(0,t.Z)(w,2),k=C[0],L=C[1],N=p.useState(null!==(l=null!==(s=f.dayScheme)&&void 0!==s?s:v)&&void 0!==l?l:W),T=(0,t.Z)(N,2),M=T[0],E=T[1],F=p.useState(null!==(d=null!==(c=f.nightScheme)&&void 0!==c?c:b)&&void 0!==d?d:J),R=(0,t.Z)(F,2),I=R[0],B=R[1],Z=function(){var e=p.useState(G),n=(0,t.Z)(e,2),o=n[0],r=n[1];return p.useEffect((function(){var e,n=null===(e=null===window||void 0===window?void 0:window.matchMedia)||void 0===e?void 0:e.call(window,"(prefers-color-scheme: dark)");function o(e){var n=e.matches;r(n?"night":"day")}if(n){if(void 0!==n.addEventListener)return n.addEventListener("change",o),function(){n.removeEventListener("change",o)};if(void 0!==n.addListener)return n.addListener(o),function(){n.removeListener(o)}}}),[]),o}(),H=S.current||V(k,Z),A=function(e,n,o){switch(e){case"day":case"light":return n;case"dark":case"night":return o}}(H,M,I),D=p.useMemo((function(){return function(e,n){if(!e.colorSchemes)return{resolvedTheme:e,resolvedColorScheme:void 0};if(!e.colorSchemes[n]){console.error("`".concat(n,"` scheme not defined in `theme.colorSchemes`"));var o=Object.keys(e.colorSchemes)[0];return{resolvedTheme:_()(e,e.colorSchemes[o]),resolvedColorScheme:o}}return{resolvedTheme:_()(e,e.colorSchemes[n]),resolvedColorScheme:n}}(x,A)}),[x,A]),q=D.resolvedTheme,X=D.resolvedColorScheme;return p.useEffect((function(){var e=V(k,Z);S.current&&(S.current!==e&&window.setTimeout((function(){z.flushSync((function(){L(e)})),L(k)})),S.current=null)}),[k,Z]),p.useEffect((function(){var e,n;L(null!==(n=null!==(e=f.colorMode)&&void 0!==e?e:g)&&void 0!==n?n:"day")}),[f.colorMode,g]),p.useEffect((function(){var e,n;E(null!==(n=null!==(e=f.dayScheme)&&void 0!==e?e:v)&&void 0!==n?n:W)}),[f.dayScheme,v]),p.useEffect((function(){var e,n;B(null!==(n=null!==(e=f.nightScheme)&&void 0!==e?e:b)&&void 0!==n?n:J)}),[f.nightScheme,b]),(0,r.jsx)(U.Provider,Object.assign({value:{theme:q,colorScheme:A,colorMode:k,resolvedColorMode:H,resolvedColorScheme:X,dayScheme:M,nightScheme:I,setColorMode:L,setDayScheme:E,setNightScheme:B}},{children:(0,r.jsxs)(j.f6,Object.assign({theme:q},{children:[u,f.preventSSRMismatch?(0,r.jsx)("script",{type:"application/json",id:"__PRIMER_DATA__",dangerouslySetInnerHTML:{__html:JSON.stringify({resolvedServerColorMode:H})}}):null]}))}))};function K(){return p.useContext(U)}function G(){var e,n;return"undefined"!=typeof window&&(null===(n=null===(e=window.matchMedia)||void 0===e?void 0:e.call(window,"(prefers-color-scheme: dark)"))||void 0===n?void 0:n.matches)?"night":"day"}function V(e,n){return"auto"===e?n:e}var X=(0,j.vJ)(E||(E=(0,y.Z)(["\n * { box-sizing: border-box; }\n body { margin: 0; }\n table { border-collapse: collapse; }\n input { color-scheme: ",'; }\n\n [role="button"]:focus:not(:focus-visible):not(.focus-visible),\n [role="tabpanel"][tabindex="0"]:focus:not(:focus-visible):not(.focus-visible),\n button:focus:not(:focus-visible):not(.focus-visible),\n summary:focus:not(:focus-visible):not(.focus-visible),\n a:focus:not(:focus-visible):not(.focus-visible) {\n outline: none;\n box-shadow: none;\n }\n\n [tabindex="0"]:focus:not(:focus-visible):not(.focus-visible),\n details-dialog:focus:not(:focus-visible):not(.focus-visible) {\n outline: none;\n }\n'])),(function(e){return e.colorScheme})),Y=j.ZP.div(F||(F=(0,y.Z)(["\n ",";\n ",";\n"])),A,Z);function $(e){var n=e.children,o=e.color,t=void 0===o?"fg.default":o,i=e.fontFamily,a=void 0===i?"normal":i,s=e.lineHeight,l=void 0===s?"default":s,c=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)n.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(o[t[r]]=e[t[r]])}return o}(e,["children","color","fontFamily","lineHeight"]),d=K(),u=d.colorScheme,p=d.dayScheme,f=d.nightScheme;return(0,r.jsxs)(Y,Object.assign({},c,{color:t,fontFamily:a,lineHeight:l,"data-portal-root":!0,"data-color-mode":(null==u?void 0:u.includes("dark"))?"dark":"light","data-light-theme":p,"data-dark-theme":f},{children:[(0,r.jsx)(X,{colorScheme:(null==u?void 0:u.includes("dark"))?"dark":"light"}),n]}))}var Q,ee=o(1261),ne=o(5200),oe=function(e){return(0,ne.ZP)(e.sx)},te=j.ZP.div(O.Dh,O.$_,O.cp,O.bK,O.GQ,O.eC,O.Oq,O.Cg,O.FK,O.AF,oe),re=o(4516),ie=j.ZP.span(Q||(Q=(0,y.Z)(["\n ",";\n ",";\n ",";\n"])),A,Z,oe);function ae(e){var n=e.ctx,o=e.path,t=e.diffType,i=e.open,a=e.onChangeOpen,s=void 0===t?"fg.muted":le[t],l=o.split("/");return(0,r.jsxs)(te,Object.assign({className:"split-diff-view-file-header",display:"flex",alignItems:"center",bg:"accent.subtle",color:s,paddingX:2,paddingY:1,lineHeight:2,backgroundColor:"canvas.subtle",borderTopRightRadius:2,borderTopLeftRadius:2,borderBottomColor:"border.default",borderBottomStyle:"solid",borderBottomWidth:"1px"},{children:[a&&(0,r.jsx)(te,Object.assign({paddingRight:2,onClick:function(){return a(!i)},sx:{cursor:"pointer"}},{children:i?(0,r.jsx)(re.g8U,{size:24}):(0,r.jsx)(re.v4q,{size:24})})),void 0!==t&&(0,r.jsx)(g.J,{icon:ce[t]}),(0,r.jsx)(ie,Object.assign({fontFamily:"mono",fontSize:12},{children:l.reduce((function(e,o,t){var i=l.slice(t).join("/"),a=null==n?void 0:n.copy;return(0,r.jsxs)("span",Object.assign({className:a&&"file-header-copyable-path"},{children:[e,(0,r.jsxs)("span",Object.assign({title:a&&"Copy ".concat(i),onClick:a&&function(){return a(i)},className:"file-header-path-element"},{children:[o,t<l.length-1?"/":""]}))]}),t)}),(0,r.jsx)("span",{}))}))]}))}var se,le={Modified:"var(--scm-modified-foreground)",Added:"var(--scm-added-foreground)",Removed:"var(--scm-removed-foreground)",Renamed:"var(--scm-modified-foreground)",Copied:"var(--scm-added-foreground)"},ce={Modified:"diff-modified",Added:"diff-added",Removed:"diff-removed",Renamed:"diff-renamed",Copied:"diff-renamed"},de=o(8990),ue=o(4184),pe={small:"16px",medium:"32px",large:"64px"},fe=(0,j.ZP)((function(e){var n=e.size,o=void 0===n?"medium":n,t=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)n.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(o[t[r]]=e[t[r]])}return o}(e,["size"]),i=pe[o];return(0,r.jsxs)("svg",Object.assign({height:i,width:i,viewBox:"0 0 16 16",fill:"none"},t,{children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2",vectorEffect:"non-scaling-stroke"}),(0,r.jsx)("path",{d:"M15 8a7.002 7.002 0 00-7-7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",vectorEffect:"non-scaling-stroke"})]}))}))(se||(se=(0,y.Z)(["\n @keyframes rotate-keyframes {\n 100% {\n transform: rotate(360deg);\n }\n }\n\n animation: rotate-keyframes 1s linear infinite;\n\n ","\n"])),oe);function he(e){var n,o,t=e.beforeLineNumber,i=e.before,a=e.afterLineNumber,s=e.after,l=e.rowType,c=e.path,d=e.openFileToLine;switch(l){case"remove":n="patch-remove-line",o=void 0;break;case"modify":n="patch-remove-line",o="patch-add-line";break;case"add":n=void 0,o="patch-add-line";break;case"common":n=void 0,o=void 0;break;case"expanded":n="patch-expanded",o="patch-expanded"}var u="expanded"!==l;return(0,r.jsxs)("tr",{children:[(0,r.jsx)(me,{className:n,content:i,lineNumber:t,path:c,side:"LEFT",canComment:u}),(0,r.jsx)(me,{className:o,content:s,lineNumber:a,path:c,side:"RIGHT",canComment:u,openFileToLine:d})]})}function me(e){var n=e.className,o=e.content,t=e.lineNumber,i=e.path,a=e.side,s=e.openFileToLine,l="RIGHT"===a?ge:{},c=null!=s&&null!=t,d=(null!=n?" ".concat(n,"-number"):"")+(c?" clickable":"");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(te,Object.assign({as:"td",className:"lineNumber".concat(d),"data-line-number":t,"data-path":i,"data-side":a,onClick:c?function(){return s(t)}:void 0},l,{children:t})),(0,r.jsx)("td",Object.assign({className:n},{children:o}))]})}fe.displayName="Spinner";var ge={borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"border.default"},ve=p.memo((function(e){var n,o=e.ctx,i=e.path,a=e.patch,s=e.preamble,l=(0,p.useState)(!1),c=(0,t.Z)(l,2),d=c[0],u=c[1],f=(0,p.useState)((function(){return new Set})),h=(0,t.Z)(f,2),m=h[0],g=h[1],v=(0,p.useCallback)((function(e){var n=new Set(m);n.add(e),g(n)}),[m,g]),b=null!==(n=o.translate)&&void 0!==n?n:function(e){return e},x="/dev/null"===a.newFileName,y=a.hunks,j=y.length-1,O=(0,de.Z)(null!=s?s:[]);return!x||d?y.forEach((function(e,n){if(0===n&&(1!==e.oldStart||1!==e.newStart)){var a="s0";if(m.has(a)){var s={id:o.id,start:1,numLines:e.oldStart-1};O.push((0,r.jsx)(je,{ctx:o,range:s,path:i,beforeLineStart:1,afterLineStart:1,t:b},a))}else{var l=Math.max(e.oldStart,e.newStart)-1;O.push((0,r.jsx)(ye,{numLines:l,onExpand:function(){return v(a)},t:b},a))}}if(function(e,n,o,i){var a=e.oldStart,s=e.newStart,l=function(e){var n=[],o={common:[],removed:[],added:[]};return e.forEach((function(e){var t=e.charAt(0),r=e.slice(1);" "===t?(function(e){return 0!==e.removed.length||0!==e.added.length}(o)&&(n.push(o),o={common:[],removed:[],added:[]}),o.common.push(r)):"-"===t?o.removed.push(r):"+"===t&&o.added.push(r)})),n.push(o),n}(e.lines),c=a,d=s;l.forEach((function(e){var a=e.common,s=e.removed,l=e.added;be(a,n,"common",c,d,o,i),c+=a.length,d+=a.length;for(var u=Math.max(s.length,l.length),p=0;p<u;++p){var f=s[p],h=l[p];if(null!=f&&null!=h){var m=xe(f,h),g=(0,t.Z)(m,2),v=g[0],b=g[1];o.push((0,r.jsx)(he,{beforeLineNumber:c,before:v,afterLineNumber:d,after:b,rowType:"modify",path:n,openFileToLine:i},"".concat(c,"/").concat(d))),++c,++d}else null!=f?(o.push((0,r.jsx)(he,{beforeLineNumber:c,before:f,afterLineNumber:null,after:null,rowType:"remove",path:n,openFileToLine:i},"".concat(c,"/"))),++c):(o.push((0,r.jsx)(he,{beforeLineNumber:null,before:null,afterLineNumber:d,after:h,rowType:"add",path:n,openFileToLine:i},"/".concat(d))),++d)}}))}(e,i,O,o.openFileToLine),n!==j){var c=y[n+1],d="s".concat(e.oldStart);if(m.has(d)){var u=e.oldStart+e.oldLines,p=c.oldStart-u,f={id:o.id,start:u,numLines:p};O.push((0,r.jsx)(je,{ctx:o,range:f,path:i,beforeLineStart:e.oldStart+e.oldLines,afterLineStart:e.newStart+e.newLines,t:b},d))}else{var h=c.oldStart-e.oldLines-e.oldStart;O.push((0,r.jsx)(ye,{numLines:h,onExpand:function(){return v(d)},t:b},d))}}})):O.push((0,r.jsx)(Oe,{children:(0,r.jsxs)(te,Object.assign({display:"inline-block",onClick:function(){return u(!0)},padding:1,sx:{cursor:"pointer",":hover":{bg:"accent.emphasis",color:"fg.onEmphasis"}}},{children:[(0,r.jsx)(re.NoM,{size:16}),(0,r.jsx)(ie,Object.assign({paddingX:4},{children:"Show deleted file"})),(0,r.jsx)(re.NoM,{size:16})]}))},"show-deleted")),(0,r.jsxs)("table",Object.assign({className:"SplitDiffView-hunk-table"},{children:[(0,r.jsxs)("colgroup",{children:[(0,r.jsx)("col",{width:50}),(0,r.jsx)("col",{width:"50%"}),(0,r.jsx)("col",{width:50}),(0,r.jsx)("col",{width:"50%"})]}),(0,r.jsx)("tbody",{children:O})]}))}));function be(e,n,o,t,i,a,s){var l=t,c=i;e.forEach((function(e){a.push((0,r.jsx)(he,{beforeLineNumber:l,before:e,afterLineNumber:c,after:e,rowType:o,path:n,openFileToLine:s},"".concat(l,"/").concat(c))),++l,++c}))}function xe(e,n){if(e.length+n.length>300)return[e,n];var o=(0,ue.Kx)(e,n),t=[],i=[];return o.forEach((function(e,n){var o=e.added,a=e.removed,s=e.value;o?i.push((0,r.jsx)("span",Object.assign({className:"patch-add-word"},{children:s}),n)):a?t.push((0,r.jsx)("span",Object.assign({className:"patch-remove-word"},{children:s}),n)):(t.push(s),i.push(s))})),[t,i]}function ye(e){var n=e.numLines,o=e.onExpand;if(0===n)return null;var t=1===n?"Expand 1 line":"Expand ".concat(n," lines");return(0,r.jsx)(Oe,{children:(0,r.jsxs)(te,Object.assign({display:"inline-block",onClick:o,padding:1,sx:{cursor:"pointer",":hover":{bg:"accent.emphasis",color:"fg.onEmphasis"}}},{children:[(0,r.jsx)(re.NoM,{size:16}),(0,r.jsx)(ie,Object.assign({paddingX:4},{children:t})),(0,r.jsx)(re.NoM,{size:16})]}))})}var je=(0,d.Pi)((function(e){var n=e.ctx,o=e.path,t=e.range,i=e.beforeLineStart,a=e.afterLineStart,s=n.atoms.lineRange(t).get();switch(s.state){case"fulfilled":var l=[];return be(s.value,o,"expanded",i,a,l,n.openFileToLine),(0,r.jsx)(r.Fragment,{children:l});case"pending":return(0,r.jsx)(Oe,{children:(0,r.jsx)(te,Object.assign({padding:1,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},{children:(0,r.jsxs)(te,Object.assign({display:"flex",alignItems:"center"},{children:[(0,r.jsx)(fe,{size:"small"}),(0,r.jsx)(ie,Object.assign({marginLeft:2},{children:"Loading..."}))]}))}))});case"rejected":return(0,r.jsx)(Oe,{children:(0,r.jsx)(te,Object.assign({padding:1,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},{children:(0,r.jsx)(te,Object.assign({display:"flex",alignItems:"center"},{children:(0,r.jsxs)(ie,{children:["Error:"," ",s.value.message]})}))}))})}}));function Oe(e){var n=e.children;return(0,r.jsx)(te,Object.assign({as:"tr",bg:"accent.subtle",color:"fg.muted",height:12},{children:(0,r.jsx)(te,Object.assign({as:"td",colSpan:4,className:"separator"},{children:n}))}))}function Se(e){var n,o,t,i,s=e.ctx,l=e.path,c=e.patch,d=null!==(o=null!==(n=c.newFileName)&&void 0!==n?n:c.oldFileName)&&void 0!==o?o:"/dev/null",u=ve,p=[];return c.type===a.DiffType.Added&&p.push((0,r.jsx)(we,{children:"This file was added"},"added")),c.type===a.DiffType.Removed&&p.push((0,r.jsx)(we,{children:"This file was removed"},"deleted")),c.type===a.DiffType.Renamed&&p.push((0,r.jsxs)(we,{children:["This file was renamed from"," ",null!==(t=c.oldFileName)&&void 0!==t?t:""]},"renamed")),c.type===a.DiffType.Copied&&p.push((0,r.jsxs)(we,{children:["This file was copied from"," ",null!==(i=c.oldFileName)&&void 0!==i?i:""]},"copied")),(0,r.jsxs)(te,Object.assign({className:"split-diff-view",borderWidth:"1px",borderStyle:"solid",borderColor:"border.default",borderRadius:2},{children:[(0,r.jsx)(ae,{ctx:s,path:d,diffType:c.type}),(0,r.jsx)(u,{ctx:s,path:l,patch:c,preamble:p})]}))}function we(e){var n=e.children;return(0,r.jsx)(te,Object.assign({as:"tr",bg:"attention.subtle",color:"fg.muted",height:12},{children:(0,r.jsx)(te,Object.assign({as:"td",colSpan:4,className:"separator"},{children:(0,r.jsx)(te,Object.assign({padding:1},{children:n}))}))}))}var Ce=p.memo((0,d.Pi)((function(){var e=K().theme;return(0,r.jsx)("style",{children:"\n.patch-word-begin {\n border-top-left-radius: .2em;\n border-bottom-left-radius: .2em;\n}\n\n.patch-word-end {\n border-top-right-radius: .2em;\n border-bottom-right-radius: .2em;\n}\n\n.patch-add-line {\n background-color: ".concat(null==e?void 0:e.colors.diffBlob.addition.lineBg,";\n}\n\n.patch-add-line-number {\n color: ").concat(null==e?void 0:e.colors.diffBlob.addition.numText,";\n background-color: ").concat(null==e?void 0:e.colors.diffBlob.addition.numBg,";\n}\n\n.patch-add-word {\n background-color: ").concat(null==e?void 0:e.colors.diffBlob.addition.wordBg,";\n}\n\n.patch-remove-line {\n background-color: ").concat(null==e?void 0:e.colors.diffBlob.deletion.lineBg,";\n}\n\n.patch-remove-line-number {\n color: ").concat(null==e?void 0:e.colors.diffBlob.deletion.numText,";\n background-color: ").concat(null==e?void 0:e.colors.diffBlob.deletion.numBg,";\n}\n\n.patch-remove-word {\n background-color: ").concat(null==e?void 0:e.colors.diffBlob.deletion.wordBg,";\n}\n\n.patch-expanded, .patch-expanded-number {\n background-color: ").concat(null==e?void 0:e.colors.canvas.subtle,";\n}\n\n.patch-expanded-number {\n color: ").concat(null==e?void 0:e.colors.fg.subtle,";\n}\n\n.SplitDiffView-hunk-table td {\n font-family: ").concat(null==e?void 0:e.fonts.mono,"\n}\n\n.lineNumber.clickable {\n cursor: pointer;\n}\n\n.lineNumber.clickable:hover {\n text-decoration: underline;\n}\n/**\n * pl = prettylights theme\n *\n * Mapping from CSS class name to Primer color deduced from a combination of:\n * https://cdn.jsdelivr.net/npm/github-syntax-theme-generator@0.5.0/build/css/github-light.css\n * https://primer.style/react/theme-reference\n *\n * Though it is a bit confusing because github-light.css defines some classes\n * multiple times, such as .pl-s.\n */\n\n.pl-ba {\n color: ").concat(null==e?void 0:e.colors.prettylights.syntax.brackethighlighterAngle,";\n}\n\n.pl-bu {\n color: ").concat(null==e?void 0:e.colors.prettylights.syntax.brackethighlighterUnmatched,";\n}\n\n.pl-c {\n color: ").concat(null==e?void 0:e.colors.prettylights.syntax.comment,";\n}\n\n.pl-c1 {\n color: ").concat(null==e?void 0:e.colors.prettylights.syntax.constant,";\n}\n\n.pl-c2 {\n background-color: ").concat(null==e?void 0:e.colors.prettylights.syntax.carriageReturnBg,";\n color: ").concat(null==e?void 0:e.colors.prettylights.syntax.carriageReturnText,';\n}\n\n.pl-c2::before {\n content: "^M";\n}\n\n.pl-corl {\n color: ').concat(null==e?void 0:e.colors.prettylights.syntax.constantOtherReferenceLink,";\n text-decoration: underline;\n}\n\n.pl-e, .pl-en {\n color: ").concat(null==e?void 0:e.colors.prettylights.syntax.entity,";\n}\n\n.pl-ent {\n color: ").concat(null==e?void 0:e.colors.prettylights.syntax.entityTag,";\n}\n\n.pl-ii {\n background-color: ").concat(null==e?void 0:e.colors.prettylights.syntax.invalidIllegalBg,";\n color: ").concat(null==e?void 0:e.colors.prettylights.syntax.invalidIllegalText,";\n}\n\n.pl-k {\n color: ").concat(null==e?void 0:e.colors.prettylights.syntax.keyword,";\n}\n\n.pl-s, .pl-pds {\n color: ").concat(null==e?void 0:e.colors.prettylights.syntax.string,";\n}\n\n.pl-sg {\n color: ").concat(null==e?void 0:e.colors.prettylights.syntax.sublimelinterGutterMark,";\n}\n\n.pl-smi {\n color: ").concat(null==e?void 0:e.colors.prettylights.syntax.storageModifierImport,";\n}\n\n.pl-sr {\n color: ").concat(null==e?void 0:e.colors.prettylights.syntax.stringRegexp,";\n font-weight: bold;\n}\n\n.pl-v {\n color: ").concat(null==e?void 0:e.colors.prettylights.syntax.variable,";\n}\n")})}))),ke=o(9962),Le=o(2233),Ne=o(2775);function Te(e){return(0,a.parsePatch)(e).filter((function(e){return e.hunks.length>0||null!=e.newFileName||null!=e.oldFileName}))}var Me=(0,v.N)({genKey:function(e){if(e.type===a.ComparisonType.Committed)return"Committed-".concat(e.hash);switch(e.type){case a.ComparisonType.HeadChanges:return"HEAD";case a.ComparisonType.StackChanges:return"STACK";case a.ComparisonType.UncommittedChanges:return"UNCOMMITTED"}},genValue:function(e){return(0,b.u)({default:{isLoading:!0,data:null},setter:function(n){n.isLoading&&f.H.postMessage({type:"requestComparison",comparison:e})},effects:[function(n){var o=n.setSelf,t=f.H.onMessageOfType("comparison",(function(n){var t,r;e.type===n.comparison.type&&o({isLoading:!1,data:(t=n.data.diff,r=Te,null==t.error?{value:r(t.value)}:t)})}));return function(){return t.dispose()}}]})}}),Ee=(0,v.N)({genKey:function(e){return l()(e)},genValue:function(e){return(0,c.Fl)((function(){ee.ql.get(),f.H.postMessage(Object.assign({type:"requestComparisonContextLines"},e));var n=new Promise((function(e){var n=f.H.onMessageOfType("comparisonContextLines",(function(o){e(o.lines),n.dispose()}))}));return(0,u.p4)(n)}))}});function Fe(e){var n=Me(e);return[n.get(),(0,p.useCallback)((function(){(0,c.z)((function(){var e=n.get();n.set(Object.assign(Object.assign({},e),{isLoading:!0}))}))}),[n])]}var Re=(0,d.Pi)((function(e){var n=e.comparison,o=Fe(n),i=(0,t.Z)(o,2),a=i[0],s=i[1];(0,p.useEffect)(s,[n,s]);var l=ke.X.get();return(0,r.jsx)("div",Object.assign({"data-testid":"comparison-view",className:"comparison-view"},{children:(0,r.jsxs)(q,Object.assign({colorMode:"light"===l?"day":"night"},{children:[(0,r.jsx)(Ce,{}),(0,r.jsxs)($,Object.assign({className:"comparison-view-base-styles"},{children:[(0,r.jsx)(Ie,{comparison:n}),(0,r.jsx)("div",Object.assign({className:"comparison-view-details"},{children:null==a.data?(0,r.jsx)(g.J,{icon:"loading"}):null!=a.data.error?(0,r.jsx)(m.Wq,{error:a.data.error,title:"Unable to load comparison"}):0===a.data.value.length?(0,r.jsx)(h.u,{children:"No Changes"}):a.data.value.map((function(e,o){return(0,r.jsx)(Be,{diff:e,comparison:n},o)}))}))]}))]}))}))})),Pe=[a.ComparisonType.UncommittedChanges,a.ComparisonType.HeadChanges,a.ComparisonType.StackChanges],Ie=(0,d.Pi)((function(e){var n=e.comparison,o=Fe(n),s=(0,t.Z)(o,2),l=s[0],d=s[1];return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",Object.assign({className:"comparison-view-header"},{children:[(0,r.jsxs)("span",Object.assign({className:"comparison-view-header-group"},{children:[(0,r.jsxs)(i.Yb,Object.assign({"data-testid":"comparison-view-picker",value:n.type,onChange:function(e){var n=Ne._.get();Ne._.set(Object.assign(Object.assign({},n),{comparison:{type:e.currentTarget.value}}))}},{children:[Pe.map((function(e){return(0,r.jsx)(i.nH,Object.assign({value:e},{children:(0,a.labelForComparison)({type:e})}),e)})),Pe.includes(n.type)?null:(0,r.jsx)(i.nH,Object.assign({value:n.type},{children:(0,a.labelForComparison)(n)}),n.type)]})),(0,r.jsx)(Le.u,Object.assign({delayMs:1e3,title:"Reload this comparison. Comparisons do not refresh automatically."},{children:(0,r.jsx)(i.vD,Object.assign({appearance:"secondary",onClick:d},{children:(0,r.jsx)(g.J,{icon:"refresh","data-testid":"comparison-refresh-button"})}))})),l.isLoading?(0,r.jsx)(g.J,{icon:"loading","data-testid":"comparison-loading"}):null]})),(0,r.jsx)(i.vD,Object.assign({"data-testid":"close-comparison-view-button",appearance:"icon",onClick:function(){return(0,c.z)((function(){var e=Ne._.get();Ne._.set(Object.assign(Object.assign({},e),{visible:!1}))}))}},{children:(0,r.jsx)(g.J,{icon:"x"})}))]}))})}));function Be(e){var n,o,t=e.diff,i=e.comparison,s=null!==(o=null!==(n=t.newFileName)&&void 0!==n?n:t.oldFileName)&&void 0!==o?o:"",l={id:{path:s,comparison:i},atoms:{lineRange:Ee},copy:x.J.clipboardCopy,openFileToLine:(0,a.comparisonIsAgainstHead)(i)?function(e){return x.J.openFile(s,{line:e})}:void 0};return(0,r.jsx)("div",Object.assign({className:"comparison-view-file"},{children:(0,r.jsx)(Se,{ctx:l,patch:t,path:s})}),s)}}}]);
|
/package/build/static/js/{832.f0d2df0d.chunk.js.LICENSE.txt → 697.d1225ee9.chunk.js.LICENSE.txt}
RENAMED
|
File without changes
|