@gamelearn/arcade-components 0.19.1 → 0.19.3
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.
|
@@ -16,7 +16,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
16
16
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
17
|
|
|
18
18
|
var getRecursiveJSX = function getRecursiveJSX(jsx) {
|
|
19
|
-
var _jsx$props;
|
|
19
|
+
var _jsx$props, _jsx$props3;
|
|
20
20
|
|
|
21
21
|
var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
22
22
|
var slide = arguments.length > 2 ? arguments[2] : undefined;
|
|
@@ -55,8 +55,7 @@ var getRecursiveJSX = function getRecursiveJSX(jsx) {
|
|
|
55
55
|
}, props), children.map(function (child, i) {
|
|
56
56
|
return getRecursiveJSX(child, i, slide, onClick, onHover);
|
|
57
57
|
}));
|
|
58
|
-
}
|
|
59
|
-
|
|
58
|
+
}
|
|
60
59
|
|
|
61
60
|
return /*#__PURE__*/_react.default.createElement(Type, _extends({
|
|
62
61
|
key: "".concat(jsx.type, "_").concat(i)
|
|
@@ -64,13 +63,15 @@ var getRecursiveJSX = function getRecursiveJSX(jsx) {
|
|
|
64
63
|
} // console.log('🐮', jsx);
|
|
65
64
|
|
|
66
65
|
|
|
67
|
-
|
|
68
|
-
return word
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
if (((_jsx$props3 = jsx.props) === null || _jsx$props3 === void 0 ? void 0 : _jsx$props3.children) !== null) {
|
|
67
|
+
return jsx.split(' ').filter(function (word) {
|
|
68
|
+
return word !== '';
|
|
69
|
+
}).map(function (word, i) {
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
71
|
+
key: i
|
|
72
|
+
}, word);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
74
75
|
};
|
|
75
76
|
|
|
76
77
|
exports.getRecursiveJSX = getRecursiveJSX;
|