@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.js
CHANGED
|
@@ -5,7 +5,7 @@ const url = require("url");
|
|
|
5
5
|
const zod = require("zod");
|
|
6
6
|
const UAParser = require("ua-parser-js");
|
|
7
7
|
const MP4Box = require("mp4box");
|
|
8
|
-
const
|
|
8
|
+
const jsxDevRuntime = require("react/jsx-dev-runtime");
|
|
9
9
|
const react = require("react");
|
|
10
10
|
const reactSplide = require("@splidejs/react-splide");
|
|
11
11
|
const cn = require("classnames");
|
|
@@ -1374,15 +1374,31 @@ const RichTextRenderer = ({ content }) => {
|
|
|
1374
1374
|
const getChildren = (children) => {
|
|
1375
1375
|
return children.map((child, i) => {
|
|
1376
1376
|
if (child.type === "link") {
|
|
1377
|
-
return /* @__PURE__ */
|
|
1377
|
+
return /* @__PURE__ */ jsxDevRuntime.jsxDEV("a", { className: styles$2.link, href: child.value, target: child.target, children: getChildren(child.children) }, i, false, {
|
|
1378
|
+
fileName: "H:/mom/sdk/src/Components/helpers/RichTextRenderer/RichTextRenderer.tsx",
|
|
1379
|
+
lineNumber: 13,
|
|
1380
|
+
columnNumber: 16
|
|
1381
|
+
}, void 0);
|
|
1378
1382
|
}
|
|
1379
|
-
return /* @__PURE__ */
|
|
1383
|
+
return /* @__PURE__ */ jsxDevRuntime.jsxDEV("span", { style: getLeafCss(child), children: child.text }, i, false, {
|
|
1384
|
+
fileName: "H:/mom/sdk/src/Components/helpers/RichTextRenderer/RichTextRenderer.tsx",
|
|
1385
|
+
lineNumber: 15,
|
|
1386
|
+
columnNumber: 14
|
|
1387
|
+
}, void 0);
|
|
1380
1388
|
});
|
|
1381
1389
|
};
|
|
1382
|
-
return /* @__PURE__ */
|
|
1390
|
+
return /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children: content.map((block, i) => {
|
|
1383
1391
|
const children = block.children;
|
|
1384
|
-
return /* @__PURE__ */
|
|
1385
|
-
|
|
1392
|
+
return /* @__PURE__ */ jsxDevRuntime.jsxDEV("div", { children: getChildren(children) }, i, false, {
|
|
1393
|
+
fileName: "H:/mom/sdk/src/Components/helpers/RichTextRenderer/RichTextRenderer.tsx",
|
|
1394
|
+
lineNumber: 23,
|
|
1395
|
+
columnNumber: 11
|
|
1396
|
+
}, void 0);
|
|
1397
|
+
}) }, void 0, false, {
|
|
1398
|
+
fileName: "H:/mom/sdk/src/Components/helpers/RichTextRenderer/RichTextRenderer.tsx",
|
|
1399
|
+
lineNumber: 19,
|
|
1400
|
+
columnNumber: 5
|
|
1401
|
+
}, void 0);
|
|
1386
1402
|
};
|
|
1387
1403
|
function getLeafCss(leaf) {
|
|
1388
1404
|
return {
|
|
@@ -1415,9 +1431,13 @@ const SvgImage = ({ url: url2, fill = "#000000", hoverFill = "#CCCCCC", classNam
|
|
|
1415
1431
|
}
|
|
1416
1432
|
}, []);
|
|
1417
1433
|
if (!url2.endsWith(".svg") || !supportsMask) {
|
|
1418
|
-
return /* @__PURE__ */
|
|
1434
|
+
return /* @__PURE__ */ jsxDevRuntime.jsxDEV("img", { src: url2, alt: "", className: cn(styles$1.img, className) }, void 0, false, {
|
|
1435
|
+
fileName: "H:/mom/sdk/src/Components/helpers/SvgImage/SvgImage.tsx",
|
|
1436
|
+
lineNumber: 23,
|
|
1437
|
+
columnNumber: 12
|
|
1438
|
+
}, void 0);
|
|
1419
1439
|
}
|
|
1420
|
-
return /* @__PURE__ */
|
|
1440
|
+
return /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1421
1441
|
"span",
|
|
1422
1442
|
{
|
|
1423
1443
|
"data-supports-mask": supportsMask,
|
|
@@ -1427,7 +1447,15 @@ const SvgImage = ({ url: url2, fill = "#000000", hoverFill = "#CCCCCC", classNam
|
|
|
1427
1447
|
"--fill": fill,
|
|
1428
1448
|
"--hover-fill": hoverFill
|
|
1429
1449
|
}
|
|
1430
|
-
}
|
|
1450
|
+
},
|
|
1451
|
+
void 0,
|
|
1452
|
+
false,
|
|
1453
|
+
{
|
|
1454
|
+
fileName: "H:/mom/sdk/src/Components/helpers/SvgImage/SvgImage.tsx",
|
|
1455
|
+
lineNumber: 27,
|
|
1456
|
+
columnNumber: 5
|
|
1457
|
+
},
|
|
1458
|
+
void 0
|
|
1431
1459
|
);
|
|
1432
1460
|
};
|
|
1433
1461
|
const alignmentClassName = {
|
|
@@ -1474,7 +1502,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1474
1502
|
setKey((prev) => prev + 1);
|
|
1475
1503
|
prevSliderTypeRef.current = transition.type;
|
|
1476
1504
|
}, [transition.type]);
|
|
1477
|
-
return /* @__PURE__ */
|
|
1505
|
+
return /* @__PURE__ */ jsxDevRuntime.jsxDEV("div", { className: cn(styles$3.wrapper, { [styles$3.editor]: isEditor }), ref: setWrapperRef, children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1478
1506
|
"div",
|
|
1479
1507
|
{
|
|
1480
1508
|
className: styles$3.sliderInner,
|
|
@@ -1484,15 +1512,15 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1484
1512
|
backgroundColor: transition.backgroundColor && transition.type === "fade in" ? transition.backgroundColor : "transparent"
|
|
1485
1513
|
},
|
|
1486
1514
|
children: [
|
|
1487
|
-
settings.caption.isActive && /* @__PURE__ */
|
|
1515
|
+
settings.caption.isActive && /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1488
1516
|
"div",
|
|
1489
1517
|
{
|
|
1490
1518
|
className: cn(styles$3.captionBlock),
|
|
1491
|
-
children: /* @__PURE__ */
|
|
1519
|
+
children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1492
1520
|
"div",
|
|
1493
1521
|
{
|
|
1494
1522
|
className: styles$3.captionTextWrapper,
|
|
1495
|
-
children: content.map((item, index) => /* @__PURE__ */
|
|
1523
|
+
children: content.map((item, index) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1496
1524
|
"div",
|
|
1497
1525
|
{
|
|
1498
1526
|
className: cn(styles$3.captionText, alignmentClassName[caption.alignment], {
|
|
@@ -1515,7 +1543,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1515
1543
|
color,
|
|
1516
1544
|
transitionDuration: transition.duration ? `${Math.round(parseInt(transition.duration) / 2)}ms` : "500ms"
|
|
1517
1545
|
},
|
|
1518
|
-
children: /* @__PURE__ */
|
|
1546
|
+
children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1519
1547
|
"div",
|
|
1520
1548
|
{
|
|
1521
1549
|
"data-styles": "caption",
|
|
@@ -1526,17 +1554,52 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1526
1554
|
top: scalingValue(caption.offset.y, isEditor),
|
|
1527
1555
|
left: scalingValue(caption.offset.x, isEditor)
|
|
1528
1556
|
},
|
|
1529
|
-
children: /* @__PURE__ */
|
|
1530
|
-
|
|
1557
|
+
children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(RichTextRenderer, { content: item.imageCaption }, void 0, false, {
|
|
1558
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1559
|
+
lineNumber: 115,
|
|
1560
|
+
columnNumber: 19
|
|
1561
|
+
}, this)
|
|
1562
|
+
},
|
|
1563
|
+
void 0,
|
|
1564
|
+
false,
|
|
1565
|
+
{
|
|
1566
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1567
|
+
lineNumber: 105,
|
|
1568
|
+
columnNumber: 17
|
|
1569
|
+
},
|
|
1570
|
+
this
|
|
1531
1571
|
)
|
|
1532
1572
|
},
|
|
1533
|
-
index
|
|
1573
|
+
index,
|
|
1574
|
+
false,
|
|
1575
|
+
{
|
|
1576
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1577
|
+
lineNumber: 82,
|
|
1578
|
+
columnNumber: 15
|
|
1579
|
+
},
|
|
1580
|
+
this
|
|
1534
1581
|
))
|
|
1535
|
-
}
|
|
1582
|
+
},
|
|
1583
|
+
void 0,
|
|
1584
|
+
false,
|
|
1585
|
+
{
|
|
1586
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1587
|
+
lineNumber: 78,
|
|
1588
|
+
columnNumber: 11
|
|
1589
|
+
},
|
|
1590
|
+
this
|
|
1536
1591
|
)
|
|
1537
|
-
}
|
|
1592
|
+
},
|
|
1593
|
+
void 0,
|
|
1594
|
+
false,
|
|
1595
|
+
{
|
|
1596
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1597
|
+
lineNumber: 75,
|
|
1598
|
+
columnNumber: 9
|
|
1599
|
+
},
|
|
1600
|
+
this
|
|
1538
1601
|
),
|
|
1539
|
-
/* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1540
1603
|
reactSplide.Splide,
|
|
1541
1604
|
{
|
|
1542
1605
|
onMove: (e) => {
|
|
@@ -1559,15 +1622,15 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1559
1622
|
type: transition.type === "fade in" ? "fade" : "loop",
|
|
1560
1623
|
rewind: true
|
|
1561
1624
|
},
|
|
1562
|
-
children: content.map((item, index) => /* @__PURE__ */
|
|
1625
|
+
children: content.map((item, index) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(reactSplide.SplideSlide, { children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1563
1626
|
"div",
|
|
1564
1627
|
{
|
|
1565
1628
|
className: styles$3.sliderItem,
|
|
1566
|
-
children: /* @__PURE__ */
|
|
1629
|
+
children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1567
1630
|
"div",
|
|
1568
1631
|
{
|
|
1569
1632
|
className: styles$3.imgWrapper,
|
|
1570
|
-
children: /* @__PURE__ */
|
|
1633
|
+
children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1571
1634
|
"img",
|
|
1572
1635
|
{
|
|
1573
1636
|
className: cn(styles$3.sliderImage, {
|
|
@@ -1576,17 +1639,52 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1576
1639
|
}),
|
|
1577
1640
|
src: item.image.url,
|
|
1578
1641
|
alt: item.image.name ?? ""
|
|
1579
|
-
}
|
|
1642
|
+
},
|
|
1643
|
+
void 0,
|
|
1644
|
+
false,
|
|
1645
|
+
{
|
|
1646
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1647
|
+
lineNumber: 153,
|
|
1648
|
+
columnNumber: 17
|
|
1649
|
+
},
|
|
1650
|
+
this
|
|
1580
1651
|
)
|
|
1581
|
-
}
|
|
1652
|
+
},
|
|
1653
|
+
void 0,
|
|
1654
|
+
false,
|
|
1655
|
+
{
|
|
1656
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1657
|
+
lineNumber: 150,
|
|
1658
|
+
columnNumber: 15
|
|
1659
|
+
},
|
|
1660
|
+
this
|
|
1582
1661
|
)
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1662
|
+
},
|
|
1663
|
+
void 0,
|
|
1664
|
+
false,
|
|
1665
|
+
{
|
|
1666
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1667
|
+
lineNumber: 147,
|
|
1668
|
+
columnNumber: 13
|
|
1669
|
+
},
|
|
1670
|
+
this
|
|
1671
|
+
) }, index, false, {
|
|
1672
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1673
|
+
lineNumber: 146,
|
|
1674
|
+
columnNumber: 11
|
|
1675
|
+
}, this))
|
|
1585
1676
|
},
|
|
1586
|
-
key
|
|
1677
|
+
key,
|
|
1678
|
+
false,
|
|
1679
|
+
{
|
|
1680
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1681
|
+
lineNumber: 122,
|
|
1682
|
+
columnNumber: 7
|
|
1683
|
+
},
|
|
1684
|
+
this
|
|
1587
1685
|
),
|
|
1588
|
-
controls.isActive && /* @__PURE__ */
|
|
1589
|
-
/* @__PURE__ */
|
|
1686
|
+
controls.isActive && /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children: [
|
|
1687
|
+
/* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1590
1688
|
"div",
|
|
1591
1689
|
{
|
|
1592
1690
|
className: cn(styles$3.arrow, {
|
|
@@ -1596,7 +1694,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1596
1694
|
color: controls.color,
|
|
1597
1695
|
["--arrow-hover-color"]: controls.hover
|
|
1598
1696
|
},
|
|
1599
|
-
children: /* @__PURE__ */
|
|
1697
|
+
children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1600
1698
|
"button",
|
|
1601
1699
|
{
|
|
1602
1700
|
onClick: () => {
|
|
@@ -1607,22 +1705,50 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1607
1705
|
transform: `translate(${scalingValue(controlsOffsetX, isEditor)}, ${scalingValue(controlsOffsetY * (direction === "horiz" ? 1 : -1), isEditor)}) scale(${settings.controls.scale / 100}) rotate(${direction === "horiz" ? "0deg" : "90deg"})`
|
|
1608
1706
|
},
|
|
1609
1707
|
children: [
|
|
1610
|
-
controls.arrowsImgUrl && /* @__PURE__ */
|
|
1708
|
+
controls.arrowsImgUrl && /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1611
1709
|
SvgImage,
|
|
1612
1710
|
{
|
|
1613
1711
|
url: controls.arrowsImgUrl,
|
|
1614
1712
|
fill: controls.color,
|
|
1615
1713
|
hoverFill: controls.hover,
|
|
1616
1714
|
className: cn(styles$3.arrowImg, styles$3.mirror)
|
|
1617
|
-
}
|
|
1715
|
+
},
|
|
1716
|
+
void 0,
|
|
1717
|
+
false,
|
|
1718
|
+
{
|
|
1719
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1720
|
+
lineNumber: 186,
|
|
1721
|
+
columnNumber: 17
|
|
1722
|
+
},
|
|
1723
|
+
this
|
|
1618
1724
|
),
|
|
1619
|
-
!controls.arrowsImgUrl && /* @__PURE__ */
|
|
1725
|
+
!controls.arrowsImgUrl && /* @__PURE__ */ jsxDevRuntime.jsxDEV(ArrowIcon, { color: controls.color, className: cn(styles$3.arrowIcon, styles$3.arrowImg, styles$3.mirror) }, void 0, false, {
|
|
1726
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1727
|
+
lineNumber: 194,
|
|
1728
|
+
columnNumber: 17
|
|
1729
|
+
}, this)
|
|
1620
1730
|
]
|
|
1621
|
-
}
|
|
1731
|
+
},
|
|
1732
|
+
void 0,
|
|
1733
|
+
true,
|
|
1734
|
+
{
|
|
1735
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1736
|
+
lineNumber: 176,
|
|
1737
|
+
columnNumber: 13
|
|
1738
|
+
},
|
|
1739
|
+
this
|
|
1622
1740
|
)
|
|
1623
|
-
}
|
|
1741
|
+
},
|
|
1742
|
+
void 0,
|
|
1743
|
+
false,
|
|
1744
|
+
{
|
|
1745
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1746
|
+
lineNumber: 167,
|
|
1747
|
+
columnNumber: 11
|
|
1748
|
+
},
|
|
1749
|
+
this
|
|
1624
1750
|
),
|
|
1625
|
-
/* @__PURE__ */
|
|
1751
|
+
/* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1626
1752
|
"div",
|
|
1627
1753
|
{
|
|
1628
1754
|
className: cn(styles$3.arrow, styles$3.nextArrow, {
|
|
@@ -1632,7 +1758,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1632
1758
|
color: controls.color,
|
|
1633
1759
|
["--arrow-hover-color"]: controls.hover
|
|
1634
1760
|
},
|
|
1635
|
-
children: /* @__PURE__ */
|
|
1761
|
+
children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1636
1762
|
"button",
|
|
1637
1763
|
{
|
|
1638
1764
|
className: styles$3.arrowInner,
|
|
@@ -1641,23 +1767,55 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1641
1767
|
transform: `translate(${scalingValue(controlsOffsetX * (direction === "horiz" ? -1 : 1), isEditor)}, ${scalingValue(controlsOffsetY, isEditor)}) scale(${settings.controls.scale / 100}) rotate(${direction === "horiz" ? "0deg" : "90deg"})`
|
|
1642
1768
|
},
|
|
1643
1769
|
children: [
|
|
1644
|
-
controls.arrowsImgUrl && /* @__PURE__ */
|
|
1770
|
+
controls.arrowsImgUrl && /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1645
1771
|
SvgImage,
|
|
1646
1772
|
{
|
|
1647
1773
|
url: controls.arrowsImgUrl,
|
|
1648
1774
|
fill: controls.color,
|
|
1649
1775
|
hoverFill: controls.hover,
|
|
1650
1776
|
className: styles$3.arrowImg
|
|
1651
|
-
}
|
|
1777
|
+
},
|
|
1778
|
+
void 0,
|
|
1779
|
+
false,
|
|
1780
|
+
{
|
|
1781
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1782
|
+
lineNumber: 215,
|
|
1783
|
+
columnNumber: 17
|
|
1784
|
+
},
|
|
1785
|
+
this
|
|
1652
1786
|
),
|
|
1653
|
-
!controls.arrowsImgUrl && /* @__PURE__ */
|
|
1787
|
+
!controls.arrowsImgUrl && /* @__PURE__ */ jsxDevRuntime.jsxDEV(ArrowIcon, { color: controls.color, className: cn(styles$3.arrowIcon, styles$3.arrowImg) }, void 0, false, {
|
|
1788
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1789
|
+
lineNumber: 223,
|
|
1790
|
+
columnNumber: 17
|
|
1791
|
+
}, this)
|
|
1654
1792
|
]
|
|
1655
|
-
}
|
|
1793
|
+
},
|
|
1794
|
+
void 0,
|
|
1795
|
+
true,
|
|
1796
|
+
{
|
|
1797
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1798
|
+
lineNumber: 207,
|
|
1799
|
+
columnNumber: 13
|
|
1800
|
+
},
|
|
1801
|
+
this
|
|
1656
1802
|
)
|
|
1657
|
-
}
|
|
1803
|
+
},
|
|
1804
|
+
void 0,
|
|
1805
|
+
false,
|
|
1806
|
+
{
|
|
1807
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1808
|
+
lineNumber: 198,
|
|
1809
|
+
columnNumber: 11
|
|
1810
|
+
},
|
|
1811
|
+
this
|
|
1658
1812
|
)
|
|
1659
|
-
] }
|
|
1660
|
-
|
|
1813
|
+
] }, void 0, true, {
|
|
1814
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1815
|
+
lineNumber: 166,
|
|
1816
|
+
columnNumber: 9
|
|
1817
|
+
}, this),
|
|
1818
|
+
triggers.triggersList.click && /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1661
1819
|
"div",
|
|
1662
1820
|
{
|
|
1663
1821
|
className: styles$3.clickOverlay,
|
|
@@ -1666,9 +1824,17 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1666
1824
|
sliderRef.go("+1");
|
|
1667
1825
|
}
|
|
1668
1826
|
}
|
|
1669
|
-
}
|
|
1827
|
+
},
|
|
1828
|
+
void 0,
|
|
1829
|
+
false,
|
|
1830
|
+
{
|
|
1831
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1832
|
+
lineNumber: 230,
|
|
1833
|
+
columnNumber: 9
|
|
1834
|
+
},
|
|
1835
|
+
this
|
|
1670
1836
|
),
|
|
1671
|
-
pagination2.isActive && /* @__PURE__ */
|
|
1837
|
+
pagination2.isActive && /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1672
1838
|
"div",
|
|
1673
1839
|
{
|
|
1674
1840
|
className: cn(styles$3.pagination, {
|
|
@@ -1682,7 +1848,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1682
1848
|
[styles$3.paginationOutsideRight]: pagination2.position === "outside-2" && direction === "vert",
|
|
1683
1849
|
[styles$3.paginationVertical]: direction === "vert"
|
|
1684
1850
|
}),
|
|
1685
|
-
children: /* @__PURE__ */
|
|
1851
|
+
children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1686
1852
|
"div",
|
|
1687
1853
|
{
|
|
1688
1854
|
className: styles$3.paginationInner,
|
|
@@ -1690,7 +1856,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1690
1856
|
backgroundColor: pagination2.colors[2],
|
|
1691
1857
|
transform: `scale(${pagination2.scale / 100}) translate(${scalingValue(pagination2.offset.x, isEditor)}, ${scalingValue(pagination2.offset.y, isEditor)}) rotate(${direction === "horiz" ? "0deg" : "90deg"})`
|
|
1692
1858
|
},
|
|
1693
|
-
children: content.map((_, index) => /* @__PURE__ */
|
|
1859
|
+
children: content.map((_, index) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1694
1860
|
"button",
|
|
1695
1861
|
{
|
|
1696
1862
|
onClick: () => {
|
|
@@ -1699,7 +1865,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1699
1865
|
}
|
|
1700
1866
|
},
|
|
1701
1867
|
className: cn(styles$3.paginationItem),
|
|
1702
|
-
children: /* @__PURE__ */
|
|
1868
|
+
children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1703
1869
|
"div",
|
|
1704
1870
|
{
|
|
1705
1871
|
className: cn(styles$3.dot, {
|
|
@@ -1709,21 +1875,76 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1709
1875
|
backgroundColor: index === currentSlideIndex ? pagination2.colors[0] : pagination2.colors[1],
|
|
1710
1876
|
["--pagination-hover-color"]: pagination2.hover
|
|
1711
1877
|
}
|
|
1712
|
-
}
|
|
1878
|
+
},
|
|
1879
|
+
void 0,
|
|
1880
|
+
false,
|
|
1881
|
+
{
|
|
1882
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1883
|
+
lineNumber: 270,
|
|
1884
|
+
columnNumber: 17
|
|
1885
|
+
},
|
|
1886
|
+
this
|
|
1713
1887
|
)
|
|
1714
1888
|
},
|
|
1715
|
-
index
|
|
1889
|
+
index,
|
|
1890
|
+
false,
|
|
1891
|
+
{
|
|
1892
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1893
|
+
lineNumber: 261,
|
|
1894
|
+
columnNumber: 15
|
|
1895
|
+
},
|
|
1896
|
+
this
|
|
1716
1897
|
))
|
|
1717
|
-
}
|
|
1898
|
+
},
|
|
1899
|
+
void 0,
|
|
1900
|
+
false,
|
|
1901
|
+
{
|
|
1902
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1903
|
+
lineNumber: 253,
|
|
1904
|
+
columnNumber: 11
|
|
1905
|
+
},
|
|
1906
|
+
this
|
|
1718
1907
|
)
|
|
1719
|
-
}
|
|
1908
|
+
},
|
|
1909
|
+
void 0,
|
|
1910
|
+
false,
|
|
1911
|
+
{
|
|
1912
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1913
|
+
lineNumber: 240,
|
|
1914
|
+
columnNumber: 9
|
|
1915
|
+
},
|
|
1916
|
+
this
|
|
1720
1917
|
)
|
|
1721
1918
|
]
|
|
1722
|
-
}
|
|
1723
|
-
|
|
1919
|
+
},
|
|
1920
|
+
void 0,
|
|
1921
|
+
true,
|
|
1922
|
+
{
|
|
1923
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1924
|
+
lineNumber: 66,
|
|
1925
|
+
columnNumber: 7
|
|
1926
|
+
},
|
|
1927
|
+
this
|
|
1928
|
+
) }, void 0, false, {
|
|
1929
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1930
|
+
lineNumber: 65,
|
|
1931
|
+
columnNumber: 5
|
|
1932
|
+
}, this);
|
|
1724
1933
|
}
|
|
1725
1934
|
function ArrowIcon({ color, className }) {
|
|
1726
|
-
return /* @__PURE__ */
|
|
1935
|
+
return /* @__PURE__ */ jsxDevRuntime.jsxDEV("svg", { viewBox: "0 0 10 18", className, children: /* @__PURE__ */ jsxDevRuntime.jsxDEV("g", { id: "Symbols", stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ jsxDevRuntime.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, {
|
|
1936
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1937
|
+
lineNumber: 293,
|
|
1938
|
+
columnNumber: 11
|
|
1939
|
+
}, this) }, void 0, false, {
|
|
1940
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1941
|
+
lineNumber: 292,
|
|
1942
|
+
columnNumber: 7
|
|
1943
|
+
}, this) }, void 0, false, {
|
|
1944
|
+
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1945
|
+
lineNumber: 291,
|
|
1946
|
+
columnNumber: 5
|
|
1947
|
+
}, this);
|
|
1727
1948
|
}
|
|
1728
1949
|
const ControlSliderComponent = {
|
|
1729
1950
|
element: ControlSlider,
|
|
@@ -2339,8 +2560,14 @@ function ImageRevealSlider({ settings, content, isEditor }) {
|
|
|
2339
2560
|
customWidth,
|
|
2340
2561
|
randomRange
|
|
2341
2562
|
);
|
|
2342
|
-
let x =
|
|
2343
|
-
|
|
2563
|
+
let x = 0, y = 0;
|
|
2564
|
+
if (revealPosition === "same") {
|
|
2565
|
+
x = containerWidth / 2;
|
|
2566
|
+
y = containerHeight / 2;
|
|
2567
|
+
} else {
|
|
2568
|
+
x = position.x ?? Math.random() * containerWidth;
|
|
2569
|
+
y = position.y ?? Math.random() * containerHeight;
|
|
2570
|
+
}
|
|
2344
2571
|
const adjustedX = Math.min(Math.max(x, width / 2), containerWidth - width / 2);
|
|
2345
2572
|
const adjustedY = Math.min(Math.max(y, height / 2), containerHeight - height / 2);
|
|
2346
2573
|
return {
|
|
@@ -2373,7 +2600,7 @@ function ImageRevealSlider({ settings, content, isEditor }) {
|
|
|
2373
2600
|
setCounter(defaultImageCount % content.length);
|
|
2374
2601
|
};
|
|
2375
2602
|
placeImages();
|
|
2376
|
-
}, [defaultContentUrls, sizeType, customWidth, randomRange]);
|
|
2603
|
+
}, [defaultContentUrls, sizeType, customWidth, randomRange, revealPosition]);
|
|
2377
2604
|
react.useEffect(() => {
|
|
2378
2605
|
if (visible === "lastOne") {
|
|
2379
2606
|
setPlacedImages((prev) => prev.length > 0 ? [prev[prev.length - 1]] : []);
|
|
@@ -2413,7 +2640,7 @@ function ImageRevealSlider({ settings, content, isEditor }) {
|
|
|
2413
2640
|
const isHover = target === "area" || isMouseOverImage(mouseX, mouseY, placedImages);
|
|
2414
2641
|
divRef.current.style.cursor = isHover ? `url(${hoverCursor}), auto` : `url(${defaultCursor}), auto`;
|
|
2415
2642
|
};
|
|
2416
|
-
return /* @__PURE__ */
|
|
2643
|
+
return /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
2417
2644
|
"div",
|
|
2418
2645
|
{
|
|
2419
2646
|
ref: divRef,
|
|
@@ -2421,7 +2648,7 @@ function ImageRevealSlider({ settings, content, isEditor }) {
|
|
|
2421
2648
|
onMouseEnter: handleMouseMove,
|
|
2422
2649
|
onMouseMove: handleMouseMove,
|
|
2423
2650
|
className: styles.imageRevealSlider,
|
|
2424
|
-
children: placedImages.map((img2) => /* @__PURE__ */
|
|
2651
|
+
children: placedImages.map((img2) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
2425
2652
|
"div",
|
|
2426
2653
|
{
|
|
2427
2654
|
className: styles.wrapper,
|
|
@@ -2433,26 +2660,60 @@ function ImageRevealSlider({ settings, content, isEditor }) {
|
|
|
2433
2660
|
width: img2.width ?? "auto",
|
|
2434
2661
|
height: "auto"
|
|
2435
2662
|
},
|
|
2436
|
-
children: target === "area" && img2.link ? /* @__PURE__ */
|
|
2663
|
+
children: target === "area" && img2.link ? /* @__PURE__ */ jsxDevRuntime.jsxDEV("a", { href: img2.link, target: "_blank", className: styles.link, children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
2437
2664
|
"img",
|
|
2438
2665
|
{
|
|
2439
2666
|
src: img2.url,
|
|
2440
2667
|
alt: img2.name,
|
|
2441
2668
|
className: styles.image
|
|
2442
2669
|
},
|
|
2443
|
-
img2.id
|
|
2444
|
-
|
|
2670
|
+
img2.id,
|
|
2671
|
+
false,
|
|
2672
|
+
{
|
|
2673
|
+
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2674
|
+
lineNumber: 263,
|
|
2675
|
+
columnNumber: 15
|
|
2676
|
+
},
|
|
2677
|
+
this
|
|
2678
|
+
) }, void 0, false, {
|
|
2679
|
+
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2680
|
+
lineNumber: 262,
|
|
2681
|
+
columnNumber: 13
|
|
2682
|
+
}, this) : /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
2445
2683
|
"img",
|
|
2446
2684
|
{
|
|
2447
2685
|
src: img2.url,
|
|
2448
2686
|
alt: img2.name,
|
|
2449
2687
|
className: styles.image
|
|
2450
2688
|
},
|
|
2451
|
-
img2.id
|
|
2689
|
+
img2.id,
|
|
2690
|
+
false,
|
|
2691
|
+
{
|
|
2692
|
+
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2693
|
+
lineNumber: 271,
|
|
2694
|
+
columnNumber: 13
|
|
2695
|
+
},
|
|
2696
|
+
this
|
|
2452
2697
|
)
|
|
2453
|
-
}
|
|
2698
|
+
},
|
|
2699
|
+
void 0,
|
|
2700
|
+
false,
|
|
2701
|
+
{
|
|
2702
|
+
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2703
|
+
lineNumber: 251,
|
|
2704
|
+
columnNumber: 9
|
|
2705
|
+
},
|
|
2706
|
+
this
|
|
2454
2707
|
))
|
|
2455
|
-
}
|
|
2708
|
+
},
|
|
2709
|
+
void 0,
|
|
2710
|
+
false,
|
|
2711
|
+
{
|
|
2712
|
+
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2713
|
+
lineNumber: 243,
|
|
2714
|
+
columnNumber: 5
|
|
2715
|
+
},
|
|
2716
|
+
this
|
|
2456
2717
|
);
|
|
2457
2718
|
}
|
|
2458
2719
|
const ControlImageRevealSliderComponent = {
|