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.5 to 2.0.0-alpha.6

2

cjs/index.d.ts

@@ -53,3 +53,3 @@ /// <reference types="react" />

highlightUpdates?: boolean;
/** Shorten long JSON strings, Set to `0` to disable this feature @default 20 */
/** Shorten long JSON strings, Set to `0` to disable this feature @default 30 */
shortenTextAfterLength?: number;

@@ -56,0 +56,0 @@ /** Callback function for when a treeNode is expanded or collapsed */

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

_props$shortenTextAft = props.shortenTextAfterLength,
shortenTextAfterLength = _props$shortenTextAft === void 0 ? 20 : _props$shortenTextAft,
shortenTextAfterLength = _props$shortenTextAft === void 0 ? 30 : _props$shortenTextAft,
_props$highlightUpdat = props.highlightUpdates,

@@ -128,0 +128,0 @@ highlightUpdates = _props$highlightUpdat === void 0 ? true : _props$highlightUpdat,

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

_useStore$shortenText = _useStore.shortenTextAfterLength,
length = _useStore$shortenText === void 0 ? 20 : _useStore$shortenText;
length = _useStore$shortenText === void 0 ? 30 : _useStore$shortenText;
var as = Str.as,

@@ -99,2 +99,5 @@ render = Str.render,

setShorten = _useState2[1];
(0, _react.useEffect)(function () {
return setShorten(length && childrenStr.length >= length);
}, [length]);
var Comp = as || 'span';

@@ -101,0 +104,0 @@ var style = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, defalutStyle), Str.style || {});

@@ -53,3 +53,3 @@ /// <reference types="react" />

highlightUpdates?: boolean;
/** Shorten long JSON strings, Set to `0` to disable this feature @default 20 */
/** Shorten long JSON strings, Set to `0` to disable this feature @default 30 */
shortenTextAfterLength?: number;

@@ -56,0 +56,0 @@ /** Callback function for when a treeNode is expanded or collapsed */

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

displayObjectSize = true,
shortenTextAfterLength = 20,
shortenTextAfterLength = 30,
highlightUpdates = true,

@@ -53,0 +53,0 @@ enableClipboard = true,

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

_excluded13 = ["as", "render"];
import { Fragment, useState } from 'react';
import { Fragment, useEffect, useState } from 'react';
import { useTypesStore } from '../store/Types';

@@ -89,3 +89,3 @@ import { useStore } from '../store';

var {
shortenTextAfterLength: length = 20
shortenTextAfterLength: length = 30
} = useStore();

@@ -99,2 +99,3 @@ var {

var [shorten, setShorten] = useState(length && childrenStr.length >= length);
useEffect(() => setShorten(length && childrenStr.length >= length), [length]);
var Comp = as || 'span';

@@ -101,0 +102,0 @@ var style = _extends({}, defalutStyle, Str.style || {});

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

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

@@ -699,4 +699,8 @@ react-json-view

enableClipboard?: boolean;
/** When set to true, all nodes will be collapsed by default. Use an integer value to collapse at a particular depth. @default false */
collapsed?: boolean | number;
/** Whether to highlight updates. @default true */
highlightUpdates?: boolean;
/** Shorten long JSON strings, Set to `0` to disable this feature @default 30 */
shortenTextAfterLength?: number;
/** Callback function for when a treeNode is expanded or collapsed */

@@ -703,0 +707,0 @@ onExpand?: (props: {

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