From 995f1557bf55ada85ddb06fc0b84e3122fbd88d6 Mon Sep 17 00:00:00 2001 From: natxocc Date: Tue, 28 Apr 2026 17:33:51 +0200 Subject: [PATCH] Correct error Tags --- dist/sigpro.js | 2 +- dist/sigpro.min.js | 2 +- docs/sigpro-full.js | 2 +- package.json | 2 +- sigpro/tags.js | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dist/sigpro.js b/dist/sigpro.js index 3bf3388..bf76c8b 100644 --- a/dist/sigpro.js +++ b/dist/sigpro.js @@ -555,7 +555,7 @@ // sigpro/tags.js if (typeof window !== "undefined") { "a abbr article aside audio b blockquote br button canvas caption cite code col colgroup datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 header hr i iframe img input ins kbd label legend li main mark meter nav object ol optgroup option output p picture pre progress section select slot small source span strong sub summary sup svg table tbody td template textarea tfoot th thead time tr u ul video".split(" ").forEach((tag) => { - window[tag] = (props, children) => h(tag, props, children); + window[tag] = (...args) => h(tag, ...args); }); console.log("SigPro tags ready"); } diff --git a/dist/sigpro.min.js b/dist/sigpro.min.js index a1d99cd..53ba08e 100644 --- a/dist/sigpro.min.js +++ b/dist/sigpro.min.js @@ -1 +1 @@ -(()=>{var{defineProperty:L,getOwnPropertyNames:Q,getOwnPropertyDescriptor:H}=Object,Y=Object.prototype.hasOwnProperty;function Z(e){return this[e]}var ee=(e)=>{var t=(X??=new WeakMap).get(e),n;if(t)return t;if(t=L({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var s of Q(e))if(!Y.call(t,s))L(t,s,{get:Z.bind(e,s),enumerable:!(n=H(e,s))||n.enumerable})}return X.set(e,t),t},X;var te=(e)=>e;function ne(e,t){this[e]=te.bind(null,t)}var oe=(e,t)=>{for(var n in t)L(e,n,{get:t[n],enumerable:!0,configurable:!0,set:ne.bind(t,n)})};var ue={};oe(ue,{when:()=>D,watch:()=>v,router:()=>E,mount:()=>W,h:()=>b,filterXSS:()=>B,each:()=>G,batch:()=>I,$$:()=>j,$:()=>T});var w=(e)=>typeof e==="function",V=(e)=>e&&typeof e==="object",N=Array.isArray,S=typeof document<"u"?document:null,K=(e)=>e?._isRuntime?e.container:e instanceof Node?e:S.createTextNode(e==null?"":String(e)),d=null,_=null,A=!1,C=0,$=new Set,q=new WeakMap,P=Symbol("iter"),U=new WeakMap,se="http://www.w3.org/2000/svg",z="http://www.w3.org/1999/xlink",re=new Set("svg,path,circle,rect,line,polyline,polygon,g,defs,text,textPath,tspan,use,symbol,image,marker,ellipse".split(",")),x=null,B=(e)=>{x=e},g=(e)=>{if(!e||e._disposed)return;e._disposed=!0;let t=[e];while(t.length){let n=t.pop();if(n._cleanups)n._cleanups.forEach((s)=>s()),n._cleanups.clear();if(n._children)n._children.forEach((s)=>t.push(s)),n._children.clear();if(n._deps)n._deps.forEach((s)=>s.delete(n)),n._deps.clear()}},R=(e)=>{if(_)(_._cleanups||=new Set).add(e)},ce=(e)=>{let t=d;d=null;try{return e()}finally{d=t}},O=(e,t=!1)=>{let n=()=>{if(n._disposed)return;if(n._deps)n._deps.forEach((c)=>c.delete(n));if(n._cleanups)n._cleanups.forEach((c)=>c()),n._cleanups.clear();let s=d,r=_;d=_=n;try{return n._result=e()}catch(c){console.error("[SigPro]",c)}finally{d=s,_=r}};if(n._deps=n._cleanups=n._children=null,n._disposed=!1,n._isComputed=t,n._depth=d?d._depth+1:0,n._mounts=[],n._parent=_,_)(_._children||=new Set).add(n);return n},F=()=>{if(A)return;A=!0;let e=Array.from($).sort((t,n)=>t._depth-n._depth);$.clear();for(let t of e)if(!t._disposed)t();A=!1},I=(e)=>{C++;try{return e()}finally{if(C--,C===0&&$.size>0&&!A)F()}},m=(e,t=!1)=>{if(!t&&d&&!d._disposed)e.add(d),(d._deps||=new Set).add(e);else if(t&&e.size>0){let n=!1;for(let s of e){if(s===d||s._disposed)continue;if(s._isComputed){if(s._dirty=!0,s._subs)m(s._subs,!0)}else $.add(s),n=!0}if(n&&!A&&C===0)queueMicrotask(F)}},T=(e,t=null)=>{let n=new Set;if(w(e)){let s,r=()=>{if(r._dirty){let c=d;d=r;try{let o=e();if(!Object.is(s,o))s=o,m(n,!0)}finally{d=c}r._dirty=!1}return m(n),s};return r._isComputed=!0,r._subs=n,r._dirty=!0,r._deps=null,r._disposed=!1,r}if(t)try{e=JSON.parse(localStorage.getItem(t))??e}catch(s){}return(...s)=>{if(s.length){let r=w(s[0])?s[0](e):s[0];if(!Object.is(e,r)){if(e=r,t)localStorage.setItem(t,JSON.stringify(e));m(n,!0)}}return m(n),e}},j=(e)=>{if(!V(e))return e;let t=q.get(e);if(t)return t;let n=new Map,s=(c)=>{let o=n.get(c);if(!o)n.set(c,o=new Set);return o},r=new Proxy(e,{get(c,o,i){if(typeof o!=="symbol")m(s(o));return j(Reflect.get(c,o,i))},set(c,o,i,l){let u=Reflect.has(c,o),a=Reflect.get(c,o,l),f=Reflect.set(c,o,i,l);if(f&&!Object.is(a,i)){if(m(s(o),!0),!u)m(s(P),!0)}return f},deleteProperty(c,o){let i=Reflect.deleteProperty(c,o);if(i)m(s(o),!0),m(s(P),!0);return i},ownKeys(c){return m(s(P)),Reflect.ownKeys(c)}});return q.set(e,r),r},v=(e,t)=>{if(t===void 0){let s=O(e);return s(),()=>g(s)}let n=O(()=>{let s=Array.isArray(e)?e.map((r)=>r()):e();ce(()=>t(s))});return n(),()=>g(n)},M=(e)=>{if(!e)return;if(e._cleanups)e._cleanups.forEach((t)=>t()),e._cleanups.clear();if(e._ownerEffect)g(e._ownerEffect);if(e.childNodes)e.childNodes.forEach((t)=>M(t))},b=(e,t={},n=[])=>{if(t instanceof Node||N(t)||!V(t))n=t,t={};if(w(e)){let o=O(()=>{let a=e(t,{children:n,emit:(f,...h)=>t[`on${f[0].toUpperCase()}${f.slice(1)}`]?.(...h)});return o._result=a,a});o();let i=o._result;if(i==null)return null;let l=i instanceof Node||N(i)&&i.every((a)=>a instanceof Node)?i:S.createTextNode(String(i)),u=(a)=>{if(V(a)&&!a._isRuntime)a._mounts=o._mounts||[],a._cleanups=o._cleanups||new Set,a._ownerEffect=o};return N(l)?l.forEach(u):u(l),l}let s=re.has(e),r=s?S.createElementNS(se,e):S.createElement(e);r._cleanups=new Set;for(let o of Object.keys(t)){let i=t[o];if(o==="ref"){w(i)?i(r):i.current=r;continue}let l=x?x(o,i):i;if(s&&o.startsWith("xlink:")){l==null?r.removeAttributeNS(z,o.slice(6)):r.setAttributeNS(z,o.slice(6),l);continue}if(o.startsWith("on")){let u=o.slice(2).toLowerCase();r.addEventListener(u,l);let a=()=>r.removeEventListener(u,l);r._cleanups.add(a),R(a)}else if(w(l)){let u=O(()=>{let a=l(),f=x?x(o,a):a;if(o==="class")r.className=f||"";else if(f==null)r.removeAttribute(o);else if(o in r&&!s)r[o]=f;else r.setAttribute(o,f===!0?"":f)});if(u(),r._cleanups.add(()=>g(u)),R(()=>g(u)),/^(INPUT|TEXTAREA|SELECT)$/.test(r.tagName)&&(o==="value"||o==="checked")){let a=o==="checked"?"change":"input";r.addEventListener(a,(f)=>l(f.target[o]))}}else if(l!=null)if(o in r&&!s)r[o]=l;else r.setAttribute(o,l===!0?"":l)}let c=(o)=>{if(N(o))return o.forEach(c);if(w(o)){let i=S.createTextNode("");r.appendChild(i);let l=[],u=O(()=>{let a=o(),f=(N(a)?a:[a]).map(K);l.forEach((p)=>{if(p._isRuntime)p.destroy();else M(p);if(p.parentNode)p.remove()});let h=i;for(let p=f.length-1;p>=0;p--){let y=f[p];if(y.parentNode!==h.parentNode)h.parentNode?.insertBefore(y,h);if(y._mounts)y._mounts.forEach((J)=>J());h=y}l=f});u(),r._cleanups.add(()=>g(u)),R(()=>g(u))}else{let i=K(o);if(r.appendChild(i),i._mounts)i._mounts.forEach((l)=>l())}};return c(n),r},k=(e)=>{let t=new Set,n=_,s=d,r=S.createElement("div");r.style.display="contents",r.setAttribute("role","presentation"),_={_cleanups:t},d=null;let c=(o)=>{if(!o)return;if(o._isRuntime)t.add(o.destroy),r.appendChild(o.container);else if(N(o))o.forEach(c);else r.appendChild(o instanceof Node?o:S.createTextNode(String(o==null?"":o)))};try{c(e({onCleanup:(o)=>t.add(o)}))}finally{_=n,d=s}return{_isRuntime:!0,container:r,destroy:()=>{t.forEach((o)=>o()),M(r),r.remove()}}},D=(e,t,n=null)=>{let s=S.createTextNode(""),r=b("div",{style:"display:contents"},[s]),c=null;return v(()=>!!(w(e)?e():e),(o)=>{if(c)c.destroy(),c=null;let i=o?t:n;if(i)c=k(()=>w(i)?i():i),r.insertBefore(c.container,s)}),R(()=>c?.destroy()),r},G=(e,t,n)=>{let s=S.createTextNode(""),r=b("div",{style:"display:contents"},[s]),c=new Map;return v(()=>(w(e)?e():e)||[],(o)=>{let i=new Map,l=[],u=o||[];for(let f=0;ft(h,f));else c.delete(p);i.set(p,y),l.push(y)}c.forEach((f)=>f.destroy());let a=s;for(let f=l.length-1;f>=0;f--){let p=l[f].container;if(p.nextSibling!==a)r.insertBefore(p,a);a=p}c=i}),r},E=(e)=>{let t=()=>window.location.hash.slice(1)||"/",n=T(t()),s=()=>n(t());window.addEventListener("hashchange",s),R(()=>window.removeEventListener("hashchange",s));let r=b("div",{class:"router-hook"}),c=null;return v([n],()=>{let o=n(),i=e.find((l)=>{let u=l.path.split("/").filter(Boolean),a=o.split("/").filter(Boolean);return u.length===a.length&&u.every((f,h)=>f[0]===":"||f===a[h])})||e.find((l)=>l.path==="*");if(i){c?.destroy();let l={};i.path.split("/").filter(Boolean).forEach((u,a)=>{if(u[0]===":")l[u.slice(1)]=o.split("/").filter(Boolean)[a]}),E.params(l),c=k(()=>w(i.component)?i.component(l):i.component),r.replaceChildren(c.container)}}),r};E.params=T({});E.to=(e)=>window.location.hash=e.replace(/^#?\/?/,"#/");E.back=()=>window.history.back();E.path=()=>window.location.hash.replace(/^#/,"")||"/";var W=(e,t)=>{let n=typeof t==="string"?S.querySelector(t):t;if(!n)return;if(U.has(n))U.get(n).destroy();let s=k(w(e)?e:()=>e);return n.replaceChildren(s.container),U.set(n,s),s};if(typeof window<"u")"a abbr article aside audio b blockquote br button canvas caption cite code col colgroup datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 header hr i iframe img input ins kbd label legend li main mark meter nav object ol optgroup option output p picture pre progress section select slot small source span strong sub summary sup svg table tbody td template textarea tfoot th thead time tr u ul video".split(" ").forEach((e)=>{window[e]=(t,n)=>b(e,t,n)}),console.log("SigPro tags ready");var ie=/^\s*(javascript|data|vbscript):/i,le=new Set(["src","href","formaction","action","background","code","archive"]),ae=(e)=>le.has(e)||e.startsWith("on"),fe=(e,t)=>{if(t==null||t===!1)return null;if(ae(e)){let n=String(t);if(ie.test(n))return console.warn(`[SigPro XSS] Locked ${e}`),"#"}return t};B(fe);if(typeof window<"u"){let e={};for(let t of[["$",T],["$$",j],["watch",v],["h",b],["when",D],["each",G],["router",E],["mount",W],["batch",I]])e[t[0]]={value:t[1],writable:!1,configurable:!1,enumerable:!0};Object.defineProperties(window,e)}})(); +(()=>{var{defineProperty:j,getOwnPropertyNames:Q,getOwnPropertyDescriptor:H}=Object,Y=Object.prototype.hasOwnProperty;function Z(e){return this[e]}var ee=(e)=>{var t=(X??=new WeakMap).get(e),n;if(t)return t;if(t=j({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var s of Q(e))if(!Y.call(t,s))j(t,s,{get:Z.bind(e,s),enumerable:!(n=H(e,s))||n.enumerable})}return X.set(e,t),t},X;var te=(e)=>e;function ne(e,t){this[e]=te.bind(null,t)}var oe=(e,t)=>{for(var n in t)j(e,n,{get:t[n],enumerable:!0,configurable:!0,set:ne.bind(t,n)})};var ue={};oe(ue,{when:()=>D,watch:()=>x,router:()=>N,mount:()=>W,h:()=>E,filterXSS:()=>B,each:()=>G,batch:()=>I,$$:()=>L,$:()=>T});var m=(e)=>typeof e==="function",k=(e)=>e&&typeof e==="object",v=Array.isArray,S=typeof document<"u"?document:null,K=(e)=>e?._isRuntime?e.container:e instanceof Node?e:S.createTextNode(e==null?"":String(e)),d=null,_=null,R=!1,C=0,$=new Set,q=new WeakMap,U=Symbol("iter"),V=new WeakMap,se="http://www.w3.org/2000/svg",z="http://www.w3.org/1999/xlink",re=new Set("svg,path,circle,rect,line,polyline,polygon,g,defs,text,textPath,tspan,use,symbol,image,marker,ellipse".split(",")),A=null,B=(e)=>{A=e},b=(e)=>{if(!e||e._disposed)return;e._disposed=!0;let t=[e];while(t.length){let n=t.pop();if(n._cleanups)n._cleanups.forEach((s)=>s()),n._cleanups.clear();if(n._children)n._children.forEach((s)=>t.push(s)),n._children.clear();if(n._deps)n._deps.forEach((s)=>s.delete(n)),n._deps.clear()}},g=(e)=>{if(_)(_._cleanups||=new Set).add(e)},ce=(e)=>{let t=d;d=null;try{return e()}finally{d=t}},O=(e,t=!1)=>{let n=()=>{if(n._disposed)return;if(n._deps)n._deps.forEach((c)=>c.delete(n));if(n._cleanups)n._cleanups.forEach((c)=>c()),n._cleanups.clear();let s=d,r=_;d=_=n;try{return n._result=e()}catch(c){console.error("[SigPro]",c)}finally{d=s,_=r}};if(n._deps=n._cleanups=n._children=null,n._disposed=!1,n._isComputed=t,n._depth=d?d._depth+1:0,n._mounts=[],n._parent=_,_)(_._children||=new Set).add(n);return n},F=()=>{if(R)return;R=!0;let e=Array.from($).sort((t,n)=>t._depth-n._depth);$.clear();for(let t of e)if(!t._disposed)t();R=!1},I=(e)=>{C++;try{return e()}finally{if(C--,C===0&&$.size>0&&!R)F()}},w=(e,t=!1)=>{if(!t&&d&&!d._disposed)e.add(d),(d._deps||=new Set).add(e);else if(t&&e.size>0){let n=!1;for(let s of e){if(s===d||s._disposed)continue;if(s._isComputed){if(s._dirty=!0,s._subs)w(s._subs,!0)}else $.add(s),n=!0}if(n&&!R&&C===0)queueMicrotask(F)}},T=(e,t=null)=>{let n=new Set;if(m(e)){let s,r=()=>{if(r._dirty){let c=d;d=r;try{let o=e();if(!Object.is(s,o))s=o,w(n,!0)}finally{d=c}r._dirty=!1}return w(n),s};return r._isComputed=!0,r._subs=n,r._dirty=!0,r._deps=null,r._disposed=!1,r}if(t)try{e=JSON.parse(localStorage.getItem(t))??e}catch(s){}return(...s)=>{if(s.length){let r=m(s[0])?s[0](e):s[0];if(!Object.is(e,r)){if(e=r,t)localStorage.setItem(t,JSON.stringify(e));w(n,!0)}}return w(n),e}},L=(e)=>{if(!k(e))return e;let t=q.get(e);if(t)return t;let n=new Map,s=(c)=>{let o=n.get(c);if(!o)n.set(c,o=new Set);return o},r=new Proxy(e,{get(c,o,i){if(typeof o!=="symbol")w(s(o));return L(Reflect.get(c,o,i))},set(c,o,i,l){let u=Reflect.has(c,o),a=Reflect.get(c,o,l),f=Reflect.set(c,o,i,l);if(f&&!Object.is(a,i)){if(w(s(o),!0),!u)w(s(U),!0)}return f},deleteProperty(c,o){let i=Reflect.deleteProperty(c,o);if(i)w(s(o),!0),w(s(U),!0);return i},ownKeys(c){return w(s(U)),Reflect.ownKeys(c)}});return q.set(e,r),r},x=(e,t)=>{if(t===void 0){let s=O(e);return s(),()=>b(s)}let n=O(()=>{let s=Array.isArray(e)?e.map((r)=>r()):e();ce(()=>t(s))});return n(),()=>b(n)},M=(e)=>{if(!e)return;if(e._cleanups)e._cleanups.forEach((t)=>t()),e._cleanups.clear();if(e._ownerEffect)b(e._ownerEffect);if(e.childNodes)e.childNodes.forEach((t)=>M(t))},E=(e,t={},n=[])=>{if(t instanceof Node||v(t)||!k(t))n=t,t={};if(m(e)){let o=O(()=>{let a=e(t,{children:n,emit:(f,...h)=>t[`on${f[0].toUpperCase()}${f.slice(1)}`]?.(...h)});return o._result=a,a});o();let i=o._result;if(i==null)return null;let l=i instanceof Node||v(i)&&i.every((a)=>a instanceof Node)?i:S.createTextNode(String(i)),u=(a)=>{if(k(a)&&!a._isRuntime)a._mounts=o._mounts||[],a._cleanups=o._cleanups||new Set,a._ownerEffect=o};return v(l)?l.forEach(u):u(l),l}let s=re.has(e),r=s?S.createElementNS(se,e):S.createElement(e);r._cleanups=new Set;for(let o of Object.keys(t)){let i=t[o];if(o==="ref"){m(i)?i(r):i.current=r;continue}let l=A?A(o,i):i;if(s&&o.startsWith("xlink:")){l==null?r.removeAttributeNS(z,o.slice(6)):r.setAttributeNS(z,o.slice(6),l);continue}if(o.startsWith("on")){let u=o.slice(2).toLowerCase();r.addEventListener(u,l);let a=()=>r.removeEventListener(u,l);r._cleanups.add(a),g(a)}else if(m(l)){let u=O(()=>{let a=l(),f=A?A(o,a):a;if(o==="class")r.className=f||"";else if(f==null)r.removeAttribute(o);else if(o in r&&!s)r[o]=f;else r.setAttribute(o,f===!0?"":f)});if(u(),r._cleanups.add(()=>b(u)),g(()=>b(u)),/^(INPUT|TEXTAREA|SELECT)$/.test(r.tagName)&&(o==="value"||o==="checked")){let a=o==="checked"?"change":"input";r.addEventListener(a,(f)=>l(f.target[o]))}}else if(l!=null)if(o in r&&!s)r[o]=l;else r.setAttribute(o,l===!0?"":l)}let c=(o)=>{if(v(o))return o.forEach(c);if(m(o)){let i=S.createTextNode("");r.appendChild(i);let l=[],u=O(()=>{let a=o(),f=(v(a)?a:[a]).map(K);l.forEach((p)=>{if(p._isRuntime)p.destroy();else M(p);if(p.parentNode)p.remove()});let h=i;for(let p=f.length-1;p>=0;p--){let y=f[p];if(y.parentNode!==h.parentNode)h.parentNode?.insertBefore(y,h);if(y._mounts)y._mounts.forEach((J)=>J());h=y}l=f});u(),r._cleanups.add(()=>b(u)),g(()=>b(u))}else{let i=K(o);if(r.appendChild(i),i._mounts)i._mounts.forEach((l)=>l())}};return c(n),r},P=(e)=>{let t=new Set,n=_,s=d,r=S.createElement("div");r.style.display="contents",r.setAttribute("role","presentation"),_={_cleanups:t},d=null;let c=(o)=>{if(!o)return;if(o._isRuntime)t.add(o.destroy),r.appendChild(o.container);else if(v(o))o.forEach(c);else r.appendChild(o instanceof Node?o:S.createTextNode(String(o==null?"":o)))};try{c(e({onCleanup:(o)=>t.add(o)}))}finally{_=n,d=s}return{_isRuntime:!0,container:r,destroy:()=>{t.forEach((o)=>o()),M(r),r.remove()}}},D=(e,t,n=null)=>{let s=S.createTextNode(""),r=E("div",{style:"display:contents"},[s]),c=null;return x(()=>!!(m(e)?e():e),(o)=>{if(c)c.destroy(),c=null;let i=o?t:n;if(i)c=P(()=>m(i)?i():i),r.insertBefore(c.container,s)}),g(()=>c?.destroy()),r},G=(e,t,n)=>{let s=S.createTextNode(""),r=E("div",{style:"display:contents"},[s]),c=new Map;return x(()=>(m(e)?e():e)||[],(o)=>{let i=new Map,l=[],u=o||[];for(let f=0;ft(h,f));else c.delete(p);i.set(p,y),l.push(y)}c.forEach((f)=>f.destroy());let a=s;for(let f=l.length-1;f>=0;f--){let p=l[f].container;if(p.nextSibling!==a)r.insertBefore(p,a);a=p}c=i}),r},N=(e)=>{let t=()=>window.location.hash.slice(1)||"/",n=T(t()),s=()=>n(t());window.addEventListener("hashchange",s),g(()=>window.removeEventListener("hashchange",s));let r=E("div",{class:"router-hook"}),c=null;return x([n],()=>{let o=n(),i=e.find((l)=>{let u=l.path.split("/").filter(Boolean),a=o.split("/").filter(Boolean);return u.length===a.length&&u.every((f,h)=>f[0]===":"||f===a[h])})||e.find((l)=>l.path==="*");if(i){c?.destroy();let l={};i.path.split("/").filter(Boolean).forEach((u,a)=>{if(u[0]===":")l[u.slice(1)]=o.split("/").filter(Boolean)[a]}),N.params(l),c=P(()=>m(i.component)?i.component(l):i.component),r.replaceChildren(c.container)}}),r};N.params=T({});N.to=(e)=>window.location.hash=e.replace(/^#?\/?/,"#/");N.back=()=>window.history.back();N.path=()=>window.location.hash.replace(/^#/,"")||"/";var W=(e,t)=>{let n=typeof t==="string"?S.querySelector(t):t;if(!n)return;if(V.has(n))V.get(n).destroy();let s=P(m(e)?e:()=>e);return n.replaceChildren(s.container),V.set(n,s),s};if(typeof window<"u")"a abbr article aside audio b blockquote br button canvas caption cite code col colgroup datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 header hr i iframe img input ins kbd label legend li main mark meter nav object ol optgroup option output p picture pre progress section select slot small source span strong sub summary sup svg table tbody td template textarea tfoot th thead time tr u ul video".split(" ").forEach((e)=>{window[e]=(...t)=>E(e,...t)}),console.log("SigPro tags ready");var ie=/^\s*(javascript|data|vbscript):/i,le=new Set(["src","href","formaction","action","background","code","archive"]),ae=(e)=>le.has(e)||e.startsWith("on"),fe=(e,t)=>{if(t==null||t===!1)return null;if(ae(e)){let n=String(t);if(ie.test(n))return console.warn(`[SigPro XSS] Locked ${e}`),"#"}return t};B(fe);if(typeof window<"u"){let e={};for(let t of[["$",T],["$$",L],["watch",x],["h",E],["when",D],["each",G],["router",N],["mount",W],["batch",I]])e[t[0]]={value:t[1],writable:!1,configurable:!1,enumerable:!0};Object.defineProperties(window,e)}})(); diff --git a/docs/sigpro-full.js b/docs/sigpro-full.js index 3bf3388..bf76c8b 100644 --- a/docs/sigpro-full.js +++ b/docs/sigpro-full.js @@ -555,7 +555,7 @@ // sigpro/tags.js if (typeof window !== "undefined") { "a abbr article aside audio b blockquote br button canvas caption cite code col colgroup datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 header hr i iframe img input ins kbd label legend li main mark meter nav object ol optgroup option output p picture pre progress section select slot small source span strong sub summary sup svg table tbody td template textarea tfoot th thead time tr u ul video".split(" ").forEach((tag) => { - window[tag] = (props, children) => h(tag, props, children); + window[tag] = (...args) => h(tag, ...args); }); console.log("SigPro tags ready"); } diff --git a/package.json b/package.json index 87f8219..23eac84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sigpro", - "version": "1.2.24", + "version": "1.2.25", "type": "module", "license": "MIT", "main": "./dist/sigpro.esm.min.js", diff --git a/sigpro/tags.js b/sigpro/tags.js index 1e20db9..beb6b65 100644 --- a/sigpro/tags.js +++ b/sigpro/tags.js @@ -3,7 +3,8 @@ import { h } from '../sigpro.js'; if (typeof window !== 'undefined') { 'a abbr article aside audio b blockquote br button canvas caption cite code col colgroup datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 header hr i iframe img input ins kbd label legend li main mark meter nav object ol optgroup option output p picture pre progress section select slot small source span strong sub summary sup svg table tbody td template textarea tfoot th thead time tr u ul video' .split(' ').forEach(tag => { - window[tag] = (props, children) => h(tag, props, children); + // window[tag] = (props, children) => h(tag, props, children); + window[tag] = (...args) => h(tag, ...args); }); console.log('SigPro tags ready'); } \ No newline at end of file