@uiw/react-json-view 2.0.0-alpha.40 → 2.0.0-alpha.41

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/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  <div markdown="1">
2
2
  <sup>Using <a href="https://wangchujiang.com/#/app" target="_blank">my app</a> is also a way to <a href="https://wangchujiang.com/#/sponsor" target="_blank">support</a> me:</sup>
3
3
  <br>
4
+ <a target="_blank" href="https://apps.apple.com/app/6757317079" title="Screen Test for macOS"><img alt="Screen Test" height="52" width="52" src="https://wangchujiang.com/appicon/screen-test.png"></a>
4
5
  <a target="_blank" href="https://apps.apple.com/app/Deskmark/6755948110" title="Deskmark for macOS"><img alt="Deskmark" height="52" width="52" src="https://wangchujiang.com/appicon/deskmark.png"></a>
5
6
  <a target="_blank" href="https://apps.apple.com/app/Keyzer/6500434773" title="Keyzer for macOS"><img alt="Keyzer" height="52" width="52" src="https://wangchujiang.com/appicon/keyzer.png"></a>
6
7
  <a target="_blank" href="https://github.com/jaywcjlove/vidwall-hub" title="Vidwall Hub for macOS"><img alt="Vidwall Hub" height="52" width="52" src="https://wangchujiang.com/appicon/vidwall-hub.png"></a>
@@ -37,6 +37,13 @@ var Quote = exports.Quote = function Quote(props) {
37
37
  reset = (0, _objectWithoutProperties2["default"])(Comp, _excluded2);
38
38
  var Elm = as || 'span';
39
39
  var elmProps = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, other), reset);
40
+ // Trim the leading and trailing spaces in children,
41
+ // and set it to undefined if it's an empty string or contains only spaces.
42
+ // https://github.com/uiwjs/react-json-view/issues/86
43
+ if (typeof elmProps.children === 'string') {
44
+ var trimmed = elmProps.children.trim();
45
+ elmProps.children = trimmed || undefined;
46
+ }
40
47
  var result = {
41
48
  value: value,
42
49
  parentValue: parentValue,
@@ -33,6 +33,13 @@ export var Quote = props => {
33
33
  reset = _objectWithoutPropertiesLoose(Comp, _excluded2);
34
34
  var Elm = as || 'span';
35
35
  var elmProps = _extends({}, other, reset);
36
+ // Trim the leading and trailing spaces in children,
37
+ // and set it to undefined if it's an empty string or contains only spaces.
38
+ // https://github.com/uiwjs/react-json-view/issues/86
39
+ if (typeof elmProps.children === 'string') {
40
+ var trimmed = elmProps.children.trim();
41
+ elmProps.children = trimmed || undefined;
42
+ }
36
43
  var result = {
37
44
  value,
38
45
  parentValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uiw/react-json-view",
3
- "version": "2.0.0-alpha.40",
3
+ "version": "2.0.0-alpha.41",
4
4
  "description": "JSON viewer for react.",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -76,7 +76,7 @@
76
76
  },
77
77
  "repository": {
78
78
  "type": "git",
79
- "url": "https://github.com/uiwjs/react-json-view.git"
79
+ "url": "git+https://github.com/uiwjs/react-json-view.git"
80
80
  },
81
81
  "author": "Kenny Wang<wowohoo@qq.com>",
82
82
  "license": "MIT",