Comparing version 2.2.1 to 2.2.2
@@ -1,2 +0,2 @@ | ||
var e={},t=[],n=function(t){return e=Object.assign({},e,t)},r=function(e,n){window.addEventListener("__LITERAL_UPDATE__",function(){var r=t.pop();i(e,n,{oldState:r.oldState,newState:r.newState})})},i=function(e,t,n){var r=d(t(),n.oldState),i=d(t(),n.newState);return s(e,i,r)},o=function(e,t){t=void 0===t?[]:t;for(var n=0;n<e.length;n++)Array.isArray(e[n])?o(e[n],t):t.push(e[n]);return t},d=function(e,t){if((e="function"==typeof e?e(t):e).children)for(var n=0;n<e.children.length;n++)e.children[n]=d(e.children[n],t);return e},c=function(e){var t=new MutationObserver(function(e){for(var t=0;t<e.length;t++)"childList"===e[t].type&&(n("mounted",e[t].addedNodes),n("unmounted",e[t].removedNodes))}),n=function(e,t){for(var n=0;n<t.length;n++){var r=new CustomEvent(e);t[n].dispatchEvent(r)}};t.observe(e,{childList:!0})},u=function(e){if("object"!=typeof e)return document.createTextNode(e);for(var t=document.createElement(e.element),n=0,r=Object.entries(e);n<r.length;n+=1){var i=r[n],o=i[0],d=i[1];if("text"===o&&a(d,t),"events"===o&&l(d,t),["children","element","text","events"].includes(o)||t.setAttribute(o,d),"children"===o)for(var c=0;c<d.length;c++)t.appendChild(u(d[c]))}return t},a=function(e,t){var n=document.createTextNode(e);t.appendChild(n)},l=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)["mounted","unmounted"].includes(e[n].type)&&c(newNode),t.addEventListener(e[n].type,e[n].action);else["mounted","unmounted"].includes(e.type)&&c(newNode),t.addEventListener(e.type,e.action)},f=function(t){return void 0===t&&(t=e),Object.assign({},t)},v=function(n){var r=f(),i={oldState:r,nextState:Object.assign({},r,n)};e=i.nextState,t.push(i);var o=new Event("__LITERAL_UPDATE__");return window.dispatchEvent(o)},s=function(e,t,n,r){if(void 0===r&&(r=0),e){var i=e.childNodes[r];if(!n&&t)!1===n?e.insertBefore(u(t),i):void 0===n?e.appendChild(u(t)):0===n&&e.replaceChild(u(t),i);else if(!t&&n)e.removeChild(i);else if(t&&(m(i,t,n),p(e,i,t,n),t.children||n.children))for(var o=0;o<h(t.children,n.children);o++)s(i,t.children[o],n.children[o],o)}},h=function(e,t){var n=e.length,r=t.length;return n>=r?n:r},p=function(e,t,n,r){if(("object"!=typeof n||"object"!=typeof r)&&n!==r)return e.replaceChild(u(n),t);for(var i=0,o=Object.entries(n);i<o.length;i+=1){var d=o[i],c=d[0],a=d[1],l=r[c];if("element"===c||"text"===c){if(a!==l)return e.replaceChild(u(n),t)}else if(!(["children","events","element","text"].includes(c)||l&&a===l))return t.setAttribute(name,value)}},m=function(e,t,n){for(var r=0,i=Object.entries(n);r<i.length;r+=1){var o=i[r];t[o[0]]||e.removeAttribute(o[1])}};module.exports={component:function(e){void 0===e&&(e={});var t=e.methods;void 0===t&&(t=function(){});var n=e.render;return void 0===n&&(n=function(){}),function(e){void 0===e&&(e={});var r=e.props;return void 0===r&&(r={}),function(e){return n({getState:function(){return f(e)},setState:v,props:r,methods:t({getState:function(){return f()},setState:v})})}}},render:function(t,i,o){void 0===o&&(o={});var c=document.getElementById(i);n(o),r(c,t);var a=d(t(),e),l=u(a);c.appendChild(l)},h:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return"function"==typeof e?e:Object.assign({},{element:e},t,{children:o(n,[])})}}; | ||
var e={},t=[],n=function(t){return e=Object.assign({},e,t)},r=function(e,n){window.addEventListener("__LITERAL_UPDATE__",function(){var r=t.pop();i(e,n,{oldState:r.oldState,newState:r.newState})})},i=function(e,t,n){var r=d(t(),n.oldState),i=d(t(),n.newState);return s(e,i,r)},o=function(e,t){t=void 0===t?[]:t;for(var n=0;n<e.length;n++)Array.isArray(e[n])?o(e[n],t):t.push(e[n]);return t},d=function(e,t){if((e="function"==typeof e?e(t):e).children)for(var n=0;n<e.children.length;n++)e.children[n]=d(e.children[n],t);return e},u=function(e){var t=new MutationObserver(function(e){for(var t=0;t<e.length;t++)"childList"===e[t].type&&(n("mounted",e[t].addedNodes),n("unmounted",e[t].removedNodes))}),n=function(e,t){for(var n=0;n<t.length;n++){var r=new CustomEvent(e);t[n].dispatchEvent(r)}};t.observe(e,{childList:!0})},c=function(e){if("object"!=typeof e)return document.createTextNode(e);for(var t=document.createElement(e.element),n=0,r=Object.entries(e);n<r.length;n+=1){var i=r[n],o=i[0],d=i[1];if("text"===o&&a(d,t),"events"===o&&l(d,t),["children","element","text","events"].includes(o)||t.setAttribute(o,d),"children"===o)for(var u=0;u<d.length;u++)t.appendChild(c(d[u]))}return t},a=function(e,t){var n=document.createTextNode(e);t.appendChild(n)},l=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)["mounted","unmounted"].includes(e[n].type)&&u(newNode),t.addEventListener(e[n].type,e[n].action);else["mounted","unmounted"].includes(e.type)&&u(newNode),t.addEventListener(e.type,e.action)},f=function(t){return void 0===t&&(t=e),Object.assign({},t)},v=function(n){var r=f(),i={oldState:r,nextState:Object.assign({},r,n)};e=i.nextState,t.push(i);var o=new Event("__LITERAL_UPDATE__");return window.dispatchEvent(o)},s=function(e,t,n,r){if(void 0===r&&(r=0),e){var i=e.childNodes[r];if(!n&&t)!1===n?e.insertBefore(c(t),i):void 0===n?e.appendChild(c(t)):0===n&&e.replaceChild(c(t),i);else if(!t&&n)e.removeChild(i);else if(t&&(g(i,t,n),m(e,i,t,n),t.children||n.children))for(var o=h(t.children,n.children),d=o.newChildren,u=o.oldChildren,a=0;a<p(d,u);a++)s(i,d[a],u[a],a)}},h=function(e,t){for(var n=[],r=[],i=0;i<p(e,t);i++)!1===e[i]&&!1===t[i]||(n.push(e[i]),r.push(t[i]));return{newChildren:n,oldChildren:r}},p=function(e,t){var n=e.length,r=t.length;return n>=r?n:r},m=function(e,t,n,r){if(("object"!=typeof n||"object"!=typeof r)&&n!==r)return e.replaceChild(c(n),t);for(var i=0,o=Object.entries(n);i<o.length;i+=1){var d=o[i],u=d[0],a=d[1],l=r[u];if("element"===u||"text"===u){if(a!==l)return e.replaceChild(c(n),t)}else if(!(["children","events","element","text"].includes(u)||l&&a===l))return t.setAttribute(name,value)}},g=function(e,t,n){for(var r=0,i=Object.entries(n);r<i.length;r+=1){var o=i[r];t[o[0]]||e.removeAttribute(o[1])}};module.exports={component:function(e){void 0===e&&(e={});var t=e.methods;void 0===t&&(t=function(){});var n=e.render;return void 0===n&&(n=function(){}),function(e){void 0===e&&(e={});var r=e.props;return void 0===r&&(r={}),function(e){return n({getState:function(){return f(e)},setState:v,props:r,methods:t({getState:function(){return f()},setState:v})})}}},render:function(t,i,o){void 0===o&&(o={});var u=document.getElementById(i);n(o),r(u,t);var a=d(t(),e),l=c(a);u.appendChild(l)},h:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return"function"==typeof e?e:Object.assign({},{element:e},t,{children:o(n,[])})}}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
var e={},t=[],n=function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return"function"==typeof e?e:Object.assign({},{element:e},t,{children:c(n,[])})},r=function(t,n,r){void 0===r&&(r={});var d=document.getElementById(n);i(r),o(d,t);var c=u(t(),e),a=l(c);d.appendChild(a)},i=function(t){return e=Object.assign({},e,t)},o=function(e,n){window.addEventListener("__LITERAL_UPDATE__",function(){var r=t.pop();d(e,n,{oldState:r.oldState,newState:r.newState})})},d=function(e,t,n){var r=u(t(),n.oldState),i=u(t(),n.newState);return m(e,i,r)},c=function(e,t){t=void 0===t?[]:t;for(var n=0;n<e.length;n++)Array.isArray(e[n])?c(e[n],t):t.push(e[n]);return t},u=function(e,t){if((e="function"==typeof e?e(t):e).children)for(var n=0;n<e.children.length;n++)e.children[n]=u(e.children[n],t);return e},a=function(e){var t=new MutationObserver(function(e){for(var t=0;t<e.length;t++)"childList"===e[t].type&&(n("mounted",e[t].addedNodes),n("unmounted",e[t].removedNodes))}),n=function(e,t){for(var n=0;n<t.length;n++){var r=new CustomEvent(e);t[n].dispatchEvent(r)}};t.observe(e,{childList:!0})},l=function(e){if("object"!=typeof e)return document.createTextNode(e);for(var t=document.createElement(e.element),n=0,r=Object.entries(e);n<r.length;n+=1){var i=r[n],o=i[0],d=i[1];if("text"===o&&f(d,t),"events"===o&&v(d,t),["children","element","text","events"].includes(o)||t.setAttribute(o,d),"children"===o)for(var c=0;c<d.length;c++)t.appendChild(l(d[c]))}return t},f=function(e,t){var n=document.createTextNode(e);t.appendChild(n)},v=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)["mounted","unmounted"].includes(e[n].type)&&a(newNode),t.addEventListener(e[n].type,e[n].action);else["mounted","unmounted"].includes(e.type)&&a(newNode),t.addEventListener(e.type,e.action)},s=function(t){return void 0===t&&(t=e),Object.assign({},t)},h=function(n){var r=s(),i={oldState:r,nextState:Object.assign({},r,n)};e=i.nextState,t.push(i);var o=new Event("__LITERAL_UPDATE__");return window.dispatchEvent(o)},p=function(e){void 0===e&&(e={});var t=e.methods;void 0===t&&(t=function(){});var n=e.render;return void 0===n&&(n=function(){}),function(e){void 0===e&&(e={});var r=e.props;return void 0===r&&(r={}),function(e){return n({getState:function(){return s(e)},setState:h,props:r,methods:t({getState:function(){return s()},setState:h})})}}},m=function(e,t,n,r){if(void 0===r&&(r=0),e){var i=e.childNodes[r];if(!n&&t)!1===n?e.insertBefore(l(t),i):void 0===n?e.appendChild(l(t)):0===n&&e.replaceChild(l(t),i);else if(!t&&n)e.removeChild(i);else if(t&&(y(i,t,n),b(e,i,t,n),t.children||n.children))for(var o=0;o<g(t.children,n.children);o++)m(i,t.children[o],n.children[o],o)}},g=function(e,t){var n=e.length,r=t.length;return n>=r?n:r},b=function(e,t,n,r){if(("object"!=typeof n||"object"!=typeof r)&&n!==r)return e.replaceChild(l(n),t);for(var i=0,o=Object.entries(n);i<o.length;i+=1){var d=o[i],c=d[0],u=d[1],a=r[c];if("element"===c||"text"===c){if(u!==a)return e.replaceChild(l(n),t)}else if(!(["children","events","element","text"].includes(c)||a&&u===a))return t.setAttribute(name,value)}},y=function(e,t,n){for(var r=0,i=Object.entries(n);r<i.length;r+=1){var o=i[r];t[o[0]]||e.removeAttribute(o[1])}};export default{component:p,render:r,h:n};export{n as h,r as render,p as component}; | ||
var e={},t=[],n=function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return"function"==typeof e?e:Object.assign({},{element:e},t,{children:u(n,[])})},r=function(t,n,r){void 0===r&&(r={});var d=document.getElementById(n);i(r),o(d,t);var u=c(t(),e),a=l(u);d.appendChild(a)},i=function(t){return e=Object.assign({},e,t)},o=function(e,n){window.addEventListener("__LITERAL_UPDATE__",function(){var r=t.pop();d(e,n,{oldState:r.oldState,newState:r.newState})})},d=function(e,t,n){var r=c(t(),n.oldState),i=c(t(),n.newState);return m(e,i,r)},u=function(e,t){t=void 0===t?[]:t;for(var n=0;n<e.length;n++)Array.isArray(e[n])?u(e[n],t):t.push(e[n]);return t},c=function(e,t){if((e="function"==typeof e?e(t):e).children)for(var n=0;n<e.children.length;n++)e.children[n]=c(e.children[n],t);return e},a=function(e){var t=new MutationObserver(function(e){for(var t=0;t<e.length;t++)"childList"===e[t].type&&(n("mounted",e[t].addedNodes),n("unmounted",e[t].removedNodes))}),n=function(e,t){for(var n=0;n<t.length;n++){var r=new CustomEvent(e);t[n].dispatchEvent(r)}};t.observe(e,{childList:!0})},l=function(e){if("object"!=typeof e)return document.createTextNode(e);for(var t=document.createElement(e.element),n=0,r=Object.entries(e);n<r.length;n+=1){var i=r[n],o=i[0],d=i[1];if("text"===o&&f(d,t),"events"===o&&v(d,t),["children","element","text","events"].includes(o)||t.setAttribute(o,d),"children"===o)for(var u=0;u<d.length;u++)t.appendChild(l(d[u]))}return t},f=function(e,t){var n=document.createTextNode(e);t.appendChild(n)},v=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)["mounted","unmounted"].includes(e[n].type)&&a(newNode),t.addEventListener(e[n].type,e[n].action);else["mounted","unmounted"].includes(e.type)&&a(newNode),t.addEventListener(e.type,e.action)},s=function(t){return void 0===t&&(t=e),Object.assign({},t)},h=function(n){var r=s(),i={oldState:r,nextState:Object.assign({},r,n)};e=i.nextState,t.push(i);var o=new Event("__LITERAL_UPDATE__");return window.dispatchEvent(o)},p=function(e){void 0===e&&(e={});var t=e.methods;void 0===t&&(t=function(){});var n=e.render;return void 0===n&&(n=function(){}),function(e){void 0===e&&(e={});var r=e.props;return void 0===r&&(r={}),function(e){return n({getState:function(){return s(e)},setState:h,props:r,methods:t({getState:function(){return s()},setState:h})})}}},m=function(e,t,n,r){if(void 0===r&&(r=0),e){var i=e.childNodes[r];if(!n&&t)!1===n?e.insertBefore(l(t),i):void 0===n?e.appendChild(l(t)):0===n&&e.replaceChild(l(t),i);else if(!t&&n)e.removeChild(i);else if(t&&(w(i,t,n),y(e,i,t,n),t.children||n.children))for(var o=g(t.children,n.children),d=o.newChildren,u=o.oldChildren,c=0;c<b(d,u);c++)m(i,d[c],u[c],c)}},g=function(e,t){for(var n=[],r=[],i=0;i<b(e,t);i++)!1===e[i]&&!1===t[i]||(n.push(e[i]),r.push(t[i]));return{newChildren:n,oldChildren:r}},b=function(e,t){var n=e.length,r=t.length;return n>=r?n:r},y=function(e,t,n,r){if(("object"!=typeof n||"object"!=typeof r)&&n!==r)return e.replaceChild(l(n),t);for(var i=0,o=Object.entries(n);i<o.length;i+=1){var d=o[i],u=d[0],c=d[1],a=r[u];if("element"===u||"text"===u){if(c!==a)return e.replaceChild(l(n),t)}else if(!(["children","events","element","text"].includes(u)||a&&c===a))return t.setAttribute(name,value)}},w=function(e,t,n){for(var r=0,i=Object.entries(n);r<i.length;r+=1){var o=i[r];t[o[0]]||e.removeAttribute(o[1])}};export default{component:p,render:r,h:n};export{n as h,r as render,p as component}; | ||
//# sourceMappingURL=index.m.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.literaljs=t()}(this,function(){var e={},t=[],n=function(t){return e=Object.assign({},e,t)},r=function(e,n){window.addEventListener("__LITERAL_UPDATE__",function(){var r=t.pop();i(e,n,{oldState:r.oldState,newState:r.newState})})},i=function(e,t,n){var r=d(t(),n.oldState),i=d(t(),n.newState);return s(e,i,r)},o=function(e,t){t=void 0===t?[]:t;for(var n=0;n<e.length;n++)Array.isArray(e[n])?o(e[n],t):t.push(e[n]);return t},d=function(e,t){if((e="function"==typeof e?e(t):e).children)for(var n=0;n<e.children.length;n++)e.children[n]=d(e.children[n],t);return e},c=function(e){var t=new MutationObserver(function(e){for(var t=0;t<e.length;t++)"childList"===e[t].type&&(n("mounted",e[t].addedNodes),n("unmounted",e[t].removedNodes))}),n=function(e,t){for(var n=0;n<t.length;n++){var r=new CustomEvent(e);t[n].dispatchEvent(r)}};t.observe(e,{childList:!0})},u=function(e){if("object"!=typeof e)return document.createTextNode(e);for(var t=document.createElement(e.element),n=0,r=Object.entries(e);n<r.length;n+=1){var i=r[n],o=i[0],d=i[1];if("text"===o&&a(d,t),"events"===o&&f(d,t),["children","element","text","events"].includes(o)||t.setAttribute(o,d),"children"===o)for(var c=0;c<d.length;c++)t.appendChild(u(d[c]))}return t},a=function(e,t){var n=document.createTextNode(e);t.appendChild(n)},f=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)["mounted","unmounted"].includes(e[n].type)&&c(newNode),t.addEventListener(e[n].type,e[n].action);else["mounted","unmounted"].includes(e.type)&&c(newNode),t.addEventListener(e.type,e.action)},l=function(t){return void 0===t&&(t=e),Object.assign({},t)},v=function(n){var r=l(),i={oldState:r,nextState:Object.assign({},r,n)};e=i.nextState,t.push(i);var o=new Event("__LITERAL_UPDATE__");return window.dispatchEvent(o)},s=function(e,t,n,r){if(void 0===r&&(r=0),e){var i=e.childNodes[r];if(!n&&t)!1===n?e.insertBefore(u(t),i):void 0===n?e.appendChild(u(t)):0===n&&e.replaceChild(u(t),i);else if(!t&&n)e.removeChild(i);else if(t&&(m(i,t,n),p(e,i,t,n),t.children||n.children))for(var o=0;o<h(t.children,n.children);o++)s(i,t.children[o],n.children[o],o)}},h=function(e,t){var n=e.length,r=t.length;return n>=r?n:r},p=function(e,t,n,r){if(("object"!=typeof n||"object"!=typeof r)&&n!==r)return e.replaceChild(u(n),t);for(var i=0,o=Object.entries(n);i<o.length;i+=1){var d=o[i],c=d[0],a=d[1],f=r[c];if("element"===c||"text"===c){if(a!==f)return e.replaceChild(u(n),t)}else if(!(["children","events","element","text"].includes(c)||f&&a===f))return t.setAttribute(name,value)}},m=function(e,t,n){for(var r=0,i=Object.entries(n);r<i.length;r+=1){var o=i[r];t[o[0]]||e.removeAttribute(o[1])}};return{component:function(e){void 0===e&&(e={});var t=e.methods;void 0===t&&(t=function(){});var n=e.render;return void 0===n&&(n=function(){}),function(e){void 0===e&&(e={});var r=e.props;return void 0===r&&(r={}),function(e){return n({getState:function(){return l(e)},setState:v,props:r,methods:t({getState:function(){return l()},setState:v})})}}},render:function(t,i,o){void 0===o&&(o={});var c=document.getElementById(i);n(o),r(c,t);var a=d(t(),e),f=u(a);c.appendChild(f)},h:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return"function"==typeof e?e:Object.assign({},{element:e},t,{children:o(n,[])})}}}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.literaljs=t()}(this,function(){var e={},t=[],n=function(t){return e=Object.assign({},e,t)},r=function(e,n){window.addEventListener("__LITERAL_UPDATE__",function(){var r=t.pop();i(e,n,{oldState:r.oldState,newState:r.newState})})},i=function(e,t,n){var r=d(t(),n.oldState),i=d(t(),n.newState);return s(e,i,r)},o=function(e,t){t=void 0===t?[]:t;for(var n=0;n<e.length;n++)Array.isArray(e[n])?o(e[n],t):t.push(e[n]);return t},d=function(e,t){if((e="function"==typeof e?e(t):e).children)for(var n=0;n<e.children.length;n++)e.children[n]=d(e.children[n],t);return e},u=function(e){var t=new MutationObserver(function(e){for(var t=0;t<e.length;t++)"childList"===e[t].type&&(n("mounted",e[t].addedNodes),n("unmounted",e[t].removedNodes))}),n=function(e,t){for(var n=0;n<t.length;n++){var r=new CustomEvent(e);t[n].dispatchEvent(r)}};t.observe(e,{childList:!0})},c=function(e){if("object"!=typeof e)return document.createTextNode(e);for(var t=document.createElement(e.element),n=0,r=Object.entries(e);n<r.length;n+=1){var i=r[n],o=i[0],d=i[1];if("text"===o&&a(d,t),"events"===o&&f(d,t),["children","element","text","events"].includes(o)||t.setAttribute(o,d),"children"===o)for(var u=0;u<d.length;u++)t.appendChild(c(d[u]))}return t},a=function(e,t){var n=document.createTextNode(e);t.appendChild(n)},f=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)["mounted","unmounted"].includes(e[n].type)&&u(newNode),t.addEventListener(e[n].type,e[n].action);else["mounted","unmounted"].includes(e.type)&&u(newNode),t.addEventListener(e.type,e.action)},l=function(t){return void 0===t&&(t=e),Object.assign({},t)},v=function(n){var r=l(),i={oldState:r,nextState:Object.assign({},r,n)};e=i.nextState,t.push(i);var o=new Event("__LITERAL_UPDATE__");return window.dispatchEvent(o)},s=function(e,t,n,r){if(void 0===r&&(r=0),e){var i=e.childNodes[r];if(!n&&t)!1===n?e.insertBefore(c(t),i):void 0===n?e.appendChild(c(t)):0===n&&e.replaceChild(c(t),i);else if(!t&&n)e.removeChild(i);else if(t&&(g(i,t,n),m(e,i,t,n),t.children||n.children))for(var o=h(t.children,n.children),d=o.newChildren,u=o.oldChildren,a=0;a<p(d,u);a++)s(i,d[a],u[a],a)}},h=function(e,t){for(var n=[],r=[],i=0;i<p(e,t);i++)!1===e[i]&&!1===t[i]||(n.push(e[i]),r.push(t[i]));return{newChildren:n,oldChildren:r}},p=function(e,t){var n=e.length,r=t.length;return n>=r?n:r},m=function(e,t,n,r){if(("object"!=typeof n||"object"!=typeof r)&&n!==r)return e.replaceChild(c(n),t);for(var i=0,o=Object.entries(n);i<o.length;i+=1){var d=o[i],u=d[0],a=d[1],f=r[u];if("element"===u||"text"===u){if(a!==f)return e.replaceChild(c(n),t)}else if(!(["children","events","element","text"].includes(u)||f&&a===f))return t.setAttribute(name,value)}},g=function(e,t,n){for(var r=0,i=Object.entries(n);r<i.length;r+=1){var o=i[r];t[o[0]]||e.removeAttribute(o[1])}};return{component:function(e){void 0===e&&(e={});var t=e.methods;void 0===t&&(t=function(){});var n=e.render;return void 0===n&&(n=function(){}),function(e){void 0===e&&(e={});var r=e.props;return void 0===r&&(r={}),function(e){return n({getState:function(){return l(e)},setState:v,props:r,methods:t({getState:function(){return l()},setState:v})})}}},render:function(t,i,o){void 0===o&&(o={});var u=document.getElementById(i);n(o),r(u,t);var a=d(t(),e),f=c(a);u.appendChild(f)},h:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return"function"==typeof e?e:Object.assign({},{element:e},t,{children:o(n,[])})}}}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "literaljs", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "~1kb JavaScript library for building user interfaces.", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
144933
45