vite-plugin-nscriptcss 1.0.0 → 1.0.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.
package/dist/index.js CHANGED
@@ -1,10 +1,78 @@
1
- /* © NScriptCSS Engine - Proprietary Protected Binary */
2
- const _0xstr = ["\x3a", "\x40\x73\x74\x61\x74\x65", "\x40\x6a\x73", "\x73\x74\x61\x74\x65\x2e", "\x75\x73\x65\x72\x4a\x73\x2e", "\x20", "\x2c\x5c\x6e\x20\x20\x20\x20", "\x75\x6e\x64\x65\x66\x69\x6e\x65\x64", "\x73\x74\x79\x6c\x65\x2d", "\x26a1\x20\x5b\x4e\x53\x63\x72\x69\x70\x74\x43\x53\x53\x20\x48\x4d\x52\x5d\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x65\x20\x61\x63\x74\x75\x61\x6c\x69\x7a\x61\x64\x6f\x3a", "\x2e\x6e\x73\x63\x73\x73", "\x2e\x6e\x63\x73\x73", "\x66\x75\x6c\x6c\x2d\x72\x65\x6c\x6f\x61\x64", "", "\x5c\x6e", "\x3c\x64\x69\x76\x3e\x3c\x2f\x64\x69\x76\x3e", "\x2c", "\x24\x7b\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x49\x64\x7d", "\x2c\x20", "\x3b"];
3
- (function(_0xa, _0xb) {
4
- const _0xrot = function(_0xc) { while (--_0xc) { _0xa['push'](_0xa['shift']()); } };
5
- _0xrot(++_0xb);
6
- })(_0xstr, 0x7);
7
- function _0xget(_0xi) { return _0xstr[_0xi - 0x0]; }
8
- function _0xtamper() { return (function(){}).constructor("return this")(); }
9
-
10
- function compileNScript(code,id){const _0xa0_fh6p=`ncss-${Math.abs(_0xb0_nt8a(id))}` let _0xac_0xg4=_0xget(0x0) const _0xad_7spi=[...code.matchAll(/@js\s*\{([\s\S]*?)\}/g)] for (const m of _0xad_7spi){_0xac_0xg4+=m[1]+_0xget(0x1)}const cleanCodeNoMulti=code.replace(/@js\s*\{([\s\S]*?)\}/g,_0xget(0x0)) const _0xae_u2g7=[ ...cleanCodeNoMulti.matchAll(/@js\s+([^\n{][^\n]*)/g),] for (const m of _0xae_u2g7){_0xac_0xg4+=m[1]+_0xget(0x1)}let remainingCode=cleanCodeNoMulti.replace(/@js\s+([^\n{][^\n]*)/g,_0xget(0x0)) const _0xaa_1pbs=[ ...remainingCode.matchAll(/@state\s+([a-zA-Z0-9_]+)\s*=\s*([^;]+);/g),] const _0xa1_a4jf={}for (const match of _0xaa_1pbs){_0xa1_a4jf[match[1]]=match[2].trim()}const _0xab_ehyg=remainingCode.match(/@template\s*\{([\s\S]*?)\n\}/) const _0xa2_gaao=_0xab_ehyg ? _0xab_ehyg[1].trim():_0xget(0x2) remainingCode=remainingCode .replace(/@state[\s\S]*?;/g,_0xget(0x0)) .replace(/@template\s*\{[\s\S]*?\n\}/g,_0xget(0x0)) let _0xa4_bcvv=_0xget(0x0) const _0xa3_zz3m=[] const _0xa6_r3m0=/([^{]+)\{([^}]+)\}/g let blockMatch while ((blockMatch=_0xa6_r3m0.exec(remainingCode)) !==null){const rawSelector=blockMatch[1].trim() const body=blockMatch[2] const scopedSelector=rawSelector .split(_0xget(0x3)) .map((s)=>`${s.trim()}[data-ncss=_0xget(0x4)]`) .join(_0xget(0x5)) const onMatches=[...body.matchAll(/@on\s+([a-zA-Z]+)\s*\{([\s\S]*?)\}/g)] const events=onMatches.map((m)=>({event:m[1].trim(),code:m[2].trim(),})) const _0xa7_n7r5=body.replace(/@on\s+([a-zA-Z]+)\s*\{[\s\S]*?\}/g,_0xget(0x0)) const _0xa8_rsxx=_0xa7_n7r5 .split(_0xget(0x6)) .map((l)=>l.trim()) .filter(Boolean) const _0xa9_wyw4=[] const staticProps=[] for (const line of _0xa8_rsxx){const colonIdx=line.indexOf(_0xget(0x7)) if (colonIdx===-1) continue const prop=line.substring(0,colonIdx).trim() const valExpr=line.substring(colonIdx+1).trim() if (valExpr.includes(_0xget(0x8)) || valExpr.includes(_0xget(0x9))){const parsedExpr=valExpr .replace(/@state\./g,_0xget(0xa)) .replace(/@js\./g,_0xget(0xb)) _0xa9_wyw4.push({prop,expr:parsedExpr})}else{staticProps.push(`${prop}:${valExpr};`)}}if (staticProps.length>0){_0xa4_bcvv+=`${scopedSelector}{${staticProps.join(_0xget(0xc))}}\n`}if (_0xa9_wyw4.length>0 || events.length>0){_0xa3_zz3m.push({selector:scopedSelector,_0xa9_wyw4,events})}}const stateKeys=Object.keys(_0xa1_a4jf) const stateInitCode=stateKeys .map((k)=>`${k}:${_0xa1_a4jf[k]}`) .join(_0xget(0xd)) const generatedJs=` import{createNScriptRuntime}from 'vite-plugin-nscriptcss/runtime';const userJs=(function(){const exports={};${_0xac_0xg4}return{...exports,...(typeof formatCount !==_0xget(0xe) ?{formatCount}:{}),...((function(){try{return{${_0xaf_z189(_0xac_0xg4)}};}catch(e){return{};}})())};})();export const _0xa0_fh6p=${JSON.stringify(_0xa0_fh6p)};export const _0xa4_bcvv=${JSON.stringify(_0xa4_bcvv)};export const _0xa2_gaao=${JSON.stringify(_0xa2_gaao)};export const _0xa3_zz3m=${JSON.stringify(_0xa3_zz3m)};export function createInstance(options={}){const initialState={${stateInitCode}};return createNScriptRuntime({_0xa0_fh6p,initialState,_0xa2_gaao,_0xa3_zz3m,_0xa4_bcvv,userJs});}const defaultInstance={mount(target){const inst=createInstance();return inst.mount(target);}};export default defaultInstance;if (import.meta.hot){import.meta.hot.accept((newModule)=>{if (newModule){const existingStyle=document.getElementById(_0xget(0xf)+_0xa0_fh6p);if (existingStyle){existingStyle.textContent=newModule._0xa4_bcvv;}console.log(_0xget(0x10),_0xa0_fh6p);}});}` return{code:generatedJs,css:_0xa4_bcvv,}}function _0xb0_nt8a(str){let hash=0 for (let i=0;i<str.length;i++){hash=(hash<<5)-hash+str.charCodeAt(i) hash |=0}return hash}function _0xaf_z189(jsCode){const matches=[ ...jsCode.matchAll(/(?:const|let|var|function)\s+([a-zA-Z0-9_]+)/g),] return matches.map((m)=>m[1]).join(_0xget(0x5))}export function nscriptcss(options={}){return{name:"vite-plugin-nscriptcss",enforce:"pre",transform(code,id){if (!id.endsWith(_0xget(0x11)) && !id.endsWith(_0xget(0x12))){return null}try{const{code:compiledJs}=compileNScript(code,id) return{code:compiledJs,map:null,}}catch (err){this.error(`[NScriptCSS Compiler Error] en ${id}:${err.message}`)}},handleHotUpdate({file,server}){if (file.endsWith(_0xget(0x11)) || file.endsWith(_0xget(0x12))){server.ws.send({type:_0xget(0x13)})}},}}export default nscriptcss
1
+ /* © NScriptCSS Proprietary Binary */
2
+ const _0xarr=["\x73\x74\x61\x74\x65\x2e\x24\x31","\x75\x73\x65\x72\x4a\x73\x2e\x24\x31","\x20","\x73\x74\x61\x74\x65\x2e","\x75\x73\x65\x72\x4a\x73\x2e","\x73\x74\x79\x6c\x65\x2d","\x3c\x64\x69\x76\x3e\x3c\x2f\x64\x69\x76\x3e","\x2f","\x2a","\x7b","\x3b","\x3d","\x40\x74\x65\x6d\x70\x6c\x61\x74\x65","\x22","\x27","\x60","\x5c\x5c","\x7d","\x3a","\x2e\x6e\x73\x63\x73\x73","\x2e\x6e\x63\x73\x73","\x66\x75\x6c\x6c\x2d\x72\x65\x6c\x6f\x61\x64","\x2c","\x24\x7b\x6e\x7d","\x2c\x20","\x40\x73\x74\x61\x74\x65","\x40\x6a\x73"];
3
+ (function(_0xa,_0xb){const _0xr=function(_0xc){while(--_0xc){_0xa.push(_0xa.shift());}};_0xr(++_0xb);})(_0xarr,0x5);
4
+ function _0xstr(_0xi){return _0xarr[_0xi-0x0];}
5
+ function j(e,s){const n=`ncss-${Math.abs(N(s))}`,i=A(e),a=i.userJs,t=i.state,r=i.template,c=i.css;let p="";const h=[],g=b(c);for(const o of g){const l=o.selector.split(_0xstr(0x0)).map(f=>`${f.trim()}[data-ncss=_0xstr(0x1)]`).join(_0xstr(0x2)),d=[],x=[];for(const f of o.properties)if(f.value.includes(_0xstr(0x3))||f.value.includes(_0xstr(0x4))){const w=f.value.replace(/@state\.([a-zA-Z0-9_]+)/g,_0xstr(0x5)).replace(/@js\.([a-zA-Z0-9_]+)/g,_0xstr(0x6)),I=S(f.value);d.push({prop:f.name,exprCode:`(state, userJs) => (${w})`,deps:I})}else x.push(`${f.name}: ${f.value};`);x.length>0&&(p+=`${l} { ${x.join(_0xstr(0x7))} }
6
+ `),(d.length>0||o.events.length>0)&&h.push({selector:l,dynamicProps:d,events:o.events})}const u=[];let m=0;const $=r.replace(/@state\.([a-zA-Z0-9_]+(?:\s*\?\s*[^:]+\s*:\s*[^<\n]+)?)|@js\.([a-zA-Z0-9_]+(?:\([^)]*\))?)/g,o=>{const l=`<!--ncss-binding-${m}-->`,d=o.replace(/@state\.([a-zA-Z0-9_]+)/g,_0xstr(0x5)).replace(/@js\.([a-zA-Z0-9_]+)/g,_0xstr(0x6));return u.push({index:m,exprCode:`(state, userJs) => (${d})`,deps:S(o)}),m++,l}),J=Object.keys(t).map(o=>`${o}: ${t[o]}`).join(`,
7
+ `),v=h.map(o=>`{
8
+ selector: ${JSON.stringify(o.selector)},
9
+ dynamicProps: [${o.dynamicProps.map(l=>`{ prop: ${JSON.stringify(l.prop)}, fn: ${l.exprCode}, deps: ${JSON.stringify(l.deps)} }`).join(_0xstr(0x2))}],
10
+ events: [${o.events.map(l=>`{ event: ${JSON.stringify(l.event)}, fn: (state, userJs, event) => { ${l.code.replace(/@state\./g,_0xstr(0x8)).replace(/@js\./g,_0xstr(0x9))} } }`).join(_0xstr(0x2))}]
11
+ }`).join(`,
12
+ `),C=u.map(o=>`{
13
+ index: ${o.index},
14
+ fn: ${o.exprCode},
15
+ deps: ${JSON.stringify(o.deps)}
16
+ }`).join(`,
17
+ `);return{code:`
18
+ import { createNScriptRuntime } from 'vite-plugin-nscriptcss/runtime';
19
+
20
+ // C\xF3digo JS definido en @js (Aislado en closure)
21
+ const userJs = (function() {
22
+ const exports = {};
23
+ ${a}
24
+ return { ...exports, ...((function() {
25
+ try { return { ${k(a)} }; } catch(e) { return {}; }
26
+ })()) };
27
+ })();
28
+
29
+ export const componentId = ${JSON.stringify(n)};
30
+ export const staticCss = ${JSON.stringify(p)};
31
+ export const rawTemplate = ${JSON.stringify($)};
32
+
33
+ // Reglas y suscripciones compiladas AOT (Cero eval en runtime)
34
+ export const dynamicRules = [
35
+ ${v}
36
+ ];
37
+ export const templateBindings = [
38
+ ${C}
39
+ ];
40
+
41
+ export function createInstance(options = {}) {
42
+ const initialState = {
43
+ ${J}
44
+ };
45
+
46
+ return createNScriptRuntime({
47
+ componentId,
48
+ initialState,
49
+ rawTemplate,
50
+ dynamicRules,
51
+ templateBindings,
52
+ staticCss,
53
+ userJs
54
+ });
55
+ }
56
+
57
+ const defaultInstance = {
58
+ mount(target) {
59
+ const inst = createInstance();
60
+ return inst.mount(target);
61
+ }
62
+ };
63
+ export default defaultInstance;
64
+
65
+ if (import.meta.hot) {
66
+ import.meta.hot.accept((newModule) => {
67
+ if (newModule) {
68
+ const existingStyle = document.getElementById(_0xstr(0xa) + componentId);
69
+ if (existingStyle) existingStyle.textContent = newModule.staticCss;
70
+ }
71
+ });
72
+ }
73
+ `,css:p}}function A(e){let s="",n=_0xstr(0xb);const i={};let a="",t=0;const r=e.length;for(;t<r;){if(e[t]===_0xstr(0xc)&&e[t+1]===_0xstr(0xc)){for(;t<r&&e[t]!==`
74
+ `;)t++;continue}if(e[t]===_0xstr(0xc)&&e[t+1]===_0xstr(0xd)){for(t+=2;t<r&&!(e[t]===_0xstr(0xd)&&e[t+1]===_0xstr(0xc));)t++;t+=2;continue}if(e.startsWith(_0xstr(0x4),t)){for(t+=3;t<r&&/\s/.test(e[t])&&e[t]!==_0xstr(0xe)&&e[t]!==`
75
+ `;)t++;if(e[t]===_0xstr(0xe)){const c=y(e,t);s+=c.content+`
76
+ `,t=c.endIndex}else{let c="";for(;t<r&&e[t]!==`
77
+ `;)c+=e[t],t++;s+=c.trim()+`
78
+ `}continue}if(e.startsWith(_0xstr(0x3),t)){t+=6;let c="";for(;t<r&&e[t]!==_0xstr(0xf);)c+=e[t],t++;t++;const p=c.split(_0xstr(0x10));p.length===2&&(i[p[0].trim()]=p[1].trim());continue}if(e.startsWith(_0xstr(0x11),t)){for(t+=9;t<r&&e[t]!==_0xstr(0xe);)t++;const c=y(e,t);n=c.content.trim(),t=c.endIndex;continue}a+=e[t],t++}return{userJs:s,state:i,template:n,css:a}}function y(e,s){let n=0,i=null,a=-1;for(let t=s;t<e.length;t++){const r=e[t];if(!i&&(r===_0xstr(0x12)||r===_0xstr(0x13)||r===_0xstr(0x14))){i=r;continue}if(i&&r===i&&e[t-1]!==_0xstr(0x15)){i=null;continue}if(!i){if(r===_0xstr(0xe))n++,n===1&&(a=t+1);else if(r===_0xstr(0x16)&&(n--,n===0))return{content:e.substring(a,t),endIndex:t+1}}}return{content:"",endIndex:e.length}}function b(e){const s=[];let n=0;const i=e.length;for(;n<i;){if(/\s/.test(e[n])){n++;continue}let a="";for(;n<i&&e[n]!==_0xstr(0xe);)a+=e[n],n++;if(n>=i)break;const t=y(e,n);n=t.endIndex;const r=t.content,c=[],p=[],g=r.replace(/@on\s+([a-zA-Z]+)\s*\{([\s\S]*?)\}/g,(u,m,$)=>(p.push({event:m.trim(),code:$.trim()}),"")).split(_0xstr(0xf)).map(u=>u.trim()).filter(Boolean);for(const u of g){const m=u.indexOf(_0xstr(0x17));m!==-1&&c.push({name:u.substring(0,m).trim(),value:u.substring(m+1).trim()})}a.trim()&&s.push({selector:a.trim(),properties:c,events:p})}return s}function S(e){const s=[...e.matchAll(/@state\.([a-zA-Z0-9_]+)/g)];return[...new Set(s.map(n=>n[1]))]}function N(e){let s=0;for(let n=0;n<e.length;n++)s=(s<<5)-s+e.charCodeAt(n),s|=0;return s}function k(e){return[...e.matchAll(/(?:const|let|var|function)\s+([a-zA-Z0-9_]+)/g)].map(n=>n[1]).join(_0xstr(0x2))}function B(e={}){return{name:"vite-plugin-nscriptcss",enforce:"pre",transform(s,n){if(!n.endsWith(_0xstr(0x18))&&!n.endsWith(_0xstr(0x19)))return null;try{const{code:i}=j(s,n);return{code:i,map:null}}catch(i){this.error(`[NScriptCSS Compiler Error] en ${n}: ${i.message}`)}},handleHotUpdate({file:s,server:n}){(s.endsWith(_0xstr(0x18))||s.endsWith(_0xstr(0x19)))&&n.ws.send({type:_0xstr(0x1a)})}}}var Z=B;export{Z as default,B as nscriptcss};
package/dist/runtime.js CHANGED
@@ -1,10 +1,5 @@
1
- /* © NScriptCSS Engine - Proprietary Protected Binary */
2
- const _0xstr = ["\x65\x76\x65\x6e\x74", "\x73\x74\x72\x69\x6e\x67", "\x64\x69\x76", "\x64\x61\x74\x61\x2d\x6e\x63\x73\x73", "\x2a", "\x73\x74\x79\x6c\x65\x2d", "\x73\x74\x79\x6c\x65", "\x73\x74\x61\x74\x65", "\x75\x73\x65\x72\x4a\x73", "\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74", "", "\x73\x74\x61\x74\x65\x2e", "\x75\x73\x65\x72\x4a\x73\x2e"];
3
- (function(_0xa, _0xb) {
4
- const _0xrot = function(_0xc) { while (--_0xc) { _0xa['push'](_0xa['shift']()); } };
5
- _0xrot(++_0xb);
6
- })(_0xstr, 0x8);
7
- function _0xget(_0xi) { return _0xstr[_0xi - 0x0]; }
8
- function _0xtamper() { return (function(){}).constructor("return this")(); }
9
-
10
- export function createNScriptRuntime({_0xa0_w2n9,initialState,_0xa2_4250,_0xa3_toqn,_0xa4_bgk8,userJs,}){let _0xb1_t5w1=null let state={...initialState}let _0xb2_q4uv=null let styleTag=document.getElementById(_0xget(0x0)+_0xa0_w2n9) if (!styleTag){styleTag=document.createElement(_0xget(0x1)) styleTag.id=_0xget(0x0)+_0xa0_w2n9 document.head.appendChild(styleTag)}styleTag.textContent=_0xa4_bgk8 function render(root){for (const rule of _0xa3_toqn){const elements=root.querySelectorAll(rule.selector) for (const dyn of rule._0xa9_55zm){try{const evalFn=new Function( _0xget(0x2),_0xget(0x3),`_0xget(0x4);return (${dyn.expr});`,) const val=evalFn(state,userJs) elements.forEach((el)=>{el.style[_0xb5_u9d1(dyn.prop)]=val})}catch (e){}}}const textNodes=_0xb4_pvnq(root) for (const node of textNodes){if (!node._tpl) node._tpl=node.nodeValue let text=node._tpl text=text.replace(/@state\.([a-zA-Z0-9_]+(?:\s*\?\s*[^:]+\s*:\s*[^;\n]+)?)/g,(_,match)=>{try{return new Function( _0xget(0x2),_0xget(0x3),`_0xget(0x4);return (${match});`,)(state,userJs)}catch{return _0xget(0x5)}},) text=text.replace(/@js\.([a-zA-Z0-9_]+(?:\([^)]*\))?)/g,(_,match)=>{try{return new Function( _0xget(0x3),`_0xget(0x4);return userJs.${match};`,)(userJs)}catch{return _0xget(0x5)}}) if (node.nodeValue !==text) node.nodeValue=text}}function _0xb3_2r0x(root){for (const rule of _0xa3_toqn){if (!rule.events) continue const elements=root.querySelectorAll(rule.selector) elements.forEach((el)=>{for (const evt of rule.events){el.addEventListener(evt.event,(e)=>{try{const code=evt.code .replace(/@state\./g,_0xget(0x6)) .replace(/@js\./g,_0xget(0x7)) const run=new Function( _0xget(0x2),_0xget(0x3),_0xget(0x8),`_0xget(0x4);\n${code}`,) run(_0xb2_q4uv,userJs,e)}catch (err){console.error(`Error ejecutando @on ${evt.event}:`,err)}})}})}}return{mount(targetSelectorOrEl){const target=typeof targetSelectorOrEl===_0xget(0x9) ? document.querySelector(targetSelectorOrEl):targetSelectorOrEl if (!target) throw new Error( `[NScriptCSS] No se encontró el contenedor:${targetSelectorOrEl}`,) const wrapper=document.createElement(_0xget(0xa)) wrapper.setAttribute(_0xget(0xb),_0xa0_w2n9) wrapper.innerHTML=_0xa2_4250 wrapper .querySelectorAll(_0xget(0xc)) .forEach((el)=>el.setAttribute(_0xget(0xb),_0xa0_w2n9)) _0xb1_t5w1=wrapper target.appendChild(wrapper) _0xb2_q4uv=new Proxy(state,{set(t,p,v){t[p]=v render(_0xb1_t5w1) return true},}) _0xb3_2r0x(_0xb1_t5w1) render(_0xb1_t5w1) return{state:_0xb2_q4uv,unmount(){if (_0xb1_t5w1) _0xb1_t5w1.remove()},}},}}function _0xb5_u9d1(str){return str.replace(/-([a-z])/g,(g)=>g[1].toUpperCase())}function _0xb4_pvnq(node){let list=[] if (node.nodeType===3) list.push(node) else node.childNodes.forEach((c)=>(list=list.concat(_0xb4_pvnq(c)))) return list}
1
+ /* © NScriptCSS Proprietary Binary */
2
+ const _0xarr=["\x2a","\x6e\x63\x73\x73\x2d\x62\x69\x6e\x64\x69\x6e\x67\x2d","\x73\x74\x79\x6c\x65\x2d","\x73\x74\x79\x6c\x65","\x73\x74\x72\x69\x6e\x67","\x64\x69\x76","\x64\x61\x74\x61\x2d\x6e\x63\x73\x73"];
3
+ (function(_0xa,_0xb){const _0xr=function(_0xc){while(--_0xc){_0xa.push(_0xa.shift());}};_0xr(++_0xb);})(_0xarr,0x5);
4
+ function _0xstr(_0xi){return _0xarr[_0xi-0x0];}
5
+ function M({componentId:c,initialState:p,rawTemplate:x,dynamicRules:g,templateBindings:b,staticCss:w,userJs:m}){let h=null;const v={...p};let a=null;const d=new Map;function N(o,i){d.has(o)||d.set(o,new Set),d.get(o).add(i)}function S(o){d.has(o)&&d.get(o).forEach(i=>i())}let l=document.getElementById(_0xstr(0x0)+c);return l||(l=document.createElement(_0xstr(0x1)),l.id=_0xstr(0x0)+c,document.head.appendChild(l)),l.textContent=w,{mount(o){const i=typeof o==_0xstr(0x2)?document.querySelector(o):o;if(!i)throw new Error(`[NScriptCSS] Contenedor no encontrado: ${o}`);const s=document.createElement(_0xstr(0x3));s.setAttribute(_0xstr(0x4),c),s.innerHTML=x,s.querySelectorAll(_0xstr(0x5)).forEach(e=>e.setAttribute(_0xstr(0x4),c)),h=s,i.appendChild(s),a=new Proxy(v,{set(e,n,t){return e[n]===t||(e[n]=t,S(n)),!0}});for(const e of g){const n=s.querySelectorAll(e.selector);for(const t of e.dynamicProps){const r=()=>{const u=t.fn(a,m),E=A(t.prop);for(let y=0;y<n.length;y++)n[y].style[E]=u};r();for(const u of t.deps)N(u,r)}for(const t of e.events)for(let r=0;r<n.length;r++)n[r].addEventListener(t.event,u=>{t.fn(a,m,u)})}const T=document.createTreeWalker(s,NodeFilter.SHOW_COMMENT),C=[];let f;for(;f=T.nextNode();){const e=f.nodeValue;if(e.startsWith(_0xstr(0x6))){const n=parseInt(e.replace(_0xstr(0x6),"")),t=document.createTextNode("");f.parentNode.replaceChild(t,f),C[n]=t}}for(const e of b){const n=C[e.index];if(!n)continue;const t=()=>{n.nodeValue=e.fn(a,m)};t();for(const r of e.deps)N(r,t)}return{state:a,unmount(){d.clear(),h&&h.remove()}}}}}function A(c){return c.replace(/-([a-z])/g,p=>p[1].toUpperCase())}export{M as createNScriptRuntime};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-nscriptcss",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Compilador en tiempo real e integrador de Vite para Nexus Script Cascade Style Sheets (.nscss)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",