aptechka 0.31.1 → 0.32.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-DN95L7Xo.js → Animation-B1AS8IQG.js} +9 -9
- package/lib/Animation-CN0h3D4p.cjs +1 -0
- package/lib/{Damped-CTsV8tl_.cjs → Damped-C3MyWa5_.cjs} +1 -1
- package/lib/{Damped-Chu29wn-.js → Damped-cQCN3d0W.js} +1 -1
- package/lib/Tweened-ChIsd14E.cjs +1 -0
- package/lib/Tweened-CynwDTYT.js +44 -0
- package/lib/animation/Tweened.d.ts +3 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/controls/DragControls.d.ts +1 -0
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +118 -120
- package/lib/easings-BEmRlrDd.js +38 -0
- package/lib/easings-GegIwET5.cjs +1 -0
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +1 -1
- package/lib/scroll/vanilla/ScrollButtonElement.d.ts +2 -1
- package/lib/scroll/vanilla/ScrollElement.d.ts +6 -3
- package/lib/scroll/vanilla/ScrollSetButtonElement.d.ts +2 -1
- package/lib/scroll/vanilla/ScrollStepButtonElement.d.ts +2 -1
- package/lib/scroll/vanilla/index.cjs +1 -1
- package/lib/scroll/vanilla/index.js +371 -337
- package/lib/scroll-segment/index.cjs +1 -1
- package/lib/scroll-segment/index.js +1 -1
- package/lib/slicer/index.cjs +4 -4
- package/lib/slicer/index.js +0 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +10 -10
- package/package.json +1 -1
- package/lib/Animation-B9m8bw96.cjs +0 -1
- package/lib/Tweened-BUuSLSF7.js +0 -44
- package/lib/Tweened-BttGiyB0.cjs +0 -1
- package/lib/easings-BKi40vHz.js +0 -19
- package/lib/easings-DsS5-Kqc.cjs +0 -1
|
@@ -5,19 +5,19 @@ var S = (i, r, t) => r.has(i) || I("Cannot " + t);
|
|
|
5
5
|
var e = (i, r, t) => (S(i, r, "read from private field"), t ? t.call(i) : r.get(i)), a = (i, r, t) => r.has(i) ? I("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(i) : r.set(i, t), h = (i, r, t, u) => (S(i, r, "write to private field"), u ? u.call(i, t) : r.set(i, t), t), P = (i, r, t) => (S(i, r, "access private method"), t);
|
|
6
6
|
import { S as q } from "./Store-OTdcl6SX.js";
|
|
7
7
|
import { c as y } from "./math-BOBiC4TN.js";
|
|
8
|
-
import { p as z, n as
|
|
8
|
+
import { p as z, n as A } from "./polyfills-X6KXuHg-.js";
|
|
9
9
|
import { ticker as O } from "./ticker/vanilla/index.js";
|
|
10
10
|
import { TICK_ORDER as N } from "./order/index.js";
|
|
11
|
-
var f, d,
|
|
11
|
+
var f, d, b, l, F, s, n, m, c, g, M, R, x;
|
|
12
12
|
class K extends q {
|
|
13
13
|
constructor(t, u) {
|
|
14
14
|
super(t || 0, u);
|
|
15
15
|
a(this, M);
|
|
16
16
|
a(this, f);
|
|
17
17
|
a(this, d, N.ANIMATION);
|
|
18
|
-
a(this,
|
|
18
|
+
a(this, b);
|
|
19
19
|
a(this, l, new q(!1));
|
|
20
|
-
a(this,
|
|
20
|
+
a(this, F, 0);
|
|
21
21
|
a(this, s, 0);
|
|
22
22
|
a(this, n, -1 / 0);
|
|
23
23
|
a(this, m, 1 / 0);
|
|
@@ -29,7 +29,7 @@ class K extends q {
|
|
|
29
29
|
h(this, s, this.current);
|
|
30
30
|
}
|
|
31
31
|
get direction() {
|
|
32
|
-
return e(this,
|
|
32
|
+
return e(this, F);
|
|
33
33
|
}
|
|
34
34
|
get target() {
|
|
35
35
|
return e(this, s);
|
|
@@ -84,21 +84,21 @@ class K extends q {
|
|
|
84
84
|
e(this, l).current || (e(this, l).current = !0, O.subscribe(e(this, x), {
|
|
85
85
|
maxFPS: e(this, f),
|
|
86
86
|
order: e(this, d),
|
|
87
|
-
culling: e(this,
|
|
87
|
+
culling: e(this, b)
|
|
88
88
|
}));
|
|
89
89
|
}
|
|
90
90
|
unlistenAnimationFrame() {
|
|
91
91
|
e(this, l).current && (e(this, l).current = !1, O.unsubscribe(e(this, x)));
|
|
92
92
|
}
|
|
93
93
|
updateOptions(t) {
|
|
94
|
-
h(this, f,
|
|
94
|
+
h(this, f, A(t == null ? void 0 : t.maxFPS, e(this, f))), h(this, d, A(t == null ? void 0 : t.order, e(this, d))), h(this, b, A(t == null ? void 0 : t.culling, e(this, b))), h(this, n, A(t == null ? void 0 : t.min, e(this, n))), h(this, m, A(t == null ? void 0 : t.max, e(this, m))), P(this, M, R).call(this, typeof e(this, g) == "number" ? e(this, g) : e(this, s)), t != null && t.equalize && (this.current = e(this, s)), t != null && t.restart && (this.unlistenAnimationFrame(), this.current = this.initial);
|
|
95
95
|
}
|
|
96
96
|
start() {
|
|
97
97
|
this.listenAnimationFrame();
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
f = new WeakMap(), d = new WeakMap(),
|
|
101
|
-
h(this,
|
|
100
|
+
f = new WeakMap(), d = new WeakMap(), b = new WeakMap(), l = new WeakMap(), F = new WeakMap(), s = new WeakMap(), n = new WeakMap(), m = new WeakMap(), c = new WeakMap(), g = new WeakMap(), M = new WeakSet(), R = function(t) {
|
|
101
|
+
h(this, F, Math.sign(t - e(this, s))), h(this, s, y(t, e(this, n), e(this, m))), h(this, c, this.current);
|
|
102
102
|
}, x = new WeakMap();
|
|
103
103
|
export {
|
|
104
104
|
K as A
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var C=i=>{throw TypeError(i)};var S=(i,r,t)=>r.has(i)||C("Cannot "+t);var e=(i,r,t)=>(S(i,r,"read from private field"),t?t.call(i):r.get(i)),a=(i,r,t)=>r.has(i)?C("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,t),h=(i,r,t,n)=>(S(i,r,"write to private field"),n?n.call(i,t):r.set(i,t),t),M=(i,r,t)=>(S(i,r,"access private method"),t);const I=require("./Store-CDb6RMce.cjs"),z=require("./math-GDWEqu7y.cjs"),m=require("./polyfills-CM4SCDTt.cjs"),P=require("./ticker/vanilla/index.cjs"),N=require("./order/index.cjs");var f,b,x,c,A,s,u,l,g,d,q,y,F;class O extends I.Store{constructor(t,n){super(t||0,n);a(this,q);a(this,f);a(this,b,N.TICK_ORDER.ANIMATION);a(this,x);a(this,c,new I.Store(!1));a(this,A,0);a(this,s,0);a(this,u,-1/0);a(this,l,1/0);a(this,g,0);a(this,d,null);a(this,F,t=>{this.handleAnimationFrame(t)});h(this,s,this.current)}get direction(){return e(this,A)}get target(){return e(this,s)}get min(){return e(this,u)}set min(t){h(this,u,t),this.set(e(this,s),{equalize:!0})}get max(){return e(this,l)}set max(t){h(this,l,t),this.set(e(this,s),{equalize:!0})}get from(){return e(this,g)}get isRunning(){return e(this,c)}get delta(){return Math.abs(e(this,s)-e(this,g))}get deltaProgress(){return this.delta?m.preciseNumber(Math.abs(this.current-e(this,g))/this.delta,6):0}get distance(){return Math.abs(e(this,l)-e(this,u))}get distanceProgress(){return this.distance?m.preciseNumber(Math.abs(this.current-e(this,u))/this.distance,6):0}set(t,n){(e(this,s)!==t||n!=null&&n.restart)&&(h(this,d,t),this.updateOptions(n),h(this,d,null),e(this,s)!==this.current&&this.start())}shift(t,n){this.set(e(this,s)+t,n)}reset(){super.reset(),this.set(this.initial,{equalize:!0})}close(){super.close(),this.reset(),this.unlistenAnimationFrame()}listenAnimationFrame(){e(this,c).current||(e(this,c).current=!0,P.ticker.subscribe(e(this,F),{maxFPS:e(this,f),order:e(this,b),culling:e(this,x)}))}unlistenAnimationFrame(){e(this,c).current&&(e(this,c).current=!1,P.ticker.unsubscribe(e(this,F)))}updateOptions(t){h(this,f,m.nullishCoalescing(t==null?void 0:t.maxFPS,e(this,f))),h(this,b,m.nullishCoalescing(t==null?void 0:t.order,e(this,b))),h(this,x,m.nullishCoalescing(t==null?void 0:t.culling,e(this,x))),h(this,u,m.nullishCoalescing(t==null?void 0:t.min,e(this,u))),h(this,l,m.nullishCoalescing(t==null?void 0:t.max,e(this,l))),M(this,q,y).call(this,typeof e(this,d)=="number"?e(this,d):e(this,s)),t!=null&&t.equalize&&(this.current=e(this,s)),t!=null&&t.restart&&(this.unlistenAnimationFrame(),this.current=this.initial)}start(){this.listenAnimationFrame()}}f=new WeakMap,b=new WeakMap,x=new WeakMap,c=new WeakMap,A=new WeakMap,s=new WeakMap,u=new WeakMap,l=new WeakMap,g=new WeakMap,d=new WeakMap,q=new WeakSet,y=function(t){h(this,A,Math.sign(t-e(this,s))),h(this,s,z.clamp(t,e(this,u),e(this,l))),h(this,g,this.current)},F=new WeakMap;exports.Animation=O;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var b=Object.defineProperty,y=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var l=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var g=t=>{throw TypeError(t)};var d=(t,e,s)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))O.call(e,s)&&d(t,s,e[s]);if(l)for(var s of l(e))v.call(e,s)&&d(t,s,e[s]);return t},p=(t,e)=>y(t,C(e));var q=(t,e,s)=>e.has(t)||g("Cannot "+s);var a=(t,e,s)=>(q(t,e,"read from private field"),s?s.call(t):e.get(t)),u=(t,e,s)=>e.has(t)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),n=(t,e,s,r)=>(q(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s);const w=require("./math-GDWEqu7y.cjs"),c=require("./polyfills-CM4SCDTt.cjs"),B=require("./Animation-
|
|
1
|
+
"use strict";var b=Object.defineProperty,y=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var l=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var g=t=>{throw TypeError(t)};var d=(t,e,s)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))O.call(e,s)&&d(t,s,e[s]);if(l)for(var s of l(e))v.call(e,s)&&d(t,s,e[s]);return t},p=(t,e)=>y(t,C(e));var q=(t,e,s)=>e.has(t)||g("Cannot "+s);var a=(t,e,s)=>(q(t,e,"read from private field"),s?s.call(t):e.get(t)),u=(t,e,s)=>e.has(t)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),n=(t,e,s,r)=>(q(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s);const w=require("./math-GDWEqu7y.cjs"),c=require("./polyfills-CM4SCDTt.cjs"),B=require("./Animation-CN0h3D4p.cjs");var i,h;class D extends B.Animation{constructor(s,r){super(s,r);u(this,i);u(this,h);this.damping=20,this.stiffness=0,this.mass=0,n(this,i,0),n(this,h,0),this.updateOptions(p(f({},r),{equalize:!0}))}get velocity(){return a(this,i)}get speed(){return a(this,h)}updateOptions(s){this.damping=c.nullishCoalescing(s==null?void 0:s.damping,this.damping),this.mass=c.nullishCoalescing(s==null?void 0:s.mass,this.mass),this.stiffness=c.nullishCoalescing(s==null?void 0:s.stiffness,this.stiffness),super.updateOptions(s)}handleAnimationFrame(s){c.preciseNumber(this.current,6)===c.preciseNumber(this.target,6)&&(this.unlistenAnimationFrame(),this.current=this.target);const r=this.current,A=Math.abs(r-this.target);n(this,h,A/s.timeBetweenFrames);const m=s.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const F=(this.target-this.current)*this.stiffness-a(this,i)*this.damping;n(this,i,a(this,i)+F/this.mass*m),this.current+=a(this,i)*m}else this.current=w.damp(this.current,this.target,this.damping,m)}}i=new WeakMap,h=new WeakMap;exports.Damped=D;
|
|
@@ -17,7 +17,7 @@ var A = (s, e, t) => e.has(s) || g("Cannot " + t);
|
|
|
17
17
|
var a = (s, e, t) => (A(s, e, "read from private field"), t ? t.call(s) : e.get(s)), c = (s, e, t) => e.has(s) ? g("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), m = (s, e, t, r) => (A(s, e, "write to private field"), r ? r.call(s, t) : e.set(s, t), t);
|
|
18
18
|
import { d as D } from "./math-BOBiC4TN.js";
|
|
19
19
|
import { n as u, p as F } from "./polyfills-X6KXuHg-.js";
|
|
20
|
-
import { A as q } from "./Animation-
|
|
20
|
+
import { A as q } from "./Animation-B1AS8IQG.js";
|
|
21
21
|
var i, h;
|
|
22
22
|
class j extends q {
|
|
23
23
|
constructor(t, r) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var y=Object.defineProperty,O=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var d=i=>{throw TypeError(i)};var m=(i,t,e)=>t in i?y(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,g=(i,t)=>{for(var e in t||(t={}))w.call(t,e)&&m(i,e,t[e]);if(h)for(var e of h(t))S.call(t,e)&&m(i,e,t[e]);return i},f=(i,t)=>O(i,b(t));var A=(i,t,e)=>t.has(i)||d("Cannot "+e);var s=(i,t,e)=>(A(i,t,"read from private field"),e?e.call(i):t.get(i)),c=(i,t,e)=>t.has(i)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),l=(i,t,e,a)=>(A(i,t,"write to private field"),a?a.call(i,e):t.set(i,e),e);const u=require("./easings-GegIwET5.cjs"),T=require("./math-GDWEqu7y.cjs"),q=require("./polyfills-CM4SCDTt.cjs"),x=require("./Animation-CN0h3D4p.cjs");var r,n;class z extends x.Animation{constructor(e,a){super(e||0,a);c(this,r,u.linear);c(this,n,1e3);this.updateOptions(f(g({},a),{equalize:!0}))}updateOptions(e){super.updateOptions(e),l(this,r,typeof(e==null?void 0:e.easing)=="function"?e.easing:typeof(e==null?void 0:e.easing)=="string"&&u.easings[e.easing]||u.linear),l(this,n,q.nullishCoalescing(e==null?void 0:e.duration,s(this,n)))}handleAnimationFrame(e){const a=e.timeElapsedSinceSubscription/1e3/(s(this,n)/1e3)||0,F=s(this,r).call(this,T.clamp(a,0,1));this.current=q.preciseNumber(this.from+(this.target-this.from)*F,6),a>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}r=new WeakMap,n=new WeakMap;exports.Tweened=z;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var O = Object.defineProperty, b = Object.defineProperties;
|
|
2
|
+
var p = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var c = Object.getOwnPropertySymbols;
|
|
4
|
+
var x = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var f = (a) => {
|
|
6
|
+
throw TypeError(a);
|
|
7
|
+
};
|
|
8
|
+
var l = (a, i, e) => i in a ? O(a, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[i] = e, d = (a, i) => {
|
|
9
|
+
for (var e in i || (i = {}))
|
|
10
|
+
x.call(i, e) && l(a, e, i[e]);
|
|
11
|
+
if (c)
|
|
12
|
+
for (var e of c(i))
|
|
13
|
+
y.call(i, e) && l(a, e, i[e]);
|
|
14
|
+
return a;
|
|
15
|
+
}, g = (a, i) => b(a, p(i));
|
|
16
|
+
var A = (a, i, e) => i.has(a) || f("Cannot " + e);
|
|
17
|
+
var n = (a, i, e) => (A(a, i, "read from private field"), e ? e.call(a) : i.get(a)), m = (a, i, e) => i.has(a) ? f("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(a) : i.set(a, e), u = (a, i, e, t) => (A(a, i, "write to private field"), t ? t.call(a, e) : i.set(a, e), e);
|
|
18
|
+
import { l as h, e as S } from "./easings-BEmRlrDd.js";
|
|
19
|
+
import { c as T } from "./math-BOBiC4TN.js";
|
|
20
|
+
import { n as q, p as w } from "./polyfills-X6KXuHg-.js";
|
|
21
|
+
import { A as z } from "./Animation-B1AS8IQG.js";
|
|
22
|
+
var s, r;
|
|
23
|
+
class v extends z {
|
|
24
|
+
constructor(e, t) {
|
|
25
|
+
super(e || 0, t);
|
|
26
|
+
m(this, s, h);
|
|
27
|
+
m(this, r, 1e3);
|
|
28
|
+
this.updateOptions(g(d({}, t), { equalize: !0 }));
|
|
29
|
+
}
|
|
30
|
+
updateOptions(e) {
|
|
31
|
+
super.updateOptions(e), u(this, s, typeof (e == null ? void 0 : e.easing) == "function" ? e.easing : typeof (e == null ? void 0 : e.easing) == "string" ? S[e.easing] || h : h), u(this, r, q(e == null ? void 0 : e.duration, n(this, r)));
|
|
32
|
+
}
|
|
33
|
+
handleAnimationFrame(e) {
|
|
34
|
+
const t = e.timeElapsedSinceSubscription / 1e3 / (n(this, r) / 1e3) || 0, F = n(this, s).call(this, T(t, 0, 1));
|
|
35
|
+
this.current = w(this.from + (this.target - this.from) * F, 6), t > 1 && this.unlistenAnimationFrame();
|
|
36
|
+
}
|
|
37
|
+
start() {
|
|
38
|
+
this.unlistenAnimationFrame(), this.listenAnimationFrame();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
s = new WeakMap(), r = new WeakMap();
|
|
42
|
+
export {
|
|
43
|
+
v as T
|
|
44
|
+
};
|
|
@@ -2,8 +2,10 @@ import { TickerCallbackEntry } from '../ticker/vanilla';
|
|
|
2
2
|
import { EasingFunction } from '../utils';
|
|
3
3
|
import { Animation, AnimationConstructorOptions, AnimationOptions } from './Animation';
|
|
4
4
|
|
|
5
|
+
import * as easings from '@packages/utils/easings';
|
|
6
|
+
export type TweenEasingName = keyof typeof easings;
|
|
5
7
|
export interface TweenedOptions extends AnimationOptions {
|
|
6
|
-
easing?: EasingFunction;
|
|
8
|
+
easing?: EasingFunction | TweenEasingName;
|
|
7
9
|
duration?: number;
|
|
8
10
|
}
|
|
9
11
|
export declare class Tweened extends Animation<TweenedOptions> {
|
package/lib/animation/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-CN0h3D4p.cjs"),n=require("../Damped-C3MyWa5_.cjs"),i=require("../Tweened-ChIsd14E.cjs");exports.Animation=e.Animation;exports.Damped=n.Damped;exports.Tweened=i.Tweened;
|
package/lib/animation/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as r } from "../Animation-
|
|
2
|
-
import { D as m } from "../Damped-
|
|
3
|
-
import { T as t } from "../Tweened-
|
|
1
|
+
import { A as r } from "../Animation-B1AS8IQG.js";
|
|
2
|
+
import { D as m } from "../Damped-cQCN3d0W.js";
|
|
3
|
+
import { T as t } from "../Tweened-CynwDTYT.js";
|
|
4
4
|
export {
|
|
5
5
|
r as Animation,
|
|
6
6
|
m as Damped,
|
package/lib/controls/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var V=h=>{throw TypeError(h)};var F=(h,n,e)=>n.has(h)||V("Cannot "+e);var t=(h,n,e)=>(F(h,n,"read from private field"),e?e.call(h):n.get(h)),s=(h,n,e)=>n.has(h)?V("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(h):n.set(h,e),i=(h,n,e,r)=>(F(h,n,"write to private field"),r?r.call(h,e):n.set(h,e),e),k=(h,n,e)=>(F(h,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("../notifier/index.cjs"),m=require("../browser-CpzFX2xg.cjs"),Q=require("../dom-JBOkFLTh.cjs"),q=require("../ticker/vanilla/index.cjs");require("../Store-CDb6RMce.cjs");const J=require("../easings-GegIwET5.cjs"),Z=require("../Tweened-ChIsd14E.cjs"),_=require("../gestures-DHLrn6Q8.cjs"),$=require("../polyfills-CM4SCDTt.cjs"),p=require("../order/index.cjs");var N;class Y{constructor(){s(this,N,new G.Notifier)}get changeEvent(){return t(this,N)}}N=new WeakMap;var b,c,u,H;class ee extends Y{constructor(e){super();s(this,b,null);s(this,c,null);s(this,u,"offsetHeight");s(this,H,e=>{const r=e.shiftKey?-1:1;let a;e.code==="Space"?a=r*t(this,c)[t(this,u)]*.4:e.code==="ArrowLeft"?a=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowRight"?a=1*t(this,c)[t(this,u)]*.2:e.code==="ArrowUp"?a=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowDown"?a=1*t(this,c)[t(this,u)]*.2:e.code==="PageUp"?a=-1*t(this,c)[t(this,u)]:e.code==="PageDown"?a=1*t(this,c)[t(this,u)]:e.code==="Home"?a=0:e.code==="End"&&(a=t(this,u)==="offsetWidth"?t(this,c).scrollWidth:t(this,c).scrollHeight),a&&(e.stopPropagation(),this.changeEvent.notify("keyboard",a))});m.isBrowser&&(i(this,b,e!=null&&e.element&&Q.getElement(e.element)||window),i(this,c,t(this,b)instanceof HTMLElement?t(this,b):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){m.isBrowser&&t(this,b).addEventListener("keydown",t(this,H))}disconnect(){m.isBrowser&&t(this,b).removeEventListener("keydown",t(this,H))}}b=new WeakMap,c=new WeakMap,u=new WeakMap,H=new WeakMap;var g,x,P,z,d,T,f,w,K,U,C,W,B;class te extends Y{constructor(e){super();s(this,w);s(this,g);s(this,x);s(this,P);s(this,z);s(this,d);s(this,T);s(this,f);s(this,C);s(this,W);s(this,B);this.direction=1,i(this,d,new Z.Tweened(0,{easing:J.easeInQuad})),i(this,f,!1),i(this,C,r=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",r.timeBetweenFrames*t(this,g)*this.direction*(1-t(this,d).current))}),i(this,W,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,g))*this.direction*(1-t(this,d).current))}),i(this,B,()=>{t(this,x)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,g,(e==null?void 0:e.speed)||1),i(this,x,(e==null?void 0:e.interval)||!1),i(this,P,e)}set interval(e){i(this,x,e),t(this,f)&&k(this,w,K).call(this)}set speed(e){i(this,g,e),t(this,f)&&k(this,w,K).call(this)}connect(){t(this,f)||(i(this,f,!0),k(this,w,K).call(this))}disconnect(){t(this,f)&&(i(this,f,!1),k(this,w,U).call(this))}pauseAndContinue(e,r){t(this,f)&&e&&(clearTimeout(t(this,T)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:r}),i(this,T,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:r})},e)))}}g=new WeakMap,x=new WeakMap,P=new WeakMap,z=new WeakMap,d=new WeakMap,T=new WeakMap,f=new WeakMap,w=new WeakSet,K=function(){k(this,w,U).call(this),t(this,x)?i(this,z,setInterval(t(this,W),Math.abs(t(this,g)))):q.ticker.subscribe(t(this,C),t(this,P)),document.addEventListener("visibilitychange",t(this,B))},U=function(){clearInterval(t(this,z)),q.ticker.unsubscribe(t(this,C)),clearTimeout(t(this,T)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,B))},C=new WeakMap,W=new WeakMap,B=new WeakMap;var A,v,D,X;class ie extends Y{constructor(e){super();s(this,A,null);s(this,v);s(this,D);s(this,X,e=>{let r=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)*.5||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*.5))if(e.preventDefault(),r=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),this.debounce){const a=Date.now();if(a-t(this,D)>40&&(r=100*Math.sign(r)),i(this,D,a),Math.abs(r)<100||t(this,v))return;this.changeEvent.notify("wheel",r),i(this,v,setTimeout(()=>{i(this,v,void 0)},80))}else this.changeEvent.notify("wheel",r)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,i(this,D,Date.now()),m.isBrowser&&i(this,A,e!=null&&e.element&&Q.getElement(e.element)||window)}connect(){m.isBrowser&&t(this,A).addEventListener("wheel",t(this,X),{passive:!1})}disconnect(){m.isBrowser&&(t(this,A).removeEventListener("wheel",t(this,X)),clearTimeout(t(this,v)))}}A=new WeakMap,v=new WeakMap,D=new WeakMap,X=new WeakMap;var M,o,l,I,y;const E=class E extends Y{constructor(e){super();s(this,o);s(this,l);s(this,I);s(this,y);this.inertion=1,i(this,o,null),i(this,l,0),i(this,I,r=>{if(r.composedPath().find(L=>L instanceof HTMLElement&&L.hasAttribute("drag-dead-zone")))return;this.swipe||q.ticker.unsubscribe(t(this,y));let a=r,O=!1;i(this,l,0),document.documentElement.classList.add("grabbing"),_.setupDrag(L=>{if(t(E,M)&&t(E,M)!==t(this,o))return;const R=a.x-L.x,S=a.y-L.y;this.axis==="x"?i(this,l,R):i(this,l,S),a=L,O=this.axis==="x"&&Math.abs(R)>Math.abs(S)||this.axis==="y"&&Math.abs(S)>Math.abs(R),O&&(i(E,M,t(this,o)),this.changeEvent.notify("drag",t(this,l)))},()=>{i(E,M,null),O&&(!this.swipe&&this.inertion?(i(this,l,t(this,l)*this.inertion),q.ticker.subscribe(t(this,y),{order:p.TICK_ORDER.CONTROLS-1})):this.swipe&&this.changeEvent.notify("drag-end",t(this,l))),document.documentElement.classList.remove("grabbing")})}),i(this,y,()=>{Math.floor(Math.abs(t(this,l)))||q.ticker.unsubscribe(t(this,y)),i(this,l,t(this,l)*.95),i(this,l,$.preciseNumber(t(this,l),3)),this.changeEvent.notify("drag",t(this,l))}),this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,m.isBrowser&&i(this,o,e!=null&&e.element&&Q.getElement(e.element)||document.documentElement)}connect(){m.isBrowser&&t(this,o).addEventListener("pointerdown",t(this,I))}disconnect(){m.isBrowser&&(t(this,o).removeEventListener("pointerdown",t(this,I)),q.ticker.unsubscribe(t(this,y)))}};M=new WeakMap,o=new WeakMap,l=new WeakMap,I=new WeakMap,y=new WeakMap,s(E,M,null);let j=E;exports.AutoplayControls=te;exports.Controls=Y;exports.DragControls=j;exports.KeyboardControls=ee;exports.WheelControls=ie;
|
package/lib/controls/index.js
CHANGED
|
@@ -1,215 +1,213 @@
|
|
|
1
|
-
var
|
|
1
|
+
var V = (h) => {
|
|
2
2
|
throw TypeError(h);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var t = (h,
|
|
6
|
-
import { Notifier as
|
|
7
|
-
import { i as
|
|
8
|
-
import { g as
|
|
9
|
-
import { ticker as
|
|
4
|
+
var S = (h, n, e) => n.has(h) || V("Cannot " + e);
|
|
5
|
+
var t = (h, n, e) => (S(h, n, "read from private field"), e ? e.call(h) : n.get(h)), s = (h, n, e) => n.has(h) ? V("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(h) : n.set(h, e), i = (h, n, e, a) => (S(h, n, "write to private field"), a ? a.call(h, e) : n.set(h, e), e), T = (h, n, e) => (S(h, n, "access private method"), e);
|
|
6
|
+
import { Notifier as G } from "../notifier/index.js";
|
|
7
|
+
import { i as o } from "../browser-0zX67oeU.js";
|
|
8
|
+
import { g as Q } from "../dom-0S_WDL4g.js";
|
|
9
|
+
import { ticker as k } from "../ticker/vanilla/index.js";
|
|
10
10
|
import "../Store-OTdcl6SX.js";
|
|
11
|
-
import {
|
|
12
|
-
import { T as
|
|
13
|
-
import { s as
|
|
14
|
-
import { p
|
|
15
|
-
import { TICK_ORDER as
|
|
16
|
-
var
|
|
17
|
-
class
|
|
11
|
+
import { a as J } from "../easings-BEmRlrDd.js";
|
|
12
|
+
import { T as Z } from "../Tweened-CynwDTYT.js";
|
|
13
|
+
import { s as $ } from "../gestures-D2Fdra_G.js";
|
|
14
|
+
import { p } from "../polyfills-X6KXuHg-.js";
|
|
15
|
+
import { TICK_ORDER as _ } from "../order/index.js";
|
|
16
|
+
var W;
|
|
17
|
+
class K {
|
|
18
18
|
constructor() {
|
|
19
|
-
s(this,
|
|
19
|
+
s(this, W, new G());
|
|
20
20
|
}
|
|
21
21
|
get changeEvent() {
|
|
22
|
-
return t(this,
|
|
22
|
+
return t(this, W);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
var
|
|
27
|
-
class
|
|
25
|
+
W = new WeakMap();
|
|
26
|
+
var w, d, f, P;
|
|
27
|
+
class fe extends K {
|
|
28
28
|
constructor(e) {
|
|
29
29
|
super();
|
|
30
|
-
s(this,
|
|
30
|
+
s(this, w, null);
|
|
31
31
|
s(this, d, null);
|
|
32
32
|
s(this, f, "offsetHeight");
|
|
33
|
-
s(this,
|
|
34
|
-
const
|
|
35
|
-
let
|
|
36
|
-
e.code === "Space" ?
|
|
33
|
+
s(this, P, (e) => {
|
|
34
|
+
const a = e.shiftKey ? -1 : 1;
|
|
35
|
+
let r;
|
|
36
|
+
e.code === "Space" ? r = a * t(this, d)[t(this, f)] * 0.4 : e.code === "ArrowLeft" ? r = -1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowRight" ? r = 1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowUp" ? r = -1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowDown" ? r = 1 * t(this, d)[t(this, f)] * 0.2 : e.code === "PageUp" ? r = -1 * t(this, d)[t(this, f)] : e.code === "PageDown" ? r = 1 * t(this, d)[t(this, f)] : e.code === "Home" ? r = 0 : e.code === "End" && (r = t(this, f) === "offsetWidth" ? t(this, d).scrollWidth : t(this, d).scrollHeight), r && (e.stopPropagation(), this.changeEvent.notify("keyboard", r));
|
|
37
37
|
});
|
|
38
|
-
|
|
38
|
+
o && (i(this, w, e != null && e.element && Q(e.element) || window), i(this, d, t(this, w) instanceof HTMLElement ? t(this, w) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
|
|
39
39
|
}
|
|
40
40
|
set dimension(e) {
|
|
41
41
|
i(this, f, e === "width" ? "offsetWidth" : "offsetHeight");
|
|
42
42
|
}
|
|
43
43
|
connect() {
|
|
44
|
-
|
|
44
|
+
o && t(this, w).addEventListener(
|
|
45
45
|
"keydown",
|
|
46
|
-
t(this,
|
|
46
|
+
t(this, P)
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
49
|
disconnect() {
|
|
50
|
-
|
|
50
|
+
o && t(this, w).removeEventListener(
|
|
51
51
|
"keydown",
|
|
52
|
-
t(this,
|
|
52
|
+
t(this, P)
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
var
|
|
58
|
-
class
|
|
56
|
+
w = new WeakMap(), d = new WeakMap(), f = new WeakMap(), P = new WeakMap();
|
|
57
|
+
var g, x, X, Y, c, C, u, b, R, U, A, q, I;
|
|
58
|
+
class ue extends K {
|
|
59
59
|
constructor(e) {
|
|
60
60
|
super();
|
|
61
|
-
s(this,
|
|
62
|
-
s(this,
|
|
63
|
-
s(this,
|
|
64
|
-
s(this, P);
|
|
61
|
+
s(this, b);
|
|
62
|
+
s(this, g);
|
|
63
|
+
s(this, x);
|
|
65
64
|
s(this, X);
|
|
65
|
+
s(this, Y);
|
|
66
66
|
s(this, c);
|
|
67
|
-
s(this, k);
|
|
68
|
-
s(this, u);
|
|
69
67
|
s(this, C);
|
|
70
|
-
s(this,
|
|
68
|
+
s(this, u);
|
|
71
69
|
s(this, A);
|
|
72
|
-
|
|
70
|
+
s(this, q);
|
|
71
|
+
s(this, I);
|
|
72
|
+
this.direction = 1, i(this, c, new Z(0, { easing: J })), i(this, u, !1), i(this, A, (a) => {
|
|
73
73
|
t(this, c).current !== 1 && this.changeEvent.notify(
|
|
74
74
|
"autoplay",
|
|
75
|
-
|
|
75
|
+
a.timeBetweenFrames * t(this, g) * this.direction * (1 - t(this, c).current)
|
|
76
76
|
);
|
|
77
|
-
}), i(this,
|
|
77
|
+
}), i(this, q, () => {
|
|
78
78
|
t(this, c).current !== 1 && this.changeEvent.notify(
|
|
79
79
|
"autoplay",
|
|
80
|
-
Math.sign(t(this,
|
|
80
|
+
Math.sign(t(this, g)) * this.direction * (1 - t(this, c).current)
|
|
81
81
|
);
|
|
82
|
-
}), i(this,
|
|
83
|
-
t(this,
|
|
84
|
-
}), i(this,
|
|
82
|
+
}), i(this, I, () => {
|
|
83
|
+
t(this, x) && (document.hidden ? t(this, c).set(1, { equalize: !0 }) : t(this, c).set(0, { equalize: !0 }));
|
|
84
|
+
}), i(this, g, (e == null ? void 0 : e.speed) || 1), i(this, x, (e == null ? void 0 : e.interval) || !1), i(this, X, e);
|
|
85
85
|
}
|
|
86
86
|
set interval(e) {
|
|
87
|
-
i(this,
|
|
87
|
+
i(this, x, e), t(this, u) && T(this, b, R).call(this);
|
|
88
88
|
}
|
|
89
89
|
set speed(e) {
|
|
90
|
-
i(this,
|
|
90
|
+
i(this, g, e), t(this, u) && T(this, b, R).call(this);
|
|
91
91
|
}
|
|
92
92
|
connect() {
|
|
93
|
-
t(this, u) || (i(this, u, !0),
|
|
93
|
+
t(this, u) || (i(this, u, !0), T(this, b, R).call(this));
|
|
94
94
|
}
|
|
95
95
|
disconnect() {
|
|
96
|
-
t(this, u) && (i(this, u, !1),
|
|
96
|
+
t(this, u) && (i(this, u, !1), T(this, b, U).call(this));
|
|
97
97
|
}
|
|
98
|
-
pauseAndContinue(e,
|
|
99
|
-
t(this, u) && e && (clearTimeout(t(this,
|
|
98
|
+
pauseAndContinue(e, a) {
|
|
99
|
+
t(this, u) && e && (clearTimeout(t(this, C)), t(this, c).set(1, {
|
|
100
100
|
duration: Math.min(e, 1e3),
|
|
101
|
-
equalize:
|
|
102
|
-
}), i(this,
|
|
101
|
+
equalize: a
|
|
102
|
+
}), i(this, C, setTimeout(() => {
|
|
103
103
|
t(this, c).set(0, {
|
|
104
104
|
duration: Math.min(e, 5e3),
|
|
105
|
-
equalize:
|
|
105
|
+
equalize: a
|
|
106
106
|
});
|
|
107
107
|
}, e)));
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
t(this,
|
|
113
|
-
Math.abs(t(this,
|
|
114
|
-
)) :
|
|
110
|
+
g = new WeakMap(), x = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), c = new WeakMap(), C = new WeakMap(), u = new WeakMap(), b = new WeakSet(), R = function() {
|
|
111
|
+
T(this, b, U).call(this), t(this, x) ? i(this, Y, setInterval(
|
|
112
|
+
t(this, q),
|
|
113
|
+
Math.abs(t(this, g))
|
|
114
|
+
)) : k.subscribe(t(this, A), t(this, X)), document.addEventListener(
|
|
115
115
|
"visibilitychange",
|
|
116
|
-
t(this,
|
|
116
|
+
t(this, I)
|
|
117
117
|
);
|
|
118
|
-
},
|
|
119
|
-
clearInterval(t(this,
|
|
118
|
+
}, U = function() {
|
|
119
|
+
clearInterval(t(this, Y)), k.unsubscribe(t(this, A)), clearTimeout(t(this, C)), t(this, c).close(), document.removeEventListener(
|
|
120
120
|
"visibilitychange",
|
|
121
|
-
t(this,
|
|
121
|
+
t(this, I)
|
|
122
122
|
);
|
|
123
|
-
},
|
|
124
|
-
var
|
|
125
|
-
class
|
|
123
|
+
}, A = new WeakMap(), q = new WeakMap(), I = new WeakMap();
|
|
124
|
+
var D, v, H, N;
|
|
125
|
+
class me extends K {
|
|
126
126
|
constructor(e) {
|
|
127
127
|
super();
|
|
128
|
-
s(this,
|
|
129
|
-
s(this,
|
|
130
|
-
s(this,
|
|
131
|
-
s(this,
|
|
132
|
-
let
|
|
128
|
+
s(this, D, null);
|
|
129
|
+
s(this, v);
|
|
130
|
+
s(this, H);
|
|
131
|
+
s(this, N, (e) => {
|
|
132
|
+
let a = 0;
|
|
133
133
|
if (!(this.axis === "x" && Math.abs(e.deltaY) > Math.abs(e.deltaX) * 0.5 || this.axis === "y" && Math.abs(e.deltaX) > Math.abs(e.deltaY) * 0.5))
|
|
134
|
-
if (e.preventDefault(),
|
|
135
|
-
const
|
|
136
|
-
if (
|
|
134
|
+
if (e.preventDefault(), a = (this.axis === "max" ? Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), this.debounce) {
|
|
135
|
+
const r = Date.now();
|
|
136
|
+
if (r - t(this, H) > 40 && (a = 100 * Math.sign(a)), i(this, H, r), Math.abs(a) < 100 || t(this, v))
|
|
137
137
|
return;
|
|
138
|
-
this.changeEvent.notify("wheel",
|
|
139
|
-
i(this,
|
|
138
|
+
this.changeEvent.notify("wheel", a), i(this, v, setTimeout(() => {
|
|
139
|
+
i(this, v, void 0);
|
|
140
140
|
}, 80));
|
|
141
141
|
} else
|
|
142
|
-
this.changeEvent.notify("wheel",
|
|
142
|
+
this.changeEvent.notify("wheel", a);
|
|
143
143
|
});
|
|
144
|
-
this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, i(this,
|
|
144
|
+
this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, i(this, H, Date.now()), o && i(this, D, e != null && e.element && Q(e.element) || window);
|
|
145
145
|
}
|
|
146
146
|
connect() {
|
|
147
|
-
|
|
147
|
+
o && t(this, D).addEventListener(
|
|
148
148
|
"wheel",
|
|
149
|
-
t(this,
|
|
149
|
+
t(this, N),
|
|
150
150
|
{
|
|
151
151
|
passive: !1
|
|
152
152
|
}
|
|
153
153
|
);
|
|
154
154
|
}
|
|
155
155
|
disconnect() {
|
|
156
|
-
|
|
156
|
+
o && (t(this, D).removeEventListener(
|
|
157
157
|
"wheel",
|
|
158
|
-
t(this,
|
|
159
|
-
), clearTimeout(t(this,
|
|
158
|
+
t(this, N)
|
|
159
|
+
), clearTimeout(t(this, v)));
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
|
|
163
|
-
var
|
|
164
|
-
const E = class E extends
|
|
162
|
+
D = new WeakMap(), v = new WeakMap(), H = new WeakMap(), N = new WeakMap();
|
|
163
|
+
var M, m, l, z, y;
|
|
164
|
+
const E = class E extends K {
|
|
165
165
|
constructor(e) {
|
|
166
166
|
super();
|
|
167
|
-
s(this,
|
|
168
|
-
s(this,
|
|
169
|
-
s(this,
|
|
170
|
-
s(this,
|
|
171
|
-
|
|
172
|
-
|
|
167
|
+
s(this, m);
|
|
168
|
+
s(this, l);
|
|
169
|
+
s(this, z);
|
|
170
|
+
s(this, y);
|
|
171
|
+
this.inertion = 1, i(this, m, null), i(this, l, 0), i(this, z, (a) => {
|
|
172
|
+
if (a.composedPath().find(
|
|
173
|
+
(L) => L instanceof HTMLElement && L.hasAttribute("drag-dead-zone")
|
|
173
174
|
))
|
|
174
175
|
return;
|
|
175
|
-
this.swipe ||
|
|
176
|
-
let
|
|
177
|
-
i(this, l, 0), document.documentElement.classList.add("grabbing"),
|
|
178
|
-
(
|
|
179
|
-
if (t(
|
|
176
|
+
this.swipe || k.unsubscribe(t(this, y));
|
|
177
|
+
let r = a, O = !1;
|
|
178
|
+
i(this, l, 0), document.documentElement.classList.add("grabbing"), $(
|
|
179
|
+
(L) => {
|
|
180
|
+
if (t(E, M) && t(E, M) !== t(this, m))
|
|
180
181
|
return;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
this.axis === "x" ? i(this, l, O) : i(this, l, B), n = a, (this.axis === "x" && Math.abs(O) > Math.abs(B) || this.axis === "y" && Math.abs(B) > Math.abs(O)) && (i(E, v, t(this, g)), this.changeEvent.notify("drag", t(this, l)));
|
|
182
|
+
const B = r.x - L.x, F = r.y - L.y;
|
|
183
|
+
this.axis === "x" ? i(this, l, B) : i(this, l, F), r = L, O = this.axis === "x" && Math.abs(B) > Math.abs(F) || this.axis === "y" && Math.abs(F) > Math.abs(B), O && (i(E, M, t(this, m)), this.changeEvent.notify("drag", t(this, l)));
|
|
184
184
|
},
|
|
185
185
|
() => {
|
|
186
|
-
i(E,
|
|
187
|
-
order:
|
|
188
|
-
}))
|
|
186
|
+
i(E, M, null), O && (!this.swipe && this.inertion ? (i(this, l, t(this, l) * this.inertion), k.subscribe(t(this, y), {
|
|
187
|
+
order: _.CONTROLS - 1
|
|
188
|
+
})) : this.swipe && this.changeEvent.notify("drag-end", t(this, l))), document.documentElement.classList.remove("grabbing");
|
|
189
189
|
}
|
|
190
190
|
);
|
|
191
|
-
})
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
});
|
|
195
|
-
this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, m && i(this, g, e != null && e.element && U(e.element) || document.documentElement);
|
|
191
|
+
}), i(this, y, () => {
|
|
192
|
+
Math.floor(Math.abs(t(this, l))) || k.unsubscribe(t(this, y)), i(this, l, t(this, l) * 0.95), i(this, l, p(t(this, l), 3)), this.changeEvent.notify("drag", t(this, l));
|
|
193
|
+
}), this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, o && i(this, m, e != null && e.element && Q(e.element) || document.documentElement);
|
|
196
194
|
}
|
|
197
195
|
connect() {
|
|
198
|
-
|
|
196
|
+
o && t(this, m).addEventListener("pointerdown", t(this, z));
|
|
199
197
|
}
|
|
200
198
|
disconnect() {
|
|
201
|
-
|
|
199
|
+
o && (t(this, m).removeEventListener(
|
|
202
200
|
"pointerdown",
|
|
203
|
-
t(this,
|
|
204
|
-
),
|
|
201
|
+
t(this, z)
|
|
202
|
+
), k.unsubscribe(t(this, y)));
|
|
205
203
|
}
|
|
206
204
|
};
|
|
207
|
-
|
|
208
|
-
let
|
|
205
|
+
M = new WeakMap(), m = new WeakMap(), l = new WeakMap(), z = new WeakMap(), y = new WeakMap(), s(E, M, null);
|
|
206
|
+
let j = E;
|
|
209
207
|
export {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
208
|
+
ue as AutoplayControls,
|
|
209
|
+
K as Controls,
|
|
210
|
+
j as DragControls,
|
|
211
|
+
fe as KeyboardControls,
|
|
212
|
+
me as WheelControls
|
|
215
213
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const n = (e) => e, s = (e) => e * e, a = (e) => e * (2 - e), r = (e) => e < 0.5 ? 2 * e * e : -1 + (4 - 2 * e) * e, u = (e) => e * e * e, o = (e) => --e * e * e + 1, c = (e) => e < 0.5 ? 4 * e * e * e : (e - 1) * (2 * e - 2) * (2 * e - 2) + 1, O = (e) => e * e * e * e, i = (e) => 1 - --e * e * e * e, I = (e) => e < 0.5 ? 8 * e * e * e * e : 1 - 8 * --e * e * e * e, Q = (e) => e * e * e * e * e, b = (e) => 1 + --e * e * e * e * e, l = (e) => e < 0.5 ? 16 * e * e * e * e * e : 1 + 16 * --e * e * e * e * e, p = (e) => e === 0 ? 0 : 2 ** (10 * (e - 1)), d = (e) => e === 1 ? 1 : 1 - 2 ** (-10 * e), g = (e) => e === 0 || e === 1 ? e : e < 0.5 ? 0.5 * 2 ** (20 * (e - 0.5)) : 0.5 * (2 - Math.abs(2 ** (-20 * (e - 0.5)))), x = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2
|
+
__proto__: null,
|
|
3
|
+
easeInCubic: u,
|
|
4
|
+
easeInExpo: p,
|
|
5
|
+
easeInOutCubic: c,
|
|
6
|
+
easeInOutExpo: g,
|
|
7
|
+
easeInOutQuad: r,
|
|
8
|
+
easeInOutQuart: I,
|
|
9
|
+
easeInOutQuint: l,
|
|
10
|
+
easeInQuad: s,
|
|
11
|
+
easeInQuart: O,
|
|
12
|
+
easeInQuint: Q,
|
|
13
|
+
easeOutCubic: o,
|
|
14
|
+
easeOutExpo: d,
|
|
15
|
+
easeOutQuad: a,
|
|
16
|
+
easeOutQuart: i,
|
|
17
|
+
easeOutQuint: b,
|
|
18
|
+
linear: n
|
|
19
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
20
|
+
export {
|
|
21
|
+
s as a,
|
|
22
|
+
a as b,
|
|
23
|
+
r as c,
|
|
24
|
+
u as d,
|
|
25
|
+
x as e,
|
|
26
|
+
o as f,
|
|
27
|
+
c as g,
|
|
28
|
+
O as h,
|
|
29
|
+
i,
|
|
30
|
+
I as j,
|
|
31
|
+
Q as k,
|
|
32
|
+
n as l,
|
|
33
|
+
b as m,
|
|
34
|
+
l as n,
|
|
35
|
+
p as o,
|
|
36
|
+
d as p,
|
|
37
|
+
g as q
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=e=>e,u=e=>e*e,s=e=>e*(2-e),a=e=>e<.5?2*e*e:-1+(4-2*e)*e,r=e=>e*e*e,o=e=>--e*e*e+1,c=e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1,O=e=>e*e*e*e,I=e=>1- --e*e*e*e,i=e=>e<.5?8*e*e*e*e:1-8*--e*e*e*e,t=e=>e*e*e*e*e,Q=e=>1+--e*e*e*e*e,b=e=>e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e,d=e=>e===0?0:2**(10*(e-1)),p=e=>e===1?1:1-2**(-10*e),l=e=>e===0||e===1?e:e<.5?.5*2**(20*(e-.5)):.5*(2-Math.abs(2**(-20*(e-.5)))),x=Object.freeze(Object.defineProperty({__proto__:null,easeInCubic:r,easeInExpo:d,easeInOutCubic:c,easeInOutExpo:l,easeInOutQuad:a,easeInOutQuart:i,easeInOutQuint:b,easeInQuad:u,easeInQuart:O,easeInQuint:t,easeOutCubic:o,easeOutExpo:p,easeOutQuad:s,easeOutQuart:I,easeOutQuint:Q,linear:n},Symbol.toStringTag,{value:"Module"}));exports.easeInCubic=r;exports.easeInExpo=d;exports.easeInOutCubic=c;exports.easeInOutExpo=l;exports.easeInOutQuad=a;exports.easeInOutQuart=i;exports.easeInOutQuint=b;exports.easeInQuad=u;exports.easeInQuart=O;exports.easeInQuint=t;exports.easeOutCubic=o;exports.easeOutExpo=p;exports.easeOutQuad=s;exports.easeOutQuart=I;exports.easeOutQuint=Q;exports.easings=x;exports.linear=n;
|