@uiw/react-json-view 2.0.0-alpha.24 → 2.0.0-alpha.25
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/cjs/comps/Copied.d.ts +0 -1
- package/cjs/editor/index.d.ts +0 -1
- package/cjs/editor/store.d.ts +5 -6
- package/cjs/index.d.ts +0 -1
- package/cjs/section/CountInfo.d.ts +0 -1
- package/cjs/section/CountInfoExtra.d.ts +0 -1
- package/cjs/section/Ellipsis.d.ts +0 -1
- package/cjs/section/Row.d.ts +0 -1
- package/cjs/store/Types.d.ts +1 -1
- package/cjs/symbol/index.d.ts +0 -1
- package/cjs/theme/basic.d.ts +1 -2
- package/cjs/theme/dark.d.ts +1 -2
- package/cjs/theme/github.dark.d.ts +1 -2
- package/cjs/theme/github.light.d.ts +1 -2
- package/cjs/theme/gruvbox.d.ts +1 -2
- package/cjs/theme/light.d.ts +1 -2
- package/cjs/theme/monokai.d.ts +1 -2
- package/cjs/theme/nord.d.ts +1 -2
- package/cjs/theme/vscode.d.ts +1 -2
- package/cjs/types/index.js +2 -2
- package/cjs/utils/useHighlight.d.ts +0 -1
- package/esm/comps/Copied.d.ts +0 -1
- package/esm/editor/index.d.ts +0 -1
- package/esm/editor/store.d.ts +5 -6
- package/esm/index.d.ts +0 -1
- package/esm/section/CountInfo.d.ts +0 -1
- package/esm/section/CountInfoExtra.d.ts +0 -1
- package/esm/section/Ellipsis.d.ts +0 -1
- package/esm/section/Row.d.ts +0 -1
- package/esm/store/Types.d.ts +1 -1
- package/esm/symbol/index.d.ts +0 -1
- package/esm/theme/basic.d.ts +1 -2
- package/esm/theme/dark.d.ts +1 -2
- package/esm/theme/github.dark.d.ts +1 -2
- package/esm/theme/github.light.d.ts +1 -2
- package/esm/theme/gruvbox.d.ts +1 -2
- package/esm/theme/light.d.ts +1 -2
- package/esm/theme/monokai.d.ts +1 -2
- package/esm/theme/nord.d.ts +1 -2
- package/esm/theme/vscode.d.ts +1 -2
- package/esm/types/index.js +2 -2
- package/esm/utils/useHighlight.d.ts +0 -1
- package/package.json +1 -1
package/cjs/comps/Copied.d.ts
CHANGED
package/cjs/editor/index.d.ts
CHANGED
package/cjs/editor/store.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
type InitialState = {
|
|
3
2
|
/**
|
|
4
3
|
* When a callback function is passed in, edit functionality is enabled. The callback is invoked before edits are completed.
|
|
@@ -17,12 +16,12 @@ export declare const Context: import("react").Context<InitialState>;
|
|
|
17
16
|
export declare const Dispatch: import("react").Context<Dispatch>;
|
|
18
17
|
export declare const useStore: () => InitialState;
|
|
19
18
|
export declare function useStoreReducer(initialState: InitialState): [{
|
|
20
|
-
onEdit?: (
|
|
19
|
+
onEdit?: (option: {
|
|
21
20
|
value: unknown;
|
|
22
21
|
oldValue: unknown;
|
|
23
|
-
keyName?: string | number
|
|
24
|
-
parentName?: string | number
|
|
25
|
-
type?: "value" | "key"
|
|
26
|
-
}) => boolean
|
|
22
|
+
keyName?: string | number;
|
|
23
|
+
parentName?: string | number;
|
|
24
|
+
type?: "value" | "key";
|
|
25
|
+
}) => boolean;
|
|
27
26
|
}, import("react").Dispatch<InitialState>];
|
|
28
27
|
export {};
|
package/cjs/index.d.ts
CHANGED
package/cjs/section/Row.d.ts
CHANGED
package/cjs/store/Types.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export type InitialTypesState<T extends TagType = 'span'> = {
|
|
|
29
29
|
type Dispatch<T extends TagType> = React.Dispatch<InitialTypesState<T>>;
|
|
30
30
|
export declare const useTypesStore: () => InitialTypesState<TagType>;
|
|
31
31
|
export declare function useTypes(): [{
|
|
32
|
-
displayDataTypes?: boolean
|
|
32
|
+
displayDataTypes?: boolean;
|
|
33
33
|
Url?: TypesElement<TagType> | undefined;
|
|
34
34
|
Str?: TypesElement<TagType> | undefined;
|
|
35
35
|
Undefined?: TypesElement<TagType> | undefined;
|
package/cjs/symbol/index.d.ts
CHANGED
package/cjs/theme/basic.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const basicTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const basicTheme: React.CSSProperties;
|
package/cjs/theme/dark.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const darkTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const darkTheme: React.CSSProperties;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const githubDarkTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const githubDarkTheme: React.CSSProperties;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const githubLightTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const githubLightTheme: React.CSSProperties;
|
package/cjs/theme/gruvbox.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const gruvboxTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const gruvboxTheme: React.CSSProperties;
|
package/cjs/theme/light.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const lightTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const lightTheme: React.CSSProperties;
|
package/cjs/theme/monokai.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const monokaiTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const monokaiTheme: React.CSSProperties;
|
package/cjs/theme/nord.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const nordTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const nordTheme: React.CSSProperties;
|
package/cjs/theme/vscode.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const vscodeTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const vscodeTheme: React.CSSProperties;
|
package/cjs/types/index.js
CHANGED
|
@@ -103,12 +103,12 @@ var TypeString = exports.TypeString = function TypeString(_ref3) {
|
|
|
103
103
|
render = Str.render,
|
|
104
104
|
reset = (0, _objectWithoutProperties2["default"])(Str, _excluded3);
|
|
105
105
|
var childrenStr = children;
|
|
106
|
-
var _useState = (0, _react.useState)(length && childrenStr.length
|
|
106
|
+
var _useState = (0, _react.useState)(length && childrenStr.length > length),
|
|
107
107
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
108
108
|
shorten = _useState2[0],
|
|
109
109
|
setShorten = _useState2[1];
|
|
110
110
|
(0, _react.useEffect)(function () {
|
|
111
|
-
return setShorten(length && childrenStr.length
|
|
111
|
+
return setShorten(length && childrenStr.length > length);
|
|
112
112
|
}, [length]);
|
|
113
113
|
var Comp = as || 'span';
|
|
114
114
|
var style = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, defalutStyle), Str.style || {});
|
package/esm/comps/Copied.d.ts
CHANGED
package/esm/editor/index.d.ts
CHANGED
package/esm/editor/store.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
type InitialState = {
|
|
3
2
|
/**
|
|
4
3
|
* When a callback function is passed in, edit functionality is enabled. The callback is invoked before edits are completed.
|
|
@@ -17,12 +16,12 @@ export declare const Context: import("react").Context<InitialState>;
|
|
|
17
16
|
export declare const Dispatch: import("react").Context<Dispatch>;
|
|
18
17
|
export declare const useStore: () => InitialState;
|
|
19
18
|
export declare function useStoreReducer(initialState: InitialState): [{
|
|
20
|
-
onEdit?: (
|
|
19
|
+
onEdit?: (option: {
|
|
21
20
|
value: unknown;
|
|
22
21
|
oldValue: unknown;
|
|
23
|
-
keyName?: string | number
|
|
24
|
-
parentName?: string | number
|
|
25
|
-
type?: "value" | "key"
|
|
26
|
-
}) => boolean
|
|
22
|
+
keyName?: string | number;
|
|
23
|
+
parentName?: string | number;
|
|
24
|
+
type?: "value" | "key";
|
|
25
|
+
}) => boolean;
|
|
27
26
|
}, import("react").Dispatch<InitialState>];
|
|
28
27
|
export {};
|
package/esm/index.d.ts
CHANGED
package/esm/section/Row.d.ts
CHANGED
package/esm/store/Types.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export type InitialTypesState<T extends TagType = 'span'> = {
|
|
|
29
29
|
type Dispatch<T extends TagType> = React.Dispatch<InitialTypesState<T>>;
|
|
30
30
|
export declare const useTypesStore: () => InitialTypesState<TagType>;
|
|
31
31
|
export declare function useTypes(): [{
|
|
32
|
-
displayDataTypes?: boolean
|
|
32
|
+
displayDataTypes?: boolean;
|
|
33
33
|
Url?: TypesElement<TagType> | undefined;
|
|
34
34
|
Str?: TypesElement<TagType> | undefined;
|
|
35
35
|
Undefined?: TypesElement<TagType> | undefined;
|
package/esm/symbol/index.d.ts
CHANGED
package/esm/theme/basic.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const basicTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const basicTheme: React.CSSProperties;
|
package/esm/theme/dark.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const darkTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const darkTheme: React.CSSProperties;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const githubDarkTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const githubDarkTheme: React.CSSProperties;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const githubLightTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const githubLightTheme: React.CSSProperties;
|
package/esm/theme/gruvbox.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const gruvboxTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const gruvboxTheme: React.CSSProperties;
|
package/esm/theme/light.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const lightTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const lightTheme: React.CSSProperties;
|
package/esm/theme/monokai.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const monokaiTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const monokaiTheme: React.CSSProperties;
|
package/esm/theme/nord.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const nordTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const nordTheme: React.CSSProperties;
|
package/esm/theme/vscode.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const vscodeTheme: import("react").CSSProperties;
|
|
1
|
+
export declare const vscodeTheme: React.CSSProperties;
|
package/esm/types/index.js
CHANGED
|
@@ -106,8 +106,8 @@ export var TypeString = _ref3 => {
|
|
|
106
106
|
} = Str,
|
|
107
107
|
reset = _objectWithoutPropertiesLoose(Str, _excluded3);
|
|
108
108
|
var childrenStr = children;
|
|
109
|
-
var [shorten, setShorten] = useState(length && childrenStr.length
|
|
110
|
-
useEffect(() => setShorten(length && childrenStr.length
|
|
109
|
+
var [shorten, setShorten] = useState(length && childrenStr.length > length);
|
|
110
|
+
useEffect(() => setShorten(length && childrenStr.length > length), [length]);
|
|
111
111
|
var Comp = as || 'span';
|
|
112
112
|
var style = _extends({}, defalutStyle, Str.style || {});
|
|
113
113
|
if (length > 0) {
|