@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
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import React, { useState, useRef, useEffect, useMemo, useCallback } from "react";
3
3
  import { createPortal } from "react-dom";
4
- import { u as uid, a as useEditorTranslator, R as ROW_PRESETS, g as getRowPresetLabel, W as WIDGET_DEFINITIONS, b as getWidgetLabel, C as CIColorField, c as createWidget, d as createBlock, e as createRow, f as getWidgetDefinition, S as StrapiMediaPicker, D as DEVICES, r as resolveAdminMediaUrl, h as useStrapiLocales, i as useOptionalEditorContext, j as DEVICE_INDEX_MAP, k as useEditorContext, l as getDevice, m as useColorCodes, n as getDeviceLabel, o as WIDTH_PRESETS, Z as ZOOM_OPTIONS, p as ColorCodesModal, q as getWidgetDescription, s as WIDGET_CATEGORIES, t as normalizeLocalizedRecord, v as normalizeOptionListByLocales, w as getDeviceTooltip, x as SurveyWidgetEditor, y as getClipboard, z as copyToClipboard, E as EditorProvider, A as ensureIds } from "./SurveyWidgetEditor-BVN6X_3G.mjs";
5
- import { M as MaterialIcon } from "./index-hFIuYqu5.mjs";
4
+ import { u as uid, a as useEditorTranslator, R as ROW_PRESETS, g as getRowPresetLabel, W as WIDGET_DEFINITIONS, b as getWidgetLabel, C as CIColorField, c as createWidget, d as createBlock, e as createRow, f as getWidgetDefinition, S as StrapiMediaPicker, D as DEVICES, r as resolveAdminMediaUrl, h as useStrapiLocales, i as useOptionalEditorContext, j as DEVICE_INDEX_MAP, k as useEditorContext, l as getDevice, m as useColorCodes, n as getDeviceLabel, o as WIDTH_PRESETS, Z as ZOOM_OPTIONS, p as ColorCodesModal, q as getWidgetDescription, s as WIDGET_CATEGORIES, t as normalizeLocalizedRecord, v as normalizeOptionListByLocales, w as getDeviceTooltip, x as SurveyWidgetEditor, y as getClipboard, z as copyToClipboard, E as EditorProvider, A as ensureIds } from "./SurveyWidgetEditor-DGSwgTzR.mjs";
5
+ import { M as MaterialIcon } from "./index-Dc7AFLOj.mjs";
6
6
  import { Swiper, SwiperSlide } from "swiper/react";
7
7
  import { Navigation, Pagination, Autoplay, Parallax, EffectFade, EffectCreative, EffectCoverflow, EffectCube, EffectFlip, Mousewheel } from "swiper/modules";
8
8
  import { useFetchClient, useStrapiApp } from "@strapi/strapi/admin";
@@ -1069,6 +1069,45 @@ function blockCanvasClasses(block = {}) {
1069
1069
  }
1070
1070
  return classes;
1071
1071
  }
1072
+ function resolveCanvasMediaUrl(assetOrUrl, imageSettings) {
1073
+ if (!assetOrUrl) return "";
1074
+ const asset = typeof assetOrUrl === "object" ? assetOrUrl : null;
1075
+ const preferredUrl = typeof assetOrUrl === "string" ? assetOrUrl : asset?.optimized_url || asset?.target_url || asset?.url || asset?.src || "";
1076
+ const origUrl = typeof assetOrUrl === "string" ? assetOrUrl : asset?.original_url || asset?.url || asset?.target_url || preferredUrl;
1077
+ if (!preferredUrl && !origUrl) return "";
1078
+ const proc = String(imageSettings?.process || "").trim().toLowerCase();
1079
+ if (proc === "none" || proc === "no-process") {
1080
+ return origUrl || preferredUrl;
1081
+ }
1082
+ if (!proc || proc === "auto") {
1083
+ return preferredUrl || origUrl;
1084
+ }
1085
+ if (proc !== "fit" && proc !== "widen") {
1086
+ return preferredUrl || origUrl;
1087
+ }
1088
+ const w = Number(imageSettings?.cWidth) || 0;
1089
+ const h = proc === "fit" ? Number(imageSettings?.cHeight) || 0 : 0;
1090
+ const rotate = Number(imageSettings?.rotate) || 0;
1091
+ if (w <= 0 && h <= 0) {
1092
+ return preferredUrl || origUrl;
1093
+ }
1094
+ const formatKey = `ci_${proc}_${w}x${h}${rotate ? `_r${rotate}` : ""}`;
1095
+ const directVariantUrl = asset?.formats?.[formatKey]?.url;
1096
+ if (directVariantUrl) {
1097
+ return directVariantUrl;
1098
+ }
1099
+ const baseSrc = origUrl || preferredUrl;
1100
+ 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")) {
1101
+ return baseSrc;
1102
+ }
1103
+ const params = new URLSearchParams();
1104
+ params.set("src", baseSrc);
1105
+ params.set("process", proc);
1106
+ if (w > 0) params.set("w", String(w));
1107
+ if (proc === "fit" && h > 0) params.set("h", String(h));
1108
+ if (rotate) params.set("rotate", String(rotate));
1109
+ return `/api/content-input/image?${params.toString()}`;
1110
+ }
1072
1111
  function nodeCanvasStyles(node) {
1073
1112
  const so = node?.styleOptions || {};
1074
1113
  const style = {};
@@ -1100,7 +1139,8 @@ function nodeCanvasStyles(node) {
1100
1139
  style.borderRadius = so.borderRadius || so["border-radius"];
1101
1140
  }
1102
1141
  const bgOpts = node?.bgOptions || {};
1103
- const bgUrl = node?.bgImage?.target_url || node?.bgImage?.url || bgOpts?.bgImage?.target_url || bgOpts?.bgImage?.url;
1142
+ const bgAsset = node?.bgImage || bgOpts?.bgImage;
1143
+ const bgUrl = resolveCanvasMediaUrl(bgAsset, bgOpts?.imageSettings);
1104
1144
  if (bgUrl) {
1105
1145
  style.backgroundImage = `url("${bgUrl}")`;
1106
1146
  style.backgroundSize = bgOpts["background-size"] || bgOpts.size || "cover";
@@ -2708,7 +2748,7 @@ function summarizeRowWidgets(row, locale, tr) {
2708
2748
  }
2709
2749
  return `${blocks.length} ${tr ? "blok" : "blocks"} (${widgetLabels.join(", ")})`;
2710
2750
  }
2711
- const inputStyle$7 = {
2751
+ const inputStyle$8 = {
2712
2752
  width: "100%",
2713
2753
  padding: "6px 9px",
2714
2754
  fontSize: 12,
@@ -2717,7 +2757,7 @@ const inputStyle$7 = {
2717
2757
  background: "#fff",
2718
2758
  color: "#1e293b"
2719
2759
  };
2720
- const labelStyle$7 = {
2760
+ const labelStyle$8 = {
2721
2761
  display: "block",
2722
2762
  fontSize: 11,
2723
2763
  fontWeight: 600,
@@ -2906,13 +2946,13 @@ const TabAccordionEditor = ({ widget, onChange }) => {
2906
2946
  /* @__PURE__ */ 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" }),
2907
2947
  isTab ? /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
2908
2948
  /* @__PURE__ */ jsxs("div", { children: [
2909
- /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Sekme Yönü" : "Tab Direction" }),
2949
+ /* @__PURE__ */ jsx("label", { style: labelStyle$8, children: tr ? "Sekme Yönü" : "Tab Direction" }),
2910
2950
  /* @__PURE__ */ jsxs(
2911
2951
  "select",
2912
2952
  {
2913
2953
  value: options.vertical ? "vertical" : "horizontal",
2914
2954
  onChange: (e) => updateOptions({ vertical: e.target.value === "vertical" }),
2915
- style: inputStyle$7,
2955
+ style: inputStyle$8,
2916
2956
  children: [
2917
2957
  /* @__PURE__ */ jsx("option", { value: "horizontal", children: tr ? "Yatay (Üst Sekmeler)" : "Horizontal (Top Tabs)" }),
2918
2958
  /* @__PURE__ */ jsx("option", { value: "vertical", children: tr ? "Düşey (Sol Yan Sekmeler)" : "Vertical (Side Tabs)" })
@@ -2921,7 +2961,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
2921
2961
  )
2922
2962
  ] }),
2923
2963
  /* @__PURE__ */ jsxs("div", { children: [
2924
- /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Hizalama" : "Alignment" }),
2964
+ /* @__PURE__ */ jsx("label", { style: labelStyle$8, children: tr ? "Hizalama" : "Alignment" }),
2925
2965
  /* @__PURE__ */ jsxs(
2926
2966
  "select",
2927
2967
  {
@@ -2934,7 +2974,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
2934
2974
  right: v === "right"
2935
2975
  });
2936
2976
  },
2937
- style: inputStyle$7,
2977
+ style: inputStyle$8,
2938
2978
  children: [
2939
2979
  /* @__PURE__ */ jsx("option", { value: "left", children: tr ? "Sola Yaslı" : "Left" }),
2940
2980
  /* @__PURE__ */ jsx("option", { value: "center", children: tr ? "Ortalı" : "Centered" }),
@@ -3029,7 +3069,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
3029
3069
  }
3030
3070
  ),
3031
3071
  isTab ? /* @__PURE__ */ jsxs("div", { children: [
3032
- /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Çizgi Kalınlığı (px)" : "Line Height (px)" }),
3072
+ /* @__PURE__ */ jsx("label", { style: labelStyle$8, children: tr ? "Çizgi Kalınlığı (px)" : "Line Height (px)" }),
3033
3073
  /* @__PURE__ */ jsx(
3034
3074
  "input",
3035
3075
  {
@@ -3040,7 +3080,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
3040
3080
  onChange: (e) => updateOptions({
3041
3081
  indicatorHeight: Math.max(1, Math.min(10, Number(e.target.value) || 3))
3042
3082
  }),
3043
- style: inputStyle$7
3083
+ style: inputStyle$8
3044
3084
  }
3045
3085
  )
3046
3086
  ] }) : /* @__PURE__ */ jsx(
@@ -3168,7 +3208,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
3168
3208
  placeholder: tr ? `${itemLabel} başlığı / sorusu...` : `${itemLabel} title / question...`,
3169
3209
  onChange: (e) => updateSingleNode(idx, { title: e.target.value }),
3170
3210
  style: {
3171
- ...inputStyle$7,
3211
+ ...inputStyle$8,
3172
3212
  fontWeight: 600,
3173
3213
  padding: "4px 8px",
3174
3214
  flex: 1
@@ -3919,7 +3959,7 @@ function appendToParentByUid(items, parentUid, newNodes) {
3919
3959
  }
3920
3960
  return false;
3921
3961
  }
3922
- const inputStyle$6 = {
3962
+ const inputStyle$7 = {
3923
3963
  width: "100%",
3924
3964
  padding: "6px 9px",
3925
3965
  fontSize: 12,
@@ -3928,7 +3968,7 @@ const inputStyle$6 = {
3928
3968
  background: "#fff",
3929
3969
  color: "#1e293b"
3930
3970
  };
3931
- const labelStyle$6 = {
3971
+ const labelStyle$7 = {
3932
3972
  display: "block",
3933
3973
  fontSize: 11,
3934
3974
  fontWeight: 600,
@@ -4463,31 +4503,31 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4463
4503
  },
4464
4504
  children: [
4465
4505
  /* @__PURE__ */ jsxs("div", { children: [
4466
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Başlık" : "Title" }),
4506
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Başlık" : "Title" }),
4467
4507
  /* @__PURE__ */ jsx(
4468
4508
  "input",
4469
4509
  {
4470
4510
  type: "text",
4471
4511
  value: node.title,
4472
4512
  onChange: (e) => handleUpdateNodeField(currentPath, { title: e.target.value }),
4473
- style: inputStyle$6
4513
+ style: inputStyle$7
4474
4514
  }
4475
4515
  )
4476
4516
  ] }),
4477
4517
  /* @__PURE__ */ jsxs("div", { children: [
4478
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "URL / Bağlantı" : "URL / Link" }),
4518
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "URL / Bağlantı" : "URL / Link" }),
4479
4519
  /* @__PURE__ */ jsx(
4480
4520
  "input",
4481
4521
  {
4482
4522
  type: "text",
4483
4523
  value: node.url,
4484
4524
  onChange: (e) => handleUpdateNodeField(currentPath, { url: e.target.value }),
4485
- style: inputStyle$6
4525
+ style: inputStyle$7
4486
4526
  }
4487
4527
  )
4488
4528
  ] }),
4489
4529
  /* @__PURE__ */ jsxs("div", { children: [
4490
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Hedef" : "Target" }),
4530
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Hedef" : "Target" }),
4491
4531
  /* @__PURE__ */ jsxs(
4492
4532
  "select",
4493
4533
  {
@@ -4495,7 +4535,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4495
4535
  onChange: (e) => handleUpdateNodeField(currentPath, {
4496
4536
  target: e.target.value
4497
4537
  }),
4498
- style: inputStyle$6,
4538
+ style: inputStyle$7,
4499
4539
  children: [
4500
4540
  /* @__PURE__ */ jsx("option", { value: "_self", children: tr ? "Aynı Sekme (_self)" : "Same Tab (_self)" }),
4501
4541
  /* @__PURE__ */ jsx("option", { value: "_blank", children: tr ? "Yeni Sekme (_blank)" : "New Tab (_blank)" })
@@ -4504,7 +4544,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4504
4544
  )
4505
4545
  ] }),
4506
4546
  /* @__PURE__ */ jsxs("div", { children: [
4507
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "İkon (Opsiyonel)" : "Icon (Optional)" }),
4547
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "İkon (Opsiyonel)" : "Icon (Optional)" }),
4508
4548
  /* @__PURE__ */ jsx(
4509
4549
  "input",
4510
4550
  {
@@ -4512,7 +4552,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4512
4552
  value: node.icon || "",
4513
4553
  placeholder: "e.g. home, business, mail",
4514
4554
  onChange: (e) => handleUpdateNodeField(currentPath, { icon: e.target.value }),
4515
- style: inputStyle$6
4555
+ style: inputStyle$7
4516
4556
  }
4517
4557
  )
4518
4558
  ] })
@@ -4613,7 +4653,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4613
4653
  },
4614
4654
  children: [
4615
4655
  /* @__PURE__ */ jsxs("div", { style: { marginBottom: 10 }, children: [
4616
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Menü Görünüm Yönü (Yatay / Düşey)" : "Menu Orientation (Horizontal / Vertical)" }),
4656
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Menü Görünüm Yönü (Yatay / Düşey)" : "Menu Orientation (Horizontal / Vertical)" }),
4617
4657
  /* @__PURE__ */ jsxs(
4618
4658
  "div",
4619
4659
  {
@@ -4695,14 +4735,14 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4695
4735
  )
4696
4736
  ] }),
4697
4737
  /* @__PURE__ */ jsxs("div", { style: { marginBottom: 8 }, children: [
4698
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Veritabanında Kayıtlı Menülerden Yükle (PostgreSQL)" : "Load from Saved Database Menus (PostgreSQL)" }),
4738
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Veritabanında Kayıtlı Menülerden Yükle (PostgreSQL)" : "Load from Saved Database Menus (PostgreSQL)" }),
4699
4739
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 6 }, children: [
4700
4740
  /* @__PURE__ */ jsxs(
4701
4741
  "select",
4702
4742
  {
4703
4743
  value: selectedDbMenuId,
4704
4744
  onChange: (e) => handleLoadDbMenu(e.target.value),
4705
- style: { ...inputStyle$6, flex: 1 },
4745
+ style: { ...inputStyle$7, flex: 1 },
4706
4746
  children: [
4707
4747
  /* @__PURE__ */ jsx("option", { value: "", children: tr ? "-- Kayıtlı Menü Seçin veya Özel Oluşturun --" : "-- Select a Saved Menu or Create Custom --" }),
4708
4748
  savedMenus.map((m) => /* @__PURE__ */ jsxs("option", { value: String(m._id || m.id), children: [
@@ -4738,26 +4778,26 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4738
4778
  ] }),
4739
4779
  /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
4740
4780
  /* @__PURE__ */ jsxs("div", { children: [
4741
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Menü Başlığı" : "Menu Title" }),
4781
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Menü Başlığı" : "Menu Title" }),
4742
4782
  /* @__PURE__ */ jsx(
4743
4783
  "input",
4744
4784
  {
4745
4785
  type: "text",
4746
4786
  value: menuMeta.name,
4747
4787
  onChange: (e) => commitMenu(items, { name: e.target.value }),
4748
- style: inputStyle$6
4788
+ style: inputStyle$7
4749
4789
  }
4750
4790
  )
4751
4791
  ] }),
4752
4792
  /* @__PURE__ */ jsxs("div", { children: [
4753
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Menü Kodu (Slug)" : "Menu Code (Slug)" }),
4793
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Menü Kodu (Slug)" : "Menu Code (Slug)" }),
4754
4794
  /* @__PURE__ */ jsx(
4755
4795
  "input",
4756
4796
  {
4757
4797
  type: "text",
4758
4798
  value: menuMeta.id,
4759
4799
  onChange: (e) => commitMenu(items, { id: e.target.value }),
4760
- style: inputStyle$6
4800
+ style: inputStyle$7
4761
4801
  }
4762
4802
  )
4763
4803
  ] })
@@ -4926,13 +4966,13 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4926
4966
  ),
4927
4967
  /* @__PURE__ */ jsxs("div", { style: { padding: 10 }, children: [
4928
4968
  /* @__PURE__ */ jsxs("div", { style: { marginBottom: 8 }, children: [
4929
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Eklenecek Konum (Üst Menü Öğesi)" : "Target Location (Parent Menu Item)" }),
4969
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Eklenecek Konum (Üst Menü Öğesi)" : "Target Location (Parent Menu Item)" }),
4930
4970
  /* @__PURE__ */ jsxs(
4931
4971
  "select",
4932
4972
  {
4933
4973
  value: targetParentUid,
4934
4974
  onChange: (e) => setTargetParentUid(e.target.value),
4935
- style: inputStyle$6,
4975
+ style: inputStyle$7,
4936
4976
  children: [
4937
4977
  /* @__PURE__ */ jsx("option", { value: "__root__", children: tr ? "Ana (Kök) Düzeye Ekle" : "Add to Root Level" }),
4938
4978
  flatParentChoices.map((ch) => /* @__PURE__ */ jsxs("option", { value: ch._uId, children: [
@@ -4957,7 +4997,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4957
4997
  },
4958
4998
  children: [
4959
4999
  /* @__PURE__ */ jsxs("div", { children: [
4960
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Strapi Modülü (Content-Type)" : "Strapi Content-Type" }),
5000
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Strapi Modülü (Content-Type)" : "Strapi Content-Type" }),
4961
5001
  /* @__PURE__ */ jsx(
4962
5002
  "select",
4963
5003
  {
@@ -4966,7 +5006,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4966
5006
  setSelectedEntityUid(e.target.value);
4967
5007
  setCheckedEntityMap({});
4968
5008
  },
4969
- style: inputStyle$6,
5009
+ style: inputStyle$7,
4970
5010
  children: entityTypes.length === 0 ? /* @__PURE__ */ jsx("option", { value: "api::page.page", children: tr ? "Sayfalar (api::page.page)" : "Pages (api::page.page)" }) : entityTypes.map((ct) => /* @__PURE__ */ jsxs("option", { value: ct.uid, children: [
4971
5011
  ct.displayName,
4972
5012
  " (",
@@ -5036,7 +5076,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5036
5076
  value: entitySearch,
5037
5077
  onChange: (e) => setEntitySearch(e.target.value),
5038
5078
  placeholder: tr ? "Strapi kayıtlarında başlık veya URL ara..." : "Search title or URL in Strapi entries...",
5039
- style: { ...inputStyle$6, paddingLeft: 28 }
5079
+ style: { ...inputStyle$7, paddingLeft: 28 }
5040
5080
  }
5041
5081
  ),
5042
5082
  /* @__PURE__ */ jsx("span", { style: { position: "absolute", left: 8, top: 7, pointerEvents: "none" }, children: /* @__PURE__ */ jsx(MaterialIcon, { name: "search", size: 15, color: "#94a3b8" }) })
@@ -5111,7 +5151,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5111
5151
  ] }) : /* @__PURE__ */ jsxs("div", { children: [
5112
5152
  /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
5113
5153
  /* @__PURE__ */ jsxs("div", { children: [
5114
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Bağlantı Başlığı" : "Link Title" }),
5154
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Bağlantı Başlığı" : "Link Title" }),
5115
5155
  /* @__PURE__ */ jsx(
5116
5156
  "input",
5117
5157
  {
@@ -5119,12 +5159,12 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5119
5159
  value: customTitle,
5120
5160
  onChange: (e) => setCustomTitle(e.target.value),
5121
5161
  placeholder: tr ? "örn: Kurumsal Portal" : "e.g. Corporate Portal",
5122
- style: inputStyle$6
5162
+ style: inputStyle$7
5123
5163
  }
5124
5164
  )
5125
5165
  ] }),
5126
5166
  /* @__PURE__ */ jsxs("div", { children: [
5127
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Bağlantı URL" : "Link URL" }),
5167
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Bağlantı URL" : "Link URL" }),
5128
5168
  /* @__PURE__ */ jsx(
5129
5169
  "input",
5130
5170
  {
@@ -5132,20 +5172,20 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5132
5172
  value: customUrl,
5133
5173
  onChange: (e) => setCustomUrl(e.target.value),
5134
5174
  placeholder: "https://... or /about",
5135
- style: inputStyle$6
5175
+ style: inputStyle$7
5136
5176
  }
5137
5177
  )
5138
5178
  ] })
5139
5179
  ] }),
5140
5180
  /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
5141
5181
  /* @__PURE__ */ jsxs("div", { children: [
5142
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Hedef Sekme" : "Target Tab" }),
5182
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Hedef Sekme" : "Target Tab" }),
5143
5183
  /* @__PURE__ */ jsxs(
5144
5184
  "select",
5145
5185
  {
5146
5186
  value: customTarget,
5147
5187
  onChange: (e) => setCustomTarget(e.target.value),
5148
- style: inputStyle$6,
5188
+ style: inputStyle$7,
5149
5189
  children: [
5150
5190
  /* @__PURE__ */ jsx("option", { value: "_self", children: tr ? "Aynı Sekme (_self)" : "Same Tab (_self)" }),
5151
5191
  /* @__PURE__ */ jsx("option", { value: "_blank", children: tr ? "Yeni Sekme (_blank)" : "New Tab (_blank)" })
@@ -5154,7 +5194,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5154
5194
  )
5155
5195
  ] }),
5156
5196
  /* @__PURE__ */ jsxs("div", { children: [
5157
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "İkon (Opsiyonel)" : "Icon (Optional)" }),
5197
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "İkon (Opsiyonel)" : "Icon (Optional)" }),
5158
5198
  /* @__PURE__ */ jsx(
5159
5199
  "input",
5160
5200
  {
@@ -5162,7 +5202,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5162
5202
  value: customIcon,
5163
5203
  onChange: (e) => setCustomIcon(e.target.value),
5164
5204
  placeholder: "e.g. home, launch",
5165
- style: inputStyle$6
5205
+ style: inputStyle$7
5166
5206
  }
5167
5207
  )
5168
5208
  ] })
@@ -5586,6 +5626,130 @@ const UnitInput = ({
5586
5626
  )
5587
5627
  ] });
5588
5628
  };
5629
+ const inputStyle$6 = {
5630
+ width: "100%",
5631
+ padding: "6px 8px",
5632
+ fontSize: 12,
5633
+ border: "1px solid #cbd5e1",
5634
+ borderRadius: 5,
5635
+ background: "#ffffff",
5636
+ color: "#0f172a"
5637
+ };
5638
+ const labelStyle$6 = {
5639
+ display: "block",
5640
+ fontSize: 11,
5641
+ fontWeight: 600,
5642
+ color: "#475569",
5643
+ marginBottom: 4
5644
+ };
5645
+ const CIImageSettingsControl = ({
5646
+ value,
5647
+ onChange,
5648
+ locale = "en",
5649
+ label,
5650
+ defaultWidth = 800,
5651
+ defaultHeight = 600,
5652
+ compact = false
5653
+ }) => {
5654
+ const tr = String(locale || "en").toLowerCase().startsWith("tr");
5655
+ const rawProc = String(value?.process || "");
5656
+ const mode = rawProc === "fit" ? "fit" : rawProc === "widen" ? "widen" : rawProc === "none" || rawProc === "no-process" ? "none" : "auto";
5657
+ const cWidth = Number(value?.cWidth) || defaultWidth;
5658
+ const cHeight = Number(value?.cHeight) || defaultHeight;
5659
+ const headingText = label || (tr ? "Görsel Optimizasyon & Boyutlandırma (Sharp / CDN WebP)" : "Image Optimization & Sizing (Sharp / CDN WebP)");
5660
+ return /* @__PURE__ */ jsxs(
5661
+ "div",
5662
+ {
5663
+ style: {
5664
+ padding: compact ? 8 : 10,
5665
+ border: "1px solid #e2e8f0",
5666
+ borderRadius: 6,
5667
+ background: "#f8fafc",
5668
+ display: "flex",
5669
+ flexDirection: "column",
5670
+ gap: 8
5671
+ },
5672
+ children: [
5673
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 5 }, children: [
5674
+ /* @__PURE__ */ jsx(MaterialIcon, { name: "auto_fix_high", size: 14, color: "#2669a0" }),
5675
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 11, fontWeight: 700, color: "#1e293b" }, children: headingText })
5676
+ ] }),
5677
+ /* @__PURE__ */ jsxs(
5678
+ "select",
5679
+ {
5680
+ value: mode,
5681
+ onChange: (e) => {
5682
+ const nextMode = e.target.value;
5683
+ onChange({
5684
+ ...value || {},
5685
+ process: nextMode === "auto" ? "" : nextMode,
5686
+ cWidth,
5687
+ cHeight
5688
+ });
5689
+ },
5690
+ style: inputStyle$6,
5691
+ children: [
5692
+ /* @__PURE__ */ jsx("option", { value: "auto", children: tr ? "Otomatik Optimize (WebP • ci-optimized)" : "Auto Optimize (WebP • ci-optimized)" }),
5693
+ /* @__PURE__ */ jsx("option", { value: "fit", children: tr ? "Tam Boyut / Kırparak Sığdır (Fit W × H WebP)" : "Exact Fit / Crop (Fit W × H WebP)" }),
5694
+ /* @__PURE__ */ jsx("option", { value: "widen", children: tr ? "Genişliğe Ölçekle (Widen W WebP)" : "Scale to Width (Widen W WebP)" }),
5695
+ /* @__PURE__ */ jsx("option", { value: "none", children: tr ? "Orijinal Dosya (Sharp İşlemi Yok)" : "Original File (No Sharp Processing)" })
5696
+ ]
5697
+ }
5698
+ ),
5699
+ (mode === "fit" || mode === "widen") && /* @__PURE__ */ jsxs(
5700
+ "div",
5701
+ {
5702
+ style: {
5703
+ display: "grid",
5704
+ gridTemplateColumns: mode === "fit" ? "1fr 1fr" : "1fr",
5705
+ gap: 8
5706
+ },
5707
+ children: [
5708
+ /* @__PURE__ */ jsxs("div", { children: [
5709
+ /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Genişlik (px)" : "Width (px)" }),
5710
+ /* @__PURE__ */ jsx(
5711
+ "input",
5712
+ {
5713
+ type: "number",
5714
+ min: 50,
5715
+ max: 3840,
5716
+ value: cWidth,
5717
+ onChange: (e) => onChange({
5718
+ ...value || {},
5719
+ process: mode,
5720
+ cWidth: Number(e.target.value) || defaultWidth,
5721
+ cHeight
5722
+ }),
5723
+ style: inputStyle$6
5724
+ }
5725
+ )
5726
+ ] }),
5727
+ mode === "fit" && /* @__PURE__ */ jsxs("div", { children: [
5728
+ /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Yükseklik (px)" : "Height (px)" }),
5729
+ /* @__PURE__ */ jsx(
5730
+ "input",
5731
+ {
5732
+ type: "number",
5733
+ min: 50,
5734
+ max: 3840,
5735
+ value: cHeight,
5736
+ onChange: (e) => onChange({
5737
+ ...value || {},
5738
+ process: mode,
5739
+ cWidth,
5740
+ cHeight: Number(e.target.value) || defaultHeight
5741
+ }),
5742
+ style: inputStyle$6
5743
+ }
5744
+ )
5745
+ ] })
5746
+ ]
5747
+ }
5748
+ )
5749
+ ]
5750
+ }
5751
+ );
5752
+ };
5589
5753
  function resolveEntityCardPreviewData(rawData, rawOptions, locale = "en") {
5590
5754
  const tr = locale === "tr";
5591
5755
  const data = rawData && typeof rawData === "object" ? rawData : {};
@@ -7093,6 +7257,23 @@ const EntityCardWidgetEditor = ({
7093
7257
  )
7094
7258
  ] })
7095
7259
  ] }),
7260
+ /* @__PURE__ */ jsx(
7261
+ CIImageSettingsControl,
7262
+ {
7263
+ value: options.imageSettings || cardProps.imageSettings,
7264
+ onChange: (next) => onChange({
7265
+ options: {
7266
+ ...options,
7267
+ imageSettings: next,
7268
+ cardProps: { ...cardProps, imageSettings: next }
7269
+ }
7270
+ }),
7271
+ defaultWidth: 960,
7272
+ defaultHeight: 540,
7273
+ compact: true,
7274
+ locale
7275
+ }
7276
+ ),
7096
7277
  /* @__PURE__ */ jsx(
7097
7278
  CIColorField,
7098
7279
  {
@@ -10861,6 +11042,17 @@ const HeroSliderStudioModal = ({
10861
11042
  onChange: (asset) => updateLayer(selectedLayerIdx, { image: asset })
10862
11043
  }
10863
11044
  ),
11045
+ activeLayer.image && /* @__PURE__ */ jsx(
11046
+ CIImageSettingsControl,
11047
+ {
11048
+ value: activeLayer.imageSettings,
11049
+ onChange: (next) => updateLayer(selectedLayerIdx, { imageSettings: next }),
11050
+ defaultWidth: 1e3,
11051
+ defaultHeight: 1e3,
11052
+ compact: true,
11053
+ locale: uiLocale
11054
+ }
11055
+ ),
10864
11056
  activeLayer.positionMode !== "free" && /* @__PURE__ */ jsxs("div", { children: [
10865
11057
  /* @__PURE__ */ jsx("label", { style: labelStyle$4, children: tr ? "Görsel Genişliği" : "Image Width" }),
10866
11058
  /* @__PURE__ */ jsx(
@@ -11254,14 +11446,27 @@ const HeroSliderStudioModal = ({
11254
11446
  }
11255
11447
  )
11256
11448
  ] }),
11257
- activeSlide.bgType === "image" && /* @__PURE__ */ jsx(
11258
- StrapiMediaPicker,
11259
- {
11260
- label: tr ? "Slayt Arka Plan Görseli" : "Slide Background Image",
11261
- value: activeSlide.bgImage || null,
11262
- onChange: (asset) => updateSlide(selectedSlideIdx, { bgImage: asset })
11263
- }
11264
- ),
11449
+ activeSlide.bgType === "image" && /* @__PURE__ */ jsxs(Fragment, { children: [
11450
+ /* @__PURE__ */ jsx(
11451
+ StrapiMediaPicker,
11452
+ {
11453
+ label: tr ? "Slayt Arka Plan Görseli" : "Slide Background Image",
11454
+ value: activeSlide.bgImage || null,
11455
+ onChange: (asset) => updateSlide(selectedSlideIdx, { bgImage: asset })
11456
+ }
11457
+ ),
11458
+ activeSlide.bgImage && /* @__PURE__ */ jsx(
11459
+ CIImageSettingsControl,
11460
+ {
11461
+ value: activeSlide.imageSettings,
11462
+ onChange: (next) => updateSlide(selectedSlideIdx, { imageSettings: next }),
11463
+ defaultWidth: 1920,
11464
+ defaultHeight: 1080,
11465
+ compact: true,
11466
+ locale: uiLocale
11467
+ }
11468
+ )
11469
+ ] }),
11265
11470
  activeSlide.bgType === "gradient" && /* @__PURE__ */ jsxs("div", { children: [
11266
11471
  /* @__PURE__ */ jsx("label", { style: labelStyle$4, children: "CSS Gradient" }),
11267
11472
  /* @__PURE__ */ jsx(
@@ -11338,14 +11543,27 @@ const HeroSliderStudioModal = ({
11338
11543
  ]
11339
11544
  }
11340
11545
  ),
11341
- activeSlide.mobileBgType === "image" && /* @__PURE__ */ jsx(
11342
- StrapiMediaPicker,
11343
- {
11344
- label: tr ? "Mobil Dikey Görsel" : "Mobile Portrait Image",
11345
- value: activeSlide.mobileBgImage || null,
11346
- onChange: (asset) => updateSlide(selectedSlideIdx, { mobileBgImage: asset })
11347
- }
11348
- ),
11546
+ activeSlide.mobileBgType === "image" && /* @__PURE__ */ jsxs(Fragment, { children: [
11547
+ /* @__PURE__ */ jsx(
11548
+ StrapiMediaPicker,
11549
+ {
11550
+ label: tr ? "Mobil Dikey Görsel" : "Mobile Portrait Image",
11551
+ value: activeSlide.mobileBgImage || null,
11552
+ onChange: (asset) => updateSlide(selectedSlideIdx, { mobileBgImage: asset })
11553
+ }
11554
+ ),
11555
+ activeSlide.mobileBgImage && /* @__PURE__ */ jsx(
11556
+ CIImageSettingsControl,
11557
+ {
11558
+ value: activeSlide.mobileImageSettings,
11559
+ onChange: (next) => updateSlide(selectedSlideIdx, { mobileImageSettings: next }),
11560
+ defaultWidth: 1080,
11561
+ defaultHeight: 1350,
11562
+ compact: true,
11563
+ locale: uiLocale
11564
+ }
11565
+ )
11566
+ ] }),
11349
11567
  activeSlide.mobileBgType === "gradient" && /* @__PURE__ */ jsx(
11350
11568
  "input",
11351
11569
  {
@@ -15633,6 +15851,17 @@ const CustomCardStudioModal = ({
15633
15851
  compact: true,
15634
15852
  locale: uiLocale
15635
15853
  }
15854
+ ),
15855
+ /* @__PURE__ */ jsx(
15856
+ CIImageSettingsControl,
15857
+ {
15858
+ value: data.design.imageSettings,
15859
+ onChange: (next) => updateDesign({ imageSettings: next }),
15860
+ defaultWidth: 960,
15861
+ defaultHeight: 540,
15862
+ compact: true,
15863
+ locale: uiLocale
15864
+ }
15636
15865
  )
15637
15866
  ] }),
15638
15867
  rightTab === "layout" && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
@@ -16019,23 +16248,8 @@ function resolveYoutubeVideoId(raw) {
16019
16248
  if (extracted === "dQw4w9WgXcQ") return "M7lc1UVf-VE";
16020
16249
  return extracted;
16021
16250
  }
16022
- function buildSharpImageUrl(rawUrl, imageSettings) {
16023
- if (!rawUrl) return "";
16024
- if (!imageSettings || !imageSettings.process) return rawUrl;
16025
- const proc = String(imageSettings.process).toLowerCase();
16026
- if (proc !== "fit" && proc !== "widen") return rawUrl;
16027
- const w = Number(imageSettings.cWidth) || 0;
16028
- const h = Number(imageSettings.cHeight) || 0;
16029
- if (w <= 0 && h <= 0) return rawUrl;
16030
- if (rawUrl.includes("/api/content-input/image") || rawUrl.includes("/content-input/image")) {
16031
- return rawUrl;
16032
- }
16033
- const params = new URLSearchParams();
16034
- params.set("src", rawUrl);
16035
- params.set("process", proc);
16036
- if (w > 0) params.set("w", String(w));
16037
- if (proc === "fit" && h > 0) params.set("h", String(h));
16038
- return `/api/content-input/image?${params.toString()}`;
16251
+ function buildSharpImageUrl(assetOrUrl, imageSettings) {
16252
+ return resolveCanvasMediaUrl(assetOrUrl, imageSettings);
16039
16253
  }
16040
16254
  function pickLocalized(val, locale, fallback = "") {
16041
16255
  if (!val) return fallback;
@@ -17760,7 +17974,8 @@ const WidgetPreview = ({
17760
17974
  ) });
17761
17975
  }
17762
17976
  if (id === "singleImage") {
17763
- const imgUrl = data?.image?.target_url || data?.image?.url || data?.url || "";
17977
+ const imgAsset = data?.image || data?.url || "";
17978
+ const imgUrl = buildSharpImageUrl(imgAsset, options?.imageSettings || data?.imageSettings);
17764
17979
  const alt = data?.alt || data?.image?.caption || t("widgets.singleImage.label");
17765
17980
  const caption = data?.caption || "";
17766
17981
  const borderRadius = toCssLength(data?.borderRadius, "4px");
@@ -17879,7 +18094,7 @@ const WidgetPreview = ({
17879
18094
  if (galleryPopupIndex === null || typeof document === "undefined") return null;
17880
18095
  const safePopIdx = (galleryPopupIndex % images.length + images.length) % images.length;
17881
18096
  const popImg = images[safePopIdx];
17882
- const popUrl = popImg?.target_url || popImg?.url || "";
18097
+ const popUrl = popImg?.formats?.ci_auto_1920x0?.url || popImg?.optimized_url || popImg?.target_url || popImg?.url || "";
17883
18098
  const popCaption = popImg?.caption || popImg?.filename || `${t("widgets.gallery.label")} ${safePopIdx + 1}`;
17884
18099
  return createPortal(
17885
18100
  /* @__PURE__ */ jsx(
@@ -18083,7 +18298,7 @@ const WidgetPreview = ({
18083
18298
  children: /* @__PURE__ */ jsx(
18084
18299
  "img",
18085
18300
  {
18086
- src: buildSharpImageUrl(img.target_url || img.url, imageSettings),
18301
+ src: buildSharpImageUrl(img, imageSettings),
18087
18302
  alt: img.caption || `${t("widgets.gallery.label")} ${i + 1}`,
18088
18303
  style: {
18089
18304
  width: "100%",
@@ -18169,8 +18384,8 @@ const WidgetPreview = ({
18169
18384
  onSlideChange: (s) => setGalleryIndex(s.realIndex ?? s.activeIndex ?? 0),
18170
18385
  style: { width: "100%" },
18171
18386
  children: images.map((item, index) => {
18172
- const rawSlideUrl = item?.target_url || item?.url || "";
18173
- const slideUrl = buildSharpImageUrl(rawSlideUrl, imageSettings);
18387
+ const rawSlideUrl = item?.optimized_url || item?.target_url || item?.url || "";
18388
+ const slideUrl = buildSharpImageUrl(item, imageSettings);
18174
18389
  return /* @__PURE__ */ jsx(SwiperSlide, { children: /* @__PURE__ */ jsxs(
18175
18390
  "div",
18176
18391
  {
@@ -18299,7 +18514,8 @@ const WidgetPreview = ({
18299
18514
  const title = first?.title || first?.snippet?.title || t("widgets.youtubeVideo.label");
18300
18515
  const activeTitle = activeVideo?.title || activeVideo?.snippet?.title || title;
18301
18516
  const description = first?.description || first?.snippet?.description || "";
18302
- 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 || "";
18517
+ const customThumbAsset = first?.customThumbnail || first?.image || options?.thumbnailImage || options?.bgImage || null;
18518
+ const customThumbUrl = customThumbAsset ? buildSharpImageUrl(customThumbAsset, options?.imageSettings) : "";
18303
18519
  const rawThumb = first?.thumbnail || first?.snippet?.thumbnails?.high?.url || "";
18304
18520
  const safeRawThumb = rawThumb && !rawThumb.includes("dQw4w9WgXcQ") ? rawThumb : `https://img.youtube.com/vi/${previewVideoId}/hqdefault.jpg`;
18305
18521
  const thumb = customThumbUrl || safeRawThumb;
@@ -19078,19 +19294,21 @@ const WidgetPreview = ({
19078
19294
  );
19079
19295
  }
19080
19296
  if (id === "banner") {
19081
- const name = data?.banner?.name || t("widgets.banner.defaultTitle");
19297
+ const name = (typeof data?.title === "object" ? data.title?.text : data?.title) || data?.banner?.name || t("widgets.banner.defaultTitle");
19082
19298
  const type = options?.type || "grid";
19299
+ const bannerImgUrl = data?.image ? buildSharpImageUrl(data.image, options?.imageSettings || data?.imageSettings) : "";
19083
19300
  return /* @__PURE__ */ jsx(
19084
19301
  "div",
19085
19302
  {
19086
19303
  style: {
19087
19304
  padding: 16,
19088
19305
  borderRadius: 6,
19089
- background: "linear-gradient(135deg, #1e3a8a 0%, #2669a0 100%)",
19306
+ 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%)",
19090
19307
  color: "#fff",
19091
19308
  display: "flex",
19092
19309
  alignItems: "center",
19093
- justifyContent: "space-between"
19310
+ justifyContent: "space-between",
19311
+ minHeight: bannerImgUrl ? 120 : void 0
19094
19312
  },
19095
19313
  children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
19096
19314
  /* @__PURE__ */ jsx(MaterialIcon, { name: "featured_video", size: 24, color: "#93c5fd" }),
@@ -25791,6 +26009,17 @@ const WidgetEditor = ({ widget, onChange }) => {
25791
26009
  })
25792
26010
  }
25793
26011
  ) }),
26012
+ sData.image && /* @__PURE__ */ jsx("div", { style: fieldWrapStyle, children: /* @__PURE__ */ jsx(
26013
+ CIImageSettingsControl,
26014
+ {
26015
+ value: options.imageSettings,
26016
+ onChange: (next) => updateOptions({ imageSettings: next }),
26017
+ defaultWidth: 1200,
26018
+ defaultHeight: 800,
26019
+ compact: true,
26020
+ locale
26021
+ }
26022
+ ) }),
25794
26023
  /* @__PURE__ */ jsxs("div", { style: fieldWrapStyle, children: [
25795
26024
  /* @__PURE__ */ jsx("label", { style: labelStyle, children: t("altText") }),
25796
26025
  /* @__PURE__ */ jsx(
@@ -26570,87 +26799,15 @@ const WidgetEditor = ({ widget, onChange }) => {
26570
26799
  }
26571
26800
  )
26572
26801
  ),
26573
- /* @__PURE__ */ jsxs(
26574
- "div",
26802
+ /* @__PURE__ */ jsx(
26803
+ CIImageSettingsControl,
26575
26804
  {
26576
- style: {
26577
- padding: 10,
26578
- border: "1px solid #e2e8f0",
26579
- borderRadius: 6,
26580
- background: "#f8fafc"
26581
- },
26582
- children: [
26583
- /* @__PURE__ */ jsx("label", { style: labelStyle, children: t("imageProcessSettings") }),
26584
- /* @__PURE__ */ jsxs(
26585
- "select",
26586
- {
26587
- value: imageSettings.process || "",
26588
- onChange: (e) => updateOptions({
26589
- imageSettings: {
26590
- ...imageSettings,
26591
- process: e.target.value
26592
- }
26593
- }),
26594
- style: inputStyle,
26595
- children: [
26596
- /* @__PURE__ */ jsx("option", { value: "", children: t("imageProcessNone") }),
26597
- /* @__PURE__ */ jsx("option", { value: "fit", children: t("imageProcessFit") }),
26598
- /* @__PURE__ */ jsx("option", { value: "widen", children: t("imageProcessWiden") })
26599
- ]
26600
- }
26601
- ),
26602
- (imageSettings.process === "fit" || imageSettings.process === "widen") && /* @__PURE__ */ jsxs(
26603
- "div",
26604
- {
26605
- style: {
26606
- display: "grid",
26607
- gridTemplateColumns: imageSettings.process === "fit" ? "1fr 1fr" : "1fr",
26608
- gap: 8,
26609
- marginTop: 8
26610
- },
26611
- children: [
26612
- /* @__PURE__ */ jsxs("div", { children: [
26613
- /* @__PURE__ */ jsx("label", { style: labelStyle, children: t("cropWidth") }),
26614
- /* @__PURE__ */ jsx(
26615
- "input",
26616
- {
26617
- type: "number",
26618
- min: 50,
26619
- max: 3840,
26620
- value: imageSettings.cWidth ?? 640,
26621
- onChange: (e) => updateOptions({
26622
- imageSettings: {
26623
- ...imageSettings,
26624
- cWidth: Number(e.target.value) || 640
26625
- }
26626
- }),
26627
- style: inputStyle
26628
- }
26629
- )
26630
- ] }),
26631
- imageSettings.process === "fit" && /* @__PURE__ */ jsxs("div", { children: [
26632
- /* @__PURE__ */ jsx("label", { style: labelStyle, children: t("cropHeight") }),
26633
- /* @__PURE__ */ jsx(
26634
- "input",
26635
- {
26636
- type: "number",
26637
- min: 50,
26638
- max: 3840,
26639
- value: imageSettings.cHeight ?? 480,
26640
- onChange: (e) => updateOptions({
26641
- imageSettings: {
26642
- ...imageSettings,
26643
- cHeight: Number(e.target.value) || 480
26644
- }
26645
- }),
26646
- style: inputStyle
26647
- }
26648
- )
26649
- ] })
26650
- ]
26651
- }
26652
- )
26653
- ]
26805
+ label: t("imageProcessSettings"),
26806
+ value: imageSettings,
26807
+ onChange: (next) => updateOptions({ imageSettings: next }),
26808
+ defaultWidth: 640,
26809
+ defaultHeight: 480,
26810
+ locale
26654
26811
  }
26655
26812
  ),
26656
26813
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
@@ -26944,14 +27101,27 @@ const WidgetEditor = ({ widget, onChange }) => {
26944
27101
  }
26945
27102
  )
26946
27103
  ] }),
26947
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
26948
- StrapiMediaPicker,
26949
- {
26950
- label: t("youtubeCoverImage"),
26951
- value: currentThumbAsset,
26952
- onChange: handleCustomThumbnailChange
26953
- }
26954
- ) })
27104
+ /* @__PURE__ */ jsxs("div", { children: [
27105
+ /* @__PURE__ */ jsx(
27106
+ StrapiMediaPicker,
27107
+ {
27108
+ label: t("youtubeCoverImage"),
27109
+ value: currentThumbAsset,
27110
+ onChange: handleCustomThumbnailChange
27111
+ }
27112
+ ),
27113
+ currentThumbAsset && /* @__PURE__ */ jsx("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ jsx(
27114
+ CIImageSettingsControl,
27115
+ {
27116
+ value: options.imageSettings,
27117
+ onChange: (next) => updateOptions({ imageSettings: next }),
27118
+ defaultWidth: 1280,
27119
+ defaultHeight: 720,
27120
+ compact: true,
27121
+ locale
27122
+ }
27123
+ ) })
27124
+ ] })
26955
27125
  ]
26956
27126
  }
26957
27127
  ),
@@ -27183,6 +27353,17 @@ const WidgetEditor = ({ widget, onChange }) => {
27183
27353
  onChange: (asset) => updateData({ ...bnData, image: asset })
27184
27354
  }
27185
27355
  ) }),
27356
+ bnData.image && /* @__PURE__ */ jsx("div", { style: fieldWrapStyle, children: /* @__PURE__ */ jsx(
27357
+ CIImageSettingsControl,
27358
+ {
27359
+ value: options.imageSettings,
27360
+ onChange: (next) => updateOptions({ imageSettings: next }),
27361
+ defaultWidth: 1600,
27362
+ defaultHeight: 600,
27363
+ compact: true,
27364
+ locale
27365
+ }
27366
+ ) }),
27186
27367
  /* @__PURE__ */ jsxs("div", { style: fieldWrapStyle, children: [
27187
27368
  /* @__PURE__ */ jsx("label", { style: labelStyle, children: t("title") }),
27188
27369
  /* @__PURE__ */ jsx(
@@ -27911,7 +28092,7 @@ const BgOptionsEditor = ({
27911
28092
  showParallax = false,
27912
28093
  onChange
27913
28094
  }) => {
27914
- const { t } = useEditorContext();
28095
+ const { t, locale } = useEditorContext();
27915
28096
  const opts = bgOptions || {};
27916
28097
  const pOpts = parallaxOptions || {
27917
28098
  type: "scroll",
@@ -27947,6 +28128,17 @@ const BgOptionsEditor = ({
27947
28128
  gap: 8
27948
28129
  },
27949
28130
  children: [
28131
+ /* @__PURE__ */ jsx(
28132
+ CIImageSettingsControl,
28133
+ {
28134
+ value: opts.imageSettings,
28135
+ onChange: (next) => updateBgOpt("imageSettings", next),
28136
+ defaultWidth: 1920,
28137
+ defaultHeight: 1080,
28138
+ compact: true,
28139
+ locale
28140
+ }
28141
+ ),
27950
28142
  /* @__PURE__ */ jsxs("div", { children: [
27951
28143
  /* @__PURE__ */ jsx("label", { style: fieldLabelStyle, children: t("backgroundSize") }),
27952
28144
  /* @__PURE__ */ jsxs(