@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/renderApp.js
CHANGED
|
@@ -44985,13 +44985,7 @@ function buildTemplate({ template, context, }) {
|
|
|
44985
44985
|
const stylesToKeep = ['cfImageAsset'];
|
|
44986
44986
|
const stylesToRemove = CF_STYLE_ATTRIBUTES.filter((style) => !stylesToKeep.includes(style));
|
|
44987
44987
|
// cfWrapColumns & cfWrapColumnsCount are no real style attributes as they are handled on the editor side
|
|
44988
|
-
const propsToRemove = [
|
|
44989
|
-
'cfHyperlink',
|
|
44990
|
-
'cfOpenInNewTab',
|
|
44991
|
-
'cfSsrClassName',
|
|
44992
|
-
'cfWrapColumns',
|
|
44993
|
-
'cfWrapColumnsCount',
|
|
44994
|
-
];
|
|
44988
|
+
const propsToRemove = ['cfSsrClassName', 'cfWrapColumns', 'cfWrapColumnsCount'];
|
|
44995
44989
|
const sanitizeNodeProps = (nodeProps) => {
|
|
44996
44990
|
return omit(nodeProps, stylesToRemove, propsToRemove);
|
|
44997
44991
|
};
|
|
@@ -50328,23 +50322,23 @@ const useComponentProps = ({ node, entityStore, areEntitiesFetched, resolveDesig
|
|
|
50328
50322
|
'data-cf-node-block-type': node.type,
|
|
50329
50323
|
className: props.cfSsrClassName ?? cfCsrClassName,
|
|
50330
50324
|
};
|
|
50331
|
-
// Only pass `editorMode` and `node` to structure components and assembly root nodes.
|
|
50332
|
-
const isStructureComponent = isContentfulStructureComponent(node.data.blockId);
|
|
50333
|
-
if (isStructureComponent) {
|
|
50334
|
-
return {
|
|
50335
|
-
...sharedProps,
|
|
50336
|
-
editorMode: true,
|
|
50337
|
-
node,
|
|
50338
|
-
};
|
|
50339
|
-
}
|
|
50340
50325
|
return {
|
|
50341
50326
|
...sharedProps,
|
|
50342
50327
|
// Allows custom components to render differently in the editor. This needs to be activated
|
|
50343
50328
|
// through options as the component has to be aware of this prop to not cause any React warnings.
|
|
50344
50329
|
...(options?.enableCustomEditorView ? { isInExpEditorMode: true } : {}),
|
|
50330
|
+
...(options?.editorProperties?.isEditorMode ? { isEditorMode: true } : {}),
|
|
50331
|
+
...(options?.editorProperties?.node ? { node } : {}),
|
|
50345
50332
|
...sanitizeNodeProps(props),
|
|
50346
50333
|
};
|
|
50347
|
-
}, [
|
|
50334
|
+
}, [
|
|
50335
|
+
cfCsrClassName,
|
|
50336
|
+
node,
|
|
50337
|
+
options?.editorProperties?.isEditorMode,
|
|
50338
|
+
options?.editorProperties?.node,
|
|
50339
|
+
options?.enableCustomEditorView,
|
|
50340
|
+
props,
|
|
50341
|
+
]);
|
|
50348
50342
|
return { componentProps };
|
|
50349
50343
|
};
|
|
50350
50344
|
|