aptechka 0.83.1 → 0.84.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-BAiM6_n1.js +111 -0
- package/lib/Animation-DMWabSR0.cjs +1 -0
- package/lib/Composed-B0fvCtZz.cjs +1 -0
- package/lib/Composed-CgA9lLWA.js +75 -0
- package/lib/Damped-BLo-OAVb.cjs +1 -0
- package/lib/Damped-Dcz5UdMH.js +57 -0
- package/lib/DerivedArray-DFhxap_z.js +63 -0
- package/lib/DerivedArray-DYtWMW0n.cjs +1 -0
- package/lib/DragControls-BPHsDeH6.cjs +1 -0
- package/lib/DragControls-D2a1Cifp.js +234 -0
- package/lib/LocalLinks-BWFJYhGX.cjs +1 -0
- package/lib/LocalLinks-Dwgf3No6.js +65 -0
- package/lib/PageAnnouncerElement-DPMlVJZG.cjs +1 -0
- package/lib/PageAnnouncerElement-DV9pm_od.js +28 -0
- package/lib/PageScroll-BAatKJx6.cjs +1 -0
- package/lib/PageScroll-m3TsHnzR.js +65 -0
- package/lib/SourceElement-941MrYpq.js +265 -0
- package/lib/SourceElement-DBLZ7b5k.cjs +5 -0
- package/lib/Store-BCW70G3Z.cjs +1 -0
- package/lib/Store-uLDYY9ed.js +158 -0
- package/lib/Tweened-BvtjLCa3.js +48 -0
- package/lib/Tweened-DdXm1dbF.cjs +1 -0
- package/lib/Viewport-BiDoiU8M.js +113 -0
- package/lib/Viewport-CXGKUyDy.cjs +1 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +97 -93
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +6 -6
- package/lib/api-fetcher/index.cjs +1 -1
- package/lib/api-fetcher/index.js +67 -66
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +37 -34
- package/lib/attributes-BADnRZpK.cjs +1 -0
- package/lib/attributes-FObgMNCf.js +36 -0
- package/lib/billboard/index.cjs +1 -1
- package/lib/billboard/index.js +240 -232
- package/lib/cache/index.cjs +1 -1
- package/lib/cache/index.js +26 -23
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +62 -59
- package/lib/canvas-BP1ceie3.cjs +1 -0
- package/lib/canvas-DsglKco1.js +40 -0
- package/lib/connector/index.cjs +1 -1
- package/lib/connector/index.js +44 -41
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +6 -6
- package/lib/coordinates--JG1U6kQ.js +29 -0
- package/lib/coordinates-DQ9XV9M1.cjs +1 -0
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.d.ts +1 -1
- package/lib/css-property/index.js +40 -37
- package/lib/css-unit-parser/index.cjs +2 -2
- package/lib/css-unit-parser/index.js +22 -19
- package/lib/css-value-parser/index.cjs +1 -1
- package/lib/css-value-parser/index.js +13 -11
- package/lib/custom-elements-BfZCJde6.cjs +1 -0
- package/lib/custom-elements-HEMuF7yH.js +27 -0
- package/lib/dev/index.cjs +2 -1
- package/lib/dev/index.d.ts +1 -0
- package/lib/dev/index.js +25 -10
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +5 -5
- package/lib/dom-B40i6NXw.cjs +1 -0
- package/lib/dom-D8D-_9ty.js +108 -0
- package/lib/easings-BSGJFMAo.js +40 -0
- package/lib/easings-BWq0pPLq.cjs +1 -0
- package/lib/element-CqD0jqBJ.cjs +1 -0
- package/lib/element-DKw5H-Tu.js +10 -0
- package/lib/element-linked-store/index.cjs +1 -1
- package/lib/element-linked-store/index.js +53 -52
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +47 -44
- package/lib/en3/index.cjs +4 -4
- package/lib/en3/index.js +192 -185
- package/lib/events-Ds-TuvYW.js +9 -0
- package/lib/events-UlGk63iC.cjs +1 -0
- package/lib/file-DwQs6bB6.js +28 -0
- package/lib/file-RHfA3OS-.cjs +1 -0
- package/lib/function-H4b_gTg6.cjs +1 -0
- package/lib/function-UmbPrOHm.js +19 -0
- package/lib/gestures-DmKKNnh4.js +14 -0
- package/lib/gestures-DtYbQr49.cjs +1 -0
- package/lib/history/index.cjs +1 -1
- package/lib/history/index.js +24 -21
- package/lib/iframe/index.cjs +1 -1
- package/lib/iframe/index.js +27 -24
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +17 -13
- package/lib/index-BpO2RJ__.cjs +1 -0
- package/lib/index-DpKsHe97.js +68 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +3 -3
- package/lib/jsx/ComponentElement.d.ts +4 -0
- package/lib/jsx/h.d.ts +7 -16
- package/lib/jsx/hooks/component/useStylesheet.d.ts +1 -1
- package/lib/jsx/hooks/cssProperty.d.ts +6 -0
- package/lib/jsx/hooks/resize.d.ts +4 -0
- package/lib/jsx/hooks/store.d.ts +1 -2
- package/lib/jsx/hooks/ticker.d.ts +5 -0
- package/lib/jsx/index.cjs +1 -1
- package/lib/jsx/index.d.ts +4 -4
- package/lib/jsx/index.js +171 -349
- package/lib/jsx/plugins/vite/index.cjs +49 -0
- package/lib/jsx/plugins/vite/index.d.ts +38 -0
- package/lib/jsx/plugins/vite/index.js +104 -0
- package/lib/jsx/render.d.ts +2 -0
- package/lib/jsx/type.d.ts +228 -190
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +86 -84
- package/lib/layout-C26zkY7D.js +35 -0
- package/lib/layout-CnGLl7oe.cjs +1 -0
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +221 -217
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +48 -45
- package/lib/local-links/index.cjs +1 -1
- package/lib/local-links/index.js +2 -2
- package/lib/masonry-layout/index.cjs +1 -1
- package/lib/masonry-layout/index.js +48 -45
- package/lib/math-C-knY2TL.cjs +1 -0
- package/lib/math-r8V23YFe.js +57 -0
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +28 -25
- package/lib/metadata-BNdkmeeD.js +15 -0
- package/lib/metadata-BrHUfpV9.cjs +1 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +561 -556
- package/lib/morph-BtgB1YQP.js +256 -0
- package/lib/morph-Buhxq-X0.cjs +1 -0
- package/lib/need_redo_tweaker/index.cjs +4 -4
- package/lib/need_redo_tweaker/index.js +862 -834
- package/lib/notifier/index.cjs +1 -1
- package/lib/notifier/index.js +29 -26
- package/lib/number-Bu4sGvW7.cjs +1 -0
- package/lib/number-DiVt2xnh.js +47 -0
- package/lib/object-CiIdEmJx.js +98 -0
- package/lib/object-DTY_W6xG.cjs +1 -0
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.js +3 -3
- package/lib/page-announcer/index.cjs +1 -1
- package/lib/page-announcer/index.js +2 -2
- package/lib/page-scroll/index.cjs +1 -1
- package/lib/page-scroll/index.js +2 -2
- package/lib/pixel-perfect/index.cjs +4 -4
- package/lib/pixel-perfect/index.js +43 -40
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +125 -122
- package/lib/polyfills-CG1XJNia.js +28 -0
- package/lib/polyfills-DZCuDBkA.cjs +1 -0
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +249 -245
- package/lib/radio/index.cjs +1 -1
- package/lib/radio/index.js +58 -55
- package/lib/render-DLcWVnuH.js +355 -0
- package/lib/render-DdomypCo.cjs +1 -0
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +196 -194
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +890 -877
- package/lib/scroll-BvIWh1xB.js +41 -0
- package/lib/scroll-CT0lpyRZ.cjs +1 -0
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.js +37 -34
- package/lib/scroll-kit/index.cjs +1 -1
- package/lib/scroll-kit/index.js +214 -209
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +102 -98
- package/lib/size-element/index.cjs +1 -1
- package/lib/size-element/index.js +29 -26
- package/lib/slicer/index.cjs +1 -1
- package/lib/slicer/index.js +118 -113
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +5 -5
- package/lib/spa/index.cjs +1 -1
- package/lib/spa/index.js +94 -94
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -2
- package/lib/store/index.js +10 -8
- package/lib/string-B3lm2b7v.js +84 -0
- package/lib/string-CbRNzmd9.cjs +1 -0
- package/lib/style-DBoQWK0d.js +14 -0
- package/lib/style-IDJ6db6n.cjs +1 -0
- package/lib/stylesheet-CHvuef16.js +28 -0
- package/lib/stylesheet-CQdBaIAA.cjs +1 -0
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +96 -92
- package/lib/url-CPCO10Sy.cjs +1 -0
- package/lib/url-CWCY_qe_.js +124 -0
- package/lib/utils/attributes.d.ts +2 -0
- package/lib/utils/dom.d.ts +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +245 -226
- package/lib/utils/polyfills.d.ts +1 -1
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +36 -33
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +27 -24
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +56 -54
- package/package.json +11 -24
- package/lib/Animation-BzTjZIE-.js +0 -108
- package/lib/Animation-C39Ah-LM.cjs +0 -1
- package/lib/Composed-C-TV9te3.cjs +0 -1
- package/lib/Composed-DyAWjEXE.js +0 -121
- package/lib/Damped-CRusiRIV.js +0 -56
- package/lib/Damped-Prr0iKu1.cjs +0 -1
- package/lib/DragControls-8rNZwQrs.cjs +0 -1
- package/lib/DragControls-DBNdMBA4.js +0 -228
- package/lib/LocalLinks-BxhSFv_Q.cjs +0 -1
- package/lib/LocalLinks-DFZFpbjs.js +0 -62
- package/lib/PageAnnouncerElement-0LxZjtVH.js +0 -24
- package/lib/PageAnnouncerElement-AQ0Ja6HM.cjs +0 -1
- package/lib/PageScroll-0LxFblry.js +0 -62
- package/lib/PageScroll-BXJUQwG7.cjs +0 -1
- package/lib/SourceElement-BHqPFbna.cjs +0 -5
- package/lib/SourceElement-DjbHjynf.js +0 -260
- package/lib/Store-Blf4msDz.cjs +0 -1
- package/lib/Store-ZThXYBQd.js +0 -152
- package/lib/Tweened-Bw1Cn1PJ.js +0 -47
- package/lib/Tweened-DWtk9E-O.cjs +0 -1
- package/lib/Viewport-BxCr0GlB.cjs +0 -1
- package/lib/Viewport-Dt-d9DPi.js +0 -109
- package/lib/attributes-69we3byR.js +0 -10
- package/lib/attributes-Bf2svn4j.cjs +0 -1
- package/lib/canvas-CU5Xjahf.cjs +0 -1
- package/lib/canvas-DeZ0SLUJ.js +0 -34
- package/lib/coordinates-CgdGoSYs.js +0 -24
- package/lib/coordinates-D8Np3cPD.cjs +0 -1
- package/lib/custom-elements-DBnCK7Zx.js +0 -24
- package/lib/custom-elements-Dh4TWRDJ.cjs +0 -1
- package/lib/dom-BETkVSSZ.js +0 -82
- package/lib/dom-CBLlqORw.cjs +0 -1
- package/lib/easings-BEmRlrDd.js +0 -38
- package/lib/easings-GegIwET5.cjs +0 -1
- package/lib/element-CGVl1jA-.js +0 -7
- package/lib/element-yhcBhsho.cjs +0 -1
- package/lib/events-CsVF98U6.js +0 -6
- package/lib/events-KVanG9sR.cjs +0 -1
- package/lib/file-DSpfWdd9.cjs +0 -1
- package/lib/file-GHShUlue.js +0 -24
- package/lib/function-C10DGppn.js +0 -17
- package/lib/function-MthRj-GJ.cjs +0 -1
- package/lib/gestures-C7gbKx11.cjs +0 -1
- package/lib/gestures-CcXV6fCp.js +0 -11
- package/lib/index-OE2INULi.cjs +0 -1
- package/lib/index-e9eDuagL.js +0 -65
- package/lib/jsx/hydrate.d.ts +0 -1
- package/lib/jsx/integrations/astro/client.cjs +0 -1
- package/lib/jsx/integrations/astro/client.d.ts +0 -2
- package/lib/jsx/integrations/astro/client.js +0 -50
- package/lib/jsx/integrations/astro/index.cjs +0 -1
- package/lib/jsx/integrations/astro/index.d.ts +0 -2
- package/lib/jsx/integrations/astro/index.js +0 -54
- package/lib/jsx/integrations/astro/server.cjs +0 -1
- package/lib/jsx/integrations/astro/server.d.ts +0 -3
- package/lib/jsx/integrations/astro/server.js +0 -35
- package/lib/jsx/plugins/vite.d.ts +0 -21
- package/lib/layout-BSMtwCga.js +0 -29
- package/lib/layout-Ctc2p3uz.cjs +0 -1
- package/lib/math-BOBiC4TN.js +0 -45
- package/lib/math-GDWEqu7y.cjs +0 -1
- package/lib/metadata-BcYZ5w3T.cjs +0 -1
- package/lib/metadata-jfowcCyz.js +0 -12
- package/lib/morph-B6sGhLCi.cjs +0 -1
- package/lib/morph-BQErz7qP.js +0 -242
- package/lib/number-ChAm68cm.cjs +0 -1
- package/lib/number-CumqY64S.js +0 -40
- package/lib/object-CcMK4y_r.js +0 -87
- package/lib/object-baN9pgbU.cjs +0 -1
- package/lib/polyfills-DJrTJQky.js +0 -24
- package/lib/polyfills-Df4r-ETT.cjs +0 -1
- package/lib/render-DQs7rIoN.cjs +0 -1
- package/lib/render-D_0FCWEu.js +0 -18
- package/lib/scroll-BA2WnUrb.cjs +0 -1
- package/lib/scroll-DY5senkF.js +0 -37
- package/lib/string-BlMQbe8b.js +0 -70
- package/lib/string-DUXXtU8v.cjs +0 -1
- package/lib/style-At6aDoqG.cjs +0 -1
- package/lib/style-j2TwriJ_.js +0 -10
- package/lib/stylesheet-5_o7PFzM.cjs +0 -1
- package/lib/stylesheet-DdBzowZY.js +0 -24
- package/lib/url-CHgcNwJ1.cjs +0 -1
- package/lib/url-CYgo5vrG.js +0 -113
- package/lib/vite-C-i3hVDL.js +0 -75
- package/lib/vite-DzanPumM.cjs +0 -44
package/lib/layout-box/index.js
CHANGED
|
@@ -1,319 +1,323 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __typeError = (msg) => {
|
|
3
|
+
throw TypeError(msg);
|
|
3
4
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { g as
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
|
|
6
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
7
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value), __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value), __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
8
|
+
import { cssUnitParser } from "../css-unit-parser/index.js";
|
|
9
|
+
import { Ladder } from "../ladder/index.js";
|
|
10
|
+
import { RESIZE_ORDER, TICK_ORDER } from "../order/index.js";
|
|
11
|
+
import { scrollEntries } from "../scroll-entries/index.js";
|
|
12
|
+
import { ticker } from "../ticker/index.js";
|
|
13
|
+
import { i as isBrowser } from "../index-DpKsHe97.js";
|
|
14
|
+
import { g as getElement } from "../dom-D8D-_9ty.js";
|
|
15
|
+
import { g as getCumulativeOffsetLeft, a as getCumulativeOffsetTop } from "../layout-C26zkY7D.js";
|
|
14
16
|
import "construct-style-sheets-polyfill";
|
|
15
|
-
import { elementResizer
|
|
16
|
-
import { windowResizer
|
|
17
|
-
import { Notifier
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
),
|
|
22
|
-
|
|
23
|
-
),
|
|
24
|
-
|
|
25
|
-
),
|
|
26
|
-
-
|
|
27
|
-
Math.sqrt(
|
|
28
|
-
),
|
|
17
|
+
import { elementResizer } from "../element-resizer/index.js";
|
|
18
|
+
import { windowResizer } from "../window-resizer/index.js";
|
|
19
|
+
import { Notifier } from "../notifier/index.js";
|
|
20
|
+
function decomposeCSSMatrix(matrix) {
|
|
21
|
+
const scaleX = Math.sqrt(
|
|
22
|
+
matrix.m11 * matrix.m11 + matrix.m12 * matrix.m12 + matrix.m13 * matrix.m13
|
|
23
|
+
), scaleY = Math.sqrt(
|
|
24
|
+
matrix.m21 * matrix.m21 + matrix.m22 * matrix.m22 + matrix.m23 * matrix.m23
|
|
25
|
+
), scaleZ = Math.sqrt(
|
|
26
|
+
matrix.m31 * matrix.m31 + matrix.m32 * matrix.m32 + matrix.m33 * matrix.m33
|
|
27
|
+
), rotationX = Math.atan2(matrix.m32, matrix.m33), rotationY = Math.atan2(
|
|
28
|
+
-matrix.m31,
|
|
29
|
+
Math.sqrt(matrix.m32 * matrix.m32 + matrix.m33 * matrix.m33)
|
|
30
|
+
), rotationZ = Math.atan2(matrix.m21, matrix.m11), translationX = matrix.m41, translationY = matrix.m42 * -1, translationZ = matrix.m43;
|
|
29
31
|
return {
|
|
30
|
-
scaleX
|
|
31
|
-
scaleY
|
|
32
|
-
scaleZ
|
|
33
|
-
rotationX
|
|
34
|
-
rotationY
|
|
35
|
-
rotationZ
|
|
36
|
-
translationX
|
|
37
|
-
translationY
|
|
38
|
-
translationZ
|
|
32
|
+
scaleX,
|
|
33
|
+
scaleY,
|
|
34
|
+
scaleZ,
|
|
35
|
+
rotationX,
|
|
36
|
+
rotationY,
|
|
37
|
+
rotationZ,
|
|
38
|
+
translationX,
|
|
39
|
+
translationY,
|
|
40
|
+
translationZ
|
|
39
41
|
};
|
|
40
42
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
43
|
+
__name(decomposeCSSMatrix, "decomposeCSSMatrix");
|
|
44
|
+
var _element, _containerElement, _scrollStepSetterCallbacks, _scrollAxis, _frontSide, _isCartesian, _isSizeStep, _isPositionStep, _isTransformStep, _isScrollStep, _width, _height, _depth, _top, _left, _front, _x, _y, _z, _CSSTranslation, _CSSRotation, _CSSScale, _rotation, _position, _scale, _scrollValue, _scrollEntries, _resizeNotifier, _LayoutBox_instances, recalculate_fn, composeSteps_fn, updateDimensions_fn, updateScrollPosition_fn, _resizeListener, _tickListener, _scrollEntriesListener;
|
|
45
|
+
const _LayoutBox = class _LayoutBox {
|
|
46
|
+
constructor(element, options) {
|
|
47
|
+
__privateAdd(this, _LayoutBox_instances);
|
|
48
|
+
__privateAdd(this, _element, null);
|
|
49
|
+
__privateAdd(this, _containerElement, null);
|
|
50
|
+
__privateAdd(this, _scrollStepSetterCallbacks, []);
|
|
51
|
+
__privateAdd(this, _scrollAxis, "auto");
|
|
52
|
+
__privateAdd(this, _frontSide, "top");
|
|
53
|
+
__privateAdd(this, _isCartesian, !1);
|
|
54
|
+
__privateAdd(this, _isSizeStep, !0);
|
|
55
|
+
__privateAdd(this, _isPositionStep, !0);
|
|
56
|
+
__privateAdd(this, _isTransformStep, !0);
|
|
57
|
+
__privateAdd(this, _isScrollStep, !0);
|
|
58
|
+
__privateAdd(this, _width, 0);
|
|
59
|
+
__privateAdd(this, _height, 0);
|
|
60
|
+
__privateAdd(this, _depth, 0);
|
|
61
|
+
__privateAdd(this, _top, 0);
|
|
62
|
+
__privateAdd(this, _left, 0);
|
|
63
|
+
__privateAdd(this, _front, 0);
|
|
64
|
+
__privateAdd(this, _x, 0);
|
|
65
|
+
__privateAdd(this, _y, 0);
|
|
66
|
+
__privateAdd(this, _z, 0);
|
|
67
|
+
__privateAdd(this, _CSSTranslation, { x: 0, y: 0, z: 0 });
|
|
68
|
+
__privateAdd(this, _CSSRotation, { x: 0, y: 0, z: 0 });
|
|
69
|
+
__privateAdd(this, _CSSScale, { x: 1, y: 1, z: 1 });
|
|
70
|
+
__privateAdd(this, _rotation, new Ladder({ x: 0, y: 0, z: 0 }));
|
|
71
|
+
__privateAdd(this, _position, new Ladder({ x: 0, y: 0, z: 0 }));
|
|
72
|
+
__privateAdd(this, _scale, new Ladder({ x: 0, y: 0, z: 0 }));
|
|
73
|
+
__privateAdd(this, _scrollValue, { x: 0, y: 0, z: 0 });
|
|
74
|
+
__privateAdd(this, _scrollEntries, /* @__PURE__ */ new Map());
|
|
75
|
+
__privateAdd(this, _resizeNotifier, new Notifier());
|
|
76
|
+
__privateAdd(this, _resizeListener, /* @__PURE__ */ __name(() => {
|
|
77
|
+
isBrowser && __privateMethod(this, _LayoutBox_instances, updateDimensions_fn).call(this);
|
|
78
|
+
}, "#resizeListener"));
|
|
79
|
+
__privateAdd(this, _tickListener, /* @__PURE__ */ __name(() => {
|
|
80
|
+
__privateMethod(this, _LayoutBox_instances, updateScrollPosition_fn).call(this), __privateMethod(this, _LayoutBox_instances, recalculate_fn).call(this);
|
|
81
|
+
}, "#tickListener"));
|
|
82
|
+
__privateAdd(this, _scrollEntriesListener, /* @__PURE__ */ __name(() => {
|
|
83
|
+
const allEntries = scrollEntries.getAll(this.element);
|
|
84
|
+
__privateGet(this, _scrollEntries).forEach((value, key) => {
|
|
85
|
+
allEntries.includes(key) || (this.deleteScrollStep(value), __privateGet(this, _scrollEntries).delete(key));
|
|
86
|
+
}), allEntries.forEach((entry) => {
|
|
87
|
+
if (!__privateGet(this, _scrollEntries).has(entry)) {
|
|
88
|
+
const callback = /* @__PURE__ */ __name(() => entry, "callback");
|
|
89
|
+
__privateGet(this, _scrollEntries).set(entry, callback), this.setScrollStep(callback);
|
|
87
90
|
}
|
|
88
91
|
});
|
|
89
|
-
});
|
|
90
|
-
|
|
92
|
+
}, "#scrollEntriesListener"));
|
|
93
|
+
isBrowser && (__privateSet(this, _element, getElement(element) || document.body), __privateSet(this, _containerElement, getElement(options == null ? void 0 : options.containerElement) || document.body), __privateSet(this, _scrollAxis, (options == null ? void 0 : options.scrollAxis) || "auto"), __privateSet(this, _frontSide, (options == null ? void 0 : options.frontSide) || "top"), __privateSet(this, _isCartesian, (options == null ? void 0 : options.cartesian) || !1), __privateSet(this, _isSizeStep, (options == null ? void 0 : options.sizeStep) !== void 0 ? options.sizeStep : !0), __privateSet(this, _isPositionStep, (options == null ? void 0 : options.positionStep) !== void 0 ? options.positionStep : !0), __privateSet(this, _isTransformStep, (options == null ? void 0 : options.transformStep) !== void 0 ? options.transformStep : !0), __privateSet(this, _isScrollStep, (options == null ? void 0 : options.scrollStep) !== void 0 ? options.scrollStep : !0), __privateGet(this, _scale).setStep("_size", "+", {
|
|
91
94
|
x: 1,
|
|
92
95
|
y: 1,
|
|
93
96
|
z: 1
|
|
94
|
-
}),
|
|
97
|
+
}), __privateGet(this, _position).setStep("_position", "+", {
|
|
95
98
|
x: 0,
|
|
96
99
|
y: 0,
|
|
97
100
|
z: 0
|
|
98
|
-
}),
|
|
101
|
+
}), __privateGet(this, _scale).setStep("_scale", "*", {
|
|
99
102
|
x: 1,
|
|
100
103
|
y: 1,
|
|
101
104
|
z: 1
|
|
102
|
-
}),
|
|
105
|
+
}), __privateGet(this, _position).setStep("_translation", "+", {
|
|
103
106
|
x: 0,
|
|
104
107
|
y: 0,
|
|
105
108
|
z: 0
|
|
106
|
-
}),
|
|
109
|
+
}), __privateGet(this, _rotation).setStep("_rotation", "+", {
|
|
107
110
|
x: 0,
|
|
108
111
|
y: 0,
|
|
109
112
|
z: 0
|
|
110
|
-
}),
|
|
111
|
-
order:
|
|
112
|
-
culling:
|
|
113
|
+
}), __privateGet(this, _isScrollStep) && (scrollEntries.notifier.subscribe(__privateGet(this, _scrollEntriesListener)), __privateGet(this, _scrollEntriesListener).call(this)), elementResizer.subscribe(this.element, __privateGet(this, _resizeListener)), windowResizer.subscribe(__privateGet(this, _resizeListener), RESIZE_ORDER.LAYOUT_BOX), ticker.subscribe(__privateGet(this, _tickListener), {
|
|
114
|
+
order: TICK_ORDER.LAYOUT_BOX,
|
|
115
|
+
culling: options != null && options.culling ? this.element : void 0
|
|
113
116
|
}));
|
|
114
117
|
}
|
|
115
118
|
get element() {
|
|
116
|
-
return
|
|
119
|
+
return __privateGet(this, _element);
|
|
117
120
|
}
|
|
118
121
|
get containerElement() {
|
|
119
|
-
return
|
|
122
|
+
return __privateGet(this, _containerElement);
|
|
120
123
|
}
|
|
121
124
|
get position() {
|
|
122
|
-
return
|
|
125
|
+
return __privateGet(this, _position).current;
|
|
123
126
|
}
|
|
124
127
|
get rotation() {
|
|
125
|
-
return
|
|
128
|
+
return __privateGet(this, _rotation).current;
|
|
126
129
|
}
|
|
127
130
|
get scale() {
|
|
128
|
-
return
|
|
131
|
+
return __privateGet(this, _scale).current;
|
|
129
132
|
}
|
|
130
133
|
get scrollValue() {
|
|
131
|
-
return
|
|
134
|
+
return __privateGet(this, _scrollValue);
|
|
132
135
|
}
|
|
133
136
|
get left() {
|
|
134
|
-
return
|
|
137
|
+
return __privateGet(this, _left);
|
|
135
138
|
}
|
|
136
139
|
get top() {
|
|
137
|
-
return
|
|
140
|
+
return __privateGet(this, _top);
|
|
138
141
|
}
|
|
139
142
|
get CSSTranslation() {
|
|
140
|
-
return
|
|
143
|
+
return __privateGet(this, _CSSTranslation);
|
|
141
144
|
}
|
|
142
145
|
get CSSRotation() {
|
|
143
|
-
return
|
|
146
|
+
return __privateGet(this, _CSSRotation);
|
|
144
147
|
}
|
|
145
148
|
get CSSScale() {
|
|
146
|
-
return
|
|
149
|
+
return __privateGet(this, _CSSScale);
|
|
147
150
|
}
|
|
148
151
|
get front() {
|
|
149
|
-
return
|
|
152
|
+
return __privateGet(this, _front);
|
|
150
153
|
}
|
|
151
154
|
get width() {
|
|
152
|
-
return
|
|
155
|
+
return __privateGet(this, _width);
|
|
153
156
|
}
|
|
154
157
|
get height() {
|
|
155
|
-
return
|
|
158
|
+
return __privateGet(this, _height);
|
|
156
159
|
}
|
|
157
160
|
get depth() {
|
|
158
|
-
return
|
|
161
|
+
return __privateGet(this, _depth);
|
|
159
162
|
}
|
|
160
163
|
destroy() {
|
|
161
|
-
|
|
164
|
+
ticker.unsubscribe(__privateGet(this, _tickListener)), elementResizer.unsubscribe(__privateGet(this, _resizeListener)), windowResizer.unsubscribe(__privateGet(this, _resizeListener)), scrollEntries.notifier.unsubscribe(__privateGet(this, _scrollEntriesListener)), __privateGet(this, _scrollEntries).clear(), __privateGet(this, _position).close(), __privateGet(this, _rotation).close(), __privateGet(this, _scale).close();
|
|
162
165
|
}
|
|
163
|
-
bindObject(
|
|
164
|
-
|
|
166
|
+
bindObject(object) {
|
|
167
|
+
object.position && __privateGet(this, _position).bind(object.position), object.rotation && __privateGet(this, _rotation).bind(object.rotation), object.scale && __privateGet(this, _scale).bind(object.scale);
|
|
165
168
|
}
|
|
166
|
-
unbindObject(
|
|
167
|
-
|
|
169
|
+
unbindObject(object) {
|
|
170
|
+
object.position && __privateGet(this, _position).unbind(object.position), object.rotation && __privateGet(this, _rotation).unbind(object.rotation), object.scale && __privateGet(this, _scale).unbind(object.scale);
|
|
168
171
|
}
|
|
169
|
-
setScrollStep(
|
|
170
|
-
return
|
|
172
|
+
setScrollStep(callback) {
|
|
173
|
+
return __privateGet(this, _scrollStepSetterCallbacks).includes(callback) || __privateGet(this, _scrollStepSetterCallbacks).push(callback), () => this.deleteScrollStep(callback);
|
|
171
174
|
}
|
|
172
|
-
deleteScrollStep(
|
|
173
|
-
|
|
174
|
-
(s) => s !==
|
|
175
|
+
deleteScrollStep(callback) {
|
|
176
|
+
__privateSet(this, _scrollStepSetterCallbacks, __privateGet(this, _scrollStepSetterCallbacks).filter(
|
|
177
|
+
(s) => s !== callback
|
|
175
178
|
));
|
|
176
179
|
}
|
|
177
|
-
setPositionStep(...
|
|
178
|
-
|
|
180
|
+
setPositionStep(...args) {
|
|
181
|
+
__privateGet(this, _position).setStep(...args);
|
|
179
182
|
}
|
|
180
|
-
getPositionStep(...
|
|
181
|
-
return
|
|
183
|
+
getPositionStep(...args) {
|
|
184
|
+
return __privateGet(this, _position).getStepValue(...args);
|
|
182
185
|
}
|
|
183
|
-
setRotationStep(...
|
|
184
|
-
|
|
186
|
+
setRotationStep(...args) {
|
|
187
|
+
__privateGet(this, _rotation).setStep(...args);
|
|
185
188
|
}
|
|
186
|
-
getRotationStep(...
|
|
187
|
-
return
|
|
189
|
+
getRotationStep(...args) {
|
|
190
|
+
return __privateGet(this, _rotation).getStepValue(...args);
|
|
188
191
|
}
|
|
189
|
-
getExcludedRotationSteps(...
|
|
190
|
-
return
|
|
192
|
+
getExcludedRotationSteps(...args) {
|
|
193
|
+
return __privateGet(this, _rotation).getExcludedStepsValue(...args);
|
|
191
194
|
}
|
|
192
|
-
getIncludedRotationSteps(...
|
|
193
|
-
return
|
|
195
|
+
getIncludedRotationSteps(...args) {
|
|
196
|
+
return __privateGet(this, _rotation).getIncludedStepsValue(...args);
|
|
194
197
|
}
|
|
195
|
-
setScaleStep(...
|
|
196
|
-
|
|
198
|
+
setScaleStep(...args) {
|
|
199
|
+
__privateGet(this, _scale).setStep(...args);
|
|
197
200
|
}
|
|
198
|
-
getScaleStep(...
|
|
199
|
-
return
|
|
201
|
+
getScaleStep(...args) {
|
|
202
|
+
return __privateGet(this, _scale).getStepValue(...args);
|
|
200
203
|
}
|
|
201
|
-
getExcludedScaleSteps(...
|
|
202
|
-
return
|
|
204
|
+
getExcludedScaleSteps(...args) {
|
|
205
|
+
return __privateGet(this, _scale).getExcludedStepsValue(...args);
|
|
203
206
|
}
|
|
204
|
-
getIncludedScaleSteps(...
|
|
205
|
-
return
|
|
207
|
+
getIncludedScaleSteps(...args) {
|
|
208
|
+
return __privateGet(this, _scale).getIncludedStepsValue(...args);
|
|
206
209
|
}
|
|
207
|
-
deletePositionStep(...
|
|
208
|
-
|
|
210
|
+
deletePositionStep(...args) {
|
|
211
|
+
__privateGet(this, _position).deleteStep(...args);
|
|
209
212
|
}
|
|
210
|
-
getExcludedPositionSteps(...
|
|
211
|
-
return
|
|
213
|
+
getExcludedPositionSteps(...args) {
|
|
214
|
+
return __privateGet(this, _position).getExcludedStepsValue(...args);
|
|
212
215
|
}
|
|
213
|
-
getIncludedPositionSteps(...
|
|
214
|
-
return
|
|
216
|
+
getIncludedPositionSteps(...args) {
|
|
217
|
+
return __privateGet(this, _position).getIncludedStepsValue(...args);
|
|
215
218
|
}
|
|
216
|
-
deleteRotationStep(...
|
|
217
|
-
|
|
219
|
+
deleteRotationStep(...args) {
|
|
220
|
+
__privateGet(this, _rotation).deleteStep(...args);
|
|
218
221
|
}
|
|
219
|
-
deleteScaleStep(...
|
|
220
|
-
|
|
222
|
+
deleteScaleStep(...args) {
|
|
223
|
+
__privateGet(this, _scale).deleteStep(...args);
|
|
221
224
|
}
|
|
222
|
-
onPosition(...
|
|
223
|
-
return
|
|
225
|
+
onPosition(...args) {
|
|
226
|
+
return __privateGet(this, _position).subscribe(...args);
|
|
224
227
|
}
|
|
225
|
-
offPosition(...
|
|
226
|
-
|
|
228
|
+
offPosition(...args) {
|
|
229
|
+
__privateGet(this, _position).unsubscribe(...args);
|
|
227
230
|
}
|
|
228
|
-
onScale(...
|
|
229
|
-
return
|
|
231
|
+
onScale(...args) {
|
|
232
|
+
return __privateGet(this, _scale).subscribe(...args);
|
|
230
233
|
}
|
|
231
|
-
offScale(...
|
|
232
|
-
|
|
234
|
+
offScale(...args) {
|
|
235
|
+
__privateGet(this, _scale).unsubscribe(...args);
|
|
233
236
|
}
|
|
234
|
-
onRotation(...
|
|
235
|
-
return
|
|
237
|
+
onRotation(...args) {
|
|
238
|
+
return __privateGet(this, _rotation).subscribe(...args);
|
|
236
239
|
}
|
|
237
|
-
offRotation(...
|
|
238
|
-
|
|
240
|
+
offRotation(...args) {
|
|
241
|
+
__privateGet(this, _rotation).unsubscribe(...args);
|
|
239
242
|
}
|
|
240
|
-
onResize(...
|
|
241
|
-
return
|
|
243
|
+
onResize(...args) {
|
|
244
|
+
return __privateGet(this, _resizeNotifier).subscribe(...args);
|
|
242
245
|
}
|
|
243
|
-
offResize(...
|
|
244
|
-
return
|
|
246
|
+
offResize(...args) {
|
|
247
|
+
return __privateGet(this, _resizeNotifier).unsubscribe(...args);
|
|
245
248
|
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
},
|
|
250
|
-
|
|
251
|
-
x:
|
|
252
|
-
y:
|
|
253
|
-
z:
|
|
249
|
+
};
|
|
250
|
+
_element = new WeakMap(), _containerElement = new WeakMap(), _scrollStepSetterCallbacks = new WeakMap(), _scrollAxis = new WeakMap(), _frontSide = new WeakMap(), _isCartesian = new WeakMap(), _isSizeStep = new WeakMap(), _isPositionStep = new WeakMap(), _isTransformStep = new WeakMap(), _isScrollStep = new WeakMap(), _width = new WeakMap(), _height = new WeakMap(), _depth = new WeakMap(), _top = new WeakMap(), _left = new WeakMap(), _front = new WeakMap(), _x = new WeakMap(), _y = new WeakMap(), _z = new WeakMap(), _CSSTranslation = new WeakMap(), _CSSRotation = new WeakMap(), _CSSScale = new WeakMap(), _rotation = new WeakMap(), _position = new WeakMap(), _scale = new WeakMap(), _scrollValue = new WeakMap(), _scrollEntries = new WeakMap(), _resizeNotifier = new WeakMap(), _LayoutBox_instances = new WeakSet(), recalculate_fn = /* @__PURE__ */ __name(function() {
|
|
251
|
+
__privateGet(this, _scale).calculate(), __privateGet(this, _position).calculate(), __privateGet(this, _rotation).calculate();
|
|
252
|
+
}, "#recalculate"), composeSteps_fn = /* @__PURE__ */ __name(function() {
|
|
253
|
+
__privateGet(this, _scale).setStep("_size", "+", {
|
|
254
|
+
x: __privateGet(this, _isSizeStep) ? __privateGet(this, _width) : 1,
|
|
255
|
+
y: __privateGet(this, _isSizeStep) ? __privateGet(this, _height) : 1,
|
|
256
|
+
z: __privateGet(this, _isSizeStep) ? __privateGet(this, _depth) : 1
|
|
254
257
|
});
|
|
255
|
-
const
|
|
256
|
-
|
|
257
|
-
x:
|
|
258
|
-
y:
|
|
259
|
-
z:
|
|
260
|
-
}),
|
|
261
|
-
x:
|
|
262
|
-
y:
|
|
263
|
-
z:
|
|
264
|
-
}),
|
|
265
|
-
x:
|
|
266
|
-
y:
|
|
267
|
-
z:
|
|
268
|
-
}),
|
|
269
|
-
x:
|
|
270
|
-
y:
|
|
271
|
-
z:
|
|
272
|
-
})) : (
|
|
258
|
+
const xPosition = __privateGet(this, _isPositionStep) ? __privateGet(this, _x) : 0, yPosition = __privateGet(this, _isPositionStep) ? __privateGet(this, _y) : 0, zPosition = __privateGet(this, _isPositionStep) ? __privateGet(this, _z) : 0;
|
|
259
|
+
__privateGet(this, _position).setStep("_position", "+", {
|
|
260
|
+
x: xPosition,
|
|
261
|
+
y: yPosition,
|
|
262
|
+
z: zPosition
|
|
263
|
+
}), __privateGet(this, _isTransformStep) ? (__privateGet(this, _scale).setStep("_scale", "*", {
|
|
264
|
+
x: __privateGet(this, _CSSScale).x,
|
|
265
|
+
y: __privateGet(this, _CSSScale).y,
|
|
266
|
+
z: __privateGet(this, _CSSScale).z
|
|
267
|
+
}), __privateGet(this, _position).setStep("_translation", "+", {
|
|
268
|
+
x: __privateGet(this, _CSSTranslation).x,
|
|
269
|
+
y: __privateGet(this, _CSSTranslation).y,
|
|
270
|
+
z: __privateGet(this, _CSSTranslation).z
|
|
271
|
+
}), __privateGet(this, _rotation).setStep("_rotation", "+", {
|
|
272
|
+
x: __privateGet(this, _CSSRotation).x,
|
|
273
|
+
y: __privateGet(this, _CSSRotation).y,
|
|
274
|
+
z: __privateGet(this, _CSSRotation).z
|
|
275
|
+
})) : (__privateGet(this, _scale).setStep("_scale", "*", {
|
|
273
276
|
x: 1,
|
|
274
277
|
y: 1,
|
|
275
278
|
z: 1
|
|
276
|
-
}),
|
|
279
|
+
}), __privateGet(this, _position).setStep("_translation", "+", {
|
|
277
280
|
x: 0,
|
|
278
281
|
y: 0,
|
|
279
282
|
z: 0
|
|
280
|
-
}),
|
|
283
|
+
}), __privateGet(this, _rotation).setStep("_rotation", "+", {
|
|
281
284
|
x: 0,
|
|
282
285
|
y: 0,
|
|
283
286
|
z: 0
|
|
284
287
|
}));
|
|
285
|
-
},
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
|
|
288
|
+
}, "#composeSteps"), updateDimensions_fn = /* @__PURE__ */ __name(function() {
|
|
289
|
+
const computed = getComputedStyle(__privateGet(this, _element));
|
|
290
|
+
__privateSet(this, _width, Math.max(__privateGet(this, _element).clientWidth, 1)), __privateSet(this, _height, Math.max(__privateGet(this, _element).clientHeight, 1)), __privateSet(this, _depth, Math.max(
|
|
291
|
+
cssUnitParser.parse(computed.getPropertyValue("--depth") || "0px"),
|
|
289
292
|
1
|
|
290
293
|
));
|
|
291
|
-
const
|
|
292
|
-
if (
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
}
|
|
296
|
-
if (
|
|
297
|
-
const
|
|
298
|
-
|
|
294
|
+
const vl = getCumulativeOffsetLeft(__privateGet(this, _containerElement)), vt = getCumulativeOffsetTop(__privateGet(this, _containerElement)), vw = __privateGet(this, _containerElement).clientWidth, vh = __privateGet(this, _containerElement).clientHeight;
|
|
295
|
+
if (__privateSet(this, _left, getCumulativeOffsetLeft(__privateGet(this, _element)) - vl), __privateSet(this, _top, getCumulativeOffsetTop(__privateGet(this, _element)) - vt), __privateGet(this, _scrollAxis) === "z") {
|
|
296
|
+
const nl = __privateGet(this, _left) / vw, nt = __privateGet(this, _top) / vh;
|
|
297
|
+
__privateSet(this, _left, (nl - Math.floor(nl)) * vw), __privateSet(this, _top, (nt - Math.floor(nt)) * vh), __privateGet(this, _frontSide) === "left" ? __privateSet(this, _front, getCumulativeOffsetLeft(__privateGet(this, _element)) - vl - __privateGet(this, _left)) : __privateSet(this, _front, getCumulativeOffsetTop(__privateGet(this, _element)) - vt - __privateGet(this, _top));
|
|
298
|
+
}
|
|
299
|
+
if (__privateSet(this, _left, __privateGet(this, _left) + __privateGet(this, _element).clientLeft), __privateSet(this, _top, __privateGet(this, _top) + __privateGet(this, _element).clientTop), __privateGet(this, _isCartesian)) {
|
|
300
|
+
const viewHalfWidth = Math.round(vw / 2), viewHalfHeight = Math.round(vh / 2), thisHalfWidth = __privateGet(this, _width) ? Math.round(__privateGet(this, _width) / 2) : 0, thisHalfHeight = __privateGet(this, _height) ? Math.round(__privateGet(this, _height) / 2) : 0, positionX = __privateGet(this, _left) - viewHalfWidth + thisHalfWidth, positionY = (__privateGet(this, _top) - viewHalfHeight + thisHalfHeight) * -1;
|
|
301
|
+
__privateSet(this, _x, positionX), __privateSet(this, _y, positionY);
|
|
299
302
|
} else
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
},
|
|
305
|
-
|
|
306
|
-
for (let
|
|
307
|
-
const
|
|
308
|
-
let
|
|
309
|
-
|
|
310
|
-
const
|
|
311
|
-
|
|
312
|
-
[
|
|
303
|
+
__privateSet(this, _x, __privateGet(this, _left)), __privateSet(this, _y, __privateGet(this, _top));
|
|
304
|
+
__privateSet(this, _z, __privateGet(this, _front) * -1);
|
|
305
|
+
const cssMatrix = new WebKitCSSMatrix(computed.transform), decomposedMatrix = decomposeCSSMatrix(cssMatrix);
|
|
306
|
+
__privateGet(this, _CSSTranslation).x = decomposedMatrix.translationX, __privateGet(this, _CSSTranslation).y = decomposedMatrix.translationY, __privateGet(this, _CSSTranslation).z = decomposedMatrix.translationZ, __privateGet(this, _CSSScale).x = decomposedMatrix.scaleX, __privateGet(this, _CSSScale).y = decomposedMatrix.scaleY, __privateGet(this, _CSSScale).z = decomposedMatrix.scaleZ, __privateGet(this, _CSSRotation).x = decomposedMatrix.rotationX, __privateGet(this, _CSSRotation).y = decomposedMatrix.rotationY, __privateGet(this, _CSSRotation).z = decomposedMatrix.rotationZ, __privateMethod(this, _LayoutBox_instances, composeSteps_fn).call(this), __privateMethod(this, _LayoutBox_instances, recalculate_fn).call(this), __privateGet(this, _resizeNotifier).notify();
|
|
307
|
+
}, "#updateDimensions"), updateScrollPosition_fn = /* @__PURE__ */ __name(function() {
|
|
308
|
+
__privateGet(this, _scrollValue).x = 0, __privateGet(this, _scrollValue).y = 0, __privateGet(this, _scrollValue).z = 0;
|
|
309
|
+
for (let index = 0; index < __privateGet(this, _scrollStepSetterCallbacks).length; index++) {
|
|
310
|
+
const callbackReturn = __privateGet(this, _scrollStepSetterCallbacks)[index]();
|
|
311
|
+
let axis = callbackReturn.axis;
|
|
312
|
+
__privateGet(this, _scrollAxis) !== "auto" && (axis = __privateGet(this, _scrollAxis));
|
|
313
|
+
const value = callbackReturn.value * (axis === "x" ? -1 : __privateGet(this, _isCartesian) ? 1 : -1);
|
|
314
|
+
__privateGet(this, _scrollValue)[axis] += value, __privateGet(this, _position).setStep(`_scroll_${index}`, "+", {
|
|
315
|
+
[axis]: value
|
|
313
316
|
});
|
|
314
317
|
}
|
|
315
|
-
},
|
|
318
|
+
}, "#updateScrollPosition"), _resizeListener = new WeakMap(), _tickListener = new WeakMap(), _scrollEntriesListener = new WeakMap(), __name(_LayoutBox, "LayoutBox");
|
|
319
|
+
let LayoutBox = _LayoutBox;
|
|
316
320
|
export {
|
|
317
|
-
|
|
318
|
-
|
|
321
|
+
LayoutBox,
|
|
322
|
+
decomposeCSSMatrix
|
|
319
323
|
};
|
package/lib/loading/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const events=require("../events-UlGk63iC.cjs"),_function=require("../function-H4b_gTg6.cjs");require("construct-style-sheets-polyfill");require("../index-BpO2RJ__.cjs");var _map,_isStarted,_loaded,_progress,_start,_check,_complete;const _Loading=class _Loading{constructor(){__privateAdd(this,_map,new Map);__privateAdd(this,_isStarted,!1);__privateAdd(this,_loaded,0);__privateAdd(this,_progress,0);__privateAdd(this,_start,_function.debounce(()=>{__privateGet(this,_isStarted)||(__privateSet(this,_isStarted,!0),events.dispatchEvent(document,"loadingStart"),__privateGet(this,_check).call(this))},0));__privateAdd(this,_check,__name(resourceName=>{if(!__privateGet(this,_isStarted))return;const total=__privateGet(this,_map).size,loaded=Array.from(__privateGet(this,_map)).filter(item=>item[1]).length,progress=loaded/total;__privateSet(this,_loaded,loaded),__privateSet(this,_progress,progress),events.dispatchEvent(document,"loadingProgress",{detail:{total,loaded,progress,resourceName}}),progress===1&&__privateGet(this,_complete).call(this)},"#check"));__privateAdd(this,_complete,_function.debounce(()=>{__privateSet(this,_isStarted,!1),events.dispatchEvent(document,"loadingComplete",{detail:{total:__privateGet(this,_map).size}}),__privateSet(this,_loaded,0),__privateSet(this,_progress,0),__privateGet(this,_map).clear()},0))}get total(){return __privateGet(this,_map).size}get loaded(){return __privateGet(this,_loaded)}get progress(){return __privateGet(this,_progress)}get map(){return __privateGet(this,_map)}add(resourceName){__privateGet(this,_map).set(resourceName,!1),__privateGet(this,_start).call(this)}complete(resourceName){__privateGet(this,_map).set(resourceName,!0),__privateGet(this,_check).call(this,resourceName)}error(resourceName){__privateGet(this,_map).has(resourceName)&&(console.error(`Failed to load ${resourceName}`),__privateGet(this,_map).delete(resourceName),events.dispatchEvent(document,"loadingError",{detail:{name:resourceName}})),__privateGet(this,_check).call(this)}};_map=new WeakMap,_isStarted=new WeakMap,_loaded=new WeakMap,_progress=new WeakMap,_start=new WeakMap,_check=new WeakMap,_complete=new WeakMap,__name(_Loading,"Loading");let Loading=_Loading;const loading=new Loading;exports.loading=loading;
|