aptechka 0.8.4 → 0.10.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/ElementConstructor-OK-6OPjh.cjs +1 -0
- package/lib/ElementConstructor-rValMo8f.js +372 -0
- package/lib/_createStore-C75y9luu.cjs +1 -0
- package/lib/_createStore-D3qHYaSz.js +12 -0
- package/lib/accordion/AccordionElement.d.ts +1 -2
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +110 -122
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.d.ts +4 -5
- package/lib/canvas/index.js +69 -75
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.d.ts +1 -3
- package/lib/checkbox/index.js +42 -45
- package/lib/connector/index.cjs +1 -1
- package/lib/connector/index.d.ts +2 -2
- package/lib/connector/index.js +39 -34
- package/lib/counter/index.d.ts +1 -3
- package/lib/{createStylesheet-BsMSWX0q.cjs → createStylesheet-9nksoWW0.cjs} +1 -1
- package/lib/{createStylesheet-BxKITIVV.js → createStylesheet-BrFGJ8Q7.js} +1 -1
- package/lib/element-constructor/ElementConstructor.d.ts +6 -5
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +114 -113
- package/lib/en3/objects/fluid/En3FluidElement.d.ts +1 -2
- package/lib/globals-DMjysUXI.js +8 -0
- package/lib/globals-bYKki-b9.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +7 -15
- package/lib/index-3R8YL-P3.js +266 -0
- package/lib/index-CyQAdqFu.cjs +9 -0
- package/lib/instantiate-BuVJ8pIJ.cjs +1 -0
- package/lib/instantiate-TYteKsII.js +134 -0
- package/lib/jsx/ComponentElement.d.ts +18 -0
- package/lib/jsx/globals.d.ts +13 -0
- package/lib/jsx/h.d.ts +6 -0
- package/lib/jsx/hooks/animation/createDamped.d.ts +3 -0
- package/lib/jsx/hooks/animation/createTweened.d.ts +3 -0
- package/lib/jsx/hooks/animation/index.cjs +1 -0
- package/lib/jsx/hooks/animation/index.d.ts +2 -0
- package/lib/jsx/hooks/animation/index.js +15 -0
- package/lib/jsx/hooks/basic/_createStore.d.ts +4 -0
- package/lib/jsx/hooks/basic/attachInternals.d.ts +1 -0
- package/lib/jsx/hooks/basic/attachShadow.d.ts +1 -0
- package/lib/jsx/hooks/basic/attachStylesheet.d.ts +3 -0
- package/lib/jsx/hooks/basic/createContext.d.ts +2 -0
- package/lib/jsx/hooks/basic/createRef.d.ts +3 -0
- package/lib/jsx/hooks/basic/onConnect.d.ts +3 -0
- package/lib/jsx/hooks/basic/onDisconnect.d.ts +3 -0
- package/lib/jsx/hooks/basic/onStoreChange.d.ts +3 -0
- package/lib/jsx/hooks/onAnimationFrame.cjs +1 -0
- package/lib/jsx/hooks/onAnimationFrame.d.ts +6 -0
- package/lib/jsx/hooks/onAnimationFrame.js +22 -0
- package/lib/jsx/hooks/onElementResize.cjs +1 -0
- package/lib/jsx/hooks/onElementResize.d.ts +5 -0
- package/lib/jsx/hooks/onElementResize.js +11 -0
- package/lib/jsx/hooks/onIntersection.cjs +1 -0
- package/lib/jsx/hooks/onIntersection.d.ts +5 -0
- package/lib/jsx/hooks/onIntersection.js +11 -0
- package/lib/jsx/hooks/onWindowResize.cjs +1 -0
- package/lib/jsx/hooks/onWindowResize.d.ts +3 -0
- package/lib/jsx/hooks/onWindowResize.js +8 -0
- package/lib/jsx/hooks/store/createCached.d.ts +3 -0
- package/lib/jsx/hooks/store/createComposed.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerived.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerivedArray.d.ts +3 -0
- package/lib/jsx/hooks/store/createResource.d.ts +3 -0
- package/lib/jsx/hooks/store/createStore.d.ts +3 -0
- package/lib/jsx/hooks/store/index.cjs +1 -0
- package/lib/jsx/hooks/store/index.d.ts +6 -0
- package/lib/jsx/hooks/store/index.js +31 -0
- package/lib/jsx/hooks/watchAttribute.cjs +1 -0
- package/lib/jsx/hooks/watchAttribute.d.ts +6 -0
- package/lib/jsx/hooks/watchAttribute.js +17 -0
- package/lib/jsx/hooks/watchCSSProperty.cjs +1 -0
- package/lib/jsx/hooks/watchCSSProperty.d.ts +7 -0
- package/lib/jsx/hooks/watchCSSProperty.js +17 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +15 -0
- package/lib/jsx/index.js +106 -0
- package/lib/jsx/instantiate.d.ts +5 -0
- package/lib/jsx/register.d.ts +1 -0
- package/lib/jsx/render.d.ts +6 -0
- package/lib/jsx/type.d.ts +198 -0
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +34 -36
- package/lib/onConnect-DGP866cj.cjs +1 -0
- package/lib/onConnect-y5DrxJ9P.js +7 -0
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +5 -4
- package/lib/order/index.js +1 -1
- package/lib/pointer/PointerElement.d.ts +1 -2
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +105 -117
- package/lib/popover/PopoverButtonElement.d.ts +1 -2
- package/lib/popover/PopoverElement.d.ts +1 -2
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +109 -124
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +76 -73
- package/lib/scroll/ScrollElement.d.ts +1 -2
- package/lib/scroll/ScrollUserElement.d.ts +1 -2
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +674 -753
- package/lib/select/SelectElement.d.ts +1 -3
- package/lib/select/SelectUserElement.d.ts +1 -2
- 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 +104 -107
- package/lib/slicer/SlicerElement.d.ts +1 -2
- package/lib/slicer/index.cjs +5 -5
- package/lib/slicer/index.js +88 -106
- package/lib/source/SourceElement.d.ts +1 -2
- package/lib/source/index.cjs +2 -2
- package/lib/source/index.js +19 -20
- package/lib/store/Cached.d.ts +13 -0
- package/lib/store/Derived.d.ts +3 -3
- package/lib/store/DerivedArray.d.ts +8 -0
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -0
- package/lib/store/index.js +65 -31
- package/lib/tags-BosXYPYv.cjs +1 -0
- package/lib/tags-D0kLlFdQ.js +485 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -1
- package/lib/tweaker/TweakerFieldElement.d.ts +1 -2
- package/lib/tweaker/TweakerFolderElement.d.ts +1 -2
- package/lib/tweaker/TweakerStoreManagerElement.d.ts +1 -2
- package/lib/tweaker/index.cjs +3 -3
- package/lib/tweaker/index.js +393 -472
- package/lib/utils/bytes.d.ts +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +122 -105
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +25 -29
- package/package.json +73 -9
- package/lib/custom-element/index.cjs +0 -1
- package/lib/custom-element/index.d.ts +0 -8
- package/lib/custom-element/index.js +0 -30
- package/lib/index-CzpP1Tg6.cjs +0 -9
- package/lib/index-Dwd_62sm.js +0 -301
- package/lib/tags-CAfasCGV.cjs +0 -1
- package/lib/tags-D9lNDPX8.js +0 -848
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var Z=(f,e,t)=>{if(!e.has(f))throw TypeError("Cannot "+t)};var i=(f,e,t)=>(Z(f,e,"read from private field"),t?t.call(f):e.get(f)),a=(f,e,t)=>{if(e.has(f))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(f):e.set(f,t)},E=(f,e,t,s)=>(Z(f,e,"write to private field"),s?s.call(f,t):e.set(f,t),t);var r=(f,e,t)=>(Z(f,e,"access private method"),t);const y=require("./Store-Cr3VaD9G.cjs"),he=require("./browser-CpzFX2xg.cjs"),de=require("./object-CCiXnER2.cjs"),_=require("./string-DhgS_iFl.cjs"),we=require("./connector/index.cjs"),Le=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view"]);var o,u,l,w,m,g,P,ue,B,me,R,ge,L,j,T,ee,G,Se,$,Ee,W,ye,z,be,A,te,v,se,J,Ce,k,ie,M,ne,V,pe,x,oe,p,H,D,re,q,ae,F,ce,I,K;const U=class U{constructor(...e){a(this,P);a(this,B);a(this,R);a(this,L);a(this,T);a(this,G);a(this,$);a(this,W);a(this,z);a(this,A);a(this,v);a(this,J);a(this,k);a(this,M);a(this,V);a(this,x);a(this,p);a(this,D);a(this,q);a(this,F);a(this,o,null);a(this,u,new Set);a(this,l,new Set);a(this,w,void 0);a(this,m,void 0);a(this,g,void 0);a(this,I,e=>{i(this,u).forEach(t=>{t(e)}),i(this,u).clear()});a(this,K,(e,t)=>{i(this,l).forEach(s=>{s(e,t)}),i(this,l).clear(),r(this,M,ne).call(this)});if(he.isBrowser){const t=e[0],s=e[1];E(this,o,r(this,P,ue).call(this,t,s==null?void 0:s.forceSvg)),r(this,R,ge).call(this,s)}}get node(){return i(this,o)}set node(e){var t;r(this,M,ne).call(this),E(this,o,e),(t=i(this,w))==null||t.call(this),i(this,o)instanceof Element&&E(this,m,[...i(this,o).querySelectorAll("store-root")]),r(this,k,ie).call(this),r(this,L,j).call(this)}};o=new WeakMap,u=new WeakMap,l=new WeakMap,w=new WeakMap,m=new WeakMap,g=new WeakMap,P=new WeakSet,ue=function(e,t){let s=null;if(e instanceof Node)s=e;else if(typeof e=="string")if(!e.includes("<")&&e.includes("-"))s=new(customElements.get(e));else if(e.includes("<")){const n=document.createElement("div");n.innerHTML=e,s=n.firstElementChild}else Le.has(e)||t?s=document.createElementNS("http://www.w3.org/2000/svg",e):s=document.createElement(e);else s=document.createElement("div");return s},B=new WeakSet,me=function(e){return e instanceof HTMLElement||e instanceof SVGElement},R=new WeakSet,ge=function(e){if(!e)return;const t=r(this,B,me).call(this,i(this,o)),s=e.ref;delete e.ref,e!=null&&e.onConnect&&(i(this,u).add(e.onConnect),delete e.onConnect),e!=null&&e.onDisconnect&&(i(this,l).add(e.onDisconnect),delete e.onDisconnect);let n,c;for(const h in e){const d=e[h];h==="class"&&t?r(this,T,ee).call(this,d):h==="style"&&t?r(this,W,ye).call(this,d):h==="lightChildren"?r(this,p,H).call(this,i(this,o),d):h==="children"?r(this,p,H).call(this,i(this,o)instanceof Element?i(this,o).shadowRoot||i(this,o):i(this,o),d):h==="connectedClass"?i(this,u).add(()=>{requestAnimationFrame(()=>{i(this,o).classList.add(typeof d=="boolean"?"connected":d)})}):h.startsWith("on")?(c||(c={}),c[h]=d):(n||(n={}),n[h]=d)}r(this,V,pe).call(this,n),r(this,J,Ce).call(this,c),s&&(typeof s=="function"?s(i(this,o)):s.current=i(this,o)),r(this,L,j).call(this)},L=new WeakSet,j=function(){if(he.isBrowser&&(i(this,l).size||i(this,u).size)){const e=i(this,o)instanceof DocumentFragment?i(this,o).firstChild:i(this,o);E(this,w,we.connector.subscribe(e,{connectCallback:i(this,I),disconnectCallback:i(this,K),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},T=new WeakSet,ee=function(e){if(e){if(typeof e=="string")i(this,o).classList.add(e);else if(Array.isArray(e))e.forEach(t=>{t&&r(this,T,ee).call(this,t)});else if(typeof e=="object")if(e instanceof y.Store)r(this,G,Se).call(this,e);else for(const t in e){const s=e[t];s instanceof y.Store?r(this,$,Ee).call(this,t,s):s?i(this,o).classList.add(t):i(this,o).classList.remove(t)}}else return},G=new WeakSet,Se=function(e){i(this,l).add(e.subscribe(({current:t,previous:s})=>{s&&[s].flat().forEach(n=>{n&&i(this,o).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&i(this,o).classList.add(n)})}))},$=new WeakSet,Ee=function(e,t){i(this,l).add(t.subscribe(({current:s})=>{s?i(this,o).classList.add(e):i(this,o).classList.remove(e)}))},W=new WeakSet,ye=function(e){if(!e)return;i(this,o).tagName==="style"||i(this,o).tagName==="STYLE"?r(this,A,te).call(this,e):r(this,z,be).call(this,e)},z=new WeakSet,be=function(e){for(const t in e){const s=t,n=e[s];n instanceof y.Store?i(this,l).add(n.subscribe(({current:c})=>{r(this,v,se).call(this,s,c)})):r(this,v,se).call(this,s,n)}},A=new WeakSet,te=function(e){for(const t in e){const s=e[t];if(typeof s=="object"&&!(s instanceof y.Store))i(this,o).appendChild(document.createTextNode(`${t} {`)),r(this,A,te).call(this,s),i(this,o).appendChild(document.createTextNode("}"));else if(s instanceof y.Store){const n=document.createTextNode("");i(this,l).add(s.subscribe(c=>{c.current?n.nodeValue=`${_.camelToKebab(t)}: ${c.current};`:n.nodeValue=""})),i(this,o).appendChild(n)}else i(this,o).appendChild(document.createTextNode(`${_.camelToKebab(t)}: ${s};`))}},v=new WeakSet,se=function(e,t){e.includes("--")?t?i(this,o).style.setProperty(e,t.toString()):i(this,o).style.removeProperty(e):t?i(this,o).style[e]=t.toString():i(this,o).style[e]=""},J=new WeakSet,Ce=function(e){if(e){i(this,g)||E(this,g,[]);for(const t in e){const s=t,n=_.uncapitalize(s.split("on").slice(1).join("on")),c=e[s];typeof c=="object"?i(this,g).push({name:n,callback:c.callback,options:c.options}):typeof c=="function"&&i(this,g).push({name:n,callback:c})}r(this,k,ie).call(this)}},k=new WeakSet,ie=function(){var e;(e=i(this,g))==null||e.forEach(t=>{i(this,o).addEventListener(t.name,t.callback,t.options)})},M=new WeakSet,ne=function(){var e;(e=i(this,g))==null||e.forEach(t=>{i(this,o).removeEventListener(t.name,t.callback,t.options)})},V=new WeakSet,pe=function(e){for(const t in e){const s=e[t];s instanceof y.Store?i(this,l).add(s.subscribe(({current:n})=>{r(this,x,oe).call(this,t,n)})):r(this,x,oe).call(this,t,s)}},x=new WeakSet,oe=function(e,t){var n,c;const s=i(this,o);e in s&&!((c=(n=s.constructor)==null?void 0:n.observedAttributes)!=null&&c.includes(e))?t!=null&&(s[e]=t.toString()):t!=null&&s.setAttribute(e,t.toString())},p=new WeakSet,H=function(e,t){t&&(t=[t].flat(),t.forEach(s=>{if(s instanceof y.Store){const n=document.createElement("div");n.style.display="contents",e.appendChild(n),i(this,m)||E(this,m,[]);const c=i(this,m).length;n.setAttribute("store-root",""),i(this,m).push(n),i(this,l).add(s.subscribe(({current:h,previous:d})=>{const b=i(this,m)[c];b.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const Y=Array.from(b.childNodes),fe=Array.isArray(h)?h:[h],Ne=Array.isArray(d)?d:[d],le=[],Q=[];Y.length&&Ne.forEach((S,N)=>{fe.includes(S)?Q.push(S):le.push(Y[N])}),fe.forEach((S,N)=>{if(Q[N]!=null){if(S!==Q[N]){const C=r(this,q,ae).call(this,S),X=Y[N];C instanceof Node&&!X.isEqualNode(C)?b.replaceChild(C,X):b.removeChild(X)}}else{const C=r(this,q,ae).call(this,S);C instanceof Node&&n.appendChild(C)}}),le.forEach(S=>{b.removeChild(S)}),b.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(s instanceof U)r(this,D,re).call(this,e,s.node);else if(s instanceof Function)r(this,p,H).call(this,e,de.isESClass(s)?new s:s());else{const n=r(this,F,ce).call(this,s);n instanceof Node&&r(this,D,re).call(this,e,n)}}))},D=new WeakSet,re=function(e,t){!(e instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(i(this,u).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),i(this,l).add(()=>{t.remove()})):e.appendChild(t)},q=new WeakSet,ae=function(e){return e instanceof U?e.node:typeof e=="function"?de.isESClass(e)?new e:e():r(this,F,ce).call(this,e)},F=new WeakSet,ce=function(e){if(e instanceof Node)return e;if(e!=null){const t=String(e);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const s=document.createElement("div");return s.innerHTML=t,s.firstElementChild}else return document.createTextNode(t)}else return},I=new WeakMap,K=new WeakMap;let O=U;exports.ElementConstructor=O;
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
var Z = (f, e, t) => {
|
|
2
|
+
if (!e.has(f))
|
|
3
|
+
throw TypeError("Cannot " + t);
|
|
4
|
+
};
|
|
5
|
+
var i = (f, e, t) => (Z(f, e, "read from private field"), t ? t.call(f) : e.get(f)), r = (f, e, t) => {
|
|
6
|
+
if (e.has(f))
|
|
7
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
+
e instanceof WeakSet ? e.add(f) : e.set(f, t);
|
|
9
|
+
}, E = (f, e, t, s) => (Z(f, e, "write to private field"), s ? s.call(f, t) : e.set(f, t), t);
|
|
10
|
+
var a = (f, e, t) => (Z(f, e, "access private method"), t);
|
|
11
|
+
import { S as p } from "./Store-Qr3SNOSf.js";
|
|
12
|
+
import { i as fe } from "./browser-0zX67oeU.js";
|
|
13
|
+
import { i as le } from "./object-D6MVWB4l.js";
|
|
14
|
+
import { c as he, u as we } from "./string-f0Dnk0L1.js";
|
|
15
|
+
import { connector as Le } from "./connector/index.js";
|
|
16
|
+
const Te = /* @__PURE__ */ new Set([
|
|
17
|
+
// 'a', 'style', 'title', 'script',
|
|
18
|
+
"animate",
|
|
19
|
+
"animateMotion",
|
|
20
|
+
"animateTransform",
|
|
21
|
+
"circle",
|
|
22
|
+
"clipPath",
|
|
23
|
+
"defs",
|
|
24
|
+
"desc",
|
|
25
|
+
"ellipse",
|
|
26
|
+
"feBlend",
|
|
27
|
+
"feColorMatrix",
|
|
28
|
+
"feComponentTransfer",
|
|
29
|
+
"feComposite",
|
|
30
|
+
"feConvolveMatrix",
|
|
31
|
+
"feDiffuseLighting",
|
|
32
|
+
"feDisplacementMap",
|
|
33
|
+
"feDistantLight",
|
|
34
|
+
"feDropShadow",
|
|
35
|
+
"feFlood",
|
|
36
|
+
"feFuncA",
|
|
37
|
+
"feFuncB",
|
|
38
|
+
"feFuncG",
|
|
39
|
+
"feFuncR",
|
|
40
|
+
"feGaussianBlur",
|
|
41
|
+
"feImage",
|
|
42
|
+
"feMerge",
|
|
43
|
+
"feMergeNode",
|
|
44
|
+
"feMorphology",
|
|
45
|
+
"feOffset",
|
|
46
|
+
"fePointLight",
|
|
47
|
+
"feSpecularLighting",
|
|
48
|
+
"feSpotLight",
|
|
49
|
+
"feTile",
|
|
50
|
+
"feTurbulence",
|
|
51
|
+
"filter",
|
|
52
|
+
"foreignObject",
|
|
53
|
+
"g",
|
|
54
|
+
"image",
|
|
55
|
+
"line",
|
|
56
|
+
"linearGradient",
|
|
57
|
+
"listener",
|
|
58
|
+
"marker",
|
|
59
|
+
"mask",
|
|
60
|
+
"metadata",
|
|
61
|
+
"mpath",
|
|
62
|
+
"path",
|
|
63
|
+
"pattern",
|
|
64
|
+
"polygon",
|
|
65
|
+
"polyline",
|
|
66
|
+
"radialGradient",
|
|
67
|
+
"rect",
|
|
68
|
+
"set",
|
|
69
|
+
"solidColor",
|
|
70
|
+
"stop",
|
|
71
|
+
"svg",
|
|
72
|
+
"switch",
|
|
73
|
+
"symbol",
|
|
74
|
+
"text",
|
|
75
|
+
"textPath",
|
|
76
|
+
"title",
|
|
77
|
+
"tspan",
|
|
78
|
+
"view"
|
|
79
|
+
]);
|
|
80
|
+
var o, m, l, w, u, g, R, me, B, ue, G, ge, L, _, T, O, $, ye, q, Ee, W, pe, z, Ce, A, j, v, ee, J, be, k, te, M, se, V, Se, x, ie, S, P, D, ne, F, oe, H, ae, I, U;
|
|
81
|
+
const Y = class Y {
|
|
82
|
+
constructor(...e) {
|
|
83
|
+
r(this, R);
|
|
84
|
+
r(this, B);
|
|
85
|
+
r(this, G);
|
|
86
|
+
r(this, L);
|
|
87
|
+
r(this, T);
|
|
88
|
+
r(this, $);
|
|
89
|
+
r(this, q);
|
|
90
|
+
r(this, W);
|
|
91
|
+
r(this, z);
|
|
92
|
+
r(this, A);
|
|
93
|
+
r(this, v);
|
|
94
|
+
r(this, J);
|
|
95
|
+
r(this, k);
|
|
96
|
+
r(this, M);
|
|
97
|
+
r(this, V);
|
|
98
|
+
r(this, x);
|
|
99
|
+
r(this, S);
|
|
100
|
+
r(this, D);
|
|
101
|
+
r(this, F);
|
|
102
|
+
r(this, H);
|
|
103
|
+
r(this, o, null);
|
|
104
|
+
r(this, m, /* @__PURE__ */ new Set());
|
|
105
|
+
r(this, l, /* @__PURE__ */ new Set());
|
|
106
|
+
r(this, w, void 0);
|
|
107
|
+
r(this, u, void 0);
|
|
108
|
+
r(this, g, void 0);
|
|
109
|
+
r(this, I, (e) => {
|
|
110
|
+
i(this, m).forEach((t) => {
|
|
111
|
+
t(e);
|
|
112
|
+
}), i(this, m).clear();
|
|
113
|
+
});
|
|
114
|
+
r(this, U, (e, t) => {
|
|
115
|
+
i(this, l).forEach((s) => {
|
|
116
|
+
s(e, t);
|
|
117
|
+
}), i(this, l).clear(), a(this, M, se).call(this);
|
|
118
|
+
});
|
|
119
|
+
if (fe) {
|
|
120
|
+
const t = e[0], s = e[1];
|
|
121
|
+
E(this, o, a(this, R, me).call(this, t, s == null ? void 0 : s.forceSvg)), a(this, G, ge).call(this, s);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
get node() {
|
|
125
|
+
return i(this, o);
|
|
126
|
+
}
|
|
127
|
+
set node(e) {
|
|
128
|
+
var t;
|
|
129
|
+
a(this, M, se).call(this), E(this, o, e), (t = i(this, w)) == null || t.call(this), i(this, o) instanceof Element && E(this, u, [
|
|
130
|
+
...i(this, o).querySelectorAll("store-root")
|
|
131
|
+
]), a(this, k, te).call(this), a(this, L, _).call(this);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
o = new WeakMap(), m = new WeakMap(), l = new WeakMap(), w = new WeakMap(), u = new WeakMap(), g = new WeakMap(), R = new WeakSet(), me = function(e, t) {
|
|
135
|
+
let s = null;
|
|
136
|
+
if (e instanceof Node)
|
|
137
|
+
s = e;
|
|
138
|
+
else if (typeof e == "string")
|
|
139
|
+
if (!e.includes("<") && e.includes("-"))
|
|
140
|
+
s = new (customElements.get(e))();
|
|
141
|
+
else if (e.includes("<")) {
|
|
142
|
+
const n = document.createElement("div");
|
|
143
|
+
n.innerHTML = e, s = n.firstElementChild;
|
|
144
|
+
} else
|
|
145
|
+
Te.has(e) || t ? s = document.createElementNS(
|
|
146
|
+
"http://www.w3.org/2000/svg",
|
|
147
|
+
e
|
|
148
|
+
) : s = document.createElement(e);
|
|
149
|
+
else
|
|
150
|
+
s = document.createElement("div");
|
|
151
|
+
return s;
|
|
152
|
+
}, B = new WeakSet(), ue = function(e) {
|
|
153
|
+
return e instanceof HTMLElement || e instanceof SVGElement;
|
|
154
|
+
}, G = new WeakSet(), ge = function(e) {
|
|
155
|
+
if (!e)
|
|
156
|
+
return;
|
|
157
|
+
const t = a(this, B, ue).call(this, i(this, o)), s = e.ref;
|
|
158
|
+
delete e.ref, e != null && e.onConnect && (i(this, m).add(e.onConnect), delete e.onConnect), e != null && e.onDisconnect && (i(this, l).add(e.onDisconnect), delete e.onDisconnect);
|
|
159
|
+
let n, c;
|
|
160
|
+
for (const h in e) {
|
|
161
|
+
const d = e[h];
|
|
162
|
+
h === "class" && t ? a(this, T, O).call(this, d) : h === "style" && t ? a(this, W, pe).call(this, d) : h === "lightChildren" ? a(this, S, P).call(this, i(this, o), d) : h === "children" ? a(this, S, P).call(this, i(this, o) instanceof Element ? i(this, o).shadowRoot || i(this, o) : i(this, o), d) : h === "connectedClass" ? i(this, m).add(() => {
|
|
163
|
+
requestAnimationFrame(() => {
|
|
164
|
+
i(this, o).classList.add(
|
|
165
|
+
typeof d == "boolean" ? "connected" : d
|
|
166
|
+
);
|
|
167
|
+
});
|
|
168
|
+
}) : h.startsWith("on") ? (c || (c = {}), c[h] = d) : (n || (n = {}), n[h] = d);
|
|
169
|
+
}
|
|
170
|
+
a(this, V, Se).call(this, n), a(this, J, be).call(this, c), s && (typeof s == "function" ? s(i(this, o)) : s.current = i(this, o)), a(this, L, _).call(this);
|
|
171
|
+
}, L = new WeakSet(), _ = function() {
|
|
172
|
+
if (fe && (i(this, l).size || i(this, m).size)) {
|
|
173
|
+
const e = i(this, o) instanceof DocumentFragment ? i(this, o).firstChild : i(this, o);
|
|
174
|
+
E(this, w, Le.subscribe(
|
|
175
|
+
e,
|
|
176
|
+
{
|
|
177
|
+
connectCallback: i(this, I),
|
|
178
|
+
disconnectCallback: i(this, U),
|
|
179
|
+
unsubscribeAfterDisconnect: !0,
|
|
180
|
+
maxWaitSec: 20
|
|
181
|
+
}
|
|
182
|
+
));
|
|
183
|
+
}
|
|
184
|
+
}, T = new WeakSet(), O = function(e) {
|
|
185
|
+
if (e) {
|
|
186
|
+
if (typeof e == "string")
|
|
187
|
+
i(this, o).classList.add(e);
|
|
188
|
+
else if (Array.isArray(e))
|
|
189
|
+
e.forEach((t) => {
|
|
190
|
+
t && a(this, T, O).call(this, t);
|
|
191
|
+
});
|
|
192
|
+
else if (typeof e == "object")
|
|
193
|
+
if (e instanceof p)
|
|
194
|
+
a(this, $, ye).call(this, e);
|
|
195
|
+
else
|
|
196
|
+
for (const t in e) {
|
|
197
|
+
const s = e[t];
|
|
198
|
+
s instanceof p ? a(this, q, Ee).call(this, t, s) : s ? i(this, o).classList.add(t) : i(this, o).classList.remove(t);
|
|
199
|
+
}
|
|
200
|
+
} else
|
|
201
|
+
return;
|
|
202
|
+
}, $ = new WeakSet(), ye = function(e) {
|
|
203
|
+
i(this, l).add(
|
|
204
|
+
e.subscribe(({ current: t, previous: s }) => {
|
|
205
|
+
s && [s].flat().forEach((n) => {
|
|
206
|
+
n && i(this, o).classList.remove(n);
|
|
207
|
+
}), t && [t].flat().forEach((n) => {
|
|
208
|
+
n && i(this, o).classList.add(n);
|
|
209
|
+
});
|
|
210
|
+
})
|
|
211
|
+
);
|
|
212
|
+
}, q = new WeakSet(), Ee = function(e, t) {
|
|
213
|
+
i(this, l).add(
|
|
214
|
+
t.subscribe(({ current: s }) => {
|
|
215
|
+
s ? i(this, o).classList.add(e) : i(this, o).classList.remove(e);
|
|
216
|
+
})
|
|
217
|
+
);
|
|
218
|
+
}, W = new WeakSet(), pe = function(e) {
|
|
219
|
+
if (!e)
|
|
220
|
+
return;
|
|
221
|
+
i(this, o).tagName === "style" || i(this, o).tagName === "STYLE" ? a(this, A, j).call(this, e) : a(this, z, Ce).call(this, e);
|
|
222
|
+
}, z = new WeakSet(), Ce = function(e) {
|
|
223
|
+
for (const t in e) {
|
|
224
|
+
const s = t, n = e[s];
|
|
225
|
+
n instanceof p ? i(this, l).add(
|
|
226
|
+
n.subscribe(({ current: c }) => {
|
|
227
|
+
a(this, v, ee).call(this, s, c);
|
|
228
|
+
})
|
|
229
|
+
) : a(this, v, ee).call(this, s, n);
|
|
230
|
+
}
|
|
231
|
+
}, A = new WeakSet(), j = function(e) {
|
|
232
|
+
for (const t in e) {
|
|
233
|
+
const s = e[t];
|
|
234
|
+
if (typeof s == "object" && !(s instanceof p))
|
|
235
|
+
i(this, o).appendChild(
|
|
236
|
+
document.createTextNode(`${t} {`)
|
|
237
|
+
), a(this, A, j).call(this, s), i(this, o).appendChild(document.createTextNode("}"));
|
|
238
|
+
else if (s instanceof p) {
|
|
239
|
+
const n = document.createTextNode("");
|
|
240
|
+
i(this, l).add(
|
|
241
|
+
s.subscribe((c) => {
|
|
242
|
+
c.current ? n.nodeValue = `${he(t)}: ${c.current};` : n.nodeValue = "";
|
|
243
|
+
})
|
|
244
|
+
), i(this, o).appendChild(n);
|
|
245
|
+
} else
|
|
246
|
+
i(this, o).appendChild(
|
|
247
|
+
document.createTextNode(`${he(t)}: ${s};`)
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
}, v = new WeakSet(), ee = function(e, t) {
|
|
251
|
+
e.includes("--") ? t ? i(this, o).style.setProperty(e, t.toString()) : i(this, o).style.removeProperty(e) : t ? i(this, o).style[e] = t.toString() : i(this, o).style[e] = "";
|
|
252
|
+
}, J = new WeakSet(), be = function(e) {
|
|
253
|
+
if (e) {
|
|
254
|
+
i(this, g) || E(this, g, []);
|
|
255
|
+
for (const t in e) {
|
|
256
|
+
const s = t, n = we(
|
|
257
|
+
s.split("on").slice(1).join("on")
|
|
258
|
+
), c = e[s];
|
|
259
|
+
typeof c == "object" ? i(this, g).push({
|
|
260
|
+
name: n,
|
|
261
|
+
callback: c.callback,
|
|
262
|
+
options: c.options
|
|
263
|
+
}) : typeof c == "function" && i(this, g).push({
|
|
264
|
+
name: n,
|
|
265
|
+
callback: c
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
a(this, k, te).call(this);
|
|
269
|
+
}
|
|
270
|
+
}, k = new WeakSet(), te = function() {
|
|
271
|
+
var e;
|
|
272
|
+
(e = i(this, g)) == null || e.forEach((t) => {
|
|
273
|
+
i(this, o).addEventListener(
|
|
274
|
+
t.name,
|
|
275
|
+
t.callback,
|
|
276
|
+
t.options
|
|
277
|
+
);
|
|
278
|
+
});
|
|
279
|
+
}, M = new WeakSet(), se = function() {
|
|
280
|
+
var e;
|
|
281
|
+
(e = i(this, g)) == null || e.forEach((t) => {
|
|
282
|
+
i(this, o).removeEventListener(
|
|
283
|
+
t.name,
|
|
284
|
+
t.callback,
|
|
285
|
+
t.options
|
|
286
|
+
);
|
|
287
|
+
});
|
|
288
|
+
}, V = new WeakSet(), Se = function(e) {
|
|
289
|
+
for (const t in e) {
|
|
290
|
+
const s = e[t];
|
|
291
|
+
s instanceof p ? i(this, l).add(
|
|
292
|
+
s.subscribe(({ current: n }) => {
|
|
293
|
+
a(this, x, ie).call(this, t, n);
|
|
294
|
+
})
|
|
295
|
+
) : a(this, x, ie).call(this, t, s);
|
|
296
|
+
}
|
|
297
|
+
}, x = new WeakSet(), ie = function(e, t) {
|
|
298
|
+
var n, c;
|
|
299
|
+
const s = i(this, o);
|
|
300
|
+
e in s && !((c = (n = s.constructor) == null ? void 0 : n.observedAttributes) != null && c.includes(e)) ? t != null && (s[e] = t.toString()) : t != null && s.setAttribute(e, t.toString());
|
|
301
|
+
}, S = new WeakSet(), P = function(e, t) {
|
|
302
|
+
t && (t = [t].flat(), t.forEach((s) => {
|
|
303
|
+
if (s instanceof p) {
|
|
304
|
+
const n = document.createElement("div");
|
|
305
|
+
n.style.display = "contents", e.appendChild(n), i(this, u) || E(this, u, []);
|
|
306
|
+
const c = i(this, u).length;
|
|
307
|
+
n.setAttribute("store-root", ""), i(this, u).push(n), i(this, l).add(
|
|
308
|
+
s.subscribe(({ current: h, previous: d }) => {
|
|
309
|
+
const C = i(this, u)[c];
|
|
310
|
+
C.dispatchEvent(
|
|
311
|
+
new CustomEvent("beforeChildrenChange", {
|
|
312
|
+
bubbles: !0,
|
|
313
|
+
composed: !0
|
|
314
|
+
})
|
|
315
|
+
);
|
|
316
|
+
const K = Array.from(C.childNodes), re = Array.isArray(h) ? h : [h], Ne = Array.isArray(d) ? d : [d], ce = [], Q = [];
|
|
317
|
+
K.length && Ne.forEach((y, N) => {
|
|
318
|
+
re.includes(y) ? Q.push(y) : ce.push(K[N]);
|
|
319
|
+
}), re.forEach((y, N) => {
|
|
320
|
+
if (Q[N] != null) {
|
|
321
|
+
if (y !== Q[N]) {
|
|
322
|
+
const b = a(this, F, oe).call(this, y), X = K[N];
|
|
323
|
+
b instanceof Node && !X.isEqualNode(b) ? C.replaceChild(b, X) : C.removeChild(X);
|
|
324
|
+
}
|
|
325
|
+
} else {
|
|
326
|
+
const b = a(this, F, oe).call(this, y);
|
|
327
|
+
b instanceof Node && n.appendChild(b);
|
|
328
|
+
}
|
|
329
|
+
}), ce.forEach((y) => {
|
|
330
|
+
C.removeChild(y);
|
|
331
|
+
}), C.dispatchEvent(
|
|
332
|
+
new CustomEvent("afterChildrenChange", {
|
|
333
|
+
bubbles: !0,
|
|
334
|
+
composed: !0
|
|
335
|
+
})
|
|
336
|
+
);
|
|
337
|
+
})
|
|
338
|
+
);
|
|
339
|
+
} else if (s instanceof Y)
|
|
340
|
+
a(this, D, ne).call(this, e, s.node);
|
|
341
|
+
else if (s instanceof Function)
|
|
342
|
+
a(this, S, P).call(this, e, le(s) ? new s() : s());
|
|
343
|
+
else {
|
|
344
|
+
const n = a(this, H, ae).call(this, s);
|
|
345
|
+
n instanceof Node && a(this, D, ne).call(this, e, n);
|
|
346
|
+
}
|
|
347
|
+
}));
|
|
348
|
+
}, D = new WeakSet(), ne = function(e, t) {
|
|
349
|
+
!(e instanceof ShadowRoot) && t instanceof HTMLElement && t.tagName === "STYLE" ? (i(this, m).add(() => {
|
|
350
|
+
[...document.head.querySelectorAll("style")].find((n) => n.outerHTML === t.outerHTML) || document.head.appendChild(t);
|
|
351
|
+
}), i(this, l).add(() => {
|
|
352
|
+
t.remove();
|
|
353
|
+
})) : e.appendChild(t);
|
|
354
|
+
}, F = new WeakSet(), oe = function(e) {
|
|
355
|
+
return e instanceof Y ? e.node : typeof e == "function" ? le(e) ? new e() : e() : a(this, H, ae).call(this, e);
|
|
356
|
+
}, H = new WeakSet(), ae = function(e) {
|
|
357
|
+
if (e instanceof Node)
|
|
358
|
+
return e;
|
|
359
|
+
if (e != null) {
|
|
360
|
+
const t = String(e);
|
|
361
|
+
if (t.trim().startsWith("<") && t.trim().endsWith(">")) {
|
|
362
|
+
const s = document.createElement("div");
|
|
363
|
+
return s.innerHTML = t, s.firstElementChild;
|
|
364
|
+
} else
|
|
365
|
+
return document.createTextNode(t);
|
|
366
|
+
} else
|
|
367
|
+
return;
|
|
368
|
+
}, I = new WeakMap(), U = new WeakMap();
|
|
369
|
+
let de = Y;
|
|
370
|
+
export {
|
|
371
|
+
de as E
|
|
372
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./globals-bYKki-b9.cjs");function o(e){n.currentComponentElement.value.addDisconnectCallback(e)}function c(e){const t=typeof e=="function"?e(n.currentComponentElement.value):e;return n.currentComponentElement.value&&o(()=>t.close()),t}exports._createStore=c;exports.onDisconnect=o;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { c as n } from "./globals-DMjysUXI.js";
|
|
2
|
+
function t(e) {
|
|
3
|
+
n.value.addDisconnectCallback(e);
|
|
4
|
+
}
|
|
5
|
+
function a(e) {
|
|
6
|
+
const o = typeof e == "function" ? e(n.value) : e;
|
|
7
|
+
return n.value && t(() => o.close()), o;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
a as _,
|
|
11
|
+
t as o
|
|
12
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CustomElement } from '../custom-element';
|
|
2
1
|
import { Attribute } from '../attribute';
|
|
3
2
|
import { Axes2D } from '../utils';
|
|
4
3
|
|
|
@@ -9,7 +8,7 @@ export interface AccordionToggleOptions {
|
|
|
9
8
|
skipTransition?: boolean;
|
|
10
9
|
exclude?: HTMLElement;
|
|
11
10
|
}
|
|
12
|
-
export declare class AccordionElement extends
|
|
11
|
+
export declare class AccordionElement extends HTMLElement {
|
|
13
12
|
#private;
|
|
14
13
|
constructor();
|
|
15
14
|
get axisAttribute(): Attribute<Axes2D>;
|
package/lib/accordion/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var N=(l,i,t)=>{if(!i.has(l))throw TypeError("Cannot "+t)};var e=(l,i,t)=>(N(l,i,"read from private field"),t?t.call(l):i.get(l)),s=(l,i,t)=>{if(i.has(l))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(l):i.set(l,t)},c=(l,i,t,h)=>(N(l,i,"write to private field"),h?h.call(l,t):i.set(l,t),t);var o=(l,i,t)=>(N(l,i,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../attribute/index.cjs"),F=require("../browser-CpzFX2xg.cjs"),G=require("../dom-JBOkFLTh.cjs"),j=require("../events-BGwqaxVW.cjs"),J=require("../style-At6aDoqG.cjs");var a,r,f,n,v,I,L,m,x,H,_,y,M,z,p,R,C,d,g,b,E,w,B,S;class D{constructor(i,t){s(this,H);s(this,y);s(this,d);s(this,b);s(this,w);s(this,a,null);s(this,r,null);s(this,f,null);s(this,n,null);s(this,v,null);s(this,I,!1);s(this,L,void 0);s(this,m,!1);s(this,x,[]);s(this,z,()=>{e(this,m)?this.close():this.open()});s(this,p,()=>{e(this,m)&&(o(this,d,g).call(this,0,!0),o(this,d,g).call(this,e(this,y,M)))});s(this,R,()=>{o(this,b,E).call(this,"size-change")});s(this,C,i=>{e(this,m)&&(o(this,d,g).call(this,0,!0),o(this,d,g).call(this,e(this,y,M)),e(this,x).forEach(t=>{t.element.scroll({left:e(this,a).axisAttribute.current==="x"?t.scroll:0,top:e(this,a).axisAttribute.current==="y"?t.scroll:0})}))});s(this,S,()=>{const i=G.getAllParentElements(e(this,r));c(this,x,i.map(t=>({element:t,scroll:e(this,a).axisAttribute.current==="y"?t.scrollTop:t.scrollLeft})))});t.firstElementChild instanceof HTMLElement&&t.lastElementChild instanceof HTMLElement?(c(this,a,i),c(this,r,t),c(this,f,t.firstElementChild),c(this,n,t.lastElementChild),e(this,f).style.cursor="default",e(this,n).style.overflow="hidden",e(this,a).axisAttribute.current==="y"?e(this,n).style.height="0px":e(this,n).style.width="0px",c(this,v,new ResizeObserver(e(this,R))),addEventListener("resize",e(this,p)),e(this,f).addEventListener("click",e(this,z)),e(this,r).addEventListener("beforeSizeChange",e(this,S)),e(this,r).addEventListener("sizeChange",e(this,C)),e(this,r).hasAttribute("data-opened")&&this.open({skipTransition:!0})):i.removeItem(e(this,r))}get element(){return e(this,r)}destroy(){e(this,f)&&(e(this,r).classList.remove("opened","triggered"),e(this,f).style.cursor="",o(this,d,g).call(this,void 0),e(this,v).disconnect(),removeEventListener("resize",e(this,p)),e(this,f).removeEventListener("click",e(this,z)),e(this,r).removeEventListener("beforeSizeChange",e(this,S)),e(this,r).removeEventListener("sizeChange",e(this,C)),clearTimeout(e(this,L)))}open(i){o(this,b,E).call(this,"before-toggle"),i!=null&&i.skipTransition&&o(this,w,B).call(this),e(this,a).multipleAttribute.current||e(this,a).closeAll({exclude:e(this,r)}),e(this,I)||e(this,v).observe(e(this,n)),c(this,m,!0),clearTimeout(e(this,L)),e(this,r).classList.add("triggered"),o(this,d,g).call(this,e(this,y,M)),setTimeout(()=>{e(this,r).classList.add("opened")},0),o(this,b,E).call(this,"toggle")}close(i){o(this,b,E).call(this,"before-toggle"),i!=null&&i.skipTransition&&o(this,w,B).call(this),c(this,m,!1),e(this,r).classList.remove("opened"),o(this,d,g).call(this,0),c(this,L,setTimeout(()=>{e(this,r).classList.remove("triggered")},J.getElementTransitionDurationMS(e(this,n)))),o(this,b,E).call(this,"toggle")}}a=new WeakMap,r=new WeakMap,f=new WeakMap,n=new WeakMap,v=new WeakMap,I=new WeakMap,L=new WeakMap,m=new WeakMap,x=new WeakMap,H=new WeakSet,_=function(){return e(this,r).parentElement||e(this,r).getRootNode()},y=new WeakSet,M=function(){return e(this,a).axisAttribute.current==="x"?e(this,n).scrollWidth:e(this,n).scrollHeight},z=new WeakMap,p=new WeakMap,R=new WeakMap,C=new WeakMap,d=new WeakSet,g=function(i,t=!1){t&&(e(this,n).style.transition="all 0s",setTimeout(()=>{e(this,n).style.transition=""}));const h=e(this,a).axisAttribute.current==="x"?"width":"height";i!=null?e(this,n).style[h]=`${i}px`:e(this,n).style[h]=""},b=new WeakSet,E=function(i){i==="before-toggle"?j.dispatchBeforeSizeChangeEvent(e(this,r)):i==="toggle"?e(this,r).dispatchEvent(new CustomEvent("accordionItemToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,m)}})):i==="size-change"&&j.dispatchSizeChangeEvent(e(this,H,_))},w=new WeakSet,B=function(){e(this,n).style.transition="all 0s",setTimeout(()=>{e(this,n).style.transition=""},50)},S=new WeakMap;var q,O,u,T,k,P;class $ extends HTMLElement{constructor(){super();s(this,k);s(this,q,new W.Attribute(this,"axis","y"));s(this,O,new W.Attribute(this,"multiple",!1));s(this,u,[]);s(this,T,null);F.isBrowser&&c(this,T,new MutationObserver(t=>{t.forEach(h=>{h.removedNodes.forEach(A=>{A instanceof HTMLElement&&this.removeItem(A)}),h.addedNodes.forEach(A=>{A instanceof HTMLElement&&this.createItem(A)})})}))}get axisAttribute(){return e(this,q)}get multipleAttribute(){return e(this,O)}createItem(t){e(this,u).find(h=>h.element===t)||e(this,u).push(new D(this,t))}removeItem(t){c(this,u,e(this,u).filter(h=>{if(h.element!==t)return!0;h.destroy()}))}closeAll(t){e(this,u).forEach(h=>{(t==null?void 0:t.exclude)!==h.element&&h.close(t)})}openAll(t){e(this,u).forEach(h=>{(t==null?void 0:t.exclude)!==h.element&&h.open(t)})}connectedCallback(){e(this,T).observe(e(this,k,P),{childList:!0}),c(this,u,[...e(this,k,P).children].map(t=>{if(t instanceof HTMLElement)return new D(this,t)}).filter(t=>!!t))}disconnectedCallback(){e(this,T).disconnect()}}q=new WeakMap,O=new WeakMap,u=new WeakMap,T=new WeakMap,k=new WeakSet,P=function(){return this.shadowRoot?this.shadowRoot:this};customElements.get("e-accordion")||customElements.define("e-accordion",$);exports.AccordionElement=$;
|