notjs-react 0.5.9 → 0.6.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/NotJS.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +220 -220
- package/dist/index.js.map +1 -1
- package/dist/notjs-react.css +1 -1
- package/package.json +1 -1
package/dist/NotJS.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotJS.d.ts","sourceRoot":"","sources":["../src/NotJS.tsx"],"names":[],"mappings":"AAGA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,sCAAsC,CAAA;AA+F7C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,YAA6C,EAC7C,UAAwC,EACxC,WAAW,EACX,eAAwB,EACxB,cAAqB,EACrB,eAAsB,EACtB,UAAkB,EAClB,kBAAuB,EACxB,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"NotJS.d.ts","sourceRoot":"","sources":["../src/NotJS.tsx"],"names":[],"mappings":"AAGA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,sCAAsC,CAAA;AA+F7C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,YAA6C,EAC7C,UAAwC,EACxC,WAAW,EACX,eAAwB,EACxB,cAAqB,EACrB,eAAsB,EACtB,UAAkB,EAClB,kBAAuB,EACxB,EAAE,UAAU,2CAymBZ"}
|
package/dist/index.cjs
CHANGED
|
@@ -172,5 +172,5 @@ func main() {
|
|
|
172
172
|
`),D.send(W.current+`
|
|
173
173
|
`),W.current=""):U===""?((se=E.current)==null||se.write(`^C\r
|
|
174
174
|
`),W.current=""):(W.current+=U,(ue=E.current)==null||ue.write(U)))})},J=(D,q)=>{navigator.clipboard.writeText(D).then(()=>{q==="code"?(C(!0),setTimeout(()=>C(!1),2e3)):(I(!0),setTimeout(()=>I(!1),2e3))})},P=()=>{if(E.current){const D=E.current.buffer.active;let q="";for(let U=0;U<D.length;U++){const Y=D.getLine(U);Y&&(q+=Y.translateToString(!0)+`
|
|
175
|
-
`)}J(q,"console")}},y=()=>{m(D=>!D),_?document.documentElement.classList.remove("dark"):document.documentElement.classList.add("dark")};j.useEffect(()=>{_&&document.documentElement.classList.add("dark")},[]);const Q=D=>{D.preventDefault(),F(!0)};return j.useEffect(()=>{const D=U=>{if(!H||!G.current)return;const ie=G.current.getBoundingClientRect(),se=(U.clientX-ie.left)/ie.width*100;se>=20&&se<=80&&x(se)},q=()=>{F(!1)};return H&&(document.addEventListener("mousemove",D),document.addEventListener("mouseup",q),document.body.style.cursor="col-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",q),document.body.style.cursor="",document.body.style.userSelect=""}},[H]),j.useEffect(()=>{E.current&&k.current&&setTimeout(()=>{if(k.current&&E.current){const D=k.current.getBoundingClientRect(),q=Math.floor((D.width-20)/9),U=Math.floor((D.height-20)/17);E.current.resize(q,U)}},10)},[M]),N===!1?re.jsx("div",{className:"flex flex-col items-center justify-center h-screen w-screen bg-neutral-50 dark:bg-neutral-950 p-8",children:re.jsx("div",{className:"max-w-2xl w-full border-2 border-red-500 rounded-2xl p-8 bg-white dark:bg-neutral-900",children:re.jsxs("div",{className:"flex items-start gap-4",children:[re.jsx(En,{className:"w-8 h-8 text-red-500 flex-shrink-0 mt-1"}),re.jsxs("div",{children:[re.jsx("h2",{className:"text-2xl font-bold text-red-600 dark:text-red-500 mb-3",children:"NotJS Configuration Error"}),re.jsx("p",{className:"text-red-700 dark:text-red-400 text-lg leading-relaxed",children:z})]})]})})}):N===null?re.jsx("div",{className:"flex flex-col items-center justify-center h-screen w-screen bg-neutral-50 dark:bg-neutral-950",children:re.jsx("div",{className:"text-neutral-600 dark:text-neutral-400 text-lg",children:"Loading NotJS..."})}):re.jsxs(
|
|
175
|
+
`)}J(q,"console")}},y=()=>{m(D=>!D),_?document.documentElement.classList.remove("dark"):document.documentElement.classList.add("dark")};j.useEffect(()=>{_&&document.documentElement.classList.add("dark")},[]);const Q=D=>{D.preventDefault(),F(!0)};return j.useEffect(()=>{const D=U=>{if(!H||!G.current)return;const ie=G.current.getBoundingClientRect(),se=(U.clientX-ie.left)/ie.width*100;se>=20&&se<=80&&x(se)},q=()=>{F(!1)};return H&&(document.addEventListener("mousemove",D),document.addEventListener("mouseup",q),document.body.style.cursor="col-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",q),document.body.style.cursor="",document.body.style.userSelect=""}},[H]),j.useEffect(()=>{E.current&&k.current&&setTimeout(()=>{if(k.current&&E.current){const D=k.current.getBoundingClientRect(),q=Math.floor((D.width-20)/9),U=Math.floor((D.height-20)/17);E.current.resize(q,U)}},10)},[M]),N===!1?re.jsx("div",{className:"flex flex-col items-center justify-center h-screen w-screen bg-neutral-50 dark:bg-neutral-950 p-8",children:re.jsx("div",{className:"max-w-2xl w-full border-2 border-red-500 rounded-2xl p-8 bg-white dark:bg-neutral-900",children:re.jsxs("div",{className:"flex items-start gap-4",children:[re.jsx(En,{className:"w-8 h-8 text-red-500 flex-shrink-0 mt-1"}),re.jsxs("div",{children:[re.jsx("h2",{className:"text-2xl font-bold text-red-600 dark:text-red-500 mb-3",children:"NotJS Configuration Error"}),re.jsx("p",{className:"text-red-700 dark:text-red-400 text-lg leading-relaxed",children:z})]})]})})}):N===null?re.jsx("div",{className:"flex flex-col items-center justify-center h-screen w-screen bg-neutral-50 dark:bg-neutral-950",children:re.jsx("div",{className:"text-neutral-600 dark:text-neutral-400 text-lg",children:"Loading NotJS..."})}):re.jsxs("div",{className:"notjs-container",children:[re.jsxs("div",{className:"flex flex-col h-full w-full bg-neutral-50 dark:bg-neutral-950",children:[!R&&re.jsxs("div",{className:"flex items-center justify-between px-8 py-3 bg-white/80 dark:bg-neutral-900/80 backdrop-blur border-b border-black/5 dark:border-white/5",children:[re.jsxs("div",{className:"flex items-center gap-6",children:[re.jsxs("div",{className:"flex items-center gap-4",children:[re.jsx("h1",{className:"text-2xl font-semibold text-neutral-900 dark:text-white",children:"NotJS"}),re.jsx("img",{src:Rn,alt:"NotJS Logo",className:"h-10 object-contain rounded-xl"})]}),re.jsx("select",{value:h,onChange:D=>f(D.target.value),className:"px-4 py-2 rounded-xl bg-neutral-100 dark:bg-neutral-800 text-neutral-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500/40 transition",children:v.map(D=>re.jsx("option",{value:D,children:D.toUpperCase()},D))}),r.length>0&&re.jsx("select",{value:e||a||"",onChange:D=>t(D.target.value||null),className:"px-4 py-2 rounded-xl bg-neutral-100 dark:bg-neutral-800 text-neutral-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/40 transition",children:r.map(D=>re.jsxs("option",{value:D,children:["v",D," ",D===a?"(default)":""]},D))})]}),re.jsx("button",{onClick:y,className:"p-3 rounded-xl bg-neutral-100 dark:bg-neutral-800 hover:bg-neutral-200 dark:hover:bg-neutral-700 transition",children:_?re.jsx(xn,{className:"w-5 h-5 text-yellow-500"}):re.jsx(Bn,{className:"w-5 h-5 text-neutral-700"})})]}),re.jsxs("div",{ref:G,className:"flex flex-1 overflow-hidden relative",children:[re.jsxs("div",{className:"flex flex-col bg-white dark:bg-neutral-900",style:{width:`${M}%`,flexShrink:0},children:[re.jsxs("div",{className:`flex items-center justify-between px-8 bg-neutral-100/70 dark:bg-neutral-900 border-b border-black/5 dark:border-white/5 ${R?"py-2":"py-1"}`,children:[re.jsx("h2",{className:"text-sm font-semibold tracking-wide text-neutral-600 dark:text-neutral-400",children:"CODE"}),re.jsxs("div",{className:"flex items-center gap-2",children:[re.jsx("button",{onClick:X,className:"p-1.5 rounded-lg transition bg-orange-500/90 hover:bg-orange-500 text-white","data-tooltip-id":"restart-tooltip","data-tooltip-content":"Restart program",children:re.jsx(kn,{className:"w-3.5 h-3.5"})}),re.jsx("button",{onClick:()=>J(n,"code"),className:"p-1.5 rounded-lg bg-neutral-200 dark:bg-neutral-800 hover:bg-neutral-300 dark:hover:bg-neutral-700 transition","data-tooltip-id":"copy-code-tooltip","data-tooltip-content":"Copy code",children:u?re.jsx(Dr,{className:"w-3.5 h-3.5 text-emerald-600"}):re.jsx(Or,{className:"w-3.5 h-3.5 text-neutral-700 dark:text-neutral-300"})})]})]}),re.jsx("div",{className:"flex-1 overflow-hidden rounded-b-2xl",children:re.jsx(fs,{height:"100%",language:h,value:n,onChange:D=>l(D||""),theme:_?"vs-dark":"light",options:{minimap:{enabled:!1},fontSize:14,lineNumbers:"on",scrollBeyondLastLine:!1,automaticLayout:!0,tabSize:2,wordWrap:"on",padding:{top:12,bottom:12}}})})]}),re.jsx("div",{className:`w-1 shrink-0 bg-black/5 dark:bg-white/5 hover:bg-blue-500 cursor-col-resize transition ${H?"bg-blue-500":""}`,onMouseDown:Q}),re.jsxs("div",{className:"flex-1 min-w-0 flex flex-col bg-white dark:bg-neutral-950",children:[re.jsxs("div",{className:`flex items-center justify-between px-8 bg-neutral-100/70 dark:bg-neutral-900 border-b border-black/5 dark:border-white/5 shrink-0 ${R?"py-2":"py-1"}`,children:[re.jsx("h2",{className:"text-sm font-semibold tracking-wide text-neutral-600 dark:text-neutral-400",children:"CONSOLE"}),re.jsx("button",{onClick:P,className:"p-1.5 rounded-lg bg-neutral-200 dark:bg-neutral-800 hover:bg-neutral-300 dark:hover:bg-neutral-700 transition","data-tooltip-id":"copy-output-tooltip","data-tooltip-content":"Copy output",children:B?re.jsx(Dr,{className:"w-3.5 h-3.5 text-emerald-600"}):re.jsx(Or,{className:"w-3.5 h-3.5 text-neutral-700 dark:text-neutral-300"})})]}),re.jsx("div",{ref:k,className:"flex-1 overflow-hidden rounded-b-2xl bg-white dark:bg-neutral-950 p-3"})]})]})]}),re.jsx(Gt,{id:"restart-tooltip",className:"!rounded-lg !bg-slate-800/95 !backdrop-blur-sm !px-3 !py-2 !shadow-xl !border !border-slate-700/50",style:{fontSize:"0.75rem",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',color:"#ffffff",zIndex:9999},place:"bottom",offset:8}),re.jsx(Gt,{id:"copy-code-tooltip",className:"!rounded-lg !bg-slate-800/95 !backdrop-blur-sm !px-3 !py-2 !shadow-xl !border !border-slate-700/50",style:{fontSize:"0.75rem",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',color:"#ffffff",zIndex:9999},place:"bottom",offset:8}),re.jsx(Gt,{id:"copy-output-tooltip",className:"!rounded-lg !bg-slate-800/95 !backdrop-blur-sm !px-3 !py-2 !shadow-xl !border !border-slate-700/50",style:{fontSize:"0.75rem",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',color:"#ffffff",zIndex:9999},place:"bottom",offset:8})]})}exports.NotJS=Ln;
|
|
176
176
|
//# sourceMappingURL=index.cjs.map
|