notjs-react 0.4.0 → 0.4.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"NotJS.d.ts","sourceRoot":"","sources":["../src/NotJS.tsx"],"names":[],"mappings":"AAGA,OAAO,4BAA4B,CAAA;AAgGnC,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,2CA0pBZ"}
1
+ {"version":3,"file":"NotJS.d.ts","sourceRoot":"","sources":["../src/NotJS.tsx"],"names":[],"mappings":"AAGA,OAAO,4BAA4B,CAAA;AAgGnC,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,2CA4pBZ"}
package/dist/index.cjs CHANGED
@@ -162,7 +162,7 @@ func main() {
162
162
  `),T.send(N.current+`
163
163
  `),N.current=""):z===""?((te=R.current)==null||te.write(`^C\r
164
164
  `),N.current=""):(N.current+=z,(ie=R.current)==null||ie.write(z)))})},J=(T,q)=>{navigator.clipboard.writeText(T).then(()=>{q==="code"?(w(!0),setTimeout(()=>w(!1),2e3)):(D(!0),setTimeout(()=>D(!1),2e3))})},M=()=>{if(R.current){const T=R.current.buffer.active;let q="";for(let z=0;z<T.length;z++){const X=T.getLine(z);X&&(q+=X.translateToString(!0)+`
165
- `)}J(q,"console")}},x=()=>{C(T=>!T),_?document.documentElement.classList.remove("dark"):document.documentElement.classList.add("dark")};V.useEffect(()=>{_&&document.documentElement.classList.add("dark")},[]),V.useEffect(()=>{L(i)},[]);const K=T=>{T.preventDefault(),H(!0)};return V.useEffect(()=>{const T=z=>{if(!F||!Y.current)return;const ee=Y.current.getBoundingClientRect(),te=(z.clientX-ee.left)/ee.width*100;te>=20&&te<=80&&L(te)},q=()=>{H(!1)};return F&&(document.addEventListener("mousemove",T),document.addEventListener("mouseup",q),document.body.style.cursor="col-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",q),document.body.style.cursor="",document.body.style.userSelect=""}},[F]),V.useEffect(()=>{R.current&&I.current&&setTimeout(()=>{if(I.current&&R.current){const T=I.current.getBoundingClientRect(),q=Math.floor((T.width-20)/9),z=Math.floor((T.height-20)/17);R.current.resize(q,z)}},10)},[O]),j===!1?G.jsx("div",{className:"flex flex-col items-center justify-center h-screen w-screen bg-neutral-50 dark:bg-neutral-950 p-8",children:G.jsx("div",{className:"max-w-2xl w-full border-2 border-red-500 rounded-2xl p-8 bg-white dark:bg-neutral-900",children:G.jsxs("div",{className:"flex items-start gap-4",children:[G.jsx(Go,{className:"w-8 h-8 text-red-500 flex-shrink-0 mt-1"}),G.jsxs("div",{children:[G.jsx("h2",{className:"text-2xl font-bold text-red-600 dark:text-red-500 mb-3",children:"NotJS Configuration Error"}),G.jsx("p",{className:"text-red-700 dark:text-red-400 text-lg leading-relaxed",children:U})]})]})})}):j===null?G.jsx("div",{className:"flex flex-col items-center justify-center h-screen w-screen bg-neutral-50 dark:bg-neutral-950",children:G.jsx("div",{className:"text-neutral-600 dark:text-neutral-400 text-lg",children:"Loading NotJS..."})}):G.jsxs(Uo,{delayDuration:200,children:[G.jsx("style",{children:`
165
+ `)}J(q,"console")}},x=()=>{C(T=>!T),_?document.documentElement.classList.remove("dark"):document.documentElement.classList.add("dark")};V.useEffect(()=>{_?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},[]),V.useEffect(()=>{L(i)},[]);const K=T=>{T.preventDefault(),H(!0)};return V.useEffect(()=>{const T=z=>{if(!F||!Y.current)return;const ee=Y.current.getBoundingClientRect(),te=(z.clientX-ee.left)/ee.width*100;te>=20&&te<=80&&L(te)},q=()=>{H(!1)};return F&&(document.addEventListener("mousemove",T),document.addEventListener("mouseup",q),document.body.style.cursor="col-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",q),document.body.style.cursor="",document.body.style.userSelect=""}},[F]),V.useEffect(()=>{R.current&&I.current&&setTimeout(()=>{if(I.current&&R.current){const T=I.current.getBoundingClientRect(),q=Math.floor((T.width-20)/9),z=Math.floor((T.height-20)/17);R.current.resize(q,z)}},10)},[O]),j===!1?G.jsx("div",{className:"flex flex-col items-center justify-center h-screen w-screen bg-neutral-50 dark:bg-neutral-950 p-8",children:G.jsx("div",{className:"max-w-2xl w-full border-2 border-red-500 rounded-2xl p-8 bg-white dark:bg-neutral-900",children:G.jsxs("div",{className:"flex items-start gap-4",children:[G.jsx(Go,{className:"w-8 h-8 text-red-500 flex-shrink-0 mt-1"}),G.jsxs("div",{children:[G.jsx("h2",{className:"text-2xl font-bold text-red-600 dark:text-red-500 mb-3",children:"NotJS Configuration Error"}),G.jsx("p",{className:"text-red-700 dark:text-red-400 text-lg leading-relaxed",children:U})]})]})})}):j===null?G.jsx("div",{className:"flex flex-col items-center justify-center h-screen w-screen bg-neutral-50 dark:bg-neutral-950",children:G.jsx("div",{className:"text-neutral-600 dark:text-neutral-400 text-lg",children:"Loading NotJS..."})}):G.jsxs(Uo,{delayDuration:200,children:[G.jsx("style",{children:`
166
166
  /* Custom scrollbar for xterm terminal */
167
167
  .xterm-viewport::-webkit-scrollbar {
168
168
  width: 12px;