@orion-studios/payload-studio 0.6.0-beta.177 → 0.6.0-beta.178
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.
|
@@ -2025,6 +2025,7 @@ var negativePaddingAttributeForSide = (side) => `data-orion-negative-padding-${s
|
|
|
2025
2025
|
var negativePaddingVariableForSide = (side) => `--orion-negative-padding-${side}`;
|
|
2026
2026
|
var negativePaddingBackgroundAttribute = "data-orion-negative-padding-background";
|
|
2027
2027
|
var negativePaddingBackgroundVariable = "--orion-negative-padding-background";
|
|
2028
|
+
var hasNegativePaddingState = (attrs, style) => negativePaddingSides.some((side) => Boolean(attrs[negativePaddingAttributeForSide(side)] || style[negativePaddingVariableForSide(side)]));
|
|
2028
2029
|
var getStoredOrionBackgroundColor = (attrs, style) => {
|
|
2029
2030
|
const block = parseOrionBlockAttribute(attrs["data-orion-block"]);
|
|
2030
2031
|
return firstString(
|
|
@@ -2892,15 +2893,18 @@ function GrapesPageEditor({
|
|
|
2892
2893
|
return;
|
|
2893
2894
|
}
|
|
2894
2895
|
const panelBackgroundColor = normalizeCssColorValue(readStylePanelColor("background-color"));
|
|
2895
|
-
const
|
|
2896
|
-
const
|
|
2896
|
+
const targetStyle = target.getStyle?.() || {};
|
|
2897
|
+
const componentStyle = component?.getStyle?.() || targetStyle;
|
|
2898
|
+
const styleBackgroundColor = getStyleColorValue(componentStyle || targetStyle, "background-color");
|
|
2899
|
+
const negativePaddingActive = hasNegativePaddingState(attrs, targetStyle) || hasNegativePaddingState(attrs, componentStyle);
|
|
2900
|
+
const backgroundColor = negativePaddingActive ? getStoredOrionBackgroundColor(attrs, targetStyle) || getStoredOrionBackgroundColor(attrs, componentStyle) : normalizeCssColorValue(panelBackgroundColor === "none" ? "" : panelBackgroundColor) || styleBackgroundColor;
|
|
2897
2901
|
if (!backgroundColor) {
|
|
2898
2902
|
return;
|
|
2899
2903
|
}
|
|
2900
|
-
if (getStyleColorValue(
|
|
2904
|
+
if (!negativePaddingActive && getStyleColorValue(targetStyle, "background-color") !== backgroundColor) {
|
|
2901
2905
|
target.addStyle?.({ "background-color": backgroundColor });
|
|
2902
2906
|
}
|
|
2903
|
-
if (component && component !== target && getStyleColorValue(
|
|
2907
|
+
if (!negativePaddingActive && component && component !== target && getStyleColorValue(componentStyle, "background-color") !== backgroundColor) {
|
|
2904
2908
|
component.addStyle?.({ "background-color": backgroundColor });
|
|
2905
2909
|
}
|
|
2906
2910
|
target.addAttributes?.({
|
|
@@ -2926,7 +2930,9 @@ function GrapesPageEditor({
|
|
|
2926
2930
|
if (Object.keys(block).length === 0) {
|
|
2927
2931
|
return;
|
|
2928
2932
|
}
|
|
2929
|
-
const
|
|
2933
|
+
const style = component.getStyle?.() || {};
|
|
2934
|
+
const negativePaddingActive = hasNegativePaddingState(attrs, style);
|
|
2935
|
+
const backgroundColor = negativePaddingActive ? getStoredOrionBackgroundColor(attrs, style) : getStyleColorValue(style, "background-color");
|
|
2930
2936
|
if (!backgroundColor || normalizeCssColorValue(block.backgroundColor) === backgroundColor && normalizeCssColorValue(attrs["data-orion-background-color"]) === backgroundColor) {
|
|
2931
2937
|
return;
|
|
2932
2938
|
}
|
|
@@ -1901,6 +1901,7 @@ var negativePaddingAttributeForSide = (side) => `data-orion-negative-padding-${s
|
|
|
1901
1901
|
var negativePaddingVariableForSide = (side) => `--orion-negative-padding-${side}`;
|
|
1902
1902
|
var negativePaddingBackgroundAttribute = "data-orion-negative-padding-background";
|
|
1903
1903
|
var negativePaddingBackgroundVariable = "--orion-negative-padding-background";
|
|
1904
|
+
var hasNegativePaddingState = (attrs, style) => negativePaddingSides.some((side) => Boolean(attrs[negativePaddingAttributeForSide(side)] || style[negativePaddingVariableForSide(side)]));
|
|
1904
1905
|
var getStoredOrionBackgroundColor = (attrs, style) => {
|
|
1905
1906
|
const block = parseOrionBlockAttribute(attrs["data-orion-block"]);
|
|
1906
1907
|
return firstString(
|
|
@@ -2768,15 +2769,18 @@ function GrapesPageEditor({
|
|
|
2768
2769
|
return;
|
|
2769
2770
|
}
|
|
2770
2771
|
const panelBackgroundColor = normalizeCssColorValue(readStylePanelColor("background-color"));
|
|
2771
|
-
const
|
|
2772
|
-
const
|
|
2772
|
+
const targetStyle = target.getStyle?.() || {};
|
|
2773
|
+
const componentStyle = component?.getStyle?.() || targetStyle;
|
|
2774
|
+
const styleBackgroundColor = getStyleColorValue(componentStyle || targetStyle, "background-color");
|
|
2775
|
+
const negativePaddingActive = hasNegativePaddingState(attrs, targetStyle) || hasNegativePaddingState(attrs, componentStyle);
|
|
2776
|
+
const backgroundColor = negativePaddingActive ? getStoredOrionBackgroundColor(attrs, targetStyle) || getStoredOrionBackgroundColor(attrs, componentStyle) : normalizeCssColorValue(panelBackgroundColor === "none" ? "" : panelBackgroundColor) || styleBackgroundColor;
|
|
2773
2777
|
if (!backgroundColor) {
|
|
2774
2778
|
return;
|
|
2775
2779
|
}
|
|
2776
|
-
if (getStyleColorValue(
|
|
2780
|
+
if (!negativePaddingActive && getStyleColorValue(targetStyle, "background-color") !== backgroundColor) {
|
|
2777
2781
|
target.addStyle?.({ "background-color": backgroundColor });
|
|
2778
2782
|
}
|
|
2779
|
-
if (component && component !== target && getStyleColorValue(
|
|
2783
|
+
if (!negativePaddingActive && component && component !== target && getStyleColorValue(componentStyle, "background-color") !== backgroundColor) {
|
|
2780
2784
|
component.addStyle?.({ "background-color": backgroundColor });
|
|
2781
2785
|
}
|
|
2782
2786
|
target.addAttributes?.({
|
|
@@ -2802,7 +2806,9 @@ function GrapesPageEditor({
|
|
|
2802
2806
|
if (Object.keys(block).length === 0) {
|
|
2803
2807
|
return;
|
|
2804
2808
|
}
|
|
2805
|
-
const
|
|
2809
|
+
const style = component.getStyle?.() || {};
|
|
2810
|
+
const negativePaddingActive = hasNegativePaddingState(attrs, style);
|
|
2811
|
+
const backgroundColor = negativePaddingActive ? getStoredOrionBackgroundColor(attrs, style) : getStyleColorValue(style, "background-color");
|
|
2806
2812
|
if (!backgroundColor || normalizeCssColorValue(block.backgroundColor) === backgroundColor && normalizeCssColorValue(attrs["data-orion-background-color"]) === backgroundColor) {
|
|
2807
2813
|
return;
|
|
2808
2814
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
nextjs_exports
|
|
6
6
|
} from "./chunk-ZADL33R6.mjs";
|
|
7
7
|
import "./chunk-ZTXJG4K5.mjs";
|
|
8
|
+
import {
|
|
9
|
+
blocks_exports
|
|
10
|
+
} from "./chunk-JQAHXYAM.mjs";
|
|
8
11
|
import {
|
|
9
12
|
studio_pages_exports
|
|
10
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-276KAPGM.mjs";
|
|
11
14
|
import "./chunk-7ZMXZRBP.mjs";
|
|
15
|
+
import "./chunk-OQSEJXC4.mjs";
|
|
12
16
|
import {
|
|
13
17
|
studio_exports
|
|
14
18
|
} from "./chunk-ADIIWIYL.mjs";
|
|
15
|
-
import {
|
|
16
|
-
blocks_exports
|
|
17
|
-
} from "./chunk-JQAHXYAM.mjs";
|
|
18
|
-
import "./chunk-OQSEJXC4.mjs";
|
|
19
19
|
import {
|
|
20
20
|
admin_app_exports
|
|
21
21
|
} from "./chunk-RKTIFEUY.mjs";
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
pageStudioModuleManifest,
|
|
8
8
|
resolveBuilderThemeTokens,
|
|
9
9
|
toEditorInitialDoc
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-276KAPGM.mjs";
|
|
11
11
|
import {
|
|
12
12
|
createDefaultStudioDocument,
|
|
13
13
|
defaultBuilderThemeTokens,
|
|
14
14
|
layoutToStudioDocument,
|
|
15
15
|
studioDocumentToLayout
|
|
16
16
|
} from "../chunk-7ZMXZRBP.mjs";
|
|
17
|
-
import "../chunk-ADIIWIYL.mjs";
|
|
18
17
|
import "../chunk-OQSEJXC4.mjs";
|
|
18
|
+
import "../chunk-ADIIWIYL.mjs";
|
|
19
19
|
import "../chunk-6BWS3CLP.mjs";
|
|
20
20
|
export {
|
|
21
21
|
createDefaultStudioDocument,
|
package/package.json
CHANGED
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
migrateBlockToSettingsV2,
|
|
6
6
|
studioDocumentToLayout
|
|
7
7
|
} from "./chunk-7ZMXZRBP.mjs";
|
|
8
|
+
import {
|
|
9
|
+
sectionStyleDefaults
|
|
10
|
+
} from "./chunk-OQSEJXC4.mjs";
|
|
8
11
|
import {
|
|
9
12
|
assertStudioDocumentV1,
|
|
10
13
|
compileStudioDocument,
|
|
11
14
|
createEmptyStudioDocument,
|
|
12
15
|
validateStudioDocument
|
|
13
16
|
} from "./chunk-ADIIWIYL.mjs";
|
|
14
|
-
import {
|
|
15
|
-
sectionStyleDefaults
|
|
16
|
-
} from "./chunk-OQSEJXC4.mjs";
|
|
17
17
|
import {
|
|
18
18
|
__export
|
|
19
19
|
} from "./chunk-6BWS3CLP.mjs";
|