jsx-dom-runtime
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=new Set(["innerHTML","innerText","textContent","value","htmlFor"]),t=function(e){return null!=e},r=function(e){return"string"==typeof e},n=function(e){return"function"==typeof e},i=function(e){return"boolean"==typeof e},o=Array.isArray,s=document,f=function(e){return o(e)?e.filter(Boolean).join(" "):e},a=function e(r,n){if(t(n)&&!1!==n)if(o(n))for(var i=0;n.length>i;)e(r,n[i++]);else r.appendChild("number"==typeof n.nodeType?n:s.createTextNode(n))},u=function(o,u){if(n(o))return o(u);var l=s.createElement(o),c=u.ref;for(var p in u){var y=u[p];if("ref"===p);else if("className"===p)l.setAttribute("class",f(y));else if("children"===p)a(l,y);else if(e.has(p))l[p]=y;else if("style"===p)if(r(y))l.style.cssText=y;else for(var d in y)l.style[d]=y[d];else if("o"===p[0]&&"n"===p[1]){var v=p.toLowerCase();v in l&&(l[v]=y)}else i(y)&&!/^(aria|data)-/.test(p)?l[p]=y:t(y)&&l.setAttribute(p,""+y)}return t(c)&&("current"in c?c.current=l:n(c)&&c(l)),l};exports.Fragment=function(e){var t=s.createDocumentFragment();return a(t,e.children),t},exports.jsx=u,exports.jsxs=u; | ||
Object.defineProperty(exports,"__esModule",{value:!0});var e=new Set(["innerHTML","innerText","textContent","value","htmlFor"]),t=function(e){return null!=e},r=function(e){return"string"==typeof e},n=function(e){return"function"==typeof e},i=function(e){return"boolean"==typeof e},o=Array.isArray,s=document,f=function(e){return o(e)?e.filter(Boolean).join(" "):e},a=function e(r,n){if(t(n)&&!1!==n)if(o(n))for(var i=0;n.length>i;)e(r,n[i++]);else r.appendChild("number"==typeof n.nodeType?n:s.createTextNode(n))},u=function(o,u){if(n(o))return o(u);var l=r(o)?s.createElement(o):o,c=u.ref;for(var p in u){var y=u[p];if("ref"===p);else if("className"===p)l.setAttribute("class",f(y));else if("children"===p)a(l,y);else if(e.has(p))l[p]=y;else if("style"===p)if(r(y))l.style.cssText=y;else for(var d in y)l.style[d]=y[d];else if("o"===p[0]&&"n"===p[1]){var v=p.toLowerCase();v in l&&(l[v]=y)}else i(y)&&!/^(aria|data)-/.test(p)?l[p]=y:t(y)&&l.setAttribute(p,""+y)}return t(c)&&("current"in c?c.current=l:n(c)&&c(l)),l};exports.Fragment=function(e){var t=s.createDocumentFragment();return a(t,e.children),t},exports.jsx=u,exports.jsxs=u; |
@@ -1,1 +0,1 @@ | ||
let e=new Set(["innerHTML","innerText","textContent","value","htmlFor"]),t=e=>null!=e,r=e=>"string"==typeof e,n=e=>"function"==typeof e,l=e=>"boolean"==typeof e,i=Array.isArray,s=document,o=e=>i(e)?e.filter(Boolean).join(" "):e,f=(e,r)=>{if(t(r)&&!1!==r)if(i(r))for(let t=0;r.length>t;)f(e,r[t++]);else e.appendChild("number"==typeof r.nodeType?r:s.createTextNode(r))},a=e=>{let t=s.createDocumentFragment();return f(t,e.children),t},c=(i,a)=>{if(n(i))return i(a);let c=s.createElement(i),u=a.ref;for(let n in a){let i=a[n];if("ref"===n);else if("className"===n)c.setAttribute("class",o(i));else if("children"===n)f(c,i);else if(e.has(n))c[n]=i;else if("style"===n)if(r(i))c.style.cssText=i;else for(let e in i)c.style[e]=i[e];else if("o"===n[0]&&"n"===n[1]){let e=n.toLowerCase();e in c&&(c[e]=i)}else l(i)&&!/^(aria|data)-/.test(n)?c[n]=i:t(i)&&c.setAttribute(n,""+i)}return t(u)&&("current"in u?u.current=c:n(u)&&u(c)),c};export{a as Fragment,c as jsx,c as jsxs}; | ||
let e=new Set(["innerHTML","innerText","textContent","value","htmlFor"]),t=e=>null!=e,r=e=>"string"==typeof e,n=e=>"function"==typeof e,l=e=>"boolean"==typeof e,i=Array.isArray,s=document,o=e=>i(e)?e.filter(Boolean).join(" "):e,f=(e,r)=>{if(t(r)&&!1!==r)if(i(r))for(let t=0;r.length>t;)f(e,r[t++]);else e.appendChild("number"==typeof r.nodeType?r:s.createTextNode(r))},a=e=>{let t=s.createDocumentFragment();return f(t,e.children),t},c=(i,a)=>{if(n(i))return i(a);let c=r(i)?s.createElement(i):i,u=a.ref;for(let n in a){let i=a[n];if("ref"===n);else if("className"===n)c.setAttribute("class",o(i));else if("children"===n)f(c,i);else if(e.has(n))c[n]=i;else if("style"===n)if(r(i))c.style.cssText=i;else for(let e in i)c.style[e]=i[e];else if("o"===n[0]&&"n"===n[1]){let e=n.toLowerCase();e in c&&(c[e]=i)}else l(i)&&!/^(aria|data)-/.test(n)?c[n]=i:t(i)&&c.setAttribute(n,""+i)}return t(u)&&("current"in u?u.current=c:n(u)&&u(c)),c};export{a as Fragment,c as jsx,c as jsxs}; |
@@ -50,3 +50,3 @@ let properties = new Set([ | ||
let node = doc.createElement(el); | ||
let node = isString(el) ? doc.createElement(el) : el; | ||
let ref = props.ref; | ||
@@ -53,0 +53,0 @@ |
@@ -1,1 +0,1 @@ | ||
var e=new Set(["innerHTML","innerText","textContent","value","htmlFor"]),t=function(e){return null!=e},n=function(e){return"string"==typeof e},r=function(e){return"function"==typeof e},i=function(e){return"boolean"==typeof e},o=Array.isArray,f=document,a=function(e){return o(e)?e.filter(Boolean).join(" "):e},s=function e(n,r){if(t(r)&&!1!==r)if(o(r))for(var i=0;r.length>i;)e(n,r[i++]);else n.appendChild("number"==typeof r.nodeType?r:f.createTextNode(r))},u=function(e){var t=f.createDocumentFragment();return s(t,e.children),t},l=function(o,u){if(r(o))return o(u);var l=f.createElement(o),c=u.ref;for(var y in u){var v=u[y];if("ref"===y);else if("className"===y)l.setAttribute("class",a(v));else if("children"===y)s(l,v);else if(e.has(y))l[y]=v;else if("style"===y)if(n(v))l.style.cssText=v;else for(var d in v)l.style[d]=v[d];else if("o"===y[0]&&"n"===y[1]){var p=y.toLowerCase();p in l&&(l[p]=v)}else i(v)&&!/^(aria|data)-/.test(y)?l[y]=v:t(v)&&l.setAttribute(y,""+v)}return t(c)&&("current"in c?c.current=l:r(c)&&c(l)),l};export{u as Fragment,l as jsx,l as jsxs}; | ||
var e=new Set(["innerHTML","innerText","textContent","value","htmlFor"]),t=function(e){return null!=e},n=function(e){return"string"==typeof e},r=function(e){return"function"==typeof e},i=function(e){return"boolean"==typeof e},o=Array.isArray,f=document,a=function(e){return o(e)?e.filter(Boolean).join(" "):e},s=function e(n,r){if(t(r)&&!1!==r)if(o(r))for(var i=0;r.length>i;)e(n,r[i++]);else n.appendChild("number"==typeof r.nodeType?r:f.createTextNode(r))},u=function(e){var t=f.createDocumentFragment();return s(t,e.children),t},l=function(o,u){if(r(o))return o(u);var l=n(o)?f.createElement(o):o,c=u.ref;for(var y in u){var v=u[y];if("ref"===y);else if("className"===y)l.setAttribute("class",a(v));else if("children"===y)s(l,v);else if(e.has(y))l[y]=v;else if("style"===y)if(n(v))l.style.cssText=v;else for(var d in v)l.style[d]=v[d];else if("o"===y[0]&&"n"===y[1]){var p=y.toLowerCase();p in l&&(l[p]=v)}else i(v)&&!/^(aria|data)-/.test(y)?l[y]=v:t(v)&&l.setAttribute(y,""+v)}return t(c)&&("current"in c?c.current=l:r(c)&&c(l)),l};export{u as Fragment,l as jsx,l as jsxs}; |
{ | ||
"name": "jsx-dom-runtime", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "JSX syntax for DOM Element", | ||
@@ -60,3 +60,3 @@ "main": "jsx-runtime/jsxRuntime.cjs.js", | ||
"path": "jsx-runtime/jsxRuntime.esm.js", | ||
"limit": "495 B" | ||
"limit": "498 B" | ||
}, | ||
@@ -69,3 +69,3 @@ { | ||
"path": "jsx-runtime/jsxRuntime.module.js", | ||
"limit": "502 B" | ||
"limit": "506 B" | ||
} | ||
@@ -72,0 +72,0 @@ ], |
@@ -50,3 +50,3 @@ let properties = new Set([ | ||
let node = doc.createElement(el); | ||
let node = isString(el) ? doc.createElement(el) : el; | ||
let ref = props.ref; | ||
@@ -53,0 +53,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12752