@cntrl-site/components 0.1.0-2 → 0.1.0-21

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
@@ -272,7 +272,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
272
272
  options: {
273
273
  arrows: false,
274
274
  speed: transition.duration ? parseInt(transition.duration) : 500,
275
- autoplay: isEditor ? false : triggers.autoPlay !== null,
275
+ autoplay: triggers.autoPlay !== null,
276
276
  ...triggers.autoPlay !== null && {
277
277
  interval: parseInt(triggers.autoPlay) * 1e3
278
278
  },
@@ -469,6 +469,9 @@ const ControlSliderComponent = {
469
469
  settings: {
470
470
  layoutBased: true,
471
471
  type: "object",
472
+ display: {
473
+ type: "settings-block"
474
+ },
472
475
  properties: {
473
476
  triggers: {
474
477
  title: "triggers",
@@ -1190,6 +1193,9 @@ const ControlImageRevealSliderComponent = {
1190
1193
  settings: {
1191
1194
  layoutBased: true,
1192
1195
  type: "object",
1196
+ display: {
1197
+ type: "settings-block"
1198
+ },
1193
1199
  properties: {
1194
1200
  imageSize: {
1195
1201
  title: "IMG SIZE",
@@ -1450,9 +1456,14 @@ const nextArrow = "LightBox-module__nextArrow___zkAQN";
1450
1456
  const arrowInner = "LightBox-module__arrowInner___p48sW";
1451
1457
  const arrowImg = "LightBox-module__arrowImg___pNV88";
1452
1458
  const mirror = "LightBox-module__mirror___pjeXc";
1459
+ const thumbsContainerVertical = "LightBox-module__thumbsContainerVertical___wttk5";
1453
1460
  const thumbsContainer = "LightBox-module__thumbsContainer___osSma";
1461
+ const thumbsAlignStart = "LightBox-module__thumbsAlignStart___MO6tY";
1462
+ const thumbsAlignCenter = "LightBox-module__thumbsAlignCenter___Q4sUx";
1463
+ const thumbsAlignEnd = "LightBox-module__thumbsAlignEnd___p4y9R";
1454
1464
  const thumbItem = "LightBox-module__thumbItem___HvnF3";
1455
1465
  const thumbImage = "LightBox-module__thumbImage___OJ19m";
1466
+ const closeButton = "LightBox-module__closeButton___g2khP";
1456
1467
  const fadeIn = "LightBox-module__fadeIn___0m5GW";
1457
1468
  const slideInLeft = "LightBox-module__slideInLeft___gPYwC";
1458
1469
  const slideInRight = "LightBox-module__slideInRight___S-pPp";
@@ -1472,25 +1483,70 @@ const styles = {
1472
1483
  arrowInner,
1473
1484
  arrowImg,
1474
1485
  mirror,
1486
+ thumbsContainerVertical,
1475
1487
  thumbsContainer,
1488
+ thumbsAlignStart,
1489
+ thumbsAlignCenter,
1490
+ thumbsAlignEnd,
1476
1491
  thumbItem,
1477
1492
  thumbImage,
1493
+ closeButton,
1478
1494
  fadeIn,
1479
1495
  slideInLeft,
1480
1496
  slideInRight,
1481
1497
  slideInTop,
1482
1498
  slideInBottom
1483
1499
  };
1484
- function LightboxGallery({ settings, content, styles: styles2, portalId }) {
1500
+ const getPositionStyles = (position, offset) => {
1501
+ const styles2 = {};
1502
+ const [vertical, horizontal] = position.split("-");
1503
+ if (vertical === "top") {
1504
+ styles2.top = `${offset.y}px`;
1505
+ styles2.bottom = "auto";
1506
+ } else if (vertical === "middle") {
1507
+ styles2.top = "50%";
1508
+ styles2.bottom = "auto";
1509
+ } else if (vertical === "bottom") {
1510
+ styles2.top = "auto";
1511
+ styles2.bottom = `${offset.y}px`;
1512
+ }
1513
+ if (horizontal === "left") {
1514
+ styles2.left = `${offset.x}px`;
1515
+ styles2.right = "auto";
1516
+ } else if (horizontal === "center") {
1517
+ styles2.left = "50%";
1518
+ styles2.right = "auto";
1519
+ } else if (horizontal === "right") {
1520
+ styles2.left = "auto";
1521
+ styles2.right = `${offset.x}px`;
1522
+ }
1523
+ if (vertical === "middle" && horizontal === "center") {
1524
+ styles2.transform = `translate(calc(-50% + ${offset.x}px), calc(-50% + ${offset.y}px))`;
1525
+ } else if (vertical === "middle") {
1526
+ styles2.transform = `translateY(calc(-50% + ${offset.y}px))`;
1527
+ } else if (horizontal === "center") {
1528
+ styles2.transform = `translateX(calc(-50% + ${offset.x}px))`;
1529
+ }
1530
+ return styles2;
1531
+ };
1532
+ function LightboxGallery({ settings, content, styles: styles2, portalId, activeEvent }) {
1485
1533
  const [open, setOpen] = React.useState(false);
1486
- const { url: coverUrl } = settings.cover;
1487
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1534
+ const { url } = settings.thumbnailBlock.cover;
1535
+ React.useEffect(() => {
1536
+ if (activeEvent === "close") {
1537
+ setOpen(false);
1538
+ }
1539
+ if (activeEvent === "open") {
1540
+ setOpen(true);
1541
+ }
1542
+ }, [activeEvent]);
1543
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1488
1544
  /* @__PURE__ */ jsxRuntime.jsx(
1489
1545
  "img",
1490
1546
  {
1491
- src: coverUrl,
1547
+ src: url,
1492
1548
  alt: "Cover",
1493
- style: { width: "100%", height: "100%", cursor: "pointer" },
1549
+ style: { width: "100%", height: "100%", cursor: "pointer", objectFit: "cover" },
1494
1550
  onClick: () => setOpen(true)
1495
1551
  }
1496
1552
  ),
@@ -1498,9 +1554,9 @@ function LightboxGallery({ settings, content, styles: styles2, portalId }) {
1498
1554
  ] });
1499
1555
  }
1500
1556
  const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = true, closeOnEsc = true, portalId }) => {
1501
- var _a;
1502
1557
  const [currentIndex, setCurrentIndex] = React.useState(0);
1503
1558
  const lightboxRef = React.useRef(null);
1559
+ const { appear, triggers, slider, thumbnail, controls, area, caption: caption2, layout } = settings.lightboxBlock;
1504
1560
  const handleBackdropClick = (e) => {
1505
1561
  if (!closeOnBackdropClick) return;
1506
1562
  if (e.target === e.currentTarget) {
@@ -1514,12 +1570,12 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
1514
1570
  }
1515
1571
  };
1516
1572
  const onImageClick = (e) => {
1517
- var _a2, _b;
1518
- if (settings.triggers.type === "click" && settings.triggers.switch === "image") {
1573
+ var _a, _b;
1574
+ if (triggers.type === "click" && triggers.switch === "image") {
1519
1575
  e.stopPropagation();
1520
- (_a2 = lightboxRef.current) == null ? void 0 : _a2.go("+1");
1576
+ (_a = lightboxRef.current) == null ? void 0 : _a.go("+1");
1521
1577
  }
1522
- if (settings.triggers.type === "click" && settings.triggers.switch === "50/50") {
1578
+ if (triggers.type === "click" && triggers.switch === "50/50") {
1523
1579
  e.stopPropagation();
1524
1580
  const img2 = e.currentTarget;
1525
1581
  const rect = img2.getBoundingClientRect();
@@ -1528,7 +1584,7 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
1528
1584
  const imgWidth = rect.width;
1529
1585
  const imgHeight = rect.height;
1530
1586
  let dir;
1531
- if (settings.slider.direction === "horiz") {
1587
+ if (slider.direction === "horiz") {
1532
1588
  dir = clickX < imgWidth / 2 ? "-1" : "+1";
1533
1589
  } else {
1534
1590
  dir = clickY < imgHeight / 2 ? "-1" : "+1";
@@ -1560,15 +1616,14 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
1560
1616
  if (isOpen) setCurrentIndex(0);
1561
1617
  }, [isOpen]);
1562
1618
  const handleArrowClick = (dir) => {
1563
- var _a2;
1564
- (_a2 = lightboxRef.current) == null ? void 0 : _a2.go(dir);
1619
+ var _a;
1620
+ (_a = lightboxRef.current) == null ? void 0 : _a.go(dir);
1565
1621
  };
1566
- const appearDurationMs = ((_a = settings.appear) == null ? void 0 : _a.duration) ? parseInt(settings.appear.duration) : 300;
1622
+ const appearDurationMs = appear.duration ? parseInt(appear.duration) : 300;
1567
1623
  const appearClass = (() => {
1568
- var _a2, _b;
1569
- if (((_a2 = settings.appear) == null ? void 0 : _a2.type) === "fade in") return styles.fadeIn;
1570
- if (((_b = settings.appear) == null ? void 0 : _b.type) === "slide in") {
1571
- switch (settings.appear.direction) {
1624
+ if (appear.type === "fade in") return styles.fadeIn;
1625
+ if (appear.type === "slide in") {
1626
+ switch (appear.direction) {
1572
1627
  case "left":
1573
1628
  return styles.slideInLeft;
1574
1629
  case "right":
@@ -1589,17 +1644,18 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
1589
1644
  "div",
1590
1645
  {
1591
1646
  className: cn(styles.backdropStyle, styles.fadeIn),
1592
- style: { backgroundColor: settings.area.color, backdropFilter: `blur(${settings.area.blur}px)`, animationDuration: `${appearDurationMs}ms`, animationTimingFunction: "ease", animationFillMode: "both" },
1647
+ style: { backgroundColor: area.color, backdropFilter: `blur(${area.blur}px)`, animationDuration: `${appearDurationMs}ms`, animationTimingFunction: "ease", animationFillMode: "both" },
1593
1648
  onClick: handleBackdropClick,
1594
1649
  children: /* @__PURE__ */ jsxRuntime.jsxs(
1595
1650
  "div",
1596
1651
  {
1597
1652
  className: cn(styles.contentStyle, appearClass),
1598
1653
  style: {
1599
- padding: `${settings.layout.padding.top}px ${settings.layout.padding.right}px ${settings.layout.padding.bottom}px ${settings.layout.padding.left}px`,
1654
+ padding: `${layout.padding.top}px ${layout.padding.right}px ${layout.padding.bottom}px ${layout.padding.left}px`,
1600
1655
  animationDuration: `${appearDurationMs}ms`,
1601
1656
  animationTimingFunction: "ease",
1602
- animationFillMode: "both"
1657
+ animationFillMode: "both",
1658
+ "--splide-speed": triggers.duration || "500ms"
1603
1659
  },
1604
1660
  children: [
1605
1661
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -1611,23 +1667,27 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
1611
1667
  ref: lightboxRef,
1612
1668
  options: {
1613
1669
  arrows: false,
1614
- speed: settings.triggers.duration ? parseInt(settings.triggers.duration) : 500,
1615
- direction: settings.slider.direction === "horiz" || settings.slider.type === "fade" ? "ltr" : "ttb",
1670
+ speed: triggers.duration ? parseInt(triggers.duration) : 500,
1671
+ direction: slider.direction === "horiz" || slider.type === "fade" || slider.type === "scale" ? "ltr" : "ttb",
1616
1672
  pagination: false,
1617
- drag: settings.triggers.type === "drag",
1673
+ drag: triggers.type === "drag",
1618
1674
  perPage: 1,
1619
1675
  width: "100%",
1620
1676
  height: "100%",
1621
- type: settings.slider.type === "fade" ? "fade" : "loop",
1677
+ type: slider.type === "fade" || slider.type === "scale" ? "fade" : "loop",
1622
1678
  padding: 0,
1623
- rewind: false
1679
+ rewind: (slider.type === "scale" || slider.type === "fade") && appear.repeat !== "close"
1680
+ },
1681
+ style: {
1682
+ "--splide-speed": triggers.duration || "500ms"
1624
1683
  },
1625
1684
  children: content.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(reactSplide.SplideSlide, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.imgWrapper, onClick: handleImageWrapperClick, children: /* @__PURE__ */ jsxRuntime.jsx(
1626
1685
  "img",
1627
1686
  {
1628
1687
  className: cn(styles.imageStyle, {
1629
1688
  [styles.contain]: item.image.objectFit === "contain",
1630
- [styles.cover]: item.image.objectFit === "cover"
1689
+ [styles.cover]: item.image.objectFit === "cover",
1690
+ [styles.scaleSlide]: slider.type === "scale"
1631
1691
  }),
1632
1692
  src: item.image.url,
1633
1693
  alt: item.image.name ?? "",
@@ -1636,28 +1696,28 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
1636
1696
  ) }) }, index))
1637
1697
  }
1638
1698
  ),
1639
- settings.controls.isActive && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1699
+ controls.isActive && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1640
1700
  /* @__PURE__ */ jsxRuntime.jsx(
1641
1701
  "div",
1642
1702
  {
1643
- className: cn(styles.arrow, { [styles.arrowVertical]: settings.slider.direction === "vert" }),
1644
- style: { color: settings.controls.color, ["--arrow-hover-color"]: settings.controls.hover },
1703
+ className: cn(styles.arrow, { [styles.arrowVertical]: slider.direction === "vert" }),
1704
+ style: { color: controls.color, ["--arrow-hover-color"]: controls.hover },
1645
1705
  children: /* @__PURE__ */ jsxRuntime.jsx(
1646
1706
  "button",
1647
1707
  {
1648
1708
  className: styles.arrowInner,
1649
1709
  style: {
1650
- transform: `translate(${scalingValue(settings.controls.offset.x)}, ${scalingValue(settings.controls.offset.y * (settings.slider.direction === "horiz" ? 1 : -1))}) scale(${settings.controls.scale / 100}) rotate(${settings.slider.direction === "horiz" ? "0deg" : "90deg"})`
1710
+ transform: `translate(${scalingValue(controls.offset.x)}, ${scalingValue(controls.offset.y * (slider.direction === "horiz" ? 1 : -1))}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})`
1651
1711
  },
1652
1712
  onClick: (e) => {
1653
1713
  handleArrowClick("-1");
1654
1714
  },
1655
- children: settings.controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(
1715
+ children: controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(
1656
1716
  SvgImage,
1657
1717
  {
1658
- url: settings.controls.arrowsImgUrl,
1659
- fill: settings.controls.color,
1660
- hoverFill: settings.controls.hover,
1718
+ url: controls.arrowsImgUrl,
1719
+ fill: controls.color,
1720
+ hoverFill: controls.hover,
1661
1721
  className: cn(styles.arrowImg, styles.mirror)
1662
1722
  }
1663
1723
  )
@@ -1668,25 +1728,25 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
1668
1728
  /* @__PURE__ */ jsxRuntime.jsx(
1669
1729
  "div",
1670
1730
  {
1671
- className: cn(styles.arrow, styles.nextArrow, { [styles.arrowVertical]: settings.slider.direction === "vert" }),
1672
- style: { color: settings.controls.color, ["--arrow-hover-color"]: settings.controls.hover },
1731
+ className: cn(styles.arrow, styles.nextArrow, { [styles.arrowVertical]: slider.direction === "vert" }),
1732
+ style: { color: controls.color, ["--arrow-hover-color"]: controls.hover },
1673
1733
  children: /* @__PURE__ */ jsxRuntime.jsx(
1674
1734
  "button",
1675
1735
  {
1676
1736
  className: styles.arrowInner,
1677
1737
  style: {
1678
- transform: `translate(${scalingValue(settings.controls.offset.x * (settings.slider.direction === "horiz" ? -1 : 1))}, ${scalingValue(settings.controls.offset.y)}) scale(${settings.controls.scale / 100}) rotate(${settings.slider.direction === "horiz" ? "0deg" : "90deg"})`
1738
+ transform: `translate(${scalingValue(controls.offset.x * (slider.direction === "horiz" ? -1 : 1))}, ${scalingValue(controls.offset.y)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})`
1679
1739
  },
1680
1740
  onClick: (e) => {
1681
1741
  handleArrowClick("+1");
1682
1742
  },
1683
1743
  "aria-label": "Next",
1684
- children: settings.controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(
1744
+ children: controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(
1685
1745
  SvgImage,
1686
1746
  {
1687
- url: settings.controls.arrowsImgUrl,
1688
- fill: settings.controls.color,
1689
- hoverFill: settings.controls.hover,
1747
+ url: controls.arrowsImgUrl,
1748
+ fill: controls.color,
1749
+ hoverFill: controls.hover,
1690
1750
  className: styles.arrowImg
1691
1751
  }
1692
1752
  )
@@ -1695,15 +1755,41 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
1695
1755
  }
1696
1756
  )
1697
1757
  ] }),
1698
- settings.area.closeIconUrl && /* @__PURE__ */ jsxRuntime.jsx("button", { className: styles.closeButton, style: { top: settings.area.closeIconOffset.y, left: settings.area.closeIconOffset.x }, onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { url: settings.area.closeIconUrl, fill: settings.area.color }) }),
1699
- settings.caption.isActive && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.caption, style: { top: settings.caption.offset.y, left: settings.caption.offset.x, color: settings.caption.color }, children: /* @__PURE__ */ jsxRuntime.jsx(RichTextRenderer, { content: content[currentIndex].imageCaption }) }),
1700
- settings.thumbnail.isActive && /* @__PURE__ */ jsxRuntime.jsx(
1758
+ area.closeIconUrl && (() => {
1759
+ const positionStyles = getPositionStyles(area.closeIconAlign, area.closeIconOffset);
1760
+ const scaleTransform = `scale(${area.closeIconScale})`;
1761
+ const combinedTransform = positionStyles.transform ? `${positionStyles.transform} ${scaleTransform}` : scaleTransform;
1762
+ return /* @__PURE__ */ jsxRuntime.jsx(
1763
+ "button",
1764
+ {
1765
+ className: styles.closeButton,
1766
+ style: {
1767
+ ...positionStyles,
1768
+ transform: combinedTransform
1769
+ },
1770
+ onClick: onClose,
1771
+ children: /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { url: area.closeIconUrl })
1772
+ }
1773
+ );
1774
+ })(),
1775
+ caption2.isActive && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.caption, style: { top: caption2.offset.y, left: caption2.offset.x }, children: /* @__PURE__ */ jsxRuntime.jsx(RichTextRenderer, { content: content[currentIndex].imageCaption }) }),
1776
+ thumbnail.isActive && /* @__PURE__ */ jsxRuntime.jsx(
1701
1777
  "div",
1702
1778
  {
1703
- className: cn(styles.thumbsContainer),
1779
+ className: cn(
1780
+ styles.thumbsContainer,
1781
+ {
1782
+ [styles.thumbsContainerVertical]: slider.direction === "vert",
1783
+ [styles.thumbsAlignStart]: thumbnail.align === "start",
1784
+ [styles.thumbsAlignCenter]: thumbnail.align === "center",
1785
+ [styles.thumbsAlignEnd]: thumbnail.align === "end"
1786
+ }
1787
+ ),
1704
1788
  style: {
1705
- gap: `${settings.thumbnail.grid.gap}px`,
1706
- height: `${settings.thumbnail.grid.height}px`
1789
+ gap: `${thumbnail.grid.gap}px`,
1790
+ ...slider.direction === "horiz" ? { height: `${thumbnail.grid.height}px` } : {},
1791
+ ...slider.direction === "vert" ? { width: `${thumbnail.grid.width}px` } : {},
1792
+ ...getPositionStyles(thumbnail.position, thumbnail.offset)
1707
1793
  },
1708
1794
  children: content.map((item, index) => {
1709
1795
  const isActive = index === currentIndex;
@@ -1712,16 +1798,17 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
1712
1798
  {
1713
1799
  className: styles.thumbItem,
1714
1800
  style: {
1715
- transform: `scale(${isActive ? settings.thumbnail.activeState.scale : 1})`,
1716
- height: "100%",
1717
- opacity: isActive ? settings.thumbnail.activeState.opacity : settings.thumbnail.opacity,
1718
- ["--thumb-hover"]: settings.thumbnail.activeState.opacity
1801
+ transform: `scale(${isActive ? thumbnail.activeState.scale : 1})`,
1802
+ ...slider.direction === "horiz" ? { height: "100%" } : {},
1803
+ ...slider.direction === "vert" ? { width: "100%" } : {},
1804
+ opacity: isActive ? thumbnail.activeState.opacity : thumbnail.opacity,
1805
+ ["--thumb-hover"]: thumbnail.activeState.opacity
1719
1806
  },
1720
1807
  onClick: (e) => {
1721
- var _a2;
1808
+ var _a;
1722
1809
  e.stopPropagation();
1723
1810
  setCurrentIndex(index);
1724
- (_a2 = lightboxRef.current) == null ? void 0 : _a2.go(index);
1811
+ (_a = lightboxRef.current) == null ? void 0 : _a.go(index);
1725
1812
  },
1726
1813
  children: /* @__PURE__ */ jsxRuntime.jsx(
1727
1814
  "img",
@@ -1729,7 +1816,11 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
1729
1816
  src: item.image.url,
1730
1817
  alt: item.image.name ?? "",
1731
1818
  className: styles.thumbImage,
1732
- style: { objectFit: settings.thumbnail.fit === "cover" ? "cover" : "contain" }
1819
+ style: {
1820
+ objectFit: thumbnail.fit === "cover" ? "cover" : "contain",
1821
+ ...slider.direction === "horiz" ? { height: "100%" } : {},
1822
+ ...slider.direction === "vert" ? { width: "100%" } : {}
1823
+ }
1733
1824
  }
1734
1825
  )
1735
1826
  },
@@ -1765,218 +1856,215 @@ const LightboxComponent = {
1765
1856
  layoutBased: true,
1766
1857
  type: "object",
1767
1858
  properties: {
1768
- cover: {
1769
- title: "COVER",
1770
- icon: "image",
1771
- tooltip: "Cover Image",
1859
+ thumbnailBlock: {
1860
+ display: {
1861
+ type: "settings-block",
1862
+ triggerEvent: "close"
1863
+ },
1772
1864
  type: "object",
1773
1865
  properties: {
1774
- url: {
1775
- type: "string",
1776
- display: {
1777
- type: "settings-image-input"
1866
+ cover: {
1867
+ title: "COVER",
1868
+ icon: "cover",
1869
+ tooltip: "Cover Image",
1870
+ type: "object",
1871
+ properties: {
1872
+ url: {
1873
+ type: "string",
1874
+ display: {
1875
+ type: "settings-image-input"
1876
+ }
1877
+ }
1778
1878
  }
1779
1879
  }
1780
1880
  }
1781
1881
  },
1782
- appear: {
1783
- title: "APPEAR",
1784
- icon: "transition",
1785
- tooltip: "Appearance",
1786
- type: "object",
1787
- properties: {
1788
- type: {
1789
- type: "string",
1790
- display: {
1791
- type: "ratio-group"
1792
- },
1793
- enum: ["slide in", "fade in", "mix"]
1794
- },
1795
- duration: {
1796
- type: "string",
1797
- label: "hourglass-icon",
1798
- display: {
1799
- type: "step-selector"
1800
- },
1801
- enum: ["100ms", "250ms", "500ms", "1000ms", "1500ms", "2000ms"]
1802
- },
1803
- direction: {
1804
- type: "string",
1805
- title: "FROM",
1806
- display: {
1807
- visible: false,
1808
- type: "direction-control"
1809
- },
1810
- enum: ["top", "bottom", "left", "right"]
1811
- },
1812
- repeat: {
1813
- type: "string",
1814
- title: "Repeat",
1815
- display: {
1816
- type: "ratio-group"
1817
- },
1818
- enum: ["close", "loop"]
1819
- }
1820
- }
1821
- },
1822
- triggers: {
1823
- title: "TRIGGERS",
1824
- icon: "target",
1825
- tooltip: "Triggers",
1826
- type: "object",
1827
- properties: {
1828
- type: {
1829
- type: "string",
1830
- display: {
1831
- type: "ratio-group"
1832
- },
1833
- enum: ["click", "drag", "scroll"]
1834
- },
1835
- switch: {
1836
- type: "string",
1837
- display: {
1838
- type: "ratio-group"
1839
- },
1840
- enum: ["image", "50/50"]
1841
- },
1842
- duration: {
1843
- type: "string",
1844
- label: "hourglass-icon",
1845
- display: {
1846
- type: "step-selector"
1847
- },
1848
- enum: ["100ms", "250ms", "500ms", "1000ms", "1500ms", "2000ms"]
1849
- }
1850
- }
1851
- },
1852
- slider: {
1853
- title: "SLIDER",
1854
- icon: "horizontal-resize",
1855
- tooltip: "Slider",
1856
- type: "object",
1857
- properties: {
1858
- type: {
1859
- type: "string",
1860
- display: {
1861
- type: "ratio-group"
1862
- },
1863
- enum: ["slide", "fade", "scale"]
1864
- },
1865
- direction: {
1866
- type: "string",
1867
- display: {
1868
- visible: false,
1869
- type: "ratio-group"
1870
- },
1871
- enum: ["horiz", "vert"]
1872
- }
1873
- }
1874
- },
1875
- thumbnail: {
1876
- title: "THUMB",
1877
- icon: "pagination",
1878
- tooltip: "Thumbnail",
1882
+ lightboxBlock: {
1883
+ display: {
1884
+ type: "settings-block",
1885
+ triggerEvent: "open"
1886
+ },
1879
1887
  type: "object",
1880
1888
  properties: {
1881
- isActive: {
1882
- type: "boolean",
1883
- display: {
1884
- type: "setting-toggle"
1889
+ appear: {
1890
+ title: "APPEAR",
1891
+ icon: "transition",
1892
+ tooltip: "Appearance",
1893
+ type: "object",
1894
+ properties: {
1895
+ type: {
1896
+ type: "string",
1897
+ display: {
1898
+ type: "ratio-group"
1899
+ },
1900
+ enum: ["slide in", "fade in", "mix"]
1901
+ },
1902
+ duration: {
1903
+ type: "string",
1904
+ label: "T",
1905
+ display: {
1906
+ type: "step-selector"
1907
+ },
1908
+ enum: ["100ms", "250ms", "500ms", "1000ms", "1500ms", "2000ms"]
1909
+ },
1910
+ direction: {
1911
+ type: "string",
1912
+ title: "FROM",
1913
+ display: {
1914
+ visible: true,
1915
+ type: "direction-control"
1916
+ },
1917
+ enum: ["top", "left", "right", "bottom"]
1918
+ },
1919
+ repeat: {
1920
+ type: "string",
1921
+ title: "Repeat",
1922
+ display: {
1923
+ type: "ratio-group"
1924
+ },
1925
+ enum: ["close", "loop"]
1926
+ }
1885
1927
  }
1886
1928
  },
1887
- position: {
1888
- display: {
1889
- type: "align-grid"
1890
- },
1891
- type: "string",
1892
- enum: ["top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right"]
1893
- },
1894
- fit: {
1895
- type: "string",
1896
- display: {
1897
- type: "ratio-group"
1898
- },
1899
- enum: ["cover", "fit"]
1900
- },
1901
- align: {
1902
- type: "string",
1903
- title: "Align",
1904
- display: {
1905
- type: "ratio-group"
1906
- },
1907
- enum: ["top", "center", "bottom"]
1908
- },
1909
1929
  triggers: {
1910
- type: "string",
1911
- title: "Triggers",
1912
- display: {
1913
- type: "ratio-group"
1914
- },
1915
- enum: ["click", "hover"]
1916
- },
1917
- grid: {
1930
+ title: "TRIGGERS",
1931
+ icon: "target",
1932
+ tooltip: "Triggers",
1918
1933
  type: "object",
1919
- title: "Grid",
1920
- display: {
1921
- type: "group"
1922
- },
1923
1934
  properties: {
1924
- height: {
1925
- type: "number",
1926
- label: "H",
1935
+ type: {
1936
+ type: "string",
1927
1937
  display: {
1928
- type: "numeric-input"
1929
- }
1938
+ type: "ratio-group"
1939
+ },
1940
+ enum: ["click", "drag"]
1930
1941
  },
1931
- gap: {
1932
- type: "number",
1933
- label: "Gap",
1942
+ switch: {
1943
+ type: "string",
1934
1944
  display: {
1935
- type: "numeric-input"
1936
- }
1945
+ type: "ratio-group"
1946
+ },
1947
+ enum: ["image", "50/50"]
1948
+ },
1949
+ duration: {
1950
+ type: "string",
1951
+ label: "T",
1952
+ display: {
1953
+ type: "step-selector"
1954
+ },
1955
+ enum: ["100ms", "250ms", "500ms", "1000ms", "1500ms", "2000ms"]
1937
1956
  }
1938
1957
  }
1939
1958
  },
1940
- offset: {
1959
+ slider: {
1960
+ title: "SLIDER",
1961
+ icon: "horizontal-resize",
1962
+ tooltip: "Slider",
1941
1963
  type: "object",
1942
- display: {
1943
- type: "offset-controls"
1944
- },
1945
1964
  properties: {
1946
- x: {
1947
- type: "number"
1965
+ type: {
1966
+ type: "string",
1967
+ display: {
1968
+ type: "ratio-group"
1969
+ },
1970
+ enum: ["slide", "fade", "scale"]
1948
1971
  },
1949
- y: {
1950
- type: "number"
1972
+ direction: {
1973
+ type: "string",
1974
+ display: {
1975
+ type: "ratio-group"
1976
+ },
1977
+ enum: ["horiz", "vert"]
1951
1978
  }
1952
1979
  }
1953
1980
  },
1954
- opacity: {
1955
- type: "number",
1956
- title: "Opacity",
1957
- label: "icon:opacity",
1958
- min: 0,
1959
- max: 100,
1960
- step: 1,
1961
- display: {
1962
- type: "numeric-input"
1963
- }
1964
- },
1965
- activeState: {
1981
+ thumbnail: {
1982
+ title: "THUMB",
1983
+ icon: "thumbnail",
1984
+ tooltip: "Thumbnail",
1966
1985
  type: "object",
1967
- title: "ACTIVE",
1968
- display: {
1969
- type: "group"
1970
- },
1971
1986
  properties: {
1972
- scale: {
1973
- type: "number",
1974
- title: "Scale",
1975
- min: 1,
1976
- max: 2,
1977
- step: 0.1,
1987
+ isActive: {
1988
+ type: "boolean",
1978
1989
  display: {
1979
- type: "range-control"
1990
+ type: "setting-toggle"
1991
+ }
1992
+ },
1993
+ position: {
1994
+ display: {
1995
+ type: "align-grid"
1996
+ },
1997
+ type: "string",
1998
+ enum: ["top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right"]
1999
+ },
2000
+ fit: {
2001
+ type: "string",
2002
+ display: {
2003
+ type: "ratio-group"
2004
+ },
2005
+ enum: ["cover", "fit"]
2006
+ },
2007
+ align: {
2008
+ type: "string",
2009
+ title: "Align",
2010
+ display: {
2011
+ type: "align-group",
2012
+ direction: "horizontal"
2013
+ },
2014
+ enum: ["start", "center", "end"]
2015
+ },
2016
+ triggers: {
2017
+ type: "string",
2018
+ title: "Triggers",
2019
+ display: {
2020
+ type: "ratio-group",
2021
+ direction: "horizontal"
2022
+ },
2023
+ enum: ["clk", "hov"]
2024
+ },
2025
+ grid: {
2026
+ type: "object",
2027
+ title: "Grid",
2028
+ display: {
2029
+ type: "group"
2030
+ },
2031
+ properties: {
2032
+ height: {
2033
+ type: "number",
2034
+ label: "H",
2035
+ display: {
2036
+ type: "numeric-input"
2037
+ }
2038
+ },
2039
+ width: {
2040
+ type: "number",
2041
+ label: "W",
2042
+ display: {
2043
+ type: "numeric-input",
2044
+ visible: false
2045
+ }
2046
+ },
2047
+ gap: {
2048
+ type: "number",
2049
+ label: "Gap",
2050
+ display: {
2051
+ type: "numeric-input"
2052
+ }
2053
+ }
2054
+ }
2055
+ },
2056
+ offset: {
2057
+ type: "object",
2058
+ display: {
2059
+ type: "offset-controls"
2060
+ },
2061
+ properties: {
2062
+ x: {
2063
+ type: "number"
2064
+ },
2065
+ y: {
2066
+ type: "number"
2067
+ }
1980
2068
  }
1981
2069
  },
1982
2070
  opacity: {
@@ -1989,278 +2077,322 @@ const LightboxComponent = {
1989
2077
  display: {
1990
2078
  type: "numeric-input"
1991
2079
  }
1992
- }
1993
- }
1994
- }
1995
- }
1996
- },
1997
- layout: {
1998
- title: "LAYOUT",
1999
- icon: "layout",
2000
- tooltip: "Layout",
2001
- type: "object",
2002
- properties: {
2003
- position: {
2004
- display: {
2005
- type: "align-grid"
2006
- },
2007
- type: "string",
2008
- enum: ["top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right"]
2009
- },
2010
- offset: {
2011
- type: "object",
2012
- display: {
2013
- type: "offset-controls"
2014
- },
2015
- properties: {
2016
- x: {
2017
- type: "number"
2018
2080
  },
2019
- y: {
2020
- type: "number"
2081
+ activeState: {
2082
+ type: "object",
2083
+ title: "ACTIVE",
2084
+ display: {
2085
+ type: "group"
2086
+ },
2087
+ properties: {
2088
+ scale: {
2089
+ type: "number",
2090
+ title: "Scale",
2091
+ min: 0.5,
2092
+ max: 5,
2093
+ step: 0.1,
2094
+ display: {
2095
+ type: "range-control"
2096
+ }
2097
+ },
2098
+ opacity: {
2099
+ type: "number",
2100
+ title: "Opacity",
2101
+ label: "icon:opacity",
2102
+ min: 0,
2103
+ max: 100,
2104
+ step: 1,
2105
+ display: {
2106
+ type: "numeric-input"
2107
+ }
2108
+ }
2109
+ }
2021
2110
  }
2022
2111
  }
2023
2112
  },
2024
- padding: {
2113
+ layout: {
2114
+ title: "LAYOUT",
2115
+ icon: "layout",
2116
+ tooltip: "Layout",
2025
2117
  type: "object",
2026
- title: "Padding",
2027
- display: {
2028
- type: "padding-controls"
2029
- },
2030
2118
  properties: {
2031
- top: {
2032
- type: "number"
2033
- },
2034
- right: {
2035
- type: "number"
2119
+ position: {
2120
+ display: {
2121
+ type: "align-grid"
2122
+ },
2123
+ type: "string",
2124
+ enum: ["top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right"]
2036
2125
  },
2037
- bottom: {
2038
- type: "number"
2126
+ offset: {
2127
+ type: "object",
2128
+ display: {
2129
+ type: "offset-controls"
2130
+ },
2131
+ properties: {
2132
+ x: {
2133
+ type: "number"
2134
+ },
2135
+ y: {
2136
+ type: "number"
2137
+ }
2138
+ }
2039
2139
  },
2040
- left: {
2041
- type: "number"
2140
+ padding: {
2141
+ type: "object",
2142
+ title: "Padding",
2143
+ display: {
2144
+ type: "padding-controls"
2145
+ },
2146
+ properties: {
2147
+ top: {
2148
+ type: "number"
2149
+ },
2150
+ left: {
2151
+ type: "number"
2152
+ },
2153
+ right: {
2154
+ type: "number"
2155
+ },
2156
+ bottom: {
2157
+ type: "number"
2158
+ }
2159
+ }
2042
2160
  }
2043
2161
  }
2044
- }
2045
- }
2046
- },
2047
- controls: {
2048
- title: "CONTROLS",
2049
- icon: "controls",
2050
- tooltip: "Controls",
2051
- type: "object",
2052
- properties: {
2053
- isActive: {
2054
- type: "boolean",
2055
- display: {
2056
- type: "setting-toggle"
2057
- }
2058
- },
2059
- arrowsImgUrl: {
2060
- type: ["string", "null"],
2061
- display: {
2062
- type: "settings-image-input"
2063
- }
2064
2162
  },
2065
- offset: {
2163
+ controls: {
2164
+ title: "CONTROLS",
2165
+ icon: "controls",
2166
+ tooltip: "Controls",
2066
2167
  type: "object",
2067
- display: {
2068
- type: "offset-controls"
2069
- },
2070
2168
  properties: {
2071
- x: {
2072
- type: "number"
2169
+ isActive: {
2170
+ type: "boolean",
2171
+ display: {
2172
+ type: "setting-toggle"
2173
+ }
2073
2174
  },
2074
- y: {
2075
- type: "number"
2175
+ arrowsImgUrl: {
2176
+ type: ["string", "null"],
2177
+ display: {
2178
+ type: "settings-image-input"
2179
+ }
2180
+ },
2181
+ offset: {
2182
+ type: "object",
2183
+ display: {
2184
+ type: "offset-controls"
2185
+ },
2186
+ properties: {
2187
+ x: {
2188
+ type: "number"
2189
+ },
2190
+ y: {
2191
+ type: "number"
2192
+ }
2193
+ }
2194
+ },
2195
+ scale: {
2196
+ type: "number",
2197
+ title: "Scale",
2198
+ min: 0.5,
2199
+ max: 5,
2200
+ step: 0.1,
2201
+ display: {
2202
+ type: "range-control"
2203
+ }
2204
+ },
2205
+ color: {
2206
+ title: "Color",
2207
+ type: "string",
2208
+ display: {
2209
+ type: "settings-color-picker",
2210
+ format: "single"
2211
+ }
2212
+ },
2213
+ hover: {
2214
+ title: "Hover",
2215
+ type: "string",
2216
+ display: {
2217
+ type: "settings-color-picker",
2218
+ format: "single"
2219
+ }
2076
2220
  }
2077
2221
  }
2078
2222
  },
2079
- scale: {
2080
- type: "number",
2081
- title: "Scale",
2082
- min: 0,
2083
- max: 1,
2084
- display: {
2085
- type: "range-control"
2086
- }
2087
- },
2088
- color: {
2089
- title: "Color",
2090
- type: "string",
2091
- display: {
2092
- type: "settings-color-picker",
2093
- format: "single"
2094
- }
2095
- },
2096
- hover: {
2097
- title: "Hover",
2098
- type: "string",
2099
- display: {
2100
- type: "settings-color-picker",
2101
- format: "single"
2102
- }
2103
- }
2104
- }
2105
- },
2106
- area: {
2107
- title: "AREA",
2108
- icon: "background",
2109
- tooltip: "Area",
2110
- type: "object",
2111
- properties: {
2112
- color: {
2113
- type: "string",
2114
- display: {
2115
- type: "settings-color-picker",
2116
- format: "single"
2117
- }
2118
- },
2119
- blur: {
2120
- type: "number",
2121
- label: "icon:blur",
2122
- display: {
2123
- type: "numeric-input"
2124
- }
2125
- },
2126
- closeIconUrl: {
2127
- type: ["string", "null"],
2128
- title: "CLOSE ICON",
2129
- display: {
2130
- type: "settings-image-input"
2131
- }
2132
- },
2133
- closeIconAlign: {
2134
- display: {
2135
- type: "align-grid",
2136
- direction: "horizontal"
2137
- },
2138
- type: "string",
2139
- enum: ["top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right"]
2140
- },
2141
- closeIconOffset: {
2223
+ area: {
2224
+ title: "AREA",
2225
+ icon: "area",
2226
+ tooltip: "Area",
2142
2227
  type: "object",
2143
- display: {
2144
- type: "offset-controls"
2145
- },
2146
2228
  properties: {
2147
- x: {
2148
- type: "number"
2229
+ color: {
2230
+ type: "string",
2231
+ display: {
2232
+ type: "settings-color-picker",
2233
+ format: "single"
2234
+ }
2149
2235
  },
2150
- y: {
2151
- type: "number"
2236
+ blur: {
2237
+ type: "number",
2238
+ label: "icon:blur",
2239
+ display: {
2240
+ type: "numeric-input"
2241
+ }
2242
+ },
2243
+ closeIconUrl: {
2244
+ type: ["string", "null"],
2245
+ title: "CLOSE ICON",
2246
+ display: {
2247
+ type: "settings-image-input"
2248
+ }
2249
+ },
2250
+ closeIconAlign: {
2251
+ display: {
2252
+ type: "align-grid",
2253
+ direction: "horizontal"
2254
+ },
2255
+ type: "string",
2256
+ enum: ["top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right"]
2257
+ },
2258
+ closeIconScale: {
2259
+ type: "number",
2260
+ title: "Scale",
2261
+ min: 0.5,
2262
+ max: 5,
2263
+ step: 0.1,
2264
+ display: {
2265
+ type: "range-control"
2266
+ }
2267
+ },
2268
+ closeIconOffset: {
2269
+ type: "object",
2270
+ display: {
2271
+ type: "offset-controls"
2272
+ },
2273
+ properties: {
2274
+ x: {
2275
+ type: "number"
2276
+ },
2277
+ y: {
2278
+ type: "number"
2279
+ }
2280
+ }
2152
2281
  }
2153
2282
  }
2154
- }
2155
- }
2156
- },
2157
- caption: {
2158
- title: "DESC",
2159
- icon: "text-icon",
2160
- tooltip: "Description",
2161
- type: "object",
2162
- properties: {
2163
- alignment: {
2164
- type: "string",
2165
- display: {
2166
- type: "align-grid"
2167
- },
2168
- enum: ["top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right"]
2169
2283
  },
2170
- offset: {
2284
+ caption: {
2285
+ title: "DESC",
2286
+ icon: "text-icon",
2287
+ tooltip: "Description",
2171
2288
  type: "object",
2172
- display: {
2173
- type: "offset-controls"
2174
- },
2175
2289
  properties: {
2176
- x: {
2177
- type: "number"
2290
+ isActive: {
2291
+ type: "boolean",
2292
+ display: {
2293
+ type: "setting-toggle"
2294
+ }
2178
2295
  },
2179
- y: {
2180
- type: "number"
2296
+ alignment: {
2297
+ type: "string",
2298
+ display: {
2299
+ type: "align-grid"
2300
+ },
2301
+ enum: ["top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right"]
2302
+ },
2303
+ offset: {
2304
+ type: "object",
2305
+ display: {
2306
+ type: "offset-controls"
2307
+ },
2308
+ properties: {
2309
+ x: {
2310
+ type: "number"
2311
+ },
2312
+ y: {
2313
+ type: "number"
2314
+ }
2315
+ }
2316
+ },
2317
+ hover: {
2318
+ title: "Hover",
2319
+ type: "string",
2320
+ display: {
2321
+ type: "settings-color-picker",
2322
+ format: "single"
2323
+ }
2181
2324
  }
2182
2325
  }
2183
- },
2184
- color: {
2185
- title: "Color",
2186
- type: "string",
2187
- display: {
2188
- type: "settings-color-picker",
2189
- format: "single"
2190
- }
2191
- },
2192
- hover: {
2193
- title: "Hover",
2194
- type: "string",
2195
- display: {
2196
- type: "settings-color-picker",
2197
- format: "single"
2198
- }
2199
2326
  }
2200
2327
  }
2201
2328
  }
2202
2329
  },
2203
2330
  default: {
2204
- cover: {
2205
- url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERMHNP08T27H1649S67NZV.png"
2206
- },
2207
- appear: {
2208
- type: "slide in",
2209
- duration: "1000ms",
2210
- direction: "right",
2211
- repeat: "close"
2212
- },
2213
- triggers: {
2214
- type: "click",
2215
- switch: "image",
2216
- duration: "2000ms"
2217
- },
2218
- slider: {
2219
- type: "fade",
2220
- direction: "horiz"
2331
+ thumbnailBlock: {
2332
+ cover: {
2333
+ url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERMHNP08T27H1649S67NZV.png"
2334
+ }
2221
2335
  },
2222
- thumbnail: {
2223
- isActive: true,
2224
- position: "bottom-center",
2225
- fit: "cover",
2226
- align: "center",
2227
- triggers: "click",
2228
- grid: {
2229
- height: 60,
2230
- gap: 8
2336
+ lightboxBlock: {
2337
+ appear: {
2338
+ type: "slide in",
2339
+ duration: "1000ms",
2340
+ direction: "right",
2341
+ repeat: "close"
2342
+ },
2343
+ triggers: {
2344
+ type: "click",
2345
+ switch: "image",
2346
+ duration: "2000ms"
2231
2347
  },
2232
- offset: { x: 0, y: 0 },
2233
- opacity: 100,
2234
- activeState: {
2348
+ slider: {
2349
+ type: "fade",
2350
+ direction: "horiz"
2351
+ },
2352
+ thumbnail: {
2353
+ isActive: true,
2354
+ position: "bottom-center",
2355
+ fit: "cover",
2356
+ align: "center",
2357
+ triggers: "clk",
2358
+ grid: {
2359
+ height: 60,
2360
+ gap: 8
2361
+ },
2362
+ offset: { x: 0, y: 0 },
2363
+ opacity: 100,
2364
+ activeState: {
2365
+ scale: 1,
2366
+ opacity: 100
2367
+ }
2368
+ },
2369
+ layout: {
2370
+ position: "middle-center",
2371
+ offset: { x: 0, y: 0 },
2372
+ padding: { top: 0, right: 0, bottom: 0, left: 0 }
2373
+ },
2374
+ controls: {
2375
+ isActive: true,
2376
+ arrowsImgUrl: null,
2377
+ offset: { x: 0, y: 0 },
2235
2378
  scale: 1,
2236
- opacity: 100
2379
+ color: "#000000",
2380
+ hover: "#cccccc"
2381
+ },
2382
+ area: {
2383
+ color: "rgba(0,0,0,0.9)",
2384
+ blur: 0,
2385
+ closeIconUrl: null,
2386
+ closeIconAlign: "top-right",
2387
+ closeIconOffset: { x: 0, y: 0 },
2388
+ closeIconScale: 1
2389
+ },
2390
+ caption: {
2391
+ isActive: true,
2392
+ alignment: "middle-center",
2393
+ offset: { x: 0, y: 0 },
2394
+ hover: "#cccccc"
2237
2395
  }
2238
- },
2239
- layout: {
2240
- position: "middle-center",
2241
- offset: { x: 0, y: 0 },
2242
- padding: { top: 0, right: 0, bottom: 0, left: 0 }
2243
- },
2244
- controls: {
2245
- isActive: true,
2246
- arrowsImgUrl: null,
2247
- offset: { x: 0, y: 0 },
2248
- scale: 1,
2249
- color: "#000000",
2250
- hover: "#cccccc"
2251
- },
2252
- area: {
2253
- color: "rgba(0,0,0,0.9)",
2254
- blur: 0,
2255
- closeIconUrl: null,
2256
- closeIconAlign: "top-right",
2257
- closeIconOffset: { x: 12, y: 12 }
2258
- },
2259
- caption: {
2260
- alignment: "middle-center",
2261
- offset: { x: 0, y: 0 },
2262
- color: "#000000",
2263
- hover: "#cccccc"
2264
2396
  }
2265
2397
  },
2266
2398
  displayRules: [
@@ -2271,7 +2403,67 @@ const LightboxComponent = {
2271
2403
  },
2272
2404
  then: {
2273
2405
  value: true,
2274
- name: "properties.appear.properties.direction.display.visible"
2406
+ name: "properties.lightboxBlock.properties.appear.properties.direction.display.visible"
2407
+ }
2408
+ },
2409
+ {
2410
+ if: {
2411
+ name: "slider.direction",
2412
+ value: "vert"
2413
+ },
2414
+ then: {
2415
+ name: "properties.lightboxBlock.properties.thumbnail.properties.position.display.direction",
2416
+ value: "vertical"
2417
+ }
2418
+ },
2419
+ {
2420
+ if: {
2421
+ name: "triggers.type",
2422
+ value: "drag"
2423
+ },
2424
+ then: {
2425
+ name: "properties.lightboxBlock.properties.triggers.properties.switch.display.visible",
2426
+ value: false
2427
+ }
2428
+ },
2429
+ {
2430
+ if: {
2431
+ name: "triggers.type",
2432
+ value: "drag"
2433
+ },
2434
+ then: {
2435
+ name: "properties.lightboxBlock.properties.triggers.properties.duration.display.visible",
2436
+ value: false
2437
+ }
2438
+ },
2439
+ {
2440
+ if: {
2441
+ name: "slider.direction",
2442
+ value: "vert"
2443
+ },
2444
+ then: {
2445
+ name: "properties.lightboxBlock.properties.thumbnail.properties.grid.properties.width.display.visible",
2446
+ value: true
2447
+ }
2448
+ },
2449
+ {
2450
+ if: {
2451
+ name: "slider.direction",
2452
+ value: "vert"
2453
+ },
2454
+ then: {
2455
+ name: "properties.lightboxBlock.properties.thumbnail.properties.grid.properties.height.display.visible",
2456
+ value: false
2457
+ }
2458
+ },
2459
+ {
2460
+ if: {
2461
+ name: "appear.type",
2462
+ value: "fade in"
2463
+ },
2464
+ then: {
2465
+ name: "properties.lightboxBlock.properties.appear.properties.direction.display.visible",
2466
+ value: false
2275
2467
  }
2276
2468
  }
2277
2469
  ]
@@ -2288,9 +2480,9 @@ const LightboxComponent = {
2288
2480
  properties: {
2289
2481
  image: {
2290
2482
  type: "object",
2483
+ label: "Image",
2291
2484
  display: {
2292
2485
  type: "media-input",
2293
- label: "Image",
2294
2486
  minWidth: 58,
2295
2487
  maxWidth: 108
2296
2488
  },
@@ -2309,10 +2501,10 @@ const LightboxComponent = {
2309
2501
  required: ["url", "name"]
2310
2502
  },
2311
2503
  imageCaption: {
2504
+ label: "Description",
2505
+ placeholder: "Add Caption...",
2312
2506
  display: {
2313
2507
  type: "rich-text",
2314
- label: "Description",
2315
- placeholder: "Add Caption...",
2316
2508
  minWidth: 300,
2317
2509
  maxWidth: 550
2318
2510
  }