@fuf-stack/pixels 0.27.0 → 0.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Json/index.cjs +2 -2
- package/dist/Json/index.d.cts +2 -2
- package/dist/Json/index.d.ts +2 -2
- package/dist/Json/index.js +1 -1
- package/dist/{Json-ClGDcbcp.d.cts → Json-DHE3NwkX.d.cts} +3 -1
- package/dist/{Json-ClGDcbcp.d.ts → Json-DHE3NwkX.d.ts} +3 -1
- package/dist/{chunk-HI7Z6XY7.cjs → chunk-XV2ML6TH.cjs} +8 -3
- package/dist/{chunk-HI7Z6XY7.cjs.map → chunk-XV2ML6TH.cjs.map} +1 -1
- package/dist/{chunk-XSHMJPBG.js → chunk-YGANJ3JO.js} +8 -3
- package/dist/chunk-YGANJ3JO.js.map +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/package.json +1 -2
- package/dist/chunk-XSHMJPBG.js.map +0 -1
package/dist/Json/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkXV2ML6THcjs = require('../chunk-XV2ML6TH.cjs');
|
|
5
5
|
require('../chunk-7TIFKRWY.cjs');
|
|
6
6
|
require('../chunk-DZUJEN5N.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.Json =
|
|
10
|
+
exports.Json = _chunkXV2ML6THcjs.Json_default; exports.default = _chunkXV2ML6THcjs.Json_default2;
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Json/index.d.cts
CHANGED
package/dist/Json/index.d.ts
CHANGED
package/dist/Json/index.js
CHANGED
|
@@ -5,12 +5,14 @@ interface JsonProps {
|
|
|
5
5
|
className?: string | string[] | null;
|
|
6
6
|
/** When set to true, all nodes will be collapsed by default. Use an integer value to collapse at a particular depth. */
|
|
7
7
|
collapsed?: boolean | number;
|
|
8
|
+
/** color scheme, if not provided will be determined by if body has dark class */
|
|
9
|
+
theme?: 'light' | 'dark';
|
|
8
10
|
/** Object to be visualized JSON string or object */
|
|
9
11
|
value: string | object;
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* Json renderer based on [react-json-view](https://mac-s-g.github.io/react-json-view/demo/dist/)
|
|
13
15
|
*/
|
|
14
|
-
declare const Json: ({ className, collapsed, value }: JsonProps) => react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare const Json: ({ className, collapsed, theme, value, }: JsonProps) => react_jsx_runtime.JSX.Element;
|
|
15
17
|
|
|
16
18
|
export { Json as J, type JsonProps as a };
|
|
@@ -5,12 +5,14 @@ interface JsonProps {
|
|
|
5
5
|
className?: string | string[] | null;
|
|
6
6
|
/** When set to true, all nodes will be collapsed by default. Use an integer value to collapse at a particular depth. */
|
|
7
7
|
collapsed?: boolean | number;
|
|
8
|
+
/** color scheme, if not provided will be determined by if body has dark class */
|
|
9
|
+
theme?: 'light' | 'dark';
|
|
8
10
|
/** Object to be visualized JSON string or object */
|
|
9
11
|
value: string | object;
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* Json renderer based on [react-json-view](https://mac-s-g.github.io/react-json-view/demo/dist/)
|
|
13
15
|
*/
|
|
14
|
-
declare const Json: ({ className, collapsed, value }: JsonProps) => react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare const Json: ({ className, collapsed, theme, value, }: JsonProps) => react_jsx_runtime.JSX.Element;
|
|
15
17
|
|
|
16
18
|
export { Json as J, type JsonProps as a };
|
|
@@ -2572,8 +2572,13 @@ var getValue = (value) => {
|
|
|
2572
2572
|
}
|
|
2573
2573
|
throw new Error(`${typeof value} can not be visualized`);
|
|
2574
2574
|
};
|
|
2575
|
-
var Json = ({
|
|
2576
|
-
|
|
2575
|
+
var Json = ({
|
|
2576
|
+
className = null,
|
|
2577
|
+
collapsed = false,
|
|
2578
|
+
theme = void 0,
|
|
2579
|
+
value
|
|
2580
|
+
}) => {
|
|
2581
|
+
const isDarkMode = theme === "dark" || document.body.classList.contains("dark");
|
|
2577
2582
|
let content = null;
|
|
2578
2583
|
let error = null;
|
|
2579
2584
|
const [showDetails, setShowDetails] = _react.useState.call(void 0, false);
|
|
@@ -2676,4 +2681,4 @@ var Json_default2 = Json_default;
|
|
|
2676
2681
|
|
|
2677
2682
|
|
|
2678
2683
|
exports.Json_default = Json_default; exports.Json_default2 = Json_default2;
|
|
2679
|
-
//# sourceMappingURL=chunk-
|
|
2684
|
+
//# sourceMappingURL=chunk-XV2ML6TH.cjs.map
|