@cntrl-site/sdk 1.24.2 → 1.24.3-1
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/LICENSE +21 -21
- package/README.md +2 -2
- package/dist/index.js +329 -68
- package/dist/index.mjs +329 -68
- package/package.json +83 -83
- package/resources/template.scss.ejs +50 -50
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { URL } from "url";
|
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import UAParser from "ua-parser-js";
|
|
5
5
|
import * as MP4Box from "mp4box";
|
|
6
|
-
import {
|
|
6
|
+
import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
|
|
7
7
|
import { useState, useEffect, useRef, useMemo } from "react";
|
|
8
8
|
import { Splide, SplideSlide } from "@splidejs/react-splide";
|
|
9
9
|
import cn from "classnames";
|
|
@@ -1355,15 +1355,31 @@ const RichTextRenderer = ({ content }) => {
|
|
|
1355
1355
|
const getChildren = (children) => {
|
|
1356
1356
|
return children.map((child, i) => {
|
|
1357
1357
|
if (child.type === "link") {
|
|
1358
|
-
return /* @__PURE__ */
|
|
1358
|
+
return /* @__PURE__ */ jsxDEV("a", { className: styles$2.link, href: child.value, target: child.target, children: getChildren(child.children) }, i, false, {
|
|
1359
|
+
fileName: "H:/mom/sdk/src/Components/helpers/RichTextRenderer/RichTextRenderer.tsx",
|
|
1360
|
+
lineNumber: 13,
|
|
1361
|
+
columnNumber: 16
|
|
1362
|
+
}, void 0);
|
|
1359
1363
|
}
|
|
1360
|
-
return /* @__PURE__ */
|
|
1364
|
+
return /* @__PURE__ */ jsxDEV("span", { style: getLeafCss(child), children: child.text }, i, false, {
|
|
1365
|
+
fileName: "H:/mom/sdk/src/Components/helpers/RichTextRenderer/RichTextRenderer.tsx",
|
|
1366
|
+
lineNumber: 15,
|
|
1367
|
+
columnNumber: 14
|
|
1368
|
+
}, void 0);
|
|
1361
1369
|
});
|
|
1362
1370
|
};
|
|
1363
|
-
return /* @__PURE__ */
|
|
1371
|
+
return /* @__PURE__ */ jsxDEV(Fragment, { children: content.map((block, i) => {
|
|
1364
1372
|
const children = block.children;
|
|
1365
|
-
return /* @__PURE__ */
|
|
1366
|
-
|
|
1373
|
+
return /* @__PURE__ */ jsxDEV("div", { children: getChildren(children) }, i, false, {
|
|
1374
|
+
fileName: "H:/mom/sdk/src/Components/helpers/RichTextRenderer/RichTextRenderer.tsx",
|
|
1375
|
+
lineNumber: 23,
|
|
1376
|
+
columnNumber: 11
|
|
1377
|
+
}, void 0);
|
|
1378
|
+
}) }, void 0, false, {
|
|
1379
|
+
fileName: "H:/mom/sdk/src/Components/helpers/RichTextRenderer/RichTextRenderer.tsx",
|
|
1380
|
+
lineNumber: 19,
|
|
1381
|
+
columnNumber: 5
|
|
1382
|
+
}, void 0);
|
|
1367
1383
|
};
|
|
1368
1384
|
function getLeafCss(leaf) {
|
|
1369
1385
|
return {
|
|
@@ -1396,9 +1412,13 @@ const SvgImage = ({ url, fill = "#000000", hoverFill = "#CCCCCC", className = ""
|
|
|
1396
1412
|
}
|
|
1397
1413
|
}, []);
|
|
1398
1414
|
if (!url.endsWith(".svg") || !supportsMask) {
|
|
1399
|
-
return /* @__PURE__ */
|
|
1415
|
+
return /* @__PURE__ */ jsxDEV("img", { src: url, alt: "", className: cn(styles$1.img, className) }, void 0, false, {
|
|
1416
|
+
fileName: "H:/mom/sdk/src/Components/helpers/SvgImage/SvgImage.tsx",
|
|
1417
|
+
lineNumber: 23,
|
|
1418
|
+
columnNumber: 12
|
|
1419
|
+
}, void 0);
|
|
1400
1420
|
}
|
|
1401
|
-
return /* @__PURE__ */
|
|
1421
|
+
return /* @__PURE__ */ jsxDEV(
|
|
1402
1422
|
"span",
|
|
1403
1423
|
{
|
|
1404
1424
|
"data-supports-mask": supportsMask,
|
|
@@ -1408,7 +1428,15 @@ const SvgImage = ({ url, fill = "#000000", hoverFill = "#CCCCCC", className = ""
|
|
|
1408
1428
|
"--fill": fill,
|
|
1409
1429
|
"--hover-fill": hoverFill
|
|
1410
1430
|
}
|
|
1411
|
-
}
|
|
1431
|
+
},
|
|
1432
|
+
void 0,
|
|
1433
|
+
false,
|
|
1434
|
+
{
|
|
1435
|
+
fileName: "H:/mom/sdk/src/Components/helpers/SvgImage/SvgImage.tsx",
|
|
1436
|
+
lineNumber: 27,
|
|
1437
|
+
columnNumber: 5
|
|
1438
|
+
},
|
|
1439
|
+
void 0
|
|
1412
1440
|
);
|
|
1413
1441
|
};
|
|
1414
1442
|
const alignmentClassName = {
|
|
@@ -1455,7 +1483,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1455
1483
|
setKey((prev) => prev + 1);
|
|
1456
1484
|
prevSliderTypeRef.current = transition.type;
|
|
1457
1485
|
}, [transition.type]);
|
|
1458
|
-
return /* @__PURE__ */
|
|
1486
|
+
return /* @__PURE__ */ jsxDEV("div", { className: cn(styles$3.wrapper, { [styles$3.editor]: isEditor }), ref: setWrapperRef, children: /* @__PURE__ */ jsxDEV(
|
|
1459
1487
|
"div",
|
|
1460
1488
|
{
|
|
1461
1489
|
className: styles$3.sliderInner,
|
|
@@ -1465,15 +1493,15 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1465
1493
|
backgroundColor: transition.backgroundColor && transition.type === "fade in" ? transition.backgroundColor : "transparent"
|
|
1466
1494
|
},
|
|
1467
1495
|
children: [
|
|
1468
|
-
settings.caption.isActive && /* @__PURE__ */
|
|
1496
|
+
settings.caption.isActive && /* @__PURE__ */ jsxDEV(
|
|
1469
1497
|
"div",
|
|
1470
1498
|
{
|
|
1471
1499
|
className: cn(styles$3.captionBlock),
|
|
1472
|
-
children: /* @__PURE__ */
|
|
1500
|
+
children: /* @__PURE__ */ jsxDEV(
|
|
1473
1501
|
"div",
|
|
1474
1502
|
{
|
|
1475
1503
|
className: styles$3.captionTextWrapper,
|
|
1476
|
-
children: content.map((item, index) => /* @__PURE__ */
|
|
1504
|
+
children: content.map((item, index) => /* @__PURE__ */ jsxDEV(
|
|
1477
1505
|
"div",
|
|
1478
1506
|
{
|
|
1479
1507
|
className: cn(styles$3.captionText, alignmentClassName[caption.alignment], {
|
|
@@ -1496,7 +1524,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1496
1524
|
color,
|
|
1497
1525
|
transitionDuration: transition.duration ? `${Math.round(parseInt(transition.duration) / 2)}ms` : "500ms"
|
|
1498
1526
|
},
|
|
1499
|
-
children: /* @__PURE__ */
|
|
1527
|
+
children: /* @__PURE__ */ jsxDEV(
|
|
1500
1528
|
"div",
|
|
1501
1529
|
{
|
|
1502
1530
|
"data-styles": "caption",
|
|
@@ -1507,17 +1535,52 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1507
1535
|
top: scalingValue(caption.offset.y, isEditor),
|
|
1508
1536
|
left: scalingValue(caption.offset.x, isEditor)
|
|
1509
1537
|
},
|
|
1510
|
-
children: /* @__PURE__ */
|
|
1511
|
-
|
|
1538
|
+
children: /* @__PURE__ */ jsxDEV(RichTextRenderer, { content: item.imageCaption }, void 0, false, {
|
|
1539
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1540
|
+
lineNumber: 115,
|
|
1541
|
+
columnNumber: 19
|
|
1542
|
+
}, this)
|
|
1543
|
+
},
|
|
1544
|
+
void 0,
|
|
1545
|
+
false,
|
|
1546
|
+
{
|
|
1547
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1548
|
+
lineNumber: 105,
|
|
1549
|
+
columnNumber: 17
|
|
1550
|
+
},
|
|
1551
|
+
this
|
|
1512
1552
|
)
|
|
1513
1553
|
},
|
|
1514
|
-
index
|
|
1554
|
+
index,
|
|
1555
|
+
false,
|
|
1556
|
+
{
|
|
1557
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1558
|
+
lineNumber: 82,
|
|
1559
|
+
columnNumber: 15
|
|
1560
|
+
},
|
|
1561
|
+
this
|
|
1515
1562
|
))
|
|
1516
|
-
}
|
|
1563
|
+
},
|
|
1564
|
+
void 0,
|
|
1565
|
+
false,
|
|
1566
|
+
{
|
|
1567
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1568
|
+
lineNumber: 78,
|
|
1569
|
+
columnNumber: 11
|
|
1570
|
+
},
|
|
1571
|
+
this
|
|
1517
1572
|
)
|
|
1518
|
-
}
|
|
1573
|
+
},
|
|
1574
|
+
void 0,
|
|
1575
|
+
false,
|
|
1576
|
+
{
|
|
1577
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1578
|
+
lineNumber: 75,
|
|
1579
|
+
columnNumber: 9
|
|
1580
|
+
},
|
|
1581
|
+
this
|
|
1519
1582
|
),
|
|
1520
|
-
/* @__PURE__ */
|
|
1583
|
+
/* @__PURE__ */ jsxDEV(
|
|
1521
1584
|
Splide,
|
|
1522
1585
|
{
|
|
1523
1586
|
onMove: (e) => {
|
|
@@ -1540,15 +1603,15 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1540
1603
|
type: transition.type === "fade in" ? "fade" : "loop",
|
|
1541
1604
|
rewind: true
|
|
1542
1605
|
},
|
|
1543
|
-
children: content.map((item, index) => /* @__PURE__ */
|
|
1606
|
+
children: content.map((item, index) => /* @__PURE__ */ jsxDEV(SplideSlide, { children: /* @__PURE__ */ jsxDEV(
|
|
1544
1607
|
"div",
|
|
1545
1608
|
{
|
|
1546
1609
|
className: styles$3.sliderItem,
|
|
1547
|
-
children: /* @__PURE__ */
|
|
1610
|
+
children: /* @__PURE__ */ jsxDEV(
|
|
1548
1611
|
"div",
|
|
1549
1612
|
{
|
|
1550
1613
|
className: styles$3.imgWrapper,
|
|
1551
|
-
children: /* @__PURE__ */
|
|
1614
|
+
children: /* @__PURE__ */ jsxDEV(
|
|
1552
1615
|
"img",
|
|
1553
1616
|
{
|
|
1554
1617
|
className: cn(styles$3.sliderImage, {
|
|
@@ -1557,17 +1620,52 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1557
1620
|
}),
|
|
1558
1621
|
src: item.image.url,
|
|
1559
1622
|
alt: item.image.name ?? ""
|
|
1560
|
-
}
|
|
1623
|
+
},
|
|
1624
|
+
void 0,
|
|
1625
|
+
false,
|
|
1626
|
+
{
|
|
1627
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1628
|
+
lineNumber: 153,
|
|
1629
|
+
columnNumber: 17
|
|
1630
|
+
},
|
|
1631
|
+
this
|
|
1561
1632
|
)
|
|
1562
|
-
}
|
|
1633
|
+
},
|
|
1634
|
+
void 0,
|
|
1635
|
+
false,
|
|
1636
|
+
{
|
|
1637
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1638
|
+
lineNumber: 150,
|
|
1639
|
+
columnNumber: 15
|
|
1640
|
+
},
|
|
1641
|
+
this
|
|
1563
1642
|
)
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1643
|
+
},
|
|
1644
|
+
void 0,
|
|
1645
|
+
false,
|
|
1646
|
+
{
|
|
1647
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1648
|
+
lineNumber: 147,
|
|
1649
|
+
columnNumber: 13
|
|
1650
|
+
},
|
|
1651
|
+
this
|
|
1652
|
+
) }, index, false, {
|
|
1653
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1654
|
+
lineNumber: 146,
|
|
1655
|
+
columnNumber: 11
|
|
1656
|
+
}, this))
|
|
1566
1657
|
},
|
|
1567
|
-
key
|
|
1658
|
+
key,
|
|
1659
|
+
false,
|
|
1660
|
+
{
|
|
1661
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1662
|
+
lineNumber: 122,
|
|
1663
|
+
columnNumber: 7
|
|
1664
|
+
},
|
|
1665
|
+
this
|
|
1568
1666
|
),
|
|
1569
|
-
controls.isActive && /* @__PURE__ */
|
|
1570
|
-
/* @__PURE__ */
|
|
1667
|
+
controls.isActive && /* @__PURE__ */ jsxDEV(Fragment, { children: [
|
|
1668
|
+
/* @__PURE__ */ jsxDEV(
|
|
1571
1669
|
"div",
|
|
1572
1670
|
{
|
|
1573
1671
|
className: cn(styles$3.arrow, {
|
|
@@ -1577,7 +1675,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1577
1675
|
color: controls.color,
|
|
1578
1676
|
["--arrow-hover-color"]: controls.hover
|
|
1579
1677
|
},
|
|
1580
|
-
children: /* @__PURE__ */
|
|
1678
|
+
children: /* @__PURE__ */ jsxDEV(
|
|
1581
1679
|
"button",
|
|
1582
1680
|
{
|
|
1583
1681
|
onClick: () => {
|
|
@@ -1588,22 +1686,50 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1588
1686
|
transform: `translate(${scalingValue(controlsOffsetX, isEditor)}, ${scalingValue(controlsOffsetY * (direction === "horiz" ? 1 : -1), isEditor)}) scale(${settings.controls.scale / 100}) rotate(${direction === "horiz" ? "0deg" : "90deg"})`
|
|
1589
1687
|
},
|
|
1590
1688
|
children: [
|
|
1591
|
-
controls.arrowsImgUrl && /* @__PURE__ */
|
|
1689
|
+
controls.arrowsImgUrl && /* @__PURE__ */ jsxDEV(
|
|
1592
1690
|
SvgImage,
|
|
1593
1691
|
{
|
|
1594
1692
|
url: controls.arrowsImgUrl,
|
|
1595
1693
|
fill: controls.color,
|
|
1596
1694
|
hoverFill: controls.hover,
|
|
1597
1695
|
className: cn(styles$3.arrowImg, styles$3.mirror)
|
|
1598
|
-
}
|
|
1696
|
+
},
|
|
1697
|
+
void 0,
|
|
1698
|
+
false,
|
|
1699
|
+
{
|
|
1700
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1701
|
+
lineNumber: 186,
|
|
1702
|
+
columnNumber: 17
|
|
1703
|
+
},
|
|
1704
|
+
this
|
|
1599
1705
|
),
|
|
1600
|
-
!controls.arrowsImgUrl && /* @__PURE__ */
|
|
1706
|
+
!controls.arrowsImgUrl && /* @__PURE__ */ jsxDEV(ArrowIcon, { color: controls.color, className: cn(styles$3.arrowIcon, styles$3.arrowImg, styles$3.mirror) }, void 0, false, {
|
|
1707
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1708
|
+
lineNumber: 194,
|
|
1709
|
+
columnNumber: 17
|
|
1710
|
+
}, this)
|
|
1601
1711
|
]
|
|
1602
|
-
}
|
|
1712
|
+
},
|
|
1713
|
+
void 0,
|
|
1714
|
+
true,
|
|
1715
|
+
{
|
|
1716
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1717
|
+
lineNumber: 176,
|
|
1718
|
+
columnNumber: 13
|
|
1719
|
+
},
|
|
1720
|
+
this
|
|
1603
1721
|
)
|
|
1604
|
-
}
|
|
1722
|
+
},
|
|
1723
|
+
void 0,
|
|
1724
|
+
false,
|
|
1725
|
+
{
|
|
1726
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1727
|
+
lineNumber: 167,
|
|
1728
|
+
columnNumber: 11
|
|
1729
|
+
},
|
|
1730
|
+
this
|
|
1605
1731
|
),
|
|
1606
|
-
/* @__PURE__ */
|
|
1732
|
+
/* @__PURE__ */ jsxDEV(
|
|
1607
1733
|
"div",
|
|
1608
1734
|
{
|
|
1609
1735
|
className: cn(styles$3.arrow, styles$3.nextArrow, {
|
|
@@ -1613,7 +1739,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1613
1739
|
color: controls.color,
|
|
1614
1740
|
["--arrow-hover-color"]: controls.hover
|
|
1615
1741
|
},
|
|
1616
|
-
children: /* @__PURE__ */
|
|
1742
|
+
children: /* @__PURE__ */ jsxDEV(
|
|
1617
1743
|
"button",
|
|
1618
1744
|
{
|
|
1619
1745
|
className: styles$3.arrowInner,
|
|
@@ -1622,23 +1748,55 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1622
1748
|
transform: `translate(${scalingValue(controlsOffsetX * (direction === "horiz" ? -1 : 1), isEditor)}, ${scalingValue(controlsOffsetY, isEditor)}) scale(${settings.controls.scale / 100}) rotate(${direction === "horiz" ? "0deg" : "90deg"})`
|
|
1623
1749
|
},
|
|
1624
1750
|
children: [
|
|
1625
|
-
controls.arrowsImgUrl && /* @__PURE__ */
|
|
1751
|
+
controls.arrowsImgUrl && /* @__PURE__ */ jsxDEV(
|
|
1626
1752
|
SvgImage,
|
|
1627
1753
|
{
|
|
1628
1754
|
url: controls.arrowsImgUrl,
|
|
1629
1755
|
fill: controls.color,
|
|
1630
1756
|
hoverFill: controls.hover,
|
|
1631
1757
|
className: styles$3.arrowImg
|
|
1632
|
-
}
|
|
1758
|
+
},
|
|
1759
|
+
void 0,
|
|
1760
|
+
false,
|
|
1761
|
+
{
|
|
1762
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1763
|
+
lineNumber: 215,
|
|
1764
|
+
columnNumber: 17
|
|
1765
|
+
},
|
|
1766
|
+
this
|
|
1633
1767
|
),
|
|
1634
|
-
!controls.arrowsImgUrl && /* @__PURE__ */
|
|
1768
|
+
!controls.arrowsImgUrl && /* @__PURE__ */ jsxDEV(ArrowIcon, { color: controls.color, className: cn(styles$3.arrowIcon, styles$3.arrowImg) }, void 0, false, {
|
|
1769
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1770
|
+
lineNumber: 223,
|
|
1771
|
+
columnNumber: 17
|
|
1772
|
+
}, this)
|
|
1635
1773
|
]
|
|
1636
|
-
}
|
|
1774
|
+
},
|
|
1775
|
+
void 0,
|
|
1776
|
+
true,
|
|
1777
|
+
{
|
|
1778
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1779
|
+
lineNumber: 207,
|
|
1780
|
+
columnNumber: 13
|
|
1781
|
+
},
|
|
1782
|
+
this
|
|
1637
1783
|
)
|
|
1638
|
-
}
|
|
1784
|
+
},
|
|
1785
|
+
void 0,
|
|
1786
|
+
false,
|
|
1787
|
+
{
|
|
1788
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1789
|
+
lineNumber: 198,
|
|
1790
|
+
columnNumber: 11
|
|
1791
|
+
},
|
|
1792
|
+
this
|
|
1639
1793
|
)
|
|
1640
|
-
] }
|
|
1641
|
-
|
|
1794
|
+
] }, void 0, true, {
|
|
1795
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1796
|
+
lineNumber: 166,
|
|
1797
|
+
columnNumber: 9
|
|
1798
|
+
}, this),
|
|
1799
|
+
triggers.triggersList.click && /* @__PURE__ */ jsxDEV(
|
|
1642
1800
|
"div",
|
|
1643
1801
|
{
|
|
1644
1802
|
className: styles$3.clickOverlay,
|
|
@@ -1647,9 +1805,17 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1647
1805
|
sliderRef.go("+1");
|
|
1648
1806
|
}
|
|
1649
1807
|
}
|
|
1650
|
-
}
|
|
1808
|
+
},
|
|
1809
|
+
void 0,
|
|
1810
|
+
false,
|
|
1811
|
+
{
|
|
1812
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1813
|
+
lineNumber: 230,
|
|
1814
|
+
columnNumber: 9
|
|
1815
|
+
},
|
|
1816
|
+
this
|
|
1651
1817
|
),
|
|
1652
|
-
pagination2.isActive && /* @__PURE__ */
|
|
1818
|
+
pagination2.isActive && /* @__PURE__ */ jsxDEV(
|
|
1653
1819
|
"div",
|
|
1654
1820
|
{
|
|
1655
1821
|
className: cn(styles$3.pagination, {
|
|
@@ -1663,7 +1829,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1663
1829
|
[styles$3.paginationOutsideRight]: pagination2.position === "outside-2" && direction === "vert",
|
|
1664
1830
|
[styles$3.paginationVertical]: direction === "vert"
|
|
1665
1831
|
}),
|
|
1666
|
-
children: /* @__PURE__ */
|
|
1832
|
+
children: /* @__PURE__ */ jsxDEV(
|
|
1667
1833
|
"div",
|
|
1668
1834
|
{
|
|
1669
1835
|
className: styles$3.paginationInner,
|
|
@@ -1671,7 +1837,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1671
1837
|
backgroundColor: pagination2.colors[2],
|
|
1672
1838
|
transform: `scale(${pagination2.scale / 100}) translate(${scalingValue(pagination2.offset.x, isEditor)}, ${scalingValue(pagination2.offset.y, isEditor)}) rotate(${direction === "horiz" ? "0deg" : "90deg"})`
|
|
1673
1839
|
},
|
|
1674
|
-
children: content.map((_, index) => /* @__PURE__ */
|
|
1840
|
+
children: content.map((_, index) => /* @__PURE__ */ jsxDEV(
|
|
1675
1841
|
"button",
|
|
1676
1842
|
{
|
|
1677
1843
|
onClick: () => {
|
|
@@ -1680,7 +1846,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1680
1846
|
}
|
|
1681
1847
|
},
|
|
1682
1848
|
className: cn(styles$3.paginationItem),
|
|
1683
|
-
children: /* @__PURE__ */
|
|
1849
|
+
children: /* @__PURE__ */ jsxDEV(
|
|
1684
1850
|
"div",
|
|
1685
1851
|
{
|
|
1686
1852
|
className: cn(styles$3.dot, {
|
|
@@ -1690,21 +1856,76 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1690
1856
|
backgroundColor: index === currentSlideIndex ? pagination2.colors[0] : pagination2.colors[1],
|
|
1691
1857
|
["--pagination-hover-color"]: pagination2.hover
|
|
1692
1858
|
}
|
|
1693
|
-
}
|
|
1859
|
+
},
|
|
1860
|
+
void 0,
|
|
1861
|
+
false,
|
|
1862
|
+
{
|
|
1863
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1864
|
+
lineNumber: 270,
|
|
1865
|
+
columnNumber: 17
|
|
1866
|
+
},
|
|
1867
|
+
this
|
|
1694
1868
|
)
|
|
1695
1869
|
},
|
|
1696
|
-
index
|
|
1870
|
+
index,
|
|
1871
|
+
false,
|
|
1872
|
+
{
|
|
1873
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1874
|
+
lineNumber: 261,
|
|
1875
|
+
columnNumber: 15
|
|
1876
|
+
},
|
|
1877
|
+
this
|
|
1697
1878
|
))
|
|
1698
|
-
}
|
|
1879
|
+
},
|
|
1880
|
+
void 0,
|
|
1881
|
+
false,
|
|
1882
|
+
{
|
|
1883
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1884
|
+
lineNumber: 253,
|
|
1885
|
+
columnNumber: 11
|
|
1886
|
+
},
|
|
1887
|
+
this
|
|
1699
1888
|
)
|
|
1700
|
-
}
|
|
1889
|
+
},
|
|
1890
|
+
void 0,
|
|
1891
|
+
false,
|
|
1892
|
+
{
|
|
1893
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1894
|
+
lineNumber: 240,
|
|
1895
|
+
columnNumber: 9
|
|
1896
|
+
},
|
|
1897
|
+
this
|
|
1701
1898
|
)
|
|
1702
1899
|
]
|
|
1703
|
-
}
|
|
1704
|
-
|
|
1900
|
+
},
|
|
1901
|
+
void 0,
|
|
1902
|
+
true,
|
|
1903
|
+
{
|
|
1904
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1905
|
+
lineNumber: 66,
|
|
1906
|
+
columnNumber: 7
|
|
1907
|
+
},
|
|
1908
|
+
this
|
|
1909
|
+
) }, void 0, false, {
|
|
1910
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1911
|
+
lineNumber: 65,
|
|
1912
|
+
columnNumber: 5
|
|
1913
|
+
}, this);
|
|
1705
1914
|
}
|
|
1706
1915
|
function ArrowIcon({ color, className }) {
|
|
1707
|
-
return /* @__PURE__ */
|
|
1916
|
+
return /* @__PURE__ */ jsxDEV("svg", { viewBox: "0 0 10 18", className, children: /* @__PURE__ */ jsxDEV("g", { id: "Symbols", stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ jsxDEV("path", { d: "M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z", id: "Shape-Copy", fill: color, transform: "translate(5, 9) rotate(-90) translate(-5, -9)" }, void 0, false, {
|
|
1917
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1918
|
+
lineNumber: 293,
|
|
1919
|
+
columnNumber: 11
|
|
1920
|
+
}, this) }, void 0, false, {
|
|
1921
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1922
|
+
lineNumber: 292,
|
|
1923
|
+
columnNumber: 7
|
|
1924
|
+
}, this) }, void 0, false, {
|
|
1925
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1926
|
+
lineNumber: 291,
|
|
1927
|
+
columnNumber: 5
|
|
1928
|
+
}, this);
|
|
1708
1929
|
}
|
|
1709
1930
|
const ControlSliderComponent = {
|
|
1710
1931
|
element: ControlSlider,
|
|
@@ -2320,8 +2541,14 @@ function ImageRevealSlider({ settings, content, isEditor }) {
|
|
|
2320
2541
|
customWidth,
|
|
2321
2542
|
randomRange
|
|
2322
2543
|
);
|
|
2323
|
-
let x =
|
|
2324
|
-
|
|
2544
|
+
let x = 0, y = 0;
|
|
2545
|
+
if (revealPosition === "same") {
|
|
2546
|
+
x = containerWidth / 2;
|
|
2547
|
+
y = containerHeight / 2;
|
|
2548
|
+
} else {
|
|
2549
|
+
x = position.x ?? Math.random() * containerWidth;
|
|
2550
|
+
y = position.y ?? Math.random() * containerHeight;
|
|
2551
|
+
}
|
|
2325
2552
|
const adjustedX = Math.min(Math.max(x, width / 2), containerWidth - width / 2);
|
|
2326
2553
|
const adjustedY = Math.min(Math.max(y, height / 2), containerHeight - height / 2);
|
|
2327
2554
|
return {
|
|
@@ -2354,7 +2581,7 @@ function ImageRevealSlider({ settings, content, isEditor }) {
|
|
|
2354
2581
|
setCounter(defaultImageCount % content.length);
|
|
2355
2582
|
};
|
|
2356
2583
|
placeImages();
|
|
2357
|
-
}, [defaultContentUrls, sizeType, customWidth, randomRange]);
|
|
2584
|
+
}, [defaultContentUrls, sizeType, customWidth, randomRange, revealPosition]);
|
|
2358
2585
|
useEffect(() => {
|
|
2359
2586
|
if (visible === "lastOne") {
|
|
2360
2587
|
setPlacedImages((prev) => prev.length > 0 ? [prev[prev.length - 1]] : []);
|
|
@@ -2394,7 +2621,7 @@ function ImageRevealSlider({ settings, content, isEditor }) {
|
|
|
2394
2621
|
const isHover = target === "area" || isMouseOverImage(mouseX, mouseY, placedImages);
|
|
2395
2622
|
divRef.current.style.cursor = isHover ? `url(${hoverCursor}), auto` : `url(${defaultCursor}), auto`;
|
|
2396
2623
|
};
|
|
2397
|
-
return /* @__PURE__ */
|
|
2624
|
+
return /* @__PURE__ */ jsxDEV(
|
|
2398
2625
|
"div",
|
|
2399
2626
|
{
|
|
2400
2627
|
ref: divRef,
|
|
@@ -2402,7 +2629,7 @@ function ImageRevealSlider({ settings, content, isEditor }) {
|
|
|
2402
2629
|
onMouseEnter: handleMouseMove,
|
|
2403
2630
|
onMouseMove: handleMouseMove,
|
|
2404
2631
|
className: styles.imageRevealSlider,
|
|
2405
|
-
children: placedImages.map((img2) => /* @__PURE__ */
|
|
2632
|
+
children: placedImages.map((img2) => /* @__PURE__ */ jsxDEV(
|
|
2406
2633
|
"div",
|
|
2407
2634
|
{
|
|
2408
2635
|
className: styles.wrapper,
|
|
@@ -2414,26 +2641,60 @@ function ImageRevealSlider({ settings, content, isEditor }) {
|
|
|
2414
2641
|
width: img2.width ?? "auto",
|
|
2415
2642
|
height: "auto"
|
|
2416
2643
|
},
|
|
2417
|
-
children: target === "area" && img2.link ? /* @__PURE__ */
|
|
2644
|
+
children: target === "area" && img2.link ? /* @__PURE__ */ jsxDEV("a", { href: img2.link, target: "_blank", className: styles.link, children: /* @__PURE__ */ jsxDEV(
|
|
2418
2645
|
"img",
|
|
2419
2646
|
{
|
|
2420
2647
|
src: img2.url,
|
|
2421
2648
|
alt: img2.name,
|
|
2422
2649
|
className: styles.image
|
|
2423
2650
|
},
|
|
2424
|
-
img2.id
|
|
2425
|
-
|
|
2651
|
+
img2.id,
|
|
2652
|
+
false,
|
|
2653
|
+
{
|
|
2654
|
+
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2655
|
+
lineNumber: 263,
|
|
2656
|
+
columnNumber: 15
|
|
2657
|
+
},
|
|
2658
|
+
this
|
|
2659
|
+
) }, void 0, false, {
|
|
2660
|
+
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2661
|
+
lineNumber: 262,
|
|
2662
|
+
columnNumber: 13
|
|
2663
|
+
}, this) : /* @__PURE__ */ jsxDEV(
|
|
2426
2664
|
"img",
|
|
2427
2665
|
{
|
|
2428
2666
|
src: img2.url,
|
|
2429
2667
|
alt: img2.name,
|
|
2430
2668
|
className: styles.image
|
|
2431
2669
|
},
|
|
2432
|
-
img2.id
|
|
2670
|
+
img2.id,
|
|
2671
|
+
false,
|
|
2672
|
+
{
|
|
2673
|
+
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2674
|
+
lineNumber: 271,
|
|
2675
|
+
columnNumber: 13
|
|
2676
|
+
},
|
|
2677
|
+
this
|
|
2433
2678
|
)
|
|
2434
|
-
}
|
|
2679
|
+
},
|
|
2680
|
+
void 0,
|
|
2681
|
+
false,
|
|
2682
|
+
{
|
|
2683
|
+
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2684
|
+
lineNumber: 251,
|
|
2685
|
+
columnNumber: 9
|
|
2686
|
+
},
|
|
2687
|
+
this
|
|
2435
2688
|
))
|
|
2436
|
-
}
|
|
2689
|
+
},
|
|
2690
|
+
void 0,
|
|
2691
|
+
false,
|
|
2692
|
+
{
|
|
2693
|
+
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2694
|
+
lineNumber: 243,
|
|
2695
|
+
columnNumber: 5
|
|
2696
|
+
},
|
|
2697
|
+
this
|
|
2437
2698
|
);
|
|
2438
2699
|
}
|
|
2439
2700
|
const ControlImageRevealSliderComponent = {
|