Comparing version 6.0.6 to 7.0.0
@@ -1,2 +0,2 @@ | ||
var e,t,n,i={},r="eid",o=[],f={},u=[],d=["abort","blur","error","focus","load","mouseenter","mouseleave","resize","scroll","unload"],a="string",c="number",s="boolean",v="undefined",p="object",h="function",l="events",y="style",m="value";function b(e){return Array.isArray(e)}function g(){return Math.random().toString(36).substring(2)+(new Date).getTime().toString(36)}function N(e,t){for(var n=0,i=t.length;n<i;n++)b(t[n])?N(e,t[n]):e.push(t[n]);return e}function A(e,t){for(var n in t)e[n]=t[n];return e}function O(e,t){for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];return{e:e,a:A({},t),c:N([],n)}}function j(r,o,f){void 0===f&&(f={}),i=A({},f),t=r,e=document.getElementById(o),n=k(r()),w(e,n),D()}function x(r){void 0===r&&(r={});var o=r.mounted;void 0===o&&(o=function(){});var f=r.updated;void 0===f&&(f=function(){});var u=r.unmounted;void 0===u&&(u=function(){});var d=r.methods;void 0===d&&(d=function(){});var s=r.render;void 0===s&&(s=function(){});var b=g();return function(r){return void 0===r&&(r={}),{id:b,init:function(){return this.id=b,this.props=r,this.state=i,this.getState=S,this.setState=function(r,o){var f,u,d;typeof r===h&&(r=r(i)),d=r,i=A(A({},i),d),f=A({},n),u=k(t()),n=u,function e(t,n,i,r){var o=typeof i,f=typeof r;if(f===v)w(t,i);else if(o===v)J(r),n.remove();else if(function(e,t,n,i){return n!==i||e.e!==t.e||e.id!==t.id||(n===a||n===c)&&e!==t}(i,r,o,f))J(r),t.replaceChild(E(i),n);else if(o===p){var u;!function(e,t,n){I(t,"up");for(var i,r,o=Object.keys(t.a),f=o.length;f--;)if(r=t.a[o[f]],i=n.a[o[f]],o[f]===y){if(c=typeof(d=i),(a=typeof(u=r))===p&&c===p&&JSON.stringify(u)===JSON.stringify(d)||a===v&&c===v)continue;e.removeAttribute(o[f]),T(r,e)}else o[f]===l?(B(e,n.eid),z(n.eid),t.eid=g(),L(t.eid,r,e)):o[f]===m&&r!==i?e.value=r:typeof i!==v&&r===i||e.setAttribute(o[f],r);var u,d,a,c}(n,i,r);for(var d=r.c.length;d--&&typeof i.c[d]===v;)typeof(u=n.lastChild)===p&&(J(r.c[d]),u.remove());for(var s=0,h=i.c.length;s<h;s++)e(n,n.childNodes[s],i.c[s],r.c[s])}}(e,e.firstChild,u,f),D(),typeof o===h&&o.bind(this)()}.bind(this),this.mounted=o.bind(this),this.updated=f.bind(this),this.unmounted=u.bind(this),function(e,t){for(var n in typeof t===h&&(t=t.bind(e)()),t)e[n]=t[n].bind(e)}(this,d),this.render=s.bind(this),this}}}}function S(){return A({},i)}function k(e){if(typeof e===v)return e;if(typeof e.e===h){var t=A({},e.a.props);delete e.a.props,e=e.e(t)}if(typeof e.init===h){var n=new e.init;typeof(e=n.render())===p&&(e.id=n.id,e.m=n.mounted,e.up=n.updated,e.un=n.unmounted)}if(b(e.c))for(var i=0,r=e.c.length;i<r;i++)e.c[i]=k(e.c[i]);return e}function E(e){var t=typeof e;if(t===a||t===c)return document.createTextNode(e);if(t===s||t===v)return document.createTextNode("");var n=document.createElement(e.e);if(typeof e.a===p)for(var i=Object.keys(e.a),r=i.length;r--;)i[r]===l?(e.eid=g(),L(e.eid,e.a[i[r]],n)):i[r]===y?T(e.a[i[r]],n):n.setAttribute(i[r],e.a[i[r]]);if(I(e,"m"),b(e.c))for(var o=0,f=e.c.length;o<f;o++)w(n,e.c[o]);return n}function C(e){if("#document"!==e.parentNode.nodeName){var t=e.getAttribute("data-"+r);return typeof t===a?t:C(e.parentNode)}}function L(t,n,i){i.setAttribute("data-"+r,t),f[t]=n;for(var u=Object.keys(n),c=u.length;c--;)d.includes(u[c])?i.addEventListener(u[c],f[t][u[c]]):o.includes(u[c])||(o.push(u[c]),e.addEventListener(u[c],function(e){var t=C(e.target);if(typeof t===a&&f[t]){var n=f[t][e.type];typeof n===h&&n(e)}}))}function T(e,t){if(typeof e!==v)for(var n=Object.keys(e),i=n.length;i--;)t.style[n[i]]=e[n[i]]}function w(e,t){e.appendChild(E(t))}function J(e){if(typeof e!==v&&(I(e,"un"),z(e.eid),b(e.c)))for(var t=e.c.length;t--;)J(e.c[t])}function z(e){typeof e===a&&delete f[e]}function B(e,t){for(var n=Object.keys(f[t]),i=n.length;i--;)d.includes(n[i])&&e.removeEventListener(n[i],f[t][n[i]])}function D(){for(var e;e=u.shift();)e()}function I(e,t){typeof e===p&&typeof e[t]===h&&u.push(e[t])}module.exports={component:x,render:j,h:O},exports.h=O,exports.render=j,exports.component=x; | ||
var t,e,n,i={},r={},o="eid",f=[],u={},d=[],s=["abort","blur","error","focus","load","mouseenter","mouseleave","resize","scroll","unload"],a="string",c="number",h="boolean",v="undefined",p="object",y="function",l="events",m="style",b="value";function g(t){return Array.isArray(t)}function k(){return Math.random().toString(36).substring(2)+(new Date).getTime().toString(36)}function S(t,e){for(var n=0,i=e.length;n<i;n++)g(e[n])?S(t,e[n]):t.push(e[n]);return t}function N(t,e){for(var n in e)t[n]=e[n];return t}function A(t,e,n){return N(N(t,e),n)}function O(t,e){for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];return{e:t,a:N({},e),c:S([],n)}}function j(r,o,f){void 0===f&&(f={}),i=N({},f),e=r,t=document.getElementById(o),n=C(r()),B(t,n),_()}function x(t){void 0===t&&(t={});var e=t.name;void 0===e&&(e="");var n=t.state;void 0===n&&(n={});var o=t.mounted;void 0===o&&(o=function(){});var f=t.updated;void 0===f&&(f=function(){});var u=t.unmounted;void 0===u&&(u=function(){});var d=t.methods;void 0===d&&(d=function(){});var s=t.render;void 0===s&&(s=function(){});var a=k();return function(t){return void 0===t&&(t={}),{id:a,init:function(){return this.id=a,this.name=e+(t.key?"":"_"+t.key),this.key=this.id+(this.name||""),this.props=t,this.store=i,this.getStore=E,this.setStore=function(t,e){typeof t===y&&(t=t(i)),i=A({},i,t),z(),typeof e===y&&e.bind(this)()}.bind(this),this.getState=function(){return N({},r[this.key])}.bind(this),this.setState=function(t,e){typeof t===y&&(t=t(r[this.key])),r[this.key]=A({},r[this.key],t),z(),typeof e===y&&e.bind(this)()}.bind(this),this.createState=function(){typeof r[this.key]===v&&(r[this.key]=n)}.bind(this)(),this.deleteState=function(){delete r[this.key]}.bind(this),this.mounted=o.bind(this),this.updated=f.bind(this),this.unmounted=u.bind(this),function(t,e){for(var n in typeof e===y&&(e=e.bind(t)()),e)t[n]=e[n].bind(t)}(this,d),this.render=s.bind(this),this}}}}function E(){return N({},i)}function C(t){if(typeof t===v)return t;if(typeof t.e===y){var e=N({},t.a.props);delete t.a.props,t=t.e(e)}if(typeof t.init===y){var n=new t.init;typeof(t=n.render())===p&&(t.id=n.id,t.m=n.mounted,t.up=n.updated,t.un=n.unmounted,t.d=n.deleteState)}if(g(t.c))for(var i=0,r=t.c.length;i<r;i++)t.c[i]=C(t.c[i]);return t}function L(t){var e=typeof t;if(e===a||e===c)return document.createTextNode(t);if(e===h||e===v)return document.createTextNode("");var n=document.createElement(t.e);if(typeof t.a===p)for(var i=Object.keys(t.a),r=i.length;r--;)i[r]===l?(t.eid=k(),w(t.eid,t.a[i[r]],n)):i[r]===m?J(t.a[i[r]],n):n.setAttribute(i[r],t.a[i[r]]);if(q(t,"m"),g(t.c))for(var o=0,f=t.c.length;o<f;o++)B(n,t.c[o]);return n}function T(t){if("#document"!==t.parentNode.nodeName){var e=t.getAttribute("data-"+o);return typeof e===a?e:T(t.parentNode)}}function w(e,n,i){i.setAttribute("data-"+o,e),u[e]=n;for(var r=Object.keys(n),d=r.length;d--;)s.includes(r[d])?i.addEventListener(r[d],u[e][r[d]]):f.includes(r[d])||(f.push(r[d]),t.addEventListener(r[d],function(t){var e=T(t.target);if(typeof e===a&&u[e]){var n=u[e][t.type];typeof n===y&&n(t)}}))}function J(t,e){if(typeof t!==v)for(var n=Object.keys(t),i=n.length;i--;)e.style[n[i]]=t[n[i]]}function z(i){var r=N({},n),o=C(e());n=o,function t(e,n,i,r){var o=typeof i,f=typeof r;if(f===v)B(e,i);else if(o===v)D(r),n.remove();else if(function(t,e,n,i){return n!==i||t.e!==e.e||t.id!==e.id||(n===a||n===c)&&t!==e}(i,r,o,f))D(r),e.replaceChild(L(i),n);else if(o===p){var u;!function(t,e,n){q(e,"up");for(var i,r,o=Object.keys(e.a),f=o.length;f--;)if(r=e.a[o[f]],i=n.a[o[f]],o[f]===m){if(a=typeof(d=i),(s=typeof(u=r))===p&&a===p&&JSON.stringify(u)===JSON.stringify(d)||s===v&&a===v)continue;t.removeAttribute(o[f]),J(r,t)}else o[f]===l?(M(t,n.eid),I(n.eid),e.eid=k(),w(e.eid,r,t)):o[f]===b&&r!==i?t.value=r:typeof i!==v&&r===i||t.setAttribute(o[f],r);var u,d,s,a}(n,i,r);for(var d=r.c.length;d--&&typeof i.c[d]===v;)typeof(u=n.lastChild)===p&&(D(r.c[d]),u.remove());for(var s=0,h=i.c.length;s<h;s++)t(n,n.childNodes[s],i.c[s],r.c[s])}}(t,t.firstChild,o,r),_()}function B(t,e){t.appendChild(L(e))}function D(t){if(typeof t!==v&&(q(t,"un"),q(t,"d"),I(t.eid),g(t.c)))for(var e=t.c.length;e--;)D(t.c[e])}function I(t){typeof t===a&&delete u[t]}function M(t,e){for(var n=Object.keys(u[e]),i=n.length;i--;)s.includes(n[i])&&t.removeEventListener(n[i],u[e][n[i]])}function _(){for(var t;t=d.shift();)t()}function q(t,e){typeof t===p&&typeof t[e]===y&&d.push(t[e])}module.exports={component:x,render:j,h:O},exports.h=O,exports.render=j,exports.component=x; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
var e,t,n,i={},r="eid",o=[],f={},u=[],d=["abort","blur","error","focus","load","mouseenter","mouseleave","resize","scroll","unload"],a="string",c="number",s="boolean",v="undefined",p="object",l="function",h="events",y="style",m="value";function b(e){return Array.isArray(e)}function g(){return Math.random().toString(36).substring(2)+(new Date).getTime().toString(36)}function N(e,t){for(var n=0,i=t.length;n<i;n++)b(t[n])?N(e,t[n]):e.push(t[n]);return e}function A(e,t){for(var n in t)e[n]=t[n];return e}function O(e,t){for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];return{e:e,a:A({},t),c:N([],n)}}function j(r,o,f){void 0===f&&(f={}),i=A({},f),t=r,e=document.getElementById(o),n=E(r()),w(e,n),D()}function S(r){void 0===r&&(r={});var o=r.mounted;void 0===o&&(o=function(){});var f=r.updated;void 0===f&&(f=function(){});var u=r.unmounted;void 0===u&&(u=function(){});var d=r.methods;void 0===d&&(d=function(){});var s=r.render;void 0===s&&(s=function(){});var b=g();return function(r){return void 0===r&&(r={}),{id:b,init:function(){return this.id=b,this.props=r,this.state=i,this.getState=k,this.setState=function(r,o){var f,u,d;typeof r===l&&(r=r(i)),d=r,i=A(A({},i),d),f=A({},n),u=E(t()),n=u,function e(t,n,i,r){var o=typeof i,f=typeof r;if(f===v)w(t,i);else if(o===v)J(r),n.remove();else if(function(e,t,n,i){return n!==i||e.e!==t.e||e.id!==t.id||(n===a||n===c)&&e!==t}(i,r,o,f))J(r),t.replaceChild(x(i),n);else if(o===p){var u;!function(e,t,n){I(t,"up");for(var i,r,o=Object.keys(t.a),f=o.length;f--;)if(r=t.a[o[f]],i=n.a[o[f]],o[f]===y){if(c=typeof(d=i),(a=typeof(u=r))===p&&c===p&&JSON.stringify(u)===JSON.stringify(d)||a===v&&c===v)continue;e.removeAttribute(o[f]),T(r,e)}else o[f]===h?(B(e,n.eid),z(n.eid),t.eid=g(),L(t.eid,r,e)):o[f]===m&&r!==i?e.value=r:typeof i!==v&&r===i||e.setAttribute(o[f],r);var u,d,a,c}(n,i,r);for(var d=r.c.length;d--&&typeof i.c[d]===v;)typeof(u=n.lastChild)===p&&(J(r.c[d]),u.remove());for(var s=0,l=i.c.length;s<l;s++)e(n,n.childNodes[s],i.c[s],r.c[s])}}(e,e.firstChild,u,f),D(),typeof o===l&&o.bind(this)()}.bind(this),this.mounted=o.bind(this),this.updated=f.bind(this),this.unmounted=u.bind(this),function(e,t){for(var n in typeof t===l&&(t=t.bind(e)()),t)e[n]=t[n].bind(e)}(this,d),this.render=s.bind(this),this}}}}function k(){return A({},i)}function E(e){if(typeof e===v)return e;if(typeof e.e===l){var t=A({},e.a.props);delete e.a.props,e=e.e(t)}if(typeof e.init===l){var n=new e.init;typeof(e=n.render())===p&&(e.id=n.id,e.m=n.mounted,e.up=n.updated,e.un=n.unmounted)}if(b(e.c))for(var i=0,r=e.c.length;i<r;i++)e.c[i]=E(e.c[i]);return e}function x(e){var t=typeof e;if(t===a||t===c)return document.createTextNode(e);if(t===s||t===v)return document.createTextNode("");var n=document.createElement(e.e);if(typeof e.a===p)for(var i=Object.keys(e.a),r=i.length;r--;)i[r]===h?(e.eid=g(),L(e.eid,e.a[i[r]],n)):i[r]===y?T(e.a[i[r]],n):n.setAttribute(i[r],e.a[i[r]]);if(I(e,"m"),b(e.c))for(var o=0,f=e.c.length;o<f;o++)w(n,e.c[o]);return n}function C(e){if("#document"!==e.parentNode.nodeName){var t=e.getAttribute("data-"+r);return typeof t===a?t:C(e.parentNode)}}function L(t,n,i){i.setAttribute("data-"+r,t),f[t]=n;for(var u=Object.keys(n),c=u.length;c--;)d.includes(u[c])?i.addEventListener(u[c],f[t][u[c]]):o.includes(u[c])||(o.push(u[c]),e.addEventListener(u[c],function(e){var t=C(e.target);if(typeof t===a&&f[t]){var n=f[t][e.type];typeof n===l&&n(e)}}))}function T(e,t){if(typeof e!==v)for(var n=Object.keys(e),i=n.length;i--;)t.style[n[i]]=e[n[i]]}function w(e,t){e.appendChild(x(t))}function J(e){if(typeof e!==v&&(I(e,"un"),z(e.eid),b(e.c)))for(var t=e.c.length;t--;)J(e.c[t])}function z(e){typeof e===a&&delete f[e]}function B(e,t){for(var n=Object.keys(f[t]),i=n.length;i--;)d.includes(n[i])&&e.removeEventListener(n[i],f[t][n[i]])}function D(){for(var e;e=u.shift();)e()}function I(e,t){typeof e===p&&typeof e[t]===l&&u.push(e[t])}module.exports={component:S,render:j,h:O};export{O as h,j as render,S as component}; | ||
var t,e,n,i={},r={},o="eid",f=[],u={},d=[],a=["abort","blur","error","focus","load","mouseenter","mouseleave","resize","scroll","unload"],s="string",c="number",h="boolean",v="undefined",p="object",y="function",l="events",m="style",b="value";function g(t){return Array.isArray(t)}function k(){return Math.random().toString(36).substring(2)+(new Date).getTime().toString(36)}function S(t,e){for(var n=0,i=e.length;n<i;n++)g(e[n])?S(t,e[n]):t.push(e[n]);return t}function N(t,e){for(var n in e)t[n]=e[n];return t}function A(t,e,n){return N(N(t,e),n)}function O(t,e){for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];return{e:t,a:N({},e),c:S([],n)}}function j(r,o,f){void 0===f&&(f={}),i=N({},f),e=r,t=document.getElementById(o),n=C(r()),B(t,n),_()}function E(t){void 0===t&&(t={});var e=t.name;void 0===e&&(e="");var n=t.state;void 0===n&&(n={});var o=t.mounted;void 0===o&&(o=function(){});var f=t.updated;void 0===f&&(f=function(){});var u=t.unmounted;void 0===u&&(u=function(){});var d=t.methods;void 0===d&&(d=function(){});var a=t.render;void 0===a&&(a=function(){});var s=k();return function(t){return void 0===t&&(t={}),{id:s,init:function(){return this.id=s,this.name=e+(t.key?"":"_"+t.key),this.key=this.id+(this.name||""),this.props=t,this.store=i,this.getStore=x,this.setStore=function(t,e){typeof t===y&&(t=t(i)),i=A({},i,t),z(),typeof e===y&&e.bind(this)()}.bind(this),this.getState=function(){return N({},r[this.key])}.bind(this),this.setState=function(t,e){typeof t===y&&(t=t(r[this.key])),r[this.key]=A({},r[this.key],t),z(),typeof e===y&&e.bind(this)()}.bind(this),this.createState=function(){typeof r[this.key]===v&&(r[this.key]=n)}.bind(this)(),this.deleteState=function(){delete r[this.key]}.bind(this),this.mounted=o.bind(this),this.updated=f.bind(this),this.unmounted=u.bind(this),function(t,e){for(var n in typeof e===y&&(e=e.bind(t)()),e)t[n]=e[n].bind(t)}(this,d),this.render=a.bind(this),this}}}}function x(){return N({},i)}function C(t){if(typeof t===v)return t;if(typeof t.e===y){var e=N({},t.a.props);delete t.a.props,t=t.e(e)}if(typeof t.init===y){var n=new t.init;typeof(t=n.render())===p&&(t.id=n.id,t.m=n.mounted,t.up=n.updated,t.un=n.unmounted,t.d=n.deleteState)}if(g(t.c))for(var i=0,r=t.c.length;i<r;i++)t.c[i]=C(t.c[i]);return t}function L(t){var e=typeof t;if(e===s||e===c)return document.createTextNode(t);if(e===h||e===v)return document.createTextNode("");var n=document.createElement(t.e);if(typeof t.a===p)for(var i=Object.keys(t.a),r=i.length;r--;)i[r]===l?(t.eid=k(),w(t.eid,t.a[i[r]],n)):i[r]===m?J(t.a[i[r]],n):n.setAttribute(i[r],t.a[i[r]]);if(q(t,"m"),g(t.c))for(var o=0,f=t.c.length;o<f;o++)B(n,t.c[o]);return n}function T(t){if("#document"!==t.parentNode.nodeName){var e=t.getAttribute("data-"+o);return typeof e===s?e:T(t.parentNode)}}function w(e,n,i){i.setAttribute("data-"+o,e),u[e]=n;for(var r=Object.keys(n),d=r.length;d--;)a.includes(r[d])?i.addEventListener(r[d],u[e][r[d]]):f.includes(r[d])||(f.push(r[d]),t.addEventListener(r[d],function(t){var e=T(t.target);if(typeof e===s&&u[e]){var n=u[e][t.type];typeof n===y&&n(t)}}))}function J(t,e){if(typeof t!==v)for(var n=Object.keys(t),i=n.length;i--;)e.style[n[i]]=t[n[i]]}function z(i){var r=N({},n),o=C(e());n=o,function t(e,n,i,r){var o=typeof i,f=typeof r;if(f===v)B(e,i);else if(o===v)D(r),n.remove();else if(function(t,e,n,i){return n!==i||t.e!==e.e||t.id!==e.id||(n===s||n===c)&&t!==e}(i,r,o,f))D(r),e.replaceChild(L(i),n);else if(o===p){var u;!function(t,e,n){q(e,"up");for(var i,r,o=Object.keys(e.a),f=o.length;f--;)if(r=e.a[o[f]],i=n.a[o[f]],o[f]===m){if(s=typeof(d=i),(a=typeof(u=r))===p&&s===p&&JSON.stringify(u)===JSON.stringify(d)||a===v&&s===v)continue;t.removeAttribute(o[f]),J(r,t)}else o[f]===l?(M(t,n.eid),I(n.eid),e.eid=k(),w(e.eid,r,t)):o[f]===b&&r!==i?t.value=r:typeof i!==v&&r===i||t.setAttribute(o[f],r);var u,d,a,s}(n,i,r);for(var d=r.c.length;d--&&typeof i.c[d]===v;)typeof(u=n.lastChild)===p&&(D(r.c[d]),u.remove());for(var a=0,h=i.c.length;a<h;a++)t(n,n.childNodes[a],i.c[a],r.c[a])}}(t,t.firstChild,o,r),_()}function B(t,e){t.appendChild(L(e))}function D(t){if(typeof t!==v&&(q(t,"un"),q(t,"d"),I(t.eid),g(t.c)))for(var e=t.c.length;e--;)D(t.c[e])}function I(t){typeof t===s&&delete u[t]}function M(t,e){for(var n=Object.keys(u[e]),i=n.length;i--;)a.includes(n[i])&&t.removeEventListener(n[i],u[e][n[i]])}function _(){for(var t;t=d.shift();)t()}function q(t,e){typeof t===p&&typeof t[e]===y&&d.push(t[e])}module.exports={component:E,render:j,h:O};export{O as h,j as render,E as component}; | ||
//# sourceMappingURL=index.m.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.literaljs={})}(this,function(e){var t,n,i,r={},o="eid",f=[],u={},d=[],a=["abort","blur","error","focus","load","mouseenter","mouseleave","resize","scroll","unload"],c="string",s="number",p="boolean",v="undefined",l="object",h="function",y="events",m="style",b="value";function g(e){return Array.isArray(e)}function j(){return Math.random().toString(36).substring(2)+(new Date).getTime().toString(36)}function N(e,t){for(var n=0,i=t.length;n<i;n++)g(t[n])?N(e,t[n]):e.push(t[n]);return e}function A(e,t){for(var n in t)e[n]=t[n];return e}function O(e,t){for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];return{e:e,a:A({},t),c:N([],n)}}function x(e,o,f){void 0===f&&(f={}),r=A({},f),n=e,t=document.getElementById(o),i=E(e()),J(t,i),I()}function S(e){void 0===e&&(e={});var o=e.mounted;void 0===o&&(o=function(){});var f=e.updated;void 0===f&&(f=function(){});var u=e.unmounted;void 0===u&&(u=function(){});var d=e.methods;void 0===d&&(d=function(){});var a=e.render;void 0===a&&(a=function(){});var p=j();return function(e){return void 0===e&&(e={}),{id:p,init:function(){return this.id=p,this.props=e,this.state=r,this.getState=k,this.setState=function(e,o){var f,u,d;typeof e===h&&(e=e(r)),d=e,r=A(A({},r),d),f=A({},i),u=E(n()),i=u,function e(t,n,i,r){var o=typeof i,f=typeof r;if(f===v)J(t,i);else if(o===v)z(r),n.remove();else if(function(e,t,n,i){return n!==i||e.e!==t.e||e.id!==t.id||(n===c||n===s)&&e!==t}(i,r,o,f))z(r),t.replaceChild(C(i),n);else if(o===l){var u;!function(e,t,n){M(t,"up");for(var i,r,o=Object.keys(t.a),f=o.length;f--;)if(r=t.a[o[f]],i=n.a[o[f]],o[f]===m){if(c=typeof(d=i),(a=typeof(u=r))===l&&c===l&&JSON.stringify(u)===JSON.stringify(d)||a===v&&c===v)continue;e.removeAttribute(o[f]),w(r,e)}else o[f]===y?(D(e,n.eid),B(n.eid),t.eid=j(),T(t.eid,r,e)):o[f]===b&&r!==i?e.value=r:typeof i!==v&&r===i||e.setAttribute(o[f],r);var u,d,a,c}(n,i,r);for(var d=r.c.length;d--&&typeof i.c[d]===v;)typeof(u=n.lastChild)===l&&(z(r.c[d]),u.remove());for(var a=0,p=i.c.length;a<p;a++)e(n,n.childNodes[a],i.c[a],r.c[a])}}(t,t.firstChild,u,f),I(),typeof o===h&&o.bind(this)()}.bind(this),this.mounted=o.bind(this),this.updated=f.bind(this),this.unmounted=u.bind(this),function(e,t){for(var n in typeof t===h&&(t=t.bind(e)()),t)e[n]=t[n].bind(e)}(this,d),this.render=a.bind(this),this}}}}function k(){return A({},r)}function E(e){if(typeof e===v)return e;if(typeof e.e===h){var t=A({},e.a.props);delete e.a.props,e=e.e(t)}if(typeof e.init===h){var n=new e.init;typeof(e=n.render())===l&&(e.id=n.id,e.m=n.mounted,e.up=n.updated,e.un=n.unmounted)}if(g(e.c))for(var i=0,r=e.c.length;i<r;i++)e.c[i]=E(e.c[i]);return e}function C(e){var t=typeof e;if(t===c||t===s)return document.createTextNode(e);if(t===p||t===v)return document.createTextNode("");var n=document.createElement(e.e);if(typeof e.a===l)for(var i=Object.keys(e.a),r=i.length;r--;)i[r]===y?(e.eid=j(),T(e.eid,e.a[i[r]],n)):i[r]===m?w(e.a[i[r]],n):n.setAttribute(i[r],e.a[i[r]]);if(M(e,"m"),g(e.c))for(var o=0,f=e.c.length;o<f;o++)J(n,e.c[o]);return n}function L(e){if("#document"!==e.parentNode.nodeName){var t=e.getAttribute("data-"+o);return typeof t===c?t:L(e.parentNode)}}function T(e,n,i){i.setAttribute("data-"+o,e),u[e]=n;for(var r=Object.keys(n),d=r.length;d--;)a.includes(r[d])?i.addEventListener(r[d],u[e][r[d]]):f.includes(r[d])||(f.push(r[d]),t.addEventListener(r[d],function(e){var t=L(e.target);if(typeof t===c&&u[t]){var n=u[t][e.type];typeof n===h&&n(e)}}))}function w(e,t){if(typeof e!==v)for(var n=Object.keys(e),i=n.length;i--;)t.style[n[i]]=e[n[i]]}function J(e,t){e.appendChild(C(t))}function z(e){if(typeof e!==v&&(M(e,"un"),B(e.eid),g(e.c)))for(var t=e.c.length;t--;)z(e.c[t])}function B(e){typeof e===c&&delete u[e]}function D(e,t){for(var n=Object.keys(u[t]),i=n.length;i--;)a.includes(n[i])&&e.removeEventListener(n[i],u[t][n[i]])}function I(){for(var e;e=d.shift();)e()}function M(e,t){typeof e===l&&typeof e[t]===h&&d.push(e[t])}module.exports={component:S,render:x,h:O},e.h=O,e.render=x,e.component=S}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.literaljs={})}(this,function(e){var t,n,i,o={},r={},f="eid",u=[],d={},s=[],a=["abort","blur","error","focus","load","mouseenter","mouseleave","resize","scroll","unload"],c="string",h="number",p="boolean",v="undefined",y="object",l="function",m="events",b="style",g="value";function k(e){return Array.isArray(e)}function S(){return Math.random().toString(36).substring(2)+(new Date).getTime().toString(36)}function j(e,t){for(var n=0,i=t.length;n<i;n++)k(t[n])?j(e,t[n]):e.push(t[n]);return e}function N(e,t){for(var n in t)e[n]=t[n];return e}function A(e,t,n){return N(N(e,t),n)}function O(e,t){for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];return{e:e,a:N({},t),c:j([],n)}}function x(e,r,f){void 0===f&&(f={}),o=N({},f),n=e,t=document.getElementById(r),i=L(e()),D(t,i),q()}function E(e){void 0===e&&(e={});var t=e.name;void 0===t&&(t="");var n=e.state;void 0===n&&(n={});var i=e.mounted;void 0===i&&(i=function(){});var f=e.updated;void 0===f&&(f=function(){});var u=e.unmounted;void 0===u&&(u=function(){});var d=e.methods;void 0===d&&(d=function(){});var s=e.render;void 0===s&&(s=function(){});var a=S();return function(e){return void 0===e&&(e={}),{id:a,init:function(){return this.id=a,this.name=t+(e.key?"":"_"+e.key),this.key=this.id+(this.name||""),this.props=e,this.store=o,this.getStore=C,this.setStore=function(e,t){typeof e===l&&(e=e(o)),o=A({},o,e),B(),typeof t===l&&t.bind(this)()}.bind(this),this.getState=function(){return N({},r[this.key])}.bind(this),this.setState=function(e,t){typeof e===l&&(e=e(r[this.key])),r[this.key]=A({},r[this.key],e),B(),typeof t===l&&t.bind(this)()}.bind(this),this.createState=function(){typeof r[this.key]===v&&(r[this.key]=n)}.bind(this)(),this.deleteState=function(){delete r[this.key]}.bind(this),this.mounted=i.bind(this),this.updated=f.bind(this),this.unmounted=u.bind(this),function(e,t){for(var n in typeof t===l&&(t=t.bind(e)()),t)e[n]=t[n].bind(e)}(this,d),this.render=s.bind(this),this}}}}function C(){return N({},o)}function L(e){if(typeof e===v)return e;if(typeof e.e===l){var t=N({},e.a.props);delete e.a.props,e=e.e(t)}if(typeof e.init===l){var n=new e.init;typeof(e=n.render())===y&&(e.id=n.id,e.m=n.mounted,e.up=n.updated,e.un=n.unmounted,e.d=n.deleteState)}if(k(e.c))for(var i=0,o=e.c.length;i<o;i++)e.c[i]=L(e.c[i]);return e}function T(e){var t=typeof e;if(t===c||t===h)return document.createTextNode(e);if(t===p||t===v)return document.createTextNode("");var n=document.createElement(e.e);if(typeof e.a===y)for(var i=Object.keys(e.a),o=i.length;o--;)i[o]===m?(e.eid=S(),J(e.eid,e.a[i[o]],n)):i[o]===b?z(e.a[i[o]],n):n.setAttribute(i[o],e.a[i[o]]);if(F(e,"m"),k(e.c))for(var r=0,f=e.c.length;r<f;r++)D(n,e.c[r]);return n}function w(e){if("#document"!==e.parentNode.nodeName){var t=e.getAttribute("data-"+f);return typeof t===c?t:w(e.parentNode)}}function J(e,n,i){i.setAttribute("data-"+f,e),d[e]=n;for(var o=Object.keys(n),r=o.length;r--;)a.includes(o[r])?i.addEventListener(o[r],d[e][o[r]]):u.includes(o[r])||(u.push(o[r]),t.addEventListener(o[r],function(e){var t=w(e.target);if(typeof t===c&&d[t]){var n=d[t][e.type];typeof n===l&&n(e)}}))}function z(e,t){if(typeof e!==v)for(var n=Object.keys(e),i=n.length;i--;)t.style[n[i]]=e[n[i]]}function B(e){var o=N({},i),r=L(n());i=r,function e(t,n,i,o){var r=typeof i,f=typeof o;if(f===v)D(t,i);else if(r===v)I(o),n.remove();else if(function(e,t,n,i){return n!==i||e.e!==t.e||e.id!==t.id||(n===c||n===h)&&e!==t}(i,o,r,f))I(o),t.replaceChild(T(i),n);else if(r===y){var u;!function(e,t,n){F(t,"up");for(var i,o,r=Object.keys(t.a),f=r.length;f--;)if(o=t.a[r[f]],i=n.a[r[f]],r[f]===b){if(a=typeof(d=i),(s=typeof(u=o))===y&&a===y&&JSON.stringify(u)===JSON.stringify(d)||s===v&&a===v)continue;e.removeAttribute(r[f]),z(o,e)}else r[f]===m?(_(e,n.eid),M(n.eid),t.eid=S(),J(t.eid,o,e)):r[f]===g&&o!==i?e.value=o:typeof i!==v&&o===i||e.setAttribute(r[f],o);var u,d,s,a}(n,i,o);for(var d=o.c.length;d--&&typeof i.c[d]===v;)typeof(u=n.lastChild)===y&&(I(o.c[d]),u.remove());for(var s=0,a=i.c.length;s<a;s++)e(n,n.childNodes[s],i.c[s],o.c[s])}}(t,t.firstChild,r,o),q()}function D(e,t){e.appendChild(T(t))}function I(e){if(typeof e!==v&&(F(e,"un"),F(e,"d"),M(e.eid),k(e.c)))for(var t=e.c.length;t--;)I(e.c[t])}function M(e){typeof e===c&&delete d[e]}function _(e,t){for(var n=Object.keys(d[t]),i=n.length;i--;)a.includes(n[i])&&e.removeEventListener(n[i],d[t][n[i]])}function q(){for(var e;e=s.shift();)e()}function F(e,t){typeof e===y&&typeof e[t]===l&&s.push(e[t])}module.exports={component:E,render:x,h:O},e.h=O,e.render=x,e.component=E}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "literaljs", | ||
"version": "6.0.6", | ||
"version": "7.0.0", | ||
"description": "A small JavaScript library for building reactive user interfaces.", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -12,11 +12,11 @@ <p align="center"> | ||
Recent 6.0.5 microbundle: | ||
Recent 7.0.0 microbundle: | ||
```js | ||
Build "literaljs" to build: | ||
1698 B: index.js.gz | ||
1465 B: index.js.br | ||
1701 B: index.m.js.gz | ||
1466 B: index.m.js.br | ||
1762 B: index.umd.js.gz | ||
1521 B: index.umd.js.br | ||
Build "literaljs" to build: | ||
1858 B: index.js.gz | ||
1613 B: index.js.br | ||
1861 B: index.m.js.gz | ||
1621 B: index.m.js.br | ||
1921 B: index.umd.js.gz | ||
1682 B: index.umd.js.br | ||
``` | ||
@@ -32,3 +32,4 @@ ### [Features and stuff](#features) | ||
- **Lifecycle Methods**: Components have the ability to trigger `mounted`, `updated`, and `unmounted` lifecycle functions. | ||
- **Global Application State**: One source of truth which makes other state management libraries (like Redux) less of a need. | ||
- **Global Application Store**: One source of truth which makes other state management libraries (like Redux) less of a need. | ||
- **Component State**: Manage state individually per component. | ||
- **Event Delegation**: Uses event delegation for most events within the application for increased performance. |
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
250762
571
34