@ozguraltan/strapi-content-input 1.0.21 → 1.0.22

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.
Files changed (24) hide show
  1. package/README.md +33 -7
  2. package/dist/admin/{AnalyticsHubPage-0p0Mx4AU.js → AnalyticsHubPage-B1_chQkG.js} +2 -2
  3. package/dist/admin/{AnalyticsHubPage-DsrcGI_Y.mjs → AnalyticsHubPage-DUj3D2kA.mjs} +2 -2
  4. package/dist/admin/{ContentInputField-CHXrzvE-.mjs → ContentInputField-BrtpTCDd.mjs} +365 -173
  5. package/dist/admin/{ContentInputField-7rWLSx_7.js → ContentInputField-CQFQxxgm.js} +365 -173
  6. package/dist/admin/{SurveyWidgetEditor-BmgYQaQS.js → SurveyWidgetEditor-C5Uvyf_h.js} +81 -31
  7. package/dist/admin/{SurveyWidgetEditor-BVN6X_3G.mjs → SurveyWidgetEditor-DGSwgTzR.mjs} +81 -31
  8. package/dist/admin/{index-hFIuYqu5.mjs → index-Dc7AFLOj.mjs} +2 -2
  9. package/dist/admin/{index-CZAwXCFH.js → index-i0NfSYto.js} +2 -2
  10. package/dist/admin/index.js +1 -1
  11. package/dist/admin/index.mjs +1 -1
  12. package/dist/admin/src/components/common/CIImageSettingsControl.d.ts +17 -0
  13. package/dist/admin/src/components/widgets/CustomCardWidgetEditor.d.ts +1 -0
  14. package/dist/admin/src/components/widgets/HeroSliderStage.d.ts +3 -0
  15. package/dist/admin/src/core/canvasClasses.d.ts +1 -0
  16. package/dist/admin/src/core/types.d.ts +12 -0
  17. package/dist/server/index.js +1176 -184
  18. package/dist/server/index.mjs +1176 -184
  19. package/dist/server/src/config/index.d.ts +4 -0
  20. package/dist/server/src/controllers/ci-image.d.ts +11 -2
  21. package/dist/server/src/controllers/index.d.ts +1 -0
  22. package/dist/server/src/index.d.ts +5 -0
  23. package/dist/server/src/utils/image-variants.d.ts +74 -0
  24. package/package.json +1 -1
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const ReactDOM = require("react-dom");
6
- const SurveyWidgetEditor = require("./SurveyWidgetEditor-BmgYQaQS.js");
7
- const index = require("./index-CZAwXCFH.js");
6
+ const SurveyWidgetEditor = require("./SurveyWidgetEditor-C5Uvyf_h.js");
7
+ const index = require("./index-i0NfSYto.js");
8
8
  const react = require("swiper/react");
9
9
  const modules = require("swiper/modules");
10
10
  const admin = require("@strapi/strapi/admin");
@@ -1091,6 +1091,45 @@ function blockCanvasClasses(block = {}) {
1091
1091
  }
1092
1092
  return classes;
1093
1093
  }
1094
+ function resolveCanvasMediaUrl(assetOrUrl, imageSettings) {
1095
+ if (!assetOrUrl) return "";
1096
+ const asset = typeof assetOrUrl === "object" ? assetOrUrl : null;
1097
+ const preferredUrl = typeof assetOrUrl === "string" ? assetOrUrl : asset?.optimized_url || asset?.target_url || asset?.url || asset?.src || "";
1098
+ const origUrl = typeof assetOrUrl === "string" ? assetOrUrl : asset?.original_url || asset?.url || asset?.target_url || preferredUrl;
1099
+ if (!preferredUrl && !origUrl) return "";
1100
+ const proc = String(imageSettings?.process || "").trim().toLowerCase();
1101
+ if (proc === "none" || proc === "no-process") {
1102
+ return origUrl || preferredUrl;
1103
+ }
1104
+ if (!proc || proc === "auto") {
1105
+ return preferredUrl || origUrl;
1106
+ }
1107
+ if (proc !== "fit" && proc !== "widen") {
1108
+ return preferredUrl || origUrl;
1109
+ }
1110
+ const w = Number(imageSettings?.cWidth) || 0;
1111
+ const h = proc === "fit" ? Number(imageSettings?.cHeight) || 0 : 0;
1112
+ const rotate = Number(imageSettings?.rotate) || 0;
1113
+ if (w <= 0 && h <= 0) {
1114
+ return preferredUrl || origUrl;
1115
+ }
1116
+ const formatKey = `ci_${proc}_${w}x${h}${rotate ? `_r${rotate}` : ""}`;
1117
+ const directVariantUrl = asset?.formats?.[formatKey]?.url;
1118
+ if (directVariantUrl) {
1119
+ return directVariantUrl;
1120
+ }
1121
+ const baseSrc = origUrl || preferredUrl;
1122
+ if (baseSrc.startsWith("data:") || baseSrc.startsWith("blob:") || /\.(svg|gif|mp4|webm|mov|pdf)(\?|#|$)/i.test(baseSrc) || baseSrc.includes("/api/content-input/image") || baseSrc.includes("/content-input/image")) {
1123
+ return baseSrc;
1124
+ }
1125
+ const params = new URLSearchParams();
1126
+ params.set("src", baseSrc);
1127
+ params.set("process", proc);
1128
+ if (w > 0) params.set("w", String(w));
1129
+ if (proc === "fit" && h > 0) params.set("h", String(h));
1130
+ if (rotate) params.set("rotate", String(rotate));
1131
+ return `/api/content-input/image?${params.toString()}`;
1132
+ }
1094
1133
  function nodeCanvasStyles(node) {
1095
1134
  const so = node?.styleOptions || {};
1096
1135
  const style = {};
@@ -1122,7 +1161,8 @@ function nodeCanvasStyles(node) {
1122
1161
  style.borderRadius = so.borderRadius || so["border-radius"];
1123
1162
  }
1124
1163
  const bgOpts = node?.bgOptions || {};
1125
- const bgUrl = node?.bgImage?.target_url || node?.bgImage?.url || bgOpts?.bgImage?.target_url || bgOpts?.bgImage?.url;
1164
+ const bgAsset = node?.bgImage || bgOpts?.bgImage;
1165
+ const bgUrl = resolveCanvasMediaUrl(bgAsset, bgOpts?.imageSettings);
1126
1166
  if (bgUrl) {
1127
1167
  style.backgroundImage = `url("${bgUrl}")`;
1128
1168
  style.backgroundSize = bgOpts["background-size"] || bgOpts.size || "cover";
@@ -2730,7 +2770,7 @@ function summarizeRowWidgets(row, locale, tr) {
2730
2770
  }
2731
2771
  return `${blocks.length} ${tr ? "blok" : "blocks"} (${widgetLabels.join(", ")})`;
2732
2772
  }
2733
- const inputStyle$7 = {
2773
+ const inputStyle$8 = {
2734
2774
  width: "100%",
2735
2775
  padding: "6px 9px",
2736
2776
  fontSize: 12,
@@ -2739,7 +2779,7 @@ const inputStyle$7 = {
2739
2779
  background: "#fff",
2740
2780
  color: "#1e293b"
2741
2781
  };
2742
- const labelStyle$7 = {
2782
+ const labelStyle$8 = {
2743
2783
  display: "block",
2744
2784
  fontSize: 11,
2745
2785
  fontWeight: 600,
@@ -2928,13 +2968,13 @@ const TabAccordionEditor = ({ widget, onChange }) => {
2928
2968
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, fontWeight: 700, color: "#1e3a8a", marginBottom: 8 }, children: isTab ? tr ? "Sekme (Tab) Görünüm Seçenekleri" : "Tab Appearance Options" : tr ? "Akordiyon Görünüm Seçenekleri" : "Accordion Appearance Options" }),
2929
2969
  isTab ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
2930
2970
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2931
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Sekme Yönü" : "Tab Direction" }),
2971
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$8, children: tr ? "Sekme Yönü" : "Tab Direction" }),
2932
2972
  /* @__PURE__ */ jsxRuntime.jsxs(
2933
2973
  "select",
2934
2974
  {
2935
2975
  value: options.vertical ? "vertical" : "horizontal",
2936
2976
  onChange: (e) => updateOptions({ vertical: e.target.value === "vertical" }),
2937
- style: inputStyle$7,
2977
+ style: inputStyle$8,
2938
2978
  children: [
2939
2979
  /* @__PURE__ */ jsxRuntime.jsx("option", { value: "horizontal", children: tr ? "Yatay (Üst Sekmeler)" : "Horizontal (Top Tabs)" }),
2940
2980
  /* @__PURE__ */ jsxRuntime.jsx("option", { value: "vertical", children: tr ? "Düşey (Sol Yan Sekmeler)" : "Vertical (Side Tabs)" })
@@ -2943,7 +2983,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
2943
2983
  )
2944
2984
  ] }),
2945
2985
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2946
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Hizalama" : "Alignment" }),
2986
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$8, children: tr ? "Hizalama" : "Alignment" }),
2947
2987
  /* @__PURE__ */ jsxRuntime.jsxs(
2948
2988
  "select",
2949
2989
  {
@@ -2956,7 +2996,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
2956
2996
  right: v === "right"
2957
2997
  });
2958
2998
  },
2959
- style: inputStyle$7,
2999
+ style: inputStyle$8,
2960
3000
  children: [
2961
3001
  /* @__PURE__ */ jsxRuntime.jsx("option", { value: "left", children: tr ? "Sola Yaslı" : "Left" }),
2962
3002
  /* @__PURE__ */ jsxRuntime.jsx("option", { value: "center", children: tr ? "Ortalı" : "Centered" }),
@@ -3051,7 +3091,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
3051
3091
  }
3052
3092
  ),
3053
3093
  isTab ? /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3054
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Çizgi Kalınlığı (px)" : "Line Height (px)" }),
3094
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$8, children: tr ? "Çizgi Kalınlığı (px)" : "Line Height (px)" }),
3055
3095
  /* @__PURE__ */ jsxRuntime.jsx(
3056
3096
  "input",
3057
3097
  {
@@ -3062,7 +3102,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
3062
3102
  onChange: (e) => updateOptions({
3063
3103
  indicatorHeight: Math.max(1, Math.min(10, Number(e.target.value) || 3))
3064
3104
  }),
3065
- style: inputStyle$7
3105
+ style: inputStyle$8
3066
3106
  }
3067
3107
  )
3068
3108
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(
@@ -3190,7 +3230,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
3190
3230
  placeholder: tr ? `${itemLabel} başlığı / sorusu...` : `${itemLabel} title / question...`,
3191
3231
  onChange: (e) => updateSingleNode(idx, { title: e.target.value }),
3192
3232
  style: {
3193
- ...inputStyle$7,
3233
+ ...inputStyle$8,
3194
3234
  fontWeight: 600,
3195
3235
  padding: "4px 8px",
3196
3236
  flex: 1
@@ -3941,7 +3981,7 @@ function appendToParentByUid(items, parentUid, newNodes) {
3941
3981
  }
3942
3982
  return false;
3943
3983
  }
3944
- const inputStyle$6 = {
3984
+ const inputStyle$7 = {
3945
3985
  width: "100%",
3946
3986
  padding: "6px 9px",
3947
3987
  fontSize: 12,
@@ -3950,7 +3990,7 @@ const inputStyle$6 = {
3950
3990
  background: "#fff",
3951
3991
  color: "#1e293b"
3952
3992
  };
3953
- const labelStyle$6 = {
3993
+ const labelStyle$7 = {
3954
3994
  display: "block",
3955
3995
  fontSize: 11,
3956
3996
  fontWeight: 600,
@@ -4485,31 +4525,31 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4485
4525
  },
4486
4526
  children: [
4487
4527
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4488
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Başlık" : "Title" }),
4528
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Başlık" : "Title" }),
4489
4529
  /* @__PURE__ */ jsxRuntime.jsx(
4490
4530
  "input",
4491
4531
  {
4492
4532
  type: "text",
4493
4533
  value: node.title,
4494
4534
  onChange: (e) => handleUpdateNodeField(currentPath, { title: e.target.value }),
4495
- style: inputStyle$6
4535
+ style: inputStyle$7
4496
4536
  }
4497
4537
  )
4498
4538
  ] }),
4499
4539
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4500
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "URL / Bağlantı" : "URL / Link" }),
4540
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "URL / Bağlantı" : "URL / Link" }),
4501
4541
  /* @__PURE__ */ jsxRuntime.jsx(
4502
4542
  "input",
4503
4543
  {
4504
4544
  type: "text",
4505
4545
  value: node.url,
4506
4546
  onChange: (e) => handleUpdateNodeField(currentPath, { url: e.target.value }),
4507
- style: inputStyle$6
4547
+ style: inputStyle$7
4508
4548
  }
4509
4549
  )
4510
4550
  ] }),
4511
4551
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4512
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Hedef" : "Target" }),
4552
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Hedef" : "Target" }),
4513
4553
  /* @__PURE__ */ jsxRuntime.jsxs(
4514
4554
  "select",
4515
4555
  {
@@ -4517,7 +4557,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4517
4557
  onChange: (e) => handleUpdateNodeField(currentPath, {
4518
4558
  target: e.target.value
4519
4559
  }),
4520
- style: inputStyle$6,
4560
+ style: inputStyle$7,
4521
4561
  children: [
4522
4562
  /* @__PURE__ */ jsxRuntime.jsx("option", { value: "_self", children: tr ? "Aynı Sekme (_self)" : "Same Tab (_self)" }),
4523
4563
  /* @__PURE__ */ jsxRuntime.jsx("option", { value: "_blank", children: tr ? "Yeni Sekme (_blank)" : "New Tab (_blank)" })
@@ -4526,7 +4566,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4526
4566
  )
4527
4567
  ] }),
4528
4568
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4529
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "İkon (Opsiyonel)" : "Icon (Optional)" }),
4569
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "İkon (Opsiyonel)" : "Icon (Optional)" }),
4530
4570
  /* @__PURE__ */ jsxRuntime.jsx(
4531
4571
  "input",
4532
4572
  {
@@ -4534,7 +4574,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4534
4574
  value: node.icon || "",
4535
4575
  placeholder: "e.g. home, business, mail",
4536
4576
  onChange: (e) => handleUpdateNodeField(currentPath, { icon: e.target.value }),
4537
- style: inputStyle$6
4577
+ style: inputStyle$7
4538
4578
  }
4539
4579
  )
4540
4580
  ] })
@@ -4635,7 +4675,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4635
4675
  },
4636
4676
  children: [
4637
4677
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 10 }, children: [
4638
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Menü Görünüm Yönü (Yatay / Düşey)" : "Menu Orientation (Horizontal / Vertical)" }),
4678
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Menü Görünüm Yönü (Yatay / Düşey)" : "Menu Orientation (Horizontal / Vertical)" }),
4639
4679
  /* @__PURE__ */ jsxRuntime.jsxs(
4640
4680
  "div",
4641
4681
  {
@@ -4717,14 +4757,14 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4717
4757
  )
4718
4758
  ] }),
4719
4759
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 8 }, children: [
4720
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Veritabanında Kayıtlı Menülerden Yükle (PostgreSQL)" : "Load from Saved Database Menus (PostgreSQL)" }),
4760
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Veritabanında Kayıtlı Menülerden Yükle (PostgreSQL)" : "Load from Saved Database Menus (PostgreSQL)" }),
4721
4761
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 6 }, children: [
4722
4762
  /* @__PURE__ */ jsxRuntime.jsxs(
4723
4763
  "select",
4724
4764
  {
4725
4765
  value: selectedDbMenuId,
4726
4766
  onChange: (e) => handleLoadDbMenu(e.target.value),
4727
- style: { ...inputStyle$6, flex: 1 },
4767
+ style: { ...inputStyle$7, flex: 1 },
4728
4768
  children: [
4729
4769
  /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: tr ? "-- Kayıtlı Menü Seçin veya Özel Oluşturun --" : "-- Select a Saved Menu or Create Custom --" }),
4730
4770
  savedMenus.map((m) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: String(m._id || m.id), children: [
@@ -4760,26 +4800,26 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4760
4800
  ] }),
4761
4801
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
4762
4802
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4763
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Menü Başlığı" : "Menu Title" }),
4803
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Menü Başlığı" : "Menu Title" }),
4764
4804
  /* @__PURE__ */ jsxRuntime.jsx(
4765
4805
  "input",
4766
4806
  {
4767
4807
  type: "text",
4768
4808
  value: menuMeta.name,
4769
4809
  onChange: (e) => commitMenu(items, { name: e.target.value }),
4770
- style: inputStyle$6
4810
+ style: inputStyle$7
4771
4811
  }
4772
4812
  )
4773
4813
  ] }),
4774
4814
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4775
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Menü Kodu (Slug)" : "Menu Code (Slug)" }),
4815
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Menü Kodu (Slug)" : "Menu Code (Slug)" }),
4776
4816
  /* @__PURE__ */ jsxRuntime.jsx(
4777
4817
  "input",
4778
4818
  {
4779
4819
  type: "text",
4780
4820
  value: menuMeta.id,
4781
4821
  onChange: (e) => commitMenu(items, { id: e.target.value }),
4782
- style: inputStyle$6
4822
+ style: inputStyle$7
4783
4823
  }
4784
4824
  )
4785
4825
  ] })
@@ -4948,13 +4988,13 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4948
4988
  ),
4949
4989
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 10 }, children: [
4950
4990
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 8 }, children: [
4951
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Eklenecek Konum (Üst Menü Öğesi)" : "Target Location (Parent Menu Item)" }),
4991
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Eklenecek Konum (Üst Menü Öğesi)" : "Target Location (Parent Menu Item)" }),
4952
4992
  /* @__PURE__ */ jsxRuntime.jsxs(
4953
4993
  "select",
4954
4994
  {
4955
4995
  value: targetParentUid,
4956
4996
  onChange: (e) => setTargetParentUid(e.target.value),
4957
- style: inputStyle$6,
4997
+ style: inputStyle$7,
4958
4998
  children: [
4959
4999
  /* @__PURE__ */ jsxRuntime.jsx("option", { value: "__root__", children: tr ? "Ana (Kök) Düzeye Ekle" : "Add to Root Level" }),
4960
5000
  flatParentChoices.map((ch) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: ch._uId, children: [
@@ -4979,7 +5019,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4979
5019
  },
4980
5020
  children: [
4981
5021
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4982
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Strapi Modülü (Content-Type)" : "Strapi Content-Type" }),
5022
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Strapi Modülü (Content-Type)" : "Strapi Content-Type" }),
4983
5023
  /* @__PURE__ */ jsxRuntime.jsx(
4984
5024
  "select",
4985
5025
  {
@@ -4988,7 +5028,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4988
5028
  setSelectedEntityUid(e.target.value);
4989
5029
  setCheckedEntityMap({});
4990
5030
  },
4991
- style: inputStyle$6,
5031
+ style: inputStyle$7,
4992
5032
  children: entityTypes.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("option", { value: "api::page.page", children: tr ? "Sayfalar (api::page.page)" : "Pages (api::page.page)" }) : entityTypes.map((ct) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: ct.uid, children: [
4993
5033
  ct.displayName,
4994
5034
  " (",
@@ -5058,7 +5098,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5058
5098
  value: entitySearch,
5059
5099
  onChange: (e) => setEntitySearch(e.target.value),
5060
5100
  placeholder: tr ? "Strapi kayıtlarında başlık veya URL ara..." : "Search title or URL in Strapi entries...",
5061
- style: { ...inputStyle$6, paddingLeft: 28 }
5101
+ style: { ...inputStyle$7, paddingLeft: 28 }
5062
5102
  }
5063
5103
  ),
5064
5104
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "absolute", left: 8, top: 7, pointerEvents: "none" }, children: /* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "search", size: 15, color: "#94a3b8" }) })
@@ -5133,7 +5173,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5133
5173
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
5134
5174
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
5135
5175
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
5136
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Bağlantı Başlığı" : "Link Title" }),
5176
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Bağlantı Başlığı" : "Link Title" }),
5137
5177
  /* @__PURE__ */ jsxRuntime.jsx(
5138
5178
  "input",
5139
5179
  {
@@ -5141,12 +5181,12 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5141
5181
  value: customTitle,
5142
5182
  onChange: (e) => setCustomTitle(e.target.value),
5143
5183
  placeholder: tr ? "örn: Kurumsal Portal" : "e.g. Corporate Portal",
5144
- style: inputStyle$6
5184
+ style: inputStyle$7
5145
5185
  }
5146
5186
  )
5147
5187
  ] }),
5148
5188
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
5149
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Bağlantı URL" : "Link URL" }),
5189
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Bağlantı URL" : "Link URL" }),
5150
5190
  /* @__PURE__ */ jsxRuntime.jsx(
5151
5191
  "input",
5152
5192
  {
@@ -5154,20 +5194,20 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5154
5194
  value: customUrl,
5155
5195
  onChange: (e) => setCustomUrl(e.target.value),
5156
5196
  placeholder: "https://... or /about",
5157
- style: inputStyle$6
5197
+ style: inputStyle$7
5158
5198
  }
5159
5199
  )
5160
5200
  ] })
5161
5201
  ] }),
5162
5202
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
5163
5203
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
5164
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Hedef Sekme" : "Target Tab" }),
5204
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Hedef Sekme" : "Target Tab" }),
5165
5205
  /* @__PURE__ */ jsxRuntime.jsxs(
5166
5206
  "select",
5167
5207
  {
5168
5208
  value: customTarget,
5169
5209
  onChange: (e) => setCustomTarget(e.target.value),
5170
- style: inputStyle$6,
5210
+ style: inputStyle$7,
5171
5211
  children: [
5172
5212
  /* @__PURE__ */ jsxRuntime.jsx("option", { value: "_self", children: tr ? "Aynı Sekme (_self)" : "Same Tab (_self)" }),
5173
5213
  /* @__PURE__ */ jsxRuntime.jsx("option", { value: "_blank", children: tr ? "Yeni Sekme (_blank)" : "New Tab (_blank)" })
@@ -5176,7 +5216,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5176
5216
  )
5177
5217
  ] }),
5178
5218
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
5179
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "İkon (Opsiyonel)" : "Icon (Optional)" }),
5219
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "İkon (Opsiyonel)" : "Icon (Optional)" }),
5180
5220
  /* @__PURE__ */ jsxRuntime.jsx(
5181
5221
  "input",
5182
5222
  {
@@ -5184,7 +5224,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5184
5224
  value: customIcon,
5185
5225
  onChange: (e) => setCustomIcon(e.target.value),
5186
5226
  placeholder: "e.g. home, launch",
5187
- style: inputStyle$6
5227
+ style: inputStyle$7
5188
5228
  }
5189
5229
  )
5190
5230
  ] })
@@ -5608,6 +5648,130 @@ const UnitInput = ({
5608
5648
  )
5609
5649
  ] });
5610
5650
  };
5651
+ const inputStyle$6 = {
5652
+ width: "100%",
5653
+ padding: "6px 8px",
5654
+ fontSize: 12,
5655
+ border: "1px solid #cbd5e1",
5656
+ borderRadius: 5,
5657
+ background: "#ffffff",
5658
+ color: "#0f172a"
5659
+ };
5660
+ const labelStyle$6 = {
5661
+ display: "block",
5662
+ fontSize: 11,
5663
+ fontWeight: 600,
5664
+ color: "#475569",
5665
+ marginBottom: 4
5666
+ };
5667
+ const CIImageSettingsControl = ({
5668
+ value,
5669
+ onChange,
5670
+ locale = "en",
5671
+ label,
5672
+ defaultWidth = 800,
5673
+ defaultHeight = 600,
5674
+ compact = false
5675
+ }) => {
5676
+ const tr = String(locale || "en").toLowerCase().startsWith("tr");
5677
+ const rawProc = String(value?.process || "");
5678
+ const mode = rawProc === "fit" ? "fit" : rawProc === "widen" ? "widen" : rawProc === "none" || rawProc === "no-process" ? "none" : "auto";
5679
+ const cWidth = Number(value?.cWidth) || defaultWidth;
5680
+ const cHeight = Number(value?.cHeight) || defaultHeight;
5681
+ const headingText = label || (tr ? "Görsel Optimizasyon & Boyutlandırma (Sharp / CDN WebP)" : "Image Optimization & Sizing (Sharp / CDN WebP)");
5682
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5683
+ "div",
5684
+ {
5685
+ style: {
5686
+ padding: compact ? 8 : 10,
5687
+ border: "1px solid #e2e8f0",
5688
+ borderRadius: 6,
5689
+ background: "#f8fafc",
5690
+ display: "flex",
5691
+ flexDirection: "column",
5692
+ gap: 8
5693
+ },
5694
+ children: [
5695
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 5 }, children: [
5696
+ /* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "auto_fix_high", size: 14, color: "#2669a0" }),
5697
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 11, fontWeight: 700, color: "#1e293b" }, children: headingText })
5698
+ ] }),
5699
+ /* @__PURE__ */ jsxRuntime.jsxs(
5700
+ "select",
5701
+ {
5702
+ value: mode,
5703
+ onChange: (e) => {
5704
+ const nextMode = e.target.value;
5705
+ onChange({
5706
+ ...value || {},
5707
+ process: nextMode === "auto" ? "" : nextMode,
5708
+ cWidth,
5709
+ cHeight
5710
+ });
5711
+ },
5712
+ style: inputStyle$6,
5713
+ children: [
5714
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "auto", children: tr ? "Otomatik Optimize (WebP • ci-optimized)" : "Auto Optimize (WebP • ci-optimized)" }),
5715
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "fit", children: tr ? "Tam Boyut / Kırparak Sığdır (Fit W × H WebP)" : "Exact Fit / Crop (Fit W × H WebP)" }),
5716
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "widen", children: tr ? "Genişliğe Ölçekle (Widen W WebP)" : "Scale to Width (Widen W WebP)" }),
5717
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "none", children: tr ? "Orijinal Dosya (Sharp İşlemi Yok)" : "Original File (No Sharp Processing)" })
5718
+ ]
5719
+ }
5720
+ ),
5721
+ (mode === "fit" || mode === "widen") && /* @__PURE__ */ jsxRuntime.jsxs(
5722
+ "div",
5723
+ {
5724
+ style: {
5725
+ display: "grid",
5726
+ gridTemplateColumns: mode === "fit" ? "1fr 1fr" : "1fr",
5727
+ gap: 8
5728
+ },
5729
+ children: [
5730
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
5731
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Genişlik (px)" : "Width (px)" }),
5732
+ /* @__PURE__ */ jsxRuntime.jsx(
5733
+ "input",
5734
+ {
5735
+ type: "number",
5736
+ min: 50,
5737
+ max: 3840,
5738
+ value: cWidth,
5739
+ onChange: (e) => onChange({
5740
+ ...value || {},
5741
+ process: mode,
5742
+ cWidth: Number(e.target.value) || defaultWidth,
5743
+ cHeight
5744
+ }),
5745
+ style: inputStyle$6
5746
+ }
5747
+ )
5748
+ ] }),
5749
+ mode === "fit" && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
5750
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Yükseklik (px)" : "Height (px)" }),
5751
+ /* @__PURE__ */ jsxRuntime.jsx(
5752
+ "input",
5753
+ {
5754
+ type: "number",
5755
+ min: 50,
5756
+ max: 3840,
5757
+ value: cHeight,
5758
+ onChange: (e) => onChange({
5759
+ ...value || {},
5760
+ process: mode,
5761
+ cWidth,
5762
+ cHeight: Number(e.target.value) || defaultHeight
5763
+ }),
5764
+ style: inputStyle$6
5765
+ }
5766
+ )
5767
+ ] })
5768
+ ]
5769
+ }
5770
+ )
5771
+ ]
5772
+ }
5773
+ );
5774
+ };
5611
5775
  function resolveEntityCardPreviewData(rawData, rawOptions, locale = "en") {
5612
5776
  const tr = locale === "tr";
5613
5777
  const data = rawData && typeof rawData === "object" ? rawData : {};
@@ -7115,6 +7279,23 @@ const EntityCardWidgetEditor = ({
7115
7279
  )
7116
7280
  ] })
7117
7281
  ] }),
7282
+ /* @__PURE__ */ jsxRuntime.jsx(
7283
+ CIImageSettingsControl,
7284
+ {
7285
+ value: options.imageSettings || cardProps.imageSettings,
7286
+ onChange: (next) => onChange({
7287
+ options: {
7288
+ ...options,
7289
+ imageSettings: next,
7290
+ cardProps: { ...cardProps, imageSettings: next }
7291
+ }
7292
+ }),
7293
+ defaultWidth: 960,
7294
+ defaultHeight: 540,
7295
+ compact: true,
7296
+ locale
7297
+ }
7298
+ ),
7118
7299
  /* @__PURE__ */ jsxRuntime.jsx(
7119
7300
  SurveyWidgetEditor.CIColorField,
7120
7301
  {
@@ -10883,6 +11064,17 @@ const HeroSliderStudioModal = ({
10883
11064
  onChange: (asset) => updateLayer(selectedLayerIdx, { image: asset })
10884
11065
  }
10885
11066
  ),
11067
+ activeLayer.image && /* @__PURE__ */ jsxRuntime.jsx(
11068
+ CIImageSettingsControl,
11069
+ {
11070
+ value: activeLayer.imageSettings,
11071
+ onChange: (next) => updateLayer(selectedLayerIdx, { imageSettings: next }),
11072
+ defaultWidth: 1e3,
11073
+ defaultHeight: 1e3,
11074
+ compact: true,
11075
+ locale: uiLocale
11076
+ }
11077
+ ),
10886
11078
  activeLayer.positionMode !== "free" && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
10887
11079
  /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$4, children: tr ? "Görsel Genişliği" : "Image Width" }),
10888
11080
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -11276,14 +11468,27 @@ const HeroSliderStudioModal = ({
11276
11468
  }
11277
11469
  )
11278
11470
  ] }),
11279
- activeSlide.bgType === "image" && /* @__PURE__ */ jsxRuntime.jsx(
11280
- SurveyWidgetEditor.StrapiMediaPicker,
11281
- {
11282
- label: tr ? "Slayt Arka Plan Görseli" : "Slide Background Image",
11283
- value: activeSlide.bgImage || null,
11284
- onChange: (asset) => updateSlide(selectedSlideIdx, { bgImage: asset })
11285
- }
11286
- ),
11471
+ activeSlide.bgType === "image" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11472
+ /* @__PURE__ */ jsxRuntime.jsx(
11473
+ SurveyWidgetEditor.StrapiMediaPicker,
11474
+ {
11475
+ label: tr ? "Slayt Arka Plan Görseli" : "Slide Background Image",
11476
+ value: activeSlide.bgImage || null,
11477
+ onChange: (asset) => updateSlide(selectedSlideIdx, { bgImage: asset })
11478
+ }
11479
+ ),
11480
+ activeSlide.bgImage && /* @__PURE__ */ jsxRuntime.jsx(
11481
+ CIImageSettingsControl,
11482
+ {
11483
+ value: activeSlide.imageSettings,
11484
+ onChange: (next) => updateSlide(selectedSlideIdx, { imageSettings: next }),
11485
+ defaultWidth: 1920,
11486
+ defaultHeight: 1080,
11487
+ compact: true,
11488
+ locale: uiLocale
11489
+ }
11490
+ )
11491
+ ] }),
11287
11492
  activeSlide.bgType === "gradient" && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
11288
11493
  /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$4, children: "CSS Gradient" }),
11289
11494
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -11360,14 +11565,27 @@ const HeroSliderStudioModal = ({
11360
11565
  ]
11361
11566
  }
11362
11567
  ),
11363
- activeSlide.mobileBgType === "image" && /* @__PURE__ */ jsxRuntime.jsx(
11364
- SurveyWidgetEditor.StrapiMediaPicker,
11365
- {
11366
- label: tr ? "Mobil Dikey Görsel" : "Mobile Portrait Image",
11367
- value: activeSlide.mobileBgImage || null,
11368
- onChange: (asset) => updateSlide(selectedSlideIdx, { mobileBgImage: asset })
11369
- }
11370
- ),
11568
+ activeSlide.mobileBgType === "image" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11569
+ /* @__PURE__ */ jsxRuntime.jsx(
11570
+ SurveyWidgetEditor.StrapiMediaPicker,
11571
+ {
11572
+ label: tr ? "Mobil Dikey Görsel" : "Mobile Portrait Image",
11573
+ value: activeSlide.mobileBgImage || null,
11574
+ onChange: (asset) => updateSlide(selectedSlideIdx, { mobileBgImage: asset })
11575
+ }
11576
+ ),
11577
+ activeSlide.mobileBgImage && /* @__PURE__ */ jsxRuntime.jsx(
11578
+ CIImageSettingsControl,
11579
+ {
11580
+ value: activeSlide.mobileImageSettings,
11581
+ onChange: (next) => updateSlide(selectedSlideIdx, { mobileImageSettings: next }),
11582
+ defaultWidth: 1080,
11583
+ defaultHeight: 1350,
11584
+ compact: true,
11585
+ locale: uiLocale
11586
+ }
11587
+ )
11588
+ ] }),
11371
11589
  activeSlide.mobileBgType === "gradient" && /* @__PURE__ */ jsxRuntime.jsx(
11372
11590
  "input",
11373
11591
  {
@@ -15655,6 +15873,17 @@ const CustomCardStudioModal = ({
15655
15873
  compact: true,
15656
15874
  locale: uiLocale
15657
15875
  }
15876
+ ),
15877
+ /* @__PURE__ */ jsxRuntime.jsx(
15878
+ CIImageSettingsControl,
15879
+ {
15880
+ value: data.design.imageSettings,
15881
+ onChange: (next) => updateDesign({ imageSettings: next }),
15882
+ defaultWidth: 960,
15883
+ defaultHeight: 540,
15884
+ compact: true,
15885
+ locale: uiLocale
15886
+ }
15658
15887
  )
15659
15888
  ] }),
15660
15889
  rightTab === "layout" && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
@@ -16041,23 +16270,8 @@ function resolveYoutubeVideoId(raw) {
16041
16270
  if (extracted === "dQw4w9WgXcQ") return "M7lc1UVf-VE";
16042
16271
  return extracted;
16043
16272
  }
16044
- function buildSharpImageUrl(rawUrl, imageSettings) {
16045
- if (!rawUrl) return "";
16046
- if (!imageSettings || !imageSettings.process) return rawUrl;
16047
- const proc = String(imageSettings.process).toLowerCase();
16048
- if (proc !== "fit" && proc !== "widen") return rawUrl;
16049
- const w = Number(imageSettings.cWidth) || 0;
16050
- const h = Number(imageSettings.cHeight) || 0;
16051
- if (w <= 0 && h <= 0) return rawUrl;
16052
- if (rawUrl.includes("/api/content-input/image") || rawUrl.includes("/content-input/image")) {
16053
- return rawUrl;
16054
- }
16055
- const params = new URLSearchParams();
16056
- params.set("src", rawUrl);
16057
- params.set("process", proc);
16058
- if (w > 0) params.set("w", String(w));
16059
- if (proc === "fit" && h > 0) params.set("h", String(h));
16060
- return `/api/content-input/image?${params.toString()}`;
16273
+ function buildSharpImageUrl(assetOrUrl, imageSettings) {
16274
+ return resolveCanvasMediaUrl(assetOrUrl, imageSettings);
16061
16275
  }
16062
16276
  function pickLocalized(val, locale, fallback = "") {
16063
16277
  if (!val) return fallback;
@@ -17782,7 +17996,8 @@ const WidgetPreview = ({
17782
17996
  ) });
17783
17997
  }
17784
17998
  if (id === "singleImage") {
17785
- const imgUrl = data?.image?.target_url || data?.image?.url || data?.url || "";
17999
+ const imgAsset = data?.image || data?.url || "";
18000
+ const imgUrl = buildSharpImageUrl(imgAsset, options?.imageSettings || data?.imageSettings);
17786
18001
  const alt = data?.alt || data?.image?.caption || t("widgets.singleImage.label");
17787
18002
  const caption = data?.caption || "";
17788
18003
  const borderRadius = toCssLength(data?.borderRadius, "4px");
@@ -17901,7 +18116,7 @@ const WidgetPreview = ({
17901
18116
  if (galleryPopupIndex === null || typeof document === "undefined") return null;
17902
18117
  const safePopIdx = (galleryPopupIndex % images.length + images.length) % images.length;
17903
18118
  const popImg = images[safePopIdx];
17904
- const popUrl = popImg?.target_url || popImg?.url || "";
18119
+ const popUrl = popImg?.formats?.ci_auto_1920x0?.url || popImg?.optimized_url || popImg?.target_url || popImg?.url || "";
17905
18120
  const popCaption = popImg?.caption || popImg?.filename || `${t("widgets.gallery.label")} ${safePopIdx + 1}`;
17906
18121
  return ReactDOM.createPortal(
17907
18122
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -18105,7 +18320,7 @@ const WidgetPreview = ({
18105
18320
  children: /* @__PURE__ */ jsxRuntime.jsx(
18106
18321
  "img",
18107
18322
  {
18108
- src: buildSharpImageUrl(img.target_url || img.url, imageSettings),
18323
+ src: buildSharpImageUrl(img, imageSettings),
18109
18324
  alt: img.caption || `${t("widgets.gallery.label")} ${i + 1}`,
18110
18325
  style: {
18111
18326
  width: "100%",
@@ -18191,8 +18406,8 @@ const WidgetPreview = ({
18191
18406
  onSlideChange: (s) => setGalleryIndex(s.realIndex ?? s.activeIndex ?? 0),
18192
18407
  style: { width: "100%" },
18193
18408
  children: images.map((item, index2) => {
18194
- const rawSlideUrl = item?.target_url || item?.url || "";
18195
- const slideUrl = buildSharpImageUrl(rawSlideUrl, imageSettings);
18409
+ const rawSlideUrl = item?.optimized_url || item?.target_url || item?.url || "";
18410
+ const slideUrl = buildSharpImageUrl(item, imageSettings);
18196
18411
  return /* @__PURE__ */ jsxRuntime.jsx(react.SwiperSlide, { children: /* @__PURE__ */ jsxRuntime.jsxs(
18197
18412
  "div",
18198
18413
  {
@@ -18321,7 +18536,8 @@ const WidgetPreview = ({
18321
18536
  const title = first?.title || first?.snippet?.title || t("widgets.youtubeVideo.label");
18322
18537
  const activeTitle = activeVideo?.title || activeVideo?.snippet?.title || title;
18323
18538
  const description = first?.description || first?.snippet?.description || "";
18324
- const customThumbUrl = first?.customThumbnail?.target_url || first?.customThumbnail?.url || first?.image?.target_url || first?.image?.url || options?.thumbnailImage?.target_url || options?.thumbnailImage?.url || options?.bgImage?.target_url || options?.bgImage?.url || "";
18539
+ const customThumbAsset = first?.customThumbnail || first?.image || options?.thumbnailImage || options?.bgImage || null;
18540
+ const customThumbUrl = customThumbAsset ? buildSharpImageUrl(customThumbAsset, options?.imageSettings) : "";
18325
18541
  const rawThumb = first?.thumbnail || first?.snippet?.thumbnails?.high?.url || "";
18326
18542
  const safeRawThumb = rawThumb && !rawThumb.includes("dQw4w9WgXcQ") ? rawThumb : `https://img.youtube.com/vi/${previewVideoId}/hqdefault.jpg`;
18327
18543
  const thumb = customThumbUrl || safeRawThumb;
@@ -19100,19 +19316,21 @@ const WidgetPreview = ({
19100
19316
  );
19101
19317
  }
19102
19318
  if (id === "banner") {
19103
- const name = data?.banner?.name || t("widgets.banner.defaultTitle");
19319
+ const name = (typeof data?.title === "object" ? data.title?.text : data?.title) || data?.banner?.name || t("widgets.banner.defaultTitle");
19104
19320
  const type = options?.type || "grid";
19321
+ const bannerImgUrl = data?.image ? buildSharpImageUrl(data.image, options?.imageSettings || data?.imageSettings) : "";
19105
19322
  return /* @__PURE__ */ jsxRuntime.jsx(
19106
19323
  "div",
19107
19324
  {
19108
19325
  style: {
19109
19326
  padding: 16,
19110
19327
  borderRadius: 6,
19111
- background: "linear-gradient(135deg, #1e3a8a 0%, #2669a0 100%)",
19328
+ background: bannerImgUrl ? `linear-gradient(rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.52)), url("${bannerImgUrl}") center / cover no-repeat` : "linear-gradient(135deg, #1e3a8a 0%, #2669a0 100%)",
19112
19329
  color: "#fff",
19113
19330
  display: "flex",
19114
19331
  alignItems: "center",
19115
- justifyContent: "space-between"
19332
+ justifyContent: "space-between",
19333
+ minHeight: bannerImgUrl ? 120 : void 0
19116
19334
  },
19117
19335
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
19118
19336
  /* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "featured_video", size: 24, color: "#93c5fd" }),
@@ -25813,6 +26031,17 @@ const WidgetEditor = ({ widget, onChange }) => {
25813
26031
  })
25814
26032
  }
25815
26033
  ) }),
26034
+ sData.image && /* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldWrapStyle, children: /* @__PURE__ */ jsxRuntime.jsx(
26035
+ CIImageSettingsControl,
26036
+ {
26037
+ value: options.imageSettings,
26038
+ onChange: (next) => updateOptions({ imageSettings: next }),
26039
+ defaultWidth: 1200,
26040
+ defaultHeight: 800,
26041
+ compact: true,
26042
+ locale
26043
+ }
26044
+ ) }),
25816
26045
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldWrapStyle, children: [
25817
26046
  /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: t("altText") }),
25818
26047
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -26592,87 +26821,15 @@ const WidgetEditor = ({ widget, onChange }) => {
26592
26821
  }
26593
26822
  )
26594
26823
  ),
26595
- /* @__PURE__ */ jsxRuntime.jsxs(
26596
- "div",
26824
+ /* @__PURE__ */ jsxRuntime.jsx(
26825
+ CIImageSettingsControl,
26597
26826
  {
26598
- style: {
26599
- padding: 10,
26600
- border: "1px solid #e2e8f0",
26601
- borderRadius: 6,
26602
- background: "#f8fafc"
26603
- },
26604
- children: [
26605
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: t("imageProcessSettings") }),
26606
- /* @__PURE__ */ jsxRuntime.jsxs(
26607
- "select",
26608
- {
26609
- value: imageSettings.process || "",
26610
- onChange: (e) => updateOptions({
26611
- imageSettings: {
26612
- ...imageSettings,
26613
- process: e.target.value
26614
- }
26615
- }),
26616
- style: inputStyle,
26617
- children: [
26618
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: t("imageProcessNone") }),
26619
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "fit", children: t("imageProcessFit") }),
26620
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "widen", children: t("imageProcessWiden") })
26621
- ]
26622
- }
26623
- ),
26624
- (imageSettings.process === "fit" || imageSettings.process === "widen") && /* @__PURE__ */ jsxRuntime.jsxs(
26625
- "div",
26626
- {
26627
- style: {
26628
- display: "grid",
26629
- gridTemplateColumns: imageSettings.process === "fit" ? "1fr 1fr" : "1fr",
26630
- gap: 8,
26631
- marginTop: 8
26632
- },
26633
- children: [
26634
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
26635
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: t("cropWidth") }),
26636
- /* @__PURE__ */ jsxRuntime.jsx(
26637
- "input",
26638
- {
26639
- type: "number",
26640
- min: 50,
26641
- max: 3840,
26642
- value: imageSettings.cWidth ?? 640,
26643
- onChange: (e) => updateOptions({
26644
- imageSettings: {
26645
- ...imageSettings,
26646
- cWidth: Number(e.target.value) || 640
26647
- }
26648
- }),
26649
- style: inputStyle
26650
- }
26651
- )
26652
- ] }),
26653
- imageSettings.process === "fit" && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
26654
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: t("cropHeight") }),
26655
- /* @__PURE__ */ jsxRuntime.jsx(
26656
- "input",
26657
- {
26658
- type: "number",
26659
- min: 50,
26660
- max: 3840,
26661
- value: imageSettings.cHeight ?? 480,
26662
- onChange: (e) => updateOptions({
26663
- imageSettings: {
26664
- ...imageSettings,
26665
- cHeight: Number(e.target.value) || 480
26666
- }
26667
- }),
26668
- style: inputStyle
26669
- }
26670
- )
26671
- ] })
26672
- ]
26673
- }
26674
- )
26675
- ]
26827
+ label: t("imageProcessSettings"),
26828
+ value: imageSettings,
26829
+ onChange: (next) => updateOptions({ imageSettings: next }),
26830
+ defaultWidth: 640,
26831
+ defaultHeight: 480,
26832
+ locale
26676
26833
  }
26677
26834
  ),
26678
26835
  /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -26966,14 +27123,27 @@ const WidgetEditor = ({ widget, onChange }) => {
26966
27123
  }
26967
27124
  )
26968
27125
  ] }),
26969
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
26970
- SurveyWidgetEditor.StrapiMediaPicker,
26971
- {
26972
- label: t("youtubeCoverImage"),
26973
- value: currentThumbAsset,
26974
- onChange: handleCustomThumbnailChange
26975
- }
26976
- ) })
27126
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
27127
+ /* @__PURE__ */ jsxRuntime.jsx(
27128
+ SurveyWidgetEditor.StrapiMediaPicker,
27129
+ {
27130
+ label: t("youtubeCoverImage"),
27131
+ value: currentThumbAsset,
27132
+ onChange: handleCustomThumbnailChange
27133
+ }
27134
+ ),
27135
+ currentThumbAsset && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ jsxRuntime.jsx(
27136
+ CIImageSettingsControl,
27137
+ {
27138
+ value: options.imageSettings,
27139
+ onChange: (next) => updateOptions({ imageSettings: next }),
27140
+ defaultWidth: 1280,
27141
+ defaultHeight: 720,
27142
+ compact: true,
27143
+ locale
27144
+ }
27145
+ ) })
27146
+ ] })
26977
27147
  ]
26978
27148
  }
26979
27149
  ),
@@ -27205,6 +27375,17 @@ const WidgetEditor = ({ widget, onChange }) => {
27205
27375
  onChange: (asset) => updateData({ ...bnData, image: asset })
27206
27376
  }
27207
27377
  ) }),
27378
+ bnData.image && /* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldWrapStyle, children: /* @__PURE__ */ jsxRuntime.jsx(
27379
+ CIImageSettingsControl,
27380
+ {
27381
+ value: options.imageSettings,
27382
+ onChange: (next) => updateOptions({ imageSettings: next }),
27383
+ defaultWidth: 1600,
27384
+ defaultHeight: 600,
27385
+ compact: true,
27386
+ locale
27387
+ }
27388
+ ) }),
27208
27389
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldWrapStyle, children: [
27209
27390
  /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: t("title") }),
27210
27391
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -27933,7 +28114,7 @@ const BgOptionsEditor = ({
27933
28114
  showParallax = false,
27934
28115
  onChange
27935
28116
  }) => {
27936
- const { t } = SurveyWidgetEditor.useEditorContext();
28117
+ const { t, locale } = SurveyWidgetEditor.useEditorContext();
27937
28118
  const opts = bgOptions || {};
27938
28119
  const pOpts = parallaxOptions || {
27939
28120
  type: "scroll",
@@ -27969,6 +28150,17 @@ const BgOptionsEditor = ({
27969
28150
  gap: 8
27970
28151
  },
27971
28152
  children: [
28153
+ /* @__PURE__ */ jsxRuntime.jsx(
28154
+ CIImageSettingsControl,
28155
+ {
28156
+ value: opts.imageSettings,
28157
+ onChange: (next) => updateBgOpt("imageSettings", next),
28158
+ defaultWidth: 1920,
28159
+ defaultHeight: 1080,
28160
+ compact: true,
28161
+ locale
28162
+ }
28163
+ ),
27972
28164
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
27973
28165
  /* @__PURE__ */ jsxRuntime.jsx("label", { style: fieldLabelStyle, children: t("backgroundSize") }),
27974
28166
  /* @__PURE__ */ jsxRuntime.jsxs(