@uiw/react-json-view
Advanced tools
Comparing version 2.0.0-alpha.16 to 2.0.0-alpha.17
/// <reference types="react" /> | ||
import { type TagType } from '../store/Types'; | ||
import { type SectionElementResult } from '../store/Section'; | ||
export type CopiedOption<T extends object> = { | ||
@@ -8,5 +9,3 @@ value?: T; | ||
}; | ||
export interface CopiedProps<T extends object> extends React.SVGProps<SVGSVGElement> { | ||
value?: T; | ||
keyName: string | number; | ||
export interface CopiedProps<T extends object> extends React.SVGProps<SVGSVGElement>, SectionElementResult<T> { | ||
expandKey: string; | ||
@@ -13,0 +12,0 @@ } |
@@ -16,3 +16,3 @@ "use strict"; | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
var _excluded = ["keyName", "value", "expandKey"], | ||
var _excluded = ["keyName", "value", "parentValue", "expandKey", "keys"], | ||
_excluded2 = ["as", "render"]; | ||
@@ -22,3 +22,5 @@ var Copied = exports.Copied = function Copied(props) { | ||
value = props.value, | ||
parentValue = props.parentValue, | ||
expandKey = props.expandKey, | ||
keys = props.keys, | ||
other = (0, _objectWithoutProperties2["default"])(props, _excluded); | ||
@@ -79,3 +81,5 @@ var _useStore = (0, _store.useStore)(), | ||
value: value, | ||
keyName: keyName | ||
keyName: keyName, | ||
keys: keys, | ||
parentValue: parentValue | ||
}); | ||
@@ -82,0 +86,0 @@ if (child) return child; |
@@ -23,2 +23,3 @@ "use strict"; | ||
var _useHighlight = require("../utils/useHighlight"); | ||
var _Copied = require("../comps/Copied"); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
@@ -90,2 +91,3 @@ var KeyValues = exports.KeyValues = function KeyValues(props) { | ||
parentValue = props.parentValue, | ||
keys = props.keys, | ||
value = props.value; | ||
@@ -110,2 +112,3 @@ var _useStore2 = (0, _store.useStore)(), | ||
value: value, | ||
keys: keys, | ||
parentValue: parentValue, | ||
@@ -167,6 +170,12 @@ children: keyName | ||
value: value, | ||
keys: keys, | ||
parentValue: parentValue | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Value.Value, { | ||
keyName: keyName, | ||
value: value | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, { | ||
keyName: keyName, | ||
value: value, | ||
keys: keys, | ||
parentValue: parentValue, | ||
expandKey: subkeyid | ||
@@ -173,0 +182,0 @@ })] |
@@ -1,4 +0,3 @@ | ||
export interface NestedOpenProps<T extends object> { | ||
keyName?: string | number; | ||
value?: T; | ||
import { type SectionElementResult } from '../store/Section'; | ||
export interface NestedOpenProps<T extends object> extends SectionElementResult<T> { | ||
initialValue?: T; | ||
@@ -5,0 +4,0 @@ expandKey: string; |
@@ -25,4 +25,6 @@ "use strict"; | ||
expandKey = props.expandKey, | ||
keys = props.keys, | ||
initialValue = props.initialValue, | ||
value = props.value, | ||
parentValue = props.parentValue, | ||
level = props.level; | ||
@@ -94,3 +96,5 @@ var expands = (0, _Expands.useExpandsStore)(); | ||
value: value, | ||
expandKey: expandKey | ||
expandKey: expandKey, | ||
parentValue: parentValue, | ||
keys: keys | ||
})] | ||
@@ -97,0 +101,0 @@ })); |
export declare const isFloat: (n: number) => boolean; | ||
interface ValueProps { | ||
value?: unknown; | ||
value: unknown; | ||
keyName: string | number; | ||
expandKey: string; | ||
} | ||
@@ -7,0 +6,0 @@ export declare const Value: { |
@@ -16,7 +16,5 @@ "use strict"; | ||
var value = props.value, | ||
keyName = props.keyName, | ||
expandKey = props.expandKey; | ||
keyName = props.keyName; | ||
var reset = { | ||
keyName: keyName, | ||
expandKey: expandKey | ||
keyName: keyName | ||
}; | ||
@@ -23,0 +21,0 @@ if (value instanceof URL) { |
@@ -51,2 +51,4 @@ "use strict"; | ||
level: level, | ||
keys: keys, | ||
parentValue: parentValue, | ||
keyName: keyName, | ||
@@ -58,3 +60,5 @@ initialValue: initialValue | ||
level: level, | ||
keys: keys | ||
keys: keys, | ||
parentValue: parentValue, | ||
keyName: keyName | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_NestedClose.NestedClose, { | ||
@@ -61,0 +65,0 @@ expandKey: subkeyid, |
@@ -1,2 +0,2 @@ | ||
import { SectionElementProps } from '../store/Section'; | ||
import { type SectionElementProps } from '../store/Section'; | ||
export declare const KeyNameRender: SectionElementProps['render']; |
@@ -11,3 +11,2 @@ import { FC, PropsWithChildren } from 'react'; | ||
type TypeProps = PropsWithChildren<{ | ||
expandKey: string; | ||
keyName: string | number; | ||
@@ -14,0 +13,0 @@ }>; |
@@ -15,3 +15,2 @@ "use strict"; | ||
var _symbol = require("../symbol"); | ||
var _Copied = require("../comps/Copied"); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
@@ -84,3 +83,2 @@ var _excluded = ["as", "render"], | ||
children = _ref3$children === void 0 ? '' : _ref3$children, | ||
expandKey = _ref3.expandKey, | ||
keyName = _ref3.keyName; | ||
@@ -142,6 +140,2 @@ var _useTypesStore3 = (0, _Types.useTypesStore)(), | ||
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {})] | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
@@ -153,3 +147,2 @@ }); | ||
var children = _ref4.children, | ||
expandKey = _ref4.expandKey, | ||
keyName = _ref4.keyName; | ||
@@ -187,7 +180,3 @@ var _useTypesStore4 = (0, _Types.useTypesStore)(), | ||
children: children === null || children === void 0 ? void 0 : children.toString() | ||
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))] | ||
}); | ||
@@ -198,3 +187,2 @@ }; | ||
var children = _ref5.children, | ||
expandKey = _ref5.expandKey, | ||
keyName = _ref5.keyName; | ||
@@ -232,7 +220,3 @@ var _useTypesStore5 = (0, _Types.useTypesStore)(), | ||
children: children === null || children === void 0 ? void 0 : children.toString() | ||
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))] | ||
}); | ||
@@ -243,3 +227,2 @@ }; | ||
var children = _ref6.children, | ||
expandKey = _ref6.expandKey, | ||
keyName = _ref6.keyName; | ||
@@ -277,7 +260,3 @@ var _useTypesStore6 = (0, _Types.useTypesStore)(), | ||
children: children === null || children === void 0 ? void 0 : children.toString() | ||
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))] | ||
}); | ||
@@ -288,3 +267,2 @@ }; | ||
var children = _ref7.children, | ||
expandKey = _ref7.expandKey, | ||
keyName = _ref7.keyName; | ||
@@ -322,7 +300,3 @@ var _useTypesStore7 = (0, _Types.useTypesStore)(), | ||
children: children === null || children === void 0 ? void 0 : children.toString() | ||
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))] | ||
}); | ||
@@ -333,3 +307,2 @@ }; | ||
var children = _ref8.children, | ||
expandKey = _ref8.expandKey, | ||
keyName = _ref8.keyName; | ||
@@ -367,7 +340,3 @@ var _useTypesStore8 = (0, _Types.useTypesStore)(), | ||
children: (children === null || children === void 0 ? void 0 : children.toString()) + 'n' | ||
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))] | ||
}); | ||
@@ -378,3 +347,2 @@ }; | ||
var children = _ref9.children, | ||
expandKey = _ref9.expandKey, | ||
keyName = _ref9.keyName; | ||
@@ -415,7 +383,3 @@ var _useTypesStore9 = (0, _Types.useTypesStore)(), | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {}), children === null || children === void 0 ? void 0 : children.href, /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.ValueQuote, {})] | ||
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))] | ||
}); | ||
@@ -426,3 +390,2 @@ }; | ||
var children = _ref10.children, | ||
expandKey = _ref10.expandKey, | ||
keyName = _ref10.keyName; | ||
@@ -461,7 +424,3 @@ var _useTypesStore10 = (0, _Types.useTypesStore)(), | ||
children: childStr | ||
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))] | ||
}); | ||
@@ -472,3 +431,2 @@ }; | ||
var children = _ref11.children, | ||
expandKey = _ref11.expandKey, | ||
keyName = _ref11.keyName; | ||
@@ -503,7 +461,3 @@ var _useTypesStore11 = (0, _Types.useTypesStore)(), | ||
style: style | ||
}))), child, /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))), child] | ||
}); | ||
@@ -514,3 +468,2 @@ }; | ||
var children = _ref12.children, | ||
expandKey = _ref12.expandKey, | ||
keyName = _ref12.keyName; | ||
@@ -545,7 +498,3 @@ var _useTypesStore12 = (0, _Types.useTypesStore)(), | ||
style: style | ||
}))), child, /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))), child] | ||
}); | ||
@@ -556,3 +505,2 @@ }; | ||
var children = _ref13.children, | ||
expandKey = _ref13.expandKey, | ||
keyName = _ref13.keyName; | ||
@@ -587,9 +535,5 @@ var _useTypesStore13 = (0, _Types.useTypesStore)(), | ||
style: style | ||
}))), child, /*#__PURE__*/(0, _jsxRuntime.jsx)(_Copied.Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))), child] | ||
}); | ||
}; | ||
TypeNan.displayName = 'JVR.TypeNan'; |
/// <reference types="react" /> | ||
import { type TagType } from '../store/Types'; | ||
import { type SectionElementResult } from '../store/Section'; | ||
export type CopiedOption<T extends object> = { | ||
@@ -8,5 +9,3 @@ value?: T; | ||
}; | ||
export interface CopiedProps<T extends object> extends React.SVGProps<SVGSVGElement> { | ||
value?: T; | ||
keyName: string | number; | ||
export interface CopiedProps<T extends object> extends React.SVGProps<SVGSVGElement>, SectionElementResult<T> { | ||
expandKey: string; | ||
@@ -13,0 +12,0 @@ } |
import _extends from "@babel/runtime/helpers/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
var _excluded = ["keyName", "value", "expandKey"], | ||
var _excluded = ["keyName", "value", "parentValue", "expandKey", "keys"], | ||
_excluded2 = ["as", "render"]; | ||
@@ -14,3 +14,5 @@ import { useState } from 'react'; | ||
value, | ||
expandKey | ||
parentValue, | ||
expandKey, | ||
keys | ||
} = props, | ||
@@ -71,3 +73,5 @@ other = _objectWithoutPropertiesLoose(props, _excluded); | ||
value, | ||
keyName | ||
keyName, | ||
keys, | ||
parentValue | ||
}); | ||
@@ -74,0 +78,0 @@ if (child) return child; |
@@ -12,2 +12,3 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
import { useHighlight } from '../utils/useHighlight'; | ||
import { Copied } from '../comps/Copied'; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
@@ -72,2 +73,3 @@ import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
parentValue, | ||
keys, | ||
value | ||
@@ -94,2 +96,3 @@ } = props; | ||
value: value, | ||
keys: keys, | ||
parentValue: parentValue, | ||
@@ -151,6 +154,12 @@ children: keyName | ||
value: value, | ||
keys: keys, | ||
parentValue: parentValue | ||
}), /*#__PURE__*/_jsx(Value, { | ||
keyName: keyName, | ||
value: value | ||
}), /*#__PURE__*/_jsx(Copied, { | ||
keyName: keyName, | ||
value: value, | ||
keys: keys, | ||
parentValue: parentValue, | ||
expandKey: subkeyid | ||
@@ -157,0 +166,0 @@ })] |
@@ -1,4 +0,3 @@ | ||
export interface NestedOpenProps<T extends object> { | ||
keyName?: string | number; | ||
value?: T; | ||
import { type SectionElementResult } from '../store/Section'; | ||
export interface NestedOpenProps<T extends object> extends SectionElementResult<T> { | ||
initialValue?: T; | ||
@@ -5,0 +4,0 @@ expandKey: string; |
@@ -18,4 +18,6 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
expandKey, | ||
keys, | ||
initialValue, | ||
value, | ||
parentValue, | ||
level | ||
@@ -91,3 +93,5 @@ } = props; | ||
value: value, | ||
expandKey: expandKey | ||
expandKey: expandKey, | ||
parentValue: parentValue, | ||
keys: keys | ||
})] | ||
@@ -94,0 +98,0 @@ })); |
export declare const isFloat: (n: number) => boolean; | ||
interface ValueProps { | ||
value?: unknown; | ||
value: unknown; | ||
keyName: string | number; | ||
expandKey: string; | ||
} | ||
@@ -7,0 +6,0 @@ export declare const Value: { |
@@ -8,8 +8,6 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
value, | ||
keyName, | ||
expandKey | ||
keyName | ||
} = props; | ||
var reset = { | ||
keyName, | ||
expandKey | ||
keyName | ||
}; | ||
@@ -16,0 +14,0 @@ if (value instanceof URL) { |
@@ -14,2 +14,3 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
className = '', | ||
parentValue, | ||
level = 1, | ||
@@ -41,2 +42,4 @@ value, | ||
level: level, | ||
keys: keys, | ||
parentValue: parentValue, | ||
keyName: keyName, | ||
@@ -48,3 +51,5 @@ initialValue: initialValue | ||
level: level, | ||
keys: keys | ||
keys: keys, | ||
parentValue: parentValue, | ||
keyName: keyName | ||
}), /*#__PURE__*/_jsx(NestedClose, { | ||
@@ -51,0 +56,0 @@ expandKey: subkeyid, |
@@ -1,2 +0,2 @@ | ||
import { SectionElementProps } from '../store/Section'; | ||
import { type SectionElementProps } from '../store/Section'; | ||
export declare const KeyNameRender: SectionElementProps['render']; |
@@ -11,3 +11,2 @@ import { FC, PropsWithChildren } from 'react'; | ||
type TypeProps = PropsWithChildren<{ | ||
expandKey: string; | ||
keyName: string | number; | ||
@@ -14,0 +13,0 @@ }>; |
@@ -20,3 +20,2 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
import { ValueQuote } from '../symbol'; | ||
import { Copied } from '../comps/Copied'; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
@@ -85,3 +84,2 @@ import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
children = '', | ||
expandKey, | ||
keyName | ||
@@ -141,6 +139,2 @@ } = _ref3; | ||
})), /*#__PURE__*/_jsx(ValueQuote, {})] | ||
}), /*#__PURE__*/_jsx(Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
@@ -153,3 +147,2 @@ }); | ||
children, | ||
expandKey, | ||
keyName | ||
@@ -190,7 +183,3 @@ } = _ref4; | ||
children: children == null ? void 0 : children.toString() | ||
})), /*#__PURE__*/_jsx(Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))] | ||
}); | ||
@@ -202,3 +191,2 @@ }; | ||
children, | ||
expandKey, | ||
keyName | ||
@@ -239,7 +227,3 @@ } = _ref5; | ||
children: children == null ? void 0 : children.toString() | ||
})), /*#__PURE__*/_jsx(Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))] | ||
}); | ||
@@ -251,3 +235,2 @@ }; | ||
children, | ||
expandKey, | ||
keyName | ||
@@ -288,7 +271,3 @@ } = _ref6; | ||
children: children == null ? void 0 : children.toString() | ||
})), /*#__PURE__*/_jsx(Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))] | ||
}); | ||
@@ -300,3 +279,2 @@ }; | ||
children, | ||
expandKey, | ||
keyName | ||
@@ -337,7 +315,3 @@ } = _ref7; | ||
children: children == null ? void 0 : children.toString() | ||
})), /*#__PURE__*/_jsx(Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))] | ||
}); | ||
@@ -349,3 +323,2 @@ }; | ||
children, | ||
expandKey, | ||
keyName | ||
@@ -386,7 +359,3 @@ } = _ref8; | ||
children: (children == null ? void 0 : children.toString()) + 'n' | ||
})), /*#__PURE__*/_jsx(Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))] | ||
}); | ||
@@ -398,3 +367,2 @@ }; | ||
children, | ||
expandKey, | ||
keyName | ||
@@ -438,7 +406,3 @@ } = _ref9; | ||
children: [/*#__PURE__*/_jsx(ValueQuote, {}), children == null ? void 0 : children.href, /*#__PURE__*/_jsx(ValueQuote, {})] | ||
})), /*#__PURE__*/_jsx(Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))] | ||
}); | ||
@@ -450,3 +414,2 @@ }; | ||
children, | ||
expandKey, | ||
keyName | ||
@@ -488,7 +451,3 @@ } = _ref10; | ||
children: childStr | ||
})), /*#__PURE__*/_jsx(Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))] | ||
}); | ||
@@ -500,3 +459,2 @@ }; | ||
children, | ||
expandKey, | ||
keyName | ||
@@ -534,7 +492,3 @@ } = _ref11; | ||
style: style | ||
}))), child, /*#__PURE__*/_jsx(Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))), child] | ||
}); | ||
@@ -546,3 +500,2 @@ }; | ||
children, | ||
expandKey, | ||
keyName | ||
@@ -580,7 +533,3 @@ } = _ref12; | ||
style: style | ||
}))), child, /*#__PURE__*/_jsx(Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))), child] | ||
}); | ||
@@ -592,3 +541,2 @@ }; | ||
children, | ||
expandKey, | ||
keyName | ||
@@ -626,9 +574,5 @@ } = _ref13; | ||
style: style | ||
}))), child, /*#__PURE__*/_jsx(Copied, { | ||
keyName: keyName, | ||
value: children, | ||
expandKey: expandKey | ||
})] | ||
}))), child] | ||
}); | ||
}; | ||
TypeNan.displayName = 'JVR.TypeNan'; |
{ | ||
"name": "@uiw/react-json-view", | ||
"version": "2.0.0-alpha.16", | ||
"version": "2.0.0-alpha.17", | ||
"description": "JSON viewer for react.", | ||
@@ -5,0 +5,0 @@ "main": "cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
314917
7337