@orion-studios/payload-studio 0.5.0-beta.87 → 0.5.0-beta.89
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/{chunk-ZXKYAGTC.mjs → chunk-2BWLRH75.mjs} +0 -13
- package/dist/{chunk-VQFGBAW2.mjs → chunk-QWLMYY4E.mjs} +1 -1
- package/dist/index.js +0 -13
- package/dist/index.mjs +2 -2
- package/dist/nextjs/index.js +0 -13
- package/dist/nextjs/index.mjs +2 -2
- package/dist/studio-pages/client.js +4 -71
- package/dist/studio-pages/client.mjs +4 -71
- package/dist/studio-pages/index.js +0 -13
- package/dist/studio-pages/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -508,19 +508,6 @@ var mediaFieldSet = [
|
|
|
508
508
|
],
|
|
509
509
|
tags: ["image", "radius", "corners"],
|
|
510
510
|
type: "select"
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
group: "media",
|
|
514
|
-
key: "settings.media.position",
|
|
515
|
-
label: "Image Position",
|
|
516
|
-
options: [
|
|
517
|
-
{ label: "Center", value: "center" },
|
|
518
|
-
{ label: "Top", value: "top" },
|
|
519
|
-
{ label: "Bottom", value: "bottom" },
|
|
520
|
-
{ label: "Left", value: "left" },
|
|
521
|
-
{ label: "Right", value: "right" }
|
|
522
|
-
],
|
|
523
|
-
type: "select"
|
|
524
511
|
}
|
|
525
512
|
];
|
|
526
513
|
var inspectorDefinitionByBlockType = {
|
package/dist/index.js
CHANGED
|
@@ -3198,19 +3198,6 @@ var mediaFieldSet = [
|
|
|
3198
3198
|
],
|
|
3199
3199
|
tags: ["image", "radius", "corners"],
|
|
3200
3200
|
type: "select"
|
|
3201
|
-
},
|
|
3202
|
-
{
|
|
3203
|
-
group: "media",
|
|
3204
|
-
key: "settings.media.position",
|
|
3205
|
-
label: "Image Position",
|
|
3206
|
-
options: [
|
|
3207
|
-
{ label: "Center", value: "center" },
|
|
3208
|
-
{ label: "Top", value: "top" },
|
|
3209
|
-
{ label: "Bottom", value: "bottom" },
|
|
3210
|
-
{ label: "Left", value: "left" },
|
|
3211
|
-
{ label: "Right", value: "right" }
|
|
3212
|
-
],
|
|
3213
|
-
type: "select"
|
|
3214
3201
|
}
|
|
3215
3202
|
];
|
|
3216
3203
|
var inspectorDefinitionByBlockType = {
|
package/dist/index.mjs
CHANGED
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-XK3K5GRP.mjs";
|
|
10
10
|
import {
|
|
11
11
|
nextjs_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QWLMYY4E.mjs";
|
|
13
13
|
import {
|
|
14
14
|
studio_exports
|
|
15
15
|
} from "./chunk-ADIIWIYL.mjs";
|
|
16
16
|
import {
|
|
17
17
|
studio_pages_exports
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-2BWLRH75.mjs";
|
|
19
19
|
import "./chunk-SIL2J5MF.mjs";
|
|
20
20
|
import "./chunk-6BWS3CLP.mjs";
|
|
21
21
|
export {
|
package/dist/nextjs/index.js
CHANGED
|
@@ -564,19 +564,6 @@ var mediaFieldSet = [
|
|
|
564
564
|
],
|
|
565
565
|
tags: ["image", "radius", "corners"],
|
|
566
566
|
type: "select"
|
|
567
|
-
},
|
|
568
|
-
{
|
|
569
|
-
group: "media",
|
|
570
|
-
key: "settings.media.position",
|
|
571
|
-
label: "Image Position",
|
|
572
|
-
options: [
|
|
573
|
-
{ label: "Center", value: "center" },
|
|
574
|
-
{ label: "Top", value: "top" },
|
|
575
|
-
{ label: "Bottom", value: "bottom" },
|
|
576
|
-
{ label: "Left", value: "left" },
|
|
577
|
-
{ label: "Right", value: "right" }
|
|
578
|
-
],
|
|
579
|
-
type: "select"
|
|
580
567
|
}
|
|
581
568
|
];
|
|
582
569
|
var inspectorDefinitionByBlockType = {
|
package/dist/nextjs/index.mjs
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
createPayloadClient,
|
|
5
5
|
createSiteQueries,
|
|
6
6
|
resolveMedia
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-QWLMYY4E.mjs";
|
|
8
8
|
import "../chunk-ADIIWIYL.mjs";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-2BWLRH75.mjs";
|
|
10
10
|
import "../chunk-SIL2J5MF.mjs";
|
|
11
11
|
import "../chunk-6BWS3CLP.mjs";
|
|
12
12
|
export {
|
|
@@ -394,7 +394,6 @@ function ImageControls({
|
|
|
394
394
|
maxHeight = 600,
|
|
395
395
|
minHeight = 40,
|
|
396
396
|
onChange,
|
|
397
|
-
position,
|
|
398
397
|
positionX,
|
|
399
398
|
positionY
|
|
400
399
|
}) {
|
|
@@ -430,25 +429,7 @@ function ImageControls({
|
|
|
430
429
|
)
|
|
431
430
|
] }),
|
|
432
431
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "orion-builder-settings-label", children: [
|
|
433
|
-
"Image Position",
|
|
434
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
435
|
-
"select",
|
|
436
|
-
{
|
|
437
|
-
className: "orion-builder-settings-input",
|
|
438
|
-
onChange: (event) => onChange("position", event.target.value),
|
|
439
|
-
value: position,
|
|
440
|
-
children: [
|
|
441
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "center", children: "Center" }),
|
|
442
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "top", children: "Top" }),
|
|
443
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "bottom", children: "Bottom" }),
|
|
444
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "left", children: "Left" }),
|
|
445
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "right", children: "Right" })
|
|
446
|
-
]
|
|
447
|
-
}
|
|
448
|
-
)
|
|
449
|
-
] }),
|
|
450
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "orion-builder-settings-label", children: [
|
|
451
|
-
"Horizontal Image Focus (%)",
|
|
432
|
+
"Horizontal Image Position",
|
|
452
433
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "orion-builder-settings-input-split", children: [
|
|
453
434
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
454
435
|
"input",
|
|
@@ -474,7 +455,7 @@ function ImageControls({
|
|
|
474
455
|
] })
|
|
475
456
|
] }),
|
|
476
457
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "orion-builder-settings-label", children: [
|
|
477
|
-
"Vertical Image
|
|
458
|
+
"Vertical Image Position",
|
|
478
459
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "orion-builder-settings-input-split", children: [
|
|
479
460
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
480
461
|
"input",
|
|
@@ -706,19 +687,6 @@ var mediaFieldSet = [
|
|
|
706
687
|
],
|
|
707
688
|
tags: ["image", "radius", "corners"],
|
|
708
689
|
type: "select"
|
|
709
|
-
},
|
|
710
|
-
{
|
|
711
|
-
group: "media",
|
|
712
|
-
key: "settings.media.position",
|
|
713
|
-
label: "Image Position",
|
|
714
|
-
options: [
|
|
715
|
-
{ label: "Center", value: "center" },
|
|
716
|
-
{ label: "Top", value: "top" },
|
|
717
|
-
{ label: "Bottom", value: "bottom" },
|
|
718
|
-
{ label: "Left", value: "left" },
|
|
719
|
-
{ label: "Right", value: "right" }
|
|
720
|
-
],
|
|
721
|
-
type: "select"
|
|
722
690
|
}
|
|
723
691
|
];
|
|
724
692
|
var commonInspectorGroups = [
|
|
@@ -1124,16 +1092,13 @@ function BlockInspectorRenderer({
|
|
|
1124
1092
|
groups.map((group) => {
|
|
1125
1093
|
const mediaFit = getByPath(block, "settings.media.fit");
|
|
1126
1094
|
const mediaCornerStyle = getByPath(block, "settings.media.cornerStyle");
|
|
1127
|
-
const mediaPosition = getByPath(block, "settings.media.position");
|
|
1128
1095
|
const mediaPositionX = normalizeNumber(getByPath(block, "settings.media.positionX"), 50);
|
|
1129
1096
|
const mediaPositionY = normalizeNumber(getByPath(block, "settings.media.positionY"), 50);
|
|
1130
1097
|
const mediaHeight = getByPath(block, "settings.media.height");
|
|
1131
|
-
const fallbackMediaPosition = mediaPosition === "top" || mediaPosition === "bottom" || mediaPosition === "left" || mediaPosition === "right" ? mediaPosition : "center";
|
|
1132
1098
|
const fallbackMediaControls = {
|
|
1133
1099
|
cornerStyle: mediaCornerStyle === "square" ? "square" : "rounded",
|
|
1134
1100
|
fit: mediaFit === "contain" ? "contain" : "cover",
|
|
1135
1101
|
height: typeof mediaHeight === "number" ? mediaHeight : null,
|
|
1136
|
-
position: fallbackMediaPosition,
|
|
1137
1102
|
positionX: mediaPositionX,
|
|
1138
1103
|
positionY: mediaPositionY
|
|
1139
1104
|
};
|
|
@@ -1229,7 +1194,6 @@ function BlockInspectorRenderer({
|
|
|
1229
1194
|
}
|
|
1230
1195
|
updateForKey(`settings.media.${field}`, value);
|
|
1231
1196
|
},
|
|
1232
|
-
position: effectiveMedia.position,
|
|
1233
1197
|
positionX: effectiveMedia.positionX,
|
|
1234
1198
|
positionY: effectiveMedia.positionY
|
|
1235
1199
|
}
|
|
@@ -2270,7 +2234,6 @@ function renderSimpleBlockPreview(args) {
|
|
|
2270
2234
|
isBlockUploadTarget,
|
|
2271
2235
|
normalizeImageCornerStyle: normalizeImageCornerStyle3,
|
|
2272
2236
|
normalizeImageFit: normalizeImageFit3,
|
|
2273
|
-
normalizeImagePosition: normalizeImagePosition3,
|
|
2274
2237
|
normalizeText: normalizeText3,
|
|
2275
2238
|
onDropAt,
|
|
2276
2239
|
renderWithSectionShell,
|
|
@@ -2451,7 +2414,6 @@ function renderSimpleBlockPreview(args) {
|
|
|
2451
2414
|
const imageStyle = getImagePresentationStyle2({
|
|
2452
2415
|
cornerStyle: normalizeImageCornerStyle3(mediaSettings.cornerStyle ?? block?.imageCornerStyle),
|
|
2453
2416
|
fit: normalizeImageFit3(mediaSettings.fit ?? block?.imageFit),
|
|
2454
|
-
position: normalizeImagePosition3(mediaSettings.position ?? block?.imagePosition),
|
|
2455
2417
|
positionX: imagePositionX,
|
|
2456
2418
|
positionY: imagePositionY
|
|
2457
2419
|
});
|
|
@@ -3011,7 +2973,6 @@ var normalizeNumber2 = (value, fallback) => {
|
|
|
3011
2973
|
var clamp = (value, min, max) => Math.max(min, Math.min(max, value));
|
|
3012
2974
|
var normalizeImageFit = (value) => value === "contain" ? "contain" : "cover";
|
|
3013
2975
|
var normalizeImageCornerStyle = (value) => value === "square" ? "square" : "rounded";
|
|
3014
|
-
var normalizeImagePosition = (value) => value === "top" || value === "bottom" || value === "left" || value === "right" ? value : "center";
|
|
3015
2976
|
var hasQueryMatch = (query, ...values) => {
|
|
3016
2977
|
const normalized = query.trim().toLowerCase();
|
|
3017
2978
|
if (!normalized) {
|
|
@@ -3419,17 +3380,10 @@ function ArrayItemsEditor({
|
|
|
3419
3380
|
onUpdateItemSetting(itemIndex, "media.cornerStyle", value);
|
|
3420
3381
|
return;
|
|
3421
3382
|
}
|
|
3422
|
-
if (field === "position") {
|
|
3423
|
-
onUpdateItemSetting(itemIndex, "media.position", value);
|
|
3424
|
-
onUpdateItemSetting(itemIndex, "media.positionX", null);
|
|
3425
|
-
onUpdateItemSetting(itemIndex, "media.positionY", null);
|
|
3426
|
-
return;
|
|
3427
|
-
}
|
|
3428
3383
|
if (field === "positionX" || field === "positionY") {
|
|
3429
3384
|
onUpdateItemSetting(itemIndex, `media.${field}`, value);
|
|
3430
3385
|
}
|
|
3431
3386
|
},
|
|
3432
|
-
position: normalizeImagePosition(item.imagePosition),
|
|
3433
3387
|
positionX: clamp(normalizeNumber2(item.imagePositionX, 50), 0, 100),
|
|
3434
3388
|
positionY: clamp(normalizeNumber2(item.imagePositionY, 50), 0, 100)
|
|
3435
3389
|
}
|
|
@@ -3498,12 +3452,6 @@ var normalizeHeroImageCornerStyle = (value, legacyFitValue) => {
|
|
|
3498
3452
|
return "rounded";
|
|
3499
3453
|
};
|
|
3500
3454
|
var getHeroImageCornerRadius = (cornerStyle) => cornerStyle === "square" ? "0px" : "var(--orion-studio-radius-lg)";
|
|
3501
|
-
var normalizeHeroImagePosition = (value) => {
|
|
3502
|
-
if (value === "top" || value === "bottom" || value === "left" || value === "right") {
|
|
3503
|
-
return value;
|
|
3504
|
-
}
|
|
3505
|
-
return "center";
|
|
3506
|
-
};
|
|
3507
3455
|
var normalizeHeroHeight = (value) => {
|
|
3508
3456
|
if (value === "md" || value === "full") {
|
|
3509
3457
|
return value;
|
|
@@ -3518,7 +3466,6 @@ var resolveBuilderMediumHeroHeight = (topViewportHeight) => {
|
|
|
3518
3466
|
};
|
|
3519
3467
|
var normalizeImageFit2 = (value) => normalizeHeroImageFit(value);
|
|
3520
3468
|
var normalizeImageCornerStyle2 = (value, legacyFitValue) => normalizeHeroImageCornerStyle(value, legacyFitValue);
|
|
3521
|
-
var normalizeImagePosition2 = (value) => normalizeHeroImagePosition(value);
|
|
3522
3469
|
var positionPercent = (value, fit) => {
|
|
3523
3470
|
const resolved = fit === "cover" && (value === "left" || value === "right") ? "center" : value;
|
|
3524
3471
|
switch (resolved) {
|
|
@@ -4473,12 +4420,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
4473
4420
|
updateArrayItemSettingField(selectedIndex, "items", selectedItemIndex, "media.cornerStyle", value);
|
|
4474
4421
|
return;
|
|
4475
4422
|
}
|
|
4476
|
-
if (field === "position") {
|
|
4477
|
-
updateArrayItemSettingField(selectedIndex, "items", selectedItemIndex, "media.position", value);
|
|
4478
|
-
updateArrayItemSettingField(selectedIndex, "items", selectedItemIndex, "media.positionX", null);
|
|
4479
|
-
updateArrayItemSettingField(selectedIndex, "items", selectedItemIndex, "media.positionY", null);
|
|
4480
|
-
return;
|
|
4481
|
-
}
|
|
4482
4423
|
if (field === "positionX") {
|
|
4483
4424
|
updateArrayItemSettingField(selectedIndex, "items", selectedItemIndex, "media.positionX", value);
|
|
4484
4425
|
return;
|
|
@@ -5056,7 +4997,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5056
4997
|
})(),
|
|
5057
4998
|
maxHeight: selectedType === "logoWall" ? 200 : 600,
|
|
5058
4999
|
minHeight: selectedType === "logoWall" ? 24 : selectedType === "beforeAfter" ? 60 : 40,
|
|
5059
|
-
position: normalizeImagePosition2(selectedItemRecord.imagePosition),
|
|
5060
5000
|
positionX: parsePercentNumber(selectedItemRecord.imagePositionX, 50),
|
|
5061
5001
|
positionY: parsePercentNumber(selectedItemRecord.imagePositionY, 50)
|
|
5062
5002
|
} : void 0;
|
|
@@ -5293,7 +5233,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5293
5233
|
mediaSettings.cornerStyle ?? block.backgroundImageCornerStyle,
|
|
5294
5234
|
mediaSettings.fit ?? block.backgroundImageFit
|
|
5295
5235
|
);
|
|
5296
|
-
const backgroundImagePosition = normalizeHeroImagePosition(mediaSettings.position ?? block.backgroundImagePosition);
|
|
5297
5236
|
const backgroundImagePositionX = parseOptionalPercentNumber2(mediaSettings.positionX ?? block.backgroundImagePositionX);
|
|
5298
5237
|
const backgroundImagePositionY = parseOptionalPercentNumber2(mediaSettings.positionY ?? block.backgroundImagePositionY);
|
|
5299
5238
|
const heroHeight = normalizeHeroHeight(block.heroHeight);
|
|
@@ -5305,9 +5244,8 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5305
5244
|
);
|
|
5306
5245
|
const backgroundImageURL = normalizeText2(block.backgroundImageURL);
|
|
5307
5246
|
const backgroundImage = media?.url || backgroundImageURL;
|
|
5308
|
-
const
|
|
5309
|
-
const
|
|
5310
|
-
const resolvedBackgroundPositionY = typeof backgroundImagePositionY === "number" ? backgroundImagePositionY : backgroundPositionBase.y;
|
|
5247
|
+
const resolvedBackgroundPositionX = typeof backgroundImagePositionX === "number" ? backgroundImagePositionX : 50;
|
|
5248
|
+
const resolvedBackgroundPositionY = typeof backgroundImagePositionY === "number" ? backgroundImagePositionY : 50;
|
|
5311
5249
|
const backgroundImageObjectPosition = `${resolvedBackgroundPositionX}% ${resolvedBackgroundPositionY}%`;
|
|
5312
5250
|
const hasCustomHeroColor = backgroundColor.length > 0 && backgroundColor.toLowerCase() !== "#124a37";
|
|
5313
5251
|
const overlayModeRaw = normalizeText2(block?.backgroundOverlayMode, "none");
|
|
@@ -5480,7 +5418,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5480
5418
|
const itemImageStyle = getImagePresentationStyle({
|
|
5481
5419
|
cornerStyle: normalizeImageCornerStyle2(itemRecord?.imageCornerStyle),
|
|
5482
5420
|
fit: normalizeImageFit2(itemRecord?.imageFit),
|
|
5483
|
-
position: normalizeImagePosition2(itemRecord?.imagePosition),
|
|
5484
5421
|
positionX: itemPositionX,
|
|
5485
5422
|
positionY: itemPositionY
|
|
5486
5423
|
});
|
|
@@ -5595,7 +5532,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5595
5532
|
const itemImageStyle = getImagePresentationStyle({
|
|
5596
5533
|
cornerStyle: normalizeImageCornerStyle2(itemRecord?.imageCornerStyle),
|
|
5597
5534
|
fit: normalizeImageFit2(itemRecord?.imageFit),
|
|
5598
|
-
position: normalizeImagePosition2(itemRecord?.imagePosition),
|
|
5599
5535
|
positionX: itemPositionX,
|
|
5600
5536
|
positionY: itemPositionY
|
|
5601
5537
|
});
|
|
@@ -5799,7 +5735,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5799
5735
|
const imageStyle = getImagePresentationStyle({
|
|
5800
5736
|
cornerStyle: normalizeImageCornerStyle2(itemRecord?.imageCornerStyle),
|
|
5801
5737
|
fit: normalizeImageFit2(itemRecord?.imageFit),
|
|
5802
|
-
position: normalizeImagePosition2(itemRecord?.imagePosition),
|
|
5803
5738
|
positionX: itemPositionX,
|
|
5804
5739
|
positionY: itemPositionY,
|
|
5805
5740
|
roundedRadius: 10
|
|
@@ -5906,7 +5841,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5906
5841
|
const imageStyle = getImagePresentationStyle({
|
|
5907
5842
|
cornerStyle: normalizeImageCornerStyle2(itemRecord?.imageCornerStyle),
|
|
5908
5843
|
fit: normalizeImageFit2(itemRecord?.imageFit),
|
|
5909
|
-
position: normalizeImagePosition2(itemRecord?.imagePosition),
|
|
5910
5844
|
positionX: itemPositionX,
|
|
5911
5845
|
positionY: itemPositionY
|
|
5912
5846
|
});
|
|
@@ -6214,7 +6148,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
6214
6148
|
isBlockUploadTarget,
|
|
6215
6149
|
normalizeImageCornerStyle: normalizeImageCornerStyle2,
|
|
6216
6150
|
normalizeImageFit: normalizeImageFit2,
|
|
6217
|
-
normalizeImagePosition: normalizeImagePosition2,
|
|
6218
6151
|
normalizeText: normalizeText2,
|
|
6219
6152
|
onDropAt,
|
|
6220
6153
|
renderWithSectionShell,
|
|
@@ -368,7 +368,6 @@ function ImageControls({
|
|
|
368
368
|
maxHeight = 600,
|
|
369
369
|
minHeight = 40,
|
|
370
370
|
onChange,
|
|
371
|
-
position,
|
|
372
371
|
positionX,
|
|
373
372
|
positionY
|
|
374
373
|
}) {
|
|
@@ -404,25 +403,7 @@ function ImageControls({
|
|
|
404
403
|
)
|
|
405
404
|
] }),
|
|
406
405
|
/* @__PURE__ */ jsxs2("label", { className: "orion-builder-settings-label", children: [
|
|
407
|
-
"Image Position",
|
|
408
|
-
/* @__PURE__ */ jsxs2(
|
|
409
|
-
"select",
|
|
410
|
-
{
|
|
411
|
-
className: "orion-builder-settings-input",
|
|
412
|
-
onChange: (event) => onChange("position", event.target.value),
|
|
413
|
-
value: position,
|
|
414
|
-
children: [
|
|
415
|
-
/* @__PURE__ */ jsx2("option", { value: "center", children: "Center" }),
|
|
416
|
-
/* @__PURE__ */ jsx2("option", { value: "top", children: "Top" }),
|
|
417
|
-
/* @__PURE__ */ jsx2("option", { value: "bottom", children: "Bottom" }),
|
|
418
|
-
/* @__PURE__ */ jsx2("option", { value: "left", children: "Left" }),
|
|
419
|
-
/* @__PURE__ */ jsx2("option", { value: "right", children: "Right" })
|
|
420
|
-
]
|
|
421
|
-
}
|
|
422
|
-
)
|
|
423
|
-
] }),
|
|
424
|
-
/* @__PURE__ */ jsxs2("label", { className: "orion-builder-settings-label", children: [
|
|
425
|
-
"Horizontal Image Focus (%)",
|
|
406
|
+
"Horizontal Image Position",
|
|
426
407
|
/* @__PURE__ */ jsxs2("div", { className: "orion-builder-settings-input-split", children: [
|
|
427
408
|
/* @__PURE__ */ jsx2(
|
|
428
409
|
"input",
|
|
@@ -448,7 +429,7 @@ function ImageControls({
|
|
|
448
429
|
] })
|
|
449
430
|
] }),
|
|
450
431
|
/* @__PURE__ */ jsxs2("label", { className: "orion-builder-settings-label", children: [
|
|
451
|
-
"Vertical Image
|
|
432
|
+
"Vertical Image Position",
|
|
452
433
|
/* @__PURE__ */ jsxs2("div", { className: "orion-builder-settings-input-split", children: [
|
|
453
434
|
/* @__PURE__ */ jsx2(
|
|
454
435
|
"input",
|
|
@@ -680,19 +661,6 @@ var mediaFieldSet = [
|
|
|
680
661
|
],
|
|
681
662
|
tags: ["image", "radius", "corners"],
|
|
682
663
|
type: "select"
|
|
683
|
-
},
|
|
684
|
-
{
|
|
685
|
-
group: "media",
|
|
686
|
-
key: "settings.media.position",
|
|
687
|
-
label: "Image Position",
|
|
688
|
-
options: [
|
|
689
|
-
{ label: "Center", value: "center" },
|
|
690
|
-
{ label: "Top", value: "top" },
|
|
691
|
-
{ label: "Bottom", value: "bottom" },
|
|
692
|
-
{ label: "Left", value: "left" },
|
|
693
|
-
{ label: "Right", value: "right" }
|
|
694
|
-
],
|
|
695
|
-
type: "select"
|
|
696
664
|
}
|
|
697
665
|
];
|
|
698
666
|
var commonInspectorGroups = [
|
|
@@ -1098,16 +1066,13 @@ function BlockInspectorRenderer({
|
|
|
1098
1066
|
groups.map((group) => {
|
|
1099
1067
|
const mediaFit = getByPath(block, "settings.media.fit");
|
|
1100
1068
|
const mediaCornerStyle = getByPath(block, "settings.media.cornerStyle");
|
|
1101
|
-
const mediaPosition = getByPath(block, "settings.media.position");
|
|
1102
1069
|
const mediaPositionX = normalizeNumber(getByPath(block, "settings.media.positionX"), 50);
|
|
1103
1070
|
const mediaPositionY = normalizeNumber(getByPath(block, "settings.media.positionY"), 50);
|
|
1104
1071
|
const mediaHeight = getByPath(block, "settings.media.height");
|
|
1105
|
-
const fallbackMediaPosition = mediaPosition === "top" || mediaPosition === "bottom" || mediaPosition === "left" || mediaPosition === "right" ? mediaPosition : "center";
|
|
1106
1072
|
const fallbackMediaControls = {
|
|
1107
1073
|
cornerStyle: mediaCornerStyle === "square" ? "square" : "rounded",
|
|
1108
1074
|
fit: mediaFit === "contain" ? "contain" : "cover",
|
|
1109
1075
|
height: typeof mediaHeight === "number" ? mediaHeight : null,
|
|
1110
|
-
position: fallbackMediaPosition,
|
|
1111
1076
|
positionX: mediaPositionX,
|
|
1112
1077
|
positionY: mediaPositionY
|
|
1113
1078
|
};
|
|
@@ -1203,7 +1168,6 @@ function BlockInspectorRenderer({
|
|
|
1203
1168
|
}
|
|
1204
1169
|
updateForKey(`settings.media.${field}`, value);
|
|
1205
1170
|
},
|
|
1206
|
-
position: effectiveMedia.position,
|
|
1207
1171
|
positionX: effectiveMedia.positionX,
|
|
1208
1172
|
positionY: effectiveMedia.positionY
|
|
1209
1173
|
}
|
|
@@ -2151,7 +2115,6 @@ function renderSimpleBlockPreview(args) {
|
|
|
2151
2115
|
isBlockUploadTarget,
|
|
2152
2116
|
normalizeImageCornerStyle: normalizeImageCornerStyle3,
|
|
2153
2117
|
normalizeImageFit: normalizeImageFit3,
|
|
2154
|
-
normalizeImagePosition: normalizeImagePosition3,
|
|
2155
2118
|
normalizeText: normalizeText3,
|
|
2156
2119
|
onDropAt,
|
|
2157
2120
|
renderWithSectionShell,
|
|
@@ -2332,7 +2295,6 @@ function renderSimpleBlockPreview(args) {
|
|
|
2332
2295
|
const imageStyle = getImagePresentationStyle2({
|
|
2333
2296
|
cornerStyle: normalizeImageCornerStyle3(mediaSettings.cornerStyle ?? block?.imageCornerStyle),
|
|
2334
2297
|
fit: normalizeImageFit3(mediaSettings.fit ?? block?.imageFit),
|
|
2335
|
-
position: normalizeImagePosition3(mediaSettings.position ?? block?.imagePosition),
|
|
2336
2298
|
positionX: imagePositionX,
|
|
2337
2299
|
positionY: imagePositionY
|
|
2338
2300
|
});
|
|
@@ -2892,7 +2854,6 @@ var normalizeNumber2 = (value, fallback) => {
|
|
|
2892
2854
|
var clamp = (value, min, max) => Math.max(min, Math.min(max, value));
|
|
2893
2855
|
var normalizeImageFit = (value) => value === "contain" ? "contain" : "cover";
|
|
2894
2856
|
var normalizeImageCornerStyle = (value) => value === "square" ? "square" : "rounded";
|
|
2895
|
-
var normalizeImagePosition = (value) => value === "top" || value === "bottom" || value === "left" || value === "right" ? value : "center";
|
|
2896
2857
|
var hasQueryMatch = (query, ...values) => {
|
|
2897
2858
|
const normalized = query.trim().toLowerCase();
|
|
2898
2859
|
if (!normalized) {
|
|
@@ -3300,17 +3261,10 @@ function ArrayItemsEditor({
|
|
|
3300
3261
|
onUpdateItemSetting(itemIndex, "media.cornerStyle", value);
|
|
3301
3262
|
return;
|
|
3302
3263
|
}
|
|
3303
|
-
if (field === "position") {
|
|
3304
|
-
onUpdateItemSetting(itemIndex, "media.position", value);
|
|
3305
|
-
onUpdateItemSetting(itemIndex, "media.positionX", null);
|
|
3306
|
-
onUpdateItemSetting(itemIndex, "media.positionY", null);
|
|
3307
|
-
return;
|
|
3308
|
-
}
|
|
3309
3264
|
if (field === "positionX" || field === "positionY") {
|
|
3310
3265
|
onUpdateItemSetting(itemIndex, `media.${field}`, value);
|
|
3311
3266
|
}
|
|
3312
3267
|
},
|
|
3313
|
-
position: normalizeImagePosition(item.imagePosition),
|
|
3314
3268
|
positionX: clamp(normalizeNumber2(item.imagePositionX, 50), 0, 100),
|
|
3315
3269
|
positionY: clamp(normalizeNumber2(item.imagePositionY, 50), 0, 100)
|
|
3316
3270
|
}
|
|
@@ -3379,12 +3333,6 @@ var normalizeHeroImageCornerStyle = (value, legacyFitValue) => {
|
|
|
3379
3333
|
return "rounded";
|
|
3380
3334
|
};
|
|
3381
3335
|
var getHeroImageCornerRadius = (cornerStyle) => cornerStyle === "square" ? "0px" : "var(--orion-studio-radius-lg)";
|
|
3382
|
-
var normalizeHeroImagePosition = (value) => {
|
|
3383
|
-
if (value === "top" || value === "bottom" || value === "left" || value === "right") {
|
|
3384
|
-
return value;
|
|
3385
|
-
}
|
|
3386
|
-
return "center";
|
|
3387
|
-
};
|
|
3388
3336
|
var normalizeHeroHeight = (value) => {
|
|
3389
3337
|
if (value === "md" || value === "full") {
|
|
3390
3338
|
return value;
|
|
@@ -3399,7 +3347,6 @@ var resolveBuilderMediumHeroHeight = (topViewportHeight) => {
|
|
|
3399
3347
|
};
|
|
3400
3348
|
var normalizeImageFit2 = (value) => normalizeHeroImageFit(value);
|
|
3401
3349
|
var normalizeImageCornerStyle2 = (value, legacyFitValue) => normalizeHeroImageCornerStyle(value, legacyFitValue);
|
|
3402
|
-
var normalizeImagePosition2 = (value) => normalizeHeroImagePosition(value);
|
|
3403
3350
|
var positionPercent = (value, fit) => {
|
|
3404
3351
|
const resolved = fit === "cover" && (value === "left" || value === "right") ? "center" : value;
|
|
3405
3352
|
switch (resolved) {
|
|
@@ -4354,12 +4301,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
4354
4301
|
updateArrayItemSettingField(selectedIndex, "items", selectedItemIndex, "media.cornerStyle", value);
|
|
4355
4302
|
return;
|
|
4356
4303
|
}
|
|
4357
|
-
if (field === "position") {
|
|
4358
|
-
updateArrayItemSettingField(selectedIndex, "items", selectedItemIndex, "media.position", value);
|
|
4359
|
-
updateArrayItemSettingField(selectedIndex, "items", selectedItemIndex, "media.positionX", null);
|
|
4360
|
-
updateArrayItemSettingField(selectedIndex, "items", selectedItemIndex, "media.positionY", null);
|
|
4361
|
-
return;
|
|
4362
|
-
}
|
|
4363
4304
|
if (field === "positionX") {
|
|
4364
4305
|
updateArrayItemSettingField(selectedIndex, "items", selectedItemIndex, "media.positionX", value);
|
|
4365
4306
|
return;
|
|
@@ -4937,7 +4878,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
4937
4878
|
})(),
|
|
4938
4879
|
maxHeight: selectedType === "logoWall" ? 200 : 600,
|
|
4939
4880
|
minHeight: selectedType === "logoWall" ? 24 : selectedType === "beforeAfter" ? 60 : 40,
|
|
4940
|
-
position: normalizeImagePosition2(selectedItemRecord.imagePosition),
|
|
4941
4881
|
positionX: parsePercentNumber(selectedItemRecord.imagePositionX, 50),
|
|
4942
4882
|
positionY: parsePercentNumber(selectedItemRecord.imagePositionY, 50)
|
|
4943
4883
|
} : void 0;
|
|
@@ -5174,7 +5114,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5174
5114
|
mediaSettings.cornerStyle ?? block.backgroundImageCornerStyle,
|
|
5175
5115
|
mediaSettings.fit ?? block.backgroundImageFit
|
|
5176
5116
|
);
|
|
5177
|
-
const backgroundImagePosition = normalizeHeroImagePosition(mediaSettings.position ?? block.backgroundImagePosition);
|
|
5178
5117
|
const backgroundImagePositionX = parseOptionalPercentNumber2(mediaSettings.positionX ?? block.backgroundImagePositionX);
|
|
5179
5118
|
const backgroundImagePositionY = parseOptionalPercentNumber2(mediaSettings.positionY ?? block.backgroundImagePositionY);
|
|
5180
5119
|
const heroHeight = normalizeHeroHeight(block.heroHeight);
|
|
@@ -5186,9 +5125,8 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5186
5125
|
);
|
|
5187
5126
|
const backgroundImageURL = normalizeText2(block.backgroundImageURL);
|
|
5188
5127
|
const backgroundImage = media?.url || backgroundImageURL;
|
|
5189
|
-
const
|
|
5190
|
-
const
|
|
5191
|
-
const resolvedBackgroundPositionY = typeof backgroundImagePositionY === "number" ? backgroundImagePositionY : backgroundPositionBase.y;
|
|
5128
|
+
const resolvedBackgroundPositionX = typeof backgroundImagePositionX === "number" ? backgroundImagePositionX : 50;
|
|
5129
|
+
const resolvedBackgroundPositionY = typeof backgroundImagePositionY === "number" ? backgroundImagePositionY : 50;
|
|
5192
5130
|
const backgroundImageObjectPosition = `${resolvedBackgroundPositionX}% ${resolvedBackgroundPositionY}%`;
|
|
5193
5131
|
const hasCustomHeroColor = backgroundColor.length > 0 && backgroundColor.toLowerCase() !== "#124a37";
|
|
5194
5132
|
const overlayModeRaw = normalizeText2(block?.backgroundOverlayMode, "none");
|
|
@@ -5361,7 +5299,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5361
5299
|
const itemImageStyle = getImagePresentationStyle({
|
|
5362
5300
|
cornerStyle: normalizeImageCornerStyle2(itemRecord?.imageCornerStyle),
|
|
5363
5301
|
fit: normalizeImageFit2(itemRecord?.imageFit),
|
|
5364
|
-
position: normalizeImagePosition2(itemRecord?.imagePosition),
|
|
5365
5302
|
positionX: itemPositionX,
|
|
5366
5303
|
positionY: itemPositionY
|
|
5367
5304
|
});
|
|
@@ -5476,7 +5413,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5476
5413
|
const itemImageStyle = getImagePresentationStyle({
|
|
5477
5414
|
cornerStyle: normalizeImageCornerStyle2(itemRecord?.imageCornerStyle),
|
|
5478
5415
|
fit: normalizeImageFit2(itemRecord?.imageFit),
|
|
5479
|
-
position: normalizeImagePosition2(itemRecord?.imagePosition),
|
|
5480
5416
|
positionX: itemPositionX,
|
|
5481
5417
|
positionY: itemPositionY
|
|
5482
5418
|
});
|
|
@@ -5680,7 +5616,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5680
5616
|
const imageStyle = getImagePresentationStyle({
|
|
5681
5617
|
cornerStyle: normalizeImageCornerStyle2(itemRecord?.imageCornerStyle),
|
|
5682
5618
|
fit: normalizeImageFit2(itemRecord?.imageFit),
|
|
5683
|
-
position: normalizeImagePosition2(itemRecord?.imagePosition),
|
|
5684
5619
|
positionX: itemPositionX,
|
|
5685
5620
|
positionY: itemPositionY,
|
|
5686
5621
|
roundedRadius: 10
|
|
@@ -5787,7 +5722,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
5787
5722
|
const imageStyle = getImagePresentationStyle({
|
|
5788
5723
|
cornerStyle: normalizeImageCornerStyle2(itemRecord?.imageCornerStyle),
|
|
5789
5724
|
fit: normalizeImageFit2(itemRecord?.imageFit),
|
|
5790
|
-
position: normalizeImagePosition2(itemRecord?.imagePosition),
|
|
5791
5725
|
positionX: itemPositionX,
|
|
5792
5726
|
positionY: itemPositionY
|
|
5793
5727
|
});
|
|
@@ -6095,7 +6029,6 @@ function BuilderPageEditor({ featureFlags: _featureFlags, initialDoc, pageID, si
|
|
|
6095
6029
|
isBlockUploadTarget,
|
|
6096
6030
|
normalizeImageCornerStyle: normalizeImageCornerStyle2,
|
|
6097
6031
|
normalizeImageFit: normalizeImageFit2,
|
|
6098
|
-
normalizeImagePosition: normalizeImagePosition2,
|
|
6099
6032
|
normalizeText: normalizeText2,
|
|
6100
6033
|
onDropAt,
|
|
6101
6034
|
renderWithSectionShell,
|
|
@@ -541,19 +541,6 @@ var mediaFieldSet = [
|
|
|
541
541
|
],
|
|
542
542
|
tags: ["image", "radius", "corners"],
|
|
543
543
|
type: "select"
|
|
544
|
-
},
|
|
545
|
-
{
|
|
546
|
-
group: "media",
|
|
547
|
-
key: "settings.media.position",
|
|
548
|
-
label: "Image Position",
|
|
549
|
-
options: [
|
|
550
|
-
{ label: "Center", value: "center" },
|
|
551
|
-
{ label: "Top", value: "top" },
|
|
552
|
-
{ label: "Bottom", value: "bottom" },
|
|
553
|
-
{ label: "Left", value: "left" },
|
|
554
|
-
{ label: "Right", value: "right" }
|
|
555
|
-
],
|
|
556
|
-
type: "select"
|
|
557
544
|
}
|
|
558
545
|
];
|
|
559
546
|
var inspectorDefinitionByBlockType = {
|