@orion-studios/payload-studio 0.5.0-beta.33 → 0.5.0-beta.34

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 CHANGED
@@ -1,22 +1,22 @@
1
1
  import {
2
- blocks_exports
3
- } from "./chunk-DUPYIJJH.mjs";
2
+ admin_app_exports
3
+ } from "./chunk-XVH5SCBD.mjs";
4
4
  import {
5
5
  admin_exports
6
6
  } from "./chunk-7IGLXLUB.mjs";
7
7
  import {
8
- admin_app_exports
9
- } from "./chunk-XVH5SCBD.mjs";
8
+ blocks_exports
9
+ } from "./chunk-DUPYIJJH.mjs";
10
10
  import {
11
11
  nextjs_exports
12
- } from "./chunk-RZZFLVWG.mjs";
12
+ } from "./chunk-GPQPDEB5.mjs";
13
+ import {
14
+ studio_exports
15
+ } from "./chunk-N67KVM2S.mjs";
13
16
  import {
14
17
  studio_pages_exports
15
18
  } from "./chunk-QW24Y4UH.mjs";
16
19
  import "./chunk-SIL2J5MF.mjs";
17
- import {
18
- studio_exports
19
- } from "./chunk-N67KVM2S.mjs";
20
20
  import "./chunk-6BWS3CLP.mjs";
21
21
  export {
22
22
  admin_exports as admin,
@@ -4,10 +4,10 @@ import {
4
4
  createPayloadClient,
5
5
  createSiteQueries,
6
6
  resolveMedia
7
- } from "../chunk-RZZFLVWG.mjs";
7
+ } from "../chunk-GPQPDEB5.mjs";
8
+ import "../chunk-N67KVM2S.mjs";
8
9
  import "../chunk-QW24Y4UH.mjs";
9
10
  import "../chunk-SIL2J5MF.mjs";
10
- import "../chunk-N67KVM2S.mjs";
11
11
  import "../chunk-6BWS3CLP.mjs";
12
12
  export {
13
13
  WEBSITE_CONTENT_TAG,
@@ -500,8 +500,9 @@ 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 imageObjectPosition = (value) => {
504
- switch (value) {
503
+ var imageObjectPosition = (value, fit = "cover") => {
504
+ const resolved = fit === "cover" && (value === "left" || value === "right") ? "center" : value;
505
+ switch (resolved) {
505
506
  case "top":
506
507
  return "center top";
507
508
  case "bottom":
@@ -521,7 +522,7 @@ var getImagePresentationStyle = (options) => {
521
522
  return {
522
523
  borderRadius: options.cornerStyle === "square" ? 0 : `${options.roundedRadius ?? 12}px`,
523
524
  objectFit: options.fit || "cover",
524
- objectPosition: hasCustomPosition ? `${x}% ${y}%` : imageObjectPosition(options.position || "center")
525
+ objectPosition: hasCustomPosition ? `${x}% ${y}%` : imageObjectPosition(options.position || "center", options.fit || "cover")
525
526
  };
526
527
  };
527
528
  function cloneBlockLayout(layout) {
@@ -1788,8 +1789,12 @@ function BuilderPageEditor({ initialDoc, pageID }) {
1788
1789
  setExpandedItemIndex((current) => current === itemIndex ? null : itemIndex);
1789
1790
  openSidebarPanel("selected");
1790
1791
  };
1791
- const defaultItemFocus = (value) => {
1792
+ const defaultItemFocus = (value, fitValue) => {
1792
1793
  const normalized = normalizeImagePosition(value);
1794
+ const fit = normalizeImageFit(fitValue);
1795
+ if (fit === "cover" && (normalized === "left" || normalized === "right")) {
1796
+ return { x: 50, y: 50 };
1797
+ }
1793
1798
  switch (normalized) {
1794
1799
  case "top":
1795
1800
  return { x: 50, y: 0 };
@@ -3989,13 +3994,16 @@ function BuilderPageEditor({ initialDoc, pageID }) {
3989
3994
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
3990
3995
  "select",
3991
3996
  {
3992
- onChange: (event) => updateArrayItemField(
3993
- selectedIndex ?? 0,
3994
- "items",
3995
- itemIndex,
3996
- "imageFit",
3997
- event.target.value
3998
- ),
3997
+ onChange: (event) => {
3998
+ const nextFit = event.target.value;
3999
+ updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imageFit", nextFit);
4000
+ if (nextFit === "cover") {
4001
+ const pos = normalizeImagePosition(item.imagePosition);
4002
+ if (pos === "left" || pos === "right") {
4003
+ updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imagePosition", "center");
4004
+ }
4005
+ }
4006
+ },
3999
4007
  style: sidebarInputStyle,
4000
4008
  value: normalizeImageFit(item.imageFit),
4001
4009
  children: [
@@ -4039,19 +4047,28 @@ function BuilderPageEditor({ initialDoc, pageID }) {
4039
4047
  event.target.value
4040
4048
  ),
4041
4049
  style: sidebarInputStyle,
4042
- value: normalizeImagePosition(item.imagePosition),
4050
+ value: (() => {
4051
+ const fit = normalizeImageFit(item.imageFit);
4052
+ const pos = normalizeImagePosition(item.imagePosition);
4053
+ if (fit === "cover" && (pos === "left" || pos === "right")) {
4054
+ return "center";
4055
+ }
4056
+ return pos;
4057
+ })(),
4043
4058
  children: [
4044
4059
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "center", children: "Center" }),
4045
4060
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "top", children: "Top" }),
4046
4061
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "bottom", children: "Bottom" }),
4047
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "left", children: "Left" }),
4048
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "right", children: "Right" })
4062
+ normalizeImageFit(item.imageFit) !== "cover" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
4063
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "left", children: "Left" }),
4064
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "right", children: "Right" })
4065
+ ] }) : null
4049
4066
  ]
4050
4067
  }
4051
4068
  )
4052
4069
  ] }),
4053
4070
  (() => {
4054
- const fallbackFocus = defaultItemFocus(item.imagePosition);
4071
+ const fallbackFocus = defaultItemFocus(item.imagePosition, item.imageFit);
4055
4072
  const focusX = parsePercentNumber(item.imagePositionX, fallbackFocus.x);
4056
4073
  const focusY = parsePercentNumber(item.imagePositionY, fallbackFocus.y);
4057
4074
  const hasCustomFocus = typeof item.imagePositionX === "number" || typeof item.imagePositionX === "string" || typeof item.imagePositionY === "number" || typeof item.imagePositionY === "string";
@@ -4433,13 +4450,16 @@ function BuilderPageEditor({ initialDoc, pageID }) {
4433
4450
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
4434
4451
  "select",
4435
4452
  {
4436
- onChange: (event) => updateArrayItemField(
4437
- selectedIndex ?? 0,
4438
- "items",
4439
- itemIndex,
4440
- "imageFit",
4441
- event.target.value
4442
- ),
4453
+ onChange: (event) => {
4454
+ const nextFit = event.target.value;
4455
+ updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imageFit", nextFit);
4456
+ if (nextFit === "cover") {
4457
+ const pos = normalizeImagePosition(item.imagePosition);
4458
+ if (pos === "left" || pos === "right") {
4459
+ updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imagePosition", "center");
4460
+ }
4461
+ }
4462
+ },
4443
4463
  style: sidebarInputStyle,
4444
4464
  value: normalizeImageFit(item.imageFit),
4445
4465
  children: [
@@ -4483,19 +4503,28 @@ function BuilderPageEditor({ initialDoc, pageID }) {
4483
4503
  event.target.value
4484
4504
  ),
4485
4505
  style: sidebarInputStyle,
4486
- value: normalizeImagePosition(item.imagePosition),
4506
+ value: (() => {
4507
+ const fit = normalizeImageFit(item.imageFit);
4508
+ const pos = normalizeImagePosition(item.imagePosition);
4509
+ if (fit === "cover" && (pos === "left" || pos === "right")) {
4510
+ return "center";
4511
+ }
4512
+ return pos;
4513
+ })(),
4487
4514
  children: [
4488
4515
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "center", children: "Center" }),
4489
4516
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "top", children: "Top" }),
4490
4517
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "bottom", children: "Bottom" }),
4491
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "left", children: "Left" }),
4492
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "right", children: "Right" })
4518
+ normalizeImageFit(item.imageFit) !== "cover" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
4519
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "left", children: "Left" }),
4520
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "right", children: "Right" })
4521
+ ] }) : null
4493
4522
  ]
4494
4523
  }
4495
4524
  )
4496
4525
  ] }),
4497
4526
  (() => {
4498
- const fallbackFocus = defaultItemFocus(item.imagePosition);
4527
+ const fallbackFocus = defaultItemFocus(item.imagePosition, item.imageFit);
4499
4528
  const focusX = parsePercentNumber(item.imagePositionX, fallbackFocus.x);
4500
4529
  const focusY = parsePercentNumber(item.imagePositionY, fallbackFocus.y);
4501
4530
  const hasCustomFocus = typeof item.imagePositionX === "number" || typeof item.imagePositionX === "string" || typeof item.imagePositionY === "number" || typeof item.imagePositionY === "string";
@@ -4794,13 +4823,16 @@ function BuilderPageEditor({ initialDoc, pageID }) {
4794
4823
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
4795
4824
  "select",
4796
4825
  {
4797
- onChange: (event) => updateArrayItemField(
4798
- selectedIndex ?? 0,
4799
- "items",
4800
- itemIndex,
4801
- "imageFit",
4802
- event.target.value
4803
- ),
4826
+ onChange: (event) => {
4827
+ const nextFit = event.target.value;
4828
+ updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imageFit", nextFit);
4829
+ if (nextFit === "cover") {
4830
+ const pos = normalizeImagePosition(item.imagePosition);
4831
+ if (pos === "left" || pos === "right") {
4832
+ updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imagePosition", "center");
4833
+ }
4834
+ }
4835
+ },
4804
4836
  style: sidebarInputStyle,
4805
4837
  value: normalizeImageFit(item.imageFit),
4806
4838
  children: [
@@ -4844,19 +4876,28 @@ function BuilderPageEditor({ initialDoc, pageID }) {
4844
4876
  event.target.value
4845
4877
  ),
4846
4878
  style: sidebarInputStyle,
4847
- value: normalizeImagePosition(item.imagePosition),
4879
+ value: (() => {
4880
+ const fit = normalizeImageFit(item.imageFit);
4881
+ const pos = normalizeImagePosition(item.imagePosition);
4882
+ if (fit === "cover" && (pos === "left" || pos === "right")) {
4883
+ return "center";
4884
+ }
4885
+ return pos;
4886
+ })(),
4848
4887
  children: [
4849
4888
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "center", children: "Center" }),
4850
4889
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "top", children: "Top" }),
4851
4890
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "bottom", children: "Bottom" }),
4852
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "left", children: "Left" }),
4853
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "right", children: "Right" })
4891
+ normalizeImageFit(item.imageFit) !== "cover" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
4892
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "left", children: "Left" }),
4893
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "right", children: "Right" })
4894
+ ] }) : null
4854
4895
  ]
4855
4896
  }
4856
4897
  )
4857
4898
  ] }),
4858
4899
  (() => {
4859
- const fallbackFocus = defaultItemFocus(item.imagePosition);
4900
+ const fallbackFocus = defaultItemFocus(item.imagePosition, item.imageFit);
4860
4901
  const focusX = parsePercentNumber(item.imagePositionX, fallbackFocus.x);
4861
4902
  const focusY = parsePercentNumber(item.imagePositionY, fallbackFocus.y);
4862
4903
  const hasCustomFocus = typeof item.imagePositionX === "number" || typeof item.imagePositionX === "string" || typeof item.imagePositionY === "number" || typeof item.imagePositionY === "string";
@@ -472,8 +472,9 @@ 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 imageObjectPosition = (value) => {
476
- switch (value) {
475
+ var imageObjectPosition = (value, fit = "cover") => {
476
+ const resolved = fit === "cover" && (value === "left" || value === "right") ? "center" : value;
477
+ switch (resolved) {
477
478
  case "top":
478
479
  return "center top";
479
480
  case "bottom":
@@ -493,7 +494,7 @@ var getImagePresentationStyle = (options) => {
493
494
  return {
494
495
  borderRadius: options.cornerStyle === "square" ? 0 : `${options.roundedRadius ?? 12}px`,
495
496
  objectFit: options.fit || "cover",
496
- objectPosition: hasCustomPosition ? `${x}% ${y}%` : imageObjectPosition(options.position || "center")
497
+ objectPosition: hasCustomPosition ? `${x}% ${y}%` : imageObjectPosition(options.position || "center", options.fit || "cover")
497
498
  };
498
499
  };
499
500
  function cloneBlockLayout(layout) {
@@ -1760,8 +1761,12 @@ function BuilderPageEditor({ initialDoc, pageID }) {
1760
1761
  setExpandedItemIndex((current) => current === itemIndex ? null : itemIndex);
1761
1762
  openSidebarPanel("selected");
1762
1763
  };
1763
- const defaultItemFocus = (value) => {
1764
+ const defaultItemFocus = (value, fitValue) => {
1764
1765
  const normalized = normalizeImagePosition(value);
1766
+ const fit = normalizeImageFit(fitValue);
1767
+ if (fit === "cover" && (normalized === "left" || normalized === "right")) {
1768
+ return { x: 50, y: 50 };
1769
+ }
1765
1770
  switch (normalized) {
1766
1771
  case "top":
1767
1772
  return { x: 50, y: 0 };
@@ -3961,13 +3966,16 @@ function BuilderPageEditor({ initialDoc, pageID }) {
3961
3966
  /* @__PURE__ */ jsxs(
3962
3967
  "select",
3963
3968
  {
3964
- onChange: (event) => updateArrayItemField(
3965
- selectedIndex ?? 0,
3966
- "items",
3967
- itemIndex,
3968
- "imageFit",
3969
- event.target.value
3970
- ),
3969
+ onChange: (event) => {
3970
+ const nextFit = event.target.value;
3971
+ updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imageFit", nextFit);
3972
+ if (nextFit === "cover") {
3973
+ const pos = normalizeImagePosition(item.imagePosition);
3974
+ if (pos === "left" || pos === "right") {
3975
+ updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imagePosition", "center");
3976
+ }
3977
+ }
3978
+ },
3971
3979
  style: sidebarInputStyle,
3972
3980
  value: normalizeImageFit(item.imageFit),
3973
3981
  children: [
@@ -4011,19 +4019,28 @@ function BuilderPageEditor({ initialDoc, pageID }) {
4011
4019
  event.target.value
4012
4020
  ),
4013
4021
  style: sidebarInputStyle,
4014
- value: normalizeImagePosition(item.imagePosition),
4022
+ value: (() => {
4023
+ const fit = normalizeImageFit(item.imageFit);
4024
+ const pos = normalizeImagePosition(item.imagePosition);
4025
+ if (fit === "cover" && (pos === "left" || pos === "right")) {
4026
+ return "center";
4027
+ }
4028
+ return pos;
4029
+ })(),
4015
4030
  children: [
4016
4031
  /* @__PURE__ */ jsx("option", { value: "center", children: "Center" }),
4017
4032
  /* @__PURE__ */ jsx("option", { value: "top", children: "Top" }),
4018
4033
  /* @__PURE__ */ jsx("option", { value: "bottom", children: "Bottom" }),
4019
- /* @__PURE__ */ jsx("option", { value: "left", children: "Left" }),
4020
- /* @__PURE__ */ jsx("option", { value: "right", children: "Right" })
4034
+ normalizeImageFit(item.imageFit) !== "cover" ? /* @__PURE__ */ jsxs(Fragment, { children: [
4035
+ /* @__PURE__ */ jsx("option", { value: "left", children: "Left" }),
4036
+ /* @__PURE__ */ jsx("option", { value: "right", children: "Right" })
4037
+ ] }) : null
4021
4038
  ]
4022
4039
  }
4023
4040
  )
4024
4041
  ] }),
4025
4042
  (() => {
4026
- const fallbackFocus = defaultItemFocus(item.imagePosition);
4043
+ const fallbackFocus = defaultItemFocus(item.imagePosition, item.imageFit);
4027
4044
  const focusX = parsePercentNumber(item.imagePositionX, fallbackFocus.x);
4028
4045
  const focusY = parsePercentNumber(item.imagePositionY, fallbackFocus.y);
4029
4046
  const hasCustomFocus = typeof item.imagePositionX === "number" || typeof item.imagePositionX === "string" || typeof item.imagePositionY === "number" || typeof item.imagePositionY === "string";
@@ -4405,13 +4422,16 @@ function BuilderPageEditor({ initialDoc, pageID }) {
4405
4422
  /* @__PURE__ */ jsxs(
4406
4423
  "select",
4407
4424
  {
4408
- onChange: (event) => updateArrayItemField(
4409
- selectedIndex ?? 0,
4410
- "items",
4411
- itemIndex,
4412
- "imageFit",
4413
- event.target.value
4414
- ),
4425
+ onChange: (event) => {
4426
+ const nextFit = event.target.value;
4427
+ updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imageFit", nextFit);
4428
+ if (nextFit === "cover") {
4429
+ const pos = normalizeImagePosition(item.imagePosition);
4430
+ if (pos === "left" || pos === "right") {
4431
+ updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imagePosition", "center");
4432
+ }
4433
+ }
4434
+ },
4415
4435
  style: sidebarInputStyle,
4416
4436
  value: normalizeImageFit(item.imageFit),
4417
4437
  children: [
@@ -4455,19 +4475,28 @@ function BuilderPageEditor({ initialDoc, pageID }) {
4455
4475
  event.target.value
4456
4476
  ),
4457
4477
  style: sidebarInputStyle,
4458
- value: normalizeImagePosition(item.imagePosition),
4478
+ value: (() => {
4479
+ const fit = normalizeImageFit(item.imageFit);
4480
+ const pos = normalizeImagePosition(item.imagePosition);
4481
+ if (fit === "cover" && (pos === "left" || pos === "right")) {
4482
+ return "center";
4483
+ }
4484
+ return pos;
4485
+ })(),
4459
4486
  children: [
4460
4487
  /* @__PURE__ */ jsx("option", { value: "center", children: "Center" }),
4461
4488
  /* @__PURE__ */ jsx("option", { value: "top", children: "Top" }),
4462
4489
  /* @__PURE__ */ jsx("option", { value: "bottom", children: "Bottom" }),
4463
- /* @__PURE__ */ jsx("option", { value: "left", children: "Left" }),
4464
- /* @__PURE__ */ jsx("option", { value: "right", children: "Right" })
4490
+ normalizeImageFit(item.imageFit) !== "cover" ? /* @__PURE__ */ jsxs(Fragment, { children: [
4491
+ /* @__PURE__ */ jsx("option", { value: "left", children: "Left" }),
4492
+ /* @__PURE__ */ jsx("option", { value: "right", children: "Right" })
4493
+ ] }) : null
4465
4494
  ]
4466
4495
  }
4467
4496
  )
4468
4497
  ] }),
4469
4498
  (() => {
4470
- const fallbackFocus = defaultItemFocus(item.imagePosition);
4499
+ const fallbackFocus = defaultItemFocus(item.imagePosition, item.imageFit);
4471
4500
  const focusX = parsePercentNumber(item.imagePositionX, fallbackFocus.x);
4472
4501
  const focusY = parsePercentNumber(item.imagePositionY, fallbackFocus.y);
4473
4502
  const hasCustomFocus = typeof item.imagePositionX === "number" || typeof item.imagePositionX === "string" || typeof item.imagePositionY === "number" || typeof item.imagePositionY === "string";
@@ -4766,13 +4795,16 @@ function BuilderPageEditor({ initialDoc, pageID }) {
4766
4795
  /* @__PURE__ */ jsxs(
4767
4796
  "select",
4768
4797
  {
4769
- onChange: (event) => updateArrayItemField(
4770
- selectedIndex ?? 0,
4771
- "items",
4772
- itemIndex,
4773
- "imageFit",
4774
- event.target.value
4775
- ),
4798
+ onChange: (event) => {
4799
+ const nextFit = event.target.value;
4800
+ updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imageFit", nextFit);
4801
+ if (nextFit === "cover") {
4802
+ const pos = normalizeImagePosition(item.imagePosition);
4803
+ if (pos === "left" || pos === "right") {
4804
+ updateArrayItemField(selectedIndex ?? 0, "items", itemIndex, "imagePosition", "center");
4805
+ }
4806
+ }
4807
+ },
4776
4808
  style: sidebarInputStyle,
4777
4809
  value: normalizeImageFit(item.imageFit),
4778
4810
  children: [
@@ -4816,19 +4848,28 @@ function BuilderPageEditor({ initialDoc, pageID }) {
4816
4848
  event.target.value
4817
4849
  ),
4818
4850
  style: sidebarInputStyle,
4819
- value: normalizeImagePosition(item.imagePosition),
4851
+ value: (() => {
4852
+ const fit = normalizeImageFit(item.imageFit);
4853
+ const pos = normalizeImagePosition(item.imagePosition);
4854
+ if (fit === "cover" && (pos === "left" || pos === "right")) {
4855
+ return "center";
4856
+ }
4857
+ return pos;
4858
+ })(),
4820
4859
  children: [
4821
4860
  /* @__PURE__ */ jsx("option", { value: "center", children: "Center" }),
4822
4861
  /* @__PURE__ */ jsx("option", { value: "top", children: "Top" }),
4823
4862
  /* @__PURE__ */ jsx("option", { value: "bottom", children: "Bottom" }),
4824
- /* @__PURE__ */ jsx("option", { value: "left", children: "Left" }),
4825
- /* @__PURE__ */ jsx("option", { value: "right", children: "Right" })
4863
+ normalizeImageFit(item.imageFit) !== "cover" ? /* @__PURE__ */ jsxs(Fragment, { children: [
4864
+ /* @__PURE__ */ jsx("option", { value: "left", children: "Left" }),
4865
+ /* @__PURE__ */ jsx("option", { value: "right", children: "Right" })
4866
+ ] }) : null
4826
4867
  ]
4827
4868
  }
4828
4869
  )
4829
4870
  ] }),
4830
4871
  (() => {
4831
- const fallbackFocus = defaultItemFocus(item.imagePosition);
4872
+ const fallbackFocus = defaultItemFocus(item.imagePosition, item.imageFit);
4832
4873
  const focusX = parsePercentNumber(item.imagePositionX, fallbackFocus.x);
4833
4874
  const focusY = parsePercentNumber(item.imagePositionY, fallbackFocus.y);
4834
4875
  const hasCustomFocus = typeof item.imagePositionX === "number" || typeof item.imagePositionX === "string" || typeof item.imagePositionY === "number" || typeof item.imagePositionY === "string";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-studios/payload-studio",
3
- "version": "0.5.0-beta.33",
3
+ "version": "0.5.0-beta.34",
4
4
  "description": "Unified Payload CMS toolkit for Orion Studios",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -1,9 +1,9 @@
1
- import {
2
- studioDocumentToLayout
3
- } from "./chunk-QW24Y4UH.mjs";
4
1
  import {
5
2
  assertStudioDocumentV1
6
3
  } from "./chunk-N67KVM2S.mjs";
4
+ import {
5
+ studioDocumentToLayout
6
+ } from "./chunk-QW24Y4UH.mjs";
7
7
  import {
8
8
  __export
9
9
  } from "./chunk-6BWS3CLP.mjs";