aptechka 0.7.10 → 0.8.0
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.
- package/lib/Animation-CwgyQH5y.js +110 -0
- package/lib/Animation-DBfrekcV.cjs +1 -0
- package/lib/{Composed-Dx2hs-va.cjs → Composed-CIXY_HwN.cjs} +1 -1
- package/lib/{Composed-DmLYTh1b.js → Composed-CgnR5oah.js} +1 -1
- package/lib/Damped-DmcKRSST.cjs +1 -0
- package/lib/Damped-vepIw9Ku.js +57 -0
- package/lib/{Derived-DlCvc0xQ.js → Derived-B4CxuebG.js} +1 -1
- package/lib/{Derived-a6MDQEPY.cjs → Derived-Xb4EzLLO.cjs} +1 -1
- package/lib/{SourceManager-kxr5eUyL.cjs → SourceManager-Ce49-NQe.cjs} +1 -1
- package/lib/{SourceManager-Bz329f90.js → SourceManager-U3KHUnNl.js} +1 -1
- package/lib/Store-CIs_NjhF.cjs +1 -0
- package/lib/Store-Dqcu1DnE.js +152 -0
- package/lib/{Tweened-B_mclQ61.cjs → Tweened-5Bj7ht3x.cjs} +1 -1
- package/lib/{Tweened-NE8M9onF.js → Tweened-DPi9pZ8Q.js} +1 -1
- package/lib/{Viewport-D9IL7kUQ.js → Viewport-4ZTWxLo_.js} +1 -1
- package/lib/{Viewport-CJeKnL5V.cjs → Viewport-CIBlSU2t.cjs} +1 -1
- package/lib/animation/Animation.d.ts +3 -18
- package/lib/animation/Damped.d.ts +2 -18
- package/lib/animation/Tweened.d.ts +2 -2
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.d.ts +2 -2
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.d.ts +3 -3
- package/lib/attribute/index.js +1 -1
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.d.ts +1 -0
- package/lib/canvas/index.js +63 -54
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +3 -3
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/{createStylesheet-p23sZ7Ey.cjs → createStylesheet-BX1RVTfW.cjs} +1 -1
- package/lib/{createStylesheet-CR_yi5tp.js → createStylesheet-CgWN4UhW.js} +1 -1
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.d.ts +3 -3
- package/lib/css-property/index.js +1 -1
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +1 -1
- package/lib/device/Viewport.d.ts +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/element-constructor/ElementConstructor.d.ts +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +113 -114
- package/lib/en3/helpers/index.cjs +1 -1
- package/lib/en3/helpers/index.js +2 -2
- package/lib/en3/misc/En3SourceManager.d.ts +2 -2
- package/lib/en3/misc/index.cjs +1 -1
- package/lib/en3/misc/index.js +2 -2
- package/lib/en3/objects/fluid/En3Fluid.d.ts +5 -5
- package/lib/en3/objects/fluid/Simulation.d.ts +10 -10
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +1 -1
- package/lib/{index-CoOTQk9H.js → index-C2xWAQFq.js} +3 -3
- package/lib/{index-DVUk3T-y.cjs → index-DfSyc2GT.cjs} +1 -1
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +1 -1
- package/lib/layout-box/index.d.ts +2 -2
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +7 -7
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +140 -133
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +2 -2
- package/lib/popover/PopoverElement.d.ts +1 -1
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +2 -2
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +73 -76
- package/lib/scroll/ScrollElement.d.ts +1 -1
- package/lib/scroll/ScrollSegmentElement.d.ts +6 -6
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +7 -7
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +1 -1
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +2 -2
- package/lib/store/Derived.d.ts +1 -1
- package/lib/store/Resource.d.ts +1 -4
- package/lib/store/Store.d.ts +10 -10
- package/lib/store/StoreRegistry.d.ts +1 -1
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +1 -3
- package/lib/store/index.js +38 -68
- package/lib/tags-C-6uXIAT.js +848 -0
- package/lib/tags-yvEoM921.cjs +1 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -2
- package/lib/tweaker/TweakerFieldElement.d.ts +3 -3
- package/lib/tweaker/TweakerFolderElement.d.ts +2 -2
- package/lib/tweaker/TweakerStoreManagerElement.d.ts +1 -1
- package/lib/tweaker/index.cjs +1 -1
- package/lib/tweaker/index.js +56 -56
- package/lib/tweaker/tweakerManagerConstructors.d.ts +1 -1
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +1 -1
- package/package.json +1 -65
- package/lib/Animation-6Na1MCtM.cjs +0 -1
- package/lib/Animation-CELiTw3n.js +0 -132
- package/lib/Damped-Mx_FNNVz.js +0 -63
- package/lib/Damped-loFiBsBy.cjs +0 -1
- package/lib/ElementConstructor-CAZ2ra8m.cjs +0 -1
- package/lib/ElementConstructor-OYlPJf2L.js +0 -366
- package/lib/Resource-D3TQormz.cjs +0 -1
- package/lib/Resource-DIcoALGo.js +0 -64
- package/lib/Store-6s0YXK4o.cjs +0 -1
- package/lib/Store-BI2xxXOA.js +0 -156
- package/lib/_createStore-Cf1MyeHa.cjs +0 -1
- package/lib/_createStore-Ck9bHolX.js +0 -12
- package/lib/globals-DMjysUXI.js +0 -8
- package/lib/globals-bYKki-b9.cjs +0 -1
- package/lib/instantiate-Cx-JmH6m.cjs +0 -1
- package/lib/instantiate-D87JFF1W.js +0 -125
- package/lib/jsx/ComponentElement.d.ts +0 -18
- package/lib/jsx/globals.d.ts +0 -13
- package/lib/jsx/h.d.ts +0 -7
- package/lib/jsx/hooks/basic/_createStore.d.ts +0 -4
- package/lib/jsx/hooks/basic/attachInternals.d.ts +0 -1
- package/lib/jsx/hooks/basic/attachShadow.d.ts +0 -1
- package/lib/jsx/hooks/basic/attachStylesheet.d.ts +0 -3
- package/lib/jsx/hooks/basic/createContext.d.ts +0 -2
- package/lib/jsx/hooks/basic/onConnect.d.ts +0 -3
- package/lib/jsx/hooks/basic/onDisconnect.d.ts +0 -3
- package/lib/jsx/hooks/onAnimationFrame.cjs +0 -1
- package/lib/jsx/hooks/onAnimationFrame.d.ts +0 -6
- package/lib/jsx/hooks/onAnimationFrame.js +0 -22
- package/lib/jsx/hooks/onElementResize.cjs +0 -1
- package/lib/jsx/hooks/onElementResize.d.ts +0 -5
- package/lib/jsx/hooks/onElementResize.js +0 -11
- package/lib/jsx/hooks/onIntersection.cjs +0 -1
- package/lib/jsx/hooks/onIntersection.d.ts +0 -5
- package/lib/jsx/hooks/onIntersection.js +0 -11
- package/lib/jsx/hooks/onWindowResize.cjs +0 -1
- package/lib/jsx/hooks/onWindowResize.d.ts +0 -3
- package/lib/jsx/hooks/onWindowResize.js +0 -8
- package/lib/jsx/hooks/store/createArrayStore.d.ts +0 -3
- package/lib/jsx/hooks/store/createComposed.d.ts +0 -3
- package/lib/jsx/hooks/store/createDerived.d.ts +0 -3
- package/lib/jsx/hooks/store/createDerivedArray.d.ts +0 -3
- package/lib/jsx/hooks/store/createDerivedComponent.d.ts +0 -3
- package/lib/jsx/hooks/store/createDerivedComponents.d.ts +0 -3
- package/lib/jsx/hooks/store/createResource.d.ts +0 -3
- package/lib/jsx/hooks/store/createStore.d.ts +0 -3
- package/lib/jsx/hooks/store/index.cjs +0 -1
- package/lib/jsx/hooks/store/index.d.ts +0 -7
- package/lib/jsx/hooks/store/index.js +0 -49
- package/lib/jsx/hooks/watchAttribute.cjs +0 -1
- package/lib/jsx/hooks/watchAttribute.d.ts +0 -6
- package/lib/jsx/hooks/watchAttribute.js +0 -17
- package/lib/jsx/hooks/watchCSSProperty.cjs +0 -1
- package/lib/jsx/hooks/watchCSSProperty.d.ts +0 -7
- package/lib/jsx/hooks/watchCSSProperty.js +0 -17
- package/lib/jsx/index.cjs +0 -1
- package/lib/jsx/index.d.ts +0 -13
- package/lib/jsx/index.js +0 -91
- package/lib/jsx/instantiate.d.ts +0 -5
- package/lib/jsx/register.d.ts +0 -1
- package/lib/jsx/render.d.ts +0 -6
- package/lib/jsx/type.d.ts +0 -188
- package/lib/onConnect-DGP866cj.cjs +0 -1
- package/lib/onConnect-y5DrxJ9P.js +0 -7
- package/lib/store/ArrayStore.d.ts +0 -21
- package/lib/store/DerivedArray.d.ts +0 -8
- package/lib/tags-BqJKcIve.js +0 -485
- package/lib/tags-ld5jemJw.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var Le=Object.defineProperty,qe=Object.defineProperties;var xe=Object.getOwnPropertyDescriptors;var de=Object.getOwnPropertySymbols;var Ae=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;var he=(e,t,r)=>t in e?Le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=(e,t)=>{for(var r in t||(t={}))Ae.call(t,r)&&he(e,r,t[r]);if(de)for(var r of de(t))Me.call(t,r)&&he(e,r,t[r]);return e},me=(e,t)=>qe(e,xe(t));var O=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var o=(e,t,r)=>(O(e,t,"read from private field"),r?r.call(e):t.get(e)),a=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},g=(e,t,r,i)=>(O(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r);var c=(e,t,r)=>(O(e,t,"access private method"),r);const y=require("./Store-CIs_NjhF.cjs"),we=require("./browser-CpzFX2xg.cjs"),pe=require("./object-CCiXnER2.cjs"),j=require("./string-DhgS_iFl.cjs"),De=require("./connector/index.cjs"),Fe=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 u,b,l,N,h,m,B,be,R,ge,$,ye,k,ee,T,te,G,Se,V,Ee,W,Ce,z,ve,L,ne,q,re,I,Ne,x,ie,A,oe,J,ke,M,se,v,P,D,ue,F,ce,H,ae,K,U;const Y=class Y{constructor(...t){a(this,B);a(this,R);a(this,$);a(this,k);a(this,T);a(this,G);a(this,V);a(this,W);a(this,z);a(this,L);a(this,q);a(this,I);a(this,x);a(this,A);a(this,J);a(this,M);a(this,v);a(this,D);a(this,F);a(this,H);a(this,u,null);a(this,b,new Set);a(this,l,new Set);a(this,N,void 0);a(this,h,void 0);a(this,m,void 0);a(this,K,()=>{o(this,b).forEach(t=>{t()}),o(this,b).clear()});a(this,U,t=>{o(this,l).forEach(r=>{r(t)}),o(this,l).clear(),c(this,A,oe).call(this)});if(we.isBrowser){const r=t[0],i=t[1];g(this,u,c(this,B,be).call(this,r,i==null?void 0:i.forceSvg)),c(this,$,ye).call(this,i)}}get node(){return o(this,u)}set node(t){var r;c(this,A,oe).call(this),g(this,u,t),(r=o(this,N))==null||r.call(this),o(this,u)instanceof Element&&g(this,h,[...o(this,u).querySelectorAll("store-root")]),c(this,x,ie).call(this),c(this,k,ee).call(this)}};u=new WeakMap,b=new WeakMap,l=new WeakMap,N=new WeakMap,h=new WeakMap,m=new WeakMap,B=new WeakSet,be=function(t,r){let i=null;if(t instanceof Node)i=t;else if(typeof t=="string")if(!t.includes("<")&&t.includes("-"))i=new(customElements.get(t));else if(t.includes("<")){const s=document.createElement("div");s.innerHTML=t,i=s.firstElementChild}else Fe.has(t)||r?i=document.createElementNS("http://www.w3.org/2000/svg",t):i=document.createElement(t);else i=document.createElement("div");return i},R=new WeakSet,ge=function(t){return t instanceof HTMLElement||t instanceof SVGElement},$=new WeakSet,ye=function(t){if(!t)return;const r=c(this,R,ge).call(this,o(this,u)),i=t.ref;delete t.ref,t!=null&&t.onConnect&&(o(this,b).add(t.onConnect),delete t.onConnect),t!=null&&t.onDisconnect&&(o(this,l).add(t.onDisconnect),delete t.onDisconnect);let s,f;for(const d in t){const w=t[d];d==="class"&&r?c(this,T,te).call(this,w):d==="style"&&r?c(this,W,Ce).call(this,w):d==="lightChildren"?c(this,v,P).call(this,o(this,u),w):d==="children"?c(this,v,P).call(this,o(this,u)instanceof Element?o(this,u).shadowRoot||o(this,u):o(this,u),w):d.startsWith("on")?(f||(f={}),f[d]=w):(s||(s={}),s[d]=w)}c(this,J,ke).call(this,s),c(this,I,Ne).call(this,f),i&&(typeof i=="function"?i(o(this,u)):i.current=o(this,u)),c(this,k,ee).call(this)},k=new WeakSet,ee=function(){if(we.isBrowser&&(o(this,l).size||o(this,b).size)){const t=o(this,u)instanceof DocumentFragment?o(this,u).firstChild:o(this,u);g(this,N,De.connector.subscribe(t,{connectCallback:o(this,K),disconnectCallback:o(this,U),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},T=new WeakSet,te=function(t){if(t){if(typeof t=="string")o(this,u).classList.add(t);else if(Array.isArray(t))t.forEach(r=>{c(this,T,te).call(this,r)});else if(typeof t=="object")if(t instanceof y.Store)c(this,G,Se).call(this,t);else for(const r in t){const i=t[r];i instanceof y.Store?c(this,V,Ee).call(this,r,i):i?o(this,u).classList.add(r):o(this,u).classList.remove(r)}}else return},G=new WeakSet,Se=function(t){o(this,l).add(t.subscribe(({current:r,previous:i})=>{i&&[i].flat().forEach(s=>{s&&o(this,u).classList.remove(s)}),r&&[r].flat().forEach(s=>{s&&o(this,u).classList.add(s)})}))},V=new WeakSet,Ee=function(t,r){o(this,l).add(r.subscribe(({current:i})=>{i?o(this,u).classList.add(t):o(this,u).classList.remove(t)}))},W=new WeakSet,Ce=function(t){if(!t)return;o(this,u).tagName==="style"||o(this,u).tagName==="STYLE"?c(this,L,ne).call(this,t):c(this,z,ve).call(this,t)},z=new WeakSet,ve=function(t){for(const r in t){const i=r,s=t[i];s instanceof y.Store?o(this,l).add(s.subscribe(({current:f})=>{c(this,q,re).call(this,i,f)})):c(this,q,re).call(this,i,s)}},L=new WeakSet,ne=function(t){for(const r in t){const i=t[r];if(typeof i=="object"&&!(i instanceof y.Store))o(this,u).appendChild(document.createTextNode(`${r} {`)),c(this,L,ne).call(this,i),o(this,u).appendChild(document.createTextNode("}"));else if(i instanceof y.Store){const s=document.createTextNode("");o(this,l).add(i.subscribe(f=>{f.current?s.nodeValue=`${j.camelToKebab(r)}: ${f.current};`:s.nodeValue=""})),o(this,u).appendChild(s)}else o(this,u).appendChild(document.createTextNode(`${j.camelToKebab(r)}: ${i};`))}},q=new WeakSet,re=function(t,r){t.includes("--")?r?o(this,u).style.setProperty(t,r.toString()):o(this,u).style.removeProperty(t):r?o(this,u).style[t]=r.toString():o(this,u).style[t]=""},I=new WeakSet,Ne=function(t){if(t){o(this,m)||g(this,m,[]);for(const r in t){const i=r,s=j.uncapitalize(i.split("on").slice(1).join("on")),f=t[i];typeof f=="object"?o(this,m).push({name:s,callback:f.callback,options:f.options}):typeof f=="function"&&o(this,m).push({name:s,callback:f})}c(this,x,ie).call(this)}},x=new WeakSet,ie=function(){var t;(t=o(this,m))==null||t.forEach(r=>{o(this,u).addEventListener(r.name,r.callback,r.options)})},A=new WeakSet,oe=function(){var t;(t=o(this,m))==null||t.forEach(r=>{o(this,u).removeEventListener(r.name,r.callback,r.options)})},J=new WeakSet,ke=function(t){for(const r in t){const i=t[r];i instanceof y.Store?o(this,l).add(i.subscribe(({current:s})=>{c(this,M,se).call(this,r,s)})):c(this,M,se).call(this,r,i)}},M=new WeakSet,se=function(t,r){var s,f;const i=o(this,u);t in i&&!((f=(s=i.constructor)==null?void 0:s.observedAttributes)!=null&&f.includes(t))?r!=null&&(i[t]=r.toString()):r!=null&&i.setAttribute(t,r.toString())},v=new WeakSet,P=function(t,r){r&&(r=[r].flat(),r.forEach(i=>{if(i instanceof y.Store){const s=document.createElement("div");s.style.display="contents",t.appendChild(s),o(this,h)||g(this,h,[]);const f=o(this,h).length;s.setAttribute("store-root",""),o(this,h).push(s),o(this,l).add(i.subscribe(({current:d,previous:w})=>{const S=o(this,h)[f];S.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const Q=Array.from(S.childNodes),fe=[d].flat(),Te=[w].flat(),le=[],X=[];Te.forEach((p,E)=>{!fe.includes(p)&&Q[E]?le.push(Q[E]):X.push(p)}),fe.forEach((p,E)=>{if(X[E]){if(p!==X[E]){const C=c(this,F,ce).call(this,p),Z=Q[E];C instanceof Node?Z.isEqualNode(C)||S.replaceChild(C,Z):S.removeChild(Z)}}else{const C=c(this,F,ce).call(this,p);C instanceof Node&&s.appendChild(C)}}),le.forEach(p=>{S.removeChild(p)}),S.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Y)c(this,D,ue).call(this,t,i.node);else if(i instanceof Function)c(this,v,P).call(this,t,pe.isESClass(i)?new i:i());else{const s=c(this,H,ae).call(this,i);s instanceof Node&&c(this,D,ue).call(this,t,s)}}))},D=new WeakSet,ue=function(t,r){!(t instanceof ShadowRoot)&&r instanceof HTMLElement&&r.tagName==="STYLE"?(o(this,b).add(()=>{[...document.head.querySelectorAll("style")].find(s=>s.outerHTML===r.outerHTML)||document.head.appendChild(r)}),o(this,l).add(()=>{r.remove()})):t.appendChild(r)},F=new WeakSet,ce=function(t){return t instanceof Y?t.node:typeof t=="function"?pe.isESClass(t)?new t:t():c(this,H,ae).call(this,t)},H=new WeakSet,ae=function(t){if(t instanceof Node)return t;if(t!=null){const r=String(t);if(r.trim().startsWith("<")&&r.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=r,i.firstElementChild}else return document.createTextNode(r)}else return},K=new WeakMap,U=new WeakMap;let n=Y;function He(...e){return new n(...e)}function Pe(e){return new n("a",e)}function Be(e){return new n("abbr",e)}function Re(e){return new n("address",e)}function $e(e){return new n("area",e)}function Ge(e){return new n("article",e)}function Ve(e){return new n("aside",e)}function We(e){return new n("audio",e)}function ze(e){return new n("b",e)}function Ie(e){return new n("base",e)}function Je(e){return new n("bdi",e)}function Ke(e){return new n("bdo",e)}function Ue(e){return new n("blockquote",e)}function Ye(e){return new n("body",e)}function Qe(e){return new n("br",e)}function Xe(e){return new n("button",e)}function Ze(e){return new n("canvas",e)}function _e(e){return new n("caption",e)}function Oe(e){return new n("cite",e)}function je(e){return new n("code",e)}function et(e){return new n("col",e)}function tt(e){return new n("colgroup",e)}function nt(e){return new n("data",e)}function rt(e){return new n("datalist",e)}function it(e){return new n("dd",e)}function ot(e){return new n("del",e)}function st(e){return new n("details",e)}function ut(e){return new n("dfn",e)}function ct(e){return new n("dialog",e)}function at(e){return new n("div",e)}function ft(e){return new n("dl",e)}function lt(e){return new n("dt",e)}function dt(e){return new n("em",e)}function ht(e){return new n("embed",e)}function mt(e){return new n("fieldset",e)}function wt(e){return new n("figcaption",e)}function pt(e){return new n("figure",e)}function bt(e){return new n("footer",e)}function gt(e){return new n("form",e)}function yt(e){return new n("h1",e)}function St(e){return new n("h2",e)}function Et(e){return new n("h3",e)}function Ct(e){return new n("h4",e)}function vt(e){return new n("h5",e)}function Nt(e){return new n("h6",e)}function kt(e){return new n("head",e)}function Tt(e){return new n("header",e)}function Lt(e){return new n("hgroup",e)}function qt(e){return new n("hr",e)}function xt(e){return new n("html",e)}function At(e){return new n("i",e)}function Mt(e){return new n("iframe",e)}function Dt(e){return new n("img",e)}function Ft(e){return new n("input",e)}function Ht(e){return new n("ins",e)}function Pt(e){return new n("kbd",e)}function Bt(e){return new n("label",e)}function Rt(e){return new n("legend",e)}function $t(e){return new n("li",e)}function Gt(e){return new n("link",e)}function Vt(e){return new n("main",e)}function Wt(e){return new n("map",e)}function zt(e){return new n("mark",e)}function It(e){return new n("menu",e)}function Jt(e){return new n("meta",e)}function Kt(e){return new n("meter",e)}function Ut(e){return new n("nav",e)}function Yt(e){return new n("noscript",e)}function Qt(e){return new n("object",e)}function Xt(e){return new n("ol",e)}function Zt(e){return new n("optgroup",e)}function _t(e){return new n("option",e)}function Ot(e){return new n("output",e)}function jt(e){return new n("p",e)}function en(e){return new n("picture",e)}function tn(e){return new n("pre",e)}function nn(e){return new n("progress",e)}function rn(e){return new n("q",e)}function on(e){return new n("rp",e)}function sn(e){return new n("rt",e)}function un(e){return new n("ruby",e)}function cn(e){return new n("s",e)}function an(e){return new n("samp",e)}function fn(e){return new n("script",e)}function ln(e){return new n("search",e)}function dn(e){return new n("section",e)}function hn(e){return new n("select",e)}function mn(e){return new n("slot",e)}function wn(e){return new n("small",e)}function pn(e){return new n("source",e)}function bn(e){return new n("span",e)}function gn(e){return new n("strong",e)}function yn(e){return new n("style",{style:e})}function Sn(e){return new n("sub",e)}function En(e){return new n("summary",e)}function Cn(e){return new n("sup",e)}function vn(e){return new n("table",e)}function Nn(e){return new n("tbody",e)}function kn(e){return new n("td",e)}function Tn(e){return new n("template",e)}function Ln(e){return new n("textarea",e)}function qn(e){return new n("tfoot",e)}function xn(e){return new n("th",e)}function An(e){return new n("thead",e)}function Mn(e){return new n("time",e)}function Dn(e){return new n("title",e)}function Fn(e){return new n("tr",e)}function Hn(e){return new n("track",e)}function Pn(e){return new n("u",e)}function Bn(e){return new n("ul",e)}function Rn(e){return new n("var",e)}function $n(e){return new n("video",e)}function Gn(e){return new n("wbr",e)}function Vn(e){return new n(document.createDocumentFragment(),e)}function Wn(e){return new n(document.createTextNode(""),e)}function zn(e){return new n("div",me(_({},e),{style:_({display:"contents"},e==null?void 0:e.style)}))}exports.ElementConstructor=n;exports.a=Pe;exports.abbr=Be;exports.address=Re;exports.area=$e;exports.article=Ge;exports.aside=Ve;exports.audio=We;exports.b=ze;exports.base=Ie;exports.bdi=Je;exports.bdo=Ke;exports.blockquote=Ue;exports.body=Ye;exports.br=Qe;exports.button=Xe;exports.canvas=Ze;exports.caption=_e;exports.cite=Oe;exports.code=je;exports.col=et;exports.colgroup=tt;exports.contents=zn;exports.data=nt;exports.datalist=rt;exports.dd=it;exports.del=ot;exports.details=st;exports.dfn=ut;exports.dialog=ct;exports.div=at;exports.dl=ft;exports.dt=lt;exports.element=He;exports.em=dt;exports.embed=ht;exports.empty=Wn;exports.fieldset=mt;exports.figcaption=wt;exports.figure=pt;exports.footer=bt;exports.form=gt;exports.fragment=Vn;exports.h1=yt;exports.h2=St;exports.h3=Et;exports.h4=Ct;exports.h5=vt;exports.h6=Nt;exports.head=kt;exports.header=Tt;exports.hgroup=Lt;exports.hr=qt;exports.html=xt;exports.htmlVar=Rn;exports.i=At;exports.iframe=Mt;exports.img=Dt;exports.input=Ft;exports.ins=Ht;exports.kbd=Pt;exports.label=Bt;exports.legend=Rt;exports.li=$t;exports.link=Gt;exports.main=Vt;exports.map=Wt;exports.mark=zt;exports.menu=It;exports.meta=Jt;exports.meter=Kt;exports.nav=Ut;exports.noscript=Yt;exports.object=Qt;exports.ol=Xt;exports.optgroup=Zt;exports.option=_t;exports.output=Ot;exports.p=jt;exports.picture=en;exports.pre=tn;exports.progress=nn;exports.q=rn;exports.rp=on;exports.rt=sn;exports.ruby=un;exports.s=cn;exports.samp=an;exports.script=fn;exports.search=ln;exports.section=dn;exports.select=hn;exports.slot=mn;exports.small=wn;exports.source=pn;exports.span=bn;exports.strong=gn;exports.style=yn;exports.sub=Sn;exports.summary=En;exports.sup=Cn;exports.table=vn;exports.tbody=Nn;exports.td=kn;exports.template=Tn;exports.textarea=Ln;exports.tfoot=qn;exports.th=xn;exports.thead=An;exports.time=Mn;exports.title=Dn;exports.tr=Fn;exports.track=Hn;exports.u=Pn;exports.ul=Bn;exports.video=$n;exports.wbr=Gn;
|
package/lib/theme/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-CIs_NjhF.cjs");const t=require("../browser-CpzFX2xg.cjs"),o=require("../tags-yvEoM921.cjs"),a=require("../createTheme-Cfaw9UmV.cjs"),r=a.createTheme({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(t.isBrowser){const e=o.style({":root":r.style}).node;e.setAttribute("data-permanent",""),document.head.appendChild(e)}exports.aptechkaTheme=r;
|
package/lib/theme/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../Store-
|
|
1
|
+
import "../Store-Dqcu1DnE.js";
|
|
2
2
|
import { i as e } from "../browser-0zX67oeU.js";
|
|
3
|
-
import {
|
|
3
|
+
import { aD as r } from "../tags-C-6uXIAT.js";
|
|
4
4
|
import { c as t } from "../createTheme-CHnsCgAr.js";
|
|
5
5
|
const a = t(
|
|
6
6
|
{
|
|
@@ -3,15 +3,15 @@ import { CustomElement } from '../custom-element';
|
|
|
3
3
|
import { StoreManagerType } from '../store/Store';
|
|
4
4
|
|
|
5
5
|
export interface TweakerFieldParameters {
|
|
6
|
-
store: Store<any, StoreManagerType
|
|
6
|
+
store: Store<any, StoreManagerType>;
|
|
7
7
|
}
|
|
8
8
|
export declare class TweakerFieldElement extends CustomElement {
|
|
9
9
|
#private;
|
|
10
10
|
constructor(parameters: TweakerFieldParameters);
|
|
11
11
|
get key(): string;
|
|
12
12
|
get name(): string;
|
|
13
|
-
get stores(): Store<any, keyof import('../store').StoreManagers
|
|
14
|
-
addStore(store: Store<any, any
|
|
13
|
+
get stores(): Store<any, keyof import('../store').StoreManagers>[];
|
|
14
|
+
addStore(store: Store<any, any>): void;
|
|
15
15
|
protected connectedCallback(): void;
|
|
16
16
|
protected disconnectedCallback(): void;
|
|
17
17
|
}
|
|
@@ -11,8 +11,8 @@ export declare class TweakerFolderElement extends AccordionElement {
|
|
|
11
11
|
#private;
|
|
12
12
|
constructor(parameters: TweakerFolderParameters);
|
|
13
13
|
get key(): string;
|
|
14
|
-
get head(): Store<any, keyof import('../store').StoreManagers
|
|
15
|
-
get content(): Store<(TweakerFieldElement | TweakerFolderElement)[], keyof import('../store').StoreManagers
|
|
14
|
+
get head(): Store<any, keyof import('../store').StoreManagers>;
|
|
15
|
+
get content(): Store<(TweakerFieldElement | TweakerFolderElement)[], keyof import('../store').StoreManagers>;
|
|
16
16
|
get bodyElement(): HTMLElement;
|
|
17
17
|
get contentElement(): HTMLElement;
|
|
18
18
|
protected connectedCallback(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CustomElement } from '../custom-element';
|
|
2
2
|
import { Store } from '../store';
|
|
3
3
|
|
|
4
|
-
export declare class TweakerStoreManagerElement<S extends Store<any, any
|
|
4
|
+
export declare class TweakerStoreManagerElement<S extends Store<any, any>> extends CustomElement {
|
|
5
5
|
#private;
|
|
6
6
|
constructor(...stores: Array<S>);
|
|
7
7
|
addStore(store: S): void;
|
package/lib/tweaker/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var qe=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var p=(t,e,r)=>(qe(t,e,"read from private field"),r?r.call(t):e.get(t)),j=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},C=(t,e,r,i)=>(qe(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r);const Qe=require("../browser-CpzFX2xg.cjs"),y=require("../custom-element/index.cjs"),g=require("../Store-6s0YXK4o.cjs"),Ue=require("../file-EevnUtRj.cjs"),et=require("../function-MthRj-GJ.cjs"),Ne=require("../gestures-DHLrn6Q8.cjs"),o=require("../tags-ld5jemJw.cjs"),E=require("../createStylesheet-p23sZ7Ey.cjs"),tt=require("../Viewport-CJeKnL5V.cjs"),c=require("../theme/index.cjs"),rt=require("../accordion/index.cjs"),st=require("../index-DVUk3T-y.cjs"),it=require("../events-BGwqaxVW.cjs");require("../checkbox/index.cjs");const at=require("../math-GDWEqu7y.cjs"),Te=require("../polyfills-CM4SCDTt.cjs"),Ve=require("../element-resizer/index.cjs"),Ke='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Ze='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',nt='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',ot='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>';var I,_,P;class lt{constructor(){j(this,I,void 0);j(this,_,void 0);j(this,P,void 0);this.scrollValue=0,C(this,I,""),C(this,_,[]),C(this,P,{}),C(this,I,g.storeRegistry.projectName+"-studio")}openPanel(e){p(this,_).includes(e)||p(this,_).push(e)}closePanel(e){C(this,_,p(this,_).filter(r=>r!==e))}isPanelOpened(e){return p(this,_).includes(e)}changedSizes(e){return p(this,P)[e]}changeSize(e,r){r?p(this,P)[e]=r:delete p(this,P)[e]}save(){const e={openedPanels:p(this,_),changedSizes:p(this,P),scrollValue:this.scrollValue};localStorage.setItem(p(this,I),JSON.stringify(e)),g.storeRegistry.saveState()}load(){g.storeRegistry.loadState();const e=localStorage.getItem(p(this,I));if(e)try{const r=JSON.parse(e);r.openedPanels&&C(this,_,r.openedPanels),r.changedSizes&&C(this,P,r.changedSizes),r.scrollValue&&(this.scrollValue=r.scrollValue)}catch(r){console.error(r)}}}I=new WeakMap,_=new WeakMap,P=new WeakMap;const w=new lt;var O;class N extends y.CustomElement{constructor(...r){super();j(this,O,void 0);C(this,O,r)}addStore(r){p(this,O).push(r)}get firstStore(){return p(this,O)[0]}get stores(){return p(this,O)}updateStores(r){p(this,O).forEach(i=>{i.current=r})}}O=new WeakMap;var ht=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,dt=(t,e,r,i)=>{for(var s=i>1?void 0:i?ct(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&ht(e,r,s),s};const pt=E.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:c.aptechkaTheme.borderRadiusSmall.var}});let Ee=class extends N{constructor(...t){super(...t),this.openShadow(pt),o.element(this,{children:[o.element("e-checkbox",{onChange:e=>{this.updateStores(e.currentTarget.checked)},ref:e=>{this.firstStore.subscribe(r=>{e.checked=r.current})}})]})}};Ee=dt([y.define("e-tweaker-boolean-manager")],Ee);var ut=Object.defineProperty,gt=Object.getOwnPropertyDescriptor,vt=(t,e,r,i)=>{for(var s=i>1?void 0:i?gt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&ut(e,r,s),s};const ft=E.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:c.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:c.aptechkaTheme.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});let Me=class extends N{constructor(...t){super(...t),this.openShadow(ft),o.element(this,{children:[o.input({type:"color",value:this.firstStore,onInput:e=>{this.updateStores(e.currentTarget.value)}})]})}};Me=vt([y.define("e-tweaker-color-manager")],Me);var wt=Object.defineProperty,mt=Object.getOwnPropertyDescriptor,bt=(t,e,r,i)=>{for(var s=i>1?void 0:i?mt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&wt(e,r,s),s};const _t=E.createStylesheet({a:{color:"inherit"}});let $e=class extends N{constructor(...t){var e,r;super(...t),this.openShadow(_t),o.element(this,{children:[o.a({href:this.firstStore,target:(r=(e=this.firstStore.passport)==null?void 0:e.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}};$e=bt([y.define("e-tweaker-link-manager")],$e);var yt=Object.defineProperty,St=Object.getOwnPropertyDescriptor,kt=(t,e,r,i)=>{for(var s=i>1?void 0:i?St(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&yt(e,r,s),s},Ie=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},l=(t,e,r)=>(Ie(t,e,"read from private field"),r?r.call(t):e.get(t)),u=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},M=(t,e,r,i)=>(Ie(t,e,"write to private field"),e.set(t,r),r),m=(t,e,r)=>(Ie(t,e,"access private method"),r),L,ee,B,z,D,se,ie,T,V,ae,ne,F,q,oe,ze,be,Ae,te,_e,le;const xt=E.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${c.aptechkaTheme.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${c.aptechkaTheme.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:c.aptechkaTheme.colorFont.var,borderRadius:c.aptechkaTheme.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});let Oe=class extends N{constructor(...t){var e,r,i,s,n,a,W,K;super(...t),u(this,F),u(this,oe),u(this,be),u(this,te),u(this,L,[]),u(this,ee,[]),u(this,B,void 0),u(this,z,void 0),u(this,D,void 0),u(this,se,void 0),u(this,ie,void 0),u(this,T,void 0),u(this,V,!1),u(this,ae,Z=>{const b=m(this,F,q).call(this,Z);return b.map((v,H)=>{const Se=typeof v=="string"?parseFloat(v)||l(this,z):v,S=at.clamp(Se,l(this,z),l(this,D)),ke=Te.toStep(S,l(this,B));b[H]=ke}),l(this,ie)==="number"?b[0]:b}),u(this,ne,()=>{m(this,F,q).call(this).map((Z,b)=>{const v=l(this,L)[b];v&&(v.value=(Z||0).toString())}),m(this,oe,ze).call(this)}),u(this,le,()=>{m(this,oe,ze).call(this)}),this.openShadow(xt),M(this,z,Te.nullishCoalescing((r=(e=this.firstStore.passport)==null?void 0:e.manager)==null?void 0:r.min,-1/0)),M(this,D,Te.nullishCoalescing((s=(i=this.firstStore.passport)==null?void 0:i.manager)==null?void 0:s.max,1/0)),M(this,B,((a=(n=this.firstStore.passport)==null?void 0:n.manager)==null?void 0:a.step)||.01),M(this,se,((K=(W=this.firstStore.passport)==null?void 0:W.manager)==null?void 0:K.ease)||1),M(this,ie,Array.isArray(this.firstStore.current)?"array":"number"),M(this,T,isFinite(l(this,D))&&isFinite(l(this,z))),o.element(this,{class:l(this,T)?"":"infinite",children:m(this,F,q).call(this).map((Z,b)=>o.div({class:"inputs-wrapper",children:[o.input({type:"number",step:l(this,B),min:l(this,z),max:l(this,D),ref:v=>l(this,L).push(v),value:Z,onChange:()=>{this.updateStores(l(this,L).map(v=>parseFloat(v.value)))}}),o.div({class:"drag",children:[o.div({class:"drag-knob",ref:v=>l(this,ee).push(v),onPointerdown:v=>{v.preventDefault(),M(this,V,!0);const H=m(this,F,q).call(this),Se=H[b],S=l(this,ee)[b],ke=l(this,L)[b];if(S&&ke){const xe=S.parentElement,Je=m(this,be,Ae).call(this);xe.classList.add("grabbing"),Ne.setupDrag(Ce=>{const Le=Ce.x-v.x,Be=l(this,T)?xe.offsetWidth/(Je||1):1,Xe=Se+Le/Be*l(this,se);if(H[b]=Xe,!l(this,T)){const Ye=m(this,te,_e).call(this,S,0);S.style.transform=`translateX(${Ye+Le}px)`}this.updateStores([...H])},()=>{if(M(this,V,!1),!l(this,T)){const Ce=m(this,te,_e).call(this,S,0);S.style.transition="transform 0.1s",S.style.transform=`translateX(${Ce}px)`,xe.classList.remove("grabbing"),setTimeout(()=>{S.style.transition=""},100)}})}},children:o.div({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(l(this,ae)),this.firstStore.subscribe(l(this,ne)),Ve.elementResizer.subscribe(this,l(this,le))}disconnectedCallback(){this.firstStore.removeMiddleware(l(this,ae)),this.firstStore.unsubscribe(l(this,ne)),Ve.elementResizer.unsubscribe(l(this,le))}};L=new WeakMap;ee=new WeakMap;B=new WeakMap;z=new WeakMap;D=new WeakMap;se=new WeakMap;ie=new WeakMap;T=new WeakMap;V=new WeakMap;ae=new WeakMap;ne=new WeakMap;F=new WeakSet;q=function(t=this.firstStore.current){return Array.isArray(t)?t:[t]};oe=new WeakSet;ze=function(){m(this,F,q).call(this).map((t,e)=>{const r=l(this,ee)[e];if(r&&(!l(this,V)||l(this,V)&&l(this,T))){const i=m(this,te,_e).call(this,r,t);r.style.transform=`translateX(${i}px)`}})};be=new WeakSet;Ae=function(){return l(this,T)?l(this,D)-l(this,z):0};te=new WeakSet;_e=function(t,e){const r=t.parentElement,i=m(this,be,Ae).call(this),s=i?e/i:.5;return(r.offsetWidth-t.offsetWidth)*s};le=new WeakMap;Oe=kt([y.define("e-tweaker-number-manager")],Oe);var Ct=Object.defineProperty,Tt=Object.getOwnPropertyDescriptor,Pt=(t,e,r,i)=>{for(var s=i>1?void 0:i?Tt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Ct(e,r,s),s};const Et=E.createStylesheet({"e-select":{width:"100%","--arrow-color":c.aptechkaTheme.colorFont.var},"e-select-head":{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},"e-select-option":{transitionDuration:"var(--duration-short)",transitionProperty:"color"},"e-select-option:hover":{color:c.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});let We=class extends N{constructor(...t){var r,i;super(...t),this.openShadow(Et);const e=((i=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:i.variants)||[];o.element(this,{children:o.element("e-select",{value:this.firstStore,onChange:s=>{this.updateStores(s.currentTarget.value)},lightChildren:[o.element("e-select-head",{lightChildren:[o.span({"data-value-holder":""})]}),...e.map((s,n)=>o.element("e-select-option",{lightChildren:s,default:n===0?!0:null}))]})})}};We=Pt([y.define("e-tweaker-select-manager")],We);var Mt=Object.defineProperty,$t=Object.getOwnPropertyDescriptor,zt=(t,e,r,i)=>{for(var s=i>1?void 0:i?$t(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Mt(e,r,s),s};const Ot=E.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var}});let Re=class extends N{constructor(...t){super(...t),this.openShadow(Ot),o.element(this,{children:[o.input({class:"text-input",type:"string",value:this.firstStore,onChange:e=>{this.updateStores(e.currentTarget.value)}})]})}};Re=zt([y.define("e-tweaker-string-manager")],Re);const Wt={boolean:Ee,color:Me,link:$e,number:Oe,select:We,string:Re};var Rt=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,Ft=(t,e,r,i)=>{for(var s=i>1?void 0:i?Dt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Rt(e,r,s),s},He=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},d=(t,e,r)=>(He(t,e,"read from private field"),r?r.call(t):e.get(t)),R=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},A=(t,e,r,i)=>(He(t,e,"write to private field"),e.set(t,r),r),k,X,Y,Q,U,he,ce;const It=E.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:c.aptechkaTheme.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:c.aptechkaTheme.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:c.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});let ye=class extends y.CustomElement{constructor(t){var r,i,s,n;super(),R(this,k,[]),R(this,X,void 0),R(this,Y,void 0),R(this,Q,!1),R(this,U,void 0),R(this,he,()=>{g.activeStores.current.find(a=>d(this,k).includes(a))||this.remove()}),R(this,ce,a=>{d(this,Q)&&((a.metaKey||a.ctrlKey)&&a.code==="KeyC"?navigator.clipboard.writeText(d(this,k)[0].current):(a.metaKey||a.ctrlKey)&&a.code==="KeyR"&&(d(this,k).forEach(W=>{W.reset()}),a.preventDefault()))}),A(this,k,[t.store]),A(this,X,t.store.passport.name),A(this,Y,d(this,X).split(".").slice(-1).toString());const e=((i=(r=t.store.passport)==null?void 0:r.manager)==null?void 0:i.type)||"string";A(this,U,new Wt[e](d(this,k)[0])),this.openShadow(It),o.element(this,{class:{disabled:((n=(s=t.store.passport)==null?void 0:s.manager)==null?void 0:n.disabled)||!1},onPointerleave:()=>{A(this,Q,!1)},onPointerenter:()=>{A(this,Q,!0)},children:[o.div({class:"head",children:[o.div({class:"name",children:d(this,Y)+":"}),o.div({class:"head-buttons",children:[o.button({class:"head-button",children:Ze,onClick:()=>{navigator.clipboard.writeText(d(this,k)[0].current)}}),o.button({class:"head-button",children:Ke,onClick:()=>{d(this,k).forEach(a=>{a.reset()})}})]})]}),d(this,U)]})}get key(){return d(this,X)}get name(){return d(this,Y)}get stores(){return d(this,k)}addStore(t){d(this,U).addStore(t)}connectedCallback(){g.activeStores.subscribe(d(this,he)),addEventListener("keydown",d(this,ce)),it.dispatchSizeChangeEvent(this)}disconnectedCallback(){g.activeStores.unsubscribe(d(this,he)),removeEventListener("keydown",d(this,ce))}};k=new WeakMap;X=new WeakMap;Y=new WeakMap;Q=new WeakMap;U=new WeakMap;he=new WeakMap;ce=new WeakMap;ye=Ft([y.define("e-tweaker-field")],ye);var At=Object.defineProperty,Lt=Object.getOwnPropertyDescriptor,qt=(t,e,r,i)=>{for(var s=i>1?void 0:i?Lt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&At(e,r,s),s},je=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},h=(t,e,r)=>(je(t,e,"read from private field"),r?r.call(t):e.get(t)),$=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},G=(t,e,r,i)=>(je(t,e,"write to private field"),e.set(t,r),r),x,de,f,pe,ue,ge,ve,De;const Vt=E.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:c.aptechkaTheme.colorMainAux.var,borderRadius:c.aptechkaTheme.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:c.aptechkaTheme.colorFont.var},".body":{transitionProperty:"height",transitionDuration:"var(--duration-short)",overflow:"hidden",height:"0px"},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:c.aptechkaTheme.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});let re=class extends rt.AccordionElement{constructor(t){super(),$(this,x,void 0),$(this,de,new g.Store(null)),$(this,f,new g.Store([])),$(this,pe,void 0),$(this,ue,null),$(this,ge,null),$(this,ve,null),$(this,De,e=>{let r=[],i=[];e.forEach(s=>{r=[...r,...s.removedNodes],i=[...i,...s.addedNodes]}),h(this,f).current=h(this,f).current.filter(s=>!r.includes(s)),h(this,x)&&!h(this,f).current.length&&!i.length&&this.remove()}),this.openShadow(Vt),G(this,x,t.key),G(this,pe,new MutationObserver(h(this,De))),o.element(this,{onAccordionItemToggle:e=>{e.stopPropagation(),e.detail.opened?w.openPanel(h(this,x)):w.closePanel(h(this,x))},children:[o.div({class:"wrapper",children:[o.div({class:"head",children:[h(this,x)?o.div({class:"name",children:[h(this,x).split(".").slice(-1).toString()]}):null,h(this,de),o.element(st.arrowIcon,{class:"arrow"})]}),o.div({class:"body",ref:e=>{G(this,ue,e)},children:o.div({class:"body-content",children:h(this,f),ref:e=>{G(this,ge,e),G(this,ve,e.firstElementChild)}})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return h(this,x)}get head(){return h(this,de)}get content(){return h(this,f)}get bodyElement(){return h(this,ue)}get contentElement(){return h(this,ge)}connectedCallback(){super.connectedCallback(),setTimeout(()=>{w.isPanelOpened(h(this,x))&&this.openAll({skipTransition:!0})},50),h(this,pe).observe(h(this,ve),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const r=t.store.passport.name.split("."),i=r.slice(0,r.length-t.remainingFolders.length).join("."),s=h(this,f).current.find(n=>n.key===i);s instanceof re?s.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):h(this,f).current=[...h(this,f).current,new re({key:i,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const e=h(this,f).current.find(r=>r.key===t.store.passport.name);e instanceof ye?e.addStore(t.store):h(this,f).current=[...h(this,f).current,new ye({store:t.store})]}}};x=new WeakMap;de=new WeakMap;f=new WeakMap;pe=new WeakMap;ue=new WeakMap;ge=new WeakMap;ve=new WeakMap;De=new WeakMap;re=qt([y.define("e-tweaker-folder")],re);var Nt=Object.defineProperty,Kt=Object.getOwnPropertyDescriptor,Zt=(t,e,r,i)=>{for(var s=i>1?void 0:i?Kt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Nt(e,r,s),s},Ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},J=(t,e,r)=>(Ge(t,e,"read from private field"),e.get(t)),Pe=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Ht=(t,e,r,i)=>(Ge(t,e,"write to private field"),e.set(t,r),r),fe,we,me;const jt=E.createStylesheet({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:c.aptechkaTheme.colorMain.var,borderRadius:c.aptechkaTheme.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:c.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
1
|
+
"use strict";var qe=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var p=(t,e,r)=>(qe(t,e,"read from private field"),r?r.call(t):e.get(t)),j=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},C=(t,e,r,i)=>(qe(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r);const Qe=require("../browser-CpzFX2xg.cjs"),y=require("../custom-element/index.cjs"),g=require("../Store-CIs_NjhF.cjs"),Ue=require("../file-EevnUtRj.cjs"),et=require("../function-MthRj-GJ.cjs"),Ne=require("../gestures-DHLrn6Q8.cjs"),o=require("../tags-yvEoM921.cjs"),E=require("../createStylesheet-BX1RVTfW.cjs"),tt=require("../Viewport-CIBlSU2t.cjs"),c=require("../theme/index.cjs"),rt=require("../accordion/index.cjs"),st=require("../index-DfSyc2GT.cjs"),it=require("../events-BGwqaxVW.cjs");require("../checkbox/index.cjs");const at=require("../math-GDWEqu7y.cjs"),Te=require("../polyfills-CM4SCDTt.cjs"),Ve=require("../element-resizer/index.cjs"),Ke='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Ze='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',nt='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',ot='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>';var I,_,P;class lt{constructor(){j(this,I,void 0);j(this,_,void 0);j(this,P,void 0);this.scrollValue=0,C(this,I,""),C(this,_,[]),C(this,P,{}),C(this,I,g.storeRegistry.projectName+"-studio")}openPanel(e){p(this,_).includes(e)||p(this,_).push(e)}closePanel(e){C(this,_,p(this,_).filter(r=>r!==e))}isPanelOpened(e){return p(this,_).includes(e)}changedSizes(e){return p(this,P)[e]}changeSize(e,r){r?p(this,P)[e]=r:delete p(this,P)[e]}save(){const e={openedPanels:p(this,_),changedSizes:p(this,P),scrollValue:this.scrollValue};localStorage.setItem(p(this,I),JSON.stringify(e)),g.storeRegistry.saveState()}load(){g.storeRegistry.loadState();const e=localStorage.getItem(p(this,I));if(e)try{const r=JSON.parse(e);r.openedPanels&&C(this,_,r.openedPanels),r.changedSizes&&C(this,P,r.changedSizes),r.scrollValue&&(this.scrollValue=r.scrollValue)}catch(r){console.error(r)}}}I=new WeakMap,_=new WeakMap,P=new WeakMap;const w=new lt;var O;class N extends y.CustomElement{constructor(...r){super();j(this,O,void 0);C(this,O,r)}addStore(r){p(this,O).push(r)}get firstStore(){return p(this,O)[0]}get stores(){return p(this,O)}updateStores(r){p(this,O).forEach(i=>{i.current=r})}}O=new WeakMap;var ht=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,dt=(t,e,r,i)=>{for(var s=i>1?void 0:i?ct(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&ht(e,r,s),s};const pt=E.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:c.aptechkaTheme.borderRadiusSmall.var}});let Ee=class extends N{constructor(...t){super(...t),this.openShadow(pt),o.element(this,{children:[o.element("e-checkbox",{onChange:e=>{this.updateStores(e.currentTarget.checked)},ref:e=>{this.firstStore.subscribe(r=>{e.checked=r.current})}})]})}};Ee=dt([y.define("e-tweaker-boolean-manager")],Ee);var ut=Object.defineProperty,gt=Object.getOwnPropertyDescriptor,vt=(t,e,r,i)=>{for(var s=i>1?void 0:i?gt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&ut(e,r,s),s};const ft=E.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:c.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:c.aptechkaTheme.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});let Me=class extends N{constructor(...t){super(...t),this.openShadow(ft),o.element(this,{children:[o.input({type:"color",value:this.firstStore,onInput:e=>{this.updateStores(e.currentTarget.value)}})]})}};Me=vt([y.define("e-tweaker-color-manager")],Me);var wt=Object.defineProperty,mt=Object.getOwnPropertyDescriptor,bt=(t,e,r,i)=>{for(var s=i>1?void 0:i?mt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&wt(e,r,s),s};const _t=E.createStylesheet({a:{color:"inherit"}});let $e=class extends N{constructor(...t){var e,r;super(...t),this.openShadow(_t),o.element(this,{children:[o.a({href:this.firstStore,target:(r=(e=this.firstStore.passport)==null?void 0:e.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}};$e=bt([y.define("e-tweaker-link-manager")],$e);var yt=Object.defineProperty,St=Object.getOwnPropertyDescriptor,kt=(t,e,r,i)=>{for(var s=i>1?void 0:i?St(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&yt(e,r,s),s},Ie=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},l=(t,e,r)=>(Ie(t,e,"read from private field"),r?r.call(t):e.get(t)),u=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},M=(t,e,r,i)=>(Ie(t,e,"write to private field"),e.set(t,r),r),m=(t,e,r)=>(Ie(t,e,"access private method"),r),L,ee,B,z,D,se,ie,T,V,ae,ne,F,q,oe,ze,be,Ae,te,_e,le;const xt=E.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${c.aptechkaTheme.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${c.aptechkaTheme.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:c.aptechkaTheme.colorFont.var,borderRadius:c.aptechkaTheme.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});let Oe=class extends N{constructor(...t){var e,r,i,s,n,a,W,K;super(...t),u(this,F),u(this,oe),u(this,be),u(this,te),u(this,L,[]),u(this,ee,[]),u(this,B,void 0),u(this,z,void 0),u(this,D,void 0),u(this,se,void 0),u(this,ie,void 0),u(this,T,void 0),u(this,V,!1),u(this,ae,Z=>{const b=m(this,F,q).call(this,Z);return b.map((v,H)=>{const Se=typeof v=="string"?parseFloat(v)||l(this,z):v,S=at.clamp(Se,l(this,z),l(this,D)),ke=Te.toStep(S,l(this,B));b[H]=ke}),l(this,ie)==="number"?b[0]:b}),u(this,ne,()=>{m(this,F,q).call(this).map((Z,b)=>{const v=l(this,L)[b];v&&(v.value=(Z||0).toString())}),m(this,oe,ze).call(this)}),u(this,le,()=>{m(this,oe,ze).call(this)}),this.openShadow(xt),M(this,z,Te.nullishCoalescing((r=(e=this.firstStore.passport)==null?void 0:e.manager)==null?void 0:r.min,-1/0)),M(this,D,Te.nullishCoalescing((s=(i=this.firstStore.passport)==null?void 0:i.manager)==null?void 0:s.max,1/0)),M(this,B,((a=(n=this.firstStore.passport)==null?void 0:n.manager)==null?void 0:a.step)||.01),M(this,se,((K=(W=this.firstStore.passport)==null?void 0:W.manager)==null?void 0:K.ease)||1),M(this,ie,Array.isArray(this.firstStore.current)?"array":"number"),M(this,T,isFinite(l(this,D))&&isFinite(l(this,z))),o.element(this,{class:l(this,T)?"":"infinite",children:m(this,F,q).call(this).map((Z,b)=>o.div({class:"inputs-wrapper",children:[o.input({type:"number",step:l(this,B),min:l(this,z),max:l(this,D),ref:v=>l(this,L).push(v),value:Z,onChange:()=>{this.updateStores(l(this,L).map(v=>parseFloat(v.value)))}}),o.div({class:"drag",children:[o.div({class:"drag-knob",ref:v=>l(this,ee).push(v),onPointerdown:v=>{v.preventDefault(),M(this,V,!0);const H=m(this,F,q).call(this),Se=H[b],S=l(this,ee)[b],ke=l(this,L)[b];if(S&&ke){const xe=S.parentElement,Je=m(this,be,Ae).call(this);xe.classList.add("grabbing"),Ne.setupDrag(Ce=>{const Le=Ce.x-v.x,Be=l(this,T)?xe.offsetWidth/(Je||1):1,Xe=Se+Le/Be*l(this,se);if(H[b]=Xe,!l(this,T)){const Ye=m(this,te,_e).call(this,S,0);S.style.transform=`translateX(${Ye+Le}px)`}this.updateStores([...H])},()=>{if(M(this,V,!1),!l(this,T)){const Ce=m(this,te,_e).call(this,S,0);S.style.transition="transform 0.1s",S.style.transform=`translateX(${Ce}px)`,xe.classList.remove("grabbing"),setTimeout(()=>{S.style.transition=""},100)}})}},children:o.div({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(l(this,ae)),this.firstStore.subscribe(l(this,ne)),Ve.elementResizer.subscribe(this,l(this,le))}disconnectedCallback(){this.firstStore.removeMiddleware(l(this,ae)),this.firstStore.unsubscribe(l(this,ne)),Ve.elementResizer.unsubscribe(l(this,le))}};L=new WeakMap;ee=new WeakMap;B=new WeakMap;z=new WeakMap;D=new WeakMap;se=new WeakMap;ie=new WeakMap;T=new WeakMap;V=new WeakMap;ae=new WeakMap;ne=new WeakMap;F=new WeakSet;q=function(t=this.firstStore.current){return Array.isArray(t)?t:[t]};oe=new WeakSet;ze=function(){m(this,F,q).call(this).map((t,e)=>{const r=l(this,ee)[e];if(r&&(!l(this,V)||l(this,V)&&l(this,T))){const i=m(this,te,_e).call(this,r,t);r.style.transform=`translateX(${i}px)`}})};be=new WeakSet;Ae=function(){return l(this,T)?l(this,D)-l(this,z):0};te=new WeakSet;_e=function(t,e){const r=t.parentElement,i=m(this,be,Ae).call(this),s=i?e/i:.5;return(r.offsetWidth-t.offsetWidth)*s};le=new WeakMap;Oe=kt([y.define("e-tweaker-number-manager")],Oe);var Ct=Object.defineProperty,Tt=Object.getOwnPropertyDescriptor,Pt=(t,e,r,i)=>{for(var s=i>1?void 0:i?Tt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Ct(e,r,s),s};const Et=E.createStylesheet({"e-select":{width:"100%","--arrow-color":c.aptechkaTheme.colorFont.var},"e-select-head":{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},"e-select-option":{transitionDuration:"var(--duration-short)",transitionProperty:"color"},"e-select-option:hover":{color:c.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});let We=class extends N{constructor(...t){var r,i;super(...t),this.openShadow(Et);const e=((i=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:i.variants)||[];o.element(this,{children:o.element("e-select",{value:this.firstStore,onChange:s=>{this.updateStores(s.currentTarget.value)},lightChildren:[o.element("e-select-head",{lightChildren:[o.span({"data-value-holder":""})]}),...e.map((s,n)=>o.element("e-select-option",{lightChildren:s,default:n===0?!0:null}))]})})}};We=Pt([y.define("e-tweaker-select-manager")],We);var Mt=Object.defineProperty,$t=Object.getOwnPropertyDescriptor,zt=(t,e,r,i)=>{for(var s=i>1?void 0:i?$t(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Mt(e,r,s),s};const Ot=E.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var}});let Re=class extends N{constructor(...t){super(...t),this.openShadow(Ot),o.element(this,{children:[o.input({class:"text-input",type:"string",value:this.firstStore,onChange:e=>{this.updateStores(e.currentTarget.value)}})]})}};Re=zt([y.define("e-tweaker-string-manager")],Re);const Wt={boolean:Ee,color:Me,link:$e,number:Oe,select:We,string:Re};var Rt=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,Ft=(t,e,r,i)=>{for(var s=i>1?void 0:i?Dt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Rt(e,r,s),s},He=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},d=(t,e,r)=>(He(t,e,"read from private field"),r?r.call(t):e.get(t)),R=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},A=(t,e,r,i)=>(He(t,e,"write to private field"),e.set(t,r),r),k,X,Y,Q,U,he,ce;const It=E.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:c.aptechkaTheme.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:c.aptechkaTheme.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:c.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});let ye=class extends y.CustomElement{constructor(t){var r,i,s,n;super(),R(this,k,[]),R(this,X,void 0),R(this,Y,void 0),R(this,Q,!1),R(this,U,void 0),R(this,he,()=>{g.activeStores.current.find(a=>d(this,k).includes(a))||this.remove()}),R(this,ce,a=>{d(this,Q)&&((a.metaKey||a.ctrlKey)&&a.code==="KeyC"?navigator.clipboard.writeText(d(this,k)[0].current):(a.metaKey||a.ctrlKey)&&a.code==="KeyR"&&(d(this,k).forEach(W=>{W.reset()}),a.preventDefault()))}),A(this,k,[t.store]),A(this,X,t.store.passport.name),A(this,Y,d(this,X).split(".").slice(-1).toString());const e=((i=(r=t.store.passport)==null?void 0:r.manager)==null?void 0:i.type)||"string";A(this,U,new Wt[e](d(this,k)[0])),this.openShadow(It),o.element(this,{class:{disabled:((n=(s=t.store.passport)==null?void 0:s.manager)==null?void 0:n.disabled)||!1},onPointerleave:()=>{A(this,Q,!1)},onPointerenter:()=>{A(this,Q,!0)},children:[o.div({class:"head",children:[o.div({class:"name",children:d(this,Y)+":"}),o.div({class:"head-buttons",children:[o.button({class:"head-button",children:Ze,onClick:()=>{navigator.clipboard.writeText(d(this,k)[0].current)}}),o.button({class:"head-button",children:Ke,onClick:()=>{d(this,k).forEach(a=>{a.reset()})}})]})]}),d(this,U)]})}get key(){return d(this,X)}get name(){return d(this,Y)}get stores(){return d(this,k)}addStore(t){d(this,U).addStore(t)}connectedCallback(){g.activeStores.subscribe(d(this,he)),addEventListener("keydown",d(this,ce)),it.dispatchSizeChangeEvent(this)}disconnectedCallback(){g.activeStores.unsubscribe(d(this,he)),removeEventListener("keydown",d(this,ce))}};k=new WeakMap;X=new WeakMap;Y=new WeakMap;Q=new WeakMap;U=new WeakMap;he=new WeakMap;ce=new WeakMap;ye=Ft([y.define("e-tweaker-field")],ye);var At=Object.defineProperty,Lt=Object.getOwnPropertyDescriptor,qt=(t,e,r,i)=>{for(var s=i>1?void 0:i?Lt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&At(e,r,s),s},je=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},h=(t,e,r)=>(je(t,e,"read from private field"),r?r.call(t):e.get(t)),$=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},G=(t,e,r,i)=>(je(t,e,"write to private field"),e.set(t,r),r),x,de,f,pe,ue,ge,ve,De;const Vt=E.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:c.aptechkaTheme.colorMainAux.var,borderRadius:c.aptechkaTheme.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:c.aptechkaTheme.colorFont.var},".body":{transitionProperty:"height",transitionDuration:"var(--duration-short)",overflow:"hidden",height:"0px"},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:c.aptechkaTheme.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});let re=class extends rt.AccordionElement{constructor(t){super(),$(this,x,void 0),$(this,de,new g.Store(null)),$(this,f,new g.Store([])),$(this,pe,void 0),$(this,ue,null),$(this,ge,null),$(this,ve,null),$(this,De,e=>{let r=[],i=[];e.forEach(s=>{r=[...r,...s.removedNodes],i=[...i,...s.addedNodes]}),h(this,f).current=h(this,f).current.filter(s=>!r.includes(s)),h(this,x)&&!h(this,f).current.length&&!i.length&&this.remove()}),this.openShadow(Vt),G(this,x,t.key),G(this,pe,new MutationObserver(h(this,De))),o.element(this,{onAccordionItemToggle:e=>{e.stopPropagation(),e.detail.opened?w.openPanel(h(this,x)):w.closePanel(h(this,x))},children:[o.div({class:"wrapper",children:[o.div({class:"head",children:[h(this,x)?o.div({class:"name",children:[h(this,x).split(".").slice(-1).toString()]}):null,h(this,de),o.element(st.arrowIcon,{class:"arrow"})]}),o.div({class:"body",ref:e=>{G(this,ue,e)},children:o.div({class:"body-content",children:h(this,f),ref:e=>{G(this,ge,e),G(this,ve,e.firstElementChild)}})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return h(this,x)}get head(){return h(this,de)}get content(){return h(this,f)}get bodyElement(){return h(this,ue)}get contentElement(){return h(this,ge)}connectedCallback(){super.connectedCallback(),setTimeout(()=>{w.isPanelOpened(h(this,x))&&this.openAll({skipTransition:!0})},50),h(this,pe).observe(h(this,ve),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const r=t.store.passport.name.split("."),i=r.slice(0,r.length-t.remainingFolders.length).join("."),s=h(this,f).current.find(n=>n.key===i);s instanceof re?s.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):h(this,f).current=[...h(this,f).current,new re({key:i,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const e=h(this,f).current.find(r=>r.key===t.store.passport.name);e instanceof ye?e.addStore(t.store):h(this,f).current=[...h(this,f).current,new ye({store:t.store})]}}};x=new WeakMap;de=new WeakMap;f=new WeakMap;pe=new WeakMap;ue=new WeakMap;ge=new WeakMap;ve=new WeakMap;De=new WeakMap;re=qt([y.define("e-tweaker-folder")],re);var Nt=Object.defineProperty,Kt=Object.getOwnPropertyDescriptor,Zt=(t,e,r,i)=>{for(var s=i>1?void 0:i?Kt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Nt(e,r,s),s},Ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},J=(t,e,r)=>(Ge(t,e,"read from private field"),e.get(t)),Pe=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Ht=(t,e,r,i)=>(Ge(t,e,"write to private field"),e.set(t,r),r),fe,we,me;const jt=E.createStylesheet({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:c.aptechkaTheme.colorMain.var,borderRadius:c.aptechkaTheme.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:c.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
2
2
|
100dvh -
|
|
3
3
|
(
|
|
4
4
|
var(--tweaker-offset) * 2 +
|
package/lib/tweaker/index.js
CHANGED
|
@@ -2,36 +2,36 @@ var Ze = (t, e, r) => {
|
|
|
2
2
|
if (!e.has(t))
|
|
3
3
|
throw TypeError("Cannot " + r);
|
|
4
4
|
};
|
|
5
|
-
var d = (t, e, r) => (Ze(t, e, "read from private field"), r ? r.call(t) : e.get(t)),
|
|
5
|
+
var d = (t, e, r) => (Ze(t, e, "read from private field"), r ? r.call(t) : e.get(t)), J = (t, e, r) => {
|
|
6
6
|
if (e.has(t))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
9
9
|
}, x = (t, e, r, i) => (Ze(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r);
|
|
10
10
|
import { i as it } from "../browser-0zX67oeU.js";
|
|
11
|
-
import { CustomElement as
|
|
12
|
-
import { s as W, a as K, S as He } from "../Store-
|
|
11
|
+
import { CustomElement as Ge, define as M } from "../custom-element/index.js";
|
|
12
|
+
import { s as W, a as K, S as He } from "../Store-Dqcu1DnE.js";
|
|
13
13
|
import { c as at } from "../file-lxi_oXJf.js";
|
|
14
14
|
import { d as nt } from "../function-C10DGppn.js";
|
|
15
|
-
import { s as
|
|
16
|
-
import { e as g,
|
|
17
|
-
import { c as $ } from "../createStylesheet-
|
|
18
|
-
import { a as ct } from "../Viewport-
|
|
15
|
+
import { s as Je } from "../gestures-D2Fdra_G.js";
|
|
16
|
+
import { e as g, a0 as Ce, a as ot, D as f, aB as lt, p as re, a3 as ht } from "../tags-C-6uXIAT.js";
|
|
17
|
+
import { c as $ } from "../createStylesheet-CgWN4UhW.js";
|
|
18
|
+
import { a as ct } from "../Viewport-4ZTWxLo_.js";
|
|
19
19
|
import { aptechkaTheme as h } from "../theme/index.js";
|
|
20
20
|
import { AccordionElement as dt } from "../accordion/index.js";
|
|
21
|
-
import { a as pt } from "../index-
|
|
21
|
+
import { a as pt } from "../index-C2xWAQFq.js";
|
|
22
22
|
import { d as ut } from "../events-C_coq1Mk.js";
|
|
23
23
|
import "../checkbox/index.js";
|
|
24
24
|
import { c as ft } from "../math-BOBiC4TN.js";
|
|
25
25
|
import { n as je, t as gt } from "../polyfills-X6KXuHg-.js";
|
|
26
|
-
import { elementResizer as
|
|
26
|
+
import { elementResizer as Be } from "../element-resizer/index.js";
|
|
27
27
|
const Xe = '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>', Ye = '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>', vt = '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>', wt = '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>';
|
|
28
|
-
var
|
|
28
|
+
var A, _, P;
|
|
29
29
|
class mt {
|
|
30
30
|
constructor() {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
this.scrollValue = 0, x(this,
|
|
31
|
+
J(this, A, void 0);
|
|
32
|
+
J(this, _, void 0);
|
|
33
|
+
J(this, P, void 0);
|
|
34
|
+
this.scrollValue = 0, x(this, A, ""), x(this, _, []), x(this, P, {}), x(this, A, W.projectName + "-studio");
|
|
35
35
|
}
|
|
36
36
|
openPanel(e) {
|
|
37
37
|
d(this, _).includes(e) || d(this, _).push(e);
|
|
@@ -54,11 +54,11 @@ class mt {
|
|
|
54
54
|
changedSizes: d(this, P),
|
|
55
55
|
scrollValue: this.scrollValue
|
|
56
56
|
};
|
|
57
|
-
localStorage.setItem(d(this,
|
|
57
|
+
localStorage.setItem(d(this, A), JSON.stringify(e)), W.saveState();
|
|
58
58
|
}
|
|
59
59
|
load() {
|
|
60
60
|
W.loadState();
|
|
61
|
-
const e = localStorage.getItem(d(this,
|
|
61
|
+
const e = localStorage.getItem(d(this, A));
|
|
62
62
|
if (e)
|
|
63
63
|
try {
|
|
64
64
|
const r = JSON.parse(e);
|
|
@@ -68,13 +68,13 @@ class mt {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
A = new WeakMap(), _ = new WeakMap(), P = new WeakMap();
|
|
72
72
|
const w = new mt();
|
|
73
73
|
var T;
|
|
74
|
-
class H extends
|
|
74
|
+
class H extends Ge {
|
|
75
75
|
constructor(...r) {
|
|
76
76
|
super();
|
|
77
|
-
|
|
77
|
+
J(this, T, void 0);
|
|
78
78
|
x(this, T, r);
|
|
79
79
|
}
|
|
80
80
|
addStore(r) {
|
|
@@ -216,7 +216,7 @@ var Ot = Object.defineProperty, Wt = Object.getOwnPropertyDescriptor, Tt = (t, e
|
|
|
216
216
|
if (e.has(t))
|
|
217
217
|
throw TypeError("Cannot add the same private member more than once");
|
|
218
218
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
219
|
-
}, E = (t, e, r, i) => (Ve(t, e, "write to private field"), e.set(t, r), r), m = (t, e, r) => (Ve(t, e, "access private method"), r), V, se, q, O, F, ne, oe, C, Z, le, he,
|
|
219
|
+
}, E = (t, e, r, i) => (Ve(t, e, "write to private field"), e.set(t, r), r), m = (t, e, r) => (Ve(t, e, "access private method"), r), V, se, q, O, F, ne, oe, C, Z, le, he, I, N, ce, De, Se, Ne, ie, ke, de;
|
|
220
220
|
const Dt = $({
|
|
221
221
|
":host": {
|
|
222
222
|
width: "100%",
|
|
@@ -284,16 +284,16 @@ const Dt = $({
|
|
|
284
284
|
let Re = class extends H {
|
|
285
285
|
constructor(...t) {
|
|
286
286
|
var e, r, i, s, n, a, D, j;
|
|
287
|
-
super(...t), p(this,
|
|
288
|
-
const b = m(this,
|
|
289
|
-
return b.map((u,
|
|
287
|
+
super(...t), p(this, I), p(this, ce), p(this, Se), p(this, ie), p(this, V, []), p(this, se, []), p(this, q, void 0), p(this, O, void 0), p(this, F, void 0), p(this, ne, void 0), p(this, oe, void 0), p(this, C, void 0), p(this, Z, !1), p(this, le, (B) => {
|
|
288
|
+
const b = m(this, I, N).call(this, B);
|
|
289
|
+
return b.map((u, G) => {
|
|
290
290
|
const Pe = typeof u == "string" ? parseFloat(u) || o(this, O) : u, y = ft(Pe, o(this, O), o(this, F)), Me = gt(y, o(this, q));
|
|
291
|
-
b[
|
|
291
|
+
b[G] = Me;
|
|
292
292
|
}), o(this, oe) === "number" ? b[0] : b;
|
|
293
293
|
}), p(this, he, () => {
|
|
294
|
-
m(this,
|
|
294
|
+
m(this, I, N).call(this).map((B, b) => {
|
|
295
295
|
const u = o(this, V)[b];
|
|
296
|
-
u && (u.value = (
|
|
296
|
+
u && (u.value = (B || 0).toString());
|
|
297
297
|
}), m(this, ce, De).call(this);
|
|
298
298
|
}), p(this, de, () => {
|
|
299
299
|
m(this, ce, De).call(this);
|
|
@@ -305,7 +305,7 @@ let Re = class extends H {
|
|
|
305
305
|
1 / 0
|
|
306
306
|
)), E(this, q, ((a = (n = this.firstStore.passport) == null ? void 0 : n.manager) == null ? void 0 : a.step) || 0.01), E(this, ne, ((j = (D = this.firstStore.passport) == null ? void 0 : D.manager) == null ? void 0 : j.ease) || 1), E(this, oe, Array.isArray(this.firstStore.current) ? "array" : "number"), E(this, C, isFinite(o(this, F)) && isFinite(o(this, O))), g(this, {
|
|
307
307
|
class: o(this, C) ? "" : "infinite",
|
|
308
|
-
children: m(this,
|
|
308
|
+
children: m(this, I, N).call(this).map((B, b) => f({
|
|
309
309
|
class: "inputs-wrapper",
|
|
310
310
|
children: [
|
|
311
311
|
Ce({
|
|
@@ -314,7 +314,7 @@ let Re = class extends H {
|
|
|
314
314
|
min: o(this, O),
|
|
315
315
|
max: o(this, F),
|
|
316
316
|
ref: (u) => o(this, V).push(u),
|
|
317
|
-
value:
|
|
317
|
+
value: B,
|
|
318
318
|
onChange: () => {
|
|
319
319
|
this.updateStores(
|
|
320
320
|
o(this, V).map((u) => parseFloat(u.value))
|
|
@@ -329,17 +329,17 @@ let Re = class extends H {
|
|
|
329
329
|
ref: (u) => o(this, se).push(u),
|
|
330
330
|
onPointerdown: (u) => {
|
|
331
331
|
u.preventDefault(), E(this, Z, !0);
|
|
332
|
-
const
|
|
332
|
+
const G = m(this, I, N).call(this), Pe = G[b], y = o(this, se)[b], Me = o(this, V)[b];
|
|
333
333
|
if (y && Me) {
|
|
334
334
|
const $e = y.parentElement, et = m(this, Se, Ne).call(this);
|
|
335
|
-
$e.classList.add("grabbing"),
|
|
335
|
+
$e.classList.add("grabbing"), Je(
|
|
336
336
|
(Ee) => {
|
|
337
337
|
const Ke = Ee.x - u.x, tt = o(this, C) ? $e.offsetWidth / (et || 1) : 1, rt = Pe + Ke / tt * o(this, ne);
|
|
338
|
-
if (
|
|
338
|
+
if (G[b] = rt, !o(this, C)) {
|
|
339
339
|
const st = m(this, ie, ke).call(this, y, 0);
|
|
340
340
|
y.style.transform = `translateX(${st + Ke}px)`;
|
|
341
341
|
}
|
|
342
|
-
this.updateStores([...
|
|
342
|
+
this.updateStores([...G]);
|
|
343
343
|
},
|
|
344
344
|
() => {
|
|
345
345
|
if (E(this, Z, !1), !o(this, C)) {
|
|
@@ -363,10 +363,10 @@ let Re = class extends H {
|
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
365
|
connectedCallback() {
|
|
366
|
-
this.firstStore.addMiddleware(o(this, le)), this.firstStore.subscribe(o(this, he)),
|
|
366
|
+
this.firstStore.addMiddleware(o(this, le)), this.firstStore.subscribe(o(this, he)), Be.subscribe(this, o(this, de));
|
|
367
367
|
}
|
|
368
368
|
disconnectedCallback() {
|
|
369
|
-
this.firstStore.removeMiddleware(o(this, le)), this.firstStore.unsubscribe(o(this, he)),
|
|
369
|
+
this.firstStore.removeMiddleware(o(this, le)), this.firstStore.unsubscribe(o(this, he)), Be.unsubscribe(o(this, de));
|
|
370
370
|
}
|
|
371
371
|
};
|
|
372
372
|
V = /* @__PURE__ */ new WeakMap();
|
|
@@ -380,13 +380,13 @@ C = /* @__PURE__ */ new WeakMap();
|
|
|
380
380
|
Z = /* @__PURE__ */ new WeakMap();
|
|
381
381
|
le = /* @__PURE__ */ new WeakMap();
|
|
382
382
|
he = /* @__PURE__ */ new WeakMap();
|
|
383
|
-
|
|
383
|
+
I = /* @__PURE__ */ new WeakSet();
|
|
384
384
|
N = function(t = this.firstStore.current) {
|
|
385
385
|
return Array.isArray(t) ? t : [t];
|
|
386
386
|
};
|
|
387
387
|
ce = /* @__PURE__ */ new WeakSet();
|
|
388
388
|
De = function() {
|
|
389
|
-
m(this,
|
|
389
|
+
m(this, I, N).call(this).map((t, e) => {
|
|
390
390
|
const r = o(this, se)[e];
|
|
391
391
|
if (r && (!o(this, Z) || o(this, Z) && o(this, C))) {
|
|
392
392
|
const i = m(this, ie, ke).call(this, r, t);
|
|
@@ -407,12 +407,12 @@ de = /* @__PURE__ */ new WeakMap();
|
|
|
407
407
|
Re = Tt([
|
|
408
408
|
M("e-tweaker-number-manager")
|
|
409
409
|
], Re);
|
|
410
|
-
var Rt = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor,
|
|
410
|
+
var Rt = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor, It = (t, e, r, i) => {
|
|
411
411
|
for (var s = i > 1 ? void 0 : i ? Ft(e, r) : e, n = t.length - 1, a; n >= 0; n--)
|
|
412
412
|
(a = t[n]) && (s = (i ? a(e, r, s) : a(s)) || s);
|
|
413
413
|
return i && s && Rt(e, r, s), s;
|
|
414
414
|
};
|
|
415
|
-
const
|
|
415
|
+
const At = $({
|
|
416
416
|
"e-select": {
|
|
417
417
|
width: "100%",
|
|
418
418
|
"--arrow-color": h.colorFont.var
|
|
@@ -444,7 +444,7 @@ const It = $({
|
|
|
444
444
|
let Fe = class extends H {
|
|
445
445
|
constructor(...t) {
|
|
446
446
|
var r, i;
|
|
447
|
-
super(...t), this.openShadow(
|
|
447
|
+
super(...t), this.openShadow(At);
|
|
448
448
|
const e = ((i = (r = this.firstStore.passport) == null ? void 0 : r.manager) == null ? void 0 : i.variants) || [];
|
|
449
449
|
g(this, {
|
|
450
450
|
children: g("e-select", {
|
|
@@ -471,7 +471,7 @@ let Fe = class extends H {
|
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
};
|
|
474
|
-
Fe =
|
|
474
|
+
Fe = It([
|
|
475
475
|
M("e-tweaker-select-manager")
|
|
476
476
|
], Fe);
|
|
477
477
|
var Lt = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, Nt = (t, e, r, i) => {
|
|
@@ -501,7 +501,7 @@ const Kt = $({
|
|
|
501
501
|
borderRadius: h.borderRadius.var
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
|
-
let
|
|
504
|
+
let Ie = class extends H {
|
|
505
505
|
constructor(...t) {
|
|
506
506
|
super(...t), this.openShadow(Kt), g(this, {
|
|
507
507
|
children: [
|
|
@@ -519,18 +519,18 @@ let Ae = class extends H {
|
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
521
|
};
|
|
522
|
-
|
|
522
|
+
Ie = Nt([
|
|
523
523
|
M("e-tweaker-string-manager")
|
|
524
|
-
],
|
|
524
|
+
], Ie);
|
|
525
525
|
const Zt = {
|
|
526
526
|
boolean: Oe,
|
|
527
527
|
color: We,
|
|
528
528
|
link: Te,
|
|
529
529
|
number: Re,
|
|
530
530
|
select: Fe,
|
|
531
|
-
string:
|
|
531
|
+
string: Ie
|
|
532
532
|
};
|
|
533
|
-
var Ht = Object.defineProperty, jt = Object.getOwnPropertyDescriptor,
|
|
533
|
+
var Ht = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, Bt = (t, e, r, i) => {
|
|
534
534
|
for (var s = i > 1 ? void 0 : i ? jt(e, r) : e, n = t.length - 1, a; n >= 0; n--)
|
|
535
535
|
(a = t[n]) && (s = (i ? a(e, r, s) : a(s)) || s);
|
|
536
536
|
return i && s && Ht(e, r, s), s;
|
|
@@ -542,7 +542,7 @@ var Ht = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, Gt = (t, e
|
|
|
542
542
|
throw TypeError("Cannot add the same private member more than once");
|
|
543
543
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
544
544
|
}, L = (t, e, r, i) => (qe(t, e, "write to private field"), e.set(t, r), r), S, Q, U, ee, te, pe, ue;
|
|
545
|
-
const
|
|
545
|
+
const Gt = $({
|
|
546
546
|
":host": {
|
|
547
547
|
display: "grid",
|
|
548
548
|
gridAutoFlow: "column",
|
|
@@ -587,7 +587,7 @@ const Jt = $({
|
|
|
587
587
|
height: "100%"
|
|
588
588
|
}
|
|
589
589
|
});
|
|
590
|
-
let xe = class extends
|
|
590
|
+
let xe = class extends Ge {
|
|
591
591
|
constructor(t) {
|
|
592
592
|
var r, i, s, n;
|
|
593
593
|
super(), R(this, S, []), R(this, Q, void 0), R(this, U, void 0), R(this, ee, !1), R(this, te, void 0), R(this, pe, () => {
|
|
@@ -598,7 +598,7 @@ let xe = class extends Je {
|
|
|
598
598
|
}), a.preventDefault()));
|
|
599
599
|
}), L(this, S, [t.store]), L(this, Q, t.store.passport.name), L(this, U, c(this, Q).split(".").slice(-1).toString());
|
|
600
600
|
const e = ((i = (r = t.store.passport) == null ? void 0 : r.manager) == null ? void 0 : i.type) || "string";
|
|
601
|
-
L(this, te, new Zt[e](c(this, S)[0])), this.openShadow(
|
|
601
|
+
L(this, te, new Zt[e](c(this, S)[0])), this.openShadow(Gt), g(this, {
|
|
602
602
|
class: {
|
|
603
603
|
disabled: ((n = (s = t.store.passport) == null ? void 0 : s.manager) == null ? void 0 : n.disabled) || !1
|
|
604
604
|
},
|
|
@@ -666,13 +666,13 @@ ee = /* @__PURE__ */ new WeakMap();
|
|
|
666
666
|
te = /* @__PURE__ */ new WeakMap();
|
|
667
667
|
pe = /* @__PURE__ */ new WeakMap();
|
|
668
668
|
ue = /* @__PURE__ */ new WeakMap();
|
|
669
|
-
xe =
|
|
669
|
+
xe = Bt([
|
|
670
670
|
M("e-tweaker-field")
|
|
671
671
|
], xe);
|
|
672
|
-
var
|
|
672
|
+
var Jt = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, Yt = (t, e, r, i) => {
|
|
673
673
|
for (var s = i > 1 ? void 0 : i ? Xt(e, r) : e, n = t.length - 1, a; n >= 0; n--)
|
|
674
674
|
(a = t[n]) && (s = (i ? a(e, r, s) : a(s)) || s);
|
|
675
|
-
return i && s &&
|
|
675
|
+
return i && s && Jt(e, r, s), s;
|
|
676
676
|
}, Qe = (t, e, r) => {
|
|
677
677
|
if (!e.has(t))
|
|
678
678
|
throw TypeError("Cannot " + r);
|
|
@@ -680,7 +680,7 @@ var Bt = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, Yt = (t, e
|
|
|
680
680
|
if (e.has(t))
|
|
681
681
|
throw TypeError("Cannot add the same private member more than once");
|
|
682
682
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
683
|
-
}, X = (t, e, r, i) => (Qe(t, e, "write to private field"), e.set(t, r), r), k, fe, v, ge, ve, we, me,
|
|
683
|
+
}, X = (t, e, r, i) => (Qe(t, e, "write to private field"), e.set(t, r), r), k, fe, v, ge, ve, we, me, Ae;
|
|
684
684
|
const qt = $({
|
|
685
685
|
".wrapper": {
|
|
686
686
|
boxSizing: "border-box",
|
|
@@ -727,14 +727,14 @@ const qt = $({
|
|
|
727
727
|
});
|
|
728
728
|
let ae = class extends dt {
|
|
729
729
|
constructor(t) {
|
|
730
|
-
super(), z(this, k, void 0), z(this, fe, new He(null)), z(this, v, new He([])), z(this, ge, void 0), z(this, ve, null), z(this, we, null), z(this, me, null), z(this,
|
|
730
|
+
super(), z(this, k, void 0), z(this, fe, new He(null)), z(this, v, new He([])), z(this, ge, void 0), z(this, ve, null), z(this, we, null), z(this, me, null), z(this, Ae, (e) => {
|
|
731
731
|
let r = [], i = [];
|
|
732
732
|
e.forEach((s) => {
|
|
733
733
|
r = [...r, ...s.removedNodes], i = [...i, ...s.addedNodes];
|
|
734
734
|
}), l(this, v).current = l(this, v).current.filter(
|
|
735
735
|
(s) => !r.includes(s)
|
|
736
736
|
), l(this, k) && !l(this, v).current.length && !i.length && this.remove();
|
|
737
|
-
}), this.openShadow(qt), X(this, k, t.key), X(this, ge, new MutationObserver(l(this,
|
|
737
|
+
}), this.openShadow(qt), X(this, k, t.key), X(this, ge, new MutationObserver(l(this, Ae))), g(this, {
|
|
738
738
|
onAccordionItemToggle: (e) => {
|
|
739
739
|
e.stopPropagation(), e.detail.opened ? w.openPanel(l(this, k)) : w.closePanel(l(this, k));
|
|
740
740
|
},
|
|
@@ -831,7 +831,7 @@ ge = /* @__PURE__ */ new WeakMap();
|
|
|
831
831
|
ve = /* @__PURE__ */ new WeakMap();
|
|
832
832
|
we = /* @__PURE__ */ new WeakMap();
|
|
833
833
|
me = /* @__PURE__ */ new WeakMap();
|
|
834
|
-
|
|
834
|
+
Ae = /* @__PURE__ */ new WeakMap();
|
|
835
835
|
ae = Yt([
|
|
836
836
|
M("e-tweaker-folder")
|
|
837
837
|
], ae);
|
|
@@ -1028,7 +1028,7 @@ let Le = class extends ae {
|
|
|
1028
1028
|
onPointerdown: (t) => {
|
|
1029
1029
|
t.preventDefault();
|
|
1030
1030
|
const e = this.getBoundingClientRect(), r = this.contentElement.scrollTop;
|
|
1031
|
-
|
|
1031
|
+
Je(
|
|
1032
1032
|
(i) => {
|
|
1033
1033
|
const s = t.x - i.x, n = Math.max(400, e.width + s);
|
|
1034
1034
|
this.style.width = n + "px", w.changeSize("tweaker", n);
|
|
@@ -2,5 +2,5 @@ import { Store, StoreManagerType } from '../store';
|
|
|
2
2
|
import { TweakerStoreManagerElement } from './TweakerStoreManagerElement';
|
|
3
3
|
|
|
4
4
|
export declare const tweakerManagerConstructors: {
|
|
5
|
-
[key in StoreManagerType]: typeof TweakerStoreManagerElement<Store<any, any
|
|
5
|
+
[key in StoreManagerType]: typeof TweakerStoreManagerElement<Store<any, any>>;
|
|
6
6
|
};
|
package/lib/video/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../custom-element/index.cjs");require("../window-resizer/index.cjs");require("../Store-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../custom-element/index.cjs");require("../window-resizer/index.cjs");require("../Store-CIs_NjhF.cjs");const v=require("../source/index.cjs"),d=require("../ticker/index.cjs");var E=Object.defineProperty,f=Object.getOwnPropertyDescriptor,_=(t,e,r,i)=>{for(var s=i>1?void 0:i?f(e,r):e,o=t.length-1,u;o>=0;o--)(u=t[o])&&(s=(i?u(e,r,s):u(s))||s);return i&&s&&E(e,r,s),s},p=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},n=(t,e,r)=>(p(t,e,"read from private field"),r?r.call(t):e.get(t)),l=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},h=(t,e,r,i)=>(p(t,e,"write to private field"),e.set(t,r),r),a,c;exports.VideoElement=class extends v.SourceElement{constructor(){super(...arguments),l(this,a,0),l(this,c,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const e=this.consumerElement.readyState/4;e>n(this,a)&&h(this,a,e),this.dispatchEvent(new CustomEvent("readyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:n(this,a)}})),this.consumerElement.readyState===4&&d.ticker.unsubscribe(n(this,c))})}connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{d.ticker.subscribe(n(this,c)),this.hasAttribute("capture-autoplay")&&this.consumerElement.play()}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0)),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")})}disconnectedCallback(){super.disconnectedCallback(),d.ticker.unsubscribe(n(this,c)),h(this,a,0)}createConsumer(){return document.createElement("video")}consumeSource(e){this.consumerElement.src=e||""}};a=new WeakMap;c=new WeakMap;exports.VideoElement=_([m.define("e-video")],exports.VideoElement);
|
package/lib/video/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { define as v } from "../custom-element/index.js";
|
|
2
2
|
import "../window-resizer/index.js";
|
|
3
|
-
import "../Store-
|
|
3
|
+
import "../Store-Dqcu1DnE.js";
|
|
4
4
|
import { SourceElement as f } from "../source/index.js";
|
|
5
5
|
import { ticker as h } from "../ticker/index.js";
|
|
6
6
|
var E = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, y = (e, t, s, i) => {
|