@cntrl-site/sdk 1.24.1 → 1.24.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/LICENSE +21 -21
- package/README.md +2 -2
- package/dist/index.js +65 -320
- package/dist/index.mjs +65 -320
- package/dist/types/component/Component.d.ts +1 -1
- package/package.json +83 -83
- package/resources/template.scss.ejs +50 -50
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 CNTRL
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 CNTRL
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
# CNTRL SDK
|
|
2
|
-
This is a root SDK module for CNTRL. Should be used along with other framework-specific modules like `@cntrl-site/sdk-react`
|
|
1
|
+
# CNTRL SDK
|
|
2
|
+
This is a root SDK module for CNTRL. Should be used along with other framework-specific modules like `@cntrl-site/sdk-react`
|
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 jsxRuntime = require("react/jsx-runtime");
|
|
9
9
|
const react = require("react");
|
|
10
10
|
const reactSplide = require("@splidejs/react-splide");
|
|
11
11
|
const cn = require("classnames");
|
|
@@ -1374,31 +1374,15 @@ const RichTextRenderer = ({ content }) => {
|
|
|
1374
1374
|
const getChildren = (children) => {
|
|
1375
1375
|
return children.map((child, i) => {
|
|
1376
1376
|
if (child.type === "link") {
|
|
1377
|
-
return /* @__PURE__ */
|
|
1378
|
-
fileName: "H:/mom/sdk/src/Components/helpers/RichTextRenderer/RichTextRenderer.tsx",
|
|
1379
|
-
lineNumber: 13,
|
|
1380
|
-
columnNumber: 16
|
|
1381
|
-
}, void 0);
|
|
1377
|
+
return /* @__PURE__ */ jsxRuntime.jsx("a", { className: styles$2.link, href: child.value, target: child.target, children: getChildren(child.children) }, i);
|
|
1382
1378
|
}
|
|
1383
|
-
return /* @__PURE__ */
|
|
1384
|
-
fileName: "H:/mom/sdk/src/Components/helpers/RichTextRenderer/RichTextRenderer.tsx",
|
|
1385
|
-
lineNumber: 15,
|
|
1386
|
-
columnNumber: 14
|
|
1387
|
-
}, void 0);
|
|
1379
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: getLeafCss(child), children: child.text }, i);
|
|
1388
1380
|
});
|
|
1389
1381
|
};
|
|
1390
|
-
return /* @__PURE__ */
|
|
1382
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: content.map((block, i) => {
|
|
1391
1383
|
const children = block.children;
|
|
1392
|
-
return /* @__PURE__ */
|
|
1393
|
-
|
|
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);
|
|
1384
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { children: getChildren(children) }, i);
|
|
1385
|
+
}) });
|
|
1402
1386
|
};
|
|
1403
1387
|
function getLeafCss(leaf) {
|
|
1404
1388
|
return {
|
|
@@ -1431,13 +1415,9 @@ const SvgImage = ({ url: url2, fill = "#000000", hoverFill = "#CCCCCC", classNam
|
|
|
1431
1415
|
}
|
|
1432
1416
|
}, []);
|
|
1433
1417
|
if (!url2.endsWith(".svg") || !supportsMask) {
|
|
1434
|
-
return /* @__PURE__ */
|
|
1435
|
-
fileName: "H:/mom/sdk/src/Components/helpers/SvgImage/SvgImage.tsx",
|
|
1436
|
-
lineNumber: 23,
|
|
1437
|
-
columnNumber: 12
|
|
1438
|
-
}, void 0);
|
|
1418
|
+
return /* @__PURE__ */ jsxRuntime.jsx("img", { src: url2, alt: "", className: cn(styles$1.img, className) });
|
|
1439
1419
|
}
|
|
1440
|
-
return /* @__PURE__ */
|
|
1420
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1441
1421
|
"span",
|
|
1442
1422
|
{
|
|
1443
1423
|
"data-supports-mask": supportsMask,
|
|
@@ -1447,15 +1427,7 @@ const SvgImage = ({ url: url2, fill = "#000000", hoverFill = "#CCCCCC", classNam
|
|
|
1447
1427
|
"--fill": fill,
|
|
1448
1428
|
"--hover-fill": hoverFill
|
|
1449
1429
|
}
|
|
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
|
|
1430
|
+
}
|
|
1459
1431
|
);
|
|
1460
1432
|
};
|
|
1461
1433
|
const alignmentClassName = {
|
|
@@ -1502,7 +1474,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1502
1474
|
setKey((prev) => prev + 1);
|
|
1503
1475
|
prevSliderTypeRef.current = transition.type;
|
|
1504
1476
|
}, [transition.type]);
|
|
1505
|
-
return /* @__PURE__ */
|
|
1477
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(styles$3.wrapper, { [styles$3.editor]: isEditor }), ref: setWrapperRef, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1506
1478
|
"div",
|
|
1507
1479
|
{
|
|
1508
1480
|
className: styles$3.sliderInner,
|
|
@@ -1512,15 +1484,15 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1512
1484
|
backgroundColor: transition.backgroundColor && transition.type === "fade in" ? transition.backgroundColor : "transparent"
|
|
1513
1485
|
},
|
|
1514
1486
|
children: [
|
|
1515
|
-
settings.caption.isActive && /* @__PURE__ */
|
|
1487
|
+
settings.caption.isActive && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1516
1488
|
"div",
|
|
1517
1489
|
{
|
|
1518
1490
|
className: cn(styles$3.captionBlock),
|
|
1519
|
-
children: /* @__PURE__ */
|
|
1491
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1520
1492
|
"div",
|
|
1521
1493
|
{
|
|
1522
1494
|
className: styles$3.captionTextWrapper,
|
|
1523
|
-
children: content.map((item, index) => /* @__PURE__ */
|
|
1495
|
+
children: content.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1524
1496
|
"div",
|
|
1525
1497
|
{
|
|
1526
1498
|
className: cn(styles$3.captionText, alignmentClassName[caption.alignment], {
|
|
@@ -1543,7 +1515,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1543
1515
|
color,
|
|
1544
1516
|
transitionDuration: transition.duration ? `${Math.round(parseInt(transition.duration) / 2)}ms` : "500ms"
|
|
1545
1517
|
},
|
|
1546
|
-
children: /* @__PURE__ */
|
|
1518
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1547
1519
|
"div",
|
|
1548
1520
|
{
|
|
1549
1521
|
"data-styles": "caption",
|
|
@@ -1554,52 +1526,17 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1554
1526
|
top: scalingValue(caption.offset.y, isEditor),
|
|
1555
1527
|
left: scalingValue(caption.offset.x, isEditor)
|
|
1556
1528
|
},
|
|
1557
|
-
children: /* @__PURE__ */
|
|
1558
|
-
|
|
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
|
|
1529
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(RichTextRenderer, { content: item.imageCaption })
|
|
1530
|
+
}
|
|
1571
1531
|
)
|
|
1572
1532
|
},
|
|
1573
|
-
index
|
|
1574
|
-
false,
|
|
1575
|
-
{
|
|
1576
|
-
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1577
|
-
lineNumber: 82,
|
|
1578
|
-
columnNumber: 15
|
|
1579
|
-
},
|
|
1580
|
-
this
|
|
1533
|
+
index
|
|
1581
1534
|
))
|
|
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
|
|
1535
|
+
}
|
|
1591
1536
|
)
|
|
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
|
|
1537
|
+
}
|
|
1601
1538
|
),
|
|
1602
|
-
/* @__PURE__ */
|
|
1539
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1603
1540
|
reactSplide.Splide,
|
|
1604
1541
|
{
|
|
1605
1542
|
onMove: (e) => {
|
|
@@ -1622,15 +1559,15 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1622
1559
|
type: transition.type === "fade in" ? "fade" : "loop",
|
|
1623
1560
|
rewind: true
|
|
1624
1561
|
},
|
|
1625
|
-
children: content.map((item, index) => /* @__PURE__ */
|
|
1562
|
+
children: content.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(reactSplide.SplideSlide, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1626
1563
|
"div",
|
|
1627
1564
|
{
|
|
1628
1565
|
className: styles$3.sliderItem,
|
|
1629
|
-
children: /* @__PURE__ */
|
|
1566
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1630
1567
|
"div",
|
|
1631
1568
|
{
|
|
1632
1569
|
className: styles$3.imgWrapper,
|
|
1633
|
-
children: /* @__PURE__ */
|
|
1570
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1634
1571
|
"img",
|
|
1635
1572
|
{
|
|
1636
1573
|
className: cn(styles$3.sliderImage, {
|
|
@@ -1639,52 +1576,17 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1639
1576
|
}),
|
|
1640
1577
|
src: item.image.url,
|
|
1641
1578
|
alt: item.image.name ?? ""
|
|
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
|
|
1579
|
+
}
|
|
1651
1580
|
)
|
|
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
|
|
1581
|
+
}
|
|
1661
1582
|
)
|
|
1662
|
-
}
|
|
1663
|
-
|
|
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))
|
|
1676
|
-
},
|
|
1677
|
-
key,
|
|
1678
|
-
false,
|
|
1679
|
-
{
|
|
1680
|
-
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1681
|
-
lineNumber: 122,
|
|
1682
|
-
columnNumber: 7
|
|
1583
|
+
}
|
|
1584
|
+
) }, index))
|
|
1683
1585
|
},
|
|
1684
|
-
|
|
1586
|
+
key
|
|
1685
1587
|
),
|
|
1686
|
-
controls.isActive && /* @__PURE__ */
|
|
1687
|
-
/* @__PURE__ */
|
|
1588
|
+
controls.isActive && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1589
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1688
1590
|
"div",
|
|
1689
1591
|
{
|
|
1690
1592
|
className: cn(styles$3.arrow, {
|
|
@@ -1694,7 +1596,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1694
1596
|
color: controls.color,
|
|
1695
1597
|
["--arrow-hover-color"]: controls.hover
|
|
1696
1598
|
},
|
|
1697
|
-
children: /* @__PURE__ */
|
|
1599
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1698
1600
|
"button",
|
|
1699
1601
|
{
|
|
1700
1602
|
onClick: () => {
|
|
@@ -1705,50 +1607,22 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1705
1607
|
transform: `translate(${scalingValue(controlsOffsetX, isEditor)}, ${scalingValue(controlsOffsetY * (direction === "horiz" ? 1 : -1), isEditor)}) scale(${settings.controls.scale / 100}) rotate(${direction === "horiz" ? "0deg" : "90deg"})`
|
|
1706
1608
|
},
|
|
1707
1609
|
children: [
|
|
1708
|
-
controls.arrowsImgUrl && /* @__PURE__ */
|
|
1610
|
+
controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1709
1611
|
SvgImage,
|
|
1710
1612
|
{
|
|
1711
1613
|
url: controls.arrowsImgUrl,
|
|
1712
1614
|
fill: controls.color,
|
|
1713
1615
|
hoverFill: controls.hover,
|
|
1714
1616
|
className: cn(styles$3.arrowImg, styles$3.mirror)
|
|
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
|
|
1617
|
+
}
|
|
1724
1618
|
),
|
|
1725
|
-
!controls.arrowsImgUrl && /* @__PURE__ */
|
|
1726
|
-
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1727
|
-
lineNumber: 194,
|
|
1728
|
-
columnNumber: 17
|
|
1729
|
-
}, this)
|
|
1619
|
+
!controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(ArrowIcon, { color: controls.color, className: cn(styles$3.arrowIcon, styles$3.arrowImg, styles$3.mirror) })
|
|
1730
1620
|
]
|
|
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
|
|
1621
|
+
}
|
|
1740
1622
|
)
|
|
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
|
|
1623
|
+
}
|
|
1750
1624
|
),
|
|
1751
|
-
/* @__PURE__ */
|
|
1625
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1752
1626
|
"div",
|
|
1753
1627
|
{
|
|
1754
1628
|
className: cn(styles$3.arrow, styles$3.nextArrow, {
|
|
@@ -1758,7 +1632,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1758
1632
|
color: controls.color,
|
|
1759
1633
|
["--arrow-hover-color"]: controls.hover
|
|
1760
1634
|
},
|
|
1761
|
-
children: /* @__PURE__ */
|
|
1635
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1762
1636
|
"button",
|
|
1763
1637
|
{
|
|
1764
1638
|
className: styles$3.arrowInner,
|
|
@@ -1767,55 +1641,23 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1767
1641
|
transform: `translate(${scalingValue(controlsOffsetX * (direction === "horiz" ? -1 : 1), isEditor)}, ${scalingValue(controlsOffsetY, isEditor)}) scale(${settings.controls.scale / 100}) rotate(${direction === "horiz" ? "0deg" : "90deg"})`
|
|
1768
1642
|
},
|
|
1769
1643
|
children: [
|
|
1770
|
-
controls.arrowsImgUrl && /* @__PURE__ */
|
|
1644
|
+
controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1771
1645
|
SvgImage,
|
|
1772
1646
|
{
|
|
1773
1647
|
url: controls.arrowsImgUrl,
|
|
1774
1648
|
fill: controls.color,
|
|
1775
1649
|
hoverFill: controls.hover,
|
|
1776
1650
|
className: styles$3.arrowImg
|
|
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
|
|
1651
|
+
}
|
|
1786
1652
|
),
|
|
1787
|
-
!controls.arrowsImgUrl && /* @__PURE__ */
|
|
1788
|
-
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1789
|
-
lineNumber: 223,
|
|
1790
|
-
columnNumber: 17
|
|
1791
|
-
}, this)
|
|
1653
|
+
!controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(ArrowIcon, { color: controls.color, className: cn(styles$3.arrowIcon, styles$3.arrowImg) })
|
|
1792
1654
|
]
|
|
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
|
|
1655
|
+
}
|
|
1802
1656
|
)
|
|
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
|
|
1657
|
+
}
|
|
1812
1658
|
)
|
|
1813
|
-
] },
|
|
1814
|
-
|
|
1815
|
-
lineNumber: 166,
|
|
1816
|
-
columnNumber: 9
|
|
1817
|
-
}, this),
|
|
1818
|
-
triggers.triggersList.click && /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
1659
|
+
] }),
|
|
1660
|
+
triggers.triggersList.click && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1819
1661
|
"div",
|
|
1820
1662
|
{
|
|
1821
1663
|
className: styles$3.clickOverlay,
|
|
@@ -1824,17 +1666,9 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1824
1666
|
sliderRef.go("+1");
|
|
1825
1667
|
}
|
|
1826
1668
|
}
|
|
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
|
|
1669
|
+
}
|
|
1836
1670
|
),
|
|
1837
|
-
pagination2.isActive && /* @__PURE__ */
|
|
1671
|
+
pagination2.isActive && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1838
1672
|
"div",
|
|
1839
1673
|
{
|
|
1840
1674
|
className: cn(styles$3.pagination, {
|
|
@@ -1848,7 +1682,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1848
1682
|
[styles$3.paginationOutsideRight]: pagination2.position === "outside-2" && direction === "vert",
|
|
1849
1683
|
[styles$3.paginationVertical]: direction === "vert"
|
|
1850
1684
|
}),
|
|
1851
|
-
children: /* @__PURE__ */
|
|
1685
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1852
1686
|
"div",
|
|
1853
1687
|
{
|
|
1854
1688
|
className: styles$3.paginationInner,
|
|
@@ -1856,7 +1690,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1856
1690
|
backgroundColor: pagination2.colors[2],
|
|
1857
1691
|
transform: `scale(${pagination2.scale / 100}) translate(${scalingValue(pagination2.offset.x, isEditor)}, ${scalingValue(pagination2.offset.y, isEditor)}) rotate(${direction === "horiz" ? "0deg" : "90deg"})`
|
|
1858
1692
|
},
|
|
1859
|
-
children: content.map((_, index) => /* @__PURE__ */
|
|
1693
|
+
children: content.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1860
1694
|
"button",
|
|
1861
1695
|
{
|
|
1862
1696
|
onClick: () => {
|
|
@@ -1865,7 +1699,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1865
1699
|
}
|
|
1866
1700
|
},
|
|
1867
1701
|
className: cn(styles$3.paginationItem),
|
|
1868
|
-
children: /* @__PURE__ */
|
|
1702
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1869
1703
|
"div",
|
|
1870
1704
|
{
|
|
1871
1705
|
className: cn(styles$3.dot, {
|
|
@@ -1875,76 +1709,21 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
|
|
|
1875
1709
|
backgroundColor: index === currentSlideIndex ? pagination2.colors[0] : pagination2.colors[1],
|
|
1876
1710
|
["--pagination-hover-color"]: pagination2.hover
|
|
1877
1711
|
}
|
|
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
|
|
1712
|
+
}
|
|
1887
1713
|
)
|
|
1888
1714
|
},
|
|
1889
|
-
index
|
|
1890
|
-
false,
|
|
1891
|
-
{
|
|
1892
|
-
fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
|
|
1893
|
-
lineNumber: 261,
|
|
1894
|
-
columnNumber: 15
|
|
1895
|
-
},
|
|
1896
|
-
this
|
|
1715
|
+
index
|
|
1897
1716
|
))
|
|
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
|
|
1717
|
+
}
|
|
1907
1718
|
)
|
|
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
|
|
1719
|
+
}
|
|
1917
1720
|
)
|
|
1918
1721
|
]
|
|
1919
|
-
}
|
|
1920
|
-
|
|
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);
|
|
1722
|
+
}
|
|
1723
|
+
) });
|
|
1933
1724
|
}
|
|
1934
1725
|
function ArrowIcon({ color, className }) {
|
|
1935
|
-
return /* @__PURE__ */
|
|
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);
|
|
1726
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 10 18", className, children: /* @__PURE__ */ jsxRuntime.jsx("g", { id: "Symbols", stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ jsxRuntime.jsx("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)" }) }) });
|
|
1948
1727
|
}
|
|
1949
1728
|
const ControlSliderComponent = {
|
|
1950
1729
|
element: ControlSlider,
|
|
@@ -2634,7 +2413,7 @@ function ImageRevealSlider({ settings, content, isEditor }) {
|
|
|
2634
2413
|
const isHover = target === "area" || isMouseOverImage(mouseX, mouseY, placedImages);
|
|
2635
2414
|
divRef.current.style.cursor = isHover ? `url(${hoverCursor}), auto` : `url(${defaultCursor}), auto`;
|
|
2636
2415
|
};
|
|
2637
|
-
return /* @__PURE__ */
|
|
2416
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2638
2417
|
"div",
|
|
2639
2418
|
{
|
|
2640
2419
|
ref: divRef,
|
|
@@ -2642,7 +2421,7 @@ function ImageRevealSlider({ settings, content, isEditor }) {
|
|
|
2642
2421
|
onMouseEnter: handleMouseMove,
|
|
2643
2422
|
onMouseMove: handleMouseMove,
|
|
2644
2423
|
className: styles.imageRevealSlider,
|
|
2645
|
-
children: placedImages.map((img2) => /* @__PURE__ */
|
|
2424
|
+
children: placedImages.map((img2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2646
2425
|
"div",
|
|
2647
2426
|
{
|
|
2648
2427
|
className: styles.wrapper,
|
|
@@ -2654,60 +2433,26 @@ function ImageRevealSlider({ settings, content, isEditor }) {
|
|
|
2654
2433
|
width: img2.width ?? "auto",
|
|
2655
2434
|
height: "auto"
|
|
2656
2435
|
},
|
|
2657
|
-
children: target === "area" && img2.link ? /* @__PURE__ */
|
|
2436
|
+
children: target === "area" && img2.link ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: img2.link, target: "_blank", className: styles.link, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2658
2437
|
"img",
|
|
2659
2438
|
{
|
|
2660
2439
|
src: img2.url,
|
|
2661
2440
|
alt: img2.name,
|
|
2662
2441
|
className: styles.image
|
|
2663
2442
|
},
|
|
2664
|
-
img2.id
|
|
2665
|
-
|
|
2666
|
-
{
|
|
2667
|
-
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2668
|
-
lineNumber: 257,
|
|
2669
|
-
columnNumber: 15
|
|
2670
|
-
},
|
|
2671
|
-
this
|
|
2672
|
-
) }, void 0, false, {
|
|
2673
|
-
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2674
|
-
lineNumber: 256,
|
|
2675
|
-
columnNumber: 13
|
|
2676
|
-
}, this) : /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
2443
|
+
img2.id
|
|
2444
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2677
2445
|
"img",
|
|
2678
2446
|
{
|
|
2679
2447
|
src: img2.url,
|
|
2680
2448
|
alt: img2.name,
|
|
2681
2449
|
className: styles.image
|
|
2682
2450
|
},
|
|
2683
|
-
img2.id
|
|
2684
|
-
false,
|
|
2685
|
-
{
|
|
2686
|
-
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2687
|
-
lineNumber: 265,
|
|
2688
|
-
columnNumber: 13
|
|
2689
|
-
},
|
|
2690
|
-
this
|
|
2451
|
+
img2.id
|
|
2691
2452
|
)
|
|
2692
|
-
}
|
|
2693
|
-
void 0,
|
|
2694
|
-
false,
|
|
2695
|
-
{
|
|
2696
|
-
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2697
|
-
lineNumber: 245,
|
|
2698
|
-
columnNumber: 9
|
|
2699
|
-
},
|
|
2700
|
-
this
|
|
2453
|
+
}
|
|
2701
2454
|
))
|
|
2702
|
-
}
|
|
2703
|
-
void 0,
|
|
2704
|
-
false,
|
|
2705
|
-
{
|
|
2706
|
-
fileName: "H:/mom/sdk/src/Components/ImageRevealSlider/ImageRevealSlider.tsx",
|
|
2707
|
-
lineNumber: 237,
|
|
2708
|
-
columnNumber: 5
|
|
2709
|
-
},
|
|
2710
|
-
this
|
|
2455
|
+
}
|
|
2711
2456
|
);
|
|
2712
2457
|
}
|
|
2713
2458
|
const ControlImageRevealSliderComponent = {
|