@redneckz/wildless-cms-uni-blocks 0.14.206 → 0.14.207

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.
@@ -292,7 +292,7 @@
292
292
 
293
293
  const dirname = (path) => path?.split('/').slice(0, -1).join('/');
294
294
 
295
- const isUUID = (src) => {
295
+ const isUUID = (src = '') => {
296
296
  return /^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(src);
297
297
  };
298
298
 
@@ -314,13 +314,18 @@
314
314
  const PREFIX_API = '/api/';
315
315
  const FILE_STORAGE_API = `${PREFIX_API}v1/storage`;
316
316
  const adjustHref = (router) => (href, basePath = projectSettings.BASE_PATH) => {
317
- if (!href || isURL(href) || [projectSettings.CDN, PREFIX_API].some((_) => hasPrefix(href, _))) {
317
+ if ([
318
+ !href,
319
+ isURL(href),
320
+ isHash(href),
321
+ [projectSettings.CDN, PREFIX_API].some((_) => hasPrefix(href, _)),
322
+ ].some(Boolean)) {
318
323
  return href;
319
324
  }
320
325
  if (isUUID(href)) {
321
326
  return `${FILE_STORAGE_API}/${href}/file`;
322
327
  }
323
- const isRelativeToBase = href.startsWith('/');
328
+ const isRelativeToBase = href?.startsWith('/');
324
329
  return joinPath(hasPrefix(href, basePath) ? '' : basePath, isRelativeToBase ? '/' : dirname(router.pathname), href);
325
330
  };
326
331
  const hasPrefix = (href, prefix) => prefix && href && href.startsWith(prefix);
@@ -6049,7 +6054,7 @@
6049
6054
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6050
6055
  });
6051
6056
 
6052
- const packageVersion = "0.14.205";
6057
+ const packageVersion = "0.14.206";
6053
6058
 
6054
6059
  exports.Blocks = Blocks;
6055
6060
  exports.ContentPage = ContentPage;