@contentful/experiences-visual-editor-react 3.5.0-dev-20250902T1514-0e19e78.0 → 3.6.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
@@ -4950,9 +4950,10 @@ const useComponentProps = ({ node, entityStore, areEntitiesFetched, resolveDesig
4950
4950
  className: props.cfSsrClassName ?? cfCsrClassName,
4951
4951
  };
4952
4952
  return {
4953
- ...sharedProps,
4954
- ...editorProps,
4955
4953
  ...sanitizeNodeProps(props),
4954
+ // Add those at last to not let them get overwritten by custom properties
4955
+ ...editorProps,
4956
+ ...sharedProps,
4956
4957
  };
4957
4958
  }, [cfCsrClassName, editorProps, node, props]);
4958
4959
  return { componentProps };
@@ -4996,7 +4997,9 @@ const RegistrationComponent = ({ node, resolveDesignValue, componentRegistration
4996
4997
  entityStore,
4997
4998
  areEntitiesFetched,
4998
4999
  });
4999
- return React.createElement(ImportedComponentErrorBoundary, { componentId: node.data.blockId }, React.createElement(componentRegistration.component, { ...componentProps, ...slotNodes }, children));
5000
+ return React.createElement(ImportedComponentErrorBoundary, { componentId: node.data.blockId }, React.createElement(componentRegistration.component, { ...componentProps, ...slotNodes },
5001
+ // If there are no children, a custom property called `children` can be passed through to the custom component
5002
+ ...(children ?? [])));
5000
5003
  };
5001
5004
 
5002
5005
  var css_248z$1 = ".EmptyCanvasMessage-module_empty-canvas-container__7K-0l {\n height: 200px;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n flex-direction: row;\n transition: all 0.2s;\n color: var(--exp-builder-gray400);\n font-size: var(--exp-builder-font-size-l);\n font-family: var(--exp-builder-font-stack-primary);\n outline: 2px dashed var(--exp-builder-gray400);\n outline-offset: -2px;\n}\n\n.EmptyCanvasMessage-module_empty-canvas-icon__EztFr rect {\n fill: var(--exp-builder-gray400);\n}\n\n.EmptyCanvasMessage-module_empty-canvas-label__cbIrR {\n margin-left: var(--exp-builder-spacing-s);\n}\n";