limbo-component 2.0.0 → 2.0.2

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/limbo.es.js CHANGED
@@ -12565,7 +12565,9 @@ function Tabs({ tabs, active, onChange }) {
12565
12565
  if (nextTab && !nextTab.hideNonActive) {
12566
12566
  onChange(nextTab.id);
12567
12567
  setTimeout(() => {
12568
- const tabButton = document.querySelector(`[data-tab-id="${nextTab.id}"]`);
12568
+ const tabButton = document.querySelector(
12569
+ `[data-tab-id="${nextTab.id}"]`
12570
+ );
12569
12571
  if (tabButton) {
12570
12572
  tabButton.focus();
12571
12573
  }
@@ -12597,7 +12599,7 @@ function Tabs({ tabs, active, onChange }) {
12597
12599
  "data-tab-id": tab.id,
12598
12600
  onClick: () => onChange(tab.id),
12599
12601
  onKeyDown: (e) => handleKeyDown(e, tab.id),
12600
- className: `limbo-tab ${isActiveTab ? "active" : ""} ${isMobile ? "limbo-tab--mobile" : ""}`,
12602
+ className: `limbo-tab ${isActiveTab ? "limbo-active" : ""} ${isMobile ? "limbo-tab--mobile" : ""}`,
12601
12603
  role: "tab",
12602
12604
  "aria-selected": isActiveTab,
12603
12605
  "aria-controls": `tabpanel-${tab.id}`,
@@ -13246,14 +13248,10 @@ function ImageVariantsModal({
13246
13248
  };
13247
13249
  const handleDownloadVariant = async (variant) => {
13248
13250
  const { downloadImage: downloadImage2 } = await Promise.resolve().then(() => downloadImage$1);
13249
- await downloadImage2(
13250
- variant.url,
13251
- variant.name || "limbo-variant",
13252
- {
13253
- originalFormat: variant.format || variant.output_format,
13254
- accessibilityManager
13255
- }
13256
- );
13251
+ await downloadImage2(variant.url, variant.name || "limbo-variant", {
13252
+ originalFormat: variant.format || variant.output_format,
13253
+ accessibilityManager
13254
+ });
13257
13255
  };
13258
13256
  const handleViewVariant = (variant) => {
13259
13257
  accessibilityManager?.announce(
@@ -13826,7 +13824,7 @@ function ImageCard({
13826
13824
  variantsCount > 0 && /* @__PURE__ */ jsx(
13827
13825
  "span",
13828
13826
  {
13829
- className: "variants-count-badge",
13827
+ className: "limbo-variants-count-badge",
13830
13828
  style: {
13831
13829
  position: "absolute",
13832
13830
  top: "-8px",
@@ -13993,7 +13991,7 @@ function ImageCard({
13993
13991
  /* @__PURE__ */ jsx(
13994
13992
  "span",
13995
13993
  {
13996
- className: `text-xs mt-1 truncate w-full text-center limbo-image-card-name ${isMobile ? "limbo-image-card-name--mobile" : ""}`,
13994
+ className: `text-xs mt-1 limbo-truncate w-full text-center limbo-image-card-name ${isMobile ? "limbo-image-card-name--mobile" : ""}`,
13997
13995
  style: {
13998
13996
  // Better text visibility on mobile
13999
13997
  ...isMobile && {
@@ -14061,7 +14059,7 @@ function ImageCardSkeleton() {
14061
14059
  }
14062
14060
  ) }),
14063
14061
  /* @__PURE__ */ jsx("div", { className: "limbo-image-card-name opacity-100 position-relative bottom-0 p-2", children: /* @__PURE__ */ jsx("div", { className: "h-4 bg-neutral-gray-200 rounded w-3/4" }) }),
14064
- /* @__PURE__ */ jsx("span", { className: "limbo-sr-only", children: "Cargando imagen..." })
14062
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Cargando imagen..." })
14065
14063
  ]
14066
14064
  }
14067
14065
  );
@@ -14193,7 +14191,7 @@ function Gallery({
14193
14191
  "aria-label": "Filtrar imágenes",
14194
14192
  children: [
14195
14193
  showNameFilter && /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full sm:min-w-[180px] sm:flex-1", children: [
14196
- /* @__PURE__ */ jsx("label", { htmlFor: "name", className: "form-label mb-1", children: "Nombre" }),
14194
+ /* @__PURE__ */ jsx("label", { htmlFor: "name", className: "limbo-form-label mb-1", children: "Nombre" }),
14197
14195
  /* @__PURE__ */ jsx(
14198
14196
  "input",
14199
14197
  {
@@ -14203,7 +14201,7 @@ function Gallery({
14203
14201
  placeholder: "Buscar por nombre...",
14204
14202
  value: filters.name,
14205
14203
  onChange: handleChange,
14206
- className: "form-control",
14204
+ className: "limbo-form-control",
14207
14205
  autoComplete: "off"
14208
14206
  }
14209
14207
  )
@@ -14211,7 +14209,7 @@ function Gallery({
14211
14209
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row flex-wrap gap-2 justify-between items-start sm:items-end w-full sm:w-auto", children: [
14212
14210
  showDateFilter && /* @__PURE__ */ jsxs(Fragment, { children: [
14213
14211
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full sm:w-auto", children: [
14214
- /* @__PURE__ */ jsx("label", { htmlFor: "dateFrom", className: "form-label mb-1", children: "Desde" }),
14212
+ /* @__PURE__ */ jsx("label", { htmlFor: "dateFrom", className: "limbo-form-label mb-1", children: "Desde" }),
14215
14213
  /* @__PURE__ */ jsx(
14216
14214
  "input",
14217
14215
  {
@@ -14220,12 +14218,12 @@ function Gallery({
14220
14218
  id: "dateFrom",
14221
14219
  value: filters.dateFrom,
14222
14220
  onChange: handleChange,
14223
- className: "form-control"
14221
+ className: "limbo-form-control"
14224
14222
  }
14225
14223
  )
14226
14224
  ] }),
14227
14225
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full sm:w-auto", children: [
14228
- /* @__PURE__ */ jsx("label", { htmlFor: "dateTo", className: "form-label mb-1", children: "Hasta" }),
14226
+ /* @__PURE__ */ jsx("label", { htmlFor: "dateTo", className: "limbo-form-label mb-1", children: "Hasta" }),
14229
14227
  /* @__PURE__ */ jsx(
14230
14228
  "input",
14231
14229
  {
@@ -14234,13 +14232,13 @@ function Gallery({
14234
14232
  id: "dateTo",
14235
14233
  value: filters.dateTo,
14236
14234
  onChange: handleChange,
14237
- className: "form-control"
14235
+ className: "limbo-form-control"
14238
14236
  }
14239
14237
  )
14240
14238
  ] })
14241
14239
  ] }),
14242
14240
  showUploadedByFilter && /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full sm:w-auto", children: [
14243
- /* @__PURE__ */ jsx("label", { htmlFor: "uploadedBy", className: "form-label mb-1", children: "Subido por" }),
14241
+ /* @__PURE__ */ jsx("label", { htmlFor: "uploadedBy", className: "limbo-form-label mb-1", children: "Subido por" }),
14244
14242
  /* @__PURE__ */ jsx(
14245
14243
  "input",
14246
14244
  {
@@ -14250,7 +14248,7 @@ function Gallery({
14250
14248
  placeholder: "Subido por",
14251
14249
  value: filters.uploadedBy,
14252
14250
  onChange: handleChange,
14253
- className: "form-control"
14251
+ className: "limbo-form-control"
14254
14252
  }
14255
14253
  )
14256
14254
  ] })
@@ -14450,13 +14448,13 @@ function ImagePreview({
14450
14448
  htmlFor: "uploadImageId",
14451
14449
  className: "flex items-center w-fit",
14452
14450
  children: [
14453
- /* @__PURE__ */ jsx("div", { className: "rounded-full bg-brand-blue-1000 min-w-6 min-h-6 flex items-center align-middle content-center justify-center me-1", children: /* @__PURE__ */ jsx("span", { className: "icon icon-edit-white icon--sm" }) }),
14451
+ /* @__PURE__ */ jsx("div", { className: "rounded-full bg-brand-blue-1000 min-w-6 min-h-6 flex items-center align-middle content-center justify-center limbo-me-1", children: /* @__PURE__ */ jsx("span", { className: "icon icon-edit-white icon--sm" }) }),
14454
14452
  /* @__PURE__ */ jsx(
14455
14453
  "input",
14456
14454
  {
14457
14455
  id: "uploadImageId",
14458
14456
  onChange: (e) => handleEditName(e),
14459
- className: "w-fit px-1 text-sm font-medium text-gray-800 border border-gray-300 rounded truncate focus:outline focus:outline-neutral-gray-100 focus:transform-none focus:shadow-none focus:opacity-100",
14457
+ className: "w-fit px-1 text-sm font-medium text-gray-800 border border-gray-300 rounded limbo-truncate focus:outline focus:outline-neutral-gray-100 focus:limbo-transform-none focus:shadow-none focus:opacity-100",
14460
14458
  defaultValue: imageInfo.name.split(".")[0],
14461
14459
  title: "Renombra la imagen a tu gusto"
14462
14460
  }
@@ -14560,7 +14558,7 @@ function ImagePreview({
14560
14558
  )
14561
14559
  }
14562
14560
  ),
14563
- /* @__PURE__ */ jsx("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 bg-black/50 text-white px-4 py-2 rounded-lg text-xs text-center", children: "Click fuera de la imagen o presiona ESC para cerrar" })
14561
+ /* @__PURE__ */ jsx("div", { className: "absolute bottom-4 left-1/2 limbo--translate-x-1/2 bg-black/50 text-white px-4 py-2 rounded-lg text-xs text-center", children: "Click fuera de la imagen o presiona ESC para cerrar" })
14564
14562
  ]
14565
14563
  }
14566
14564
  )
@@ -14785,7 +14783,7 @@ function LoadingOverlay({
14785
14783
  }
14786
14784
  );
14787
14785
  }
14788
- function TabAI({ prod, disabled, onSelect, onServiceChange }) {
14786
+ function TabAI({ prod, disabled, onSelect }) {
14789
14787
  const aiServicesHook = useAiServices(prod);
14790
14788
  const imageParamsHook = useImageParams(prod);
14791
14789
  const [lastPrompt, setLastPrompt] = useState("");
@@ -14797,11 +14795,6 @@ function TabAI({ prod, disabled, onSelect, onServiceChange }) {
14797
14795
  const [generatedFile, setGeneratedFile] = useState(null);
14798
14796
  const [showServiceSelection, setShowServiceSelection] = useState(true);
14799
14797
  const [showAdvancedOptions, setShowAdvancedOptions] = useState(false);
14800
- React.useEffect(() => {
14801
- if (onServiceChange && selectedService) {
14802
- onServiceChange(selectedService);
14803
- }
14804
- }, [selectedService]);
14805
14798
  React.useEffect(() => {
14806
14799
  if (!aiServicesHook.loading && aiServicesHook.services.length === 1) {
14807
14800
  const service = aiServicesHook.services[0];
@@ -14902,6 +14895,7 @@ function TabAI({ prod, disabled, onSelect, onServiceChange }) {
14902
14895
  const params = imageParamsHook.params?.[selectedService]?.parameters;
14903
14896
  if (!params) return null;
14904
14897
  const allFields = Object.entries(params).filter(
14898
+ // eslint-disable-next-line no-unused-vars
14905
14899
  ([_, config]) => !config.hidden
14906
14900
  );
14907
14901
  const promptFields = allFields.filter(
@@ -15117,12 +15111,7 @@ function TabAI({ prod, disabled, onSelect, onServiceChange }) {
15117
15111
  imageParamsHook.fetchParams(service.slug, true);
15118
15112
  },
15119
15113
  disabled: aiServicesHook.loading || disabled,
15120
- className: `
15121
- group relative p-4 rounded-lg border-2 transition-all duration-200 overflow-hidden
15122
- flex flex-col items-center justify-center min-h-[120px] grow-1 basis-sm min-w-70
15123
- border-gray-200 hover:border-brand-blue-300 hover:shadow-md
15124
- ${aiServicesHook.loading || disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
15125
- `,
15114
+ className: ` group relative p-4 rounded-lg border-2 transition-all duration-200 overflow-hidden flex flex-col items-center justify-center min-h-[120px] grow-1 basis-sm min-w-70 border-gray-200 hover:border-brand-blue-300 hover:shadow-md ${aiServicesHook.loading || disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} `,
15126
15115
  style: {
15127
15116
  position: "relative"
15128
15117
  },
@@ -15139,7 +15128,7 @@ function TabAI({ prod, disabled, onSelect, onServiceChange }) {
15139
15128
  ),
15140
15129
  /* @__PURE__ */ jsxs("div", { className: "relative z-10 flex flex-col items-center justify-center gap-2 text-center", children: [
15141
15130
  /* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-gray-800", children: service.label }),
15142
- service.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-neutral-gray-800 line-clamp-2 drop-shadow drop-shadow-neutral-white-000", children: service.description })
15131
+ service.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-neutral-gray-800 limbo-line-clamp-2 drop-shadow drop-shadow-neutral-white-000", children: service.description })
15143
15132
  ] })
15144
15133
  ]
15145
15134
  },
@@ -15169,7 +15158,9 @@ function TabAI({ prod, disabled, onSelect, onServiceChange }) {
15169
15158
  if (onSelect) {
15170
15159
  const fileToSelect = generatedFile || aiImage;
15171
15160
  if (editedName && fileToSelect && editedName !== fileToSelect.name) {
15172
- const newFile = new File([fileToSelect], editedName, { type: fileToSelect.type });
15161
+ const newFile = new File([fileToSelect], editedName, {
15162
+ type: fileToSelect.type
15163
+ });
15173
15164
  onSelect(newFile);
15174
15165
  } else {
15175
15166
  onSelect(fileToSelect);
@@ -15252,7 +15243,7 @@ function useStockServices(prod = false) {
15252
15243
  };
15253
15244
  return { services, loading, error, invalidateCache };
15254
15245
  }
15255
- function TabStock({ prod, disabled, onSelect, onServiceChange }) {
15246
+ function TabStock({ prod, disabled, onSelect }) {
15256
15247
  const lastSearchPayloadRef = React.useRef(null);
15257
15248
  const stockServicesHook = useStockServices(prod);
15258
15249
  const loadSavedState = (key, defaultValue) => {
@@ -15335,11 +15326,6 @@ function TabStock({ prod, disabled, onSelect, onServiceChange }) {
15335
15326
  setDynamicForm(initialValues);
15336
15327
  }
15337
15328
  }, [selectedService, imageParamsHook.params]);
15338
- React.useEffect(() => {
15339
- if (onServiceChange && selectedService) {
15340
- onServiceChange(selectedService);
15341
- }
15342
- }, [selectedService]);
15343
15329
  const handleDynamicFormChange = (e) => {
15344
15330
  const { name, value } = e.target;
15345
15331
  setDynamicForm((prev) => ({ ...prev, [name]: value }));
@@ -15492,20 +15478,27 @@ function TabStock({ prod, disabled, onSelect, onServiceChange }) {
15492
15478
  ]
15493
15479
  }
15494
15480
  ),
15495
- config.options && config.multiple ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2 min-h-[50px] px-2 justify-between border-2 border-gray-transparent-500 rounded-lg", children: config.options.map((opt) => /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1", children: [
15496
- /* @__PURE__ */ jsx(
15497
- "input",
15498
- {
15499
- type: "checkbox",
15500
- name: `stock-${key}`,
15501
- value: opt,
15502
- checked: Array.isArray(dynamicForm[key]) && dynamicForm[key].includes(opt),
15503
- onChange: () => handleMultiCheckboxChange(key, opt),
15504
- disabled
15505
- }
15506
- ),
15507
- /* @__PURE__ */ jsx("span", { className: "text-xs", children: opt })
15508
- ] }, opt)) }) : config.options ? /* @__PURE__ */ jsx(
15481
+ config.options && config.multiple ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2 min-h-[50px] px-2 justify-between border-2 border-gray-transparent-500 rounded-lg", children: config.options.map((opt) => /* @__PURE__ */ jsxs(
15482
+ "label",
15483
+ {
15484
+ className: "flex items-center gap-1",
15485
+ children: [
15486
+ /* @__PURE__ */ jsx(
15487
+ "input",
15488
+ {
15489
+ type: "checkbox",
15490
+ name: `stock-${key}`,
15491
+ value: opt,
15492
+ checked: Array.isArray(dynamicForm[key]) && dynamicForm[key].includes(opt),
15493
+ onChange: () => handleMultiCheckboxChange(key, opt),
15494
+ disabled
15495
+ }
15496
+ ),
15497
+ /* @__PURE__ */ jsx("span", { className: "text-xs", children: opt })
15498
+ ]
15499
+ },
15500
+ opt
15501
+ )) }) : config.options ? /* @__PURE__ */ jsx(
15509
15502
  "select",
15510
15503
  {
15511
15504
  id: `stock-${key}`,
@@ -15679,12 +15672,7 @@ function TabStock({ prod, disabled, onSelect, onServiceChange }) {
15679
15672
  imageParamsHook.fetchParams(service.slug, true);
15680
15673
  },
15681
15674
  disabled: stockServicesHook.loading || disabled,
15682
- className: `
15683
- group relative p-4 rounded-lg border-2 transition-all duration-200 overflow-hidden
15684
- flex flex-col items-center justify-center min-h-[120px]
15685
- border-gray-200 hover:border-brand-blue-300 hover:shadow-md
15686
- ${stockServicesHook.loading || disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
15687
- `,
15675
+ className: ` group relative p-4 rounded-lg border-2 transition-all duration-200 overflow-hidden flex flex-col items-center justify-center min-h-[120px] border-gray-200 hover:border-brand-blue-300 hover:shadow-md ${stockServicesHook.loading || disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} `,
15688
15676
  style: {
15689
15677
  position: "relative"
15690
15678
  },
@@ -15701,7 +15689,7 @@ function TabStock({ prod, disabled, onSelect, onServiceChange }) {
15701
15689
  ),
15702
15690
  /* @__PURE__ */ jsxs("div", { className: "relative z-10 flex flex-col items-center justify-center gap-2 text-center", children: [
15703
15691
  /* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-gray-800", children: service.label }),
15704
- service.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-gray-600 line-clamp-2", children: service.description })
15692
+ service.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-gray-600 limbo-line-clamp-2", children: service.description })
15705
15693
  ] })
15706
15694
  ]
15707
15695
  },
@@ -15728,7 +15716,9 @@ function TabStock({ prod, disabled, onSelect, onServiceChange }) {
15728
15716
  onSelect: (editedName) => {
15729
15717
  if (onSelect) {
15730
15718
  if (editedName && selectedFile && editedName !== selectedFile.name) {
15731
- const newFile = new File([selectedFile], editedName, { type: selectedFile.type });
15719
+ const newFile = new File([selectedFile], editedName, {
15720
+ type: selectedFile.type
15721
+ });
15732
15722
  onSelect(newFile);
15733
15723
  } else {
15734
15724
  onSelect(selectedFile);
@@ -16195,11 +16185,7 @@ function TabPortals({ prod, disabled, onSelect }) {
16195
16185
  type: "button",
16196
16186
  onClick: () => handlePortalToggle(portal.id),
16197
16187
  disabled,
16198
- className: `
16199
- relative p-4 rounded-lg border-2 transition-all duration-200 flex flex-col items-center justify-center min-h-[100px] gap-2 max-h-[110px] box-border ${isSelected ? "border-brand-blue-600 bg-brand-blue-50" : "border-gray-200 bg-white hover:border-brand-blue-300"}
16200
- ${disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
16201
- hover:shadow-md
16202
- `,
16188
+ className: ` relative p-4 rounded-lg border-2 transition-all duration-200 flex flex-col items-center justify-center min-h-[100px] gap-2 max-h-[110px] box-border ${isSelected ? "border-brand-blue-600 bg-brand-blue-50" : "border-gray-200 bg-white hover:border-brand-blue-300"} ${disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} hover:shadow-md `,
16203
16189
  children: [
16204
16190
  isSelected && /* @__PURE__ */ jsx("div", { className: "absolute top-2 right-2 w-6 h-6 bg-brand-blue-600 rounded-full flex items-center justify-center bg-black", children: /* @__PURE__ */ jsx("span", { className: "icon icon-tick-white icon--sm" }) }),
16205
16191
  /* @__PURE__ */ jsx(
@@ -16319,7 +16305,9 @@ function TabPortals({ prod, disabled, onSelect }) {
16319
16305
  onSelect: (editedName) => {
16320
16306
  if (onSelect) {
16321
16307
  if (editedName && selectedFile && editedName !== selectedFile.name) {
16322
- const newFile = new File([selectedFile], editedName, { type: selectedFile.type });
16308
+ const newFile = new File([selectedFile], editedName, {
16309
+ type: selectedFile.type
16310
+ });
16323
16311
  onSelect(newFile);
16324
16312
  } else {
16325
16313
  onSelect(selectedFile);
@@ -16395,7 +16383,7 @@ function TabPortals({ prod, disabled, onSelect }) {
16395
16383
  img.title && /* @__PURE__ */ jsx("div", { className: "px-2 pb-2 pt-1", children: /* @__PURE__ */ jsx(
16396
16384
  "p",
16397
16385
  {
16398
- className: "text-xs text-gray-600 truncate",
16386
+ className: "text-xs text-gray-600 limbo-truncate",
16399
16387
  title: img.title,
16400
16388
  children: img.title
16401
16389
  }
@@ -16465,10 +16453,6 @@ const TABS = [
16465
16453
  ];
16466
16454
  function UploadForm({
16467
16455
  onSelect,
16468
- onSubTabChange = null,
16469
- // Callback para notificar cambio de sub-tab a App.jsx
16470
- onServiceChange = null,
16471
- // Callback para notificar cambio de servicio (modelo IA/Stock)
16472
16456
  disabled = false,
16473
16457
  apiKey,
16474
16458
  prod = false
@@ -16477,16 +16461,6 @@ function UploadForm({
16477
16461
  const [file, setFile] = useState(null);
16478
16462
  const [previewUrl, setPreviewUrl] = useState(null);
16479
16463
  const fileInputRef = useRef();
16480
- React.useEffect(() => {
16481
- if (onSubTabChange) {
16482
- onSubTabChange(activeTab);
16483
- }
16484
- }, [activeTab, onSubTabChange]);
16485
- const handleServiceChange = (serviceSlug) => {
16486
- if (onServiceChange && serviceSlug) {
16487
- onServiceChange(activeTab, serviceSlug);
16488
- }
16489
- };
16490
16464
  const handleTabKeyDown = (event, tabId) => {
16491
16465
  const currentIndex = TABS.findIndex((tab) => tab.id === tabId);
16492
16466
  let nextIndex = currentIndex;
@@ -16540,7 +16514,7 @@ function UploadForm({
16540
16514
  {
16541
16515
  type: "button",
16542
16516
  "data-upload-tab-id": tab.id,
16543
- className: `text-nowrap limbo-tab${activeTab === tab.id ? " active" : ""}`,
16517
+ className: `text-nowrap limbo-tab${activeTab === tab.id ? " limbo-active" : ""}`,
16544
16518
  "aria-current": activeTab === tab.id ? "page" : void 0,
16545
16519
  "aria-selected": activeTab === tab.id,
16546
16520
  role: "tab",
@@ -16581,8 +16555,7 @@ function UploadForm({
16581
16555
  apiKey,
16582
16556
  prod,
16583
16557
  disabled,
16584
- onSelect,
16585
- onServiceChange: handleServiceChange
16558
+ onSelect
16586
16559
  }
16587
16560
  ),
16588
16561
  activeTab === "stock" && /* @__PURE__ */ jsx(
@@ -16591,8 +16564,7 @@ function UploadForm({
16591
16564
  apiKey,
16592
16565
  prod,
16593
16566
  disabled,
16594
- onSelect,
16595
- onServiceChange: handleServiceChange
16567
+ onSelect
16596
16568
  }
16597
16569
  ),
16598
16570
  activeTab === "portals" && /* @__PURE__ */ jsx(
@@ -20662,7 +20634,6 @@ function CropperView({
20662
20634
  activeCropIndex,
20663
20635
  cropData,
20664
20636
  effectiveImageInfo,
20665
- editableFilename,
20666
20637
  createCropVariant,
20667
20638
  image.id,
20668
20639
  onVariantCreated,
@@ -20905,7 +20876,6 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
20905
20876
  activeCropIndex,
20906
20877
  selection,
20907
20878
  image.mime_type,
20908
- editableFilename,
20909
20879
  accessibilityManager,
20910
20880
  imageRef,
20911
20881
  selectionRef
@@ -21131,7 +21101,7 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
21131
21101
  };
21132
21102
  }, [canvasRef]);
21133
21103
  if (!image) return null;
21134
- return /* @__PURE__ */ jsxs("div", { className: "limbo-cropper-view px-2 border-2 border-gray-200/50 rounded-lg max-w-7xl mx-auto w-full min-w-full h-full min-h-full flex flex-col", children: [
21104
+ return /* @__PURE__ */ jsxs("div", { className: "limbo-cropper-view px-2 border-2 border-gray-200/50 rounded-lg max-w-7xl mx-auto w-full min-w-full h-full min-h-full flex flex-col", children: [
21135
21105
  /* @__PURE__ */ jsxs("div", { className: "limbo-cropper-header flex flex-row justify-between items-start flex-wrap mx-2 py-2 border-b border-gray-200 bg-white z-10 flex-shrink-0 lg:gap-2", children: [
21136
21106
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-fit space-y-2 max-w-fit", children: [
21137
21107
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
@@ -21176,29 +21146,50 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
21176
21146
  ] })
21177
21147
  ] }),
21178
21148
  /* @__PURE__ */ jsxs("div", { className: "limbo-cropper-status bg-white border-gray-100 py-0 pb-0 flex-shrink-0", children: [
21179
- variantError && /* @__PURE__ */ jsxs("div", { className: "alert alert-danger mb-2 text-sm", role: "alert", children: [
21180
- /* @__PURE__ */ jsx("strong", { children: "Error:" }),
21181
- " ",
21182
- variantError
21183
- ] }),
21184
- imageInfo && /* @__PURE__ */ jsxs("div", { className: "alert alert-secondary mb-2 text-sm", role: "status", children: [
21185
- /* @__PURE__ */ jsx("strong", { children: "Original:" }),
21186
- " ",
21187
- imageInfo.naturalWidth,
21188
- " ×",
21189
- " ",
21190
- imageInfo.naturalHeight,
21191
- " px",
21192
- imageInfo.currentWidth !== imageInfo.naturalWidth && /* @__PURE__ */ jsxs("span", { className: "ml-2 sm:ml-3 text-xs block sm:inline", children: [
21193
- "(Mostrada: ",
21194
- Math.round(imageInfo.currentWidth),
21195
- " ×",
21196
- " ",
21197
- Math.round(imageInfo.currentHeight),
21198
- " px)"
21199
- ] })
21200
- ] }),
21201
- !canExport && /* @__PURE__ */ jsx("div", { className: "alert alert-warning mb-2 text-sm", role: "alert", children: "⚠️ No se puede exportar por restricciones CORS" }),
21149
+ variantError && /* @__PURE__ */ jsxs(
21150
+ "div",
21151
+ {
21152
+ className: "alert alert-danger mb-2 text-sm",
21153
+ role: "alert",
21154
+ children: [
21155
+ /* @__PURE__ */ jsx("strong", { children: "Error:" }),
21156
+ " ",
21157
+ variantError
21158
+ ]
21159
+ }
21160
+ ),
21161
+ imageInfo && /* @__PURE__ */ jsxs(
21162
+ "div",
21163
+ {
21164
+ className: "alert alert-secondary mb-2 text-sm",
21165
+ role: "status",
21166
+ children: [
21167
+ /* @__PURE__ */ jsx("strong", { children: "Original:" }),
21168
+ " ",
21169
+ imageInfo.naturalWidth,
21170
+ " ×",
21171
+ " ",
21172
+ imageInfo.naturalHeight,
21173
+ " px",
21174
+ imageInfo.currentWidth !== imageInfo.naturalWidth && /* @__PURE__ */ jsxs("span", { className: "ml-2 sm:ml-3 text-xs block sm:inline", children: [
21175
+ "(Mostrada: ",
21176
+ Math.round(imageInfo.currentWidth),
21177
+ " ×",
21178
+ " ",
21179
+ Math.round(imageInfo.currentHeight),
21180
+ " px)"
21181
+ ] })
21182
+ ]
21183
+ }
21184
+ ),
21185
+ !canExport && /* @__PURE__ */ jsx(
21186
+ "div",
21187
+ {
21188
+ className: "alert alert-warning mb-2 text-sm",
21189
+ role: "alert",
21190
+ children: "⚠️ No se puede exportar por restricciones CORS"
21191
+ }
21192
+ ),
21202
21193
  /* @__PURE__ */ jsxs("div", { className: "bg-white border-b border-gray-200 py-2 mx-2 flex-shrink-0 sticky top-0 z-10 mb-1", children: [
21203
21194
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
21204
21195
  /* @__PURE__ */ jsxs("h3", { className: "text-sm font-semibold text-gray-700", children: [
@@ -21251,7 +21242,7 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
21251
21242
  maxLength: 25,
21252
21243
  onClick: (e) => e.stopPropagation()
21253
21244
  }
21254
- ) : /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-gray-800 truncate", children: crop.label }),
21245
+ ) : /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-gray-800 limbo-truncate", children: crop.label }),
21255
21246
  crop.required && /* @__PURE__ */ jsx("span", { className: "text-[10px] px-1 py-0.5 bg-red-100 text-red-700 rounded whitespace-nowrap", children: "Oblig." }),
21256
21247
  crop.isCustom && activeCropIndex !== index && /* @__PURE__ */ jsx("span", { className: "text-[10px] px-1 py-0.5 bg-purple-100 text-purple-700 rounded whitespace-nowrap", children: "Custom" })
21257
21248
  ] }) }),
@@ -21421,7 +21412,7 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
21421
21412
  }
21422
21413
  )
21423
21414
  ] }) }),
21424
- /* @__PURE__ */ jsx("div", { className: "w-full lg:max-w-80 mt-2 lg:my-0 overflow-y-auto bg-white border-t lg:border-t-0 lg:border-l border-gray-200 flex-shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "h-full mt-2 lg:my-0 me-2 lg:mx-2 space-y-2 grid grid-cols-2 md:grid-cols-3 flex-wrap md:flex-nowrap items-start flex-row gap-2 lg:gap-0 lg:block", children: [
21415
+ /* @__PURE__ */ jsx("div", { className: "w-full lg:max-w-80 mt-2 lg:my-0 overflow-y-auto bg-white border-t lg:border-t-0 lg:border-l border-gray-200 flex-shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "h-full mt-2 lg:my-0 limbo-me-2 lg:mx-2 space-y-2 grid grid-cols-2 md:grid-cols-3 flex-wrap md:flex-nowrap items-start flex-row gap-2 lg:gap-0 lg:block", children: [
21425
21416
  /* @__PURE__ */ jsxs("div", { className: "bg-white rounded border w-full border-gray-200 mb-2", children: [
21426
21417
  /* @__PURE__ */ jsx(
21427
21418
  "button",
@@ -21466,7 +21457,7 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
21466
21457
  title: "Mover arriba-izquierda",
21467
21458
  disabled: creatingVariant,
21468
21459
  "aria-label": "Mover imagen hacia arriba-izquierda",
21469
- children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "icon icon-arrow-up-blue icon--md -rotate-45" }) })
21460
+ children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "icon icon-arrow-up-blue icon--md limbo--rotate-45" }) })
21470
21461
  }
21471
21462
  ),
21472
21463
  /* @__PURE__ */ jsx(
@@ -21577,7 +21568,7 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
21577
21568
  title: "Mover abajo-izquierda",
21578
21569
  disabled: creatingVariant,
21579
21570
  "aria-label": "Mover imagen hacia abajo-izquierda",
21580
- children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "icon icon-arrow-up-blue icon--md -rotate-145" }) })
21571
+ children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "icon icon-arrow-up-blue icon--md limbo--rotate-145" }) })
21581
21572
  }
21582
21573
  ),
21583
21574
  /* @__PURE__ */ jsx(
@@ -21733,7 +21724,7 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
21733
21724
  disabled: creatingVariant,
21734
21725
  "aria-label": "Reiniciar área de selección",
21735
21726
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxs("span", { children: [
21736
- /* @__PURE__ */ jsx("span", { className: "icon icon-refresh icon--sm lign-[middle!important] " }),
21727
+ /* @__PURE__ */ jsx("span", { className: "icon icon-refresh icon--sm limbo-lign-[middle!important] " }),
21737
21728
  " ",
21738
21729
  "Reset selección"
21739
21730
  ] }) })
@@ -21781,12 +21772,12 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
21781
21772
  "aria-label": "Activar/desactivar grid",
21782
21773
  children: [
21783
21774
  /* @__PURE__ */ jsxs("span", { className: "text-sm flex items-center", children: [
21784
- /* @__PURE__ */ jsx("span", { className: "icon icon-area-blue me-1" }),
21775
+ /* @__PURE__ */ jsx("span", { className: "icon icon-area-blue limbo-me-1" }),
21785
21776
  " ",
21786
21777
  "Cuadrícula"
21787
21778
  ] }),
21788
21779
  /* @__PURE__ */ jsx("span", { className: "text-xs", children: showGrid ? /* @__PURE__ */ jsxs(Fragment, { children: [
21789
- /* @__PURE__ */ jsx("span", { className: "icon icon-tick icon--xs align-[middle!important] -mt-0.5" }),
21780
+ /* @__PURE__ */ jsx("span", { className: "icon icon-tick icon--xs align-[middle!important] limbo--mt-0.5" }),
21790
21781
  " ",
21791
21782
  "Activo"
21792
21783
  ] }) : "Inactivo" })
@@ -21803,12 +21794,12 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
21803
21794
  "aria-label": "Activar/desactivar sombreado",
21804
21795
  children: [
21805
21796
  /* @__PURE__ */ jsxs("span", { className: "text-sm flex items-center", children: [
21806
- /* @__PURE__ */ jsx("span", { className: "icon icon-comparison-blue me-1" }),
21797
+ /* @__PURE__ */ jsx("span", { className: "icon icon-comparison-blue limbo-me-1" }),
21807
21798
  " ",
21808
21799
  "Tablero"
21809
21800
  ] }),
21810
21801
  /* @__PURE__ */ jsx("span", { className: "text-xs", children: shade ? /* @__PURE__ */ jsxs(Fragment, { children: [
21811
- /* @__PURE__ */ jsx("span", { className: "icon icon-tick icon--xs align-[middle!important] -mt-0.5" }),
21802
+ /* @__PURE__ */ jsx("span", { className: "icon icon-tick icon--xs align-[middle!important] limbo--mt-0.5" }),
21812
21803
  " ",
21813
21804
  "Activo"
21814
21805
  ] }) : "Inactivo" })
@@ -21831,7 +21822,7 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
21831
21822
  children: [
21832
21823
  /* @__PURE__ */ jsx("span", { className: "icon icon-lightbulb text-yellow-500" }),
21833
21824
  /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-blue-800", children: "Guía de uso" }),
21834
- /* @__PURE__ */ jsx("span", { className: "icon icon-arrow-down scale-75 -rotate-145" })
21825
+ /* @__PURE__ */ jsx("span", { className: "icon icon-arrow-down scale-75 limbo--rotate-145" })
21835
21826
  ]
21836
21827
  }
21837
21828
  ),
@@ -21936,16 +21927,36 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
21936
21927
  ),
21937
21928
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
21938
21929
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
21939
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-gray-800 truncate", children: crop.label }),
21930
+ /* @__PURE__ */ jsxs(
21931
+ "span",
21932
+ {
21933
+ title: "Nombre del archivo a descargar",
21934
+ className: "text-sm font-medium text-gray-800 truncate",
21935
+ children: [
21936
+ crop.label,
21937
+ "_",
21938
+ crop.width,
21939
+ "_",
21940
+ crop.height
21941
+ ]
21942
+ }
21943
+ ),
21940
21944
  crop.required && /* @__PURE__ */ jsx("span", { className: "text-xs px-1.5 py-0.5 bg-red-100 text-red-700 rounded whitespace-nowrap", children: "Obligatorio" }),
21941
21945
  !isConfigured && !crop.required && /* @__PURE__ */ jsx("span", { className: "text-xs px-1.5 py-0.5 bg-orange-100 text-orange-700 rounded whitespace-nowrap", children: "Sin configurar" })
21942
21946
  ] }),
21943
- /* @__PURE__ */ jsxs("span", { className: "text-xs text-gray-500", children: [
21944
- crop.width,
21945
- " × ",
21946
- crop.height,
21947
- " px"
21948
- ] })
21947
+ /* @__PURE__ */ jsxs(
21948
+ "span",
21949
+ {
21950
+ title: "Dimensiones del recorte",
21951
+ className: "text-xs text-gray-500",
21952
+ children: [
21953
+ crop.width,
21954
+ " × ",
21955
+ crop.height,
21956
+ " px"
21957
+ ]
21958
+ }
21959
+ )
21949
21960
  ] })
21950
21961
  ]
21951
21962
  },
@@ -22089,7 +22100,7 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
22089
22100
  /* @__PURE__ */ jsxs("span", { className: "inline-flex gap-1 mx-1", children: [
22090
22101
  /* @__PURE__ */ jsx("span", { className: "icon icon-arrow-right-box rotate-180 icon--sm" }),
22091
22102
  /* @__PURE__ */ jsx("span", { className: "icon icon-arrow-right-box icon--sm" }),
22092
- /* @__PURE__ */ jsx("span", { className: "icon icon-arrow-right-box -rotate-90 icon--sm" }),
22103
+ /* @__PURE__ */ jsx("span", { className: "icon icon-arrow-right-box limbo--rotate-90 icon--sm" }),
22093
22104
  /* @__PURE__ */ jsx("span", { className: "icon icon-arrow-right-box rotate-90 icon--sm" })
22094
22105
  ] }),
22095
22106
  "Mueven la selección en incrementos de 10px"
@@ -22237,7 +22248,7 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
22237
22248
  /* @__PURE__ */ jsxs(
22238
22249
  "div",
22239
22250
  {
22240
- className: "preview-modal-header px-4 py-3 bg-gradient-to-r from-brand-blue-800 to-brand-blue-1000 text-white flex items-center justify-between cursor-grab active:cursor-grabbing select-none",
22251
+ className: "limbo-preview-modal-header px-4 py-3 bg-gradient-to-r from-brand-blue-800 to-brand-blue-1000 text-white flex items-center justify-between cursor-grab active:cursor-grabbing select-none",
22241
22252
  style: { cursor: isDragging ? "grabbing" : "grab" },
22242
22253
  children: [
22243
22254
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
@@ -22360,7 +22371,7 @@ ${errors.map((e) => `- ${e.crop}: ${e.error}`).join("\n")}`;
22360
22371
  )
22361
22372
  }
22362
22373
  ),
22363
- /* @__PURE__ */ jsx("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-lg text-xs text-center backdrop-blur-sm", children: "Click fuera de la imagen o presiona ESC para cerrar" })
22374
+ /* @__PURE__ */ jsx("div", { className: "absolute bottom-4 left-1/2 limbo--translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-lg text-xs text-center backdrop-blur-sm", children: "Click fuera de la imagen o presiona ESC para cerrar" })
22364
22375
  ]
22365
22376
  }
22366
22377
  )
@@ -22421,10 +22432,7 @@ function Pagination({
22421
22432
  {
22422
22433
  onClick: handlePrevious,
22423
22434
  disabled: disabled || currentPage <= 1,
22424
- className: `
22425
- px-3 py-2 text-sm font-medium rounded-md transition-colors disabled:cursor-default cursor-pointer
22426
- ${disabled || currentPage <= 1 ? "text-gray-400 bg-gray-100 cursor-not-allowed" : "text-gray-700 bg-white border border-gray-300 hover:bg-gray-50 focus:ring-2 focus:ring-blue-500"}
22427
- `,
22435
+ className: ` px-3 py-2 text-sm font-medium rounded-md transition-colors disabled:cursor-default cursor-pointer ${disabled || currentPage <= 1 ? "text-gray-400 bg-gray-100 cursor-not-allowed" : "text-gray-700 bg-white border border-gray-300 hover:bg-gray-50 focus:ring-2 focus:ring-blue-500"} `,
22428
22436
  children: [
22429
22437
  /* @__PURE__ */ jsx("span", { className: "icon icon-arrow-left-white icon--sm" }),
22430
22438
  " Anterior"
@@ -22436,10 +22444,7 @@ function Pagination({
22436
22444
  {
22437
22445
  onClick: () => handlePageClick(page),
22438
22446
  disabled,
22439
- className: `
22440
- px-3 py-2 text-sm font-medium rounded-md transition-colors disabled:cursor-default cursor-pointer
22441
- ${page === currentPage ? "bg-blue-600 text-white border border-blue-600" : disabled ? "text-gray-400 bg-gray-100 cursor-not-allowed" : "text-gray-700 bg-white border border-gray-300 hover:bg-gray-50 focus:ring-2 focus:ring-blue-500"}
22442
- `,
22447
+ className: ` px-3 py-2 text-sm font-medium rounded-md transition-colors disabled:cursor-default cursor-pointer ${page === currentPage ? "bg-blue-600 text-white border border-blue-600" : disabled ? "text-gray-400 bg-gray-100 cursor-not-allowed" : "text-gray-700 bg-white border border-gray-300 hover:bg-gray-50 focus:ring-2 focus:ring-blue-500"} `,
22443
22448
  children: page
22444
22449
  }
22445
22450
  ) }, `page-${page}-${index}`)) }),
@@ -22448,10 +22453,7 @@ function Pagination({
22448
22453
  {
22449
22454
  onClick: handleNext,
22450
22455
  disabled: disabled || currentPage >= totalPages,
22451
- className: `
22452
- px-3 py-2 text-sm font-medium rounded-md transition-colors disabled:cursor-default cursor-pointer
22453
- ${disabled || currentPage >= totalPages ? "text-gray-400 bg-gray-100 cursor-not-allowed" : "text-gray-700 bg-white border border-gray-300 hover:bg-gray-50 focus:ring-2 focus:ring-blue-500"}
22454
- `,
22456
+ className: ` px-3 py-2 text-sm font-medium rounded-md transition-colors disabled:cursor-default cursor-pointer ${disabled || currentPage >= totalPages ? "text-gray-400 bg-gray-100 cursor-not-allowed" : "text-gray-700 bg-white border border-gray-300 hover:bg-gray-50 focus:ring-2 focus:ring-blue-500"} `,
22455
22457
  children: [
22456
22458
  "Siguiente ",
22457
22459
  /* @__PURE__ */ jsx("span", { className: "icon icon-arrow-right-white icon--sm" })
@@ -22511,27 +22513,6 @@ function TokenExpiredModal({ isOpen, onClose }) {
22511
22513
  }
22512
22514
  );
22513
22515
  }
22514
- function Breadcrumb({ items = [], currentLabel }) {
22515
- if (!items.length && !currentLabel) {
22516
- return null;
22517
- }
22518
- return /* @__PURE__ */ jsx("nav", { "aria-label": "Breadcrumb", className: "mb-4", children: /* @__PURE__ */ jsxs("ol", { className: "flex items-center gap-2 text-sm flex-wrap px-4 pt-2 pb-0", children: [
22519
- items.map((item, index) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2", children: [
22520
- /* @__PURE__ */ jsx(
22521
- "button",
22522
- {
22523
- type: "button",
22524
- onClick: item.onClick,
22525
- className: "text-brand-blue-800 hover:text-brand-blue-1000 hover:underline cursor-pointer transition-colors font-medium",
22526
- "aria-label": `Ir a ${item.label}`,
22527
- children: item.label
22528
- }
22529
- ),
22530
- /* @__PURE__ */ jsx("span", { className: "text-gray-400", "aria-hidden": "true", children: "/" })
22531
- ] }, index)),
22532
- currentLabel && /* @__PURE__ */ jsx("li", { className: "text-gray-700 font-medium", "aria-current": "page", children: currentLabel })
22533
- ] }) });
22534
- }
22535
22516
  function useUploadImage() {
22536
22517
  const [loading, setLoading] = useState(false);
22537
22518
  const [error, setError] = useState(null);
@@ -22768,29 +22749,6 @@ function App({
22768
22749
  }
22769
22750
  };
22770
22751
  const activeFeatures = getFilteredFeatures();
22771
- const getTabLabel = (tabName) => {
22772
- const labels = {
22773
- gallery: "Galería",
22774
- upload: "Subir",
22775
- cropper: "Recortar",
22776
- // Sub-tabs de Upload
22777
- "upload:upload": "Subir archivo",
22778
- "upload:ai": "Generar con IA",
22779
- "upload:stock": "Buscar en Stock",
22780
- "upload:portals": "Otros portales"
22781
- };
22782
- if (tabName && tabName.includes(":") && tabName.split(":").length === 3) {
22783
- const serviceName = tabName.split(":")[2];
22784
- return serviceName.charAt(0).toUpperCase() + serviceName.slice(1);
22785
- }
22786
- return labels[tabName] || tabName;
22787
- };
22788
- const isUploadSubTab = (tabName) => {
22789
- return tabName && tabName.startsWith("upload:") && tabName.split(":").length === 2;
22790
- };
22791
- const isUploadServiceTab = (tabName) => {
22792
- return tabName && tabName.startsWith("upload:") && tabName.split(":").length === 3;
22793
- };
22794
22752
  const getInitialTab = () => {
22795
22753
  if (activeFeatures.includes("gallery")) return "gallery";
22796
22754
  if (activeFeatures.includes("upload")) return "upload";
@@ -22800,79 +22758,6 @@ function App({
22800
22758
  };
22801
22759
  const [activeTab, setActiveTab] = useState(getInitialTab());
22802
22760
  const [selectedImage, setSelectedImage] = useState(null);
22803
- const [navigationHistory, setNavigationHistory] = useState([
22804
- { tab: getInitialTab(), label: getTabLabel(getInitialTab()) }
22805
- ]);
22806
- const addToNavigationHistory = (newTab) => {
22807
- setNavigationHistory((prev) => {
22808
- const existingIndex = prev.findIndex((item) => item.tab === newTab);
22809
- if (existingIndex !== -1) {
22810
- if (existingIndex === prev.length - 1) {
22811
- return prev;
22812
- }
22813
- return prev.slice(0, existingIndex + 1);
22814
- }
22815
- if (isUploadServiceTab(newTab)) {
22816
- const parts = newTab.split(":");
22817
- const subTab = `${parts[0]}:${parts[1]}`;
22818
- const subTabIndex = prev.findIndex((item) => item.tab === subTab);
22819
- let newHistory2;
22820
- if (subTabIndex === -1) {
22821
- const uploadIndex = prev.findIndex((item) => item.tab === "upload");
22822
- if (uploadIndex === -1) {
22823
- newHistory2 = [
22824
- ...prev,
22825
- { tab: "upload", label: getTabLabel("upload") },
22826
- { tab: subTab, label: getTabLabel(subTab) }
22827
- ];
22828
- } else {
22829
- newHistory2 = [
22830
- ...prev.slice(0, uploadIndex + 1),
22831
- { tab: subTab, label: getTabLabel(subTab) }
22832
- ];
22833
- }
22834
- } else {
22835
- newHistory2 = prev.slice(0, subTabIndex + 1);
22836
- }
22837
- newHistory2.push({ tab: newTab, label: getTabLabel(newTab) });
22838
- const MAX_HISTORY2 = 5;
22839
- if (newHistory2.length > MAX_HISTORY2) {
22840
- return newHistory2.slice(newHistory2.length - MAX_HISTORY2);
22841
- }
22842
- return newHistory2;
22843
- }
22844
- if (isUploadSubTab(newTab)) {
22845
- const uploadIndex = prev.findIndex((item) => item.tab === "upload");
22846
- let newHistory2;
22847
- if (uploadIndex === -1) {
22848
- newHistory2 = [
22849
- ...prev,
22850
- { tab: "upload", label: getTabLabel("upload") }
22851
- ];
22852
- } else {
22853
- newHistory2 = prev.slice(0, uploadIndex + 1);
22854
- }
22855
- newHistory2.push({ tab: newTab, label: getTabLabel(newTab) });
22856
- const MAX_HISTORY2 = 5;
22857
- if (newHistory2.length > MAX_HISTORY2) {
22858
- return newHistory2.slice(newHistory2.length - MAX_HISTORY2);
22859
- }
22860
- return newHistory2;
22861
- }
22862
- if (newTab === "upload") {
22863
- const uploadIndex = prev.findIndex((item) => item.tab === "upload");
22864
- if (uploadIndex !== -1) {
22865
- return prev.slice(0, uploadIndex + 1);
22866
- }
22867
- }
22868
- const newHistory = [...prev, { tab: newTab, label: getTabLabel(newTab) }];
22869
- const MAX_HISTORY = 5;
22870
- if (newHistory.length > MAX_HISTORY) {
22871
- return newHistory.slice(newHistory.length - MAX_HISTORY);
22872
- }
22873
- return newHistory;
22874
- });
22875
- };
22876
22761
  useEffect(() => {
22877
22762
  if (_externalImage) {
22878
22763
  console.log("📸 Imagen externa detectada:", _externalImage);
@@ -22967,7 +22852,6 @@ function App({
22967
22852
  setSelectedImage(tempImage);
22968
22853
  if (activeFeatures.includes("cropper")) {
22969
22854
  setActiveTab("cropper");
22970
- addToNavigationHistory("cropper");
22971
22855
  } else {
22972
22856
  const result = await upload(file);
22973
22857
  if (result) {
@@ -23023,14 +22907,12 @@ function App({
23023
22907
  setSelectedImage(img);
23024
22908
  if (activeFeatures.includes("cropper")) {
23025
22909
  setActiveTab("cropper");
23026
- addToNavigationHistory("cropper");
23027
22910
  }
23028
22911
  };
23029
22912
  const handleTabChange = (tabId) => {
23030
22913
  setActiveTab(tabId);
23031
22914
  if (tabId !== "upload") resetUpload();
23032
22915
  if (tabId !== "gallery") resetDelete();
23033
- addToNavigationHistory(tabId);
23034
22916
  };
23035
22917
  const determineScenario = () => {
23036
22918
  if (modeUI === "crop-only" || activeFeatures.length === 1 && activeFeatures[0] === "cropper") {
@@ -23198,37 +23080,7 @@ function App({
23198
23080
  }
23199
23081
  console.error("Cropper error:", error);
23200
23082
  };
23201
- const navigateToHistoryPoint = (index) => {
23202
- const historyPoint = navigationHistory[index];
23203
- if (!historyPoint) return;
23204
- if (historyPoint.tab !== "cropper") {
23205
- setSelectedImage(null);
23206
- }
23207
- setActiveTab(historyPoint.tab);
23208
- setNavigationHistory((prev) => prev.slice(0, index + 1));
23209
- };
23210
- const getBreadcrumbs = () => {
23211
- if (navigationHistory.length <= 1) {
23212
- return null;
23213
- }
23214
- const items = navigationHistory.slice(0, -1).map((item, index) => {
23215
- return {
23216
- label: item.label,
23217
- onClick: item.tab !== "subir" || item.tab !== "upload" ? () => navigateToHistoryPoint(index) : void 0
23218
- };
23219
- });
23220
- const current = navigationHistory[navigationHistory.length - 1].label;
23221
- return { items, current };
23222
- };
23223
- const breadcrumbData = getBreadcrumbs();
23224
23083
  return /* @__PURE__ */ jsxs(Fragment, { children: [
23225
- breadcrumbData && /* @__PURE__ */ jsx(
23226
- Breadcrumb,
23227
- {
23228
- items: breadcrumbData.items,
23229
- currentLabel: breadcrumbData.current
23230
- }
23231
- ),
23232
23084
  ui.showTabs && activeTab != "cropper" && /* @__PURE__ */ jsx(Tabs, { tabs, active: activeTab, onChange: handleTabChange }),
23233
23085
  imagesError && /* @__PURE__ */ jsxs("div", { className: "alert alert-danger", children: [
23234
23086
  "Error al cargar imágenes: ",
@@ -23290,12 +23142,6 @@ function App({
23290
23142
  UploadForm,
23291
23143
  {
23292
23144
  onSelect: handleUploadAndCrop,
23293
- onSubTabChange: (subTabId) => {
23294
- addToNavigationHistory(`upload:${subTabId}`);
23295
- },
23296
- onServiceChange: (subTabId, serviceSlug) => {
23297
- addToNavigationHistory(`upload:${subTabId}:${serviceSlug}`);
23298
- },
23299
23145
  disabled: uploading,
23300
23146
  apiKey,
23301
23147
  prod
@@ -26933,7 +26779,7 @@ const Limbo = new LimboCore();
26933
26779
  if (typeof window !== "undefined") {
26934
26780
  window.Limbo = Limbo;
26935
26781
  }
26936
- const PUBLIC_KEY = "pk_e464fd744106b7a8d63d453c4bd02582";
26782
+ const PUBLIC_KEY = "pk_d2edad56de145fee22c8b80f6ce3448f";
26937
26783
  if (typeof window !== "undefined" && document.querySelector("#root")) {
26938
26784
  Limbo.configure({
26939
26785
  prod: false,