@contentful/experiences-visual-editor-react 1.37.1-dev-20250425T0855-c0ae059.0 → 1.37.1-dev-20250425T1024-b8bfdfb.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
@@ -1365,6 +1365,7 @@ const transformVisibility = (value) => {
1365
1365
  // Don't explicitly set anything when visible to not overwrite values like `grid` or `flex`.
1366
1366
  return {};
1367
1367
  };
1368
+ // TODO: Remove in next major version v2 since the change is 17 months old
1368
1369
  // Keep this for backwards compatibility - deleting this would be a breaking change
1369
1370
  // because existing components on a users experience will have the width value as fill
1370
1371
  // rather than 100%
@@ -5405,29 +5406,23 @@ const Tooltip = ({ coordinates, id, label, isAssemblyBlock, isContainer, isSelec
5405
5406
  function useSingleColumn(node, resolveDesignValue) {
5406
5407
  const tree = useTreeStore((store) => store.tree);
5407
5408
  const isSingleColumn = node.data.blockId === CONTENTFUL_COMPONENTS$1.singleColumn.id;
5408
- const { isWrapped, wrapColumnsCount } = useMemo(() => {
5409
- let isWrapped = false;
5410
- let wrapColumnsCount = 0;
5409
+ const isWrapped = useMemo(() => {
5411
5410
  if (!node.parentId || !isSingleColumn) {
5412
- return { isWrapped, wrapColumnsCount };
5411
+ return false;
5413
5412
  }
5414
5413
  const parentNode = getItem({ id: node.parentId }, tree);
5415
5414
  if (!parentNode || parentNode.data.blockId !== CONTENTFUL_COMPONENTS$1.columns.id) {
5416
- return { isWrapped, wrapColumnsCount };
5417
- }
5418
- const { cfWrapColumns, cfWrapColumnsCount } = parentNode.data.props;
5419
- if (cfWrapColumns.type === 'DesignValue') {
5420
- isWrapped = resolveDesignValue(cfWrapColumns.valuesByBreakpoint, 'cfWrapColumns');
5415
+ return false;
5421
5416
  }
5422
- if (cfWrapColumnsCount.type === 'DesignValue') {
5423
- wrapColumnsCount = resolveDesignValue(cfWrapColumnsCount.valuesByBreakpoint, 'cfWrapColumnsCount');
5417
+ const { cfWrapColumns } = parentNode.data.props;
5418
+ if (cfWrapColumns.type !== 'DesignValue') {
5419
+ return false;
5424
5420
  }
5425
- return { isWrapped, wrapColumnsCount };
5421
+ return resolveDesignValue(cfWrapColumns.valuesByBreakpoint, 'cfWrapColumns');
5426
5422
  }, [tree, node, isSingleColumn, resolveDesignValue]);
5427
5423
  return {
5428
5424
  isSingleColumn,
5429
5425
  isWrapped,
5430
- wrapColumnsCount,
5431
5426
  };
5432
5427
  }
5433
5428