aptechka 0.11.1 → 0.11.3

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.
Files changed (39) hide show
  1. package/client-lib/{ElementConstructor-rValMo8f.js → ElementConstructor-Be8H1POO.js} +42 -36
  2. package/client-lib/ElementConstructor-khLPmQ9V.cjs +1 -0
  3. package/client-lib/canvas/index.cjs +1 -1
  4. package/client-lib/canvas/index.js +2 -2
  5. package/client-lib/checkbox/index.cjs +1 -1
  6. package/client-lib/checkbox/index.js +2 -2
  7. package/client-lib/{createStylesheet-9nksoWW0.cjs → createStylesheet-BBBiyAsF.cjs} +1 -1
  8. package/client-lib/{createStylesheet-BrFGJ8Q7.js → createStylesheet-CE1yXWS_.js} +1 -1
  9. package/client-lib/element-constructor/index.cjs +1 -1
  10. package/client-lib/element-constructor/index.js +3 -3
  11. package/client-lib/{index-3R8YL-P3.js → index-D-RA8KFB.js} +2 -2
  12. package/client-lib/{index-CyQAdqFu.cjs → index-PReYu1AQ.cjs} +1 -1
  13. package/client-lib/{instantiate-D19vO5Ku.js → instantiate-B0Un_kqY.js} +1 -1
  14. package/client-lib/{instantiate-DF1bIAXR.cjs → instantiate-DV6kxhZl.cjs} +1 -1
  15. package/client-lib/jsx/index.cjs +1 -1
  16. package/client-lib/jsx/index.js +4 -4
  17. package/client-lib/modal/index.cjs +1 -1
  18. package/client-lib/modal/index.js +2 -2
  19. package/client-lib/popover/index.cjs +1 -1
  20. package/client-lib/popover/index.js +1 -1
  21. package/client-lib/router/index.cjs +1 -1
  22. package/client-lib/router/index.js +1 -1
  23. package/client-lib/scroll/index.cjs +1 -1
  24. package/client-lib/scroll/index.js +2 -2
  25. package/client-lib/select/index.cjs +1 -1
  26. package/client-lib/select/index.js +1 -1
  27. package/client-lib/{tags-BosXYPYv.cjs → tags-BdW7ATzD.cjs} +1 -1
  28. package/client-lib/{tags-D0kLlFdQ.js → tags-C75owfOo.js} +1 -1
  29. package/client-lib/theme/index.cjs +1 -1
  30. package/client-lib/theme/index.js +1 -1
  31. package/client-lib/tweaker/index.cjs +1 -1
  32. package/client-lib/tweaker/index.js +3 -3
  33. package/package.json +2 -1
  34. package/server-lib/optimizer/index.js +13 -8
  35. package/server-lib/optimizer/types.d.ts +7 -7
  36. package/server-lib/utils/buffer.d.ts +1 -0
  37. package/server-lib/utils/index.d.ts +1 -0
  38. package/server-lib/utils/index.js +7 -0
  39. package/client-lib/ElementConstructor-OK-6OPjh.cjs +0 -1
@@ -1 +0,0 @@
1
- "use strict";var Z=(f,e,t)=>{if(!e.has(f))throw TypeError("Cannot "+t)};var i=(f,e,t)=>(Z(f,e,"read from private field"),t?t.call(f):e.get(f)),a=(f,e,t)=>{if(e.has(f))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(f):e.set(f,t)},E=(f,e,t,s)=>(Z(f,e,"write to private field"),s?s.call(f,t):e.set(f,t),t);var r=(f,e,t)=>(Z(f,e,"access private method"),t);const y=require("./Store-Cr3VaD9G.cjs"),he=require("./browser-CpzFX2xg.cjs"),de=require("./object-CCiXnER2.cjs"),_=require("./string-DhgS_iFl.cjs"),we=require("./connector/index.cjs"),Le=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view"]);var o,u,l,w,m,g,P,ue,B,me,R,ge,L,j,T,ee,G,Se,$,Ee,W,ye,z,be,A,te,v,se,J,Ce,k,ie,M,ne,V,pe,x,oe,p,H,D,re,q,ae,F,ce,I,K;const U=class U{constructor(...e){a(this,P);a(this,B);a(this,R);a(this,L);a(this,T);a(this,G);a(this,$);a(this,W);a(this,z);a(this,A);a(this,v);a(this,J);a(this,k);a(this,M);a(this,V);a(this,x);a(this,p);a(this,D);a(this,q);a(this,F);a(this,o,null);a(this,u,new Set);a(this,l,new Set);a(this,w,void 0);a(this,m,void 0);a(this,g,void 0);a(this,I,e=>{i(this,u).forEach(t=>{t(e)}),i(this,u).clear()});a(this,K,(e,t)=>{i(this,l).forEach(s=>{s(e,t)}),i(this,l).clear(),r(this,M,ne).call(this)});if(he.isBrowser){const t=e[0],s=e[1];E(this,o,r(this,P,ue).call(this,t,s==null?void 0:s.forceSvg)),r(this,R,ge).call(this,s)}}get node(){return i(this,o)}set node(e){var t;r(this,M,ne).call(this),E(this,o,e),(t=i(this,w))==null||t.call(this),i(this,o)instanceof Element&&E(this,m,[...i(this,o).querySelectorAll("store-root")]),r(this,k,ie).call(this),r(this,L,j).call(this)}};o=new WeakMap,u=new WeakMap,l=new WeakMap,w=new WeakMap,m=new WeakMap,g=new WeakMap,P=new WeakSet,ue=function(e,t){let s=null;if(e instanceof Node)s=e;else if(typeof e=="string")if(!e.includes("<")&&e.includes("-"))s=new(customElements.get(e));else if(e.includes("<")){const n=document.createElement("div");n.innerHTML=e,s=n.firstElementChild}else Le.has(e)||t?s=document.createElementNS("http://www.w3.org/2000/svg",e):s=document.createElement(e);else s=document.createElement("div");return s},B=new WeakSet,me=function(e){return e instanceof HTMLElement||e instanceof SVGElement},R=new WeakSet,ge=function(e){if(!e)return;const t=r(this,B,me).call(this,i(this,o)),s=e.ref;delete e.ref,e!=null&&e.onConnect&&(i(this,u).add(e.onConnect),delete e.onConnect),e!=null&&e.onDisconnect&&(i(this,l).add(e.onDisconnect),delete e.onDisconnect);let n,c;for(const h in e){const d=e[h];h==="class"&&t?r(this,T,ee).call(this,d):h==="style"&&t?r(this,W,ye).call(this,d):h==="lightChildren"?r(this,p,H).call(this,i(this,o),d):h==="children"?r(this,p,H).call(this,i(this,o)instanceof Element?i(this,o).shadowRoot||i(this,o):i(this,o),d):h==="connectedClass"?i(this,u).add(()=>{requestAnimationFrame(()=>{i(this,o).classList.add(typeof d=="boolean"?"connected":d)})}):h.startsWith("on")?(c||(c={}),c[h]=d):(n||(n={}),n[h]=d)}r(this,V,pe).call(this,n),r(this,J,Ce).call(this,c),s&&(typeof s=="function"?s(i(this,o)):s.current=i(this,o)),r(this,L,j).call(this)},L=new WeakSet,j=function(){if(he.isBrowser&&(i(this,l).size||i(this,u).size)){const e=i(this,o)instanceof DocumentFragment?i(this,o).firstChild:i(this,o);E(this,w,we.connector.subscribe(e,{connectCallback:i(this,I),disconnectCallback:i(this,K),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},T=new WeakSet,ee=function(e){if(e){if(typeof e=="string")i(this,o).classList.add(e);else if(Array.isArray(e))e.forEach(t=>{t&&r(this,T,ee).call(this,t)});else if(typeof e=="object")if(e instanceof y.Store)r(this,G,Se).call(this,e);else for(const t in e){const s=e[t];s instanceof y.Store?r(this,$,Ee).call(this,t,s):s?i(this,o).classList.add(t):i(this,o).classList.remove(t)}}else return},G=new WeakSet,Se=function(e){i(this,l).add(e.subscribe(({current:t,previous:s})=>{s&&[s].flat().forEach(n=>{n&&i(this,o).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&i(this,o).classList.add(n)})}))},$=new WeakSet,Ee=function(e,t){i(this,l).add(t.subscribe(({current:s})=>{s?i(this,o).classList.add(e):i(this,o).classList.remove(e)}))},W=new WeakSet,ye=function(e){if(!e)return;i(this,o).tagName==="style"||i(this,o).tagName==="STYLE"?r(this,A,te).call(this,e):r(this,z,be).call(this,e)},z=new WeakSet,be=function(e){for(const t in e){const s=t,n=e[s];n instanceof y.Store?i(this,l).add(n.subscribe(({current:c})=>{r(this,v,se).call(this,s,c)})):r(this,v,se).call(this,s,n)}},A=new WeakSet,te=function(e){for(const t in e){const s=e[t];if(typeof s=="object"&&!(s instanceof y.Store))i(this,o).appendChild(document.createTextNode(`${t} {`)),r(this,A,te).call(this,s),i(this,o).appendChild(document.createTextNode("}"));else if(s instanceof y.Store){const n=document.createTextNode("");i(this,l).add(s.subscribe(c=>{c.current?n.nodeValue=`${_.camelToKebab(t)}: ${c.current};`:n.nodeValue=""})),i(this,o).appendChild(n)}else i(this,o).appendChild(document.createTextNode(`${_.camelToKebab(t)}: ${s};`))}},v=new WeakSet,se=function(e,t){e.includes("--")?t?i(this,o).style.setProperty(e,t.toString()):i(this,o).style.removeProperty(e):t?i(this,o).style[e]=t.toString():i(this,o).style[e]=""},J=new WeakSet,Ce=function(e){if(e){i(this,g)||E(this,g,[]);for(const t in e){const s=t,n=_.uncapitalize(s.split("on").slice(1).join("on")),c=e[s];typeof c=="object"?i(this,g).push({name:n,callback:c.callback,options:c.options}):typeof c=="function"&&i(this,g).push({name:n,callback:c})}r(this,k,ie).call(this)}},k=new WeakSet,ie=function(){var e;(e=i(this,g))==null||e.forEach(t=>{i(this,o).addEventListener(t.name,t.callback,t.options)})},M=new WeakSet,ne=function(){var e;(e=i(this,g))==null||e.forEach(t=>{i(this,o).removeEventListener(t.name,t.callback,t.options)})},V=new WeakSet,pe=function(e){for(const t in e){const s=e[t];s instanceof y.Store?i(this,l).add(s.subscribe(({current:n})=>{r(this,x,oe).call(this,t,n)})):r(this,x,oe).call(this,t,s)}},x=new WeakSet,oe=function(e,t){var n,c;const s=i(this,o);e in s&&!((c=(n=s.constructor)==null?void 0:n.observedAttributes)!=null&&c.includes(e))?t!=null&&(s[e]=t.toString()):t!=null&&s.setAttribute(e,t.toString())},p=new WeakSet,H=function(e,t){t&&(t=[t].flat(),t.forEach(s=>{if(s instanceof y.Store){const n=document.createElement("div");n.style.display="contents",e.appendChild(n),i(this,m)||E(this,m,[]);const c=i(this,m).length;n.setAttribute("store-root",""),i(this,m).push(n),i(this,l).add(s.subscribe(({current:h,previous:d})=>{const b=i(this,m)[c];b.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const Y=Array.from(b.childNodes),fe=Array.isArray(h)?h:[h],Ne=Array.isArray(d)?d:[d],le=[],Q=[];Y.length&&Ne.forEach((S,N)=>{fe.includes(S)?Q.push(S):le.push(Y[N])}),fe.forEach((S,N)=>{if(Q[N]!=null){if(S!==Q[N]){const C=r(this,q,ae).call(this,S),X=Y[N];C instanceof Node&&!X.isEqualNode(C)?b.replaceChild(C,X):b.removeChild(X)}}else{const C=r(this,q,ae).call(this,S);C instanceof Node&&n.appendChild(C)}}),le.forEach(S=>{b.removeChild(S)}),b.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(s instanceof U)r(this,D,re).call(this,e,s.node);else if(s instanceof Function)r(this,p,H).call(this,e,de.isESClass(s)?new s:s());else{const n=r(this,F,ce).call(this,s);n instanceof Node&&r(this,D,re).call(this,e,n)}}))},D=new WeakSet,re=function(e,t){!(e instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(i(this,u).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),i(this,l).add(()=>{t.remove()})):e.appendChild(t)},q=new WeakSet,ae=function(e){return e instanceof U?e.node:typeof e=="function"?de.isESClass(e)?new e:e():r(this,F,ce).call(this,e)},F=new WeakSet,ce=function(e){if(e instanceof Node)return e;if(e!=null){const t=String(e);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const s=document.createElement("div");return s.innerHTML=t,s.firstElementChild}else return document.createTextNode(t)}else return},I=new WeakMap,K=new WeakMap;let O=U;exports.ElementConstructor=O;