@studiometa/ui 0.2.3 → 0.2.6
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/atoms/AnchorScrollTo/AnchorScrollTo.cjs +8 -13
- package/atoms/AnchorScrollTo/AnchorScrollTo.js +1 -26
- package/atoms/Button/Button.twig +68 -0
- package/atoms/Button/StyledButton.twig +47 -0
- package/atoms/Cursor/Cursor.cjs +14 -22
- package/atoms/Cursor/Cursor.d.ts +2 -2
- package/atoms/Cursor/Cursor.js +1 -103
- package/atoms/Cursor/Cursor.twig +28 -0
- package/atoms/Figure/Figure.cjs +20 -16
- package/atoms/Figure/Figure.d.ts +19 -1
- package/atoms/Figure/Figure.js +1 -27
- package/atoms/Figure/Figure.twig +120 -0
- package/atoms/Figure/FigureTwicPics.cjs +72 -0
- package/atoms/Figure/FigureTwicPics.d.ts +48 -0
- package/atoms/Figure/FigureTwicPics.js +1 -0
- package/atoms/Figure/index.cjs +31 -0
- package/atoms/Figure/index.d.ts +2 -0
- package/atoms/Figure/index.js +1 -0
- package/atoms/Icon/Icon.twig +13 -0
- package/atoms/LargeText/LargeText.cjs +15 -23
- package/atoms/LargeText/LargeText.d.ts +3 -3
- package/atoms/LargeText/LargeText.js +1 -64
- package/atoms/LargeText/LargeText.twig +49 -0
- package/atoms/LazyInclude/LazyInclude.cjs +8 -13
- package/atoms/LazyInclude/LazyInclude.d.ts +4 -4
- package/atoms/LazyInclude/LazyInclude.js +1 -46
- package/atoms/Prefetch/AbstractPrefetch.cjs +8 -13
- package/atoms/Prefetch/AbstractPrefetch.d.ts +1 -1
- package/atoms/Prefetch/AbstractPrefetch.js +1 -58
- package/atoms/Prefetch/PrefetchWhenOver.cjs +12 -34
- package/atoms/Prefetch/PrefetchWhenOver.d.ts +1 -1
- package/atoms/Prefetch/PrefetchWhenOver.js +1 -35
- package/atoms/Prefetch/PrefetchWhenVisible.cjs +12 -34
- package/atoms/Prefetch/PrefetchWhenVisible.d.ts +1 -1
- package/atoms/Prefetch/PrefetchWhenVisible.js +1 -36
- package/atoms/Prefetch/index.cjs +9 -16
- package/atoms/Prefetch/index.js +1 -8
- package/atoms/ScrollAnimation/AbstractScrollAnimation.cjs +126 -0
- package/atoms/ScrollAnimation/AbstractScrollAnimation.d.ts +133 -0
- package/atoms/ScrollAnimation/AbstractScrollAnimation.js +1 -0
- package/atoms/ScrollAnimation/ScrollAnimation.cjs +51 -0
- package/atoms/ScrollAnimation/ScrollAnimation.d.ts +55 -0
- package/atoms/ScrollAnimation/ScrollAnimation.js +1 -0
- package/atoms/ScrollAnimation/ScrollAnimationChild.cjs +51 -0
- package/atoms/ScrollAnimation/ScrollAnimationChild.d.ts +13 -0
- package/atoms/ScrollAnimation/ScrollAnimationChild.js +1 -0
- package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.cjs +41 -0
- package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.d.ts +6 -0
- package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.js +1 -0
- package/atoms/ScrollAnimation/ScrollAnimationParent.cjs +48 -0
- package/atoms/ScrollAnimation/ScrollAnimationParent.d.ts +35 -0
- package/atoms/ScrollAnimation/ScrollAnimationParent.js +1 -0
- package/atoms/ScrollAnimation/ScrollAnimationWithEase.cjs +41 -0
- package/atoms/ScrollAnimation/ScrollAnimationWithEase.d.ts +6 -0
- package/atoms/ScrollAnimation/ScrollAnimationWithEase.js +1 -0
- package/atoms/ScrollAnimation/animationScrollWithEase.cjs +70 -0
- package/atoms/ScrollAnimation/animationScrollWithEase.d.ts +11 -0
- package/atoms/ScrollAnimation/animationScrollWithEase.js +1 -0
- package/atoms/ScrollAnimation/index.cjs +41 -0
- package/atoms/ScrollAnimation/index.d.ts +7 -0
- package/atoms/ScrollAnimation/index.js +1 -0
- package/atoms/index.cjs +13 -19
- package/atoms/index.d.ts +2 -1
- package/atoms/index.js +1 -13
- package/index.cjs +12 -15
- package/index.d.ts +1 -0
- package/index.js +1 -3
- package/molecules/Accordion/Accordion.cjs +12 -34
- package/molecules/Accordion/Accordion.js +1 -35
- package/molecules/Accordion/Accordion.twig +54 -0
- package/molecules/Accordion/AccordionCore.cjs +8 -13
- package/molecules/Accordion/AccordionCore.d.ts +2 -2
- package/molecules/Accordion/AccordionCore.js +1 -34
- package/molecules/Accordion/AccordionItem.cjs +70 -114
- package/molecules/Accordion/AccordionItem.d.ts +7 -6
- package/molecules/Accordion/AccordionItem.js +1 -178
- package/molecules/Menu/Menu.cjs +148 -0
- package/molecules/Menu/Menu.d.ts +140 -0
- package/molecules/Menu/Menu.js +1 -0
- package/molecules/Menu/MenuBtn.cjs +53 -0
- package/molecules/Menu/MenuBtn.d.ts +39 -0
- package/molecules/Menu/MenuBtn.js +1 -0
- package/molecules/Menu/MenuList.cjs +134 -0
- package/molecules/Menu/MenuList.d.ts +101 -0
- package/molecules/Menu/MenuList.js +1 -0
- package/molecules/Menu/index.cjs +33 -0
- package/molecules/Menu/index.d.ts +3 -0
- package/molecules/Menu/index.js +1 -0
- package/molecules/Modal/Modal.cjs +42 -71
- package/molecules/Modal/Modal.d.ts +5 -5
- package/molecules/Modal/Modal.js +1 -150
- package/molecules/Modal/Modal.twig +108 -0
- package/molecules/Modal/ModalWithTransition.cjs +13 -43
- package/molecules/Modal/ModalWithTransition.js +1 -69
- package/molecules/Modal/StyledModal.twig +39 -0
- package/molecules/Panel/Panel.cjs +42 -76
- package/molecules/Panel/Panel.js +1 -117
- package/molecules/Panel/Panel.twig +73 -0
- package/molecules/Panel/StyledPanel.twig +28 -0
- package/molecules/Slider/AbstractSliderChild.cjs +10 -20
- package/molecules/Slider/AbstractSliderChild.d.ts +6 -2
- package/molecules/Slider/AbstractSliderChild.js +1 -43
- package/molecules/Slider/Slider.cjs +14 -24
- package/molecules/Slider/Slider.d.ts +6 -6
- package/molecules/Slider/Slider.js +1 -209
- package/molecules/Slider/SliderBtn.cjs +9 -16
- package/molecules/Slider/SliderBtn.d.ts +1 -1
- package/molecules/Slider/SliderBtn.js +1 -34
- package/molecules/Slider/SliderCount.cjs +9 -16
- package/molecules/Slider/SliderCount.js +1 -19
- package/molecules/Slider/SliderDots.cjs +9 -16
- package/molecules/Slider/SliderDots.js +1 -24
- package/molecules/Slider/SliderDrag.cjs +8 -13
- package/molecules/Slider/SliderDrag.js +1 -19
- package/molecules/Slider/SliderItem.cjs +14 -37
- package/molecules/Slider/SliderItem.js +1 -105
- package/molecules/Slider/SliderProgress.cjs +9 -16
- package/molecules/Slider/SliderProgress.js +1 -23
- package/molecules/Slider/index.cjs +9 -16
- package/molecules/Slider/index.js +1 -18
- package/molecules/Sticky/Sticky.cjs +11 -19
- package/molecules/Sticky/Sticky.d.ts +8 -8
- package/molecules/Sticky/Sticky.js +1 -107
- package/molecules/Sticky/Sticky.twig +31 -0
- package/molecules/TableOfContent/TableOfContent.cjs +9 -16
- package/molecules/TableOfContent/TableOfContent.d.ts +1 -1
- package/molecules/TableOfContent/TableOfContent.js +1 -42
- package/molecules/TableOfContent/TableOfContentAnchor.cjs +8 -13
- package/molecules/TableOfContent/TableOfContentAnchor.js +1 -39
- package/molecules/TableOfContent/index.cjs +9 -16
- package/molecules/TableOfContent/index.js +1 -6
- package/molecules/Tabs/Tabs.cjs +54 -82
- package/molecules/Tabs/Tabs.d.ts +5 -4
- package/molecules/Tabs/Tabs.js +1 -126
- package/molecules/Tabs/Tabs.twig +20 -0
- package/molecules/index.cjs +13 -18
- package/molecules/index.d.ts +1 -0
- package/molecules/index.js +1 -18
- package/organisms/Frame/Frame.cjs +107 -99
- package/organisms/Frame/Frame.d.ts +37 -4
- package/organisms/Frame/Frame.js +1 -171
- package/organisms/Frame/FrameAnchor.cjs +8 -13
- package/organisms/Frame/FrameAnchor.js +1 -22
- package/organisms/Frame/FrameForm.cjs +8 -13
- package/organisms/Frame/FrameForm.js +1 -22
- package/organisms/Frame/FrameTarget.cjs +31 -73
- package/organisms/Frame/FrameTarget.js +1 -109
- package/organisms/Frame/index.cjs +9 -16
- package/organisms/Frame/index.js +1 -10
- package/organisms/ImageGrid/ImageGrid.twig +42 -0
- package/organisms/index.cjs +9 -13
- package/organisms/index.js +1 -1
- package/package.json +3 -4
- package/primitives/Draggable/Draggable.cjs +15 -28
- package/primitives/Draggable/Draggable.d.ts +0 -5
- package/primitives/Draggable/Draggable.js +1 -38
- package/primitives/Sentinel/Sentinel.cjs +8 -13
- package/primitives/Sentinel/Sentinel.js +1 -15
- package/primitives/Transition/Transition.cjs +12 -17
- package/primitives/Transition/Transition.d.ts +2 -4
- package/primitives/Transition/Transition.js +1 -45
- package/primitives/index.cjs +9 -16
- package/primitives/index.js +1 -8
|
@@ -1,47 +1,24 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
7
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
8
|
var __export = (target, all) => {
|
|
26
9
|
for (var name in all)
|
|
27
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
11
|
};
|
|
29
|
-
var
|
|
30
|
-
if (
|
|
31
|
-
for (let key of __getOwnPropNames(
|
|
32
|
-
if (!__hasOwnProp.call(
|
|
33
|
-
__defProp(
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
17
|
}
|
|
35
|
-
return
|
|
36
|
-
};
|
|
37
|
-
var __toESM = (module2, isNodeMode) => {
|
|
38
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
+
return to;
|
|
39
19
|
};
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
43
|
-
};
|
|
44
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
45
22
|
var __publicField = (obj, key, value) => {
|
|
46
23
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
47
24
|
return value;
|
|
@@ -52,14 +29,15 @@ var PrefetchWhenOver_exports = {};
|
|
|
52
29
|
__export(PrefetchWhenOver_exports, {
|
|
53
30
|
default: () => PrefetchWhenOver
|
|
54
31
|
});
|
|
32
|
+
module.exports = __toCommonJS(PrefetchWhenOver_exports);
|
|
55
33
|
var import_AbstractPrefetch = __toESM(require("./AbstractPrefetch.cjs"), 1);
|
|
56
34
|
var PrefetchWhenOver = class extends import_AbstractPrefetch.default {
|
|
57
35
|
onMouseenter() {
|
|
58
36
|
this.prefetch(new URL(this.$el.href));
|
|
59
37
|
}
|
|
60
38
|
};
|
|
61
|
-
__publicField(PrefetchWhenOver, "config",
|
|
39
|
+
__publicField(PrefetchWhenOver, "config", {
|
|
40
|
+
...import_AbstractPrefetch.default.config,
|
|
62
41
|
name: "PrefetchWhenOver"
|
|
63
|
-
})
|
|
64
|
-
module.exports = __toCommonJS(PrefetchWhenOver_exports);
|
|
42
|
+
});
|
|
65
43
|
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -13,7 +13,7 @@ export default class PrefetchWhenOver extends AbstractPrefetch {
|
|
|
13
13
|
* @this {PrefetchWhenOverInterface}
|
|
14
14
|
* @returns {void}
|
|
15
15
|
*/
|
|
16
|
-
onMouseenter(): void;
|
|
16
|
+
onMouseenter(this: PrefetchWhenOverInterface): void;
|
|
17
17
|
}
|
|
18
18
|
export type PrefetchWhenOverInterface = PrefetchWhenOver & {
|
|
19
19
|
$el: HTMLAnchorElement;
|
|
@@ -1,35 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __publicField = (obj, key, value) => {
|
|
21
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
|
-
return value;
|
|
23
|
-
};
|
|
24
|
-
import AbstractPrefetch from "./AbstractPrefetch.js";
|
|
25
|
-
class PrefetchWhenOver extends AbstractPrefetch {
|
|
26
|
-
onMouseenter() {
|
|
27
|
-
this.prefetch(new URL(this.$el.href));
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
__publicField(PrefetchWhenOver, "config", __spreadProps(__spreadValues({}, AbstractPrefetch.config), {
|
|
31
|
-
name: "PrefetchWhenOver"
|
|
32
|
-
}));
|
|
33
|
-
export {
|
|
34
|
-
PrefetchWhenOver as default
|
|
35
|
-
};
|
|
1
|
+
import e from"./AbstractPrefetch.js";class t extends e{static config={...e.config,name:"PrefetchWhenOver"};onMouseenter(){this.prefetch(new URL(this.$el.href))}}export{t as default};
|
|
@@ -1,47 +1,24 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
7
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
8
|
var __export = (target, all) => {
|
|
26
9
|
for (var name in all)
|
|
27
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
11
|
};
|
|
29
|
-
var
|
|
30
|
-
if (
|
|
31
|
-
for (let key of __getOwnPropNames(
|
|
32
|
-
if (!__hasOwnProp.call(
|
|
33
|
-
__defProp(
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
17
|
}
|
|
35
|
-
return
|
|
36
|
-
};
|
|
37
|
-
var __toESM = (module2, isNodeMode) => {
|
|
38
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
+
return to;
|
|
39
19
|
};
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
43
|
-
};
|
|
44
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
45
22
|
var __publicField = (obj, key, value) => {
|
|
46
23
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
47
24
|
return value;
|
|
@@ -52,6 +29,7 @@ var PrefetchWhenVisible_exports = {};
|
|
|
52
29
|
__export(PrefetchWhenVisible_exports, {
|
|
53
30
|
default: () => PrefetchWhenVisible
|
|
54
31
|
});
|
|
32
|
+
module.exports = __toCommonJS(PrefetchWhenVisible_exports);
|
|
55
33
|
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
56
34
|
var import_AbstractPrefetch = __toESM(require("./AbstractPrefetch.cjs"), 1);
|
|
57
35
|
var PrefetchWhenVisible = class extends (0, import_js_toolkit.withMountWhenInView)(import_AbstractPrefetch.default) {
|
|
@@ -59,8 +37,8 @@ var PrefetchWhenVisible = class extends (0, import_js_toolkit.withMountWhenInVie
|
|
|
59
37
|
this.prefetch(new URL(this.$el.href));
|
|
60
38
|
}
|
|
61
39
|
};
|
|
62
|
-
__publicField(PrefetchWhenVisible, "config",
|
|
40
|
+
__publicField(PrefetchWhenVisible, "config", {
|
|
41
|
+
...import_AbstractPrefetch.default.config,
|
|
63
42
|
name: "PrefetchWhenVisible"
|
|
64
|
-
})
|
|
65
|
-
module.exports = __toCommonJS(PrefetchWhenVisible_exports);
|
|
43
|
+
});
|
|
66
44
|
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -13,7 +13,7 @@ export default class PrefetchWhenVisible extends AbstractPrefetch {
|
|
|
13
13
|
* @this {PrefetchWhenVisibleInterface}
|
|
14
14
|
* @returns {void}
|
|
15
15
|
*/
|
|
16
|
-
mounted(): void;
|
|
16
|
+
mounted(this: PrefetchWhenVisibleInterface): void;
|
|
17
17
|
}
|
|
18
18
|
export type PrefetchWhenVisibleInterface = PrefetchWhenVisible & {
|
|
19
19
|
$el: HTMLAnchorElement;
|
|
@@ -1,36 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __publicField = (obj, key, value) => {
|
|
21
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
|
-
return value;
|
|
23
|
-
};
|
|
24
|
-
import { withMountWhenInView } from "@studiometa/js-toolkit";
|
|
25
|
-
import AbstractPrefetch from "./AbstractPrefetch.js";
|
|
26
|
-
class PrefetchWhenVisible extends withMountWhenInView(AbstractPrefetch) {
|
|
27
|
-
mounted() {
|
|
28
|
-
this.prefetch(new URL(this.$el.href));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
__publicField(PrefetchWhenVisible, "config", __spreadProps(__spreadValues({}, AbstractPrefetch.config), {
|
|
32
|
-
name: "PrefetchWhenVisible"
|
|
33
|
-
}));
|
|
34
|
-
export {
|
|
35
|
-
PrefetchWhenVisible as default
|
|
36
|
-
};
|
|
1
|
+
import{withMountWhenInView as t}from"@studiometa/js-toolkit";import e from"./AbstractPrefetch.js";class i extends t(e){static config={...e.config,name:"PrefetchWhenVisible"};mounted(){this.prefetch(new URL(this.$el.href))}}export{i as default};
|
package/atoms/Prefetch/index.cjs
CHANGED
|
@@ -4,27 +4,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
|
|
29
22
|
// packages/ui/atoms/Prefetch/index.js
|
|
30
23
|
var Prefetch_exports = {};
|
|
@@ -33,8 +26,8 @@ __export(Prefetch_exports, {
|
|
|
33
26
|
PrefetchWhenOver: () => import_PrefetchWhenOver.default,
|
|
34
27
|
PrefetchWhenVisible: () => import_PrefetchWhenVisible.default
|
|
35
28
|
});
|
|
29
|
+
module.exports = __toCommonJS(Prefetch_exports);
|
|
36
30
|
var import_AbstractPrefetch = __toESM(require("./AbstractPrefetch.cjs"), 1);
|
|
37
31
|
var import_PrefetchWhenOver = __toESM(require("./PrefetchWhenOver.cjs"), 1);
|
|
38
32
|
var import_PrefetchWhenVisible = __toESM(require("./PrefetchWhenVisible.cjs"), 1);
|
|
39
|
-
module.exports = __toCommonJS(Prefetch_exports);
|
|
40
33
|
if (module.exports.default) module.exports = module.exports.default;
|
package/atoms/Prefetch/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as default3 } from "./PrefetchWhenOver.js";
|
|
3
|
-
import { default as default4 } from "./PrefetchWhenVisible.js";
|
|
4
|
-
export {
|
|
5
|
-
default2 as AbstractPrefetch,
|
|
6
|
-
default3 as PrefetchWhenOver,
|
|
7
|
-
default4 as PrefetchWhenVisible
|
|
8
|
-
};
|
|
1
|
+
import{default as t}from"./AbstractPrefetch.js";import{default as a}from"./PrefetchWhenOver.js";import{default as h}from"./PrefetchWhenVisible.js";export{t as AbstractPrefetch,a as PrefetchWhenOver,h as PrefetchWhenVisible};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var __publicField = (obj, key, value) => {
|
|
20
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// packages/ui/atoms/ScrollAnimation/AbstractScrollAnimation.js
|
|
25
|
+
var AbstractScrollAnimation_exports = {};
|
|
26
|
+
__export(AbstractScrollAnimation_exports, {
|
|
27
|
+
default: () => AbstractScrollAnimation
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(AbstractScrollAnimation_exports);
|
|
30
|
+
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
31
|
+
var import_utils = require("@studiometa/js-toolkit/utils");
|
|
32
|
+
function getDefaults() {
|
|
33
|
+
return {
|
|
34
|
+
x: 0,
|
|
35
|
+
y: 0,
|
|
36
|
+
z: 0,
|
|
37
|
+
scale: 1,
|
|
38
|
+
scaleX: 1,
|
|
39
|
+
scaleY: 1,
|
|
40
|
+
rotate: 0,
|
|
41
|
+
skewX: 0,
|
|
42
|
+
skewY: 0,
|
|
43
|
+
opacity: 1
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
var AbstractScrollAnimation = class extends (0, import_js_toolkit.withFreezedOptions)(import_js_toolkit.Base) {
|
|
47
|
+
get target() {
|
|
48
|
+
return this.$el;
|
|
49
|
+
}
|
|
50
|
+
get has() {
|
|
51
|
+
const has = {
|
|
52
|
+
x: false,
|
|
53
|
+
y: false,
|
|
54
|
+
z: false,
|
|
55
|
+
scale: false,
|
|
56
|
+
scaleX: false,
|
|
57
|
+
scaleY: false,
|
|
58
|
+
rotate: false,
|
|
59
|
+
skewX: false,
|
|
60
|
+
skewY: false,
|
|
61
|
+
opacity: false,
|
|
62
|
+
transform: false
|
|
63
|
+
};
|
|
64
|
+
Object.keys(this.$options.from).forEach((key) => {
|
|
65
|
+
has[key] = this.$options.from[key] !== this.$options.to[key];
|
|
66
|
+
});
|
|
67
|
+
has.transform = Object.keys(has).filter((key) => key !== "opacity" && key !== "transform").some((key) => has[key]);
|
|
68
|
+
Object.defineProperty(this, "has", { value: has });
|
|
69
|
+
return has;
|
|
70
|
+
}
|
|
71
|
+
scrolledInView(props) {
|
|
72
|
+
if (!this.has.opacity && !this.has.transform) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const progress = (0, import_utils.map)((0, import_utils.clamp)(props.dampedProgress.y, this.$options.playRange[0], this.$options.playRange[1]), this.$options.playRange[0], this.$options.playRange[1], 0, 1);
|
|
76
|
+
this.render(progress);
|
|
77
|
+
}
|
|
78
|
+
render(progress) {
|
|
79
|
+
if (this.has.opacity) {
|
|
80
|
+
this.target.style.opacity = String((0, import_utils.map)(progress, 0, 1, this.$options.from.opacity, this.$options.to.opacity));
|
|
81
|
+
}
|
|
82
|
+
if (this.has.transform) {
|
|
83
|
+
let transform = (0, import_utils.matrix)({
|
|
84
|
+
translateX: this.has.x ? (0, import_utils.lerp)(this.$options.from.x, this.$options.to.x, progress) : void 0,
|
|
85
|
+
translateY: this.has.y ? (0, import_utils.lerp)(this.$options.from.y, this.$options.to.y, progress) : void 0,
|
|
86
|
+
scaleX: this.has.scale ? (0, import_utils.lerp)(this.$options.from.scale, this.$options.to.scale, progress) : this.has.scaleX ? (0, import_utils.lerp)(this.$options.from.scaleX, this.$options.to.scaleX, progress) : void 0,
|
|
87
|
+
scaleY: this.has.scale ? (0, import_utils.lerp)(this.$options.from.scale, this.$options.to.scale, progress) : this.has.scaleY ? (0, import_utils.lerp)(this.$options.from.scaleY, this.$options.to.scaleY, progress) : void 0,
|
|
88
|
+
skewX: this.has.skewX ? (0, import_utils.lerp)(this.$options.from.skewX, this.$options.to.skewX, progress) : void 0,
|
|
89
|
+
skewY: this.has.skewY ? (0, import_utils.lerp)(this.$options.from.skewY, this.$options.to.skewY, progress) : void 0
|
|
90
|
+
});
|
|
91
|
+
if (this.has.rotate) {
|
|
92
|
+
transform += ` rotate(${(0, import_utils.lerp)(this.$options.from.rotate, this.$options.to.rotate, progress)}deg)`;
|
|
93
|
+
}
|
|
94
|
+
transform += `translateZ(${this.has.z ? (0, import_utils.lerp)(this.$options.from.z, this.$options.to.z, progress) : 0})`;
|
|
95
|
+
this.target.style.transform = transform;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
__publicField(AbstractScrollAnimation, "config", {
|
|
100
|
+
name: "AbstractScrollAnimation",
|
|
101
|
+
options: {
|
|
102
|
+
playRange: {
|
|
103
|
+
type: Array,
|
|
104
|
+
default: () => [0, 1]
|
|
105
|
+
},
|
|
106
|
+
dampFactor: {
|
|
107
|
+
type: Number,
|
|
108
|
+
default: 0.5
|
|
109
|
+
},
|
|
110
|
+
dampPrecision: {
|
|
111
|
+
type: Number,
|
|
112
|
+
default: 1e-3
|
|
113
|
+
},
|
|
114
|
+
from: {
|
|
115
|
+
type: Object,
|
|
116
|
+
default: getDefaults,
|
|
117
|
+
merge: true
|
|
118
|
+
},
|
|
119
|
+
to: {
|
|
120
|
+
type: Object,
|
|
121
|
+
default: getDefaults,
|
|
122
|
+
merge: true
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {AbstractScrollAnimation & {
|
|
3
|
+
* $options: {
|
|
4
|
+
* playRange: string,
|
|
5
|
+
* dampFactor: number,
|
|
6
|
+
* dampPrecision: number,
|
|
7
|
+
* from: AnimationOptions,
|
|
8
|
+
* to: AnimationOptions,
|
|
9
|
+
* },
|
|
10
|
+
* }} ScrollAnimationChildInterface
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* AbstractScrollAnimation class.
|
|
14
|
+
*
|
|
15
|
+
* @todo add support for magic values in options to access key values:
|
|
16
|
+
* - viewport size
|
|
17
|
+
* - target size
|
|
18
|
+
* - root element size
|
|
19
|
+
* - etc.
|
|
20
|
+
*
|
|
21
|
+
* ```
|
|
22
|
+
* data-option-to="{ x: 100%, y: innerWidth / 2 }"
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export default class AbstractScrollAnimation extends Base {
|
|
26
|
+
/**
|
|
27
|
+
* Config.
|
|
28
|
+
*/
|
|
29
|
+
static config: {
|
|
30
|
+
name: string;
|
|
31
|
+
options: {
|
|
32
|
+
playRange: {
|
|
33
|
+
type: ArrayConstructor;
|
|
34
|
+
default: () => number[];
|
|
35
|
+
};
|
|
36
|
+
dampFactor: {
|
|
37
|
+
type: NumberConstructor;
|
|
38
|
+
default: number;
|
|
39
|
+
};
|
|
40
|
+
dampPrecision: {
|
|
41
|
+
type: NumberConstructor;
|
|
42
|
+
default: number;
|
|
43
|
+
};
|
|
44
|
+
from: {
|
|
45
|
+
type: ObjectConstructor;
|
|
46
|
+
default: typeof getDefaults;
|
|
47
|
+
merge: boolean;
|
|
48
|
+
};
|
|
49
|
+
to: {
|
|
50
|
+
type: ObjectConstructor;
|
|
51
|
+
default: typeof getDefaults;
|
|
52
|
+
merge: boolean;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Get the target element for the animation.
|
|
58
|
+
*
|
|
59
|
+
* @returns {HTMLElement}
|
|
60
|
+
*/
|
|
61
|
+
get target(): HTMLElement;
|
|
62
|
+
/**
|
|
63
|
+
* Flags for style detection.
|
|
64
|
+
*/
|
|
65
|
+
get has(): {
|
|
66
|
+
x: boolean;
|
|
67
|
+
y: boolean;
|
|
68
|
+
z: boolean;
|
|
69
|
+
scale: boolean;
|
|
70
|
+
scaleX: boolean;
|
|
71
|
+
scaleY: boolean;
|
|
72
|
+
rotate: boolean;
|
|
73
|
+
skewX: boolean;
|
|
74
|
+
skewY: boolean;
|
|
75
|
+
opacity: boolean;
|
|
76
|
+
transform: boolean;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* @todo do not add unnecessary styles
|
|
80
|
+
*/
|
|
81
|
+
scrolledInView(props: any): void;
|
|
82
|
+
/**
|
|
83
|
+
* Render the animation for the given progress.
|
|
84
|
+
*
|
|
85
|
+
* @param {number} progress
|
|
86
|
+
* @returns {void}
|
|
87
|
+
*/
|
|
88
|
+
render(progress: number): void;
|
|
89
|
+
}
|
|
90
|
+
export type AbstractScrollAnimationConstructor = typeof AbstractScrollAnimation;
|
|
91
|
+
export type AnimationOptions = {
|
|
92
|
+
x?: number;
|
|
93
|
+
y?: number;
|
|
94
|
+
z?: number;
|
|
95
|
+
scale?: number;
|
|
96
|
+
scaleX?: number;
|
|
97
|
+
scaleY?: number;
|
|
98
|
+
rotate?: number;
|
|
99
|
+
skewX?: number;
|
|
100
|
+
skewY?: number;
|
|
101
|
+
opacity?: number;
|
|
102
|
+
};
|
|
103
|
+
export type ScrollAnimationChildInterface = AbstractScrollAnimation & {
|
|
104
|
+
$options: {
|
|
105
|
+
playRange: string;
|
|
106
|
+
dampFactor: number;
|
|
107
|
+
dampPrecision: number;
|
|
108
|
+
from: AnimationOptions;
|
|
109
|
+
to: AnimationOptions;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
import { Base } from "@studiometa/js-toolkit";
|
|
113
|
+
/**
|
|
114
|
+
* @typedef {typeof AbstractScrollAnimation} AbstractScrollAnimationConstructor
|
|
115
|
+
* @typedef {{
|
|
116
|
+
* x?: number;
|
|
117
|
+
* y?: number;
|
|
118
|
+
* z?: number;
|
|
119
|
+
* scale?: number;
|
|
120
|
+
* scaleX?: number;
|
|
121
|
+
* scaleY?: number;
|
|
122
|
+
* rotate?: number;
|
|
123
|
+
* skewX?: number;
|
|
124
|
+
* skewY?: number;
|
|
125
|
+
* opacity?: number;
|
|
126
|
+
* }} AnimationOptions
|
|
127
|
+
*/
|
|
128
|
+
/**
|
|
129
|
+
* Get animation configuration defaults.
|
|
130
|
+
* @returns {AnimationOptions}
|
|
131
|
+
*/
|
|
132
|
+
declare function getDefaults(): AnimationOptions;
|
|
133
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Base as a,withFreezedOptions as n}from"@studiometa/js-toolkit";import{matrix as h,lerp as e,map as o,clamp as r}from"@studiometa/js-toolkit/utils";function i(){return{x:0,y:0,z:0,scale:1,scaleX:1,scaleY:1,rotate:0,skewX:0,skewY:0,opacity:1}}class l extends n(a){static config={name:"AbstractScrollAnimation",options:{playRange:{type:Array,default:()=>[0,1]},dampFactor:{type:Number,default:.5},dampPrecision:{type:Number,default:.001},from:{type:Object,default:i,merge:!0},to:{type:Object,default:i,merge:!0}}};get target(){return this.$el}get has(){const t={x:!1,y:!1,z:!1,scale:!1,scaleX:!1,scaleY:!1,rotate:!1,skewX:!1,skewY:!1,opacity:!1,transform:!1};return Object.keys(this.$options.from).forEach(s=>{t[s]=this.$options.from[s]!==this.$options.to[s]}),t.transform=Object.keys(t).filter(s=>s!=="opacity"&&s!=="transform").some(s=>t[s]),Object.defineProperty(this,"has",{value:t}),t}scrolledInView(t){if(!this.has.opacity&&!this.has.transform)return;const s=o(r(t.dampedProgress.y,this.$options.playRange[0],this.$options.playRange[1]),this.$options.playRange[0],this.$options.playRange[1],0,1);this.render(s)}render(t){if(this.has.opacity&&(this.target.style.opacity=String(o(t,0,1,this.$options.from.opacity,this.$options.to.opacity))),this.has.transform){let s=h({translateX:this.has.x?e(this.$options.from.x,this.$options.to.x,t):void 0,translateY:this.has.y?e(this.$options.from.y,this.$options.to.y,t):void 0,scaleX:this.has.scale?e(this.$options.from.scale,this.$options.to.scale,t):this.has.scaleX?e(this.$options.from.scaleX,this.$options.to.scaleX,t):void 0,scaleY:this.has.scale?e(this.$options.from.scale,this.$options.to.scale,t):this.has.scaleY?e(this.$options.from.scaleY,this.$options.to.scaleY,t):void 0,skewX:this.has.skewX?e(this.$options.from.skewX,this.$options.to.skewX,t):void 0,skewY:this.has.skewY?e(this.$options.from.skewY,this.$options.to.skewY,t):void 0});this.has.rotate&&(s+=` rotate(${e(this.$options.from.rotate,this.$options.to.rotate,t)}deg)`),s+=`translateZ(${this.has.z?e(this.$options.from.z,this.$options.to.z,t):0})`,this.target.style.transform=s}}}export{l as default};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
|
+
var __publicField = (obj, key, value) => {
|
|
23
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
24
|
+
return value;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// packages/ui/atoms/ScrollAnimation/ScrollAnimation.js
|
|
28
|
+
var ScrollAnimation_exports = {};
|
|
29
|
+
__export(ScrollAnimation_exports, {
|
|
30
|
+
default: () => ScrollAnimation
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(ScrollAnimation_exports);
|
|
33
|
+
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
34
|
+
var import_AbstractScrollAnimation = __toESM(require("./AbstractScrollAnimation.cjs"), 1);
|
|
35
|
+
var ScrollAnimation = class extends (0, import_js_toolkit.withScrolledInView)(import_AbstractScrollAnimation.default, {}) {
|
|
36
|
+
get target() {
|
|
37
|
+
return this.$refs.target;
|
|
38
|
+
}
|
|
39
|
+
get dampFactor() {
|
|
40
|
+
return this.$options.dampFactor;
|
|
41
|
+
}
|
|
42
|
+
get dampPrecision() {
|
|
43
|
+
return this.$options.dampPrecision;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
__publicField(ScrollAnimation, "config", {
|
|
47
|
+
...import_AbstractScrollAnimation.default.config,
|
|
48
|
+
name: "ScrollAnimation",
|
|
49
|
+
refs: ["target"]
|
|
50
|
+
});
|
|
51
|
+
if (module.exports.default) module.exports = module.exports.default;
|