@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.
Files changed (163) hide show
  1. package/atoms/AnchorScrollTo/AnchorScrollTo.cjs +8 -13
  2. package/atoms/AnchorScrollTo/AnchorScrollTo.js +1 -26
  3. package/atoms/Button/Button.twig +68 -0
  4. package/atoms/Button/StyledButton.twig +47 -0
  5. package/atoms/Cursor/Cursor.cjs +14 -22
  6. package/atoms/Cursor/Cursor.d.ts +2 -2
  7. package/atoms/Cursor/Cursor.js +1 -103
  8. package/atoms/Cursor/Cursor.twig +28 -0
  9. package/atoms/Figure/Figure.cjs +20 -16
  10. package/atoms/Figure/Figure.d.ts +19 -1
  11. package/atoms/Figure/Figure.js +1 -27
  12. package/atoms/Figure/Figure.twig +120 -0
  13. package/atoms/Figure/FigureTwicPics.cjs +72 -0
  14. package/atoms/Figure/FigureTwicPics.d.ts +48 -0
  15. package/atoms/Figure/FigureTwicPics.js +1 -0
  16. package/atoms/Figure/index.cjs +31 -0
  17. package/atoms/Figure/index.d.ts +2 -0
  18. package/atoms/Figure/index.js +1 -0
  19. package/atoms/Icon/Icon.twig +13 -0
  20. package/atoms/LargeText/LargeText.cjs +15 -23
  21. package/atoms/LargeText/LargeText.d.ts +3 -3
  22. package/atoms/LargeText/LargeText.js +1 -64
  23. package/atoms/LargeText/LargeText.twig +49 -0
  24. package/atoms/LazyInclude/LazyInclude.cjs +8 -13
  25. package/atoms/LazyInclude/LazyInclude.d.ts +4 -4
  26. package/atoms/LazyInclude/LazyInclude.js +1 -46
  27. package/atoms/Prefetch/AbstractPrefetch.cjs +8 -13
  28. package/atoms/Prefetch/AbstractPrefetch.d.ts +1 -1
  29. package/atoms/Prefetch/AbstractPrefetch.js +1 -58
  30. package/atoms/Prefetch/PrefetchWhenOver.cjs +12 -34
  31. package/atoms/Prefetch/PrefetchWhenOver.d.ts +1 -1
  32. package/atoms/Prefetch/PrefetchWhenOver.js +1 -35
  33. package/atoms/Prefetch/PrefetchWhenVisible.cjs +12 -34
  34. package/atoms/Prefetch/PrefetchWhenVisible.d.ts +1 -1
  35. package/atoms/Prefetch/PrefetchWhenVisible.js +1 -36
  36. package/atoms/Prefetch/index.cjs +9 -16
  37. package/atoms/Prefetch/index.js +1 -8
  38. package/atoms/ScrollAnimation/AbstractScrollAnimation.cjs +126 -0
  39. package/atoms/ScrollAnimation/AbstractScrollAnimation.d.ts +133 -0
  40. package/atoms/ScrollAnimation/AbstractScrollAnimation.js +1 -0
  41. package/atoms/ScrollAnimation/ScrollAnimation.cjs +51 -0
  42. package/atoms/ScrollAnimation/ScrollAnimation.d.ts +55 -0
  43. package/atoms/ScrollAnimation/ScrollAnimation.js +1 -0
  44. package/atoms/ScrollAnimation/ScrollAnimationChild.cjs +51 -0
  45. package/atoms/ScrollAnimation/ScrollAnimationChild.d.ts +13 -0
  46. package/atoms/ScrollAnimation/ScrollAnimationChild.js +1 -0
  47. package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.cjs +41 -0
  48. package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.d.ts +6 -0
  49. package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.js +1 -0
  50. package/atoms/ScrollAnimation/ScrollAnimationParent.cjs +48 -0
  51. package/atoms/ScrollAnimation/ScrollAnimationParent.d.ts +35 -0
  52. package/atoms/ScrollAnimation/ScrollAnimationParent.js +1 -0
  53. package/atoms/ScrollAnimation/ScrollAnimationWithEase.cjs +41 -0
  54. package/atoms/ScrollAnimation/ScrollAnimationWithEase.d.ts +6 -0
  55. package/atoms/ScrollAnimation/ScrollAnimationWithEase.js +1 -0
  56. package/atoms/ScrollAnimation/animationScrollWithEase.cjs +70 -0
  57. package/atoms/ScrollAnimation/animationScrollWithEase.d.ts +11 -0
  58. package/atoms/ScrollAnimation/animationScrollWithEase.js +1 -0
  59. package/atoms/ScrollAnimation/index.cjs +41 -0
  60. package/atoms/ScrollAnimation/index.d.ts +7 -0
  61. package/atoms/ScrollAnimation/index.js +1 -0
  62. package/atoms/index.cjs +13 -19
  63. package/atoms/index.d.ts +2 -1
  64. package/atoms/index.js +1 -13
  65. package/index.cjs +12 -15
  66. package/index.d.ts +1 -0
  67. package/index.js +1 -3
  68. package/molecules/Accordion/Accordion.cjs +12 -34
  69. package/molecules/Accordion/Accordion.js +1 -35
  70. package/molecules/Accordion/Accordion.twig +54 -0
  71. package/molecules/Accordion/AccordionCore.cjs +8 -13
  72. package/molecules/Accordion/AccordionCore.d.ts +2 -2
  73. package/molecules/Accordion/AccordionCore.js +1 -34
  74. package/molecules/Accordion/AccordionItem.cjs +70 -114
  75. package/molecules/Accordion/AccordionItem.d.ts +7 -6
  76. package/molecules/Accordion/AccordionItem.js +1 -178
  77. package/molecules/Menu/Menu.cjs +148 -0
  78. package/molecules/Menu/Menu.d.ts +140 -0
  79. package/molecules/Menu/Menu.js +1 -0
  80. package/molecules/Menu/MenuBtn.cjs +53 -0
  81. package/molecules/Menu/MenuBtn.d.ts +39 -0
  82. package/molecules/Menu/MenuBtn.js +1 -0
  83. package/molecules/Menu/MenuList.cjs +134 -0
  84. package/molecules/Menu/MenuList.d.ts +101 -0
  85. package/molecules/Menu/MenuList.js +1 -0
  86. package/molecules/Menu/index.cjs +33 -0
  87. package/molecules/Menu/index.d.ts +3 -0
  88. package/molecules/Menu/index.js +1 -0
  89. package/molecules/Modal/Modal.cjs +42 -71
  90. package/molecules/Modal/Modal.d.ts +5 -5
  91. package/molecules/Modal/Modal.js +1 -150
  92. package/molecules/Modal/Modal.twig +108 -0
  93. package/molecules/Modal/ModalWithTransition.cjs +13 -43
  94. package/molecules/Modal/ModalWithTransition.js +1 -69
  95. package/molecules/Modal/StyledModal.twig +39 -0
  96. package/molecules/Panel/Panel.cjs +42 -76
  97. package/molecules/Panel/Panel.js +1 -117
  98. package/molecules/Panel/Panel.twig +73 -0
  99. package/molecules/Panel/StyledPanel.twig +28 -0
  100. package/molecules/Slider/AbstractSliderChild.cjs +10 -20
  101. package/molecules/Slider/AbstractSliderChild.d.ts +6 -2
  102. package/molecules/Slider/AbstractSliderChild.js +1 -43
  103. package/molecules/Slider/Slider.cjs +14 -24
  104. package/molecules/Slider/Slider.d.ts +6 -6
  105. package/molecules/Slider/Slider.js +1 -209
  106. package/molecules/Slider/SliderBtn.cjs +9 -16
  107. package/molecules/Slider/SliderBtn.d.ts +1 -1
  108. package/molecules/Slider/SliderBtn.js +1 -34
  109. package/molecules/Slider/SliderCount.cjs +9 -16
  110. package/molecules/Slider/SliderCount.js +1 -19
  111. package/molecules/Slider/SliderDots.cjs +9 -16
  112. package/molecules/Slider/SliderDots.js +1 -24
  113. package/molecules/Slider/SliderDrag.cjs +8 -13
  114. package/molecules/Slider/SliderDrag.js +1 -19
  115. package/molecules/Slider/SliderItem.cjs +14 -37
  116. package/molecules/Slider/SliderItem.js +1 -105
  117. package/molecules/Slider/SliderProgress.cjs +9 -16
  118. package/molecules/Slider/SliderProgress.js +1 -23
  119. package/molecules/Slider/index.cjs +9 -16
  120. package/molecules/Slider/index.js +1 -18
  121. package/molecules/Sticky/Sticky.cjs +11 -19
  122. package/molecules/Sticky/Sticky.d.ts +8 -8
  123. package/molecules/Sticky/Sticky.js +1 -107
  124. package/molecules/Sticky/Sticky.twig +31 -0
  125. package/molecules/TableOfContent/TableOfContent.cjs +9 -16
  126. package/molecules/TableOfContent/TableOfContent.d.ts +1 -1
  127. package/molecules/TableOfContent/TableOfContent.js +1 -42
  128. package/molecules/TableOfContent/TableOfContentAnchor.cjs +8 -13
  129. package/molecules/TableOfContent/TableOfContentAnchor.js +1 -39
  130. package/molecules/TableOfContent/index.cjs +9 -16
  131. package/molecules/TableOfContent/index.js +1 -6
  132. package/molecules/Tabs/Tabs.cjs +54 -82
  133. package/molecules/Tabs/Tabs.d.ts +5 -4
  134. package/molecules/Tabs/Tabs.js +1 -126
  135. package/molecules/Tabs/Tabs.twig +20 -0
  136. package/molecules/index.cjs +13 -18
  137. package/molecules/index.d.ts +1 -0
  138. package/molecules/index.js +1 -18
  139. package/organisms/Frame/Frame.cjs +107 -99
  140. package/organisms/Frame/Frame.d.ts +37 -4
  141. package/organisms/Frame/Frame.js +1 -171
  142. package/organisms/Frame/FrameAnchor.cjs +8 -13
  143. package/organisms/Frame/FrameAnchor.js +1 -22
  144. package/organisms/Frame/FrameForm.cjs +8 -13
  145. package/organisms/Frame/FrameForm.js +1 -22
  146. package/organisms/Frame/FrameTarget.cjs +31 -73
  147. package/organisms/Frame/FrameTarget.js +1 -109
  148. package/organisms/Frame/index.cjs +9 -16
  149. package/organisms/Frame/index.js +1 -10
  150. package/organisms/ImageGrid/ImageGrid.twig +42 -0
  151. package/organisms/index.cjs +9 -13
  152. package/organisms/index.js +1 -1
  153. package/package.json +3 -4
  154. package/primitives/Draggable/Draggable.cjs +15 -28
  155. package/primitives/Draggable/Draggable.d.ts +0 -5
  156. package/primitives/Draggable/Draggable.js +1 -38
  157. package/primitives/Sentinel/Sentinel.cjs +8 -13
  158. package/primitives/Sentinel/Sentinel.js +1 -15
  159. package/primitives/Transition/Transition.cjs +12 -17
  160. package/primitives/Transition/Transition.d.ts +2 -4
  161. package/primitives/Transition/Transition.js +1 -45
  162. package/primitives/index.cjs +9 -16
  163. package/primitives/index.js +1 -8
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @typedef {ScrollAnimation & { $refs: { target: HTMLElement }}} ScrollAnimationInterface
3
+ */
4
+ /**
5
+ * ScrollAnimation class.
6
+ */
7
+ export default class ScrollAnimation extends AbstractScrollAnimation {
8
+ /**
9
+ * Config.
10
+ */
11
+ static config: {
12
+ name: string;
13
+ refs: string[];
14
+ options: {
15
+ playRange: {
16
+ type: ArrayConstructor;
17
+ default: () => number[];
18
+ };
19
+ dampFactor: {
20
+ type: NumberConstructor;
21
+ default: number;
22
+ };
23
+ dampPrecision: {
24
+ type: NumberConstructor;
25
+ default: number;
26
+ };
27
+ from: {
28
+ type: ObjectConstructor;
29
+ default: () => import("./AbstractScrollAnimation.js").AnimationOptions;
30
+ merge: boolean;
31
+ };
32
+ to: {
33
+ type: ObjectConstructor;
34
+ default: () => import("./AbstractScrollAnimation.js").AnimationOptions;
35
+ merge: boolean;
36
+ };
37
+ };
38
+ };
39
+ /**
40
+ * Get the damp factor from the freezed options.
41
+ * @returns {number}
42
+ */
43
+ get dampFactor(): number;
44
+ /**
45
+ * Get the damp precision from the freezed options.
46
+ * @returns {number}
47
+ */
48
+ get dampPrecision(): number;
49
+ }
50
+ export type ScrollAnimationInterface = ScrollAnimation & {
51
+ $refs: {
52
+ target: HTMLElement;
53
+ };
54
+ };
55
+ import AbstractScrollAnimation from "./AbstractScrollAnimation.js";
@@ -0,0 +1 @@
1
+ import{withScrolledInView as r}from"@studiometa/js-toolkit";import t from"./AbstractScrollAnimation.js";class i extends r(t,{}){static config={...t.config,name:"ScrollAnimation",refs:["target"]};get target(){return this.$refs.target}get dampFactor(){return this.$options.dampFactor}get dampPrecision(){return this.$options.dampPrecision}}export{i 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/ScrollAnimationChild.js
28
+ var ScrollAnimationChild_exports = {};
29
+ __export(ScrollAnimationChild_exports, {
30
+ default: () => ScrollAnimationChild
31
+ });
32
+ module.exports = __toCommonJS(ScrollAnimationChild_exports);
33
+ var import_utils = require("@studiometa/js-toolkit/utils");
34
+ var import_AbstractScrollAnimation = __toESM(require("./AbstractScrollAnimation.cjs"), 1);
35
+ var ScrollAnimationChild = class extends import_AbstractScrollAnimation.default {
36
+ dampedProgress = {
37
+ x: 0,
38
+ y: 0
39
+ };
40
+ scrolledInView(props) {
41
+ this.dampedProgress.y = (0, import_utils.damp)(props.progress.y, this.dampedProgress.y, this.$options.dampFactor, this.$options.dampPrecision);
42
+ this.dampedProgress.x = (0, import_utils.damp)(props.progress.x, this.dampedProgress.x, this.$options.dampFactor, this.$options.dampPrecision);
43
+ props.dampedProgress = this.dampedProgress;
44
+ super.scrolledInView(props);
45
+ }
46
+ };
47
+ __publicField(ScrollAnimationChild, "config", {
48
+ name: "ScrollAnimationChild",
49
+ ...import_AbstractScrollAnimation.default.config
50
+ });
51
+ if (module.exports.default) module.exports = module.exports.default;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * ScrollAnimationChild class.
3
+ */
4
+ export default class ScrollAnimationChild extends AbstractScrollAnimation {
5
+ /**
6
+ * Local damped progress.
7
+ */
8
+ dampedProgress: {
9
+ x: number;
10
+ y: number;
11
+ };
12
+ }
13
+ import AbstractScrollAnimation from "./AbstractScrollAnimation.js";
@@ -0,0 +1 @@
1
+ import{damp as o}from"@studiometa/js-toolkit/utils";import i from"./AbstractScrollAnimation.js";class r extends i{static config={name:"ScrollAnimationChild",...i.config};dampedProgress={x:0,y:0};scrolledInView(s){this.dampedProgress.y=o(s.progress.y,this.dampedProgress.y,this.$options.dampFactor,this.$options.dampPrecision),this.dampedProgress.x=o(s.progress.x,this.dampedProgress.x,this.$options.dampFactor,this.$options.dampPrecision),s.dampedProgress=this.dampedProgress,super.scrolledInView(s)}}export{r as default};
@@ -0,0 +1,41 @@
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/ScrollAnimationChildWithEase.js
28
+ var ScrollAnimationChildWithEase_exports = {};
29
+ __export(ScrollAnimationChildWithEase_exports, {
30
+ default: () => ScrollAnimationChildWithEase
31
+ });
32
+ module.exports = __toCommonJS(ScrollAnimationChildWithEase_exports);
33
+ var import_ScrollAnimationChild = __toESM(require("./ScrollAnimationChild.cjs"), 1);
34
+ var import_animationScrollWithEase = __toESM(require("./animationScrollWithEase.cjs"), 1);
35
+ var ScrollAnimationChildWithEase = class extends (0, import_animationScrollWithEase.default)(import_ScrollAnimationChild.default) {
36
+ };
37
+ __publicField(ScrollAnimationChildWithEase, "config", {
38
+ ...import_ScrollAnimationChild.default.config,
39
+ name: "ScrollAnimationChildWithEase"
40
+ });
41
+ if (module.exports.default) module.exports = module.exports.default;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * ScrollAnimationChild class.
3
+ */
4
+ export default class ScrollAnimationChildWithEase extends ScrollAnimationChild {
5
+ }
6
+ import ScrollAnimationChild from "./ScrollAnimationChild.js";
@@ -0,0 +1 @@
1
+ import i from"./ScrollAnimationChild.js";import o from"./animationScrollWithEase.js";class t extends o(i){static config={...i.config,name:"ScrollAnimationChildWithEase"}}export{t as default};
@@ -0,0 +1,48 @@
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/ScrollAnimationParent.js
28
+ var ScrollAnimationParent_exports = {};
29
+ __export(ScrollAnimationParent_exports, {
30
+ default: () => ScrollAnimationParent
31
+ });
32
+ module.exports = __toCommonJS(ScrollAnimationParent_exports);
33
+ var import_js_toolkit = require("@studiometa/js-toolkit");
34
+ var import_ScrollAnimationChild = __toESM(require("./ScrollAnimationChild.cjs"), 1);
35
+ var ScrollAnimationParent = class extends (0, import_js_toolkit.withScrolledInView)(import_js_toolkit.Base, {}) {
36
+ scrolledInView(props) {
37
+ this.$children.ScrollAnimationChild.forEach((child) => {
38
+ child.scrolledInView(props);
39
+ });
40
+ }
41
+ };
42
+ __publicField(ScrollAnimationParent, "config", {
43
+ name: "ScrollAnimationParent",
44
+ components: {
45
+ ScrollAnimationChild: import_ScrollAnimationChild.default
46
+ }
47
+ });
48
+ if (module.exports.default) module.exports = module.exports.default;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @typedef {ScrollAnimationParent & {
3
+ * $children: {
4
+ * ScrollAnimationChild: ScrollAnimationChild[],
5
+ * },
6
+ * }} ScrollAnimationInterface
7
+ */
8
+ /**
9
+ * ScrollAnimationParent class.
10
+ */
11
+ export default class ScrollAnimationParent extends Base {
12
+ /**
13
+ * Config.
14
+ */
15
+ static config: {
16
+ name: string;
17
+ components: {
18
+ ScrollAnimationChild: typeof ScrollAnimationChild;
19
+ };
20
+ };
21
+ /**
22
+ * @todo Optimize default value read
23
+ * @todo do not add unnecessary styles
24
+ * @todo freeze options for better perf
25
+ * @this {ScrollAnimationInterface}
26
+ */
27
+ scrolledInView(this: ScrollAnimationInterface, props: any): void;
28
+ }
29
+ export type ScrollAnimationInterface = ScrollAnimationParent & {
30
+ $children: {
31
+ ScrollAnimationChild: ScrollAnimationChild[];
32
+ };
33
+ };
34
+ import { Base } from "@studiometa/js-toolkit";
35
+ import ScrollAnimationChild from "./ScrollAnimationChild.js";
@@ -0,0 +1 @@
1
+ import{Base as l,withScrolledInView as n}from"@studiometa/js-toolkit";import e from"./ScrollAnimationChild.js";class r extends n(l,{}){static config={name:"ScrollAnimationParent",components:{ScrollAnimationChild:e}};scrolledInView(i){this.$children.ScrollAnimationChild.forEach(o=>{o.scrolledInView(i)})}}export{r as default};
@@ -0,0 +1,41 @@
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/ScrollAnimationWithEase.js
28
+ var ScrollAnimationWithEase_exports = {};
29
+ __export(ScrollAnimationWithEase_exports, {
30
+ default: () => ScrollAnimationWithEase
31
+ });
32
+ module.exports = __toCommonJS(ScrollAnimationWithEase_exports);
33
+ var import_ScrollAnimation = __toESM(require("./ScrollAnimation.cjs"), 1);
34
+ var import_animationScrollWithEase = __toESM(require("./animationScrollWithEase.cjs"), 1);
35
+ var ScrollAnimationWithEase = class extends (0, import_animationScrollWithEase.default)(import_ScrollAnimation.default) {
36
+ };
37
+ __publicField(ScrollAnimationWithEase, "config", {
38
+ ...import_ScrollAnimation.default.config,
39
+ name: "ScrollAnimationWithEase"
40
+ });
41
+ if (module.exports.default) module.exports = module.exports.default;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * ScrollAnimation class.
3
+ */
4
+ export default class ScrollAnimationWithEase extends ScrollAnimation {
5
+ }
6
+ import ScrollAnimation from "./ScrollAnimation.js";
@@ -0,0 +1 @@
1
+ import i from"./ScrollAnimation.js";import o from"./animationScrollWithEase.js";class t extends o(i){static config={...i.config,name:"ScrollAnimationWithEase"}}export{t as default};
@@ -0,0 +1,70 @@
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/animationScrollWithEase.js
20
+ var animationScrollWithEase_exports = {};
21
+ __export(animationScrollWithEase_exports, {
22
+ default: () => animationScrollWithEase
23
+ });
24
+ module.exports = __toCommonJS(animationScrollWithEase_exports);
25
+ var import_utils = require("@studiometa/js-toolkit/utils");
26
+ var eases = {
27
+ outQuad: import_utils.easeOutQuad,
28
+ inQuad: import_utils.easeInQuad,
29
+ inOutQuad: import_utils.easeInOutQuad,
30
+ outCubic: import_utils.easeOutCubic,
31
+ inCubic: import_utils.easeInCubic,
32
+ inOutCubic: import_utils.easeInOutCubic,
33
+ outQuart: import_utils.easeOutQuart,
34
+ inQuart: import_utils.easeInQuart,
35
+ inOutQuart: import_utils.easeInOutQuart,
36
+ outQuint: import_utils.easeOutQuint,
37
+ inQuint: import_utils.easeInQuint,
38
+ inOutQuint: import_utils.easeInOutQuint,
39
+ outSine: import_utils.easeOutSine,
40
+ inSine: import_utils.easeInSine,
41
+ inOutSine: import_utils.easeInOutSine,
42
+ outCirc: import_utils.easeOutCirc,
43
+ inCirc: import_utils.easeInCirc,
44
+ inOutCirc: import_utils.easeInOutCirc,
45
+ outExpo: import_utils.easeOutExpo,
46
+ inExpo: import_utils.easeInExpo,
47
+ inOutExpo: import_utils.easeInOutExpo
48
+ };
49
+ function animationScrollWithEase(ScrollAnimation) {
50
+ return class extends ScrollAnimation {
51
+ static config = {
52
+ ...ScrollAnimation.config,
53
+ name: `${ScrollAnimation.config.name}WithEase`,
54
+ options: {
55
+ ...ScrollAnimation.config.options,
56
+ ease: {
57
+ type: String,
58
+ default: "outExpo"
59
+ }
60
+ }
61
+ };
62
+ render(progress) {
63
+ if (eases[this.$options.ease]) {
64
+ progress = eases[this.$options.ease](progress);
65
+ }
66
+ super.render(progress);
67
+ }
68
+ };
69
+ }
70
+ if (module.exports.default) module.exports = module.exports.default;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @typedef {import('./AbstractScrollAnimation.js').AbstractScrollAnimationConstructor} AbstractScrollAnimationConstructor
3
+ */
4
+ /**
5
+ * Extend a `ScrollAnimation` component to use easings.
6
+ * @template {AbstractScrollAnimationConstructor} T
7
+ * @param {T} ScrollAnimation A child class of the `AbstractScrollAnimation` class.
8
+ * @returns {T}
9
+ */
10
+ export default function animationScrollWithEase<T extends typeof import("./AbstractScrollAnimation.js").default>(ScrollAnimation: T): T;
11
+ export type AbstractScrollAnimationConstructor = import('./AbstractScrollAnimation.js').AbstractScrollAnimationConstructor;
@@ -0,0 +1 @@
1
+ import{easeOutQuad as n,easeInQuad as i,easeInOutQuad as a,easeOutCubic as s,easeInCubic as o,easeInOutCubic as O,easeOutQuart as c,easeInQuart as Q,easeInOutQuart as r,easeOutQuint as I,easeInQuint as p,easeInOutQuint as C,easeOutSine as d,easeInSine as f,easeInOutSine as x,easeOutCirc as E,easeInCirc as b,easeInOutCirc as S,easeOutExpo as h,easeInExpo as g,easeInOutExpo as $}from"@studiometa/js-toolkit/utils";const u={outQuad:n,inQuad:i,inOutQuad:a,outCubic:s,inCubic:o,inOutCubic:O,outQuart:c,inQuart:Q,inOutQuart:r,outQuint:I,inQuint:p,inOutQuint:C,outSine:d,inSine:f,inOutSine:x,outCirc:E,inCirc:b,inOutCirc:S,outExpo:h,inExpo:g,inOutExpo:$};function m(e){return class extends e{static config={...e.config,name:`${e.config.name}WithEase`,options:{...e.config.options,ease:{type:String,default:"outExpo"}}};render(t){u[this.$options.ease]&&(t=u[this.$options.ease](t)),super.render(t)}}}export{m as default};
@@ -0,0 +1,41 @@
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 __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
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 });
16
+ }
17
+ return to;
18
+ };
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);
21
+
22
+ // packages/ui/atoms/ScrollAnimation/index.js
23
+ var ScrollAnimation_exports = {};
24
+ __export(ScrollAnimation_exports, {
25
+ AbstractScrollAnimation: () => import_AbstractScrollAnimation.default,
26
+ ScrollAnimation: () => import_ScrollAnimation.default,
27
+ ScrollAnimationChild: () => import_ScrollAnimationChild.default,
28
+ ScrollAnimationChildWithEase: () => import_ScrollAnimationChildWithEase.default,
29
+ ScrollAnimationParent: () => import_ScrollAnimationParent.default,
30
+ ScrollAnimationWithEase: () => import_ScrollAnimationWithEase.default,
31
+ animationScrollWithEase: () => import_animationScrollWithEase.default
32
+ });
33
+ module.exports = __toCommonJS(ScrollAnimation_exports);
34
+ var import_AbstractScrollAnimation = __toESM(require("./AbstractScrollAnimation.cjs"), 1);
35
+ var import_animationScrollWithEase = __toESM(require("./animationScrollWithEase.cjs"), 1);
36
+ var import_ScrollAnimation = __toESM(require("./ScrollAnimation.cjs"), 1);
37
+ var import_ScrollAnimationWithEase = __toESM(require("./ScrollAnimationWithEase.cjs"), 1);
38
+ var import_ScrollAnimationChild = __toESM(require("./ScrollAnimationChild.cjs"), 1);
39
+ var import_ScrollAnimationChildWithEase = __toESM(require("./ScrollAnimationChildWithEase.cjs"), 1);
40
+ var import_ScrollAnimationParent = __toESM(require("./ScrollAnimationParent.cjs"), 1);
41
+ if (module.exports.default) module.exports = module.exports.default;
@@ -0,0 +1,7 @@
1
+ export { default as AbstractScrollAnimation } from "./AbstractScrollAnimation.js";
2
+ export { default as animationScrollWithEase } from "./animationScrollWithEase.js";
3
+ export { default as ScrollAnimation } from "./ScrollAnimation.js";
4
+ export { default as ScrollAnimationWithEase } from "./ScrollAnimationWithEase.js";
5
+ export { default as ScrollAnimationChild } from "./ScrollAnimationChild.js";
6
+ export { default as ScrollAnimationChildWithEase } from "./ScrollAnimationChildWithEase.js";
7
+ export { default as ScrollAnimationParent } from "./ScrollAnimationParent.js";
@@ -0,0 +1 @@
1
+ import{default as t}from"./AbstractScrollAnimation.js";import{default as r}from"./animationScrollWithEase.js";import{default as e}from"./ScrollAnimation.js";import{default as f}from"./ScrollAnimationWithEase.js";import{default as s}from"./ScrollAnimationChild.js";import{default as c}from"./ScrollAnimationChildWithEase.js";import{default as u}from"./ScrollAnimationParent.js";export{t as AbstractScrollAnimation,e as ScrollAnimation,s as ScrollAnimationChild,c as ScrollAnimationChildWithEase,u as ScrollAnimationParent,f as ScrollAnimationWithEase,r as animationScrollWithEase};
package/atoms/index.cjs CHANGED
@@ -4,42 +4,36 @@ 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 __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
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 target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
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);
28
22
 
29
23
  // packages/ui/atoms/index.js
30
24
  var atoms_exports = {};
31
25
  __export(atoms_exports, {
32
26
  AnchorScrollTo: () => import_AnchorScrollTo.default,
33
27
  Cursor: () => import_Cursor.default,
34
- Figure: () => import_Figure.default,
35
28
  LargeText: () => import_LargeText.default,
36
29
  LazyInclude: () => import_LazyInclude.default
37
30
  });
38
- __reExport(atoms_exports, require("./Prefetch/index.cjs"));
31
+ module.exports = __toCommonJS(atoms_exports);
32
+ __reExport(atoms_exports, require("./Figure/index.cjs"), module.exports);
33
+ __reExport(atoms_exports, require("./Prefetch/index.cjs"), module.exports);
34
+ __reExport(atoms_exports, require("./ScrollAnimation/index.cjs"), module.exports);
39
35
  var import_AnchorScrollTo = __toESM(require("./AnchorScrollTo/AnchorScrollTo.cjs"), 1);
40
36
  var import_Cursor = __toESM(require("./Cursor/Cursor.cjs"), 1);
41
- var import_Figure = __toESM(require("./Figure/Figure.cjs"), 1);
42
37
  var import_LargeText = __toESM(require("./LargeText/LargeText.cjs"), 1);
43
38
  var import_LazyInclude = __toESM(require("./LazyInclude/LazyInclude.cjs"), 1);
44
- module.exports = __toCommonJS(atoms_exports);
45
39
  if (module.exports.default) module.exports = module.exports.default;
package/atoms/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
+ export * from "./Figure/index.js";
1
2
  export * from "./Prefetch/index.js";
3
+ export * from "./ScrollAnimation/index.js";
2
4
  export { default as AnchorScrollTo } from "./AnchorScrollTo/AnchorScrollTo.js";
3
5
  export { default as Cursor } from "./Cursor/Cursor.js";
4
- export { default as Figure } from "./Figure/Figure.js";
5
6
  export { default as LargeText } from "./LargeText/LargeText.js";
6
7
  export { default as LazyInclude } from "./LazyInclude/LazyInclude.js";
package/atoms/index.js CHANGED
@@ -1,13 +1 @@
1
- export * from "./Prefetch/index.js";
2
- import { default as default2 } from "./AnchorScrollTo/AnchorScrollTo.js";
3
- import { default as default3 } from "./Cursor/Cursor.js";
4
- import { default as default4 } from "./Figure/Figure.js";
5
- import { default as default5 } from "./LargeText/LargeText.js";
6
- import { default as default6 } from "./LazyInclude/LazyInclude.js";
7
- export {
8
- default2 as AnchorScrollTo,
9
- default3 as Cursor,
10
- default4 as Figure,
11
- default5 as LargeText,
12
- default6 as LazyInclude
13
- };
1
+ export*from"./Figure/index.js";export*from"./Prefetch/index.js";export*from"./ScrollAnimation/index.js";import{default as a}from"./AnchorScrollTo/AnchorScrollTo.js";import{default as l}from"./Cursor/Cursor.js";import{default as p}from"./LargeText/LargeText.js";import{default as d}from"./LazyInclude/LazyInclude.js";export{a as AnchorScrollTo,l as Cursor,p as LargeText,d as LazyInclude};
package/index.cjs CHANGED
@@ -2,25 +2,22 @@ var __defProp = Object.defineProperty;
2
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
6
- var __reExport = (target, module2, copyDefault, desc) => {
7
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
8
- for (let key of __getOwnPropNames(module2))
9
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
10
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
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 });
11
10
  }
12
- return target;
11
+ return to;
13
12
  };
14
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
15
- return (module2, temp) => {
16
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
17
- };
18
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
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);
19
15
 
20
16
  // packages/ui/index.js
21
17
  var ui_exports = {};
22
- __reExport(ui_exports, require("./primitives/index.cjs"));
23
- __reExport(ui_exports, require("./atoms/index.cjs"));
24
- __reExport(ui_exports, require("./molecules/index.cjs"));
25
18
  module.exports = __toCommonJS(ui_exports);
19
+ __reExport(ui_exports, require("./primitives/index.cjs"), module.exports);
20
+ __reExport(ui_exports, require("./atoms/index.cjs"), module.exports);
21
+ __reExport(ui_exports, require("./molecules/index.cjs"), module.exports);
22
+ __reExport(ui_exports, require("./organisms/index.cjs"), module.exports);
26
23
  if (module.exports.default) module.exports = module.exports.default;
package/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./primitives/index.js";
2
2
  export * from "./atoms/index.js";
3
3
  export * from "./molecules/index.js";
4
+ export * from "./organisms/index.js";
package/index.js CHANGED
@@ -1,3 +1 @@
1
- export * from "./primitives/index.js";
2
- export * from "./atoms/index.js";
3
- export * from "./molecules/index.js";
1
+ export*from"./primitives/index.js";export*from"./atoms/index.js";export*from"./molecules/index.js";export*from"./organisms/index.js";