Skip to content

Commit

Permalink
feat: upgrade to storybook 8
Browse files Browse the repository at this point in the history
  • Loading branch information
lmestel committed Apr 8, 2024
1 parent f59620a commit b43bfde
Show file tree
Hide file tree
Showing 7 changed files with 901 additions and 1,833 deletions.
5 changes: 5 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ import { StorybookConfig } from "@storybook/react-vite";
const config: StorybookConfig = {
stories: ["../stories/**/*.stories.@(js|jsx|ts|tsx)"],
addons: ["@storybook/addon-essentials", "../manager.js"],

framework: {
name: "@storybook/react-vite",
options: {},
},

docs: {
autodocs: true
}
};

export default config;
51 changes: 25 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,46 +35,45 @@
"storybook": "storybook dev -p 6007",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {},
"dependencies": {
"@storybook/components": "^8",
"@storybook/manager-api": "^8",
"@storybook/preview-api": "^8"
},
"devDependencies": {
"@kickstartds/core": "^4.0.0",
"@kickstartds/core": "^4.0.2",
"@kickstartds/json-schema-viewer": "^2.0.1",
"@monaco-editor/react": "^4.5.1",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/components": "^7.6.17",
"@storybook/manager-api": "^7.6.17",
"@storybook/react": "^7.6.17",
"@storybook/react-vite": "^7.6.17",
"@types/decomment": "^0.9.3",
"@types/json-schema": "^7.0.13",
"@types/react-dom": "^18.2.8",
"@monaco-editor/react": "^4.6.0",
"@storybook/addon-essentials": "^8",
"@storybook/components": "^8",
"@storybook/manager-api": "^8",
"@storybook/react": "^8",
"@storybook/react-vite": "^8",
"@storybook/theming": "^8",
"@types/decomment": "^0.9.5",
"@types/json-schema": "^7.0.15",
"@types/react-dom": "^18.2.24",
"@types/react-router-dom": "^5.3.3",
"@types/styled-components": "^3.0.6",
"auto": "^11.0.5",
"@vitejs/plugin-react": "^4.2.1",
"auto": "^11.1.6",
"decomment": "^0.9.5",
"esbuild": "^0.19.3",
"esbuild-node-externals": "^1.9.0",
"monaco-editor": "^0.39.0",
"esbuild": "^0.20.2",
"esbuild-node-externals": "^1.13.0",
"monaco-editor": "^0.47.0",
"patch-package": "^8.0.0",
"prettier": "^3.0.3",
"prettier": "^3.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"rimraf": "^5.0.5",
"storybook": "^7.6.17",
"storybook": "^8",
"styled-components": "^3.2.6",
"typescript": "^5.2.2",
"vite": "^5.1.4"
"typescript": "^5.4.4",
"vite": "^5.2.8"
},
"peerDependencies": {
"@kickstartds/core": "^2.2.0 || ^4.0.0",
"@storybook/api": "^7.0.0",
"@storybook/components": "^7.0.0",
"@storybook/core-events": "^7.0.0",
"@storybook/manager-api": "^7.0.0",
"@storybook/preview-api": "^7.0.0",
"@storybook/theming": "^7.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.2.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Panel.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { MemoryRouter } from "react-router-dom";
import { AddonPanel } from "@storybook/components";
import styled from "styled-components";
import { styled } from "@storybook/theming";
import { SchemaView } from "./components/SchemaView";

interface PanelProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/SchemaEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useMemo, useRef, useState } from "react";
import React, { useEffect, useRef, useState } from "react";
import type { IRange, editor } from "monaco-editor";
import type { Args } from "@storybook/types";
import Editor, { useMonaco, OnMount, OnValidate } from "@monaco-editor/react";
Expand Down
2 changes: 1 addition & 1 deletion src/components/SchemaView.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from "react";
import { useParameter } from "@storybook/manager-api";
import styled from "styled-components";
import { styled } from "@storybook/theming";
import type { editor, IRange } from "monaco-editor";

import { forSize } from "@kickstartds/json-schema-viewer";
Expand Down
6 changes: 6 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

export default defineConfig({
plugins: [react()],
});
Loading

0 comments on commit b43bfde

Please sign in to comment.