@contentful/experiences-components-react 3.4.1-dev-20250901T1349-8f11176.0 → 3.4.1-dev-20250901T1444-62c96a8.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.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { ComponentDefinition, OptimizedImageAsset, StructureComponentProps, StyleProps } from '@contentful/experiences-core/types';
1
+ import { ComponentDefinition, OptimizedImageAsset, StyleProps } from '@contentful/experiences-core/types';
2
2
  import React, { HTMLAttributes } from 'react';
3
+ import { StructureComponentProps } from '@/types';
3
4
  import { Document } from '@contentful/rich-text-types';
4
5
 
5
6
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
package/dist/index.js CHANGED
@@ -2119,17 +2119,13 @@ const Flex = forwardRef(({ id, children, onMouseEnter, onMouseUp, onMouseLeave,
2119
2119
  Flex.displayName = 'Flex';
2120
2120
 
2121
2121
  function extractRenderProps(props) {
2122
- if (props.editorMode) {
2123
- const { editorMode, node, children, ...renderProps } = props;
2124
- return renderProps;
2125
- }
2126
- const { editorMode, children, ...renderProps } = props;
2122
+ const { isEditorMode, node, children, ...renderProps } = props;
2127
2123
  return renderProps;
2128
2124
  }
2129
2125
 
2130
2126
  const ContentfulContainerAsHyperlink = (props) => {
2131
- const { cfHyperlink, cfOpenInNewTab, editorMode, className, children, ...otherProps } = props;
2132
- const eventHandlingProps = editorMode === true ? { onClick: stopEventPropagation } : {};
2127
+ const { cfHyperlink, cfOpenInNewTab, isEditorMode, className, children, ...otherProps } = props;
2128
+ const eventHandlingProps = isEditorMode === true ? { onClick: stopEventPropagation } : {};
2133
2129
  const anchorTagProps = cfOpenInNewTab
2134
2130
  ? {
2135
2131
  target: '_blank',
@@ -2146,11 +2142,11 @@ const stopEventPropagation = (event) => {
2146
2142
  /* eslint-disable */
2147
2143
  const ContentfulContainer = (props) => {
2148
2144
  // Extract hyperlink-related props to not pass them to the regular container
2149
- const { className, editorMode, children, cfHyperlink, cfOpenInNewTab, ...otherProps } = props;
2145
+ const { className, isEditorMode, children, cfHyperlink, cfOpenInNewTab, ...otherProps } = props;
2150
2146
  if (cfHyperlink) {
2151
2147
  return React.createElement(ContentfulContainerAsHyperlink, { ...props }, children);
2152
2148
  }
2153
- if (!editorMode) {
2149
+ if (!isEditorMode) {
2154
2150
  return (React.createElement(Flex, { "data-test-id": "contentful-container", ...extractRenderProps(otherProps), className: combineClasses(className, 'contentful-container') }, children));
2155
2151
  }
2156
2152
  // Extract properties that are only available in editor mode
@@ -2211,8 +2207,8 @@ const Columns = ({ className, children, ...otherProps }) => {
2211
2207
  };
2212
2208
 
2213
2209
  const SingleColumn = (props) => {
2214
- const { className, editorMode } = props;
2215
- if (!editorMode) {
2210
+ const { className, isEditorMode } = props;
2211
+ if (!isEditorMode) {
2216
2212
  return React.createElement(Flex, { className: className }, props.children);
2217
2213
  }
2218
2214
  const { node, children } = props;