@uiw/react-json-view 2.0.0-alpha.20 → 2.0.0-alpha.21
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/cjs/comps/Copied.js +3 -1
- package/esm/Container.js +1 -2
- package/esm/comps/Copied.js +1 -1
- package/esm/comps/KeyValues.js +1 -2
- package/esm/comps/NestedOpen.js +1 -2
- package/esm/editor/index.js +1 -2
- package/esm/index.js +1 -2
- package/esm/types/index.js +1 -2
- package/package.json +1 -1
package/cjs/comps/Copied.js
CHANGED
|
@@ -47,7 +47,9 @@ var Copied = exports.Copied = function Copied(props) {
|
|
|
47
47
|
} else if (value instanceof Date) {
|
|
48
48
|
copyText = value.toLocaleString();
|
|
49
49
|
} else {
|
|
50
|
-
copyText = JSON.stringify(value,
|
|
50
|
+
copyText = JSON.stringify(value, function (_, v) {
|
|
51
|
+
return typeof v === 'bigint' ? v + 'n' : v;
|
|
52
|
+
}, 2);
|
|
51
53
|
}
|
|
52
54
|
onCopied && onCopied(copyText, value);
|
|
53
55
|
setCopied(true);
|
package/esm/Container.js
CHANGED
|
@@ -6,8 +6,7 @@ import { NestedClose } from './comps/NestedClose';
|
|
|
6
6
|
import { NestedOpen } from './comps/NestedOpen';
|
|
7
7
|
import { KeyValues } from './comps/KeyValues';
|
|
8
8
|
import { useShowToolsDispatch } from './store/ShowTools';
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
10
|
export var Container = /*#__PURE__*/forwardRef((props, ref) => {
|
|
12
11
|
var {
|
|
13
12
|
className = '',
|
package/esm/comps/Copied.js
CHANGED
|
@@ -39,7 +39,7 @@ export var Copied = props => {
|
|
|
39
39
|
} else if (value instanceof Date) {
|
|
40
40
|
copyText = value.toLocaleString();
|
|
41
41
|
} else {
|
|
42
|
-
copyText = JSON.stringify(value,
|
|
42
|
+
copyText = JSON.stringify(value, (_, v) => typeof v === 'bigint' ? v + 'n' : v, 2);
|
|
43
43
|
}
|
|
44
44
|
onCopied && onCopied(copyText, value);
|
|
45
45
|
setCopied(true);
|
package/esm/comps/KeyValues.js
CHANGED
|
@@ -10,8 +10,7 @@ import { Container } from '../Container';
|
|
|
10
10
|
import { Quote, Colon } from '../symbol';
|
|
11
11
|
import { useHighlight } from '../utils/useHighlight';
|
|
12
12
|
import { Copied } from '../comps/Copied';
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
14
|
export var KeyValues = props => {
|
|
16
15
|
var _expands$expandKey;
|
|
17
16
|
var {
|
package/esm/comps/NestedOpen.js
CHANGED
|
@@ -8,8 +8,7 @@ import { CountInfoComp } from '../section/CountInfo';
|
|
|
8
8
|
import { Arrow, BracketsOpen, BracketsClose } from '../symbol';
|
|
9
9
|
import { EllipsisComp } from '../section/Ellipsis';
|
|
10
10
|
import { SetComp, MapComp } from '../types';
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
12
|
export var NestedOpen = props => {
|
|
14
13
|
var _expands$expandKey;
|
|
15
14
|
var {
|
package/esm/editor/index.js
CHANGED
|
@@ -5,8 +5,7 @@ import { forwardRef } from 'react';
|
|
|
5
5
|
import JsonView from '../';
|
|
6
6
|
import { KeyNameRender } from './KeyName';
|
|
7
7
|
import { Context, Dispatch, useStoreReducer } from './store';
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
9
|
var JsonViewEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
11
10
|
var {
|
|
12
11
|
children,
|
package/esm/index.js
CHANGED
|
@@ -31,8 +31,7 @@ import { CountInfoExtra } from './section/CountInfoExtra';
|
|
|
31
31
|
import { Ellipsis } from './section/Ellipsis';
|
|
32
32
|
import { KeyName } from './section/KeyName';
|
|
33
33
|
import { Row } from './section/Row';
|
|
34
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
35
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
34
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
36
35
|
export * from './store';
|
|
37
36
|
export * from './store/Expands';
|
|
38
37
|
export * from './store/ShowTools';
|
package/esm/types/index.js
CHANGED
|
@@ -17,8 +17,7 @@ import { Fragment, useEffect, useState } from 'react';
|
|
|
17
17
|
import { useTypesStore } from '../store/Types';
|
|
18
18
|
import { useStore } from '../store';
|
|
19
19
|
import { ValueQuote } from '../symbol';
|
|
20
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
21
|
export var SetComp = _ref => {
|
|
23
22
|
var {
|
|
24
23
|
value,
|