@orion-studios/payload-studio 0.6.0-beta.174 → 0.6.0-beta.176

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.
@@ -7,14 +7,14 @@ import {
7
7
  socialMediaConnectionsField,
8
8
  themePreferenceField,
9
9
  withTooltips
10
- } from "../chunk-JC3UV74N.mjs";
11
- import "../chunk-W2UOCJDX.mjs";
10
+ } from "../chunk-KHK6RTGC.mjs";
12
11
  import {
13
12
  SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM,
14
13
  SOCIAL_MEDIA_ICON_OPTIONS,
15
14
  SOCIAL_MEDIA_PLATFORMS,
16
15
  SOCIAL_MEDIA_PLATFORM_LABELS
17
16
  } from "../chunk-ZTXJG4K5.mjs";
17
+ import "../chunk-W2UOCJDX.mjs";
18
18
  import "../chunk-6BWS3CLP.mjs";
19
19
  export {
20
20
  SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM,
@@ -2612,18 +2612,19 @@ function GrapesPageEditor({
2612
2612
  if (property.startsWith("padding-") && !String(value).trim().startsWith("-")) {
2613
2613
  const side = negativePaddingSideFromProperty(property);
2614
2614
  if (side) {
2615
- selected.removeStyle?.(negativePaddingVariableForSide(side));
2616
- selected.removeAttributes?.(negativePaddingAttributeForSide(side));
2617
- selected.removeClass?.(`is-orion-negative-padding-${side}`);
2618
2615
  const attrs = selected.getAttributes?.() || {};
2616
+ const selectedStyle = selected.getStyle?.() || {};
2619
2617
  const hasOtherNegativePadding = negativePaddingSides.some(
2620
2618
  (paddingSide) => paddingSide !== side && Boolean(attrs[negativePaddingAttributeForSide(paddingSide)])
2621
2619
  );
2620
+ const negativePaddingBackground = firstString(
2621
+ attrs[negativePaddingBackgroundAttribute],
2622
+ selectedStyle[negativePaddingBackgroundVariable]
2623
+ );
2624
+ selected.removeStyle?.(negativePaddingVariableForSide(side));
2625
+ selected.removeAttributes?.(negativePaddingAttributeForSide(side));
2626
+ selected.removeClass?.(`is-orion-negative-padding-${side}`);
2622
2627
  if (!hasOtherNegativePadding) {
2623
- const negativePaddingBackground = firstString(
2624
- attrs[negativePaddingBackgroundAttribute],
2625
- selected.getStyle?.()[negativePaddingBackgroundVariable]
2626
- );
2627
2628
  if (negativePaddingBackground) {
2628
2629
  selected.addStyle?.({ "background-color": negativePaddingBackground });
2629
2630
  }
@@ -2979,6 +2980,7 @@ function GrapesPageEditor({
2979
2980
  }
2980
2981
  const computed = window.getComputedStyle(element);
2981
2982
  const attrs = component.getAttributes?.() || {};
2983
+ const style = component.getStyle?.() || {};
2982
2984
  spacingProperties.forEach((property) => {
2983
2985
  const negativePaddingSide = negativePaddingSideFromProperty(property);
2984
2986
  const negativePaddingValue = negativePaddingSide ? firstString(attrs[negativePaddingAttributeForSide(negativePaddingSide)]) : "";
@@ -2986,6 +2988,10 @@ function GrapesPageEditor({
2986
2988
  writeStylePanelLength(property, negativePaddingValue);
2987
2989
  return;
2988
2990
  }
2991
+ if (property.startsWith("margin-")) {
2992
+ writeStylePanelLength(property, firstString(style[property], computed.getPropertyValue(property)));
2993
+ return;
2994
+ }
2989
2995
  writeStylePanelLength(property, computed.getPropertyValue(property));
2990
2996
  });
2991
2997
  });
@@ -2488,18 +2488,19 @@ function GrapesPageEditor({
2488
2488
  if (property.startsWith("padding-") && !String(value).trim().startsWith("-")) {
2489
2489
  const side = negativePaddingSideFromProperty(property);
2490
2490
  if (side) {
2491
- selected.removeStyle?.(negativePaddingVariableForSide(side));
2492
- selected.removeAttributes?.(negativePaddingAttributeForSide(side));
2493
- selected.removeClass?.(`is-orion-negative-padding-${side}`);
2494
2491
  const attrs = selected.getAttributes?.() || {};
2492
+ const selectedStyle = selected.getStyle?.() || {};
2495
2493
  const hasOtherNegativePadding = negativePaddingSides.some(
2496
2494
  (paddingSide) => paddingSide !== side && Boolean(attrs[negativePaddingAttributeForSide(paddingSide)])
2497
2495
  );
2496
+ const negativePaddingBackground = firstString(
2497
+ attrs[negativePaddingBackgroundAttribute],
2498
+ selectedStyle[negativePaddingBackgroundVariable]
2499
+ );
2500
+ selected.removeStyle?.(negativePaddingVariableForSide(side));
2501
+ selected.removeAttributes?.(negativePaddingAttributeForSide(side));
2502
+ selected.removeClass?.(`is-orion-negative-padding-${side}`);
2498
2503
  if (!hasOtherNegativePadding) {
2499
- const negativePaddingBackground = firstString(
2500
- attrs[negativePaddingBackgroundAttribute],
2501
- selected.getStyle?.()[negativePaddingBackgroundVariable]
2502
- );
2503
2504
  if (negativePaddingBackground) {
2504
2505
  selected.addStyle?.({ "background-color": negativePaddingBackground });
2505
2506
  }
@@ -2855,6 +2856,7 @@ function GrapesPageEditor({
2855
2856
  }
2856
2857
  const computed = window.getComputedStyle(element);
2857
2858
  const attrs = component.getAttributes?.() || {};
2859
+ const style = component.getStyle?.() || {};
2858
2860
  spacingProperties.forEach((property) => {
2859
2861
  const negativePaddingSide = negativePaddingSideFromProperty(property);
2860
2862
  const negativePaddingValue = negativePaddingSide ? firstString(attrs[negativePaddingAttributeForSide(negativePaddingSide)]) : "";
@@ -2862,6 +2864,10 @@ function GrapesPageEditor({
2862
2864
  writeStylePanelLength(property, negativePaddingValue);
2863
2865
  return;
2864
2866
  }
2867
+ if (property.startsWith("margin-")) {
2868
+ writeStylePanelLength(property, firstString(style[property], computed.getPropertyValue(property)));
2869
+ return;
2870
+ }
2865
2871
  writeStylePanelLength(property, computed.getPropertyValue(property));
2866
2872
  });
2867
2873
  });
package/dist/index.mjs CHANGED
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  admin_exports
3
- } from "./chunk-JC3UV74N.mjs";
4
- import {
5
- blocks_exports
6
- } from "./chunk-JQAHXYAM.mjs";
7
- import {
8
- admin_app_exports
9
- } from "./chunk-RKTIFEUY.mjs";
10
- import "./chunk-W2UOCJDX.mjs";
3
+ } from "./chunk-KHK6RTGC.mjs";
11
4
  import {
12
5
  nextjs_exports
13
6
  } from "./chunk-ZADL33R6.mjs";
14
7
  import "./chunk-ZTXJG4K5.mjs";
8
+ import {
9
+ blocks_exports
10
+ } from "./chunk-JQAHXYAM.mjs";
15
11
  import {
16
12
  studio_pages_exports
17
- } from "./chunk-NGLIA2OE.mjs";
18
- import "./chunk-OQSEJXC4.mjs";
13
+ } from "./chunk-276KAPGM.mjs";
19
14
  import "./chunk-7ZMXZRBP.mjs";
15
+ import "./chunk-OQSEJXC4.mjs";
20
16
  import {
21
17
  studio_exports
22
18
  } from "./chunk-ADIIWIYL.mjs";
19
+ import {
20
+ admin_app_exports
21
+ } from "./chunk-RKTIFEUY.mjs";
22
+ import "./chunk-W2UOCJDX.mjs";
23
23
  import "./chunk-6BWS3CLP.mjs";
24
24
  export {
25
25
  admin_exports as admin,
@@ -7,14 +7,14 @@ import {
7
7
  pageStudioModuleManifest,
8
8
  resolveBuilderThemeTokens,
9
9
  toEditorInitialDoc
10
- } from "../chunk-NGLIA2OE.mjs";
11
- import "../chunk-OQSEJXC4.mjs";
10
+ } from "../chunk-276KAPGM.mjs";
12
11
  import {
13
12
  createDefaultStudioDocument,
14
13
  defaultBuilderThemeTokens,
15
14
  layoutToStudioDocument,
16
15
  studioDocumentToLayout
17
16
  } from "../chunk-7ZMXZRBP.mjs";
17
+ import "../chunk-OQSEJXC4.mjs";
18
18
  import "../chunk-ADIIWIYL.mjs";
19
19
  import "../chunk-6BWS3CLP.mjs";
20
20
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-studios/payload-studio",
3
- "version": "0.6.0-beta.174",
3
+ "version": "0.6.0-beta.176",
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",
@@ -1,6 +1,3 @@
1
- import {
2
- sectionStyleDefaults
3
- } from "./chunk-OQSEJXC4.mjs";
4
1
  import {
5
2
  createDefaultStudioDocument,
6
3
  defaultBuilderThemeTokens,
@@ -8,6 +5,9 @@ import {
8
5
  migrateBlockToSettingsV2,
9
6
  studioDocumentToLayout
10
7
  } from "./chunk-7ZMXZRBP.mjs";
8
+ import {
9
+ sectionStyleDefaults
10
+ } from "./chunk-OQSEJXC4.mjs";
11
11
  import {
12
12
  assertStudioDocumentV1,
13
13
  compileStudioDocument,
@@ -1,12 +1,12 @@
1
- import {
2
- adminNavIcons
3
- } from "./chunk-W2UOCJDX.mjs";
4
1
  import {
5
2
  SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM,
6
3
  SOCIAL_MEDIA_ICON_OPTIONS,
7
4
  SOCIAL_MEDIA_PLATFORMS,
8
5
  SOCIAL_MEDIA_PLATFORM_LABELS
9
6
  } from "./chunk-ZTXJG4K5.mjs";
7
+ import {
8
+ adminNavIcons
9
+ } from "./chunk-W2UOCJDX.mjs";
10
10
  import {
11
11
  __export,
12
12
  __require