@recharts/devtools 0.0.15 → 0.0.16

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.
@@ -16,6 +16,8 @@ import { YAxisTicksInspector } from '../inspectors/YAxisTicksInspector.js';
16
16
  import { XAxisTicksInspector } from '../inspectors/XAxisTicksInspector.js';
17
17
  import { useIsTooltipActiveInspector } from '../inspectors/useIsTooltipActiveInspector.js';
18
18
  import { useActiveTooltipCoordinateInspector } from '../inspectors/useActiveTooltipCoordinateInspector.js';
19
+ import { useCartesianChartLayoutInspector } from '../inspectors/useCartesianChartLayoutInspector.js';
20
+ import { usePolarChartLayoutInspector } from '../inspectors/usePolarChartLayoutInspector.js';
19
21
  const INSPECTORS = {
20
22
  'useChartWidth | useChartHeight': ChartDimensionInspector,
21
23
  useMargin: MarginInspector,
@@ -29,6 +31,8 @@ const INSPECTORS = {
29
31
  useYAxisTicks: YAxisTicksInspector,
30
32
  useIsTooltipActive: useIsTooltipActiveInspector,
31
33
  useActiveTooltipCoordinate: useActiveTooltipCoordinateInspector,
34
+ useCartesianChartLayout: useCartesianChartLayoutInspector,
35
+ usePolarChartLayout: usePolarChartLayoutInspector,
32
36
  };
33
37
  const isValidInspectorKey = (key) => {
34
38
  return key != null && key in INSPECTORS;
@@ -0,0 +1,2 @@
1
+ import { InspectorDef } from '../types.js';
2
+ export declare const useCartesianChartLayoutInspector: InspectorDef;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { useCartesianChartLayout } from 'recharts';
3
+ import { useEventDispatch } from '../components/useEventDispatch.js';
4
+ import { PrimitiveInspector } from './generic/PrimitiveInspector.js';
5
+ export const useCartesianChartLayoutInspector = {
6
+ Inspector: () => {
7
+ const cartesianChartLayout = useCartesianChartLayout();
8
+ useEventDispatch(cartesianChartLayout);
9
+ return React.createElement(PrimitiveInspector, { value: cartesianChartLayout });
10
+ },
11
+ };
@@ -0,0 +1,2 @@
1
+ import { InspectorDef } from '../types.js';
2
+ export declare const usePolarChartLayoutInspector: InspectorDef;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { usePolarChartLayout } from 'recharts';
3
+ import { useEventDispatch } from '../components/useEventDispatch.js';
4
+ import { PrimitiveInspector } from './generic/PrimitiveInspector.js';
5
+ export const usePolarChartLayoutInspector = {
6
+ Inspector: () => {
7
+ const polarChartLayout = usePolarChartLayout();
8
+ useEventDispatch(polarChartLayout);
9
+ return React.createElement(PrimitiveInspector, { value: polarChartLayout });
10
+ },
11
+ };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "type": "module",
7
- "version": "0.0.15",
7
+ "version": "0.0.16",
8
8
  "description": "Devtools and helper functions for Recharts",
9
9
  "main": "dist/index.js",
10
10
  "types": "dist/index.d.ts",
@@ -48,6 +48,6 @@
48
48
  "peerDependencies": {
49
49
  "react": "^18.0.0 || ^19.0.0",
50
50
  "react-dom": "^18.0.0 || ^19.0.0",
51
- "recharts": "3.9.0-canary.0"
51
+ "recharts": "3.9.0"
52
52
  }
53
53
  }