@total_onion/onion-library 1.0.194 → 1.0.196

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.
@@ -9,7 +9,7 @@
9
9
 
10
10
  {{previewEntryPoint}}
11
11
 
12
- <section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}} lazy-fade" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" style="{{sectionStyles}}" data-pattern-form-selection data-renderdynamic={{renderDynamic}} data-formid="{{fields.form}}" data-assetkey="{{blockClassName}}">
12
+ <section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}} lazy-fade" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" style="{{sectionStyles}}" data-pattern-form-selection data-renderdynamic={{renderDynamic}} data-formid="{{fields.form}}" data-assetkey="{{blockClassName}}" data-eager="true">
13
13
 
14
14
  <div class="{{ blockClassName }}__container-inline">
15
15
  <div class="{{ blockClassName }}__inner">
@@ -3,7 +3,7 @@ export default function smashballoonsocialmediav3Js(options = {}) {
3
3
  const {block} = options;
4
4
  if (!block) return;
5
5
 
6
- // Avoid double init per block
6
+ // in carousel need to be moving without stops and delays
7
7
  if (block.dataset.marquee) {
8
8
  if (block.dataset.sbiMarqueeInit === '1') return;
9
9
  block.dataset.sbiMarqueeInit = '1';
@@ -17,7 +17,6 @@ export default function smashballoonsocialmediav3Js(options = {}) {
17
17
  // --- Config ---
18
18
  const PX_PER_SEC = 50; // adjust speed as needed
19
19
 
20
- // --- Scoped CSS (only affects this block) ---
21
20
  const uid = `sbi-marquee-${Math.random().toString(36).slice(2)}`;
22
21
  block.setAttribute('data-sbi-marquee-id', uid);
23
22
 
@@ -53,7 +52,7 @@ export default function smashballoonsocialmediav3Js(options = {}) {
53
52
  return w;
54
53
  };
55
54
 
56
- // --- Animation state ---
55
+
57
56
  let loopW = getLoopWidth();
58
57
  let x = 0;
59
58
  let last = performance.now();
@@ -65,7 +64,6 @@ export default function smashballoonsocialmediav3Js(options = {}) {
65
64
 
66
65
  x -= PX_PER_SEC * dt;
67
66
 
68
- // Wrap seamlessly after the width of the original (non-cloned) set
69
67
  if (-x >= loopW) x += loopW;
70
68
 
71
69
  stage.style.setProperty(
@@ -76,13 +74,11 @@ export default function smashballoonsocialmediav3Js(options = {}) {
76
74
  raf = requestAnimationFrame(tick);
77
75
  }
78
76
 
79
- // Resize-aware (e.g., responsive cols/images)
80
77
  const ro = new ResizeObserver(() => {
81
78
  loopW = getLoopWidth();
82
79
  });
83
80
  ro.observe(stage);
84
81
 
85
- // Optional: pause on hover
86
82
  outer.addEventListener('mouseenter', () => {
87
83
  if (raf) cancelAnimationFrame(raf);
88
84
  raf = null;
@@ -94,11 +90,9 @@ export default function smashballoonsocialmediav3Js(options = {}) {
94
90
  }
95
91
  });
96
92
 
97
- // Kick off
98
93
  last = performance.now();
99
94
  raf = requestAnimationFrame(tick);
100
95
 
101
- // Optional cleanup handle if you ever need it later
102
96
  block._sbiMarqueeDestroy = () => {
103
97
  if (raf) cancelAnimationFrame(raf);
104
98
  ro.disconnect();
@@ -10,7 +10,9 @@
10
10
  {{previewEntryPoint}}
11
11
  <section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}}" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" style="{{sectionStyles}}" data-assetkey="{{blockClassName}}" {% if fields.marquee %} data-marquee="true" {% endif %}>
12
12
  {% if fields.social_media_type == 'instagram' %}
13
- {{ function('do_shortcode', '[instagram-feed feed=' ~ fields.feed_id ~ ']') }}
13
+ <div class="{{blockClassName}}__instagram">
14
+ {{ function('do_shortcode', '[instagram-feed feed=' ~ fields.feed_id ~ ']') }}
15
+ </div>
14
16
  {% endif %}
15
17
  {{htmlEntryPoint}}
16
18
  </section>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@total_onion/onion-library",
3
- "version": "1.0.194",
3
+ "version": "1.0.196",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "scripts": {