aptechka 0.8.4 → 0.9.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-BInSRYNr.cjs → Animation-BCA-DBje.cjs} +1 -1
- package/lib/{Animation-uimN7sdT.js → Animation-DrSYnbgb.js} +1 -1
- package/lib/{Composed-Iihn8fT4.cjs → Composed-7Fe7TW_T.cjs} +1 -1
- package/lib/{Composed-Fa7owymK.js → Composed-pnupzTOv.js} +1 -1
- package/lib/{Damped-yrNXlkDE.js → Damped-C2FuK_3K.js} +1 -1
- package/lib/{Damped-Da3EnNN4.cjs → Damped-CSEZ0qwp.cjs} +1 -1
- package/lib/{Derived-DIWinC7Y.js → Derived-CFnbeEgJ.js} +1 -1
- package/lib/{Derived-D9VrDuf9.cjs → Derived-Dko3EP7m.cjs} +1 -1
- package/lib/ElementConstructor-9S0f1yAH.cjs +1 -0
- package/lib/ElementConstructor-CZKbNIQK.js +366 -0
- package/lib/Resource-BhF6Tj1p.js +49 -0
- package/lib/Resource-WCQEgLpB.cjs +1 -0
- package/lib/{SourceManager--L_rA28b.js → SourceManager-CmhlHGx7.js} +1 -1
- package/lib/{SourceManager-D6D2LVKf.cjs → SourceManager-DYnGpBi1.cjs} +1 -1
- package/lib/{Store-Qr3SNOSf.js → Store-Dsft7GtM.js} +1 -1
- package/lib/{Store-Cr3VaD9G.cjs → Store-kzJycezD.cjs} +1 -1
- package/lib/{Tweened-CjgvoOwL.js → Tweened-BrD2cPSC.js} +1 -1
- package/lib/{Tweened-DksN-Rz6.cjs → Tweened-D6dAu8Zi.cjs} +1 -1
- package/lib/{Viewport-BBYt1Ivy.cjs → Viewport-DRNfjjDY.cjs} +1 -1
- package/lib/{Viewport-Cgtq2I_K.js → Viewport-Ud7nellV.js} +1 -1
- package/lib/_createStore-Cf1MyeHa.cjs +1 -0
- package/lib/_createStore-Ck9bHolX.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/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +1 -1
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.d.ts +1 -2
- 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 -46
- 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/counter/index.d.ts +1 -3
- package/lib/{createStylesheet-BxKITIVV.js → createStylesheet-C2gpLy4r.js} +1 -1
- package/lib/{createStylesheet-BsMSWX0q.cjs → createStylesheet-Di9WRypw.cjs} +1 -1
- package/lib/css-property/index.cjs +1 -1
- 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/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 +114 -113
- package/lib/en3/helpers/index.cjs +1 -1
- package/lib/en3/helpers/index.js +2 -2
- package/lib/en3/misc/index.cjs +1 -1
- package/lib/en3/misc/index.js +2 -2
- 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 +8 -16
- package/lib/index-BtB-3MG7.js +265 -0
- package/lib/index-DQo2-dnB.cjs +9 -0
- package/lib/instantiate-BPZZn8jK.js +134 -0
- package/lib/instantiate-BWM-ipPW.cjs +1 -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/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/onConnect.d.ts +3 -0
- package/lib/jsx/hooks/basic/onDisconnect.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/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 +5 -0
- package/lib/jsx/hooks/store/index.js +27 -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 +13 -0
- package/lib/jsx/index.js +91 -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 +192 -0
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +1 -1
- 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 +33 -36
- package/lib/onConnect-DGP866cj.cjs +1 -0
- package/lib/onConnect-y5DrxJ9P.js +7 -0
- package/lib/pointer/PointerElement.d.ts +1 -2
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +106 -118
- 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 -125
- 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 +105 -108
- 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 +20 -21
- package/lib/store/Derived.d.ts +3 -3
- package/lib/store/DerivedArray.d.ts +8 -0
- package/lib/store/Keyed.d.ts +13 -0
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -0
- package/lib/store/index.js +32 -32
- package/lib/tags-BBOGIzDK.cjs +1 -0
- package/lib/tags-CefGDQtF.js +485 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -2
- 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 +392 -472
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +26 -30
- package/package.json +65 -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
package/lib/pointer/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var W=Object.defineProperty;var D=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var M=(i,s,t)=>s in i?W(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,T=(i,s)=>{for(var t in s||(s={}))A.call(s,t)&&M(i,t,s[t]);if(D)for(var t of D(s))F.call(s,t)&&M(i,t,s[t]);return i};var _=(i,s,t)=>{if(!s.has(i))throw TypeError("Cannot "+t)};var e=(i,s,t)=>(_(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>{if(s.has(i))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(i):s.set(i,t)},c=(i,s,t,m)=>(_(i,s,"write to private field"),m?m.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-kzJycezD.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),G=require("../dom-JBOkFLTh.cjs"),k=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const R=require("../Damped-CSEZ0qwp.cjs"),H=require("../element-resizer/index.cjs"),j=require("../window-resizer/index.cjs"),P=require("../css-property/index.cjs");var o,a,l,d,y,u,b,x,f,w,C,p;class B{constructor(s){n(this,o,void 0);n(this,a,void 0);n(this,l,void 0);n(this,d,void 0);n(this,y,void 0);n(this,u,void 0);n(this,b,0);n(this,x,0);n(this,f,s=>{e(this,d).set(1)});n(this,w,s=>{e(this,d).set(0)});n(this,C,s=>{const t=q.getPointerPosition(s,e(this,o).getBoundingClientRect()),m={width:e(this,b),height:e(this,x)},h={x:t.x,y:t.y};if(e(this,y)){const z=q.screenToCartesian(h,m);h.x=z.x,h.y=z.y}if(e(this,u)){const z=q.normalize(h,m);h.x=k.clamp(z.x*2,-1,1),h.y=k.clamp(z.y*2,-1,1)}e(this,a).set(h.x),e(this,l).set(h.y)});n(this,p,()=>{c(this,b,this.element.clientWidth),c(this,x,this.element.clientHeight);let s=0,t=0,m=0,h=0;e(this,y)?e(this,u)?(s=-1,t=1,m=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,m=e(this,x)/2*-1,h=e(this,x)/2*1):e(this,u)?(s=0,t=1,m=0,h=1):(s=0,t=e(this,b),m=0,h=e(this,x)),e(this,a).min=s,e(this,a).max=t,e(this,l).min=m,e(this,l).max=h});c(this,o,G.getElement(s.element)),c(this,a,new R.Damped(0,s.damped)),c(this,l,new R.Damped(0,s.damped)),c(this,d,new R.Damped(0,T({min:0,max:1},s.damped))),c(this,y,s.cartesian||!1),c(this,u,s.normalize||!1)}get element(){return e(this,o)}get x(){return e(this,a)}get y(){return e(this,l)}get z(){return e(this,d)}get cartesian(){return e(this,y)}set cartesian(s){c(this,y,s),e(this,p).call(this)}get normalize(){return e(this,u)}set normalize(s){c(this,u,s),e(this,p).call(this)}connect(){e(this,o).addEventListener("pointerenter",e(this,f)),e(this,o).addEventListener("pointerleave",e(this,w)),e(this,o).addEventListener("pointermove",e(this,C)),H.elementResizer.subscribe(e(this,o),e(this,p)),j.windowResizer.subscribe(e(this,p))}disconnect(){e(this,o).removeEventListener("pointerenter",e(this,f)),e(this,o).removeEventListener("pointerleave",e(this,w)),e(this,o).removeEventListener("pointermove",e(this,C)),H.elementResizer.unsubscribe(e(this,p)),j.windowResizer.unsubscribe(e(this,p)),e(this,a).reset(),e(this,l).reset(),e(this,d).reset()}}o=new WeakMap,a=new WeakMap,l=new WeakMap,d=new WeakMap,y=new WeakMap,u=new WeakMap,b=new WeakMap,x=new WeakMap,f=new WeakMap,w=new WeakMap,C=new WeakMap,p=new WeakMap;var r,g,v,S,E,L;class O extends HTMLElement{constructor(){super();n(this,r,void 0);n(this,g,new P.CSSProperty(this,"--damping",20));n(this,v,new P.CSSProperty(this,"--mass",0));n(this,S,new P.CSSProperty(this,"--stiffness",0));n(this,E,new P.CSSProperty(this,"--cartesian",!1));n(this,L,new P.CSSProperty(this,"--normalize",!1));c(this,r,new B({element:this})),e(this,g).subscribe(t=>{e(this,r).x.damping=t.current,e(this,r).y.damping=t.current,e(this,r).z.damping=t.current}),e(this,E).subscribe(t=>{e(this,r).cartesian=t.current}),e(this,L).subscribe(t=>{e(this,r).normalize=t.current}),e(this,v).subscribe(t=>{e(this,r).x.mass=t.current,e(this,r).y.mass=t.current,e(this,r).z.mass=t.current}),e(this,S).subscribe(t=>{e(this,r).x.stiffness=t.current,e(this,r).y.stiffness=t.current,e(this,r).z.stiffness=t.current}),e(this,r).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,r).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,r).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,r)}connectedCallback(){e(this,r).connect(),e(this,g).observe(),e(this,v).observe(),e(this,S).observe()}disconnectedCallback(){e(this,r).disconnect(),e(this,g).unobserve(),e(this,v).unobserve(),e(this,S).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}r=new WeakMap,g=new WeakMap,v=new WeakMap,S=new WeakMap,E=new WeakMap,L=new WeakMap;customElements.get("e-pointer")||customElements.define("e-pointer",O);exports.Pointer=B;exports.PointerElement=O;
|
package/lib/pointer/index.js
CHANGED
|
@@ -1,167 +1,155 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
for (var
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
for (var
|
|
9
|
-
|
|
10
|
-
return
|
|
1
|
+
var j = Object.defineProperty;
|
|
2
|
+
var k = Object.getOwnPropertySymbols;
|
|
3
|
+
var q = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var D = (i, s, e) => s in i ? j(i, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[s] = e, H = (i, s) => {
|
|
5
|
+
for (var e in s || (s = {}))
|
|
6
|
+
q.call(s, e) && D(i, e, s[e]);
|
|
7
|
+
if (k)
|
|
8
|
+
for (var e of k(s))
|
|
9
|
+
A.call(s, e) && D(i, e, s[e]);
|
|
10
|
+
return i;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
if (!
|
|
14
|
-
throw TypeError("Cannot " +
|
|
12
|
+
var M = (i, s, e) => {
|
|
13
|
+
if (!s.has(i))
|
|
14
|
+
throw TypeError("Cannot " + e);
|
|
15
15
|
};
|
|
16
|
-
var
|
|
17
|
-
if (
|
|
16
|
+
var t = (i, s, e) => (M(i, s, "read from private field"), e ? e.call(i) : s.get(i)), n = (i, s, e) => {
|
|
17
|
+
if (s.has(i))
|
|
18
18
|
throw TypeError("Cannot add the same private member more than once");
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
import "../Store-
|
|
22
|
-
import { g as
|
|
23
|
-
import { a as
|
|
24
|
-
import { c as
|
|
19
|
+
s instanceof WeakSet ? s.add(i) : s.set(i, e);
|
|
20
|
+
}, c = (i, s, e, m) => (M(i, s, "write to private field"), m ? m.call(i, e) : s.set(i, e), e);
|
|
21
|
+
import "../Store-Dsft7GtM.js";
|
|
22
|
+
import { g as F, s as G, n as I } from "../coordinates-CgdGoSYs.js";
|
|
23
|
+
import { a as J } from "../dom-P5QbAASX.js";
|
|
24
|
+
import { c as T } from "../math-BOBiC4TN.js";
|
|
25
25
|
import "../ticker/index.js";
|
|
26
|
-
import { D as
|
|
26
|
+
import { D as R } from "../Damped-C2FuK_3K.js";
|
|
27
27
|
import { elementResizer as B } from "../element-resizer/index.js";
|
|
28
|
-
import { windowResizer as
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
s(this, d).set(1);
|
|
28
|
+
import { windowResizer as W } from "../window-resizer/index.js";
|
|
29
|
+
import { CSSProperty as P } from "../css-property/index.js";
|
|
30
|
+
var o, a, l, y, b, u, d, f, S, w, E, p;
|
|
31
|
+
class K {
|
|
32
|
+
constructor(s) {
|
|
33
|
+
n(this, o, void 0);
|
|
34
|
+
n(this, a, void 0);
|
|
35
|
+
n(this, l, void 0);
|
|
36
|
+
n(this, y, void 0);
|
|
37
|
+
n(this, b, void 0);
|
|
38
|
+
n(this, u, void 0);
|
|
39
|
+
n(this, d, 0);
|
|
40
|
+
n(this, f, 0);
|
|
41
|
+
n(this, S, (s) => {
|
|
42
|
+
t(this, y).set(1);
|
|
44
43
|
});
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
n(this, w, (s) => {
|
|
45
|
+
t(this, y).set(0);
|
|
47
46
|
});
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
width:
|
|
51
|
-
height:
|
|
52
|
-
},
|
|
53
|
-
x:
|
|
54
|
-
y:
|
|
47
|
+
n(this, E, (s) => {
|
|
48
|
+
const e = F(s, t(this, o).getBoundingClientRect()), m = {
|
|
49
|
+
width: t(this, d),
|
|
50
|
+
height: t(this, f)
|
|
51
|
+
}, h = {
|
|
52
|
+
x: e.x,
|
|
53
|
+
y: e.y
|
|
55
54
|
};
|
|
56
|
-
if (
|
|
57
|
-
const
|
|
58
|
-
|
|
55
|
+
if (t(this, b)) {
|
|
56
|
+
const z = G(h, m);
|
|
57
|
+
h.x = z.x, h.y = z.y;
|
|
59
58
|
}
|
|
60
|
-
if (
|
|
61
|
-
const
|
|
62
|
-
|
|
59
|
+
if (t(this, u)) {
|
|
60
|
+
const z = I(h, m);
|
|
61
|
+
h.x = T(z.x * 2, -1, 1), h.y = T(z.y * 2, -1, 1);
|
|
63
62
|
}
|
|
64
|
-
|
|
63
|
+
t(this, a).set(h.x), t(this, l).set(h.y);
|
|
65
64
|
});
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
let
|
|
69
|
-
|
|
65
|
+
n(this, p, () => {
|
|
66
|
+
c(this, d, this.element.clientWidth), c(this, f, this.element.clientHeight);
|
|
67
|
+
let s = 0, e = 0, m = 0, h = 0;
|
|
68
|
+
t(this, b) ? t(this, u) ? (s = -1, e = 1, m = -1, h = 1) : (s = t(this, d) / 2 * -1, e = t(this, d) / 2 * 1, m = t(this, f) / 2 * -1, h = t(this, f) / 2 * 1) : t(this, u) ? (s = 0, e = 1, m = 0, h = 1) : (s = 0, e = t(this, d), m = 0, h = t(this, f)), t(this, a).min = s, t(this, a).max = e, t(this, l).min = m, t(this, l).max = h;
|
|
70
69
|
});
|
|
71
|
-
|
|
70
|
+
c(this, o, J(s.element)), c(this, a, new R(0, s.damped)), c(this, l, new R(0, s.damped)), c(this, y, new R(0, H({ min: 0, max: 1 }, s.damped))), c(this, b, s.cartesian || !1), c(this, u, s.normalize || !1);
|
|
72
71
|
}
|
|
73
72
|
get element() {
|
|
74
|
-
return
|
|
73
|
+
return t(this, o);
|
|
75
74
|
}
|
|
76
75
|
get x() {
|
|
77
|
-
return
|
|
76
|
+
return t(this, a);
|
|
78
77
|
}
|
|
79
78
|
get y() {
|
|
80
|
-
return
|
|
79
|
+
return t(this, l);
|
|
81
80
|
}
|
|
82
81
|
get z() {
|
|
83
|
-
return
|
|
82
|
+
return t(this, y);
|
|
84
83
|
}
|
|
85
84
|
get cartesian() {
|
|
86
|
-
return
|
|
85
|
+
return t(this, b);
|
|
87
86
|
}
|
|
88
|
-
set cartesian(
|
|
89
|
-
|
|
87
|
+
set cartesian(s) {
|
|
88
|
+
c(this, b, s), t(this, p).call(this);
|
|
90
89
|
}
|
|
91
90
|
get normalize() {
|
|
92
|
-
return
|
|
91
|
+
return t(this, u);
|
|
93
92
|
}
|
|
94
|
-
set normalize(
|
|
95
|
-
|
|
93
|
+
set normalize(s) {
|
|
94
|
+
c(this, u, s), t(this, p).call(this);
|
|
96
95
|
}
|
|
97
96
|
connect() {
|
|
98
|
-
|
|
97
|
+
t(this, o).addEventListener("pointerenter", t(this, S)), t(this, o).addEventListener("pointerleave", t(this, w)), t(this, o).addEventListener("pointermove", t(this, E)), B.subscribe(t(this, o), t(this, p)), W.subscribe(t(this, p));
|
|
99
98
|
}
|
|
100
99
|
disconnect() {
|
|
101
|
-
|
|
100
|
+
t(this, o).removeEventListener(
|
|
102
101
|
"pointerenter",
|
|
103
|
-
|
|
104
|
-
),
|
|
102
|
+
t(this, S)
|
|
103
|
+
), t(this, o).removeEventListener(
|
|
105
104
|
"pointerleave",
|
|
106
|
-
|
|
107
|
-
),
|
|
105
|
+
t(this, w)
|
|
106
|
+
), t(this, o).removeEventListener("pointermove", t(this, E)), B.unsubscribe(t(this, p)), W.unsubscribe(t(this, p)), t(this, a).reset(), t(this, l).reset(), t(this, y).reset();
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
|
-
|
|
111
|
-
var
|
|
112
|
-
|
|
113
|
-
(L = e[m]) && (n = (o ? L(t, i, n) : L(n)) || n);
|
|
114
|
-
return o && n && Z(t, i, n), n;
|
|
115
|
-
}, q = (e, t, i) => {
|
|
116
|
-
if (!t.has(e))
|
|
117
|
-
throw TypeError("Cannot " + i);
|
|
118
|
-
}, r = (e, t, i) => (q(e, t, "read from private field"), i ? i.call(e) : t.get(e)), x = (e, t, i) => {
|
|
119
|
-
if (t.has(e))
|
|
120
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
121
|
-
t instanceof WeakSet ? t.add(e) : t.set(e, i);
|
|
122
|
-
}, tt = (e, t, i, o) => (q(e, t, "write to private field"), t.set(e, i), i), h, z, P, _, M, k;
|
|
123
|
-
let H = class extends V {
|
|
109
|
+
o = new WeakMap(), a = new WeakMap(), l = new WeakMap(), y = new WeakMap(), b = new WeakMap(), u = new WeakMap(), d = new WeakMap(), f = new WeakMap(), S = new WeakMap(), w = new WeakMap(), E = new WeakMap(), p = new WeakMap();
|
|
110
|
+
var r, g, v, x, L, C;
|
|
111
|
+
class N extends HTMLElement {
|
|
124
112
|
constructor() {
|
|
125
|
-
super()
|
|
113
|
+
super();
|
|
114
|
+
n(this, r, void 0);
|
|
115
|
+
n(this, g, new P(this, "--damping", 20));
|
|
116
|
+
n(this, v, new P(this, "--mass", 0));
|
|
117
|
+
n(this, x, new P(this, "--stiffness", 0));
|
|
118
|
+
n(this, L, new P(this, "--cartesian", !1));
|
|
119
|
+
n(this, C, new P(this, "--normalize", !1));
|
|
120
|
+
c(this, r, new K({
|
|
126
121
|
element: this
|
|
127
|
-
})),
|
|
128
|
-
|
|
129
|
-
}),
|
|
130
|
-
|
|
131
|
-
}),
|
|
132
|
-
|
|
133
|
-
}),
|
|
134
|
-
|
|
135
|
-
}),
|
|
136
|
-
|
|
137
|
-
}),
|
|
122
|
+
})), t(this, g).subscribe((e) => {
|
|
123
|
+
t(this, r).x.damping = e.current, t(this, r).y.damping = e.current, t(this, r).z.damping = e.current;
|
|
124
|
+
}), t(this, L).subscribe((e) => {
|
|
125
|
+
t(this, r).cartesian = e.current;
|
|
126
|
+
}), t(this, C).subscribe((e) => {
|
|
127
|
+
t(this, r).normalize = e.current;
|
|
128
|
+
}), t(this, v).subscribe((e) => {
|
|
129
|
+
t(this, r).x.mass = e.current, t(this, r).y.mass = e.current, t(this, r).z.mass = e.current;
|
|
130
|
+
}), t(this, x).subscribe((e) => {
|
|
131
|
+
t(this, r).x.stiffness = e.current, t(this, r).y.stiffness = e.current, t(this, r).z.stiffness = e.current;
|
|
132
|
+
}), t(this, r).x.subscribe((e) => {
|
|
138
133
|
this.style.setProperty("--x", e.current.toString());
|
|
139
|
-
}),
|
|
134
|
+
}), t(this, r).y.subscribe((e) => {
|
|
140
135
|
this.style.setProperty("--y", e.current.toString());
|
|
141
|
-
}),
|
|
136
|
+
}), t(this, r).z.subscribe((e) => {
|
|
142
137
|
this.style.setProperty("--z", e.current.toString());
|
|
143
138
|
});
|
|
144
139
|
}
|
|
145
140
|
get pointer() {
|
|
146
|
-
return
|
|
141
|
+
return t(this, r);
|
|
147
142
|
}
|
|
148
143
|
connectedCallback() {
|
|
149
|
-
|
|
144
|
+
t(this, r).connect(), t(this, g).observe(), t(this, v).observe(), t(this, x).observe();
|
|
150
145
|
}
|
|
151
146
|
disconnectedCallback() {
|
|
152
|
-
|
|
147
|
+
t(this, r).disconnect(), t(this, g).unobserve(), t(this, v).unobserve(), t(this, x).unobserve(), this.style.removeProperty("--x"), this.style.removeProperty("--y"), this.style.removeProperty("--z");
|
|
153
148
|
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
P = /* @__PURE__ */ new WeakMap();
|
|
158
|
-
_ = /* @__PURE__ */ new WeakMap();
|
|
159
|
-
M = /* @__PURE__ */ new WeakMap();
|
|
160
|
-
k = /* @__PURE__ */ new WeakMap();
|
|
161
|
-
H = j([
|
|
162
|
-
X("e-pointer")
|
|
163
|
-
], H);
|
|
149
|
+
}
|
|
150
|
+
r = new WeakMap(), g = new WeakMap(), v = new WeakMap(), x = new WeakMap(), L = new WeakMap(), C = new WeakMap();
|
|
151
|
+
customElements.get("e-pointer") || customElements.define("e-pointer", N);
|
|
164
152
|
export {
|
|
165
|
-
|
|
166
|
-
|
|
153
|
+
K as Pointer,
|
|
154
|
+
N as PointerElement
|
|
167
155
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { CustomElement } from '../custom-element';
|
|
2
1
|
import { PopoverElement } from './PopoverElement';
|
|
3
2
|
|
|
4
3
|
export type PopoverButtonType = 'open' | 'close' | 'toggle';
|
|
5
|
-
export declare class PopoverButtonElement extends
|
|
4
|
+
export declare class PopoverButtonElement extends HTMLElement {
|
|
6
5
|
#private;
|
|
7
6
|
constructor();
|
|
8
7
|
get popoverElement(): PopoverElement | undefined;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Attribute } from '../attribute';
|
|
2
|
-
import { CustomElement } from '../custom-element';
|
|
3
2
|
import { Store } from '../store';
|
|
4
3
|
|
|
5
|
-
export declare class PopoverElement extends
|
|
4
|
+
export declare class PopoverElement extends HTMLElement {
|
|
6
5
|
#private;
|
|
7
6
|
private static __opened;
|
|
8
7
|
constructor();
|
package/lib/popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var q=(o,n,t)=>{if(!n.has(o))throw TypeError("Cannot "+t)};var e=(o,n,t)=>(q(o,n,"read from private field"),t?t.call(o):n.get(o)),i=(o,n,t)=>{if(n.has(o))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(o):n.set(o,t)},h=(o,n,t,a)=>(q(o,n,"write to private field"),a?a.call(o,t):n.set(o,t),t);var A=(o,n,t)=>(q(o,n,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../attribute/index.cjs"),I=require("../Store-kzJycezD.cjs"),R=require("../style-At6aDoqG.cjs"),N=require("../browser-CpzFX2xg.cjs"),j=require("../tags-BBOGIzDK.cjs");var m,l,y,p,d,u,_,x,v,L,f,E,b,M,g;const c=class c extends HTMLElement{constructor(){super();i(this,_);i(this,v);i(this,b);i(this,m,void 0);i(this,l,void 0);i(this,y,void 0);i(this,p,void 0);i(this,d,void 0);i(this,u,void 0);i(this,f,void 0);i(this,E,void 0);i(this,g,void 0);h(this,m,-1),h(this,l,new I.Store(!1)),h(this,p,new $.Attribute(this,"history",!1)),h(this,d,new $.Attribute(this,"single",!1)),h(this,u,!1),this.open=(t=!0)=>{if(e(this,l).current)return;e(this,l).current=!0,e(this,d).current&&(c.__opened.forEach(r=>r.close()),c.__opened=[]),c.__opened.push(this),h(this,m,c.__opened.length-1),e(this,p).current&&e(this,u)&&history.pushState("","",e(this,_,x)),clearTimeout(e(this,y)),this.classList.add("triggered"),this.style.display="block",this.dispatchEvent(new CustomEvent("popoverTriggered"));const a=()=>{addEventListener("click",e(this,f)),addEventListener("keydown",e(this,E)),this.style.opacity="1",this.classList.add("opened"),this.dispatchEvent(new CustomEvent("popoverOpened"))};t?setTimeout(a):a()},this.close=()=>{if(e(this,l).current){if(e(this,l).current=!1,c.__opened=c.__opened.filter(t=>t!==this),e(this,p).current){const t=new URL(location.href);t.searchParams.delete(e(this,v,L)),history.replaceState(null,"",t.href)}this.classList.remove("opened"),this.style.opacity="0",this.dispatchEvent(new CustomEvent("popoverClosing")),removeEventListener("click",e(this,f)),removeEventListener("keydown",e(this,E)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none",this.dispatchEvent(new CustomEvent("popoverClosed"))},R.getElementTransitionDurationMS(this)+10)}},h(this,f,t=>{A(this,b,M).call(this,()=>{var O;const r=t.composedPath()[0],P=r instanceof HTMLElement&&(this.contains(r)||((O=this.shadowRoot)==null?void 0:O.contains(r))),B=r instanceof HTMLElement&&r.hasAttribute("outside");(!P||B)&&this.close()})}),h(this,E,t=>{A(this,b,M).call(this,()=>{t.code==="Escape"&&this.close()})}),h(this,g,()=>{h(this,u,!1),e(this,l).current&&e(this,p).current&&!location.search.includes(e(this,v,L))?this.close():!e(this,l).current&&e(this,p).current&&location.search.includes(e(this,v,L))&&this.open(),h(this,u,!0)}),this.setAttribute("popover-target","")}get history(){return e(this,p)}get single(){return e(this,d)}get opened(){return e(this,l)}connectedCallback(){e(this,p).observe(),e(this,d).observe(),this.style.opacity="0",this.style.display="none",addEventListener("popstate",e(this,g)),setTimeout(()=>{e(this,g).call(this)},0)}disconnectedCallback(){e(this,p).unobserve(),e(this,d).unobserve(),c.__opened=c.__opened.filter(t=>t!==this),clearTimeout(e(this,y)),removeEventListener("popstate",e(this,g))}};m=new WeakMap,l=new WeakMap,y=new WeakMap,p=new WeakMap,d=new WeakMap,u=new WeakMap,_=new WeakSet,x=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${e(this,v,L)}`},v=new WeakSet,L=function(){return`modal-${this.id}`},f=new WeakMap,E=new WeakMap,b=new WeakSet,M=function(t){(c.__opened[e(this,m)-1]||c.__opened.length===1)&&t()},g=new WeakMap,c.__opened=[];let S=c;customElements.get("e-popover")||customElements.define("e-popover",S);var s,T,w,C,k;class H extends HTMLElement{constructor(){super();i(this,s,void 0);i(this,T,()=>{this.classList.add("triggered")});i(this,w,()=>{this.classList.add("opened")});i(this,C,()=>{this.classList.remove("opened")});i(this,k,()=>{this.classList.remove("triggered")});N.isBrowser&&j.element(this,{tabindex:this.getAttribute("tabindex")||"0",onClick:()=>{if(e(this,s)){const t=this.getAttribute("type")||"open";t==="open"||t==="toggle"&&!e(this,s).opened.current?e(this,s).open():(t==="close"||t==="toggle"&&e(this,s).opened.current)&&e(this,s).close()}},onKeydown:t=>{t.code==="Space"&&t.currentTarget.click()}})}get popoverElement(){return e(this,s)}connectedCallback(){var a;const t=this.getAttribute("target");if(t){let r=null;t==="parent"?r=this.closest("[popover-target]"):t==="sibling"?r=(a=this.parentElement)==null?void 0:a.querySelector("[popover-target]"):r=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`),r instanceof HTMLElement?(h(this,s,r),e(this,s).addEventListener("popoverTriggered",e(this,T)),e(this,s).addEventListener("popoverOpened",e(this,w)),e(this,s).addEventListener("popoverClosing",e(this,C)),e(this,s).addEventListener("popoverClosed",e(this,k))):console.warn(this,`target ${t} not found`)}}disconnectedCallback(){e(this,s)&&(e(this,s).removeEventListener("popoverTriggered",e(this,T)),e(this,s).removeEventListener("popoverOpened",e(this,w)),e(this,s).removeEventListener("popoverClosing",e(this,C)),e(this,s).removeEventListener("popoverClosed",e(this,k)))}}s=new WeakMap,T=new WeakMap,w=new WeakMap,C=new WeakMap,k=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",H);exports.PopoverButtonElement=H;exports.PopoverElement=S;
|