@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
|
@@ -0,0 +1,72 @@
|
|
|
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/Figure/FigureTwicPics.js
|
|
28
|
+
var FigureTwicPics_exports = {};
|
|
29
|
+
__export(FigureTwicPics_exports, {
|
|
30
|
+
default: () => FigureTwicPics
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(FigureTwicPics_exports);
|
|
33
|
+
var import_Figure = __toESM(require("./Figure.cjs"), 1);
|
|
34
|
+
function normalizeSize(that, prop) {
|
|
35
|
+
const { step } = that.$options;
|
|
36
|
+
return Math.ceil(that.$refs.img[prop] / step) * step;
|
|
37
|
+
}
|
|
38
|
+
var FigureTwicPics = class extends import_Figure.default {
|
|
39
|
+
get domain() {
|
|
40
|
+
const url = new URL(this.$refs.img.dataset.src);
|
|
41
|
+
return url.host;
|
|
42
|
+
}
|
|
43
|
+
set src(value) {
|
|
44
|
+
const url = new URL(value);
|
|
45
|
+
url.host = this.domain;
|
|
46
|
+
const width = normalizeSize(this, "offsetWidth");
|
|
47
|
+
const height = normalizeSize(this, "offsetHeight");
|
|
48
|
+
url.searchParams.set("twic", ["v1", this.$options.transform, `${this.$options.mode}=${width}x${height}`].filter(Boolean).join("/"));
|
|
49
|
+
url.search = decodeURIComponent(url.search);
|
|
50
|
+
super.src = url.toString();
|
|
51
|
+
}
|
|
52
|
+
resized() {
|
|
53
|
+
this.src = this.$refs.img.dataset.src;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
__publicField(FigureTwicPics, "config", {
|
|
57
|
+
...import_Figure.default.config,
|
|
58
|
+
name: "FigureTwicPics",
|
|
59
|
+
options: {
|
|
60
|
+
...import_Figure.default.config.options,
|
|
61
|
+
transform: String,
|
|
62
|
+
step: {
|
|
63
|
+
type: Number,
|
|
64
|
+
default: 50
|
|
65
|
+
},
|
|
66
|
+
mode: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: "cover"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Figure class.
|
|
3
|
+
*
|
|
4
|
+
* Manager lazyloading image sources.
|
|
5
|
+
*/
|
|
6
|
+
export default class FigureTwicPics extends Figure {
|
|
7
|
+
/**
|
|
8
|
+
* Config.
|
|
9
|
+
*/
|
|
10
|
+
static config: {
|
|
11
|
+
name: string;
|
|
12
|
+
options: {
|
|
13
|
+
transform: StringConstructor;
|
|
14
|
+
step: {
|
|
15
|
+
type: NumberConstructor;
|
|
16
|
+
default: number;
|
|
17
|
+
};
|
|
18
|
+
mode: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
lazy: BooleanConstructor;
|
|
23
|
+
};
|
|
24
|
+
refs: string[];
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Get the TwicPics domain.
|
|
28
|
+
*
|
|
29
|
+
* @this {FigureTwicPicsInterface}
|
|
30
|
+
* @returns {string}
|
|
31
|
+
*/
|
|
32
|
+
get domain(): string;
|
|
33
|
+
/**
|
|
34
|
+
* Reassign the source from the original on resized.
|
|
35
|
+
*
|
|
36
|
+
* @this {FigureTwicPicsInterface}
|
|
37
|
+
* @returns {void}
|
|
38
|
+
*/
|
|
39
|
+
resized(this: FigureTwicPicsInterface): void;
|
|
40
|
+
}
|
|
41
|
+
export type FigureInterface = import('./Figure.js').FigureInterface;
|
|
42
|
+
export type FigureTwicPicsInterface = FigureTwicPics & FigureInterface & {
|
|
43
|
+
$options: {
|
|
44
|
+
transform: string;
|
|
45
|
+
step: number;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
import Figure from "./Figure.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import i from"./Figure.js";function o(e,s){const{step:t}=e.$options;return Math.ceil(e.$refs.img[s]/t)*t}class c extends i{static config={...i.config,name:"FigureTwicPics",options:{...i.config.options,transform:String,step:{type:Number,default:50},mode:{type:String,default:"cover"}}};get domain(){return new URL(this.$refs.img.dataset.src).host}set src(s){const t=new URL(s);t.host=this.domain;const r=o(this,"offsetWidth"),n=o(this,"offsetHeight");t.searchParams.set("twic",["v1",this.$options.transform,`${this.$options.mode}=${r}x${n}`].filter(Boolean).join("/")),t.search=decodeURIComponent(t.search),super.src=t.toString()}resized(){this.src=this.$refs.img.dataset.src}}export{c as default};
|
|
@@ -0,0 +1,31 @@
|
|
|
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/Figure/index.js
|
|
23
|
+
var Figure_exports = {};
|
|
24
|
+
__export(Figure_exports, {
|
|
25
|
+
Figure: () => import_Figure.default,
|
|
26
|
+
FigureTwicPics: () => import_FigureTwicPics.default
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(Figure_exports);
|
|
29
|
+
var import_Figure = __toESM(require("./Figure.cjs"), 1);
|
|
30
|
+
var import_FigureTwicPics = __toESM(require("./FigureTwicPics.cjs"), 1);
|
|
31
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{default as a}from"./Figure.js";import{default as i}from"./FigureTwicPics.js";export{a as Figure,i as FigureTwicPics};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{#
|
|
2
|
+
/**
|
|
3
|
+
* @file
|
|
4
|
+
* Icon component
|
|
5
|
+
*
|
|
6
|
+
* @param string $name The file name of the icon.
|
|
7
|
+
* @param string[] $classes Additional classes.
|
|
8
|
+
*/
|
|
9
|
+
#}
|
|
10
|
+
|
|
11
|
+
<span class="icon {{ 'icon--%s'|format(name) }} {{ html_classes(classes|default('inline-block')) }}">
|
|
12
|
+
{{ source('@svg/%s.svg'|format(name), ignore_missing = true) }}
|
|
13
|
+
</span>
|
|
@@ -3,24 +3,19 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
7
6
|
var __export = (target, all) => {
|
|
8
7
|
for (var name in all)
|
|
9
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
9
|
};
|
|
11
|
-
var
|
|
12
|
-
if (
|
|
13
|
-
for (let key of __getOwnPropNames(
|
|
14
|
-
if (!__hasOwnProp.call(
|
|
15
|
-
__defProp(
|
|
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 });
|
|
16
15
|
}
|
|
17
|
-
return
|
|
16
|
+
return to;
|
|
18
17
|
};
|
|
19
|
-
var __toCommonJS =
|
|
20
|
-
return (module2, temp) => {
|
|
21
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
-
};
|
|
23
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
19
|
var __publicField = (obj, key, value) => {
|
|
25
20
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
26
21
|
return value;
|
|
@@ -31,19 +26,17 @@ var LargeText_exports = {};
|
|
|
31
26
|
__export(LargeText_exports, {
|
|
32
27
|
default: () => LargeText
|
|
33
28
|
});
|
|
29
|
+
module.exports = __toCommonJS(LargeText_exports);
|
|
34
30
|
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
35
31
|
var import_utils = require("@studiometa/js-toolkit/utils");
|
|
36
32
|
var LargeText = class extends (0, import_js_toolkit.withMountWhenInView)(import_js_toolkit.Base, { rootMargin: "50%" }) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
});
|
|
45
|
-
__publicField(this, "width", 0);
|
|
46
|
-
}
|
|
33
|
+
translateX = 0;
|
|
34
|
+
deltaY = 0;
|
|
35
|
+
transform = {
|
|
36
|
+
skewX: 0,
|
|
37
|
+
translateX: 0
|
|
38
|
+
};
|
|
39
|
+
width = 0;
|
|
47
40
|
mounted() {
|
|
48
41
|
this.width = this.$refs.target.clientWidth;
|
|
49
42
|
}
|
|
@@ -86,5 +79,4 @@ __publicField(LargeText, "config", {
|
|
|
86
79
|
}
|
|
87
80
|
}
|
|
88
81
|
});
|
|
89
|
-
module.exports = __toCommonJS(LargeText_exports);
|
|
90
82
|
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -58,14 +58,14 @@ export default class LargeText extends Base {
|
|
|
58
58
|
* @this {LargeTextInterface}
|
|
59
59
|
* @returns {void}
|
|
60
60
|
*/
|
|
61
|
-
mounted(): void;
|
|
61
|
+
mounted(this: LargeTextInterface): void;
|
|
62
62
|
/**
|
|
63
63
|
* Set width on resize.
|
|
64
64
|
*
|
|
65
65
|
* @this {LargeTextInterface}
|
|
66
66
|
* @returns {void}
|
|
67
67
|
*/
|
|
68
|
-
resized(): void;
|
|
68
|
+
resized(this: LargeTextInterface): void;
|
|
69
69
|
/**
|
|
70
70
|
* Update delta scroll on scroll.
|
|
71
71
|
*
|
|
@@ -79,7 +79,7 @@ export default class LargeText extends Base {
|
|
|
79
79
|
* @this {LargeTextInterface}
|
|
80
80
|
* @returns {void}
|
|
81
81
|
*/
|
|
82
|
-
ticked(): void;
|
|
82
|
+
ticked(this: LargeTextInterface): void;
|
|
83
83
|
}
|
|
84
84
|
export type LargeTextInterface = LargeText & {
|
|
85
85
|
$refs: {
|
|
@@ -1,64 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import { Base, withMountWhenInView } from "@studiometa/js-toolkit";
|
|
8
|
-
import { damp, matrix, clamp, nextFrame } from "@studiometa/js-toolkit/utils";
|
|
9
|
-
class LargeText extends withMountWhenInView(Base, { rootMargin: "50%" }) {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
__publicField(this, "translateX", 0);
|
|
13
|
-
__publicField(this, "deltaY", 0);
|
|
14
|
-
__publicField(this, "transform", {
|
|
15
|
-
skewX: 0,
|
|
16
|
-
translateX: 0
|
|
17
|
-
});
|
|
18
|
-
__publicField(this, "width", 0);
|
|
19
|
-
}
|
|
20
|
-
mounted() {
|
|
21
|
-
this.width = this.$refs.target.clientWidth;
|
|
22
|
-
}
|
|
23
|
-
resized() {
|
|
24
|
-
this.width = this.$refs.target.clientWidth;
|
|
25
|
-
}
|
|
26
|
-
scrolled(props) {
|
|
27
|
-
this.deltaY = props.delta.y;
|
|
28
|
-
}
|
|
29
|
-
ticked() {
|
|
30
|
-
this.translateX -= (Math.abs(this.deltaY) + 1) * this.$options.sensitivity;
|
|
31
|
-
this.transform.translateX = damp(this.translateX, this.transform.translateX, 0.25);
|
|
32
|
-
if (this.$options.skew) {
|
|
33
|
-
this.transform.skewX = damp(clamp(this.deltaY / 20 * -1, -0.5, 0.5) * this.$options.skewSensitivity, this.transform.skewX, 0.25);
|
|
34
|
-
}
|
|
35
|
-
if (this.translateX <= this.width * -1) {
|
|
36
|
-
this.translateX = 0;
|
|
37
|
-
this.transform.translateX += this.width;
|
|
38
|
-
} else if (this.$options.sensitivity < 0 && this.translateX >= this.width) {
|
|
39
|
-
this.translateX = 0;
|
|
40
|
-
this.transform.translateX -= this.width;
|
|
41
|
-
}
|
|
42
|
-
nextFrame(() => {
|
|
43
|
-
this.$refs.target.style.transform = matrix(this.transform) + " translateZ(0px)";
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
__publicField(LargeText, "config", {
|
|
48
|
-
name: "LargeText",
|
|
49
|
-
refs: ["target"],
|
|
50
|
-
options: {
|
|
51
|
-
skew: Boolean,
|
|
52
|
-
sensitivity: {
|
|
53
|
-
type: Number,
|
|
54
|
-
default: 1
|
|
55
|
-
},
|
|
56
|
-
skewSensitivity: {
|
|
57
|
-
type: Number,
|
|
58
|
-
default: 1
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
export {
|
|
63
|
-
LargeText as default
|
|
64
|
-
};
|
|
1
|
+
import{Base as i,withMountWhenInView as e}from"@studiometa/js-toolkit";import{damp as t,matrix as a,clamp as r,nextFrame as n}from"@studiometa/js-toolkit/utils";class h extends e(i,{rootMargin:"50%"}){static config={name:"LargeText",refs:["target"],options:{skew:Boolean,sensitivity:{type:Number,default:1},skewSensitivity:{type:Number,default:1}}};translateX=0;deltaY=0;transform={skewX:0,translateX:0};width=0;mounted(){this.width=this.$refs.target.clientWidth}resized(){this.width=this.$refs.target.clientWidth}scrolled(s){this.deltaY=s.delta.y}ticked(){this.translateX-=(Math.abs(this.deltaY)+1)*this.$options.sensitivity,this.transform.translateX=t(this.translateX,this.transform.translateX,.25),this.$options.skew&&(this.transform.skewX=t(r(this.deltaY/20*-1,-.5,.5)*this.$options.skewSensitivity,this.transform.skewX,.25)),this.translateX<=this.width*-1?(this.translateX=0,this.transform.translateX+=this.width):this.$options.sensitivity<0&&this.translateX>=this.width&&(this.translateX=0,this.transform.translateX-=this.width),n(()=>{this.$refs.target.style.transform=a(this.transform)+" translateZ(0px)"})}}export{h as default};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{#
|
|
2
|
+
/**
|
|
3
|
+
* @file
|
|
4
|
+
* LargeText component.
|
|
5
|
+
*
|
|
6
|
+
* @param string $content
|
|
7
|
+
* The text content.
|
|
8
|
+
* @param number $repeat
|
|
9
|
+
* The number of times the content should be repeated, defaults to 2.
|
|
10
|
+
* @param array $attr
|
|
11
|
+
* Custom attributes for the root element.
|
|
12
|
+
* @param array $target_attr
|
|
13
|
+
* Custom attributes for the target element.
|
|
14
|
+
*/
|
|
15
|
+
#}
|
|
16
|
+
|
|
17
|
+
{% set attributes =
|
|
18
|
+
merge_html_attributes(
|
|
19
|
+
attr ?? null,
|
|
20
|
+
{ data_component: 'LargeText' },
|
|
21
|
+
{ class: 'overflow-x-hidden pointer-events-none' }
|
|
22
|
+
)
|
|
23
|
+
%}
|
|
24
|
+
|
|
25
|
+
{% set target_attributes =
|
|
26
|
+
merge_html_attributes(
|
|
27
|
+
target_attr ?? null,
|
|
28
|
+
{ class: 'text-9xl font-bold' },
|
|
29
|
+
{ data_ref: 'target', class: 'relative inline-block whitespace-nowrap' }
|
|
30
|
+
)
|
|
31
|
+
%}
|
|
32
|
+
|
|
33
|
+
{% set position_factor = attributes.data_option_sensitivity is defined
|
|
34
|
+
and attributes.data_option_sensitivity < 0
|
|
35
|
+
? - 100
|
|
36
|
+
: 100
|
|
37
|
+
%}
|
|
38
|
+
|
|
39
|
+
<div {{ html_attributes(attributes) }}>
|
|
40
|
+
<span {{ html_attributes(target_attributes) }}>
|
|
41
|
+
{% for count in 1..repeat ?? 2 %}
|
|
42
|
+
{% set content_attributes = {
|
|
43
|
+
style: { left: loop.first ? '' : loop.index0 * position_factor ~ '%' },
|
|
44
|
+
class: { 'absolute top-0': not loop.first }
|
|
45
|
+
} %}
|
|
46
|
+
<span {{ html_attributes(content_attributes) }}> {{ content }}</span>
|
|
47
|
+
{% endfor %}
|
|
48
|
+
</span>
|
|
49
|
+
</div>
|
|
@@ -3,24 +3,19 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
7
6
|
var __export = (target, all) => {
|
|
8
7
|
for (var name in all)
|
|
9
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
9
|
};
|
|
11
|
-
var
|
|
12
|
-
if (
|
|
13
|
-
for (let key of __getOwnPropNames(
|
|
14
|
-
if (!__hasOwnProp.call(
|
|
15
|
-
__defProp(
|
|
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 });
|
|
16
15
|
}
|
|
17
|
-
return
|
|
16
|
+
return to;
|
|
18
17
|
};
|
|
19
|
-
var __toCommonJS =
|
|
20
|
-
return (module2, temp) => {
|
|
21
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
-
};
|
|
23
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
19
|
var __publicField = (obj, key, value) => {
|
|
25
20
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
26
21
|
return value;
|
|
@@ -31,6 +26,7 @@ var LazyInclude_exports = {};
|
|
|
31
26
|
__export(LazyInclude_exports, {
|
|
32
27
|
default: () => LazyInclude
|
|
33
28
|
});
|
|
29
|
+
module.exports = __toCommonJS(LazyInclude_exports);
|
|
34
30
|
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
35
31
|
var LazyInclude = class extends import_js_toolkit.Base {
|
|
36
32
|
mounted() {
|
|
@@ -68,5 +64,4 @@ __publicField(LazyInclude, "config", {
|
|
|
68
64
|
terminateOnLoad: Boolean
|
|
69
65
|
}
|
|
70
66
|
});
|
|
71
|
-
module.exports = __toCommonJS(LazyInclude_exports);
|
|
72
67
|
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -25,7 +25,7 @@ export default class LazyInclude extends Base {
|
|
|
25
25
|
* @this {LazyIncludeInterface}
|
|
26
26
|
* @returns {void}
|
|
27
27
|
*/
|
|
28
|
-
mounted(): void;
|
|
28
|
+
mounted(this: LazyIncludeInterface): void;
|
|
29
29
|
/**
|
|
30
30
|
* Set content.
|
|
31
31
|
*
|
|
@@ -33,21 +33,21 @@ export default class LazyInclude extends Base {
|
|
|
33
33
|
* @param {string} content
|
|
34
34
|
* @returns {void}
|
|
35
35
|
*/
|
|
36
|
-
onContent(content: string): void;
|
|
36
|
+
onContent(this: LazyIncludeInterface, content: string): void;
|
|
37
37
|
/**
|
|
38
38
|
* Set error.
|
|
39
39
|
*
|
|
40
40
|
* @this {LazyIncludeInterface}
|
|
41
41
|
* @returns {void}
|
|
42
42
|
*/
|
|
43
|
-
onError(): void;
|
|
43
|
+
onError(this: LazyIncludeInterface): void;
|
|
44
44
|
/**
|
|
45
45
|
* Always.
|
|
46
46
|
*
|
|
47
47
|
* @this {LazyIncludeInterface}
|
|
48
48
|
* @returns {void}
|
|
49
49
|
*/
|
|
50
|
-
onAlways(): void;
|
|
50
|
+
onAlways(this: LazyIncludeInterface): void;
|
|
51
51
|
}
|
|
52
52
|
export type LazyIncludeOptions = {
|
|
53
53
|
src: string;
|
|
@@ -1,46 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import { Base } from "@studiometa/js-toolkit";
|
|
8
|
-
class LazyInclude extends Base {
|
|
9
|
-
mounted() {
|
|
10
|
-
if (!this.$options.src) {
|
|
11
|
-
this.$log("The `src` option is missing. Define it with the `data-option-src` attribute");
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
fetch(this.$options.src).then((response) => response.text()).then((content) => {
|
|
15
|
-
this.$emit("content", content);
|
|
16
|
-
}).catch((error) => {
|
|
17
|
-
this.$emit("error", error);
|
|
18
|
-
}).finally(() => {
|
|
19
|
-
this.$emit("always");
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
onContent(content) {
|
|
23
|
-
this.$refs.loading.style.display = "none";
|
|
24
|
-
this.$el.innerHTML = content;
|
|
25
|
-
}
|
|
26
|
-
onError() {
|
|
27
|
-
this.$refs.error.style.display = "block";
|
|
28
|
-
}
|
|
29
|
-
onAlways() {
|
|
30
|
-
if (this.$options.terminateOnLoad) {
|
|
31
|
-
this.$terminate();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
__publicField(LazyInclude, "config", {
|
|
36
|
-
name: "LazyInclude",
|
|
37
|
-
refs: ["loading", "error"],
|
|
38
|
-
emits: ["content", "error", "always"],
|
|
39
|
-
options: {
|
|
40
|
-
src: String,
|
|
41
|
-
terminateOnLoad: Boolean
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
export {
|
|
45
|
-
LazyInclude as default
|
|
46
|
-
};
|
|
1
|
+
import{Base as e}from"@studiometa/js-toolkit";class i extends e{static config={name:"LazyInclude",refs:["loading","error"],emits:["content","error","always"],options:{src:String,terminateOnLoad:Boolean}};mounted(){if(!this.$options.src){this.$log("The `src` option is missing. Define it with the `data-option-src` attribute");return}fetch(this.$options.src).then(t=>t.text()).then(t=>{this.$emit("content",t)}).catch(t=>{this.$emit("error",t)}).finally(()=>{this.$emit("always")})}onContent(t){this.$refs.loading.style.display="none",this.$el.innerHTML=t}onError(){this.$refs.error.style.display="block"}onAlways(){this.$options.terminateOnLoad&&this.$terminate()}}export{i as default};
|
|
@@ -3,24 +3,19 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
7
6
|
var __export = (target, all) => {
|
|
8
7
|
for (var name in all)
|
|
9
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
9
|
};
|
|
11
|
-
var
|
|
12
|
-
if (
|
|
13
|
-
for (let key of __getOwnPropNames(
|
|
14
|
-
if (!__hasOwnProp.call(
|
|
15
|
-
__defProp(
|
|
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 });
|
|
16
15
|
}
|
|
17
|
-
return
|
|
16
|
+
return to;
|
|
18
17
|
};
|
|
19
|
-
var __toCommonJS =
|
|
20
|
-
return (module2, temp) => {
|
|
21
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
-
};
|
|
23
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
19
|
var __publicField = (obj, key, value) => {
|
|
25
20
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
26
21
|
return value;
|
|
@@ -31,6 +26,7 @@ var AbstractPrefetch_exports = {};
|
|
|
31
26
|
__export(AbstractPrefetch_exports, {
|
|
32
27
|
default: () => AbstractPrefetch
|
|
33
28
|
});
|
|
29
|
+
module.exports = __toCommonJS(AbstractPrefetch_exports);
|
|
34
30
|
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
35
31
|
var _AbstractPrefetch = class extends import_js_toolkit.Base {
|
|
36
32
|
isPrefetchable(url, options) {
|
|
@@ -80,5 +76,4 @@ __publicField(AbstractPrefetch, "config", {
|
|
|
80
76
|
}
|
|
81
77
|
});
|
|
82
78
|
__publicField(AbstractPrefetch, "prefetchedUrls", /* @__PURE__ */ new Set());
|
|
83
|
-
module.exports = __toCommonJS(AbstractPrefetch_exports);
|
|
84
79
|
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -1,58 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import { Base } from "@studiometa/js-toolkit";
|
|
8
|
-
const _AbstractPrefetch = class extends Base {
|
|
9
|
-
isPrefetchable(url, options) {
|
|
10
|
-
if (!url || !url.href) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
if (!options.prefetch) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
if (url.origin !== window.location.origin) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
if (!["http:", "https:"].includes(url.protocol)) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
if (url.protocol === "http:" && window.location.protocol === "https:") {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
if (url.hash && url.pathname + url.search === window.location.pathname + window.location.search) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
prefetch(url) {
|
|
31
|
-
if (_AbstractPrefetch.prefetchedUrls.has(url.href)) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
if (!this.isPrefetchable(url, this.$options)) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const prefetcher = document.createElement("link");
|
|
38
|
-
prefetcher.rel = "prefetch";
|
|
39
|
-
prefetcher.href = url.href;
|
|
40
|
-
document.head.appendChild(prefetcher);
|
|
41
|
-
_AbstractPrefetch.prefetchedUrls.add(url.href);
|
|
42
|
-
this.$terminate();
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
let AbstractPrefetch = _AbstractPrefetch;
|
|
46
|
-
__publicField(AbstractPrefetch, "config", {
|
|
47
|
-
name: "AbstractPrefetch",
|
|
48
|
-
options: {
|
|
49
|
-
prefetch: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
default: true
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
__publicField(AbstractPrefetch, "prefetchedUrls", /* @__PURE__ */ new Set());
|
|
56
|
-
export {
|
|
57
|
-
AbstractPrefetch as default
|
|
58
|
-
};
|
|
1
|
+
import{Base as n}from"@studiometa/js-toolkit";class r extends n{static config={name:"AbstractPrefetch",options:{prefetch:{type:Boolean,default:!0}}};static prefetchedUrls=new Set;isPrefetchable(e,t){return!(!e||!e.href||!t.prefetch||e.origin!==window.location.origin||!["http:","https:"].includes(e.protocol)||e.protocol==="http:"&&window.location.protocol==="https:"||e.hash&&e.pathname+e.search===window.location.pathname+window.location.search)}prefetch(e){if(r.prefetchedUrls.has(e.href)||!this.isPrefetchable(e,this.$options))return;const t=document.createElement("link");t.rel="prefetch",t.href=e.href,document.head.appendChild(t),r.prefetchedUrls.add(e.href),this.$terminate()}}export{r as default};
|