@uiw/react-json-view 2.0.0-alpha.4 → 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 +280 -39
- package/basic.d.ts +4 -0
- package/cjs/Container.d.ts +2 -0
- package/cjs/Container.js +15 -6
- package/cjs/arrow/TriangleArrow.js +1 -1
- package/cjs/comps/Copied.d.ts +3 -4
- package/cjs/comps/Copied.js +61 -18
- package/cjs/comps/KeyValues.d.ts +2 -4
- package/cjs/comps/KeyValues.js +73 -28
- package/cjs/comps/NestedClose.d.ts +2 -2
- package/cjs/comps/NestedClose.js +42 -12
- package/cjs/comps/NestedOpen.d.ts +2 -3
- package/cjs/comps/NestedOpen.js +42 -20
- package/cjs/comps/Value.d.ts +2 -2
- package/cjs/comps/Value.js +5 -7
- package/cjs/comps/useIdCompat.d.ts +1 -0
- package/cjs/comps/useIdCompat.js +14 -0
- package/cjs/editor/KeyName.d.ts +2 -0
- package/cjs/editor/KeyName.js +82 -0
- package/cjs/editor/index.d.ts +18 -0
- package/cjs/editor/index.js +44 -0
- package/cjs/editor/store.d.ts +27 -0
- package/cjs/editor/store.js +23 -0
- package/cjs/index.d.ts +26 -4
- package/cjs/index.js +17 -7
- package/cjs/section/Copied.d.ts +4 -1
- package/cjs/section/Copied.js +1 -2
- package/cjs/section/CountInfo.d.ts +1 -2
- package/cjs/section/CountInfo.js +3 -5
- package/cjs/section/CountInfoExtra.d.ts +1 -2
- package/cjs/section/CountInfoExtra.js +2 -4
- package/cjs/section/Ellipsis.d.ts +0 -1
- package/cjs/section/Ellipsis.js +4 -5
- package/cjs/section/KeyName.d.ts +7 -6
- package/cjs/section/KeyName.js +8 -6
- package/cjs/section/Row.d.ts +13 -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 +10 -3
- package/cjs/store/Symbols.js +2 -4
- package/cjs/store/Types.d.ts +30 -25
- package/cjs/store/Types.js +8 -8
- package/cjs/store.d.ts +12 -6
- 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/cjs/symbol/index.d.ts +12 -17
- package/cjs/symbol/index.js +82 -30
- package/cjs/theme/basic.d.ts +2 -2
- package/cjs/theme/basic.js +4 -3
- package/cjs/theme/dark.d.ts +2 -2
- package/cjs/theme/dark.js +2 -3
- package/cjs/theme/github.dark.d.ts +2 -2
- package/cjs/theme/github.dark.js +2 -3
- package/cjs/theme/github.light.d.ts +2 -2
- package/cjs/theme/github.light.js +2 -3
- package/cjs/theme/gruvbox.d.ts +2 -2
- package/cjs/theme/gruvbox.js +2 -3
- package/cjs/theme/light.d.ts +2 -2
- package/cjs/theme/light.js +2 -3
- package/cjs/theme/monokai.d.ts +2 -2
- package/cjs/theme/monokai.js +2 -3
- package/cjs/theme/nord.d.ts +2 -2
- package/cjs/theme/nord.js +2 -3
- package/cjs/theme/vscode.d.ts +2 -2
- 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/cjs/types/index.d.ts +5 -2
- package/cjs/types/index.js +174 -166
- package/cjs/utils/useHighlight.d.ts +0 -1
- package/cjs/utils/useRender.d.ts +1 -1
- package/dark.d.ts +2 -1
- package/editor.d.ts +22 -20
- package/esm/Container.d.ts +2 -0
- package/esm/Container.js +21 -11
- package/esm/arrow/TriangleArrow.js +1 -1
- package/esm/comps/Copied.d.ts +3 -4
- package/esm/comps/Copied.js +61 -19
- package/esm/comps/KeyValues.d.ts +2 -4
- package/esm/comps/KeyValues.js +71 -27
- package/esm/comps/NestedClose.d.ts +2 -2
- package/esm/comps/NestedClose.js +40 -11
- package/esm/comps/NestedOpen.d.ts +2 -3
- package/esm/comps/NestedOpen.js +47 -26
- package/esm/comps/Value.d.ts +2 -2
- package/esm/comps/Value.js +3 -3
- package/esm/comps/useIdCompat.d.ts +1 -0
- package/esm/comps/useIdCompat.js +8 -0
- package/esm/editor/KeyName.d.ts +2 -0
- package/esm/editor/KeyName.js +77 -0
- package/esm/editor/index.d.ts +18 -0
- package/esm/editor/index.js +33 -0
- package/esm/editor/store.d.ts +27 -0
- package/esm/editor/store.js +13 -0
- package/esm/index.d.ts +26 -4
- package/esm/index.js +50 -41
- package/esm/section/Copied.d.ts +4 -1
- package/esm/section/Copied.js +2 -2
- package/esm/section/CountInfo.d.ts +1 -2
- package/esm/section/CountInfo.js +4 -4
- package/esm/section/CountInfoExtra.d.ts +1 -2
- package/esm/section/CountInfoExtra.js +2 -2
- package/esm/section/Ellipsis.d.ts +0 -1
- package/esm/section/Ellipsis.js +3 -3
- package/esm/section/KeyName.d.ts +7 -6
- package/esm/section/KeyName.js +8 -4
- package/esm/section/Row.d.ts +13 -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 +10 -3
- package/esm/store/Symbols.js +1 -1
- package/esm/store/Types.d.ts +30 -25
- package/esm/store/Types.js +6 -4
- package/esm/store.d.ts +12 -6
- package/esm/store.js +5 -5
- package/esm/symbol/Arrow.d.ts +1 -1
- package/esm/symbol/Arrow.js +2 -2
- package/esm/symbol/BraceLeft.d.ts +1 -1
- package/esm/symbol/BraceLeft.js +2 -2
- package/esm/symbol/BraceRight.d.ts +1 -1
- package/esm/symbol/BraceRight.js +2 -2
- package/esm/symbol/BracketsLeft.d.ts +1 -1
- package/esm/symbol/BracketsLeft.js +2 -2
- package/esm/symbol/BracketsRight.d.ts +1 -1
- package/esm/symbol/BracketsRight.js +2 -2
- package/esm/symbol/Colon.d.ts +1 -1
- package/esm/symbol/Colon.js +2 -2
- package/esm/symbol/Quote.d.ts +1 -1
- package/esm/symbol/Quote.js +2 -2
- package/esm/symbol/ValueQuote.d.ts +1 -1
- package/esm/symbol/ValueQuote.js +2 -2
- package/esm/symbol/index.d.ts +12 -17
- package/esm/symbol/index.js +85 -25
- package/esm/theme/basic.d.ts +2 -2
- package/esm/theme/basic.js +2 -0
- package/esm/theme/dark.d.ts +2 -2
- package/esm/theme/github.dark.d.ts +2 -2
- package/esm/theme/github.light.d.ts +2 -2
- package/esm/theme/gruvbox.d.ts +2 -2
- package/esm/theme/light.d.ts +2 -2
- package/esm/theme/monokai.d.ts +2 -2
- package/esm/theme/nord.d.ts +2 -2
- package/esm/theme/vscode.d.ts +2 -2
- package/esm/types/Bigint.d.ts +1 -1
- package/esm/types/Bigint.js +2 -2
- package/esm/types/Date.d.ts +1 -1
- package/esm/types/Date.js +2 -2
- package/esm/types/False.d.ts +1 -1
- package/esm/types/False.js +2 -2
- package/esm/types/Float.d.ts +1 -1
- package/esm/types/Float.js +2 -2
- package/esm/types/Int.d.ts +1 -1
- package/esm/types/Int.js +2 -2
- package/esm/types/Map.d.ts +1 -1
- package/esm/types/Map.js +2 -2
- package/esm/types/Nan.d.ts +1 -1
- package/esm/types/Nan.js +2 -2
- package/esm/types/Null.d.ts +1 -1
- package/esm/types/Null.js +2 -2
- package/esm/types/Set.d.ts +1 -1
- package/esm/types/Set.js +2 -2
- package/esm/types/String.d.ts +1 -1
- package/esm/types/String.js +2 -2
- package/esm/types/True.d.ts +1 -1
- package/esm/types/True.js +2 -2
- package/esm/types/Undefined.d.ts +1 -1
- package/esm/types/Undefined.js +2 -2
- package/esm/types/Url.d.ts +1 -1
- package/esm/types/Url.js +2 -2
- package/esm/types/index.d.ts +5 -2
- package/esm/types/index.js +148 -131
- package/esm/utils/useHighlight.d.ts +0 -1
- package/esm/utils/useRender.d.ts +1 -1
- package/esm/utils/useRender.js +3 -3
- package/githubDark.d.ts +4 -0
- package/githubLight.d.ts +4 -0
- package/gruvbox.d.ts +4 -0
- package/light.d.ts +2 -1
- package/monokai.d.ts +4 -0
- package/nord.d.ts +4 -0
- package/package.json +12 -6
- package/triangle-arrow.d.ts +2 -2
- package/triangle-solid-arrow.d.ts +2 -2
- package/vscode.d.ts +4 -0
package/cjs/store/Expands.js
CHANGED
|
@@ -16,10 +16,9 @@ var Context = /*#__PURE__*/(0, _react.createContext)(initialState);
|
|
|
16
16
|
var reducer = function reducer(state, action) {
|
|
17
17
|
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, state), action);
|
|
18
18
|
};
|
|
19
|
-
var useExpandsStore = function useExpandsStore() {
|
|
19
|
+
var useExpandsStore = exports.useExpandsStore = function useExpandsStore() {
|
|
20
20
|
return (0, _react.useContext)(Context);
|
|
21
21
|
};
|
|
22
|
-
exports.useExpandsStore = useExpandsStore;
|
|
23
22
|
var DispatchExpands = /*#__PURE__*/(0, _react.createContext)(function () {});
|
|
24
23
|
DispatchExpands.displayName = 'JVR.DispatchExpands';
|
|
25
24
|
function useExpands() {
|
|
@@ -28,7 +27,7 @@ function useExpands() {
|
|
|
28
27
|
function useExpandsDispatch() {
|
|
29
28
|
return (0, _react.useContext)(DispatchExpands);
|
|
30
29
|
}
|
|
31
|
-
var Expands = function Expands(_ref) {
|
|
30
|
+
var Expands = exports.Expands = function Expands(_ref) {
|
|
32
31
|
var initial = _ref.initial,
|
|
33
32
|
dispatch = _ref.dispatch,
|
|
34
33
|
children = _ref.children;
|
|
@@ -40,5 +39,4 @@ var Expands = function Expands(_ref) {
|
|
|
40
39
|
})
|
|
41
40
|
});
|
|
42
41
|
};
|
|
43
|
-
exports.Expands = Expands;
|
|
44
42
|
Expands.displayName = 'JVR.Expands';
|
package/cjs/store/Section.d.ts
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import React, { FC, PropsWithChildren, ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import { type TagType } from './Types';
|
|
3
|
-
export
|
|
3
|
+
export interface SectionElementResult<T extends object, K = string | number> {
|
|
4
|
+
value?: T;
|
|
5
|
+
parentValue?: T;
|
|
6
|
+
keyName?: K;
|
|
7
|
+
/** Index of the parent `keyName` */
|
|
8
|
+
keys?: K[];
|
|
9
|
+
}
|
|
10
|
+
export type SectionElementProps<T extends TagType = 'span'> = {
|
|
4
11
|
as?: T;
|
|
5
|
-
render?: (props: SectionElement<T>, result:
|
|
6
|
-
value: unknown;
|
|
7
|
-
keyName: string | number;
|
|
8
|
-
}) => React.ReactNode;
|
|
12
|
+
render?: (props: SectionElement<T>, result: SectionElementResult<object>) => React.ReactNode;
|
|
9
13
|
};
|
|
10
|
-
export type SectionElement<T extends TagType> = SectionElementProps<T> & ComponentPropsWithoutRef<T>;
|
|
14
|
+
export type SectionElement<T extends TagType = 'span'> = SectionElementProps<T> & ComponentPropsWithoutRef<T>;
|
|
11
15
|
type InitialState<T extends TagType> = {
|
|
12
16
|
Copied?: SectionElement<T>;
|
|
13
17
|
CountInfo?: SectionElement<T>;
|
|
14
18
|
CountInfoExtra?: SectionElement<T>;
|
|
15
19
|
Ellipsis?: SectionElement<T>;
|
|
20
|
+
Row?: SectionElement<T>;
|
|
16
21
|
KeyName?: SectionElement<T>;
|
|
17
22
|
};
|
|
18
23
|
type Dispatch = React.Dispatch<InitialState<TagType>>;
|
|
@@ -22,6 +27,7 @@ export declare function useSection(): [{
|
|
|
22
27
|
CountInfo?: SectionElement<TagType> | undefined;
|
|
23
28
|
CountInfoExtra?: SectionElement<TagType> | undefined;
|
|
24
29
|
Ellipsis?: SectionElement<TagType> | undefined;
|
|
30
|
+
Row?: SectionElement<TagType> | undefined;
|
|
25
31
|
KeyName?: SectionElement<TagType> | undefined;
|
|
26
32
|
}, React.Dispatch<InitialState<TagType>>];
|
|
27
33
|
export declare function useSectionDispatch(): Dispatch;
|
package/cjs/store/Section.js
CHANGED
|
@@ -49,6 +49,10 @@ var initialState = {
|
|
|
49
49
|
className: 'w-rjv-ellipsis',
|
|
50
50
|
children: '...'
|
|
51
51
|
},
|
|
52
|
+
Row: {
|
|
53
|
+
as: 'div',
|
|
54
|
+
className: 'w-rjv-line'
|
|
55
|
+
},
|
|
52
56
|
KeyName: {
|
|
53
57
|
as: 'span',
|
|
54
58
|
className: 'w-rjv-object-key'
|
|
@@ -58,10 +62,9 @@ var Context = /*#__PURE__*/(0, _react.createContext)(initialState);
|
|
|
58
62
|
var reducer = function reducer(state, action) {
|
|
59
63
|
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, state), action);
|
|
60
64
|
};
|
|
61
|
-
var useSectionStore = function useSectionStore() {
|
|
65
|
+
var useSectionStore = exports.useSectionStore = function useSectionStore() {
|
|
62
66
|
return (0, _react.useContext)(Context);
|
|
63
67
|
};
|
|
64
|
-
exports.useSectionStore = useSectionStore;
|
|
65
68
|
var DispatchSection = /*#__PURE__*/(0, _react.createContext)(function () {});
|
|
66
69
|
DispatchSection.displayName = 'JVR.DispatchSection';
|
|
67
70
|
function useSection() {
|
|
@@ -70,7 +73,7 @@ function useSection() {
|
|
|
70
73
|
function useSectionDispatch() {
|
|
71
74
|
return (0, _react.useContext)(DispatchSection);
|
|
72
75
|
}
|
|
73
|
-
var Section = function Section(_ref) {
|
|
76
|
+
var Section = exports.Section = function Section(_ref) {
|
|
74
77
|
var initial = _ref.initial,
|
|
75
78
|
dispatch = _ref.dispatch,
|
|
76
79
|
children = _ref.children;
|
|
@@ -82,5 +85,4 @@ var Section = function Section(_ref) {
|
|
|
82
85
|
})
|
|
83
86
|
});
|
|
84
87
|
};
|
|
85
|
-
exports.Section = Section;
|
|
86
88
|
Section.displayName = 'JVR.Section';
|
package/cjs/store/ShowTools.js
CHANGED
|
@@ -16,10 +16,9 @@ var Context = /*#__PURE__*/(0, _react.createContext)(initialState);
|
|
|
16
16
|
var reducer = function reducer(state, action) {
|
|
17
17
|
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, state), action);
|
|
18
18
|
};
|
|
19
|
-
var useShowToolsStore = function useShowToolsStore() {
|
|
19
|
+
var useShowToolsStore = exports.useShowToolsStore = function useShowToolsStore() {
|
|
20
20
|
return (0, _react.useContext)(Context);
|
|
21
21
|
};
|
|
22
|
-
exports.useShowToolsStore = useShowToolsStore;
|
|
23
22
|
var DispatchShowTools = /*#__PURE__*/(0, _react.createContext)(function () {});
|
|
24
23
|
DispatchShowTools.displayName = 'JVR.DispatchShowTools';
|
|
25
24
|
function useShowTools() {
|
|
@@ -28,7 +27,7 @@ function useShowTools() {
|
|
|
28
27
|
function useShowToolsDispatch() {
|
|
29
28
|
return (0, _react.useContext)(DispatchShowTools);
|
|
30
29
|
}
|
|
31
|
-
var ShowTools = function ShowTools(_ref) {
|
|
30
|
+
var ShowTools = exports.ShowTools = function ShowTools(_ref) {
|
|
32
31
|
var initial = _ref.initial,
|
|
33
32
|
dispatch = _ref.dispatch,
|
|
34
33
|
children = _ref.children;
|
|
@@ -40,5 +39,4 @@ var ShowTools = function ShowTools(_ref) {
|
|
|
40
39
|
})
|
|
41
40
|
});
|
|
42
41
|
};
|
|
43
|
-
exports.ShowTools = ShowTools;
|
|
44
42
|
ShowTools.displayName = 'JVR.ShowTools';
|
package/cjs/store/Symbols.d.ts
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { FC, PropsWithChildren, ElementType, ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import { type TagType } from './Types';
|
|
3
|
-
|
|
3
|
+
export interface SymbolsElementResult<T extends object, K = string | number> {
|
|
4
|
+
value?: T;
|
|
5
|
+
parentValue?: T;
|
|
6
|
+
keyName?: K;
|
|
7
|
+
/** Index of the parent `keyName` */
|
|
8
|
+
keys?: K[];
|
|
9
|
+
}
|
|
10
|
+
type SymbolsElementProps<T extends TagType = 'span'> = {
|
|
4
11
|
as?: T;
|
|
5
|
-
render?: (props: SymbolsElement<T>) => React.ReactNode;
|
|
12
|
+
render?: (props: SymbolsElement<T>, result: SymbolsElementResult<object>) => React.ReactNode;
|
|
6
13
|
'data-type'?: string;
|
|
7
14
|
};
|
|
8
|
-
export type SymbolsElement<T extends TagType> = SymbolsElementProps<T> & ComponentPropsWithoutRef<T>;
|
|
15
|
+
export type SymbolsElement<T extends TagType = 'span'> = SymbolsElementProps<T> & ComponentPropsWithoutRef<T>;
|
|
9
16
|
type InitialState<T extends ElementType = 'span'> = {
|
|
10
17
|
Arrow?: SymbolsElement<T>;
|
|
11
18
|
Colon?: SymbolsElement<T>;
|
package/cjs/store/Symbols.js
CHANGED
|
@@ -85,10 +85,9 @@ var Context = /*#__PURE__*/(0, _react.createContext)(initialState);
|
|
|
85
85
|
var reducer = function reducer(state, action) {
|
|
86
86
|
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, state), action);
|
|
87
87
|
};
|
|
88
|
-
var useSymbolsStore = function useSymbolsStore() {
|
|
88
|
+
var useSymbolsStore = exports.useSymbolsStore = function useSymbolsStore() {
|
|
89
89
|
return (0, _react.useContext)(Context);
|
|
90
90
|
};
|
|
91
|
-
exports.useSymbolsStore = useSymbolsStore;
|
|
92
91
|
var DispatchSymbols = /*#__PURE__*/(0, _react.createContext)(function () {});
|
|
93
92
|
DispatchSymbols.displayName = 'JVR.DispatchSymbols';
|
|
94
93
|
function useSymbols() {
|
|
@@ -97,7 +96,7 @@ function useSymbols() {
|
|
|
97
96
|
function useSymbolsDispatch() {
|
|
98
97
|
return (0, _react.useContext)(DispatchSymbols);
|
|
99
98
|
}
|
|
100
|
-
var Symbols = function Symbols(_ref) {
|
|
99
|
+
var Symbols = exports.Symbols = function Symbols(_ref) {
|
|
101
100
|
var initial = _ref.initial,
|
|
102
101
|
dispatch = _ref.dispatch,
|
|
103
102
|
children = _ref.children;
|
|
@@ -109,5 +108,4 @@ var Symbols = function Symbols(_ref) {
|
|
|
109
108
|
})
|
|
110
109
|
});
|
|
111
110
|
};
|
|
112
|
-
exports.Symbols = Symbols;
|
|
113
111
|
Symbols.displayName = 'JVR.Symbols';
|
package/cjs/store/Types.d.ts
CHANGED
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren, ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
export type TagType = React.ElementType | keyof JSX.IntrinsicElements;
|
|
3
|
-
type TypesElementProps<T extends TagType> = {
|
|
3
|
+
type TypesElementProps<T extends TagType = 'span'> = {
|
|
4
4
|
as?: T;
|
|
5
5
|
render?: (props: TypesElement<T>, result: {
|
|
6
6
|
type: 'type' | 'value';
|
|
7
7
|
value?: unknown;
|
|
8
|
+
keyName: string | number;
|
|
9
|
+
keys?: (string | number)[];
|
|
8
10
|
}) => React.ReactNode;
|
|
9
11
|
'data-type'?: string;
|
|
10
12
|
};
|
|
11
13
|
export type TypesElement<T extends TagType> = TypesElementProps<T> & ComponentPropsWithoutRef<T>;
|
|
12
|
-
export type InitialTypesState = {
|
|
14
|
+
export type InitialTypesState<T extends TagType = 'span'> = {
|
|
13
15
|
displayDataTypes?: boolean;
|
|
14
|
-
Url?: TypesElement<
|
|
15
|
-
Str?: TypesElement<
|
|
16
|
-
Undefined?: TypesElement<
|
|
17
|
-
Null?: TypesElement<
|
|
18
|
-
True?: TypesElement<
|
|
19
|
-
False?: TypesElement<
|
|
20
|
-
Date?: TypesElement<
|
|
21
|
-
Float?: TypesElement<
|
|
22
|
-
Set?: TypesElement<
|
|
23
|
-
Int?: TypesElement<
|
|
24
|
-
Map?: TypesElement<
|
|
25
|
-
Nan?: TypesElement<
|
|
26
|
-
Bigint?: TypesElement<
|
|
16
|
+
Url?: TypesElement<T>;
|
|
17
|
+
Str?: TypesElement<T>;
|
|
18
|
+
Undefined?: TypesElement<T>;
|
|
19
|
+
Null?: TypesElement<T>;
|
|
20
|
+
True?: TypesElement<T>;
|
|
21
|
+
False?: TypesElement<T>;
|
|
22
|
+
Date?: TypesElement<T>;
|
|
23
|
+
Float?: TypesElement<T>;
|
|
24
|
+
Set?: TypesElement<T>;
|
|
25
|
+
Int?: TypesElement<T>;
|
|
26
|
+
Map?: TypesElement<T>;
|
|
27
|
+
Nan?: TypesElement<T>;
|
|
28
|
+
Bigint?: TypesElement<T>;
|
|
27
29
|
};
|
|
28
|
-
type Dispatch = React.Dispatch<InitialTypesState
|
|
29
|
-
export declare const useTypesStore: () => InitialTypesState
|
|
30
|
+
type Dispatch<T extends TagType> = React.Dispatch<InitialTypesState<T>>;
|
|
31
|
+
export declare const useTypesStore: () => InitialTypesState<TagType>;
|
|
30
32
|
export declare function useTypes(): [{
|
|
31
|
-
displayDataTypes?: boolean
|
|
33
|
+
displayDataTypes?: boolean;
|
|
32
34
|
Url?: TypesElement<TagType> | undefined;
|
|
33
35
|
Str?: TypesElement<TagType> | undefined;
|
|
34
36
|
Undefined?: TypesElement<TagType> | undefined;
|
|
@@ -42,11 +44,14 @@ export declare function useTypes(): [{
|
|
|
42
44
|
Map?: TypesElement<TagType> | undefined;
|
|
43
45
|
Nan?: TypesElement<TagType> | undefined;
|
|
44
46
|
Bigint?: TypesElement<TagType> | undefined;
|
|
45
|
-
}, import("react").Dispatch<InitialTypesState
|
|
46
|
-
export declare function useTypesDispatch(): Dispatch
|
|
47
|
-
interface TypesProps {
|
|
48
|
-
initial: InitialTypesState
|
|
49
|
-
dispatch: Dispatch
|
|
47
|
+
}, import("react").Dispatch<InitialTypesState<TagType>>];
|
|
48
|
+
export declare function useTypesDispatch(): Dispatch<TagType>;
|
|
49
|
+
interface TypesProps<T extends TagType> {
|
|
50
|
+
initial: InitialTypesState<T>;
|
|
51
|
+
dispatch: Dispatch<TagType>;
|
|
52
|
+
}
|
|
53
|
+
export declare function Types<T extends TagType>({ initial, dispatch, children }: PropsWithChildren<TypesProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export declare namespace Types {
|
|
55
|
+
var displayName: string;
|
|
50
56
|
}
|
|
51
|
-
export declare const Types: FC<PropsWithChildren<TypesProps>>;
|
|
52
57
|
export {};
|
package/cjs/store/Types.js
CHANGED
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.Types =
|
|
7
|
+
exports.Types = Types;
|
|
8
8
|
exports.useTypes = useTypes;
|
|
9
9
|
exports.useTypesDispatch = useTypesDispatch;
|
|
10
10
|
exports.useTypesStore = void 0;
|
|
@@ -50,7 +50,8 @@ var initialState = {
|
|
|
50
50
|
},
|
|
51
51
|
Map: {
|
|
52
52
|
style: {
|
|
53
|
-
color: 'var(--w-rjv-type-map-color, #268bd2)'
|
|
53
|
+
color: 'var(--w-rjv-type-map-color, #268bd2)',
|
|
54
|
+
marginRight: 3
|
|
54
55
|
},
|
|
55
56
|
as: 'span',
|
|
56
57
|
'data-type': 'map',
|
|
@@ -86,7 +87,8 @@ var initialState = {
|
|
|
86
87
|
},
|
|
87
88
|
Set: {
|
|
88
89
|
style: {
|
|
89
|
-
color: 'var(--w-rjv-type-set-color, #268bd2)'
|
|
90
|
+
color: 'var(--w-rjv-type-set-color, #268bd2)',
|
|
91
|
+
marginRight: 3
|
|
90
92
|
},
|
|
91
93
|
as: 'span',
|
|
92
94
|
'data-type': 'set',
|
|
@@ -134,10 +136,9 @@ var Context = /*#__PURE__*/(0, _react.createContext)(initialState);
|
|
|
134
136
|
var reducer = function reducer(state, action) {
|
|
135
137
|
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, state), action);
|
|
136
138
|
};
|
|
137
|
-
var useTypesStore = function useTypesStore() {
|
|
139
|
+
var useTypesStore = exports.useTypesStore = function useTypesStore() {
|
|
138
140
|
return (0, _react.useContext)(Context);
|
|
139
141
|
};
|
|
140
|
-
exports.useTypesStore = useTypesStore;
|
|
141
142
|
var DispatchTypes = /*#__PURE__*/(0, _react.createContext)(function () {});
|
|
142
143
|
DispatchTypes.displayName = 'JVR.DispatchTypes';
|
|
143
144
|
function useTypes() {
|
|
@@ -146,7 +147,7 @@ function useTypes() {
|
|
|
146
147
|
function useTypesDispatch() {
|
|
147
148
|
return (0, _react.useContext)(DispatchTypes);
|
|
148
149
|
}
|
|
149
|
-
|
|
150
|
+
function Types(_ref) {
|
|
150
151
|
var initial = _ref.initial,
|
|
151
152
|
dispatch = _ref.dispatch,
|
|
152
153
|
children = _ref.children;
|
|
@@ -157,6 +158,5 @@ var Types = function Types(_ref) {
|
|
|
157
158
|
children: children
|
|
158
159
|
})
|
|
159
160
|
});
|
|
160
|
-
}
|
|
161
|
-
exports.Types = Types;
|
|
161
|
+
}
|
|
162
162
|
Types.displayName = 'JVR.Types';
|
package/cjs/store.d.ts
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { JsonViewProps } from './';
|
|
3
|
-
import { type InitialTypesState } from './store/Types';
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
|
+
import { type JsonViewProps } from './';
|
|
3
|
+
import { type InitialTypesState, type TagType } from './store/Types';
|
|
4
4
|
export type BlockTagType = keyof JSX.IntrinsicElements;
|
|
5
5
|
export interface InitialState<T extends object> {
|
|
6
6
|
value?: object;
|
|
7
7
|
onExpand?: JsonViewProps<object>['onExpand'];
|
|
8
8
|
onCopied?: JsonViewProps<object>['onCopied'];
|
|
9
|
+
beforeCopy?: JsonViewProps<T>['beforeCopy'];
|
|
9
10
|
objectSortKeys?: JsonViewProps<T>['objectSortKeys'];
|
|
10
11
|
displayObjectSize?: JsonViewProps<T>['displayObjectSize'];
|
|
11
12
|
shortenTextAfterLength?: JsonViewProps<T>['shortenTextAfterLength'];
|
|
13
|
+
stringEllipsis?: JsonViewProps<T>['stringEllipsis'];
|
|
12
14
|
enableClipboard?: JsonViewProps<T>['enableClipboard'];
|
|
13
15
|
highlightUpdates?: JsonViewProps<T>['highlightUpdates'];
|
|
14
16
|
collapsed?: JsonViewProps<T>['collapsed'];
|
|
17
|
+
shouldExpandNodeInitially?: JsonViewProps<T>['shouldExpandNodeInitially'];
|
|
15
18
|
indentWidth?: number;
|
|
16
19
|
}
|
|
17
20
|
export declare const initialState: InitialState<object>;
|
|
@@ -20,10 +23,13 @@ export declare const Context: React.Context<InitialState<object>>;
|
|
|
20
23
|
export declare function reducer(state: InitialState<object>, action: InitialState<object>): InitialState<object>;
|
|
21
24
|
export declare const useStore: () => InitialState<object>;
|
|
22
25
|
export declare const useDispatchStore: () => Dispatch;
|
|
23
|
-
export interface ProviderProps {
|
|
26
|
+
export interface ProviderProps<T extends TagType> {
|
|
24
27
|
initialState?: InitialState<object>;
|
|
25
|
-
initialTypes?: InitialTypesState
|
|
28
|
+
initialTypes?: InitialTypesState<T>;
|
|
26
29
|
}
|
|
27
|
-
export declare const Provider:
|
|
30
|
+
export declare const Provider: {
|
|
31
|
+
<T extends TagType>({ children, initialState: init, initialTypes, }: PropsWithChildren<ProviderProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
28
34
|
export declare function useDispatch(): Dispatch;
|
|
29
35
|
export {};
|
package/cjs/store.js
CHANGED
|
@@ -18,28 +18,24 @@ var _Types = require("./store/Types");
|
|
|
18
18
|
var _Symbols = require("./store/Symbols");
|
|
19
19
|
var _Section = require("./store/Section");
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
var initialState = {
|
|
21
|
+
var initialState = exports.initialState = {
|
|
22
22
|
objectSortKeys: false,
|
|
23
23
|
indentWidth: 15
|
|
24
24
|
};
|
|
25
|
-
exports.
|
|
26
|
-
var Context = /*#__PURE__*/(0, _react.createContext)(initialState);
|
|
27
|
-
exports.Context = Context;
|
|
25
|
+
var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)(initialState);
|
|
28
26
|
Context.displayName = 'JVR.Context';
|
|
29
27
|
var DispatchContext = /*#__PURE__*/(0, _react.createContext)(function () {});
|
|
30
28
|
DispatchContext.displayName = 'JVR.DispatchContext';
|
|
31
29
|
function reducer(state, action) {
|
|
32
30
|
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, state), action);
|
|
33
31
|
}
|
|
34
|
-
var useStore = function useStore() {
|
|
32
|
+
var useStore = exports.useStore = function useStore() {
|
|
35
33
|
return (0, _react.useContext)(Context);
|
|
36
34
|
};
|
|
37
|
-
exports.
|
|
38
|
-
var useDispatchStore = function useDispatchStore() {
|
|
35
|
+
var useDispatchStore = exports.useDispatchStore = function useDispatchStore() {
|
|
39
36
|
return (0, _react.useContext)(DispatchContext);
|
|
40
37
|
};
|
|
41
|
-
exports.
|
|
42
|
-
var Provider = function Provider(_ref) {
|
|
38
|
+
var Provider = exports.Provider = function Provider(_ref) {
|
|
43
39
|
var children = _ref.children,
|
|
44
40
|
init = _ref.initialState,
|
|
45
41
|
initialTypes = _ref.initialTypes;
|
|
@@ -98,7 +94,6 @@ var Provider = function Provider(_ref) {
|
|
|
98
94
|
})
|
|
99
95
|
});
|
|
100
96
|
};
|
|
101
|
-
exports.Provider = Provider;
|
|
102
97
|
function useDispatch() {
|
|
103
98
|
return (0, _react.useContext)(DispatchContext);
|
|
104
99
|
}
|
package/cjs/symbol/Arrow.d.ts
CHANGED
|
@@ -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 Arrow: {
|
|
4
|
-
(props: SymbolsElement<
|
|
4
|
+
<K extends TagType = "span">(props: SymbolsElement<K>): null;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
package/cjs/symbol/Arrow.js
CHANGED
|
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Arrow = void 0;
|
|
7
7
|
var _Symbols = require("../store/Symbols");
|
|
8
8
|
var _useRender = require("../utils/useRender");
|
|
9
|
-
var Arrow = function Arrow(props) {
|
|
9
|
+
var Arrow = exports.Arrow = function Arrow(props) {
|
|
10
10
|
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
|
|
11
11
|
_useSymbolsStore$Arro = _useSymbolsStore.Arrow,
|
|
12
12
|
Comp = _useSymbolsStore$Arro === void 0 ? {} : _useSymbolsStore$Arro;
|
|
13
13
|
(0, _useRender.useSymbolsRender)(Comp, props, 'Arrow');
|
|
14
14
|
return null;
|
|
15
15
|
};
|
|
16
|
-
exports.Arrow = Arrow;
|
|
17
16
|
Arrow.displayName = 'JVR.Arrow';
|
|
@@ -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 BraceLeft: {
|
|
4
|
-
(props: SymbolsElement<
|
|
4
|
+
<K extends TagType = "span">(props: SymbolsElement<K>): null;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
package/cjs/symbol/BraceLeft.js
CHANGED
|
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.BraceLeft = void 0;
|
|
7
7
|
var _Symbols = require("../store/Symbols");
|
|
8
8
|
var _useRender = require("../utils/useRender");
|
|
9
|
-
var BraceLeft = function BraceLeft(props) {
|
|
9
|
+
var BraceLeft = exports.BraceLeft = function BraceLeft(props) {
|
|
10
10
|
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
|
|
11
11
|
_useSymbolsStore$Brac = _useSymbolsStore.BraceLeft,
|
|
12
12
|
Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;
|
|
13
13
|
(0, _useRender.useSymbolsRender)(Comp, props, 'BraceLeft');
|
|
14
14
|
return null;
|
|
15
15
|
};
|
|
16
|
-
exports.BraceLeft = BraceLeft;
|
|
17
16
|
BraceLeft.displayName = 'JVR.BraceLeft';
|
|
@@ -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 BraceRight: {
|
|
4
|
-
(props: SymbolsElement<
|
|
4
|
+
<K extends TagType = "span">(props: SymbolsElement<K>): null;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
package/cjs/symbol/BraceRight.js
CHANGED
|
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.BraceRight = void 0;
|
|
7
7
|
var _Symbols = require("../store/Symbols");
|
|
8
8
|
var _useRender = require("../utils/useRender");
|
|
9
|
-
var BraceRight = function BraceRight(props) {
|
|
9
|
+
var BraceRight = exports.BraceRight = function BraceRight(props) {
|
|
10
10
|
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
|
|
11
11
|
_useSymbolsStore$Brac = _useSymbolsStore.BraceRight,
|
|
12
12
|
Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;
|
|
13
13
|
(0, _useRender.useSymbolsRender)(Comp, props, 'BraceRight');
|
|
14
14
|
return null;
|
|
15
15
|
};
|
|
16
|
-
exports.BraceRight = BraceRight;
|
|
17
16
|
BraceRight.displayName = 'JVR.BraceRight';
|
|
@@ -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 BracketsLeft: {
|
|
4
|
-
(props: SymbolsElement<
|
|
4
|
+
<K extends TagType = "span">(props: SymbolsElement<K>): null;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.BracketsLeft = void 0;
|
|
7
7
|
var _Symbols = require("../store/Symbols");
|
|
8
8
|
var _useRender = require("../utils/useRender");
|
|
9
|
-
var BracketsLeft = function BracketsLeft(props) {
|
|
9
|
+
var BracketsLeft = exports.BracketsLeft = function BracketsLeft(props) {
|
|
10
10
|
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
|
|
11
11
|
_useSymbolsStore$Brac = _useSymbolsStore.BracketsLeft,
|
|
12
12
|
Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;
|
|
13
13
|
(0, _useRender.useSymbolsRender)(Comp, props, 'BracketsLeft');
|
|
14
14
|
return null;
|
|
15
15
|
};
|
|
16
|
-
exports.BracketsLeft = BracketsLeft;
|
|
17
16
|
BracketsLeft.displayName = 'JVR.BracketsLeft';
|
|
@@ -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 BracketsRight: {
|
|
4
|
-
(props: SymbolsElement<
|
|
4
|
+
<K extends TagType = "span">(props: SymbolsElement<K>): null;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.BracketsRight = void 0;
|
|
7
7
|
var _Symbols = require("../store/Symbols");
|
|
8
8
|
var _useRender = require("../utils/useRender");
|
|
9
|
-
var BracketsRight = function BracketsRight(props) {
|
|
9
|
+
var BracketsRight = exports.BracketsRight = function BracketsRight(props) {
|
|
10
10
|
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
|
|
11
11
|
_useSymbolsStore$Brac = _useSymbolsStore.BracketsRight,
|
|
12
12
|
Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;
|
|
13
13
|
(0, _useRender.useSymbolsRender)(Comp, props, 'BracketsRight');
|
|
14
14
|
return null;
|
|
15
15
|
};
|
|
16
|
-
exports.BracketsRight = BracketsRight;
|
|
17
16
|
BracketsRight.displayName = 'JVR.BracketsRight';
|
package/cjs/symbol/Colon.d.ts
CHANGED
|
@@ -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 Colon: {
|
|
4
|
-
(props: SymbolsElement<
|
|
4
|
+
<K extends TagType = "span">(props: SymbolsElement<K>): null;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
package/cjs/symbol/Colon.js
CHANGED
|
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Colon = void 0;
|
|
7
7
|
var _Symbols = require("../store/Symbols");
|
|
8
8
|
var _useRender = require("../utils/useRender");
|
|
9
|
-
var Colon = function Colon(props) {
|
|
9
|
+
var Colon = exports.Colon = function Colon(props) {
|
|
10
10
|
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
|
|
11
11
|
_useSymbolsStore$Colo = _useSymbolsStore.Colon,
|
|
12
12
|
Comp = _useSymbolsStore$Colo === void 0 ? {} : _useSymbolsStore$Colo;
|
|
13
13
|
(0, _useRender.useSymbolsRender)(Comp, props, 'Colon');
|
|
14
14
|
return null;
|
|
15
15
|
};
|
|
16
|
-
exports.Colon = Colon;
|
|
17
16
|
Colon.displayName = 'JVR.Colon';
|
package/cjs/symbol/Quote.d.ts
CHANGED
|
@@ -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 Quote: {
|
|
4
|
-
(props: SymbolsElement<
|
|
4
|
+
<K extends TagType = "span">(props: SymbolsElement<K>): null;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
package/cjs/symbol/Quote.js
CHANGED
|
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Quote = void 0;
|
|
7
7
|
var _Symbols = require("../store/Symbols");
|
|
8
8
|
var _useRender = require("../utils/useRender");
|
|
9
|
-
var Quote = function Quote(props) {
|
|
9
|
+
var Quote = exports.Quote = function Quote(props) {
|
|
10
10
|
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
|
|
11
11
|
_useSymbolsStore$Quot = _useSymbolsStore.Quote,
|
|
12
12
|
Comp = _useSymbolsStore$Quot === void 0 ? {} : _useSymbolsStore$Quot;
|
|
13
13
|
(0, _useRender.useSymbolsRender)(Comp, props, 'Quote');
|
|
14
14
|
return null;
|
|
15
15
|
};
|
|
16
|
-
exports.Quote = Quote;
|
|
17
16
|
Quote.displayName = 'JVR.Quote';
|
|
@@ -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
|
};
|
package/cjs/symbol/ValueQuote.js
CHANGED
|
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ValueQuote = void 0;
|
|
7
7
|
var _Symbols = require("../store/Symbols");
|
|
8
8
|
var _useRender = require("../utils/useRender");
|
|
9
|
-
var ValueQuote = function ValueQuote(props) {
|
|
9
|
+
var ValueQuote = exports.ValueQuote = function ValueQuote(props) {
|
|
10
10
|
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
|
|
11
11
|
_useSymbolsStore$Valu = _useSymbolsStore.ValueQuote,
|
|
12
12
|
Comp = _useSymbolsStore$Valu === void 0 ? {} : _useSymbolsStore$Valu;
|
|
13
13
|
(0, _useRender.useSymbolsRender)(Comp, props, 'ValueQuote');
|
|
14
14
|
return null;
|
|
15
15
|
};
|
|
16
|
-
exports.ValueQuote = ValueQuote;
|
|
17
16
|
ValueQuote.displayName = 'JVR.ValueQuote';
|
package/cjs/symbol/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import { type SymbolsElement } from '../store/Symbols';
|
|
1
|
+
import { type SymbolsElement, type SymbolsElementResult } from '../store/Symbols';
|
|
3
2
|
import { type TagType } from '../store/Types';
|
|
4
3
|
export declare const Quote: {
|
|
5
|
-
(props: {
|
|
6
|
-
isNumber?: boolean
|
|
7
|
-
} &
|
|
4
|
+
<T extends object>(props: {
|
|
5
|
+
isNumber?: boolean;
|
|
6
|
+
} & React.HTMLAttributes<HTMLElement> & SymbolsElementResult<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
8
7
|
displayName: string;
|
|
9
8
|
};
|
|
10
9
|
export declare const ValueQuote: {
|
|
@@ -12,31 +11,27 @@ export declare const ValueQuote: {
|
|
|
12
11
|
displayName: string;
|
|
13
12
|
};
|
|
14
13
|
export declare const Colon: {
|
|
15
|
-
(): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
<T extends object>(props: SymbolsElementResult<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
displayName: string;
|
|
17
16
|
};
|
|
18
17
|
export declare const Arrow: {
|
|
19
|
-
<T extends TagType>(props: {
|
|
20
|
-
as?: T | undefined;
|
|
21
|
-
render?: ((props: SymbolsElement<T>) => import("react").ReactNode) | undefined;
|
|
22
|
-
'data-type'?: string | undefined;
|
|
23
|
-
} & import("react").PropsWithoutRef<import("react").ComponentProps<T>> & {
|
|
18
|
+
<T extends TagType, K extends object>(props: SymbolsElement<T> & {
|
|
24
19
|
expandKey: string;
|
|
25
|
-
}): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
} & SymbolsElementResult<K>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
|
|
26
21
|
displayName: string;
|
|
27
22
|
};
|
|
28
23
|
export declare const BracketsOpen: {
|
|
29
|
-
|
|
30
|
-
isBrackets?: boolean
|
|
31
|
-
}): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
<K extends object>(props: {
|
|
25
|
+
isBrackets?: boolean;
|
|
26
|
+
} & SymbolsElementResult<K>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
|
|
32
27
|
displayName: string;
|
|
33
28
|
};
|
|
34
|
-
type
|
|
29
|
+
type BracketsProps = {
|
|
35
30
|
isBrackets?: boolean;
|
|
36
31
|
isVisiable?: boolean;
|
|
37
32
|
};
|
|
38
33
|
export declare const BracketsClose: {
|
|
39
|
-
(
|
|
34
|
+
<K extends object>(props: BracketsProps & SymbolsElementResult<K>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
40
35
|
displayName: string;
|
|
41
36
|
};
|
|
42
37
|
export {};
|