@uiw/react-json-view 2.0.0-alpha.1 → 2.0.0-alpha.3
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 +21 -22
- package/cjs/Container.js +3 -6
- package/cjs/comps/KeyValues.js +10 -8
- package/cjs/comps/NestedClose.js +2 -2
- package/cjs/comps/NestedOpen.js +15 -14
- package/cjs/comps/Value.js +12 -12
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +5 -5
- package/cjs/section/CountInfo.d.ts +10 -1
- package/cjs/section/CountInfo.js +42 -2
- package/cjs/section/CountInfoExtra.d.ts +10 -1
- package/cjs/section/CountInfoExtra.js +32 -2
- package/cjs/section/Ellipsis.d.ts +10 -0
- package/cjs/section/Ellipsis.js +30 -2
- package/cjs/section/KeyName.d.ts +7 -0
- package/cjs/section/KeyName.js +36 -2
- package/cjs/store/Symbols.js +1 -0
- package/{esm/comps/ReRender/Symbols.d.ts → cjs/symbol/index.d.ts} +4 -6
- package/cjs/{comps/ReRender/Symbols.js → symbol/index.js} +26 -21
- package/{esm/comps/ReRender/Types.d.ts → cjs/types/index.d.ts} +6 -13
- package/cjs/{comps/ReRender/Types.js → types/index.js} +38 -72
- package/cjs/utils/useHighlight.js +0 -1
- package/esm/Container.js +4 -5
- package/esm/comps/KeyValues.js +7 -5
- package/esm/comps/NestedClose.js +1 -1
- package/esm/comps/NestedOpen.js +10 -9
- package/esm/comps/Value.js +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +2 -2
- 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 +7 -0
- package/esm/section/KeyName.js +37 -1
- package/esm/store/Symbols.js +1 -0
- 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/{cjs/comps/ReRender/Types.d.ts → esm/types/index.d.ts} +6 -13
- package/esm/{comps/ReRender/Types.js → types/index.js} +34 -71
- package/esm/utils/useHighlight.js +0 -1
- package/package.json +1 -1
- 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 -39
- package/cjs/type.d.ts +0 -50
- package/cjs/type.js +0 -57
- 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 -35
- package/esm/type.d.ts +0 -50
- package/esm/type.js +0 -50
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ react-json-view
|
|
|
7
7
|
[](https://github.com/facebook/react/releases)
|
|
8
8
|
[](https://uiwjs.github.io/react-json-view/lcov-report/)
|
|
9
9
|
|
|
10
|
-
A React component for displaying and editing javascript arrays and JSON objects.
|
|
10
|
+
A React component for displaying and editing javascript arrays and JSON objects. Preview of [**v1 documentation**](https://raw.githack.com/uiwjs/react-json-view/v1-docs/index.html) is available [here](https://raw.githack.com/uiwjs/react-json-view/v1-docs/index.html).
|
|
11
11
|
|
|
12
12
|
<!--rehype:ignore:start-->
|
|
13
13
|
<a href="https://uiwjs.github.io/react-json-view/" target="_blank">
|
|
@@ -26,11 +26,12 @@ A React component for displaying and editing javascript arrays and JSON objects.
|
|
|
26
26
|
✏️ Support editing and adding features
|
|
27
27
|
♻️ Whether to highlight updates.
|
|
28
28
|
|
|
29
|
-
The new version [**v2**](https://
|
|
29
|
+
The new version [**v2**](https://uiwjs.github.io/react-json-view/) has redesigned the API to make the code more maintainable and introduced a simpler and more flexible component customization rendering API. Each component can now have custom rendering, and the new API resembles React more closely. Preview [v2 documentation](https://uiwjs.github.io/react-json-view/) and [examples](https://uiwjs.github.io/react-json-view/).
|
|
30
30
|
|
|
31
31
|
- [x] Complete all features of displaying JSON in v1.
|
|
32
32
|
- [ ] Add editing functionality to v2.
|
|
33
|
-
- [
|
|
33
|
+
- [x] Add test cases to v2.
|
|
34
|
+
|
|
34
35
|
|
|
35
36
|
## Quick Start
|
|
36
37
|
|
|
@@ -670,7 +671,7 @@ export default function Demo() {
|
|
|
670
671
|
|
|
671
672
|
## Props
|
|
672
673
|
|
|
673
|
-
Migrate from
|
|
674
|
+
Migrate from JSON View v1 to v2. The new v2 version has removed the ~~`quotes`~~ and ~~`components`~~ props.
|
|
674
675
|
|
|
675
676
|
```diff
|
|
676
677
|
export interface JsonViewProps<T extends object> extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
@@ -716,7 +717,6 @@ import { BracketsLeft } from './symbol/BracketsLeft';
|
|
|
716
717
|
import { BracketsRight } from './symbol/BracketsRight';
|
|
717
718
|
import { Arrow } from './symbol/Arrow';
|
|
718
719
|
import { Colon } from './symbol/Colon';
|
|
719
|
-
import { Ellipsis } from './symbol/Ellipsis';
|
|
720
720
|
import { Quote } from './symbol/Quote';
|
|
721
721
|
import { ValueQuote } from './symbol/ValueQuote';
|
|
722
722
|
import { Bigint } from './types/Bigint';
|
|
@@ -735,10 +735,8 @@ import { Url } from './types/Url';
|
|
|
735
735
|
import { Copied } from './section/Copied';
|
|
736
736
|
import { CountInfo } from './section/CountInfo';
|
|
737
737
|
import { CountInfoExtra } from './section/CountInfoExtra';
|
|
738
|
+
import { Ellipsis } from './section/Ellipsis';
|
|
738
739
|
import { KeyName } from './section/KeyName';
|
|
739
|
-
import { type CountInfoProps } from "./comps/CountInfo";
|
|
740
|
-
import { type CopiedOption } from "./comps/Copied";
|
|
741
|
-
import { type NestedOpenProps } from "./comps/NestedOpen";
|
|
742
740
|
|
|
743
741
|
type JsonViewComponent = React.FC<React.PropsWithRef<JsonViewProps<object>>> & {
|
|
744
742
|
Bigint: typeof Bigint;
|
|
@@ -776,19 +774,20 @@ export default JsonView;
|
|
|
776
774
|
|
|
777
775
|
Here is the size benchmark (using [bundlephobia.com](https://bundlephobia.com)) against similar React libraries (found by [`npmjs.com/search`](https://www.npmjs.com/search?q=react%20json&ranking=popularity)):
|
|
778
776
|
|
|
779
|
-
| Library | Bundle size (gzip) | Deps | Last commit | Download | Editable |
|
|
780
|
-
| ------- | ------- | ------- | ------- | ------- | ------- |
|
|
781
|
-
|
|
|
782
|
-
| react-json-view-lite | [](https://bundlephobia.com/result?p=react-json-view-lite) [](https://bundlephobia.com/result?p=react-json-view-lite) | [](https://bundlephobia.com/result?p=react-json-view-lite) | [](https://github.com/AnyRoad/react-json-view-lite/commits) | [](https://www.npmjs.com/package/react-json-view-lite) | ❌ |
|
|
783
|
-
| react-json-pretty | [](https://bundlephobia.com/result?p=react-json-pretty) [](https://bundlephobia.com/result?p=react-json-pretty) | [](https://bundlephobia.com/result?p=react-json-pretty) | [](https://github.com/chenckang/react-json-pretty/commits) | [](https://www.npmjs.com/package/react-json-pretty) | ❌ |
|
|
784
|
-
| react-json-inspector | [](https://bundlephobia.com/result?p=react-json-inspector) [](https://bundlephobia.com/result?p=react-json-inspector) | [](https://bundlephobia.com/result?p=react-json-inspector) | [](https://github.com/Lapple/react-json-inspector/commits) | [](https://www.npmjs.com/package/react-json-inspector) | ❌ |
|
|
785
|
-
| react-json-tree | [](https://bundlephobia.com/result?p=react-json-tree) [](https://bundlephobia.com/result?p=react-json-tree) | [](https://bundlephobia.com/result?p=react-json-tree) | [](https://github.com/reduxjs/redux-devtools/commits) | [](https://www.npmjs.com/package/react-json-tree) | ❌ |
|
|
786
|
-
| ~~react-json-view~~ | [](https://bundlephobia.com/result?p=react-json-view) [](https://bundlephobia.com/result?p=react-json-view) | [](https://bundlephobia.com/result?p=react-json-view) | [](https://github.com/mac-s-g/react-json-view/commits) | [](https://www.npmjs.com/package/react-json-view) | ✅ |
|
|
787
|
-
|
|
|
788
|
-
| react-
|
|
789
|
-
|
|
|
790
|
-
|
|
|
791
|
-
|
|
|
777
|
+
| Library | Bundle size (gzip) | Deps | Last commit | Download | Editable | Demo |
|
|
778
|
+
| ------- | ------- | ------- | ------- | ------- | ------- | ------- |
|
|
779
|
+
| **[@uiw/react-json-view](https://github.com/uiwjs/react-json-view)** | [](https://bundlephobia.com/result?p=@uiw/react-json-view) [](https://bundlephobia.com/result?p=@uiw/react-json-view) | [](https://bundlephobia.com/result?p=@uiw/react-json-view) | [](https://github.com/uiwjs/react-json-view/commits) | [](https://www.npmjs.com/package/@uiw/react-json-view) | ✅ | [demo](https://uiwjs.github.io/react-json-view/) |
|
|
780
|
+
| [react-json-view-lite](https://github.com/anyroad/react-json-view-lite) | [](https://bundlephobia.com/result?p=react-json-view-lite) [](https://bundlephobia.com/result?p=react-json-view-lite) | [](https://bundlephobia.com/result?p=react-json-view-lite) | [](https://github.com/AnyRoad/react-json-view-lite/commits) | [](https://www.npmjs.com/package/react-json-view-lite) | ❌ | [demo](https://anyroad.github.io/react-json-view-lite/) |
|
|
781
|
+
| [react-json-pretty](https://github.com/chenckang/react-json-pretty) | [](https://bundlephobia.com/result?p=react-json-pretty) [](https://bundlephobia.com/result?p=react-json-pretty) | [](https://bundlephobia.com/result?p=react-json-pretty) | [](https://github.com/chenckang/react-json-pretty/commits) | [](https://www.npmjs.com/package/react-json-pretty) | ❌ | - |
|
|
782
|
+
| [~~react-json-inspector~~](https://github.com/Lapple/react-json-inspector) | [](https://bundlephobia.com/result?p=react-json-inspector) [](https://bundlephobia.com/result?p=react-json-inspector) | [](https://bundlephobia.com/result?p=react-json-inspector) | [](https://github.com/Lapple/react-json-inspector/commits) | [](https://www.npmjs.com/package/react-json-inspector) | ❌ | [demo](https://lapple.github.io/react-json-inspector/)
|
|
783
|
+
| [react-json-tree](https://github.com/reduxjs/redux-devtools/tree/main/packages/react-json-tree) | [](https://bundlephobia.com/result?p=react-json-tree) [](https://bundlephobia.com/result?p=react-json-tree) | [](https://bundlephobia.com/result?p=react-json-tree) | [](https://github.com/reduxjs/redux-devtools/commits) | [](https://www.npmjs.com/package/react-json-tree) | ❌ |
|
|
784
|
+
| ~~[react-json-view](https://github.com/mac-s-g/react-json-view)~~ | [](https://bundlephobia.com/result?p=react-json-view) [](https://bundlephobia.com/result?p=react-json-view) | [](https://bundlephobia.com/result?p=react-json-view) | [](https://github.com/mac-s-g/react-json-view/commits) | [](https://www.npmjs.com/package/react-json-view) | ✅ | [demo](https://mac-s-g.github.io/react-json-view/demo/dist/) |
|
|
785
|
+
| [react-inspector](https://github.com/storybookjs/react-inspector) | [](https://bundlephobia.com/result?p=react-inspector) [](https://bundlephobia.com/result?p=react-inspector) | [](https://bundlephobia.com/result?p=react-inspector) | [](https://github.com/storybookjs/react-inspector/commits) | [](https://www.npmjs.com/package/react-inspector) | ❌ | [demo](https://react-inspector.netlify.app/) |
|
|
786
|
+
| [react-domify](https://github.com/JedWatson/react-domify) | [](https://bundlephobia.com/result?p=react-domify) [](https://bundlephobia.com/result?p=react-domify) | [](https://bundlephobia.com/result?p=react-domify) | [](https://github.com/JedWatson/react-domify/commits) | [](https://www.npmjs.com/package/react-domify) | ❌ | [demo](https://jedwatson.github.io/react-domify/) |
|
|
787
|
+
| [react18-json-view](https://github.com/YYsuni/react18-json-view) | [](https://bundlephobia.com/result?p=react18-json-view) [](https://bundlephobia.com/result?p=react18-json-view) | [](https://bundlephobia.com/result?p=react18-json-view) | [](https://github.com/YYsuni/react18-json-view/commits) | [](https://www.npmjs.com/package/react18-json-view) | ❌ | [demo](https://jv.yysuni.com/) |
|
|
788
|
+
| [@textea/json-viewer](https://github.com/TexteaInc/json-viewer) | [](https://bundlephobia.com/result?p=@textea/json-viewer) [](https://bundlephobia.com/result?p=@textea/json-viewer) | [](https://bundlephobia.com/result?p=@textea/json-viewer) | [](https://github.com/TexteaInc/json-viewer/commits) | [](https://www.npmjs.com/package/@textea/json-viewer) | ✅ | [demo](https://stackblitz.com/edit/textea-json-viewer-v3-b4wgxq) |
|
|
789
|
+
| [react-editable-json-tree](https://github.com/oxyno-zeta/react-editable-json-tree) | [](https://bundlephobia.com/result?p=react-editable-json-tree) [](https://bundlephobia.com/result?p=react-editable-json-tree) | [](https://bundlephobia.com/result?p=react-editable-json-tree) | [](https://github.com/TexteaInc/json-viewer/commits) | [](https://www.npmjs.com/package/react-editable-json-tree) | ✅ | [demo](https://oxyno-zeta.github.io/react-editable-json-tree/) |
|
|
790
|
+
| [react-json-view](https://github.com/HuolalaTech/react-json-view) | [](https://bundlephobia.com/result?p=@huolala-tech/react-json-view) [](https://bundlephobia.com/result?p=@huolala-tech/react-json-view) | [](https://bundlephobia.com/result?p=@huolala-tech/react-json-view) | [](https://github.com/HuolalaTech/react-json-view/commits) | [](https://www.npmjs.com/package/@huolala-tech/react-json-view) | ❌ | [demo](https://huolalatech.github.io/react-json-view/) |
|
|
792
791
|
|
|
793
792
|
## Development
|
|
794
793
|
|
|
@@ -819,7 +818,7 @@ As always, thanks to our amazing contributors!
|
|
|
819
818
|
<img src="https://uiwjs.github.io/react-json-view/CONTRIBUTORS.svg" />
|
|
820
819
|
</a>
|
|
821
820
|
|
|
822
|
-
Made with [
|
|
821
|
+
Made with [contributors](https://github.com/jaywcjlove/github-action-contributors).
|
|
823
822
|
|
|
824
823
|
## License
|
|
825
824
|
|
package/cjs/Container.js
CHANGED
|
@@ -28,13 +28,9 @@ var Container = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
28
28
|
initialValue = props.initialValue,
|
|
29
29
|
keyName = props.keyName,
|
|
30
30
|
elmProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
31
|
-
var $ref = (0, _react.useRef)(null);
|
|
32
31
|
var dispatch = (0, _ShowTools.useShowToolsDispatch)();
|
|
33
|
-
(0, _react.useImperativeHandle)(ref, function () {
|
|
34
|
-
return $ref.current;
|
|
35
|
-
}, [$ref]);
|
|
36
32
|
var subkeyid = (0, _react.useId)();
|
|
37
|
-
var defaultClassNames =
|
|
33
|
+
var defaultClassNames = [className, 'w-rjv-inner'].filter(Boolean).join(' ');
|
|
38
34
|
var reset = {
|
|
39
35
|
onMouseEnter: function onMouseEnter() {
|
|
40
36
|
return dispatch((0, _defineProperty2["default"])({}, subkeyid, true));
|
|
@@ -44,7 +40,8 @@ var Container = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
44
40
|
}
|
|
45
41
|
};
|
|
46
42
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2["default"])((0, _objectSpread2["default"])((0, _objectSpread2["default"])({
|
|
47
|
-
className: defaultClassNames
|
|
43
|
+
className: defaultClassNames,
|
|
44
|
+
ref: ref
|
|
48
45
|
}, elmProps), reset), {}, {
|
|
49
46
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_NestedOpen.NestedOpen, {
|
|
50
47
|
expandKey: subkeyid,
|
package/cjs/comps/KeyValues.js
CHANGED
|
@@ -14,9 +14,9 @@ var _store = require("../store");
|
|
|
14
14
|
var _Expands = require("../store/Expands");
|
|
15
15
|
var _ShowTools = require("../store/ShowTools");
|
|
16
16
|
var _Value = require("./Value");
|
|
17
|
-
var
|
|
17
|
+
var _KeyName = require("../section/KeyName");
|
|
18
18
|
var _Container = require("../Container");
|
|
19
|
-
var
|
|
19
|
+
var _symbol = require("../symbol");
|
|
20
20
|
var _useHighlight = require("../utils/useHighlight");
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
var KeyValues = function KeyValues(props) {
|
|
@@ -92,16 +92,18 @@ var KayName = function KayName(props) {
|
|
|
92
92
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
93
93
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
94
94
|
ref: highlightContainer,
|
|
95
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
96
|
-
isNumber: isNumber
|
|
97
|
-
|
|
95
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Quote, {
|
|
96
|
+
isNumber: isNumber,
|
|
97
|
+
"data-placement": "left"
|
|
98
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyName.KeyNameComp, {
|
|
98
99
|
keyName: keyName,
|
|
99
100
|
value: value,
|
|
100
101
|
children: keyName
|
|
101
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
102
|
-
isNumber: isNumber
|
|
102
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Quote, {
|
|
103
|
+
isNumber: isNumber,
|
|
104
|
+
"data-placement": "right"
|
|
103
105
|
})]
|
|
104
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
106
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Colon, {})]
|
|
105
107
|
});
|
|
106
108
|
};
|
|
107
109
|
exports.KayName = KayName;
|
package/cjs/comps/NestedClose.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.NestedClose = void 0;
|
|
7
7
|
var _store = require("../store");
|
|
8
8
|
var _Expands = require("../store/Expands");
|
|
9
|
-
var
|
|
9
|
+
var _symbol = require("../symbol");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
var NestedClose = function NestedClose(props) {
|
|
12
12
|
var _expands$expandKey;
|
|
@@ -28,7 +28,7 @@ var NestedClose = function NestedClose(props) {
|
|
|
28
28
|
};
|
|
29
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
30
30
|
style: style,
|
|
31
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
31
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.BracketsClose, {
|
|
32
32
|
isBrackets: isArray || isMySet,
|
|
33
33
|
isVisiable: true
|
|
34
34
|
})
|
package/cjs/comps/NestedOpen.js
CHANGED
|
@@ -12,10 +12,11 @@ var _KeyValues = require("./KeyValues");
|
|
|
12
12
|
var _Expands = require("../store/Expands");
|
|
13
13
|
var _store = require("../store");
|
|
14
14
|
var _Copied = require("./Copied");
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
15
|
+
var _CountInfoExtra = require("../section/CountInfoExtra");
|
|
16
|
+
var _CountInfo = require("../section/CountInfo");
|
|
17
|
+
var _symbol = require("../symbol");
|
|
18
|
+
var _Ellipsis = require("../section/Ellipsis");
|
|
19
|
+
var _types = require("../types");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
21
|
var NestedOpen = function NestedOpen(props) {
|
|
21
22
|
var _expands$expandKey;
|
|
@@ -60,28 +61,28 @@ var NestedOpen = function NestedOpen(props) {
|
|
|
60
61
|
reset.onClick = click;
|
|
61
62
|
}
|
|
62
63
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
63
|
-
children: [showArrow && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
64
|
+
children: [showArrow && /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.Arrow, {
|
|
64
65
|
style: arrowStyle,
|
|
65
66
|
expandKey: expandKey
|
|
66
67
|
}), (keyName || typeof keyName === 'number') && /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyValues.KayName, {
|
|
67
68
|
keyName: keyName
|
|
68
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
69
|
-
|
|
70
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
71
|
-
|
|
72
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
69
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.SetComp, {
|
|
70
|
+
value: initialValue
|
|
71
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.MapComp, {
|
|
72
|
+
value: initialValue
|
|
73
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.BracketsOpen, {
|
|
73
74
|
isBrackets: isArray || isMySet
|
|
74
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Ellipsis.
|
|
75
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Ellipsis.EllipsisComp, {
|
|
75
76
|
keyName: keyName,
|
|
76
77
|
value: value,
|
|
77
78
|
isExpanded: isExpanded
|
|
78
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
79
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.BracketsClose, {
|
|
79
80
|
isVisiable: isExpanded || !showArrow,
|
|
80
81
|
isBrackets: isArray || isMySet
|
|
81
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CountInfo.
|
|
82
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CountInfo.CountInfoComp, {
|
|
82
83
|
value: value,
|
|
83
84
|
keyName: keyName
|
|
84
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
85
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CountInfoExtra.CountInfoExtraComps, {
|
|
85
86
|
value: value,
|
|
86
87
|
keyName: keyName
|
|
87
88
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, {
|
package/cjs/comps/Value.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.isFloat = exports.Value = void 0;
|
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
-
var
|
|
9
|
+
var _types = require("../types");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
var isFloat = function isFloat(n) {
|
|
12
12
|
return Number(n) === n && n % 1 !== 0 || isNaN(n);
|
|
@@ -21,54 +21,54 @@ var Value = function Value(props) {
|
|
|
21
21
|
expandKey: expandKey
|
|
22
22
|
};
|
|
23
23
|
if (value instanceof URL) {
|
|
24
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeUrl, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
25
25
|
children: value
|
|
26
26
|
}));
|
|
27
27
|
}
|
|
28
28
|
if (typeof value === 'string') {
|
|
29
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeString, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
30
30
|
children: value
|
|
31
31
|
}));
|
|
32
32
|
}
|
|
33
33
|
if (value === true) {
|
|
34
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
34
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeTrue, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
35
35
|
children: value
|
|
36
36
|
}));
|
|
37
37
|
}
|
|
38
38
|
if (value === false) {
|
|
39
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeFalse, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
40
40
|
children: value
|
|
41
41
|
}));
|
|
42
42
|
}
|
|
43
43
|
if (value === null) {
|
|
44
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeNull, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
45
45
|
children: value
|
|
46
46
|
}));
|
|
47
47
|
}
|
|
48
48
|
if (value === undefined) {
|
|
49
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
49
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeUndefined, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
50
50
|
children: value
|
|
51
51
|
}));
|
|
52
52
|
}
|
|
53
53
|
if (value instanceof Date) {
|
|
54
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
54
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeDate, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
55
55
|
children: value
|
|
56
56
|
}));
|
|
57
57
|
}
|
|
58
58
|
if (typeof value === 'number' && isNaN(value)) {
|
|
59
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
59
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeNan, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
60
60
|
children: value
|
|
61
61
|
}));
|
|
62
62
|
} else if (typeof value === 'number' && isFloat(value)) {
|
|
63
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
63
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeFloat, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
64
64
|
children: value
|
|
65
65
|
}));
|
|
66
66
|
} else if (typeof value === 'bigint') {
|
|
67
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
67
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeBigint, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
68
68
|
children: value
|
|
69
69
|
}));
|
|
70
70
|
} else if (typeof value === 'number') {
|
|
71
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
71
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.TypeInt, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
72
72
|
children: value
|
|
73
73
|
}));
|
|
74
74
|
}
|
package/cjs/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export * from './store/Expands';
|
|
|
30
30
|
export * from './store/ShowTools';
|
|
31
31
|
export * from './store/Symbols';
|
|
32
32
|
export * from './store/Types';
|
|
33
|
-
export * from './
|
|
33
|
+
export * from './symbol';
|
|
34
34
|
export interface JsonViewProps<T extends object> extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
35
35
|
/** This property contains your input JSON */
|
|
36
36
|
value?: T;
|
package/cjs/index.js
CHANGED
|
@@ -97,15 +97,15 @@ Object.keys(_Types).forEach(function (key) {
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
});
|
|
100
|
-
var
|
|
101
|
-
Object.keys(
|
|
100
|
+
var _symbol = require("./symbol");
|
|
101
|
+
Object.keys(_symbol).forEach(function (key) {
|
|
102
102
|
if (key === "default" || key === "__esModule") return;
|
|
103
103
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
104
|
-
if (key in exports && exports[key] ===
|
|
104
|
+
if (key in exports && exports[key] === _symbol[key]) return;
|
|
105
105
|
Object.defineProperty(exports, key, {
|
|
106
106
|
enumerable: true,
|
|
107
107
|
get: function get() {
|
|
108
|
-
return
|
|
108
|
+
return _symbol[key];
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
});
|
|
@@ -140,7 +140,7 @@ var JsonView = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
140
140
|
backgroundColor: 'var(--w-rjv-background-color, #00000000)',
|
|
141
141
|
fontSize: 13
|
|
142
142
|
}, style);
|
|
143
|
-
var cls =
|
|
143
|
+
var cls = ['w-json-view-container', 'w-rjv', className].filter(Boolean).join(' ');
|
|
144
144
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_store.Provider, {
|
|
145
145
|
initialState: {
|
|
146
146
|
value: value,
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { type TagType } from '../store/Types';
|
|
2
|
-
import { type SectionElement } from '../store/Section';
|
|
3
|
+
import { type SectionElement, type SectionElementProps } from '../store/Section';
|
|
3
4
|
export declare const CountInfo: {
|
|
4
5
|
<K extends TagType>(props: SectionElement<K>): null;
|
|
5
6
|
displayName: string;
|
|
6
7
|
};
|
|
8
|
+
export interface CountInfoCompProps<T extends object> {
|
|
9
|
+
value?: T;
|
|
10
|
+
keyName: string | number;
|
|
11
|
+
}
|
|
12
|
+
export declare const CountInfoComp: {
|
|
13
|
+
<T extends object>(props: SectionElementProps<TagType> & CountInfoCompProps<T> & import("react").HTMLAttributes<HTMLElement>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
package/cjs/section/CountInfo.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.CountInfo = void 0;
|
|
7
|
+
exports.CountInfoComp = exports.CountInfo = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
7
10
|
var _Section = require("../store/Section");
|
|
8
11
|
var _useRender = require("../utils/useRender");
|
|
12
|
+
var _store = require("../store");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
var _excluded = ["value", "keyName"],
|
|
15
|
+
_excluded2 = ["as", "render"];
|
|
9
16
|
var CountInfo = function CountInfo(props) {
|
|
10
17
|
var _useSectionStore = (0, _Section.useSectionStore)(),
|
|
11
18
|
_useSectionStore$Coun = _useSectionStore.CountInfo,
|
|
@@ -14,4 +21,37 @@ var CountInfo = function CountInfo(props) {
|
|
|
14
21
|
return null;
|
|
15
22
|
};
|
|
16
23
|
exports.CountInfo = CountInfo;
|
|
17
|
-
CountInfo.displayName = 'JVR.CountInfo';
|
|
24
|
+
CountInfo.displayName = 'JVR.CountInfo';
|
|
25
|
+
var CountInfoComp = function CountInfoComp(props) {
|
|
26
|
+
var _props$value = props.value,
|
|
27
|
+
value = _props$value === void 0 ? {} : _props$value,
|
|
28
|
+
keyName = props.keyName,
|
|
29
|
+
other = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
30
|
+
var _useStore = (0, _store.useStore)(),
|
|
31
|
+
displayObjectSize = _useStore.displayObjectSize;
|
|
32
|
+
var _useSectionStore2 = (0, _Section.useSectionStore)(),
|
|
33
|
+
_useSectionStore2$Cou = _useSectionStore2.CountInfo,
|
|
34
|
+
Comp = _useSectionStore2$Cou === void 0 ? {} : _useSectionStore2$Cou;
|
|
35
|
+
if (!displayObjectSize) return null;
|
|
36
|
+
var as = Comp.as,
|
|
37
|
+
render = Comp.render,
|
|
38
|
+
reset = (0, _objectWithoutProperties2["default"])(Comp, _excluded2);
|
|
39
|
+
var Elm = as || 'span';
|
|
40
|
+
reset.style = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset.style), props.style);
|
|
41
|
+
var len = Object.keys(value).length;
|
|
42
|
+
if (!reset.children) {
|
|
43
|
+
reset.children = "".concat(len, " items");
|
|
44
|
+
}
|
|
45
|
+
var elmProps = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), other);
|
|
46
|
+
var isRender = render && typeof render === 'function';
|
|
47
|
+
var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, elmProps), {}, {
|
|
48
|
+
'data-length': len
|
|
49
|
+
}), {
|
|
50
|
+
value: value,
|
|
51
|
+
keyName: keyName
|
|
52
|
+
});
|
|
53
|
+
if (child) return child;
|
|
54
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2["default"])({}, elmProps));
|
|
55
|
+
};
|
|
56
|
+
exports.CountInfoComp = CountInfoComp;
|
|
57
|
+
CountInfoComp.displayName = 'JVR.CountInfoComp';
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { type TagType } from '../store/Types';
|
|
2
|
-
import { type SectionElement } from '../store/Section';
|
|
3
|
+
import { type SectionElement, type SectionElementProps } from '../store/Section';
|
|
3
4
|
export declare const CountInfoExtra: {
|
|
4
5
|
<K extends TagType>(props: SectionElement<K>): null;
|
|
5
6
|
displayName: string;
|
|
6
7
|
};
|
|
8
|
+
export interface CountInfoExtraCompsProps<T extends object> {
|
|
9
|
+
value?: T;
|
|
10
|
+
keyName: string | number;
|
|
11
|
+
}
|
|
12
|
+
export declare const CountInfoExtraComps: {
|
|
13
|
+
<T extends object>(props: SectionElementProps<TagType> & CountInfoExtraCompsProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.CountInfoExtra = void 0;
|
|
7
|
+
exports.CountInfoExtraComps = exports.CountInfoExtra = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
7
10
|
var _Section = require("../store/Section");
|
|
8
11
|
var _useRender = require("../utils/useRender");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
var _excluded = ["value", "keyName"],
|
|
14
|
+
_excluded2 = ["as", "render"];
|
|
9
15
|
var CountInfoExtra = function CountInfoExtra(props) {
|
|
10
16
|
var _useSectionStore = (0, _Section.useSectionStore)(),
|
|
11
17
|
_useSectionStore$Coun = _useSectionStore.CountInfoExtra,
|
|
@@ -14,4 +20,28 @@ var CountInfoExtra = function CountInfoExtra(props) {
|
|
|
14
20
|
return null;
|
|
15
21
|
};
|
|
16
22
|
exports.CountInfoExtra = CountInfoExtra;
|
|
17
|
-
CountInfoExtra.displayName = 'JVR.CountInfoExtra';
|
|
23
|
+
CountInfoExtra.displayName = 'JVR.CountInfoExtra';
|
|
24
|
+
var CountInfoExtraComps = function CountInfoExtraComps(props) {
|
|
25
|
+
var _props$value = props.value,
|
|
26
|
+
value = _props$value === void 0 ? {} : _props$value,
|
|
27
|
+
keyName = props.keyName,
|
|
28
|
+
other = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
29
|
+
var _useSectionStore2 = (0, _Section.useSectionStore)(),
|
|
30
|
+
_useSectionStore2$Cou = _useSectionStore2.CountInfoExtra,
|
|
31
|
+
Comp = _useSectionStore2$Cou === void 0 ? {} : _useSectionStore2$Cou;
|
|
32
|
+
var as = Comp.as,
|
|
33
|
+
render = Comp.render,
|
|
34
|
+
reset = (0, _objectWithoutProperties2["default"])(Comp, _excluded2);
|
|
35
|
+
if (!render && !reset.children) return null;
|
|
36
|
+
var Elm = as || 'span';
|
|
37
|
+
var isRender = render && typeof render === 'function';
|
|
38
|
+
var elmProps = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), other);
|
|
39
|
+
var child = isRender && render(elmProps, {
|
|
40
|
+
value: value,
|
|
41
|
+
keyName: keyName
|
|
42
|
+
});
|
|
43
|
+
if (child) return child;
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2["default"])({}, elmProps));
|
|
45
|
+
};
|
|
46
|
+
exports.CountInfoExtraComps = CountInfoExtraComps;
|
|
47
|
+
CountInfoExtraComps.displayName = 'JVR.CountInfoExtraComps';
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { type TagType } from '../store/Types';
|
|
2
3
|
import { type SectionElement } from '../store/Section';
|
|
3
4
|
export declare const Ellipsis: {
|
|
4
5
|
<K extends TagType>(props: SectionElement<K>): null;
|
|
5
6
|
displayName: string;
|
|
6
7
|
};
|
|
8
|
+
export interface EllipsisCompProps<T extends object> {
|
|
9
|
+
value?: T;
|
|
10
|
+
keyName: string | number;
|
|
11
|
+
isExpanded: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const EllipsisComp: {
|
|
14
|
+
<T extends object>({ isExpanded, value, keyName }: EllipsisCompProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
package/cjs/section/Ellipsis.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.Ellipsis = void 0;
|
|
7
|
+
exports.EllipsisComp = exports.Ellipsis = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
7
10
|
var _Section = require("../store/Section");
|
|
8
11
|
var _useRender = require("../utils/useRender");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
var _excluded = ["as", "render"];
|
|
9
14
|
var Ellipsis = function Ellipsis(props) {
|
|
10
15
|
var _useSectionStore = (0, _Section.useSectionStore)(),
|
|
11
16
|
_useSectionStore$Elli = _useSectionStore.Ellipsis,
|
|
@@ -14,4 +19,27 @@ var Ellipsis = function Ellipsis(props) {
|
|
|
14
19
|
return null;
|
|
15
20
|
};
|
|
16
21
|
exports.Ellipsis = Ellipsis;
|
|
17
|
-
Ellipsis.displayName = 'JVR.Ellipsis';
|
|
22
|
+
Ellipsis.displayName = 'JVR.Ellipsis';
|
|
23
|
+
var EllipsisComp = function EllipsisComp(_ref) {
|
|
24
|
+
var isExpanded = _ref.isExpanded,
|
|
25
|
+
value = _ref.value,
|
|
26
|
+
keyName = _ref.keyName;
|
|
27
|
+
var _useSectionStore2 = (0, _Section.useSectionStore)(),
|
|
28
|
+
_useSectionStore2$Ell = _useSectionStore2.Ellipsis,
|
|
29
|
+
Comp = _useSectionStore2$Ell === void 0 ? {} : _useSectionStore2$Ell;
|
|
30
|
+
var as = Comp.as,
|
|
31
|
+
render = Comp.render,
|
|
32
|
+
reset = (0, _objectWithoutProperties2["default"])(Comp, _excluded);
|
|
33
|
+
var Elm = as || 'span';
|
|
34
|
+
var child = render && typeof render === 'function' && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
|
|
35
|
+
'data-expanded': isExpanded
|
|
36
|
+
}), {
|
|
37
|
+
value: value,
|
|
38
|
+
keyName: keyName
|
|
39
|
+
});
|
|
40
|
+
if (child) return child;
|
|
41
|
+
if (!isExpanded) return null;
|
|
42
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2["default"])({}, reset));
|
|
43
|
+
};
|
|
44
|
+
exports.EllipsisComp = EllipsisComp;
|
|
45
|
+
EllipsisComp.displayName = 'JVR.EllipsisComp';
|
package/cjs/section/KeyName.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import { type FC, type PropsWithChildren } from 'react';
|
|
1
2
|
import { type TagType } from '../store/Types';
|
|
2
3
|
import { type SectionElement } from '../store/Section';
|
|
3
4
|
export declare const KeyName: {
|
|
4
5
|
<K extends TagType>(props: SectionElement<K>): null;
|
|
5
6
|
displayName: string;
|
|
6
7
|
};
|
|
8
|
+
type KeyNameCompProps = {
|
|
9
|
+
keyName: string | number;
|
|
10
|
+
value?: unknown;
|
|
11
|
+
};
|
|
12
|
+
export declare const KeyNameComp: FC<PropsWithChildren<KeyNameCompProps>>;
|
|
13
|
+
export {};
|