@wulperstudio/editor-render 0.0.4-beta → 0.0.5-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/base/index.d.ts +75 -2
- package/dist/cjs/dist/components/CheckList/index.d.ts +1 -1
- package/dist/cjs/dist/components/CheckListItem/index.d.ts +2 -2
- package/dist/cjs/dist/components/Code/index.d.ts +1 -1
- package/dist/cjs/dist/components/Container/index.d.ts +3 -3
- package/dist/cjs/dist/components/Delimiter/index.d.ts +1 -1
- package/dist/cjs/dist/components/Embed/index.d.ts +1 -1
- package/dist/cjs/dist/components/Header/index.d.ts +1 -1
- package/dist/cjs/dist/components/Image/index.d.ts +1 -1
- package/dist/cjs/dist/components/Link/index.d.ts +2 -2
- package/dist/cjs/dist/components/List/index.d.ts +1 -1
- package/dist/cjs/dist/components/ListItem/index.d.ts +1 -1
- package/dist/cjs/dist/components/Paragraph/index.d.ts +1 -1
- package/dist/cjs/dist/components/Quote/index.d.ts +1 -1
- package/dist/cjs/dist/components/Raw/index.d.ts +1 -1
- package/dist/cjs/dist/components/Table/index.d.ts +1 -1
- package/dist/cjs/dist/components/TableCell/index.d.ts +1 -1
- package/dist/cjs/dist/components/TableRow/index.d.ts +1 -1
- package/dist/cjs/dist/helpers/RecursiveNode/index.d.ts +5 -4
- package/dist/cjs/dist/helpers/checklist/index.d.ts +9 -3
- package/dist/cjs/dist/helpers/code/index.d.ts +7 -3
- package/dist/cjs/dist/helpers/delimiter/index.d.ts +7 -3
- package/dist/cjs/dist/helpers/embed/index.d.ts +7 -3
- package/dist/cjs/dist/helpers/header/index.d.ts +7 -3
- package/dist/cjs/dist/helpers/image/index.d.ts +7 -3
- package/dist/cjs/dist/helpers/index.d.ts +12 -12
- package/dist/cjs/dist/helpers/link/index.d.ts +7 -3
- package/dist/cjs/dist/helpers/list/index.d.ts +8 -2
- package/dist/cjs/dist/helpers/paragraph/index.d.ts +7 -3
- package/dist/cjs/dist/helpers/quote/index.d.ts +7 -3
- package/dist/cjs/dist/helpers/raw/index.d.ts +7 -3
- package/dist/cjs/dist/helpers/table/index.d.ts +12 -4
- package/dist/cjs/index.js +87 -171
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/dist/base/index.d.ts +75 -2
- package/dist/esm/dist/components/CheckList/index.d.ts +1 -1
- package/dist/esm/dist/components/CheckListItem/index.d.ts +2 -2
- package/dist/esm/dist/components/Code/index.d.ts +1 -1
- package/dist/esm/dist/components/Container/index.d.ts +3 -3
- package/dist/esm/dist/components/Delimiter/index.d.ts +1 -1
- package/dist/esm/dist/components/Embed/index.d.ts +1 -1
- package/dist/esm/dist/components/Header/index.d.ts +1 -1
- package/dist/esm/dist/components/Image/index.d.ts +1 -1
- package/dist/esm/dist/components/Link/index.d.ts +2 -2
- package/dist/esm/dist/components/List/index.d.ts +1 -1
- package/dist/esm/dist/components/ListItem/index.d.ts +1 -1
- package/dist/esm/dist/components/Paragraph/index.d.ts +1 -1
- package/dist/esm/dist/components/Quote/index.d.ts +1 -1
- package/dist/esm/dist/components/Raw/index.d.ts +1 -1
- package/dist/esm/dist/components/Table/index.d.ts +1 -1
- package/dist/esm/dist/components/TableCell/index.d.ts +1 -1
- package/dist/esm/dist/components/TableRow/index.d.ts +1 -1
- package/dist/esm/dist/helpers/RecursiveNode/index.d.ts +5 -4
- package/dist/esm/dist/helpers/checklist/index.d.ts +9 -3
- package/dist/esm/dist/helpers/code/index.d.ts +7 -3
- package/dist/esm/dist/helpers/delimiter/index.d.ts +7 -3
- package/dist/esm/dist/helpers/embed/index.d.ts +7 -3
- package/dist/esm/dist/helpers/header/index.d.ts +7 -3
- package/dist/esm/dist/helpers/image/index.d.ts +7 -3
- package/dist/esm/dist/helpers/index.d.ts +12 -12
- package/dist/esm/dist/helpers/link/index.d.ts +7 -3
- package/dist/esm/dist/helpers/list/index.d.ts +8 -2
- package/dist/esm/dist/helpers/paragraph/index.d.ts +7 -3
- package/dist/esm/dist/helpers/quote/index.d.ts +7 -3
- package/dist/esm/dist/helpers/raw/index.d.ts +7 -3
- package/dist/esm/dist/helpers/table/index.d.ts +12 -4
- package/dist/esm/index.js +87 -171
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +122 -37
- package/dist/package.json +6 -4
- package/package.json +6 -4
package/dist/esm/index.js
CHANGED
|
@@ -52,34 +52,24 @@ function requireReactJsxRuntime_development () {
|
|
|
52
52
|
|
|
53
53
|
var React = require$$0;
|
|
54
54
|
|
|
55
|
-
// -----------------------------------------------------------------------------
|
|
56
|
-
|
|
57
|
-
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
58
|
-
var enableCacheElement = false;
|
|
59
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
60
|
-
|
|
61
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
62
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
63
|
-
// issues in DEV builds.
|
|
64
|
-
|
|
65
|
-
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
66
|
-
|
|
67
55
|
// ATTENTION
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
var
|
|
72
|
-
var
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
var
|
|
79
|
-
var
|
|
80
|
-
var
|
|
81
|
-
var
|
|
82
|
-
var
|
|
56
|
+
// When adding new symbols to this file,
|
|
57
|
+
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
58
|
+
// The Symbol used to tag the ReactElement-like types.
|
|
59
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
60
|
+
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
61
|
+
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
62
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
63
|
+
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
64
|
+
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
65
|
+
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
66
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
67
|
+
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
68
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
69
|
+
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
70
|
+
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
71
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
72
|
+
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
83
73
|
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
84
74
|
function getIteratorFn(maybeIterable) {
|
|
85
75
|
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
@@ -134,6 +124,18 @@ function requireReactJsxRuntime_development () {
|
|
|
134
124
|
}
|
|
135
125
|
}
|
|
136
126
|
|
|
127
|
+
// -----------------------------------------------------------------------------
|
|
128
|
+
|
|
129
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
130
|
+
var enableCacheElement = false;
|
|
131
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
132
|
+
|
|
133
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
134
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
135
|
+
// issues in DEV builds.
|
|
136
|
+
|
|
137
|
+
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
138
|
+
|
|
137
139
|
var REACT_MODULE_REFERENCE;
|
|
138
140
|
|
|
139
141
|
{
|
|
@@ -1764,7 +1766,7 @@ var getFlexBasis = function (columns, gap) {
|
|
|
1764
1766
|
return '100%';
|
|
1765
1767
|
};
|
|
1766
1768
|
|
|
1767
|
-
var
|
|
1769
|
+
var RecursiveNodeBase = function (domNode, idx) {
|
|
1768
1770
|
if (!('name' in domNode))
|
|
1769
1771
|
return null;
|
|
1770
1772
|
if (!('children' in domNode))
|
|
@@ -1772,265 +1774,179 @@ var RecursiveNode = function (domNode, idx) {
|
|
|
1772
1774
|
var name = domNode.name, children = domNode.children, attribs = domNode.attribs;
|
|
1773
1775
|
if (name === 'code') {
|
|
1774
1776
|
return (jsxRuntime.exports.jsx(InlineCode, __assign({ id: ForkIdWithType(idx, 'code') }, { children: domToReact(children, {
|
|
1775
|
-
replace: function (domNode) { return
|
|
1777
|
+
replace: function (domNode) { return RecursiveNodeBase(domNode, idx); },
|
|
1776
1778
|
}) })));
|
|
1777
1779
|
}
|
|
1778
1780
|
if (name === 'b') {
|
|
1779
1781
|
return (jsxRuntime.exports.jsx(Bold, __assign({ id: ForkIdWithType(idx, 'bold') }, { children: domToReact(children, {
|
|
1780
|
-
replace: function (domNode) { return
|
|
1782
|
+
replace: function (domNode) { return RecursiveNodeBase(domNode, idx); },
|
|
1781
1783
|
}) })));
|
|
1782
1784
|
}
|
|
1783
1785
|
if (name === 'i') {
|
|
1784
1786
|
return (jsxRuntime.exports.jsx(Italic, __assign({ id: ForkIdWithType(idx, 'italic') }, { children: domToReact(children, {
|
|
1785
|
-
replace: function (domNode) { return
|
|
1787
|
+
replace: function (domNode) { return RecursiveNodeBase(domNode, idx); },
|
|
1786
1788
|
}) })));
|
|
1787
1789
|
}
|
|
1788
1790
|
if (name === 'mark') {
|
|
1789
1791
|
return (jsxRuntime.exports.jsx(Marker, __assign({ id: ForkIdWithType(idx, 'marker') }, { children: domToReact(children, {
|
|
1790
|
-
replace: function (domNode) { return
|
|
1792
|
+
replace: function (domNode) { return RecursiveNodeBase(domNode, idx); },
|
|
1791
1793
|
}) })));
|
|
1792
1794
|
}
|
|
1793
1795
|
if (name === 'a') {
|
|
1794
1796
|
return (jsxRuntime.exports.jsx(Anchor, __assign({ id: ForkIdWithType(idx, 'anchor'), href: attribs === null || attribs === void 0 ? void 0 : attribs.href, rel: "noopener noreferrer", target: "_blank" }, { children: domToReact(children, {
|
|
1795
|
-
replace: function (domNode) { return
|
|
1797
|
+
replace: function (domNode) { return RecursiveNodeBase(domNode, idx); },
|
|
1796
1798
|
}) })));
|
|
1797
1799
|
}
|
|
1798
1800
|
return null;
|
|
1799
1801
|
};
|
|
1800
|
-
var
|
|
1802
|
+
var RecursiveNode = function (_a) {
|
|
1803
|
+
var html = _a.html, id = _a.id;
|
|
1801
1804
|
var purified = PurifyHtml(html);
|
|
1802
|
-
return Parse(purified, {
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
+
return (jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment, { children: Parse(purified, {
|
|
1806
|
+
replace: function (domNode) { return RecursiveNodeBase(domNode, id); },
|
|
1807
|
+
}) }));
|
|
1805
1808
|
};
|
|
1806
1809
|
|
|
1807
1810
|
var ParagraphNode = function (_a) {
|
|
1808
|
-
var type = _a.type, data = _a.data, id = _a.id;
|
|
1811
|
+
var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Paragraph$1 = _a.Paragraph;
|
|
1809
1812
|
var text = data.text;
|
|
1810
|
-
return (jsxRuntime.exports.jsx(Container, { children: jsxRuntime.exports.jsx(Paragraph, __assign({ id: ForkIdWithType(id, type) }, { children:
|
|
1813
|
+
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));
|
|
1811
1814
|
};
|
|
1812
1815
|
|
|
1813
1816
|
var HeaderNode = function (_a) {
|
|
1814
|
-
var type = _a.type, data = _a.data, id = _a.id;
|
|
1817
|
+
var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Header$1 = _a.Header;
|
|
1815
1818
|
var text = data.text;
|
|
1816
|
-
return (jsxRuntime.exports.jsx(Container, { children: jsxRuntime.exports.jsx(Header, __assign({ id: ForkIdWithType(id, type), level: data.level }, { children:
|
|
1819
|
+
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));
|
|
1817
1820
|
};
|
|
1818
1821
|
|
|
1819
1822
|
// SizeTypes = 'one-column' | 'two-columns' | 'three-columns';
|
|
1820
|
-
var RegExpTest = function (input) { return RegExp(/(.*):(.*)/).test(input); };
|
|
1821
1823
|
var DEFAULT_GAP$1 = 20;
|
|
1822
1824
|
var ListNode = function (_a) {
|
|
1823
|
-
var type = _a.type, data = _a.data, id = _a.id, tunes = _a.tunes;
|
|
1825
|
+
var type = _a.type, data = _a.data, id = _a.id, tunes = _a.tunes, List$1 = _a.List, Item = _a.Item;
|
|
1824
1826
|
var style = data.style;
|
|
1825
|
-
return (jsxRuntime.exports.jsx(Container, { children: jsxRuntime.exports.jsx(List, __assign({ id: ForkIdWithType(id, type), sx: {
|
|
1826
|
-
display: 'flex',
|
|
1827
|
-
flexWrap: 'wrap',
|
|
1828
|
-
gap: "".concat(DEFAULT_GAP$1, "px"),
|
|
1829
|
-
} }, { children: data.items.map(function (item, idx) {
|
|
1827
|
+
return (jsxRuntime.exports.jsx(Container, { 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) {
|
|
1830
1828
|
var _a, _b;
|
|
1831
|
-
|
|
1832
|
-
var strChilds = [];
|
|
1833
|
-
var nodeChilds = [];
|
|
1834
|
-
var reg = 0;
|
|
1835
|
-
if (typeof text === 'string') {
|
|
1836
|
-
strChilds = text.split(/:(.*)/s);
|
|
1837
|
-
}
|
|
1838
|
-
if (typeof text !== 'string') {
|
|
1839
|
-
if (Array.isArray(text)) {
|
|
1840
|
-
nodeChilds = text.map(function (child) {
|
|
1841
|
-
if (typeof child !== 'string') {
|
|
1842
|
-
var isValid = RegExpTest(child.props.children);
|
|
1843
|
-
if (isValid && reg === 0) {
|
|
1844
|
-
reg = 1;
|
|
1845
|
-
return __assign(__assign({}, child), { props: __assign(__assign({}, child.props), { children: [
|
|
1846
|
-
"".concat(child.props.children.split(/:(.*)/s)[0]),
|
|
1847
|
-
jsxRuntime.exports.jsx("br", {}, "".concat(child.props.children, "-br")),
|
|
1848
|
-
] }) });
|
|
1849
|
-
}
|
|
1850
|
-
return child;
|
|
1851
|
-
}
|
|
1852
|
-
return child;
|
|
1853
|
-
});
|
|
1854
|
-
}
|
|
1855
|
-
}
|
|
1856
|
-
return (jsxRuntime.exports.jsxs(ListItem, __assign({ sx: __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' && {
|
|
1829
|
+
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' && {
|
|
1857
1830
|
alignItems: 'center',
|
|
1858
1831
|
boxShadow: '0px 4px 25px rgba(0, 0, 0, 0.05)',
|
|
1859
1832
|
})), { flexBasis: getFlexBasis(1, DEFAULT_GAP$1) }), (((_a = tunes === null || tunes === void 0 ? void 0 : tunes.columnTune) === null || _a === void 0 ? void 0 : _a.size) === 'two-columns' && {
|
|
1860
1833
|
flexBasis: getFlexBasis(2, DEFAULT_GAP$1),
|
|
1861
1834
|
})), (((_b = tunes === null || tunes === void 0 ? void 0 : tunes.columnTune) === null || _b === void 0 ? void 0 : _b.size) === 'three-columns' && {
|
|
1862
1835
|
flexBasis: getFlexBasis(3, DEFAULT_GAP$1),
|
|
1863
|
-
})) }, { children: [jsxRuntime.exports.jsx(CheckBox, { checked: true, sx: {
|
|
1836
|
+
})), Item === null || Item === void 0 ? void 0 : Item.sx) }, { children: [jsxRuntime.exports.jsx(CheckBox, { checked: true, sx: {
|
|
1864
1837
|
padding: '5px',
|
|
1865
|
-
} }), jsxRuntime.exports.jsx(Box, { children: jsxRuntime.exports.
|
|
1838
|
+
} }), jsxRuntime.exports.jsx(Box, { children: jsxRuntime.exports.jsx(Paragraph, { children: jsxRuntime.exports.jsx(RecursiveNode, { html: item, id: id }) }) })] }), idx));
|
|
1866
1839
|
}) })) }, id));
|
|
1867
1840
|
};
|
|
1868
1841
|
|
|
1869
1842
|
var ImageNode = function (_a) {
|
|
1870
|
-
var type = _a.type, data = _a.data, id = _a.id;
|
|
1843
|
+
var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Image$1 = _a.Image;
|
|
1871
1844
|
var url = data.url, caption = data.caption, withBorder = data.withBorder, stretched = data.stretched, withBackground = data.withBackground;
|
|
1872
|
-
return (jsxRuntime.exports.jsx(Container, __assign({ stretched: stretched }, { children: jsxRuntime.exports.jsx(Image, { id: ForkIdWithType(id, type), src: url, alt: caption, caption: caption, withBorder: withBorder, stretched: stretched, withBackground: withBackground }, ForkIdWithType(id, type)) }), id));
|
|
1845
|
+
return (jsxRuntime.exports.jsx(Container, __assign({ stretched: stretched }, Container$1, { children: jsxRuntime.exports.jsx(Image, __assign({ id: ForkIdWithType(id, type), src: url, alt: caption, caption: caption, withBorder: withBorder, stretched: stretched, withBackground: withBackground }, Image$1), ForkIdWithType(id, type)) }), id));
|
|
1873
1846
|
};
|
|
1874
1847
|
|
|
1875
1848
|
var TableNode = function (_a) {
|
|
1876
|
-
var type = _a.type, data = _a.data, id = _a.id;
|
|
1849
|
+
var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container;
|
|
1877
1850
|
var content = data.content;
|
|
1878
|
-
return (jsxRuntime.exports.jsx(Container, { children: jsxRuntime.exports.jsx(Table, __assign({ id: ForkIdWithType(id, type) }, { children: content.map(function (row, rowIdx) { return (
|
|
1851
|
+
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 (
|
|
1879
1852
|
// eslint-disable-next-line react/no-array-index-key
|
|
1880
1853
|
jsxRuntime.exports.jsx(TableRow, { children: row.map(function (cell, cellIdx) { return (
|
|
1881
1854
|
// eslint-disable-next-line react/no-array-index-key
|
|
1882
|
-
jsxRuntime.exports.jsx(TableCell, { children:
|
|
1855
|
+
jsxRuntime.exports.jsx(TableCell, { children: jsxRuntime.exports.jsx(RecursiveNode, { html: cell, id: id }) }, cellIdx)); }) }, rowIdx)); }) }), ForkIdWithType(id, type)) }), id));
|
|
1883
1856
|
};
|
|
1884
1857
|
|
|
1885
1858
|
var DelimiterNode = function (_a) {
|
|
1886
|
-
var type = _a.type, id = _a.id;
|
|
1887
|
-
return (jsxRuntime.exports.jsx(Container, { children: jsxRuntime.exports.jsx(Delimiter, { id: ForkIdWithType(id, type) }) }, id));
|
|
1859
|
+
var type = _a.type, id = _a.id, Delimiter$1 = _a.Delimiter, Container$1 = _a.Container;
|
|
1860
|
+
return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(Delimiter, __assign({ id: ForkIdWithType(id, type) }, Delimiter$1)) }), id));
|
|
1888
1861
|
};
|
|
1889
1862
|
|
|
1890
1863
|
var EmbedNode = function (_a) {
|
|
1891
|
-
var type = _a.type, data = _a.data, id = _a.id;
|
|
1864
|
+
var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Embed$1 = _a.Embed;
|
|
1892
1865
|
// eslint-disable-next-line no-unused-vars
|
|
1893
1866
|
data.service; data.source; var embed = data.embed, width = data.width, height = data.height; data.caption;
|
|
1894
|
-
return (jsxRuntime.exports.jsx(Container, { children: jsxRuntime.exports.jsx(Embed, { id: ForkIdWithType(id, type), src: embed, width: width, height: height }) }, id));
|
|
1867
|
+
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));
|
|
1895
1868
|
};
|
|
1896
1869
|
|
|
1897
1870
|
var RawNode = function (_a) {
|
|
1898
|
-
var type = _a.type, data = _a.data, id = _a.id;
|
|
1899
|
-
return (jsxRuntime.exports.jsx(Container, { children: jsxRuntime.exports.jsx(Raw, __assign({ id: ForkIdWithType(id, type) }, { children: data.html })) }, id));
|
|
1871
|
+
var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Raw$1 = _a.Raw;
|
|
1872
|
+
return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(Raw, __assign({ id: ForkIdWithType(id, type) }, Raw$1, { children: data.html })) }), id));
|
|
1900
1873
|
};
|
|
1901
1874
|
|
|
1902
1875
|
var QuoteNode = function (_a) {
|
|
1903
|
-
var type = _a.type, data = _a.data, id = _a.id;
|
|
1904
|
-
return (jsxRuntime.exports.jsx(Container, { children: jsxRuntime.exports.jsx(Quote, __assign({ id: ForkIdWithType(id, type) }, { children: data.text })) }, id));
|
|
1876
|
+
var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Quote$1 = _a.Quote;
|
|
1877
|
+
return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(Quote, __assign({ id: ForkIdWithType(id, type) }, Quote$1, { children: data.text })) }), id));
|
|
1905
1878
|
};
|
|
1906
1879
|
|
|
1907
1880
|
var CodeNode = function (_a) {
|
|
1908
|
-
var type = _a.type, data = _a.data, id = _a.id;
|
|
1881
|
+
var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Code$1 = _a.Code;
|
|
1909
1882
|
var code = data.code;
|
|
1910
|
-
return (jsxRuntime.exports.jsx(Container, { children: jsxRuntime.exports.jsx(Code, __assign({ id: ForkIdWithType(id, type) }, { children: code })) }, id));
|
|
1883
|
+
return (jsxRuntime.exports.jsx(Container, __assign({}, Container$1, { children: jsxRuntime.exports.jsx(Code, __assign({ id: ForkIdWithType(id, type) }, Code$1, { children: code })) }), id));
|
|
1911
1884
|
};
|
|
1912
1885
|
|
|
1913
1886
|
var LinkNode = function (_a) {
|
|
1914
|
-
var type = _a.type, data = _a.data, id = _a.id;
|
|
1887
|
+
var type = _a.type, data = _a.data, id = _a.id, Container$1 = _a.Container, Link$1 = _a.Link;
|
|
1915
1888
|
var _b = data.meta, image = _b.image, title = _b.title, description = _b.description, site_name = _b.site_name, link = data.link;
|
|
1916
|
-
return (jsxRuntime.exports.jsx(Container, { children: jsxRuntime.exports.jsx(Link, { id: ForkIdWithType(id, type), image: image.url, title: title, description: description, siteName: site_name, href: link }) }, id));
|
|
1889
|
+
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));
|
|
1917
1890
|
};
|
|
1918
1891
|
|
|
1919
1892
|
var DEFAULT_GAP = 10;
|
|
1920
1893
|
var CheckListNode = function (_a) {
|
|
1921
|
-
var type = _a.type, data = _a.data, id = _a.id, tunes = _a.tunes;
|
|
1894
|
+
var type = _a.type, data = _a.data, id = _a.id, tunes = _a.tunes, Container$1 = _a.Container, CheckList$1 = _a.CheckList, Item = _a.Item;
|
|
1922
1895
|
var items = data.items;
|
|
1923
|
-
return (jsxRuntime.exports.jsx(Container, { children: jsxRuntime.exports.jsx(CheckList, __assign({ id: ForkIdWithType(id, type), sx: {
|
|
1924
|
-
display: 'flex',
|
|
1925
|
-
flexWrap: 'wrap',
|
|
1926
|
-
gap: "".concat(DEFAULT_GAP, "px"),
|
|
1927
|
-
borderRadius: '25px',
|
|
1928
|
-
padding: '20px',
|
|
1929
|
-
backgroundColor: function (_) { return _.palette.background.default; },
|
|
1930
|
-
border: '1px solid #EFF3FE',
|
|
1931
|
-
} }, { children: items.map(function (_a, idx) {
|
|
1896
|
+
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) {
|
|
1932
1897
|
var _b, _c;
|
|
1933
1898
|
var checked = _a.checked, text = _a.text;
|
|
1934
|
-
return (jsxRuntime.exports.jsxs(CheckListItem, __assign({ sx: __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' && {
|
|
1899
|
+
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' && {
|
|
1935
1900
|
flexBasis: getFlexBasis(2, DEFAULT_GAP),
|
|
1936
1901
|
})), (((_c = tunes === null || tunes === void 0 ? void 0 : tunes.columnTune) === null || _c === void 0 ? void 0 : _c.size) === 'three-columns' && {
|
|
1937
1902
|
flexBasis: getFlexBasis(3, DEFAULT_GAP),
|
|
1938
|
-
})) }, { children: [jsxRuntime.exports.jsx(CheckBox, { checked: checked, sx: {
|
|
1903
|
+
})), Item === null || Item === void 0 ? void 0 : Item.sx) }, { children: [jsxRuntime.exports.jsx(CheckBox, { checked: checked, sx: {
|
|
1939
1904
|
padding: '5px',
|
|
1940
|
-
} }), jsxRuntime.exports.jsx(Paragraph, { children:
|
|
1941
|
-
}) })) }, id));
|
|
1905
|
+
} }), jsxRuntime.exports.jsx(Paragraph, { children: jsxRuntime.exports.jsx(RecursiveNode, { html: text, id: id }) })] }), idx));
|
|
1906
|
+
}) })) }), id));
|
|
1942
1907
|
};
|
|
1943
1908
|
|
|
1944
|
-
var
|
|
1909
|
+
var BaseNodesEditor = function (_a) {
|
|
1910
|
+
var value = _a.value, ParagraphSlot = _a.ParagraphSlot, HeaderSlot = _a.HeaderSlot, DelimiterSlot = _a.DelimiterSlot, ListSlot = _a.ListSlot, ImageSlot = _a.ImageSlot, TableSlot = _a.TableSlot, EmbedSlot = _a.EmbedSlot, RawSlot = _a.RawSlot, QuoteSlot = _a.QuoteSlot, CodeSlot = _a.CodeSlot, LinkSlot = _a.LinkSlot, CheckListSlot = _a.CheckListSlot;
|
|
1945
1911
|
var blocks = value.blocks;
|
|
1946
1912
|
return blocks.map(function (_a) {
|
|
1947
1913
|
var id = _a.id, type = _a.type, data = _a.data, tunes = _a.tunes;
|
|
1948
1914
|
switch (type) {
|
|
1949
1915
|
case 'paragraph': {
|
|
1950
|
-
return ParagraphNode({
|
|
1951
|
-
id: id,
|
|
1952
|
-
type: type,
|
|
1953
|
-
data: data,
|
|
1954
|
-
});
|
|
1916
|
+
return (jsxRuntime.exports.jsx(ParagraphNode, __assign({ id: id, type: type, data: data }, ParagraphSlot)));
|
|
1955
1917
|
}
|
|
1956
1918
|
case 'header': {
|
|
1957
|
-
return HeaderNode({
|
|
1958
|
-
id: id,
|
|
1959
|
-
type: type,
|
|
1960
|
-
data: data,
|
|
1961
|
-
});
|
|
1919
|
+
return (jsxRuntime.exports.jsx(HeaderNode, __assign({ id: id, type: type, data: data }, HeaderSlot)));
|
|
1962
1920
|
}
|
|
1963
1921
|
case 'delimiter': {
|
|
1964
|
-
return DelimiterNode({
|
|
1965
|
-
id: id,
|
|
1966
|
-
type: type,
|
|
1967
|
-
data: data,
|
|
1968
|
-
});
|
|
1922
|
+
return (jsxRuntime.exports.jsx(DelimiterNode, __assign({ id: id, type: type, data: data }, DelimiterSlot)));
|
|
1969
1923
|
}
|
|
1970
1924
|
case 'list': {
|
|
1971
|
-
return ListNode({
|
|
1972
|
-
id: id,
|
|
1973
|
-
type: type,
|
|
1974
|
-
data: data,
|
|
1975
|
-
tunes: tunes,
|
|
1976
|
-
});
|
|
1925
|
+
return (jsxRuntime.exports.jsx(ListNode, __assign({ id: id, type: type, data: data, tunes: tunes }, ListSlot)));
|
|
1977
1926
|
}
|
|
1978
1927
|
case 'image': {
|
|
1979
|
-
return ImageNode({
|
|
1980
|
-
id: id,
|
|
1981
|
-
type: type,
|
|
1982
|
-
data: data,
|
|
1983
|
-
});
|
|
1928
|
+
return (jsxRuntime.exports.jsx(ImageNode, __assign({ id: id, type: type, data: data }, ImageSlot)));
|
|
1984
1929
|
}
|
|
1985
1930
|
case 'table': {
|
|
1986
|
-
return TableNode({
|
|
1987
|
-
id: id,
|
|
1988
|
-
type: type,
|
|
1989
|
-
data: data,
|
|
1990
|
-
});
|
|
1931
|
+
return (jsxRuntime.exports.jsx(TableNode, __assign({ id: id, type: type, data: data }, TableSlot)));
|
|
1991
1932
|
}
|
|
1992
1933
|
case 'embed': {
|
|
1993
|
-
return EmbedNode({
|
|
1994
|
-
id: id,
|
|
1995
|
-
type: type,
|
|
1996
|
-
data: data,
|
|
1997
|
-
});
|
|
1934
|
+
return (jsxRuntime.exports.jsx(EmbedNode, __assign({ id: id, type: type, data: data }, EmbedSlot)));
|
|
1998
1935
|
}
|
|
1999
1936
|
case 'rawTool': {
|
|
2000
|
-
return RawNode({
|
|
2001
|
-
id: id,
|
|
2002
|
-
type: type,
|
|
2003
|
-
data: data,
|
|
2004
|
-
});
|
|
1937
|
+
return (jsxRuntime.exports.jsx(RawNode, __assign({ id: id, type: type, data: data }, RawSlot)));
|
|
2005
1938
|
}
|
|
2006
1939
|
case 'quote': {
|
|
2007
|
-
return QuoteNode({
|
|
2008
|
-
id: id,
|
|
2009
|
-
type: type,
|
|
2010
|
-
data: data,
|
|
2011
|
-
});
|
|
1940
|
+
return (jsxRuntime.exports.jsx(QuoteNode, __assign({ id: id, type: type, data: data }, QuoteSlot)));
|
|
2012
1941
|
}
|
|
2013
1942
|
case 'code': {
|
|
2014
|
-
return CodeNode({
|
|
2015
|
-
id: id,
|
|
2016
|
-
type: type,
|
|
2017
|
-
data: data,
|
|
2018
|
-
});
|
|
1943
|
+
return (jsxRuntime.exports.jsx(CodeNode, __assign({ id: id, type: type, data: data }, CodeSlot)));
|
|
2019
1944
|
}
|
|
2020
1945
|
case 'linkTool': {
|
|
2021
|
-
return LinkNode({
|
|
2022
|
-
id: id,
|
|
2023
|
-
type: type,
|
|
2024
|
-
data: data,
|
|
2025
|
-
});
|
|
1946
|
+
return (jsxRuntime.exports.jsx(LinkNode, __assign({ id: id, type: type, data: data }, LinkSlot)));
|
|
2026
1947
|
}
|
|
2027
1948
|
case 'checklist': {
|
|
2028
|
-
return CheckListNode({
|
|
2029
|
-
id: id,
|
|
2030
|
-
type: type,
|
|
2031
|
-
data: data,
|
|
2032
|
-
tunes: tunes,
|
|
2033
|
-
});
|
|
1949
|
+
return (jsxRuntime.exports.jsx(CheckListNode, __assign({ id: id, type: type, data: data, tunes: tunes }, CheckListSlot)));
|
|
2034
1950
|
}
|
|
2035
1951
|
default: {
|
|
2036
1952
|
return null;
|
|
@@ -2039,5 +1955,5 @@ var getBaseNodesFromEditor = function (value) {
|
|
|
2039
1955
|
});
|
|
2040
1956
|
};
|
|
2041
1957
|
|
|
2042
|
-
export { CheckListNode, CodeNode, DelimiterNode, Anchor as EditorAnchor, Bold as EditorBold, CheckBox as EditorCheckBox, CheckList as EditorCheckList, CheckListItem as EditorCheckListItem, Code as EditorCode, Container as EditorContainer, Delimiter as EditorDelimiter, Embed as EditorEmbed, Header as EditorHeader, Image as EditorImage, InlineCode as EditorInlineCode, Italic as EditorItalic, Link as EditorLink, List as EditorList, ListItem as EditorListItem, Marker as EditorMarker, Paragraph as EditorParagraph, Quote as EditorQuote, Raw as EditorRaw, Table as EditorTable, TableCell as EditorTableCell, TableRow as EditorTableRow, EmbedNode, ForkIdWithType, HeaderNode, ImageNode, LinkNode, ListNode, ParagraphNode, PurifyHtml, QuoteNode, RawNode, RecursiveNode, TableNode,
|
|
1958
|
+
export { BaseNodesEditor, CheckListNode, CodeNode, DelimiterNode, Anchor as EditorAnchor, Bold as EditorBold, CheckBox as EditorCheckBox, CheckList as EditorCheckList, CheckListItem as EditorCheckListItem, Code as EditorCode, Container as EditorContainer, Delimiter as EditorDelimiter, Embed as EditorEmbed, Header as EditorHeader, Image as EditorImage, InlineCode as EditorInlineCode, Italic as EditorItalic, Link as EditorLink, List as EditorList, ListItem as EditorListItem, Marker as EditorMarker, Paragraph as EditorParagraph, Quote as EditorQuote, Raw as EditorRaw, Table as EditorTable, TableCell as EditorTableCell, TableRow as EditorTableRow, EmbedNode, ForkIdWithType, HeaderNode, ImageNode, LinkNode, ListNode, ParagraphNode, PurifyHtml, QuoteNode, RawNode, RecursiveNode, TableNode, getFlexBasis };
|
|
2043
1959
|
//# sourceMappingURL=index.js.map
|