@se-studio/core-ui 1.0.13 → 1.0.15
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.
- package/README.md +78 -14
- package/dist/CmsRendererConfig.d.ts +122 -0
- package/dist/CmsRendererConfig.d.ts.map +1 -1
- package/dist/analytics/AnalyticsProvider.d.ts +16 -0
- package/dist/analytics/AnalyticsProvider.d.ts.map +1 -0
- package/dist/analytics/AnalyticsProvider.js +22 -0
- package/dist/analytics/AnalyticsProvider.js.map +1 -0
- package/dist/analytics/adapters/ConsoleAnalyticsAdapter.d.ts +12 -0
- package/dist/analytics/adapters/ConsoleAnalyticsAdapter.d.ts.map +1 -0
- package/dist/analytics/adapters/ConsoleAnalyticsAdapter.js +21 -0
- package/dist/analytics/adapters/ConsoleAnalyticsAdapter.js.map +1 -0
- package/dist/analytics/adapters/index.d.ts +2 -0
- package/dist/analytics/adapters/index.d.ts.map +1 -0
- package/dist/analytics/adapters/index.js +2 -0
- package/dist/analytics/adapters/index.js.map +1 -0
- package/dist/analytics/types.d.ts +41 -0
- package/dist/analytics/types.d.ts.map +1 -0
- package/dist/analytics/types.js +2 -0
- package/dist/analytics/types.js.map +1 -0
- package/dist/analytics/useAnalytics.d.ts +45 -0
- package/dist/analytics/useAnalytics.d.ts.map +1 -0
- package/dist/analytics/useAnalytics.js +70 -0
- package/dist/analytics/useAnalytics.js.map +1 -0
- package/dist/components/ClientMonitor.d.ts +1 -0
- package/dist/components/ClientMonitor.d.ts.map +1 -1
- package/dist/components/ClientMonitor.js +223 -18
- package/dist/components/ClientMonitor.js.map +1 -1
- package/dist/components/CmsCollection.d.ts +47 -0
- package/dist/components/CmsCollection.d.ts.map +1 -1
- package/dist/components/CmsCollection.js +7 -0
- package/dist/components/CmsCollection.js.map +1 -1
- package/dist/components/CmsComponent.d.ts +47 -0
- package/dist/components/CmsComponent.d.ts.map +1 -1
- package/dist/components/CmsComponent.js +7 -0
- package/dist/components/CmsComponent.js.map +1 -1
- package/dist/components/CmsContent.d.ts +62 -0
- package/dist/components/CmsContent.d.ts.map +1 -1
- package/dist/components/CmsContent.js +53 -0
- package/dist/components/CmsContent.js.map +1 -1
- package/dist/components/CmsConversionErrors.js +2 -0
- package/dist/components/CmsConversionErrors.js.map +1 -1
- package/dist/components/CmsEmbeddedContent.d.ts +3 -0
- package/dist/components/CmsEmbeddedContent.d.ts.map +1 -1
- package/dist/components/CmsEmbeddedContent.js +3 -0
- package/dist/components/CmsEmbeddedContent.js.map +1 -1
- package/dist/components/CmsExternalComponent.d.ts +44 -0
- package/dist/components/CmsExternalComponent.d.ts.map +1 -1
- package/dist/components/CmsExternalComponent.js +7 -0
- package/dist/components/CmsExternalComponent.js.map +1 -1
- package/dist/components/ImageKitClientVideo.js +1 -0
- package/dist/components/ImageKitClientVideo.js.map +1 -1
- package/dist/components/SvgComponent.js +3 -1
- package/dist/components/SvgComponent.js.map +1 -1
- package/dist/components/VisualComponent.d.ts +47 -0
- package/dist/components/VisualComponent.d.ts.map +1 -1
- package/dist/components/VisualComponent.js +47 -0
- package/dist/components/VisualComponent.js.map +1 -1
- package/dist/elements/TrackedLink.d.ts +24 -0
- package/dist/elements/TrackedLink.d.ts.map +1 -0
- package/dist/elements/TrackedLink.js +76 -0
- package/dist/elements/TrackedLink.js.map +1 -0
- package/dist/framework/BackgroundMedia.js +5 -1
- package/dist/framework/BackgroundMedia.js.map +1 -1
- package/dist/framework/ComponentErrorIndicator.js +7 -4
- package/dist/framework/ComponentErrorIndicator.js.map +1 -1
- package/dist/framework/componentErrors.d.ts +8 -0
- package/dist/framework/componentErrors.d.ts.map +1 -1
- package/dist/framework/componentErrors.js +10 -0
- package/dist/framework/componentErrors.js.map +1 -1
- package/dist/hooks/useClickTracking.d.ts +39 -0
- package/dist/hooks/useClickTracking.d.ts.map +1 -1
- package/dist/hooks/useClickTracking.js +29 -0
- package/dist/hooks/useClickTracking.js.map +1 -1
- package/dist/index.d.ts +41 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -1
- package/dist/index.js.map +1 -1
- package/dist/rtf/rtf.d.ts +41 -0
- package/dist/rtf/rtf.d.ts.map +1 -1
- package/dist/rtf/rtf.js +36 -0
- package/dist/rtf/rtf.js.map +1 -1
- package/dist/utils/UnsupportedWarning.d.ts +23 -0
- package/dist/utils/UnsupportedWarning.d.ts.map +1 -1
- package/dist/utils/UnsupportedWarning.js +24 -0
- package/dist/utils/UnsupportedWarning.js.map +1 -1
- package/dist/utils/UnusedChecker.d.ts +39 -0
- package/dist/utils/UnusedChecker.d.ts.map +1 -1
- package/dist/utils/UnusedChecker.js +47 -3
- package/dist/utils/UnusedChecker.js.map +1 -1
- package/dist/utils/buildPageMetadata.d.ts +45 -0
- package/dist/utils/buildPageMetadata.d.ts.map +1 -1
- package/dist/utils/buildPageMetadata.js +37 -0
- package/dist/utils/buildPageMetadata.js.map +1 -1
- package/dist/utils/cn.d.ts +26 -0
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/cn.js +26 -0
- package/dist/utils/cn.js.map +1 -1
- package/dist/utils/componentUtils.d.ts +121 -0
- package/dist/utils/componentUtils.d.ts.map +1 -1
- package/dist/utils/componentUtils.js +80 -0
- package/dist/utils/componentUtils.js.map +1 -1
- package/dist/utils/convertText.js +10 -2
- package/dist/utils/convertText.js.map +1 -1
- package/dist/utils/errorHandling.d.ts +27 -0
- package/dist/utils/errorHandling.d.ts.map +1 -1
- package/dist/utils/errorHandling.js +33 -0
- package/dist/utils/errorHandling.js.map +1 -1
- package/dist/utils/previewUtils.js +2 -0
- package/dist/utils/previewUtils.js.map +1 -1
- package/package.json +22 -8
- package/dist/elements/UtmLinkOrDiv.d.ts +0 -5
- package/dist/elements/UtmLinkOrDiv.d.ts.map +0 -1
- package/dist/elements/UtmLinkOrDiv.js +0 -9
- package/dist/elements/UtmLinkOrDiv.js.map +0 -1
|
@@ -3,6 +3,85 @@ import { usePathname } from 'next/navigation';
|
|
|
3
3
|
import { useEffect } from 'react';
|
|
4
4
|
import { useDocumentVisible } from '../hooks/useDocumentVisible';
|
|
5
5
|
const _observers = new Map();
|
|
6
|
+
// Maps to store element metadata for scroll progress calculation
|
|
7
|
+
const _sectionHeights = new Map();
|
|
8
|
+
const _sectionThresholds = new Map();
|
|
9
|
+
// Dense thresholds for IntersectionObserver (0, 0.05, 0.1, ... 1.0)
|
|
10
|
+
const SECTION_THRESHOLDS = Array.from({ length: 21 }, (_, i) => i * 0.05);
|
|
11
|
+
// Tracking for tall elements that need scroll listener
|
|
12
|
+
const _intersectingTallElements = new Set();
|
|
13
|
+
let _scrollRAFId = null;
|
|
14
|
+
let _scrollListenerAttached = false;
|
|
15
|
+
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
16
|
+
// Module-level debug flag, set by ClientMonitor component
|
|
17
|
+
let _debugEnabled = false;
|
|
18
|
+
function shouldDebug(element) {
|
|
19
|
+
if (!isDevelopment)
|
|
20
|
+
return false;
|
|
21
|
+
if (_debugEnabled)
|
|
22
|
+
return true;
|
|
23
|
+
if (element?.hasAttribute('data-debug'))
|
|
24
|
+
return true;
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
// Updates scroll progress for a single element (used by scroll handler)
|
|
28
|
+
function updateScrollProgress(element) {
|
|
29
|
+
const elementHeight = _sectionHeights.get(element);
|
|
30
|
+
const threshold = _sectionThresholds.get(element);
|
|
31
|
+
if (elementHeight === undefined || threshold === undefined)
|
|
32
|
+
return;
|
|
33
|
+
const rect = element.getBoundingClientRect();
|
|
34
|
+
const scrollProgress = (window.innerHeight - rect.top) / elementHeight;
|
|
35
|
+
const shouldTrigger = scrollProgress >= threshold;
|
|
36
|
+
element.dataset.visible = shouldTrigger ? 'true' : 'false';
|
|
37
|
+
if (shouldTrigger && !element.dataset.seen) {
|
|
38
|
+
element.dataset.seen = 'true';
|
|
39
|
+
}
|
|
40
|
+
if (shouldDebug(element)) {
|
|
41
|
+
element.dataset.debugScrollProgress = scrollProgress.toFixed(3);
|
|
42
|
+
element.dataset.debugElementHeight = elementHeight.toFixed(1);
|
|
43
|
+
element.dataset.debugThreshold = threshold.toFixed(3);
|
|
44
|
+
element.dataset.debugScrollY = window.scrollY.toFixed(1);
|
|
45
|
+
element.dataset.debugViewportHeight = window.innerHeight.toFixed(1);
|
|
46
|
+
element.dataset.debugShouldTrigger = shouldTrigger ? 'true' : 'false';
|
|
47
|
+
element.dataset.debugIsTallElement = 'true';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
// RAF-throttled scroll handler for tall elements
|
|
51
|
+
function handleScroll() {
|
|
52
|
+
if (_scrollRAFId !== null)
|
|
53
|
+
return;
|
|
54
|
+
_scrollRAFId = requestAnimationFrame(() => {
|
|
55
|
+
_scrollRAFId = null;
|
|
56
|
+
for (const element of _intersectingTallElements) {
|
|
57
|
+
updateScrollProgress(element);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
// Attach scroll listener if not already attached
|
|
62
|
+
function attachScrollListener() {
|
|
63
|
+
if (!_scrollListenerAttached) {
|
|
64
|
+
window.addEventListener('scroll', handleScroll, { passive: true });
|
|
65
|
+
_scrollListenerAttached = true;
|
|
66
|
+
if (shouldDebug()) {
|
|
67
|
+
console.log('[ClientMonitor] Scroll listener attached for tall elements');
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// Detach scroll listener if no tall elements are being tracked
|
|
72
|
+
function detachScrollListener() {
|
|
73
|
+
if (_scrollListenerAttached && _intersectingTallElements.size === 0) {
|
|
74
|
+
window.removeEventListener('scroll', handleScroll);
|
|
75
|
+
_scrollListenerAttached = false;
|
|
76
|
+
if (_scrollRAFId !== null) {
|
|
77
|
+
cancelAnimationFrame(_scrollRAFId);
|
|
78
|
+
_scrollRAFId = null;
|
|
79
|
+
}
|
|
80
|
+
if (shouldDebug()) {
|
|
81
|
+
console.log('[ClientMonitor] Scroll listener detached');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
6
85
|
function roundThreshold(threshold) {
|
|
7
86
|
return Math.round(threshold * 10) / 10;
|
|
8
87
|
}
|
|
@@ -19,21 +98,26 @@ function getElementThreshold(element, defaultThreshold) {
|
|
|
19
98
|
function handleVideo(video, isIntersecting) {
|
|
20
99
|
if (!isIntersecting) {
|
|
21
100
|
if (!video.paused) {
|
|
101
|
+
// console.log("pause video", video.src);
|
|
22
102
|
video.pause();
|
|
23
103
|
}
|
|
24
104
|
}
|
|
25
105
|
else if (video.paused) {
|
|
106
|
+
// console.log("play video", video.src);
|
|
26
107
|
video
|
|
27
108
|
.play()
|
|
28
109
|
.then(() => {
|
|
29
110
|
video.controls = false;
|
|
30
111
|
})
|
|
31
112
|
.catch(() => {
|
|
113
|
+
// console.log("failed to play", error);
|
|
114
|
+
// video.controls = true;
|
|
32
115
|
});
|
|
33
116
|
}
|
|
34
117
|
}
|
|
35
118
|
function handleAnimation(animation, isIntersecting) {
|
|
36
119
|
const currentState = animation.currentState;
|
|
120
|
+
// console.log('current state', currentState)
|
|
37
121
|
if (!isIntersecting) {
|
|
38
122
|
if (currentState === 'playing') {
|
|
39
123
|
animation.pause();
|
|
@@ -41,9 +125,11 @@ function handleAnimation(animation, isIntersecting) {
|
|
|
41
125
|
}
|
|
42
126
|
else {
|
|
43
127
|
if (currentState === 'paused') {
|
|
128
|
+
// console.log('play animation')
|
|
44
129
|
animation.play();
|
|
45
130
|
}
|
|
46
131
|
if (!currentState || currentState === 'loading') {
|
|
132
|
+
// console.log('set to autoplay')
|
|
47
133
|
if (animation.play) {
|
|
48
134
|
animation.play();
|
|
49
135
|
}
|
|
@@ -51,16 +137,71 @@ function handleAnimation(animation, isIntersecting) {
|
|
|
51
137
|
}
|
|
52
138
|
}
|
|
53
139
|
}
|
|
54
|
-
function handleAnimatedSection(section, isIntersecting) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
140
|
+
function handleAnimatedSection(section, isIntersecting, entry) {
|
|
141
|
+
const elementHeight = _sectionHeights.get(section);
|
|
142
|
+
const threshold = _sectionThresholds.get(section);
|
|
143
|
+
if (elementHeight === undefined || threshold === undefined) {
|
|
144
|
+
// Fallback to intersection-based behavior if height/threshold not available
|
|
145
|
+
section.dataset.visible = isIntersecting ? 'true' : 'false';
|
|
146
|
+
if (isIntersecting && !section.dataset.seen) {
|
|
58
147
|
section.dataset.seen = 'true';
|
|
59
148
|
}
|
|
149
|
+
if (shouldDebug(section)) {
|
|
150
|
+
section.dataset.debugIntersectionRatio = entry.intersectionRatio.toFixed(3);
|
|
151
|
+
section.dataset.debugBoundingTop = entry.boundingClientRect.top.toFixed(1);
|
|
152
|
+
section.dataset.debugScrollY = window.scrollY.toFixed(1);
|
|
153
|
+
section.dataset.debugViewportHeight = window.innerHeight.toFixed(1);
|
|
154
|
+
section.dataset.debugShouldTrigger = isIntersecting ? 'true' : 'false';
|
|
155
|
+
delete section.dataset.debugScrollProgress;
|
|
156
|
+
delete section.dataset.debugElementHeight;
|
|
157
|
+
delete section.dataset.debugThreshold;
|
|
158
|
+
}
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
const isTallElement = elementHeight > window.innerHeight;
|
|
162
|
+
// For tall elements, use scroll listener for continuous tracking
|
|
163
|
+
if (isTallElement) {
|
|
164
|
+
if (isIntersecting) {
|
|
165
|
+
_intersectingTallElements.add(section);
|
|
166
|
+
attachScrollListener();
|
|
167
|
+
// Immediately update scroll progress
|
|
168
|
+
updateScrollProgress(section);
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
_intersectingTallElements.delete(section);
|
|
172
|
+
detachScrollListener();
|
|
173
|
+
// Mark as not visible when leaving viewport
|
|
174
|
+
section.dataset.visible = 'false';
|
|
175
|
+
}
|
|
176
|
+
if (shouldDebug(section)) {
|
|
177
|
+
section.dataset.debugIntersectionRatio = entry.intersectionRatio.toFixed(3);
|
|
178
|
+
section.dataset.debugBoundingTop = entry.boundingClientRect.top.toFixed(1);
|
|
179
|
+
section.dataset.debugIsTallElement = 'true';
|
|
180
|
+
}
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
// For normal-sized elements, IntersectionObserver provides enough granularity
|
|
184
|
+
const scrollProgress = (window.innerHeight - entry.boundingClientRect.top) / elementHeight;
|
|
185
|
+
const shouldTrigger = scrollProgress >= threshold;
|
|
186
|
+
section.dataset.visible = shouldTrigger ? 'true' : 'false';
|
|
187
|
+
if (shouldTrigger && !section.dataset.seen) {
|
|
188
|
+
section.dataset.seen = 'true';
|
|
189
|
+
}
|
|
190
|
+
if (shouldDebug(section)) {
|
|
191
|
+
section.dataset.debugIntersectionRatio = entry.intersectionRatio.toFixed(3);
|
|
192
|
+
section.dataset.debugBoundingTop = entry.boundingClientRect.top.toFixed(1);
|
|
193
|
+
section.dataset.debugScrollProgress = scrollProgress.toFixed(3);
|
|
194
|
+
section.dataset.debugElementHeight = elementHeight.toFixed(1);
|
|
195
|
+
section.dataset.debugThreshold = threshold.toFixed(3);
|
|
196
|
+
section.dataset.debugScrollY = window.scrollY.toFixed(1);
|
|
197
|
+
section.dataset.debugViewportHeight = window.innerHeight.toFixed(1);
|
|
198
|
+
section.dataset.debugShouldTrigger = shouldTrigger ? 'true' : 'false';
|
|
199
|
+
section.dataset.debugIsTallElement = 'false';
|
|
60
200
|
}
|
|
61
201
|
}
|
|
62
202
|
function intersectionHandler(entries) {
|
|
63
203
|
for (const entry of entries) {
|
|
204
|
+
// console.log("target", entry.target.localName, entry.target);
|
|
64
205
|
const target = entry.target;
|
|
65
206
|
switch (target.localName) {
|
|
66
207
|
case 'video':
|
|
@@ -72,7 +213,7 @@ function intersectionHandler(entries) {
|
|
|
72
213
|
default:
|
|
73
214
|
{
|
|
74
215
|
const element = target;
|
|
75
|
-
handleAnimatedSection(element, entry.isIntersecting);
|
|
216
|
+
handleAnimatedSection(element, entry.isIntersecting, entry);
|
|
76
217
|
}
|
|
77
218
|
break;
|
|
78
219
|
}
|
|
@@ -91,11 +232,18 @@ function getObserver(threshold) {
|
|
|
91
232
|
function findAllVideos(defaultThreshold) {
|
|
92
233
|
const videos = document.getElementsByTagName('video');
|
|
93
234
|
const videoObservers = new Map();
|
|
235
|
+
if (shouldDebug()) {
|
|
236
|
+
console.log(`[ClientMonitor] Found ${videos.length} video(s)`);
|
|
237
|
+
}
|
|
94
238
|
for (const video of videos) {
|
|
95
239
|
video.controls = false;
|
|
96
240
|
video.muted = true;
|
|
97
241
|
const threshold = getElementThreshold(video, defaultThreshold);
|
|
98
242
|
const observer = getObserver(threshold);
|
|
243
|
+
if (shouldDebug(video)) {
|
|
244
|
+
video.setAttribute('data-monitor-threshold', threshold.toString());
|
|
245
|
+
video.setAttribute('data-monitor-observed', 'true');
|
|
246
|
+
}
|
|
99
247
|
let videoList = videoObservers.get(observer);
|
|
100
248
|
if (!videoList) {
|
|
101
249
|
videoList = [];
|
|
@@ -105,6 +253,7 @@ function findAllVideos(defaultThreshold) {
|
|
|
105
253
|
observer.observe(video);
|
|
106
254
|
}
|
|
107
255
|
return () => {
|
|
256
|
+
// console.log("clear down video observers");
|
|
108
257
|
for (const [observer, videoList] of videoObservers) {
|
|
109
258
|
for (const video of videoList) {
|
|
110
259
|
observer.unobserve(video);
|
|
@@ -115,9 +264,16 @@ function findAllVideos(defaultThreshold) {
|
|
|
115
264
|
function findAllAnimations(defaultThreshold) {
|
|
116
265
|
const animations = document.getElementsByTagName('lottie-player');
|
|
117
266
|
const animationObservers = new Map();
|
|
267
|
+
if (shouldDebug()) {
|
|
268
|
+
console.log(`[ClientMonitor] Found ${animations.length} animation(s)`);
|
|
269
|
+
}
|
|
118
270
|
for (const animation of animations) {
|
|
119
271
|
const threshold = getElementThreshold(animation, defaultThreshold);
|
|
120
272
|
const observer = getObserver(threshold);
|
|
273
|
+
if (shouldDebug(animation)) {
|
|
274
|
+
animation.setAttribute('data-monitor-threshold', threshold.toString());
|
|
275
|
+
animation.setAttribute('data-monitor-observed', 'true');
|
|
276
|
+
}
|
|
121
277
|
let animationList = animationObservers.get(observer);
|
|
122
278
|
if (!animationList) {
|
|
123
279
|
animationList = [];
|
|
@@ -127,6 +283,7 @@ function findAllAnimations(defaultThreshold) {
|
|
|
127
283
|
observer.observe(animation);
|
|
128
284
|
}
|
|
129
285
|
return () => {
|
|
286
|
+
// console.log("clear down animation observers");
|
|
130
287
|
for (const [observer, animationList] of animationObservers) {
|
|
131
288
|
for (const animation of animationList) {
|
|
132
289
|
observer.unobserve(animation);
|
|
@@ -136,24 +293,67 @@ function findAllAnimations(defaultThreshold) {
|
|
|
136
293
|
}
|
|
137
294
|
function findAllAnimatedSections(defaultThreshold) {
|
|
138
295
|
const sections = document.querySelectorAll('[data-component]');
|
|
139
|
-
const
|
|
296
|
+
const sectionElements = [];
|
|
297
|
+
if (shouldDebug()) {
|
|
298
|
+
console.log(`[ClientMonitor] Found ${sections.length} animated section(s)`);
|
|
299
|
+
}
|
|
300
|
+
// Create a shared observer with dense thresholds for all sections
|
|
301
|
+
// This gives us callbacks at every 5% intersection change
|
|
302
|
+
const sectionObserver = new IntersectionObserver((entries) => {
|
|
303
|
+
for (const entry of entries) {
|
|
304
|
+
const element = entry.target;
|
|
305
|
+
handleAnimatedSection(element, entry.isIntersecting, entry);
|
|
306
|
+
}
|
|
307
|
+
}, { threshold: SECTION_THRESHOLDS });
|
|
308
|
+
// Set up ResizeObserver to track element heights
|
|
309
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
310
|
+
for (const entry of entries) {
|
|
311
|
+
const element = entry.target;
|
|
312
|
+
_sectionHeights.set(element, entry.contentRect.height);
|
|
313
|
+
}
|
|
314
|
+
});
|
|
140
315
|
for (const section of sections) {
|
|
141
|
-
const
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
316
|
+
const sectionElement = section;
|
|
317
|
+
const threshold = getElementThreshold(sectionElement, defaultThreshold);
|
|
318
|
+
// Store threshold for this element
|
|
319
|
+
_sectionThresholds.set(sectionElement, threshold);
|
|
320
|
+
// Get initial height and store it
|
|
321
|
+
const height = sectionElement.offsetHeight;
|
|
322
|
+
_sectionHeights.set(sectionElement, height);
|
|
323
|
+
// Observe element for size changes
|
|
324
|
+
resizeObserver.observe(sectionElement);
|
|
325
|
+
// Track element for cleanup
|
|
326
|
+
sectionElements.push(sectionElement);
|
|
327
|
+
if (shouldDebug(sectionElement)) {
|
|
328
|
+
sectionElement.setAttribute('data-monitor-threshold', threshold.toString());
|
|
329
|
+
sectionElement.setAttribute('data-monitor-observed', 'true');
|
|
147
330
|
}
|
|
148
|
-
|
|
149
|
-
|
|
331
|
+
// Observe with shared dense-threshold observer
|
|
332
|
+
sectionObserver.observe(sectionElement);
|
|
150
333
|
}
|
|
151
334
|
return () => {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
335
|
+
// Clean up IntersectionObserver
|
|
336
|
+
sectionObserver.disconnect();
|
|
337
|
+
// Clean up ResizeObserver and maps
|
|
338
|
+
for (const sectionElement of sectionElements) {
|
|
339
|
+
resizeObserver.unobserve(sectionElement);
|
|
340
|
+
_sectionHeights.delete(sectionElement);
|
|
341
|
+
_sectionThresholds.delete(sectionElement);
|
|
342
|
+
// Remove from tall element tracking if present
|
|
343
|
+
_intersectingTallElements.delete(sectionElement);
|
|
344
|
+
}
|
|
345
|
+
// Clean up scroll listener
|
|
346
|
+
if (_scrollListenerAttached) {
|
|
347
|
+
window.removeEventListener('scroll', handleScroll);
|
|
348
|
+
_scrollListenerAttached = false;
|
|
349
|
+
if (_scrollRAFId !== null) {
|
|
350
|
+
cancelAnimationFrame(_scrollRAFId);
|
|
351
|
+
_scrollRAFId = null;
|
|
155
352
|
}
|
|
156
353
|
}
|
|
354
|
+
if (shouldDebug()) {
|
|
355
|
+
console.log('[ClientMonitor] Animated sections cleanup complete');
|
|
356
|
+
}
|
|
157
357
|
};
|
|
158
358
|
}
|
|
159
359
|
function findAll(defaultThreshold) {
|
|
@@ -166,13 +366,18 @@ function findAll(defaultThreshold) {
|
|
|
166
366
|
animatedSectionCleanup();
|
|
167
367
|
};
|
|
168
368
|
}
|
|
169
|
-
export const ClientMonitor = ({ defaultThreshold = 0.2 }) => {
|
|
369
|
+
export const ClientMonitor = ({ defaultThreshold = 0.2, enableDebug = false, }) => {
|
|
370
|
+
// Set module-level flag on mount/update
|
|
371
|
+
_debugEnabled = enableDebug;
|
|
170
372
|
const isDocumentVisible = useDocumentVisible();
|
|
171
373
|
const pathname = usePathname();
|
|
172
374
|
const roundedDefaultThreshold = roundThreshold(defaultThreshold);
|
|
173
375
|
useEffect(() => {
|
|
174
376
|
pathname;
|
|
175
377
|
if (isDocumentVisible) {
|
|
378
|
+
if (shouldDebug()) {
|
|
379
|
+
console.log(`[ClientMonitor] Initializing with defaultThreshold: ${roundedDefaultThreshold}`);
|
|
380
|
+
}
|
|
176
381
|
return findAll(roundedDefaultThreshold);
|
|
177
382
|
}
|
|
178
383
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientMonitor.js","sourceRoot":"","sources":["../../src/components/ClientMonitor.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,MAAM,UAAU,GAAG,IAAI,GAAG,EAAgC,CAAC;AAE3D,SAAS,cAAc,CAAC,SAAiB;IACvC,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;AACzC,CAAC;AAED,SAAS,mBAAmB,CAAC,OAAoB,EAAE,gBAAwB;IACzE,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,6BAA6B,CAAC,CAAC;IACtE,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAC5C,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AAM,aAAa,GAAiC,CAAC,EAC1D,gBAAgB,GAAG,GAAG,EACtB,WAAW,GAAG,KAAK,GACpB,EAAE,EAAE;IACH,wCAAwC;IACxC,aAAa,GAAG,WAAW,CAAC;IAC5B,MAAM,iBAAiB,GAAG,kBAAkB,EAAE,CAAC;IAC/C,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,uBAAuB,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAC;IACjE,SAAS,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC;QACT,IAAI,iBAAiB,EAAE,CAAC;YACtB,IAAI,WAAW,EAAE,EAAE,CAAC;gBAClB,OAAO,CAAC,GAAG,CACT,uDAAuD,uBAAuB,EAAE,CACjF,CAAC;YACJ,CAAC;YACD,OAAO,OAAO,CAAC,uBAAuB,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,uBAAuB,CAAC,CAAC,CAAC;IAE3D,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: Any is allowed */
|
|
1
2
|
import type { IBaseCollection, IContentContext, ITyped } from '@se-studio/core-data-types';
|
|
2
3
|
import type React from 'react';
|
|
3
4
|
import type { CmsRendererConfig } from '../CmsRendererConfig';
|
|
@@ -7,8 +8,54 @@ export type CollectionRendererProps<TInformation extends ITyped> = {
|
|
|
7
8
|
contentContext: IContentContext;
|
|
8
9
|
rendererConfig: CmsRendererConfig;
|
|
9
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Standard collection renderer type for rendering collections in the main content flow.
|
|
13
|
+
* Used for collections that appear as top-level page content.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* const MyCollectionRenderer: CollectionRenderer<IMyCollection> = ({
|
|
18
|
+
* information,
|
|
19
|
+
* contentContext,
|
|
20
|
+
* rendererConfig
|
|
21
|
+
* }) => {
|
|
22
|
+
* return <div>{information.title}</div>;
|
|
23
|
+
* };
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
10
26
|
export type CollectionRenderer<TInformation extends ITyped> = React.FC<CollectionRendererProps<TInformation>>;
|
|
27
|
+
/**
|
|
28
|
+
* Embedded collection renderer type for rendering collections within rich text or other collections.
|
|
29
|
+
* Includes additional props for positioning and tracking embedded content.
|
|
30
|
+
*
|
|
31
|
+
* Use this type when defining custom collection renderers that can be embedded within RTF fields
|
|
32
|
+
* or nested inside other collections.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* const MyEmbeddedCollectionRenderer: EmbeddedCollectionRenderer<IMyCollection> = ({
|
|
37
|
+
* information,
|
|
38
|
+
* contentContext,
|
|
39
|
+
* rendererConfig,
|
|
40
|
+
* positionClassName,
|
|
41
|
+
* embeddedIndex,
|
|
42
|
+
* parentIndex
|
|
43
|
+
* }) => {
|
|
44
|
+
* return (
|
|
45
|
+
* <div className={positionClassName}>
|
|
46
|
+
* {information.title} (Position: {embeddedIndex})
|
|
47
|
+
* </div>
|
|
48
|
+
* );
|
|
49
|
+
* };
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
11
52
|
export type EmbeddedCollectionRenderer<TInformation extends ITyped = ITyped> = React.FC<CollectionRendererProps<TInformation> & EmbeddedRendererProps>;
|
|
53
|
+
/**
|
|
54
|
+
* Collection type mapper for rendering collections.
|
|
55
|
+
* Maps collection type strings to React components that can render them.
|
|
56
|
+
*
|
|
57
|
+
* Projects should provide their own CollectionMap when calling CmsCollection.
|
|
58
|
+
*/
|
|
12
59
|
export type CollectionMap<TKey extends string, TInformation extends ITyped> = Partial<Record<TKey, CollectionRenderer<TInformation>>>;
|
|
13
60
|
export type EmbeddedCollectionMap<TKey extends string, TInformation extends IBaseCollection> = Partial<Record<TKey, EmbeddedCollectionRenderer<TInformation>>>;
|
|
14
61
|
export declare const CmsCollection: CollectionRenderer<IBaseCollection>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsCollection.d.ts","sourceRoot":"","sources":["../../src/components/CmsCollection.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CmsCollection.d.ts","sourceRoot":"","sources":["../../src/components/CmsCollection.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC3F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1D,MAAM,MAAM,uBAAuB,CAAC,YAAY,SAAS,MAAM,IAAI;IACjE,WAAW,EAAE,YAAY,CAAC;IAC1B,cAAc,EAAE,eAAe,CAAC;IAChC,cAAc,EAAE,iBAAiB,CAAC;CACnC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,kBAAkB,CAAC,YAAY,SAAS,MAAM,IAAI,KAAK,CAAC,EAAE,CACpE,uBAAuB,CAAC,YAAY,CAAC,CACtC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,0BAA0B,CAAC,YAAY,SAAS,MAAM,GAAG,MAAM,IAAI,KAAK,CAAC,EAAE,CACrF,uBAAuB,CAAC,YAAY,CAAC,GAAG,qBAAqB,CAC9D,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,aAAa,CAAC,IAAI,SAAS,MAAM,EAAE,YAAY,SAAS,MAAM,IAAI,OAAO,CACnF,MAAM,CAAC,IAAI,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC,CAC/C,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAC/B,IAAI,SAAS,MAAM,EACnB,YAAY,SAAS,eAAe,IAClC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,0BAA0B,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AA8CpE,eAAO,MAAM,aAAa,EAAE,kBAAkB,CAAC,eAAe,CAyD7D,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,0BAA0B,CAAC,eAAe,CA0D7E,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Error component displayed in development/preview mode when an unknown collection type is encountered
|
|
4
|
+
*/
|
|
2
5
|
const CollectionTypeError = ({ information, availableTypes, showInProduction = false, }) => {
|
|
3
6
|
if (!showInProduction && typeof process !== 'undefined' && process.env?.NODE_ENV === 'production')
|
|
4
7
|
return null;
|
|
@@ -17,8 +20,10 @@ export const CmsCollection = ({ information, contentContext, rendererConfig, })
|
|
|
17
20
|
const result = (_jsx(Element, { information: information, contentContext: contentContext, rendererConfig: rendererConfig }));
|
|
18
21
|
return result;
|
|
19
22
|
}
|
|
23
|
+
// Log unknown collection type for monitoring
|
|
20
24
|
const availableTypes = Object.keys(collectionMap);
|
|
21
25
|
console.log(`Unknown collection type: ${String(information.collectionType)} (ID: ${information.id}). Available types:`, availableTypes.join(','));
|
|
26
|
+
// Show warning in development/preview mode, use Generic fallback
|
|
22
27
|
const shouldShowError = showUnknownTypeErrors ||
|
|
23
28
|
(typeof process !== 'undefined' && process.env?.NODE_ENV === 'development');
|
|
24
29
|
const result = (_jsxs(_Fragment, { children: [shouldShowError && (_jsx(CollectionTypeError, { information: information, availableTypes: availableTypes, showInProduction: showUnknownTypeErrors })), DefaultRenderer && (_jsx(DefaultRenderer, { information: information, contentContext: contentContext, rendererConfig: rendererConfig }))] }));
|
|
@@ -31,8 +36,10 @@ export const CmsEmbeddedCollection = ({ information, rendererConfig, contentCont
|
|
|
31
36
|
const result = (_jsx(Element, { information: information, rendererConfig: rendererConfig, contentContext: contentContext, ...props }));
|
|
32
37
|
return result;
|
|
33
38
|
}
|
|
39
|
+
// Log unknown collection type for monitoring
|
|
34
40
|
const availableTypes = Object.keys(embeddedCollectionMap);
|
|
35
41
|
console.log(`Unknown embedded collection type: ${String(information.collectionType)} (ID: ${information.id}). Available types:`, availableTypes.join(','));
|
|
42
|
+
// Show warning in development/preview mode, use Generic fallback
|
|
36
43
|
const shouldShowError = showUnknownTypeErrors ||
|
|
37
44
|
(typeof process !== 'undefined' && process.env?.NODE_ENV === 'development');
|
|
38
45
|
const result = (_jsxs(_Fragment, { children: [shouldShowError && (_jsx(CollectionTypeError, { information: information, availableTypes: availableTypes, showInProduction: showUnknownTypeErrors })), DefaultRenderer && (_jsx(DefaultRenderer, { information: information, contentContext: contentContext, rendererConfig: rendererConfig }))] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsCollection.js","sourceRoot":"","sources":["../../src/components/CmsCollection.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CmsCollection.js","sourceRoot":"","sources":["../../src/components/CmsCollection.tsx"],"names":[],"mappings":";AA4EA;;GAEG;AACH,MAAM,mBAAmB,GAAG,CAAC,EAC3B,WAAW,EACX,cAAc,EACd,gBAAgB,GAAG,KAAK,GAKzB,EAAE,EAAE;IACH,IAAI,CAAC,gBAAgB,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,QAAQ,KAAK,YAAY;QAC/F,OAAO,IAAI,CAAC;IAEd,OAAO,CACL,eACE,KAAK,EAAE;YACL,MAAM,EAAE,kBAAkB;YAC1B,UAAU,EAAE,SAAS;YACrB,OAAO,EAAE,MAAM;YACf,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,KAAK;SACpB,aAED,aAAI,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,wCAA8B,EACrF,eA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mBAAmB,IAClB,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,qBAAqB,GACvC,CACH,EACA,eAAe,IAAI,CAClB,KAAC,eAAe,IACd,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,GAC9B,CACH,IACA,CACJ,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: Any is allowed */
|
|
1
2
|
import type { IBaseComponent, IContentContext, ITyped } from '@se-studio/core-data-types';
|
|
2
3
|
import type React from 'react';
|
|
3
4
|
import type { CmsRendererConfig } from '../CmsRendererConfig';
|
|
@@ -7,8 +8,54 @@ export type ComponentRendererProps<TInformation extends ITyped> = {
|
|
|
7
8
|
contentContext: IContentContext;
|
|
8
9
|
rendererConfig: CmsRendererConfig;
|
|
9
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Standard component renderer type for rendering components in the main content flow.
|
|
13
|
+
* Used for components that appear as top-level page content.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* const MyComponentRenderer: ComponentRenderer<IMyComponent> = ({
|
|
18
|
+
* information,
|
|
19
|
+
* contentContext,
|
|
20
|
+
* rendererConfig
|
|
21
|
+
* }) => {
|
|
22
|
+
* return <div>{information.heading}</div>;
|
|
23
|
+
* };
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
10
26
|
export type ComponentRenderer<TInformation extends ITyped> = React.FC<ComponentRendererProps<TInformation>>;
|
|
27
|
+
/**
|
|
28
|
+
* Embedded component renderer type for rendering components within rich text or collections.
|
|
29
|
+
* Includes additional props for positioning and tracking embedded content.
|
|
30
|
+
*
|
|
31
|
+
* Use this type when defining custom component renderers that can be embedded within RTF fields
|
|
32
|
+
* or nested inside collections.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* const MyEmbeddedComponentRenderer: EmbeddedComponentRenderer<IMyComponent> = ({
|
|
37
|
+
* information,
|
|
38
|
+
* contentContext,
|
|
39
|
+
* rendererConfig,
|
|
40
|
+
* positionClassName,
|
|
41
|
+
* embeddedIndex,
|
|
42
|
+
* parentIndex
|
|
43
|
+
* }) => {
|
|
44
|
+
* return (
|
|
45
|
+
* <div className={positionClassName}>
|
|
46
|
+
* {information.heading} (Embedded #{embeddedIndex})
|
|
47
|
+
* </div>
|
|
48
|
+
* );
|
|
49
|
+
* };
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
11
52
|
export type EmbeddedComponentRenderer<TInformation extends ITyped = ITyped> = React.FC<ComponentRendererProps<TInformation> & EmbeddedRendererProps>;
|
|
53
|
+
/**
|
|
54
|
+
* Component type mapper for rendering components.
|
|
55
|
+
* Maps component type strings to React components that can render them.
|
|
56
|
+
*
|
|
57
|
+
* Projects should provide their own ComponentMap when calling CmsComponent.
|
|
58
|
+
*/
|
|
12
59
|
export type ComponentMap<TKey extends string, TInformation extends ITyped> = Partial<Record<TKey, ComponentRenderer<TInformation>>>;
|
|
13
60
|
export type EmbeddedComponentMap<TKey extends string, TInformation extends ITyped> = Partial<Record<TKey, EmbeddedComponentRenderer<TInformation>>>;
|
|
14
61
|
export declare const CmsComponent: ComponentRenderer<IBaseComponent>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsComponent.d.ts","sourceRoot":"","sources":["../../src/components/CmsComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CmsComponent.d.ts","sourceRoot":"","sources":["../../src/components/CmsComponent.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1D,MAAM,MAAM,sBAAsB,CAAC,YAAY,SAAS,MAAM,IAAI;IAChE,WAAW,EAAE,YAAY,CAAC;IAC1B,cAAc,EAAE,eAAe,CAAC;IAChC,cAAc,EAAE,iBAAiB,CAAC;CACnC,CAAC;AACF;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,iBAAiB,CAAC,YAAY,SAAS,MAAM,IAAI,KAAK,CAAC,EAAE,CACnE,sBAAsB,CAAC,YAAY,CAAC,CACrC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,yBAAyB,CAAC,YAAY,SAAS,MAAM,GAAG,MAAM,IAAI,KAAK,CAAC,EAAE,CACpF,sBAAsB,CAAC,YAAY,CAAC,GAAG,qBAAqB,CAC7D,CAAC;AACF;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CAAC,IAAI,SAAS,MAAM,EAAE,YAAY,SAAS,MAAM,IAAI,OAAO,CAClF,MAAM,CAAC,IAAI,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAC9C,CAAC;AACF,MAAM,MAAM,oBAAoB,CAAC,IAAI,SAAS,MAAM,EAAE,YAAY,SAAS,MAAM,IAAI,OAAO,CAC1F,MAAM,CAAC,IAAI,EAAE,yBAAyB,CAAC,YAAY,CAAC,CAAC,CACtD,CAAC;AA8CF,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,cAAc,CAyD1D,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,yBAAyB,CAAC,cAAc,CA0D1E,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Error component displayed in development/preview mode when an unknown component type is encountered
|
|
4
|
+
*/
|
|
2
5
|
const ComponentTypeError = ({ information, availableTypes, showInProduction = false, }) => {
|
|
3
6
|
if (!showInProduction && typeof process !== 'undefined' && process.env?.NODE_ENV === 'production')
|
|
4
7
|
return null;
|
|
@@ -17,8 +20,10 @@ export const CmsComponent = ({ information, contentContext, rendererConfig, }) =
|
|
|
17
20
|
const result = (_jsx(Element, { information: information, contentContext: contentContext, rendererConfig: rendererConfig }));
|
|
18
21
|
return result;
|
|
19
22
|
}
|
|
23
|
+
// Log unknown component type for monitoring
|
|
20
24
|
const availableTypes = Object.keys(componentMap);
|
|
21
25
|
console.log(`Unknown component type: ${String(information.componentType)} (ID: ${information.id}). Available types:`, availableTypes.join(','));
|
|
26
|
+
// Show warning in development/preview mode, use Generic fallback
|
|
22
27
|
const shouldShowError = showUnknownTypeErrors ||
|
|
23
28
|
(typeof process !== 'undefined' && process.env?.NODE_ENV === 'development');
|
|
24
29
|
const result = (_jsxs(_Fragment, { children: [shouldShowError && (_jsx(ComponentTypeError, { information: information, availableTypes: availableTypes, showInProduction: showUnknownTypeErrors })), DefaultRenderer && (_jsx(DefaultRenderer, { information: information, contentContext: contentContext, rendererConfig: rendererConfig }))] }));
|
|
@@ -31,8 +36,10 @@ export const CmsEmbeddedComponent = ({ information, contentContext, rendererConf
|
|
|
31
36
|
const result = (_jsx(Element, { information: information, contentContext: contentContext, rendererConfig: rendererConfig, ...props }));
|
|
32
37
|
return result;
|
|
33
38
|
}
|
|
39
|
+
// Log unknown component type for monitoring
|
|
34
40
|
const availableTypes = Object.keys(embeddedComponentMap);
|
|
35
41
|
console.log(`Unknown embedded component type: ${String(information.componentType)} (ID: ${information.id}). Available types:`, availableTypes.join(','));
|
|
42
|
+
// Show warning in development/preview mode, use Generic fallback
|
|
36
43
|
const shouldShowError = showUnknownTypeErrors ||
|
|
37
44
|
(typeof process !== 'undefined' && process.env?.NODE_ENV === 'development');
|
|
38
45
|
const result = (_jsxs(_Fragment, { children: [shouldShowError && (_jsx(ComponentTypeError, { information: information, availableTypes: availableTypes, showInProduction: showUnknownTypeErrors })), DefaultRenderer && (_jsx(DefaultRenderer, { information: information, contentContext: contentContext, rendererConfig: rendererConfig }))] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsComponent.js","sourceRoot":"","sources":["../../src/components/CmsComponent.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CmsComponent.js","sourceRoot":"","sources":["../../src/components/CmsComponent.tsx"],"names":[],"mappings":";AAwEA;;GAEG;AACH,MAAM,kBAAkB,GAAG,CAAC,EAC1B,WAAW,EACX,cAAc,EACd,gBAAgB,GAAG,KAAK,GAKzB,EAAE,EAAE;IACH,IAAI,CAAC,gBAAgB,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,QAAQ,KAAK,YAAY;QAC/F,OAAO,IAAI,CAAC;IAEd,OAAO,CACL,eACE,KAAK,EAAE;YACL,MAAM,EAAE,kBAAkB;YAC1B,UAAU,EAAE,SAAS;YACrB,OAAO,EAAE,MAAM;YACf,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,KAAK;SACpB,aAED,aAAI,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,uCAA6B,EACpF,eAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,aAClC,wBACE,+CAAgC,OAAE,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,IACjE,EACJ,wBACE,6CAA8B,OAAE,WAAW,CAAC,EAAE,IAC5C,EACJ,wBACE,gDAAiC,OAAE,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAC1D,EACJ,YAAG,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,+FAE/C,IACA,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAsC,CAAC,EAC9D,WAAW,EACX,cAAc,EACd,cAAc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