@redneckz/wildless-cms-uni-blocks 0.14.843 → 0.14.845

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 (37) hide show
  1. package/bundle/bundle.umd.js +9 -8
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/dist/components/Headline/Headline.js +1 -1
  4. package/dist/components/Headline/Headline.js.map +1 -1
  5. package/dist/services/search/useSearch.js +8 -5
  6. package/dist/services/search/useSearch.js.map +1 -1
  7. package/dist/ui-kit/BaseTile/BaseTile.js +1 -1
  8. package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  9. package/lib/common.css +1 -1
  10. package/lib/components/Headline/Headline.js +1 -1
  11. package/lib/components/Headline/Headline.js.map +1 -1
  12. package/lib/services/search/useSearch.js +8 -5
  13. package/lib/services/search/useSearch.js.map +1 -1
  14. package/lib/ui-kit/BaseTile/BaseTile.js +1 -1
  15. package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  16. package/mobile/bundle/bundle.umd.js +3 -3
  17. package/mobile/bundle/bundle.umd.min.js +1 -1
  18. package/mobile/dist/components/Headline/Headline.js +1 -1
  19. package/mobile/dist/components/Headline/Headline.js.map +1 -1
  20. package/mobile/dist/services/search/useSearch.js +8 -5
  21. package/mobile/dist/services/search/useSearch.js.map +1 -1
  22. package/mobile/dist/ui-kit/BaseTile/BaseTile.js +1 -1
  23. package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  24. package/mobile/lib/common.css +1 -1
  25. package/mobile/lib/components/Headline/Headline.js +1 -1
  26. package/mobile/lib/components/Headline/Headline.js.map +1 -1
  27. package/mobile/lib/services/search/useSearch.js +8 -5
  28. package/mobile/lib/services/search/useSearch.js.map +1 -1
  29. package/mobile/lib/ui-kit/BaseTile/BaseTile.js +1 -1
  30. package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  31. package/mobile/src/components/Headline/Headline.tsx +1 -1
  32. package/mobile/src/services/search/useSearch.ts +33 -22
  33. package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +1 -1
  34. package/package.json +1 -1
  35. package/src/components/Headline/Headline.tsx +1 -1
  36. package/src/services/search/useSearch.ts +33 -22
  37. package/src/ui-kit/BaseTile/BaseTile.tsx +1 -1
@@ -137,7 +137,7 @@
137
137
  const Headline = JSX(({ className, version = '', headlineVersion = 'XL', title, description, align = 'text-center', as, isEmbedded = false, isTheme = false, ...rest }) => {
138
138
  const versionStyle = headlineVersionStyles[headlineVersion];
139
139
  const descriptionStyle = { marginTop: versionStyle.descriptionStyle };
140
- return (jsxs(BlockWrapper, { className: style({ '@container-normal': isEmbedded }, className), defaultPadding: isEmbedded ? '' : 'p-6xl', version: version, isTheme: isTheme, ...rest, children: [title ? (jsx(Heading, { className: style('whitespace-pre-wrap', align), ...versionStyle?.title, as: as || versionStyle?.title.as, title: title })) : null, description ? (jsx(Paragraph, { size: versionStyle.descriptionSize, font: versionStyle.descriptionWeight, align: align, ...descriptionStyle, children: description })) : null] }));
140
+ return (jsxs(BlockWrapper, { className: style({ '@container-normal': isEmbedded }, className), defaultPadding: isEmbedded ? '' : 'p-6xl', version: version, isTheme: isTheme, ...rest, children: [title ? (jsx(Heading, { className: style('whitespace-normal', align), ...versionStyle?.title, as: as || versionStyle?.title.as, title: title })) : null, description ? (jsx(Paragraph, { size: versionStyle.descriptionSize, font: versionStyle.descriptionWeight, align: align, ...descriptionStyle, children: description })) : null] }));
141
141
  });
142
142
 
143
143
  const DEFAULT_SLOT_NAME = null;
@@ -632,7 +632,7 @@
632
632
  imageAlign,
633
633
  }), buttons ? jsx("div", { className: "self-end", children: buttons }) : null] })] })] }));
634
634
  });
635
- const renderMiddleContent = (insetTitle, children) => insetTitle || children ? (jsxs("div", { className: "grow space-y-lg min-w-fit", children: [insetTitle, children] })) : null;
635
+ const renderMiddleContent = (insetTitle, children) => insetTitle || children ? (jsxs("div", { className: "grow space-y-lg w-fit", children: [insetTitle, children] })) : null;
636
636
  const imageAlwaysOnRightContainerStyle = (isImage) => style(isImage ? 'row-span-2' : '@xl:row-span-2');
637
637
  const renderUnitContainer = (childrenBlocks) => childrenBlocks?.length ? (jsx("div", { className: "flex items-start justify-end", children: childrenBlocks })) : null;
638
638
 
@@ -9577,12 +9577,13 @@
9577
9577
  const SEARCH_INDEX_FILENAME = 'search.index.json';
9578
9578
  const useSearch = ({ basePathList, initialQuery = '', }) => {
9579
9579
  const [query, setQuery] = useState(initialQuery || '');
9580
+ const router = useRouter();
9580
9581
  useEffect(() => {
9581
9582
  if (initialQuery !== undefined && initialQuery !== null) {
9582
9583
  setQuery(initialQuery);
9583
9584
  }
9584
9585
  }, [initialQuery]);
9585
- const { data } = useAsyncData(basePathList?.length ? basePathList : null, fetchSearchIndex);
9586
+ const { data } = useAsyncData(basePathList?.length ? basePathList : null, fetchSearchIndex(router));
9586
9587
  const [result, setResult] = useState(null);
9587
9588
  useDebouncedEffect(() => {
9588
9589
  if (data) {
@@ -9591,13 +9592,13 @@
9591
9592
  }, [data, query]);
9592
9593
  return [result, { value: query, onChange: setQuery }];
9593
9594
  };
9594
- const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map(async (basePath) => [
9595
+ const fetchSearchIndex = (router) => async (...basePathList) => (await Promise.allSettled(basePathList.map(async (basePath) => [
9595
9596
  basePath,
9596
9597
  await fetchJSON(joinPath(basePath, SEARCH_INDEX_FILENAME)),
9597
9598
  ])))
9598
9599
  .map((_) => (_.status === 'fulfilled' ? _.value : []))
9599
- .map(getSearchIndex);
9600
- const getSearchIndex = ([basePath, result]) => {
9600
+ .map(getSearchIndex(router));
9601
+ const getSearchIndex = (router) => ([basePath, result]) => {
9601
9602
  if (!result) {
9602
9603
  return {};
9603
9604
  }
@@ -9605,7 +9606,7 @@
9605
9606
  ...result,
9606
9607
  corpus: result.corpus?.map((_) => ({
9607
9608
  ..._,
9608
- uri: _.uri === 'index' ? basePath : joinPath(basePath, _.uri),
9609
+ uri: _.uri === 'index' ? basePath : adjustHref(router)(_.uri, basePath),
9609
9610
  })),
9610
9611
  };
9611
9612
  };
@@ -11035,7 +11036,7 @@
11035
11036
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
11036
11037
  });
11037
11038
 
11038
- const packageVersion = "0.14.842";
11039
+ const packageVersion = "0.14.844";
11039
11040
 
11040
11041
  exports.Blocks = Blocks;
11041
11042
  exports.ContentPage = ContentPage;