From eccd1c1891d4d4ece82b19c857bbf43d052bf08e Mon Sep 17 00:00:00 2001 From: Peter Chang Date: Thu, 8 Jan 2026 11:00:38 +0000 Subject: [PATCH] Update Storybook to 10 --- storybook/package.json | 10 +++++----- storybook/stories/ScatterPlot.stories.tsx | 10 +++------- storybook/stories/SurfacePlot.stories.tsx | 10 +++------- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/storybook/package.json b/storybook/package.json index 34561aea..fbbf052c 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -17,17 +17,17 @@ "three": "^0.174.0" }, "devDependencies": { - "@storybook/addon-docs": "^9.1.16", - "@storybook/addon-links": "^9.1.16", - "@storybook/react-vite": "^9.1.16", + "@storybook/addon-docs": "^10.1.11", + "@storybook/addon-links": "^10.1.11", + "@storybook/react-vite": "^10.1.11", "@types/ndarray": "^1.0.14", "@types/node": "^20.19.27", "@types/react": "^18.3.27", "@types/react-dom": "^18.3.7", "@types/swagger-ui-react": "^4.19.0", "@types/three": "^0.164.1", - "eslint-plugin-storybook": "^9.1.16", - "storybook": "^9.1.16", + "eslint-plugin-storybook": "^10.1.11", + "storybook": "^10.1.11", "swagger-ui-react": "^5.31.0" }, "eslintConfig": { diff --git a/storybook/stories/ScatterPlot.stories.tsx b/storybook/stories/ScatterPlot.stories.tsx index 0749b71a..2da5fcf7 100644 --- a/storybook/stories/ScatterPlot.stories.tsx +++ b/storybook/stories/ScatterPlot.stories.tsx @@ -1,10 +1,6 @@ import ndarray from 'ndarray'; import type { Meta, StoryObj } from '@storybook/react-vite'; -import { - AxisScaleType, - ScaleType, - ScatterPlot, -} from '@diamondlightsource/davidia'; +import { ScaleType, ScatterPlot } from '@diamondlightsource/davidia'; const meta: Meta = { title: 'Plots/Scatter', @@ -21,8 +17,8 @@ export const Scatter: StoryObj = { title: 'Scatter Plot', xLabel: 'x-axis', yLabel: 'y-axis', - xScale: ScaleType.Linear as AxisScaleType | undefined, - yScale: ScaleType.Linear as AxisScaleType | undefined, + xScale: ScaleType.Linear, + yScale: ScaleType.Linear, }, colourMap: 'Turbo', x: ndarray(new Int32Array([...Array(20).keys()]), [20]), diff --git a/storybook/stories/SurfacePlot.stories.tsx b/storybook/stories/SurfacePlot.stories.tsx index 840e6820..dff95bef 100644 --- a/storybook/stories/SurfacePlot.stories.tsx +++ b/storybook/stories/SurfacePlot.stories.tsx @@ -1,10 +1,6 @@ import ndarray from 'ndarray'; import type { Meta, StoryObj } from '@storybook/react-vite'; -import { - AxisScaleType, - ScaleType, - SurfacePlot, -} from '@diamondlightsource/davidia'; +import { ScaleType, SurfacePlot } from '@diamondlightsource/davidia'; const meta: Meta = { title: 'Plots/Surface', @@ -36,8 +32,8 @@ export const Surface: StoryObj = { title: 'Surface Plot', xLabel: 'x-axis', yLabel: 'y-axis', - xScale: ScaleType.Linear as AxisScaleType | undefined, - yScale: ScaleType.Linear as AxisScaleType | undefined, + xScale: ScaleType.Linear, + yScale: ScaleType.Linear, }, heightValues: values, domain: [-2, 2],