@uiw/react-json-view 2.0.0-alpha.2 → 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/README.md +146 -21
- package/basic.d.ts +3 -0
- package/cjs/Container.d.ts +2 -0
- package/cjs/Container.js +9 -4
- package/cjs/arrow/TriangleArrow.js +1 -1
- package/cjs/comps/Copied.d.ts +2 -3
- package/cjs/comps/Copied.js +29 -16
- package/cjs/comps/KeyValues.d.ts +2 -4
- package/cjs/comps/KeyValues.js +49 -24
- package/cjs/comps/NestedClose.js +3 -4
- package/cjs/comps/NestedOpen.d.ts +2 -3
- package/cjs/comps/NestedOpen.js +23 -17
- package/cjs/comps/Value.d.ts +1 -2
- package/cjs/comps/Value.js +16 -20
- package/cjs/editor/KeyName.d.ts +2 -0
- package/cjs/editor/KeyName.js +82 -0
- package/cjs/editor/index.d.ts +19 -0
- package/cjs/editor/index.js +44 -0
- package/cjs/editor/store.d.ts +28 -0
- package/cjs/editor/store.js +23 -0
- package/cjs/index.d.ts +5 -3
- package/cjs/index.js +11 -8
- package/cjs/section/Copied.d.ts +1 -1
- package/cjs/section/Copied.js +1 -2
- package/cjs/section/CountInfo.d.ts +10 -1
- package/cjs/section/CountInfo.js +42 -4
- package/cjs/section/CountInfoExtra.d.ts +10 -1
- package/cjs/section/CountInfoExtra.js +32 -4
- package/cjs/section/Ellipsis.d.ts +10 -0
- package/cjs/section/Ellipsis.js +30 -4
- package/cjs/section/KeyName.d.ts +8 -0
- package/cjs/section/KeyName.js +40 -4
- package/cjs/section/Row.d.ts +14 -0
- package/cjs/section/Row.js +51 -0
- package/cjs/store/Expands.js +2 -4
- package/cjs/store/Section.d.ts +12 -6
- package/cjs/store/Section.js +6 -4
- package/cjs/store/ShowTools.js +2 -4
- package/cjs/store/Symbols.d.ts +2 -2
- package/cjs/store/Symbols.js +2 -4
- package/cjs/store/Types.d.ts +28 -24
- package/cjs/store/Types.js +8 -8
- package/cjs/store.d.ts +7 -4
- package/cjs/store.js +5 -10
- package/cjs/symbol/Arrow.d.ts +1 -1
- package/cjs/symbol/Arrow.js +1 -2
- package/cjs/symbol/BraceLeft.d.ts +1 -1
- package/cjs/symbol/BraceLeft.js +1 -2
- package/cjs/symbol/BraceRight.d.ts +1 -1
- package/cjs/symbol/BraceRight.js +1 -2
- package/cjs/symbol/BracketsLeft.d.ts +1 -1
- package/cjs/symbol/BracketsLeft.js +1 -2
- package/cjs/symbol/BracketsRight.d.ts +1 -1
- package/cjs/symbol/BracketsRight.js +1 -2
- package/cjs/symbol/Colon.d.ts +1 -1
- package/cjs/symbol/Colon.js +1 -2
- package/cjs/symbol/Quote.d.ts +1 -1
- package/cjs/symbol/Quote.js +1 -2
- package/cjs/symbol/ValueQuote.d.ts +1 -1
- package/cjs/symbol/ValueQuote.js +1 -2
- package/{esm/comps/ReRender/Symbols.d.ts → cjs/symbol/index.d.ts} +4 -6
- package/cjs/{comps/ReRender/Symbols.js → symbol/index.js} +32 -33
- package/cjs/theme/basic.js +4 -3
- package/cjs/theme/dark.js +2 -3
- package/cjs/theme/github.dark.js +2 -3
- package/cjs/theme/github.light.js +2 -3
- package/cjs/theme/gruvbox.js +2 -3
- package/cjs/theme/light.js +2 -3
- package/cjs/theme/monokai.js +2 -3
- package/cjs/theme/nord.js +2 -3
- package/cjs/theme/vscode.js +2 -3
- package/cjs/types/Bigint.d.ts +1 -1
- package/cjs/types/Bigint.js +1 -2
- package/cjs/types/Date.d.ts +1 -1
- package/cjs/types/Date.js +1 -2
- package/cjs/types/False.d.ts +1 -1
- package/cjs/types/False.js +1 -2
- package/cjs/types/Float.d.ts +1 -1
- package/cjs/types/Float.js +1 -2
- package/cjs/types/Int.d.ts +1 -1
- package/cjs/types/Int.js +1 -2
- package/cjs/types/Map.d.ts +1 -1
- package/cjs/types/Map.js +1 -2
- package/cjs/types/Nan.d.ts +1 -1
- package/cjs/types/Nan.js +1 -2
- package/cjs/types/Null.d.ts +1 -1
- package/cjs/types/Null.js +1 -2
- package/cjs/types/Set.d.ts +1 -1
- package/cjs/types/Set.js +1 -2
- package/cjs/types/String.d.ts +1 -1
- package/cjs/types/String.js +1 -2
- package/cjs/types/True.d.ts +1 -1
- package/cjs/types/True.js +1 -2
- package/cjs/types/Undefined.d.ts +1 -1
- package/cjs/types/Undefined.js +1 -2
- package/cjs/types/Url.d.ts +1 -1
- package/cjs/types/Url.js +1 -2
- package/{esm/comps/ReRender/Types.d.ts → cjs/types/index.d.ts} +2 -2
- package/cjs/{comps/ReRender/Types.js → types/index.js} +92 -171
- package/cjs/utils/useHighlight.js +0 -1
- package/cjs/utils/useRender.d.ts +1 -1
- package/editor.d.ts +22 -20
- package/esm/Container.d.ts +2 -0
- package/esm/Container.js +10 -4
- package/esm/arrow/TriangleArrow.js +1 -1
- package/esm/comps/Copied.d.ts +2 -3
- package/esm/comps/Copied.js +27 -15
- package/esm/comps/KeyValues.d.ts +2 -4
- package/esm/comps/KeyValues.js +37 -15
- package/esm/comps/NestedClose.js +1 -1
- package/esm/comps/NestedOpen.d.ts +2 -3
- package/esm/comps/NestedOpen.js +18 -12
- package/esm/comps/Value.d.ts +1 -2
- package/esm/comps/Value.js +3 -5
- package/esm/editor/KeyName.d.ts +2 -0
- package/esm/editor/KeyName.js +77 -0
- package/esm/editor/index.d.ts +19 -0
- package/esm/editor/index.js +33 -0
- package/esm/editor/store.d.ts +28 -0
- package/esm/editor/store.js +13 -0
- package/esm/index.d.ts +5 -3
- package/esm/index.js +9 -6
- package/esm/section/Copied.d.ts +1 -1
- package/esm/section/CountInfo.d.ts +10 -1
- package/esm/section/CountInfo.js +43 -1
- package/esm/section/CountInfoExtra.d.ts +10 -1
- package/esm/section/CountInfoExtra.js +32 -1
- package/esm/section/Ellipsis.d.ts +10 -0
- package/esm/section/Ellipsis.js +31 -1
- package/esm/section/KeyName.d.ts +8 -0
- package/esm/section/KeyName.js +41 -1
- package/esm/section/Row.d.ts +14 -0
- package/esm/section/Row.js +47 -0
- package/esm/store/Section.d.ts +12 -6
- package/esm/store/Section.js +4 -0
- package/esm/store/Symbols.d.ts +2 -2
- package/esm/store/Types.d.ts +28 -24
- package/esm/store/Types.js +6 -4
- package/esm/store.d.ts +7 -4
- package/esm/symbol/Arrow.d.ts +1 -1
- package/esm/symbol/BraceLeft.d.ts +1 -1
- package/esm/symbol/BraceRight.d.ts +1 -1
- package/esm/symbol/BracketsLeft.d.ts +1 -1
- package/esm/symbol/BracketsRight.d.ts +1 -1
- package/esm/symbol/Colon.d.ts +1 -1
- package/esm/symbol/Quote.d.ts +1 -1
- package/esm/symbol/ValueQuote.d.ts +1 -1
- package/{cjs/comps/ReRender/Symbols.d.ts → esm/symbol/index.d.ts} +4 -6
- package/esm/{comps/ReRender/Symbols.js → symbol/index.js} +26 -24
- package/esm/theme/basic.js +2 -0
- package/esm/types/Bigint.d.ts +1 -1
- package/esm/types/Date.d.ts +1 -1
- package/esm/types/False.d.ts +1 -1
- package/esm/types/Float.d.ts +1 -1
- package/esm/types/Int.d.ts +1 -1
- package/esm/types/Map.d.ts +1 -1
- package/esm/types/Nan.d.ts +1 -1
- package/esm/types/Null.d.ts +1 -1
- package/esm/types/Set.d.ts +1 -1
- package/esm/types/String.d.ts +1 -1
- package/esm/types/True.d.ts +1 -1
- package/esm/types/Undefined.d.ts +1 -1
- package/esm/types/Url.d.ts +1 -1
- package/{cjs/comps/ReRender/Types.d.ts → esm/types/index.d.ts} +2 -2
- package/esm/{comps/ReRender/Types.js → types/index.js} +76 -148
- package/esm/utils/useHighlight.js +0 -1
- package/esm/utils/useRender.d.ts +1 -1
- package/githubDark.d.ts +3 -0
- package/githubLight.d.ts +3 -0
- package/gruvbox.d.ts +3 -0
- package/monokai.d.ts +3 -0
- package/nord.d.ts +3 -0
- package/package.json +11 -5
- package/vscode.d.ts +3 -0
- package/cjs/comps/CountInfo.d.ts +0 -19
- package/cjs/comps/CountInfo.js +0 -72
- package/cjs/comps/Ellipsis.d.ts +0 -10
- package/cjs/comps/Ellipsis.js +0 -35
- package/cjs/comps/Key.d.ts +0 -7
- package/cjs/comps/Key.js +0 -41
- package/esm/comps/CountInfo.d.ts +0 -19
- package/esm/comps/CountInfo.js +0 -70
- package/esm/comps/Ellipsis.d.ts +0 -10
- package/esm/comps/Ellipsis.js +0 -31
- package/esm/comps/Key.d.ts +0 -7
- package/esm/comps/Key.js +0 -37
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type SymbolsElement } from '../store/Symbols';
|
|
2
2
|
import { type TagType } from '../store/Types';
|
|
3
3
|
export declare const ValueQuote: {
|
|
4
|
-
(props: SymbolsElement<
|
|
4
|
+
<K extends TagType = "span">(props: SymbolsElement<K>): null;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type SymbolsElement } from '
|
|
3
|
-
import { type TagType } from '
|
|
2
|
+
import { type SymbolsElement } from '../store/Symbols';
|
|
3
|
+
import { type TagType } from '../store/Types';
|
|
4
4
|
export declare const Quote: {
|
|
5
5
|
(props: {
|
|
6
6
|
isNumber?: boolean | undefined;
|
|
7
|
-
}): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
} & import("react").HTMLAttributes<HTMLElement>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
8
8
|
displayName: string;
|
|
9
9
|
};
|
|
10
10
|
export declare const ValueQuote: {
|
|
11
|
-
(props:
|
|
12
|
-
isNumber?: boolean | undefined;
|
|
13
|
-
}): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
(props: React.HTMLAttributes<HTMLElement>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
|
|
14
12
|
displayName: string;
|
|
15
13
|
};
|
|
16
14
|
export declare const Colon: {
|
|
@@ -1,52 +1,54 @@
|
|
|
1
|
+
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["
|
|
4
|
+
var _excluded = ["isNumber"],
|
|
4
5
|
_excluded2 = ["as", "render"],
|
|
5
6
|
_excluded3 = ["as", "render"],
|
|
6
|
-
_excluded4 = ["as", "
|
|
7
|
-
_excluded5 = ["as", "render"],
|
|
7
|
+
_excluded4 = ["as", "render"],
|
|
8
|
+
_excluded5 = ["as", "style", "render"],
|
|
8
9
|
_excluded6 = ["as", "render"],
|
|
9
10
|
_excluded7 = ["as", "render"],
|
|
10
|
-
_excluded8 = ["as", "render"]
|
|
11
|
-
|
|
12
|
-
import {
|
|
11
|
+
_excluded8 = ["as", "render"],
|
|
12
|
+
_excluded9 = ["as", "render"];
|
|
13
|
+
import { useSymbolsStore } from '../store/Symbols';
|
|
14
|
+
import { useExpandsStore } from '../store/Expands';
|
|
13
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
16
|
export var Quote = props => {
|
|
15
17
|
var {
|
|
16
18
|
Quote: Comp = {}
|
|
17
19
|
} = useSymbolsStore();
|
|
18
20
|
var {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
isNumber
|
|
22
|
+
} = props,
|
|
23
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
21
24
|
if (isNumber) return null;
|
|
22
25
|
var {
|
|
23
26
|
as,
|
|
24
27
|
render
|
|
25
28
|
} = Comp,
|
|
26
|
-
reset = _objectWithoutPropertiesLoose(Comp,
|
|
29
|
+
reset = _objectWithoutPropertiesLoose(Comp, _excluded2);
|
|
27
30
|
var Elm = as || 'span';
|
|
28
|
-
var
|
|
31
|
+
var elmProps = _extends({}, other, reset);
|
|
32
|
+
var child = render && typeof render === 'function' && render(elmProps);
|
|
29
33
|
if (child) return child;
|
|
30
|
-
return /*#__PURE__*/_jsx(Elm, _extends({},
|
|
34
|
+
return /*#__PURE__*/_jsx(Elm, _extends({}, elmProps));
|
|
31
35
|
};
|
|
32
36
|
Quote.displayName = 'JVR.Quote';
|
|
33
37
|
export var ValueQuote = props => {
|
|
34
38
|
var {
|
|
35
39
|
ValueQuote: Comp = {}
|
|
36
40
|
} = useSymbolsStore();
|
|
37
|
-
var {
|
|
38
|
-
isNumber
|
|
39
|
-
} = props;
|
|
40
|
-
if (isNumber) return null;
|
|
41
|
+
var other = _extends({}, (_objectDestructuringEmpty(props), props));
|
|
41
42
|
var {
|
|
42
43
|
as,
|
|
43
44
|
render
|
|
44
45
|
} = Comp,
|
|
45
|
-
reset = _objectWithoutPropertiesLoose(Comp,
|
|
46
|
+
reset = _objectWithoutPropertiesLoose(Comp, _excluded3);
|
|
46
47
|
var Elm = as || 'span';
|
|
47
|
-
var
|
|
48
|
+
var elmProps = _extends({}, other, reset);
|
|
49
|
+
var child = render && typeof render === 'function' && render(elmProps);
|
|
48
50
|
if (child) return child;
|
|
49
|
-
return /*#__PURE__*/_jsx(Elm, _extends({},
|
|
51
|
+
return /*#__PURE__*/_jsx(Elm, _extends({}, elmProps));
|
|
50
52
|
};
|
|
51
53
|
ValueQuote.displayName = 'JVR.ValueQuote';
|
|
52
54
|
export var Colon = () => {
|
|
@@ -57,7 +59,7 @@ export var Colon = () => {
|
|
|
57
59
|
as,
|
|
58
60
|
render
|
|
59
61
|
} = Comp,
|
|
60
|
-
reset = _objectWithoutPropertiesLoose(Comp,
|
|
62
|
+
reset = _objectWithoutPropertiesLoose(Comp, _excluded4);
|
|
61
63
|
var Elm = as || 'span';
|
|
62
64
|
var child = render && typeof render === 'function' && render(reset);
|
|
63
65
|
if (child) return child;
|
|
@@ -78,7 +80,7 @@ export var Arrow = props => {
|
|
|
78
80
|
style,
|
|
79
81
|
render
|
|
80
82
|
} = Comp,
|
|
81
|
-
reset = _objectWithoutPropertiesLoose(Comp,
|
|
83
|
+
reset = _objectWithoutPropertiesLoose(Comp, _excluded5);
|
|
82
84
|
var Elm = as || 'span';
|
|
83
85
|
var isRender = render && typeof render === 'function';
|
|
84
86
|
var child = isRender && render(_extends({}, reset, {
|
|
@@ -104,7 +106,7 @@ export var BracketsOpen = _ref => {
|
|
|
104
106
|
as,
|
|
105
107
|
render: _render
|
|
106
108
|
} = BracketsLeft,
|
|
107
|
-
reset = _objectWithoutPropertiesLoose(BracketsLeft,
|
|
109
|
+
reset = _objectWithoutPropertiesLoose(BracketsLeft, _excluded6);
|
|
108
110
|
var BracketsLeftComp = as || 'span';
|
|
109
111
|
var _child = _render && typeof _render === 'function' && _render(reset);
|
|
110
112
|
if (_child) return _child;
|
|
@@ -114,7 +116,7 @@ export var BracketsOpen = _ref => {
|
|
|
114
116
|
as: elm,
|
|
115
117
|
render
|
|
116
118
|
} = BraceLeft,
|
|
117
|
-
props = _objectWithoutPropertiesLoose(BraceLeft,
|
|
119
|
+
props = _objectWithoutPropertiesLoose(BraceLeft, _excluded7);
|
|
118
120
|
var BraceLeftComp = elm || 'span';
|
|
119
121
|
var child = render && typeof render === 'function' && render(props);
|
|
120
122
|
if (child) return child;
|
|
@@ -136,7 +138,7 @@ export var BracketsClose = _ref2 => {
|
|
|
136
138
|
as,
|
|
137
139
|
render: _render2
|
|
138
140
|
} = BracketsRight,
|
|
139
|
-
_reset = _objectWithoutPropertiesLoose(BracketsRight,
|
|
141
|
+
_reset = _objectWithoutPropertiesLoose(BracketsRight, _excluded8);
|
|
140
142
|
var BracketsRightComp = as || 'span';
|
|
141
143
|
var _child2 = _render2 && typeof _render2 === 'function' && _render2(_reset);
|
|
142
144
|
if (_child2) return _child2;
|
|
@@ -146,7 +148,7 @@ export var BracketsClose = _ref2 => {
|
|
|
146
148
|
as: elm,
|
|
147
149
|
render
|
|
148
150
|
} = BraceRight,
|
|
149
|
-
reset = _objectWithoutPropertiesLoose(BraceRight,
|
|
151
|
+
reset = _objectWithoutPropertiesLoose(BraceRight, _excluded9);
|
|
150
152
|
var BraceRightComp = elm || 'span';
|
|
151
153
|
var child = render && typeof render === 'function' && render(reset);
|
|
152
154
|
if (child) return child;
|
package/esm/theme/basic.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export var basicTheme = {
|
|
2
2
|
'--w-rjv-font-family': 'monospace',
|
|
3
3
|
'--w-rjv-color': '#b5bd68',
|
|
4
|
+
'--w-rjv-key-number': '#002b36',
|
|
4
5
|
'--w-rjv-key-string': '#b5bd68',
|
|
5
6
|
'--w-rjv-background-color': '#2E3235',
|
|
6
7
|
'--w-rjv-line-color': '#292d30',
|
|
@@ -13,6 +14,7 @@ export var basicTheme = {
|
|
|
13
14
|
'--w-rjv-curlybraces-color': '#cc99cc',
|
|
14
15
|
'--w-rjv-colon-color': '#bababa',
|
|
15
16
|
'--w-rjv-brackets-color': '#808080',
|
|
17
|
+
'--w-rjv-ellipsis-color': '#cb4b16',
|
|
16
18
|
'--w-rjv-quotes-color': 'var(--w-rjv-key-string)',
|
|
17
19
|
'--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',
|
|
18
20
|
'--w-rjv-type-string-color': '#b5bd68',
|
package/esm/types/Bigint.d.ts
CHANGED
package/esm/types/Date.d.ts
CHANGED
package/esm/types/False.d.ts
CHANGED
package/esm/types/Float.d.ts
CHANGED
package/esm/types/Int.d.ts
CHANGED
package/esm/types/Map.d.ts
CHANGED
package/esm/types/Nan.d.ts
CHANGED
package/esm/types/Null.d.ts
CHANGED
package/esm/types/Set.d.ts
CHANGED
package/esm/types/String.d.ts
CHANGED
package/esm/types/True.d.ts
CHANGED
package/esm/types/Undefined.d.ts
CHANGED
package/esm/types/Url.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
export declare const SetComp: FC<PropsWithChildren<{
|
|
3
3
|
value: unknown;
|
|
4
|
+
keyName: string | number;
|
|
4
5
|
}>>;
|
|
5
6
|
export declare const MapComp: FC<PropsWithChildren<{
|
|
6
7
|
value: unknown;
|
|
8
|
+
keyName: string | number;
|
|
7
9
|
}>>;
|
|
8
10
|
type TypeProps = PropsWithChildren<{
|
|
9
|
-
expandKey: string;
|
|
10
11
|
keyName: string | number;
|
|
11
12
|
}>;
|
|
12
13
|
export declare const TypeString: FC<TypeProps>;
|
|
@@ -26,5 +27,4 @@ export declare const TypeDate: FC<{
|
|
|
26
27
|
export declare const TypeUndefined: FC<TypeProps>;
|
|
27
28
|
export declare const TypeNull: FC<TypeProps>;
|
|
28
29
|
export declare const TypeNan: FC<TypeProps>;
|
|
29
|
-
export declare const TypeEmptyValue: FC<TypeProps>;
|
|
30
30
|
export {};
|