Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uiw/react-json-view

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-json-view - npm Package Compare versions

Comparing version 2.0.0-alpha.7 to 2.0.0-alpha.8

3

cjs/comps/Copied.js

@@ -18,3 +18,3 @@ "use strict";

_excluded2 = ["as", "render"];
var Copied = function Copied(props) {
var Copied = exports.Copied = function Copied(props) {
var keyName = props.keyName,

@@ -93,3 +93,2 @@ value = props.value,

};
exports.Copied = Copied;
Copied.displayName = 'JVR.Copied';

@@ -22,3 +22,3 @@ "use strict";

var _jsxRuntime = require("react/jsx-runtime");
var KeyValues = function KeyValues(props) {
var KeyValues = exports.KeyValues = function KeyValues(props) {
var _expands$expandKey;

@@ -81,5 +81,4 @@ var value = props.value,

};
exports.KeyValues = KeyValues;
KeyValues.displayName = 'JVR.KeyValues';
var KayName = function KayName(props) {
var KayName = exports.KayName = function KayName(props) {
var keyName = props.keyName,

@@ -113,5 +112,4 @@ value = props.value;

};
exports.KayName = KayName;
KayName.displayName = 'JVR.KayName';
var KeyValuesItem = function KeyValuesItem(props) {
var KeyValuesItem = exports.KeyValuesItem = function KeyValuesItem(props) {
var keyName = props.keyName,

@@ -162,3 +160,2 @@ value = props.value,

};
exports.KeyValuesItem = KeyValuesItem;
KeyValuesItem.displayName = 'JVR.KeyValuesItem';

@@ -11,3 +11,3 @@ "use strict";

var _jsxRuntime = require("react/jsx-runtime");
var NestedClose = function NestedClose(props) {
var NestedClose = exports.NestedClose = function NestedClose(props) {
var _expands$expandKey;

@@ -38,3 +38,2 @@ var value = props.value,

};
exports.NestedClose = NestedClose;
NestedClose.displayName = 'JVR.NestedClose';

@@ -21,3 +21,3 @@ "use strict";

var _jsxRuntime = require("react/jsx-runtime");
var NestedOpen = function NestedOpen(props) {
var NestedOpen = exports.NestedOpen = function NestedOpen(props) {
var _expands$expandKey;

@@ -71,5 +71,7 @@ var keyName = props.keyName,

}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.SetComp, {
value: initialValue
value: initialValue,
keyName: keyName
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_types.MapComp, {
value: initialValue
value: initialValue,
keyName: keyName
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_symbol.BracketsOpen, {

@@ -97,3 +99,2 @@ isBrackets: isArray || isMySet

};
exports.NestedOpen = NestedOpen;
NestedOpen.displayName = 'JVR.NestedOpen';

@@ -11,7 +11,6 @@ "use strict";

var _jsxRuntime = require("react/jsx-runtime");
var isFloat = function isFloat(n) {
var isFloat = exports.isFloat = function isFloat(n) {
return Number(n) === n && n % 1 !== 0 || isNaN(n);
};
exports.isFloat = isFloat;
var Value = function Value(props) {
var Value = exports.Value = function Value(props) {
var value = props.value,

@@ -78,3 +77,2 @@ keyName = props.keyName,

};
exports.Value = Value;
Value.displayName = 'JVR.Value';

@@ -19,3 +19,3 @@ "use strict";

var _excluded = ["className", "children", "parentValue", "keyid", "level", "value", "initialValue", "keyName"];
var Container = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
var Container = exports.Container = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
var _props$className = props.className,

@@ -64,3 +64,2 @@ className = _props$className === void 0 ? '' : _props$className,

});
exports.Container = Container;
Container.displayName = 'JVR.Container';

@@ -195,3 +195,2 @@ "use strict";

JsonView.displayName = 'JVR.JsonView';
var _default = JsonView;
exports["default"] = _default;
var _default = exports["default"] = JsonView;

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var Copied = function Copied(props) {
var Copied = exports.Copied = function Copied(props) {
var _useSectionStore = (0, _Section.useSectionStore)(),

@@ -17,3 +17,2 @@ _useSectionStore$Copi = _useSectionStore.Copied,

};
exports.Copied = Copied;
Copied.displayName = 'JVR.Copied';

@@ -16,3 +16,3 @@ "use strict";

_excluded2 = ["as", "render"];
var CountInfo = function CountInfo(props) {
var CountInfo = exports.CountInfo = function CountInfo(props) {
var _useSectionStore = (0, _Section.useSectionStore)(),

@@ -24,5 +24,4 @@ _useSectionStore$Coun = _useSectionStore.CountInfo,

};
exports.CountInfo = CountInfo;
CountInfo.displayName = 'JVR.CountInfo';
var CountInfoComp = function CountInfoComp(props) {
var CountInfoComp = exports.CountInfoComp = function CountInfoComp(props) {
var _props$value = props.value,

@@ -58,3 +57,2 @@ value = _props$value === void 0 ? {} : _props$value,

};
exports.CountInfoComp = CountInfoComp;
CountInfoComp.displayName = 'JVR.CountInfoComp';

@@ -15,3 +15,3 @@ "use strict";

_excluded2 = ["as", "render"];
var CountInfoExtra = function CountInfoExtra(props) {
var CountInfoExtra = exports.CountInfoExtra = function CountInfoExtra(props) {
var _useSectionStore = (0, _Section.useSectionStore)(),

@@ -23,5 +23,4 @@ _useSectionStore$Coun = _useSectionStore.CountInfoExtra,

};
exports.CountInfoExtra = CountInfoExtra;
CountInfoExtra.displayName = 'JVR.CountInfoExtra';
var CountInfoExtraComps = function CountInfoExtraComps(props) {
var CountInfoExtraComps = exports.CountInfoExtraComps = function CountInfoExtraComps(props) {
var _props$value = props.value,

@@ -48,3 +47,2 @@ value = _props$value === void 0 ? {} : _props$value,

};
exports.CountInfoExtraComps = CountInfoExtraComps;
CountInfoExtraComps.displayName = 'JVR.CountInfoExtraComps';

@@ -14,3 +14,3 @@ "use strict";

var _excluded = ["as", "render"];
var Ellipsis = function Ellipsis(props) {
var Ellipsis = exports.Ellipsis = function Ellipsis(props) {
var _useSectionStore = (0, _Section.useSectionStore)(),

@@ -22,5 +22,4 @@ _useSectionStore$Elli = _useSectionStore.Ellipsis,

};
exports.Ellipsis = Ellipsis;
Ellipsis.displayName = 'JVR.Ellipsis';
var EllipsisComp = function EllipsisComp(_ref) {
var EllipsisComp = exports.EllipsisComp = function EllipsisComp(_ref) {
var isExpanded = _ref.isExpanded,

@@ -46,3 +45,2 @@ value = _ref.value,

};
exports.EllipsisComp = EllipsisComp;
EllipsisComp.displayName = 'JVR.EllipsisComp';

@@ -14,3 +14,3 @@ "use strict";

var _excluded = ["as", "render"];
var KeyName = function KeyName(props) {
var KeyName = exports.KeyName = function KeyName(props) {
var _useSectionStore = (0, _Section.useSectionStore)(),

@@ -22,5 +22,4 @@ _useSectionStore$KeyN = _useSectionStore.KeyName,

};
exports.KeyName = KeyName;
KeyName.displayName = 'JVR.KeyName';
var KeyNameComp = function KeyNameComp(props) {
var KeyNameComp = exports.KeyNameComp = function KeyNameComp(props) {
var children = props.children,

@@ -52,3 +51,2 @@ value = props.value,

};
exports.KeyNameComp = KeyNameComp;
KeyNameComp.displayName = 'JVR.KeyNameComp';

@@ -21,9 +21,7 @@ "use strict";

var _jsxRuntime = require("react/jsx-runtime");
var initialState = {
var initialState = exports.initialState = {
objectSortKeys: false,
indentWidth: 15
};
exports.initialState = initialState;
var Context = /*#__PURE__*/(0, _react.createContext)(initialState);
exports.Context = Context;
var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)(initialState);
Context.displayName = 'JVR.Context';

@@ -35,11 +33,9 @@ var DispatchContext = /*#__PURE__*/(0, _react.createContext)(function () {});

}
var useStore = function useStore() {
var useStore = exports.useStore = function useStore() {
return (0, _react.useContext)(Context);
};
exports.useStore = useStore;
var useDispatchStore = function useDispatchStore() {
var useDispatchStore = exports.useDispatchStore = function useDispatchStore() {
return (0, _react.useContext)(DispatchContext);
};
exports.useDispatchStore = useDispatchStore;
var Provider = function Provider(_ref) {
var Provider = exports.Provider = function Provider(_ref) {
var children = _ref.children,

@@ -103,3 +99,2 @@ init = _ref.initialState,

};
exports.Provider = Provider;
function useDispatch() {

@@ -106,0 +101,0 @@ return (0, _react.useContext)(DispatchContext);

@@ -19,6 +19,5 @@ "use strict";

};
var useExpandsStore = function useExpandsStore() {
var useExpandsStore = exports.useExpandsStore = function useExpandsStore() {
return (0, _react.useContext)(Context);
};
exports.useExpandsStore = useExpandsStore;
var DispatchExpands = /*#__PURE__*/(0, _react.createContext)(function () {});

@@ -32,3 +31,3 @@ DispatchExpands.displayName = 'JVR.DispatchExpands';

}
var Expands = function Expands(_ref) {
var Expands = exports.Expands = function Expands(_ref) {
var initial = _ref.initial,

@@ -45,3 +44,2 @@ dispatch = _ref.dispatch,

};
exports.Expands = Expands;
Expands.displayName = 'JVR.Expands';

@@ -61,6 +61,5 @@ "use strict";

};
var useSectionStore = function useSectionStore() {
var useSectionStore = exports.useSectionStore = function useSectionStore() {
return (0, _react.useContext)(Context);
};
exports.useSectionStore = useSectionStore;
var DispatchSection = /*#__PURE__*/(0, _react.createContext)(function () {});

@@ -74,3 +73,3 @@ DispatchSection.displayName = 'JVR.DispatchSection';

}
var Section = function Section(_ref) {
var Section = exports.Section = function Section(_ref) {
var initial = _ref.initial,

@@ -87,3 +86,2 @@ dispatch = _ref.dispatch,

};
exports.Section = Section;
Section.displayName = 'JVR.Section';

@@ -19,6 +19,5 @@ "use strict";

};
var useShowToolsStore = function useShowToolsStore() {
var useShowToolsStore = exports.useShowToolsStore = function useShowToolsStore() {
return (0, _react.useContext)(Context);
};
exports.useShowToolsStore = useShowToolsStore;
var DispatchShowTools = /*#__PURE__*/(0, _react.createContext)(function () {});

@@ -32,3 +31,3 @@ DispatchShowTools.displayName = 'JVR.DispatchShowTools';

}
var ShowTools = function ShowTools(_ref) {
var ShowTools = exports.ShowTools = function ShowTools(_ref) {
var initial = _ref.initial,

@@ -45,3 +44,2 @@ dispatch = _ref.dispatch,

};
exports.ShowTools = ShowTools;
ShowTools.displayName = 'JVR.ShowTools';

@@ -88,6 +88,5 @@ "use strict";

};
var useSymbolsStore = function useSymbolsStore() {
var useSymbolsStore = exports.useSymbolsStore = function useSymbolsStore() {
return (0, _react.useContext)(Context);
};
exports.useSymbolsStore = useSymbolsStore;
var DispatchSymbols = /*#__PURE__*/(0, _react.createContext)(function () {});

@@ -101,3 +100,3 @@ DispatchSymbols.displayName = 'JVR.DispatchSymbols';

}
var Symbols = function Symbols(_ref) {
var Symbols = exports.Symbols = function Symbols(_ref) {
var initial = _ref.initial,

@@ -114,3 +113,2 @@ dispatch = _ref.dispatch,

};
exports.Symbols = Symbols;
Symbols.displayName = 'JVR.Symbols';

@@ -8,2 +8,3 @@ import { PropsWithChildren, ComponentPropsWithoutRef } from 'react';

value?: unknown;
keyName: string | number;
}) => React.ReactNode;

@@ -10,0 +11,0 @@ 'data-type'?: string;

@@ -139,6 +139,5 @@ "use strict";

};
var useTypesStore = function useTypesStore() {
var useTypesStore = exports.useTypesStore = function useTypesStore() {
return (0, _react.useContext)(Context);
};
exports.useTypesStore = useTypesStore;
var DispatchTypes = /*#__PURE__*/(0, _react.createContext)(function () {});

@@ -145,0 +144,0 @@ DispatchTypes.displayName = 'JVR.DispatchTypes';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var Arrow = function Arrow(props) {
var Arrow = exports.Arrow = function Arrow(props) {
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),

@@ -17,3 +17,2 @@ _useSymbolsStore$Arro = _useSymbolsStore.Arrow,

};
exports.Arrow = Arrow;
Arrow.displayName = 'JVR.Arrow';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var BraceLeft = function BraceLeft(props) {
var BraceLeft = exports.BraceLeft = function BraceLeft(props) {
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),

@@ -17,3 +17,2 @@ _useSymbolsStore$Brac = _useSymbolsStore.BraceLeft,

};
exports.BraceLeft = BraceLeft;
BraceLeft.displayName = 'JVR.BraceLeft';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var BraceRight = function BraceRight(props) {
var BraceRight = exports.BraceRight = function BraceRight(props) {
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),

@@ -17,3 +17,2 @@ _useSymbolsStore$Brac = _useSymbolsStore.BraceRight,

};
exports.BraceRight = BraceRight;
BraceRight.displayName = 'JVR.BraceRight';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var BracketsLeft = function BracketsLeft(props) {
var BracketsLeft = exports.BracketsLeft = function BracketsLeft(props) {
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),

@@ -17,3 +17,2 @@ _useSymbolsStore$Brac = _useSymbolsStore.BracketsLeft,

};
exports.BracketsLeft = BracketsLeft;
BracketsLeft.displayName = 'JVR.BracketsLeft';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var BracketsRight = function BracketsRight(props) {
var BracketsRight = exports.BracketsRight = function BracketsRight(props) {
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),

@@ -17,3 +17,2 @@ _useSymbolsStore$Brac = _useSymbolsStore.BracketsRight,

};
exports.BracketsRight = BracketsRight;
BracketsRight.displayName = 'JVR.BracketsRight';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var Colon = function Colon(props) {
var Colon = exports.Colon = function Colon(props) {
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),

@@ -17,3 +17,2 @@ _useSymbolsStore$Colo = _useSymbolsStore.Colon,

};
exports.Colon = Colon;
Colon.displayName = 'JVR.Colon';

@@ -24,3 +24,3 @@ "use strict";

_excluded9 = ["as", "render"];
var Quote = function Quote(props) {
var Quote = exports.Quote = function Quote(props) {
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),

@@ -41,5 +41,4 @@ _useSymbolsStore$Quot = _useSymbolsStore.Quote,

};
exports.Quote = Quote;
Quote.displayName = 'JVR.Quote';
var ValueQuote = function ValueQuote(props) {
var ValueQuote = exports.ValueQuote = function ValueQuote(props) {
var _useSymbolsStore2 = (0, _Symbols.useSymbolsStore)(),

@@ -58,5 +57,4 @@ _useSymbolsStore2$Val = _useSymbolsStore2.ValueQuote,

};
exports.ValueQuote = ValueQuote;
ValueQuote.displayName = 'JVR.ValueQuote';
var Colon = function Colon() {
var Colon = exports.Colon = function Colon() {
var _useSymbolsStore3 = (0, _Symbols.useSymbolsStore)(),

@@ -73,5 +71,4 @@ _useSymbolsStore3$Col = _useSymbolsStore3.Colon,

};
exports.Colon = Colon;
Colon.displayName = 'JVR.Colon';
var Arrow = function Arrow(props) {
var Arrow = exports.Arrow = function Arrow(props) {
var _useSymbolsStore4 = (0, _Symbols.useSymbolsStore)(),

@@ -98,5 +95,4 @@ _useSymbolsStore4$Arr = _useSymbolsStore4.Arrow,

};
exports.Arrow = Arrow;
Arrow.displayName = 'JVR.Arrow';
var BracketsOpen = function BracketsOpen(_ref) {
var BracketsOpen = exports.BracketsOpen = function BracketsOpen(_ref) {
var isBrackets = _ref.isBrackets;

@@ -125,5 +121,4 @@ var _useSymbolsStore5 = (0, _Symbols.useSymbolsStore)(),

};
exports.BracketsOpen = BracketsOpen;
BracketsOpen.displayName = 'JVR.BracketsOpen';
var BracketsClose = function BracketsClose(_ref2) {
var BracketsClose = exports.BracketsClose = function BracketsClose(_ref2) {
var isBrackets = _ref2.isBrackets,

@@ -154,3 +149,2 @@ isVisiable = _ref2.isVisiable;

};
exports.BracketsClose = BracketsClose;
BracketsClose.displayName = 'JVR.BracketsClose';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var Quote = function Quote(props) {
var Quote = exports.Quote = function Quote(props) {
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),

@@ -17,3 +17,2 @@ _useSymbolsStore$Quot = _useSymbolsStore.Quote,

};
exports.Quote = Quote;
Quote.displayName = 'JVR.Quote';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var ValueQuote = function ValueQuote(props) {
var ValueQuote = exports.ValueQuote = function ValueQuote(props) {
var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),

@@ -17,3 +17,2 @@ _useSymbolsStore$Valu = _useSymbolsStore.ValueQuote,

};
exports.ValueQuote = ValueQuote;
ValueQuote.displayName = 'JVR.ValueQuote';

@@ -7,3 +7,3 @@ "use strict";

exports.basicTheme = void 0;
var basicTheme = {
var basicTheme = exports.basicTheme = {
'--w-rjv-font-family': 'monospace',

@@ -35,3 +35,2 @@ '--w-rjv-color': '#b5bd68',

'--w-rjv-type-undefined-color': '#8abeb7'
};
exports.basicTheme = basicTheme;
};

@@ -7,3 +7,3 @@ "use strict";

exports.darkTheme = void 0;
var darkTheme = {
var darkTheme = exports.darkTheme = {
'--w-rjv-font-family': 'monospace',

@@ -34,3 +34,2 @@ '--w-rjv-color': '#0184a6',

'--w-rjv-type-undefined-color': '#586e75'
};
exports.darkTheme = darkTheme;
};

@@ -7,3 +7,3 @@ "use strict";

exports.githubDarkTheme = void 0;
var githubDarkTheme = {
var githubDarkTheme = exports.githubDarkTheme = {
'--w-rjv-font-family': 'monospace',

@@ -35,3 +35,2 @@ '--w-rjv-color': '#79c0ff',

'--w-rjv-type-undefined-color': '#79c0ff'
};
exports.githubDarkTheme = githubDarkTheme;
};

@@ -7,3 +7,3 @@ "use strict";

exports.githubLightTheme = void 0;
var githubLightTheme = {
var githubLightTheme = exports.githubLightTheme = {
'--w-rjv-font-family': 'monospace',

@@ -35,3 +35,2 @@ '--w-rjv-color': '#6f42c1',

'--w-rjv-type-undefined-color': '#005cc5'
};
exports.githubLightTheme = githubLightTheme;
};

@@ -7,3 +7,3 @@ "use strict";

exports.gruvboxTheme = void 0;
var gruvboxTheme = {
var gruvboxTheme = exports.gruvboxTheme = {
'--w-rjv-font-family': 'monospace',

@@ -35,3 +35,2 @@ '--w-rjv-color': '#3c3836',

'--w-rjv-type-undefined-color': '#076678'
};
exports.gruvboxTheme = gruvboxTheme;
};

@@ -7,3 +7,3 @@ "use strict";

exports.lightTheme = void 0;
var lightTheme = {
var lightTheme = exports.lightTheme = {
'--w-rjv-font-family': 'monospace',

@@ -35,3 +35,2 @@ '--w-rjv-color': '#002b36',

'--w-rjv-type-undefined-color': '#586e75'
};
exports.lightTheme = lightTheme;
};

@@ -7,3 +7,3 @@ "use strict";

exports.monokaiTheme = void 0;
var monokaiTheme = {
var monokaiTheme = exports.monokaiTheme = {
'--w-rjv-font-family': 'monospace',

@@ -35,3 +35,2 @@ '--w-rjv-color': '#E6DB74',

'--w-rjv-type-undefined-color': '#FD971F'
};
exports.monokaiTheme = monokaiTheme;
};

@@ -7,3 +7,3 @@ "use strict";

exports.nordTheme = void 0;
var nordTheme = {
var nordTheme = exports.nordTheme = {
'--w-rjv-font-family': 'monospace',

@@ -35,3 +35,2 @@ '--w-rjv-color': '#88c0d0',

'--w-rjv-type-undefined-color': '#586e75'
};
exports.nordTheme = nordTheme;
};

@@ -7,3 +7,3 @@ "use strict";

exports.vscodeTheme = void 0;
var vscodeTheme = {
var vscodeTheme = exports.vscodeTheme = {
'--w-rjv-font-family': 'monospace',

@@ -35,3 +35,2 @@ '--w-rjv-color': '#9cdcfe',

'--w-rjv-type-undefined-color': '#569cd6'
};
exports.vscodeTheme = vscodeTheme;
};

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var Bigint = function Bigint(props) {
var Bigint = exports.Bigint = function Bigint(props) {
var _useTypesStore = (0, _Types.useTypesStore)(),

@@ -17,3 +17,2 @@ _useTypesStore$Bigint = _useTypesStore.Bigint,

};
exports.Bigint = Bigint;
Bigint.displayName = 'JVR.Bigint';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var Date = function Date(props) {
var Date = exports.Date = function Date(props) {
var _useTypesStore = (0, _Types.useTypesStore)(),

@@ -17,3 +17,2 @@ _useTypesStore$Date = _useTypesStore.Date,

};
exports.Date = Date;
Date.displayName = 'JVR.Date';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var False = function False(props) {
var False = exports.False = function False(props) {
var _useTypesStore = (0, _Types.useTypesStore)(),

@@ -17,3 +17,2 @@ _useTypesStore$False = _useTypesStore.False,

};
exports.False = False;
False.displayName = 'JVR.False';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var Float = function Float(props) {
var Float = exports.Float = function Float(props) {
var _useTypesStore = (0, _Types.useTypesStore)(),

@@ -17,3 +17,2 @@ _useTypesStore$Float = _useTypesStore.Float,

};
exports.Float = Float;
Float.displayName = 'JVR.Float';
import { FC, PropsWithChildren } from 'react';
export declare const SetComp: FC<PropsWithChildren<{
value: unknown;
keyName: string | number;
}>>;
export declare const MapComp: FC<PropsWithChildren<{
value: unknown;
keyName: string | number;
}>>;

@@ -8,0 +10,0 @@ type TypeProps = PropsWithChildren<{

@@ -30,4 +30,5 @@ "use strict";

_excluded13 = ["as", "render"];
var SetComp = function SetComp(_ref) {
var value = _ref.value;
var SetComp = exports.SetComp = function SetComp(_ref) {
var value = _ref.value,
keyName = _ref.keyName;
var _useTypesStore = (0, _Types.useTypesStore)(),

@@ -45,3 +46,4 @@ _useTypesStore$Set = _useTypesStore.Set,

type: 'type',
value: value
value: value,
keyName: keyName
});

@@ -52,6 +54,6 @@ if (type) return type;

};
exports.SetComp = SetComp;
SetComp.displayName = 'JVR.SetComp';
var MapComp = function MapComp(_ref2) {
var value = _ref2.value;
var MapComp = exports.MapComp = function MapComp(_ref2) {
var value = _ref2.value,
keyName = _ref2.keyName;
var _useTypesStore2 = (0, _Types.useTypesStore)(),

@@ -69,3 +71,4 @@ _useTypesStore2$Map = _useTypesStore2.Map,

type: 'type',
value: value
value: value,
keyName: keyName
});

@@ -76,3 +79,2 @@ if (type) return type;

};
exports.MapComp = MapComp;
MapComp.displayName = 'JVR.MapComp';

@@ -83,3 +85,3 @@ var defalutStyle = {

};
var TypeString = function TypeString(_ref3) {
var TypeString = exports.TypeString = function TypeString(_ref3) {
var _ref3$children = _ref3.children,

@@ -125,3 +127,4 @@ children = _ref3$children === void 0 ? '' : _ref3$children,

type: 'type',
value: children
value: children,
keyName: keyName
});

@@ -133,3 +136,4 @@ var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {

type: 'value',
value: children
value: children,
keyName: keyName
});

@@ -151,5 +155,4 @@ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {

};
exports.TypeString = TypeString;
TypeString.displayName = 'JVR.TypeString';
var TypeTrue = function TypeTrue(_ref4) {
var TypeTrue = exports.TypeTrue = function TypeTrue(_ref4) {
var children = _ref4.children,

@@ -172,3 +175,4 @@ expandKey = _ref4.expandKey,

type: 'type',
value: children
value: children,
keyName: keyName
});

@@ -180,3 +184,4 @@ var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {

type: 'value',
value: children
value: children,
keyName: keyName
});

@@ -196,5 +201,4 @@ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {

};
exports.TypeTrue = TypeTrue;
TypeTrue.displayName = 'JVR.TypeTrue';
var TypeFalse = function TypeFalse(_ref5) {
var TypeFalse = exports.TypeFalse = function TypeFalse(_ref5) {
var children = _ref5.children,

@@ -217,3 +221,4 @@ expandKey = _ref5.expandKey,

type: 'type',
value: children
value: children,
keyName: keyName
});

@@ -225,3 +230,4 @@ var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {

type: 'value',
value: children
value: children,
keyName: keyName
});

@@ -241,5 +247,4 @@ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {

};
exports.TypeFalse = TypeFalse;
TypeFalse.displayName = 'JVR.TypeFalse';
var TypeFloat = function TypeFloat(_ref6) {
var TypeFloat = exports.TypeFloat = function TypeFloat(_ref6) {
var children = _ref6.children,

@@ -262,3 +267,4 @@ expandKey = _ref6.expandKey,

type: 'type',
value: children
value: children,
keyName: keyName
});

@@ -270,3 +276,4 @@ var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {

type: 'value',
value: children
value: children,
keyName: keyName
});

@@ -286,5 +293,4 @@ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {

};
exports.TypeFloat = TypeFloat;
TypeFloat.displayName = 'JVR.TypeFloat';
var TypeInt = function TypeInt(_ref7) {
var TypeInt = exports.TypeInt = function TypeInt(_ref7) {
var children = _ref7.children,

@@ -307,3 +313,4 @@ expandKey = _ref7.expandKey,

type: 'type',
value: children
value: children,
keyName: keyName
});

@@ -315,3 +322,4 @@ var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {

type: 'value',
value: children
value: children,
keyName: keyName
});

@@ -331,5 +339,4 @@ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {

};
exports.TypeInt = TypeInt;
TypeInt.displayName = 'JVR.TypeInt';
var TypeBigint = function TypeBigint(_ref8) {
var TypeBigint = exports.TypeBigint = function TypeBigint(_ref8) {
var children = _ref8.children,

@@ -352,3 +359,4 @@ expandKey = _ref8.expandKey,

type: 'type',
value: children
value: children,
keyName: keyName
});

@@ -360,3 +368,4 @@ var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {

type: 'value',
value: children
value: children,
keyName: keyName
});

@@ -376,5 +385,4 @@ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {

};
exports.TypeBigint = TypeBigint;
TypeBigint.displayName = 'JVR.TypeFloat';
var TypeUrl = function TypeUrl(_ref9) {
var TypeUrl = exports.TypeUrl = function TypeUrl(_ref9) {
var children = _ref9.children,

@@ -397,3 +405,4 @@ expandKey = _ref9.expandKey,

type: 'type',
value: children
value: children,
keyName: keyName
});

@@ -405,3 +414,4 @@ var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {

type: 'value',
value: children
value: children,
keyName: keyName
});

@@ -424,5 +434,4 @@ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {

};
exports.TypeUrl = TypeUrl;
TypeUrl.displayName = 'JVR.TypeUrl';
var TypeDate = function TypeDate(_ref10) {
var TypeDate = exports.TypeDate = function TypeDate(_ref10) {
var children = _ref10.children,

@@ -445,3 +454,4 @@ expandKey = _ref10.expandKey,

type: 'type',
value: children
value: children,
keyName: keyName
});

@@ -454,3 +464,4 @@ var childStr = children instanceof Date ? children.toLocaleString() : children;

type: 'value',
value: children
value: children,
keyName: keyName
});

@@ -470,5 +481,4 @@ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {

};
exports.TypeDate = TypeDate;
TypeDate.displayName = 'JVR.TypeDate';
var TypeUndefined = function TypeUndefined(_ref11) {
var TypeUndefined = exports.TypeUndefined = function TypeUndefined(_ref11) {
var children = _ref11.children,

@@ -491,3 +501,4 @@ expandKey = _ref11.expandKey,

type: 'type',
value: children
value: children,
keyName: keyName
});

@@ -499,3 +510,4 @@ var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {

type: 'value',
value: children
value: children,
keyName: keyName
});

@@ -512,5 +524,4 @@ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {

};
exports.TypeUndefined = TypeUndefined;
TypeUndefined.displayName = 'JVR.TypeUndefined';
var TypeNull = function TypeNull(_ref12) {
var TypeNull = exports.TypeNull = function TypeNull(_ref12) {
var children = _ref12.children,

@@ -533,3 +544,4 @@ expandKey = _ref12.expandKey,

type: 'type',
value: children
value: children,
keyName: keyName
});

@@ -541,3 +553,4 @@ var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {

type: 'value',
value: children
value: children,
keyName: keyName
});

@@ -554,5 +567,4 @@ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {

};
exports.TypeNull = TypeNull;
TypeNull.displayName = 'JVR.TypeNull';
var TypeNan = function TypeNan(_ref13) {
var TypeNan = exports.TypeNan = function TypeNan(_ref13) {
var children = _ref13.children,

@@ -575,3 +587,4 @@ expandKey = _ref13.expandKey,

type: 'type',
value: children
value: children,
keyName: keyName
});

@@ -583,3 +596,4 @@ var child = isRender && render((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {

type: 'value',
value: children
value: children,
keyName: keyName
});

@@ -596,3 +610,2 @@ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {

};
exports.TypeNan = TypeNan;
TypeNan.displayName = 'JVR.TypeNan';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var Int = function Int(props) {
var Int = exports.Int = function Int(props) {
var _useTypesStore = (0, _Types.useTypesStore)(),

@@ -17,3 +17,2 @@ _useTypesStore$Int = _useTypesStore.Int,

};
exports.Int = Int;
Int.displayName = 'JVR.Int';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var Map = function Map(props) {
var Map = exports.Map = function Map(props) {
var _useTypesStore = (0, _Types.useTypesStore)(),

@@ -17,3 +17,2 @@ _useTypesStore$Map = _useTypesStore.Map,

};
exports.Map = Map;
Map.displayName = 'JVR.Map';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var Nan = function Nan(props) {
var Nan = exports.Nan = function Nan(props) {
var _useTypesStore = (0, _Types.useTypesStore)(),

@@ -17,3 +17,2 @@ _useTypesStore$Nan = _useTypesStore.Nan,

};
exports.Nan = Nan;
Nan.displayName = 'JVR.Nan';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var Null = function Null(props) {
var Null = exports.Null = function Null(props) {
var _useTypesStore = (0, _Types.useTypesStore)(),

@@ -17,3 +17,2 @@ _useTypesStore$Null = _useTypesStore.Null,

};
exports.Null = Null;
Null.displayName = 'JVR.Null';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var Set = function Set(props) {
var Set = exports.Set = function Set(props) {
var _useTypesStore = (0, _Types.useTypesStore)(),

@@ -17,3 +17,2 @@ _useTypesStore$Set = _useTypesStore.Set,

};
exports.Set = Set;
Set.displayName = 'JVR.Set';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var StringText = function StringText(props) {
var StringText = exports.StringText = function StringText(props) {
var _useTypesStore = (0, _Types.useTypesStore)(),

@@ -17,3 +17,2 @@ _useTypesStore$Str = _useTypesStore.Str,

};
exports.StringText = StringText;
StringText.displayName = 'JVR.StringText';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var True = function True(props) {
var True = exports.True = function True(props) {
var _useTypesStore = (0, _Types.useTypesStore)(),

@@ -17,3 +17,2 @@ _useTypesStore$True = _useTypesStore.True,

};
exports.True = True;
True.displayName = 'JVR.True';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var Undefined = function Undefined(props) {
var Undefined = exports.Undefined = function Undefined(props) {
var _useTypesStore = (0, _Types.useTypesStore)(),

@@ -17,3 +17,2 @@ _useTypesStore$Undefi = _useTypesStore.Undefined,

};
exports.Undefined = Undefined;
Undefined.displayName = 'JVR.Undefined';

@@ -9,3 +9,3 @@ "use strict";

var _useRender = require("../utils/useRender");
var Url = function Url(props) {
var Url = exports.Url = function Url(props) {
var _useTypesStore = (0, _Types.useTypesStore)(),

@@ -17,3 +17,2 @@ _useTypesStore$Url = _useTypesStore.Url,

};
exports.Url = Url;
Url.displayName = 'JVR.Url';

@@ -67,5 +67,7 @@ import _extends from "@babel/runtime/helpers/extends";

}), /*#__PURE__*/_jsx(SetComp, {
value: initialValue
value: initialValue,
keyName: keyName
}), /*#__PURE__*/_jsx(MapComp, {
value: initialValue
value: initialValue,
keyName: keyName
}), /*#__PURE__*/_jsx(BracketsOpen, {

@@ -72,0 +74,0 @@ isBrackets: isArray || isMySet

@@ -8,2 +8,3 @@ import { PropsWithChildren, ComponentPropsWithoutRef } from 'react';

value?: unknown;
keyName: string | number;
}) => React.ReactNode;

@@ -10,0 +11,0 @@ 'data-type'?: string;

import { FC, PropsWithChildren } from 'react';
export declare const SetComp: FC<PropsWithChildren<{
value: unknown;
keyName: string | number;
}>>;
export declare const MapComp: FC<PropsWithChildren<{
value: unknown;
keyName: string | number;
}>>;

@@ -8,0 +10,0 @@ type TypeProps = PropsWithChildren<{

@@ -25,3 +25,4 @@ import _extends from "@babel/runtime/helpers/extends";

var {
value
value,
keyName
} = _ref;

@@ -42,3 +43,4 @@ var {

type: 'type',
value
value,
keyName
});

@@ -52,3 +54,4 @@ if (type) return type;

var {
value
value,
keyName
} = _ref2;

@@ -69,3 +72,4 @@ var {

type: 'type',
value
value,
keyName
});

@@ -120,3 +124,4 @@ if (type) return type;

type: 'type',
value: children
value: children,
keyName
});

@@ -128,3 +133,4 @@ var child = isRender && render(_extends({}, reset, {

type: 'value',
value: children
value: children,
keyName
});

@@ -169,3 +175,4 @@ return /*#__PURE__*/_jsxs(Fragment, {

type: 'type',
value: children
value: children,
keyName
});

@@ -177,3 +184,4 @@ var child = isRender && render(_extends({}, reset, {

type: 'value',
value: children
value: children,
keyName
});

@@ -216,3 +224,4 @@ return /*#__PURE__*/_jsxs(Fragment, {

type: 'type',
value: children
value: children,
keyName
});

@@ -224,3 +233,4 @@ var child = isRender && render(_extends({}, reset, {

type: 'value',
value: children
value: children,
keyName
});

@@ -263,3 +273,4 @@ return /*#__PURE__*/_jsxs(Fragment, {

type: 'type',
value: children
value: children,
keyName
});

@@ -271,3 +282,4 @@ var child = isRender && render(_extends({}, reset, {

type: 'value',
value: children
value: children,
keyName
});

@@ -310,3 +322,4 @@ return /*#__PURE__*/_jsxs(Fragment, {

type: 'type',
value: children
value: children,
keyName
});

@@ -318,3 +331,4 @@ var child = isRender && render(_extends({}, reset, {

type: 'value',
value: children
value: children,
keyName
});

@@ -357,3 +371,4 @@ return /*#__PURE__*/_jsxs(Fragment, {

type: 'type',
value: children
value: children,
keyName
});

@@ -365,3 +380,4 @@ var child = isRender && render(_extends({}, reset, {

type: 'value',
value: children
value: children,
keyName
});

@@ -404,3 +420,4 @@ return /*#__PURE__*/_jsxs(Fragment, {

type: 'type',
value: children
value: children,
keyName
});

@@ -412,3 +429,4 @@ var child = isRender && render(_extends({}, reset, {

type: 'value',
value: children
value: children,
keyName
});

@@ -454,3 +472,4 @@ return /*#__PURE__*/_jsxs(Fragment, {

type: 'type',
value: children
value: children,
keyName
});

@@ -463,3 +482,4 @@ var childStr = children instanceof Date ? children.toLocaleString() : children;

type: 'value',
value: children
value: children,
keyName
});

@@ -502,3 +522,4 @@ return /*#__PURE__*/_jsxs(Fragment, {

type: 'type',
value: children
value: children,
keyName
});

@@ -510,3 +531,4 @@ var child = isRender && render(_extends({}, reset, {

type: 'value',
value: children
value: children,
keyName
});

@@ -546,3 +568,4 @@ return /*#__PURE__*/_jsxs(Fragment, {

type: 'type',
value: children
value: children,
keyName
});

@@ -554,3 +577,4 @@ var child = isRender && render(_extends({}, reset, {

type: 'value',
value: children
value: children,
keyName
});

@@ -590,3 +614,4 @@ return /*#__PURE__*/_jsxs(Fragment, {

type: 'type',
value: children
value: children,
keyName
});

@@ -598,3 +623,4 @@ var child = isRender && render(_extends({}, reset, {

type: 'value',
value: children
value: children,
keyName
});

@@ -601,0 +627,0 @@ return /*#__PURE__*/_jsxs(Fragment, {

{
"name": "@uiw/react-json-view",
"version": "2.0.0-alpha.7",
"version": "2.0.0-alpha.8",
"description": "JSON viewer for react.",

@@ -5,0 +5,0 @@ "main": "cjs/index.js",

@@ -327,4 +327,4 @@ react-json-view

<JsonView.String
render={({ children, ...reset }, { type }) => {
const isImg = /^https?.*\.(jpg|png)$/i.test(children)
render={({ children, ...reset }, { type, value, keyName }) => {
const isImg = /^https?.*\.(jpg|png)$/i.test(value)
if (type === 'type' && isImg) {

@@ -334,3 +334,3 @@ return <span />

if (type === 'value' && isImg) {
return <img {...reset} height="26" src={children} />
return <img {...reset} height="26" src={value} />
}

@@ -337,0 +337,0 @@ }}

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc