aptechka 0.5.26 → 0.5.27
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/Damped-DxwUBxOC.cjs +1 -0
- package/lib/{Damped-BJgyFENo.js → Damped-QZAoXO5Z.js} +31 -32
- package/lib/{Derived-BZtlW0bB.cjs → Derived-B-g8dYgh.cjs} +1 -1
- package/lib/{Derived-DH-ouLBq.js → Derived-kPJs5JC5.js} +1 -1
- package/lib/{SourceManager-DmXmmA6z.js → SourceManager-Q-PB-Rkh.js} +3 -4
- package/lib/SourceManager-vSlsMKUE.cjs +1 -0
- package/lib/{Store-Cd-E5W1z.js → Store-BQXXikps.js} +7 -8
- package/lib/Store-C-1ruEIm.cjs +1 -0
- package/lib/{Viewport-CCDNxaDg.js → Viewport-CFFhFKqX.js} +5 -6
- package/lib/Viewport-DMB0dO-s.cjs +1 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +8 -9
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +13 -14
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +15 -16
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +3 -4
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +3 -4
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +28 -29
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +52 -53
- package/lib/{createStylesheet-C8aQQ4hd.cjs → createStylesheet-CqHU9_qv.cjs} +1 -1
- package/lib/{createStylesheet-KMRQhSa-.js → createStylesheet-DBCEbDjI.js} +1 -1
- package/lib/createTheme-CHnsCgAr.js +15 -0
- package/lib/createTheme-Cfaw9UmV.cjs +1 -0
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +9 -10
- package/lib/custom-element/index.cjs +1 -1
- package/lib/custom-element/index.js +15 -16
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +6 -7
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +3 -3
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +22 -23
- package/lib/en3/index.cjs +1 -1
- package/lib/en3/index.js +20 -21
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +7 -8
- package/lib/{index-DGr7Qzg3.js → index-BAHHdcp3.js} +3 -4
- package/lib/index-D2XtQX56.cjs +9 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +6 -7
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +3 -4
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +2 -3
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +15 -16
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +5 -6
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +3 -4
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +2 -3
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +2 -3
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +12 -13
- package/lib/resized/index.cjs +1 -1
- package/lib/resized/index.js +7 -8
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +7 -8
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +6 -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 -2
- package/lib/slicer/index.cjs +2 -2
- package/lib/slicer/index.js +3 -4
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +29 -30
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +12 -13
- package/lib/svg-path-data/index.cjs +3 -0
- package/lib/{utils/svg.d.ts → svg-path-data/index.d.ts} +1 -1
- package/lib/{path-data-polyfill-DgeDWYeI.js → svg-path-data/index.js} +201 -162
- package/lib/{tags-BoPv9fDr.js → tags-CMPg9ETZ.js} +233 -234
- package/lib/tags-Djb6mb1o.cjs +1 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +3 -4
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +12 -13
- package/lib/tweaker/index.cjs +1 -1
- package/lib/tweaker/index.js +5 -6
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/index.js +125 -163
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +4 -5
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +6 -7
- package/package.json +9 -1
- package/lib/Damped-CbWlWAbx.cjs +0 -1
- package/lib/SourceManager-BFSCX4Q8.cjs +0 -1
- package/lib/Store-BQGNOHlY.cjs +0 -1
- package/lib/Viewport-DhKPH5nw.cjs +0 -1
- package/lib/createTheme-BSreUYge.cjs +0 -1
- package/lib/createTheme-u3NsrEV6.js +0 -16
- package/lib/index-CWHXGxK7.cjs +0 -9
- package/lib/path-data-polyfill-CXsOR7Oc.cjs +0 -3
- package/lib/tags-CueX-JLX.cjs +0 -1
package/lib/media/index.js
CHANGED
|
@@ -6,18 +6,17 @@ var o = (e, s, r) => (a(e, s, "read from private field"), r ? r.call(e) : s.get(
|
|
|
6
6
|
if (s.has(e))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
s instanceof WeakSet ? s.add(e) : s.set(e, r);
|
|
9
|
-
},
|
|
9
|
+
}, u = (e, s, r, m) => (a(e, s, "write to private field"), m ? m.call(e, r) : s.set(e, r), r);
|
|
10
10
|
import { RESIZE_ORDER as h } from "../order/index.js";
|
|
11
11
|
import { windowResizer as n } from "../window-resizer/index.js";
|
|
12
|
-
import { S as
|
|
13
|
-
import "../path-data-polyfill-DgeDWYeI.js";
|
|
12
|
+
import { S as f } from "../Store-BQXXikps.js";
|
|
14
13
|
var t, i;
|
|
15
|
-
class
|
|
14
|
+
class b extends f {
|
|
16
15
|
constructor(r) {
|
|
17
16
|
super(!1);
|
|
18
17
|
c(this, t, void 0);
|
|
19
18
|
c(this, i, void 0);
|
|
20
|
-
|
|
19
|
+
u(this, t, r), u(this, i, n.subscribe(() => {
|
|
21
20
|
matchMedia(o(this, t)).matches ? this.current = !0 : this.current = !1;
|
|
22
21
|
}, h.MEDIA));
|
|
23
22
|
}
|
|
@@ -27,5 +26,5 @@ class w extends p {
|
|
|
27
26
|
}
|
|
28
27
|
t = new WeakMap(), i = new WeakMap();
|
|
29
28
|
export {
|
|
30
|
-
|
|
29
|
+
b as Media
|
|
31
30
|
};
|
package/lib/modal/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs");require("../Store-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const b=require("../browser-CpzFX2xg.cjs"),s=require("../tags-Djb6mb1o.cjs"),m=require("../createStylesheet-CqHU9_qv.cjs"),g=require("../popover/index.cjs"),d=require("../theme/index.cjs");var w=Object.defineProperty,_=Object.getOwnPropertyDescriptor,y=(t,e,o,r)=>{for(var n=r>1?void 0:r?_(e,o):e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(n=(r?h(e,o,n):h(n))||n);return r&&n&&w(e,o,n),n},p=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)},l=(t,e,o)=>(p(t,e,"read from private field"),o?o.call(t):e.get(t)),u=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},f=(t,e,o,r)=>(p(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),i,a;const C=m.createStylesheet({":host":{position:"fixed",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",transitionProperty:"opacity",transitionDuration:d.aptechkaTheme.durationShort.var},":host::before":{content:'""',position:"fixed",top:"0",left:"0",zIndex:"-1",width:"100%",height:"100%",backgroundColor:"var(--backdrop, rgba(0, 0, 0, 0.8))"},".inner":{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden auto"},".overflow .inner":{alignItems:"flex-start"},".content":{position:"relative"},".close-button":{position:"absolute",zIndex:"1",top:"var(--close-button-top, 0.5em)",right:"var(--close-button-right, 0.5em)",background:"none",border:"none",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit"},".close-button-default":{width:"var(--close-button-size, 1.5em)",height:"var(--close-button-size, 1.5em)",display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"transform",transitionDuration:d.aptechkaTheme.durationShort.var,willChange:"transform"},".close-button:hover .close-button-default":{transform:"scale(0.9)"},".close-button:active .close-button-default":{transform:"scale(0.7)"},".close-button-default::before, .close-button-default::after":{content:'""',position:"absolute",width:"var(--close-button-thickness, 0.1em)",height:"100%",backgroundColor:`var(--close-button-color, ${d.aptechkaTheme.colorDark.var})`},".close-button-default::before":{transform:"rotate(-45deg)"},".close-button-default::after":{transform:"rotate(45deg)"}});exports.ModalElement=class extends g.PopoverElement{constructor(){super(),u(this,i,null),u(this,a,null),b.isBrowser&&(this.openShadow(C),s.element(this,{children:s.div({class:"inner",outside:!0,children:s.div({class:"content",children:[s.element("e-popover-button",{type:"close",target:this.id,class:"close-button",lightChildren:[s.slot({name:"close-button",children:s.span({class:"close-button-default"})})]}),s.slot()]}),ref:e=>f(this,a,e)})}),f(this,i,new ResizeObserver(()=>{l(this,a).scrollHeight>l(this,a).clientHeight?this.classList.add("overflow"):this.classList.remove("overflow")})))}connectedCallback(){super.connectedCallback(),l(this,i).observe(this)}disconnectedCallback(){super.disconnectedCallback(),l(this,i).disconnect()}};i=new WeakMap;a=new WeakMap;exports.ModalElement=y([v.define("e-modal")],exports.ModalElement);
|
package/lib/modal/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { define as g } from "../custom-element/index.js";
|
|
2
|
-
import "../Store-
|
|
2
|
+
import "../Store-BQXXikps.js";
|
|
3
3
|
import { i as w } from "../browser-0zX67oeU.js";
|
|
4
|
-
import "../
|
|
5
|
-
import {
|
|
6
|
-
import { c as y } from "../createStylesheet-KMRQhSa-.js";
|
|
4
|
+
import { e as d, D as f, ay as u, aB as _ } from "../tags-CMPg9ETZ.js";
|
|
5
|
+
import { c as y } from "../createStylesheet-DBCEbDjI.js";
|
|
7
6
|
import { PopoverElement as C } from "../popover/index.js";
|
|
8
7
|
import { aptechkaTheme as h } from "../theme/index.js";
|
|
9
8
|
var k = Object.defineProperty, x = Object.getOwnPropertyDescriptor, z = (t, e, o, r) => {
|
package/lib/morph/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var at=(r,t)=>(t=Symbol[r])?t:Symbol.for("Symbol."+r);var Q=(r,t,s)=>{if(!t.has(r))throw TypeError("Cannot "+s)};var e=(r,t,s)=>(Q(r,t,"read from private field"),s?s.call(r):t.get(r)),a=(r,t,s)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,s)},l=(r,t,s,n)=>(Q(r,t,"write to private field"),n?n.call(r,s):t.set(r,s),s);var p=(r,t,s)=>(Q(r,t,"access private method"),s);var H=(r,t,s)=>new Promise((n,i)=>{var c=d=>{try{u(s.next(d))}catch(m){i(m)}},f=d=>{try{u(s.throw(d))}catch(m){i(m)}},u=d=>d.done?n(d.value):Promise.resolve(d.value).then(c,f);u((s=s.apply(r,t)).next())});var ht=(r,t,s)=>(t=r[at("asyncIterator")])?t.call(r):(r=r[at("iterator")](),t={},s=(n,i)=>(i=r[n])&&(t[n]=c=>new Promise((f,u,d)=>(c=i.call(r,c),d=c.done,Promise.resolve(c.value).then(m=>f({value:m,done:d}),u)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ot=require("../notifier/index.cjs"),pt=require("../browser-CpzFX2xg.cjs");
|
|
1
|
+
"use strict";var at=(r,t)=>(t=Symbol[r])?t:Symbol.for("Symbol."+r);var Q=(r,t,s)=>{if(!t.has(r))throw TypeError("Cannot "+s)};var e=(r,t,s)=>(Q(r,t,"read from private field"),s?s.call(r):t.get(r)),a=(r,t,s)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,s)},l=(r,t,s,n)=>(Q(r,t,"write to private field"),n?n.call(r,s):t.set(r,s),s);var p=(r,t,s)=>(Q(r,t,"access private method"),s);var H=(r,t,s)=>new Promise((n,i)=>{var c=d=>{try{u(s.next(d))}catch(m){i(m)}},f=d=>{try{u(s.throw(d))}catch(m){i(m)}},u=d=>d.done?n(d.value):Promise.resolve(d.value).then(c,f);u((s=s.apply(r,t)).next())});var ht=(r,t,s)=>(t=r[at("asyncIterator")])?t.call(r):(r=r[at("iterator")](),t={},s=(n,i)=>(i=r[n])&&(t[n]=c=>new Promise((f,u,d)=>(c=i.call(r,c),d=c.done,Promise.resolve(c.value).then(m=>f({value:m,done:d}),u)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ot=require("../notifier/index.cjs"),pt=require("../browser-CpzFX2xg.cjs");var y,o,g,S,A,k,M;class gt{constructor(t,s){a(this,y,void 0);a(this,o,void 0);a(this,g,void 0);a(this,S,void 0);a(this,A,void 0);a(this,k,t=>{t.preventDefault(),e(this,y).links.forEach(s=>{var n;e(this,g)===e(s,g)||(n=e(s,A))!=null&&n.includes(e(this,g))?e(s,o).classList.add("clicked"):e(s,o).classList.remove("clicked")}),e(this,y).navigate(e(this,g),e(this,S))});a(this,M,()=>{e(this,y).prefetch(e(this,g)),e(this,o).removeEventListener("pointerenter",e(this,M))});var c,f;l(this,y,s),l(this,o,t),l(this,g,e(this,o).getAttribute("href")||"/"),l(this,S,e(this,o).getAttribute("data-history-action")||"push"),e(this,o).addEventListener("click",e(this,k));const n=s.normalizePath(e(this,g)),i=s.normalizePath(location.pathname);l(this,A,(c=e(this,o).getAttribute("data-match-paths"))==null?void 0:c.split(",").map(u=>s.normalizePath(u.trim()).pathname)),e(this,o).hasAttribute("data-include")?i.pathname.includes(n.pathname)&&e(this,o).classList.add("current"):n.pathname===i.pathname||(f=e(this,A))!=null&&f.includes(i.pathname)?(e(this,o).classList.add("current"),e(this,o).classList.add("clicked")):e(this,o).classList.remove("clicked"),e(this,o).hasAttribute("data-prefetch")&&e(this,o).addEventListener("pointerenter",e(this,M))}destroy(){e(this,o).removeEventListener("click",e(this,k)),e(this,o).removeEventListener("pointerenter",e(this,M)),e(this,o).classList.remove("current")}}y=new WeakMap,o=new WeakMap,g=new WeakMap,S=new WeakMap,A=new WeakMap,k=new WeakMap,M=new WeakMap;var E,C,z,W,N,B,P,L,w,x,D,R,U,q,V,F,X,K,ct,I,Z,Y;class Et{constructor(t){a(this,R);a(this,q);a(this,F);a(this,K);a(this,I);a(this,E,null);a(this,C,null);a(this,z,null);a(this,W,null);a(this,N,[]);a(this,B,new DOMParser);a(this,P,new Map);a(this,L,void 0);a(this,w,null);a(this,x,new ot.Notifier);a(this,D,new ot.Notifier);a(this,Y,t=>{t.state&&this.navigate(t.state,"none")});pt.isBrowser&&(l(this,E,(t==null?void 0:t.base)||"/"),t!=null&&t.base?(l(this,E,t.base),t.base.endsWith("/")||l(this,E,e(this,E)+"/")):l(this,E,"/"),l(this,C,(t==null?void 0:t.waitForHeadToLoad)!==!1),l(this,z,(t==null?void 0:t.cachePages)!==!1),l(this,W,p(this,F,X).call(this,document.body)),l(this,w,this.normalizePath(location.pathname).pathname),document.documentElement.setAttribute("data-current-pathname",e(this,w)),p(this,q,V).call(this),addEventListener("popstate",e(this,Y)))}get currentPathname(){return e(this,w)}get links(){return e(this,N)}normalizePath(t){t=t.replace(e(this,E),""),t.startsWith("/")&&(t=t.slice(1));const s=t.split("#"),n=s[0].split("?"),i=n[0].endsWith("/")?n[0].slice(0,-1):n[0],c=e(this,E)+i,f=n==null?void 0:n[1],u=s==null?void 0:s[1];return{leaf:i,pathname:c,parameters:f,hash:u}}beforeNavigationEvent(t){return e(this,x).subscribe(t)}afterNavigationEvent(t){return e(this,D).subscribe(t)}prefetch(t){return H(this,null,function*(){const s=this.normalizePath(t);return p(this,R,U).call(this,s.pathname)})}navigate(t,s="push"){return H(this,null,function*(){var d;const n=this.normalizePath(t);let{pathname:i,hash:c,parameters:f}=n;if(e(this,L)===i||e(this,w)===i)return;l(this,L,i);const u=e(this,P).has(i);try{let m=!0;if(e(this,x).notify({pathname:i,isCached:u}),this.preprocessor)try{yield new Promise((h,b)=>{var v;(v=this.preprocessor)==null||v.call(this,{pathname:i,resolve:h,reject:b,isCached:u})})}catch(h){h?console.error(h):console.log("Route change canceled"),m=!1}if(!m||e(this,L)!==i)return;const tt=e(this,P).get(i)||(yield p(this,R,U).call(this,i));if(e(this,L)!==i)return;const et=Array.from(document.head.children),st=Array.from(tt.head.cloneNode(!0).children),it=p(this,K,ct).call(this,et,st),lt=p(this,I,Z).call(this,et,it),O=p(this,I,Z).call(this,st,it);O.forEach((h,b)=>{if(h.tagName==="SCRIPT"&&h.getAttribute("src")){const v=document.createElement("script");v.type="module",v.src=h.getAttribute("src"),O[b]=v}}),O.forEach(h=>{document.head.appendChild(h)});const _=O.filter(h=>h.tagName==="STYLE"||h.tagName==="SCRIPT"||h.tagName==="LINK");e(this,C)&&_.length&&(yield new Promise(h=>H(this,null,function*(){let b=0;try{for(var v=ht(_),mt,G,j;mt=!(G=yield v.next()).done;mt=!1){const T=G.value;T.onload=()=>{b++,b===_.length&&h()}}}catch(G){j=[G]}finally{try{mt&&(G=v.return)&&(yield G.call(v))}finally{if(j)throw j[0]}}}))),lt.forEach(h=>{h.hasAttribute("data-permanent")||h.remove()}),l(this,w,i);const $=f||location.search,ut=c?c.startsWith("#")?c:"#"+c:"",dt=$?$.startsWith("?")?$:"?"+$:"",nt=`${i}${ut}${dt}`;s==="push"?history.pushState(i,"",nt):s==="replace"&&history.replaceState(i,"",nt);const ft=p(this,F,X).call(this,tt.body.cloneNode(!0));e(this,W).forEach((h,b)=>{const v=ft[b];let mt=[...h.childNodes],G=[...v.childNodes];mt.forEach(j=>{if(j instanceof HTMLElement){const T=j.getAttribute("data-remain");let rt;G=G.filter(J=>J instanceof HTMLElement&&T&&J.getAttribute("data-remain")===T?(rt=J,!1):!0),T&&rt||j.remove()}else j.remove()}),h.append(...G)}),p(this,q,V).call(this),document.documentElement.setAttribute("data-current-pathname",i),(d=this.postprocessor)==null||d.call(this,{pathname:i,isCached:u}),e(this,D).notify({pathname:i,isCached:u})}catch(m){console.error(m)}l(this,L,void 0)})}}E=new WeakMap,C=new WeakMap,z=new WeakMap,W=new WeakMap,N=new WeakMap,B=new WeakMap,P=new WeakMap,L=new WeakMap,w=new WeakMap,x=new WeakMap,D=new WeakMap,R=new WeakSet,U=function(t){return H(this,null,function*(){const s=e(this,P).get(t);if(s)return s;const i=yield(yield fetch(t)).text(),c=e(this,B).parseFromString(i,"text/html");return e(this,z)&&e(this,P).set(t,c),c})},q=new WeakSet,V=function(){const t=[...document.documentElement.querySelectorAll("a")].filter(s=>{var n;return(n=s.getAttribute("href"))==null?void 0:n.startsWith("/")});e(this,N).forEach(s=>s.destroy()),l(this,N,t.map(s=>new gt(s,this)))},F=new WeakSet,X=function(t){return[...t.querySelectorAll("[data-morph]")]},K=new WeakSet,ct=function(t,s){return t.filter(n=>s.find(i=>i.outerHTML===n.outerHTML))},I=new WeakSet,Z=function(t,s){return t.filter(n=>!s.find(i=>i.outerHTML===n.outerHTML))},Y=new WeakMap;exports.Morph=Et;
|
package/lib/morph/index.js
CHANGED
|
@@ -28,7 +28,6 @@ var T = (r, t, s) => new Promise((n, i) => {
|
|
|
28
28
|
var ht = (r, t, s) => (t = r[at("asyncIterator")]) ? t.call(r) : (r = r[at("iterator")](), t = {}, s = (n, i) => (i = r[n]) && (t[n] = (c) => new Promise((f, u, d) => (c = i.call(r, c), d = c.done, Promise.resolve(c.value).then((m) => f({ value: m, done: d }), u)))), s("next"), s("return"), t);
|
|
29
29
|
import { Notifier as ot } from "../notifier/index.js";
|
|
30
30
|
import { i as pt } from "../browser-0zX67oeU.js";
|
|
31
|
-
import "../path-data-polyfill-DgeDWYeI.js";
|
|
32
31
|
var y, o, g, k, A, C, M;
|
|
33
32
|
class gt {
|
|
34
33
|
constructor(t, s) {
|
|
@@ -59,7 +58,7 @@ class gt {
|
|
|
59
58
|
}
|
|
60
59
|
y = new WeakMap(), o = new WeakMap(), g = new WeakMap(), k = new WeakMap(), A = new WeakMap(), C = new WeakMap(), M = new WeakMap();
|
|
61
60
|
var E, S, z, W, H, K, P, b, w, x, D, R, V, F, X, I, Z, Y, ct, $, _, j;
|
|
62
|
-
class
|
|
61
|
+
class bt {
|
|
63
62
|
constructor(t) {
|
|
64
63
|
a(this, R);
|
|
65
64
|
a(this, F);
|
|
@@ -233,5 +232,5 @@ E = new WeakMap(), S = new WeakMap(), z = new WeakMap(), W = new WeakMap(), H =
|
|
|
233
232
|
);
|
|
234
233
|
}, j = new WeakMap();
|
|
235
234
|
export {
|
|
236
|
-
|
|
235
|
+
bt as Morph
|
|
237
236
|
};
|
package/lib/pointer/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-
|
|
1
|
+
"use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-C-1ruEIm.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const M=require("../Damped-DxwUBxOC.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),S=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=q.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=q.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=q.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,L;p>=0;p--)(L=i[p])&&(n=(o?L(e,s,n):L(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),x=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s),h,b,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),x(this,h,void 0),x(this,b,new S.CSSProperty(this,"--damping",20)),x(this,g,new S.CSSProperty(this,"--mass",0)),x(this,z,new S.CSSProperty(this,"--stiffness",0)),x(this,W,new S.CSSProperty(this,"--cartesian",!1)),x(this,R,new S.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,b).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,b).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,b).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;b=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
|
package/lib/pointer/index.js
CHANGED
|
@@ -18,13 +18,12 @@ var s = (e, t, i) => (T(e, t, "read from private field"), i ? i.call(e) : t.get(
|
|
|
18
18
|
throw TypeError("Cannot add the same private member more than once");
|
|
19
19
|
t instanceof WeakSet ? t.add(e) : t.set(e, i);
|
|
20
20
|
}, p = (e, t, i, o) => (T(e, t, "write to private field"), o ? o.call(e, i) : t.set(e, i), i);
|
|
21
|
-
import "../Store-
|
|
21
|
+
import "../Store-BQXXikps.js";
|
|
22
22
|
import { g as K, s as N, n as Q } from "../coordinates-CgdGoSYs.js";
|
|
23
23
|
import { g as U } from "../dom-0S_WDL4g.js";
|
|
24
24
|
import { c as A } from "../math-BOBiC4TN.js";
|
|
25
|
-
import "../path-data-polyfill-DgeDWYeI.js";
|
|
26
25
|
import "../ticker/index.js";
|
|
27
|
-
import { D as W } from "../Damped-
|
|
26
|
+
import { D as W } from "../Damped-QZAoXO5Z.js";
|
|
28
27
|
import { elementResizer as B } from "../element-resizer/index.js";
|
|
29
28
|
import { windowResizer as G } from "../window-resizer/index.js";
|
|
30
29
|
import { CustomElement as V, define as X } from "../custom-element/index.js";
|
package/lib/popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../attribute/index.cjs"),W=require("../custom-element/index.cjs"),D=require("../Store-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../attribute/index.cjs"),W=require("../custom-element/index.cjs"),D=require("../Store-C-1ruEIm.cjs"),I=require("../style-At6aDoqG.cjs"),N=require("../browser-CpzFX2xg.cjs"),G=require("../tags-Djb6mb1o.cjs");var H=Object.defineProperty,R=Object.getOwnPropertyDescriptor,K=(s,e,t,n)=>{for(var a=n>1?void 0:n?R(e,t):e,c=s.length-1,d;c>=0;c--)(d=s[c])&&(a=(n?d(e,t,a):d(a))||a);return n&&a&&H(e,t,a),a},q=(s,e,t)=>{if(!e.has(s))throw TypeError("Cannot "+t)},i=(s,e,t)=>(q(s,e,"read from private field"),t?t.call(s):e.get(s)),h=(s,e,t)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,t)},S=(s,e,t,n)=>(q(s,e,"write to private field"),n?n.call(s,t):e.set(s,t),t),x=(s,e,t)=>(q(s,e,"access private method"),t),T,p,g,l,v,f,O,b,u,m,w,y,L,$,E;exports.PopoverElement=class extends W.CustomElement{constructor(){super(...arguments),h(this,O),h(this,u),h(this,L),h(this,T,-1),h(this,p,new D.Store(!1)),h(this,g,void 0),h(this,l,new A.Attribute(this,"history",!1)),h(this,v,new A.Attribute(this,"single",!1)),h(this,f,!1),this.open=(e=!0)=>{if(i(this,p).current)return;i(this,p).current=!0,i(this,v).current&&(exports.PopoverElement.__opened.forEach(n=>n.close()),exports.PopoverElement.__opened=[]),exports.PopoverElement.__opened.push(this),S(this,T,exports.PopoverElement.__opened.length-1),i(this,l).current&&i(this,f)&&history.pushState("","",i(this,O,b)),clearTimeout(i(this,g)),this.classList.add("triggered"),this.style.display="block",this.dispatchEvent(new CustomEvent("popoverTriggered"));const t=()=>{addEventListener("click",i(this,w)),addEventListener("keydown",i(this,y)),this.style.opacity="1",this.classList.add("opened"),this.dispatchEvent(new CustomEvent("popoverOpened"))};e?setTimeout(t):t()},this.close=()=>{if(i(this,p).current){if(i(this,p).current=!1,exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),i(this,l).current){const e=new URL(location.href);e.searchParams.delete(i(this,u,m)),history.replaceState(null,"",e.href)}this.classList.remove("opened"),this.style.opacity="0",this.dispatchEvent(new CustomEvent("popoverClosing")),removeEventListener("click",i(this,w)),removeEventListener("keydown",i(this,y)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none",this.dispatchEvent(new CustomEvent("popoverClosed"))},I.getElementTransitionDurationMS(this))}},h(this,w,e=>{x(this,L,$).call(this,()=>{const t=e.composedPath();!t.find(n=>n===this)&&!t.find(n=>n instanceof HTMLElement&&n.closest("e-popover-button"))&&t[0]instanceof HTMLElement&&!t[0].closest("[data-outside]")&&this.close()})}),h(this,y,e=>{x(this,L,$).call(this,()=>{e.code==="Escape"&&this.close()})}),h(this,E,()=>{S(this,f,!1),i(this,p).current&&i(this,l).current&&!location.search.includes(i(this,u,m))?this.close():!i(this,p).current&&i(this,l).current&&location.search.includes(i(this,u,m))&&this.open(),S(this,f,!0)})}get history(){return i(this,l)}get single(){return i(this,v)}get opened(){return i(this,p)}connectedCallback(){i(this,l).observe(),i(this,v).observe(),this.style.opacity="0",this.style.display="none",addEventListener("popstate",i(this,E)),setTimeout(()=>{i(this,E).call(this)},0)}disconnectedCallback(){i(this,l).unobserve(),i(this,v).unobserve(),exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),clearTimeout(i(this,g)),removeEventListener("popstate",i(this,E))}};T=new WeakMap;p=new WeakMap;g=new WeakMap;l=new WeakMap;v=new WeakMap;f=new WeakMap;O=new WeakSet;b=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${i(this,u,m)}`};u=new WeakSet;m=function(){return`modal-${this.id}`};w=new WeakMap;y=new WeakMap;L=new WeakSet;$=function(s){(exports.PopoverElement.__opened[i(this,T)-1]||exports.PopoverElement.__opened.length===1)&&s()};E=new WeakMap;exports.PopoverElement.__opened=[];exports.PopoverElement=K([W.define("e-popover")],exports.PopoverElement);var U=Object.defineProperty,z=Object.getOwnPropertyDescriptor,F=(s,e,t,n)=>{for(var a=n>1?void 0:n?z(e,t):e,c=s.length-1,d;c>=0;c--)(d=s[c])&&(a=(n?d(e,t,a):d(a))||a);return n&&a&&U(e,t,a),a},B=(s,e,t)=>{if(!e.has(s))throw TypeError("Cannot "+t)},r=(s,e,t)=>(B(s,e,"read from private field"),t?t.call(s):e.get(s)),_=(s,e,t)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,t)},J=(s,e,t,n)=>(B(s,e,"write to private field"),n?n.call(s,t):e.set(s,t),t),o,P,C,k,M;exports.PopoverButtonElement=class extends W.CustomElement{constructor(){super(),_(this,o,void 0),_(this,P,()=>{this.classList.add("triggered")}),_(this,C,()=>{this.classList.add("opened")}),_(this,k,()=>{this.classList.remove("opened")}),_(this,M,()=>{this.classList.remove("triggered")}),N.isBrowser&&G.element(this,{tabindex:this.getAttribute("tabindex")||"0",onClick:()=>{if(r(this,o)){const e=this.getAttribute("type")||"open";e==="open"||e==="toggle"&&!r(this,o).opened.current?r(this,o).open():(e==="close"||e==="toggle"&&r(this,o).opened.current)&&r(this,o).close()}},onKeydown:e=>{e.code==="Space"&&e.currentTarget.click()}})}get popoverElement(){return r(this,o)}connectedCallback(){const e=this.getAttribute("target");if(e){const t=document.querySelector(`#${e}`)||this.getRootNode().querySelector(`#${e}`);t?(J(this,o,t),r(this,o).addEventListener("popoverTriggered",r(this,P)),r(this,o).addEventListener("popoverOpened",r(this,C)),r(this,o).addEventListener("popoverClosing",r(this,k)),r(this,o).addEventListener("popoverClosed",r(this,M))):console.warn(this,`target ${e} not found`)}}disconnectedCallback(){r(this,o)&&(r(this,o).removeEventListener("popoverTriggered",r(this,P)),r(this,o).removeEventListener("popoverOpened",r(this,C)),r(this,o).removeEventListener("popoverClosing",r(this,k)),r(this,o).removeEventListener("popoverClosed",r(this,M)))}};o=new WeakMap;P=new WeakMap;C=new WeakMap;k=new WeakMap;M=new WeakMap;exports.PopoverButtonElement=F([W.define("e-popover-button")],exports.PopoverButtonElement);
|
package/lib/popover/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Attribute as x } from "../attribute/index.js";
|
|
2
2
|
import { CustomElement as N, define as q } from "../custom-element/index.js";
|
|
3
|
-
import { S as H } from "../Store-
|
|
3
|
+
import { S as H } from "../Store-BQXXikps.js";
|
|
4
4
|
import { a as R } from "../style-CklEF62D.js";
|
|
5
|
-
import "../path-data-polyfill-DgeDWYeI.js";
|
|
6
5
|
import { i as b } from "../browser-0zX67oeU.js";
|
|
7
|
-
import { e as K } from "../tags-
|
|
6
|
+
import { e as K } from "../tags-CMPg9ETZ.js";
|
|
8
7
|
var U = Object.defineProperty, z = Object.getOwnPropertyDescriptor, F = (e, t, s, o) => {
|
|
9
8
|
for (var a = o > 1 ? void 0 : o ? z(t, s) : t, d = e.length - 1, v; d >= 0; d--)
|
|
10
9
|
(v = e[d]) && (a = (o ? v(t, s, a) : v(a)) || a);
|
|
@@ -16,7 +15,7 @@ var U = Object.defineProperty, z = Object.getOwnPropertyDescriptor, F = (e, t, s
|
|
|
16
15
|
if (t.has(e))
|
|
17
16
|
throw TypeError("Cannot add the same private member more than once");
|
|
18
17
|
t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
19
|
-
}, O = (e, t, s, o) => (A(e, t, "write to private field"), o ? o.call(e, s) : t.set(e, s), s), D = (e, t, s) => (A(e, t, "access private method"), s), S, c, E, l, _, g, $, B, u,
|
|
18
|
+
}, O = (e, t, s, o) => (A(e, t, "write to private field"), o ? o.call(e, s) : t.set(e, s), s), D = (e, t, s) => (A(e, t, "access private method"), s), S, c, E, l, _, g, $, B, u, m, L, y, C, P, w;
|
|
20
19
|
let h = class extends N {
|
|
21
20
|
constructor() {
|
|
22
21
|
super(...arguments), p(this, $), p(this, u), p(this, C), p(this, S, -1), p(this, c, new H(!1)), p(this, E, void 0), p(this, l, new x(this, "history", !1)), p(this, _, new x(this, "single", !1)), p(this, g, !1), this.open = (e = !0) => {
|
|
@@ -31,7 +30,7 @@ let h = class extends N {
|
|
|
31
30
|
if (i(this, c).current) {
|
|
32
31
|
if (i(this, c).current = !1, h.__opened = h.__opened.filter((e) => e !== this), i(this, l).current) {
|
|
33
32
|
const e = new URL(location.href);
|
|
34
|
-
e.searchParams.delete(i(this, u,
|
|
33
|
+
e.searchParams.delete(i(this, u, m)), history.replaceState(null, "", e.href);
|
|
35
34
|
}
|
|
36
35
|
this.classList.remove("opened"), this.style.opacity = "0", this.dispatchEvent(new CustomEvent("popoverClosing")), removeEventListener("click", i(this, L)), removeEventListener("keydown", i(this, y)), setTimeout(() => {
|
|
37
36
|
this.classList.remove("triggered"), this.style.display = "none", this.dispatchEvent(new CustomEvent("popoverClosed"));
|
|
@@ -48,8 +47,8 @@ let h = class extends N {
|
|
|
48
47
|
D(this, C, P).call(this, () => {
|
|
49
48
|
e.code === "Escape" && this.close();
|
|
50
49
|
});
|
|
51
|
-
}), p(this,
|
|
52
|
-
O(this, g, !1), i(this, c).current && i(this, l).current && !location.search.includes(i(this, u,
|
|
50
|
+
}), p(this, w, () => {
|
|
51
|
+
O(this, g, !1), i(this, c).current && i(this, l).current && !location.search.includes(i(this, u, m)) ? this.close() : !i(this, c).current && i(this, l).current && location.search.includes(i(this, u, m)) && this.open(), O(this, g, !0);
|
|
53
52
|
});
|
|
54
53
|
}
|
|
55
54
|
get history() {
|
|
@@ -62,12 +61,12 @@ let h = class extends N {
|
|
|
62
61
|
return i(this, c);
|
|
63
62
|
}
|
|
64
63
|
connectedCallback() {
|
|
65
|
-
i(this, l).observe(), i(this, _).observe(), this.style.opacity = "0", this.style.display = "none", addEventListener("popstate", i(this,
|
|
66
|
-
i(this,
|
|
64
|
+
i(this, l).observe(), i(this, _).observe(), this.style.opacity = "0", this.style.display = "none", addEventListener("popstate", i(this, w)), setTimeout(() => {
|
|
65
|
+
i(this, w).call(this);
|
|
67
66
|
}, 0);
|
|
68
67
|
}
|
|
69
68
|
disconnectedCallback() {
|
|
70
|
-
i(this, l).unobserve(), i(this, _).unobserve(), h.__opened = h.__opened.filter((e) => e !== this), clearTimeout(i(this, E)), removeEventListener("popstate", i(this,
|
|
69
|
+
i(this, l).unobserve(), i(this, _).unobserve(), h.__opened = h.__opened.filter((e) => e !== this), clearTimeout(i(this, E)), removeEventListener("popstate", i(this, w));
|
|
71
70
|
}
|
|
72
71
|
};
|
|
73
72
|
S = /* @__PURE__ */ new WeakMap();
|
|
@@ -78,10 +77,10 @@ _ = /* @__PURE__ */ new WeakMap();
|
|
|
78
77
|
g = /* @__PURE__ */ new WeakMap();
|
|
79
78
|
$ = /* @__PURE__ */ new WeakSet();
|
|
80
79
|
B = function() {
|
|
81
|
-
return `${location.pathname}${location.search ? location.search + "&" : "?"}${i(this, u,
|
|
80
|
+
return `${location.pathname}${location.search ? location.search + "&" : "?"}${i(this, u, m)}`;
|
|
82
81
|
};
|
|
83
82
|
u = /* @__PURE__ */ new WeakSet();
|
|
84
|
-
|
|
83
|
+
m = function() {
|
|
85
84
|
return `modal-${this.id}`;
|
|
86
85
|
};
|
|
87
86
|
L = /* @__PURE__ */ new WeakMap();
|
|
@@ -90,7 +89,7 @@ C = /* @__PURE__ */ new WeakSet();
|
|
|
90
89
|
P = function(e) {
|
|
91
90
|
(h.__opened[i(this, S) - 1] || h.__opened.length === 1) && e();
|
|
92
91
|
};
|
|
93
|
-
|
|
92
|
+
w = /* @__PURE__ */ new WeakMap();
|
|
94
93
|
h.__opened = [];
|
|
95
94
|
h = F([
|
|
96
95
|
q("e-popover")
|
package/lib/resized/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var l=(e,s,r)=>{if(!s.has(e))throw TypeError("Cannot "+r)};var c=(e,s,r)=>(l(e,s,"read from private field"),r?r.call(e):s.get(e)),n=(e,s,r)=>{if(s.has(e))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(e):s.set(e,r)},d=(e,s,r,i)=>(l(e,s,"write to private field"),i?i.call(e,r):s.set(e,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../element-resizer/index.cjs"),z=require("../Store-
|
|
1
|
+
"use strict";var l=(e,s,r)=>{if(!s.has(e))throw TypeError("Cannot "+r)};var c=(e,s,r)=>(l(e,s,"read from private field"),r?r.call(e):s.get(e)),n=(e,s,r)=>{if(s.has(e))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(e):s.set(e,r)},d=(e,s,r,i)=>(l(e,s,"write to private field"),i?i.call(e,r):s.set(e,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../element-resizer/index.cjs"),z=require("../Store-C-1ruEIm.cjs"),h=require("../window-resizer/index.cjs");var t,u;class a extends z.Store{constructor(r,i){super(r(),i);n(this,t,void 0);n(this,u,()=>{this.current=c(this,t).call(this)});d(this,t,r),(i==null?void 0:i.dispatcher)instanceof Element?b.elementResizer.subscribe(i.dispatcher,c(this,u)):h.windowResizer.subscribe(c(this,u))}close(){super.close(),h.windowResizer.unsubscribe(c(this,t)),b.elementResizer.unsubscribe(c(this,t))}}t=new WeakMap,u=new WeakMap;exports.Resized=a;
|
package/lib/resized/index.js
CHANGED
|
@@ -6,26 +6,25 @@ var c = (e, s, r) => (h(e, s, "read from private field"), r ? r.call(e) : s.get(
|
|
|
6
6
|
if (s.has(e))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
s instanceof WeakSet ? s.add(e) : s.set(e, r);
|
|
9
|
-
},
|
|
10
|
-
import { elementResizer as
|
|
11
|
-
import { S as d } from "../Store-
|
|
12
|
-
import "../path-data-polyfill-DgeDWYeI.js";
|
|
9
|
+
}, l = (e, s, r, i) => (h(e, s, "write to private field"), i ? i.call(e, r) : s.set(e, r), r);
|
|
10
|
+
import { elementResizer as m } from "../element-resizer/index.js";
|
|
11
|
+
import { S as d } from "../Store-BQXXikps.js";
|
|
13
12
|
import { windowResizer as a } from "../window-resizer/index.js";
|
|
14
13
|
var t, u;
|
|
15
|
-
class
|
|
14
|
+
class o extends d {
|
|
16
15
|
constructor(r, i) {
|
|
17
16
|
super(r(), i);
|
|
18
17
|
b(this, t, void 0);
|
|
19
18
|
b(this, u, () => {
|
|
20
19
|
this.current = c(this, t).call(this);
|
|
21
20
|
});
|
|
22
|
-
|
|
21
|
+
l(this, t, r), (i == null ? void 0 : i.dispatcher) instanceof Element ? m.subscribe(i.dispatcher, c(this, u)) : a.subscribe(c(this, u));
|
|
23
22
|
}
|
|
24
23
|
close() {
|
|
25
|
-
super.close(), a.unsubscribe(c(this, t)),
|
|
24
|
+
super.close(), a.unsubscribe(c(this, t)), m.unsubscribe(c(this, t));
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
t = new WeakMap(), u = new WeakMap();
|
|
29
28
|
export {
|
|
30
|
-
|
|
29
|
+
o as Resized
|
|
31
30
|
};
|
package/lib/router/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var X=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n);var z=(n,t,s)=>{if(!t.has(n))throw TypeError("Cannot "+s)};var e=(n,t,s)=>(z(n,t,"read from private field"),s?s.call(n):t.get(n)),r=(n,t,s)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,s)},o=(n,t,s,i)=>(z(n,t,"write to private field"),i?i.call(n,s):t.set(n,s),s);var F=(n,t,s)=>(z(n,t,"access private method"),s);var B=(n,t,s)=>new Promise((i,u)=>{var h=f=>{try{d(s.next(f))}catch(T){u(T)}},a=f=>{try{d(s.throw(f))}catch(T){u(T)}},d=f=>f.done?i(f.value):Promise.resolve(f.value).then(h,a);d((s=s.apply(n,t)).next())});var G=(n,t,s)=>(t=n[X("asyncIterator")])?t.call(n):(n=n[X("iterator")](),t={},s=(i,u)=>(u=n[i])&&(t[i]=h=>new Promise((a,d,f)=>(h=u.call(n,h),f=h.done,Promise.resolve(h.value).then(T=>a({value:T,done:f}),d)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const tt=require("urlpattern-polyfill"),et=require("../notifier/index.cjs"),Z=require("../browser-CpzFX2xg.cjs"),st=require("../function-MthRj-GJ.cjs")
|
|
1
|
+
"use strict";var X=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n);var z=(n,t,s)=>{if(!t.has(n))throw TypeError("Cannot "+s)};var e=(n,t,s)=>(z(n,t,"read from private field"),s?s.call(n):t.get(n)),r=(n,t,s)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,s)},o=(n,t,s,i)=>(z(n,t,"write to private field"),i?i.call(n,s):t.set(n,s),s);var F=(n,t,s)=>(z(n,t,"access private method"),s);var B=(n,t,s)=>new Promise((i,u)=>{var h=f=>{try{d(s.next(f))}catch(T){u(T)}},a=f=>{try{d(s.throw(f))}catch(T){u(T)}},d=f=>f.done?i(f.value):Promise.resolve(f.value).then(h,a);d((s=s.apply(n,t)).next())});var G=(n,t,s)=>(t=n[X("asyncIterator")])?t.call(n):(n=n[X("iterator")](),t={},s=(i,u)=>(u=n[i])&&(t[i]=h=>new Promise((a,d,f)=>(h=u.call(n,h),f=h.done,Promise.resolve(h.value).then(T=>a({value:T,done:f}),d)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const tt=require("urlpattern-polyfill"),et=require("../notifier/index.cjs"),Z=require("../browser-CpzFX2xg.cjs"),st=require("../function-MthRj-GJ.cjs"),it=require("../object-CCiXnER2.cjs");var b,O,R,m,l,v,S,p,P,y,I,_;class nt{constructor(t,s){r(this,I);r(this,b,void 0);r(this,O,void 0);r(this,R,void 0);r(this,m,void 0);r(this,l,void 0);r(this,v,void 0);r(this,S,void 0);r(this,p,null);r(this,P,[]);r(this,y,[]);o(this,b,t),o(this,O,s),o(this,R,new URLPattern({pathname:e(this,b)})),o(this,m,null),o(this,l,null),o(this,v,!1),o(this,S,null),Z.isBrowser&&o(this,p,new MutationObserver(i=>{i[0].addedNodes.forEach(h=>{e(this,m)?e(this,y).push(h):e(this,P).push(h)})}))}get pattern(){return e(this,b)}get urlPattern(){return e(this,R)}get isActive(){return e(this,v)}get element(){return e(this,l)}get nest(){return e(this,S)}testPathname(t){return this.urlPattern.test({pathname:t})}render(t,s){return B(this,null,function*(){var i,u;if(e(this,p).observe(document.head,{childList:!0,subtree:!0}),e(this,m))e(this,P).forEach(h=>{document.head.appendChild(h)});else{const h=yield e(this,O).call(this);if(o(this,y,[...e(this,P)]),typeof h.default=="function"&&(o(this,m,h.default),it.isESClass(h.default))){const a="e-"+((i=e(this,m))==null?void 0:i.name.toLowerCase());customElements.get(a)||customElements.define(a,h.default)}}if(yield F(this,I,_).call(this),e(this,m)){const h=e(this,R).exec({pathname:s}),a=(h==null?void 0:h.pathname.groups)||{},d=Object.fromEntries(new URLSearchParams(location.search)),f={pathnameParams:a,searchParams:d};o(this,l,new(e(this,m))(f)),t.appendChild(e(this,l)),o(this,S,e(this,l).querySelector("[data-nest]")||((u=e(this,l).shadowRoot)==null?void 0:u.querySelector("[data-nest]"))||e(this,l).shadowRoot||e(this,l)),o(this,v,!0)}e(this,p).disconnect()})}close(){var t;e(this,p).disconnect(),(t=e(this,l))==null||t.remove(),o(this,v,!1),e(this,y).forEach(s=>document.head.removeChild(s)),o(this,y,[])}getAnchorElements(){var s;let t=[];return e(this,l)&&(t=[...e(this,l).querySelectorAll("a")]),(s=e(this,l))!=null&&s.shadowRoot&&(t=[...t,...e(this,l).shadowRoot.querySelectorAll("a")]),t}}b=new WeakMap,O=new WeakMap,R=new WeakMap,m=new WeakMap,l=new WeakMap,v=new WeakMap,S=new WeakMap,p=new WeakMap,P=new WeakMap,y=new WeakMap,I=new WeakSet,_=function(){return B(this,null,function*(){const t=e(this,P).filter(a=>a instanceof HTMLElement?a.tagName==="STYLE"||a.tagName==="SCRIPT"||a.tagName==="LINK":!1);try{for(var s=G(t),i,u,h;i=!(u=yield s.next()).done;i=!1){const a=u.value;yield new Promise(d=>{a.onload=()=>{d()}})}}catch(u){h=[u]}finally{try{i&&(u=s.return)&&(yield u.call(s))}finally{if(h)throw h[0]}}})};var H,g,A,U,j;class rt{constructor(t,s){r(this,H,void 0);r(this,g,void 0);r(this,A,void 0);r(this,U,void 0);r(this,j,t=>{t.preventDefault(),e(this,H).navigate(e(this,A),e(this,U))});o(this,H,t),o(this,g,s),o(this,A,e(this,g).getAttribute("href")||"/"),o(this,U,e(this,g).getAttribute("data-history-action")||"push"),e(this,g).addEventListener("click",e(this,j)),location.pathname===e(this,A)&&e(this,g).classList.add("current")}destroy(){e(this,g).removeEventListener("click",e(this,j)),e(this,g).classList.remove("current")}}H=new WeakMap,g=new WeakMap,A=new WeakMap,U=new WeakMap,j=new WeakMap;globalThis.URLPattern=tt.URLPattern;var k,q,w,N,M,E,C,x,D,K,$,W;const Y=class Y{constructor(t){r(this,K);r(this,k,null);r(this,q,void 0);r(this,w,[]);r(this,N,null);r(this,M,[]);r(this,E,void 0);r(this,C,null);r(this,x,new et.Notifier);r(this,D,st.debounce(()=>{const t=s=>s.split("/").length;o(this,w,e(this,w).sort((s,i)=>t(s.pattern)-t(i.pattern))),this.navigate(location.pathname.replace(e(this,q),""))},0));r(this,W,t=>{t.state&&this.navigate(t.state,"none")});o(this,q,(t==null?void 0:t.base)||""),Y.active=this,Z.isBrowser&&(o(this,k,(t==null?void 0:t.rootElement)||document.body),addEventListener("popstate",e(this,W)))}get currentPathname(){return e(this,C)}get candidatePathname(){return e(this,E)}get routes(){return e(this,w)}navigationEvent(t){return e(this,x).subscribe(t)}defineRoute(t,s){const i=new nt(t,s);e(this,w).push(i),e(this,D).call(this)}navigate(t,s="push"){return B(this,null,function*(){var f,Q;if(e(this,E)===t||e(this,C)===t)return;Y.active=this,o(this,E,t);const i=e(this,w).filter(c=>c.isActive),u=e(this,w).filter(c=>!i.includes(c)&&c.testPathname(t)),h=i.filter(c=>!c.testPathname(t)),a=i.filter(c=>c.testPathname(t));let d=!0;if(this.preprocessor)try{yield new Promise((c,L)=>{var V;(V=this.preprocessor)==null||V.call(this,{pathname:t,resolve:c,reject:L})})}catch(c){c?console.error(c):console.log("Route change canceled"),d=!1}if(d&&e(this,E)===t){o(this,N,a[a.length-1]),h.forEach(L=>{L.close()}),o(this,C,t);try{for(var T=G(u),at,ct,lt;at=!(ct=yield T.next()).done;at=!1){const L=ct.value;yield L.render(((f=e(this,N))==null?void 0:f.nest)||e(this,k),t),o(this,N,L)}}catch(ct){lt=[ct]}finally{try{at&&(ct=T.return)&&(yield ct.call(T))}finally{if(lt)throw lt[0]}}const c=e(this,q)+t+location.search;s==="push"?history.pushState(c,"",c):s==="replace"&&history.replaceState(c,"",c),F(this,K,$).call(this),(Q=this.postprocessor)==null||Q.call(this,{pathname:t}),e(this,x).notify({pathname:t})}})}};k=new WeakMap,q=new WeakMap,w=new WeakMap,N=new WeakMap,M=new WeakMap,E=new WeakMap,C=new WeakMap,x=new WeakMap,D=new WeakMap,K=new WeakSet,$=function(){const t=e(this,w).filter(i=>i.isActive),s=Array.from(new Set([...e(this,k).querySelectorAll("a"),...t.map(i=>i.getAnchorElements()).flat()].filter(i=>{var u;return(u=i.getAttribute("href"))==null?void 0:u.startsWith("/")})));e(this,M).forEach(i=>{i.destroy()}),o(this,M,s.map(i=>new rt(this,i)))},W=new WeakMap;let J=Y;exports.Router=J;
|
package/lib/router/index.js
CHANGED
|
@@ -30,7 +30,6 @@ import { URLPattern as tt } from "urlpattern-polyfill";
|
|
|
30
30
|
import { Notifier as et } from "../notifier/index.js";
|
|
31
31
|
import { i as X } from "../browser-0zX67oeU.js";
|
|
32
32
|
import { d as st } from "../function-C10DGppn.js";
|
|
33
|
-
import "../path-data-polyfill-DgeDWYeI.js";
|
|
34
33
|
import { i as it } from "../object-D6MVWB4l.js";
|
|
35
34
|
var R, U, b, m, l, w, A, v, P, E, B, Z;
|
|
36
35
|
class nt {
|
|
@@ -215,18 +214,18 @@ const Y = class Y {
|
|
|
215
214
|
y.close();
|
|
216
215
|
}), o(this, q, t);
|
|
217
216
|
try {
|
|
218
|
-
for (var T = F(u), gt, pt
|
|
219
|
-
const y =
|
|
217
|
+
for (var T = F(u), mt, gt, pt; mt = !(gt = yield T.next()).done; mt = !1) {
|
|
218
|
+
const y = gt.value;
|
|
220
219
|
yield y.render(((f = e(this, C)) == null ? void 0 : f.nest) || e(this, k), t), o(this, C, y);
|
|
221
220
|
}
|
|
222
|
-
} catch (
|
|
223
|
-
|
|
221
|
+
} catch (gt) {
|
|
222
|
+
pt = [gt];
|
|
224
223
|
} finally {
|
|
225
224
|
try {
|
|
226
|
-
|
|
225
|
+
mt && (gt = T.return) && (yield gt.call(T));
|
|
227
226
|
} finally {
|
|
228
|
-
if (
|
|
229
|
-
throw
|
|
227
|
+
if (pt)
|
|
228
|
+
throw pt[0];
|
|
230
229
|
}
|
|
231
230
|
}
|
|
232
231
|
const c = e(this, N) + t + location.search;
|