@uiw/react-json-view 2.0.0-alpha.41 → 2.0.0-alpha.43
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 +73 -50
- package/cjs/index.d.ts +5 -0
- package/cjs/index.js +202 -2
- package/cjs/types/index.js +12 -3
- package/esm/Container.js +11 -9
- package/esm/arrow/TriangleArrow.js +1 -3
- package/esm/arrow/TriangleSolidArrow.js +1 -3
- package/esm/comps/Copied.js +18 -20
- package/esm/comps/KeyValues.js +34 -35
- package/esm/comps/NestedClose.js +10 -12
- package/esm/comps/NestedOpen.js +12 -14
- package/esm/comps/Value.js +3 -5
- package/esm/editor/KeyName.js +12 -16
- package/esm/editor/index.js +9 -8
- package/esm/index.d.ts +5 -0
- package/esm/index.js +37 -19
- package/esm/section/Copied.js +3 -3
- package/esm/section/CountInfo.js +13 -17
- package/esm/section/CountInfoExtra.js +11 -14
- package/esm/section/Ellipsis.js +11 -15
- package/esm/section/KeyName.js +13 -17
- package/esm/section/Row.js +14 -17
- package/esm/store/Expands.js +3 -5
- package/esm/store/Section.js +3 -5
- package/esm/store/ShowTools.js +3 -5
- package/esm/store/Symbols.js +3 -5
- package/esm/store/Types.js +3 -5
- package/esm/store.js +21 -11
- package/esm/symbol/Arrow.js +3 -3
- package/esm/symbol/BraceLeft.js +3 -3
- package/esm/symbol/BraceRight.js +3 -3
- package/esm/symbol/BracketsLeft.js +3 -3
- package/esm/symbol/BracketsRight.js +3 -3
- package/esm/symbol/Colon.js +3 -3
- package/esm/symbol/Quote.js +3 -3
- package/esm/symbol/ValueQuote.js +3 -3
- package/esm/symbol/index.js +65 -89
- package/esm/types/Bigint.js +3 -3
- package/esm/types/Date.js +3 -3
- package/esm/types/False.js +3 -3
- package/esm/types/Float.js +3 -3
- package/esm/types/Int.js +3 -3
- package/esm/types/Map.js +3 -3
- package/esm/types/Nan.js +3 -3
- package/esm/types/Null.js +3 -3
- package/esm/types/Set.js +3 -3
- package/esm/types/String.js +3 -3
- package/esm/types/True.js +3 -3
- package/esm/types/Undefined.js +3 -3
- package/esm/types/Url.js +3 -3
- package/esm/types/index.js +136 -175
- package/esm/utils/useHighlight.js +3 -5
- package/package.json +1 -1
package/esm/comps/KeyValues.js
CHANGED
|
@@ -14,21 +14,20 @@ import { useIdCompat } from "../comps/useIdCompat.js";
|
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
export var KeyValues = props => {
|
|
16
16
|
var _expands$expandKey;
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
expandKey = '',
|
|
21
|
-
level,
|
|
22
|
-
keys =
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
var keyName = props.keyName,
|
|
18
|
+
value = props.value,
|
|
19
|
+
_props$expandKey = props.expandKey,
|
|
20
|
+
expandKey = _props$expandKey === void 0 ? '' : _props$expandKey,
|
|
21
|
+
level = props.level,
|
|
22
|
+
_props$keys = props.keys,
|
|
23
|
+
keys = _props$keys === void 0 ? [] : _props$keys,
|
|
24
|
+
parentValue = props.parentValue;
|
|
25
25
|
var expands = useExpandsStore();
|
|
26
|
-
var
|
|
27
|
-
objectSortKeys,
|
|
28
|
-
indentWidth,
|
|
29
|
-
collapsed,
|
|
30
|
-
shouldExpandNodeInitially
|
|
31
|
-
} = useStore();
|
|
26
|
+
var _useStore = useStore(),
|
|
27
|
+
objectSortKeys = _useStore.objectSortKeys,
|
|
28
|
+
indentWidth = _useStore.indentWidth,
|
|
29
|
+
collapsed = _useStore.collapsed,
|
|
30
|
+
shouldExpandNodeInitially = _useStore.shouldExpandNodeInitially;
|
|
32
31
|
var defaultExpanded = typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;
|
|
33
32
|
var isExpanded = (_expands$expandKey = expands[expandKey]) != null ? _expands$expandKey : shouldExpandNodeInitially ? false : defaultExpanded;
|
|
34
33
|
var shouldExpand = shouldExpandNodeInitially && shouldExpandNodeInitially(!isExpanded, {
|
|
@@ -55,12 +54,14 @@ export var KeyValues = props => {
|
|
|
55
54
|
var entries = isMyArray ? Object.entries(value).map(m => [Number(m[0]), m[1]]) : Object.entries(value);
|
|
56
55
|
if (objectSortKeys) {
|
|
57
56
|
entries = objectSortKeys === true ? entries.sort((_ref, _ref2) => {
|
|
58
|
-
var
|
|
59
|
-
var
|
|
57
|
+
var a = _ref[0];
|
|
58
|
+
var b = _ref2[0];
|
|
60
59
|
return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b) : 0;
|
|
61
60
|
}) : entries.sort((_ref3, _ref4) => {
|
|
62
|
-
var
|
|
63
|
-
|
|
61
|
+
var a = _ref3[0],
|
|
62
|
+
valA = _ref3[1];
|
|
63
|
+
var b = _ref4[0],
|
|
64
|
+
valB = _ref4[1];
|
|
64
65
|
return typeof a === 'string' && typeof b === 'string' ? objectSortKeys(a, b, valA, valB) : 0;
|
|
65
66
|
});
|
|
66
67
|
}
|
|
@@ -73,7 +74,8 @@ export var KeyValues = props => {
|
|
|
73
74
|
className: "w-rjv-wrap",
|
|
74
75
|
style: style,
|
|
75
76
|
children: entries.map((_ref5, idx) => {
|
|
76
|
-
var
|
|
77
|
+
var key = _ref5[0],
|
|
78
|
+
val = _ref5[1];
|
|
77
79
|
return /*#__PURE__*/_jsx(KeyValuesItem, {
|
|
78
80
|
parentValue: value,
|
|
79
81
|
keyName: key,
|
|
@@ -86,15 +88,12 @@ export var KeyValues = props => {
|
|
|
86
88
|
};
|
|
87
89
|
KeyValues.displayName = 'JVR.KeyValues';
|
|
88
90
|
export var KayName = props => {
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
var {
|
|
96
|
-
highlightUpdates
|
|
97
|
-
} = useStore();
|
|
91
|
+
var keyName = props.keyName,
|
|
92
|
+
parentValue = props.parentValue,
|
|
93
|
+
keys = props.keys,
|
|
94
|
+
value = props.value;
|
|
95
|
+
var _useStore2 = useStore(),
|
|
96
|
+
highlightUpdates = _useStore2.highlightUpdates;
|
|
98
97
|
var isNumber = typeof keyName === 'number';
|
|
99
98
|
var highlightContainer = useRef(null);
|
|
100
99
|
useHighlight({
|
|
@@ -125,13 +124,13 @@ export var KayName = props => {
|
|
|
125
124
|
};
|
|
126
125
|
KayName.displayName = 'JVR.KayName';
|
|
127
126
|
export var KeyValuesItem = props => {
|
|
128
|
-
var
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
level = 0,
|
|
133
|
-
|
|
134
|
-
|
|
127
|
+
var keyName = props.keyName,
|
|
128
|
+
value = props.value,
|
|
129
|
+
parentValue = props.parentValue,
|
|
130
|
+
_props$level = props.level,
|
|
131
|
+
level = _props$level === void 0 ? 0 : _props$level,
|
|
132
|
+
_props$keys2 = props.keys,
|
|
133
|
+
keys = _props$keys2 === void 0 ? [] : _props$keys2;
|
|
135
134
|
var dispatch = useShowToolsDispatch();
|
|
136
135
|
var subkeyid = useIdCompat();
|
|
137
136
|
var isMyArray = Array.isArray(value);
|
package/esm/comps/NestedClose.js
CHANGED
|
@@ -5,19 +5,17 @@ import { BracketsClose } from "../symbol/index.js";
|
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
export var NestedClose = props => {
|
|
7
7
|
var _expands$expandKey;
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
keys = []
|
|
15
|
-
} = props;
|
|
8
|
+
var keyName = props.keyName,
|
|
9
|
+
value = props.value,
|
|
10
|
+
expandKey = props.expandKey,
|
|
11
|
+
parentValue = props.parentValue,
|
|
12
|
+
level = props.level,
|
|
13
|
+
_props$keys = props.keys,
|
|
14
|
+
keys = _props$keys === void 0 ? [] : _props$keys;
|
|
16
15
|
var expands = useExpandsStore();
|
|
17
|
-
var
|
|
18
|
-
collapsed,
|
|
19
|
-
shouldExpandNodeInitially
|
|
20
|
-
} = useStore();
|
|
16
|
+
var _useStore = useStore(),
|
|
17
|
+
collapsed = _useStore.collapsed,
|
|
18
|
+
shouldExpandNodeInitially = _useStore.shouldExpandNodeInitially;
|
|
21
19
|
var defaultExpanded = typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;
|
|
22
20
|
var isExpanded = (_expands$expandKey = expands[expandKey]) != null ? _expands$expandKey : shouldExpandNodeInitially ? false : defaultExpanded;
|
|
23
21
|
var shouldExpand = shouldExpandNodeInitially && shouldExpandNodeInitially(!isExpanded, {
|
package/esm/comps/NestedOpen.js
CHANGED
|
@@ -11,22 +11,20 @@ import { SetComp, MapComp } from "../types/index.js";
|
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
export var NestedOpen = props => {
|
|
13
13
|
var _expands$expandKey;
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
keys = [],
|
|
18
|
-
initialValue,
|
|
19
|
-
value,
|
|
20
|
-
parentValue,
|
|
21
|
-
level
|
|
22
|
-
} = props;
|
|
14
|
+
var keyName = props.keyName,
|
|
15
|
+
expandKey = props.expandKey,
|
|
16
|
+
_props$keys = props.keys,
|
|
17
|
+
keys = _props$keys === void 0 ? [] : _props$keys,
|
|
18
|
+
initialValue = props.initialValue,
|
|
19
|
+
value = props.value,
|
|
20
|
+
parentValue = props.parentValue,
|
|
21
|
+
level = props.level;
|
|
23
22
|
var expands = useExpandsStore();
|
|
24
23
|
var dispatchExpands = useExpandsDispatch();
|
|
25
|
-
var
|
|
26
|
-
onExpand,
|
|
27
|
-
collapsed,
|
|
28
|
-
shouldExpandNodeInitially
|
|
29
|
-
} = useStore();
|
|
24
|
+
var _useStore = useStore(),
|
|
25
|
+
onExpand = _useStore.onExpand,
|
|
26
|
+
collapsed = _useStore.collapsed,
|
|
27
|
+
shouldExpandNodeInitially = _useStore.shouldExpandNodeInitially;
|
|
30
28
|
var defaultExpanded = typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;
|
|
31
29
|
var isExpanded = (_expands$expandKey = expands[expandKey]) != null ? _expands$expandKey : shouldExpandNodeInitially ? false : defaultExpanded;
|
|
32
30
|
var shouldExpand = shouldExpandNodeInitially && shouldExpandNodeInitially(!isExpanded, {
|
package/esm/comps/Value.js
CHANGED
|
@@ -3,11 +3,9 @@ import { TypeString, TypeTrue, TypeNull, TypeFalse, TypeFloat, TypeBigint, TypeI
|
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
export var isFloat = n => Number(n) === n && n % 1 !== 0 || isNaN(n);
|
|
5
5
|
export var Value = props => {
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
keys
|
|
10
|
-
} = props;
|
|
6
|
+
var value = props.value,
|
|
7
|
+
keyName = props.keyName,
|
|
8
|
+
keys = props.keys;
|
|
11
9
|
var reset = {
|
|
12
10
|
keyName,
|
|
13
11
|
keys
|
package/esm/editor/KeyName.js
CHANGED
|
@@ -6,15 +6,11 @@ import { useRef, useState } from 'react';
|
|
|
6
6
|
import { useStore } from "./store.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
export var KeyNameRender = (_ref, _ref2) => {
|
|
9
|
-
var
|
|
10
|
-
children
|
|
11
|
-
} = _ref,
|
|
9
|
+
var children = _ref.children,
|
|
12
10
|
reset = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
keyName
|
|
17
|
-
} = _ref2;
|
|
11
|
+
var value = _ref2.value,
|
|
12
|
+
parentValue = _ref2.parentValue,
|
|
13
|
+
keyName = _ref2.keyName;
|
|
18
14
|
if (typeof children === 'number') {
|
|
19
15
|
return /*#__PURE__*/_jsx("span", _extends({}, reset, {
|
|
20
16
|
children: children
|
|
@@ -28,16 +24,16 @@ export var KeyNameRender = (_ref, _ref2) => {
|
|
|
28
24
|
}));
|
|
29
25
|
};
|
|
30
26
|
var Child = props => {
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} = props,
|
|
27
|
+
var value = props.value,
|
|
28
|
+
parentValue = props.parentValue,
|
|
29
|
+
keyName = props.keyName,
|
|
35
30
|
reset = _objectWithoutPropertiesLoose(props, _excluded2);
|
|
36
31
|
var $dom = useRef(null);
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
var _useState = useState(props.children),
|
|
33
|
+
currentValue = _useState[0],
|
|
34
|
+
setCurrentValue = _useState[1];
|
|
35
|
+
var _useStore = useStore(),
|
|
36
|
+
onEdit = _useStore.onEdit;
|
|
41
37
|
var onKeyDown = evn => {
|
|
42
38
|
if (evn.key === 'Enter') {
|
|
43
39
|
var _$dom$current;
|
package/esm/editor/index.js
CHANGED
|
@@ -7,15 +7,16 @@ import { KeyNameRender } from "./KeyName.js";
|
|
|
7
7
|
import { Context, Dispatch, useStoreReducer } from "./store.js";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
var JsonViewEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} = props,
|
|
10
|
+
var children = props.children,
|
|
11
|
+
onEdit = props.onEdit,
|
|
12
|
+
_props$editable = props.editable,
|
|
13
|
+
editable = _props$editable === void 0 ? true : _props$editable,
|
|
15
14
|
reset = _objectWithoutPropertiesLoose(props, _excluded);
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
var _useStoreReducer = useStoreReducer({
|
|
16
|
+
onEdit
|
|
17
|
+
}),
|
|
18
|
+
state = _useStoreReducer[0],
|
|
19
|
+
dispatch = _useStoreReducer[1];
|
|
19
20
|
return /*#__PURE__*/_jsx(Context.Provider, {
|
|
20
21
|
value: state,
|
|
21
22
|
children: /*#__PURE__*/_jsx(Dispatch.Provider, {
|
package/esm/index.d.ts
CHANGED
|
@@ -113,4 +113,9 @@ type JsonViewComponent = React.FC<React.PropsWithRef<JsonViewProps<object>>> & {
|
|
|
113
113
|
Row: typeof Row;
|
|
114
114
|
};
|
|
115
115
|
declare const JsonView: JsonViewComponent;
|
|
116
|
+
export { JsonView };
|
|
117
|
+
export type { JsonViewComponent };
|
|
118
|
+
export { Bigint, Date as JsonDate, False, Float, Int, Map as JsonMap, Nan, Null, Set as JsonSet, StringText as JsonString, True, Undefined, Url, };
|
|
119
|
+
export { BraceLeft, BraceRight, BracketsLeft, BracketsRight, Arrow, Colon, Quote, ValueQuote };
|
|
120
|
+
export { Copied, CountInfo, CountInfoExtra, Ellipsis, KeyName, Row };
|
|
116
121
|
export default JsonView;
|
package/esm/index.js
CHANGED
|
@@ -39,25 +39,32 @@ export * from "./store/Symbols.js";
|
|
|
39
39
|
export * from "./store/Types.js";
|
|
40
40
|
export * from "./symbol/index.js";
|
|
41
41
|
var JsonView = /*#__PURE__*/forwardRef((props, ref) => {
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
var _props$className = props.className,
|
|
43
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
44
|
+
style = props.style,
|
|
45
|
+
value = props.value,
|
|
46
|
+
children = props.children,
|
|
47
|
+
_props$collapsed = props.collapsed,
|
|
48
|
+
collapsed = _props$collapsed === void 0 ? false : _props$collapsed,
|
|
49
|
+
shouldExpandNodeInitially = props.shouldExpandNodeInitially,
|
|
50
|
+
_props$indentWidth = props.indentWidth,
|
|
51
|
+
indentWidth = _props$indentWidth === void 0 ? 15 : _props$indentWidth,
|
|
52
|
+
_props$displayObjectS = props.displayObjectSize,
|
|
53
|
+
displayObjectSize = _props$displayObjectS === void 0 ? true : _props$displayObjectS,
|
|
54
|
+
_props$shortenTextAft = props.shortenTextAfterLength,
|
|
55
|
+
shortenTextAfterLength = _props$shortenTextAft === void 0 ? 30 : _props$shortenTextAft,
|
|
56
|
+
stringEllipsis = props.stringEllipsis,
|
|
57
|
+
_props$highlightUpdat = props.highlightUpdates,
|
|
58
|
+
highlightUpdates = _props$highlightUpdat === void 0 ? true : _props$highlightUpdat,
|
|
59
|
+
_props$enableClipboar = props.enableClipboard,
|
|
60
|
+
enableClipboard = _props$enableClipboar === void 0 ? true : _props$enableClipboar,
|
|
61
|
+
_props$displayDataTyp = props.displayDataTypes,
|
|
62
|
+
displayDataTypes = _props$displayDataTyp === void 0 ? true : _props$displayDataTyp,
|
|
63
|
+
_props$objectSortKeys = props.objectSortKeys,
|
|
64
|
+
objectSortKeys = _props$objectSortKeys === void 0 ? false : _props$objectSortKeys,
|
|
65
|
+
onExpand = props.onExpand,
|
|
66
|
+
onCopied = props.onCopied,
|
|
67
|
+
beforeCopy = props.beforeCopy,
|
|
61
68
|
elmProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
62
69
|
var defaultStyle = _extends({
|
|
63
70
|
lineHeight: 1.4,
|
|
@@ -123,4 +130,15 @@ JsonView.CountInfoExtra = CountInfoExtra;
|
|
|
123
130
|
JsonView.KeyName = KeyName;
|
|
124
131
|
JsonView.Row = Row;
|
|
125
132
|
JsonView.displayName = 'JVR.JsonView';
|
|
133
|
+
|
|
134
|
+
// Named exports for better import flexibility
|
|
135
|
+
export { JsonView };
|
|
136
|
+
// Named exports for type components
|
|
137
|
+
export { Bigint, Date as JsonDate, False, Float, Int, Map as JsonMap, Nan, Null, Set as JsonSet, StringText as JsonString, True, Undefined, Url };
|
|
138
|
+
|
|
139
|
+
// Named exports for symbol components
|
|
140
|
+
export { BraceLeft, BraceRight, BracketsLeft, BracketsRight, Arrow, Colon, Quote, ValueQuote };
|
|
141
|
+
|
|
142
|
+
// Named exports for section components
|
|
143
|
+
export { Copied, CountInfo, CountInfoExtra, Ellipsis, KeyName, Row };
|
|
126
144
|
export default JsonView;
|
package/esm/section/Copied.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useSectionStore } from "../store/Section.js";
|
|
2
2
|
import { useSectionRender } from "../utils/useRender.js";
|
|
3
3
|
export var Copied = props => {
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
var _useSectionStore = useSectionStore(),
|
|
5
|
+
_useSectionStore$Copi = _useSectionStore.Copied,
|
|
6
|
+
Comp = _useSectionStore$Copi === void 0 ? {} : _useSectionStore$Copi;
|
|
7
7
|
useSectionRender(Comp, props, 'Copied');
|
|
8
8
|
return null;
|
|
9
9
|
};
|
package/esm/section/CountInfo.js
CHANGED
|
@@ -7,30 +7,26 @@ import { useSectionRender } from "../utils/useRender.js";
|
|
|
7
7
|
import { useStore } from "../store.js";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
export var CountInfo = props => {
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
var _useSectionStore = useSectionStore(),
|
|
11
|
+
_useSectionStore$Coun = _useSectionStore.CountInfo,
|
|
12
|
+
Comp = _useSectionStore$Coun === void 0 ? {} : _useSectionStore$Coun;
|
|
13
13
|
useSectionRender(Comp, props, 'CountInfo');
|
|
14
14
|
return null;
|
|
15
15
|
};
|
|
16
16
|
CountInfo.displayName = 'JVR.CountInfo';
|
|
17
17
|
export var CountInfoComp = props => {
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} = props,
|
|
18
|
+
var _props$value = props.value,
|
|
19
|
+
value = _props$value === void 0 ? {} : _props$value,
|
|
20
|
+
keyName = props.keyName,
|
|
22
21
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
23
|
-
var
|
|
24
|
-
displayObjectSize
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = useSectionStore();
|
|
22
|
+
var _useStore = useStore(),
|
|
23
|
+
displayObjectSize = _useStore.displayObjectSize;
|
|
24
|
+
var _useSectionStore2 = useSectionStore(),
|
|
25
|
+
_useSectionStore2$Cou = _useSectionStore2.CountInfo,
|
|
26
|
+
Comp = _useSectionStore2$Cou === void 0 ? {} : _useSectionStore2$Cou;
|
|
29
27
|
if (!displayObjectSize) return null;
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
render
|
|
33
|
-
} = Comp,
|
|
28
|
+
var as = Comp.as,
|
|
29
|
+
render = Comp.render,
|
|
34
30
|
reset = _objectWithoutPropertiesLoose(Comp, _excluded2);
|
|
35
31
|
var Elm = as || 'span';
|
|
36
32
|
reset.style = _extends({}, reset.style, props.style);
|
|
@@ -6,26 +6,23 @@ import { useSectionStore } from "../store/Section.js";
|
|
|
6
6
|
import { useSectionRender } from "../utils/useRender.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
export var CountInfoExtra = props => {
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
var _useSectionStore = useSectionStore(),
|
|
10
|
+
_useSectionStore$Coun = _useSectionStore.CountInfoExtra,
|
|
11
|
+
Comp = _useSectionStore$Coun === void 0 ? {} : _useSectionStore$Coun;
|
|
12
12
|
useSectionRender(Comp, props, 'CountInfoExtra');
|
|
13
13
|
return null;
|
|
14
14
|
};
|
|
15
15
|
CountInfoExtra.displayName = 'JVR.CountInfoExtra';
|
|
16
16
|
export var CountInfoExtraComps = props => {
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = props,
|
|
17
|
+
var _props$value = props.value,
|
|
18
|
+
value = _props$value === void 0 ? {} : _props$value,
|
|
19
|
+
keyName = props.keyName,
|
|
21
20
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
render
|
|
28
|
-
} = Comp,
|
|
21
|
+
var _useSectionStore2 = useSectionStore(),
|
|
22
|
+
_useSectionStore2$Cou = _useSectionStore2.CountInfoExtra,
|
|
23
|
+
Comp = _useSectionStore2$Cou === void 0 ? {} : _useSectionStore2$Cou;
|
|
24
|
+
var as = Comp.as,
|
|
25
|
+
render = Comp.render,
|
|
29
26
|
reset = _objectWithoutPropertiesLoose(Comp, _excluded2);
|
|
30
27
|
if (!render && !reset.children) return null;
|
|
31
28
|
var Elm = as || 'span';
|
package/esm/section/Ellipsis.js
CHANGED
|
@@ -5,26 +5,22 @@ import { useSectionStore } from "../store/Section.js";
|
|
|
5
5
|
import { useSectionRender } from "../utils/useRender.js";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export var Ellipsis = props => {
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
var _useSectionStore = useSectionStore(),
|
|
9
|
+
_useSectionStore$Elli = _useSectionStore.Ellipsis,
|
|
10
|
+
Comp = _useSectionStore$Elli === void 0 ? {} : _useSectionStore$Elli;
|
|
11
11
|
useSectionRender(Comp, props, 'Ellipsis');
|
|
12
12
|
return null;
|
|
13
13
|
};
|
|
14
14
|
Ellipsis.displayName = 'JVR.Ellipsis';
|
|
15
15
|
export var EllipsisComp = _ref => {
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var {
|
|
25
|
-
as,
|
|
26
|
-
render
|
|
27
|
-
} = Comp,
|
|
16
|
+
var isExpanded = _ref.isExpanded,
|
|
17
|
+
value = _ref.value,
|
|
18
|
+
keyName = _ref.keyName;
|
|
19
|
+
var _useSectionStore2 = useSectionStore(),
|
|
20
|
+
_useSectionStore2$Ell = _useSectionStore2.Ellipsis,
|
|
21
|
+
Comp = _useSectionStore2$Ell === void 0 ? {} : _useSectionStore2$Ell;
|
|
22
|
+
var as = Comp.as,
|
|
23
|
+
render = Comp.render,
|
|
28
24
|
reset = _objectWithoutPropertiesLoose(Comp, _excluded);
|
|
29
25
|
var Elm = as || 'span';
|
|
30
26
|
var child = render && typeof render === 'function' && render(_extends({}, reset, {
|
package/esm/section/KeyName.js
CHANGED
|
@@ -5,32 +5,28 @@ import { useSectionStore } from "../store/Section.js";
|
|
|
5
5
|
import { useSectionRender } from "../utils/useRender.js";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export var KeyName = props => {
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
var _useSectionStore = useSectionStore(),
|
|
9
|
+
_useSectionStore$KeyN = _useSectionStore.KeyName,
|
|
10
|
+
Comp = _useSectionStore$KeyN === void 0 ? {} : _useSectionStore$KeyN;
|
|
11
11
|
useSectionRender(Comp, props, 'KeyName');
|
|
12
12
|
return null;
|
|
13
13
|
};
|
|
14
14
|
KeyName.displayName = 'JVR.KeyName';
|
|
15
15
|
export var KeyNameComp = props => {
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
keys
|
|
22
|
-
} = props;
|
|
16
|
+
var children = props.children,
|
|
17
|
+
value = props.value,
|
|
18
|
+
parentValue = props.parentValue,
|
|
19
|
+
keyName = props.keyName,
|
|
20
|
+
keys = props.keys;
|
|
23
21
|
var isNumber = typeof children === 'number';
|
|
24
22
|
var style = {
|
|
25
23
|
color: isNumber ? 'var(--w-rjv-key-number, #268bd2)' : 'var(--w-rjv-key-string, #002b36)'
|
|
26
24
|
};
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
render
|
|
33
|
-
} = Comp,
|
|
25
|
+
var _useSectionStore2 = useSectionStore(),
|
|
26
|
+
_useSectionStore2$Key = _useSectionStore2.KeyName,
|
|
27
|
+
Comp = _useSectionStore2$Key === void 0 ? {} : _useSectionStore2$Key;
|
|
28
|
+
var as = Comp.as,
|
|
29
|
+
render = Comp.render,
|
|
34
30
|
reset = _objectWithoutPropertiesLoose(Comp, _excluded);
|
|
35
31
|
reset.style = _extends({}, reset.style, style);
|
|
36
32
|
var Elm = as || 'span';
|
package/esm/section/Row.js
CHANGED
|
@@ -6,29 +6,26 @@ import { useSectionStore } from "../store/Section.js";
|
|
|
6
6
|
import { useSectionRender } from "../utils/useRender.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
export var Row = props => {
|
|
9
|
-
var
|
|
10
|
-
Row
|
|
11
|
-
|
|
9
|
+
var _useSectionStore = useSectionStore(),
|
|
10
|
+
_useSectionStore$Row = _useSectionStore.Row,
|
|
11
|
+
Comp = _useSectionStore$Row === void 0 ? {} : _useSectionStore$Row;
|
|
12
12
|
useSectionRender(Comp, props, 'Row');
|
|
13
13
|
return null;
|
|
14
14
|
};
|
|
15
15
|
Row.displayName = 'JVR.Row';
|
|
16
16
|
export var RowComp = props => {
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
keys
|
|
23
|
-
} = props,
|
|
17
|
+
var children = props.children,
|
|
18
|
+
value = props.value,
|
|
19
|
+
parentValue = props.parentValue,
|
|
20
|
+
keyName = props.keyName,
|
|
21
|
+
keys = props.keys,
|
|
24
22
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
25
|
-
var
|
|
26
|
-
Row
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} = Comp,
|
|
23
|
+
var _useSectionStore2 = useSectionStore(),
|
|
24
|
+
_useSectionStore2$Row = _useSectionStore2.Row,
|
|
25
|
+
Comp = _useSectionStore2$Row === void 0 ? {} : _useSectionStore2$Row;
|
|
26
|
+
var as = Comp.as,
|
|
27
|
+
render = Comp.render,
|
|
28
|
+
_ = Comp.children,
|
|
32
29
|
reset = _objectWithoutPropertiesLoose(Comp, _excluded2);
|
|
33
30
|
var Elm = as || 'div';
|
|
34
31
|
var child = render && typeof render === 'function' && render(_extends({}, other, reset, {
|
package/esm/store/Expands.js
CHANGED
|
@@ -16,11 +16,9 @@ export function useExpandsDispatch() {
|
|
|
16
16
|
return useContext(DispatchExpands);
|
|
17
17
|
}
|
|
18
18
|
export var Expands = _ref => {
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
children
|
|
23
|
-
} = _ref;
|
|
19
|
+
var initial = _ref.initial,
|
|
20
|
+
dispatch = _ref.dispatch,
|
|
21
|
+
children = _ref.children;
|
|
24
22
|
return /*#__PURE__*/_jsx(Context.Provider, {
|
|
25
23
|
value: initial,
|
|
26
24
|
children: /*#__PURE__*/_jsx(DispatchExpands.Provider, {
|
package/esm/store/Section.js
CHANGED
|
@@ -61,11 +61,9 @@ export function useSectionDispatch() {
|
|
|
61
61
|
return useContext(DispatchSection);
|
|
62
62
|
}
|
|
63
63
|
export var Section = _ref => {
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
children
|
|
68
|
-
} = _ref;
|
|
64
|
+
var initial = _ref.initial,
|
|
65
|
+
dispatch = _ref.dispatch,
|
|
66
|
+
children = _ref.children;
|
|
69
67
|
return /*#__PURE__*/_jsx(Context.Provider, {
|
|
70
68
|
value: initial,
|
|
71
69
|
children: /*#__PURE__*/_jsx(DispatchSection.Provider, {
|
package/esm/store/ShowTools.js
CHANGED
|
@@ -16,11 +16,9 @@ export function useShowToolsDispatch() {
|
|
|
16
16
|
return useContext(DispatchShowTools);
|
|
17
17
|
}
|
|
18
18
|
export var ShowTools = _ref => {
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
children
|
|
23
|
-
} = _ref;
|
|
19
|
+
var initial = _ref.initial,
|
|
20
|
+
dispatch = _ref.dispatch,
|
|
21
|
+
children = _ref.children;
|
|
24
22
|
return /*#__PURE__*/_jsx(Context.Provider, {
|
|
25
23
|
value: initial,
|
|
26
24
|
children: /*#__PURE__*/_jsx(DispatchShowTools.Provider, {
|
package/esm/store/Symbols.js
CHANGED
|
@@ -85,11 +85,9 @@ export function useSymbolsDispatch() {
|
|
|
85
85
|
return useContext(DispatchSymbols);
|
|
86
86
|
}
|
|
87
87
|
export var Symbols = _ref => {
|
|
88
|
-
var
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
children
|
|
92
|
-
} = _ref;
|
|
88
|
+
var initial = _ref.initial,
|
|
89
|
+
dispatch = _ref.dispatch,
|
|
90
|
+
children = _ref.children;
|
|
93
91
|
return /*#__PURE__*/_jsx(Context.Provider, {
|
|
94
92
|
value: initial,
|
|
95
93
|
children: /*#__PURE__*/_jsx(DispatchSymbols.Provider, {
|
package/esm/store/Types.js
CHANGED
|
@@ -136,11 +136,9 @@ export function useTypesDispatch() {
|
|
|
136
136
|
return useContext(DispatchTypes);
|
|
137
137
|
}
|
|
138
138
|
export function Types(_ref) {
|
|
139
|
-
var
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
children
|
|
143
|
-
} = _ref;
|
|
139
|
+
var initial = _ref.initial,
|
|
140
|
+
dispatch = _ref.dispatch,
|
|
141
|
+
children = _ref.children;
|
|
144
142
|
return /*#__PURE__*/_jsx(Context.Provider, {
|
|
145
143
|
value: initial,
|
|
146
144
|
children: /*#__PURE__*/_jsx(DispatchTypes.Provider, {
|