@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.
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkHI7Z6XY7cjs = require('../chunk-HI7Z6XY7.cjs');
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 = _chunkHI7Z6XY7cjs.Json_default; exports.default = _chunkHI7Z6XY7cjs.Json_default2;
10
+ exports.Json = _chunkXV2ML6THcjs.Json_default; exports.default = _chunkXV2ML6THcjs.Json_default2;
11
11
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
- import { J as Json } from '../Json-ClGDcbcp.cjs';
2
- export { a as JsonProps } from '../Json-ClGDcbcp.cjs';
1
+ import { J as Json } from '../Json-DHE3NwkX.cjs';
2
+ export { a as JsonProps } from '../Json-DHE3NwkX.cjs';
3
3
  import 'react/jsx-runtime';
4
4
 
5
5
 
@@ -1,5 +1,5 @@
1
- import { J as Json } from '../Json-ClGDcbcp.js';
2
- export { a as JsonProps } from '../Json-ClGDcbcp.js';
1
+ import { J as Json } from '../Json-DHE3NwkX.js';
2
+ export { a as JsonProps } from '../Json-DHE3NwkX.js';
3
3
  import 'react/jsx-runtime';
4
4
 
5
5
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Json_default,
3
3
  Json_default2
4
- } from "../chunk-XSHMJPBG.js";
4
+ } from "../chunk-YGANJ3JO.js";
5
5
  import "../chunk-ODLZQXBE.js";
6
6
  import "../chunk-5WRI5ZAA.js";
7
7
  export {
@@ -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 = ({ className = null, collapsed = false, value }) => {
2576
- const isDarkMode = document.body.classList.contains("dark");
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-HI7Z6XY7.cjs.map
2684
+ //# sourceMappingURL=chunk-XV2ML6TH.cjs.map