@uiw/react-json-view
Advanced tools
Comparing version 2.0.0-alpha.24 to 2.0.0-alpha.25
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { type SectionElementResult } from '../store/Section'; | ||
@@ -3,0 +2,0 @@ import { type TagType } from '../store/Types'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { type JsonViewProps } from '../'; | ||
@@ -3,0 +2,0 @@ export interface JsonViewEditorProps<T extends object> extends Omit<JsonViewProps<T>, 'shortenTextAfterLength'> { |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
type InitialState = { | ||
@@ -20,10 +19,10 @@ /** | ||
export declare function useStoreReducer(initialState: InitialState): [{ | ||
onEdit?: ((option: { | ||
onEdit?: (option: { | ||
value: unknown; | ||
oldValue: unknown; | ||
keyName?: string | number | undefined; | ||
parentName?: string | number | undefined; | ||
type?: "value" | "key" | undefined; | ||
}) => boolean) | undefined; | ||
keyName?: string | number; | ||
parentName?: string | number; | ||
type?: "value" | "key"; | ||
}) => boolean; | ||
}, import("react").Dispatch<InitialState>]; | ||
export {}; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { BraceLeft } from './symbol/BraceLeft'; | ||
@@ -3,0 +2,0 @@ import { BraceRight } from './symbol/BraceRight'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { type TagType } from '../store/Types'; | ||
@@ -3,0 +2,0 @@ import { type SectionElement, type SectionElementProps } from '../store/Section'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { type TagType } from '../store/Types'; | ||
@@ -3,0 +2,0 @@ import { type SectionElement, type SectionElementProps } from '../store/Section'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { type TagType } from '../store/Types'; | ||
@@ -3,0 +2,0 @@ import { type SectionElement } from '../store/Section'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { type TagType } from '../store/Types'; | ||
@@ -3,0 +2,0 @@ import { type SectionElement } from '../store/Section'; |
@@ -32,3 +32,3 @@ import { PropsWithChildren, ComponentPropsWithoutRef } from 'react'; | ||
export declare function useTypes(): [{ | ||
displayDataTypes?: boolean | undefined; | ||
displayDataTypes?: boolean; | ||
Url?: TypesElement<TagType> | undefined; | ||
@@ -35,0 +35,0 @@ Str?: TypesElement<TagType> | undefined; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { type SymbolsElement } from '../store/Symbols'; | ||
@@ -3,0 +2,0 @@ import { type TagType } from '../store/Types'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const basicTheme: import("react").CSSProperties; | ||
export declare const basicTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const darkTheme: import("react").CSSProperties; | ||
export declare const darkTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const githubDarkTheme: import("react").CSSProperties; | ||
export declare const githubDarkTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const githubLightTheme: import("react").CSSProperties; | ||
export declare const githubLightTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const gruvboxTheme: import("react").CSSProperties; | ||
export declare const gruvboxTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const lightTheme: import("react").CSSProperties; | ||
export declare const lightTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const monokaiTheme: import("react").CSSProperties; | ||
export declare const monokaiTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const nordTheme: import("react").CSSProperties; | ||
export declare const nordTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const vscodeTheme: import("react").CSSProperties; | ||
export declare const vscodeTheme: React.CSSProperties; |
@@ -106,3 +106,3 @@ "use strict"; | ||
var childrenStr = children; | ||
var _useState = (0, _react.useState)(length && childrenStr.length >= length), | ||
var _useState = (0, _react.useState)(length && childrenStr.length > length), | ||
_useState2 = (0, _slicedToArray2["default"])(_useState, 2), | ||
@@ -112,3 +112,3 @@ shorten = _useState2[0], | ||
(0, _react.useEffect)(function () { | ||
return setShorten(length && childrenStr.length >= length); | ||
return setShorten(length && childrenStr.length > length); | ||
}, [length]); | ||
@@ -115,0 +115,0 @@ var Comp = as || 'span'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare function usePrevious<T>(value: T): T | undefined; | ||
@@ -3,0 +2,0 @@ interface UseHighlight { |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { type SectionElementResult } from '../store/Section'; | ||
@@ -3,0 +2,0 @@ import { type TagType } from '../store/Types'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { type JsonViewProps } from '../'; | ||
@@ -3,0 +2,0 @@ export interface JsonViewEditorProps<T extends object> extends Omit<JsonViewProps<T>, 'shortenTextAfterLength'> { |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
type InitialState = { | ||
@@ -20,10 +19,10 @@ /** | ||
export declare function useStoreReducer(initialState: InitialState): [{ | ||
onEdit?: ((option: { | ||
onEdit?: (option: { | ||
value: unknown; | ||
oldValue: unknown; | ||
keyName?: string | number | undefined; | ||
parentName?: string | number | undefined; | ||
type?: "value" | "key" | undefined; | ||
}) => boolean) | undefined; | ||
keyName?: string | number; | ||
parentName?: string | number; | ||
type?: "value" | "key"; | ||
}) => boolean; | ||
}, import("react").Dispatch<InitialState>]; | ||
export {}; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { BraceLeft } from './symbol/BraceLeft'; | ||
@@ -3,0 +2,0 @@ import { BraceRight } from './symbol/BraceRight'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { type TagType } from '../store/Types'; | ||
@@ -3,0 +2,0 @@ import { type SectionElement, type SectionElementProps } from '../store/Section'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { type TagType } from '../store/Types'; | ||
@@ -3,0 +2,0 @@ import { type SectionElement, type SectionElementProps } from '../store/Section'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { type TagType } from '../store/Types'; | ||
@@ -3,0 +2,0 @@ import { type SectionElement } from '../store/Section'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { type TagType } from '../store/Types'; | ||
@@ -3,0 +2,0 @@ import { type SectionElement } from '../store/Section'; |
@@ -32,3 +32,3 @@ import { PropsWithChildren, ComponentPropsWithoutRef } from 'react'; | ||
export declare function useTypes(): [{ | ||
displayDataTypes?: boolean | undefined; | ||
displayDataTypes?: boolean; | ||
Url?: TypesElement<TagType> | undefined; | ||
@@ -35,0 +35,0 @@ Str?: TypesElement<TagType> | undefined; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { type SymbolsElement } from '../store/Symbols'; | ||
@@ -3,0 +2,0 @@ import { type TagType } from '../store/Types'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const basicTheme: import("react").CSSProperties; | ||
export declare const basicTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const darkTheme: import("react").CSSProperties; | ||
export declare const darkTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const githubDarkTheme: import("react").CSSProperties; | ||
export declare const githubDarkTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const githubLightTheme: import("react").CSSProperties; | ||
export declare const githubLightTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const gruvboxTheme: import("react").CSSProperties; | ||
export declare const gruvboxTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const lightTheme: import("react").CSSProperties; | ||
export declare const lightTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const monokaiTheme: import("react").CSSProperties; | ||
export declare const monokaiTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const nordTheme: import("react").CSSProperties; | ||
export declare const nordTheme: React.CSSProperties; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare const vscodeTheme: import("react").CSSProperties; | ||
export declare const vscodeTheme: React.CSSProperties; |
@@ -109,4 +109,4 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
var childrenStr = children; | ||
var [shorten, setShorten] = useState(length && childrenStr.length >= length); | ||
useEffect(() => setShorten(length && childrenStr.length >= length), [length]); | ||
var [shorten, setShorten] = useState(length && childrenStr.length > length); | ||
useEffect(() => setShorten(length && childrenStr.length > length), [length]); | ||
var Comp = as || 'span'; | ||
@@ -113,0 +113,0 @@ var style = _extends({}, defalutStyle, Str.style || {}); |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare function usePrevious<T>(value: T): T | undefined; | ||
@@ -3,0 +2,0 @@ interface UseHighlight { |
{ | ||
"name": "@uiw/react-json-view", | ||
"version": "2.0.0-alpha.24", | ||
"version": "2.0.0-alpha.25", | ||
"description": "JSON viewer for react.", | ||
@@ -5,0 +5,0 @@ "main": "cjs/index.js", |
314844
7337