@orion-studios/payload-studio 0.6.0-beta.180 → 0.6.0-beta.181

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.
@@ -1776,37 +1776,14 @@ var quickVerticalAlignStyles = {
1776
1776
  var negativePaddingCss = `
1777
1777
  .orion-builder-v2-negative-padding {
1778
1778
  display: flow-root;
1779
- isolation: isolate;
1780
- overflow: visible;
1781
- position: relative;
1782
- }
1783
-
1784
- .orion-builder-v2-negative-padding.is-orion-negative-padding-bottom:not(.is-orion-negative-padding-top),
1785
- .orion-builder-v2-negative-padding.is-orion-negative-padding-right:not(.is-orion-negative-padding-left) {
1786
- overflow: hidden;
1787
- }
1788
-
1789
- .orion-builder-v2-negative-padding::before {
1790
- background: var(--orion-negative-padding-background, transparent);
1791
- content: "";
1792
- inset: calc(-1 * var(--orion-negative-padding-top, 0px))
1793
- calc(-1 * var(--orion-negative-padding-right, 0px))
1794
- calc(-1 * var(--orion-negative-padding-bottom, 0px))
1795
- calc(-1 * var(--orion-negative-padding-left, 0px));
1796
- pointer-events: none;
1797
- position: absolute;
1798
- z-index: -1;
1799
- }
1800
-
1801
- .orion-builder-v2-negative-padding > * {
1802
1779
  margin-top: var(--orion-negative-padding-top, 0px) !important;
1803
1780
  margin-right: var(--orion-negative-padding-right, 0px) !important;
1804
1781
  margin-bottom: var(--orion-negative-padding-bottom, 0px) !important;
1805
1782
  margin-left: var(--orion-negative-padding-left, 0px) !important;
1806
1783
  max-width: none !important;
1784
+ overflow: visible;
1807
1785
  position: relative;
1808
1786
  width: calc(100% - var(--orion-negative-padding-left, 0px) - var(--orion-negative-padding-right, 0px)) !important;
1809
- z-index: 1;
1810
1787
  }
1811
1788
  `;
1812
1789
  var canvasSelectionCss = `
@@ -2062,6 +2039,17 @@ var getStoredOrionBackgroundColor = (attrs, style) => {
2062
2039
  block.backgroundColor
2063
2040
  );
2064
2041
  };
2042
+ var ensureNegativePaddingBackground = (component) => {
2043
+ const attrs = component?.getAttributes?.() || {};
2044
+ const style = component?.getStyle?.() || {};
2045
+ if (!hasNegativePaddingState(attrs, style)) {
2046
+ return;
2047
+ }
2048
+ const backgroundColor = getStoredOrionBackgroundColor(attrs, style);
2049
+ if (backgroundColor && getStyleColorValue(style, "background-color") !== backgroundColor) {
2050
+ component?.addStyle?.({ "background-color": backgroundColor });
2051
+ }
2052
+ };
2065
2053
  var spacingTargetForComponent = (component) => {
2066
2054
  const element = component?.getEl?.();
2067
2055
  return element || null;
@@ -2692,7 +2680,7 @@ function GrapesPageEditor({
2692
2680
  } else if (negativePaddingBackground) {
2693
2681
  selected.addStyle?.({
2694
2682
  [negativePaddingBackgroundVariable]: negativePaddingBackground,
2695
- "background-color": "transparent"
2683
+ "background-color": negativePaddingBackground
2696
2684
  });
2697
2685
  selected.addAttributes?.({ [negativePaddingBackgroundAttribute]: negativePaddingBackground });
2698
2686
  }
@@ -2744,7 +2732,7 @@ function GrapesPageEditor({
2744
2732
  selected.addStyle?.({
2745
2733
  ...backgroundColor ? {
2746
2734
  [negativePaddingBackgroundVariable]: backgroundColor,
2747
- "background-color": "transparent"
2735
+ "background-color": backgroundColor
2748
2736
  } : {},
2749
2737
  [negativePaddingVariableForSide(side)]: negativeStyleValue,
2750
2738
  [property]: "0px"
@@ -3050,6 +3038,7 @@ function GrapesPageEditor({
3050
3038
  return;
3051
3039
  }
3052
3040
  hydrateSelectedTypographyStyleFromOrionBlock(component);
3041
+ ensureNegativePaddingBackground(component);
3053
3042
  rememberComponentSnapshot(component);
3054
3043
  markSelectedCanvasBlock(component);
3055
3044
  refreshSelectedState(component);
@@ -1652,37 +1652,14 @@ var quickVerticalAlignStyles = {
1652
1652
  var negativePaddingCss = `
1653
1653
  .orion-builder-v2-negative-padding {
1654
1654
  display: flow-root;
1655
- isolation: isolate;
1656
- overflow: visible;
1657
- position: relative;
1658
- }
1659
-
1660
- .orion-builder-v2-negative-padding.is-orion-negative-padding-bottom:not(.is-orion-negative-padding-top),
1661
- .orion-builder-v2-negative-padding.is-orion-negative-padding-right:not(.is-orion-negative-padding-left) {
1662
- overflow: hidden;
1663
- }
1664
-
1665
- .orion-builder-v2-negative-padding::before {
1666
- background: var(--orion-negative-padding-background, transparent);
1667
- content: "";
1668
- inset: calc(-1 * var(--orion-negative-padding-top, 0px))
1669
- calc(-1 * var(--orion-negative-padding-right, 0px))
1670
- calc(-1 * var(--orion-negative-padding-bottom, 0px))
1671
- calc(-1 * var(--orion-negative-padding-left, 0px));
1672
- pointer-events: none;
1673
- position: absolute;
1674
- z-index: -1;
1675
- }
1676
-
1677
- .orion-builder-v2-negative-padding > * {
1678
1655
  margin-top: var(--orion-negative-padding-top, 0px) !important;
1679
1656
  margin-right: var(--orion-negative-padding-right, 0px) !important;
1680
1657
  margin-bottom: var(--orion-negative-padding-bottom, 0px) !important;
1681
1658
  margin-left: var(--orion-negative-padding-left, 0px) !important;
1682
1659
  max-width: none !important;
1660
+ overflow: visible;
1683
1661
  position: relative;
1684
1662
  width: calc(100% - var(--orion-negative-padding-left, 0px) - var(--orion-negative-padding-right, 0px)) !important;
1685
- z-index: 1;
1686
1663
  }
1687
1664
  `;
1688
1665
  var canvasSelectionCss = `
@@ -1938,6 +1915,17 @@ var getStoredOrionBackgroundColor = (attrs, style) => {
1938
1915
  block.backgroundColor
1939
1916
  );
1940
1917
  };
1918
+ var ensureNegativePaddingBackground = (component) => {
1919
+ const attrs = component?.getAttributes?.() || {};
1920
+ const style = component?.getStyle?.() || {};
1921
+ if (!hasNegativePaddingState(attrs, style)) {
1922
+ return;
1923
+ }
1924
+ const backgroundColor = getStoredOrionBackgroundColor(attrs, style);
1925
+ if (backgroundColor && getStyleColorValue(style, "background-color") !== backgroundColor) {
1926
+ component?.addStyle?.({ "background-color": backgroundColor });
1927
+ }
1928
+ };
1941
1929
  var spacingTargetForComponent = (component) => {
1942
1930
  const element = component?.getEl?.();
1943
1931
  return element || null;
@@ -2568,7 +2556,7 @@ function GrapesPageEditor({
2568
2556
  } else if (negativePaddingBackground) {
2569
2557
  selected.addStyle?.({
2570
2558
  [negativePaddingBackgroundVariable]: negativePaddingBackground,
2571
- "background-color": "transparent"
2559
+ "background-color": negativePaddingBackground
2572
2560
  });
2573
2561
  selected.addAttributes?.({ [negativePaddingBackgroundAttribute]: negativePaddingBackground });
2574
2562
  }
@@ -2620,7 +2608,7 @@ function GrapesPageEditor({
2620
2608
  selected.addStyle?.({
2621
2609
  ...backgroundColor ? {
2622
2610
  [negativePaddingBackgroundVariable]: backgroundColor,
2623
- "background-color": "transparent"
2611
+ "background-color": backgroundColor
2624
2612
  } : {},
2625
2613
  [negativePaddingVariableForSide(side)]: negativeStyleValue,
2626
2614
  [property]: "0px"
@@ -2926,6 +2914,7 @@ function GrapesPageEditor({
2926
2914
  return;
2927
2915
  }
2928
2916
  hydrateSelectedTypographyStyleFromOrionBlock(component);
2917
+ ensureNegativePaddingBackground(component);
2929
2918
  rememberComponentSnapshot(component);
2930
2919
  markSelectedCanvasBlock(component);
2931
2920
  refreshSelectedState(component);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-studios/payload-studio",
3
- "version": "0.6.0-beta.180",
3
+ "version": "0.6.0-beta.181",
4
4
  "description": "Base CMS, builder, and custom admin toolkit for Orion Studios websites",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",