@uiw/react-json-view 2.0.0-alpha.3 → 2.0.0-alpha.5

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.
Files changed (60) hide show
  1. package/README.md +1 -1
  2. package/cjs/comps/KeyValues.js +7 -5
  3. package/cjs/index.d.ts +1 -1
  4. package/cjs/section/Copied.d.ts +1 -1
  5. package/cjs/section/CountInfo.d.ts +1 -1
  6. package/cjs/section/CountInfoExtra.d.ts +1 -1
  7. package/cjs/store/Section.d.ts +2 -2
  8. package/cjs/store/Symbols.d.ts +2 -2
  9. package/cjs/symbol/Arrow.d.ts +1 -1
  10. package/cjs/symbol/BraceLeft.d.ts +1 -1
  11. package/cjs/symbol/BraceRight.d.ts +1 -1
  12. package/cjs/symbol/BracketsLeft.d.ts +1 -1
  13. package/cjs/symbol/BracketsRight.d.ts +1 -1
  14. package/cjs/symbol/Colon.d.ts +1 -1
  15. package/cjs/symbol/Quote.d.ts +1 -1
  16. package/cjs/symbol/ValueQuote.d.ts +1 -1
  17. package/cjs/types/Bigint.d.ts +1 -1
  18. package/cjs/types/Date.d.ts +1 -1
  19. package/cjs/types/False.d.ts +1 -1
  20. package/cjs/types/Float.d.ts +1 -1
  21. package/cjs/types/Int.d.ts +1 -1
  22. package/cjs/types/Map.d.ts +1 -1
  23. package/cjs/types/Nan.d.ts +1 -1
  24. package/cjs/types/Null.d.ts +1 -1
  25. package/cjs/types/Set.d.ts +1 -1
  26. package/cjs/types/String.d.ts +1 -1
  27. package/cjs/types/True.d.ts +1 -1
  28. package/cjs/types/Undefined.d.ts +1 -1
  29. package/cjs/types/Url.d.ts +1 -1
  30. package/cjs/utils/useRender.d.ts +1 -1
  31. package/esm/comps/KeyValues.js +3 -3
  32. package/esm/index.d.ts +1 -1
  33. package/esm/section/Copied.d.ts +1 -1
  34. package/esm/section/CountInfo.d.ts +1 -1
  35. package/esm/section/CountInfoExtra.d.ts +1 -1
  36. package/esm/store/Section.d.ts +2 -2
  37. package/esm/store/Symbols.d.ts +2 -2
  38. package/esm/symbol/Arrow.d.ts +1 -1
  39. package/esm/symbol/BraceLeft.d.ts +1 -1
  40. package/esm/symbol/BraceRight.d.ts +1 -1
  41. package/esm/symbol/BracketsLeft.d.ts +1 -1
  42. package/esm/symbol/BracketsRight.d.ts +1 -1
  43. package/esm/symbol/Colon.d.ts +1 -1
  44. package/esm/symbol/Quote.d.ts +1 -1
  45. package/esm/symbol/ValueQuote.d.ts +1 -1
  46. package/esm/types/Bigint.d.ts +1 -1
  47. package/esm/types/Date.d.ts +1 -1
  48. package/esm/types/False.d.ts +1 -1
  49. package/esm/types/Float.d.ts +1 -1
  50. package/esm/types/Int.d.ts +1 -1
  51. package/esm/types/Map.d.ts +1 -1
  52. package/esm/types/Nan.d.ts +1 -1
  53. package/esm/types/Null.d.ts +1 -1
  54. package/esm/types/Set.d.ts +1 -1
  55. package/esm/types/String.d.ts +1 -1
  56. package/esm/types/True.d.ts +1 -1
  57. package/esm/types/Undefined.d.ts +1 -1
  58. package/esm/types/Url.d.ts +1 -1
  59. package/esm/utils/useRender.d.ts +1 -1
  60. package/package.json +1 -1
package/README.md CHANGED
@@ -687,7 +687,7 @@ export interface JsonViewProps<T extends object> extends React.DetailedHTMLProps
687
687
  /** Define the root node name. @default undefined */
688
688
  keyName?: string | number;
689
689
  /** Whether sort keys through `String.prototype.localeCompare()` @default false */
690
- objectSortKeys?: boolean | ((a: string, b: string) => number);
690
+ objectSortKeys?: boolean | ((keyA: string, keyB: string, valueA: T, valueB: T) => number);
691
691
  /** Set the indent-width for nested objects @default 15 */
692
692
  indentWidth?: number;
693
693
  /** When set to `true`, `objects` and `arrays` are labeled with size @default true */
@@ -47,11 +47,13 @@ var KeyValues = function KeyValues(props) {
47
47
  b = _ref4[0];
48
48
  return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b) : 0;
49
49
  }) : entries.sort(function (_ref5, _ref6) {
50
- var _ref7 = (0, _slicedToArray2["default"])(_ref5, 1),
51
- a = _ref7[0];
52
- var _ref8 = (0, _slicedToArray2["default"])(_ref6, 1),
53
- b = _ref8[0];
54
- return typeof a === 'string' && typeof b === 'string' ? objectSortKeys(a, b) : 0;
50
+ var _ref7 = (0, _slicedToArray2["default"])(_ref5, 2),
51
+ a = _ref7[0],
52
+ valA = _ref7[1];
53
+ var _ref8 = (0, _slicedToArray2["default"])(_ref6, 2),
54
+ b = _ref8[0],
55
+ valB = _ref8[1];
56
+ return typeof a === 'string' && typeof b === 'string' ? objectSortKeys(a, b, valA, valB) : 0;
55
57
  });
56
58
  }
57
59
  var style = {
package/cjs/index.d.ts CHANGED
@@ -37,7 +37,7 @@ export interface JsonViewProps<T extends object> extends React.DetailedHTMLProps
37
37
  /** Define the root node name. @default undefined */
38
38
  keyName?: string | number;
39
39
  /** Whether sort keys through `String.prototype.localeCompare()` @default false */
40
- objectSortKeys?: boolean | ((a: string, b: string) => number);
40
+ objectSortKeys?: boolean | ((keyA: string, keyB: string, valueA: T, valueB: T) => number);
41
41
  /** Set the indent-width for nested objects @default 15 */
42
42
  indentWidth?: number;
43
43
  /** When set to `true`, `objects` and `arrays` are labeled with size @default true */
@@ -1,6 +1,6 @@
1
1
  import { type TagType } from '../store/Types';
2
2
  import { type SectionElement } from '../store/Section';
3
3
  export declare const Copied: {
4
- (props: SectionElement<TagType>): null;
4
+ <K extends TagType = "svg">(props: SectionElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -10,6 +10,6 @@ export interface CountInfoCompProps<T extends object> {
10
10
  keyName: string | number;
11
11
  }
12
12
  export declare const CountInfoComp: {
13
- <T extends object>(props: SectionElementProps<TagType> & CountInfoCompProps<T> & import("react").HTMLAttributes<HTMLElement>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
13
+ <K extends TagType, T extends object>(props: SectionElementProps<K> & CountInfoCompProps<T> & import("react").HTMLAttributes<HTMLElement>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
14
14
  displayName: string;
15
15
  };
@@ -10,6 +10,6 @@ export interface CountInfoExtraCompsProps<T extends object> {
10
10
  keyName: string | number;
11
11
  }
12
12
  export declare const CountInfoExtraComps: {
13
- <T extends object>(props: SectionElementProps<TagType> & CountInfoExtraCompsProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
13
+ <T extends object, K extends TagType>(props: SectionElementProps<K> & CountInfoExtraCompsProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
14
14
  displayName: string;
15
15
  };
@@ -1,13 +1,13 @@
1
1
  import React, { FC, PropsWithChildren, ComponentPropsWithoutRef } from 'react';
2
2
  import { type TagType } from './Types';
3
- export type SectionElementProps<T extends TagType> = {
3
+ export type SectionElementProps<T extends TagType = 'span'> = {
4
4
  as?: T;
5
5
  render?: (props: SectionElement<T>, result: {
6
6
  value: unknown;
7
7
  keyName: string | number;
8
8
  }) => React.ReactNode;
9
9
  };
10
- export type SectionElement<T extends TagType> = SectionElementProps<T> & ComponentPropsWithoutRef<T>;
10
+ export type SectionElement<T extends TagType = 'span'> = SectionElementProps<T> & ComponentPropsWithoutRef<T>;
11
11
  type InitialState<T extends TagType> = {
12
12
  Copied?: SectionElement<T>;
13
13
  CountInfo?: SectionElement<T>;
@@ -1,11 +1,11 @@
1
1
  import { FC, PropsWithChildren, ElementType, ComponentPropsWithoutRef } from 'react';
2
2
  import { type TagType } from './Types';
3
- type SymbolsElementProps<T extends TagType> = {
3
+ type SymbolsElementProps<T extends TagType = 'span'> = {
4
4
  as?: T;
5
5
  render?: (props: SymbolsElement<T>) => React.ReactNode;
6
6
  'data-type'?: string;
7
7
  };
8
- export type SymbolsElement<T extends TagType> = SymbolsElementProps<T> & ComponentPropsWithoutRef<T>;
8
+ export type SymbolsElement<T extends TagType = 'span'> = SymbolsElementProps<T> & ComponentPropsWithoutRef<T>;
9
9
  type InitialState<T extends ElementType = 'span'> = {
10
10
  Arrow?: SymbolsElement<T>;
11
11
  Colon?: SymbolsElement<T>;
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const Arrow: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const BraceLeft: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const BraceRight: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const BracketsLeft: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const BracketsRight: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const Colon: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const Quote: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const ValueQuote: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Bigint: {
3
- <K extends TagType>(props: TypesElement<K>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Date: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const False: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Float: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Int: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Map: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Nan: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Null: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Set: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const StringText: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const True: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Undefined: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Url: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "a">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType, type TypesElement } from '../store/Types';
3
3
  import { type SectionElement } from '../store/Section';
4
- export declare function useSymbolsRender(currentProps: SymbolsElement<TagType>, props: SymbolsElement<TagType>, key: string): void;
4
+ export declare function useSymbolsRender<K extends TagType>(currentProps: SymbolsElement<TagType>, props: SymbolsElement<K>, key: string): void;
5
5
  export declare function useTypesRender<K extends TagType>(currentProps: TypesElement<TagType>, props: TypesElement<K>, key: string): void;
6
6
  export declare function useSectionRender<K extends TagType>(currentProps: SectionElement<TagType>, props: SectionElement<K>, key: string): void;
@@ -36,9 +36,9 @@ export var KeyValues = props => {
36
36
  var [b] = _ref2;
37
37
  return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b) : 0;
38
38
  }) : entries.sort((_ref3, _ref4) => {
39
- var [a] = _ref3;
40
- var [b] = _ref4;
41
- return typeof a === 'string' && typeof b === 'string' ? objectSortKeys(a, b) : 0;
39
+ var [a, valA] = _ref3;
40
+ var [b, valB] = _ref4;
41
+ return typeof a === 'string' && typeof b === 'string' ? objectSortKeys(a, b, valA, valB) : 0;
42
42
  });
43
43
  }
44
44
  var style = {
package/esm/index.d.ts CHANGED
@@ -37,7 +37,7 @@ export interface JsonViewProps<T extends object> extends React.DetailedHTMLProps
37
37
  /** Define the root node name. @default undefined */
38
38
  keyName?: string | number;
39
39
  /** Whether sort keys through `String.prototype.localeCompare()` @default false */
40
- objectSortKeys?: boolean | ((a: string, b: string) => number);
40
+ objectSortKeys?: boolean | ((keyA: string, keyB: string, valueA: T, valueB: T) => number);
41
41
  /** Set the indent-width for nested objects @default 15 */
42
42
  indentWidth?: number;
43
43
  /** When set to `true`, `objects` and `arrays` are labeled with size @default true */
@@ -1,6 +1,6 @@
1
1
  import { type TagType } from '../store/Types';
2
2
  import { type SectionElement } from '../store/Section';
3
3
  export declare const Copied: {
4
- (props: SectionElement<TagType>): null;
4
+ <K extends TagType = "svg">(props: SectionElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -10,6 +10,6 @@ export interface CountInfoCompProps<T extends object> {
10
10
  keyName: string | number;
11
11
  }
12
12
  export declare const CountInfoComp: {
13
- <T extends object>(props: SectionElementProps<TagType> & CountInfoCompProps<T> & import("react").HTMLAttributes<HTMLElement>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
13
+ <K extends TagType, T extends object>(props: SectionElementProps<K> & CountInfoCompProps<T> & import("react").HTMLAttributes<HTMLElement>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
14
14
  displayName: string;
15
15
  };
@@ -10,6 +10,6 @@ export interface CountInfoExtraCompsProps<T extends object> {
10
10
  keyName: string | number;
11
11
  }
12
12
  export declare const CountInfoExtraComps: {
13
- <T extends object>(props: SectionElementProps<TagType> & CountInfoExtraCompsProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
13
+ <T extends object, K extends TagType>(props: SectionElementProps<K> & CountInfoExtraCompsProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
14
14
  displayName: string;
15
15
  };
@@ -1,13 +1,13 @@
1
1
  import React, { FC, PropsWithChildren, ComponentPropsWithoutRef } from 'react';
2
2
  import { type TagType } from './Types';
3
- export type SectionElementProps<T extends TagType> = {
3
+ export type SectionElementProps<T extends TagType = 'span'> = {
4
4
  as?: T;
5
5
  render?: (props: SectionElement<T>, result: {
6
6
  value: unknown;
7
7
  keyName: string | number;
8
8
  }) => React.ReactNode;
9
9
  };
10
- export type SectionElement<T extends TagType> = SectionElementProps<T> & ComponentPropsWithoutRef<T>;
10
+ export type SectionElement<T extends TagType = 'span'> = SectionElementProps<T> & ComponentPropsWithoutRef<T>;
11
11
  type InitialState<T extends TagType> = {
12
12
  Copied?: SectionElement<T>;
13
13
  CountInfo?: SectionElement<T>;
@@ -1,11 +1,11 @@
1
1
  import { FC, PropsWithChildren, ElementType, ComponentPropsWithoutRef } from 'react';
2
2
  import { type TagType } from './Types';
3
- type SymbolsElementProps<T extends TagType> = {
3
+ type SymbolsElementProps<T extends TagType = 'span'> = {
4
4
  as?: T;
5
5
  render?: (props: SymbolsElement<T>) => React.ReactNode;
6
6
  'data-type'?: string;
7
7
  };
8
- export type SymbolsElement<T extends TagType> = SymbolsElementProps<T> & ComponentPropsWithoutRef<T>;
8
+ export type SymbolsElement<T extends TagType = 'span'> = SymbolsElementProps<T> & ComponentPropsWithoutRef<T>;
9
9
  type InitialState<T extends ElementType = 'span'> = {
10
10
  Arrow?: SymbolsElement<T>;
11
11
  Colon?: SymbolsElement<T>;
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const Arrow: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const BraceLeft: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const BraceRight: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const BracketsLeft: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const BracketsRight: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const Colon: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const Quote: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType } from '../store/Types';
3
3
  export declare const ValueQuote: {
4
- (props: SymbolsElement<TagType>): null;
4
+ <K extends TagType = "span">(props: SymbolsElement<K>): null;
5
5
  displayName: string;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Bigint: {
3
- <K extends TagType>(props: TypesElement<K>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Date: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const False: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Float: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Int: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Map: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Nan: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Null: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Set: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const StringText: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const True: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Undefined: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "span">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { type TagType, type TypesElement } from '../store/Types';
2
2
  export declare const Url: {
3
- (props: TypesElement<TagType>): null;
3
+ <K extends TagType = "a">(props: TypesElement<K>): null;
4
4
  displayName: string;
5
5
  };
@@ -1,6 +1,6 @@
1
1
  import { type SymbolsElement } from '../store/Symbols';
2
2
  import { type TagType, type TypesElement } from '../store/Types';
3
3
  import { type SectionElement } from '../store/Section';
4
- export declare function useSymbolsRender(currentProps: SymbolsElement<TagType>, props: SymbolsElement<TagType>, key: string): void;
4
+ export declare function useSymbolsRender<K extends TagType>(currentProps: SymbolsElement<TagType>, props: SymbolsElement<K>, key: string): void;
5
5
  export declare function useTypesRender<K extends TagType>(currentProps: TypesElement<TagType>, props: TypesElement<K>, key: string): void;
6
6
  export declare function useSectionRender<K extends TagType>(currentProps: SectionElement<TagType>, props: SectionElement<K>, key: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uiw/react-json-view",
3
- "version": "2.0.0-alpha.3",
3
+ "version": "2.0.0-alpha.5",
4
4
  "description": "JSON viewer for react.",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",