@total_onion/onion-library 2.0.145 → 2.0.147
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/assembleAssetList.js +10 -3
- package/build-library.js +4 -0
- package/components/block-back-to-top-button-v3/back-to-top-button-v3.scss +3 -3
- package/components/block-carousel-multi-layout-v3/carousel-multi-layout-v3.scss +1 -1
- package/components/block-cocktail-recipe-v3/cocktail-recipe-v3.scss +5 -5
- package/components/block-raw-html-v3/raw-html-v3.js +0 -0
- package/components/block-raw-html-v3/raw-html-v3.scss +0 -0
- package/components/block-raw-html-v3/raw-html-v3.twig +14 -0
- package/components/component-text-editor-settings-v3/group_687a4e2334e37.json +241 -196
- package/createDynamicBlockScss-v3.js +8 -13
- package/esbuild.mjs +15 -1
- package/package.json +1 -1
- package/public/assetList.mjs +2 -36
- package/public/block-accent-image-v3/accent-image-v3.js +7 -0
- package/public/block-accordion-v3/accordion-v3.js +117 -0
- package/public/block-back-to-top-button-v3/back-to-top-button-v3.css +62 -0
- package/public/block-back-to-top-button-v3/back-to-top-button-v3.js +12 -0
- package/public/block-betterreviews-display-v3/betterreviews-display-v3.js +7 -0
- package/public/block-block-interactions-v3/block-interactions-v3.js +44 -0
- package/public/block-carousel-multi-layout-v3/carousel-multi-layout-v3.js +169 -0
- package/public/block-cocktail-recipe-v3/cocktail-recipe-v3.css +317 -0
- package/public/block-cocktail-recipe-v3/cocktail-recipe-v3.js +93 -0
- package/public/block-cover-link-v3/cover-link-v3.js +7 -0
- package/public/block-divider-v3/divider-v3.js +7 -0
- package/public/block-featured-image-gallery-v3/featured-image-gallery-v3.js +44 -0
- package/public/block-form-selection-v3/form-selection-v3.js +61 -0
- package/public/block-gradient-layer-v3/gradient-layer-v3.js +7 -0
- package/public/block-group-container-v3/group-container-v3.js +7 -0
- package/public/block-lottie-content-v3/lottie-content-v3.js +25 -0
- package/public/block-market-selector-v3/market-selector-v3.js +7 -0
- package/public/block-modal-form-v3/modal-form-v3.js +44 -0
- package/public/block-nav-menu-container-v3/nav-menu-container-v3.js +7 -0
- package/public/block-post-info-v3/post-info-v3.js +7 -0
- package/public/block-post-type-filter-grid-v3/post-type-filter-grid-v3.css +1 -0
- package/public/block-post-type-filter-grid-v3/post-type-filter-grid-v3.js +13 -0
- package/public/block-product-info-v3/product-info-v3.js +7 -0
- package/public/block-responsive-table-v3/responsive-table-v3.js +7 -0
- package/public/block-scrolling-banner-v3/scrolling-banner-v3.js +106 -0
- package/public/block-section-separator-v3/section-separator-v3.js +7 -0
- package/public/block-single-column-container-v3/single-column-container-v3.js +7 -0
- package/public/block-single-responsive-image-v3/single-responsive-image-v3.js +7 -0
- package/public/block-site-copyright-notice-v3/site-copyright-notice-v3.js +7 -0
- package/public/block-site-logo-container-v3/site-logo-container-v3.js +7 -0
- package/public/block-site-title-and-tagline-v3/site-title-and-tagline-v3.js +7 -0
- package/public/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.js +8 -0
- package/public/block-social-networks-v3/social-networks-v3.js +7 -0
- package/public/block-spacer-v3/spacer-v3.js +2 -0
- package/public/block-spotify-embed-v3/spotify-embed-v3.js +7 -0
- package/public/block-standard-content-v3/standard-content-v3.js +7 -0
- package/public/block-sticky-buy-cta-v3/sticky-buy-cta-v3.js +7 -0
- package/public/block-sub-group-container-v3/sub-group-container-v3.js +2 -0
- package/public/block-video-content-v3/video-content-v3.js +11 -0
- package/public/components/block-accent-image-v3/accent-image-v3.css +0 -0
- package/public/components/block-accent-image-v3/accent-image-v3.js +7 -0
- package/public/components/block-accordion-v3/accordion-v3.css +474 -0
- package/public/components/block-accordion-v3/accordion-v3.js +117 -0
- package/public/components/block-back-to-top-button-v3/back-to-top-button-v3.css +62 -0
- package/public/components/block-back-to-top-button-v3/back-to-top-button-v3.js +12 -0
- package/public/components/block-betterreviews-display-v3/betterreviews-display-v3.css +96 -0
- package/public/components/block-betterreviews-display-v3/betterreviews-display-v3.js +7 -0
- package/public/components/block-block-interactions-v3/block-interactions-v3.css +34 -0
- package/public/components/block-block-interactions-v3/block-interactions-v3.js +44 -0
- package/public/components/block-carousel-multi-layout-v3/carousel-multi-layout-v3.css +928 -0
- package/public/components/block-carousel-multi-layout-v3/carousel-multi-layout-v3.js +169 -0
- package/public/components/block-cocktail-recipe-v3/cocktail-recipe-v3.css +317 -0
- package/public/components/block-cocktail-recipe-v3/cocktail-recipe-v3.js +93 -0
- package/public/components/block-cover-link-v3/cover-link-v3.css +0 -0
- package/public/components/block-cover-link-v3/cover-link-v3.js +7 -0
- package/public/components/block-divider-v3/divider-v3.css +74 -0
- package/public/components/block-divider-v3/divider-v3.js +7 -0
- package/public/components/block-featured-image-gallery-v3/featured-image-gallery-v3.css +102 -0
- package/public/components/block-featured-image-gallery-v3/featured-image-gallery-v3.js +44 -0
- package/public/components/block-form-selection-v3/form-selection-v3.css +32 -0
- package/public/components/block-form-selection-v3/form-selection-v3.js +61 -0
- package/public/components/block-gradient-layer-v3/gradient-layer-v3.css +52 -0
- package/public/components/block-gradient-layer-v3/gradient-layer-v3.js +7 -0
- package/public/components/block-group-container-v3/group-container-v3.css +323 -0
- package/public/components/block-group-container-v3/group-container-v3.js +7 -0
- package/public/components/block-lottie-content-v3/lottie-content-v3.css +0 -0
- package/public/components/block-lottie-content-v3/lottie-content-v3.js +25 -0
- package/public/components/block-market-selector-v3/market-selector-v3.css +139 -0
- package/public/components/block-market-selector-v3/market-selector-v3.js +7 -0
- package/public/components/block-modal-form-v3/modal-form-v3.css +0 -0
- package/public/components/block-modal-form-v3/modal-form-v3.js +44 -0
- package/public/components/block-modal-form-v3/modal-form-v3.scss.css +0 -0
- package/public/components/block-nav-menu-container-v3/nav-menu-container-v3.css +3 -0
- package/public/components/block-nav-menu-container-v3/nav-menu-container-v3.js +7 -0
- package/public/components/block-post-info-v3/post-info-v3.css +1310 -0
- package/public/components/block-post-info-v3/post-info-v3.js +7 -0
- package/public/components/block-post-info-v3/post-info-v3.scss.css +1310 -0
- package/public/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3.css +859 -0
- package/public/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3.js +13 -0
- package/public/components/block-product-info-v3/product-info-v3.css +993 -0
- package/public/components/block-product-info-v3/product-info-v3.js +7 -0
- package/public/components/block-product-info-v3/product-info-v3.scss.css +993 -0
- package/public/components/block-responsive-table-v3/responsive-table-v3.css +48 -0
- package/public/components/block-responsive-table-v3/responsive-table-v3.js +7 -0
- package/public/components/block-scrolling-banner-v3/scrolling-banner-v3.css +85 -0
- package/public/components/block-scrolling-banner-v3/scrolling-banner-v3.js +106 -0
- package/public/components/block-section-separator-v3/section-separator-v3.css +43 -0
- package/public/components/block-section-separator-v3/section-separator-v3.js +7 -0
- package/public/components/block-single-column-container-v3/single-column-container-v3.css +14 -0
- package/public/components/block-single-column-container-v3/single-column-container-v3.js +7 -0
- package/public/components/block-single-responsive-image-v3/single-responsive-image-v3.css +60 -0
- package/public/components/block-single-responsive-image-v3/single-responsive-image-v3.js +7 -0
- package/public/components/block-site-copyright-notice-v3/site-copyright-notice-v3.css +0 -0
- package/public/components/block-site-copyright-notice-v3/site-copyright-notice-v3.js +7 -0
- package/public/components/block-site-logo-container-v3/site-logo-container-v3.css +18 -0
- package/public/components/block-site-logo-container-v3/site-logo-container-v3.js +7 -0
- package/public/components/block-site-title-and-tagline-v3/site-title-and-tagline-v3.css +14 -0
- package/public/components/block-site-title-and-tagline-v3/site-title-and-tagline-v3.js +7 -0
- package/public/components/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.css +25 -0
- package/public/components/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.js +8 -0
- package/public/components/block-social-networks-v3/social-networks-v3.css +74 -0
- package/public/components/block-social-networks-v3/social-networks-v3.js +7 -0
- package/public/components/block-spacer-v3/spacer-v3.css +16 -0
- package/public/components/block-spacer-v3/spacer-v3.js +2 -0
- package/public/components/block-spacer-v3/spacer-v3.scss.css +16 -0
- package/public/components/block-spotify-embed-v3/spotify-embed-v3.css +7 -0
- package/public/components/block-spotify-embed-v3/spotify-embed-v3.js +7 -0
- package/public/components/block-standard-content-v3/standard-content-v3.css +529 -0
- package/public/components/block-standard-content-v3/standard-content-v3.js +7 -0
- package/public/components/block-sticky-buy-cta-v3/sticky-buy-cta-v3.css +0 -0
- package/public/components/block-sticky-buy-cta-v3/sticky-buy-cta-v3.js +7 -0
- package/public/components/block-sub-group-container-v3/sub-group-container-v3.css +308 -0
- package/public/components/block-sub-group-container-v3/sub-group-container-v3.js +2 -0
- package/public/components/block-video-content-v3/video-content-v3.css +105 -0
- package/public/components/block-video-content-v3/video-content-v3.js +11 -0
- package/public/dynamicBlockScss-v3.css +7140 -0
- package/public/dynamicBlockScss-v3.scss +36 -28
- package/public/jsAssets.mjs +3 -36
- package/public/publicBundle.css +7140 -0
- package/public/publicBundle.scss +7 -0
- package/public/publicbundlecss.css +0 -3
- package/public/publicbundlecss.css.map +0 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export default function scrollingbannerv3Js(options = {}) {
|
|
2
|
+
try {
|
|
3
|
+
const { block } = options;
|
|
4
|
+
scrollingbannerJs(block);
|
|
5
|
+
} catch (error) {
|
|
6
|
+
console.error(error);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
const initializedBanners = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
function scrollingbannerJs(block) {
|
|
11
|
+
if (!block) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const bannerElement = block.querySelector(".scrolling-banner-v3");
|
|
15
|
+
if (!bannerElement) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
if (!initializedBanners.has(bannerElement)) {
|
|
20
|
+
bannerInit(bannerElement);
|
|
21
|
+
}
|
|
22
|
+
const wrapper = bannerElement.querySelector(
|
|
23
|
+
".scrolling-banner-v3__wrapper"
|
|
24
|
+
);
|
|
25
|
+
if (wrapper) {
|
|
26
|
+
if (window.ResizeObserver) {
|
|
27
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
28
|
+
resetBanner(bannerElement);
|
|
29
|
+
bannerInit(bannerElement);
|
|
30
|
+
});
|
|
31
|
+
resizeObserver.observe(wrapper);
|
|
32
|
+
} else {
|
|
33
|
+
window.addEventListener("resize", () => {
|
|
34
|
+
resetBanner(bannerElement);
|
|
35
|
+
bannerInit(bannerElement);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
} catch (error) {
|
|
40
|
+
console.error(error);
|
|
41
|
+
}
|
|
42
|
+
function bannerInit(bannerElement2) {
|
|
43
|
+
if (initializedBanners.has(bannerElement2)) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const container = bannerElement2.querySelector(
|
|
47
|
+
".scrolling-banner-v3__container"
|
|
48
|
+
);
|
|
49
|
+
const wrapper = bannerElement2.querySelector(
|
|
50
|
+
".scrolling-banner-v3__wrapper"
|
|
51
|
+
);
|
|
52
|
+
const inner = bannerElement2.querySelector(
|
|
53
|
+
".scrolling-banner-v3__inner"
|
|
54
|
+
);
|
|
55
|
+
const speed = bannerElement2.dataset.speed ?? 3;
|
|
56
|
+
const wrapperWidth = wrapper.clientWidth;
|
|
57
|
+
const innerContentWidth = inner.clientWidth;
|
|
58
|
+
const multiplier = Number(Math.round(wrapperWidth / innerContentWidth));
|
|
59
|
+
for (let index = 0; index < multiplier; index++) {
|
|
60
|
+
const newInner = inner.cloneNode(true);
|
|
61
|
+
newInner.classList.add("clone");
|
|
62
|
+
container.appendChild(newInner);
|
|
63
|
+
}
|
|
64
|
+
const containerHeight = inner.clientHeight;
|
|
65
|
+
wrapper.setAttribute("style", `min-height: ${containerHeight}px`);
|
|
66
|
+
const newTickerContainer = container.cloneNode(true);
|
|
67
|
+
newTickerContainer.classList.add("clone");
|
|
68
|
+
wrapper.appendChild(newTickerContainer);
|
|
69
|
+
const animation1 = [
|
|
70
|
+
{ transform: "translateX(0%)" },
|
|
71
|
+
{ transform: "translateX(-100%)" }
|
|
72
|
+
];
|
|
73
|
+
const animation2 = [
|
|
74
|
+
{ transform: "translateX(100%)" },
|
|
75
|
+
{ transform: "translateX(0%)" }
|
|
76
|
+
];
|
|
77
|
+
const time = 1e5 / speed;
|
|
78
|
+
let timing = {
|
|
79
|
+
duration: time,
|
|
80
|
+
iterations: Infinity,
|
|
81
|
+
fill: "both"
|
|
82
|
+
};
|
|
83
|
+
let timing2 = timing;
|
|
84
|
+
const containers = bannerElement2.querySelectorAll(
|
|
85
|
+
".scrolling-banner-v3__container"
|
|
86
|
+
);
|
|
87
|
+
containers[0].style.transform = "translateX(0%)";
|
|
88
|
+
containers[1].style.transform = "translateX(100%)";
|
|
89
|
+
void containers[0].offsetWidth;
|
|
90
|
+
const anim1 = containers[0].animate(animation1, timing);
|
|
91
|
+
const anim2 = containers[1].animate(animation2, timing2);
|
|
92
|
+
initializedBanners.set(bannerElement2, { anim1, anim2 });
|
|
93
|
+
}
|
|
94
|
+
function resetBanner(bannerElement2) {
|
|
95
|
+
const data = initializedBanners.get(bannerElement2);
|
|
96
|
+
if (data) {
|
|
97
|
+
data.anim1?.cancel();
|
|
98
|
+
data.anim2?.cancel();
|
|
99
|
+
initializedBanners.delete(bannerElement2);
|
|
100
|
+
}
|
|
101
|
+
bannerElement2.querySelectorAll(
|
|
102
|
+
".scrolling-banner-v3__container.clone, .scrolling-banner-v3__inner.clone"
|
|
103
|
+
).forEach((el) => el.remove());
|
|
104
|
+
bannerElement2.querySelector(".scrolling-banner-v3__wrapper").removeAttribute("style");
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import videocontroller from "@total_onion/onion-videocontroller/onion-videocontroller.js";
|
|
2
|
+
export default function videocontentv3Js(options = {}) {
|
|
3
|
+
try {
|
|
4
|
+
const { block } = options;
|
|
5
|
+
if (!document.body.classList.contains("wp-admin")) {
|
|
6
|
+
const videoController = new videocontroller(block);
|
|
7
|
+
}
|
|
8
|
+
} catch (error) {
|
|
9
|
+
console.error(error);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
File without changes
|