@contentful/experiences-components-react 3.4.1-dev-20250901T1444-72c17a2.0 → 3.5.0-beta.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 +5 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1348,6 +1348,7 @@ const BreakpointSchema = z
|
|
|
1348
1348
|
const BaseComponentTreeNodeSchema = z.object({
|
|
1349
1349
|
id: ComponentTreeNodeIdSchema.optional(),
|
|
1350
1350
|
definitionId: DefinitionPropertyKeySchema,
|
|
1351
|
+
prebindingId: z.string().optional(),
|
|
1351
1352
|
displayName: z.string().optional(),
|
|
1352
1353
|
slotId: z.string().optional(),
|
|
1353
1354
|
variables: z.record(propertyKeySchema, ComponentPropertyValueSchema),
|
|
@@ -2119,7 +2120,7 @@ const Flex = forwardRef(({ id, children, onMouseEnter, onMouseUp, onMouseLeave,
|
|
|
2119
2120
|
Flex.displayName = 'Flex';
|
|
2120
2121
|
|
|
2121
2122
|
function extractRenderProps(props) {
|
|
2122
|
-
const { isEditorMode,
|
|
2123
|
+
const { isEditorMode, isEmpty, nodeBlockId, children, ...renderProps } = props;
|
|
2123
2124
|
return renderProps;
|
|
2124
2125
|
}
|
|
2125
2126
|
|
|
@@ -2150,9 +2151,8 @@ const ContentfulContainer = (props) => {
|
|
|
2150
2151
|
return (React.createElement(Flex, { "data-test-id": "contentful-container", ...extractRenderProps(otherProps), className: combineClasses(className, 'contentful-container') }, children));
|
|
2151
2152
|
}
|
|
2152
2153
|
// Extract properties that are only available in editor mode
|
|
2153
|
-
const {
|
|
2154
|
-
const
|
|
2155
|
-
const isSection = node.data.blockId === CONTENTFUL_COMPONENTS$1.section.id;
|
|
2154
|
+
const { isEmpty, nodeBlockId } = props;
|
|
2155
|
+
const isSection = nodeBlockId === CONTENTFUL_COMPONENTS$1.section.id;
|
|
2156
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));
|
|
2157
2157
|
};
|
|
2158
2158
|
|
|
@@ -2211,8 +2211,7 @@ const SingleColumn = (props) => {
|
|
|
2211
2211
|
if (!isEditorMode) {
|
|
2212
2212
|
return React.createElement(Flex, { className: className }, props.children);
|
|
2213
2213
|
}
|
|
2214
|
-
const {
|
|
2215
|
-
const isEmpty = !node.children.length;
|
|
2214
|
+
const { isEmpty, children } = props;
|
|
2216
2215
|
const mixedClassName = combineClasses('cf-single-column-wrapper', className, isEmpty ? 'cf-single-column-label' : '');
|
|
2217
2216
|
return (React.createElement(Flex, { ...extractRenderProps(props), className: mixedClassName }, children));
|
|
2218
2217
|
};
|