limbo-component 1.6.1 → 1.6.3
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.cjs.js +3 -3
- package/dist/limbo.cjs.map +1 -1
- package/dist/limbo.es.js +69 -88
- package/dist/limbo.es.map +1 -1
- package/dist/limbo.min.js +2 -2
- package/dist/limbo.min.js.map +1 -1
- package/dist/limbo.umd.js +2 -2
- package/dist/limbo.umd.js.map +1 -1
- package/dist/types/components/ImageCard.d.ts.map +1 -1
- package/dist/types/core/LimboCore.d.ts.map +1 -1
- package/package.json +3 -2
package/dist/limbo.es.js
CHANGED
|
@@ -30453,9 +30453,9 @@ function Tabs({ tabs, active, onChange }) {
|
|
|
30453
30453
|
);
|
|
30454
30454
|
}
|
|
30455
30455
|
const API_URLS = {
|
|
30456
|
-
|
|
30457
|
-
|
|
30458
|
-
// LOCAL - Para desarrollo local
|
|
30456
|
+
DEV: "https://led-dev-limbo-dev.eu.els.local",
|
|
30457
|
+
// PREPRODUCCIÓN - Updated URL
|
|
30458
|
+
// DEV: "http://localhost", // LOCAL - Para desarrollo local
|
|
30459
30459
|
PROD: "https://limbo.lefebvre.com"
|
|
30460
30460
|
};
|
|
30461
30461
|
let globalConfig = {
|
|
@@ -30497,7 +30497,7 @@ async function getHeaders({ isFormData = false, useJWT = true, customHeaders = {
|
|
|
30497
30497
|
const endpoint = globalConfig.tokenEndpoint || "/auth/token";
|
|
30498
30498
|
const response = await fetch(`${baseUrl}${endpoint}`, {
|
|
30499
30499
|
method: "POST",
|
|
30500
|
-
headers: { "Content-Type": "application/json" },
|
|
30500
|
+
headers: { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*" },
|
|
30501
30501
|
body: JSON.stringify({ public_key: globalConfig.publicKey }),
|
|
30502
30502
|
credentials: "include"
|
|
30503
30503
|
// Incluir cookies de sesión
|
|
@@ -31403,7 +31403,9 @@ function ImageCard({
|
|
|
31403
31403
|
}) {
|
|
31404
31404
|
const [copied, setCopied] = useState(false);
|
|
31405
31405
|
const [showVariants, setShowVariants] = useState(false);
|
|
31406
|
-
const [localVariantsCount, setLocalVariantsCount] = useState(
|
|
31406
|
+
const [localVariantsCount, setLocalVariantsCount] = useState(
|
|
31407
|
+
image.variants_count || 0
|
|
31408
|
+
);
|
|
31407
31409
|
const { isMobile, isTouch } = useMobileDetection();
|
|
31408
31410
|
const accessibilityManager = window.limboCore?.accessibilityManager;
|
|
31409
31411
|
const config = window.limboCore?.config?.getGlobal() || {};
|
|
@@ -31446,7 +31448,9 @@ function ImageCard({
|
|
|
31446
31448
|
accessibilityManager?.announce(
|
|
31447
31449
|
`Error al copiar URL de ${image.filename}. Inténtalo de nuevo.`
|
|
31448
31450
|
);
|
|
31449
|
-
alert(
|
|
31451
|
+
alert(
|
|
31452
|
+
`Error al copiar URL de ${image.filename}. Por favor, inténtalo de nuevo.`
|
|
31453
|
+
);
|
|
31450
31454
|
}
|
|
31451
31455
|
};
|
|
31452
31456
|
const handleDownload = (e) => {
|
|
@@ -31565,27 +31569,56 @@ function ImageCard({
|
|
|
31565
31569
|
{
|
|
31566
31570
|
className: `limbo-image-actions ${isMobile ? "limbo-image-actions--mobile" : ""}`,
|
|
31567
31571
|
children: [
|
|
31568
|
-
|
|
31572
|
+
shouldShowVariantsButton && /* @__PURE__ */ jsxs(
|
|
31569
31573
|
"button",
|
|
31570
31574
|
{
|
|
31571
31575
|
type: "button",
|
|
31572
|
-
title:
|
|
31573
|
-
className: `btn btn-
|
|
31574
|
-
onClick:
|
|
31576
|
+
title: `Ver ${variantsCount} variante${variantsCount !== 1 ? "s" : ""}`,
|
|
31577
|
+
className: `btn btn-variants border border-brand-blue-050/50 ${isMobile ? "btn--touch" : ""}`,
|
|
31578
|
+
onClick: handleShowVariants,
|
|
31575
31579
|
tabIndex: -1,
|
|
31576
31580
|
style: {
|
|
31577
31581
|
...isMobile && {
|
|
31578
31582
|
width: "40px",
|
|
31579
31583
|
height: "40px"
|
|
31580
|
-
}
|
|
31584
|
+
},
|
|
31585
|
+
position: "relative"
|
|
31581
31586
|
},
|
|
31582
|
-
children:
|
|
31583
|
-
|
|
31584
|
-
|
|
31585
|
-
|
|
31586
|
-
|
|
31587
|
-
|
|
31588
|
-
|
|
31587
|
+
children: [
|
|
31588
|
+
/* @__PURE__ */ jsx(
|
|
31589
|
+
"span",
|
|
31590
|
+
{
|
|
31591
|
+
className: "icon icon-album-menu-white icon--sm",
|
|
31592
|
+
"aria-hidden": "true"
|
|
31593
|
+
}
|
|
31594
|
+
),
|
|
31595
|
+
variantsCount > 0 && /* @__PURE__ */ jsx(
|
|
31596
|
+
"span",
|
|
31597
|
+
{
|
|
31598
|
+
className: "variants-count-badge",
|
|
31599
|
+
style: {
|
|
31600
|
+
position: "absolute",
|
|
31601
|
+
top: "-8px",
|
|
31602
|
+
right: "-8px",
|
|
31603
|
+
background: "#dc2626",
|
|
31604
|
+
color: "white",
|
|
31605
|
+
borderRadius: "50%",
|
|
31606
|
+
minWidth: "20px",
|
|
31607
|
+
height: "20px",
|
|
31608
|
+
fontSize: "12px",
|
|
31609
|
+
fontWeight: "700",
|
|
31610
|
+
display: "flex",
|
|
31611
|
+
alignItems: "center",
|
|
31612
|
+
justifyContent: "center",
|
|
31613
|
+
lineHeight: "1",
|
|
31614
|
+
border: "2px solid white",
|
|
31615
|
+
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.4)",
|
|
31616
|
+
zIndex: "999"
|
|
31617
|
+
},
|
|
31618
|
+
children: variantsCount
|
|
31619
|
+
}
|
|
31620
|
+
)
|
|
31621
|
+
]
|
|
31589
31622
|
}
|
|
31590
31623
|
),
|
|
31591
31624
|
shouldShowSelectButton && /* @__PURE__ */ jsx(
|
|
@@ -31634,56 +31667,27 @@ function ImageCard({
|
|
|
31634
31667
|
)
|
|
31635
31668
|
}
|
|
31636
31669
|
),
|
|
31637
|
-
|
|
31670
|
+
allowedActions.copy && /* @__PURE__ */ jsx(
|
|
31638
31671
|
"button",
|
|
31639
31672
|
{
|
|
31640
31673
|
type: "button",
|
|
31641
|
-
title:
|
|
31642
|
-
className: `btn btn-
|
|
31643
|
-
onClick:
|
|
31674
|
+
title: copied ? "¡Copiado!" : "Copiar URL",
|
|
31675
|
+
className: `btn btn-copy border border-brand-blue-050/50 ${isMobile ? "btn--touch" : ""}`,
|
|
31676
|
+
onClick: handleCopyUrl,
|
|
31644
31677
|
tabIndex: -1,
|
|
31645
31678
|
style: {
|
|
31646
31679
|
...isMobile && {
|
|
31647
31680
|
width: "40px",
|
|
31648
31681
|
height: "40px"
|
|
31649
|
-
}
|
|
31650
|
-
position: "relative"
|
|
31682
|
+
}
|
|
31651
31683
|
},
|
|
31652
|
-
children:
|
|
31653
|
-
|
|
31654
|
-
|
|
31655
|
-
{
|
|
31656
|
-
|
|
31657
|
-
|
|
31658
|
-
|
|
31659
|
-
),
|
|
31660
|
-
variantsCount > 0 && /* @__PURE__ */ jsx(
|
|
31661
|
-
"span",
|
|
31662
|
-
{
|
|
31663
|
-
className: "variants-count-badge",
|
|
31664
|
-
style: {
|
|
31665
|
-
position: "absolute",
|
|
31666
|
-
top: "-8px",
|
|
31667
|
-
right: "-8px",
|
|
31668
|
-
background: "#dc2626",
|
|
31669
|
-
color: "white",
|
|
31670
|
-
borderRadius: "50%",
|
|
31671
|
-
minWidth: "20px",
|
|
31672
|
-
height: "20px",
|
|
31673
|
-
fontSize: "12px",
|
|
31674
|
-
fontWeight: "700",
|
|
31675
|
-
display: "flex",
|
|
31676
|
-
alignItems: "center",
|
|
31677
|
-
justifyContent: "center",
|
|
31678
|
-
lineHeight: "1",
|
|
31679
|
-
border: "2px solid white",
|
|
31680
|
-
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.4)",
|
|
31681
|
-
zIndex: "999"
|
|
31682
|
-
},
|
|
31683
|
-
children: variantsCount
|
|
31684
|
-
}
|
|
31685
|
-
)
|
|
31686
|
-
]
|
|
31684
|
+
children: /* @__PURE__ */ jsx(
|
|
31685
|
+
"span",
|
|
31686
|
+
{
|
|
31687
|
+
className: `icon ${copied ? "icon-copied-white" : "icon-copy-white"} icon--sm`,
|
|
31688
|
+
"aria-hidden": "true"
|
|
31689
|
+
}
|
|
31690
|
+
)
|
|
31687
31691
|
}
|
|
31688
31692
|
),
|
|
31689
31693
|
allowedActions.download && /* @__PURE__ */ jsx(
|
|
@@ -41705,9 +41709,12 @@ class LimboCore {
|
|
|
41705
41709
|
// Solo para authMode: "dev"
|
|
41706
41710
|
token: options.token,
|
|
41707
41711
|
// Solo para authMode: "manual"
|
|
41708
|
-
authMode: options.authMode,
|
|
41709
|
-
// "session" | "
|
|
41710
|
-
prod: options.prod || false
|
|
41712
|
+
authMode: options.authMode || "manual",
|
|
41713
|
+
// "session" | "manual"
|
|
41714
|
+
prod: options.prod || false,
|
|
41715
|
+
mode: options.mode || "embed",
|
|
41716
|
+
// "embed" | "modal"
|
|
41717
|
+
callbacks: options.callbacks || null
|
|
41711
41718
|
});
|
|
41712
41719
|
return this.config;
|
|
41713
41720
|
}
|
|
@@ -41880,32 +41887,6 @@ const Limbo = new LimboCore();
|
|
|
41880
41887
|
if (typeof window !== "undefined") {
|
|
41881
41888
|
window.Limbo = Limbo;
|
|
41882
41889
|
}
|
|
41883
|
-
const PUBLIC_KEY = "pk_9fcfdd91a14755cc68d0e11a14269554";
|
|
41884
|
-
if (typeof window !== "undefined" && document.querySelector("#root")) {
|
|
41885
|
-
Limbo.configure({
|
|
41886
|
-
prod: false,
|
|
41887
|
-
publicKey: PUBLIC_KEY,
|
|
41888
|
-
authMode: "session"
|
|
41889
|
-
});
|
|
41890
|
-
Limbo.create({
|
|
41891
|
-
container: "#root",
|
|
41892
|
-
mode: "embed",
|
|
41893
|
-
modeUI: "full",
|
|
41894
|
-
features: ["gallery", "upload", "cropper"],
|
|
41895
|
-
title: "Limbo Image Manager - Development",
|
|
41896
|
-
url: true
|
|
41897
|
-
});
|
|
41898
|
-
Limbo.configureAutoInputs({
|
|
41899
|
-
dataset: "data-limbo-input-file",
|
|
41900
|
-
return: "url",
|
|
41901
|
-
features: ["gallery", "upload", "cropper"],
|
|
41902
|
-
modeUI: "full",
|
|
41903
|
-
modalSize: "large",
|
|
41904
|
-
title: "Seleccionar imagen",
|
|
41905
|
-
crops: "free",
|
|
41906
|
-
allowDelete: false
|
|
41907
|
-
});
|
|
41908
|
-
}
|
|
41909
41890
|
export {
|
|
41910
41891
|
Limbo as default
|
|
41911
41892
|
};
|