@redneckz/wildless-cms-uni-blocks 0.14.196 → 0.14.197

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.
@@ -74,11 +74,6 @@
74
74
  return JSXTmpl;
75
75
  };
76
76
 
77
- const isSSR = () => Boolean(typeof globalThis.process === 'object' && globalThis.process && globalThis.process.version);
78
-
79
- const isClient = !isSSR();
80
- const ClientOnly = JSX(({ children }) => (isClient ? children : null));
81
-
82
77
  class EventBus {
83
78
  subscribers = {};
84
79
  subjectsStateMap = {};
@@ -156,6 +151,19 @@
156
151
  return (jsx(Tag, { className: style('@container font-sans', isGroup ? 'group' : '', blockStyles[version], isHidden ? 'hidden' : '', padding || defaultPadding, className), ...(isGroup ? { 'data-ver': version } : {}), ...(block?.anchor ? { id: block.anchor } : {}), role: role, style: inlineStyles, children: children }));
157
152
  });
158
153
 
154
+ const isSSR = () => Boolean(typeof globalThis.process === 'object' && globalThis.process && globalThis.process.version);
155
+
156
+ const isClient = !isSSR();
157
+ const ClientOnly = JSX(({ children }) => (isClient ? children : null));
158
+
159
+ const GOLDEN_RATIO = 1.618;
160
+ const Shimmer = JSX(({ className, size }) => (jsx("figure", { className: style('m-0 mt-xl min-w-[80%]', className), children: renderShimmer(size) })));
161
+ const renderShimmer = (size = 3) => goldenSequence(100, size)
162
+ .map((_) => Math.floor(_))
163
+ .map(renderShimmerItem);
164
+ const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse" }, String(index)));
165
+ const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
166
+
159
167
  const headingTag = (tag) => tag;
160
168
 
161
169
  const styles$2 = {
@@ -795,7 +803,7 @@
795
803
  const { items } = (props.options?.page?.adSourceBook ?? {});
796
804
  const tileIndex = useMemo(() => randomNumber(0, items?.length), [items]);
797
805
  const content = items?.[tileIndex];
798
- return content ? (jsx(ClientOnly, { children: jsx(ProductBlock, { ...content, ...props }) })) : null;
806
+ return content ? (jsx(ClientOnly, { children: jsx(ProductBlock, { ...content, ...props }) })) : (jsx(BlockWrapper, { ...props, children: jsx(Shimmer, {}) }));
799
807
  });
800
808
  const randomNumber = (min = 0, max = 0) => Math.floor(Math.random() * (max - min) + min);
801
809
 
@@ -5210,14 +5218,6 @@
5210
5218
  return (jsx(BlockWrapper, { version: "transparent", className: style(className), defaultPadding: "p-0", ...rest, children: dataType === 'offices' ? jsx(OfficesMap, {}) : jsx(AtmsMap, { data: data }) }));
5211
5219
  });
5212
5220
 
5213
- const GOLDEN_RATIO = 1.618;
5214
- const Shimmer = JSX(({ className, size }) => (jsx("figure", { className: style('m-0 mt-xl min-w-[80%]', className), children: renderShimmer(size) })));
5215
- const renderShimmer = (size = 3) => goldenSequence(100, size)
5216
- .map((_) => Math.floor(_))
5217
- .map(renderShimmerItem);
5218
- const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-xs bg-secondary-light" }, String(index)));
5219
- const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
5220
-
5221
5221
  const Placeholder = JSX(({ className, title, description = 'Блок в разработке...', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border', className), ...rest, children: [jsx(Headline, { className: "max-w-[600px]", title: title, description: description, headlineVersion: "L", align: "text-left", isEmbedded: true }), jsx(Shimmer, {})] })));
5222
5222
 
5223
5223
  const ProductGallery = JSX(({ className = '', padding, slides = [], ...rest }) => {
@@ -6074,7 +6074,7 @@
6074
6074
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6075
6075
  });
6076
6076
 
6077
- const packageVersion = "0.14.195";
6077
+ const packageVersion = "0.14.196";
6078
6078
 
6079
6079
  exports.Blocks = Blocks;
6080
6080
  exports.ContentPage = ContentPage;