@recharts/devtools 0.0.10 → 0.0.11

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.
@@ -12,6 +12,8 @@ import { ActiveTooltipLabelInspector } from '../inspectors/ActiveTooltipLabelIns
12
12
  import { useSessionStorageState } from '../hooks/useSessionStorageState.js';
13
13
  import { useRechartsDevtoolsContext } from '../context/RechartsDevtoolsContext.js';
14
14
  import { RechartsAnnotations } from './RechartsAnnotations.js';
15
+ import { YAxisTicksInspector } from '../inspectors/YAxisTicksInspector.js';
16
+ import { XAxisTicksInspector } from '../inspectors/XAxisTicksInspector.js';
15
17
  const INSPECTORS = {
16
18
  'useChartWidth | useChartHeight': ChartDimensionInspector,
17
19
  useMargin: MarginInspector,
@@ -21,6 +23,8 @@ const INSPECTORS = {
21
23
  useXAxisDomain: XAxisDomainInspector,
22
24
  useYAxisDomain: YAxisDomainInspector,
23
25
  useActiveTooltipLabel: ActiveTooltipLabelInspector,
26
+ useXAxisTicks: XAxisTicksInspector,
27
+ useYAxisTicks: YAxisTicksInspector,
24
28
  };
25
29
  const isValidInspectorKey = (key) => {
26
30
  return key != null && key in INSPECTORS;
@@ -0,0 +1,2 @@
1
+ import { InspectorDef } from '../types.js';
2
+ export declare const XAxisTicksInspector: InspectorDef;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { useXAxisTicks } from 'recharts';
3
+ import { ArrayInspector } from './generic/ArrayInspector.js';
4
+ import { useEventDispatch } from '../components/useEventDispatch.js';
5
+ const Inspector = () => {
6
+ const xAxisTicks = useXAxisTicks();
7
+ useEventDispatch(xAxisTicks);
8
+ return React.createElement(ArrayInspector, { arr: xAxisTicks });
9
+ };
10
+ export const XAxisTicksInspector = {
11
+ Inspector,
12
+ };
@@ -0,0 +1,2 @@
1
+ import { InspectorDef } from '../types.js';
2
+ export declare const YAxisTicksInspector: InspectorDef;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { useYAxisTicks } from 'recharts';
3
+ import { ArrayInspector } from './generic/ArrayInspector.js';
4
+ import { useEventDispatch } from '../components/useEventDispatch.js';
5
+ const Inspector = () => {
6
+ const yAxisTicks = useYAxisTicks();
7
+ useEventDispatch(yAxisTicks);
8
+ return React.createElement(ArrayInspector, { arr: yAxisTicks });
9
+ };
10
+ export const YAxisTicksInspector = {
11
+ Inspector,
12
+ };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "type": "module",
7
- "version": "0.0.10",
7
+ "version": "0.0.11",
8
8
  "description": "Devtools and helper functions for Recharts",
9
9
  "main": "dist/index.js",
10
10
  "types": "dist/index.d.ts",