@contentful/experiences-visual-editor-react 1.11.1 → 1.11.2-dev-20240724T1634-dd1094a.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/renderApp.js CHANGED
@@ -57795,13 +57795,13 @@ const getUnboundValues = ({ key, fallback, unboundValues, }) => {
57795
57795
  return get$1(unboundValues, lodashPath, fallback);
57796
57796
  };
57797
57797
 
57798
- const useComponentProps = ({ node, areEntitiesFetched, resolveDesignValue, renderDropzone, definition, userIsDragging, slotId, }) => {
57798
+ const useComponentProps = ({ node, areEntitiesFetched, resolveDesignValue, renderDropzone, definition, userIsDragging, }) => {
57799
57799
  const unboundValues = useEditorStore((state) => state.unboundValues);
57800
57800
  const hyperlinkPattern = useEditorStore((state) => state.hyperLinkPattern);
57801
57801
  const locale = useEditorStore((state) => state.locale);
57802
57802
  const dataSource = useEditorStore((state) => state.dataSource);
57803
57803
  const entityStore = useEntityStore((state) => state.entityStore);
57804
- const isEmptyZone = !node.children.filter((child) => child.data.slotId === slotId).length;
57804
+ const isEmptyZone = !node.children.length;
57805
57805
  const props = reactExports.useMemo(() => {
57806
57806
  const propsBase = {
57807
57807
  cfSsrClassName: node.data.props.cfSsrClassName
@@ -58122,7 +58122,7 @@ const MissingComponentPlacehoder = ({ blockId }) => {
58122
58122
  "'"));
58123
58123
  };
58124
58124
 
58125
- const useComponent = ({ node: rawNode, resolveDesignValue, renderDropzone, userIsDragging, slotId, }) => {
58125
+ const useComponent = ({ node: rawNode, resolveDesignValue, renderDropzone, userIsDragging, }) => {
58126
58126
  const areEntitiesFetched = useEntityStore((state) => state.areEntitiesFetched);
58127
58127
  const entityStore = useEntityStore((state) => state.entityStore);
58128
58128
  const node = reactExports.useMemo(() => {
@@ -58156,7 +58156,6 @@ const useComponent = ({ node: rawNode, resolveDesignValue, renderDropzone, userI
58156
58156
  renderDropzone,
58157
58157
  definition: componentRegistration?.definition,
58158
58158
  userIsDragging,
58159
- slotId,
58160
58159
  });
58161
58160
  const elementToRender = (props) => {
58162
58161
  if (!componentRegistration) {
@@ -58246,12 +58245,8 @@ const calcNewComponentStyles = (params) => {
58246
58245
  const [horizontalPadding, verticalPadding] = getPaddingOffset(dropzone);
58247
58246
  const width = isHorizontal ? DRAGGABLE_WIDTH : dropzoneSizes.width - horizontalPadding;
58248
58247
  const height = isHorizontal ? dropzoneSizes.height - verticalPadding : DRAGGABLE_HEIGHT;
58249
- const top = isHorizontal
58250
- ? calcOffsetTop(element.parentElement, height, elementSizes.height)
58251
- : -height;
58252
- const left = isHorizontal
58253
- ? -width
58254
- : calcOffsetLeft(element.parentElement, width, elementSizes.width);
58248
+ const top = isHorizontal ? calcOffsetTop(element, height, elementSizes.height) : -height;
58249
+ const left = isHorizontal ? -width : calcOffsetLeft(element, width, elementSizes.width);
58255
58250
  return {
58256
58251
  width,
58257
58252
  height,
@@ -58285,12 +58280,8 @@ const calcMovementStyles = (params) => {
58285
58280
  const [horizontalPadding, verticalPadding] = getPaddingOffset(dropzone);
58286
58281
  const width = isHorizontal ? draggableSizes.width : dropzoneSizes.width - horizontalPadding;
58287
58282
  const height = isHorizontal ? dropzoneSizes.height - verticalPadding : draggableSizes.height;
58288
- const top = isHorizontal
58289
- ? calcOffsetTop(element.parentElement, height, elementSizes.height)
58290
- : -height;
58291
- const left = isHorizontal
58292
- ? -width
58293
- : calcOffsetLeft(element.parentElement, width, elementSizes.width);
58283
+ const top = isHorizontal ? calcOffsetTop(element, height, elementSizes.height) : -height;
58284
+ const left = isHorizontal ? -width : calcOffsetLeft(element, width, elementSizes.width);
58294
58285
  return {
58295
58286
  width,
58296
58287
  height,
@@ -58335,6 +58326,7 @@ const Placeholder = (props) => {
58335
58326
  }),
58336
58327
  backgroundColor: 'rgba(var(--exp-builder-blue300-rgb), 0.5)',
58337
58328
  position: 'absolute',
58329
+ pointerEvents: 'none',
58338
58330
  } })));
58339
58331
  };
58340
58332
 
@@ -58705,7 +58697,6 @@ const EditorBlock = ({ node: rawNode, resolveDesignValue, renderDropzone, index,
58705
58697
  resolveDesignValue,
58706
58698
  renderDropzone,
58707
58699
  userIsDragging,
58708
- slotId,
58709
58700
  });
58710
58701
  const { isSingleColumn, isWrapped } = useSingleColumn(node, resolveDesignValue);
58711
58702
  const setDomRect = useDraggedItemStore((state) => state.setDomRect);