@redneckz/wildless-cms-uni-blocks 0.6.17 → 0.6.18

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.
@@ -57,7 +57,7 @@ function adjustAccordion(block) {
57
57
  return;
58
58
  }
59
59
  const content = block.content;
60
- content.blocks = adjustAccordionItems(content.accordionItems);
60
+ block.blocks = adjustAccordionItems(content.accordionItems);
61
61
  Reflect.deleteProperty(content, 'accordionItems');
62
62
  }
63
63
 
@@ -298,6 +298,9 @@
298
298
  const THRESHOLD_ACCURACY = 100; // Decimals number (100 is for two decimals number, 0.**)
299
299
  const THRESHOLD_ARRAY_LENGTH = 18;
300
300
  const THRESHOLD_ARRAY_START_VALUE = (THRESHOLD_ACCURACY - THRESHOLD_ARRAY_LENGTH) / THRESHOLD_ACCURACY;
301
+ const OBSERVER_OPTIONS = {
302
+ threshold: new Array(THRESHOLD_ARRAY_LENGTH).fill(0).map(getIntersectionThreshold),
303
+ };
301
304
  const BlockWrapper = JSX(({ anchor, className, children, tag = 'section', labels }) => {
302
305
  const Tag = tag;
303
306
  const [shouldRenderBlock, setShouldRenderBlock] = useState(true);
@@ -326,9 +329,7 @@
326
329
  if (!shouldRenderBlock) {
327
330
  return null;
328
331
  }
329
- return anchor ? (jsx(IntersectionObserverTag, { tag: tag, className: className, observerCallback: observerCallback, observerOptions: {
330
- threshold: new Array(THRESHOLD_ARRAY_LENGTH).fill(0).map(getIntersectionThreshold),
331
- }, anchor: anchor, children: children })) : (jsx(Tag, { className: className, children: children }));
332
+ return anchor ? (jsx(IntersectionObserverTag, { tag: tag, className: className, observerCallback: observerCallback, observerOptions: OBSERVER_OPTIONS, anchor: anchor, children: children })) : (jsx(Tag, { className: className, children: children }));
332
333
  });
333
334
  function getIntersectionThreshold(_, i) {
334
335
  const value = (i + 1) / THRESHOLD_ACCURACY + THRESHOLD_ARRAY_START_VALUE;
@@ -3565,7 +3566,7 @@
3565
3566
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }, "LikeControl") }));
3566
3567
  }
3567
3568
 
3568
- const packageVersion = "0.6.17";
3569
+ const packageVersion = "0.6.18";
3569
3570
 
3570
3571
  exports.Blocks = Blocks;
3571
3572
  exports.ContentPage = ContentPage;