nuclo 0.2.22 → 0.2.23

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,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../Element-DXd2npjS.cjs");var t=class{nodeType=3;nodeName=`#text`;data;textContent;parentNode=null;constructor(e){this.data=e,this.textContent=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e,this.textContent=e}},n=class{nodeType=11;nodeName=`#document-fragment`;childNodes=[];children=[];textContent=``;get firstChild(){return this.childNodes.length>0?this.childNodes[0]:null}get lastChild(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}appendChild(e){return this.childNodes.push(e),e.nodeType===1&&this.children.push(e),e.parentNode=this,e}insertBefore(e,t){if(!t)return this.appendChild(e);let n=this.childNodes.indexOf(t);if(n!==-1&&(this.childNodes.splice(n,0,e),e.nodeType===1)){let n=this.children.indexOf(t);n!==-1&&this.children.splice(n,0,e)}return e.parentNode=this,e}removeChild(e){let t=this.childNodes.indexOf(e);if(t!==-1&&this.childNodes.splice(t,1),e.nodeType===1){let t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}return e.parentNode=null,e}replaceChild(e,t){let n=this.childNodes.indexOf(t);if(n!==-1&&(this.childNodes[n]=e,t.nodeType===1&&e.nodeType===1)){let n=this.children.indexOf(t);n!==-1&&(this.children[n]=e)}return e.parentNode=this,t.parentNode=null,e}querySelector(){return null}querySelectorAll(){return[]}},r=class{head;body;_listeners;constructor(){this.head=new e.t(`head`),this.body=new e.t(`body`),this._listeners=new Map}createElement(t,n){return new e.t(t)}createElementNS(t,n,r){let i=new e.t(n);return i.namespaceURI=t,i}createTextNode(e){return new t(e)}createComment(e){return{nodeType:8,nodeName:`#comment`,data:e,textContent:e,nodeValue:e,parentNode:null,nextSibling:null,previousSibling:null}}createDocumentFragment(){return new n}querySelector(e){if(e.startsWith(`#`)){let t=e.slice(1);if(t===`nuclo-styles`&&this.head.children){for(let e of this.head.children)if(e.id===t)return e}}return null}querySelectorAll(e){return[]}addEventListener(e,t,n){this._listeners.has(e)||this._listeners.set(e,new Map),this._listeners.get(e).set(t,{listener:t,options:n})}removeEventListener(e,t,n){let r=this._listeners.get(e);r&&(r.delete(t),r.size===0&&this._listeners.delete(e))}dispatchEvent(e){let t=this._listeners.get(e.type);if(t){let n=Array.from(t.values());for(let t=0;t<n.length;t++){let{listener:r}=n[t];try{r(e)}catch(e){console.error(`Error in event listener:`,e)}}}return!0}contains(e){return!1}};const i=globalThis.document||new r;var a=class{type;bubbles;cancelable;composed;currentTarget=null;defaultPrevented=!1;eventPhase=0;isTrusted=!1;target=null;timeStamp;AT_TARGET=2;BUBBLING_PHASE=3;CAPTURING_PHASE=1;NONE=0;returnValue=!0;srcElement=null;cancelBubble=!1;constructor(e,t){this.type=e,this.bubbles=t?.bubbles||!1,this.cancelable=t?.cancelable||!1,this.composed=t?.composed||!1,this.timeStamp=Date.now()}composedPath(){return[]}initEvent(e,t,n){}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.cancelBubble=!0}stopPropagation(){this.cancelBubble=!0}},o=class extends a{detail;constructor(e,t){super(e,t),this.detail=t?.detail}initCustomEvent(e,t,n,r){}};const s=globalThis.Event||a,c=globalThis.CustomEvent||o,l=e.n,u=e.t,d=e.t;if(typeof window>`u`&&typeof globalThis<`u`){let t=globalThis;t.document||=i,t.Event||=s,t.CustomEvent||=c,t.Node||=e.n,t.Element||=e.t,t.HTMLElement||=e.t}exports.CustomEvent=c,exports.Element=u,exports.Event=s,exports.HTMLElement=d,exports.Node=l,exports.NucloCustomEvent=o,exports.NucloDocument=r,exports.NucloElement=e.t,exports.NucloEvent=a,exports.NucloNode=e.n,exports.NucloText=t,exports.document=i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../Element-DGs_V4AO.cjs");var t=class{nodeType=3;nodeName=`#text`;data;textContent;parentNode=null;constructor(e){this.data=e,this.textContent=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e,this.textContent=e}},n=class{nodeType=11;nodeName=`#document-fragment`;childNodes=[];children=[];textContent=``;get firstChild(){return this.childNodes.length>0?this.childNodes[0]:null}get lastChild(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}appendChild(e){return this.childNodes.push(e),e.nodeType===1&&this.children.push(e),e.parentNode=this,e}insertBefore(e,t){if(!t)return this.appendChild(e);let n=this.childNodes.indexOf(t);if(n!==-1&&(this.childNodes.splice(n,0,e),e.nodeType===1)){let n=this.children.indexOf(t);n!==-1&&this.children.splice(n,0,e)}return e.parentNode=this,e}removeChild(e){let t=this.childNodes.indexOf(e);if(t!==-1&&this.childNodes.splice(t,1),e.nodeType===1){let t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}return e.parentNode=null,e}replaceChild(e,t){let n=this.childNodes.indexOf(t);if(n!==-1&&(this.childNodes[n]=e,t.nodeType===1&&e.nodeType===1)){let n=this.children.indexOf(t);n!==-1&&(this.children[n]=e)}return e.parentNode=this,t.parentNode=null,e}querySelector(){return null}querySelectorAll(){return[]}},r=class{head;body;_listeners;constructor(){this.head=new e.t(`head`),this.body=new e.t(`body`),this._listeners=new Map}createElement(t,n){return new e.t(t)}createElementNS(t,n,r){let i=new e.t(n);return i.namespaceURI=t,i}createTextNode(e){return new t(e)}createComment(e){return{nodeType:8,nodeName:`#comment`,data:e,textContent:e,nodeValue:e,parentNode:null,nextSibling:null,previousSibling:null}}createDocumentFragment(){return new n}querySelector(e){if(e.startsWith(`#`)){let t=e.slice(1);if(t===`nuclo-styles`&&this.head.children){for(let e of this.head.children)if(e.id===t)return e}}return null}querySelectorAll(e){return[]}addEventListener(e,t,n){this._listeners.has(e)||this._listeners.set(e,new Map),this._listeners.get(e).set(t,{listener:t,options:n})}removeEventListener(e,t,n){let r=this._listeners.get(e);r&&(r.delete(t),r.size===0&&this._listeners.delete(e))}dispatchEvent(e){let t=this._listeners.get(e.type);if(t){let n=Array.from(t.values());for(let t=0;t<n.length;t++){let{listener:r}=n[t];try{r(e)}catch(e){console.error(`Error in event listener:`,e)}}}return!0}contains(e){return!1}};const i=globalThis.document||new r;var a=class{type;bubbles;cancelable;composed;currentTarget=null;defaultPrevented=!1;eventPhase=0;isTrusted=!1;target=null;timeStamp;AT_TARGET=2;BUBBLING_PHASE=3;CAPTURING_PHASE=1;NONE=0;returnValue=!0;srcElement=null;cancelBubble=!1;constructor(e,t){this.type=e,this.bubbles=t?.bubbles||!1,this.cancelable=t?.cancelable||!1,this.composed=t?.composed||!1,this.timeStamp=Date.now()}composedPath(){return[]}initEvent(e,t,n){}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.cancelBubble=!0}stopPropagation(){this.cancelBubble=!0}},o=class extends a{detail;constructor(e,t){super(e,t),this.detail=t?.detail}initCustomEvent(e,t,n,r){}};const s=globalThis.Event||a,c=globalThis.CustomEvent||o,l=e.n,u=e.t,d=e.t;if(typeof window>`u`&&typeof globalThis<`u`){let t=globalThis;t.document||=i,t.Event||=s,t.CustomEvent||=c,t.Node||=e.n,t.Element||=e.t,t.HTMLElement||=e.t}exports.CustomEvent=c,exports.Element=u,exports.Event=s,exports.HTMLElement=d,exports.Node=l,exports.NucloCustomEvent=o,exports.NucloDocument=r,exports.NucloElement=e.t,exports.NucloEvent=a,exports.NucloNode=e.n,exports.NucloText=t,exports.document=i;
2
2
  //# sourceMappingURL=nuclo.polyfill.cjs.map
@@ -1,2 +1,2 @@
1
- import{n as e,t}from"../Element-C3mU75-a.mjs";var n=class{nodeType=3;nodeName=`#text`;data;textContent;parentNode=null;constructor(e){this.data=e,this.textContent=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e,this.textContent=e}},r=class{nodeType=11;nodeName=`#document-fragment`;childNodes=[];children=[];textContent=``;get firstChild(){return this.childNodes.length>0?this.childNodes[0]:null}get lastChild(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}appendChild(e){return this.childNodes.push(e),e.nodeType===1&&this.children.push(e),e.parentNode=this,e}insertBefore(e,t){if(!t)return this.appendChild(e);let n=this.childNodes.indexOf(t);if(n!==-1&&(this.childNodes.splice(n,0,e),e.nodeType===1)){let n=this.children.indexOf(t);n!==-1&&this.children.splice(n,0,e)}return e.parentNode=this,e}removeChild(e){let t=this.childNodes.indexOf(e);if(t!==-1&&this.childNodes.splice(t,1),e.nodeType===1){let t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}return e.parentNode=null,e}replaceChild(e,t){let n=this.childNodes.indexOf(t);if(n!==-1&&(this.childNodes[n]=e,t.nodeType===1&&e.nodeType===1)){let n=this.children.indexOf(t);n!==-1&&(this.children[n]=e)}return e.parentNode=this,t.parentNode=null,e}querySelector(){return null}querySelectorAll(){return[]}},i=class{head;body;_listeners;constructor(){this.head=new t(`head`),this.body=new t(`body`),this._listeners=new Map}createElement(e,n){return new t(e)}createElementNS(e,n,r){let i=new t(n);return i.namespaceURI=e,i}createTextNode(e){return new n(e)}createComment(e){return{nodeType:8,nodeName:`#comment`,data:e,textContent:e,nodeValue:e,parentNode:null,nextSibling:null,previousSibling:null}}createDocumentFragment(){return new r}querySelector(e){if(e.startsWith(`#`)){let t=e.slice(1);if(t===`nuclo-styles`&&this.head.children){for(let e of this.head.children)if(e.id===t)return e}}return null}querySelectorAll(e){return[]}addEventListener(e,t,n){this._listeners.has(e)||this._listeners.set(e,new Map),this._listeners.get(e).set(t,{listener:t,options:n})}removeEventListener(e,t,n){let r=this._listeners.get(e);r&&(r.delete(t),r.size===0&&this._listeners.delete(e))}dispatchEvent(e){let t=this._listeners.get(e.type);if(t){let n=Array.from(t.values());for(let t=0;t<n.length;t++){let{listener:r}=n[t];try{r(e)}catch(e){console.error(`Error in event listener:`,e)}}}return!0}contains(e){return!1}};const a=globalThis.document||new i;var o=class{type;bubbles;cancelable;composed;currentTarget=null;defaultPrevented=!1;eventPhase=0;isTrusted=!1;target=null;timeStamp;AT_TARGET=2;BUBBLING_PHASE=3;CAPTURING_PHASE=1;NONE=0;returnValue=!0;srcElement=null;cancelBubble=!1;constructor(e,t){this.type=e,this.bubbles=t?.bubbles||!1,this.cancelable=t?.cancelable||!1,this.composed=t?.composed||!1,this.timeStamp=Date.now()}composedPath(){return[]}initEvent(e,t,n){}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.cancelBubble=!0}stopPropagation(){this.cancelBubble=!0}},s=class extends o{detail;constructor(e,t){super(e,t),this.detail=t?.detail}initCustomEvent(e,t,n,r){}};const c=globalThis.Event||o,l=globalThis.CustomEvent||s,u=e,d=t,f=t;if(typeof window>`u`&&typeof globalThis<`u`){let n=globalThis;n.document||=a,n.Event||=c,n.CustomEvent||=l,n.Node||=e,n.Element||=t,n.HTMLElement||=t}export{l as CustomEvent,d as Element,c as Event,f as HTMLElement,u as Node,s as NucloCustomEvent,i as NucloDocument,t as NucloElement,o as NucloEvent,e as NucloNode,n as NucloText,a as document};
1
+ import{n as e,t}from"../Element-COo4x_Sd.mjs";var n=class{nodeType=3;nodeName=`#text`;data;textContent;parentNode=null;constructor(e){this.data=e,this.textContent=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e,this.textContent=e}},r=class{nodeType=11;nodeName=`#document-fragment`;childNodes=[];children=[];textContent=``;get firstChild(){return this.childNodes.length>0?this.childNodes[0]:null}get lastChild(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}appendChild(e){return this.childNodes.push(e),e.nodeType===1&&this.children.push(e),e.parentNode=this,e}insertBefore(e,t){if(!t)return this.appendChild(e);let n=this.childNodes.indexOf(t);if(n!==-1&&(this.childNodes.splice(n,0,e),e.nodeType===1)){let n=this.children.indexOf(t);n!==-1&&this.children.splice(n,0,e)}return e.parentNode=this,e}removeChild(e){let t=this.childNodes.indexOf(e);if(t!==-1&&this.childNodes.splice(t,1),e.nodeType===1){let t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}return e.parentNode=null,e}replaceChild(e,t){let n=this.childNodes.indexOf(t);if(n!==-1&&(this.childNodes[n]=e,t.nodeType===1&&e.nodeType===1)){let n=this.children.indexOf(t);n!==-1&&(this.children[n]=e)}return e.parentNode=this,t.parentNode=null,e}querySelector(){return null}querySelectorAll(){return[]}},i=class{head;body;_listeners;constructor(){this.head=new t(`head`),this.body=new t(`body`),this._listeners=new Map}createElement(e,n){return new t(e)}createElementNS(e,n,r){let i=new t(n);return i.namespaceURI=e,i}createTextNode(e){return new n(e)}createComment(e){return{nodeType:8,nodeName:`#comment`,data:e,textContent:e,nodeValue:e,parentNode:null,nextSibling:null,previousSibling:null}}createDocumentFragment(){return new r}querySelector(e){if(e.startsWith(`#`)){let t=e.slice(1);if(t===`nuclo-styles`&&this.head.children){for(let e of this.head.children)if(e.id===t)return e}}return null}querySelectorAll(e){return[]}addEventListener(e,t,n){this._listeners.has(e)||this._listeners.set(e,new Map),this._listeners.get(e).set(t,{listener:t,options:n})}removeEventListener(e,t,n){let r=this._listeners.get(e);r&&(r.delete(t),r.size===0&&this._listeners.delete(e))}dispatchEvent(e){let t=this._listeners.get(e.type);if(t){let n=Array.from(t.values());for(let t=0;t<n.length;t++){let{listener:r}=n[t];try{r(e)}catch(e){console.error(`Error in event listener:`,e)}}}return!0}contains(e){return!1}};const a=globalThis.document||new i;var o=class{type;bubbles;cancelable;composed;currentTarget=null;defaultPrevented=!1;eventPhase=0;isTrusted=!1;target=null;timeStamp;AT_TARGET=2;BUBBLING_PHASE=3;CAPTURING_PHASE=1;NONE=0;returnValue=!0;srcElement=null;cancelBubble=!1;constructor(e,t){this.type=e,this.bubbles=t?.bubbles||!1,this.cancelable=t?.cancelable||!1,this.composed=t?.composed||!1,this.timeStamp=Date.now()}composedPath(){return[]}initEvent(e,t,n){}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.cancelBubble=!0}stopPropagation(){this.cancelBubble=!0}},s=class extends o{detail;constructor(e,t){super(e,t),this.detail=t?.detail}initCustomEvent(e,t,n,r){}};const c=globalThis.Event||o,l=globalThis.CustomEvent||s,u=e,d=t,f=t;if(typeof window>`u`&&typeof globalThis<`u`){let n=globalThis;n.document||=a,n.Event||=c,n.CustomEvent||=l,n.Node||=e,n.Element||=t,n.HTMLElement||=t}export{l as CustomEvent,d as Element,c as Event,f as HTMLElement,u as Node,s as NucloCustomEvent,i as NucloDocument,t as NucloElement,o as NucloEvent,e as NucloNode,n as NucloText,a as document};
2
2
  //# sourceMappingURL=nuclo.polyfill.mjs.map
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../Element-DXd2npjS.cjs");function t(e){let t=0;for(;t<e.length;t++){let n=e.charCodeAt(t);if(n>=65&&n<=90)break}if(t===e.length)return e;let n=e.slice(0,t);for(let r=t;r<e.length;r++){let t=e.charCodeAt(r);t>=65&&t<=90?(r>0&&(n+=`-`),n+=String.fromCharCode(t+32)):n+=e[r]}return n}const n=/[&<>"']/,r=/[&<>]/;function i(e){let t=n.exec(e);if(!t)return e;let r=``,i=0;for(let n=t.index;n<e.length;n++){let t;switch(e.charCodeAt(n)){case 38:t=`&amp;`;break;case 60:t=`&lt;`;break;case 62:t=`&gt;`;break;case 34:t=`&quot;`;break;case 39:t=`&#039;`;break;default:continue}r+=e.slice(i,n)+t,i=n+1}return r+e.slice(i)}function a(e){let t=r.exec(e);if(!t)return e;let n=``,i=0;for(let r=t.index;r<e.length;r++){let t;switch(e.charCodeAt(r)){case 38:t=`&amp;`;break;case 60:t=`&lt;`;break;case 62:t=`&gt;`;break;default:continue}n+=e.slice(i,r)+t,i=r+1}return n+e.slice(i)}const o=new Set;typeof FinalizationRegistry<`u`&&new FinalizationRegistry(e=>{o.delete(e)});function s(e){return globalThis.document?document.createElement(e):null}let c=!1;function l(e){let t=c;c=!0;try{return e()}finally{c=t}}const u=new Set(`viewBox.preserveAspectRatio.markerWidth.markerHeight.gradientTransform.patternTransform.clipPathUnits.gradientUnits.patternUnits.pathLength.refX.refY.stdDeviation.baseFrequency.numOctaves.kernelMatrix.tableValues.targetX.targetY.specularExponent.specularConstant.diffuseConstant.surfaceScale.xChannelSelector.yChannelSelector.edgeMode.stitchTiles.spreadMethod.patternContentUnits.markerUnits.startOffset.textLength.lengthAdjust`.split(`.`)),d=new Set([`allowfullscreen`,`async`,`autofocus`,`autoplay`,`checked`,`controls`,`default`,`defer`,`disabled`,`formnovalidate`,`hidden`,`ismap`,`loop`,`multiple`,`muted`,`nomodule`,`novalidate`,`open`,`readonly`,`required`,`reversed`,`selected`]);function f(e,n){if(n==null||n===!1)return``;if(n===!0)return` ${e}`;if(d.has(e)){if(n===`false`)return``;if(n===`true`||n===``||n===e)return` ${e}`}if(e===`style`&&typeof n==`object`){let e=``;for(let r in n){let i=n[r];i!=null&&i!==``&&(e+=(e?` `:``)+t(r)+`: `+String(i)+`;`)}return e?` style="${i(e)}"`:``}return` ${e}="${i(String(n))}"`}function p(e,n){let r=``;if(n){let n=e,a=n._attributes;n.id&&!a?.has(`id`)&&(r+=f(`id`,n.id)),n.className&&!a?.has(`class`)&&(r+=f(`class`,n.className));let o=n._style;if(!a?.has(`style`)&&o){let e=o.cssText||``;if(e){let n=e.split(`;`).map(e=>e.trim()).filter(Boolean).map(e=>{let n=e.indexOf(`:`);if(n===-1)return e;let r=e.slice(0,n).trim(),i=e.slice(n+1).trim();return i?`${t(r)}: ${i};`:``}).filter(Boolean).join(` `);n&&(r+=` style="${i(n)}"`)}}if(a)for(let[e,n]of a){let i=u.has(e)?e:t(e);r+=f(i,n)}return r}if(e.attributes&&e.attributes.length)for(let t=0;t<e.attributes.length;t++){let n=e.attributes[t];n&&n.name&&(r+=f(n.name,n.value))}return r}const m=Object.assign(Object.create(null),{area:1,base:1,br:1,col:1,embed:1,hr:1,img:1,input:1,link:1,meta:1,param:1,source:1,track:1,wbr:1,script:2,style:2});function h(e,t){return t.replace(RegExp(`</(`+e+`)`,`gi`),`<\\/$1`)}function g(e){if(`tagName`in e&&`children`in e){let t=e.children;if(Array.isArray(t))return t}if(`childNodes`in e){let t=e.childNodes;if(t&&(Array.isArray(t)||t.length!==void 0))return t}return[]}function _(t){if(t.nodeType===3)return a(t.textContent||``);if(t.nodeType===8)return`<!--${t.textContent||``}-->`;if(t.nodeType===1){let n=t,r=n.tagName,i=Array.isArray(n.children),o=n instanceof e.t?r:r.toLowerCase(),s=p(n,i),c=m[o];if(c===1)return`<${o}${s} />`;let l=i?n.children:g(n);if(c===2){let e=``,n=l;if(n&&n.length>0)for(let t=0;t<n.length;t++){let r=n[t];r&&r.nodeType===3&&(e+=r.textContent||``)}else{let n=t.textContent;typeof n==`string`&&(e=n)}return`<${o}${s}>${h(o,e)}</${o}>`}let u=``;if(l&&l.length>0)for(let e=0;e<l.length;e++){let t=l[e];t&&(u+=_(t))}else{let e=t.textContent;typeof e==`string`&&e&&(u=a(e))}return`<${o}${s}>${u}</${o}>`}if(t.nodeType===11){let e=``,n=g(t);if(n&&n.length>0)for(let t=0;t<n.length;t++){let r=n[t];r&&(e+=_(r))}return e}return``}function v(e){if(!e)return``;if(typeof e==`function`)try{let t=l(()=>{let t=s(`div`);if(!t)throw Error(`Document is not available. Make sure polyfills are loaded.`);return e(t,0)});return t&&typeof t==`object`&&`nodeType`in t?_(t):``}catch(e){return console.error(`Error rendering component to string:`,e),``}return`nodeType`in e?_(e):``}function y(e){return e.map(e=>v(e))}function b(e,t=`div`,n={}){let r=v(e);return`<${t}${Object.entries(n).map(([e,t])=>f(e,t)).join(``)}>${r}</${t}>`}function x(e){}const S=[],C=new Map;let w=null;function T(){if(w!==null)return w;let e=S.join(``);for(let[t,n]of C)n.length>0&&(e+=t+`{`+n.join(``)+`}`);return w=e,e}exports.getCssText=T,exports.renderManyToString=y,exports.renderToString=v,exports.renderToStringWithContainer=b,exports.setSSRCollector=x;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../Element-DGs_V4AO.cjs");function t(e){let t=0;for(;t<e.length;t++){let n=e.charCodeAt(t);if(n>=65&&n<=90)break}if(t===e.length)return e;let n=e.slice(0,t);for(let r=t;r<e.length;r++){let t=e.charCodeAt(r);t>=65&&t<=90?(r>0&&(n+=`-`),n+=String.fromCharCode(t+32)):n+=e[r]}return n}const n=/[&<>"']/,r=/[&<>]/;function i(e){let t=n.exec(e);if(!t)return e;let r=``,i=0;for(let n=t.index;n<e.length;n++){let t;switch(e.charCodeAt(n)){case 38:t=`&amp;`;break;case 60:t=`&lt;`;break;case 62:t=`&gt;`;break;case 34:t=`&quot;`;break;case 39:t=`&#039;`;break;default:continue}r+=e.slice(i,n)+t,i=n+1}return r+e.slice(i)}function a(e){let t=r.exec(e);if(!t)return e;let n=``,i=0;for(let r=t.index;r<e.length;r++){let t;switch(e.charCodeAt(r)){case 38:t=`&amp;`;break;case 60:t=`&lt;`;break;case 62:t=`&gt;`;break;default:continue}n+=e.slice(i,r)+t,i=r+1}return n+e.slice(i)}const o=new Set;typeof FinalizationRegistry<`u`&&new FinalizationRegistry(e=>{o.delete(e)});function s(e){return globalThis.document?document.createElement(e):null}let c=!1;function l(e){let t=c;c=!0;try{return e()}finally{c=t}}const u=new Set(`viewBox.preserveAspectRatio.markerWidth.markerHeight.gradientTransform.patternTransform.clipPathUnits.gradientUnits.patternUnits.pathLength.refX.refY.stdDeviation.baseFrequency.numOctaves.kernelMatrix.tableValues.targetX.targetY.specularExponent.specularConstant.diffuseConstant.surfaceScale.xChannelSelector.yChannelSelector.edgeMode.stitchTiles.spreadMethod.patternContentUnits.markerUnits.startOffset.textLength.lengthAdjust`.split(`.`)),d=new Set([`allowfullscreen`,`async`,`autofocus`,`autoplay`,`checked`,`controls`,`default`,`defer`,`disabled`,`formnovalidate`,`hidden`,`ismap`,`loop`,`multiple`,`muted`,`nomodule`,`novalidate`,`open`,`readonly`,`required`,`reversed`,`selected`]);function f(e,n){if(n==null||n===!1)return``;if(n===!0)return` ${e}`;if(d.has(e)){if(n===`false`)return``;if(n===`true`||n===``||n===e)return` ${e}`}if(e===`style`&&typeof n==`object`){let e=``;for(let r in n){let i=n[r];i!=null&&i!==``&&(e+=(e?` `:``)+t(r)+`: `+String(i)+`;`)}return e?` style="${i(e)}"`:``}return` ${e}="${i(String(n))}"`}function p(e,n){let r=``;if(n){let n=e,a=n._attributes;n.id&&!a?.has(`id`)&&(r+=f(`id`,n.id)),n.className&&!a?.has(`class`)&&(r+=f(`class`,n.className));let o=n._style;if(!a?.has(`style`)&&o){let e=o.cssText||``;if(e){let n=e.split(`;`).map(e=>e.trim()).filter(Boolean).map(e=>{let n=e.indexOf(`:`);if(n===-1)return e;let r=e.slice(0,n).trim(),i=e.slice(n+1).trim();return i?`${t(r)}: ${i};`:``}).filter(Boolean).join(` `);n&&(r+=` style="${i(n)}"`)}}if(a)for(let[e,n]of a){let i=u.has(e)?e:t(e);r+=f(i,n)}return r}if(e.attributes&&e.attributes.length)for(let t=0;t<e.attributes.length;t++){let n=e.attributes[t];n&&n.name&&(r+=f(n.name,n.value))}return r}const m=Object.assign(Object.create(null),{area:1,base:1,br:1,col:1,embed:1,hr:1,img:1,input:1,link:1,meta:1,param:1,source:1,track:1,wbr:1,script:2,style:2});function h(e,t){return t.replace(RegExp(`</(`+e+`)`,`gi`),`<\\/$1`)}function g(e){if(`tagName`in e&&`children`in e){let t=e.children;if(Array.isArray(t))return t}if(`childNodes`in e){let t=e.childNodes;if(t&&(Array.isArray(t)||t.length!==void 0))return t}return[]}function _(t){if(t.nodeType===3)return a(t.textContent||``);if(t.nodeType===8)return`<!--${t.textContent||``}-->`;if(t.nodeType===1){let n=t,r=n.tagName,i=Array.isArray(n.children),o=n instanceof e.t?r:r.toLowerCase(),s=p(n,i),c=m[o];if(c===1)return`<${o}${s} />`;let l=i?n.children:g(n);if(c===2){let e=``,n=l;if(n&&n.length>0)for(let t=0;t<n.length;t++){let r=n[t];r&&r.nodeType===3&&(e+=r.textContent||``)}else{let n=t.textContent;typeof n==`string`&&(e=n)}return`<${o}${s}>${h(o,e)}</${o}>`}let u=``;if(l&&l.length>0)for(let e=0;e<l.length;e++){let t=l[e];t&&(u+=_(t))}else{let e=t.textContent;typeof e==`string`&&e&&(u=a(e))}return`<${o}${s}>${u}</${o}>`}if(t.nodeType===11){let e=``,n=g(t);if(n&&n.length>0)for(let t=0;t<n.length;t++){let r=n[t];r&&(e+=_(r))}return e}return``}function v(e){if(!e)return``;if(typeof e==`function`)try{let t=l(()=>{let t=s(`div`);if(!t)throw Error(`Document is not available. Make sure polyfills are loaded.`);return e(t,0)});return t&&typeof t==`object`&&`nodeType`in t?_(t):``}catch(e){return console.error(`Error rendering component to string:`,e),``}return`nodeType`in e?_(e):``}function y(e){return e.map(e=>v(e))}function b(e,t=`div`,n={}){let r=v(e);return`<${t}${Object.entries(n).map(([e,t])=>f(e,t)).join(``)}>${r}</${t}>`}function x(e){}const S=[],C=new Map;let w=null;function T(){if(w!==null)return w;let e=S.join(``);for(let[t,n]of C)n.length>0&&(e+=t+`{`+n.join(``)+`}`);return w=e,e}exports.getCssText=T,exports.renderManyToString=y,exports.renderToString=v,exports.renderToStringWithContainer=b,exports.setSSRCollector=x;
2
2
  //# sourceMappingURL=nuclo.ssr.cjs.map
@@ -1,2 +1,2 @@
1
- import{t as e}from"../Element-C3mU75-a.mjs";function t(e){let t=0;for(;t<e.length;t++){let n=e.charCodeAt(t);if(n>=65&&n<=90)break}if(t===e.length)return e;let n=e.slice(0,t);for(let r=t;r<e.length;r++){let t=e.charCodeAt(r);t>=65&&t<=90?(r>0&&(n+=`-`),n+=String.fromCharCode(t+32)):n+=e[r]}return n}const n=/[&<>"']/,r=/[&<>]/;function i(e){let t=n.exec(e);if(!t)return e;let r=``,i=0;for(let n=t.index;n<e.length;n++){let t;switch(e.charCodeAt(n)){case 38:t=`&amp;`;break;case 60:t=`&lt;`;break;case 62:t=`&gt;`;break;case 34:t=`&quot;`;break;case 39:t=`&#039;`;break;default:continue}r+=e.slice(i,n)+t,i=n+1}return r+e.slice(i)}function a(e){let t=r.exec(e);if(!t)return e;let n=``,i=0;for(let r=t.index;r<e.length;r++){let t;switch(e.charCodeAt(r)){case 38:t=`&amp;`;break;case 60:t=`&lt;`;break;case 62:t=`&gt;`;break;default:continue}n+=e.slice(i,r)+t,i=r+1}return n+e.slice(i)}const o=new Set;typeof FinalizationRegistry<`u`&&new FinalizationRegistry(e=>{o.delete(e)});function s(e){return globalThis.document?document.createElement(e):null}let c=!1;function l(e){let t=c;c=!0;try{return e()}finally{c=t}}const u=new Set(`viewBox.preserveAspectRatio.markerWidth.markerHeight.gradientTransform.patternTransform.clipPathUnits.gradientUnits.patternUnits.pathLength.refX.refY.stdDeviation.baseFrequency.numOctaves.kernelMatrix.tableValues.targetX.targetY.specularExponent.specularConstant.diffuseConstant.surfaceScale.xChannelSelector.yChannelSelector.edgeMode.stitchTiles.spreadMethod.patternContentUnits.markerUnits.startOffset.textLength.lengthAdjust`.split(`.`)),d=new Set([`allowfullscreen`,`async`,`autofocus`,`autoplay`,`checked`,`controls`,`default`,`defer`,`disabled`,`formnovalidate`,`hidden`,`ismap`,`loop`,`multiple`,`muted`,`nomodule`,`novalidate`,`open`,`readonly`,`required`,`reversed`,`selected`]);function f(e,n){if(n==null||n===!1)return``;if(n===!0)return` ${e}`;if(d.has(e)){if(n===`false`)return``;if(n===`true`||n===``||n===e)return` ${e}`}if(e===`style`&&typeof n==`object`){let e=``;for(let r in n){let i=n[r];i!=null&&i!==``&&(e+=(e?` `:``)+t(r)+`: `+String(i)+`;`)}return e?` style="${i(e)}"`:``}return` ${e}="${i(String(n))}"`}function p(e,n){let r=``;if(n){let n=e,a=n._attributes;n.id&&!a?.has(`id`)&&(r+=f(`id`,n.id)),n.className&&!a?.has(`class`)&&(r+=f(`class`,n.className));let o=n._style;if(!a?.has(`style`)&&o){let e=o.cssText||``;if(e){let n=e.split(`;`).map(e=>e.trim()).filter(Boolean).map(e=>{let n=e.indexOf(`:`);if(n===-1)return e;let r=e.slice(0,n).trim(),i=e.slice(n+1).trim();return i?`${t(r)}: ${i};`:``}).filter(Boolean).join(` `);n&&(r+=` style="${i(n)}"`)}}if(a)for(let[e,n]of a){let i=u.has(e)?e:t(e);r+=f(i,n)}return r}if(e.attributes&&e.attributes.length)for(let t=0;t<e.attributes.length;t++){let n=e.attributes[t];n&&n.name&&(r+=f(n.name,n.value))}return r}const m=Object.assign(Object.create(null),{area:1,base:1,br:1,col:1,embed:1,hr:1,img:1,input:1,link:1,meta:1,param:1,source:1,track:1,wbr:1,script:2,style:2});function h(e,t){return t.replace(RegExp(`</(`+e+`)`,`gi`),`<\\/$1`)}function g(e){if(`tagName`in e&&`children`in e){let t=e.children;if(Array.isArray(t))return t}if(`childNodes`in e){let t=e.childNodes;if(t&&(Array.isArray(t)||t.length!==void 0))return t}return[]}function _(t){if(t.nodeType===3)return a(t.textContent||``);if(t.nodeType===8)return`<!--${t.textContent||``}-->`;if(t.nodeType===1){let n=t,r=n.tagName,i=Array.isArray(n.children),o=n instanceof e?r:r.toLowerCase(),s=p(n,i),c=m[o];if(c===1)return`<${o}${s} />`;let l=i?n.children:g(n);if(c===2){let e=``,n=l;if(n&&n.length>0)for(let t=0;t<n.length;t++){let r=n[t];r&&r.nodeType===3&&(e+=r.textContent||``)}else{let n=t.textContent;typeof n==`string`&&(e=n)}return`<${o}${s}>${h(o,e)}</${o}>`}let u=``;if(l&&l.length>0)for(let e=0;e<l.length;e++){let t=l[e];t&&(u+=_(t))}else{let e=t.textContent;typeof e==`string`&&e&&(u=a(e))}return`<${o}${s}>${u}</${o}>`}if(t.nodeType===11){let e=``,n=g(t);if(n&&n.length>0)for(let t=0;t<n.length;t++){let r=n[t];r&&(e+=_(r))}return e}return``}function v(e){if(!e)return``;if(typeof e==`function`)try{let t=l(()=>{let t=s(`div`);if(!t)throw Error(`Document is not available. Make sure polyfills are loaded.`);return e(t,0)});return t&&typeof t==`object`&&`nodeType`in t?_(t):``}catch(e){return console.error(`Error rendering component to string:`,e),``}return`nodeType`in e?_(e):``}function y(e){return e.map(e=>v(e))}function b(e,t=`div`,n={}){let r=v(e);return`<${t}${Object.entries(n).map(([e,t])=>f(e,t)).join(``)}>${r}</${t}>`}function x(e){}const S=[],C=new Map;let w=null;function T(){if(w!==null)return w;let e=S.join(``);for(let[t,n]of C)n.length>0&&(e+=t+`{`+n.join(``)+`}`);return w=e,e}export{T as getCssText,y as renderManyToString,v as renderToString,b as renderToStringWithContainer,x as setSSRCollector};
1
+ import{t as e}from"../Element-COo4x_Sd.mjs";function t(e){let t=0;for(;t<e.length;t++){let n=e.charCodeAt(t);if(n>=65&&n<=90)break}if(t===e.length)return e;let n=e.slice(0,t);for(let r=t;r<e.length;r++){let t=e.charCodeAt(r);t>=65&&t<=90?(r>0&&(n+=`-`),n+=String.fromCharCode(t+32)):n+=e[r]}return n}const n=/[&<>"']/,r=/[&<>]/;function i(e){let t=n.exec(e);if(!t)return e;let r=``,i=0;for(let n=t.index;n<e.length;n++){let t;switch(e.charCodeAt(n)){case 38:t=`&amp;`;break;case 60:t=`&lt;`;break;case 62:t=`&gt;`;break;case 34:t=`&quot;`;break;case 39:t=`&#039;`;break;default:continue}r+=e.slice(i,n)+t,i=n+1}return r+e.slice(i)}function a(e){let t=r.exec(e);if(!t)return e;let n=``,i=0;for(let r=t.index;r<e.length;r++){let t;switch(e.charCodeAt(r)){case 38:t=`&amp;`;break;case 60:t=`&lt;`;break;case 62:t=`&gt;`;break;default:continue}n+=e.slice(i,r)+t,i=r+1}return n+e.slice(i)}const o=new Set;typeof FinalizationRegistry<`u`&&new FinalizationRegistry(e=>{o.delete(e)});function s(e){return globalThis.document?document.createElement(e):null}let c=!1;function l(e){let t=c;c=!0;try{return e()}finally{c=t}}const u=new Set(`viewBox.preserveAspectRatio.markerWidth.markerHeight.gradientTransform.patternTransform.clipPathUnits.gradientUnits.patternUnits.pathLength.refX.refY.stdDeviation.baseFrequency.numOctaves.kernelMatrix.tableValues.targetX.targetY.specularExponent.specularConstant.diffuseConstant.surfaceScale.xChannelSelector.yChannelSelector.edgeMode.stitchTiles.spreadMethod.patternContentUnits.markerUnits.startOffset.textLength.lengthAdjust`.split(`.`)),d=new Set([`allowfullscreen`,`async`,`autofocus`,`autoplay`,`checked`,`controls`,`default`,`defer`,`disabled`,`formnovalidate`,`hidden`,`ismap`,`loop`,`multiple`,`muted`,`nomodule`,`novalidate`,`open`,`readonly`,`required`,`reversed`,`selected`]);function f(e,n){if(n==null||n===!1)return``;if(n===!0)return` ${e}`;if(d.has(e)){if(n===`false`)return``;if(n===`true`||n===``||n===e)return` ${e}`}if(e===`style`&&typeof n==`object`){let e=``;for(let r in n){let i=n[r];i!=null&&i!==``&&(e+=(e?` `:``)+t(r)+`: `+String(i)+`;`)}return e?` style="${i(e)}"`:``}return` ${e}="${i(String(n))}"`}function p(e,n){let r=``;if(n){let n=e,a=n._attributes;n.id&&!a?.has(`id`)&&(r+=f(`id`,n.id)),n.className&&!a?.has(`class`)&&(r+=f(`class`,n.className));let o=n._style;if(!a?.has(`style`)&&o){let e=o.cssText||``;if(e){let n=e.split(`;`).map(e=>e.trim()).filter(Boolean).map(e=>{let n=e.indexOf(`:`);if(n===-1)return e;let r=e.slice(0,n).trim(),i=e.slice(n+1).trim();return i?`${t(r)}: ${i};`:``}).filter(Boolean).join(` `);n&&(r+=` style="${i(n)}"`)}}if(a)for(let[e,n]of a){let i=u.has(e)?e:t(e);r+=f(i,n)}return r}if(e.attributes&&e.attributes.length)for(let t=0;t<e.attributes.length;t++){let n=e.attributes[t];n&&n.name&&(r+=f(n.name,n.value))}return r}const m=Object.assign(Object.create(null),{area:1,base:1,br:1,col:1,embed:1,hr:1,img:1,input:1,link:1,meta:1,param:1,source:1,track:1,wbr:1,script:2,style:2});function h(e,t){return t.replace(RegExp(`</(`+e+`)`,`gi`),`<\\/$1`)}function g(e){if(`tagName`in e&&`children`in e){let t=e.children;if(Array.isArray(t))return t}if(`childNodes`in e){let t=e.childNodes;if(t&&(Array.isArray(t)||t.length!==void 0))return t}return[]}function _(t){if(t.nodeType===3)return a(t.textContent||``);if(t.nodeType===8)return`<!--${t.textContent||``}-->`;if(t.nodeType===1){let n=t,r=n.tagName,i=Array.isArray(n.children),o=n instanceof e?r:r.toLowerCase(),s=p(n,i),c=m[o];if(c===1)return`<${o}${s} />`;let l=i?n.children:g(n);if(c===2){let e=``,n=l;if(n&&n.length>0)for(let t=0;t<n.length;t++){let r=n[t];r&&r.nodeType===3&&(e+=r.textContent||``)}else{let n=t.textContent;typeof n==`string`&&(e=n)}return`<${o}${s}>${h(o,e)}</${o}>`}let u=``;if(l&&l.length>0)for(let e=0;e<l.length;e++){let t=l[e];t&&(u+=_(t))}else{let e=t.textContent;typeof e==`string`&&e&&(u=a(e))}return`<${o}${s}>${u}</${o}>`}if(t.nodeType===11){let e=``,n=g(t);if(n&&n.length>0)for(let t=0;t<n.length;t++){let r=n[t];r&&(e+=_(r))}return e}return``}function v(e){if(!e)return``;if(typeof e==`function`)try{let t=l(()=>{let t=s(`div`);if(!t)throw Error(`Document is not available. Make sure polyfills are loaded.`);return e(t,0)});return t&&typeof t==`object`&&`nodeType`in t?_(t):``}catch(e){return console.error(`Error rendering component to string:`,e),``}return`nodeType`in e?_(e):``}function y(e){return e.map(e=>v(e))}function b(e,t=`div`,n={}){let r=v(e);return`<${t}${Object.entries(n).map(([e,t])=>f(e,t)).join(``)}>${r}</${t}>`}function x(e){}const S=[],C=new Map;let w=null;function T(){if(w!==null)return w;let e=S.join(``);for(let[t,n]of C)n.length>0&&(e+=t+`{`+n.join(``)+`}`);return w=e,e}export{T as getCssText,y as renderManyToString,v as renderToString,b as renderToStringWithContainer,x as setSSRCollector};
2
2
  //# sourceMappingURL=nuclo.ssr.mjs.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuclo",
3
3
  "private": false,
4
- "version": "0.2.22",
4
+ "version": "0.2.23",
5
5
  "description": "Lightweight, type-safe DOM library with plain mutable state and explicit updates — global tag builders, SSR, hydration, and typed CSS, no virtual DOM, no compiler.",
6
6
  "license": "MIT",
7
7
  "author": "Danilo Celestino de Castro (https://github.com/dan2dev)",