@contentful/experiences-components-react 3.5.0-dev-20250902T0640-ab0b512.0 → 3.5.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 CHANGED
@@ -2120,7 +2120,7 @@ const Flex = forwardRef(({ id, children, onMouseEnter, onMouseUp, onMouseLeave,
2120
2120
  Flex.displayName = 'Flex';
2121
2121
 
2122
2122
  function extractRenderProps(props) {
2123
- const { isEditorMode, node, children, ...renderProps } = props;
2123
+ const { isEditorMode, isEmpty, nodeBlockId, children, ...renderProps } = props;
2124
2124
  return renderProps;
2125
2125
  }
2126
2126
 
@@ -2151,9 +2151,8 @@ const ContentfulContainer = (props) => {
2151
2151
  return (React.createElement(Flex, { "data-test-id": "contentful-container", ...extractRenderProps(otherProps), className: combineClasses(className, 'contentful-container') }, children));
2152
2152
  }
2153
2153
  // Extract properties that are only available in editor mode
2154
- const { node } = props;
2155
- const isEmpty = !node.children.length;
2156
- const isSection = node.data.blockId === CONTENTFUL_COMPONENTS$1.section.id;
2154
+ const { isEmpty, nodeBlockId } = props;
2155
+ const isSection = nodeBlockId === CONTENTFUL_COMPONENTS$1.section.id;
2157
2156
  return (React.createElement(Flex, { "data-test-id": "contentful-container", ...extractRenderProps(props), className: combineClasses(className, 'contentful-container', isEmpty ? (isSection ? 'contentful-section-label' : 'contentful-container-label') : '') }, children));
2158
2157
  };
2159
2158
 
@@ -2212,8 +2211,7 @@ const SingleColumn = (props) => {
2212
2211
  if (!isEditorMode) {
2213
2212
  return React.createElement(Flex, { className: className }, props.children);
2214
2213
  }
2215
- const { node, children } = props;
2216
- const isEmpty = !node.children.length;
2214
+ const { isEmpty, children } = props;
2217
2215
  const mixedClassName = combineClasses('cf-single-column-wrapper', className, isEmpty ? 'cf-single-column-label' : '');
2218
2216
  return (React.createElement(Flex, { ...extractRenderProps(props), className: mixedClassName }, children));
2219
2217
  };