@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
package/cjs/store.js CHANGED
@@ -1,55 +1,105 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"];
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
- exports.store = void 0;
8
- exports.useExpandsStatus = useExpandsStatus;
9
- var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
10
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
- var _objectSpread4 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
13
- var _react = require("react");
14
- var expands = {};
15
- var listeners = [];
16
- var store = {
17
- collapse: function collapse(id) {
18
- expands = (0, _objectSpread4["default"])((0, _objectSpread4["default"])({}, expands), {}, (0, _defineProperty2["default"])({}, id, false));
19
- emitChange();
20
- },
21
- expand: function expand(id) {
22
- expands = (0, _objectSpread4["default"])((0, _objectSpread4["default"])({}, expands), {}, (0, _defineProperty2["default"])({}, id, true));
23
- emitChange();
24
- }
8
+ exports.initialState = exports.Provider = exports.Context = void 0;
9
+ exports.reducer = reducer;
10
+ exports.useDispatch = useDispatch;
11
+ exports.useStore = exports.useDispatchStore = void 0;
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
14
+ var _react = _interopRequireWildcard(require("react"));
15
+ var _ShowTools = require("./store/ShowTools");
16
+ var _Expands = require("./store/Expands");
17
+ var _Types = require("./store/Types");
18
+ var _Symbols = require("./store/Symbols");
19
+ var _Section = require("./store/Section");
20
+ var _jsxRuntime = require("react/jsx-runtime");
21
+ var initialState = {
22
+ objectSortKeys: false,
23
+ indentWidth: 15
25
24
  };
26
- exports.store = store;
27
- function getSnapshot() {
28
- return expands;
25
+ exports.initialState = initialState;
26
+ var Context = /*#__PURE__*/(0, _react.createContext)(initialState);
27
+ exports.Context = Context;
28
+ Context.displayName = 'JVR.Context';
29
+ var DispatchContext = /*#__PURE__*/(0, _react.createContext)(function () {});
30
+ DispatchContext.displayName = 'JVR.DispatchContext';
31
+ function reducer(state, action) {
32
+ return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, state), action);
29
33
  }
30
- function subscribe(listener) {
31
- listeners = [].concat((0, _toConsumableArray2["default"])(listeners), [listener]);
32
- return function () {
33
- listeners = listeners.filter(function (l) {
34
- return l !== listener;
35
- });
36
- };
37
- }
38
- function emitChange() {
39
- var _iterator = (0, _createForOfIteratorHelper2["default"])(listeners),
40
- _step;
41
- try {
42
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
43
- var listener = _step.value;
44
- listener();
45
- }
46
- } catch (err) {
47
- _iterator.e(err);
48
- } finally {
49
- _iterator.f();
50
- }
34
+ var useStore = function useStore() {
35
+ return (0, _react.useContext)(Context);
36
+ };
37
+ exports.useStore = useStore;
38
+ var useDispatchStore = function useDispatchStore() {
39
+ return (0, _react.useContext)(DispatchContext);
40
+ };
41
+ exports.useDispatchStore = useDispatchStore;
42
+ var Provider = function Provider(_ref) {
43
+ var children = _ref.children,
44
+ init = _ref.initialState,
45
+ initialTypes = _ref.initialTypes;
46
+ var _useReducer = (0, _react.useReducer)(reducer, Object.assign({}, initialState, init)),
47
+ _useReducer2 = (0, _slicedToArray2["default"])(_useReducer, 2),
48
+ state = _useReducer2[0],
49
+ dispatch = _useReducer2[1];
50
+ var _useShowTools = (0, _ShowTools.useShowTools)(),
51
+ _useShowTools2 = (0, _slicedToArray2["default"])(_useShowTools, 2),
52
+ showTools = _useShowTools2[0],
53
+ showToolsDispatch = _useShowTools2[1];
54
+ var _useExpands = (0, _Expands.useExpands)(),
55
+ _useExpands2 = (0, _slicedToArray2["default"])(_useExpands, 2),
56
+ expands = _useExpands2[0],
57
+ expandsDispatch = _useExpands2[1];
58
+ var _useTypes = (0, _Types.useTypes)(),
59
+ _useTypes2 = (0, _slicedToArray2["default"])(_useTypes, 2),
60
+ types = _useTypes2[0],
61
+ typesDispatch = _useTypes2[1];
62
+ var _useSymbols = (0, _Symbols.useSymbols)(),
63
+ _useSymbols2 = (0, _slicedToArray2["default"])(_useSymbols, 2),
64
+ symbols = _useSymbols2[0],
65
+ symbolsDispatch = _useSymbols2[1];
66
+ var _useSection = (0, _Section.useSection)(),
67
+ _useSection2 = (0, _slicedToArray2["default"])(_useSection, 2),
68
+ section = _useSection2[0],
69
+ sectionDispatch = _useSection2[1];
70
+ (0, _react.useEffect)(function () {
71
+ return dispatch((0, _objectSpread2["default"])({}, init));
72
+ }, [init]);
73
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, {
74
+ value: state,
75
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DispatchContext.Provider, {
76
+ value: dispatch,
77
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ShowTools.ShowTools, {
78
+ initial: showTools,
79
+ dispatch: showToolsDispatch,
80
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Expands.Expands, {
81
+ initial: expands,
82
+ dispatch: expandsDispatch,
83
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Types.Types, {
84
+ initial: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, types), initialTypes),
85
+ dispatch: typesDispatch,
86
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Symbols.Symbols, {
87
+ initial: symbols,
88
+ dispatch: symbolsDispatch,
89
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Section.Section, {
90
+ initial: section,
91
+ dispatch: sectionDispatch,
92
+ children: children
93
+ })
94
+ })
95
+ })
96
+ })
97
+ })
98
+ })
99
+ });
100
+ };
101
+ exports.Provider = Provider;
102
+ function useDispatch() {
103
+ return (0, _react.useContext)(DispatchContext);
51
104
  }
52
- function useExpandsStatus() {
53
- var expands = (0, _react.useSyncExternalStore)(subscribe, getSnapshot);
54
- return expands;
55
- }
105
+ Provider.displayName = 'JVR.Provider';
@@ -0,0 +1,6 @@
1
+ import { type SymbolsElement } from '../store/Symbols';
2
+ import { type TagType } from '../store/Types';
3
+ export declare const Arrow: {
4
+ (props: SymbolsElement<TagType>): null;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Arrow = void 0;
7
+ var _Symbols = require("../store/Symbols");
8
+ var _useRender = require("../utils/useRender");
9
+ var Arrow = function Arrow(props) {
10
+ var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
11
+ _useSymbolsStore$Arro = _useSymbolsStore.Arrow,
12
+ Comp = _useSymbolsStore$Arro === void 0 ? {} : _useSymbolsStore$Arro;
13
+ (0, _useRender.useSymbolsRender)(Comp, props, 'Arrow');
14
+ return null;
15
+ };
16
+ exports.Arrow = Arrow;
17
+ Arrow.displayName = 'JVR.Arrow';
@@ -0,0 +1,6 @@
1
+ import { type SymbolsElement } from '../store/Symbols';
2
+ import { type TagType } from '../store/Types';
3
+ export declare const BraceLeft: {
4
+ (props: SymbolsElement<TagType>): null;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BraceLeft = void 0;
7
+ var _Symbols = require("../store/Symbols");
8
+ var _useRender = require("../utils/useRender");
9
+ var BraceLeft = function BraceLeft(props) {
10
+ var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
11
+ _useSymbolsStore$Brac = _useSymbolsStore.BraceLeft,
12
+ Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;
13
+ (0, _useRender.useSymbolsRender)(Comp, props, 'BraceLeft');
14
+ return null;
15
+ };
16
+ exports.BraceLeft = BraceLeft;
17
+ BraceLeft.displayName = 'JVR.BraceLeft';
@@ -0,0 +1,6 @@
1
+ import { type SymbolsElement } from '../store/Symbols';
2
+ import { type TagType } from '../store/Types';
3
+ export declare const BraceRight: {
4
+ (props: SymbolsElement<TagType>): null;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BraceRight = void 0;
7
+ var _Symbols = require("../store/Symbols");
8
+ var _useRender = require("../utils/useRender");
9
+ var BraceRight = function BraceRight(props) {
10
+ var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
11
+ _useSymbolsStore$Brac = _useSymbolsStore.BraceRight,
12
+ Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;
13
+ (0, _useRender.useSymbolsRender)(Comp, props, 'BraceRight');
14
+ return null;
15
+ };
16
+ exports.BraceRight = BraceRight;
17
+ BraceRight.displayName = 'JVR.BraceRight';
@@ -0,0 +1,6 @@
1
+ import { type SymbolsElement } from '../store/Symbols';
2
+ import { type TagType } from '../store/Types';
3
+ export declare const BracketsLeft: {
4
+ (props: SymbolsElement<TagType>): null;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BracketsLeft = void 0;
7
+ var _Symbols = require("../store/Symbols");
8
+ var _useRender = require("../utils/useRender");
9
+ var BracketsLeft = function BracketsLeft(props) {
10
+ var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
11
+ _useSymbolsStore$Brac = _useSymbolsStore.BracketsLeft,
12
+ Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;
13
+ (0, _useRender.useSymbolsRender)(Comp, props, 'BracketsLeft');
14
+ return null;
15
+ };
16
+ exports.BracketsLeft = BracketsLeft;
17
+ BracketsLeft.displayName = 'JVR.BracketsLeft';
@@ -0,0 +1,6 @@
1
+ import { type SymbolsElement } from '../store/Symbols';
2
+ import { type TagType } from '../store/Types';
3
+ export declare const BracketsRight: {
4
+ (props: SymbolsElement<TagType>): null;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BracketsRight = void 0;
7
+ var _Symbols = require("../store/Symbols");
8
+ var _useRender = require("../utils/useRender");
9
+ var BracketsRight = function BracketsRight(props) {
10
+ var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
11
+ _useSymbolsStore$Brac = _useSymbolsStore.BracketsRight,
12
+ Comp = _useSymbolsStore$Brac === void 0 ? {} : _useSymbolsStore$Brac;
13
+ (0, _useRender.useSymbolsRender)(Comp, props, 'BracketsRight');
14
+ return null;
15
+ };
16
+ exports.BracketsRight = BracketsRight;
17
+ BracketsRight.displayName = 'JVR.BracketsRight';
@@ -0,0 +1,6 @@
1
+ import { type SymbolsElement } from '../store/Symbols';
2
+ import { type TagType } from '../store/Types';
3
+ export declare const Colon: {
4
+ (props: SymbolsElement<TagType>): null;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Colon = void 0;
7
+ var _Symbols = require("../store/Symbols");
8
+ var _useRender = require("../utils/useRender");
9
+ var Colon = function Colon(props) {
10
+ var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
11
+ _useSymbolsStore$Colo = _useSymbolsStore.Colon,
12
+ Comp = _useSymbolsStore$Colo === void 0 ? {} : _useSymbolsStore$Colo;
13
+ (0, _useRender.useSymbolsRender)(Comp, props, 'Colon');
14
+ return null;
15
+ };
16
+ exports.Colon = Colon;
17
+ Colon.displayName = 'JVR.Colon';
@@ -0,0 +1,6 @@
1
+ import { type SymbolsElement } from '../store/Symbols';
2
+ import { type TagType } from '../store/Types';
3
+ export declare const Quote: {
4
+ (props: SymbolsElement<TagType>): null;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Quote = void 0;
7
+ var _Symbols = require("../store/Symbols");
8
+ var _useRender = require("../utils/useRender");
9
+ var Quote = function Quote(props) {
10
+ var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
11
+ _useSymbolsStore$Quot = _useSymbolsStore.Quote,
12
+ Comp = _useSymbolsStore$Quot === void 0 ? {} : _useSymbolsStore$Quot;
13
+ (0, _useRender.useSymbolsRender)(Comp, props, 'Quote');
14
+ return null;
15
+ };
16
+ exports.Quote = Quote;
17
+ Quote.displayName = 'JVR.Quote';
@@ -0,0 +1,6 @@
1
+ import { type SymbolsElement } from '../store/Symbols';
2
+ import { type TagType } from '../store/Types';
3
+ export declare const ValueQuote: {
4
+ (props: SymbolsElement<TagType>): null;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ValueQuote = void 0;
7
+ var _Symbols = require("../store/Symbols");
8
+ var _useRender = require("../utils/useRender");
9
+ var ValueQuote = function ValueQuote(props) {
10
+ var _useSymbolsStore = (0, _Symbols.useSymbolsStore)(),
11
+ _useSymbolsStore$Valu = _useSymbolsStore.ValueQuote,
12
+ Comp = _useSymbolsStore$Valu === void 0 ? {} : _useSymbolsStore$Valu;
13
+ (0, _useRender.useSymbolsRender)(Comp, props, 'ValueQuote');
14
+ return null;
15
+ };
16
+ exports.ValueQuote = ValueQuote;
17
+ ValueQuote.displayName = 'JVR.ValueQuote';
@@ -7,6 +7,7 @@ exports.basicTheme = void 0;
7
7
  var basicTheme = {
8
8
  '--w-rjv-font-family': 'monospace',
9
9
  '--w-rjv-color': '#b5bd68',
10
+ '--w-rjv-key-string': '#b5bd68',
10
11
  '--w-rjv-background-color': '#2E3235',
11
12
  '--w-rjv-line-color': '#292d30',
12
13
  '--w-rjv-arrow-color': 'var(--w-rjv-color)',
@@ -18,6 +19,8 @@ var basicTheme = {
18
19
  '--w-rjv-curlybraces-color': '#cc99cc',
19
20
  '--w-rjv-colon-color': '#bababa',
20
21
  '--w-rjv-brackets-color': '#808080',
22
+ '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',
23
+ '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',
21
24
  '--w-rjv-type-string-color': '#b5bd68',
22
25
  '--w-rjv-type-int-color': '#fda331',
23
26
  '--w-rjv-type-float-color': '#fda331',
package/cjs/theme/dark.js CHANGED
@@ -7,6 +7,7 @@ exports.darkTheme = void 0;
7
7
  var darkTheme = {
8
8
  '--w-rjv-font-family': 'monospace',
9
9
  '--w-rjv-color': '#0184a6',
10
+ '--w-rjv-key-string': '#0184a6',
10
11
  '--w-rjv-background-color': '#202020',
11
12
  '--w-rjv-line-color': '#323232',
12
13
  '--w-rjv-arrow-color': 'var(--w-rjv-color)',
@@ -17,6 +18,8 @@ var darkTheme = {
17
18
  '--w-rjv-copied-success-color': '#28a745',
18
19
  '--w-rjv-curlybraces-color': '#1896b6',
19
20
  '--w-rjv-brackets-color': '#1896b6',
21
+ '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',
22
+ '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',
20
23
  '--w-rjv-type-string-color': '#cb4b16',
21
24
  '--w-rjv-type-int-color': '#268bd2',
22
25
  '--w-rjv-type-float-color': '#859900',
@@ -7,6 +7,7 @@ exports.githubDarkTheme = void 0;
7
7
  var githubDarkTheme = {
8
8
  '--w-rjv-font-family': 'monospace',
9
9
  '--w-rjv-color': '#79c0ff',
10
+ '--w-rjv-key-string': '#79c0ff',
10
11
  '--w-rjv-background-color': '#0d1117',
11
12
  '--w-rjv-line-color': '#94949480',
12
13
  '--w-rjv-arrow-color': '#ccc',
@@ -18,6 +19,8 @@ var githubDarkTheme = {
18
19
  '--w-rjv-curlybraces-color': '#8b949e',
19
20
  '--w-rjv-colon-color': '#c9d1d9',
20
21
  '--w-rjv-brackets-color': '#8b949e',
22
+ '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',
23
+ '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',
21
24
  '--w-rjv-type-string-color': '#a5d6ff',
22
25
  '--w-rjv-type-int-color': '#79c0ff',
23
26
  '--w-rjv-type-float-color': '#79c0ff',
@@ -7,6 +7,7 @@ exports.githubLightTheme = void 0;
7
7
  var githubLightTheme = {
8
8
  '--w-rjv-font-family': 'monospace',
9
9
  '--w-rjv-color': '#6f42c1',
10
+ '--w-rjv-key-string': '#6f42c1',
10
11
  '--w-rjv-background-color': '#ffffff',
11
12
  '--w-rjv-line-color': '#ddd',
12
13
  '--w-rjv-arrow-color': '#6e7781',
@@ -18,6 +19,8 @@ var githubLightTheme = {
18
19
  '--w-rjv-curlybraces-color': '#6a737d',
19
20
  '--w-rjv-colon-color': '#24292e',
20
21
  '--w-rjv-brackets-color': '#6a737d',
22
+ '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',
23
+ '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',
21
24
  '--w-rjv-type-string-color': '#032f62',
22
25
  '--w-rjv-type-int-color': '#005cc5',
23
26
  '--w-rjv-type-float-color': '#005cc5',
@@ -7,6 +7,7 @@ exports.gruvboxTheme = void 0;
7
7
  var gruvboxTheme = {
8
8
  '--w-rjv-font-family': 'monospace',
9
9
  '--w-rjv-color': '#3c3836',
10
+ '--w-rjv-key-string': '#3c3836',
10
11
  '--w-rjv-background-color': '#fbf1c7',
11
12
  '--w-rjv-line-color': '#ebdbb2',
12
13
  '--w-rjv-arrow-color': 'var(--w-rjv-color)',
@@ -18,6 +19,8 @@ var gruvboxTheme = {
18
19
  '--w-rjv-curlybraces-color': '#236a7c',
19
20
  '--w-rjv-colon-color': '#002b36',
20
21
  '--w-rjv-brackets-color': '#236a7c',
22
+ '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',
23
+ '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',
21
24
  '--w-rjv-type-string-color': '#3c3836',
22
25
  '--w-rjv-type-int-color': '#8f3f71',
23
26
  '--w-rjv-type-float-color': '#8f3f71',
@@ -7,6 +7,7 @@ exports.lightTheme = void 0;
7
7
  var lightTheme = {
8
8
  '--w-rjv-font-family': 'monospace',
9
9
  '--w-rjv-color': '#002b36',
10
+ '--w-rjv-key-string': '#002b36',
10
11
  '--w-rjv-background-color': '#ffffff',
11
12
  '--w-rjv-line-color': '#ebebeb',
12
13
  '--w-rjv-arrow-color': 'var(--w-rjv-color)',
@@ -18,6 +19,8 @@ var lightTheme = {
18
19
  '--w-rjv-curlybraces-color': '#236a7c',
19
20
  '--w-rjv-colon-color': '#002b36',
20
21
  '--w-rjv-brackets-color': '#236a7c',
22
+ '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',
23
+ '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',
21
24
  '--w-rjv-type-string-color': '#cb4b16',
22
25
  '--w-rjv-type-int-color': '#268bd2',
23
26
  '--w-rjv-type-float-color': '#859900',
@@ -7,6 +7,7 @@ exports.monokaiTheme = void 0;
7
7
  var monokaiTheme = {
8
8
  '--w-rjv-font-family': 'monospace',
9
9
  '--w-rjv-color': '#E6DB74',
10
+ '--w-rjv-key-string': '#E6DB74',
10
11
  '--w-rjv-background-color': '#272822',
11
12
  '--w-rjv-line-color': '#3e3d32',
12
13
  '--w-rjv-arrow-color': '#f8f8f2',
@@ -18,6 +19,8 @@ var monokaiTheme = {
18
19
  '--w-rjv-curlybraces-color': '#f8f8f2',
19
20
  '--w-rjv-colon-color': '#f8f8f2',
20
21
  '--w-rjv-brackets-color': '#f8f8f2',
22
+ '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',
23
+ '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',
21
24
  '--w-rjv-type-string-color': '#E6DB74',
22
25
  '--w-rjv-type-int-color': '#AE81FF',
23
26
  '--w-rjv-type-float-color': '#AE81FF',
package/cjs/theme/nord.js CHANGED
@@ -7,6 +7,7 @@ exports.nordTheme = void 0;
7
7
  var nordTheme = {
8
8
  '--w-rjv-font-family': 'monospace',
9
9
  '--w-rjv-color': '#88c0d0',
10
+ '--w-rjv-key-string': '#88c0d0',
10
11
  '--w-rjv-background-color': '#2e3440',
11
12
  '--w-rjv-line-color': '#4c566a',
12
13
  '--w-rjv-arrow-color': 'var(--w-rjv-color)',
@@ -18,6 +19,8 @@ var nordTheme = {
18
19
  '--w-rjv-curlybraces-color': '#8fbcbb',
19
20
  '--w-rjv-colon-color': '#6d9fac',
20
21
  '--w-rjv-brackets-color': '#8fbcbb',
22
+ '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',
23
+ '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',
21
24
  '--w-rjv-type-string-color': '#a3be8c',
22
25
  '--w-rjv-type-int-color': '#b48ead',
23
26
  '--w-rjv-type-float-color': '#859900',
@@ -7,6 +7,7 @@ exports.vscodeTheme = void 0;
7
7
  var vscodeTheme = {
8
8
  '--w-rjv-font-family': 'monospace',
9
9
  '--w-rjv-color': '#9cdcfe',
10
+ '--w-rjv-key-string': '#9cdcfe',
10
11
  '--w-rjv-background-color': '#1e1e1e',
11
12
  '--w-rjv-line-color': '#36334280',
12
13
  '--w-rjv-arrow-color': '#838383',
@@ -18,6 +19,8 @@ var vscodeTheme = {
18
19
  '--w-rjv-curlybraces-color': '#d4d4d4',
19
20
  '--w-rjv-colon-color': '#d4d4d4',
20
21
  '--w-rjv-brackets-color': '#d4d4d4',
22
+ '--w-rjv-quotes-color': 'var(--w-rjv-key-string)',
23
+ '--w-rjv-quotes-string-color': 'var(--w-rjv-type-string-color)',
21
24
  '--w-rjv-type-string-color': '#ce9178',
22
25
  '--w-rjv-type-int-color': '#b5cea8',
23
26
  '--w-rjv-type-float-color': '#b5cea8',
package/cjs/type.d.ts ADDED
@@ -0,0 +1,50 @@
1
+ export declare const typeMap: {
2
+ string: {
3
+ color: string;
4
+ label: string;
5
+ };
6
+ number: {
7
+ color: string;
8
+ label: string;
9
+ };
10
+ float: {
11
+ color: string;
12
+ label: string;
13
+ };
14
+ bigint: {
15
+ color: string;
16
+ label: string;
17
+ };
18
+ boolean: {
19
+ color: string;
20
+ label: string;
21
+ };
22
+ date: {
23
+ color: string;
24
+ label: string;
25
+ };
26
+ url: {
27
+ color: string;
28
+ label: string;
29
+ };
30
+ null: {
31
+ color: string;
32
+ label: string;
33
+ };
34
+ NaN: {
35
+ color: string;
36
+ label: string;
37
+ };
38
+ undefined: {
39
+ color: string;
40
+ label: string;
41
+ };
42
+ Set: {
43
+ color: string;
44
+ label: string;
45
+ };
46
+ Map: {
47
+ color: string;
48
+ label: string;
49
+ };
50
+ };
package/cjs/type.js ADDED
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.typeMap = void 0;
7
+ var typeMap = {
8
+ string: {
9
+ color: 'var(--w-rjv-type-string-color, #cb4b16)',
10
+ label: 'string'
11
+ },
12
+ number: {
13
+ color: 'var(--w-rjv-type-int-color, #268bd2)',
14
+ label: 'int'
15
+ },
16
+ "float": {
17
+ color: 'var(--w-rjv-type-float-color, #859900)',
18
+ label: 'float'
19
+ },
20
+ bigint: {
21
+ color: 'var(--w-rjv-type-bigint-color, #268bd2)',
22
+ label: 'bigint'
23
+ },
24
+ "boolean": {
25
+ color: 'var(--w-rjv-type-boolean-color, #2aa198)',
26
+ label: 'bool'
27
+ },
28
+ date: {
29
+ color: 'var(--w-rjv-type-date-color, #586e75)',
30
+ label: 'date'
31
+ },
32
+ url: {
33
+ color: 'var(--w-rjv-type-url-color, #0969da)',
34
+ label: 'url'
35
+ },
36
+ "null": {
37
+ color: 'var(--w-rjv-type-null-color, #d33682)',
38
+ label: 'null'
39
+ },
40
+ NaN: {
41
+ color: 'var(--w-rjv-type-nan-color, #859900)',
42
+ label: 'NaN'
43
+ },
44
+ undefined: {
45
+ color: 'var(--w-rjv-type-undefined-color, #586e75)',
46
+ label: 'undefined'
47
+ },
48
+ Set: {
49
+ color: 'var(--w-rjv-type-set-color, #268bd2)',
50
+ label: 'Set'
51
+ },
52
+ Map: {
53
+ color: 'var(--w-rjv-type-map-color, #268bd2)',
54
+ label: 'Map'
55
+ }
56
+ };
57
+ exports.typeMap = typeMap;
@@ -0,0 +1,5 @@
1
+ import { type TagType, type TypesElement } from '../store/Types';
2
+ export declare const Bigint: {
3
+ <K extends TagType>(props: TypesElement<K>): null;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Bigint = void 0;
7
+ var _Types = require("../store/Types");
8
+ var _useRender = require("../utils/useRender");
9
+ var Bigint = function Bigint(props) {
10
+ var _useTypesStore = (0, _Types.useTypesStore)(),
11
+ _useTypesStore$Bigint = _useTypesStore.Bigint,
12
+ Comp = _useTypesStore$Bigint === void 0 ? {} : _useTypesStore$Bigint;
13
+ (0, _useRender.useTypesRender)(Comp, props, 'Bigint');
14
+ return null;
15
+ };
16
+ exports.Bigint = Bigint;
17
+ Bigint.displayName = 'JVR.Bigint';