@cntrl-site/sdk 1.24.0 → 1.24.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/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 jsxRuntime = require("react/jsx-runtime");
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");
@@ -1322,7 +1322,7 @@ const bottomRightAlignment = "ControlSlider-module__bottomRightAlignment___kEwrz
1322
1322
  const clickOverlay = "ControlSlider-module__clickOverlay___DZA28";
1323
1323
  const contain = "ControlSlider-module__contain___pLyq7";
1324
1324
  const cover = "ControlSlider-module__cover___KdDat";
1325
- const styles$2 = {
1325
+ const styles$3 = {
1326
1326
  wrapper,
1327
1327
  sliderItem,
1328
1328
  sliderImage,
@@ -1366,23 +1366,39 @@ const styles$2 = {
1366
1366
  contain,
1367
1367
  cover
1368
1368
  };
1369
- const link = "RichTextRenderer-module__link___BWeZ2";
1370
- const styles$1 = {
1371
- link
1369
+ const link$1 = "RichTextRenderer-module__link___BWeZ2";
1370
+ const styles$2 = {
1371
+ link: link$1
1372
1372
  };
1373
1373
  const RichTextRenderer = ({ content }) => {
1374
1374
  const getChildren = (children) => {
1375
1375
  return children.map((child, i) => {
1376
1376
  if (child.type === "link") {
1377
- return /* @__PURE__ */ jsxRuntime.jsx("a", { className: styles$1.link, href: child.value, target: child.target, children: getChildren(child.children) }, i);
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__ */ jsxRuntime.jsx("span", { style: getLeafCss(child), children: child.text }, i);
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__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: content.map((block, i) => {
1390
+ return /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children: content.map((block, i) => {
1383
1391
  const children = block.children;
1384
- return /* @__PURE__ */ jsxRuntime.jsx("div", { children: getChildren(children) }, i);
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 {
@@ -1402,7 +1418,7 @@ function scalingValue(value, isEditor = false) {
1402
1418
  }
1403
1419
  const svg = "SvgImage-module__svg___q3xE-";
1404
1420
  const img = "SvgImage-module__img___VsTm-";
1405
- const styles = {
1421
+ const styles$1 = {
1406
1422
  svg,
1407
1423
  img
1408
1424
  };
@@ -1415,31 +1431,43 @@ const SvgImage = ({ url: url2, fill = "#000000", hoverFill = "#CCCCCC", classNam
1415
1431
  }
1416
1432
  }, []);
1417
1433
  if (!url2.endsWith(".svg") || !supportsMask) {
1418
- return /* @__PURE__ */ jsxRuntime.jsx("img", { src: url2, alt: "", className: cn(styles.img, className) });
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__ */ jsxRuntime.jsx(
1440
+ return /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1421
1441
  "span",
1422
1442
  {
1423
1443
  "data-supports-mask": supportsMask,
1424
- className: cn(styles.svg, className),
1444
+ className: cn(styles$1.svg, className),
1425
1445
  style: {
1426
1446
  "--svg": `url(${url2})`,
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 = {
1434
- "top-left": styles$2.topLeftAlignment,
1435
- "top-center": styles$2.topCenterAlignment,
1436
- "top-right": styles$2.topRightAlignment,
1437
- "middle-left": styles$2.middleLeftAlignment,
1438
- "middle-center": styles$2.middleCenterAlignment,
1439
- "middle-right": styles$2.middleRightAlignment,
1440
- "bottom-left": styles$2.bottomLeftAlignment,
1441
- "bottom-center": styles$2.bottomCenterAlignment,
1442
- "bottom-right": styles$2.bottomRightAlignment
1462
+ "top-left": styles$3.topLeftAlignment,
1463
+ "top-center": styles$3.topCenterAlignment,
1464
+ "top-right": styles$3.topRightAlignment,
1465
+ "middle-left": styles$3.middleLeftAlignment,
1466
+ "middle-center": styles$3.middleCenterAlignment,
1467
+ "middle-right": styles$3.middleRightAlignment,
1468
+ "bottom-left": styles$3.bottomLeftAlignment,
1469
+ "bottom-center": styles$3.bottomCenterAlignment,
1470
+ "bottom-right": styles$3.bottomRightAlignment
1443
1471
  };
1444
1472
  function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
1445
1473
  const [sliderRef, setSliderRef] = react.useState(null);
@@ -1474,30 +1502,30 @@ 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__ */ jsxRuntime.jsx("div", { className: cn(styles$2.wrapper, { [styles$2.editor]: isEditor }), ref: setWrapperRef, children: /* @__PURE__ */ jsxRuntime.jsxs(
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
- className: styles$2.sliderInner,
1508
+ className: styles$3.sliderInner,
1481
1509
  style: {
1482
1510
  width: sliderDimensions ? sliderDimensions.width : "100%",
1483
1511
  height: sliderDimensions ? sliderDimensions.height : "100%",
1484
1512
  backgroundColor: transition.backgroundColor && transition.type === "fade in" ? transition.backgroundColor : "transparent"
1485
1513
  },
1486
1514
  children: [
1487
- settings.caption.isActive && /* @__PURE__ */ jsxRuntime.jsx(
1515
+ settings.caption.isActive && /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1488
1516
  "div",
1489
1517
  {
1490
- className: cn(styles$2.captionBlock),
1491
- children: /* @__PURE__ */ jsxRuntime.jsx(
1518
+ className: cn(styles$3.captionBlock),
1519
+ children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1492
1520
  "div",
1493
1521
  {
1494
- className: styles$2.captionTextWrapper,
1495
- children: content.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
1522
+ className: styles$3.captionTextWrapper,
1523
+ children: content.map((item, index) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1496
1524
  "div",
1497
1525
  {
1498
- className: cn(styles$2.captionText, alignmentClassName[caption.alignment], {
1499
- [styles$2.withPointerEvents]: index === currentSlideIndex && isEditor,
1500
- [styles$2.active]: index === currentSlideIndex
1526
+ className: cn(styles$3.captionText, alignmentClassName[caption.alignment], {
1527
+ [styles$3.withPointerEvents]: index === currentSlideIndex && isEditor,
1528
+ [styles$3.active]: index === currentSlideIndex
1501
1529
  }),
1502
1530
  style: {
1503
1531
  fontFamily: fontSettings.fontFamily,
@@ -1515,28 +1543,63 @@ 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__ */ jsxRuntime.jsx(
1546
+ children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1519
1547
  "div",
1520
1548
  {
1521
1549
  "data-styles": "caption",
1522
- className: styles$2.captionTextInner,
1550
+ className: styles$3.captionTextInner,
1523
1551
  style: {
1524
1552
  "--link-hover-color": caption.hover,
1525
1553
  position: "relative",
1526
1554
  top: scalingValue(caption.offset.y, isEditor),
1527
1555
  left: scalingValue(caption.offset.x, isEditor)
1528
1556
  },
1529
- children: /* @__PURE__ */ jsxRuntime.jsx(RichTextRenderer, { content: item.imageCaption })
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__ */ jsxRuntime.jsx(
1602
+ /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1540
1603
  reactSplide.Splide,
1541
1604
  {
1542
1605
  onMove: (e) => {
@@ -1559,138 +1622,241 @@ 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__ */ jsxRuntime.jsx(reactSplide.SplideSlide, { children: /* @__PURE__ */ jsxRuntime.jsx(
1625
+ children: content.map((item, index) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(reactSplide.SplideSlide, { children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1563
1626
  "div",
1564
1627
  {
1565
- className: styles$2.sliderItem,
1566
- children: /* @__PURE__ */ jsxRuntime.jsx(
1628
+ className: styles$3.sliderItem,
1629
+ children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1567
1630
  "div",
1568
1631
  {
1569
- className: styles$2.imgWrapper,
1570
- children: /* @__PURE__ */ jsxRuntime.jsx(
1632
+ className: styles$3.imgWrapper,
1633
+ children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1571
1634
  "img",
1572
1635
  {
1573
- className: cn(styles$2.sliderImage, {
1574
- [styles$2.contain]: item.image.objectFit === "contain",
1575
- [styles$2.cover]: item.image.objectFit === "cover"
1636
+ className: cn(styles$3.sliderImage, {
1637
+ [styles$3.contain]: item.image.objectFit === "contain",
1638
+ [styles$3.cover]: item.image.objectFit === "cover"
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
- ) }, index))
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))
1676
+ },
1677
+ key,
1678
+ false,
1679
+ {
1680
+ fileName: "H:/mom/sdk/src/Components/ControlSlider/ControlSlider.tsx",
1681
+ lineNumber: 122,
1682
+ columnNumber: 7
1585
1683
  },
1586
- key
1684
+ this
1587
1685
  ),
1588
- controls.isActive && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1589
- /* @__PURE__ */ jsxRuntime.jsx(
1686
+ controls.isActive && /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children: [
1687
+ /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1590
1688
  "div",
1591
1689
  {
1592
- className: cn(styles$2.arrow, {
1593
- [styles$2.arrowVertical]: direction === "vert"
1690
+ className: cn(styles$3.arrow, {
1691
+ [styles$3.arrowVertical]: direction === "vert"
1594
1692
  }),
1595
1693
  style: {
1596
1694
  color: controls.color,
1597
1695
  ["--arrow-hover-color"]: controls.hover
1598
1696
  },
1599
- children: /* @__PURE__ */ jsxRuntime.jsxs(
1697
+ children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1600
1698
  "button",
1601
1699
  {
1602
1700
  onClick: () => {
1603
1701
  handleArrowClick("-1");
1604
1702
  },
1605
- className: styles$2.arrowInner,
1703
+ className: styles$3.arrowInner,
1606
1704
  style: {
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__ */ jsxRuntime.jsx(
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
- className: cn(styles$2.arrowImg, styles$2.mirror)
1617
- }
1714
+ 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
1618
1724
  ),
1619
- !controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(ArrowIcon, { color: controls.color, className: cn(styles$2.arrowIcon, styles$2.arrowImg, styles$2.mirror) })
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__ */ jsxRuntime.jsx(
1751
+ /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1626
1752
  "div",
1627
1753
  {
1628
- className: cn(styles$2.arrow, styles$2.nextArrow, {
1629
- [styles$2.arrowVertical]: direction === "vert"
1754
+ className: cn(styles$3.arrow, styles$3.nextArrow, {
1755
+ [styles$3.arrowVertical]: direction === "vert"
1630
1756
  }),
1631
1757
  style: {
1632
1758
  color: controls.color,
1633
1759
  ["--arrow-hover-color"]: controls.hover
1634
1760
  },
1635
- children: /* @__PURE__ */ jsxRuntime.jsxs(
1761
+ children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1636
1762
  "button",
1637
1763
  {
1638
- className: styles$2.arrowInner,
1764
+ className: styles$3.arrowInner,
1639
1765
  onClick: () => handleArrowClick("+1"),
1640
1766
  style: {
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__ */ jsxRuntime.jsx(
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
- className: styles$2.arrowImg
1651
- }
1776
+ 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
1652
1786
  ),
1653
- !controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(ArrowIcon, { color: controls.color, className: cn(styles$2.arrowIcon, styles$2.arrowImg) })
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
- triggers.triggersList.click && /* @__PURE__ */ jsxRuntime.jsx(
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
- className: styles$2.clickOverlay,
1821
+ className: styles$3.clickOverlay,
1664
1822
  onClick: () => {
1665
1823
  if (sliderRef) {
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__ */ jsxRuntime.jsx(
1837
+ pagination2.isActive && /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1672
1838
  "div",
1673
1839
  {
1674
- className: cn(styles$2.pagination, {
1675
- [styles$2.paginationInsideBottom]: pagination2.position === "inside-1" && direction === "horiz",
1676
- [styles$2.paginationInsideTop]: pagination2.position === "inside-2" && direction === "horiz",
1677
- [styles$2.paginationOutsideBottom]: pagination2.position === "outside-1" && direction === "horiz",
1678
- [styles$2.paginationOutsideTop]: pagination2.position === "outside-2" && direction === "horiz",
1679
- [styles$2.paginationInsideLeft]: pagination2.position === "inside-1" && direction === "vert",
1680
- [styles$2.paginationInsideRight]: pagination2.position === "inside-2" && direction === "vert",
1681
- [styles$2.paginationOutsideLeft]: pagination2.position === "outside-1" && direction === "vert",
1682
- [styles$2.paginationOutsideRight]: pagination2.position === "outside-2" && direction === "vert",
1683
- [styles$2.paginationVertical]: direction === "vert"
1840
+ className: cn(styles$3.pagination, {
1841
+ [styles$3.paginationInsideBottom]: pagination2.position === "inside-1" && direction === "horiz",
1842
+ [styles$3.paginationInsideTop]: pagination2.position === "inside-2" && direction === "horiz",
1843
+ [styles$3.paginationOutsideBottom]: pagination2.position === "outside-1" && direction === "horiz",
1844
+ [styles$3.paginationOutsideTop]: pagination2.position === "outside-2" && direction === "horiz",
1845
+ [styles$3.paginationInsideLeft]: pagination2.position === "inside-1" && direction === "vert",
1846
+ [styles$3.paginationInsideRight]: pagination2.position === "inside-2" && direction === "vert",
1847
+ [styles$3.paginationOutsideLeft]: pagination2.position === "outside-1" && direction === "vert",
1848
+ [styles$3.paginationOutsideRight]: pagination2.position === "outside-2" && direction === "vert",
1849
+ [styles$3.paginationVertical]: direction === "vert"
1684
1850
  }),
1685
- children: /* @__PURE__ */ jsxRuntime.jsx(
1851
+ children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1686
1852
  "div",
1687
1853
  {
1688
- className: styles$2.paginationInner,
1854
+ className: styles$3.paginationInner,
1689
1855
  style: {
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__ */ jsxRuntime.jsx(
1859
+ children: content.map((_, index) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1694
1860
  "button",
1695
1861
  {
1696
1862
  onClick: () => {
@@ -1698,32 +1864,87 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
1698
1864
  sliderRef.go(index);
1699
1865
  }
1700
1866
  },
1701
- className: cn(styles$2.paginationItem),
1702
- children: /* @__PURE__ */ jsxRuntime.jsx(
1867
+ className: cn(styles$3.paginationItem),
1868
+ children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
1703
1869
  "div",
1704
1870
  {
1705
- className: cn(styles$2.dot, {
1706
- [styles$2.activeDot]: index === currentSlideIndex
1871
+ className: cn(styles$3.dot, {
1872
+ [styles$3.activeDot]: index === currentSlideIndex
1707
1873
  }),
1708
1874
  style: {
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__ */ 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)" }) }) });
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,
@@ -2274,8 +2495,504 @@ const ControlSliderComponent = {
2274
2495
  required: ["settings", "content", "styles"]
2275
2496
  }
2276
2497
  };
2498
+ const imageRevealSlider = "ImageRevealSlider-module__imageRevealSlider___UE5Ob";
2499
+ const image = "ImageRevealSlider-module__image___Qjt-e";
2500
+ const link = "ImageRevealSlider-module__link___N-iLG";
2501
+ const styles = {
2502
+ imageRevealSlider,
2503
+ image,
2504
+ link
2505
+ };
2506
+ function isMouseOverImage(mouseX, mouseY, placedImages) {
2507
+ for (const img2 of placedImages) {
2508
+ const imgEl = new Image();
2509
+ imgEl.src = img2.url;
2510
+ const imgWidth = img2.width ? Number.parseFloat(img2.width) : imgEl.naturalWidth;
2511
+ const imgHeight = imgEl.naturalHeight / imgEl.naturalWidth * imgWidth;
2512
+ const halfW = imgWidth / 2;
2513
+ const halfH = imgHeight / 2;
2514
+ if (mouseX >= img2.x - halfW && mouseX <= img2.x + halfW && mouseY >= img2.y - halfH && mouseY <= img2.y + halfH) {
2515
+ return true;
2516
+ }
2517
+ }
2518
+ return false;
2519
+ }
2520
+ function getImageSize(url2) {
2521
+ return new Promise((resolve) => {
2522
+ const img2 = new Image();
2523
+ img2.src = url2;
2524
+ img2.onload = () => {
2525
+ resolve({ width: img2.naturalWidth, height: img2.naturalHeight });
2526
+ };
2527
+ });
2528
+ }
2529
+ async function calculateImageWidthHeight(imgUrl, sizeType, customWidth, randomRange) {
2530
+ let width;
2531
+ let height;
2532
+ if (sizeType === "custom") {
2533
+ width = customWidth;
2534
+ const size = await getImageSize(imgUrl);
2535
+ height = size.height / size.width * width;
2536
+ } else if (sizeType === "random") {
2537
+ width = Math.random() * (randomRange.max - randomRange.min) + randomRange.min;
2538
+ const size = await getImageSize(imgUrl);
2539
+ height = size.height / size.width * width;
2540
+ } else {
2541
+ const size = await getImageSize(imgUrl);
2542
+ width = size.width;
2543
+ height = size.height;
2544
+ }
2545
+ return { width, height, finalWidth: `${width}px` };
2546
+ }
2547
+ function ImageRevealSlider({ settings, content, isEditor }) {
2548
+ const divRef = react.useRef(null);
2549
+ const [placedImages, setPlacedImages] = react.useState([]);
2550
+ const [counter, setCounter] = react.useState(0);
2551
+ const imageIdCounter = react.useRef(0);
2552
+ const defaultImageCount = 1;
2553
+ const { sizeType, imageWidth: customWidth, randomRangeImageWidth: randomRange } = settings.imageSize;
2554
+ const { revealPosition, visible, target } = settings.position;
2555
+ const { cursorType, defaultCursor, hoverCursor } = settings.cursor;
2556
+ const createNewImage = async (imgData, containerWidth, containerHeight, position = {}) => {
2557
+ const { width, height, finalWidth } = await calculateImageWidthHeight(
2558
+ imgData.image.url,
2559
+ sizeType,
2560
+ customWidth,
2561
+ randomRange
2562
+ );
2563
+ let x = position.x ?? Math.random() * containerWidth;
2564
+ let y = position.y ?? Math.random() * containerHeight;
2565
+ const adjustedX = Math.min(Math.max(x, width / 2), containerWidth - width / 2);
2566
+ const adjustedY = Math.min(Math.max(y, height / 2), containerHeight - height / 2);
2567
+ return {
2568
+ id: imageIdCounter.current++,
2569
+ url: imgData.image.url,
2570
+ link: imgData.link,
2571
+ name: imgData.image.name,
2572
+ x: adjustedX,
2573
+ y: adjustedY,
2574
+ width: finalWidth
2575
+ };
2576
+ };
2577
+ const defaultContentUrls = react.useMemo(() => {
2578
+ const defaultContentLength = Math.min(content.length, defaultImageCount);
2579
+ return content.filter((_, i) => i < defaultContentLength).map((c) => c.image.url).join("-");
2580
+ }, [content]);
2581
+ react.useEffect(() => {
2582
+ if (!divRef.current || content.length === 0) return;
2583
+ const rect = divRef.current.getBoundingClientRect();
2584
+ const containerWidth = rect.width;
2585
+ const containerHeight = rect.height;
2586
+ const defaultPlaced = [];
2587
+ const placeImages = async () => {
2588
+ for (let i = 0; i < defaultImageCount && i < content.length; i++) {
2589
+ const imgData = content[i];
2590
+ const newImg = await createNewImage(imgData, containerWidth, containerHeight);
2591
+ defaultPlaced.push(newImg);
2592
+ }
2593
+ setPlacedImages(defaultPlaced);
2594
+ setCounter(defaultImageCount % content.length);
2595
+ };
2596
+ placeImages();
2597
+ }, [defaultContentUrls, sizeType, customWidth, randomRange]);
2598
+ react.useEffect(() => {
2599
+ if (visible === "lastOne") {
2600
+ setPlacedImages((prev) => prev.length > 0 ? [prev[prev.length - 1]] : []);
2601
+ }
2602
+ }, [visible]);
2603
+ const handleClick = async (e) => {
2604
+ if (!divRef.current) return;
2605
+ const rect = divRef.current.getBoundingClientRect();
2606
+ const clickX = e.clientX - rect.left;
2607
+ const clickY = e.clientY - rect.top;
2608
+ if (target === "image" && !isMouseOverImage(clickX, clickY, placedImages)) return;
2609
+ let x = 0, y = 0;
2610
+ if (revealPosition === "onClick") {
2611
+ x = clickX;
2612
+ y = clickY;
2613
+ } else if (revealPosition === "same") {
2614
+ x = rect.width / 2;
2615
+ y = rect.height / 2;
2616
+ } else {
2617
+ x = Math.random() * rect.width;
2618
+ y = Math.random() * rect.height;
2619
+ }
2620
+ const imgData = content[counter];
2621
+ const newImage = await createNewImage(imgData, rect.width, rect.height, { x, y });
2622
+ setPlacedImages((prev) => visible === "all" ? [...prev, newImage] : [newImage]);
2623
+ setCounter((prev) => prev >= content.length - 1 ? 0 : prev + 1);
2624
+ };
2625
+ const handleMouseMove = (e) => {
2626
+ if (!divRef.current) return;
2627
+ if (cursorType === "system") {
2628
+ divRef.current.style.cursor = "";
2629
+ return;
2630
+ }
2631
+ const rect = divRef.current.getBoundingClientRect();
2632
+ const mouseX = e.clientX - rect.left;
2633
+ const mouseY = e.clientY - rect.top;
2634
+ const isHover = target === "area" || isMouseOverImage(mouseX, mouseY, placedImages);
2635
+ divRef.current.style.cursor = isHover ? `url(${hoverCursor}), auto` : `url(${defaultCursor}), auto`;
2636
+ };
2637
+ return /* @__PURE__ */ jsxDevRuntime.jsxDEV(
2638
+ "div",
2639
+ {
2640
+ ref: divRef,
2641
+ onClick: handleClick,
2642
+ onMouseEnter: handleMouseMove,
2643
+ onMouseMove: handleMouseMove,
2644
+ className: styles.imageRevealSlider,
2645
+ children: placedImages.map((img2) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(
2646
+ "div",
2647
+ {
2648
+ className: styles.wrapper,
2649
+ style: {
2650
+ top: `${img2.y}px`,
2651
+ left: `${img2.x}px`,
2652
+ position: "absolute",
2653
+ transform: "translate(-50%, -50%)",
2654
+ width: img2.width ?? "auto",
2655
+ height: "auto"
2656
+ },
2657
+ children: target === "area" && img2.link ? /* @__PURE__ */ jsxDevRuntime.jsxDEV("a", { href: img2.link, target: "_blank", className: styles.link, children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
2658
+ "img",
2659
+ {
2660
+ src: img2.url,
2661
+ alt: img2.name,
2662
+ className: styles.image
2663
+ },
2664
+ img2.id,
2665
+ false,
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(
2677
+ "img",
2678
+ {
2679
+ src: img2.url,
2680
+ alt: img2.name,
2681
+ className: styles.image
2682
+ },
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
2691
+ )
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
2701
+ ))
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
2711
+ );
2712
+ }
2713
+ const ControlImageRevealSliderComponent = {
2714
+ element: ImageRevealSlider,
2715
+ id: "control-image-reveal",
2716
+ name: "Image reveal",
2717
+ preview: {
2718
+ type: "video",
2719
+ url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K723EY5AH8SKQFK4R31D8FPV.mp4"
2720
+ },
2721
+ defaultSize: {
2722
+ width: 700,
2723
+ height: 400
2724
+ },
2725
+ schema: {
2726
+ type: "object",
2727
+ properties: {
2728
+ settings: {
2729
+ layoutBased: true,
2730
+ type: "object",
2731
+ properties: {
2732
+ imageSize: {
2733
+ name: "IMG SIZE",
2734
+ icon: "size",
2735
+ tooltip: "IMG SIZE",
2736
+ type: "object",
2737
+ properties: {
2738
+ sizeType: {
2739
+ name: "sizeType",
2740
+ type: "string",
2741
+ display: {
2742
+ type: "ratio-group"
2743
+ },
2744
+ enum: ["as Is", "custom", "random"]
2745
+ },
2746
+ imageWidth: {
2747
+ type: "number",
2748
+ label: "W",
2749
+ display: {
2750
+ type: "numeric-input",
2751
+ visible: false
2752
+ }
2753
+ },
2754
+ randomRangeImageWidth: {
2755
+ type: "object",
2756
+ display: {
2757
+ type: "random-range-controls",
2758
+ visible: false
2759
+ },
2760
+ properties: {
2761
+ min: {
2762
+ type: "number"
2763
+ },
2764
+ max: {
2765
+ type: "number"
2766
+ }
2767
+ }
2768
+ }
2769
+ }
2770
+ },
2771
+ cursor: {
2772
+ name: "cursor",
2773
+ icon: "cursor",
2774
+ tooltip: "cursor",
2775
+ type: "object",
2776
+ properties: {
2777
+ cursorType: {
2778
+ name: "cursorType",
2779
+ type: "string",
2780
+ display: {
2781
+ type: "ratio-group"
2782
+ },
2783
+ enum: ["system", "custom"]
2784
+ },
2785
+ defaultCursor: {
2786
+ type: ["string", "null"],
2787
+ display: {
2788
+ type: "settings-image-input",
2789
+ title: "Default",
2790
+ visible: false
2791
+ }
2792
+ },
2793
+ hoverCursor: {
2794
+ type: ["string", "null"],
2795
+ display: {
2796
+ type: "settings-image-input",
2797
+ title: "Hover",
2798
+ visible: false
2799
+ }
2800
+ }
2801
+ }
2802
+ },
2803
+ position: {
2804
+ name: "position",
2805
+ icon: "transition",
2806
+ tooltip: "Position",
2807
+ type: "object",
2808
+ properties: {
2809
+ revealPosition: {
2810
+ type: "string",
2811
+ display: {
2812
+ type: "ratio-group"
2813
+ },
2814
+ enum: ["random", "same", "onClick"]
2815
+ },
2816
+ visible: {
2817
+ type: "string",
2818
+ display: {
2819
+ type: "ratio-group"
2820
+ },
2821
+ enum: ["all", "lastOne"]
2822
+ },
2823
+ target: {
2824
+ type: "string",
2825
+ display: {
2826
+ type: "ratio-group"
2827
+ },
2828
+ enum: ["area", "image"]
2829
+ }
2830
+ }
2831
+ }
2832
+ },
2833
+ default: {
2834
+ imageSize: {
2835
+ sizeType: "custom",
2836
+ imageWidth: 500,
2837
+ randomRangeImageWidth: {
2838
+ min: 100,
2839
+ max: 1e3
2840
+ }
2841
+ },
2842
+ cursor: {
2843
+ cursorType: "system",
2844
+ defaultCursor: null,
2845
+ hoverCursor: null
2846
+ },
2847
+ position: {
2848
+ revealPosition: "random",
2849
+ visible: "all",
2850
+ target: "area"
2851
+ }
2852
+ },
2853
+ displayRules: [
2854
+ {
2855
+ if: {
2856
+ name: "imageSize.sizeType",
2857
+ value: "custom"
2858
+ },
2859
+ then: {
2860
+ name: "properties.imageSize.properties.imageWidth.display.visible",
2861
+ value: true
2862
+ }
2863
+ },
2864
+ {
2865
+ if: {
2866
+ name: "imageSize.sizeType",
2867
+ value: "random"
2868
+ },
2869
+ then: {
2870
+ name: "properties.imageSize.properties.randomRangeImageWidth.display.visible",
2871
+ value: true
2872
+ }
2873
+ },
2874
+ {
2875
+ if: [
2876
+ { name: "position.target", value: "image" },
2877
+ { name: "cursor.cursorType", value: "custom" }
2878
+ ],
2879
+ then: {
2880
+ name: "properties.cursor.properties.defaultCursor.display.visible",
2881
+ value: true
2882
+ }
2883
+ },
2884
+ {
2885
+ if: {
2886
+ name: "cursor.cursorType",
2887
+ value: "custom"
2888
+ },
2889
+ then: {
2890
+ name: "properties.cursor.properties.hoverCursor.display.visible",
2891
+ value: true
2892
+ }
2893
+ }
2894
+ ]
2895
+ },
2896
+ content: {
2897
+ layoutBased: false,
2898
+ type: "array",
2899
+ items: {
2900
+ type: "object",
2901
+ properties: {
2902
+ image: {
2903
+ type: "object",
2904
+ display: {
2905
+ type: "media-input"
2906
+ },
2907
+ properties: {
2908
+ url: {
2909
+ type: "string"
2910
+ },
2911
+ name: {
2912
+ type: "string"
2913
+ },
2914
+ objectFit: {
2915
+ type: "string",
2916
+ enum: ["cover", "contain"]
2917
+ }
2918
+ },
2919
+ required: ["url", "name"]
2920
+ },
2921
+ link: {
2922
+ type: "string",
2923
+ display: {
2924
+ type: "text-input",
2925
+ placeholder: "Enter link..."
2926
+ }
2927
+ }
2928
+ },
2929
+ required: ["image"]
2930
+ },
2931
+ default: [
2932
+ {
2933
+ image: {
2934
+ objectFit: "cover",
2935
+ url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K740QZCY7R9HD9KTMB6XGPJ4.jpeg",
2936
+ name: "Slider-1.jpeg"
2937
+ },
2938
+ link: ""
2939
+ },
2940
+ {
2941
+ image: {
2942
+ objectFit: "cover",
2943
+ url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K740S36970GH347RCZ8GW6QF.jpeg",
2944
+ name: "Slider-2.jpeg"
2945
+ },
2946
+ link: ""
2947
+ },
2948
+ {
2949
+ image: {
2950
+ objectFit: "cover",
2951
+ url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K740RZ7VG1PWA7CRMR6TW0QS.jpeg",
2952
+ name: "Slider-3.jpeg"
2953
+ },
2954
+ link: ""
2955
+ },
2956
+ {
2957
+ image: {
2958
+ objectFit: "cover",
2959
+ url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K740RV2XQMBWM2RZABY6AP9N.jpeg",
2960
+ name: "Slider-4.jpeg"
2961
+ },
2962
+ link: ""
2963
+ },
2964
+ {
2965
+ image: {
2966
+ objectFit: "cover",
2967
+ url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K740RQ4E62FG7Y92J4AP8T0A.jpeg",
2968
+ name: "Slider-5.jpeg"
2969
+ },
2970
+ link: ""
2971
+ },
2972
+ {
2973
+ image: {
2974
+ objectFit: "cover",
2975
+ url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K740RE073FS2HZX8AVP3MCR7.jpeg",
2976
+ name: "Slider-6.jpeg"
2977
+ },
2978
+ link: ""
2979
+ },
2980
+ {
2981
+ image: {
2982
+ objectFit: "cover",
2983
+ url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K740R841W216BPQR07XZN8G4.jpeg",
2984
+ name: "Slider-7.jpeg"
2985
+ },
2986
+ link: ""
2987
+ }
2988
+ ]
2989
+ }
2990
+ }
2991
+ }
2992
+ };
2277
2993
  const components = [
2278
- ControlSliderComponent
2994
+ ControlSliderComponent,
2995
+ ControlImageRevealSliderComponent
2279
2996
  ];
2280
2997
  exports.AnchorSide = AnchorSide;
2281
2998
  exports.AreaAnchor = AreaAnchor;