@uiw/react-json-view 2.0.0-alpha.42 → 2.0.0-alpha.44

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 (81) hide show
  1. package/README.md +48 -30
  2. package/cjs/arrow/TriangleArrow.d.ts +1 -1
  3. package/cjs/arrow/TriangleSolidArrow.d.ts +1 -1
  4. package/cjs/comps/Copied.d.ts +1 -1
  5. package/cjs/comps/KeyValues.d.ts +3 -3
  6. package/cjs/comps/NestedClose.d.ts +1 -1
  7. package/cjs/comps/NestedOpen.d.ts +1 -1
  8. package/cjs/comps/Value.d.ts +1 -1
  9. package/cjs/index.d.ts +2 -0
  10. package/cjs/section/CountInfo.d.ts +1 -1
  11. package/cjs/section/CountInfoExtra.d.ts +1 -1
  12. package/cjs/section/Ellipsis.d.ts +1 -1
  13. package/cjs/section/KeyName.d.ts +1 -1
  14. package/cjs/section/Row.d.ts +1 -1
  15. package/cjs/store/Types.d.ts +1 -1
  16. package/cjs/store.d.ts +1 -1
  17. package/cjs/symbol/index.d.ts +6 -6
  18. package/esm/Container.js +11 -9
  19. package/esm/arrow/TriangleArrow.d.ts +1 -1
  20. package/esm/arrow/TriangleArrow.js +1 -3
  21. package/esm/arrow/TriangleSolidArrow.d.ts +1 -1
  22. package/esm/arrow/TriangleSolidArrow.js +1 -3
  23. package/esm/comps/Copied.d.ts +1 -1
  24. package/esm/comps/Copied.js +18 -20
  25. package/esm/comps/KeyValues.d.ts +3 -3
  26. package/esm/comps/KeyValues.js +34 -35
  27. package/esm/comps/NestedClose.d.ts +1 -1
  28. package/esm/comps/NestedClose.js +10 -12
  29. package/esm/comps/NestedOpen.d.ts +1 -1
  30. package/esm/comps/NestedOpen.js +12 -14
  31. package/esm/comps/Value.d.ts +1 -1
  32. package/esm/comps/Value.js +3 -5
  33. package/esm/editor/KeyName.js +12 -16
  34. package/esm/editor/index.js +9 -8
  35. package/esm/index.d.ts +2 -0
  36. package/esm/index.js +26 -19
  37. package/esm/section/Copied.js +3 -3
  38. package/esm/section/CountInfo.d.ts +1 -1
  39. package/esm/section/CountInfo.js +13 -17
  40. package/esm/section/CountInfoExtra.d.ts +1 -1
  41. package/esm/section/CountInfoExtra.js +11 -14
  42. package/esm/section/Ellipsis.d.ts +1 -1
  43. package/esm/section/Ellipsis.js +11 -15
  44. package/esm/section/KeyName.d.ts +1 -1
  45. package/esm/section/KeyName.js +13 -17
  46. package/esm/section/Row.d.ts +1 -1
  47. package/esm/section/Row.js +14 -17
  48. package/esm/store/Expands.js +3 -5
  49. package/esm/store/Section.js +3 -5
  50. package/esm/store/ShowTools.js +3 -5
  51. package/esm/store/Symbols.js +3 -5
  52. package/esm/store/Types.d.ts +1 -1
  53. package/esm/store/Types.js +3 -5
  54. package/esm/store.d.ts +1 -1
  55. package/esm/store.js +21 -11
  56. package/esm/symbol/Arrow.js +3 -3
  57. package/esm/symbol/BraceLeft.js +3 -3
  58. package/esm/symbol/BraceRight.js +3 -3
  59. package/esm/symbol/BracketsLeft.js +3 -3
  60. package/esm/symbol/BracketsRight.js +3 -3
  61. package/esm/symbol/Colon.js +3 -3
  62. package/esm/symbol/Quote.js +3 -3
  63. package/esm/symbol/ValueQuote.js +3 -3
  64. package/esm/symbol/index.d.ts +6 -6
  65. package/esm/symbol/index.js +65 -89
  66. package/esm/types/Bigint.js +3 -3
  67. package/esm/types/Date.js +3 -3
  68. package/esm/types/False.js +3 -3
  69. package/esm/types/Float.js +3 -3
  70. package/esm/types/Int.js +3 -3
  71. package/esm/types/Map.js +3 -3
  72. package/esm/types/Nan.js +3 -3
  73. package/esm/types/Null.js +3 -3
  74. package/esm/types/Set.js +3 -3
  75. package/esm/types/String.js +3 -3
  76. package/esm/types/True.js +3 -3
  77. package/esm/types/Undefined.js +3 -3
  78. package/esm/types/Url.js +3 -3
  79. package/esm/types/index.js +124 -172
  80. package/esm/utils/useHighlight.js +3 -5
  81. package/package.json +1 -1
package/README.md CHANGED
@@ -1,38 +1,56 @@
1
+ <div align="center" markdown="1">
2
+ <sup>Special thanks to:</sup>
3
+ <br>
4
+ <br>
5
+
6
+ <a href="https://apps.apple.com/app/apple-store/id6757860829?pt=80185800&ct=jay&mt=8">
7
+ <img alt="SubList" width="400" src="https://jaywcjlove.github.io/sponsor/SubList.jpg">
8
+ </a>
9
+ <br>
10
+ <a href="https://apps.apple.com/app/apple-store/id6757860829?pt=80185800&ct=jay&mt=8">
11
+ SubList - Bill Reminder & Renewal Alerts
12
+ </a>
13
+ <br><br>
14
+
15
+ </div>
16
+ <hr>
17
+
1
18
  <div markdown="1">
2
19
  <sup>Using <a href="https://wangchujiang.com/#/app" target="_blank">my app</a> is also a way to <a href="https://wangchujiang.com/#/sponsor" target="_blank">support</a> me:</sup>
3
20
  <br>
4
- <a target="_blank" href="https://apps.apple.com/app/6758053530" title="Scap: Screenshot & Markup Edit for macOS"><img alt="Scap: Screenshot & Markup Edit" height="52" src="https://wangchujiang.com/appicon/scap.png"></a>
5
- <a target="_blank" href="https://apps.apple.com/app/6757317079" title="Screen Test for macOS"><img alt="Screen Test" height="52" src="https://wangchujiang.com/appicon/screen-test.png"></a>
6
- <a target="_blank" href="https://apps.apple.com/app/Deskmark/6755948110" title="Deskmark for macOS"><img alt="Deskmark" height="52" src="https://wangchujiang.com/appicon/deskmark.png"></a>
7
- <a target="_blank" href="https://apps.apple.com/app/Keyzer/6500434773" title="Keyzer for macOS"><img alt="Keyzer" height="52" src="https://wangchujiang.com/appicon/keyzer.png"></a>
21
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6766860898" title="Zipora: Zip/RAR/7Z Unarchiver"><img alt="Zipora: Zip/RAR/7Z Unarchiver" height="52" src="https://wangchujiang.com/appicon/zipora.png"></a>
22
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6758053530" title="Scap: Screenshot & Markup Edit for macOS"><img alt="Scap: Screenshot & Markup Edit" height="52" src="https://wangchujiang.com/appicon/scap.png"></a>
23
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6757317079" title="Screen Test for macOS"><img alt="Screen Test" height="52" src="https://wangchujiang.com/appicon/screen-test.png"></a>
24
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6755948110" title="Deskmark for macOS"><img alt="Deskmark" height="52" src="https://wangchujiang.com/appicon/deskmark.png"></a>
25
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6500434773" title="Keyzer for macOS"><img alt="Keyzer" height="52" src="https://wangchujiang.com/appicon/keyzer.png"></a>
8
26
  <a target="_blank" href="https://github.com/jaywcjlove/vidwall-hub" title="Vidwall Hub for macOS"><img alt="Vidwall Hub" height="52" src="https://wangchujiang.com/appicon/vidwall-hub.png"></a>
9
- <a target="_blank" href="https://apps.apple.com/app/VidCrop/6752624705" title="VidCrop for macOS"><img alt="VidCrop" height="52" src="https://wangchujiang.com/appicon/vidcrop.png"></a>
10
- <a target="_blank" href="https://apps.apple.com/app/Vidwall/6747587746" title="Vidwall for macOS"><img alt="Vidwall" height="52" src="https://wangchujiang.com/appicon/vidwall.png"></a>
27
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6752624705" title="VidCrop for macOS"><img alt="VidCrop" height="52" src="https://wangchujiang.com/appicon/vidcrop.png"></a>
28
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6747587746" title="Vidwall for macOS"><img alt="Vidwall" height="52" src="https://wangchujiang.com/appicon/vidwall.png"></a>
11
29
  <a target="_blank" href="https://wangchujiang.com/mousio-hint/" title="Mousio Hint for macOS"><img alt="Mousio Hint" height="52" src="https://wangchujiang.com/appicon/mousio-hint.png"></a>
12
- <a target="_blank" href="https://apps.apple.com/app/6746747327" title="Mousio for macOS"><img alt="Mousio" height="52" src="https://wangchujiang.com/appicon/mousio.png"></a>
13
- <a target="_blank" href="https://apps.apple.com/app/6745227444" title="Musicer for macOS"><img alt="Musicer" height="52" src="https://wangchujiang.com/appicon/musicer.png"></a>
14
- <a target="_blank" href="https://apps.apple.com/app/6743841447" title="Audioer for macOS"><img alt="Audioer" height="52" src="https://wangchujiang.com/appicon/audioer.png"></a>
15
- <a target="_blank" href="https://apps.apple.com/app/6744690194" title="FileSentinel for macOS"><img alt="FileSentinel" height="52" src="https://wangchujiang.com/appicon/file-sentinel.png"></a>
16
- <a target="_blank" href="https://apps.apple.com/app/6743495172" title="FocusCursor for macOS"><img alt="FocusCursor" height="52" src="https://wangchujiang.com/appicon/focus-cursor.png"></a>
17
- <a target="_blank" href="https://apps.apple.com/app/6742680573" title="Videoer for macOS"><img alt="Videoer" height="52" src="https://wangchujiang.com/appicon/videoer.png"></a>
18
- <a target="_blank" href="https://apps.apple.com/app/6740425504" title="KeyClicker for macOS"><img alt="KeyClicker" height="52" src="https://wangchujiang.com/appicon/key-clicker.png"></a>
19
- <a target="_blank" href="https://apps.apple.com/app/6739052447" title="DayBar for macOS"><img alt="DayBar" height="52" src="https://wangchujiang.com/appicon/daybar.png"></a>
20
- <a target="_blank" href="https://apps.apple.com/app/6739444407" title="Iconed for macOS"><img alt="Iconed" height="52" src="https://wangchujiang.com/appicon/iconed.png"></a>
21
- <a target="_blank" href="https://apps.apple.com/app/6737160756" title="Menuist for macOS"><img alt="Menuist" height="52" src="https://wangchujiang.com/appicon/rightmenu-master.png"></a>
22
- <a target="_blank" href="https://apps.apple.com/app/6723903021" title="Paste Quick for macOS"><img alt="Quick RSS" height="52" src="https://wangchujiang.com/appicon/paste-quick.png"></a>
23
- <a target="_blank" href="https://apps.apple.com/app/6670696072?platform=mac" title="Quick RSS for macOS/iOS"><img alt="Quick RSS" height="52" src="https://wangchujiang.com/appicon/quick-rss.png"></a>
24
- <a target="_blank" href="https://apps.apple.com/app/6670167443" title="Web Serve for macOS"><img alt="Web Serve" height="52" src="https://wangchujiang.com/appicon/web-serve.png"></a>
25
- <a target="_blank" href="https://apps.apple.com/app/6503953628?platform=mac" title="Copybook Generator for macOS/iOS"><img alt="Copybook Generator" height="52" src="https://wangchujiang.com/appicon/copybook-generator.png"></a>
26
- <a target="_blank" href="https://apps.apple.com/app/6471227008?platform=mac" title="DevTutor for macOS/iOS"><img alt="DevTutor for SwiftUI" height="52" src="https://wangchujiang.com/appicon/devtutor.png"></a>
27
- <a target="_blank" href="https://apps.apple.com/app/6479819388?platform=mac" title="RegexMate for macOS/iOS"><img alt="RegexMate" height="52" src="https://wangchujiang.com/appicon/regex-mate.png"></a>
28
- <a target="_blank" href="https://apps.apple.com/app/6479194014?platform=mac" title="Time Passage for macOS/iOS"><img alt="Time Passage" height="52" src="https://wangchujiang.com/appicon/time-passage.png"></a>
29
- <a target="_blank" href="https://apps.apple.com/app/6478772538" title="IconizeFolder for macOS"><img alt="Iconize Folder" height="52" src="https://wangchujiang.com/appicon/iconize-folder.png"></a>
30
- <a target="_blank" href="https://apps.apple.com/app/6478511402?platform=mac" title="Textsound Saver for macOS/iOS"><img alt="Textsound Saver" height="52" src="https://wangchujiang.com/appicon/textsound-saver.png"></a>
31
- <a target="_blank" href="https://apps.apple.com/app/6476924627" title="Create Custom Symbols for macOS"><img alt="Create Custom Symbols" height="52" src="https://wangchujiang.com/appicon/create-custom-symbols.png"></a>
32
- <a target="_blank" href="https://apps.apple.com/app/6476452351" title="DevHub for macOS"><img alt="DevHub" height="52" src="https://wangchujiang.com/appicon/devhub.png"></a>
33
- <a target="_blank" href="https://apps.apple.com/app/6476400184" title="Resume Revise for macOS"><img alt="Resume Revise" height="52" src="https://wangchujiang.com/appicon/resume-revise.png"></a>
34
- <a target="_blank" href="https://apps.apple.com/app/6472593276" title="Palette Genius for macOS"><img alt="Palette Genius" height="52" src="https://wangchujiang.com/appicon/palette-genius.png"></a>
35
- <a target="_blank" href="https://apps.apple.com/app/6470879005" title="Symbol Scribe for macOS"><img alt="Symbol Scribe" height="52" src="https://wangchujiang.com/appicon/symbol-scribe.png"></a>
30
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6746747327" title="Mousio for macOS"><img alt="Mousio" height="52" src="https://wangchujiang.com/appicon/mousio.png"></a>
31
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6745227444" title="Musicer for macOS"><img alt="Musicer" height="52" src="https://wangchujiang.com/appicon/musicer.png"></a>
32
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6743841447" title="Audioer for macOS"><img alt="Audioer" height="52" src="https://wangchujiang.com/appicon/audioer.png"></a>
33
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6744690194" title="FileSentinel for macOS"><img alt="FileSentinel" height="52" src="https://wangchujiang.com/appicon/file-sentinel.png"></a>
34
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6743495172" title="FocusCursor for macOS"><img alt="FocusCursor" height="52" src="https://wangchujiang.com/appicon/focus-cursor.png"></a>
35
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6742680573" title="Videoer for macOS"><img alt="Videoer" height="52" src="https://wangchujiang.com/appicon/videoer.png"></a>
36
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6740425504" title="KeyClicker for macOS"><img alt="KeyClicker" height="52" src="https://wangchujiang.com/appicon/key-clicker.png"></a>
37
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6739052447" title="DayBar for macOS"><img alt="DayBar" height="52" src="https://wangchujiang.com/appicon/daybar.png"></a>
38
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6739444407" title="Iconed for macOS"><img alt="Iconed" height="52" src="https://wangchujiang.com/appicon/iconed.png"></a>
39
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6737160756" title="Menuist for macOS"><img alt="Menuist" height="52" src="https://wangchujiang.com/appicon/rightmenu-master.png"></a>
40
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6723903021" title="Paste Quick for macOS"><img alt="Quick RSS" height="52" src="https://wangchujiang.com/appicon/paste-quick.png"></a>
41
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6670696072&platform=mac" title="Quick RSS for macOS/iOS"><img alt="Quick RSS" height="52" src="https://wangchujiang.com/appicon/quick-rss.png"></a>
42
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6670167443" title="Web Serve for macOS"><img alt="Web Serve" height="52" src="https://wangchujiang.com/appicon/web-serve.png"></a>
43
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6503953628&platform=mac" title="Copybook Generator for macOS/iOS"><img alt="Copybook Generator" height="52" src="https://wangchujiang.com/appicon/copybook-generator.png"></a>
44
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6471227008&platform=mac" title="DevTutor for macOS/iOS"><img alt="DevTutor for SwiftUI" height="52" src="https://wangchujiang.com/appicon/devtutor.png"></a>
45
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6479819388&platform=mac" title="RegexMate for macOS/iOS"><img alt="RegexMate" height="52" src="https://wangchujiang.com/appicon/regex-mate.png"></a>
46
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6479194014&platform=mac" title="Time Passage for macOS/iOS"><img alt="Time Passage" height="52" src="https://wangchujiang.com/appicon/time-passage.png"></a>
47
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6478772538" title="IconizeFolder for macOS"><img alt="Iconize Folder" height="52" src="https://wangchujiang.com/appicon/iconize-folder.png"></a>
48
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6478511402&platform=mac" title="Textsound Saver for macOS/iOS"><img alt="Textsound Saver" height="52" src="https://wangchujiang.com/appicon/textsound-saver.png"></a>
49
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6476924627" title="Create Custom Symbols for macOS"><img alt="Create Custom Symbols" height="52" src="https://wangchujiang.com/appicon/create-custom-symbols.png"></a>
50
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6476452351" title="DevHub for macOS"><img alt="DevHub" height="52" src="https://wangchujiang.com/appicon/devhub.png"></a>
51
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6476400184" title="Resume Revise for macOS"><img alt="Resume Revise" height="52" src="https://wangchujiang.com/appicon/resume-revise.png"></a>
52
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6472593276" title="Palette Genius for macOS"><img alt="Palette Genius" height="52" src="https://wangchujiang.com/appicon/palette-genius.png"></a>
53
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6470879005" title="Symbol Scribe for macOS"><img alt="Symbol Scribe" height="52" src="https://wangchujiang.com/appicon/symbol-scribe.png"></a>
36
54
  </div>
37
55
  <hr>
38
56
 
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  export interface TriangleArrowProps extends React.SVGProps<SVGSVGElement> {
3
3
  }
4
- export declare function TriangleArrow(props: TriangleArrowProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function TriangleArrow(props: TriangleArrowProps): React.JSX.Element;
5
5
  export declare namespace TriangleArrow {
6
6
  var displayName: string;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  export interface TriangleSolidArrowProps extends React.SVGProps<SVGSVGElement> {
3
3
  }
4
- export declare function TriangleSolidArrow(props: TriangleSolidArrowProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function TriangleSolidArrow(props: TriangleSolidArrowProps): React.JSX.Element;
5
5
  export declare namespace TriangleSolidArrow {
6
6
  var displayName: string;
7
7
  }
@@ -10,6 +10,6 @@ export interface CopiedProps<T extends object> extends React.SVGProps<SVGSVGElem
10
10
  beforeCopy?: (copyText: string, keyName?: string | number, value?: T, parentValue?: T, expandKey?: string, keys?: (number | string)[]) => string;
11
11
  }
12
12
  export declare const Copied: {
13
- <T extends object, K extends TagType>(props: CopiedProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
13
+ <T extends object, K extends TagType>(props: CopiedProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element | null;
14
14
  displayName: string;
15
15
  };
@@ -4,17 +4,17 @@ interface KeyValuesProps<T extends object> extends SectionElementResult<T> {
4
4
  level: number;
5
5
  }
6
6
  export declare const KeyValues: {
7
- <T extends object>(props: KeyValuesProps<T>): import("react/jsx-runtime").JSX.Element | null;
7
+ <T extends object>(props: KeyValuesProps<T>): import("react").JSX.Element | null;
8
8
  displayName: string;
9
9
  };
10
10
  interface KayNameProps<T extends object> extends Omit<KeyValuesProps<T>, 'level'> {
11
11
  }
12
12
  export declare const KayName: {
13
- <T extends object>(props: KayNameProps<T>): import("react/jsx-runtime").JSX.Element;
13
+ <T extends object>(props: KayNameProps<T>): import("react").JSX.Element;
14
14
  displayName: string;
15
15
  };
16
16
  export declare const KeyValuesItem: {
17
- <T extends object>(props: KeyValuesProps<T>): import("react/jsx-runtime").JSX.Element;
17
+ <T extends object>(props: KeyValuesProps<T>): import("react").JSX.Element;
18
18
  displayName: string;
19
19
  };
20
20
  export {};
@@ -4,7 +4,7 @@ interface NestedCloseProps<T extends object> extends SectionElementResult<T> {
4
4
  level: number;
5
5
  }
6
6
  export declare const NestedClose: {
7
- <T extends object>(props: NestedCloseProps<T>): import("react/jsx-runtime").JSX.Element | null;
7
+ <T extends object>(props: NestedCloseProps<T>): import("react").JSX.Element | null;
8
8
  displayName: string;
9
9
  };
10
10
  export {};
@@ -5,6 +5,6 @@ export interface NestedOpenProps<T extends object> extends SectionElementResult<
5
5
  level: number;
6
6
  }
7
7
  export declare const NestedOpen: {
8
- <T extends object>(props: NestedOpenProps<T>): import("react/jsx-runtime").JSX.Element;
8
+ <T extends object>(props: NestedOpenProps<T>): import("react").JSX.Element;
9
9
  displayName: string;
10
10
  };
@@ -5,7 +5,7 @@ interface ValueProps {
5
5
  keys?: (string | number)[];
6
6
  }
7
7
  export declare const Value: {
8
- (props: ValueProps): import("react/jsx-runtime").JSX.Element | null;
8
+ (props: ValueProps): import("react").JSX.Element | null;
9
9
  displayName: string;
10
10
  };
11
11
  export {};
package/cjs/index.d.ts CHANGED
@@ -31,6 +31,8 @@ export * from './store/ShowTools';
31
31
  export * from './store/Symbols';
32
32
  export * from './store/Types';
33
33
  export * from './symbol/';
34
+ export type { SectionElement } from './store/Section';
35
+ export type { CopiedSectionElement } from './section/Copied';
34
36
  export type ShouldExpandNodeInitially<T extends object> = (isExpanded: boolean, props: {
35
37
  keyName?: string | number;
36
38
  value?: T;
@@ -9,6 +9,6 @@ export interface CountInfoCompProps<T extends object> {
9
9
  keyName: string | number;
10
10
  }
11
11
  export declare const CountInfoComp: {
12
- <K extends TagType, T extends object>(props: SectionElementProps<K> & CountInfoCompProps<T> & React.HTMLAttributes<HTMLElement>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
12
+ <K extends TagType, T extends object>(props: SectionElementProps<K> & CountInfoCompProps<T> & React.HTMLAttributes<HTMLElement>): string | number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element | null;
13
13
  displayName: string;
14
14
  };
@@ -9,6 +9,6 @@ export interface CountInfoExtraCompsProps<T extends object> {
9
9
  keyName: string | number;
10
10
  }
11
11
  export declare const CountInfoExtraComps: {
12
- <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;
12
+ <T extends object, K extends TagType>(props: SectionElementProps<K> & CountInfoExtraCompsProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element | null;
13
13
  displayName: string;
14
14
  };
@@ -10,6 +10,6 @@ export interface EllipsisCompProps<T extends object> {
10
10
  isExpanded: boolean;
11
11
  }
12
12
  export declare const EllipsisComp: {
13
- <T extends object>({ isExpanded, value, keyName }: EllipsisCompProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
13
+ <T extends object>({ isExpanded, value, keyName }: EllipsisCompProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element | null;
14
14
  displayName: string;
15
15
  };
@@ -9,6 +9,6 @@ export declare const KeyName: {
9
9
  export interface KeyNameCompProps<T extends object> extends React.HTMLAttributes<HTMLSpanElement>, SectionElementResult<T> {
10
10
  }
11
11
  export declare const KeyNameComp: {
12
- <T extends object>(props: PropsWithChildren<KeyNameCompProps<T>>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
12
+ <T extends object>(props: PropsWithChildren<KeyNameCompProps<T>>): string | number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element;
13
13
  displayName: string;
14
14
  };
@@ -8,6 +8,6 @@ export declare const Row: {
8
8
  export interface RowCompProps<T extends object> extends React.HTMLAttributes<HTMLDivElement>, SectionElementResult<T> {
9
9
  }
10
10
  export declare const RowComp: {
11
- <T extends object>(props: React.PropsWithChildren<RowCompProps<T>>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
11
+ <T extends object>(props: React.PropsWithChildren<RowCompProps<T>>): string | number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element;
12
12
  displayName: string;
13
13
  };
@@ -50,7 +50,7 @@ interface TypesProps<T extends TagType> {
50
50
  initial: InitialTypesState<T>;
51
51
  dispatch: Dispatch<TagType>;
52
52
  }
53
- export declare function Types<T extends TagType>({ initial, dispatch, children }: PropsWithChildren<TypesProps<T>>): import("react/jsx-runtime").JSX.Element;
53
+ export declare function Types<T extends TagType>({ initial, dispatch, children }: PropsWithChildren<TypesProps<T>>): import("react").JSX.Element;
54
54
  export declare namespace Types {
55
55
  var displayName: string;
56
56
  }
package/cjs/store.d.ts CHANGED
@@ -28,7 +28,7 @@ export interface ProviderProps<T extends TagType> {
28
28
  initialTypes?: InitialTypesState<T>;
29
29
  }
30
30
  export declare const Provider: {
31
- <T extends TagType>({ children, initialState: init, initialTypes, }: PropsWithChildren<ProviderProps<T>>): import("react/jsx-runtime").JSX.Element;
31
+ <T extends TagType>({ children, initialState: init, initialTypes, }: PropsWithChildren<ProviderProps<T>>): React.JSX.Element;
32
32
  displayName: string;
33
33
  };
34
34
  export declare function useDispatch(): Dispatch;
@@ -3,27 +3,27 @@ import { type TagType } from '../store/Types';
3
3
  export declare const Quote: {
4
4
  <T extends object>(props: {
5
5
  isNumber?: boolean;
6
- } & React.HTMLAttributes<HTMLElement> & SymbolsElementResult<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
6
+ } & React.HTMLAttributes<HTMLElement> & SymbolsElementResult<T>): string | number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element | null;
7
7
  displayName: string;
8
8
  };
9
9
  export declare const ValueQuote: {
10
- (props: React.HTMLAttributes<HTMLElement>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
10
+ (props: React.HTMLAttributes<HTMLElement>): string | number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element;
11
11
  displayName: string;
12
12
  };
13
13
  export declare const Colon: {
14
- <T extends object>(props: SymbolsElementResult<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
14
+ <T extends object>(props: SymbolsElementResult<T>): string | number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element;
15
15
  displayName: string;
16
16
  };
17
17
  export declare const Arrow: {
18
18
  <T extends TagType, K extends object>(props: SymbolsElement<T> & {
19
19
  expandKey: string;
20
- } & SymbolsElementResult<K>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
20
+ } & SymbolsElementResult<K>): string | number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element;
21
21
  displayName: string;
22
22
  };
23
23
  export declare const BracketsOpen: {
24
24
  <K extends object>(props: {
25
25
  isBrackets?: boolean;
26
- } & SymbolsElementResult<K>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
26
+ } & SymbolsElementResult<K>): string | number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element;
27
27
  displayName: string;
28
28
  };
29
29
  type BracketsProps = {
@@ -31,7 +31,7 @@ type BracketsProps = {
31
31
  isVisiable?: boolean;
32
32
  };
33
33
  export declare const BracketsClose: {
34
- <K extends object>(props: BracketsProps & SymbolsElementResult<K>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
34
+ <K extends object>(props: BracketsProps & SymbolsElementResult<K>): string | number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element | null;
35
35
  displayName: string;
36
36
  };
37
37
  export {};
package/esm/Container.js CHANGED
@@ -9,15 +9,17 @@ import { useIdCompat } from "./comps/useIdCompat.js";
9
9
  import { useShowToolsDispatch } from "./store/ShowTools.js";
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  export var Container = /*#__PURE__*/forwardRef((props, ref) => {
12
- var {
13
- className = '',
14
- parentValue,
15
- level = 1,
16
- value,
17
- initialValue,
18
- keys,
19
- keyName
20
- } = props,
12
+ var _props$className = props.className,
13
+ className = _props$className === void 0 ? '' : _props$className,
14
+ children = props.children,
15
+ parentValue = props.parentValue,
16
+ keyid = props.keyid,
17
+ _props$level = props.level,
18
+ level = _props$level === void 0 ? 1 : _props$level,
19
+ value = props.value,
20
+ initialValue = props.initialValue,
21
+ keys = props.keys,
22
+ keyName = props.keyName,
21
23
  elmProps = _objectWithoutPropertiesLoose(props, _excluded);
22
24
  var dispatch = useShowToolsDispatch();
23
25
  var subkeyid = useIdCompat();
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  export interface TriangleArrowProps extends React.SVGProps<SVGSVGElement> {
3
3
  }
4
- export declare function TriangleArrow(props: TriangleArrowProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function TriangleArrow(props: TriangleArrowProps): React.JSX.Element;
5
5
  export declare namespace TriangleArrow {
6
6
  var displayName: string;
7
7
  }
@@ -4,9 +4,7 @@ var _excluded = ["style"];
4
4
  import React from 'react';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  export function TriangleArrow(props) {
7
- var {
8
- style
9
- } = props,
7
+ var style = props.style,
10
8
  reset = _objectWithoutPropertiesLoose(props, _excluded);
11
9
  var defaultStyle = _extends({
12
10
  cursor: 'pointer',
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  export interface TriangleSolidArrowProps extends React.SVGProps<SVGSVGElement> {
3
3
  }
4
- export declare function TriangleSolidArrow(props: TriangleSolidArrowProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function TriangleSolidArrow(props: TriangleSolidArrowProps): React.JSX.Element;
5
5
  export declare namespace TriangleSolidArrow {
6
6
  var displayName: string;
7
7
  }
@@ -4,9 +4,7 @@ var _excluded = ["style"];
4
4
  import React from 'react';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  export function TriangleSolidArrow(props) {
7
- var {
8
- style
9
- } = props,
7
+ var style = props.style,
10
8
  reset = _objectWithoutPropertiesLoose(props, _excluded);
11
9
  var defaultStyle = _extends({
12
10
  cursor: 'pointer',
@@ -10,6 +10,6 @@ export interface CopiedProps<T extends object> extends React.SVGProps<SVGSVGElem
10
10
  beforeCopy?: (copyText: string, keyName?: string | number, value?: T, parentValue?: T, expandKey?: string, keys?: (number | string)[]) => string;
11
11
  }
12
12
  export declare const Copied: {
13
- <T extends object, K extends TagType>(props: CopiedProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
13
+ <T extends object, K extends TagType>(props: CopiedProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element | null;
14
14
  displayName: string;
15
15
  };
@@ -9,26 +9,25 @@ import { useShowToolsStore } from "../store/ShowTools.js";
9
9
  import { bigIntToString } from "../types/index.js";
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
  export var Copied = props => {
12
- var {
13
- keyName,
14
- value,
15
- parentValue,
16
- expandKey,
17
- keys,
18
- beforeCopy
19
- } = props,
12
+ var keyName = props.keyName,
13
+ value = props.value,
14
+ parentValue = props.parentValue,
15
+ expandKey = props.expandKey,
16
+ keys = props.keys,
17
+ beforeCopy = props.beforeCopy,
20
18
  other = _objectWithoutPropertiesLoose(props, _excluded);
21
- var {
22
- onCopied,
23
- enableClipboard,
24
- beforeCopy: globalBeforeCopy
25
- } = useStore();
19
+ var _useStore = useStore(),
20
+ onCopied = _useStore.onCopied,
21
+ enableClipboard = _useStore.enableClipboard,
22
+ globalBeforeCopy = _useStore.beforeCopy;
26
23
  var showTools = useShowToolsStore();
27
24
  var isShowTools = showTools[expandKey];
28
- var [copied, setCopied] = useState(false);
29
- var {
30
- Copied: Comp = {}
31
- } = useSectionStore();
25
+ var _useState = useState(false),
26
+ copied = _useState[0],
27
+ setCopied = _useState[1];
28
+ var _useSectionStore = useSectionStore(),
29
+ _useSectionStore$Copi = _useSectionStore.Copied,
30
+ Comp = _useSectionStore$Copi === void 0 ? {} : _useSectionStore$Copi;
32
31
  var sectionBeforeCopy = Comp == null ? void 0 : Comp.beforeCopy;
33
32
  if (enableClipboard === false || !isShowTools) return null;
34
33
  var click = event => {
@@ -87,9 +86,8 @@ export var Copied = props => {
87
86
  fill: copied ? 'var(--w-rjv-copied-success-color, #28a745)' : 'var(--w-rjv-copied-color, currentColor)',
88
87
  onClick: click
89
88
  };
90
- var {
91
- render
92
- } = Comp,
89
+ var as = Comp.as,
90
+ render = Comp.render,
93
91
  reset = _objectWithoutPropertiesLoose(Comp, _excluded2);
94
92
  var elmProps = _extends({}, reset, other, svgProps, {
95
93
  style: _extends({}, reset.style, other.style, svgProps.style)
@@ -4,17 +4,17 @@ interface KeyValuesProps<T extends object> extends SectionElementResult<T> {
4
4
  level: number;
5
5
  }
6
6
  export declare const KeyValues: {
7
- <T extends object>(props: KeyValuesProps<T>): import("react/jsx-runtime").JSX.Element | null;
7
+ <T extends object>(props: KeyValuesProps<T>): import("react").JSX.Element | null;
8
8
  displayName: string;
9
9
  };
10
10
  interface KayNameProps<T extends object> extends Omit<KeyValuesProps<T>, 'level'> {
11
11
  }
12
12
  export declare const KayName: {
13
- <T extends object>(props: KayNameProps<T>): import("react/jsx-runtime").JSX.Element;
13
+ <T extends object>(props: KayNameProps<T>): import("react").JSX.Element;
14
14
  displayName: string;
15
15
  };
16
16
  export declare const KeyValuesItem: {
17
- <T extends object>(props: KeyValuesProps<T>): import("react/jsx-runtime").JSX.Element;
17
+ <T extends object>(props: KeyValuesProps<T>): import("react").JSX.Element;
18
18
  displayName: string;
19
19
  };
20
20
  export {};
@@ -14,21 +14,20 @@ import { useIdCompat } from "../comps/useIdCompat.js";
14
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
15
  export var KeyValues = props => {
16
16
  var _expands$expandKey;
17
- var {
18
- keyName,
19
- value,
20
- expandKey = '',
21
- level,
22
- keys = [],
23
- parentValue
24
- } = props;
17
+ var keyName = props.keyName,
18
+ value = props.value,
19
+ _props$expandKey = props.expandKey,
20
+ expandKey = _props$expandKey === void 0 ? '' : _props$expandKey,
21
+ level = props.level,
22
+ _props$keys = props.keys,
23
+ keys = _props$keys === void 0 ? [] : _props$keys,
24
+ parentValue = props.parentValue;
25
25
  var expands = useExpandsStore();
26
- var {
27
- objectSortKeys,
28
- indentWidth,
29
- collapsed,
30
- shouldExpandNodeInitially
31
- } = useStore();
26
+ var _useStore = useStore(),
27
+ objectSortKeys = _useStore.objectSortKeys,
28
+ indentWidth = _useStore.indentWidth,
29
+ collapsed = _useStore.collapsed,
30
+ shouldExpandNodeInitially = _useStore.shouldExpandNodeInitially;
32
31
  var defaultExpanded = typeof collapsed === 'boolean' ? collapsed : typeof collapsed === 'number' ? level > collapsed : false;
33
32
  var isExpanded = (_expands$expandKey = expands[expandKey]) != null ? _expands$expandKey : shouldExpandNodeInitially ? false : defaultExpanded;
34
33
  var shouldExpand = shouldExpandNodeInitially && shouldExpandNodeInitially(!isExpanded, {
@@ -55,12 +54,14 @@ export var KeyValues = props => {
55
54
  var entries = isMyArray ? Object.entries(value).map(m => [Number(m[0]), m[1]]) : Object.entries(value);
56
55
  if (objectSortKeys) {
57
56
  entries = objectSortKeys === true ? entries.sort((_ref, _ref2) => {
58
- var [a] = _ref;
59
- var [b] = _ref2;
57
+ var a = _ref[0];
58
+ var b = _ref2[0];
60
59
  return typeof a === 'string' && typeof b === 'string' ? a.localeCompare(b) : 0;
61
60
  }) : entries.sort((_ref3, _ref4) => {
62
- var [a, valA] = _ref3;
63
- var [b, valB] = _ref4;
61
+ var a = _ref3[0],
62
+ valA = _ref3[1];
63
+ var b = _ref4[0],
64
+ valB = _ref4[1];
64
65
  return typeof a === 'string' && typeof b === 'string' ? objectSortKeys(a, b, valA, valB) : 0;
65
66
  });
66
67
  }
@@ -73,7 +74,8 @@ export var KeyValues = props => {
73
74
  className: "w-rjv-wrap",
74
75
  style: style,
75
76
  children: entries.map((_ref5, idx) => {
76
- var [key, val] = _ref5;
77
+ var key = _ref5[0],
78
+ val = _ref5[1];
77
79
  return /*#__PURE__*/_jsx(KeyValuesItem, {
78
80
  parentValue: value,
79
81
  keyName: key,
@@ -86,15 +88,12 @@ export var KeyValues = props => {
86
88
  };
87
89
  KeyValues.displayName = 'JVR.KeyValues';
88
90
  export var KayName = props => {
89
- var {
90
- keyName,
91
- parentValue,
92
- keys,
93
- value
94
- } = props;
95
- var {
96
- highlightUpdates
97
- } = useStore();
91
+ var keyName = props.keyName,
92
+ parentValue = props.parentValue,
93
+ keys = props.keys,
94
+ value = props.value;
95
+ var _useStore2 = useStore(),
96
+ highlightUpdates = _useStore2.highlightUpdates;
98
97
  var isNumber = typeof keyName === 'number';
99
98
  var highlightContainer = useRef(null);
100
99
  useHighlight({
@@ -125,13 +124,13 @@ export var KayName = props => {
125
124
  };
126
125
  KayName.displayName = 'JVR.KayName';
127
126
  export var KeyValuesItem = props => {
128
- var {
129
- keyName,
130
- value,
131
- parentValue,
132
- level = 0,
133
- keys = []
134
- } = props;
127
+ var keyName = props.keyName,
128
+ value = props.value,
129
+ parentValue = props.parentValue,
130
+ _props$level = props.level,
131
+ level = _props$level === void 0 ? 0 : _props$level,
132
+ _props$keys2 = props.keys,
133
+ keys = _props$keys2 === void 0 ? [] : _props$keys2;
135
134
  var dispatch = useShowToolsDispatch();
136
135
  var subkeyid = useIdCompat();
137
136
  var isMyArray = Array.isArray(value);
@@ -4,7 +4,7 @@ interface NestedCloseProps<T extends object> extends SectionElementResult<T> {
4
4
  level: number;
5
5
  }
6
6
  export declare const NestedClose: {
7
- <T extends object>(props: NestedCloseProps<T>): import("react/jsx-runtime").JSX.Element | null;
7
+ <T extends object>(props: NestedCloseProps<T>): import("react").JSX.Element | null;
8
8
  displayName: string;
9
9
  };
10
10
  export {};