@studiometa/ui 1.0.0-alpha.1 → 1.0.0-alpha.3
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.d.ts +3 -3
- package/atoms/AnchorScrollTo/AnchorScrollTo.js +1 -3
- package/atoms/AnchorScrollTo/AnchorScrollTo.js.map +2 -2
- package/atoms/Data/DataBind.d.ts +1 -1
- package/atoms/Data/DataBind.js +9 -2
- package/atoms/Data/DataBind.js.map +2 -2
- package/atoms/Data/DataComputed.js +1 -1
- package/atoms/Data/DataComputed.js.map +2 -2
- package/atoms/Data/DataModel.js +1 -1
- package/atoms/Data/DataModel.js.map +2 -2
- package/atoms/LazyInclude/LazyInclude.d.ts +3 -1
- package/atoms/LazyInclude/LazyInclude.js +1 -1
- package/atoms/LazyInclude/LazyInclude.js.map +2 -2
- package/molecules/Accordion/AccordionCore.d.ts +6 -2
- package/molecules/Accordion/AccordionCore.js +2 -2
- package/molecules/Accordion/AccordionCore.js.map +2 -2
- package/molecules/AnchorNav/AnchorNav.d.ts +6 -2
- package/molecules/AnchorNav/AnchorNav.js +4 -4
- package/molecules/AnchorNav/AnchorNav.js.map +2 -2
- package/molecules/Menu/Menu.d.ts +11 -4
- package/molecules/Menu/Menu.js +7 -9
- package/molecules/Menu/Menu.js.map +2 -2
- package/molecules/Menu/MenuBtn.d.ts +9 -3
- package/molecules/Menu/MenuBtn.js +3 -3
- package/molecules/Menu/MenuBtn.js.map +2 -2
- package/molecules/Slider/Slider.d.ts +6 -2
- package/molecules/Slider/Slider.js +2 -2
- package/molecules/Slider/Slider.js.map +2 -2
- package/molecules/Slider/SliderDots.d.ts +4 -1
- package/molecules/Slider/SliderDots.js +1 -1
- package/molecules/Slider/SliderDots.js.map +2 -2
- package/molecules/Slider/SliderDrag.d.ts +3 -1
- package/molecules/Slider/SliderDrag.js +1 -1
- package/molecules/Slider/SliderDrag.js.map +2 -2
- package/molecules/Sticky/Sticky.d.ts +3 -1
- package/molecules/Sticky/Sticky.js +1 -1
- package/molecules/Sticky/Sticky.js.map +2 -2
- package/molecules/Tabs/Tabs.d.ts +4 -1
- package/molecules/Tabs/Tabs.js +1 -1
- package/molecules/Tabs/Tabs.js.map +2 -2
- package/molecules/index.d.ts +2 -3
- package/molecules/index.js +2 -3
- package/molecules/index.js.map +2 -2
- package/organisms/Frame/Frame.d.ts +11 -3
- package/organisms/Frame/Frame.js +14 -16
- package/organisms/Frame/Frame.js.map +2 -2
- package/package.json +2 -2
- package/atoms/Action/Action.cjs +0 -115
- package/atoms/Action/Action.cjs.map +0 -7
- package/atoms/Action/Target.cjs +0 -35
- package/atoms/Action/Target.cjs.map +0 -7
- package/atoms/Action/index.cjs +0 -22
- package/atoms/Action/index.cjs.map +0 -7
- package/atoms/AnchorScrollTo/AnchorScrollTo.cjs +0 -52
- package/atoms/AnchorScrollTo/AnchorScrollTo.cjs.map +0 -7
- package/atoms/AnchorScrollTo/index.cjs +0 -21
- package/atoms/AnchorScrollTo/index.cjs.map +0 -7
- package/atoms/CircularMarquee/CircularMarquee.cjs +0 -69
- package/atoms/CircularMarquee/CircularMarquee.cjs.map +0 -7
- package/atoms/CircularMarquee/index.cjs +0 -21
- package/atoms/CircularMarquee/index.cjs.map +0 -7
- package/atoms/Cursor/Cursor.cjs +0 -137
- package/atoms/Cursor/Cursor.cjs.map +0 -7
- package/atoms/Cursor/index.cjs +0 -21
- package/atoms/Cursor/index.cjs.map +0 -7
- package/atoms/Data/DataBind.cjs +0 -124
- package/atoms/Data/DataBind.cjs.map +0 -7
- package/atoms/Data/DataComputed.cjs +0 -49
- package/atoms/Data/DataComputed.cjs.map +0 -7
- package/atoms/Data/DataEffect.cjs +0 -47
- package/atoms/Data/DataEffect.cjs.map +0 -7
- package/atoms/Data/DataModel.cjs +0 -48
- package/atoms/Data/DataModel.cjs.map +0 -7
- package/atoms/Data/index.cjs +0 -24
- package/atoms/Data/index.cjs.map +0 -7
- package/atoms/Data/utils.cjs +0 -46
- package/atoms/Data/utils.cjs.map +0 -7
- package/atoms/Figure/Figure.cjs +0 -105
- package/atoms/Figure/Figure.cjs.map +0 -7
- package/atoms/Figure/FigureTwicpics.cjs +0 -123
- package/atoms/Figure/FigureTwicpics.cjs.map +0 -7
- package/atoms/Figure/index.cjs +0 -22
- package/atoms/Figure/index.cjs.map +0 -7
- package/atoms/FigureVideo/FigureVideo.cjs +0 -132
- package/atoms/FigureVideo/FigureVideo.cjs.map +0 -7
- package/atoms/FigureVideo/FigureVideoTwicpics.cjs +0 -153
- package/atoms/FigureVideo/FigureVideoTwicpics.cjs.map +0 -7
- package/atoms/FigureVideo/index.cjs +0 -22
- package/atoms/FigureVideo/index.cjs.map +0 -7
- package/atoms/LargeText/LargeText.cjs +0 -109
- package/atoms/LargeText/LargeText.cjs.map +0 -7
- package/atoms/LargeText/index.cjs +0 -21
- package/atoms/LargeText/index.cjs.map +0 -7
- package/atoms/LazyInclude/LazyInclude.cjs +0 -78
- package/atoms/LazyInclude/LazyInclude.cjs.map +0 -7
- package/atoms/LazyInclude/index.cjs +0 -21
- package/atoms/LazyInclude/index.cjs.map +0 -7
- package/atoms/Prefetch/AbstractPrefetch.cjs +0 -86
- package/atoms/Prefetch/AbstractPrefetch.cjs.map +0 -7
- package/atoms/Prefetch/PrefetchWhenOver.cjs +0 -42
- package/atoms/Prefetch/PrefetchWhenOver.cjs.map +0 -7
- package/atoms/Prefetch/PrefetchWhenVisible.cjs +0 -43
- package/atoms/Prefetch/PrefetchWhenVisible.cjs.map +0 -7
- package/atoms/Prefetch/index.cjs +0 -23
- package/atoms/Prefetch/index.cjs.map +0 -7
- package/atoms/ScrollAnimation/AbstractScrollAnimation.cjs +0 -95
- package/atoms/ScrollAnimation/AbstractScrollAnimation.cjs.map +0 -7
- package/atoms/ScrollAnimation/ScrollAnimation.cjs +0 -44
- package/atoms/ScrollAnimation/ScrollAnimation.cjs.map +0 -7
- package/atoms/ScrollAnimation/ScrollAnimationChild.cjs +0 -84
- package/atoms/ScrollAnimation/ScrollAnimationChild.cjs.map +0 -7
- package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.cjs +0 -37
- package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.cjs.map +0 -7
- package/atoms/ScrollAnimation/ScrollAnimationParent.cjs +0 -50
- package/atoms/ScrollAnimation/ScrollAnimationParent.cjs.map +0 -7
- package/atoms/ScrollAnimation/ScrollAnimationWithEase.cjs +0 -37
- package/atoms/ScrollAnimation/ScrollAnimationWithEase.cjs.map +0 -7
- package/atoms/ScrollAnimation/animationScrollWithEase.cjs +0 -59
- package/atoms/ScrollAnimation/animationScrollWithEase.cjs.map +0 -7
- package/atoms/ScrollAnimation/index.cjs +0 -27
- package/atoms/ScrollAnimation/index.cjs.map +0 -7
- package/atoms/ScrollReveal/ScrollReveal.cjs +0 -81
- package/atoms/ScrollReveal/ScrollReveal.cjs.map +0 -7
- package/atoms/ScrollReveal/index.cjs +0 -21
- package/atoms/ScrollReveal/index.cjs.map +0 -7
- package/atoms/index.cjs +0 -32
- package/atoms/index.cjs.map +0 -7
- package/decorators/index.cjs +0 -22
- package/decorators/index.cjs.map +0 -7
- package/decorators/withDeprecation.cjs +0 -47
- package/decorators/withDeprecation.cjs.map +0 -7
- package/decorators/withTransition.cjs +0 -86
- package/decorators/withTransition.cjs.map +0 -7
- package/index.cjs +0 -25
- package/index.cjs.map +0 -7
- package/molecules/Accordion/Accordion.cjs +0 -36
- package/molecules/Accordion/Accordion.cjs.map +0 -7
- package/molecules/Accordion/AccordionCore.cjs +0 -58
- package/molecules/Accordion/AccordionCore.cjs.map +0 -7
- package/molecules/Accordion/AccordionItem.cjs +0 -206
- package/molecules/Accordion/AccordionItem.cjs.map +0 -7
- package/molecules/Accordion/index.cjs +0 -22
- package/molecules/Accordion/index.cjs.map +0 -7
- package/molecules/AnchorNav/AnchorNav.cjs +0 -63
- package/molecules/AnchorNav/AnchorNav.cjs.map +0 -7
- package/molecules/AnchorNav/AnchorNavLink.cjs +0 -40
- package/molecules/AnchorNav/AnchorNavLink.cjs.map +0 -7
- package/molecules/AnchorNav/AnchorNavTarget.cjs +0 -35
- package/molecules/AnchorNav/AnchorNavTarget.cjs.map +0 -7
- package/molecules/AnchorNav/index.cjs +0 -23
- package/molecules/AnchorNav/index.cjs.map +0 -7
- package/molecules/Menu/Menu.cjs +0 -177
- package/molecules/Menu/Menu.cjs.map +0 -7
- package/molecules/Menu/MenuBtn.cjs +0 -66
- package/molecules/Menu/MenuBtn.cjs.map +0 -7
- package/molecules/Menu/MenuList.cjs +0 -165
- package/molecules/Menu/MenuList.cjs.map +0 -7
- package/molecules/Menu/index.cjs +0 -23
- package/molecules/Menu/index.cjs.map +0 -7
- package/molecules/Modal/Modal.cjs +0 -219
- package/molecules/Modal/Modal.cjs.map +0 -7
- package/molecules/Modal/ModalWithTransition.cjs +0 -69
- package/molecules/Modal/ModalWithTransition.cjs.map +0 -7
- package/molecules/Modal/index.cjs +0 -22
- package/molecules/Modal/index.cjs.map +0 -7
- package/molecules/Panel/Panel.cjs +0 -137
- package/molecules/Panel/Panel.cjs.map +0 -7
- package/molecules/Panel/index.cjs +0 -21
- package/molecules/Panel/index.cjs.map +0 -7
- package/molecules/Slider/AbstractSliderChild.cjs +0 -88
- package/molecules/Slider/AbstractSliderChild.cjs.map +0 -7
- package/molecules/Slider/Slider.cjs +0 -404
- package/molecules/Slider/Slider.cjs.map +0 -7
- package/molecules/Slider/SliderBtn.cjs +0 -71
- package/molecules/Slider/SliderBtn.cjs.map +0 -7
- package/molecules/Slider/SliderCount.cjs +0 -44
- package/molecules/Slider/SliderCount.cjs.map +0 -7
- package/molecules/Slider/SliderDots.cjs +0 -64
- package/molecules/Slider/SliderDots.cjs.map +0 -7
- package/molecules/Slider/SliderDrag.cjs +0 -66
- package/molecules/Slider/SliderDrag.cjs.map +0 -7
- package/molecules/Slider/SliderItem.cjs +0 -177
- package/molecules/Slider/SliderItem.cjs.map +0 -7
- package/molecules/Slider/SliderProgress.cjs +0 -49
- package/molecules/Slider/SliderProgress.cjs.map +0 -7
- package/molecules/Slider/index.cjs +0 -28
- package/molecules/Slider/index.cjs.map +0 -7
- package/molecules/Sticky/Sticky.cjs +0 -177
- package/molecules/Sticky/Sticky.cjs.map +0 -7
- package/molecules/Sticky/index.cjs +0 -21
- package/molecules/Sticky/index.cjs.map +0 -7
- package/molecules/TableOfContent/TableOfContent.cjs +0 -72
- package/molecules/TableOfContent/TableOfContent.cjs.map +0 -7
- package/molecules/TableOfContent/TableOfContentAnchor.cjs +0 -76
- package/molecules/TableOfContent/TableOfContentAnchor.cjs.map +0 -7
- package/molecules/TableOfContent/index.cjs +0 -22
- package/molecules/TableOfContent/index.cjs.map +0 -7
- package/molecules/Tabs/Tabs.cjs +0 -153
- package/molecules/Tabs/Tabs.cjs.map +0 -7
- package/molecules/Tabs/index.cjs +0 -21
- package/molecules/Tabs/index.cjs.map +0 -7
- package/molecules/index.cjs +0 -30
- package/molecules/index.cjs.map +0 -7
- package/organisms/Frame/Frame.cjs +0 -220
- package/organisms/Frame/Frame.cjs.map +0 -7
- package/organisms/Frame/FrameAnchor.cjs +0 -41
- package/organisms/Frame/FrameAnchor.cjs.map +0 -7
- package/organisms/Frame/FrameForm.cjs +0 -41
- package/organisms/Frame/FrameForm.cjs.map +0 -7
- package/organisms/Frame/FrameTarget.cjs +0 -114
- package/organisms/Frame/FrameTarget.cjs.map +0 -7
- package/organisms/Frame/index.cjs +0 -24
- package/organisms/Frame/index.cjs.map +0 -7
- package/organisms/index.cjs +0 -21
- package/organisms/index.cjs.map +0 -7
- package/primitives/Draggable/Draggable.cjs +0 -65
- package/primitives/Draggable/Draggable.cjs.map +0 -7
- package/primitives/Draggable/index.cjs +0 -21
- package/primitives/Draggable/index.cjs.map +0 -7
- package/primitives/Sentinel/Sentinel.cjs +0 -35
- package/primitives/Sentinel/Sentinel.cjs.map +0 -7
- package/primitives/Sentinel/index.cjs +0 -21
- package/primitives/Sentinel/index.cjs.map +0 -7
- package/primitives/Transition/Transition.cjs +0 -36
- package/primitives/Transition/Transition.cjs.map +0 -7
- package/primitives/Transition/index.cjs +0 -21
- package/primitives/Transition/index.cjs.map +0 -7
- package/primitives/index.cjs +0 -23
- package/primitives/index.cjs.map +0 -7
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// packages/ui/atoms/LazyInclude/index.ts
|
|
17
|
-
var LazyInclude_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(LazyInclude_exports);
|
|
19
|
-
__reExport(LazyInclude_exports, require("./LazyInclude.cjs"), module.exports);
|
|
20
|
-
if (module.exports.default) module.exports = module.exports.default;
|
|
21
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// packages/ui/atoms/Prefetch/AbstractPrefetch.ts
|
|
20
|
-
var AbstractPrefetch_exports = {};
|
|
21
|
-
__export(AbstractPrefetch_exports, {
|
|
22
|
-
AbstractPrefetch: () => AbstractPrefetch
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(AbstractPrefetch_exports);
|
|
25
|
-
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
26
|
-
var AbstractPrefetch = class _AbstractPrefetch extends import_js_toolkit.Base {
|
|
27
|
-
/**
|
|
28
|
-
* Config.
|
|
29
|
-
*/
|
|
30
|
-
static config = {
|
|
31
|
-
name: "AbstractPrefetch",
|
|
32
|
-
options: {
|
|
33
|
-
prefetch: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: true
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Store prefetched URL.
|
|
41
|
-
*/
|
|
42
|
-
static prefetchedUrls = /* @__PURE__ */ new Set();
|
|
43
|
-
/**
|
|
44
|
-
* Is the given anchor prefetchable?
|
|
45
|
-
*/
|
|
46
|
-
isPrefetchable(url) {
|
|
47
|
-
if (!url || !url.href) {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
if (!this.$options.prefetch) {
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
if (url.origin !== window.location.origin) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
if (!["http:", "https:"].includes(url.protocol)) {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
if (url.protocol === "http:" && window.location.protocol === "https:") {
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
if (url.hash && url.pathname + url.search === window.location.pathname + window.location.search) {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Prefetch the given URL and terminate the component.
|
|
69
|
-
*/
|
|
70
|
-
prefetch(url) {
|
|
71
|
-
if (_AbstractPrefetch.prefetchedUrls.has(url.href)) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
if (!this.isPrefetchable(url)) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
const prefetcher = document.createElement("link");
|
|
78
|
-
prefetcher.rel = "prefetch";
|
|
79
|
-
prefetcher.href = url.href;
|
|
80
|
-
document.head.append(prefetcher);
|
|
81
|
-
_AbstractPrefetch.prefetchedUrls.add(url.href);
|
|
82
|
-
this.$terminate();
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
if (module.exports.default) module.exports = module.exports.default;
|
|
86
|
-
//# sourceMappingURL=AbstractPrefetch.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../packages/ui/atoms/Prefetch/AbstractPrefetch.ts"],
|
|
4
|
-
"sourcesContent": ["import { Base } from '@studiometa/js-toolkit';\nimport type { BaseProps, BaseConfig } from '@studiometa/js-toolkit';\n\nexport interface AbstractPrefetchProps extends BaseProps {\n $el: HTMLAnchorElement;\n $options: {\n prefetch: boolean;\n };\n}\n\n/**\n * AbstractPrefetch class.\n */\nexport class AbstractPrefetch<T extends BaseProps = BaseProps> extends Base<\n T & AbstractPrefetchProps\n> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n name: 'AbstractPrefetch',\n options: {\n prefetch: {\n type: Boolean,\n default: true,\n },\n },\n };\n\n /**\n * Store prefetched URL.\n */\n static prefetchedUrls: Set<string> = new Set();\n\n /**\n * Is the given anchor prefetchable?\n */\n isPrefetchable(url: URL): boolean {\n if (!url || !url.href) {\n return false;\n }\n\n if (!this.$options.prefetch) {\n return false;\n }\n\n if (url.origin !== window.location.origin) {\n return false;\n }\n\n if (!['http:', 'https:'].includes(url.protocol)) {\n return false;\n }\n\n if (url.protocol === 'http:' && window.location.protocol === 'https:') {\n return false;\n }\n\n if (\n url.hash &&\n url.pathname + url.search === window.location.pathname + window.location.search\n ) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Prefetch the given URL and terminate the component.\n */\n prefetch(url: URL) {\n if (AbstractPrefetch.prefetchedUrls.has(url.href)) {\n return;\n }\n\n if (!this.isPrefetchable(url)) {\n return;\n }\n\n const prefetcher = document.createElement('link');\n prefetcher.rel = 'prefetch';\n prefetcher.href = url.href;\n document.head.append(prefetcher);\n\n AbstractPrefetch.prefetchedUrls.add(url.href);\n\n this.$terminate();\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAqB;AAad,IAAM,mBAAN,MAAM,0BAA0D,uBAErE;AAAA;AAAA;AAAA;AAAA,EAIA,OAAO,SAAqB;AAAA,IAC1B,MAAM;AAAA,IACN,SAAS;AAAA,MACP,UAAU;AAAA,QACR,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,iBAA8B,oBAAI,IAAI;AAAA;AAAA;AAAA;AAAA,EAK7C,eAAe,KAAmB;AAChC,QAAI,CAAC,OAAO,CAAC,IAAI,MAAM;AACrB,aAAO;AAAA,IACT;AAEA,QAAI,CAAC,KAAK,SAAS,UAAU;AAC3B,aAAO;AAAA,IACT;AAEA,QAAI,IAAI,WAAW,OAAO,SAAS,QAAQ;AACzC,aAAO;AAAA,IACT;AAEA,QAAI,CAAC,CAAC,SAAS,QAAQ,EAAE,SAAS,IAAI,QAAQ,GAAG;AAC/C,aAAO;AAAA,IACT;AAEA,QAAI,IAAI,aAAa,WAAW,OAAO,SAAS,aAAa,UAAU;AACrE,aAAO;AAAA,IACT;AAEA,QACE,IAAI,QACJ,IAAI,WAAW,IAAI,WAAW,OAAO,SAAS,WAAW,OAAO,SAAS,QACzE;AACA,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKA,SAAS,KAAU;AACjB,QAAI,kBAAiB,eAAe,IAAI,IAAI,IAAI,GAAG;AACjD;AAAA,IACF;AAEA,QAAI,CAAC,KAAK,eAAe,GAAG,GAAG;AAC7B;AAAA,IACF;AAEA,UAAM,aAAa,SAAS,cAAc,MAAM;AAChD,eAAW,MAAM;AACjB,eAAW,OAAO,IAAI;AACtB,aAAS,KAAK,OAAO,UAAU;AAE/B,sBAAiB,eAAe,IAAI,IAAI,IAAI;AAE5C,SAAK,WAAW;AAAA,EAClB;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// packages/ui/atoms/Prefetch/PrefetchWhenOver.ts
|
|
20
|
-
var PrefetchWhenOver_exports = {};
|
|
21
|
-
__export(PrefetchWhenOver_exports, {
|
|
22
|
-
PrefetchWhenOver: () => PrefetchWhenOver
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(PrefetchWhenOver_exports);
|
|
25
|
-
var import_AbstractPrefetch = require("./AbstractPrefetch.cjs");
|
|
26
|
-
var PrefetchWhenOver = class extends import_AbstractPrefetch.AbstractPrefetch {
|
|
27
|
-
/**
|
|
28
|
-
* Config.
|
|
29
|
-
*/
|
|
30
|
-
static config = {
|
|
31
|
-
...import_AbstractPrefetch.AbstractPrefetch.config,
|
|
32
|
-
name: "PrefetchWhenOver"
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Prefetch on mouseenter.
|
|
36
|
-
*/
|
|
37
|
-
onMouseenter() {
|
|
38
|
-
this.prefetch(new URL(this.$el.href));
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
if (module.exports.default) module.exports = module.exports.default;
|
|
42
|
-
//# sourceMappingURL=PrefetchWhenOver.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../packages/ui/atoms/Prefetch/PrefetchWhenOver.ts"],
|
|
4
|
-
"sourcesContent": ["import type { BaseProps, BaseConfig } from '@studiometa/js-toolkit';\nimport { AbstractPrefetch } from './AbstractPrefetch.js';\n\n/**\n * PrefetchWhenOver class.\n */\nexport class PrefetchWhenOver<T extends BaseProps = BaseProps> extends AbstractPrefetch<T> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n ...AbstractPrefetch.config,\n name: 'PrefetchWhenOver',\n };\n\n /**\n * Prefetch on mouseenter.\n */\n onMouseenter() {\n this.prefetch(new URL(this.$el.href));\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,8BAAiC;AAK1B,IAAM,mBAAN,cAAgE,yCAAoB;AAAA;AAAA;AAAA;AAAA,EAIzF,OAAO,SAAqB;AAAA,IAC1B,GAAG,yCAAiB;AAAA,IACpB,MAAM;AAAA,EACR;AAAA;AAAA;AAAA;AAAA,EAKA,eAAe;AACb,SAAK,SAAS,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC;AAAA,EACtC;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// packages/ui/atoms/Prefetch/PrefetchWhenVisible.ts
|
|
20
|
-
var PrefetchWhenVisible_exports = {};
|
|
21
|
-
__export(PrefetchWhenVisible_exports, {
|
|
22
|
-
PrefetchWhenVisible: () => PrefetchWhenVisible
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(PrefetchWhenVisible_exports);
|
|
25
|
-
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
26
|
-
var import_AbstractPrefetch = require("./AbstractPrefetch.cjs");
|
|
27
|
-
var PrefetchWhenVisible = class extends (0, import_js_toolkit.withMountWhenInView)(import_AbstractPrefetch.AbstractPrefetch) {
|
|
28
|
-
/**
|
|
29
|
-
* Config.
|
|
30
|
-
*/
|
|
31
|
-
static config = {
|
|
32
|
-
...import_AbstractPrefetch.AbstractPrefetch.config,
|
|
33
|
-
name: "PrefetchWhenVisible"
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Prefetch on mount.
|
|
37
|
-
*/
|
|
38
|
-
mounted() {
|
|
39
|
-
this.prefetch(new URL(this.$el.href));
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
if (module.exports.default) module.exports = module.exports.default;
|
|
43
|
-
//# sourceMappingURL=PrefetchWhenVisible.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../packages/ui/atoms/Prefetch/PrefetchWhenVisible.ts"],
|
|
4
|
-
"sourcesContent": ["import { withMountWhenInView } from '@studiometa/js-toolkit';\nimport type { BaseConfig } from '@studiometa/js-toolkit';\nimport { AbstractPrefetch } from './AbstractPrefetch.js';\n\n/**\n * PrefetchWhenVisible class.\n */\nexport class PrefetchWhenVisible extends withMountWhenInView<AbstractPrefetch>(AbstractPrefetch) {\n /**\n * Config.\n */\n static config: BaseConfig = {\n ...AbstractPrefetch.config,\n name: 'PrefetchWhenVisible',\n };\n\n /**\n * Prefetch on mount.\n */\n mounted() {\n this.prefetch(new URL(this.$el.href));\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAoC;AAEpC,8BAAiC;AAK1B,IAAM,sBAAN,kBAAkC,uCAAsC,wCAAgB,EAAE;AAAA;AAAA;AAAA;AAAA,EAI/F,OAAO,SAAqB;AAAA,IAC1B,GAAG,yCAAiB;AAAA,IACpB,MAAM;AAAA,EACR;AAAA;AAAA;AAAA;AAAA,EAKA,UAAU;AACR,SAAK,SAAS,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC;AAAA,EACtC;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/atoms/Prefetch/index.cjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// packages/ui/atoms/Prefetch/index.ts
|
|
17
|
-
var Prefetch_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(Prefetch_exports);
|
|
19
|
-
__reExport(Prefetch_exports, require("./AbstractPrefetch.cjs"), module.exports);
|
|
20
|
-
__reExport(Prefetch_exports, require("./PrefetchWhenOver.cjs"), module.exports);
|
|
21
|
-
__reExport(Prefetch_exports, require("./PrefetchWhenVisible.cjs"), module.exports);
|
|
22
|
-
if (module.exports.default) module.exports = module.exports.default;
|
|
23
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../packages/ui/atoms/Prefetch/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './AbstractPrefetch.js';\nexport * from './PrefetchWhenOver.js';\nexport * from './PrefetchWhenVisible.js';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,6BAAc,mCAAd;AACA,6BAAc,mCADd;AAEA,6BAAc,sCAFd;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// packages/ui/atoms/ScrollAnimation/AbstractScrollAnimation.ts
|
|
20
|
-
var AbstractScrollAnimation_exports = {};
|
|
21
|
-
__export(AbstractScrollAnimation_exports, {
|
|
22
|
-
AbstractScrollAnimation: () => AbstractScrollAnimation
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(AbstractScrollAnimation_exports);
|
|
25
|
-
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
26
|
-
var import_utils = require("@studiometa/js-toolkit/utils");
|
|
27
|
-
var AbstractScrollAnimation = class extends (0, import_js_toolkit.withFreezedOptions)(import_js_toolkit.Base) {
|
|
28
|
-
/**
|
|
29
|
-
* Config.
|
|
30
|
-
*/
|
|
31
|
-
static config = {
|
|
32
|
-
name: "AbstractScrollAnimation",
|
|
33
|
-
options: {
|
|
34
|
-
playRange: {
|
|
35
|
-
type: Array,
|
|
36
|
-
default: () => [0, 1]
|
|
37
|
-
},
|
|
38
|
-
from: {
|
|
39
|
-
type: Object,
|
|
40
|
-
default: () => ({})
|
|
41
|
-
},
|
|
42
|
-
to: {
|
|
43
|
-
type: Object,
|
|
44
|
-
default: () => ({})
|
|
45
|
-
},
|
|
46
|
-
keyframes: {
|
|
47
|
-
type: Array
|
|
48
|
-
},
|
|
49
|
-
easing: {
|
|
50
|
-
type: Array,
|
|
51
|
-
default: () => [0, 0, 1, 1]
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Get the target element for the animation.
|
|
57
|
-
*/
|
|
58
|
-
get target() {
|
|
59
|
-
return this.$el;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Lazily get animation.
|
|
63
|
-
*/
|
|
64
|
-
get animation() {
|
|
65
|
-
let { keyframes } = this.$options;
|
|
66
|
-
const { from, to } = this.$options;
|
|
67
|
-
if (keyframes.length <= 0 && from && to) {
|
|
68
|
-
keyframes = [from, to];
|
|
69
|
-
}
|
|
70
|
-
const animation = (0, import_utils.animate)(this.target, keyframes, { easing: this.$options.easing });
|
|
71
|
-
Object.defineProperty(this, "animation", {
|
|
72
|
-
value: animation,
|
|
73
|
-
configurable: true
|
|
74
|
-
});
|
|
75
|
-
return animation;
|
|
76
|
-
}
|
|
77
|
-
scrolledInView(props) {
|
|
78
|
-
const progress = (0, import_utils.map)(
|
|
79
|
-
(0, import_utils.clamp)(props.dampedProgress.y, this.$options.playRange[0], this.$options.playRange[1]),
|
|
80
|
-
this.$options.playRange[0],
|
|
81
|
-
this.$options.playRange[1],
|
|
82
|
-
0,
|
|
83
|
-
1
|
|
84
|
-
);
|
|
85
|
-
this.render(progress);
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Render the animation for the given progress.
|
|
89
|
-
*/
|
|
90
|
-
render(progress) {
|
|
91
|
-
this.animation.progress(progress);
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
if (module.exports.default) module.exports = module.exports.default;
|
|
95
|
-
//# sourceMappingURL=AbstractScrollAnimation.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../packages/ui/atoms/ScrollAnimation/AbstractScrollAnimation.ts"],
|
|
4
|
-
"sourcesContent": ["import { Base, withFreezedOptions } from '@studiometa/js-toolkit';\nimport type { BaseProps, BaseConfig, ScrollInViewProps } from '@studiometa/js-toolkit';\nimport { map, clamp, animate } from '@studiometa/js-toolkit/utils';\nimport type { Keyframe } from '@studiometa/js-toolkit/utils';\n\nexport interface AbstractScrollAnimationProps extends BaseProps {\n $options: {\n playRange: [number, number];\n from: Keyframe;\n to: Keyframe;\n keyframes: Keyframe[];\n easing: [number, number, number, number];\n };\n}\n\n/**\n * AbstractScrollAnimation class.\n */\nexport class AbstractScrollAnimation<\n T extends BaseProps = BaseProps,\n> extends withFreezedOptions<Base>(Base)<T & AbstractScrollAnimationProps> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n name: 'AbstractScrollAnimation',\n options: {\n playRange: {\n type: Array,\n default: () => [0, 1],\n },\n from: {\n type: Object,\n default: () => ({}),\n },\n to: {\n type: Object,\n default: () => ({}),\n },\n keyframes: {\n type: Array,\n },\n easing: {\n type: Array,\n default: () => [0, 0, 1, 1],\n },\n },\n };\n\n /**\n * Get the target element for the animation.\n */\n get target() {\n return this.$el as HTMLElement;\n }\n\n /**\n * Lazily get animation.\n */\n get animation(): ReturnType<typeof animate> {\n let { keyframes } = this.$options;\n const { from, to } = this.$options;\n\n if (keyframes.length <= 0 && from && to) {\n keyframes = [from, to];\n }\n\n const animation = animate(this.target, keyframes, { easing: this.$options.easing });\n\n Object.defineProperty(this, 'animation', {\n value: animation,\n configurable: true,\n });\n\n return animation;\n }\n\n scrolledInView(props: ScrollInViewProps) {\n const progress = map(\n clamp(props.dampedProgress.y, this.$options.playRange[0], this.$options.playRange[1]),\n this.$options.playRange[0],\n this.$options.playRange[1],\n 0,\n 1,\n );\n\n this.render(progress);\n }\n\n /**\n * Render the animation for the given progress.\n */\n render(progress: number) {\n this.animation.progress(progress);\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAyC;AAEzC,mBAAoC;AAgB7B,IAAM,0BAAN,kBAEG,sCAAyB,sBAAI,EAAoC;AAAA;AAAA;AAAA;AAAA,EAIzE,OAAO,SAAqB;AAAA,IAC1B,MAAM;AAAA,IACN,SAAS;AAAA,MACP,WAAW;AAAA,QACT,MAAM;AAAA,QACN,SAAS,MAAM,CAAC,GAAG,CAAC;AAAA,MACtB;AAAA,MACA,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,SAAS,OAAO,CAAC;AAAA,MACnB;AAAA,MACA,IAAI;AAAA,QACF,MAAM;AAAA,QACN,SAAS,OAAO,CAAC;AAAA,MACnB;AAAA,MACA,WAAW;AAAA,QACT,MAAM;AAAA,MACR;AAAA,MACA,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,SAAS,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;AAAA,MAC5B;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,SAAS;AACX,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,YAAwC;AAC1C,QAAI,EAAE,UAAU,IAAI,KAAK;AACzB,UAAM,EAAE,MAAM,GAAG,IAAI,KAAK;AAE1B,QAAI,UAAU,UAAU,KAAK,QAAQ,IAAI;AACvC,kBAAY,CAAC,MAAM,EAAE;AAAA,IACvB;AAEA,UAAM,gBAAY,sBAAQ,KAAK,QAAQ,WAAW,EAAE,QAAQ,KAAK,SAAS,OAAO,CAAC;AAElF,WAAO,eAAe,MAAM,aAAa;AAAA,MACvC,OAAO;AAAA,MACP,cAAc;AAAA,IAChB,CAAC;AAED,WAAO;AAAA,EACT;AAAA,EAEA,eAAe,OAA0B;AACvC,UAAM,eAAW;AAAA,UACf,oBAAM,MAAM,eAAe,GAAG,KAAK,SAAS,UAAU,CAAC,GAAG,KAAK,SAAS,UAAU,CAAC,CAAC;AAAA,MACpF,KAAK,SAAS,UAAU,CAAC;AAAA,MACzB,KAAK,SAAS,UAAU,CAAC;AAAA,MACzB;AAAA,MACA;AAAA,IACF;AAEA,SAAK,OAAO,QAAQ;AAAA,EACtB;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,UAAkB;AACvB,SAAK,UAAU,SAAS,QAAQ;AAAA,EAClC;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// packages/ui/atoms/ScrollAnimation/ScrollAnimation.ts
|
|
20
|
-
var ScrollAnimation_exports = {};
|
|
21
|
-
__export(ScrollAnimation_exports, {
|
|
22
|
-
ScrollAnimation: () => ScrollAnimation
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(ScrollAnimation_exports);
|
|
25
|
-
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
26
|
-
var import_AbstractScrollAnimation = require("./AbstractScrollAnimation.cjs");
|
|
27
|
-
var ScrollAnimation = class extends (0, import_js_toolkit.withScrolledInView)(import_AbstractScrollAnimation.AbstractScrollAnimation, {}) {
|
|
28
|
-
/**
|
|
29
|
-
* Config.
|
|
30
|
-
*/
|
|
31
|
-
static config = {
|
|
32
|
-
...import_AbstractScrollAnimation.AbstractScrollAnimation.config,
|
|
33
|
-
name: "ScrollAnimation",
|
|
34
|
-
refs: ["target"]
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Use the `target` ref as animation target.
|
|
38
|
-
*/
|
|
39
|
-
get target() {
|
|
40
|
-
return this.$refs.target;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
if (module.exports.default) module.exports = module.exports.default;
|
|
44
|
-
//# sourceMappingURL=ScrollAnimation.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../packages/ui/atoms/ScrollAnimation/ScrollAnimation.ts"],
|
|
4
|
-
"sourcesContent": ["import { withScrolledInView } from '@studiometa/js-toolkit';\nimport type { BaseConfig, BaseProps } from '@studiometa/js-toolkit';\nimport { AbstractScrollAnimation } from './AbstractScrollAnimation.js';\n\nexport interface ScrollAnimationProps extends BaseProps {\n $refs: {\n target: HTMLElement;\n };\n}\n\n/**\n * ScrollAnimation class.\n */\nexport class ScrollAnimation<\n T extends BaseProps = BaseProps,\n> extends withScrolledInView<AbstractScrollAnimation>(AbstractScrollAnimation, {})<\n T & ScrollAnimationProps\n> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n ...AbstractScrollAnimation.config,\n name: 'ScrollAnimation',\n refs: ['target'],\n };\n\n /**\n * Use the `target` ref as animation target.\n */\n get target(): HTMLElement {\n return this.$refs.target;\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAmC;AAEnC,qCAAwC;AAWjC,IAAM,kBAAN,kBAEG,sCAA4C,wDAAyB,CAAC,CAAC,EAE/E;AAAA;AAAA;AAAA;AAAA,EAIA,OAAO,SAAqB;AAAA,IAC1B,GAAG,uDAAwB;AAAA,IAC3B,MAAM;AAAA,IACN,MAAM,CAAC,QAAQ;AAAA,EACjB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,SAAsB;AACxB,WAAO,KAAK,MAAM;AAAA,EACpB;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// packages/ui/atoms/ScrollAnimation/ScrollAnimationChild.ts
|
|
20
|
-
var ScrollAnimationChild_exports = {};
|
|
21
|
-
__export(ScrollAnimationChild_exports, {
|
|
22
|
-
ScrollAnimationChild: () => ScrollAnimationChild
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(ScrollAnimationChild_exports);
|
|
25
|
-
var import_utils = require("@studiometa/js-toolkit/utils");
|
|
26
|
-
var import_AbstractScrollAnimation = require("./AbstractScrollAnimation.cjs");
|
|
27
|
-
function updateProps(that, props, dampFactor, dampPrecision, axis = "x") {
|
|
28
|
-
that.dampedCurrent[axis] = (0, import_utils.damp)(
|
|
29
|
-
props.current[axis],
|
|
30
|
-
that.dampedCurrent[axis],
|
|
31
|
-
dampFactor,
|
|
32
|
-
dampPrecision
|
|
33
|
-
);
|
|
34
|
-
that.dampedProgress[axis] = (0, import_utils.clamp01)(
|
|
35
|
-
(that.dampedCurrent[axis] - props.start[axis]) / (props.end[axis] - props.start[axis])
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
var ScrollAnimationChild = class extends import_AbstractScrollAnimation.AbstractScrollAnimation {
|
|
39
|
-
/**
|
|
40
|
-
* Config.
|
|
41
|
-
*/
|
|
42
|
-
static config = {
|
|
43
|
-
name: "ScrollAnimationChild",
|
|
44
|
-
...import_AbstractScrollAnimation.AbstractScrollAnimation.config,
|
|
45
|
-
options: {
|
|
46
|
-
...import_AbstractScrollAnimation.AbstractScrollAnimation.config.options,
|
|
47
|
-
dampFactor: {
|
|
48
|
-
type: Number,
|
|
49
|
-
default: 0.1
|
|
50
|
-
},
|
|
51
|
-
dampPrecision: {
|
|
52
|
-
type: Number,
|
|
53
|
-
default: 1e-3
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Local damped current values.
|
|
59
|
-
*/
|
|
60
|
-
dampedCurrent = {
|
|
61
|
-
x: 0,
|
|
62
|
-
y: 0
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Local damped progress.
|
|
66
|
-
*/
|
|
67
|
-
dampedProgress = {
|
|
68
|
-
x: 0,
|
|
69
|
-
y: 0
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Compute local damped progress.
|
|
73
|
-
*/
|
|
74
|
-
scrolledInView(props) {
|
|
75
|
-
const { dampFactor, dampPrecision } = this.$options;
|
|
76
|
-
updateProps(this, props, dampFactor, dampPrecision, "x");
|
|
77
|
-
updateProps(this, props, dampFactor, dampPrecision, "y");
|
|
78
|
-
props.dampedCurrent = this.dampedCurrent;
|
|
79
|
-
props.dampedProgress = this.dampedProgress;
|
|
80
|
-
super.scrolledInView(props);
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
if (module.exports.default) module.exports = module.exports.default;
|
|
84
|
-
//# sourceMappingURL=ScrollAnimationChild.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../packages/ui/atoms/ScrollAnimation/ScrollAnimationChild.ts"],
|
|
4
|
-
"sourcesContent": ["import type {\n BaseConfig,\n BaseProps,\n ScrollInViewProps,\n WithScrolledInViewProps,\n} from '@studiometa/js-toolkit';\nimport { damp, clamp01 } from '@studiometa/js-toolkit/utils';\nimport { AbstractScrollAnimation } from './AbstractScrollAnimation.js';\n\nexport interface ScrollAnimationChildProps extends BaseProps {\n $options: WithScrolledInViewProps['$options'];\n}\n\nfunction updateProps(\n // eslint-disable-next-line no-use-before-define\n that: ScrollAnimationChild,\n props: ScrollInViewProps,\n dampFactor: number,\n dampPrecision: number,\n axis: 'x' | 'y' = 'x',\n) {\n that.dampedCurrent[axis] = damp(\n props.current[axis],\n that.dampedCurrent[axis],\n dampFactor,\n dampPrecision,\n );\n that.dampedProgress[axis] = clamp01(\n (that.dampedCurrent[axis] - props.start[axis]) / (props.end[axis] - props.start[axis]),\n );\n}\n\n/**\n * ScrollAnimationChild class.\n */\nexport class ScrollAnimationChild<T extends BaseProps = BaseProps> extends AbstractScrollAnimation<\n T & ScrollAnimationChildProps\n> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n name: 'ScrollAnimationChild',\n ...AbstractScrollAnimation.config,\n options: {\n ...AbstractScrollAnimation.config.options,\n dampFactor: {\n type: Number,\n default: 0.1,\n },\n dampPrecision: {\n type: Number,\n default: 0.001,\n },\n },\n };\n\n /**\n * Local damped current values.\n */\n dampedCurrent: ScrollInViewProps['dampedCurrent'] = {\n x: 0,\n y: 0,\n };\n\n /**\n * Local damped progress.\n */\n dampedProgress: ScrollInViewProps['dampedCurrent'] = {\n x: 0,\n y: 0,\n };\n\n /**\n * Compute local damped progress.\n */\n scrolledInView(props: ScrollInViewProps) {\n const { dampFactor, dampPrecision } = this.$options;\n\n updateProps(this, props, dampFactor, dampPrecision, 'x');\n updateProps(this, props, dampFactor, dampPrecision, 'y');\n\n props.dampedCurrent = this.dampedCurrent;\n props.dampedProgress = this.dampedProgress;\n\n super.scrolledInView(props);\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,mBAA8B;AAC9B,qCAAwC;AAMxC,SAAS,YAEP,MACA,OACA,YACA,eACA,OAAkB,KAClB;AACA,OAAK,cAAc,IAAI,QAAI;AAAA,IACzB,MAAM,QAAQ,IAAI;AAAA,IAClB,KAAK,cAAc,IAAI;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AACA,OAAK,eAAe,IAAI,QAAI;AAAA,KACzB,KAAK,cAAc,IAAI,IAAI,MAAM,MAAM,IAAI,MAAM,MAAM,IAAI,IAAI,IAAI,MAAM,MAAM,IAAI;AAAA,EACtF;AACF;AAKO,IAAM,uBAAN,cAAoE,uDAEzE;AAAA;AAAA;AAAA;AAAA,EAIA,OAAO,SAAqB;AAAA,IAC1B,MAAM;AAAA,IACN,GAAG,uDAAwB;AAAA,IAC3B,SAAS;AAAA,MACP,GAAG,uDAAwB,OAAO;AAAA,MAClC,YAAY;AAAA,QACV,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,MACA,eAAe;AAAA,QACb,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,gBAAoD;AAAA,IAClD,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAAA;AAAA;AAAA;AAAA,EAKA,iBAAqD;AAAA,IACnD,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAAA;AAAA;AAAA;AAAA,EAKA,eAAe,OAA0B;AACvC,UAAM,EAAE,YAAY,cAAc,IAAI,KAAK;AAE3C,gBAAY,MAAM,OAAO,YAAY,eAAe,GAAG;AACvD,gBAAY,MAAM,OAAO,YAAY,eAAe,GAAG;AAEvD,UAAM,gBAAgB,KAAK;AAC3B,UAAM,iBAAiB,KAAK;AAE5B,UAAM,eAAe,KAAK;AAAA,EAC5B;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// packages/ui/atoms/ScrollAnimation/ScrollAnimationChildWithEase.ts
|
|
20
|
-
var ScrollAnimationChildWithEase_exports = {};
|
|
21
|
-
__export(ScrollAnimationChildWithEase_exports, {
|
|
22
|
-
ScrollAnimationChildWithEase: () => ScrollAnimationChildWithEase
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(ScrollAnimationChildWithEase_exports);
|
|
25
|
-
var import_ScrollAnimationChild = require("./ScrollAnimationChild.cjs");
|
|
26
|
-
var import_animationScrollWithEase = require("./animationScrollWithEase.cjs");
|
|
27
|
-
var ScrollAnimationChildWithEase = class extends (0, import_animationScrollWithEase.animationScrollWithEase)(import_ScrollAnimationChild.ScrollAnimationChild) {
|
|
28
|
-
/**
|
|
29
|
-
* Config.
|
|
30
|
-
*/
|
|
31
|
-
static config = {
|
|
32
|
-
...import_ScrollAnimationChild.ScrollAnimationChild.config,
|
|
33
|
-
name: "ScrollAnimationChildWithEase"
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
if (module.exports.default) module.exports = module.exports.default;
|
|
37
|
-
//# sourceMappingURL=ScrollAnimationChildWithEase.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../packages/ui/atoms/ScrollAnimation/ScrollAnimationChildWithEase.ts"],
|
|
4
|
-
"sourcesContent": ["import type { BaseConfig } from '@studiometa/js-toolkit';\nimport { ScrollAnimationChild } from './ScrollAnimationChild.js';\nimport { animationScrollWithEase } from './animationScrollWithEase.js';\n\n/**\n * ScrollAnimationChild class.\n */\nexport class ScrollAnimationChildWithEase extends animationScrollWithEase(ScrollAnimationChild) {\n /**\n * Config.\n */\n static config: BaseConfig = {\n ...ScrollAnimationChild.config,\n name: 'ScrollAnimationChildWithEase',\n };\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kCAAqC;AACrC,qCAAwC;AAKjC,IAAM,+BAAN,kBAA2C,wDAAwB,gDAAoB,EAAE;AAAA;AAAA;AAAA;AAAA,EAI9F,OAAO,SAAqB;AAAA,IAC1B,GAAG,iDAAqB;AAAA,IACxB,MAAM;AAAA,EACR;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// packages/ui/atoms/ScrollAnimation/ScrollAnimationParent.ts
|
|
20
|
-
var ScrollAnimationParent_exports = {};
|
|
21
|
-
__export(ScrollAnimationParent_exports, {
|
|
22
|
-
ScrollAnimationParent: () => ScrollAnimationParent
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(ScrollAnimationParent_exports);
|
|
25
|
-
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
26
|
-
var import_ScrollAnimationChild = require("./ScrollAnimationChild.cjs");
|
|
27
|
-
var ScrollAnimationParent = class extends (0, import_js_toolkit.withScrolledInView)(
|
|
28
|
-
import_js_toolkit.Base,
|
|
29
|
-
{}
|
|
30
|
-
) {
|
|
31
|
-
/**
|
|
32
|
-
* Config.
|
|
33
|
-
*/
|
|
34
|
-
static config = {
|
|
35
|
-
name: "ScrollAnimationParent",
|
|
36
|
-
components: {
|
|
37
|
-
ScrollAnimationChild: import_ScrollAnimationChild.ScrollAnimationChild
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Scrolled in view hook.
|
|
42
|
-
*/
|
|
43
|
-
scrolledInView(props) {
|
|
44
|
-
this.$children.ScrollAnimationChild.forEach((child) => {
|
|
45
|
-
child.scrolledInView(props);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
if (module.exports.default) module.exports = module.exports.default;
|
|
50
|
-
//# sourceMappingURL=ScrollAnimationParent.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../packages/ui/atoms/ScrollAnimation/ScrollAnimationParent.ts"],
|
|
4
|
-
"sourcesContent": ["import { Base, ScrollInViewProps, withScrolledInView } from '@studiometa/js-toolkit';\nimport type { BaseConfig, BaseProps } from '@studiometa/js-toolkit';\nimport { ScrollAnimationChild } from './ScrollAnimationChild.js';\n\nexport interface ScrollAnimationParentProps extends BaseProps {\n $children: {\n ScrollAnimationChild: ScrollAnimationChild[];\n };\n}\n\n/**\n * ScrollAnimationParent class.\n */\nexport class ScrollAnimationParent<T extends BaseProps = BaseProps> extends withScrolledInView(\n Base,\n {},\n)<T & ScrollAnimationParentProps> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n name: 'ScrollAnimationParent',\n components: {\n ScrollAnimationChild,\n },\n };\n\n /**\n * Scrolled in view hook.\n */\n scrolledInView(props: ScrollInViewProps) {\n this.$children.ScrollAnimationChild.forEach((child) => {\n child.scrolledInView(props);\n });\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA4D;AAE5D,kCAAqC;AAW9B,IAAM,wBAAN,kBAAqE;AAAA,EAC1E;AAAA,EACA,CAAC;AACH,EAAkC;AAAA;AAAA;AAAA;AAAA,EAIhC,OAAO,SAAqB;AAAA,IAC1B,MAAM;AAAA,IACN,YAAY;AAAA,MACV;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,eAAe,OAA0B;AACvC,SAAK,UAAU,qBAAqB,QAAQ,CAAC,UAAU;AACrD,YAAM,eAAe,KAAK;AAAA,IAC5B,CAAC;AAAA,EACH;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|