@measured/puck 0.11.0-canary.6145c32 → 0.11.0-canary.c8c02fd
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +14 -1
- package/dist/index.css +59 -32
- package/dist/index.d.ts +22 -2
- package/dist/index.js +542 -310
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1214,11 +1214,11 @@ var Button = ({
|
|
1214
1214
|
|
1215
1215
|
// components/DropZone/index.tsx
|
1216
1216
|
init_react_import();
|
1217
|
-
var
|
1217
|
+
var import_react23 = require("react");
|
1218
1218
|
|
1219
1219
|
// components/DraggableComponent/index.tsx
|
1220
1220
|
init_react_import();
|
1221
|
-
var
|
1221
|
+
var import_react20 = require("react");
|
1222
1222
|
var import_react_beautiful_dnd = require("react-beautiful-dnd");
|
1223
1223
|
|
1224
1224
|
// css-module:/home/runner/work/puck/puck/packages/core/components/DraggableComponent/styles.module.css#css-module
|
@@ -1526,7 +1526,7 @@ ChevronRight.propTypes = {
|
|
1526
1526
|
ChevronRight.displayName = "ChevronRight";
|
1527
1527
|
var chevron_right_default = ChevronRight;
|
1528
1528
|
|
1529
|
-
// ../../node_modules/react-feather/dist/icons/
|
1529
|
+
// ../../node_modules/react-feather/dist/icons/chevron-up.js
|
1530
1530
|
init_react_import();
|
1531
1531
|
var import_react7 = __toESM(require("react"));
|
1532
1532
|
var import_prop_types5 = __toESM(require_prop_types());
|
@@ -1576,7 +1576,7 @@ function _objectWithoutPropertiesLoose5(source, excluded) {
|
|
1576
1576
|
}
|
1577
1577
|
return target;
|
1578
1578
|
}
|
1579
|
-
var
|
1579
|
+
var ChevronUp = (0, import_react7.forwardRef)(function(_ref, ref) {
|
1580
1580
|
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties5(_ref, ["color", "size"]);
|
1581
1581
|
return /* @__PURE__ */ import_react7.default.createElement("svg", _extends5({
|
1582
1582
|
ref,
|
@@ -1589,25 +1589,18 @@ var Copy = (0, import_react7.forwardRef)(function(_ref, ref) {
|
|
1589
1589
|
strokeWidth: "2",
|
1590
1590
|
strokeLinecap: "round",
|
1591
1591
|
strokeLinejoin: "round"
|
1592
|
-
}, rest), /* @__PURE__ */ import_react7.default.createElement("
|
1593
|
-
|
1594
|
-
y: "9",
|
1595
|
-
width: "13",
|
1596
|
-
height: "13",
|
1597
|
-
rx: "2",
|
1598
|
-
ry: "2"
|
1599
|
-
}), /* @__PURE__ */ import_react7.default.createElement("path", {
|
1600
|
-
d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"
|
1592
|
+
}, rest), /* @__PURE__ */ import_react7.default.createElement("polyline", {
|
1593
|
+
points: "18 15 12 9 6 15"
|
1601
1594
|
}));
|
1602
1595
|
});
|
1603
|
-
|
1596
|
+
ChevronUp.propTypes = {
|
1604
1597
|
color: import_prop_types5.default.string,
|
1605
1598
|
size: import_prop_types5.default.oneOfType([import_prop_types5.default.string, import_prop_types5.default.number])
|
1606
1599
|
};
|
1607
|
-
|
1608
|
-
var
|
1600
|
+
ChevronUp.displayName = "ChevronUp";
|
1601
|
+
var chevron_up_default = ChevronUp;
|
1609
1602
|
|
1610
|
-
// ../../node_modules/react-feather/dist/icons/
|
1603
|
+
// ../../node_modules/react-feather/dist/icons/copy.js
|
1611
1604
|
init_react_import();
|
1612
1605
|
var import_react8 = __toESM(require("react"));
|
1613
1606
|
var import_prop_types6 = __toESM(require_prop_types());
|
@@ -1657,7 +1650,7 @@ function _objectWithoutPropertiesLoose6(source, excluded) {
|
|
1657
1650
|
}
|
1658
1651
|
return target;
|
1659
1652
|
}
|
1660
|
-
var
|
1653
|
+
var Copy = (0, import_react8.forwardRef)(function(_ref, ref) {
|
1661
1654
|
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties6(_ref, ["color", "size"]);
|
1662
1655
|
return /* @__PURE__ */ import_react8.default.createElement("svg", _extends6({
|
1663
1656
|
ref,
|
@@ -1670,27 +1663,25 @@ var Globe = (0, import_react8.forwardRef)(function(_ref, ref) {
|
|
1670
1663
|
strokeWidth: "2",
|
1671
1664
|
strokeLinecap: "round",
|
1672
1665
|
strokeLinejoin: "round"
|
1673
|
-
}, rest), /* @__PURE__ */ import_react8.default.createElement("
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
-
x2: "22",
|
1681
|
-
y2: "12"
|
1666
|
+
}, rest), /* @__PURE__ */ import_react8.default.createElement("rect", {
|
1667
|
+
x: "9",
|
1668
|
+
y: "9",
|
1669
|
+
width: "13",
|
1670
|
+
height: "13",
|
1671
|
+
rx: "2",
|
1672
|
+
ry: "2"
|
1682
1673
|
}), /* @__PURE__ */ import_react8.default.createElement("path", {
|
1683
|
-
d: "
|
1674
|
+
d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"
|
1684
1675
|
}));
|
1685
1676
|
});
|
1686
|
-
|
1677
|
+
Copy.propTypes = {
|
1687
1678
|
color: import_prop_types6.default.string,
|
1688
1679
|
size: import_prop_types6.default.oneOfType([import_prop_types6.default.string, import_prop_types6.default.number])
|
1689
1680
|
};
|
1690
|
-
|
1691
|
-
var
|
1681
|
+
Copy.displayName = "Copy";
|
1682
|
+
var copy_default = Copy;
|
1692
1683
|
|
1693
|
-
// ../../node_modules/react-feather/dist/icons/
|
1684
|
+
// ../../node_modules/react-feather/dist/icons/globe.js
|
1694
1685
|
init_react_import();
|
1695
1686
|
var import_react9 = __toESM(require("react"));
|
1696
1687
|
var import_prop_types7 = __toESM(require_prop_types());
|
@@ -1740,7 +1731,7 @@ function _objectWithoutPropertiesLoose7(source, excluded) {
|
|
1740
1731
|
}
|
1741
1732
|
return target;
|
1742
1733
|
}
|
1743
|
-
var
|
1734
|
+
var Globe = (0, import_react9.forwardRef)(function(_ref, ref) {
|
1744
1735
|
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties7(_ref, ["color", "size"]);
|
1745
1736
|
return /* @__PURE__ */ import_react9.default.createElement("svg", _extends7({
|
1746
1737
|
ref,
|
@@ -1753,22 +1744,105 @@ var Grid = (0, import_react9.forwardRef)(function(_ref, ref) {
|
|
1753
1744
|
strokeWidth: "2",
|
1754
1745
|
strokeLinecap: "round",
|
1755
1746
|
strokeLinejoin: "round"
|
1756
|
-
}, rest), /* @__PURE__ */ import_react9.default.createElement("
|
1747
|
+
}, rest), /* @__PURE__ */ import_react9.default.createElement("circle", {
|
1748
|
+
cx: "12",
|
1749
|
+
cy: "12",
|
1750
|
+
r: "10"
|
1751
|
+
}), /* @__PURE__ */ import_react9.default.createElement("line", {
|
1752
|
+
x1: "2",
|
1753
|
+
y1: "12",
|
1754
|
+
x2: "22",
|
1755
|
+
y2: "12"
|
1756
|
+
}), /* @__PURE__ */ import_react9.default.createElement("path", {
|
1757
|
+
d: "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"
|
1758
|
+
}));
|
1759
|
+
});
|
1760
|
+
Globe.propTypes = {
|
1761
|
+
color: import_prop_types7.default.string,
|
1762
|
+
size: import_prop_types7.default.oneOfType([import_prop_types7.default.string, import_prop_types7.default.number])
|
1763
|
+
};
|
1764
|
+
Globe.displayName = "Globe";
|
1765
|
+
var globe_default = Globe;
|
1766
|
+
|
1767
|
+
// ../../node_modules/react-feather/dist/icons/grid.js
|
1768
|
+
init_react_import();
|
1769
|
+
var import_react10 = __toESM(require("react"));
|
1770
|
+
var import_prop_types8 = __toESM(require_prop_types());
|
1771
|
+
function _extends8() {
|
1772
|
+
_extends8 = Object.assign || function(target) {
|
1773
|
+
for (var i = 1; i < arguments.length; i++) {
|
1774
|
+
var source = arguments[i];
|
1775
|
+
for (var key in source) {
|
1776
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1777
|
+
target[key] = source[key];
|
1778
|
+
}
|
1779
|
+
}
|
1780
|
+
}
|
1781
|
+
return target;
|
1782
|
+
};
|
1783
|
+
return _extends8.apply(this, arguments);
|
1784
|
+
}
|
1785
|
+
function _objectWithoutProperties8(source, excluded) {
|
1786
|
+
if (source == null)
|
1787
|
+
return {};
|
1788
|
+
var target = _objectWithoutPropertiesLoose8(source, excluded);
|
1789
|
+
var key, i;
|
1790
|
+
if (Object.getOwnPropertySymbols) {
|
1791
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
1792
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
1793
|
+
key = sourceSymbolKeys[i];
|
1794
|
+
if (excluded.indexOf(key) >= 0)
|
1795
|
+
continue;
|
1796
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
1797
|
+
continue;
|
1798
|
+
target[key] = source[key];
|
1799
|
+
}
|
1800
|
+
}
|
1801
|
+
return target;
|
1802
|
+
}
|
1803
|
+
function _objectWithoutPropertiesLoose8(source, excluded) {
|
1804
|
+
if (source == null)
|
1805
|
+
return {};
|
1806
|
+
var target = {};
|
1807
|
+
var sourceKeys = Object.keys(source);
|
1808
|
+
var key, i;
|
1809
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
1810
|
+
key = sourceKeys[i];
|
1811
|
+
if (excluded.indexOf(key) >= 0)
|
1812
|
+
continue;
|
1813
|
+
target[key] = source[key];
|
1814
|
+
}
|
1815
|
+
return target;
|
1816
|
+
}
|
1817
|
+
var Grid = (0, import_react10.forwardRef)(function(_ref, ref) {
|
1818
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties8(_ref, ["color", "size"]);
|
1819
|
+
return /* @__PURE__ */ import_react10.default.createElement("svg", _extends8({
|
1820
|
+
ref,
|
1821
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1822
|
+
width: size,
|
1823
|
+
height: size,
|
1824
|
+
viewBox: "0 0 24 24",
|
1825
|
+
fill: "none",
|
1826
|
+
stroke: color,
|
1827
|
+
strokeWidth: "2",
|
1828
|
+
strokeLinecap: "round",
|
1829
|
+
strokeLinejoin: "round"
|
1830
|
+
}, rest), /* @__PURE__ */ import_react10.default.createElement("rect", {
|
1757
1831
|
x: "3",
|
1758
1832
|
y: "3",
|
1759
1833
|
width: "7",
|
1760
1834
|
height: "7"
|
1761
|
-
}), /* @__PURE__ */
|
1835
|
+
}), /* @__PURE__ */ import_react10.default.createElement("rect", {
|
1762
1836
|
x: "14",
|
1763
1837
|
y: "3",
|
1764
1838
|
width: "7",
|
1765
1839
|
height: "7"
|
1766
|
-
}), /* @__PURE__ */
|
1840
|
+
}), /* @__PURE__ */ import_react10.default.createElement("rect", {
|
1767
1841
|
x: "14",
|
1768
1842
|
y: "14",
|
1769
1843
|
width: "7",
|
1770
1844
|
height: "7"
|
1771
|
-
}), /* @__PURE__ */
|
1845
|
+
}), /* @__PURE__ */ import_react10.default.createElement("rect", {
|
1772
1846
|
x: "3",
|
1773
1847
|
y: "14",
|
1774
1848
|
width: "7",
|
@@ -1776,18 +1850,18 @@ var Grid = (0, import_react9.forwardRef)(function(_ref, ref) {
|
|
1776
1850
|
}));
|
1777
1851
|
});
|
1778
1852
|
Grid.propTypes = {
|
1779
|
-
color:
|
1780
|
-
size:
|
1853
|
+
color: import_prop_types8.default.string,
|
1854
|
+
size: import_prop_types8.default.oneOfType([import_prop_types8.default.string, import_prop_types8.default.number])
|
1781
1855
|
};
|
1782
1856
|
Grid.displayName = "Grid";
|
1783
1857
|
var grid_default = Grid;
|
1784
1858
|
|
1785
1859
|
// ../../node_modules/react-feather/dist/icons/hash.js
|
1786
1860
|
init_react_import();
|
1787
|
-
var
|
1788
|
-
var
|
1789
|
-
function
|
1790
|
-
|
1861
|
+
var import_react11 = __toESM(require("react"));
|
1862
|
+
var import_prop_types9 = __toESM(require_prop_types());
|
1863
|
+
function _extends9() {
|
1864
|
+
_extends9 = Object.assign || function(target) {
|
1791
1865
|
for (var i = 1; i < arguments.length; i++) {
|
1792
1866
|
var source = arguments[i];
|
1793
1867
|
for (var key in source) {
|
@@ -1798,12 +1872,12 @@ function _extends8() {
|
|
1798
1872
|
}
|
1799
1873
|
return target;
|
1800
1874
|
};
|
1801
|
-
return
|
1875
|
+
return _extends9.apply(this, arguments);
|
1802
1876
|
}
|
1803
|
-
function
|
1877
|
+
function _objectWithoutProperties9(source, excluded) {
|
1804
1878
|
if (source == null)
|
1805
1879
|
return {};
|
1806
|
-
var target =
|
1880
|
+
var target = _objectWithoutPropertiesLoose9(source, excluded);
|
1807
1881
|
var key, i;
|
1808
1882
|
if (Object.getOwnPropertySymbols) {
|
1809
1883
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
@@ -1818,7 +1892,7 @@ function _objectWithoutProperties8(source, excluded) {
|
|
1818
1892
|
}
|
1819
1893
|
return target;
|
1820
1894
|
}
|
1821
|
-
function
|
1895
|
+
function _objectWithoutPropertiesLoose9(source, excluded) {
|
1822
1896
|
if (source == null)
|
1823
1897
|
return {};
|
1824
1898
|
var target = {};
|
@@ -1832,9 +1906,9 @@ function _objectWithoutPropertiesLoose8(source, excluded) {
|
|
1832
1906
|
}
|
1833
1907
|
return target;
|
1834
1908
|
}
|
1835
|
-
var Hash = (0,
|
1836
|
-
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest =
|
1837
|
-
return /* @__PURE__ */
|
1909
|
+
var Hash = (0, import_react11.forwardRef)(function(_ref, ref) {
|
1910
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties9(_ref, ["color", "size"]);
|
1911
|
+
return /* @__PURE__ */ import_react11.default.createElement("svg", _extends9({
|
1838
1912
|
ref,
|
1839
1913
|
xmlns: "http://www.w3.org/2000/svg",
|
1840
1914
|
width: size,
|
@@ -1845,22 +1919,22 @@ var Hash = (0, import_react10.forwardRef)(function(_ref, ref) {
|
|
1845
1919
|
strokeWidth: "2",
|
1846
1920
|
strokeLinecap: "round",
|
1847
1921
|
strokeLinejoin: "round"
|
1848
|
-
}, rest), /* @__PURE__ */
|
1922
|
+
}, rest), /* @__PURE__ */ import_react11.default.createElement("line", {
|
1849
1923
|
x1: "4",
|
1850
1924
|
y1: "9",
|
1851
1925
|
x2: "20",
|
1852
1926
|
y2: "9"
|
1853
|
-
}), /* @__PURE__ */
|
1927
|
+
}), /* @__PURE__ */ import_react11.default.createElement("line", {
|
1854
1928
|
x1: "4",
|
1855
1929
|
y1: "15",
|
1856
1930
|
x2: "20",
|
1857
1931
|
y2: "15"
|
1858
|
-
}), /* @__PURE__ */
|
1932
|
+
}), /* @__PURE__ */ import_react11.default.createElement("line", {
|
1859
1933
|
x1: "10",
|
1860
1934
|
y1: "3",
|
1861
1935
|
x2: "8",
|
1862
1936
|
y2: "21"
|
1863
|
-
}), /* @__PURE__ */
|
1937
|
+
}), /* @__PURE__ */ import_react11.default.createElement("line", {
|
1864
1938
|
x1: "16",
|
1865
1939
|
y1: "3",
|
1866
1940
|
x2: "14",
|
@@ -1868,18 +1942,18 @@ var Hash = (0, import_react10.forwardRef)(function(_ref, ref) {
|
|
1868
1942
|
}));
|
1869
1943
|
});
|
1870
1944
|
Hash.propTypes = {
|
1871
|
-
color:
|
1872
|
-
size:
|
1945
|
+
color: import_prop_types9.default.string,
|
1946
|
+
size: import_prop_types9.default.oneOfType([import_prop_types9.default.string, import_prop_types9.default.number])
|
1873
1947
|
};
|
1874
1948
|
Hash.displayName = "Hash";
|
1875
1949
|
var hash_default = Hash;
|
1876
1950
|
|
1877
1951
|
// ../../node_modules/react-feather/dist/icons/layers.js
|
1878
1952
|
init_react_import();
|
1879
|
-
var
|
1880
|
-
var
|
1881
|
-
function
|
1882
|
-
|
1953
|
+
var import_react12 = __toESM(require("react"));
|
1954
|
+
var import_prop_types10 = __toESM(require_prop_types());
|
1955
|
+
function _extends10() {
|
1956
|
+
_extends10 = Object.assign || function(target) {
|
1883
1957
|
for (var i = 1; i < arguments.length; i++) {
|
1884
1958
|
var source = arguments[i];
|
1885
1959
|
for (var key in source) {
|
@@ -1890,12 +1964,12 @@ function _extends9() {
|
|
1890
1964
|
}
|
1891
1965
|
return target;
|
1892
1966
|
};
|
1893
|
-
return
|
1967
|
+
return _extends10.apply(this, arguments);
|
1894
1968
|
}
|
1895
|
-
function
|
1969
|
+
function _objectWithoutProperties10(source, excluded) {
|
1896
1970
|
if (source == null)
|
1897
1971
|
return {};
|
1898
|
-
var target =
|
1972
|
+
var target = _objectWithoutPropertiesLoose10(source, excluded);
|
1899
1973
|
var key, i;
|
1900
1974
|
if (Object.getOwnPropertySymbols) {
|
1901
1975
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
@@ -1910,7 +1984,7 @@ function _objectWithoutProperties9(source, excluded) {
|
|
1910
1984
|
}
|
1911
1985
|
return target;
|
1912
1986
|
}
|
1913
|
-
function
|
1987
|
+
function _objectWithoutPropertiesLoose10(source, excluded) {
|
1914
1988
|
if (source == null)
|
1915
1989
|
return {};
|
1916
1990
|
var target = {};
|
@@ -1924,9 +1998,9 @@ function _objectWithoutPropertiesLoose9(source, excluded) {
|
|
1924
1998
|
}
|
1925
1999
|
return target;
|
1926
2000
|
}
|
1927
|
-
var Layers = (0,
|
1928
|
-
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest =
|
1929
|
-
return /* @__PURE__ */
|
2001
|
+
var Layers = (0, import_react12.forwardRef)(function(_ref, ref) {
|
2002
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties10(_ref, ["color", "size"]);
|
2003
|
+
return /* @__PURE__ */ import_react12.default.createElement("svg", _extends10({
|
1930
2004
|
ref,
|
1931
2005
|
xmlns: "http://www.w3.org/2000/svg",
|
1932
2006
|
width: size,
|
@@ -1937,27 +2011,27 @@ var Layers = (0, import_react11.forwardRef)(function(_ref, ref) {
|
|
1937
2011
|
strokeWidth: "2",
|
1938
2012
|
strokeLinecap: "round",
|
1939
2013
|
strokeLinejoin: "round"
|
1940
|
-
}, rest), /* @__PURE__ */
|
2014
|
+
}, rest), /* @__PURE__ */ import_react12.default.createElement("polygon", {
|
1941
2015
|
points: "12 2 2 7 12 12 22 7 12 2"
|
1942
|
-
}), /* @__PURE__ */
|
2016
|
+
}), /* @__PURE__ */ import_react12.default.createElement("polyline", {
|
1943
2017
|
points: "2 17 12 22 22 17"
|
1944
|
-
}), /* @__PURE__ */
|
2018
|
+
}), /* @__PURE__ */ import_react12.default.createElement("polyline", {
|
1945
2019
|
points: "2 12 12 17 22 12"
|
1946
2020
|
}));
|
1947
2021
|
});
|
1948
2022
|
Layers.propTypes = {
|
1949
|
-
color:
|
1950
|
-
size:
|
2023
|
+
color: import_prop_types10.default.string,
|
2024
|
+
size: import_prop_types10.default.oneOfType([import_prop_types10.default.string, import_prop_types10.default.number])
|
1951
2025
|
};
|
1952
2026
|
Layers.displayName = "Layers";
|
1953
2027
|
var layers_default = Layers;
|
1954
2028
|
|
1955
2029
|
// ../../node_modules/react-feather/dist/icons/link.js
|
1956
2030
|
init_react_import();
|
1957
|
-
var
|
1958
|
-
var
|
1959
|
-
function
|
1960
|
-
|
2031
|
+
var import_react13 = __toESM(require("react"));
|
2032
|
+
var import_prop_types11 = __toESM(require_prop_types());
|
2033
|
+
function _extends11() {
|
2034
|
+
_extends11 = Object.assign || function(target) {
|
1961
2035
|
for (var i = 1; i < arguments.length; i++) {
|
1962
2036
|
var source = arguments[i];
|
1963
2037
|
for (var key in source) {
|
@@ -1968,12 +2042,12 @@ function _extends10() {
|
|
1968
2042
|
}
|
1969
2043
|
return target;
|
1970
2044
|
};
|
1971
|
-
return
|
2045
|
+
return _extends11.apply(this, arguments);
|
1972
2046
|
}
|
1973
|
-
function
|
2047
|
+
function _objectWithoutProperties11(source, excluded) {
|
1974
2048
|
if (source == null)
|
1975
2049
|
return {};
|
1976
|
-
var target =
|
2050
|
+
var target = _objectWithoutPropertiesLoose11(source, excluded);
|
1977
2051
|
var key, i;
|
1978
2052
|
if (Object.getOwnPropertySymbols) {
|
1979
2053
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
@@ -1988,7 +2062,7 @@ function _objectWithoutProperties10(source, excluded) {
|
|
1988
2062
|
}
|
1989
2063
|
return target;
|
1990
2064
|
}
|
1991
|
-
function
|
2065
|
+
function _objectWithoutPropertiesLoose11(source, excluded) {
|
1992
2066
|
if (source == null)
|
1993
2067
|
return {};
|
1994
2068
|
var target = {};
|
@@ -2002,9 +2076,9 @@ function _objectWithoutPropertiesLoose10(source, excluded) {
|
|
2002
2076
|
}
|
2003
2077
|
return target;
|
2004
2078
|
}
|
2005
|
-
var Link = (0,
|
2006
|
-
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest =
|
2007
|
-
return /* @__PURE__ */
|
2079
|
+
var Link = (0, import_react13.forwardRef)(function(_ref, ref) {
|
2080
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties11(_ref, ["color", "size"]);
|
2081
|
+
return /* @__PURE__ */ import_react13.default.createElement("svg", _extends11({
|
2008
2082
|
ref,
|
2009
2083
|
xmlns: "http://www.w3.org/2000/svg",
|
2010
2084
|
width: size,
|
@@ -2015,25 +2089,25 @@ var Link = (0, import_react12.forwardRef)(function(_ref, ref) {
|
|
2015
2089
|
strokeWidth: "2",
|
2016
2090
|
strokeLinecap: "round",
|
2017
2091
|
strokeLinejoin: "round"
|
2018
|
-
}, rest), /* @__PURE__ */
|
2092
|
+
}, rest), /* @__PURE__ */ import_react13.default.createElement("path", {
|
2019
2093
|
d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"
|
2020
|
-
}), /* @__PURE__ */
|
2094
|
+
}), /* @__PURE__ */ import_react13.default.createElement("path", {
|
2021
2095
|
d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
|
2022
2096
|
}));
|
2023
2097
|
});
|
2024
2098
|
Link.propTypes = {
|
2025
|
-
color:
|
2026
|
-
size:
|
2099
|
+
color: import_prop_types11.default.string,
|
2100
|
+
size: import_prop_types11.default.oneOfType([import_prop_types11.default.string, import_prop_types11.default.number])
|
2027
2101
|
};
|
2028
2102
|
Link.displayName = "Link";
|
2029
2103
|
var link_default = Link;
|
2030
2104
|
|
2031
2105
|
// ../../node_modules/react-feather/dist/icons/list.js
|
2032
2106
|
init_react_import();
|
2033
|
-
var
|
2034
|
-
var
|
2035
|
-
function
|
2036
|
-
|
2107
|
+
var import_react14 = __toESM(require("react"));
|
2108
|
+
var import_prop_types12 = __toESM(require_prop_types());
|
2109
|
+
function _extends12() {
|
2110
|
+
_extends12 = Object.assign || function(target) {
|
2037
2111
|
for (var i = 1; i < arguments.length; i++) {
|
2038
2112
|
var source = arguments[i];
|
2039
2113
|
for (var key in source) {
|
@@ -2044,12 +2118,12 @@ function _extends11() {
|
|
2044
2118
|
}
|
2045
2119
|
return target;
|
2046
2120
|
};
|
2047
|
-
return
|
2121
|
+
return _extends12.apply(this, arguments);
|
2048
2122
|
}
|
2049
|
-
function
|
2123
|
+
function _objectWithoutProperties12(source, excluded) {
|
2050
2124
|
if (source == null)
|
2051
2125
|
return {};
|
2052
|
-
var target =
|
2126
|
+
var target = _objectWithoutPropertiesLoose12(source, excluded);
|
2053
2127
|
var key, i;
|
2054
2128
|
if (Object.getOwnPropertySymbols) {
|
2055
2129
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
@@ -2064,7 +2138,7 @@ function _objectWithoutProperties11(source, excluded) {
|
|
2064
2138
|
}
|
2065
2139
|
return target;
|
2066
2140
|
}
|
2067
|
-
function
|
2141
|
+
function _objectWithoutPropertiesLoose12(source, excluded) {
|
2068
2142
|
if (source == null)
|
2069
2143
|
return {};
|
2070
2144
|
var target = {};
|
@@ -2078,9 +2152,9 @@ function _objectWithoutPropertiesLoose11(source, excluded) {
|
|
2078
2152
|
}
|
2079
2153
|
return target;
|
2080
2154
|
}
|
2081
|
-
var List = (0,
|
2082
|
-
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest =
|
2083
|
-
return /* @__PURE__ */
|
2155
|
+
var List = (0, import_react14.forwardRef)(function(_ref, ref) {
|
2156
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties12(_ref, ["color", "size"]);
|
2157
|
+
return /* @__PURE__ */ import_react14.default.createElement("svg", _extends12({
|
2084
2158
|
ref,
|
2085
2159
|
xmlns: "http://www.w3.org/2000/svg",
|
2086
2160
|
width: size,
|
@@ -2091,32 +2165,32 @@ var List = (0, import_react13.forwardRef)(function(_ref, ref) {
|
|
2091
2165
|
strokeWidth: "2",
|
2092
2166
|
strokeLinecap: "round",
|
2093
2167
|
strokeLinejoin: "round"
|
2094
|
-
}, rest), /* @__PURE__ */
|
2168
|
+
}, rest), /* @__PURE__ */ import_react14.default.createElement("line", {
|
2095
2169
|
x1: "8",
|
2096
2170
|
y1: "6",
|
2097
2171
|
x2: "21",
|
2098
2172
|
y2: "6"
|
2099
|
-
}), /* @__PURE__ */
|
2173
|
+
}), /* @__PURE__ */ import_react14.default.createElement("line", {
|
2100
2174
|
x1: "8",
|
2101
2175
|
y1: "12",
|
2102
2176
|
x2: "21",
|
2103
2177
|
y2: "12"
|
2104
|
-
}), /* @__PURE__ */
|
2178
|
+
}), /* @__PURE__ */ import_react14.default.createElement("line", {
|
2105
2179
|
x1: "8",
|
2106
2180
|
y1: "18",
|
2107
2181
|
x2: "21",
|
2108
2182
|
y2: "18"
|
2109
|
-
}), /* @__PURE__ */
|
2183
|
+
}), /* @__PURE__ */ import_react14.default.createElement("line", {
|
2110
2184
|
x1: "3",
|
2111
2185
|
y1: "6",
|
2112
2186
|
x2: "3.01",
|
2113
2187
|
y2: "6"
|
2114
|
-
}), /* @__PURE__ */
|
2188
|
+
}), /* @__PURE__ */ import_react14.default.createElement("line", {
|
2115
2189
|
x1: "3",
|
2116
2190
|
y1: "12",
|
2117
2191
|
x2: "3.01",
|
2118
2192
|
y2: "12"
|
2119
|
-
}), /* @__PURE__ */
|
2193
|
+
}), /* @__PURE__ */ import_react14.default.createElement("line", {
|
2120
2194
|
x1: "3",
|
2121
2195
|
y1: "18",
|
2122
2196
|
x2: "3.01",
|
@@ -2124,18 +2198,18 @@ var List = (0, import_react13.forwardRef)(function(_ref, ref) {
|
|
2124
2198
|
}));
|
2125
2199
|
});
|
2126
2200
|
List.propTypes = {
|
2127
|
-
color:
|
2128
|
-
size:
|
2201
|
+
color: import_prop_types12.default.string,
|
2202
|
+
size: import_prop_types12.default.oneOfType([import_prop_types12.default.string, import_prop_types12.default.number])
|
2129
2203
|
};
|
2130
2204
|
List.displayName = "List";
|
2131
2205
|
var list_default = List;
|
2132
2206
|
|
2133
2207
|
// ../../node_modules/react-feather/dist/icons/plus.js
|
2134
2208
|
init_react_import();
|
2135
|
-
var
|
2136
|
-
var
|
2137
|
-
function
|
2138
|
-
|
2209
|
+
var import_react15 = __toESM(require("react"));
|
2210
|
+
var import_prop_types13 = __toESM(require_prop_types());
|
2211
|
+
function _extends13() {
|
2212
|
+
_extends13 = Object.assign || function(target) {
|
2139
2213
|
for (var i = 1; i < arguments.length; i++) {
|
2140
2214
|
var source = arguments[i];
|
2141
2215
|
for (var key in source) {
|
@@ -2146,12 +2220,12 @@ function _extends12() {
|
|
2146
2220
|
}
|
2147
2221
|
return target;
|
2148
2222
|
};
|
2149
|
-
return
|
2223
|
+
return _extends13.apply(this, arguments);
|
2150
2224
|
}
|
2151
|
-
function
|
2225
|
+
function _objectWithoutProperties13(source, excluded) {
|
2152
2226
|
if (source == null)
|
2153
2227
|
return {};
|
2154
|
-
var target =
|
2228
|
+
var target = _objectWithoutPropertiesLoose13(source, excluded);
|
2155
2229
|
var key, i;
|
2156
2230
|
if (Object.getOwnPropertySymbols) {
|
2157
2231
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
@@ -2166,7 +2240,7 @@ function _objectWithoutProperties12(source, excluded) {
|
|
2166
2240
|
}
|
2167
2241
|
return target;
|
2168
2242
|
}
|
2169
|
-
function
|
2243
|
+
function _objectWithoutPropertiesLoose13(source, excluded) {
|
2170
2244
|
if (source == null)
|
2171
2245
|
return {};
|
2172
2246
|
var target = {};
|
@@ -2180,9 +2254,9 @@ function _objectWithoutPropertiesLoose12(source, excluded) {
|
|
2180
2254
|
}
|
2181
2255
|
return target;
|
2182
2256
|
}
|
2183
|
-
var Plus = (0,
|
2184
|
-
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest =
|
2185
|
-
return /* @__PURE__ */
|
2257
|
+
var Plus = (0, import_react15.forwardRef)(function(_ref, ref) {
|
2258
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties13(_ref, ["color", "size"]);
|
2259
|
+
return /* @__PURE__ */ import_react15.default.createElement("svg", _extends13({
|
2186
2260
|
ref,
|
2187
2261
|
xmlns: "http://www.w3.org/2000/svg",
|
2188
2262
|
width: size,
|
@@ -2193,12 +2267,12 @@ var Plus = (0, import_react14.forwardRef)(function(_ref, ref) {
|
|
2193
2267
|
strokeWidth: "2",
|
2194
2268
|
strokeLinecap: "round",
|
2195
2269
|
strokeLinejoin: "round"
|
2196
|
-
}, rest), /* @__PURE__ */
|
2270
|
+
}, rest), /* @__PURE__ */ import_react15.default.createElement("line", {
|
2197
2271
|
x1: "12",
|
2198
2272
|
y1: "5",
|
2199
2273
|
x2: "12",
|
2200
2274
|
y2: "19"
|
2201
|
-
}), /* @__PURE__ */
|
2275
|
+
}), /* @__PURE__ */ import_react15.default.createElement("line", {
|
2202
2276
|
x1: "5",
|
2203
2277
|
y1: "12",
|
2204
2278
|
x2: "19",
|
@@ -2206,18 +2280,18 @@ var Plus = (0, import_react14.forwardRef)(function(_ref, ref) {
|
|
2206
2280
|
}));
|
2207
2281
|
});
|
2208
2282
|
Plus.propTypes = {
|
2209
|
-
color:
|
2210
|
-
size:
|
2283
|
+
color: import_prop_types13.default.string,
|
2284
|
+
size: import_prop_types13.default.oneOfType([import_prop_types13.default.string, import_prop_types13.default.number])
|
2211
2285
|
};
|
2212
2286
|
Plus.displayName = "Plus";
|
2213
2287
|
var plus_default = Plus;
|
2214
2288
|
|
2215
2289
|
// ../../node_modules/react-feather/dist/icons/sidebar.js
|
2216
2290
|
init_react_import();
|
2217
|
-
var
|
2218
|
-
var
|
2219
|
-
function
|
2220
|
-
|
2291
|
+
var import_react16 = __toESM(require("react"));
|
2292
|
+
var import_prop_types14 = __toESM(require_prop_types());
|
2293
|
+
function _extends14() {
|
2294
|
+
_extends14 = Object.assign || function(target) {
|
2221
2295
|
for (var i = 1; i < arguments.length; i++) {
|
2222
2296
|
var source = arguments[i];
|
2223
2297
|
for (var key in source) {
|
@@ -2228,12 +2302,12 @@ function _extends13() {
|
|
2228
2302
|
}
|
2229
2303
|
return target;
|
2230
2304
|
};
|
2231
|
-
return
|
2305
|
+
return _extends14.apply(this, arguments);
|
2232
2306
|
}
|
2233
|
-
function
|
2307
|
+
function _objectWithoutProperties14(source, excluded) {
|
2234
2308
|
if (source == null)
|
2235
2309
|
return {};
|
2236
|
-
var target =
|
2310
|
+
var target = _objectWithoutPropertiesLoose14(source, excluded);
|
2237
2311
|
var key, i;
|
2238
2312
|
if (Object.getOwnPropertySymbols) {
|
2239
2313
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
@@ -2248,7 +2322,7 @@ function _objectWithoutProperties13(source, excluded) {
|
|
2248
2322
|
}
|
2249
2323
|
return target;
|
2250
2324
|
}
|
2251
|
-
function
|
2325
|
+
function _objectWithoutPropertiesLoose14(source, excluded) {
|
2252
2326
|
if (source == null)
|
2253
2327
|
return {};
|
2254
2328
|
var target = {};
|
@@ -2262,9 +2336,9 @@ function _objectWithoutPropertiesLoose13(source, excluded) {
|
|
2262
2336
|
}
|
2263
2337
|
return target;
|
2264
2338
|
}
|
2265
|
-
var Sidebar = (0,
|
2266
|
-
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest =
|
2267
|
-
return /* @__PURE__ */
|
2339
|
+
var Sidebar = (0, import_react16.forwardRef)(function(_ref, ref) {
|
2340
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties14(_ref, ["color", "size"]);
|
2341
|
+
return /* @__PURE__ */ import_react16.default.createElement("svg", _extends14({
|
2268
2342
|
ref,
|
2269
2343
|
xmlns: "http://www.w3.org/2000/svg",
|
2270
2344
|
width: size,
|
@@ -2275,14 +2349,14 @@ var Sidebar = (0, import_react15.forwardRef)(function(_ref, ref) {
|
|
2275
2349
|
strokeWidth: "2",
|
2276
2350
|
strokeLinecap: "round",
|
2277
2351
|
strokeLinejoin: "round"
|
2278
|
-
}, rest), /* @__PURE__ */
|
2352
|
+
}, rest), /* @__PURE__ */ import_react16.default.createElement("rect", {
|
2279
2353
|
x: "3",
|
2280
2354
|
y: "3",
|
2281
2355
|
width: "18",
|
2282
2356
|
height: "18",
|
2283
2357
|
rx: "2",
|
2284
2358
|
ry: "2"
|
2285
|
-
}), /* @__PURE__ */
|
2359
|
+
}), /* @__PURE__ */ import_react16.default.createElement("line", {
|
2286
2360
|
x1: "9",
|
2287
2361
|
y1: "3",
|
2288
2362
|
x2: "9",
|
@@ -2290,18 +2364,18 @@ var Sidebar = (0, import_react15.forwardRef)(function(_ref, ref) {
|
|
2290
2364
|
}));
|
2291
2365
|
});
|
2292
2366
|
Sidebar.propTypes = {
|
2293
|
-
color:
|
2294
|
-
size:
|
2367
|
+
color: import_prop_types14.default.string,
|
2368
|
+
size: import_prop_types14.default.oneOfType([import_prop_types14.default.string, import_prop_types14.default.number])
|
2295
2369
|
};
|
2296
2370
|
Sidebar.displayName = "Sidebar";
|
2297
2371
|
var sidebar_default = Sidebar;
|
2298
2372
|
|
2299
2373
|
// ../../node_modules/react-feather/dist/icons/trash.js
|
2300
2374
|
init_react_import();
|
2301
|
-
var
|
2302
|
-
var
|
2303
|
-
function
|
2304
|
-
|
2375
|
+
var import_react17 = __toESM(require("react"));
|
2376
|
+
var import_prop_types15 = __toESM(require_prop_types());
|
2377
|
+
function _extends15() {
|
2378
|
+
_extends15 = Object.assign || function(target) {
|
2305
2379
|
for (var i = 1; i < arguments.length; i++) {
|
2306
2380
|
var source = arguments[i];
|
2307
2381
|
for (var key in source) {
|
@@ -2312,12 +2386,12 @@ function _extends14() {
|
|
2312
2386
|
}
|
2313
2387
|
return target;
|
2314
2388
|
};
|
2315
|
-
return
|
2389
|
+
return _extends15.apply(this, arguments);
|
2316
2390
|
}
|
2317
|
-
function
|
2391
|
+
function _objectWithoutProperties15(source, excluded) {
|
2318
2392
|
if (source == null)
|
2319
2393
|
return {};
|
2320
|
-
var target =
|
2394
|
+
var target = _objectWithoutPropertiesLoose15(source, excluded);
|
2321
2395
|
var key, i;
|
2322
2396
|
if (Object.getOwnPropertySymbols) {
|
2323
2397
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
@@ -2332,7 +2406,7 @@ function _objectWithoutProperties14(source, excluded) {
|
|
2332
2406
|
}
|
2333
2407
|
return target;
|
2334
2408
|
}
|
2335
|
-
function
|
2409
|
+
function _objectWithoutPropertiesLoose15(source, excluded) {
|
2336
2410
|
if (source == null)
|
2337
2411
|
return {};
|
2338
2412
|
var target = {};
|
@@ -2346,9 +2420,9 @@ function _objectWithoutPropertiesLoose14(source, excluded) {
|
|
2346
2420
|
}
|
2347
2421
|
return target;
|
2348
2422
|
}
|
2349
|
-
var Trash = (0,
|
2350
|
-
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest =
|
2351
|
-
return /* @__PURE__ */
|
2423
|
+
var Trash = (0, import_react17.forwardRef)(function(_ref, ref) {
|
2424
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties15(_ref, ["color", "size"]);
|
2425
|
+
return /* @__PURE__ */ import_react17.default.createElement("svg", _extends15({
|
2352
2426
|
ref,
|
2353
2427
|
xmlns: "http://www.w3.org/2000/svg",
|
2354
2428
|
width: size,
|
@@ -2359,25 +2433,25 @@ var Trash = (0, import_react16.forwardRef)(function(_ref, ref) {
|
|
2359
2433
|
strokeWidth: "2",
|
2360
2434
|
strokeLinecap: "round",
|
2361
2435
|
strokeLinejoin: "round"
|
2362
|
-
}, rest), /* @__PURE__ */
|
2436
|
+
}, rest), /* @__PURE__ */ import_react17.default.createElement("polyline", {
|
2363
2437
|
points: "3 6 5 6 21 6"
|
2364
|
-
}), /* @__PURE__ */
|
2438
|
+
}), /* @__PURE__ */ import_react17.default.createElement("path", {
|
2365
2439
|
d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
|
2366
2440
|
}));
|
2367
2441
|
});
|
2368
2442
|
Trash.propTypes = {
|
2369
|
-
color:
|
2370
|
-
size:
|
2443
|
+
color: import_prop_types15.default.string,
|
2444
|
+
size: import_prop_types15.default.oneOfType([import_prop_types15.default.string, import_prop_types15.default.number])
|
2371
2445
|
};
|
2372
2446
|
Trash.displayName = "Trash";
|
2373
2447
|
var trash_default = Trash;
|
2374
2448
|
|
2375
2449
|
// ../../node_modules/react-feather/dist/icons/type.js
|
2376
2450
|
init_react_import();
|
2377
|
-
var
|
2378
|
-
var
|
2379
|
-
function
|
2380
|
-
|
2451
|
+
var import_react18 = __toESM(require("react"));
|
2452
|
+
var import_prop_types16 = __toESM(require_prop_types());
|
2453
|
+
function _extends16() {
|
2454
|
+
_extends16 = Object.assign || function(target) {
|
2381
2455
|
for (var i = 1; i < arguments.length; i++) {
|
2382
2456
|
var source = arguments[i];
|
2383
2457
|
for (var key in source) {
|
@@ -2388,12 +2462,12 @@ function _extends15() {
|
|
2388
2462
|
}
|
2389
2463
|
return target;
|
2390
2464
|
};
|
2391
|
-
return
|
2465
|
+
return _extends16.apply(this, arguments);
|
2392
2466
|
}
|
2393
|
-
function
|
2467
|
+
function _objectWithoutProperties16(source, excluded) {
|
2394
2468
|
if (source == null)
|
2395
2469
|
return {};
|
2396
|
-
var target =
|
2470
|
+
var target = _objectWithoutPropertiesLoose16(source, excluded);
|
2397
2471
|
var key, i;
|
2398
2472
|
if (Object.getOwnPropertySymbols) {
|
2399
2473
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
@@ -2408,7 +2482,7 @@ function _objectWithoutProperties15(source, excluded) {
|
|
2408
2482
|
}
|
2409
2483
|
return target;
|
2410
2484
|
}
|
2411
|
-
function
|
2485
|
+
function _objectWithoutPropertiesLoose16(source, excluded) {
|
2412
2486
|
if (source == null)
|
2413
2487
|
return {};
|
2414
2488
|
var target = {};
|
@@ -2422,9 +2496,9 @@ function _objectWithoutPropertiesLoose15(source, excluded) {
|
|
2422
2496
|
}
|
2423
2497
|
return target;
|
2424
2498
|
}
|
2425
|
-
var Type = (0,
|
2426
|
-
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest =
|
2427
|
-
return /* @__PURE__ */
|
2499
|
+
var Type = (0, import_react18.forwardRef)(function(_ref, ref) {
|
2500
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties16(_ref, ["color", "size"]);
|
2501
|
+
return /* @__PURE__ */ import_react18.default.createElement("svg", _extends16({
|
2428
2502
|
ref,
|
2429
2503
|
xmlns: "http://www.w3.org/2000/svg",
|
2430
2504
|
width: size,
|
@@ -2435,14 +2509,14 @@ var Type = (0, import_react17.forwardRef)(function(_ref, ref) {
|
|
2435
2509
|
strokeWidth: "2",
|
2436
2510
|
strokeLinecap: "round",
|
2437
2511
|
strokeLinejoin: "round"
|
2438
|
-
}, rest), /* @__PURE__ */
|
2512
|
+
}, rest), /* @__PURE__ */ import_react18.default.createElement("polyline", {
|
2439
2513
|
points: "4 7 4 4 20 4 20 7"
|
2440
|
-
}), /* @__PURE__ */
|
2514
|
+
}), /* @__PURE__ */ import_react18.default.createElement("line", {
|
2441
2515
|
x1: "9",
|
2442
2516
|
y1: "20",
|
2443
2517
|
x2: "15",
|
2444
2518
|
y2: "20"
|
2445
|
-
}), /* @__PURE__ */
|
2519
|
+
}), /* @__PURE__ */ import_react18.default.createElement("line", {
|
2446
2520
|
x1: "12",
|
2447
2521
|
y1: "4",
|
2448
2522
|
x2: "12",
|
@@ -2450,18 +2524,18 @@ var Type = (0, import_react17.forwardRef)(function(_ref, ref) {
|
|
2450
2524
|
}));
|
2451
2525
|
});
|
2452
2526
|
Type.propTypes = {
|
2453
|
-
color:
|
2454
|
-
size:
|
2527
|
+
color: import_prop_types16.default.string,
|
2528
|
+
size: import_prop_types16.default.oneOfType([import_prop_types16.default.string, import_prop_types16.default.number])
|
2455
2529
|
};
|
2456
2530
|
Type.displayName = "Type";
|
2457
2531
|
var type_default = Type;
|
2458
2532
|
|
2459
2533
|
// lib/use-modifier-held.ts
|
2460
2534
|
init_react_import();
|
2461
|
-
var
|
2535
|
+
var import_react19 = require("react");
|
2462
2536
|
var useModifierHeld = (modifier) => {
|
2463
|
-
const [modifierHeld, setModifierHeld] = (0,
|
2464
|
-
(0,
|
2537
|
+
const [modifierHeld, setModifierHeld] = (0, import_react19.useState)(false);
|
2538
|
+
(0, import_react19.useEffect)(() => {
|
2465
2539
|
function downHandler({ key }) {
|
2466
2540
|
if (key === modifier) {
|
2467
2541
|
setModifierHeld(true);
|
@@ -2505,7 +2579,7 @@ var DraggableComponent = ({
|
|
2505
2579
|
style
|
2506
2580
|
}) => {
|
2507
2581
|
const isModifierHeld = useModifierHeld("Alt");
|
2508
|
-
(0,
|
2582
|
+
(0, import_react20.useEffect)(onMount, []);
|
2509
2583
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
2510
2584
|
import_react_beautiful_dnd.Draggable,
|
2511
2585
|
{
|
@@ -2549,13 +2623,13 @@ var DraggableComponent = ({
|
|
2549
2623
|
|
2550
2624
|
// components/DroppableStrictMode/index.tsx
|
2551
2625
|
init_react_import();
|
2552
|
-
var
|
2626
|
+
var import_react21 = require("react");
|
2553
2627
|
var import_react_beautiful_dnd2 = require("react-beautiful-dnd");
|
2554
2628
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
2555
2629
|
var DroppableStrictMode = (_a) => {
|
2556
2630
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
2557
|
-
const [enabled, setEnabled] = (0,
|
2558
|
-
(0,
|
2631
|
+
const [enabled, setEnabled] = (0, import_react21.useState)(false);
|
2632
|
+
(0, import_react21.useEffect)(() => {
|
2559
2633
|
const animation = requestAnimationFrame(() => setEnabled(true));
|
2560
2634
|
return () => {
|
2561
2635
|
cancelAnimationFrame(animation);
|
@@ -2634,7 +2708,7 @@ var styles_module_default2 = { "DropZone": "_DropZone_ou0z5_1", "DropZone-conten
|
|
2634
2708
|
|
2635
2709
|
// components/DropZone/context.tsx
|
2636
2710
|
init_react_import();
|
2637
|
-
var
|
2711
|
+
var import_react22 = require("react");
|
2638
2712
|
var import_use_debounce = require("use-debounce");
|
2639
2713
|
|
2640
2714
|
// lib/get-zone-id.ts
|
@@ -2651,29 +2725,29 @@ var getZoneId = (zoneCompound) => {
|
|
2651
2725
|
|
2652
2726
|
// components/DropZone/context.tsx
|
2653
2727
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
2654
|
-
var dropZoneContext = (0,
|
2728
|
+
var dropZoneContext = (0, import_react22.createContext)(null);
|
2655
2729
|
var DropZoneProvider = ({
|
2656
2730
|
children,
|
2657
2731
|
value
|
2658
2732
|
}) => {
|
2659
|
-
const [hoveringArea, setHoveringArea] = (0,
|
2660
|
-
const [hoveringZone, setHoveringZone] = (0,
|
2733
|
+
const [hoveringArea, setHoveringArea] = (0, import_react22.useState)(null);
|
2734
|
+
const [hoveringZone, setHoveringZone] = (0, import_react22.useState)(
|
2661
2735
|
rootDroppableId
|
2662
2736
|
);
|
2663
|
-
const [hoveringComponent, setHoveringComponent] = (0,
|
2737
|
+
const [hoveringComponent, setHoveringComponent] = (0, import_react22.useState)();
|
2664
2738
|
const [hoveringAreaDb] = (0, import_use_debounce.useDebounce)(hoveringArea, 75, { leading: false });
|
2665
|
-
const [areasWithZones, setAreasWithZones] = (0,
|
2739
|
+
const [areasWithZones, setAreasWithZones] = (0, import_react22.useState)(
|
2666
2740
|
{}
|
2667
2741
|
);
|
2668
|
-
const [activeZones, setActiveZones] = (0,
|
2742
|
+
const [activeZones, setActiveZones] = (0, import_react22.useState)({});
|
2669
2743
|
const { dispatch = null } = value ? value : {};
|
2670
|
-
const registerZoneArea = (0,
|
2744
|
+
const registerZoneArea = (0, import_react22.useCallback)(
|
2671
2745
|
(area) => {
|
2672
2746
|
setAreasWithZones((latest) => __spreadProps(__spreadValues({}, latest), { [area]: true }));
|
2673
2747
|
},
|
2674
2748
|
[setAreasWithZones]
|
2675
2749
|
);
|
2676
|
-
const registerZone = (0,
|
2750
|
+
const registerZone = (0, import_react22.useCallback)(
|
2677
2751
|
(zoneCompound) => {
|
2678
2752
|
if (!dispatch) {
|
2679
2753
|
return;
|
@@ -2686,7 +2760,7 @@ var DropZoneProvider = ({
|
|
2686
2760
|
},
|
2687
2761
|
[setActiveZones, dispatch]
|
2688
2762
|
);
|
2689
|
-
const unregisterZone = (0,
|
2763
|
+
const unregisterZone = (0, import_react22.useCallback)(
|
2690
2764
|
(zoneCompound) => {
|
2691
2765
|
if (!dispatch) {
|
2692
2766
|
return;
|
@@ -2701,8 +2775,8 @@ var DropZoneProvider = ({
|
|
2701
2775
|
},
|
2702
2776
|
[setActiveZones, dispatch]
|
2703
2777
|
);
|
2704
|
-
const [pathData, setPathData] = (0,
|
2705
|
-
const registerPath = (0,
|
2778
|
+
const [pathData, setPathData] = (0, import_react22.useState)();
|
2779
|
+
const registerPath = (0, import_react22.useCallback)(
|
2706
2780
|
(selector) => {
|
2707
2781
|
if (!(value == null ? void 0 : value.data)) {
|
2708
2782
|
return;
|
@@ -2755,7 +2829,7 @@ var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
2755
2829
|
var getClassName3 = get_class_name_factory_default("DropZone", styles_module_default2);
|
2756
2830
|
function DropZoneEdit({ zone, style }) {
|
2757
2831
|
var _a;
|
2758
|
-
const ctx = (0,
|
2832
|
+
const ctx = (0, import_react23.useContext)(dropZoneContext);
|
2759
2833
|
const {
|
2760
2834
|
// These all need setting via context
|
2761
2835
|
data,
|
@@ -2772,12 +2846,12 @@ function DropZoneEdit({ zone, style }) {
|
|
2772
2846
|
} = ctx || {};
|
2773
2847
|
let content = data.content || [];
|
2774
2848
|
let zoneCompound = rootDroppableId;
|
2775
|
-
(0,
|
2849
|
+
(0, import_react23.useEffect)(() => {
|
2776
2850
|
if (areaId && registerZoneArea) {
|
2777
2851
|
registerZoneArea(areaId);
|
2778
2852
|
}
|
2779
2853
|
}, [areaId]);
|
2780
|
-
(0,
|
2854
|
+
(0, import_react23.useEffect)(() => {
|
2781
2855
|
if (ctx == null ? void 0 : ctx.registerZone) {
|
2782
2856
|
ctx == null ? void 0 : ctx.registerZone(zoneCompound);
|
2783
2857
|
}
|
@@ -2800,7 +2874,7 @@ function DropZoneEdit({ zone, style }) {
|
|
2800
2874
|
const [draggedSourceArea] = getZoneId(draggedSourceId);
|
2801
2875
|
const userIsDragging = !!draggedItem;
|
2802
2876
|
const draggingOverArea = userIsDragging && zoneArea === draggedSourceArea;
|
2803
|
-
const draggingNewComponent = draggedSourceId
|
2877
|
+
const draggingNewComponent = draggedSourceId == null ? void 0 : draggedSourceId.startsWith("component-list");
|
2804
2878
|
if (!(ctx == null ? void 0 : ctx.config) || !ctx.setHoveringArea || !ctx.setHoveringZone || !ctx.setHoveringComponent || !ctx.setItemSelector || !ctx.registerPath || !ctx.dispatch) {
|
2805
2879
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: "DropZone requires context to work." });
|
2806
2880
|
}
|
@@ -2989,7 +3063,7 @@ function DropZoneEdit({ zone, style }) {
|
|
2989
3063
|
);
|
2990
3064
|
}
|
2991
3065
|
function DropZoneRender({ zone }) {
|
2992
|
-
const ctx = (0,
|
3066
|
+
const ctx = (0, import_react23.useContext)(dropZoneContext);
|
2993
3067
|
const { data, areaId = "root", config } = ctx || {};
|
2994
3068
|
let zoneCompound = rootDroppableId;
|
2995
3069
|
let content = (data == null ? void 0 : data.content) || [];
|
@@ -3016,7 +3090,7 @@ function DropZoneRender({ zone }) {
|
|
3016
3090
|
}) });
|
3017
3091
|
}
|
3018
3092
|
function DropZone(props) {
|
3019
|
-
const ctx = (0,
|
3093
|
+
const ctx = (0, import_react23.useContext)(dropZoneContext);
|
3020
3094
|
if ((ctx == null ? void 0 : ctx.mode) === "edit") {
|
3021
3095
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DropZoneEdit, __spreadValues({}, props));
|
3022
3096
|
}
|
@@ -3028,7 +3102,7 @@ init_react_import();
|
|
3028
3102
|
|
3029
3103
|
// components/IconButton/IconButton.tsx
|
3030
3104
|
init_react_import();
|
3031
|
-
var
|
3105
|
+
var import_react24 = require("react");
|
3032
3106
|
|
3033
3107
|
// css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css#css-module
|
3034
3108
|
init_react_import();
|
@@ -3050,7 +3124,7 @@ var IconButton = ({
|
|
3050
3124
|
fullWidth,
|
3051
3125
|
title
|
3052
3126
|
}) => {
|
3053
|
-
const [loading, setLoading] = (0,
|
3127
|
+
const [loading, setLoading] = (0, import_react24.useState)(false);
|
3054
3128
|
const ElementType = href ? "a" : "button";
|
3055
3129
|
const el = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
3056
3130
|
ElementType,
|
@@ -3090,7 +3164,7 @@ var IconButton = ({
|
|
3090
3164
|
|
3091
3165
|
// components/Puck/index.tsx
|
3092
3166
|
init_react_import();
|
3093
|
-
var
|
3167
|
+
var import_react34 = require("react");
|
3094
3168
|
var import_react_beautiful_dnd5 = require("react-beautiful-dnd");
|
3095
3169
|
|
3096
3170
|
// components/InputOrGroup/index.tsx
|
@@ -3108,7 +3182,7 @@ init_react_import();
|
|
3108
3182
|
|
3109
3183
|
// css-module:/home/runner/work/puck/puck/packages/core/components/InputOrGroup/fields/ArrayField/styles.module.css#css-module
|
3110
3184
|
init_react_import();
|
3111
|
-
var styles_module_default4 = { "ArrayField": "
|
3185
|
+
var styles_module_default4 = { "ArrayField": "_ArrayField_32vor_5", "ArrayField--isDraggingFrom": "_ArrayField--isDraggingFrom_32vor_13", "ArrayField-addButton": "_ArrayField-addButton_32vor_17", "ArrayField--hasItems": "_ArrayField--hasItems_32vor_31", "ArrayFieldItem": "_ArrayFieldItem_32vor_45", "ArrayFieldItem--isDragging": "_ArrayFieldItem--isDragging_32vor_53", "ArrayFieldItem--isExpanded": "_ArrayFieldItem--isExpanded_32vor_58", "ArrayFieldItem-summary": "_ArrayFieldItem-summary_32vor_72", "ArrayFieldItem-body": "_ArrayFieldItem-body_32vor_100", "ArrayFieldItem-fieldset": "_ArrayFieldItem-fieldset_32vor_108", "ArrayFieldItem-rhs": "_ArrayFieldItem-rhs_32vor_115", "ArrayFieldItem-actions": "_ArrayFieldItem-actions_32vor_121", "ArrayFieldItem-action": "_ArrayFieldItem-action_32vor_121" };
|
3112
3186
|
|
3113
3187
|
// components/InputOrGroup/fields/ArrayField/index.tsx
|
3114
3188
|
var import_react_beautiful_dnd4 = require("react-beautiful-dnd");
|
@@ -3158,7 +3232,7 @@ var import_crypto = require("crypto");
|
|
3158
3232
|
var generateId = (type) => `${type}-${(0, import_crypto.randomBytes)(20).toString("hex")}`;
|
3159
3233
|
|
3160
3234
|
// components/InputOrGroup/fields/ArrayField/index.tsx
|
3161
|
-
var
|
3235
|
+
var import_react26 = require("react");
|
3162
3236
|
|
3163
3237
|
// components/DragIcon/index.tsx
|
3164
3238
|
init_react_import();
|
@@ -3174,22 +3248,24 @@ var DragIcon = () => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { class
|
|
3174
3248
|
|
3175
3249
|
// components/Puck/context.tsx
|
3176
3250
|
init_react_import();
|
3177
|
-
var
|
3251
|
+
var import_react25 = require("react");
|
3178
3252
|
var defaultAppState = {
|
3179
3253
|
data: { content: [], root: { title: "" } },
|
3180
3254
|
ui: {
|
3181
3255
|
leftSideBarVisible: true,
|
3182
3256
|
arrayState: {},
|
3183
|
-
itemSelector: null
|
3257
|
+
itemSelector: null,
|
3258
|
+
componentList: {}
|
3184
3259
|
}
|
3185
3260
|
};
|
3186
|
-
var appContext = (0,
|
3261
|
+
var appContext = (0, import_react25.createContext)({
|
3187
3262
|
state: defaultAppState,
|
3188
|
-
dispatch: () => null
|
3263
|
+
dispatch: () => null,
|
3264
|
+
config: { components: {} }
|
3189
3265
|
});
|
3190
3266
|
var AppProvider = appContext.Provider;
|
3191
3267
|
var useAppContext = () => {
|
3192
|
-
const mainContext = (0,
|
3268
|
+
const mainContext = (0, import_react25.useContext)(appContext);
|
3193
3269
|
const selectedItem = mainContext.state.ui.itemSelector ? getItem(mainContext.state.ui.itemSelector, mainContext.state.data) : void 0;
|
3194
3270
|
return __spreadProps(__spreadValues({}, mainContext), {
|
3195
3271
|
// Helpers
|
@@ -3216,7 +3292,7 @@ var ArrayField = ({
|
|
3216
3292
|
name,
|
3217
3293
|
label
|
3218
3294
|
}) => {
|
3219
|
-
const [arrayFieldId] = (0,
|
3295
|
+
const [arrayFieldId] = (0, import_react26.useState)(generateId("ArrayField"));
|
3220
3296
|
const { state, setUi } = useAppContext();
|
3221
3297
|
const arrayState = state.ui.arrayState[arrayFieldId] || {
|
3222
3298
|
items: Array.from(value || []).map((v) => ({
|
@@ -3225,7 +3301,7 @@ var ArrayField = ({
|
|
3225
3301
|
})),
|
3226
3302
|
openId: ""
|
3227
3303
|
};
|
3228
|
-
const setArrayState = (0,
|
3304
|
+
const setArrayState = (0, import_react26.useCallback)(
|
3229
3305
|
(newArrayState, recordHistory = false) => {
|
3230
3306
|
setUi(
|
3231
3307
|
{
|
@@ -3238,7 +3314,7 @@ var ArrayField = ({
|
|
3238
3314
|
},
|
3239
3315
|
[arrayState]
|
3240
3316
|
);
|
3241
|
-
(0,
|
3317
|
+
(0, import_react26.useEffect)(() => {
|
3242
3318
|
const newItems = Array.from(value || []).map((item, idx) => {
|
3243
3319
|
var _a;
|
3244
3320
|
return {
|
@@ -3433,7 +3509,7 @@ init_react_import();
|
|
3433
3509
|
|
3434
3510
|
// components/ExternalInput/index.tsx
|
3435
3511
|
init_react_import();
|
3436
|
-
var
|
3512
|
+
var import_react27 = require("react");
|
3437
3513
|
|
3438
3514
|
// css-module:/home/runner/work/puck/puck/packages/core/components/ExternalInput/styles.module.css#css-module
|
3439
3515
|
init_react_import();
|
@@ -3447,10 +3523,10 @@ var ExternalInput = ({
|
|
3447
3523
|
onChange,
|
3448
3524
|
value = null
|
3449
3525
|
}) => {
|
3450
|
-
const [data, setData] = (0,
|
3451
|
-
const [isOpen, setOpen] = (0,
|
3452
|
-
const [selectedData, setSelectedData] = (0,
|
3453
|
-
const keys = (0,
|
3526
|
+
const [data, setData] = (0, import_react27.useState)([]);
|
3527
|
+
const [isOpen, setOpen] = (0, import_react27.useState)(false);
|
3528
|
+
const [selectedData, setSelectedData] = (0, import_react27.useState)(value);
|
3529
|
+
const keys = (0, import_react27.useMemo)(() => {
|
3454
3530
|
const validKeys = /* @__PURE__ */ new Set();
|
3455
3531
|
for (const item of data) {
|
3456
3532
|
for (const key of Object.keys(item)) {
|
@@ -3461,7 +3537,7 @@ var ExternalInput = ({
|
|
3461
3537
|
}
|
3462
3538
|
return Array.from(validKeys);
|
3463
3539
|
}, [data]);
|
3464
|
-
(0,
|
3540
|
+
(0, import_react27.useEffect)(() => {
|
3465
3541
|
(() => __async(void 0, null, function* () {
|
3466
3542
|
if (field.adaptor) {
|
3467
3543
|
const listData = yield field.adaptor.fetchList(field.adaptorParams);
|
@@ -3740,49 +3816,99 @@ init_react_import();
|
|
3740
3816
|
|
3741
3817
|
// css-module:/home/runner/work/puck/puck/packages/core/components/ComponentList/styles.module.css#css-module
|
3742
3818
|
init_react_import();
|
3743
|
-
var styles_module_default7 = { "ComponentList": "
|
3819
|
+
var styles_module_default7 = { "ComponentList": "_ComponentList_3rdy2_1", "ComponentList--isExpanded": "_ComponentList--isExpanded_3rdy2_6", "ComponentList-content": "_ComponentList-content_3rdy2_10", "ComponentList-title": "_ComponentList-title_3rdy2_18", "ComponentList-titleIcon": "_ComponentList-titleIcon_3rdy2_39", "ComponentListItem": "_ComponentListItem_3rdy2_43", "ComponentListItem-draggable": "_ComponentListItem-draggable_3rdy2_43", "ComponentListItemIcon": "_ComponentListItemIcon_3rdy2_61", "ComponentList--isDraggingFrom": "_ComponentList--isDraggingFrom_3rdy2_65" };
|
3744
3820
|
|
3745
3821
|
// components/ComponentList/index.tsx
|
3746
3822
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
3747
3823
|
var getClassName14 = get_class_name_factory_default("ComponentList", styles_module_default7);
|
3748
|
-
var
|
3749
|
-
|
3750
|
-
|
3751
|
-
|
3752
|
-
|
3753
|
-
|
3754
|
-
|
3755
|
-
|
3756
|
-
|
3757
|
-
|
3758
|
-
|
3759
|
-
|
3760
|
-
|
3761
|
-
|
3762
|
-
|
3763
|
-
|
3764
|
-
|
3765
|
-
|
3766
|
-
|
3767
|
-
|
3768
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: getClassName14("itemIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DragIcon, {}) })
|
3769
|
-
] })
|
3770
|
-
},
|
3771
|
-
componentKey
|
3772
|
-
);
|
3773
|
-
}),
|
3774
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { display: "none" }, children: provided.placeholder })
|
3775
|
-
]
|
3776
|
-
})
|
3824
|
+
var getClassNameItem2 = get_class_name_factory_default("ComponentListItem", styles_module_default7);
|
3825
|
+
var ComponentListItem = ({
|
3826
|
+
component,
|
3827
|
+
index,
|
3828
|
+
id
|
3829
|
+
}) => {
|
3830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: getClassNameItem2(), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
3831
|
+
Draggable2,
|
3832
|
+
{
|
3833
|
+
id,
|
3834
|
+
index,
|
3835
|
+
showShadow: true,
|
3836
|
+
disableAnimations: true,
|
3837
|
+
className: () => getClassNameItem2("draggable"),
|
3838
|
+
children: () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
3839
|
+
component,
|
3840
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: getClassNameItem2("icon"), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DragIcon, {}) })
|
3841
|
+
] })
|
3842
|
+
},
|
3843
|
+
component
|
3777
3844
|
) });
|
3778
3845
|
};
|
3846
|
+
var ComponentList = ({
|
3847
|
+
children,
|
3848
|
+
title,
|
3849
|
+
id
|
3850
|
+
}) => {
|
3851
|
+
const { config, state, setUi } = useAppContext();
|
3852
|
+
const { expanded = true } = state.ui.componentList[id] || {};
|
3853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: getClassName14({ isExpanded: expanded }), children: [
|
3854
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
3855
|
+
"div",
|
3856
|
+
{
|
3857
|
+
className: getClassName14("title"),
|
3858
|
+
onClick: () => setUi({
|
3859
|
+
componentList: __spreadProps(__spreadValues({}, state.ui.componentList), {
|
3860
|
+
[id]: __spreadProps(__spreadValues({}, state.ui.componentList[id]), {
|
3861
|
+
expanded: !expanded
|
3862
|
+
})
|
3863
|
+
})
|
3864
|
+
}),
|
3865
|
+
title: expanded ? `Collapse${title ? ` ${title}` : ""}` : `Expand${title ? ` ${title}` : ""}`,
|
3866
|
+
children: [
|
3867
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: title }),
|
3868
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: getClassName14("titleIcon"), children: expanded ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(chevron_up_default, { size: 12 }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(chevron_down_default, { size: 12 }) })
|
3869
|
+
]
|
3870
|
+
}
|
3871
|
+
),
|
3872
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: getClassName14("content"), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
3873
|
+
DroppableStrictMode_default,
|
3874
|
+
{
|
3875
|
+
droppableId: `component-list${title ? `:${title}` : ""}`,
|
3876
|
+
isDropDisabled: true,
|
3877
|
+
children: (provided, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
3878
|
+
"div",
|
3879
|
+
__spreadProps(__spreadValues({}, provided.droppableProps), {
|
3880
|
+
ref: provided.innerRef,
|
3881
|
+
className: getClassName14({
|
3882
|
+
isDraggingFrom: !!snapshot.draggingFromThisWith
|
3883
|
+
}),
|
3884
|
+
children: [
|
3885
|
+
children || Object.keys(config.components).map((componentKey, i) => {
|
3886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
3887
|
+
ComponentListItem,
|
3888
|
+
{
|
3889
|
+
component: componentKey,
|
3890
|
+
index: i,
|
3891
|
+
id: componentKey
|
3892
|
+
},
|
3893
|
+
componentKey
|
3894
|
+
);
|
3895
|
+
}),
|
3896
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { display: "none" }, children: provided.placeholder })
|
3897
|
+
]
|
3898
|
+
})
|
3899
|
+
)
|
3900
|
+
}
|
3901
|
+
) })
|
3902
|
+
] });
|
3903
|
+
};
|
3904
|
+
ComponentList.Item = ComponentListItem;
|
3779
3905
|
|
3780
3906
|
// lib/use-placeholder-style.ts
|
3781
3907
|
init_react_import();
|
3782
|
-
var
|
3908
|
+
var import_react28 = require("react");
|
3783
3909
|
var usePlaceholderStyle = () => {
|
3784
3910
|
const queryAttr = "data-rbd-drag-handle-draggable-id";
|
3785
|
-
const [placeholderStyle, setPlaceholderStyle] = (0,
|
3911
|
+
const [placeholderStyle, setPlaceholderStyle] = (0, import_react28.useState)();
|
3786
3912
|
const onDragStartOrUpdate = (draggedItem) => {
|
3787
3913
|
var _a;
|
3788
3914
|
const draggableId = draggedItem.draggableId;
|
@@ -3857,7 +3983,7 @@ var Heading = ({ children, rank, size = "m" }) => {
|
|
3857
3983
|
|
3858
3984
|
// lib/use-breadcrumbs.ts
|
3859
3985
|
init_react_import();
|
3860
|
-
var
|
3986
|
+
var import_react29 = require("react");
|
3861
3987
|
var convertPathDataToBreadcrumbs = (selectedItem, pathData, data) => {
|
3862
3988
|
const id = selectedItem ? selectedItem == null ? void 0 : selectedItem.props.id : "";
|
3863
3989
|
const currentPathData = pathData && id && pathData[id] ? __spreadValues({}, pathData[id]) : { label: "Page", path: [] };
|
@@ -3907,8 +4033,8 @@ var useBreadcrumbs = (renderCount) => {
|
|
3907
4033
|
state: { data },
|
3908
4034
|
selectedItem
|
3909
4035
|
} = useAppContext();
|
3910
|
-
const dzContext = (0,
|
3911
|
-
return (0,
|
4036
|
+
const dzContext = (0, import_react29.useContext)(dropZoneContext);
|
4037
|
+
return (0, import_react29.useMemo)(() => {
|
3912
4038
|
const breadcrumbs = convertPathDataToBreadcrumbs(
|
3913
4039
|
selectedItem,
|
3914
4040
|
dzContext == null ? void 0 : dzContext.pathData,
|
@@ -3957,15 +4083,15 @@ init_react_import();
|
|
3957
4083
|
|
3958
4084
|
// lib/use-puck-history.ts
|
3959
4085
|
init_react_import();
|
3960
|
-
var
|
4086
|
+
var import_react31 = require("react");
|
3961
4087
|
|
3962
4088
|
// lib/use-action-history.ts
|
3963
4089
|
init_react_import();
|
3964
|
-
var
|
4090
|
+
var import_react30 = require("react");
|
3965
4091
|
var EMPTY_HISTORY_INDEX = -1;
|
3966
4092
|
function useActionHistory() {
|
3967
|
-
const [histories, setHistories] = (0,
|
3968
|
-
const [currentHistoryIndex, setCurrentHistoryIndex] = (0,
|
4093
|
+
const [histories, setHistories] = (0, import_react30.useState)([]);
|
4094
|
+
const [currentHistoryIndex, setCurrentHistoryIndex] = (0, import_react30.useState)(EMPTY_HISTORY_INDEX);
|
3969
4095
|
const currentHistory = histories[currentHistoryIndex];
|
3970
4096
|
const canRewind = currentHistoryIndex > EMPTY_HISTORY_INDEX;
|
3971
4097
|
const canForward = currentHistoryIndex < histories.length - 1;
|
@@ -4044,7 +4170,7 @@ function usePuckHistory({
|
|
4044
4170
|
dispatch
|
4045
4171
|
});
|
4046
4172
|
}, DEBOUNCE_TIME);
|
4047
|
-
(0,
|
4173
|
+
(0, import_react31.useEffect)(() => {
|
4048
4174
|
historyEmitter.on(RECORD_DIFF, handleRecordDiff);
|
4049
4175
|
return () => {
|
4050
4176
|
historyEmitter.off(RECORD_DIFF, handleRecordDiff);
|
@@ -4389,7 +4515,7 @@ var scrollIntoView = (el) => {
|
|
4389
4515
|
};
|
4390
4516
|
|
4391
4517
|
// components/LayerTree/index.tsx
|
4392
|
-
var
|
4518
|
+
var import_react32 = require("react");
|
4393
4519
|
|
4394
4520
|
// lib/find-zones-for-area.ts
|
4395
4521
|
init_react_import();
|
@@ -4427,7 +4553,7 @@ var LayerTree = ({
|
|
4427
4553
|
label
|
4428
4554
|
}) => {
|
4429
4555
|
const zones = data.zones || {};
|
4430
|
-
const ctx = (0,
|
4556
|
+
const ctx = (0, import_react32.useContext)(dropZoneContext);
|
4431
4557
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
4432
4558
|
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: getClassName17("zoneTitle"), children: [
|
4433
4559
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: getClassName17("zoneIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(layers_default, { size: "16" }) }),
|
@@ -4550,8 +4676,78 @@ var flushZones = (appState) => {
|
|
4550
4676
|
return appState;
|
4551
4677
|
};
|
4552
4678
|
|
4553
|
-
//
|
4679
|
+
// lib/use-component-list.tsx
|
4680
|
+
init_react_import();
|
4681
|
+
var import_react33 = require("react");
|
4554
4682
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
4683
|
+
var useComponentList = (config, ui) => {
|
4684
|
+
const [componentList, setComponentList] = (0, import_react33.useState)();
|
4685
|
+
(0, import_react33.useEffect)(() => {
|
4686
|
+
var _a, _b, _c;
|
4687
|
+
if (Object.keys(ui.componentList).length > 0) {
|
4688
|
+
const matchedComponents = [];
|
4689
|
+
let _componentList;
|
4690
|
+
_componentList = Object.entries(ui.componentList).map(
|
4691
|
+
([categoryKey, category]) => {
|
4692
|
+
if (category.visible === false || !category.components) {
|
4693
|
+
return null;
|
4694
|
+
}
|
4695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
4696
|
+
ComponentList,
|
4697
|
+
{
|
4698
|
+
id: categoryKey,
|
4699
|
+
title: category.title || categoryKey,
|
4700
|
+
children: category.components.map((componentName, i) => {
|
4701
|
+
matchedComponents.push(componentName);
|
4702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
4703
|
+
ComponentList.Item,
|
4704
|
+
{
|
4705
|
+
component: componentName,
|
4706
|
+
index: i,
|
4707
|
+
id: `${categoryKey}::${componentName}`
|
4708
|
+
},
|
4709
|
+
componentName
|
4710
|
+
);
|
4711
|
+
})
|
4712
|
+
},
|
4713
|
+
categoryKey
|
4714
|
+
);
|
4715
|
+
}
|
4716
|
+
);
|
4717
|
+
const remainingComponents = Object.keys(config.components).filter(
|
4718
|
+
(component) => matchedComponents.indexOf(component) === -1
|
4719
|
+
);
|
4720
|
+
if (remainingComponents.length > 0 && !((_a = ui.componentList.other) == null ? void 0 : _a.components) && ((_b = ui.componentList.other) == null ? void 0 : _b.visible) !== false) {
|
4721
|
+
_componentList.push(
|
4722
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
4723
|
+
ComponentList,
|
4724
|
+
{
|
4725
|
+
id: "other",
|
4726
|
+
title: ((_c = ui.componentList.other) == null ? void 0 : _c.title) || "Other",
|
4727
|
+
children: remainingComponents.map((componentName, i) => {
|
4728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
4729
|
+
ComponentList.Item,
|
4730
|
+
{
|
4731
|
+
component: componentName,
|
4732
|
+
index: i,
|
4733
|
+
id: `other::${componentName}`
|
4734
|
+
},
|
4735
|
+
componentName
|
4736
|
+
);
|
4737
|
+
})
|
4738
|
+
},
|
4739
|
+
"other"
|
4740
|
+
)
|
4741
|
+
);
|
4742
|
+
}
|
4743
|
+
setComponentList(_componentList);
|
4744
|
+
}
|
4745
|
+
}, [config.categories, ui.componentList]);
|
4746
|
+
return componentList;
|
4747
|
+
};
|
4748
|
+
|
4749
|
+
// components/Puck/index.tsx
|
4750
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
4555
4751
|
var defaultPageFields = {
|
4556
4752
|
title: { type: "text" }
|
4557
4753
|
};
|
@@ -4563,7 +4759,7 @@ var PluginRenderer = ({
|
|
4563
4759
|
renderMethod
|
4564
4760
|
}) => {
|
4565
4761
|
return plugins.filter((item) => item[renderMethod]).map((item) => item[renderMethod]).reduce(
|
4566
|
-
(accChildren, Item) => /* @__PURE__ */ (0,
|
4762
|
+
(accChildren, Item) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Item, { dispatch, state, children: accChildren }),
|
4567
4763
|
children
|
4568
4764
|
);
|
4569
4765
|
};
|
@@ -4573,17 +4769,34 @@ function Puck({
|
|
4573
4769
|
onChange,
|
4574
4770
|
onPublish,
|
4575
4771
|
plugins = [],
|
4772
|
+
renderComponentList,
|
4576
4773
|
renderHeader,
|
4577
4774
|
renderHeaderActions,
|
4578
4775
|
headerTitle,
|
4579
4776
|
headerPath
|
4580
4777
|
}) {
|
4581
4778
|
var _a, _b;
|
4582
|
-
const [reducer] = (0,
|
4779
|
+
const [reducer] = (0, import_react34.useState)(() => createReducer({ config }));
|
4583
4780
|
const initialAppState = __spreadProps(__spreadValues({}, defaultAppState), {
|
4584
|
-
data: initialData
|
4781
|
+
data: initialData,
|
4782
|
+
ui: __spreadProps(__spreadValues({}, defaultAppState.ui), {
|
4783
|
+
// Store categories under componentList on state to allow render functions and plugins to modify
|
4784
|
+
componentList: config.categories ? Object.entries(config.categories).reduce(
|
4785
|
+
(acc, [categoryName, category]) => {
|
4786
|
+
return __spreadProps(__spreadValues({}, acc), {
|
4787
|
+
[categoryName]: {
|
4788
|
+
title: category.title,
|
4789
|
+
components: category.components,
|
4790
|
+
expanded: category.defaultExpanded,
|
4791
|
+
visible: category.visible
|
4792
|
+
}
|
4793
|
+
});
|
4794
|
+
},
|
4795
|
+
{}
|
4796
|
+
) : {}
|
4797
|
+
})
|
4585
4798
|
});
|
4586
|
-
const [appState, dispatch] = (0,
|
4799
|
+
const [appState, dispatch] = (0, import_react34.useReducer)(
|
4587
4800
|
reducer,
|
4588
4801
|
flushZones(initialAppState)
|
4589
4802
|
);
|
@@ -4593,7 +4806,7 @@ function Puck({
|
|
4593
4806
|
dispatch
|
4594
4807
|
});
|
4595
4808
|
const { itemSelector, leftSideBarVisible } = ui;
|
4596
|
-
const setItemSelector = (0,
|
4809
|
+
const setItemSelector = (0, import_react34.useCallback)(
|
4597
4810
|
(newItemSelector) => {
|
4598
4811
|
dispatch({
|
4599
4812
|
type: "setUi",
|
@@ -4603,10 +4816,10 @@ function Puck({
|
|
4603
4816
|
[]
|
4604
4817
|
);
|
4605
4818
|
const selectedItem = itemSelector ? getItem(itemSelector, data) : null;
|
4606
|
-
const Page = (0,
|
4819
|
+
const Page = (0, import_react34.useCallback)(
|
4607
4820
|
(pageProps) => {
|
4608
4821
|
var _a2, _b2;
|
4609
|
-
return /* @__PURE__ */ (0,
|
4822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4610
4823
|
PluginRenderer,
|
4611
4824
|
{
|
4612
4825
|
plugins,
|
@@ -4619,8 +4832,8 @@ function Puck({
|
|
4619
4832
|
},
|
4620
4833
|
[config.root]
|
4621
4834
|
);
|
4622
|
-
const PageFieldWrapper = (0,
|
4623
|
-
(props) => /* @__PURE__ */ (0,
|
4835
|
+
const PageFieldWrapper = (0, import_react34.useCallback)(
|
4836
|
+
(props) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4624
4837
|
PluginRenderer,
|
4625
4838
|
{
|
4626
4839
|
plugins,
|
@@ -4632,8 +4845,8 @@ function Puck({
|
|
4632
4845
|
),
|
4633
4846
|
[]
|
4634
4847
|
);
|
4635
|
-
const ComponentFieldWrapper = (0,
|
4636
|
-
(props) => /* @__PURE__ */ (0,
|
4848
|
+
const ComponentFieldWrapper = (0, import_react34.useCallback)(
|
4849
|
+
(props) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4637
4850
|
PluginRenderer,
|
4638
4851
|
{
|
4639
4852
|
plugins,
|
@@ -4645,16 +4858,34 @@ function Puck({
|
|
4645
4858
|
),
|
4646
4859
|
[]
|
4647
4860
|
);
|
4861
|
+
const ComponentListWrapper = (0, import_react34.useCallback)((props) => {
|
4862
|
+
const children = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4863
|
+
PluginRenderer,
|
4864
|
+
{
|
4865
|
+
plugins,
|
4866
|
+
renderMethod: "renderComponentList",
|
4867
|
+
dispatch: props.dispatch,
|
4868
|
+
state: props.state,
|
4869
|
+
children: props.children
|
4870
|
+
}
|
4871
|
+
);
|
4872
|
+
return renderComponentList ? renderComponentList({
|
4873
|
+
children,
|
4874
|
+
dispatch,
|
4875
|
+
state: appState
|
4876
|
+
}) : children;
|
4877
|
+
}, []);
|
4648
4878
|
const FieldWrapper = itemSelector ? ComponentFieldWrapper : PageFieldWrapper;
|
4649
4879
|
const rootFields = ((_a = config.root) == null ? void 0 : _a.fields) || defaultPageFields;
|
4650
4880
|
let fields = selectedItem ? ((_b = config.components[selectedItem.type]) == null ? void 0 : _b.fields) || {} : rootFields;
|
4651
|
-
(0,
|
4881
|
+
(0, import_react34.useEffect)(() => {
|
4652
4882
|
if (onChange)
|
4653
4883
|
onChange(data);
|
4654
4884
|
}, [data]);
|
4655
4885
|
const { onDragStartOrUpdate, placeholderStyle } = usePlaceholderStyle();
|
4656
|
-
const [draggedItem, setDraggedItem] = (0,
|
4657
|
-
|
4886
|
+
const [draggedItem, setDraggedItem] = (0, import_react34.useState)();
|
4887
|
+
const componentList = useComponentList(config, appState.ui);
|
4888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "puck", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AppProvider, { value: { state: appState, dispatch, config }, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4658
4889
|
import_react_beautiful_dnd5.DragDropContext,
|
4659
4890
|
{
|
4660
4891
|
onDragUpdate: (update) => {
|
@@ -4670,10 +4901,11 @@ function Puck({
|
|
4670
4901
|
if (!droppedItem.destination) {
|
4671
4902
|
return;
|
4672
4903
|
}
|
4673
|
-
if (droppedItem.source.droppableId
|
4904
|
+
if (droppedItem.source.droppableId.startsWith("component-list") && droppedItem.destination) {
|
4905
|
+
const [_, componentId] = droppedItem.draggableId.split("::");
|
4674
4906
|
dispatch({
|
4675
4907
|
type: "insert",
|
4676
|
-
componentType: droppedItem.draggableId,
|
4908
|
+
componentType: componentId || droppedItem.draggableId,
|
4677
4909
|
destinationIndex: droppedItem.destination.index,
|
4678
4910
|
destinationZone: droppedItem.destination.droppableId
|
4679
4911
|
});
|
@@ -4706,7 +4938,7 @@ function Puck({
|
|
4706
4938
|
});
|
4707
4939
|
}
|
4708
4940
|
},
|
4709
|
-
children: /* @__PURE__ */ (0,
|
4941
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4710
4942
|
DropZoneProvider,
|
4711
4943
|
{
|
4712
4944
|
value: {
|
@@ -4720,8 +4952,8 @@ function Puck({
|
|
4720
4952
|
mode: "edit",
|
4721
4953
|
areaId: "root"
|
4722
4954
|
},
|
4723
|
-
children: /* @__PURE__ */ (0,
|
4724
|
-
return /* @__PURE__ */ (0,
|
4955
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(dropZoneContext.Consumer, { children: (ctx) => {
|
4956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
4725
4957
|
"div",
|
4726
4958
|
{
|
4727
4959
|
style: {
|
@@ -4737,7 +4969,7 @@ function Puck({
|
|
4737
4969
|
right: 0
|
4738
4970
|
},
|
4739
4971
|
children: [
|
4740
|
-
/* @__PURE__ */ (0,
|
4972
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4741
4973
|
"header",
|
4742
4974
|
{
|
4743
4975
|
style: {
|
@@ -4747,19 +4979,19 @@ function Puck({
|
|
4747
4979
|
borderBottom: "1px solid var(--puck-color-grey-8)"
|
4748
4980
|
},
|
4749
4981
|
children: renderHeader ? renderHeader({
|
4750
|
-
children: /* @__PURE__ */ (0,
|
4982
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4751
4983
|
Button,
|
4752
4984
|
{
|
4753
4985
|
onClick: () => {
|
4754
4986
|
onPublish(data);
|
4755
4987
|
},
|
4756
|
-
icon: /* @__PURE__ */ (0,
|
4988
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(globe_default, { size: "14px" }),
|
4757
4989
|
children: "Publish"
|
4758
4990
|
}
|
4759
4991
|
),
|
4760
4992
|
dispatch,
|
4761
4993
|
state: appState
|
4762
|
-
}) : /* @__PURE__ */ (0,
|
4994
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
4763
4995
|
"div",
|
4764
4996
|
{
|
4765
4997
|
style: {
|
@@ -4770,14 +5002,14 @@ function Puck({
|
|
4770
5002
|
gridTemplateRows: "auto"
|
4771
5003
|
},
|
4772
5004
|
children: [
|
4773
|
-
/* @__PURE__ */ (0,
|
5005
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4774
5006
|
"div",
|
4775
5007
|
{
|
4776
5008
|
style: {
|
4777
5009
|
display: "flex",
|
4778
5010
|
gap: 16
|
4779
5011
|
},
|
4780
|
-
children: /* @__PURE__ */ (0,
|
5012
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4781
5013
|
IconButton,
|
4782
5014
|
{
|
4783
5015
|
onClick: () => dispatch({
|
@@ -4787,12 +5019,12 @@ function Puck({
|
|
4787
5019
|
}
|
4788
5020
|
}),
|
4789
5021
|
title: "Toggle left sidebar",
|
4790
|
-
children: /* @__PURE__ */ (0,
|
5022
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(sidebar_default, {})
|
4791
5023
|
}
|
4792
5024
|
)
|
4793
5025
|
}
|
4794
5026
|
),
|
4795
|
-
/* @__PURE__ */ (0,
|
5027
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4796
5028
|
"div",
|
4797
5029
|
{
|
4798
5030
|
style: {
|
@@ -4800,19 +5032,19 @@ function Puck({
|
|
4800
5032
|
justifyContent: "center",
|
4801
5033
|
alignItems: "center"
|
4802
5034
|
},
|
4803
|
-
children: /* @__PURE__ */ (0,
|
5035
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Heading, { rank: 2, size: "xs", children: [
|
4804
5036
|
headerTitle || data.root.title || "Page",
|
4805
|
-
headerPath && /* @__PURE__ */ (0,
|
5037
|
+
headerPath && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4806
5038
|
"small",
|
4807
5039
|
{
|
4808
5040
|
style: { fontWeight: 400, marginLeft: 4 },
|
4809
|
-
children: /* @__PURE__ */ (0,
|
5041
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("code", { children: headerPath })
|
4810
5042
|
}
|
4811
5043
|
)
|
4812
5044
|
] })
|
4813
5045
|
}
|
4814
5046
|
),
|
4815
|
-
/* @__PURE__ */ (0,
|
5047
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
4816
5048
|
"div",
|
4817
5049
|
{
|
4818
5050
|
style: {
|
@@ -4821,14 +5053,14 @@ function Puck({
|
|
4821
5053
|
justifyContent: "flex-end"
|
4822
5054
|
},
|
4823
5055
|
children: [
|
4824
|
-
/* @__PURE__ */ (0,
|
4825
|
-
/* @__PURE__ */ (0,
|
5056
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex" }, children: [
|
5057
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4826
5058
|
IconButton,
|
4827
5059
|
{
|
4828
5060
|
title: "undo",
|
4829
5061
|
disabled: !canRewind,
|
4830
5062
|
onClick: rewind,
|
4831
|
-
children: /* @__PURE__ */ (0,
|
5063
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4832
5064
|
chevron_left_default,
|
4833
5065
|
{
|
4834
5066
|
size: 21,
|
@@ -4837,13 +5069,13 @@ function Puck({
|
|
4837
5069
|
)
|
4838
5070
|
}
|
4839
5071
|
),
|
4840
|
-
/* @__PURE__ */ (0,
|
5072
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4841
5073
|
IconButton,
|
4842
5074
|
{
|
4843
5075
|
title: "redo",
|
4844
5076
|
disabled: !canForward,
|
4845
5077
|
onClick: forward,
|
4846
|
-
children: /* @__PURE__ */ (0,
|
5078
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4847
5079
|
chevron_right_default,
|
4848
5080
|
{
|
4849
5081
|
size: 21,
|
@@ -4857,13 +5089,13 @@ function Puck({
|
|
4857
5089
|
state: appState,
|
4858
5090
|
dispatch
|
4859
5091
|
}),
|
4860
|
-
/* @__PURE__ */ (0,
|
5092
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4861
5093
|
Button,
|
4862
5094
|
{
|
4863
5095
|
onClick: () => {
|
4864
5096
|
onPublish(data);
|
4865
5097
|
},
|
4866
|
-
icon: /* @__PURE__ */ (0,
|
5098
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(globe_default, { size: "14px" }),
|
4867
5099
|
children: "Publish"
|
4868
5100
|
}
|
4869
5101
|
)
|
@@ -4875,7 +5107,7 @@ function Puck({
|
|
4875
5107
|
)
|
4876
5108
|
}
|
4877
5109
|
),
|
4878
|
-
/* @__PURE__ */ (0,
|
5110
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
4879
5111
|
"div",
|
4880
5112
|
{
|
4881
5113
|
style: {
|
@@ -4887,9 +5119,9 @@ function Puck({
|
|
4887
5119
|
flexDirection: "column"
|
4888
5120
|
},
|
4889
5121
|
children: [
|
4890
|
-
/* @__PURE__ */ (0,
|
4891
|
-
/* @__PURE__ */ (0,
|
4892
|
-
(ctx == null ? void 0 : ctx.activeZones) && (ctx == null ? void 0 : ctx.activeZones[rootDroppableId]) && /* @__PURE__ */ (0,
|
5122
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SidebarSection, { title: "Components", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ComponentListWrapper, { children: componentList ? componentList : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ComponentList, { id: "all" }) }) }),
|
5123
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(SidebarSection, { title: "Outline", children: [
|
5124
|
+
(ctx == null ? void 0 : ctx.activeZones) && (ctx == null ? void 0 : ctx.activeZones[rootDroppableId]) && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4893
5125
|
LayerTree,
|
4894
5126
|
{
|
4895
5127
|
data,
|
@@ -4901,7 +5133,7 @@ function Puck({
|
|
4901
5133
|
),
|
4902
5134
|
Object.entries(findZonesForArea(data, "root")).map(
|
4903
5135
|
([zoneKey, zone]) => {
|
4904
|
-
return /* @__PURE__ */ (0,
|
5136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4905
5137
|
LayerTree,
|
4906
5138
|
{
|
4907
5139
|
data,
|
@@ -4919,7 +5151,7 @@ function Puck({
|
|
4919
5151
|
]
|
4920
5152
|
}
|
4921
5153
|
),
|
4922
|
-
/* @__PURE__ */ (0,
|
5154
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
4923
5155
|
"div",
|
4924
5156
|
{
|
4925
5157
|
style: {
|
@@ -4932,7 +5164,7 @@ function Puck({
|
|
4932
5164
|
onClick: () => setItemSelector(null),
|
4933
5165
|
id: "puck-frame",
|
4934
5166
|
children: [
|
4935
|
-
/* @__PURE__ */ (0,
|
5167
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4936
5168
|
"div",
|
4937
5169
|
{
|
4938
5170
|
className: "puck-root",
|
@@ -4941,26 +5173,26 @@ function Puck({
|
|
4941
5173
|
margin: 32,
|
4942
5174
|
zoom: 0.75
|
4943
5175
|
},
|
4944
|
-
children: /* @__PURE__ */ (0,
|
5176
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4945
5177
|
"div",
|
4946
5178
|
{
|
4947
5179
|
style: {
|
4948
5180
|
border: "1px solid var(--puck-color-grey-8)"
|
4949
5181
|
},
|
4950
|
-
children: /* @__PURE__ */ (0,
|
5182
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4951
5183
|
Page,
|
4952
5184
|
__spreadProps(__spreadValues({
|
4953
5185
|
dispatch,
|
4954
5186
|
state: appState
|
4955
5187
|
}, data.root), {
|
4956
|
-
children: /* @__PURE__ */ (0,
|
5188
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropZone, { zone: rootDroppableId })
|
4957
5189
|
})
|
4958
5190
|
)
|
4959
5191
|
}
|
4960
5192
|
)
|
4961
5193
|
}
|
4962
5194
|
),
|
4963
|
-
/* @__PURE__ */ (0,
|
5195
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4964
5196
|
"div",
|
4965
5197
|
{
|
4966
5198
|
style: {
|
@@ -4973,7 +5205,7 @@ function Puck({
|
|
4973
5205
|
]
|
4974
5206
|
}
|
4975
5207
|
),
|
4976
|
-
/* @__PURE__ */ (0,
|
5208
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4977
5209
|
"div",
|
4978
5210
|
{
|
4979
5211
|
style: {
|
@@ -4985,7 +5217,7 @@ function Puck({
|
|
4985
5217
|
flexDirection: "column",
|
4986
5218
|
background: "var(--puck-color-white)"
|
4987
5219
|
},
|
4988
|
-
children: /* @__PURE__ */ (0,
|
5220
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FieldWrapper, { dispatch, state: appState, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
4989
5221
|
SidebarSection,
|
4990
5222
|
{
|
4991
5223
|
noPadding: true,
|
@@ -5043,7 +5275,7 @@ function Puck({
|
|
5043
5275
|
}
|
5044
5276
|
};
|
5045
5277
|
if (selectedItem && itemSelector) {
|
5046
|
-
return /* @__PURE__ */ (0,
|
5278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
5047
5279
|
InputOrGroup,
|
5048
5280
|
{
|
5049
5281
|
field,
|
@@ -5059,7 +5291,7 @@ function Puck({
|
|
5059
5291
|
`${selectedItem.props.id}_${fieldName}`
|
5060
5292
|
);
|
5061
5293
|
} else {
|
5062
|
-
return /* @__PURE__ */ (0,
|
5294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
5063
5295
|
InputOrGroup,
|
5064
5296
|
{
|
5065
5297
|
field,
|
@@ -5091,12 +5323,12 @@ function Puck({
|
|
5091
5323
|
|
5092
5324
|
// components/Render/index.tsx
|
5093
5325
|
init_react_import();
|
5094
|
-
var
|
5326
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
5095
5327
|
function Render({ config, data }) {
|
5096
5328
|
if (config.root) {
|
5097
|
-
return /* @__PURE__ */ (0,
|
5329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropZoneProvider, { value: { data, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(config.root.render, __spreadProps(__spreadValues({}, data.root), { editMode: false, id: "puck-root", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropZone, { zone: rootDroppableId }) })) });
|
5098
5330
|
}
|
5099
|
-
return /* @__PURE__ */ (0,
|
5331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropZoneProvider, { value: { data, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropZone, { zone: rootDroppableId }) });
|
5100
5332
|
}
|
5101
5333
|
// Annotate the CommonJS export names for ESM import in node:
|
5102
5334
|
0 && (module.exports = {
|