@redneckz/wildless-cms-uni-blocks 0.14.363 → 0.14.365

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.
Files changed (35) hide show
  1. package/bundle/bundle.umd.js +30 -27
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/dist/components/Footer/TextInformationLink.js +3 -2
  4. package/dist/components/Footer/TextInformationLink.js.map +1 -1
  5. package/dist/ui-kit/TabsControl/ScrollableTabsControl.js +2 -3
  6. package/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  7. package/dist/utils/adjustSrc.js +5 -1
  8. package/dist/utils/adjustSrc.js.map +1 -1
  9. package/lib/components/Footer/TextInformationLink.js +3 -2
  10. package/lib/components/Footer/TextInformationLink.js.map +1 -1
  11. package/lib/ui-kit/TabsControl/ScrollableTabsControl.js +2 -3
  12. package/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  13. package/lib/utils/adjustSrc.js +5 -1
  14. package/lib/utils/adjustSrc.js.map +1 -1
  15. package/mobile/bundle/bundle.umd.js +30 -27
  16. package/mobile/bundle/bundle.umd.min.js +1 -1
  17. package/mobile/dist/components/Footer/TextInformationLink.js +3 -2
  18. package/mobile/dist/components/Footer/TextInformationLink.js.map +1 -1
  19. package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js +2 -3
  20. package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  21. package/mobile/dist/utils/adjustSrc.js +5 -1
  22. package/mobile/dist/utils/adjustSrc.js.map +1 -1
  23. package/mobile/lib/components/Footer/TextInformationLink.js +3 -2
  24. package/mobile/lib/components/Footer/TextInformationLink.js.map +1 -1
  25. package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js +2 -3
  26. package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  27. package/mobile/lib/utils/adjustSrc.js +5 -1
  28. package/mobile/lib/utils/adjustSrc.js.map +1 -1
  29. package/mobile/src/components/Footer/TextInformationLink.tsx +6 -2
  30. package/mobile/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +3 -4
  31. package/mobile/src/utils/adjustSrc.ts +6 -2
  32. package/package.json +1 -1
  33. package/src/components/Footer/TextInformationLink.tsx +6 -2
  34. package/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +3 -4
  35. package/src/utils/adjustSrc.ts +6 -2
@@ -354,7 +354,31 @@
354
354
  const getSvgSize = (width) => (width ? '' : 'w-full h-full');
355
355
  const Background = JSX(({ className, children }) => className ? (jsx("div", { role: "img", className: className, children: children })) : (children));
356
356
 
357
- const adjustSrc = (router, pathPrefix) => (src) => src && !isURL(src) ? adjustHref(router)(joinPath(pathPrefix, src)) : src;
357
+ const env = new Proxy({
358
+ _: {},
359
+ setup(_) {
360
+ this._ = _;
361
+ },
362
+ }, {
363
+ get(target, p) {
364
+ return target._[p] || target[p];
365
+ },
366
+ });
367
+
368
+ function getBasePath() {
369
+ try {
370
+ const [, first] = new URL(env.SITE_URL ?? '').pathname.split('/');
371
+ return `/${first}`;
372
+ }
373
+ catch (_) {
374
+ return '';
375
+ }
376
+ }
377
+
378
+ const adjustSrc = (router, pathPrefix) => (src) => {
379
+ const basePath = pathPrefix ? '' : getBasePath();
380
+ return src && !isURL(src) ? adjustHref(router)(joinPath(pathPrefix, src), basePath) : src;
381
+ };
358
382
 
359
383
  const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
360
384
  const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', pathPrefix }) => {
@@ -432,27 +456,6 @@
432
456
 
433
457
  const adjustBase = (href, basePath = '') => href.replace(basePath, '');
434
458
 
435
- const env = new Proxy({
436
- _: {},
437
- setup(_) {
438
- this._ = _;
439
- },
440
- }, {
441
- get(target, p) {
442
- return target._[p] || target[p];
443
- },
444
- });
445
-
446
- function getBasePath() {
447
- try {
448
- const [, first] = new URL(env.SITE_URL ?? '').pathname.split('/');
449
- return `/${first}`;
450
- }
451
- catch (_) {
452
- return '';
453
- }
454
- }
455
-
456
459
  /* eslint-disable @typescript-eslint/ban-types */
457
460
  const handlerDecorator = (handler) => {
458
461
  return handlerDecorator._impl(handler);
@@ -4180,9 +4183,9 @@
4180
4183
  };
4181
4184
 
4182
4185
  const TextInformationLink = JSX(({ className = '', index, ...rest }) => {
4183
- const link = useLink();
4186
+ const link = useLink({ compatibleMode: true });
4184
4187
  const { href, target, text, onClick } = link(rest);
4185
- return (jsx("a", { className: `text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` }));
4188
+ return (jsx("a", { className: style('text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]', className), href: href, target: target, onClick: onClick, children: text || `Документ ${index}` }));
4186
4189
  });
4187
4190
 
4188
4191
  const TextInformation = JSX(({ className = '', links, license }) => (jsxs("div", { className: style('@container space-y-lg', className), children: [license ? (jsx("div", { children: jsx(Text, { size: "text-xs", font: "font-light", color: "text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0${license}` }) })) : null, links?.length ? (jsx("div", { className: "flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ..._ }, String(i)))) })) : null] })));
@@ -5727,9 +5730,9 @@
5727
5730
  });
5728
5731
  const scrollToSelected = (container, items) => {
5729
5732
  const selectedIndex = items.findIndex((_) => _?.selected);
5730
- if (container && selectedIndex > 1) {
5733
+ if (container && selectedIndex > 0) {
5731
5734
  container.scrollTo({
5732
- left: selectedIndex * getItemWidth(container)(items.length),
5735
+ left: container?.children[selectedIndex]?.offsetLeft,
5733
5736
  behavior: 'smooth',
5734
5737
  });
5735
5738
  }
@@ -6311,7 +6314,7 @@
6311
6314
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6312
6315
  });
6313
6316
 
6314
- const packageVersion = "0.14.362";
6317
+ const packageVersion = "0.14.364";
6315
6318
 
6316
6319
  exports.Blocks = Blocks;
6317
6320
  exports.ContentPage = ContentPage;