@uiw/react-json-view 1.12.0 → 2.0.0-alpha.0

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 (261) hide show
  1. package/README.md +249 -265
  2. package/cjs/Container.d.ts +10 -0
  3. package/cjs/Container.js +67 -0
  4. package/cjs/arrow/TriangleArrow.js +3 -1
  5. package/cjs/arrow/TriangleSolidArrow.js +7 -3
  6. package/cjs/comps/Copied.d.ts +16 -0
  7. package/cjs/{copied.js → comps/Copied.js} +44 -32
  8. package/cjs/comps/CountInfo.d.ts +19 -0
  9. package/cjs/comps/CountInfo.js +72 -0
  10. package/cjs/comps/Ellipsis.d.ts +10 -0
  11. package/cjs/comps/Ellipsis.js +35 -0
  12. package/cjs/comps/Key.d.ts +7 -0
  13. package/cjs/comps/Key.js +39 -0
  14. package/cjs/comps/KeyValues.d.ts +22 -0
  15. package/cjs/comps/KeyValues.js +156 -0
  16. package/cjs/comps/NestedClose.d.ts +10 -0
  17. package/cjs/comps/NestedClose.js +38 -0
  18. package/cjs/comps/NestedOpen.d.ts +11 -0
  19. package/cjs/comps/NestedOpen.js +95 -0
  20. package/cjs/comps/ReRender/Symbols.d.ts +44 -0
  21. package/cjs/comps/ReRender/Symbols.js +144 -0
  22. package/cjs/comps/ReRender/Types.d.ts +36 -0
  23. package/cjs/comps/ReRender/Types.js +590 -0
  24. package/cjs/comps/Value.d.ts +11 -0
  25. package/cjs/comps/Value.js +78 -0
  26. package/cjs/index.d.ts +72 -52
  27. package/cjs/index.js +147 -27
  28. package/cjs/section/Copied.d.ts +6 -0
  29. package/cjs/section/Copied.js +17 -0
  30. package/cjs/section/CountInfo.d.ts +6 -0
  31. package/cjs/section/CountInfo.js +17 -0
  32. package/cjs/section/CountInfoExtra.d.ts +6 -0
  33. package/cjs/section/CountInfoExtra.js +17 -0
  34. package/cjs/section/Ellipsis.d.ts +6 -0
  35. package/cjs/section/Ellipsis.js +17 -0
  36. package/cjs/section/KeyName.d.ts +6 -0
  37. package/cjs/section/KeyName.js +17 -0
  38. package/cjs/store/Expands.d.ts +16 -0
  39. package/cjs/store/Expands.js +44 -0
  40. package/cjs/store/Section.d.ts +33 -0
  41. package/cjs/store/Section.js +86 -0
  42. package/cjs/store/ShowTools.d.ts +14 -0
  43. package/cjs/store/ShowTools.js +44 -0
  44. package/cjs/store/Symbols.d.ts +37 -0
  45. package/cjs/store/Symbols.js +112 -0
  46. package/cjs/store/Types.d.ts +52 -0
  47. package/cjs/store/Types.js +162 -0
  48. package/cjs/store.d.ts +29 -5
  49. package/cjs/store.js +96 -46
  50. package/cjs/symbol/Arrow.d.ts +6 -0
  51. package/cjs/symbol/Arrow.js +17 -0
  52. package/cjs/symbol/BraceLeft.d.ts +6 -0
  53. package/cjs/symbol/BraceLeft.js +17 -0
  54. package/cjs/symbol/BraceRight.d.ts +6 -0
  55. package/cjs/symbol/BraceRight.js +17 -0
  56. package/cjs/symbol/BracketsLeft.d.ts +6 -0
  57. package/cjs/symbol/BracketsLeft.js +17 -0
  58. package/cjs/symbol/BracketsRight.d.ts +6 -0
  59. package/cjs/symbol/BracketsRight.js +17 -0
  60. package/cjs/symbol/Colon.d.ts +6 -0
  61. package/cjs/symbol/Colon.js +17 -0
  62. package/cjs/symbol/Quote.d.ts +6 -0
  63. package/cjs/symbol/Quote.js +17 -0
  64. package/cjs/symbol/ValueQuote.d.ts +6 -0
  65. package/cjs/symbol/ValueQuote.js +17 -0
  66. package/cjs/theme/basic.js +3 -0
  67. package/cjs/theme/dark.js +3 -0
  68. package/cjs/theme/github.dark.js +3 -0
  69. package/cjs/theme/github.light.js +3 -0
  70. package/cjs/theme/gruvbox.js +3 -0
  71. package/cjs/theme/light.js +3 -0
  72. package/cjs/theme/monokai.js +3 -0
  73. package/cjs/theme/nord.js +3 -0
  74. package/cjs/theme/vscode.js +3 -0
  75. package/cjs/type.d.ts +50 -0
  76. package/cjs/type.js +57 -0
  77. package/cjs/types/Bigint.d.ts +5 -0
  78. package/cjs/types/Bigint.js +17 -0
  79. package/cjs/types/Date.d.ts +5 -0
  80. package/cjs/types/Date.js +17 -0
  81. package/cjs/types/False.d.ts +5 -0
  82. package/cjs/types/False.js +17 -0
  83. package/cjs/types/Float.d.ts +5 -0
  84. package/cjs/types/Float.js +17 -0
  85. package/cjs/types/Int.d.ts +5 -0
  86. package/cjs/types/Int.js +17 -0
  87. package/cjs/types/Map.d.ts +5 -0
  88. package/cjs/types/Map.js +17 -0
  89. package/cjs/types/Nan.d.ts +5 -0
  90. package/cjs/types/Nan.js +17 -0
  91. package/cjs/types/Null.d.ts +5 -0
  92. package/cjs/types/Null.js +17 -0
  93. package/cjs/types/Set.d.ts +5 -0
  94. package/cjs/types/Set.js +17 -0
  95. package/cjs/types/String.d.ts +5 -0
  96. package/cjs/types/String.js +17 -0
  97. package/cjs/types/True.d.ts +5 -0
  98. package/cjs/types/True.js +17 -0
  99. package/cjs/types/Undefined.d.ts +5 -0
  100. package/cjs/types/Undefined.js +17 -0
  101. package/cjs/types/Url.d.ts +5 -0
  102. package/cjs/types/Url.js +17 -0
  103. package/cjs/utils/useHighlight.d.ts +9 -0
  104. package/cjs/utils/useHighlight.js +62 -0
  105. package/cjs/utils/useRender.d.ts +6 -0
  106. package/cjs/utils/useRender.js +51 -0
  107. package/esm/Container.d.ts +10 -0
  108. package/esm/Container.js +53 -0
  109. package/esm/arrow/TriangleArrow.js +3 -1
  110. package/esm/arrow/TriangleSolidArrow.js +7 -3
  111. package/esm/comps/Copied.d.ts +16 -0
  112. package/esm/{copied.js → comps/Copied.js} +44 -29
  113. package/esm/comps/CountInfo.d.ts +19 -0
  114. package/esm/comps/CountInfo.js +70 -0
  115. package/esm/comps/Ellipsis.d.ts +10 -0
  116. package/esm/comps/Ellipsis.js +31 -0
  117. package/esm/comps/Key.d.ts +7 -0
  118. package/esm/comps/Key.js +35 -0
  119. package/esm/comps/KeyValues.d.ts +22 -0
  120. package/esm/comps/KeyValues.js +142 -0
  121. package/esm/comps/NestedClose.d.ts +10 -0
  122. package/esm/comps/NestedClose.js +34 -0
  123. package/esm/comps/NestedOpen.d.ts +11 -0
  124. package/esm/comps/NestedOpen.js +91 -0
  125. package/esm/comps/ReRender/Symbols.d.ts +44 -0
  126. package/esm/comps/ReRender/Symbols.js +155 -0
  127. package/esm/comps/ReRender/Types.d.ts +36 -0
  128. package/esm/comps/ReRender/Types.js +621 -0
  129. package/esm/comps/Value.d.ts +11 -0
  130. package/esm/comps/Value.js +69 -0
  131. package/esm/index.d.ts +72 -52
  132. package/esm/index.js +98 -18
  133. package/esm/section/Copied.d.ts +6 -0
  134. package/esm/section/Copied.js +10 -0
  135. package/esm/section/CountInfo.d.ts +6 -0
  136. package/esm/section/CountInfo.js +10 -0
  137. package/esm/section/CountInfoExtra.d.ts +6 -0
  138. package/esm/section/CountInfoExtra.js +10 -0
  139. package/esm/section/Ellipsis.d.ts +6 -0
  140. package/esm/section/Ellipsis.js +10 -0
  141. package/esm/section/KeyName.d.ts +6 -0
  142. package/esm/section/KeyName.js +10 -0
  143. package/esm/store/Expands.d.ts +16 -0
  144. package/esm/store/Expands.js +32 -0
  145. package/esm/store/Section.d.ts +33 -0
  146. package/esm/store/Section.js +73 -0
  147. package/esm/store/ShowTools.d.ts +14 -0
  148. package/esm/store/ShowTools.js +32 -0
  149. package/esm/store/Symbols.d.ts +37 -0
  150. package/esm/store/Symbols.js +100 -0
  151. package/esm/store/Types.d.ts +52 -0
  152. package/esm/store/Types.js +150 -0
  153. package/esm/store.d.ts +29 -5
  154. package/esm/store.js +66 -32
  155. package/esm/symbol/Arrow.d.ts +6 -0
  156. package/esm/symbol/Arrow.js +10 -0
  157. package/esm/symbol/BraceLeft.d.ts +6 -0
  158. package/esm/symbol/BraceLeft.js +10 -0
  159. package/esm/symbol/BraceRight.d.ts +6 -0
  160. package/esm/symbol/BraceRight.js +10 -0
  161. package/esm/symbol/BracketsLeft.d.ts +6 -0
  162. package/esm/symbol/BracketsLeft.js +10 -0
  163. package/esm/symbol/BracketsRight.d.ts +6 -0
  164. package/esm/symbol/BracketsRight.js +10 -0
  165. package/esm/symbol/Colon.d.ts +6 -0
  166. package/esm/symbol/Colon.js +10 -0
  167. package/esm/symbol/Quote.d.ts +6 -0
  168. package/esm/symbol/Quote.js +10 -0
  169. package/esm/symbol/ValueQuote.d.ts +6 -0
  170. package/esm/symbol/ValueQuote.js +10 -0
  171. package/esm/theme/basic.js +3 -0
  172. package/esm/theme/dark.js +3 -0
  173. package/esm/theme/github.dark.js +3 -0
  174. package/esm/theme/github.light.js +3 -0
  175. package/esm/theme/gruvbox.js +3 -0
  176. package/esm/theme/light.js +3 -0
  177. package/esm/theme/monokai.js +3 -0
  178. package/esm/theme/nord.js +3 -0
  179. package/esm/theme/vscode.js +3 -0
  180. package/esm/type.d.ts +50 -0
  181. package/esm/type.js +50 -0
  182. package/esm/types/Bigint.d.ts +5 -0
  183. package/esm/types/Bigint.js +10 -0
  184. package/esm/types/Date.d.ts +5 -0
  185. package/esm/types/Date.js +10 -0
  186. package/esm/types/False.d.ts +5 -0
  187. package/esm/types/False.js +10 -0
  188. package/esm/types/Float.d.ts +5 -0
  189. package/esm/types/Float.js +10 -0
  190. package/esm/types/Int.d.ts +5 -0
  191. package/esm/types/Int.js +10 -0
  192. package/esm/types/Map.d.ts +5 -0
  193. package/esm/types/Map.js +10 -0
  194. package/esm/types/Nan.d.ts +5 -0
  195. package/esm/types/Nan.js +10 -0
  196. package/esm/types/Null.d.ts +5 -0
  197. package/esm/types/Null.js +10 -0
  198. package/esm/types/Set.d.ts +5 -0
  199. package/esm/types/Set.js +10 -0
  200. package/esm/types/String.d.ts +5 -0
  201. package/esm/types/String.js +10 -0
  202. package/esm/types/True.d.ts +5 -0
  203. package/esm/types/True.js +10 -0
  204. package/esm/types/Undefined.d.ts +5 -0
  205. package/esm/types/Undefined.js +10 -0
  206. package/esm/types/Url.d.ts +5 -0
  207. package/esm/types/Url.js +10 -0
  208. package/esm/utils/useHighlight.d.ts +9 -0
  209. package/esm/{semicolon.js → utils/useHighlight.js} +1 -52
  210. package/esm/utils/useRender.d.ts +6 -0
  211. package/esm/utils/useRender.js +41 -0
  212. package/package.json +1 -1
  213. package/cjs/comps/ellipsis.d.ts +0 -7
  214. package/cjs/comps/ellipsis.js +0 -37
  215. package/cjs/comps/meta.d.ts +0 -12
  216. package/cjs/comps/meta.js +0 -46
  217. package/cjs/copied.d.ts +0 -11
  218. package/cjs/editor/countInfoExtra.d.ts +0 -28
  219. package/cjs/editor/countInfoExtra.js +0 -101
  220. package/cjs/editor/icon/add.d.ts +0 -4
  221. package/cjs/editor/icon/add.js +0 -30
  222. package/cjs/editor/icon/delete.d.ts +0 -4
  223. package/cjs/editor/icon/delete.js +0 -30
  224. package/cjs/editor/icon/edit.d.ts +0 -4
  225. package/cjs/editor/icon/edit.js +0 -30
  226. package/cjs/editor/index.d.ts +0 -31
  227. package/cjs/editor/index.js +0 -60
  228. package/cjs/editor/objectKey.d.ts +0 -11
  229. package/cjs/editor/objectKey.js +0 -169
  230. package/cjs/editor/value.d.ts +0 -22
  231. package/cjs/editor/value.js +0 -240
  232. package/cjs/node.d.ts +0 -15
  233. package/cjs/node.js +0 -343
  234. package/cjs/semicolon.d.ts +0 -22
  235. package/cjs/semicolon.js +0 -115
  236. package/cjs/value.d.ts +0 -93
  237. package/cjs/value.js +0 -356
  238. package/esm/comps/ellipsis.d.ts +0 -7
  239. package/esm/comps/ellipsis.js +0 -31
  240. package/esm/comps/meta.d.ts +0 -12
  241. package/esm/comps/meta.js +0 -39
  242. package/esm/copied.d.ts +0 -11
  243. package/esm/editor/countInfoExtra.d.ts +0 -28
  244. package/esm/editor/countInfoExtra.js +0 -68
  245. package/esm/editor/icon/add.d.ts +0 -4
  246. package/esm/editor/icon/add.js +0 -24
  247. package/esm/editor/icon/delete.d.ts +0 -4
  248. package/esm/editor/icon/delete.js +0 -24
  249. package/esm/editor/icon/edit.d.ts +0 -4
  250. package/esm/editor/icon/edit.js +0 -24
  251. package/esm/editor/index.d.ts +0 -31
  252. package/esm/editor/index.js +0 -47
  253. package/esm/editor/objectKey.d.ts +0 -11
  254. package/esm/editor/objectKey.js +0 -135
  255. package/esm/editor/value.d.ts +0 -22
  256. package/esm/editor/value.js +0 -192
  257. package/esm/node.d.ts +0 -15
  258. package/esm/node.js +0 -299
  259. package/esm/semicolon.d.ts +0 -22
  260. package/esm/value.d.ts +0 -93
  261. package/esm/value.js +0 -331
@@ -0,0 +1,5 @@
1
+ import { type TagType, type TypesElement } from '../store/Types';
2
+ export declare const Date: {
3
+ (props: TypesElement<TagType>): null;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Date = void 0;
7
+ var _Types = require("../store/Types");
8
+ var _useRender = require("../utils/useRender");
9
+ var Date = function Date(props) {
10
+ var _useTypesStore = (0, _Types.useTypesStore)(),
11
+ _useTypesStore$Date = _useTypesStore.Date,
12
+ Comp = _useTypesStore$Date === void 0 ? {} : _useTypesStore$Date;
13
+ (0, _useRender.useTypesRender)(Comp, props, 'Date');
14
+ return null;
15
+ };
16
+ exports.Date = Date;
17
+ Date.displayName = 'JVR.Date';
@@ -0,0 +1,5 @@
1
+ import { type TagType, type TypesElement } from '../store/Types';
2
+ export declare const False: {
3
+ (props: TypesElement<TagType>): null;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.False = void 0;
7
+ var _Types = require("../store/Types");
8
+ var _useRender = require("../utils/useRender");
9
+ var False = function False(props) {
10
+ var _useTypesStore = (0, _Types.useTypesStore)(),
11
+ _useTypesStore$False = _useTypesStore.False,
12
+ Comp = _useTypesStore$False === void 0 ? {} : _useTypesStore$False;
13
+ (0, _useRender.useTypesRender)(Comp, props, 'False');
14
+ return null;
15
+ };
16
+ exports.False = False;
17
+ False.displayName = 'JVR.False';
@@ -0,0 +1,5 @@
1
+ import { type TagType, type TypesElement } from '../store/Types';
2
+ export declare const Float: {
3
+ (props: TypesElement<TagType>): null;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Float = void 0;
7
+ var _Types = require("../store/Types");
8
+ var _useRender = require("../utils/useRender");
9
+ var Float = function Float(props) {
10
+ var _useTypesStore = (0, _Types.useTypesStore)(),
11
+ _useTypesStore$Float = _useTypesStore.Float,
12
+ Comp = _useTypesStore$Float === void 0 ? {} : _useTypesStore$Float;
13
+ (0, _useRender.useTypesRender)(Comp, props, 'Float');
14
+ return null;
15
+ };
16
+ exports.Float = Float;
17
+ Float.displayName = 'JVR.Float';
@@ -0,0 +1,5 @@
1
+ import { type TagType, type TypesElement } from '../store/Types';
2
+ export declare const Int: {
3
+ (props: TypesElement<TagType>): null;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Int = void 0;
7
+ var _Types = require("../store/Types");
8
+ var _useRender = require("../utils/useRender");
9
+ var Int = function Int(props) {
10
+ var _useTypesStore = (0, _Types.useTypesStore)(),
11
+ _useTypesStore$Int = _useTypesStore.Int,
12
+ Comp = _useTypesStore$Int === void 0 ? {} : _useTypesStore$Int;
13
+ (0, _useRender.useTypesRender)(Comp, props, 'Int');
14
+ return null;
15
+ };
16
+ exports.Int = Int;
17
+ Int.displayName = 'JVR.Int';
@@ -0,0 +1,5 @@
1
+ import { type TagType, type TypesElement } from '../store/Types';
2
+ export declare const Map: {
3
+ (props: TypesElement<TagType>): null;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Map = void 0;
7
+ var _Types = require("../store/Types");
8
+ var _useRender = require("../utils/useRender");
9
+ var Map = function Map(props) {
10
+ var _useTypesStore = (0, _Types.useTypesStore)(),
11
+ _useTypesStore$Map = _useTypesStore.Map,
12
+ Comp = _useTypesStore$Map === void 0 ? {} : _useTypesStore$Map;
13
+ (0, _useRender.useTypesRender)(Comp, props, 'Map');
14
+ return null;
15
+ };
16
+ exports.Map = Map;
17
+ Map.displayName = 'JVR.Map';
@@ -0,0 +1,5 @@
1
+ import { type TagType, type TypesElement } from '../store/Types';
2
+ export declare const Nan: {
3
+ (props: TypesElement<TagType>): null;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Nan = void 0;
7
+ var _Types = require("../store/Types");
8
+ var _useRender = require("../utils/useRender");
9
+ var Nan = function Nan(props) {
10
+ var _useTypesStore = (0, _Types.useTypesStore)(),
11
+ _useTypesStore$Nan = _useTypesStore.Nan,
12
+ Comp = _useTypesStore$Nan === void 0 ? {} : _useTypesStore$Nan;
13
+ (0, _useRender.useTypesRender)(Comp, props, 'Nan');
14
+ return null;
15
+ };
16
+ exports.Nan = Nan;
17
+ Nan.displayName = 'JVR.Nan';
@@ -0,0 +1,5 @@
1
+ import { type TagType, type TypesElement } from '../store/Types';
2
+ export declare const Null: {
3
+ (props: TypesElement<TagType>): null;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Null = void 0;
7
+ var _Types = require("../store/Types");
8
+ var _useRender = require("../utils/useRender");
9
+ var Null = function Null(props) {
10
+ var _useTypesStore = (0, _Types.useTypesStore)(),
11
+ _useTypesStore$Null = _useTypesStore.Null,
12
+ Comp = _useTypesStore$Null === void 0 ? {} : _useTypesStore$Null;
13
+ (0, _useRender.useTypesRender)(Comp, props, 'Null');
14
+ return null;
15
+ };
16
+ exports.Null = Null;
17
+ Null.displayName = 'JVR.Null';
@@ -0,0 +1,5 @@
1
+ import { type TagType, type TypesElement } from '../store/Types';
2
+ export declare const Set: {
3
+ (props: TypesElement<TagType>): null;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Set = void 0;
7
+ var _Types = require("../store/Types");
8
+ var _useRender = require("../utils/useRender");
9
+ var Set = function Set(props) {
10
+ var _useTypesStore = (0, _Types.useTypesStore)(),
11
+ _useTypesStore$Set = _useTypesStore.Set,
12
+ Comp = _useTypesStore$Set === void 0 ? {} : _useTypesStore$Set;
13
+ (0, _useRender.useTypesRender)(Comp, props, 'Set');
14
+ return null;
15
+ };
16
+ exports.Set = Set;
17
+ Set.displayName = 'JVR.Set';
@@ -0,0 +1,5 @@
1
+ import { type TagType, type TypesElement } from '../store/Types';
2
+ export declare const StringText: {
3
+ (props: TypesElement<TagType>): null;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StringText = void 0;
7
+ var _Types = require("../store/Types");
8
+ var _useRender = require("../utils/useRender");
9
+ var StringText = function StringText(props) {
10
+ var _useTypesStore = (0, _Types.useTypesStore)(),
11
+ _useTypesStore$Str = _useTypesStore.Str,
12
+ Comp = _useTypesStore$Str === void 0 ? {} : _useTypesStore$Str;
13
+ (0, _useRender.useTypesRender)(Comp, props, 'Str');
14
+ return null;
15
+ };
16
+ exports.StringText = StringText;
17
+ StringText.displayName = 'JVR.StringText';
@@ -0,0 +1,5 @@
1
+ import { type TagType, type TypesElement } from '../store/Types';
2
+ export declare const True: {
3
+ (props: TypesElement<TagType>): null;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.True = void 0;
7
+ var _Types = require("../store/Types");
8
+ var _useRender = require("../utils/useRender");
9
+ var True = function True(props) {
10
+ var _useTypesStore = (0, _Types.useTypesStore)(),
11
+ _useTypesStore$True = _useTypesStore.True,
12
+ Comp = _useTypesStore$True === void 0 ? {} : _useTypesStore$True;
13
+ (0, _useRender.useTypesRender)(Comp, props, 'True');
14
+ return null;
15
+ };
16
+ exports.True = True;
17
+ True.displayName = 'JVR.True';
@@ -0,0 +1,5 @@
1
+ import { type TagType, type TypesElement } from '../store/Types';
2
+ export declare const Undefined: {
3
+ (props: TypesElement<TagType>): null;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Undefined = void 0;
7
+ var _Types = require("../store/Types");
8
+ var _useRender = require("../utils/useRender");
9
+ var Undefined = function Undefined(props) {
10
+ var _useTypesStore = (0, _Types.useTypesStore)(),
11
+ _useTypesStore$Undefi = _useTypesStore.Undefined,
12
+ Comp = _useTypesStore$Undefi === void 0 ? {} : _useTypesStore$Undefi;
13
+ (0, _useRender.useTypesRender)(Comp, props, 'Undefined');
14
+ return null;
15
+ };
16
+ exports.Undefined = Undefined;
17
+ Undefined.displayName = 'JVR.Undefined';
@@ -0,0 +1,5 @@
1
+ import { type TagType, type TypesElement } from '../store/Types';
2
+ export declare const Url: {
3
+ (props: TypesElement<TagType>): null;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Url = void 0;
7
+ var _Types = require("../store/Types");
8
+ var _useRender = require("../utils/useRender");
9
+ var Url = function Url(props) {
10
+ var _useTypesStore = (0, _Types.useTypesStore)(),
11
+ _useTypesStore$Url = _useTypesStore.Url,
12
+ Comp = _useTypesStore$Url === void 0 ? {} : _useTypesStore$Url;
13
+ (0, _useRender.useTypesRender)(Comp, props, 'Url');
14
+ return null;
15
+ };
16
+ exports.Url = Url;
17
+ Url.displayName = 'JVR.Url';
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export declare function usePrevious<T>(value: T): T | undefined;
3
+ interface UseHighlight {
4
+ value: any;
5
+ highlightUpdates?: boolean;
6
+ highlightContainer: React.MutableRefObject<HTMLSpanElement | null>;
7
+ }
8
+ export declare function useHighlight({ value, highlightUpdates, highlightContainer }: UseHighlight): void;
9
+ export {};
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useHighlight = useHighlight;
8
+ exports.usePrevious = usePrevious;
9
+ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
10
+ var _react = require("react");
11
+ function usePrevious(value) {
12
+ var ref = (0, _react.useRef)();
13
+ (0, _react.useEffect)(function () {
14
+ ref.current = value;
15
+ });
16
+ return ref.current;
17
+ }
18
+ function useHighlight(_ref) {
19
+ var value = _ref.value,
20
+ highlightUpdates = _ref.highlightUpdates,
21
+ highlightContainer = _ref.highlightContainer;
22
+ var prevValue = usePrevious(value);
23
+ var isHighlight = (0, _react.useMemo)(function () {
24
+ if (!highlightUpdates || prevValue === undefined) return false;
25
+ // highlight if value type changed
26
+ if ((0, _typeof2["default"])(value) !== (0, _typeof2["default"])(prevValue)) {
27
+ return true;
28
+ }
29
+ if (typeof value === 'number') {
30
+ // notice: NaN !== NaN
31
+ if (isNaN(value) && isNaN(prevValue)) return false;
32
+ return value !== prevValue;
33
+ }
34
+ // highlight if isArray changed
35
+ if (Array.isArray(value) !== Array.isArray(prevValue)) {
36
+ return true;
37
+ }
38
+ // not highlight object/function
39
+ // deep compare they will be slow
40
+ if ((0, _typeof2["default"])(value) === 'object' || typeof value === 'function') {
41
+ return false;
42
+ }
43
+
44
+ // highlight if not equal
45
+ if (value !== prevValue) {
46
+ return true;
47
+ }
48
+ return false;
49
+ }, [highlightUpdates, value]);
50
+ (0, _react.useEffect)(function () {
51
+ if (highlightContainer && highlightContainer.current && isHighlight && 'animate' in highlightContainer.current) {
52
+ highlightContainer.current.animate([{
53
+ backgroundColor: 'var(--w-rjv-update-color, #ebcb8b)'
54
+ }, {
55
+ backgroundColor: ''
56
+ }], {
57
+ duration: 1000,
58
+ easing: 'ease-in'
59
+ });
60
+ }
61
+ }, [isHighlight, value, highlightContainer]);
62
+ }
@@ -0,0 +1,6 @@
1
+ import { type SymbolsElement } from '../store/Symbols';
2
+ import { type TagType, type TypesElement } from '../store/Types';
3
+ import { type SectionElement } from '../store/Section';
4
+ export declare function useSymbolsRender(currentProps: SymbolsElement<TagType>, props: SymbolsElement<TagType>, key: string): void;
5
+ export declare function useTypesRender<K extends TagType>(currentProps: TypesElement<TagType>, props: TypesElement<K>, key: string): void;
6
+ export declare function useSectionRender<K extends TagType>(currentProps: SectionElement<TagType>, props: SectionElement<K>, key: string): void;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useSectionRender = useSectionRender;
8
+ exports.useSymbolsRender = useSymbolsRender;
9
+ exports.useTypesRender = useTypesRender;
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
+ var _react = require("react");
13
+ var _Symbols = require("../store/Symbols");
14
+ var _Types = require("../store/Types");
15
+ var _Section = require("../store/Section");
16
+ function useSymbolsRender(currentProps, props, key) {
17
+ var dispatch = (0, _Symbols.useSymbolsDispatch)();
18
+ var cls = [currentProps.className, props.className].filter(Boolean).join(' ');
19
+ var reset = (0, _objectSpread2["default"])((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, currentProps), props), {}, {
20
+ className: cls,
21
+ style: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, currentProps.style), props.style),
22
+ children: props.children || currentProps.children
23
+ });
24
+ (0, _react.useEffect)(function () {
25
+ return dispatch((0, _defineProperty2["default"])({}, key, reset));
26
+ }, [props]);
27
+ }
28
+ function useTypesRender(currentProps, props, key) {
29
+ var dispatch = (0, _Types.useTypesDispatch)();
30
+ var cls = [currentProps.className, props.className].filter(Boolean).join(' ');
31
+ var reset = (0, _objectSpread2["default"])((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, currentProps), props), {}, {
32
+ className: cls,
33
+ style: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, currentProps.style), props.style),
34
+ children: props.children || currentProps.children
35
+ });
36
+ (0, _react.useEffect)(function () {
37
+ return dispatch((0, _defineProperty2["default"])({}, key, reset));
38
+ }, [props]);
39
+ }
40
+ function useSectionRender(currentProps, props, key) {
41
+ var dispatch = (0, _Section.useSectionDispatch)();
42
+ var cls = [currentProps.className, props.className].filter(Boolean).join(' ');
43
+ var reset = (0, _objectSpread2["default"])((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, currentProps), props), {}, {
44
+ className: cls,
45
+ style: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, currentProps.style), props.style),
46
+ children: props.children || currentProps.children
47
+ });
48
+ (0, _react.useEffect)(function () {
49
+ return dispatch((0, _defineProperty2["default"])({}, key, reset));
50
+ }, [props]);
51
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export interface ContainerProps<T extends object> extends React.HTMLAttributes<HTMLDivElement> {
3
+ keyName?: string | number;
4
+ keyid?: string;
5
+ parentValue?: T;
6
+ level?: number;
7
+ value?: T;
8
+ initialValue?: T;
9
+ }
10
+ export declare const Container: React.ForwardRefExoticComponent<ContainerProps<object> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,53 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
+ var _excluded = ["className", "children", "parentValue", "keyid", "level", "value", "initialValue", "keyName"];
4
+ import React, { forwardRef, useId, useImperativeHandle, useRef } from 'react';
5
+ import { NestedClose } from './comps/NestedClose';
6
+ import { NestedOpen } from './comps/NestedOpen';
7
+ import { KeyValues } from './comps/KeyValues';
8
+ import { useShowToolsDispatch } from './store/ShowTools';
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { jsxs as _jsxs } from "react/jsx-runtime";
11
+ export var Container = /*#__PURE__*/forwardRef((props, ref) => {
12
+ var {
13
+ className = '',
14
+ level = 1,
15
+ value,
16
+ initialValue,
17
+ keyName
18
+ } = props,
19
+ elmProps = _objectWithoutPropertiesLoose(props, _excluded);
20
+ var $ref = useRef(null);
21
+ var dispatch = useShowToolsDispatch();
22
+ useImperativeHandle(ref, () => $ref.current, [$ref]);
23
+ var subkeyid = useId();
24
+ var defaultClassNames = "w-rjv-inner " + className;
25
+ var reset = {
26
+ onMouseEnter: () => dispatch({
27
+ [subkeyid]: true
28
+ }),
29
+ onMouseLeave: () => dispatch({
30
+ [subkeyid]: false
31
+ })
32
+ };
33
+ return /*#__PURE__*/_jsxs("div", _extends({
34
+ className: defaultClassNames
35
+ }, elmProps, reset, {
36
+ children: [/*#__PURE__*/_jsx(NestedOpen, {
37
+ expandKey: subkeyid,
38
+ value: value,
39
+ level: level,
40
+ keyName: keyName,
41
+ initialValue: initialValue
42
+ }), /*#__PURE__*/_jsx(KeyValues, {
43
+ expandKey: subkeyid,
44
+ value: value,
45
+ level: level
46
+ }), /*#__PURE__*/_jsx(NestedClose, {
47
+ expandKey: subkeyid,
48
+ value: value,
49
+ level: level
50
+ })]
51
+ }));
52
+ });
53
+ Container.displayName = 'JVR.Container';
@@ -11,7 +11,9 @@ export function TriangleArrow(props) {
11
11
  var defaultStyle = _extends({
12
12
  cursor: 'pointer',
13
13
  height: '1em',
14
- width: '1em'
14
+ width: '1em',
15
+ userSelect: 'none',
16
+ display: 'flex'
15
17
  }, style);
16
18
  return /*#__PURE__*/_jsx("svg", _extends({
17
19
  viewBox: "0 0 24 24",
@@ -11,15 +11,19 @@ export function TriangleSolidArrow(props) {
11
11
  var defaultStyle = _extends({
12
12
  cursor: 'pointer',
13
13
  height: '1em',
14
- width: '1em'
14
+ width: '1em',
15
+ userSelect: 'none',
16
+ display: 'flex'
15
17
  }, style);
16
18
  return /*#__PURE__*/_jsx("svg", _extends({
17
- viewBox: "0 0 15 15",
19
+ viewBox: "0 0 30 30",
18
20
  fill: "var(--w-rjv-arrow-color, currentColor)",
21
+ height: "1em",
22
+ width: "1em",
19
23
  style: defaultStyle
20
24
  }, reset, {
21
25
  children: /*#__PURE__*/_jsx("path", {
22
- d: "M0 5l6 6 6-6z"
26
+ d: "M14.1758636,22.5690012 C14.3620957,22.8394807 14.6694712,23.001033 14.9978636,23.001033 C15.326256,23.001033 15.6336315,22.8394807 15.8198636,22.5690012 L24.8198636,9.56900125 C25.0322035,9.2633716 25.0570548,8.86504616 24.8843497,8.5353938 C24.7116447,8.20574144 24.3700159,7.99941506 23.9978636,8 L5.9978636,8 C5.62665,8.00153457 5.28670307,8.20817107 5.11443241,8.53699428 C4.94216175,8.86581748 4.96580065,9.26293681 5.1758636,9.56900125 L14.1758636,22.5690012 Z"
23
27
  })
24
28
  }));
25
29
  }
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { type TagType } from '../store/Types';
3
+ export type CopiedOption<T extends object> = {
4
+ value?: T;
5
+ copied: boolean;
6
+ setCopied: React.Dispatch<React.SetStateAction<boolean>>;
7
+ };
8
+ export interface CopiedProps<T extends object> extends React.SVGProps<SVGSVGElement> {
9
+ value?: T;
10
+ keyName: string | number;
11
+ expandKey: string;
12
+ }
13
+ export declare const Copied: {
14
+ <T extends object, K extends TagType>(props: CopiedProps<T>): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
15
+ displayName: string;
16
+ };