@dao42/d42paas-front 0.7.15 → 0.7.16
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/DaoPaaS.es.js +18 -15
- package/dist/DaoPaaS.umd.js +1 -1
- package/package.json +1 -1
package/dist/DaoPaaS.es.js
CHANGED
|
@@ -197800,22 +197800,25 @@ const TerminalComponent = (_h2) => {
|
|
|
197800
197800
|
userLabel.style.top = childNode.style.top;
|
|
197801
197801
|
userLabel.style.left = childNode.style.left;
|
|
197802
197802
|
helperContainer == null ? void 0 : helperContainer.appendChild(userLabel);
|
|
197803
|
-
|
|
197804
|
-
|
|
197805
|
-
|
|
197806
|
-
cursor: "#ffffff"
|
|
197807
|
-
}));
|
|
197808
|
-
}, 6e3);
|
|
197809
|
-
return () => {
|
|
197810
|
-
try {
|
|
197803
|
+
let timer;
|
|
197804
|
+
if (terminal) {
|
|
197805
|
+
timer = setTimeout(() => {
|
|
197811
197806
|
helperContainer == null ? void 0 : helperContainer.removeChild(userLabel);
|
|
197812
|
-
|
|
197813
|
-
|
|
197814
|
-
|
|
197815
|
-
|
|
197816
|
-
|
|
197817
|
-
|
|
197818
|
-
|
|
197807
|
+
terminal.setOption("theme", __spreadProps(__spreadValues({}, terminal.getOption("theme")), {
|
|
197808
|
+
cursor: "#ffffff"
|
|
197809
|
+
}));
|
|
197810
|
+
}, 6e3);
|
|
197811
|
+
return () => {
|
|
197812
|
+
try {
|
|
197813
|
+
helperContainer == null ? void 0 : helperContainer.removeChild(userLabel);
|
|
197814
|
+
} catch (_2) {
|
|
197815
|
+
}
|
|
197816
|
+
terminal.setOption("theme", __spreadProps(__spreadValues({}, terminal.getOption("theme")), {
|
|
197817
|
+
cursor: "#ffffff"
|
|
197818
|
+
}));
|
|
197819
|
+
clearTimeout(timer);
|
|
197820
|
+
};
|
|
197821
|
+
}
|
|
197819
197822
|
}
|
|
197820
197823
|
});
|
|
197821
197824
|
return () => {
|
package/dist/DaoPaaS.umd.js
CHANGED
|
@@ -2238,7 +2238,7 @@ ${JSON.stringify(v,void 0,4)}`)});else if(f.changes)for(const v of Object.keys(f
|
|
|
2238
2238
|
background-color: #5a5a5a;
|
|
2239
2239
|
opacity: 0.6;
|
|
2240
2240
|
`,Nwe=e=>{var n=gr(e,[]);var p;const t=Yt(m=>m.playgroundStatus),i=Yt(m=>m.dockerStatus),[r,o]=O.exports.useState("EMPTY"),[s,a]=O.exports.useState("STOP"),l=m=>m?(m.indexOf("http://")!==0&&m.indexOf("https://")!==0&&(m=`${Rwe}${m}`),m):`${Rwe}showmebug.com`;O.exports.useEffect(()=>{o(t)},[t]),O.exports.useEffect(()=>{a(i),setTimeout(()=>{f()},800)},[i]);const c=O.exports.useRef(null),[u,d]=O.exports.useState(l((p=Yt.getState().dockerInfo)==null?void 0:p.url));O.exports.useEffect(()=>{},[c]);const h=m=>{var _,y;if(m.keyCode!==13)return;const v=l(m.target.value);d(v),(y=(_=c==null?void 0:c.current)==null?void 0:_.contentWindow)==null||y.location.replace(v)},f=()=>{var m,v;(v=(m=c==null?void 0:c.current)==null?void 0:m.contentWindow)==null||v.location.replace(u)},g=()=>{window.open(u)};return O.exports.useEffect(()=>{var m,v,_;r!=="EMPTY"&&(d(l((m=Yt.getState().dockerInfo)==null?void 0:m.url)),r==="ACTIVE"&&s==="RUNNING"&&u!=="http://"&&u!=="https://"&&((_=(v=c==null?void 0:c.current)==null?void 0:v.contentWindow)==null||_.location.replace(u)))},[r,s]),dt(BE,{name:"browser",children:[dt(INt,{children:[ne("i",{className:"d42 text-xl reload cursor-pointer",onClick:f}),ne("input",{type:"text",value:u,onChange:m=>d(m.target.value),onKeyDown:h}),ne("i",{className:"d42 text-xl file-copy cursor-pointer",onClick:g})]}),s==="STOP"&&ne(RNt,{children:ne("span",{children:"\u70B9\u51FB\u201C\u8FD0\u884C\u201D\uFF0C\u542F\u52A8\u5E94\u7528"})}),ne("iframe",{ref:c,src:u,style:{width:"100%",height:"calc(100% - 30px)"}})]})};var NNt=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Nwe});const Awe=t=>{var i=t,{options:n}=i,e=gr(i,["options"]);const r=Te({},n),o=document.createElement("div");o.classList.add("xterm-helper-user-label");const[s,a]=O.exports.useState(null),{CRDTInfo:l}=Yt(f=>f),c=Yr(f=>f.socket),u=(f,g)=>{f.write(`\r
|
|
2241
|
-
`),f.clear(),d(f,g)},d=(f,g)=>{f.write(g)},h=f=>{var p,m;if(Yt.getState().appStatus==="replay")return;const g={timestamp:Date.now(),userInfo:ec.exports.pick(Mu.getState().userInfo,"uuid"),terminal:{doc:{action:"Edit",value:f}}};(m=(p=Yr.getState())==null?void 0:p.socket)==null||m.emit("terminal",JSON.stringify(g))};return O.exports.useEffect(()=>{if(!s){const f=new uY.exports.Terminal(r);a(f)}},[]),O.exports.useEffect(()=>{var f,g,p,m;!s||l.terminal&&u(s,((m=(p=(g=(f=Yt.getState())==null?void 0:f.CRDTInfo)==null?void 0:g.terminal)==null?void 0:p.doc)==null?void 0:m.value)||"")},[s]),O.exports.useEffect(()=>{var g,p,m,v;const f=l.terminal;if(s&&f){if(((g=f==null?void 0:f.doc)==null?void 0:g.action)==="Get"){u(s,((p=f==null?void 0:f.doc)==null?void 0:p.value)||"");return}if(d(s,((m=f==null?void 0:f.doc)==null?void 0:m.value)||""),!l.userInfo.uuid)return;const _=sa.getState().userList.find(({uuid:y})=>y===l.userInfo.uuid);if(_&&!Hd(l.userInfo)){const y=(v=s==null?void 0:s._core)==null?void 0:v._helperContainer,b=y==null?void 0:y.firstChild;o.innerText=_.username,o.style.backgroundColor=_.color,o.style.top=b.style.top,o.style.left=b.style.left,y==null||y.appendChild(o),s.setOption("theme",ot(Te({},s.getOption("theme")),{cursor:_.color}));const w=setTimeout(()=>{y==null||y.removeChild(o),s.setOption("theme",ot(Te({},s.getOption("theme")),{cursor:"#ffffff"}))},6e3);return()=>{try{y==null||y.removeChild(o)}catch{}s.setOption("theme",ot(Te({},s.getOption("theme")),{cursor:"#ffffff"})),clearTimeout(w)}}}},[l.terminal]),O.exports.useEffect(()=>(c==null||c.on("terminal",f=>{var m,v,_,y;const p=JSON.parse(f).terminal;if(p){if(((m=p==null?void 0:p.doc)==null?void 0:m.action)==="Get"){u(s,((v=p==null?void 0:p.doc)==null?void 0:v.value)||"");return}d(s,((_=p==null?void 0:p.doc)==null?void 0:_.value)||"");const b=(y=s==null?void 0:s._core)==null?void 0:y._helperContainer,w=b==null?void 0:b.firstChild;o.style.top=w.style.top,o.style.left=w.style.left,b==null||b.appendChild(o);
|
|
2241
|
+
`),f.clear(),d(f,g)},d=(f,g)=>{f.write(g)},h=f=>{var p,m;if(Yt.getState().appStatus==="replay")return;const g={timestamp:Date.now(),userInfo:ec.exports.pick(Mu.getState().userInfo,"uuid"),terminal:{doc:{action:"Edit",value:f}}};(m=(p=Yr.getState())==null?void 0:p.socket)==null||m.emit("terminal",JSON.stringify(g))};return O.exports.useEffect(()=>{if(!s){const f=new uY.exports.Terminal(r);a(f)}},[]),O.exports.useEffect(()=>{var f,g,p,m;!s||l.terminal&&u(s,((m=(p=(g=(f=Yt.getState())==null?void 0:f.CRDTInfo)==null?void 0:g.terminal)==null?void 0:p.doc)==null?void 0:m.value)||"")},[s]),O.exports.useEffect(()=>{var g,p,m,v;const f=l.terminal;if(s&&f){if(((g=f==null?void 0:f.doc)==null?void 0:g.action)==="Get"){u(s,((p=f==null?void 0:f.doc)==null?void 0:p.value)||"");return}if(d(s,((m=f==null?void 0:f.doc)==null?void 0:m.value)||""),!l.userInfo.uuid)return;const _=sa.getState().userList.find(({uuid:y})=>y===l.userInfo.uuid);if(_&&!Hd(l.userInfo)){const y=(v=s==null?void 0:s._core)==null?void 0:v._helperContainer,b=y==null?void 0:y.firstChild;o.innerText=_.username,o.style.backgroundColor=_.color,o.style.top=b.style.top,o.style.left=b.style.left,y==null||y.appendChild(o),s.setOption("theme",ot(Te({},s.getOption("theme")),{cursor:_.color}));const w=setTimeout(()=>{y==null||y.removeChild(o),s.setOption("theme",ot(Te({},s.getOption("theme")),{cursor:"#ffffff"}))},6e3);return()=>{try{y==null||y.removeChild(o)}catch{}s.setOption("theme",ot(Te({},s.getOption("theme")),{cursor:"#ffffff"})),clearTimeout(w)}}}},[l.terminal]),O.exports.useEffect(()=>(c==null||c.on("terminal",f=>{var m,v,_,y;const p=JSON.parse(f).terminal;if(p){if(((m=p==null?void 0:p.doc)==null?void 0:m.action)==="Get"){u(s,((v=p==null?void 0:p.doc)==null?void 0:v.value)||"");return}d(s,((_=p==null?void 0:p.doc)==null?void 0:_.value)||"");const b=(y=s==null?void 0:s._core)==null?void 0:y._helperContainer,w=b==null?void 0:b.firstChild;o.style.top=w.style.top,o.style.left=w.style.left,b==null||b.appendChild(o);let x;if(s)return x=setTimeout(()=>{b==null||b.removeChild(o),s.setOption("theme",ot(Te({},s.getOption("theme")),{cursor:"#ffffff"}))},6e3),()=>{try{b==null||b.removeChild(o)}catch{}s.setOption("theme",ot(Te({},s.getOption("theme")),{cursor:"#ffffff"})),clearTimeout(x)}}}),()=>{c==null||c.off("terminal")}),[s,c]),ne(BE,{name:"terminal",children:ne("div",{id:"terminal",style:{height:"100%",width:"100%"},children:ne(Dwe,Te({terminal:s,onKey:h},e))})})};var ANt=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Awe});const ONt=r=>{var o=r,{activeKey:n,onSelect:e,tabItems:t}=o,i=gr(o,["activeKey","onSelect","tabItems"]);return ne(ase,ot(Te({},i),{activeKey:n,onSelect:e,children:t==null?void 0:t.map(s=>ne(ase.Item,{eventKey:s.eventKey,children:s.itemName},s.eventKey))}))};var PNt=/[A-Z]|^ms/g,MNt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Owe=function(e){return e.charCodeAt(1)===45},Pwe=function(e){return e!=null&&typeof e!="boolean"},dY=y9(function(n){return Owe(n)?n:n.replace(PNt,"-$&").toLowerCase()}),Mwe=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(MNt,function(i,r,o){return tf={name:r,styles:o,next:tf},r})}return Mse[e]!==1&&!Owe(e)&&typeof t=="number"&&t!==0?t+"px":t};function QT(n,e,t){if(t==null)return"";if(t.__emotion_styles!==void 0)return t;switch(typeof t){case"boolean":return"";case"object":{if(t.anim===1)return tf={name:t.name,styles:t.styles,next:tf},t.name;if(t.styles!==void 0){var i=t.next;if(i!==void 0)for(;i!==void 0;)tf={name:i.name,styles:i.styles,next:tf},i=i.next;var r=t.styles+";";return r}return FNt(n,e,t)}case"function":{if(n!==void 0){var o=tf,s=t(n);return tf=o,QT(n,e,s)}break}}if(e==null)return t;var a=e[t];return a!==void 0?a:t}function FNt(n,e,t){var i="";if(Array.isArray(t))for(var r=0;r<t.length;r++)i+=QT(n,e,t[r])+";";else for(var o in t){var s=t[o];if(typeof s!="object")e!=null&&e[s]!==void 0?i+=o+"{"+e[s]+"}":Pwe(s)&&(i+=dY(o)+":"+Mwe(o,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var a=0;a<s.length;a++)Pwe(s[a])&&(i+=dY(o)+":"+Mwe(o,s[a])+";");else{var l=QT(n,e,s);switch(o){case"animation":case"animationName":{i+=dY(o)+":"+l+";";break}default:i+=o+"{"+l+"}"}}}return i}var Fwe=/label:\s*([^\s;\n{]+)\s*(;|$)/g,tf,hY=function(e,t,i){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";tf=void 0;var s=e[0];s==null||s.raw===void 0?(r=!1,o+=QT(i,t,s)):o+=s[0];for(var a=1;a<e.length;a++)o+=QT(i,t,e[a]),r&&(o+=s[a]);Fwe.lastIndex=0;for(var l="",c;(c=Fwe.exec(o))!==null;)l+="-"+c[1];var u=Pse(o)+l;return{name:u,styles:o,next:tf}},BNt=!0;function Bwe(n,e,t){var i="";return t.split(" ").forEach(function(r){n[r]!==void 0?e.push(n[r]+";"):i+=r+" "}),i}var $Nt=function(e,t,i){var r=e.key+"-"+t.name;if((i===!1||BNt===!1)&&e.registered[r]===void 0&&(e.registered[r]=t.styles),e.inserted[t.name]===void 0){var o=t;do e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function $we(n,e){if(n.inserted[e.name]===void 0)return n.insert("",e,n.sheet,!0)}function Wwe(n,e,t){var i=[],r=Bwe(n,i,t);return i.length<2?t:r+e(i)}var WNt=function(e){var t=Ose(e);t.sheet.speedy=function(a){this.isSpeedy=a},t.compat=!0;var i=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=hY(c,t.registered,void 0);return $Nt(t,d,!1),t.key+"-"+d.name},r=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=hY(c,t.registered),h="animation-"+d.name;return $we(t,{name:d.name,styles:"@keyframes "+h+"{"+d.styles+"}"}),h},o=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=hY(c,t.registered);$we(t,d)},s=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return Wwe(t.registered,i,HNt(c))};return{css:i,cx:s,injectGlobal:o,keyframes:r,hydrate:function(l){l.forEach(function(c){t.inserted[c]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:Bwe.bind(null,t.registered),merge:Wwe.bind(null,t.registered,i)}},HNt=function n(e){for(var t="",i=0;i<e.length;i++){var r=e[i];if(r!=null){var o=void 0;switch(typeof r){case"boolean":break;case"object":{if(Array.isArray(r))o=n(r);else{o="";for(var s in r)r[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=r}o&&(t&&(t+=" "),t+=o)}}return t},VNt=WNt({key:"css"}),zNt=VNt.css;const UNt=vs.div`
|
|
2242
2242
|
background: #eee;
|
|
2243
2243
|
border-color: ${n=>n.user.color};
|
|
2244
2244
|
background-image: ${n=>'url("'+n.user.avatar+'")'};
|