@wulperstudio/editor-render 0.0.9-beta → 0.0.11-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/cjs/dist/components/Link/index.d.ts +1 -1
- package/dist/cjs/dist/helpers/delimiter/index.d.ts +1 -1
- package/dist/cjs/index.js +29 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/dist/components/Link/index.d.ts +1 -1
- package/dist/esm/dist/helpers/delimiter/index.d.ts +1 -1
- package/dist/esm/index.js +29 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
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 && {
|
|
@@ -1766,8 +1766,8 @@ var SiteName = styled('span')(function (_a) {
|
|
|
1766
1766
|
});
|
|
1767
1767
|
|
|
1768
1768
|
var Link = function (_a) {
|
|
1769
|
-
var id = _a.id, image = _a.image, title = _a.title, description = _a.description, siteName = _a.siteName, sx = _a.sx, props = __rest(_a, ["id", "image", "title", "description", "siteName", "sx"]);
|
|
1770
|
-
return (jsxRuntime.exports.jsxs(RootLink, __assign({ id: id, target:
|
|
1769
|
+
var id = _a.id, image = _a.image, title = _a.title, description = _a.description, siteName = _a.siteName, href = _a.href, sx = _a.sx, props = __rest(_a, ["id", "image", "title", "description", "siteName", "href", "sx"]);
|
|
1770
|
+
return (jsxRuntime.exports.jsxs(RootLink, __assign({ as: href ? 'a' : 'div', id: id, href: href || undefined, target: href ? '_blank' : undefined, rel: href ? 'nofollow noindex noreferrer' : undefined, sx: sx }, props, { children: [jsxRuntime.exports.jsx(ImageFloat, { image: image }), jsxRuntime.exports.jsx(Title, { children: title }), jsxRuntime.exports.jsx(Description, { children: description }), jsxRuntime.exports.jsx(SiteName, { children: siteName })] }), id));
|
|
1771
1771
|
};
|
|
1772
1772
|
|
|
1773
1773
|
var RootCheckList = styled('div', {
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,51 @@ 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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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) {
|
|
1951
|
+
var _b;
|
|
1941
1952
|
var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Link$1 = _a.Link;
|
|
1942
|
-
var
|
|
1943
|
-
|
|
1953
|
+
var _c = data.meta, image = _c.image, title = _c.title, description = _c.description, site_name = _c.site_name, link = data.link;
|
|
1954
|
+
var _d = Container$1 || {}, sx = _d.sx, containerProps = __rest(_d, ["sx"]);
|
|
1955
|
+
return (jsxRuntime.exports.jsx(Container, __assign({ sx: sx }, containerProps, { children: jsxRuntime.exports.jsx(Link, __assign({ id: ForkIdWithType(id, type), image: (_b = image === null || image === void 0 ? void 0 : image.url) !== null && _b !== void 0 ? _b : '', title: title !== null && title !== void 0 ? title : '', description: description !== null && description !== void 0 ? description : '', siteName: site_name, href: link !== null && link !== void 0 ? link : '' }, Link$1)) }), id));
|
|
1944
1956
|
};
|
|
1945
1957
|
|
|
1946
1958
|
var DEFAULT_GAP = 10;
|
|
1947
1959
|
var CheckListNode = function (_a) {
|
|
1948
1960
|
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
1961
|
var items = data.items;
|
|
1950
|
-
|
|
1962
|
+
var _b = Container$1 || {}, sx = _b.sx, containerProps = __rest(_b, ["sx"]);
|
|
1963
|
+
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
1964
|
var _b, _c;
|
|
1952
1965
|
var checked = _a.checked, text = _a.text;
|
|
1953
1966
|
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' && {
|