aptechka 0.65.5 → 0.65.7
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-D29tc5VS.js → Animation-BDEX44-i.js} +1 -1
- package/lib/{Animation-BRqj4VfN.cjs → Animation-hZcAchp_.cjs} +1 -1
- package/lib/{Damped-YrqW5V4w.js → Damped-CtQmJ52v.js} +2 -2
- package/lib/{Damped-BD1OQ1fH.cjs → Damped-z9Uaw2MJ.cjs} +1 -1
- package/lib/DragControls-CfE2oPAi.cjs +1 -0
- package/lib/{DragControls-DGDUw6bM.js → DragControls-CkhCt-4W.js} +21 -21
- package/lib/{Tweened-_pF0zXXN.js → Tweened-BlZB0vl4.js} +2 -2
- package/lib/{Tweened-B-AHx93m.cjs → Tweened-mvHucL4Y.cjs} +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/billboard/index.cjs +1 -1
- package/lib/billboard/index.js +20 -18
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +1 -1
- package/lib/{layout-BSMtwCga.js → layout-DpZo-I0y.js} +2 -2
- package/lib/layout-box/index.js +1 -1
- package/lib/morph/index.js +1 -1
- package/lib/need_redo_tweaker/index.cjs +1 -1
- package/lib/need_redo_tweaker/index.js +1 -1
- package/lib/number-ChAm68cm.cjs +1 -0
- package/lib/number-CumqY64S.js +40 -0
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +1 -1
- package/lib/scroll/ScrollSegmentElement.d.ts +63 -2
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +935 -556
- package/lib/{scroll-DNGJVxa2.js → scroll-DPkCFTxg.js} +1 -1
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.d.ts +1 -0
- package/lib/ticker/index.js +85 -82
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +3 -3
- package/package.json +1 -9
- package/lib/DragControls-D8BXtKVu.cjs +0 -1
- package/lib/ScrollSegmentElement-B6gp1q_z.js +0 -459
- package/lib/ScrollSegmentElement-DtMMAirz.cjs +0 -1
- package/lib/number-CbdpfO3u.js +0 -39
- package/lib/number-DyefJ5a1.cjs +0 -1
- package/lib/scroll-segment/ScrollSegmentDefaultContainer.d.ts +0 -11
- package/lib/scroll-segment/ScrollSegmentElement.d.ts +0 -81
- package/lib/scroll-segment/index.cjs +0 -1
- package/lib/scroll-segment/index.d.ts +0 -2
- package/lib/scroll-segment/index.js +0 -5
package/lib/ticker/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var I=h=>{throw TypeError(h)};var B=(h,e,s)=>e.has(h)||I("Cannot "+s);var i=(h,e,s)=>(B(h,e,"read from private field"),s?s.call(h):e.get(h)),r=(h,e,s)=>e.has(h)?I("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,s),t=(h,e,s,n)=>(B(h,e,"write to private field"),n?n.call(h,s):e.set(h,s),s),E=(h,e,s)=>(B(h,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../index-DekP7OZe.cjs"),j=require("../dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");var g,u,v,k,b,m,w,l,d,y,A;class C{constructor(e,s){r(this,g);r(this,u);r(this,v);r(this,k,0);r(this,b,0);r(this,m,0);r(this,w,0);r(this,l,0);r(this,d,!1);r(this,y,null);r(this,A,e=>{const s=e[0];t(this,d,s.isIntersecting),i(this,d)&&t(this,w,i(this,k))});if(t(this,g,e),t(this,u,s==null?void 0:s.maxFPS),t(this,v,(s==null?void 0:s.order)||0),s!=null&&s.culling&&L.isBrowser){const n=j.getElement(s.culling);n&&(t(this,y,new IntersectionObserver(i(this,A))),i(this,y).observe(n))}else t(this,d,!0)}get callback(){return i(this,g)}get order(){return i(this,v)}sync(e){t(this,b,e-i(this,l))}tick(e){if(t(this,k,e),t(this,l,Math.max(0,e-i(this,b))),i(this,m)||t(this,m,e),i(this,u))if(i(this,l)>=1e3/i(this,u))t(this,b,e-i(this,l)%i(this,u));else return;else t(this,b,e);i(this,d)&&i(this,g).call(this,{timeBetweenFrames:i(this,l),timestamp:e,subscribeTimestamp:i(this,m),timeElapsedSinceSubscription:e-i(this,m),timeElapsedSinceIntersection:e-i(this,w)})}destroy(){var e;(e=i(this,y))==null||e.disconnect()}}g=new WeakMap,u=new WeakMap,v=new WeakMap,k=new WeakMap,b=new WeakMap,m=new WeakMap,w=new WeakMap,l=new WeakMap,d=new WeakMap,y=new WeakMap,A=new WeakMap;var T,f,a,F,c,o,P,x,S,q;class O{constructor(){r(this,o);r(this,T,0);r(this,f,0);r(this,a);r(this,F,!1);r(this,c,[]);r(this,S,e=>{if(i(this,F)){t(this,F,!1),t(this,T,e-i(this,f));for(const s of i(this,c))s.sync(i(this,f))}t(this,a,requestAnimationFrame(i(this,S))),t(this,f,e-i(this,T));for(const s of i(this,c))s.tick(i(this,f))});r(this,q,()=>{document.hidden&&t(this,F,!0)});L.isBrowser&&document.addEventListener("visibilitychange",i(this,q))}subscribe(e,s){if(!i(this,c).find(n=>n.callback===e)){const n=new C(e,s);n.sync(performance.now()),i(this,c).push(n),t(this,c,i(this,c).sort((M,V)=>M.order-V.order))}return E(this,o,P).call(this),()=>this.unsubscribe(e)}unsubscribe(e){const s=i(this,c).filter(n=>n.callback===e);s.length&&(s.forEach(n=>n.destroy()),t(this,c,i(this,c).filter(n=>n.callback!==e)),i(this,c).length||E(this,o,x).call(this))}destroy(){L.isBrowser&&(E(this,o,x).call(this),document.removeEventListener("visibilitychange",i(this,q)))}}T=new WeakMap,f=new WeakMap,a=new WeakMap,F=new WeakMap,c=new WeakMap,o=new WeakSet,P=function(){i(this,c).length&&!i(this,a)&&t(this,a,requestAnimationFrame(i(this,S)))},x=function(){i(this,a)&&(cancelAnimationFrame(i(this,a)),t(this,a,void 0))},S=new WeakMap,q=new WeakMap;const D=new O;exports.Ticker=O;exports.ticker=D;
|
package/lib/ticker/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface TickerCallbackEntry {
|
|
|
4
4
|
subscribeTimestamp: number;
|
|
5
5
|
timeBetweenFrames: number;
|
|
6
6
|
timeElapsedSinceSubscription: number;
|
|
7
|
+
timeElapsedSinceIntersection: number;
|
|
7
8
|
}
|
|
8
9
|
export type TickerCallback = (entry: TickerCallbackEntry) => void;
|
|
9
10
|
export interface TickerAddOptions {
|
package/lib/ticker/index.js
CHANGED
|
@@ -1,120 +1,123 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var B = (h) => {
|
|
2
|
+
throw TypeError(h);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { i as
|
|
7
|
-
import { g as
|
|
4
|
+
var x = (h, s, e) => s.has(h) || B("Cannot " + e);
|
|
5
|
+
var i = (h, s, e) => (x(h, s, "read from private field"), e ? e.call(h) : s.get(h)), r = (h, s, e) => s.has(h) ? B("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(h) : s.set(h, e), t = (h, s, e, n) => (x(h, s, "write to private field"), n ? n.call(h, e) : s.set(h, e), e), A = (h, s, e) => (x(h, s, "access private method"), e);
|
|
6
|
+
import { i as I } from "../index-Bv9zgfdb.js";
|
|
7
|
+
import { g as C } from "../dom-CVWzyXPH.js";
|
|
8
8
|
import "construct-style-sheets-polyfill";
|
|
9
|
-
var
|
|
10
|
-
class
|
|
11
|
-
constructor(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
var g, m, v, k, u, b, w, l, f, F, L;
|
|
10
|
+
class D {
|
|
11
|
+
constructor(s, e) {
|
|
12
|
+
r(this, g);
|
|
13
|
+
r(this, m);
|
|
14
|
+
r(this, v);
|
|
15
|
+
r(this, k, 0);
|
|
16
|
+
r(this, u, 0);
|
|
17
|
+
r(this, b, 0);
|
|
18
|
+
r(this, w, 0);
|
|
19
|
+
r(this, l, 0);
|
|
20
|
+
r(this, f, !1);
|
|
21
|
+
r(this, F, null);
|
|
22
|
+
r(this, L, (s) => {
|
|
23
|
+
const e = s[0];
|
|
24
|
+
t(this, f, e.isIntersecting), i(this, f) && t(this, w, i(this, k));
|
|
23
25
|
});
|
|
24
|
-
if (t(this,
|
|
25
|
-
const n =
|
|
26
|
+
if (t(this, g, s), t(this, m, e == null ? void 0 : e.maxFPS), t(this, v, (e == null ? void 0 : e.order) || 0), e != null && e.culling && I) {
|
|
27
|
+
const n = C(e.culling);
|
|
26
28
|
n && (t(this, F, new IntersectionObserver(
|
|
27
|
-
|
|
28
|
-
)),
|
|
29
|
+
i(this, L)
|
|
30
|
+
)), i(this, F).observe(n));
|
|
29
31
|
} else
|
|
30
|
-
t(this,
|
|
32
|
+
t(this, f, !0);
|
|
31
33
|
}
|
|
32
34
|
get callback() {
|
|
33
|
-
return
|
|
35
|
+
return i(this, g);
|
|
34
36
|
}
|
|
35
37
|
get order() {
|
|
36
|
-
return
|
|
38
|
+
return i(this, v);
|
|
37
39
|
}
|
|
38
|
-
sync(
|
|
39
|
-
t(this, u,
|
|
40
|
+
sync(s) {
|
|
41
|
+
t(this, u, s - i(this, l));
|
|
40
42
|
}
|
|
41
|
-
tick(
|
|
42
|
-
if (t(this, l, Math.max(0,
|
|
43
|
-
if (
|
|
44
|
-
t(this, u,
|
|
43
|
+
tick(s) {
|
|
44
|
+
if (t(this, k, s), t(this, l, Math.max(0, s - i(this, u))), i(this, b) || t(this, b, s), i(this, m))
|
|
45
|
+
if (i(this, l) >= 1e3 / i(this, m))
|
|
46
|
+
t(this, u, s - i(this, l) % i(this, m));
|
|
45
47
|
else
|
|
46
48
|
return;
|
|
47
49
|
else
|
|
48
|
-
t(this, u,
|
|
49
|
-
|
|
50
|
-
timeBetweenFrames:
|
|
51
|
-
timestamp:
|
|
52
|
-
subscribeTimestamp:
|
|
53
|
-
timeElapsedSinceSubscription:
|
|
50
|
+
t(this, u, s);
|
|
51
|
+
i(this, f) && i(this, g).call(this, {
|
|
52
|
+
timeBetweenFrames: i(this, l),
|
|
53
|
+
timestamp: s,
|
|
54
|
+
subscribeTimestamp: i(this, b),
|
|
55
|
+
timeElapsedSinceSubscription: s - i(this, b),
|
|
56
|
+
timeElapsedSinceIntersection: s - i(this, w)
|
|
54
57
|
});
|
|
55
58
|
}
|
|
56
59
|
destroy() {
|
|
57
|
-
var
|
|
58
|
-
(
|
|
60
|
+
var s;
|
|
61
|
+
(s = i(this, F)) == null || s.disconnect();
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
class
|
|
64
|
+
g = new WeakMap(), m = new WeakMap(), v = new WeakMap(), k = new WeakMap(), u = new WeakMap(), b = new WeakMap(), w = new WeakMap(), l = new WeakMap(), f = new WeakMap(), F = new WeakMap(), L = new WeakMap();
|
|
65
|
+
var T, d, a, y, c, o, O, q, E, S;
|
|
66
|
+
class H {
|
|
64
67
|
constructor() {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (
|
|
73
|
-
t(this, y, !1), t(this,
|
|
74
|
-
for (const
|
|
75
|
-
|
|
68
|
+
r(this, o);
|
|
69
|
+
r(this, T, 0);
|
|
70
|
+
r(this, d, 0);
|
|
71
|
+
r(this, a);
|
|
72
|
+
r(this, y, !1);
|
|
73
|
+
r(this, c, []);
|
|
74
|
+
r(this, E, (s) => {
|
|
75
|
+
if (i(this, y)) {
|
|
76
|
+
t(this, y, !1), t(this, T, s - i(this, d));
|
|
77
|
+
for (const e of i(this, c))
|
|
78
|
+
e.sync(i(this, d));
|
|
76
79
|
}
|
|
77
|
-
t(this, a, requestAnimationFrame(
|
|
78
|
-
for (const
|
|
79
|
-
|
|
80
|
+
t(this, a, requestAnimationFrame(i(this, E))), t(this, d, s - i(this, T));
|
|
81
|
+
for (const e of i(this, c))
|
|
82
|
+
e.tick(i(this, d));
|
|
80
83
|
});
|
|
81
|
-
|
|
84
|
+
r(this, S, () => {
|
|
82
85
|
document.hidden && t(this, y, !0);
|
|
83
86
|
});
|
|
84
|
-
|
|
87
|
+
I && document.addEventListener(
|
|
85
88
|
"visibilitychange",
|
|
86
|
-
|
|
89
|
+
i(this, S)
|
|
87
90
|
);
|
|
88
91
|
}
|
|
89
|
-
subscribe(
|
|
90
|
-
if (!
|
|
91
|
-
const n = new
|
|
92
|
-
n.sync(performance.now()),
|
|
92
|
+
subscribe(s, e) {
|
|
93
|
+
if (!i(this, c).find((n) => n.callback === s)) {
|
|
94
|
+
const n = new D(s, e);
|
|
95
|
+
n.sync(performance.now()), i(this, c).push(n), t(this, c, i(this, c).sort((P, V) => P.order - V.order));
|
|
93
96
|
}
|
|
94
|
-
return A(this,
|
|
97
|
+
return A(this, o, O).call(this), () => this.unsubscribe(s);
|
|
95
98
|
}
|
|
96
|
-
unsubscribe(
|
|
97
|
-
const
|
|
98
|
-
(n) => n.callback ===
|
|
99
|
+
unsubscribe(s) {
|
|
100
|
+
const e = i(this, c).filter(
|
|
101
|
+
(n) => n.callback === s
|
|
99
102
|
);
|
|
100
|
-
|
|
101
|
-
(n) => n.callback !==
|
|
102
|
-
)),
|
|
103
|
+
e.length && (e.forEach((n) => n.destroy()), t(this, c, i(this, c).filter(
|
|
104
|
+
(n) => n.callback !== s
|
|
105
|
+
)), i(this, c).length || A(this, o, q).call(this));
|
|
103
106
|
}
|
|
104
107
|
destroy() {
|
|
105
|
-
|
|
108
|
+
I && (A(this, o, q).call(this), document.removeEventListener(
|
|
106
109
|
"visibilitychange",
|
|
107
|
-
|
|
110
|
+
i(this, S)
|
|
108
111
|
));
|
|
109
112
|
}
|
|
110
113
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
const
|
|
114
|
+
T = new WeakMap(), d = new WeakMap(), a = new WeakMap(), y = new WeakMap(), c = new WeakMap(), o = new WeakSet(), O = function() {
|
|
115
|
+
i(this, c).length && !i(this, a) && t(this, a, requestAnimationFrame(i(this, E)));
|
|
116
|
+
}, q = function() {
|
|
117
|
+
i(this, a) && (cancelAnimationFrame(i(this, a)), t(this, a, void 0));
|
|
118
|
+
}, E = new WeakMap(), S = new WeakMap();
|
|
119
|
+
const J = new H();
|
|
117
120
|
export {
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
H as Ticker,
|
|
122
|
+
J as ticker
|
|
120
123
|
};
|
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../attributes-Bf2svn4j.cjs"),E=require("../index-DekP7OZe.cjs"),b=require("../canvas-CU5Xjahf.cjs"),C=require("../coordinates-D8Np3cPD.cjs"),D=require("../custom-elements-Dh4TWRDJ.cjs"),g=require("../dom-JBOkFLTh.cjs"),s=require("../easings-GegIwET5.cjs"),Q=require("../element-yhcBhsho.cjs"),A=require("../events-KVanG9sR.cjs"),O=require("../file-DSpfWdd9.cjs"),T=require("../function-MthRj-GJ.cjs"),B=require("../gestures-C7gbKx11.cjs"),S=require("../stylesheet-HWF2a3nr.cjs"),h=require("../layout-Ctc2p3uz.cjs"),a=require("../math-GDWEqu7y.cjs"),m=require("../number-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../attributes-Bf2svn4j.cjs"),E=require("../index-DekP7OZe.cjs"),b=require("../canvas-CU5Xjahf.cjs"),C=require("../coordinates-D8Np3cPD.cjs"),D=require("../custom-elements-Dh4TWRDJ.cjs"),g=require("../dom-JBOkFLTh.cjs"),s=require("../easings-GegIwET5.cjs"),Q=require("../element-yhcBhsho.cjs"),A=require("../events-KVanG9sR.cjs"),O=require("../file-DSpfWdd9.cjs"),T=require("../function-MthRj-GJ.cjs"),B=require("../gestures-C7gbKx11.cjs"),S=require("../stylesheet-HWF2a3nr.cjs"),h=require("../layout-Ctc2p3uz.cjs"),a=require("../math-GDWEqu7y.cjs"),m=require("../number-ChAm68cm.cjs"),c=require("../object-CCiXnER2.cjs"),v=require("../polyfills-Df4r-ETT.cjs"),P=require("../scroll-CIdNtj3G.cjs"),l=require("../string-DUXXtU8v.cjs"),q=require("../style-At6aDoqG.cjs"),f=require("../url-lnBE_6yf.cjs");function R(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function N(t,e){const n=t.length;e=e%n;const o=new Array(n);for(let r=0;r<n;r++){const i=(r+e)%n;o[i]=t[r]}return o}function z(t,e=2){if(!+t)return"0 Bytes";const n=1024,o=e<0?0:e,r=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,i)).toFixed(o))} ${r[i]}`}function j(t){if(navigator.clipboard)navigator.clipboard.writeText(t).then(()=>{console.log("Text copied to clipboard successfully!")}).catch(e=>{console.error("Failed to copy text to clipboard:",e)});else{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.top="0",e.style.left="0",document.body.appendChild(e),e.select();try{document.execCommand("copy")?console.log("Text copied to clipboard successfully!"):console.error("Failed to copy text to clipboard.")}catch(n){console.error("Failed to copy text to clipboard:",n)}document.body.removeChild(e)}}function M(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function V(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function k(t,e){let n=!1;const{x:o,y:r}=t;for(let i=0,u=e.length-1;i<e.length;u=i++){const p=e[i].x,d=e[i].y,y=e[u].x,I=e[u].y;d>r!=I>r&&o<(y-p)*(r-d)/(I-d)+p&&(n=!n)}return n}function w(t,e){const n=t.style.getPropertyValue(e);if(n){const o=n.toString();return o.startsWith("var")?w(t,o.slice(4,-1)):o}}function F(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(o=>{o instanceof CSSStyleRule&&o.selectorText===":root"&&t.forEach(r=>{const i=w(o,r);i&&(e[r]=i)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function $(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function H(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}const U=/^(\+?\d{1,3}[-.\s]?)?(\(?\d{3}\)?[-.\s]?)?\d{1,4}[-.\s]?\d{2,4}[-.\s]?\d{2,4}$/,K=/^[\w.-]+@[a-zA-Z\d.-]+\.[a-zA-Z]{2,}$/;function W(t){let e,n;return K.test(t)?(e=`mailto:${t.trim()}`,n="email"):U.test(t)&&(e=`tel:${t.replace(/[^0-9\\.\\+]+/g,"")}`,n="phone"),{href:e,type:n,contact:t}}function Z(t,e){if(t){const o=t.content.cloneNode(!0).firstElementChild;return o&&(e==null||e(o)),o}return null}function J(t,e,n,o){let r,i=!1,u=0;const p=()=>{clearInterval(r),o!=null&&o.restartCounter&&(u=0),i&&(r=setInterval(()=>{n(u++)},e))},d=E.intersector.subscribe(t,y=>{i=y.isIntersecting,p()});return()=>{d(),clearInterval(r)}}exports.parseAttribute=x.parseAttribute;exports.parseAttributeValue=x.parseAttributeValue;exports.isBrowser=E.isBrowser;exports.contain=b.contain;exports.cover=b.cover;exports.fixPosition=b.fixPosition;exports.measureText=b.measureText;exports.getPointerPosition=C.getPointerPosition;exports.normalize=C.normalize;exports.screenToCartesian=C.screenToCartesian;exports.whenDefined=D.whenDefined;exports.findParentElement=g.findParentElement;exports.findScrollParentElement=g.findScrollParentElement;exports.getAllParentElements=g.getAllParentElements;exports.getElement=g.getElement;exports.easeInCubic=s.easeInCubic;exports.easeInExpo=s.easeInExpo;exports.easeInOutCubic=s.easeInOutCubic;exports.easeInOutExpo=s.easeInOutExpo;exports.easeInOutQuad=s.easeInOutQuad;exports.easeInOutQuart=s.easeInOutQuart;exports.easeInOutQuint=s.easeInOutQuint;exports.easeInQuad=s.easeInQuad;exports.easeInQuart=s.easeInQuart;exports.easeInQuint=s.easeInQuint;exports.easeOutCubic=s.easeOutCubic;exports.easeOutExpo=s.easeOutExpo;exports.easeOutQuad=s.easeOutQuad;exports.easeOutQuart=s.easeOutQuart;exports.easeOutQuint=s.easeOutQuint;exports.linear=s.linear;exports.isElementVisible=Q.isElementVisible;exports.dispatchEvent=A.dispatchEvent;exports.createJSONAndSave=O.createJSONAndSave;exports.downloadURI=O.downloadURI;exports.debounce=T.debounce;exports.throttle=T.throttle;exports.setupDrag=B.setupDrag;exports.createStylesheet=S.createStylesheet;exports.styleToString=S.styleToString;exports.getCumulativeOffsetLeft=h.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=h.getCumulativeOffsetTop;exports.getCumulativePosition=h.getCumulativePosition;exports.getStickyOffset=h.getStickyOffset;exports.calculateDistance=a.calculateDistance;exports.calculateDistanceWithRadius=a.calculateDistanceWithRadius;exports.clamp=a.clamp;exports.damp=a.damp;exports.lerp=a.lerp;exports.mapRange=a.mapRange;exports.round=a.round;exports.smootherstep=a.smootherstep;exports.smoothstep=a.smoothstep;exports.step=a.step;exports.beautifyNumber=m.beautifyNumber;exports.loopNumber=m.loopNumber;exports.preciseNumber=m.preciseNumber;exports.roundNumberTo=m.roundNumberTo;exports.toStep=m.toStep;exports.cloneDeep=c.cloneDeep;exports.compareObjects=c.compareObjects;exports.isESClass=c.isESClass;exports.isNullish=c.isNullish;exports.isObject=c.isObject;exports.mergeDeep=c.mergeDeep;exports.mixin=c.mixin;exports.omit=c.omit;exports.pick=c.pick;exports.nullishCoalescing=v.nullishCoalescing;exports.requestIdleCallback=v.requestIdleCallback;exports.scrollToElement=P.scrollToElement;exports.wait=P.wait;exports.camelToKebab=l.camelToKebab;exports.capitalize=l.capitalize;exports.declension=l.declension;exports.decodeHtmlEntities=l.decodeHtmlEntities;exports.generateId=l.generateId;exports.isUppercase=l.isUppercase;exports.kebabToCamel=l.kebabToCamel;exports.snakeToDotted=l.snakeToDotted;exports.toPascalCase=l.toPascalCase;exports.uncapitalize=l.uncapitalize;exports.getElementTransitionDurationMS=q.getElementTransitionDurationMS;exports.getElementTransitionDurationS=q.getElementTransitionDurationS;exports.changeHistory=f.changeHistory;exports.normalizeBase=f.normalizeBase;exports.parseSearchParameters=f.parseSearchParameters;exports.splitPath=f.splitPath;exports.updateSearchParameter=f.updateSearchParameter;exports.cloneTemplateContent=Z;exports.copyTextToClipboard=j;exports.decode=H;exports.dotCircleCollision=V;exports.dotPolygonCollision=k;exports.dotRectCollision=M;exports.encode=$;exports.formatBytes=z;exports.getRootVariables=F;exports.insert=R;exports.setIntervalOnIntersection=J;exports.shiftArray=N;exports.tryCreateHrefFromContact=W;
|
package/lib/utils/index.js
CHANGED
|
@@ -12,12 +12,12 @@ import { c as Ce, d as Ie } from "../file-GHShUlue.js";
|
|
|
12
12
|
import { d as ve, t as Ee } from "../function-C10DGppn.js";
|
|
13
13
|
import { s as Te } from "../gestures-CcXV6fCp.js";
|
|
14
14
|
import { c as Pe, s as Be } from "../stylesheet-DpnWNVyD.js";
|
|
15
|
-
import { g as Re, a as De,
|
|
15
|
+
import { g as Re, a as De, b as Qe, c as je } from "../layout-DpZo-I0y.js";
|
|
16
16
|
import { e as Me, f as Ne, c as $e, d as Fe, l as Ve, m as ke, r as Ue, b as qe, a as He, s as Ze } from "../math-BOBiC4TN.js";
|
|
17
|
-
import { b as We, l as Ge, p as Je, r as Le, t as Ye } from "../number-
|
|
17
|
+
import { b as We, l as Ge, p as Je, r as Le, t as Ye } from "../number-CumqY64S.js";
|
|
18
18
|
import { c as _e, d as et, i as tt, b as st, a as at, m as ot, e as rt, o as nt, p as it } from "../object-D6MVWB4l.js";
|
|
19
19
|
import { n as lt, r as ut } from "../polyfills-DJrTJQky.js";
|
|
20
|
-
import { s as dt, w as mt } from "../scroll-
|
|
20
|
+
import { s as dt, w as mt } from "../scroll-DPkCFTxg.js";
|
|
21
21
|
import { c as xt, a as ht, b as bt, d as gt, g as yt, i as Ct, k as It, s as wt, t as vt, u as Et } from "../string-BlMQbe8b.js";
|
|
22
22
|
import { g as Tt, a as Ot } from "../style-j2TwriJ_.js";
|
|
23
23
|
import { c as Bt, n as At, p as Rt, s as Dt, u as Qt } from "../url-Cc-RVfii.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aptechka",
|
|
3
|
-
"version": "0.65.
|
|
3
|
+
"version": "0.65.7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/denisavitski/aptechka.git"
|
|
@@ -188,11 +188,6 @@
|
|
|
188
188
|
"require": "./lib/scroll-entries/index.cjs",
|
|
189
189
|
"default": "./lib/scroll-entries/index.js"
|
|
190
190
|
},
|
|
191
|
-
"./scroll-segment": {
|
|
192
|
-
"types": "./lib/scroll-segment/index.d.ts",
|
|
193
|
-
"require": "./lib/scroll-segment/index.cjs",
|
|
194
|
-
"default": "./lib/scroll-segment/index.js"
|
|
195
|
-
},
|
|
196
191
|
"./sequence": {
|
|
197
192
|
"types": "./lib/sequence/index.d.ts",
|
|
198
193
|
"require": "./lib/sequence/index.cjs",
|
|
@@ -356,9 +351,6 @@
|
|
|
356
351
|
"scroll-entries": [
|
|
357
352
|
"lib/scroll-entries/index.d.ts"
|
|
358
353
|
],
|
|
359
|
-
"scroll-segment": [
|
|
360
|
-
"lib/scroll-segment/index.d.ts"
|
|
361
|
-
],
|
|
362
354
|
"sequence": [
|
|
363
355
|
"lib/sequence/index.d.ts"
|
|
364
356
|
],
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var p=r=>{throw TypeError(r)};var G=(r,a,e)=>a.has(r)||p("Cannot "+e);var t=(r,a,e)=>(G(r,a,"read from private field"),e?e.call(r):a.get(r)),s=(r,a,e)=>a.has(r)?p("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(r):a.set(r,e),i=(r,a,e,h)=>(G(r,a,"write to private field"),h?h.call(r,e):a.set(r,e),e),T=(r,a,e)=>(G(r,a,"access private method"),e);const w=require("./index-DekP7OZe.cjs"),_=require("./dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");const B=require("./ticker/index.cjs");require("./Store-Cd1GlEmZ.cjs");const ee=require("./easings-GegIwET5.cjs"),te=require("./Tweened-B-AHx93m.cjs"),ie=require("./gestures-C7gbKx11.cjs"),se=require("./number-DyefJ5a1.cjs"),he=require("./order/index.cjs"),re=require("./notifier/index.cjs");var j;class F{constructor(){s(this,j,new re.Notifier)}get changeEvent(){return t(this,j)}}j=new WeakMap;var y,c,u,R;class ne extends F{constructor(e){super();s(this,y,null);s(this,c,null);s(this,u,"offsetHeight");s(this,R,e=>{const h=e.shiftKey?-1:1;let n;e.code==="Space"?n=h*t(this,c)[t(this,u)]*.4:e.code==="ArrowLeft"?n=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowRight"?n=1*t(this,c)[t(this,u)]*.2:e.code==="ArrowUp"?n=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowDown"?n=1*t(this,c)[t(this,u)]*.2:e.code==="PageUp"?n=-1*t(this,c)[t(this,u)]:e.code==="PageDown"?n=1*t(this,c)[t(this,u)]:e.code==="Home"?n=0:e.code==="End"&&(n=t(this,u)==="offsetWidth"?t(this,c).scrollWidth:t(this,c).scrollHeight),n&&(e.stopPropagation(),this.changeEvent.notify("keyboard",n,e))});w.isBrowser&&(i(this,y,e!=null&&e.element&&_.getElement(e.element)||window),i(this,c,t(this,y)instanceof HTMLElement?t(this,y):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){w.isBrowser&&t(this,y).addEventListener("keydown",t(this,R))}disconnect(){w.isBrowser&&t(this,y).removeEventListener("keydown",t(this,R))}}y=new WeakMap,c=new WeakMap,u=new WeakMap,R=new WeakMap;var x,k,X,Y,d,A,m,g,V,J,D,O,I;class ae extends F{constructor(e){super();s(this,g);s(this,x);s(this,k);s(this,X);s(this,Y);s(this,d);s(this,A);s(this,m);s(this,D);s(this,O);s(this,I);this.direction=1,i(this,d,new te.Tweened(0,{easing:ee.easeInQuad})),i(this,m,!1),i(this,D,h=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",h.timeBetweenFrames*t(this,x)*this.direction*(1-t(this,d).current),h)}),i(this,O,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,x))*this.direction*(1-t(this,d).current),null)}),i(this,I,()=>{t(this,k)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,x,(e==null?void 0:e.speed)||1),i(this,k,(e==null?void 0:e.interval)||!1),i(this,X,e)}set interval(e){i(this,k,e),t(this,m)&&T(this,g,V).call(this)}set speed(e){i(this,x,e),t(this,m)&&T(this,g,V).call(this)}connect(){t(this,m)||(i(this,m,!0),T(this,g,V).call(this))}disconnect(){t(this,m)&&(i(this,m,!1),T(this,g,J).call(this))}pauseAndContinue(e,h){t(this,m)&&e&&(clearTimeout(t(this,A)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:h}),i(this,A,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:h})},e)))}}x=new WeakMap,k=new WeakMap,X=new WeakMap,Y=new WeakMap,d=new WeakMap,A=new WeakMap,m=new WeakMap,g=new WeakSet,V=function(){T(this,g,J).call(this),t(this,k)?i(this,Y,setInterval(t(this,O),Math.abs(t(this,x)))):B.ticker.subscribe(t(this,D),t(this,X)),document.addEventListener("visibilitychange",t(this,I))},J=function(){clearInterval(t(this,Y)),B.ticker.unsubscribe(t(this,D)),clearTimeout(t(this,A)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,I))},D=new WeakMap,O=new WeakMap,I=new WeakMap;var H,M,z,S;class le extends F{constructor(e){super();s(this,H,null);s(this,M);s(this,z);s(this,S,e=>{let h=0;const n=Math.abs(e.deltaY),b=Math.abs(e.deltaX);if(!(this.axis==="x"&&n>b||this.axis==="y"&&b>n)&&(e.preventDefault(),!(this.debounce&&this.axis==="x"&&b<5||this.axis==="y"&&n<5)))if(h=(this.axis==="max"?b>n?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),this.debounce){const N=Date.now();if(N-t(this,z)>40&&(h=100*Math.sign(h)),i(this,z,N),Math.abs(h)<100||t(this,M))return;this.changeEvent.notify("wheel",h,e),i(this,M,setTimeout(()=>{i(this,M,void 0)},80))}else this.changeEvent.notify("wheel",h,e)});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,z,Date.now()),w.isBrowser&&i(this,H,e!=null&&e.element&&_.getElement(e.element)||window)}connect(){w.isBrowser&&t(this,H).addEventListener("wheel",t(this,S),{passive:!1})}disconnect(){w.isBrowser&&(t(this,H).removeEventListener("wheel",t(this,S)),clearTimeout(t(this,M)))}}H=new WeakMap,M=new WeakMap,z=new WeakMap,S=new WeakMap;var q,P,o,l,C,E,W,K,L;const v=class v extends F{constructor(e){super();s(this,P);s(this,o);s(this,l);s(this,C);s(this,E);s(this,W);s(this,K);s(this,L);this.inertion=1,i(this,P,null),i(this,o,null),i(this,l,0),i(this,C,[]),i(this,E,0),i(this,W,h=>{Math.abs(t(this,E))>2&&h.preventDefault()}),i(this,K,h=>{if(i(this,E,0),i(this,l,0),h.button!==0||h.composedPath().find(f=>f instanceof HTMLElement&&f.hasAttribute("drag-dead-zone")))return;this.swipe||B.ticker.unsubscribe(t(this,L));let n=h,b=!1;document.documentElement.classList.add("grabbing");let N=0,$=0,U=0,Q=0;ie.setupDrag(f=>{t(v,q)&&t(v,q)!==t(this,o)||(N=n.x-f.x,$=n.y-f.y,U=f.x-h.x,Q=f.y-h.y,this.axis==="x"?(i(this,E,U),i(this,l,N)):(i(this,E,Q),i(this,l,$)),n=f,b=this.axis==="x"&&Math.abs(U)>Math.abs(Q)||this.axis==="y"&&Math.abs(Q)>Math.abs(U),b&&(document.documentElement.classList.add("dragging"),i(v,q,t(this,o)),this.changeEvent.notify("drag",t(this,l),f)))},f=>{i(v,q,null),b&&(!this.swipe&&this.inertion?(i(this,l,t(this,l)*this.inertion),B.ticker.subscribe(t(this,L),{order:he.TICK_ORDER.CONTROLS-1})):this.swipe&&this.changeEvent.notify("drag-end",t(this,l),f)),document.documentElement.classList.remove("grabbing"),document.documentElement.classList.remove("dragging")})}),i(this,L,()=>{Math.floor(Math.abs(t(this,l)))||B.ticker.unsubscribe(t(this,L)),i(this,l,t(this,l)*.95),i(this,l,se.preciseNumber(t(this,l),3)),this.changeEvent.notify("drag",t(this,l),null)}),this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,w.isBrowser&&(i(this,o,e!=null&&e.element&&_.getElement(e.element)||document.documentElement),i(this,P,(e==null?void 0:e.rootElement)||t(this,o)))}connect(){w.isBrowser&&(i(this,C,[...t(this,P).querySelectorAll("a")]),t(this,C).forEach(e=>{e.addEventListener("click",t(this,W))}),t(this,o).addEventListener("pointerdown",t(this,K)))}disconnect(){w.isBrowser&&(t(this,C).forEach(e=>{e.removeEventListener("click",t(this,W))}),t(this,o).removeEventListener("pointerdown",t(this,K)),B.ticker.unsubscribe(t(this,L)))}};q=new WeakMap,P=new WeakMap,o=new WeakMap,l=new WeakMap,C=new WeakMap,E=new WeakMap,W=new WeakMap,K=new WeakMap,L=new WeakMap,s(v,q,null);let Z=v;exports.AutoplayControls=ae;exports.Controls=F;exports.DragControls=Z;exports.KeyboardControls=ne;exports.WheelControls=le;
|