@deneb-ui/ui 2.0.89 → 2.0.90
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.
|
@@ -71,8 +71,16 @@ function EditableProductGrid({ sectionPath = 'home', listPath = 'products', titl
|
|
|
71
71
|
}
|
|
72
72
|
const catalogUrl = siteApi?.catalogUrl ||
|
|
73
73
|
(siteData?.siteInstance?.slug ? `/site-catalog/${siteData.siteInstance.slug}` : null);
|
|
74
|
-
|
|
74
|
+
const slug = siteData?.siteInstance?.slug;
|
|
75
|
+
const isPreviewMode = typeof window !== 'undefined' &&
|
|
76
|
+
(window.location.pathname.includes('/template-preview/') ||
|
|
77
|
+
window.location.pathname.includes('/preview/'));
|
|
78
|
+
if (!catalogUrl ||
|
|
79
|
+
isPreviewMode ||
|
|
80
|
+
slug === 'template-validation' ||
|
|
81
|
+
catalogUrl.includes('/template-validation/')) {
|
|
75
82
|
return;
|
|
83
|
+
}
|
|
76
84
|
let active = true;
|
|
77
85
|
const timer = setTimeout(async () => {
|
|
78
86
|
try {
|
|
@@ -25,13 +25,26 @@ function readProductId(queryParam) {
|
|
|
25
25
|
function resolveCatalogUrl(siteData, override) {
|
|
26
26
|
if (override === null)
|
|
27
27
|
return null;
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
const slug = normalizeId(siteData.siteInstance?.slug || siteData.project?.slug || siteData.project?.id);
|
|
29
|
+
const isPreviewMode = typeof window !== 'undefined' &&
|
|
30
|
+
(window.location.pathname.includes('/template-preview/') ||
|
|
31
|
+
window.location.pathname.includes('/preview/'));
|
|
32
|
+
if (isPreviewMode || slug === 'template-validation') {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
if (typeof override === 'string') {
|
|
36
|
+
const trimmed = override.trim();
|
|
37
|
+
if (trimmed.includes('/template-validation/'))
|
|
38
|
+
return null;
|
|
39
|
+
return trimmed || null;
|
|
40
|
+
}
|
|
30
41
|
const configured = siteData.api?.catalogUrl;
|
|
31
42
|
if (typeof configured === 'string' && configured.trim()) {
|
|
32
|
-
|
|
43
|
+
const trimmed = configured.trim();
|
|
44
|
+
if (trimmed.includes('/template-validation/'))
|
|
45
|
+
return null;
|
|
46
|
+
return trimmed;
|
|
33
47
|
}
|
|
34
|
-
const slug = normalizeId(siteData.siteInstance?.slug || siteData.project?.slug || siteData.project?.id);
|
|
35
48
|
if (!slug)
|
|
36
49
|
return null;
|
|
37
50
|
const baseUrl = siteData.api?.baseUrl;
|
package/dist/SiteDataProvider.js
CHANGED
|
@@ -244,6 +244,13 @@ function SiteDataProvider({ children, initialSiteData, fallbackSiteData, liveCat
|
|
|
244
244
|
initialSiteData?.siteInstance?.slug ||
|
|
245
245
|
initialSiteData?.project?.slug ||
|
|
246
246
|
initialSiteData?.project?.id;
|
|
247
|
+
if (!candidateSlug ||
|
|
248
|
+
candidateSlug === 'template-validation' ||
|
|
249
|
+
(typeof window !== 'undefined' &&
|
|
250
|
+
(window.location.pathname.includes('/template-preview/') ||
|
|
251
|
+
window.location.pathname.includes('/preview/')))) {
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
247
254
|
const endpoint = liveCatalogEndpoint ||
|
|
248
255
|
initialSiteData?.api?.catalogUrl ||
|
|
249
256
|
(candidateSlug && initialSiteData?.api?.baseUrl
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deneb-ui/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.90",
|
|
4
4
|
"description": "Visual-first React component library for editable commerce storefronts. Built for Next.js and Fivora.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
],
|
|
51
51
|
"license": "MIT",
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@deneb-ui/core": "^2.0.
|
|
53
|
+
"@deneb-ui/core": "^2.0.90"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"react": "^18.0.0 || ^19.0.0",
|