@wulperstudio/editor-render 0.0.9-beta → 0.0.10-beta

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/esm/index.js CHANGED
@@ -1363,7 +1363,7 @@ function requireReactJsxRuntime_development () {
1363
1363
  var RootContainer = styled('div', {
1364
1364
  name: 'RootContainer',
1365
1365
  label: 'root__container',
1366
- shouldForwardProp: function (prop) { return prop !== 'as' && prop !== 'stretched'; },
1366
+ shouldForwardProp: function (prop) { return prop !== 'as' && prop !== 'stretched' && prop !== 'sx'; },
1367
1367
  })(function (_a) {
1368
1368
  var stretched = _a.stretched;
1369
1369
  return (__assign({ width: '100%', maxWidth: 700, height: 'auto', margin: '0 auto' }, (stretched && {
@@ -1864,13 +1864,15 @@ var RecursiveNode = function (_a) {
1864
1864
  var ParagraphNode = function (_a) {
1865
1865
  var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Paragraph$1 = _a.Paragraph;
1866
1866
  var text = data.text;
1867
- return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(Paragraph, __assign({ id: ForkIdWithType(id, type) }, Paragraph$1, { children: jsxRuntime.exports.jsx(RecursiveNode, { html: text, id: id }) })) }), id));
1867
+ var _b = Container$1 || {}, sx = _b.sx, containerProps = __rest(_b, ["sx"]);
1868
+ return (jsxRuntime.exports.jsx(Container, __assign({ sx: sx }, containerProps, { children: jsxRuntime.exports.jsx(Paragraph, __assign({ id: ForkIdWithType(id, type) }, Paragraph$1, { children: jsxRuntime.exports.jsx(RecursiveNode, { html: text, id: id }) })) }), id));
1868
1869
  };
1869
1870
 
1870
1871
  var HeaderNode = function (_a) {
1871
1872
  var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Header$1 = _a.Header;
1872
1873
  var text = data.text;
1873
- return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(Header, __assign({ id: ForkIdWithType(id, type), level: data.level }, Header$1, { children: jsxRuntime.exports.jsx(RecursiveNode, { html: text, id: id }) })) }), id));
1874
+ var _b = Container$1 || {}, sx = _b.sx, containerProps = __rest(_b, ["sx"]);
1875
+ return (jsxRuntime.exports.jsx(Container, __assign({ sx: sx }, containerProps, { children: jsxRuntime.exports.jsx(Header, __assign({ id: ForkIdWithType(id, type), level: data.level }, Header$1, { children: jsxRuntime.exports.jsx(RecursiveNode, { html: text, id: id }) })) }), id));
1874
1876
  };
1875
1877
 
1876
1878
  // SizeTypes = 'one-column' | 'two-columns' | 'three-columns';
@@ -1878,7 +1880,8 @@ var DEFAULT_GAP$1 = 20;
1878
1880
  var ListNode = function (_a) {
1879
1881
  var type = _a.type, data = _a.data, id = _a.id, tunes = _a.tunes, Container$1 = _a.Container, List$1 = _a.List, Item = _a.Item;
1880
1882
  var style = data.style;
1881
- return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(List, __assign({ id: ForkIdWithType(id, type) }, List$1, { sx: __assign({ display: 'flex', flexWrap: 'wrap', gap: "".concat(DEFAULT_GAP$1, "px") }, List$1 === null || List$1 === void 0 ? void 0 : List$1.sx) }, { children: data.items.map(function (item, idx) {
1883
+ var _b = Container$1 || {}, sx = _b.sx, containerProps = __rest(_b, ["sx"]);
1884
+ return (jsxRuntime.exports.jsx(Container, __assign({ sx: sx }, containerProps, { children: jsxRuntime.exports.jsx(List, __assign({ id: ForkIdWithType(id, type) }, List$1, { sx: __assign({ display: 'flex', flexWrap: 'wrap', gap: "".concat(DEFAULT_GAP$1, "px") }, List$1 === null || List$1 === void 0 ? void 0 : List$1.sx) }, { children: data.items.map(function (item, idx) {
1882
1885
  var _a, _b;
1883
1886
  return (jsxRuntime.exports.jsxs(ListItem, __assign({}, Item, { sx: __assign(__assign(__assign(__assign(__assign({ padding: '20px', borderRadius: '25px', backgroundColor: function (_) { return _.palette.background.default; }, border: '1px solid #EFF3FE', display: 'flex', flexWrap: 'nowrap', alignItems: 'center', columnGap: '5px', flexGrow: 0 }, (style === 'ordered' && {
1884
1887
  alignItems: 'center',
@@ -1896,13 +1899,15 @@ var ListNode = function (_a) {
1896
1899
  var ImageNode = function (_a) {
1897
1900
  var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Image$1 = _a.Image;
1898
1901
  var file = data.file, caption = data.caption, withBorder = data.withBorder, stretched = data.stretched, withBackground = data.withBackground;
1899
- return (jsxRuntime.exports.jsx(Container, __assign({ stretched: stretched }, Container$1, { children: jsxRuntime.exports.jsx(Image, __assign({ id: ForkIdWithType(id, type), src: file === null || file === void 0 ? void 0 : file.url, alt: caption, caption: caption, withBorder: withBorder, stretched: stretched, withBackground: withBackground }, Image$1), ForkIdWithType(id, type)) }), id));
1902
+ var _b = Container$1 || {}, sx = _b.sx, containerProps = __rest(_b, ["sx"]);
1903
+ return (jsxRuntime.exports.jsx(Container, __assign({ stretched: stretched, sx: sx }, containerProps, { children: jsxRuntime.exports.jsx(Image, __assign({ id: ForkIdWithType(id, type), src: file === null || file === void 0 ? void 0 : file.url, alt: caption, caption: caption, withBorder: withBorder, stretched: stretched, withBackground: withBackground }, Image$1), ForkIdWithType(id, type)) }), id));
1900
1904
  };
1901
1905
 
1902
1906
  var TableNode = function (_a) {
1903
1907
  var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container;
1904
1908
  var content = data.content;
1905
- return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(Table, __assign({ id: ForkIdWithType(id, type) }, { children: content.map(function (row, rowIdx) { return (
1909
+ var _b = Container$1 || {}, sx = _b.sx, containerProps = __rest(_b, ["sx"]);
1910
+ return (jsxRuntime.exports.jsx(Container, __assign({ sx: sx }, containerProps, { children: jsxRuntime.exports.jsx(Table, __assign({ id: ForkIdWithType(id, type) }, { children: content.map(function (row, rowIdx) { return (
1906
1911
  // eslint-disable-next-line react/no-array-index-key
1907
1912
  jsxRuntime.exports.jsx(TableRow, { children: row.map(function (cell, cellIdx) { return (
1908
1913
  // eslint-disable-next-line react/no-array-index-key
@@ -1911,43 +1916,50 @@ var TableNode = function (_a) {
1911
1916
 
1912
1917
  var DelimiterNode = function (_a) {
1913
1918
  var type = _a.type, id = _a.id, Delimiter$1 = _a.Delimiter, Container$1 = _a.Container;
1914
- return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(Delimiter, __assign({ id: ForkIdWithType(id, type) }, Delimiter$1)) }), id));
1919
+ var _b = Container$1 || {}, sx = _b.sx, containerProps = __rest(_b, ["sx"]);
1920
+ return (jsxRuntime.exports.jsx(Container, __assign({ sx: sx }, containerProps, { children: jsxRuntime.exports.jsx(Delimiter, __assign({ id: ForkIdWithType(id, type) }, Delimiter$1)) }), id));
1915
1921
  };
1916
1922
 
1917
1923
  var EmbedNode = function (_a) {
1918
1924
  var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Embed$1 = _a.Embed;
1919
1925
  // eslint-disable-next-line no-unused-vars
1920
1926
  data.service; data.source; var embed = data.embed, width = data.width, height = data.height; data.caption;
1921
- return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(Embed, __assign({ id: ForkIdWithType(id, type), src: embed, width: width, height: height }, Embed$1)) }), id));
1927
+ var _b = Container$1 || {}, sx = _b.sx, containerProps = __rest(_b, ["sx"]);
1928
+ return (jsxRuntime.exports.jsx(Container, __assign({ sx: sx }, containerProps, { children: jsxRuntime.exports.jsx(Embed, __assign({ id: ForkIdWithType(id, type), src: embed, width: width, height: height }, Embed$1)) }), id));
1922
1929
  };
1923
1930
 
1924
1931
  var RawNode = function (_a) {
1925
1932
  var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Raw$1 = _a.Raw;
1926
- return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(Raw, __assign({ id: ForkIdWithType(id, type) }, Raw$1, { children: data.html })) }), id));
1933
+ var _b = Container$1 || {}, sx = _b.sx, containerProps = __rest(_b, ["sx"]);
1934
+ return (jsxRuntime.exports.jsx(Container, __assign({ sx: sx }, containerProps, { children: jsxRuntime.exports.jsx(Raw, __assign({ id: ForkIdWithType(id, type) }, Raw$1, { children: data.html })) }), id));
1927
1935
  };
1928
1936
 
1929
1937
  var QuoteNode = function (_a) {
1930
1938
  var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Quote$1 = _a.Quote;
1931
- return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(Quote, __assign({ id: ForkIdWithType(id, type) }, Quote$1, { children: data.text })) }), id));
1939
+ var _b = Container$1 || {}, sx = _b.sx, containerProps = __rest(_b, ["sx"]);
1940
+ return (jsxRuntime.exports.jsx(Container, __assign({ sx: sx }, containerProps, { children: jsxRuntime.exports.jsx(Quote, __assign({ id: ForkIdWithType(id, type) }, Quote$1, { children: data.text })) }), id));
1932
1941
  };
1933
1942
 
1934
1943
  var CodeNode = function (_a) {
1935
1944
  var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Code$1 = _a.Code;
1936
1945
  var code = data.code;
1937
- return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(Code, __assign({ id: ForkIdWithType(id, type) }, Code$1, { children: code })) }), id));
1946
+ var _b = Container$1 || {}, sx = _b.sx, containerProps = __rest(_b, ["sx"]);
1947
+ return (jsxRuntime.exports.jsx(Container, __assign({ sx: sx }, containerProps, { children: jsxRuntime.exports.jsx(Code, __assign({ id: ForkIdWithType(id, type) }, Code$1, { children: code })) }), id));
1938
1948
  };
1939
1949
 
1940
1950
  var LinkNode = function (_a) {
1941
1951
  var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Link$1 = _a.Link;
1942
1952
  var _b = data.meta, image = _b.image, title = _b.title, description = _b.description, site_name = _b.site_name, link = data.link;
1943
- return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(Link, __assign({ id: ForkIdWithType(id, type), image: image.url, title: title, description: description, siteName: site_name, href: link }, Link$1)) }), id));
1953
+ var _c = Container$1 || {}, sx = _c.sx, containerProps = __rest(_c, ["sx"]);
1954
+ return (jsxRuntime.exports.jsx(Container, __assign({ sx: sx }, containerProps, { children: jsxRuntime.exports.jsx(Link, __assign({ id: ForkIdWithType(id, type), image: image.url, title: title, description: description, siteName: site_name, href: link }, Link$1)) }), id));
1944
1955
  };
1945
1956
 
1946
1957
  var DEFAULT_GAP = 10;
1947
1958
  var CheckListNode = function (_a) {
1948
1959
  var type = _a.type, data = _a.data, id = _a.id, tunes = _a.tunes, Container$1 = _a.Container, CheckList$1 = _a.CheckList, Item = _a.Item;
1949
1960
  var items = data.items;
1950
- return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(CheckList, __assign({ id: ForkIdWithType(id, type) }, CheckList$1, { sx: __assign({ display: 'flex', flexWrap: 'wrap', gap: "".concat(DEFAULT_GAP, "px"), borderRadius: '25px', padding: '20px', backgroundColor: function (_) { return _.palette.background.default; }, border: '1px solid #EFF3FE' }, CheckList$1 === null || CheckList$1 === void 0 ? void 0 : CheckList$1.sx) }, { children: items.map(function (_a, idx) {
1961
+ var _b = Container$1 || {}, sx = _b.sx, containerProps = __rest(_b, ["sx"]);
1962
+ return (jsxRuntime.exports.jsx(Container, __assign({ sx: sx }, containerProps, { children: jsxRuntime.exports.jsx(CheckList, __assign({ id: ForkIdWithType(id, type) }, CheckList$1, { sx: __assign({ display: 'flex', flexWrap: 'wrap', gap: "".concat(DEFAULT_GAP, "px"), borderRadius: '25px', padding: '20px', backgroundColor: function (_) { return _.palette.background.default; }, border: '1px solid #EFF3FE' }, CheckList$1 === null || CheckList$1 === void 0 ? void 0 : CheckList$1.sx) }, { children: items.map(function (_a, idx) {
1951
1963
  var _b, _c;
1952
1964
  var checked = _a.checked, text = _a.text;
1953
1965
  return (jsxRuntime.exports.jsxs(CheckListItem, __assign({}, Item, { sx: __assign(__assign(__assign({ display: 'flex', alignItems: 'center', flexWrap: 'nowrap', flexGrow: 0, columnGap: '5px', flexBasis: getFlexBasis(1, DEFAULT_GAP) }, (((_b = tunes === null || tunes === void 0 ? void 0 : tunes.columnTune) === null || _b === void 0 ? void 0 : _b.size) === 'two-columns' && {