@orion-studios/payload-studio 0.5.0-beta.34 → 0.5.0-beta.36
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.mjs +3 -3
- package/dist/studio-pages/client.js +50 -52
- package/dist/studio-pages/client.mjs +50 -52
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -500,29 +500,31 @@ var heroHeightMap = {
|
|
|
500
500
|
var normalizeImageFit = (value) => normalizeHeroImageFit(value);
|
|
501
501
|
var normalizeImageCornerStyle = (value, legacyFitValue) => normalizeHeroImageCornerStyle(value, legacyFitValue);
|
|
502
502
|
var normalizeImagePosition = (value) => normalizeHeroImagePosition(value);
|
|
503
|
-
var
|
|
503
|
+
var positionPercent = (value, fit) => {
|
|
504
504
|
const resolved = fit === "cover" && (value === "left" || value === "right") ? "center" : value;
|
|
505
505
|
switch (resolved) {
|
|
506
506
|
case "top":
|
|
507
|
-
return
|
|
507
|
+
return { x: 50, y: 0 };
|
|
508
508
|
case "bottom":
|
|
509
|
-
return
|
|
509
|
+
return { x: 50, y: 100 };
|
|
510
510
|
case "left":
|
|
511
|
-
return
|
|
511
|
+
return { x: 0, y: 50 };
|
|
512
512
|
case "right":
|
|
513
|
-
return
|
|
513
|
+
return { x: 100, y: 50 };
|
|
514
514
|
default:
|
|
515
|
-
return
|
|
515
|
+
return { x: 50, y: 50 };
|
|
516
516
|
}
|
|
517
517
|
};
|
|
518
518
|
var getImagePresentationStyle = (options) => {
|
|
519
|
-
const
|
|
520
|
-
const
|
|
521
|
-
const
|
|
519
|
+
const fit = options.fit || "cover";
|
|
520
|
+
const base = positionPercent(options.position || "center", fit);
|
|
521
|
+
const x = typeof options.positionX === "number" && Number.isFinite(options.positionX) ? Math.max(0, Math.min(100, options.positionX)) : base.x;
|
|
522
|
+
const y = typeof options.positionY === "number" && Number.isFinite(options.positionY) ? Math.max(0, Math.min(100, options.positionY)) : base.y;
|
|
522
523
|
return {
|
|
523
524
|
borderRadius: options.cornerStyle === "square" ? 0 : `${options.roundedRadius ?? 12}px`,
|
|
524
|
-
objectFit:
|
|
525
|
-
|
|
525
|
+
objectFit: fit,
|
|
526
|
+
// Always use percent positioning so presets behave identically with/without custom axis overrides.
|
|
527
|
+
objectPosition: `${x}% ${y}%`
|
|
526
528
|
};
|
|
527
529
|
};
|
|
528
530
|
function cloneBlockLayout(layout) {
|
|
@@ -815,6 +817,18 @@ function parsePixelNumber(value, fallback) {
|
|
|
815
817
|
function parsePercentNumber(value, fallback) {
|
|
816
818
|
return Math.max(0, Math.min(100, parsePixelNumber(value, fallback)));
|
|
817
819
|
}
|
|
820
|
+
function parseOptionalPercentNumber(value) {
|
|
821
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
822
|
+
return Math.max(0, Math.min(100, value));
|
|
823
|
+
}
|
|
824
|
+
if (typeof value === "string") {
|
|
825
|
+
const parsed = Number(value);
|
|
826
|
+
if (Number.isFinite(parsed)) {
|
|
827
|
+
return Math.max(0, Math.min(100, parsed));
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
return void 0;
|
|
831
|
+
}
|
|
818
832
|
var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
819
833
|
const contentWidthRaw = normalizeText(block.contentWidth, defaultSectionStyle.contentWidth);
|
|
820
834
|
const sectionPaddingRaw = normalizeText(block.sectionPaddingY, defaultSectionStyle.sectionPaddingY);
|
|
@@ -2243,15 +2257,14 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
2243
2257
|
const itemRecord = item;
|
|
2244
2258
|
const itemMedia = resolveMedia(itemRecord?.media);
|
|
2245
2259
|
const itemImageHeight = parsePixelNumber(itemRecord?.imageHeight, 120);
|
|
2246
|
-
const
|
|
2260
|
+
const itemPositionX = parseOptionalPercentNumber(itemRecord?.imagePositionX);
|
|
2261
|
+
const itemPositionY = parseOptionalPercentNumber(itemRecord?.imagePositionY);
|
|
2247
2262
|
const itemImageStyle = getImagePresentationStyle({
|
|
2248
2263
|
cornerStyle: normalizeImageCornerStyle(itemRecord?.imageCornerStyle),
|
|
2249
2264
|
fit: normalizeImageFit(itemRecord?.imageFit),
|
|
2250
2265
|
position: normalizeImagePosition(itemRecord?.imagePosition),
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
positionY: parsePercentNumber(itemRecord?.imagePositionY, 50)
|
|
2254
|
-
} : {}
|
|
2266
|
+
positionX: itemPositionX,
|
|
2267
|
+
positionY: itemPositionY
|
|
2255
2268
|
});
|
|
2256
2269
|
const isItemSelected = selectedIndex === index && selectedItemIndex === itemIndex;
|
|
2257
2270
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
@@ -2342,15 +2355,14 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
2342
2355
|
const itemRecord = item;
|
|
2343
2356
|
const itemMedia = resolveMedia(itemRecord?.media);
|
|
2344
2357
|
const itemImageHeight = parsePixelNumber(itemRecord?.imageHeight, 120);
|
|
2345
|
-
const
|
|
2358
|
+
const itemPositionX = parseOptionalPercentNumber(itemRecord?.imagePositionX);
|
|
2359
|
+
const itemPositionY = parseOptionalPercentNumber(itemRecord?.imagePositionY);
|
|
2346
2360
|
const itemImageStyle = getImagePresentationStyle({
|
|
2347
2361
|
cornerStyle: normalizeImageCornerStyle(itemRecord?.imageCornerStyle),
|
|
2348
2362
|
fit: normalizeImageFit(itemRecord?.imageFit),
|
|
2349
2363
|
position: normalizeImagePosition(itemRecord?.imagePosition),
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
positionY: parsePercentNumber(itemRecord?.imagePositionY, 50)
|
|
2353
|
-
} : {}
|
|
2364
|
+
positionX: itemPositionX,
|
|
2365
|
+
positionY: itemPositionY
|
|
2354
2366
|
});
|
|
2355
2367
|
const isItemSelected = selectedIndex === index && selectedItemIndex === itemIndex;
|
|
2356
2368
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -2543,15 +2555,14 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
2543
2555
|
const itemRecord = item;
|
|
2544
2556
|
const media = resolveMedia(itemRecord?.media);
|
|
2545
2557
|
const imageHeight = parsePixelNumber(itemRecord?.imageHeight, 54);
|
|
2546
|
-
const
|
|
2558
|
+
const itemPositionX = parseOptionalPercentNumber(itemRecord?.imagePositionX);
|
|
2559
|
+
const itemPositionY = parseOptionalPercentNumber(itemRecord?.imagePositionY);
|
|
2547
2560
|
const imageStyle = getImagePresentationStyle({
|
|
2548
2561
|
cornerStyle: normalizeImageCornerStyle(itemRecord?.imageCornerStyle),
|
|
2549
2562
|
fit: normalizeImageFit(itemRecord?.imageFit),
|
|
2550
2563
|
position: normalizeImagePosition(itemRecord?.imagePosition),
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
positionY: parsePercentNumber(itemRecord?.imagePositionY, 50)
|
|
2554
|
-
} : {},
|
|
2564
|
+
positionX: itemPositionX,
|
|
2565
|
+
positionY: itemPositionY,
|
|
2555
2566
|
roundedRadius: 10
|
|
2556
2567
|
});
|
|
2557
2568
|
const isItemSelected = selectedIndex === index && selectedItemIndex === itemIndex;
|
|
@@ -2636,15 +2647,14 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
2636
2647
|
const beforeMedia = resolveMedia(itemRecord?.beforeMedia);
|
|
2637
2648
|
const afterMedia = resolveMedia(itemRecord?.afterMedia);
|
|
2638
2649
|
const imageHeight = parsePixelNumber(itemRecord?.imageHeight, 160);
|
|
2639
|
-
const
|
|
2650
|
+
const itemPositionX = parseOptionalPercentNumber(itemRecord?.imagePositionX);
|
|
2651
|
+
const itemPositionY = parseOptionalPercentNumber(itemRecord?.imagePositionY);
|
|
2640
2652
|
const imageStyle = getImagePresentationStyle({
|
|
2641
2653
|
cornerStyle: normalizeImageCornerStyle(itemRecord?.imageCornerStyle),
|
|
2642
2654
|
fit: normalizeImageFit(itemRecord?.imageFit),
|
|
2643
2655
|
position: normalizeImagePosition(itemRecord?.imagePosition),
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
positionY: parsePercentNumber(itemRecord?.imagePositionY, 50)
|
|
2647
|
-
} : {}
|
|
2656
|
+
positionX: itemPositionX,
|
|
2657
|
+
positionY: itemPositionY
|
|
2648
2658
|
});
|
|
2649
2659
|
const isItemSelected = selectedIndex === index && selectedItemIndex === itemIndex;
|
|
2650
2660
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
@@ -4039,13 +4049,9 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
4039
4049
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
4040
4050
|
"select",
|
|
4041
4051
|
{
|
|
4042
|
-
onChange: (event) =>
|
|
4043
|
-
selectedIndex ?? 0,
|
|
4044
|
-
|
|
4045
|
-
itemIndex,
|
|
4046
|
-
"imagePosition",
|
|
4047
|
-
event.target.value
|
|
4048
|
-
),
|
|
4052
|
+
onChange: (event) => {
|
|
4053
|
+
updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imagePosition", event.target.value);
|
|
4054
|
+
},
|
|
4049
4055
|
style: sidebarInputStyle,
|
|
4050
4056
|
value: (() => {
|
|
4051
4057
|
const fit = normalizeImageFit(item.imageFit);
|
|
@@ -4495,13 +4501,9 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
4495
4501
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
4496
4502
|
"select",
|
|
4497
4503
|
{
|
|
4498
|
-
onChange: (event) =>
|
|
4499
|
-
selectedIndex ?? 0,
|
|
4500
|
-
|
|
4501
|
-
itemIndex,
|
|
4502
|
-
"imagePosition",
|
|
4503
|
-
event.target.value
|
|
4504
|
-
),
|
|
4504
|
+
onChange: (event) => {
|
|
4505
|
+
updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imagePosition", event.target.value);
|
|
4506
|
+
},
|
|
4505
4507
|
style: sidebarInputStyle,
|
|
4506
4508
|
value: (() => {
|
|
4507
4509
|
const fit = normalizeImageFit(item.imageFit);
|
|
@@ -4868,13 +4870,9 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
4868
4870
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
4869
4871
|
"select",
|
|
4870
4872
|
{
|
|
4871
|
-
onChange: (event) =>
|
|
4872
|
-
selectedIndex ?? 0,
|
|
4873
|
-
|
|
4874
|
-
itemIndex,
|
|
4875
|
-
"imagePosition",
|
|
4876
|
-
event.target.value
|
|
4877
|
-
),
|
|
4873
|
+
onChange: (event) => {
|
|
4874
|
+
updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imagePosition", event.target.value);
|
|
4875
|
+
},
|
|
4878
4876
|
style: sidebarInputStyle,
|
|
4879
4877
|
value: (() => {
|
|
4880
4878
|
const fit = normalizeImageFit(item.imageFit);
|
|
@@ -472,29 +472,31 @@ var heroHeightMap = {
|
|
|
472
472
|
var normalizeImageFit = (value) => normalizeHeroImageFit(value);
|
|
473
473
|
var normalizeImageCornerStyle = (value, legacyFitValue) => normalizeHeroImageCornerStyle(value, legacyFitValue);
|
|
474
474
|
var normalizeImagePosition = (value) => normalizeHeroImagePosition(value);
|
|
475
|
-
var
|
|
475
|
+
var positionPercent = (value, fit) => {
|
|
476
476
|
const resolved = fit === "cover" && (value === "left" || value === "right") ? "center" : value;
|
|
477
477
|
switch (resolved) {
|
|
478
478
|
case "top":
|
|
479
|
-
return
|
|
479
|
+
return { x: 50, y: 0 };
|
|
480
480
|
case "bottom":
|
|
481
|
-
return
|
|
481
|
+
return { x: 50, y: 100 };
|
|
482
482
|
case "left":
|
|
483
|
-
return
|
|
483
|
+
return { x: 0, y: 50 };
|
|
484
484
|
case "right":
|
|
485
|
-
return
|
|
485
|
+
return { x: 100, y: 50 };
|
|
486
486
|
default:
|
|
487
|
-
return
|
|
487
|
+
return { x: 50, y: 50 };
|
|
488
488
|
}
|
|
489
489
|
};
|
|
490
490
|
var getImagePresentationStyle = (options) => {
|
|
491
|
-
const
|
|
492
|
-
const
|
|
493
|
-
const
|
|
491
|
+
const fit = options.fit || "cover";
|
|
492
|
+
const base = positionPercent(options.position || "center", fit);
|
|
493
|
+
const x = typeof options.positionX === "number" && Number.isFinite(options.positionX) ? Math.max(0, Math.min(100, options.positionX)) : base.x;
|
|
494
|
+
const y = typeof options.positionY === "number" && Number.isFinite(options.positionY) ? Math.max(0, Math.min(100, options.positionY)) : base.y;
|
|
494
495
|
return {
|
|
495
496
|
borderRadius: options.cornerStyle === "square" ? 0 : `${options.roundedRadius ?? 12}px`,
|
|
496
|
-
objectFit:
|
|
497
|
-
|
|
497
|
+
objectFit: fit,
|
|
498
|
+
// Always use percent positioning so presets behave identically with/without custom axis overrides.
|
|
499
|
+
objectPosition: `${x}% ${y}%`
|
|
498
500
|
};
|
|
499
501
|
};
|
|
500
502
|
function cloneBlockLayout(layout) {
|
|
@@ -787,6 +789,18 @@ function parsePixelNumber(value, fallback) {
|
|
|
787
789
|
function parsePercentNumber(value, fallback) {
|
|
788
790
|
return Math.max(0, Math.min(100, parsePixelNumber(value, fallback)));
|
|
789
791
|
}
|
|
792
|
+
function parseOptionalPercentNumber(value) {
|
|
793
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
794
|
+
return Math.max(0, Math.min(100, value));
|
|
795
|
+
}
|
|
796
|
+
if (typeof value === "string") {
|
|
797
|
+
const parsed = Number(value);
|
|
798
|
+
if (Number.isFinite(parsed)) {
|
|
799
|
+
return Math.max(0, Math.min(100, parsed));
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
return void 0;
|
|
803
|
+
}
|
|
790
804
|
var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
791
805
|
const contentWidthRaw = normalizeText(block.contentWidth, defaultSectionStyle.contentWidth);
|
|
792
806
|
const sectionPaddingRaw = normalizeText(block.sectionPaddingY, defaultSectionStyle.sectionPaddingY);
|
|
@@ -2215,15 +2229,14 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
2215
2229
|
const itemRecord = item;
|
|
2216
2230
|
const itemMedia = resolveMedia(itemRecord?.media);
|
|
2217
2231
|
const itemImageHeight = parsePixelNumber(itemRecord?.imageHeight, 120);
|
|
2218
|
-
const
|
|
2232
|
+
const itemPositionX = parseOptionalPercentNumber(itemRecord?.imagePositionX);
|
|
2233
|
+
const itemPositionY = parseOptionalPercentNumber(itemRecord?.imagePositionY);
|
|
2219
2234
|
const itemImageStyle = getImagePresentationStyle({
|
|
2220
2235
|
cornerStyle: normalizeImageCornerStyle(itemRecord?.imageCornerStyle),
|
|
2221
2236
|
fit: normalizeImageFit(itemRecord?.imageFit),
|
|
2222
2237
|
position: normalizeImagePosition(itemRecord?.imagePosition),
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
positionY: parsePercentNumber(itemRecord?.imagePositionY, 50)
|
|
2226
|
-
} : {}
|
|
2238
|
+
positionX: itemPositionX,
|
|
2239
|
+
positionY: itemPositionY
|
|
2227
2240
|
});
|
|
2228
2241
|
const isItemSelected = selectedIndex === index && selectedItemIndex === itemIndex;
|
|
2229
2242
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2314,15 +2327,14 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
2314
2327
|
const itemRecord = item;
|
|
2315
2328
|
const itemMedia = resolveMedia(itemRecord?.media);
|
|
2316
2329
|
const itemImageHeight = parsePixelNumber(itemRecord?.imageHeight, 120);
|
|
2317
|
-
const
|
|
2330
|
+
const itemPositionX = parseOptionalPercentNumber(itemRecord?.imagePositionX);
|
|
2331
|
+
const itemPositionY = parseOptionalPercentNumber(itemRecord?.imagePositionY);
|
|
2318
2332
|
const itemImageStyle = getImagePresentationStyle({
|
|
2319
2333
|
cornerStyle: normalizeImageCornerStyle(itemRecord?.imageCornerStyle),
|
|
2320
2334
|
fit: normalizeImageFit(itemRecord?.imageFit),
|
|
2321
2335
|
position: normalizeImagePosition(itemRecord?.imagePosition),
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
positionY: parsePercentNumber(itemRecord?.imagePositionY, 50)
|
|
2325
|
-
} : {}
|
|
2336
|
+
positionX: itemPositionX,
|
|
2337
|
+
positionY: itemPositionY
|
|
2326
2338
|
});
|
|
2327
2339
|
const isItemSelected = selectedIndex === index && selectedItemIndex === itemIndex;
|
|
2328
2340
|
return /* @__PURE__ */ jsx(
|
|
@@ -2515,15 +2527,14 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
2515
2527
|
const itemRecord = item;
|
|
2516
2528
|
const media = resolveMedia(itemRecord?.media);
|
|
2517
2529
|
const imageHeight = parsePixelNumber(itemRecord?.imageHeight, 54);
|
|
2518
|
-
const
|
|
2530
|
+
const itemPositionX = parseOptionalPercentNumber(itemRecord?.imagePositionX);
|
|
2531
|
+
const itemPositionY = parseOptionalPercentNumber(itemRecord?.imagePositionY);
|
|
2519
2532
|
const imageStyle = getImagePresentationStyle({
|
|
2520
2533
|
cornerStyle: normalizeImageCornerStyle(itemRecord?.imageCornerStyle),
|
|
2521
2534
|
fit: normalizeImageFit(itemRecord?.imageFit),
|
|
2522
2535
|
position: normalizeImagePosition(itemRecord?.imagePosition),
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
positionY: parsePercentNumber(itemRecord?.imagePositionY, 50)
|
|
2526
|
-
} : {},
|
|
2536
|
+
positionX: itemPositionX,
|
|
2537
|
+
positionY: itemPositionY,
|
|
2527
2538
|
roundedRadius: 10
|
|
2528
2539
|
});
|
|
2529
2540
|
const isItemSelected = selectedIndex === index && selectedItemIndex === itemIndex;
|
|
@@ -2608,15 +2619,14 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
2608
2619
|
const beforeMedia = resolveMedia(itemRecord?.beforeMedia);
|
|
2609
2620
|
const afterMedia = resolveMedia(itemRecord?.afterMedia);
|
|
2610
2621
|
const imageHeight = parsePixelNumber(itemRecord?.imageHeight, 160);
|
|
2611
|
-
const
|
|
2622
|
+
const itemPositionX = parseOptionalPercentNumber(itemRecord?.imagePositionX);
|
|
2623
|
+
const itemPositionY = parseOptionalPercentNumber(itemRecord?.imagePositionY);
|
|
2612
2624
|
const imageStyle = getImagePresentationStyle({
|
|
2613
2625
|
cornerStyle: normalizeImageCornerStyle(itemRecord?.imageCornerStyle),
|
|
2614
2626
|
fit: normalizeImageFit(itemRecord?.imageFit),
|
|
2615
2627
|
position: normalizeImagePosition(itemRecord?.imagePosition),
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
positionY: parsePercentNumber(itemRecord?.imagePositionY, 50)
|
|
2619
|
-
} : {}
|
|
2628
|
+
positionX: itemPositionX,
|
|
2629
|
+
positionY: itemPositionY
|
|
2620
2630
|
});
|
|
2621
2631
|
const isItemSelected = selectedIndex === index && selectedItemIndex === itemIndex;
|
|
2622
2632
|
return /* @__PURE__ */ jsxs(
|
|
@@ -4011,13 +4021,9 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
4011
4021
|
/* @__PURE__ */ jsxs(
|
|
4012
4022
|
"select",
|
|
4013
4023
|
{
|
|
4014
|
-
onChange: (event) =>
|
|
4015
|
-
selectedIndex ?? 0,
|
|
4016
|
-
|
|
4017
|
-
itemIndex,
|
|
4018
|
-
"imagePosition",
|
|
4019
|
-
event.target.value
|
|
4020
|
-
),
|
|
4024
|
+
onChange: (event) => {
|
|
4025
|
+
updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imagePosition", event.target.value);
|
|
4026
|
+
},
|
|
4021
4027
|
style: sidebarInputStyle,
|
|
4022
4028
|
value: (() => {
|
|
4023
4029
|
const fit = normalizeImageFit(item.imageFit);
|
|
@@ -4467,13 +4473,9 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
4467
4473
|
/* @__PURE__ */ jsxs(
|
|
4468
4474
|
"select",
|
|
4469
4475
|
{
|
|
4470
|
-
onChange: (event) =>
|
|
4471
|
-
selectedIndex ?? 0,
|
|
4472
|
-
|
|
4473
|
-
itemIndex,
|
|
4474
|
-
"imagePosition",
|
|
4475
|
-
event.target.value
|
|
4476
|
-
),
|
|
4476
|
+
onChange: (event) => {
|
|
4477
|
+
updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imagePosition", event.target.value);
|
|
4478
|
+
},
|
|
4477
4479
|
style: sidebarInputStyle,
|
|
4478
4480
|
value: (() => {
|
|
4479
4481
|
const fit = normalizeImageFit(item.imageFit);
|
|
@@ -4840,13 +4842,9 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
4840
4842
|
/* @__PURE__ */ jsxs(
|
|
4841
4843
|
"select",
|
|
4842
4844
|
{
|
|
4843
|
-
onChange: (event) =>
|
|
4844
|
-
selectedIndex ?? 0,
|
|
4845
|
-
|
|
4846
|
-
itemIndex,
|
|
4847
|
-
"imagePosition",
|
|
4848
|
-
event.target.value
|
|
4849
|
-
),
|
|
4845
|
+
onChange: (event) => {
|
|
4846
|
+
updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imagePosition", event.target.value);
|
|
4847
|
+
},
|
|
4850
4848
|
style: sidebarInputStyle,
|
|
4851
4849
|
value: (() => {
|
|
4852
4850
|
const fit = normalizeImageFit(item.imageFit);
|