@blocklet/pages-kit 0.4.3 → 0.4.5
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.
|
@@ -54,6 +54,7 @@ function ErrorView({ error }) {
|
|
|
54
54
|
return ((0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "error", children: error.message }) }));
|
|
55
55
|
}
|
|
56
56
|
function ComponentRenderer(_a) {
|
|
57
|
+
var _b;
|
|
57
58
|
var { renderCount = 0, blockletId, blockletTitle, componentName } = _a, props = __rest(_a, ["renderCount", "blockletId", "blockletTitle", "componentName"]);
|
|
58
59
|
const dev = (0, DevProvider_1.useDev)();
|
|
59
60
|
if (renderCount > MAXIMUM_RENDER_STACK_SIZE) {
|
|
@@ -69,7 +70,8 @@ function ComponentRenderer(_a) {
|
|
|
69
70
|
const children = ((0, jsx_runtime_1.jsx)(Renderer, Object.assign({ renderCount: renderCount + 1 }, props, { Component: component.Component, props: Object.assign(Object.assign({}, component.props), props.props) })));
|
|
70
71
|
return (ctx === null || ctx === void 0 ? void 0 : ctx.customRendererComponent) ? ((0, jsx_runtime_1.jsx)(ctx.customRendererComponent, { Component: component.Component, children: children })) : (children);
|
|
71
72
|
}
|
|
72
|
-
if
|
|
73
|
+
// if the component is not in the dev.components, it means the component is not loaded
|
|
74
|
+
if ((dev === null || dev === void 0 ? void 0 : dev.mode) === 'draft' && dev && ((_b = dev.components) === null || _b === void 0 ? void 0 : _b[props.componentId]) === undefined) {
|
|
73
75
|
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
74
76
|
p: 3,
|
|
75
77
|
border: '1px dashed #d32f2f',
|