@contentful/experiences-visual-editor-react 3.4.1-dev-20250901T1349-8f11176.0 → 3.4.1-dev-20250901T1444-72c17a2.0
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/dist/index.js +11 -17
- package/dist/index.js.map +1 -1
- package/dist/renderApp.js +11 -17
- package/dist/renderApp.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1521,13 +1521,7 @@ function buildTemplate({ template, context, }) {
|
|
|
1521
1521
|
const stylesToKeep = ['cfImageAsset'];
|
|
1522
1522
|
const stylesToRemove = CF_STYLE_ATTRIBUTES.filter((style) => !stylesToKeep.includes(style));
|
|
1523
1523
|
// cfWrapColumns & cfWrapColumnsCount are no real style attributes as they are handled on the editor side
|
|
1524
|
-
const propsToRemove = [
|
|
1525
|
-
'cfHyperlink',
|
|
1526
|
-
'cfOpenInNewTab',
|
|
1527
|
-
'cfSsrClassName',
|
|
1528
|
-
'cfWrapColumns',
|
|
1529
|
-
'cfWrapColumnsCount',
|
|
1530
|
-
];
|
|
1524
|
+
const propsToRemove = ['cfSsrClassName', 'cfWrapColumns', 'cfWrapColumnsCount'];
|
|
1531
1525
|
const sanitizeNodeProps = (nodeProps) => {
|
|
1532
1526
|
return omit(nodeProps, stylesToRemove, propsToRemove);
|
|
1533
1527
|
};
|
|
@@ -4932,23 +4926,23 @@ const useComponentProps = ({ node, entityStore, areEntitiesFetched, resolveDesig
|
|
|
4932
4926
|
'data-cf-node-block-type': node.type,
|
|
4933
4927
|
className: props.cfSsrClassName ?? cfCsrClassName,
|
|
4934
4928
|
};
|
|
4935
|
-
// Only pass `editorMode` and `node` to structure components and assembly root nodes.
|
|
4936
|
-
const isStructureComponent = isContentfulStructureComponent(node.data.blockId);
|
|
4937
|
-
if (isStructureComponent) {
|
|
4938
|
-
return {
|
|
4939
|
-
...sharedProps,
|
|
4940
|
-
editorMode: true,
|
|
4941
|
-
node,
|
|
4942
|
-
};
|
|
4943
|
-
}
|
|
4944
4929
|
return {
|
|
4945
4930
|
...sharedProps,
|
|
4946
4931
|
// Allows custom components to render differently in the editor. This needs to be activated
|
|
4947
4932
|
// through options as the component has to be aware of this prop to not cause any React warnings.
|
|
4948
4933
|
...(options?.enableCustomEditorView ? { isInExpEditorMode: true } : {}),
|
|
4934
|
+
...(options?.editorProperties?.isEditorMode ? { isEditorMode: true } : {}),
|
|
4935
|
+
...(options?.editorProperties?.node ? { node } : {}),
|
|
4949
4936
|
...sanitizeNodeProps(props),
|
|
4950
4937
|
};
|
|
4951
|
-
}, [
|
|
4938
|
+
}, [
|
|
4939
|
+
cfCsrClassName,
|
|
4940
|
+
node,
|
|
4941
|
+
options?.editorProperties?.isEditorMode,
|
|
4942
|
+
options?.editorProperties?.node,
|
|
4943
|
+
options?.enableCustomEditorView,
|
|
4944
|
+
props,
|
|
4945
|
+
]);
|
|
4952
4946
|
return { componentProps };
|
|
4953
4947
|
};
|
|
4954
4948
|
|