From 25c9d9eeafbbbd12ad6df679605fe2ff56ce756a Mon Sep 17 00:00:00 2001 From: Cheryl Kong Date: Tue, 19 May 2026 10:21:18 +0100 Subject: [PATCH 1/5] chore: remove storybook boilerplate code Signed-off-by: Cheryl Kong --- .../stories/Button.stories.ts | 70 ---- .../stories/Button.tsx | 51 --- .../stories/Configure.mdx | 377 ------------------ .../stories/Header.stories.ts | 50 --- .../stories/Header.tsx | 70 ---- .../stories/Page.stories.ts | 49 --- .../stories/Page.tsx | 87 ---- .../stories/button.css | 46 --- .../stories/header.css | 48 --- .../stories/page.css | 84 ---- 10 files changed, 932 deletions(-) delete mode 100644 packages/serverless-workflow-diagram-editor/stories/Button.stories.ts delete mode 100644 packages/serverless-workflow-diagram-editor/stories/Button.tsx delete mode 100644 packages/serverless-workflow-diagram-editor/stories/Configure.mdx delete mode 100644 packages/serverless-workflow-diagram-editor/stories/Header.stories.ts delete mode 100644 packages/serverless-workflow-diagram-editor/stories/Header.tsx delete mode 100644 packages/serverless-workflow-diagram-editor/stories/Page.stories.ts delete mode 100644 packages/serverless-workflow-diagram-editor/stories/Page.tsx delete mode 100644 packages/serverless-workflow-diagram-editor/stories/button.css delete mode 100644 packages/serverless-workflow-diagram-editor/stories/header.css delete mode 100644 packages/serverless-workflow-diagram-editor/stories/page.css diff --git a/packages/serverless-workflow-diagram-editor/stories/Button.stories.ts b/packages/serverless-workflow-diagram-editor/stories/Button.stories.ts deleted file mode 100644 index dd6408d0..00000000 --- a/packages/serverless-workflow-diagram-editor/stories/Button.stories.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { Meta, StoryObj } from "@storybook/react-vite"; - -import { fn } from "storybook/test"; - -import { Button } from "./Button"; - -// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export -const meta = { - title: "Example/Button", - component: Button, - parameters: { - // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout - layout: "centered", - }, - // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs - tags: ["autodocs"], - // More on argTypes: https://storybook.js.org/docs/api/argtypes - argTypes: { - backgroundColor: { control: "color" }, - }, - // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#story-args - args: { onClick: fn() }, -} satisfies Meta; - -export default meta; -type Story = StoryObj; - -// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args -export const Primary: Story = { - args: { - primary: true, - label: "Button", - }, -}; - -export const Secondary: Story = { - args: { - label: "Button", - }, -}; - -export const Large: Story = { - args: { - size: "large", - label: "Button", - }, -}; - -export const Small: Story = { - args: { - size: "small", - label: "Button", - }, -}; diff --git a/packages/serverless-workflow-diagram-editor/stories/Button.tsx b/packages/serverless-workflow-diagram-editor/stories/Button.tsx deleted file mode 100644 index 80e82377..00000000 --- a/packages/serverless-workflow-diagram-editor/stories/Button.tsx +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import "./button.css"; - -export interface ButtonProps { - /** Is this the principal call to action on the page? */ - primary?: boolean; - /** What background color to use */ - backgroundColor?: string; - /** How large should the button be? */ - size?: "small" | "medium" | "large"; - /** Button contents */ - label: string; - /** Optional click handler */ - onClick?: () => void; -} - -/** Primary UI component for user interaction */ -export const Button = ({ - primary = false, - size = "medium", - backgroundColor, - label, - ...props -}: ButtonProps) => { - const mode = primary ? "storybook-button--primary" : "storybook-button--secondary"; - return ( - - ); -}; diff --git a/packages/serverless-workflow-diagram-editor/stories/Configure.mdx b/packages/serverless-workflow-diagram-editor/stories/Configure.mdx deleted file mode 100644 index 3efef891..00000000 --- a/packages/serverless-workflow-diagram-editor/stories/Configure.mdx +++ /dev/null @@ -1,377 +0,0 @@ -{/* Copyright 2021-Present The Serverless Workflow Specification Authors */} -{/* */} -{/* Licensed under the Apache License, Version 2.0 (the "License"); */} -{/* you may not use this file except in compliance with the License. */} -{/* You may obtain a copy of the License at */} -{/* */} -{/* http://www.apache.org/licenses/LICENSE-2.0 */} -{/* */} -{/* Unless required by applicable law or agreed to in writing, software */} -{/* distributed under the License is distributed on an "AS IS" BASIS, */} -{/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */} -{/* See the License for the specific language governing permissions and */} -{/* limitations under the License. */} - -import { Meta } from "@storybook/addon-docs/blocks"; -import Github from "./assets/github.svg"; -import Discord from "./assets/discord.svg"; -import Youtube from "./assets/youtube.svg"; -import Tutorials from "./assets/tutorials.svg"; -import Styling from "./assets/styling.png"; -import Context from "./assets/context.png"; -import Assets from "./assets/assets.png"; -import Docs from "./assets/docs.png"; -import Share from "./assets/share.png"; -import FigmaPlugin from "./assets/figma-plugin.png"; -import Testing from "./assets/testing.png"; -import Accessibility from "./assets/accessibility.png"; -import Theming from "./assets/theming.png"; -import AddonLibrary from "./assets/addon-library.png"; - -export const RightArrow = () => - - - - - -
-
- # Configure your project - - Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community. -
-
-
- A wall of logos representing different styling technologies -

Add styling and CSS

-

Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook.

- Learn more -
-
- An abstraction representing the composition of data for a component -

Provide context and mocking

-

Often when a story doesn't render, it's because your component is expecting a specific environment or context (like a theme provider) to be available.

- Learn more -
-
- A representation of typography and image assets -
-

Load assets and resources

-

To link static files (like fonts) to your projects and stories, use the - `staticDirs` configuration option to specify folders to load when - starting Storybook.

- Learn more -
-
-
-
-
-
- # Do more with Storybook - - Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs. -
- -
-
-
- A screenshot showing the autodocs tag being set, pointing a docs page being generated -

Autodocs

-

Auto-generate living, - interactive reference documentation from your components and stories.

- Learn more -
-
- A browser window showing a Storybook being published to a chromatic.com URL -

Publish to Chromatic

-

Publish your Storybook to review and collaborate with your entire team.

- Learn more -
-
- Windows showing the Storybook plugin in Figma -

Figma Plugin

-

Embed your stories into Figma to cross-reference the design and live - implementation in one place.

- Learn more -
-
- Screenshot of tests passing and failing -

Testing

-

Use stories to test a component in all its variations, no matter how - complex.

- Learn more -
-
- Screenshot of accessibility tests passing and failing -

Accessibility

-

Automatically test your components for a11y issues as you develop.

- Learn more -
-
- Screenshot of Storybook in light and dark mode -

Theming

-

Theme Storybook's UI to personalize it to your project.

- Learn more -
-
-
-
-
-
-

Addons

-

Integrate your tools with Storybook to connect workflows.

- Discover all addons -
-
- Integrate your tools with Storybook to connect workflows. -
-
- -
-
- Github logo - Join our contributors building the future of UI development. - - Star on GitHub -
-
- Discord logo -
- Get support and chat with frontend developers. - - Join Discord server -
-
-
- Youtube logo -
- Watch tutorials, feature previews and interviews. - - Watch on YouTube -
-
-
- A book -

Follow guided walkthroughs on for key workflows.

- - Discover tutorials -
-
- - diff --git a/packages/serverless-workflow-diagram-editor/stories/Header.stories.ts b/packages/serverless-workflow-diagram-editor/stories/Header.stories.ts deleted file mode 100644 index 150998d6..00000000 --- a/packages/serverless-workflow-diagram-editor/stories/Header.stories.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { Meta, StoryObj } from "@storybook/react-vite"; - -import { fn } from "storybook/test"; - -import { Header } from "./Header"; - -const meta = { - title: "Example/Header", - component: Header, - // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs - tags: ["autodocs"], - parameters: { - // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout - layout: "fullscreen", - }, - args: { - onLogin: fn(), - onLogout: fn(), - onCreateAccount: fn(), - }, -} satisfies Meta; - -export default meta; -type Story = StoryObj; - -export const LoggedIn: Story = { - args: { - user: { - name: "Jane Doe", - }, - }, -}; - -export const LoggedOut: Story = {}; diff --git a/packages/serverless-workflow-diagram-editor/stories/Header.tsx b/packages/serverless-workflow-diagram-editor/stories/Header.tsx deleted file mode 100644 index 86274c03..00000000 --- a/packages/serverless-workflow-diagram-editor/stories/Header.tsx +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Button } from "./Button"; -import "./header.css"; - -type User = { - name: string; -}; - -export interface HeaderProps { - user?: User; - onLogin?: () => void; - onLogout?: () => void; - onCreateAccount?: () => void; -} - -export const Header = ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => ( -
-
-
- - - - - - - -

Acme

-
-
- {user ? ( - <> - - Welcome, {user.name}! - -
-
-
-); diff --git a/packages/serverless-workflow-diagram-editor/stories/Page.stories.ts b/packages/serverless-workflow-diagram-editor/stories/Page.stories.ts deleted file mode 100644 index 19614e0e..00000000 --- a/packages/serverless-workflow-diagram-editor/stories/Page.stories.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { Meta, StoryObj } from "@storybook/react-vite"; - -import { expect, userEvent, within } from "storybook/test"; - -import { Page } from "./Page"; - -const meta = { - title: "Example/Page", - component: Page, - parameters: { - // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout - layout: "fullscreen", - }, -} satisfies Meta; - -export default meta; -type Story = StoryObj; - -export const LoggedOut: Story = {}; - -// More on component testing: https://storybook.js.org/docs/writing-tests/interaction-testing -export const LoggedIn: Story = { - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - const loginButton = canvas.getByRole("button", { name: /Log in/i }); - await expect(loginButton).toBeInTheDocument(); - await userEvent.click(loginButton); - await expect(loginButton).not.toBeInTheDocument(); - - const logoutButton = canvas.getByRole("button", { name: /Log out/i }); - await expect(logoutButton).toBeInTheDocument(); - }, -}; diff --git a/packages/serverless-workflow-diagram-editor/stories/Page.tsx b/packages/serverless-workflow-diagram-editor/stories/Page.tsx deleted file mode 100644 index 1f1485b7..00000000 --- a/packages/serverless-workflow-diagram-editor/stories/Page.tsx +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import React from "react"; - -import { Header } from "./Header"; -import "./page.css"; - -type User = { - name: string; -}; - -export const Page: React.FC = () => { - const [user, setUser] = React.useState(); - - return ( -
-
setUser({ name: "Jane Doe" })} - onLogout={() => setUser(undefined)} - onCreateAccount={() => setUser({ name: "Jane Doe" })} - /> - -
-

Pages in Storybook

-

- We recommend building UIs with a{" "} - - component-driven - {" "} - process starting with atomic components and ending with pages. -

-

- Render pages with mock data. This makes it easy to build and review page states without needing to navigate to - them in your app. Here are some handy patterns for managing page data in Storybook: -

-
    -
  • - Use a higher-level connected component. Storybook helps you compose such data from the "args" of - child component stories -
  • -
  • - Assemble data in the page component from your services. You can mock these services out using Storybook. -
  • -
-

- Get a guided tutorial on component-driven development at{" "} - - Storybook tutorials - - . Read more in the{" "} - - docs - - . -

-
- Tip Adjust the width of the canvas with the{" "} - - - - - - Viewports addon in the toolbar -
-
-
- ); -}; diff --git a/packages/serverless-workflow-diagram-editor/stories/button.css b/packages/serverless-workflow-diagram-editor/stories/button.css deleted file mode 100644 index 0b04f507..00000000 --- a/packages/serverless-workflow-diagram-editor/stories/button.css +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -.storybook-button { - display: inline-block; - cursor: pointer; - border: 0; - border-radius: 3em; - font-weight: 700; - line-height: 1; - font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; -} -.storybook-button--primary { - background-color: #555ab9; - color: white; -} -.storybook-button--secondary { - box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset; - background-color: transparent; - color: #333; -} -.storybook-button--small { - padding: 10px 16px; - font-size: 12px; -} -.storybook-button--medium { - padding: 11px 20px; - font-size: 14px; -} -.storybook-button--large { - padding: 12px 24px; - font-size: 16px; -} diff --git a/packages/serverless-workflow-diagram-editor/stories/header.css b/packages/serverless-workflow-diagram-editor/stories/header.css deleted file mode 100644 index e7d0609d..00000000 --- a/packages/serverless-workflow-diagram-editor/stories/header.css +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -.storybook-header { - display: flex; - justify-content: space-between; - align-items: center; - border-bottom: 1px solid rgba(0, 0, 0, 0.1); - padding: 15px 20px; - font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; -} - -.storybook-header svg { - display: inline-block; - vertical-align: top; -} - -.storybook-header h1 { - display: inline-block; - vertical-align: top; - margin: 6px 0 6px 10px; - font-weight: 700; - font-size: 20px; - line-height: 1; -} - -.storybook-header button + button { - margin-left: 10px; -} - -.storybook-header .welcome { - margin-right: 10px; - color: #333; - font-size: 14px; -} diff --git a/packages/serverless-workflow-diagram-editor/stories/page.css b/packages/serverless-workflow-diagram-editor/stories/page.css deleted file mode 100644 index 6b0f8179..00000000 --- a/packages/serverless-workflow-diagram-editor/stories/page.css +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -.storybook-page { - margin: 0 auto; - padding: 48px 20px; - max-width: 600px; - color: #333; - font-size: 14px; - line-height: 24px; - font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; -} - -.storybook-page h2 { - display: inline-block; - vertical-align: top; - margin: 0 0 4px; - font-weight: 700; - font-size: 32px; - line-height: 1; -} - -.storybook-page p { - margin: 1em 0; -} - -.storybook-page a { - color: inherit; -} - -.storybook-page ul { - margin: 1em 0; - padding-left: 30px; -} - -.storybook-page li { - margin-bottom: 8px; -} - -.storybook-page .tip { - display: inline-block; - vertical-align: top; - margin-right: 10px; - border-radius: 1em; - background: #e7fdd8; - padding: 4px 12px; - color: #357a14; - font-weight: 700; - font-size: 11px; - line-height: 12px; -} - -.storybook-page .tip-wrapper { - margin-top: 40px; - margin-bottom: 40px; - font-size: 13px; - line-height: 20px; -} - -.storybook-page .tip-wrapper svg { - display: inline-block; - vertical-align: top; - margin-top: 3px; - margin-right: 4px; - width: 12px; - height: 12px; -} - -.storybook-page .tip-wrapper svg path { - fill: #1ea7fd; -} From 22e2f33465a6c29a439e8a8569bb3fae2818ac32 Mon Sep 17 00:00:00 2001 From: Cheryl Kong Date: Tue, 19 May 2026 10:50:19 +0100 Subject: [PATCH 2/5] refactor: move editor stories into Features directory Signed-off-by: Cheryl Kong --- .../stories/{ => features}/DiagramEditor.stories.ts | 2 +- .../stories/{ => features}/DiagramEditor.tsx | 2 +- .../{ => features}/DiagramEditorDragNDrop.stories.ts | 2 +- .../stories/{ => features}/DiagramEditorDragNDrop.tsx | 2 +- .../stories/{ => features}/ErrorPage.stories.tsx | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) rename packages/serverless-workflow-diagram-editor/stories/{ => features}/DiagramEditor.stories.ts (98%) rename packages/serverless-workflow-diagram-editor/stories/{ => features}/DiagramEditor.tsx (95%) rename packages/serverless-workflow-diagram-editor/stories/{ => features}/DiagramEditorDragNDrop.stories.ts (95%) rename packages/serverless-workflow-diagram-editor/stories/{ => features}/DiagramEditorDragNDrop.tsx (98%) rename packages/serverless-workflow-diagram-editor/stories/{ => features}/ErrorPage.stories.tsx (92%) diff --git a/packages/serverless-workflow-diagram-editor/stories/DiagramEditor.stories.ts b/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditor.stories.ts similarity index 98% rename from packages/serverless-workflow-diagram-editor/stories/DiagramEditor.stories.ts rename to packages/serverless-workflow-diagram-editor/stories/features/DiagramEditor.stories.ts index cb9bd703..3399bc04 100644 --- a/packages/serverless-workflow-diagram-editor/stories/DiagramEditor.stories.ts +++ b/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditor.stories.ts @@ -84,7 +84,7 @@ timeout: const meta = { id: "diagram-editor", - title: "Example/Diagram-Editor", + title: "Features/Diagram-Editor", component: DiagramEditor, // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs tags: ["autodocs"], diff --git a/packages/serverless-workflow-diagram-editor/stories/DiagramEditor.tsx b/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditor.tsx similarity index 95% rename from packages/serverless-workflow-diagram-editor/stories/DiagramEditor.tsx rename to packages/serverless-workflow-diagram-editor/stories/features/DiagramEditor.tsx index dfc3cb34..4e73683d 100644 --- a/packages/serverless-workflow-diagram-editor/stories/DiagramEditor.tsx +++ b/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditor.tsx @@ -17,7 +17,7 @@ import { DiagramEditor as Component, DiagramEditorProps, -} from "../src/diagram-editor/DiagramEditor"; +} from "../../src/diagram-editor/DiagramEditor"; /** Primary UI component for user interaction */ export const DiagramEditor = ({ ...props }: DiagramEditorProps) => { diff --git a/packages/serverless-workflow-diagram-editor/stories/DiagramEditorDragNDrop.stories.ts b/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditorDragNDrop.stories.ts similarity index 95% rename from packages/serverless-workflow-diagram-editor/stories/DiagramEditorDragNDrop.stories.ts rename to packages/serverless-workflow-diagram-editor/stories/features/DiagramEditorDragNDrop.stories.ts index 27428576..d8a36e9d 100644 --- a/packages/serverless-workflow-diagram-editor/stories/DiagramEditorDragNDrop.stories.ts +++ b/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditorDragNDrop.stories.ts @@ -20,7 +20,7 @@ import { DiagramEditorDragNDrop } from "./DiagramEditorDragNDrop"; const meta = { id: "diagram-editor-drag-n-drop", - title: "Example/Diagram-Editor-Drag-N-Drop", + title: "Features/Diagram-Editor-Drag-N-Drop", component: DiagramEditorDragNDrop, tags: ["autodocs"], parameters: { diff --git a/packages/serverless-workflow-diagram-editor/stories/DiagramEditorDragNDrop.tsx b/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditorDragNDrop.tsx similarity index 98% rename from packages/serverless-workflow-diagram-editor/stories/DiagramEditorDragNDrop.tsx rename to packages/serverless-workflow-diagram-editor/stories/features/DiagramEditorDragNDrop.tsx index cdee9555..d0226fbd 100644 --- a/packages/serverless-workflow-diagram-editor/stories/DiagramEditorDragNDrop.tsx +++ b/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditorDragNDrop.tsx @@ -18,7 +18,7 @@ import React, { useState } from "react"; import { DiagramEditor as Component, DiagramEditorProps, -} from "../src/diagram-editor/DiagramEditor"; +} from "../../src/diagram-editor/DiagramEditor"; export const DiagramEditorDragNDrop = (props: Omit) => { const [content, setContent] = useState(""); diff --git a/packages/serverless-workflow-diagram-editor/stories/ErrorPage.stories.tsx b/packages/serverless-workflow-diagram-editor/stories/features/ErrorPage.stories.tsx similarity index 92% rename from packages/serverless-workflow-diagram-editor/stories/ErrorPage.stories.tsx rename to packages/serverless-workflow-diagram-editor/stories/features/ErrorPage.stories.tsx index f4eb3597..6417e1a6 100644 --- a/packages/serverless-workflow-diagram-editor/stories/ErrorPage.stories.tsx +++ b/packages/serverless-workflow-diagram-editor/stories/features/ErrorPage.stories.tsx @@ -15,10 +15,10 @@ */ import type { Meta, StoryObj } from "@storybook/react-vite"; -import { ErrorPage } from "../src/diagram-editor/error-pages/ErrorPage"; +import { ErrorPage } from "../../src/diagram-editor/error-pages/ErrorPage"; import { PropsWithChildren } from "react"; -import { ColorMode } from "../src/types/colorMode"; -import { useResolvedColorMode } from "../src/hooks/useResolvedColorMode"; +import { ColorMode } from "../../src/types/colorMode"; +import { useResolvedColorMode } from "../../src/hooks/useResolvedColorMode"; type ErrorPageProps = { title: string; @@ -44,7 +44,7 @@ const DecRoot = ({ colorMode, children }: PropsWithChildren<{ colorMode: ColorMo }; const meta = { - title: "Example/ErrorPage", + title: "Features/ErrorPage", component: ErrorPage, // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs tags: ["autodocs"], From 4ecdc479e0c034ed98b16f3047da7d1756f95f17 Mon Sep 17 00:00:00 2001 From: Cheryl Kong Date: Tue, 19 May 2026 11:15:06 +0100 Subject: [PATCH 3/5] fix: update story file paths in test imports Signed-off-by: Cheryl Kong --- .../tests/diagram-editor/DiagramEditor.story.test.tsx | 2 +- .../tests/diagram-editor/DiagramEditorDragNDrop.story.test.tsx | 2 +- .../tests/diagram-editor/error-pages/ErrorPage.story.test.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/serverless-workflow-diagram-editor/tests/diagram-editor/DiagramEditor.story.test.tsx b/packages/serverless-workflow-diagram-editor/tests/diagram-editor/DiagramEditor.story.test.tsx index 0510b528..2d3bd6ca 100644 --- a/packages/serverless-workflow-diagram-editor/tests/diagram-editor/DiagramEditor.story.test.tsx +++ b/packages/serverless-workflow-diagram-editor/tests/diagram-editor/DiagramEditor.story.test.tsx @@ -16,7 +16,7 @@ import { render, screen } from "@testing-library/react"; import { composeStories } from "@storybook/react-vite"; -import * as stories from "../../stories/DiagramEditor.stories"; +import * as stories from "../../stories/features/DiagramEditor.stories"; import { vi, expect, afterEach, describe, it } from "vitest"; import { BASIC_VALID_WORKFLOW_YAML } from "../fixtures/workflows"; diff --git a/packages/serverless-workflow-diagram-editor/tests/diagram-editor/DiagramEditorDragNDrop.story.test.tsx b/packages/serverless-workflow-diagram-editor/tests/diagram-editor/DiagramEditorDragNDrop.story.test.tsx index ea1f08d7..d91611a6 100644 --- a/packages/serverless-workflow-diagram-editor/tests/diagram-editor/DiagramEditorDragNDrop.story.test.tsx +++ b/packages/serverless-workflow-diagram-editor/tests/diagram-editor/DiagramEditorDragNDrop.story.test.tsx @@ -16,7 +16,7 @@ import { render, screen, waitFor, fireEvent } from "@testing-library/react"; import { composeStories } from "@storybook/react-vite"; -import * as stories from "../../stories/DiagramEditorDragNDrop.stories"; +import * as stories from "../../stories/features/DiagramEditorDragNDrop.stories"; import { vi, test, expect, afterEach, describe } from "vitest"; import { BASIC_VALID_WORKFLOW_YAML } from "../fixtures/workflows"; import userEvent from "@testing-library/user-event"; diff --git a/packages/serverless-workflow-diagram-editor/tests/diagram-editor/error-pages/ErrorPage.story.test.tsx b/packages/serverless-workflow-diagram-editor/tests/diagram-editor/error-pages/ErrorPage.story.test.tsx index 646b1468..971743e6 100644 --- a/packages/serverless-workflow-diagram-editor/tests/diagram-editor/error-pages/ErrorPage.story.test.tsx +++ b/packages/serverless-workflow-diagram-editor/tests/diagram-editor/error-pages/ErrorPage.story.test.tsx @@ -16,7 +16,7 @@ import { render, screen } from "@testing-library/react"; import { composeStories } from "@storybook/react-vite"; -import * as stories from "../../../stories/ErrorPage.stories"; +import * as stories from "../../../stories/features/ErrorPage.stories"; import { expect, describe, it } from "vitest"; const { TitleOnly, WithMessage, WithSnippet, WithMessageAndSnippet } = composeStories(stories); From c01e61c4c82df14fae60d4b961bf6872cf4e2de3 Mon Sep 17 00:00:00 2001 From: Cheryl Kong Date: Thu, 21 May 2026 16:06:47 +0100 Subject: [PATCH 4/5] feat: add color mode toolbar Signed-off-by: Cheryl Kong --- .../.storybook/{preview.ts => preview.tsx} | 25 ++++++++++++++++++- ...r.stories.ts => DiagramEditor.stories.tsx} | 5 ++-- ....ts => DiagramEditorDragNDrop.stories.tsx} | 4 ++- .../stories/features/ErrorPage.stories.tsx | 24 ++++++++---------- 4 files changed, 41 insertions(+), 17 deletions(-) rename packages/serverless-workflow-diagram-editor/.storybook/{preview.ts => preview.tsx} (62%) rename packages/serverless-workflow-diagram-editor/stories/features/{DiagramEditor.stories.ts => DiagramEditor.stories.tsx} (95%) rename packages/serverless-workflow-diagram-editor/stories/features/{DiagramEditorDragNDrop.stories.ts => DiagramEditorDragNDrop.stories.tsx} (89%) diff --git a/packages/serverless-workflow-diagram-editor/.storybook/preview.ts b/packages/serverless-workflow-diagram-editor/.storybook/preview.tsx similarity index 62% rename from packages/serverless-workflow-diagram-editor/.storybook/preview.ts rename to packages/serverless-workflow-diagram-editor/.storybook/preview.tsx index 384158cb..8d6107d8 100644 --- a/packages/serverless-workflow-diagram-editor/.storybook/preview.ts +++ b/packages/serverless-workflow-diagram-editor/.storybook/preview.tsx @@ -15,7 +15,11 @@ */ import "../src/styles.css"; -import type { Preview } from "@storybook/react-vite"; +import type { Preview, Decorator } from "@storybook/react-vite"; + +const withColorMode: Decorator = (Story, context) => { + return ; +}; const preview: Preview = { parameters: { @@ -33,6 +37,25 @@ const preview: Preview = { test: "todo", }, }, + + globalTypes: { + colorMode: { + description: "Global color mode for components", + defaultValue: "system", + toolbar: { + title: "Color Mode", + icon: "circlehollow", + items: [ + { value: "light", icon: "sun", title: "Light" }, + { value: "dark", icon: "moon", title: "Dark" }, + { value: "system", icon: "browser", title: "System" }, + ], + dynamicTitle: true, + }, + }, + }, + + decorators: [withColorMode], }; export default preview; diff --git a/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditor.stories.ts b/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditor.stories.tsx similarity index 95% rename from packages/serverless-workflow-diagram-editor/stories/features/DiagramEditor.stories.ts rename to packages/serverless-workflow-diagram-editor/stories/features/DiagramEditor.stories.tsx index 3399bc04..545a0e90 100644 --- a/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditor.stories.ts +++ b/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditor.stories.tsx @@ -92,7 +92,9 @@ const meta = { // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout layout: "fullscreen", }, - args: {}, + render: (args, { globals }) => { + return ; + }, } satisfies Meta; export default meta; @@ -102,7 +104,6 @@ export const Component: Story = { args: { isReadOnly: true, locale: "en", - colorMode: "system", content: workflowExample, }, }; diff --git a/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditorDragNDrop.stories.ts b/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditorDragNDrop.stories.tsx similarity index 89% rename from packages/serverless-workflow-diagram-editor/stories/features/DiagramEditorDragNDrop.stories.ts rename to packages/serverless-workflow-diagram-editor/stories/features/DiagramEditorDragNDrop.stories.tsx index d8a36e9d..aa6548b9 100644 --- a/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditorDragNDrop.stories.ts +++ b/packages/serverless-workflow-diagram-editor/stories/features/DiagramEditorDragNDrop.stories.tsx @@ -26,7 +26,9 @@ const meta = { parameters: { layout: "fullscreen", }, - args: {}, + render: (args, { globals }) => { + return ; + }, } satisfies Meta; export default meta; diff --git a/packages/serverless-workflow-diagram-editor/stories/features/ErrorPage.stories.tsx b/packages/serverless-workflow-diagram-editor/stories/features/ErrorPage.stories.tsx index 6417e1a6..c29b76f7 100644 --- a/packages/serverless-workflow-diagram-editor/stories/features/ErrorPage.stories.tsx +++ b/packages/serverless-workflow-diagram-editor/stories/features/ErrorPage.stories.tsx @@ -57,22 +57,20 @@ const meta = { control: { type: "select" }, options: ["light", "dark", "system"], description: - "The color mode to use for the error page. 'system' will use the user's system preference.", + "Override the global toolbar color mode for this story. Leave unset to use the toolbar value.", }, }, - args: { - colorMode: "system", + render: (args, { globals }) => { + const { title, message, snippet, colorMode } = args; + // Use story's colorMode arg if provided, otherwise use global toolbar value + const effectiveColorMode = colorMode || globals.colorMode || "system"; + + return ( + + + + ); }, - decorators: [ - (Story, context) => { - const { colorMode, ...storyArgs } = context.args; - return ( - - - - ); - }, - ], } satisfies Meta; export default meta; From bf7c913a9c84521d96a49e56971f2ba1d2a19a9c Mon Sep 17 00:00:00 2001 From: Cheryl Kong Date: Fri, 22 May 2026 11:43:40 +0100 Subject: [PATCH 5/5] feat: add @vitest/browser-playwright dependency and configure Vitest for Storybook testing Signed-off-by: Cheryl Kong --- .../package.json | 3 + .../vitest.config.ts | 35 +++- pnpm-lock.yaml | 161 +++++++++++++++++- pnpm-workspace.yaml | 1 + 4 files changed, 193 insertions(+), 7 deletions(-) diff --git a/packages/serverless-workflow-diagram-editor/package.json b/packages/serverless-workflow-diagram-editor/package.json index 50ccf70c..82e8e459 100644 --- a/packages/serverless-workflow-diagram-editor/package.json +++ b/packages/serverless-workflow-diagram-editor/package.json @@ -35,6 +35,7 @@ "build:dev": "pnpm clean && tsc -p tsconfig.json && vite build", "build:prod": "pnpm lint && pnpm clean && tsc -p tsconfig.json && vite build && pnpm test && pnpm test-e2e", "test": "vitest run --passWithNoTests", + "test:browser": "vitest run --passWithNoTests --browser.enabled=true --browser.name=playwright --browser.headless", "start": "storybook dev -p 6006 --no-open", "build:storybook": "pnpm clean:storybook && storybook build --output-dir ./dist-storybook", "test-e2e": "playwright test", @@ -65,6 +66,8 @@ "@types/node": "catalog:", "@types/react": "catalog:", "@types/react-dom": "catalog:", + "@vitest/browser": "catalog:", + "@vitest/browser-playwright": "^4.1.5", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", "jsdom": "catalog:", diff --git a/packages/serverless-workflow-diagram-editor/vitest.config.ts b/packages/serverless-workflow-diagram-editor/vitest.config.ts index be657588..b5cc3b6e 100644 --- a/packages/serverless-workflow-diagram-editor/vitest.config.ts +++ b/packages/serverless-workflow-diagram-editor/vitest.config.ts @@ -14,17 +14,48 @@ * limitations under the License. */ +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import tailwindcss from "@tailwindcss/vite"; import { defineConfig } from "vitest/config"; +import { storybookTest } from "@storybook/addon-vitest/vitest-plugin"; +import { playwright } from "@vitest/browser-playwright"; + +const dirname = + typeof __dirname !== "undefined" ? __dirname : path.dirname(fileURLToPath(import.meta.url)); export default defineConfig({ + plugins: [tailwindcss()], resolve: { tsconfigPaths: true, }, test: { globals: true, environment: "jsdom", - setupFiles: ["./tests/setupTests.ts"], - css: false, + setupFiles: ["./tests/setupTests.ts", "./.storybook/vitest.setup.ts"], + css: true, include: ["tests/**/*.test.ts", "tests/**/*.test.tsx"], + projects: [ + { + extends: true, + plugins: [ + storybookTest({ + configDir: path.join(dirname, ".storybook"), + }), + ], + test: { + name: "storybook", + browser: { + enabled: true, + headless: true, + provider: playwright({}), + instances: [{ browser: "chromium" }], + }, + globals: true, + environment: "jsdom", + setupFiles: ["./tests/setupTests.ts", "./.storybook/vitest.setup.ts"], + }, + }, + ], }, }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d8a4e79a..045fbe96 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,6 +54,9 @@ catalogs: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3 + '@vitest/browser': + specifier: ^4.1.6 + version: 4.1.7 '@vitest/coverage-v8': specifier: ^4.1.6 version: 4.1.6 @@ -219,7 +222,7 @@ importers: version: 10.4.0(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(esbuild@0.27.7)(storybook@10.4.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@testing-library/dom@10.4.1)(@types/react@19.2.14)(react-dom@19.2.6(react@19.2.6))(react@19.2.6))(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)) '@storybook/addon-vitest': specifier: 'catalog:' - version: 10.4.0(@vitest/runner@4.1.6)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(storybook@10.4.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@testing-library/dom@10.4.1)(@types/react@19.2.14)(react-dom@19.2.6(react@19.2.6))(react@19.2.6))(vitest@4.1.6) + version: 10.4.0(@vitest/browser-playwright@4.1.7)(@vitest/browser@4.1.7)(@vitest/runner@4.1.6)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(storybook@10.4.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@testing-library/dom@10.4.1)(@types/react@19.2.14)(react-dom@19.2.6(react@19.2.6))(react@19.2.6))(vitest@4.1.6) '@storybook/react-vite': specifier: 'catalog:' version: 10.4.0(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(esbuild@0.27.7)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(storybook@10.4.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@testing-library/dom@10.4.1)(@types/react@19.2.14)(react-dom@19.2.6(react@19.2.6))(react@19.2.6))(typescript@6.0.3)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)) @@ -250,9 +253,15 @@ importers: '@types/react-dom': specifier: 'catalog:' version: 19.2.3(@types/react@19.2.14) + '@vitest/browser': + specifier: 'catalog:' + version: 4.1.7(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))(vitest@4.1.6) + '@vitest/browser-playwright': + specifier: ^4.1.5 + version: 4.1.7(playwright@1.60.0)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))(vitest@4.1.6) '@vitest/coverage-v8': specifier: 'catalog:' - version: 4.1.6(vitest@4.1.6) + version: 4.1.6(@vitest/browser@4.1.7)(vitest@4.1.6) '@vitest/ui': specifier: 'catalog:' version: 4.1.6(vitest@4.1.6) @@ -288,7 +297,7 @@ importers: version: 8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0) vitest: specifier: 'catalog:' - version: 4.1.6(@types/node@25.8.0)(@vitest/coverage-v8@4.1.6)(@vitest/ui@4.1.6)(jsdom@29.1.1)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)) + version: 4.1.6(@types/node@25.8.0)(@vitest/browser-playwright@4.1.7)(@vitest/coverage-v8@4.1.6)(@vitest/ui@4.1.6)(jsdom@29.1.1)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)) packages: @@ -385,6 +394,9 @@ packages: resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} engines: {node: '>=18'} + '@blazediff/core@1.9.1': + resolution: {integrity: sha512-ehg3jIkYKulZh+8om/O25vkvSsXXwC+skXmyA87FFx6A/45eqOkZsBltMw/TVteb0mloiGT8oGRTcjRAz66zaA==} + '@bramus/specificity@2.4.2': resolution: {integrity: sha512-ctxtJ/eA+t+6q2++vj5j7FYX3nRu311q1wfYH3xjlLOsczhlhxAg2FWNUXhpGvAw3BWo1xBcvOV6/YLc2r5FJw==} hasBin: true @@ -2258,6 +2270,17 @@ packages: '@types/resolve@1.20.6': resolution: {integrity: sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==} + '@vitest/browser-playwright@4.1.7': + resolution: {integrity: sha512-OlTlJej7YN6VwV7zJJoNeaCsctF+JXpzpZ4oBHUbrQFfIq+0KW2f07rprCLh9N/zRIZ0v4Mchn1QDDmWMUhPKw==} + peerDependencies: + playwright: '*' + vitest: 4.1.7 + + '@vitest/browser@4.1.7': + resolution: {integrity: sha512-N2JFGfXoEGVAut+kHeru9dD4BUMq/q5xDvBARNl0tUsly3m5KglLOu8VO/6MkDfOlgxXTycojkt6gBKsuyR+IQ==} + peerDependencies: + vitest: 4.1.7 + '@vitest/coverage-v8@4.1.6': resolution: {integrity: sha512-36l628fQ/9a/8ihy97eOtEnvWQEdqULQOJtcaxtoNq0G1w3Mxd4szSahOaMM9/NGyZ+hyKcMtIW/WIxq0XQViQ==} peerDependencies: @@ -2284,12 +2307,26 @@ packages: vite: optional: true + '@vitest/mocker@4.1.7': + resolution: {integrity: sha512-vY7nuamKgfvpA1Koa3oYIw/k7D6kZnpGyNMZW8loow2bsBYla1TFdqTaXncWdRn4pgwNs+90RhnXhJScDwQeJA==} + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + '@vitest/pretty-format@3.2.4': resolution: {integrity: sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==} '@vitest/pretty-format@4.1.6': resolution: {integrity: sha512-h5SxD/IzNhZYnrSZRsUZQIC+vD0GY8cUvq0iwsmkFKixRCKLLWqCXa/FIQ4S1R+sI+PGoojkHsdNrbZiM9Qpgw==} + '@vitest/pretty-format@4.1.7': + resolution: {integrity: sha512-umgCarTOYQWIaDMvGDRZij+6b9oVeLIyJzfN+AS88e0ZOU3QTgNNSTtjQOpcvWr3np1N0j4WgZj+sb3oYBDscw==} + '@vitest/runner@4.1.6': resolution: {integrity: sha512-nOPCmn2+yD0ZNmKdsXGv/UxMMWbMuKeD6GyYncNwdkYDxpQvrPSKYj2rWuDjC2Y4b6w6hjip5dBKFzEUuZe3vA==} @@ -2302,6 +2339,9 @@ packages: '@vitest/spy@4.1.6': resolution: {integrity: sha512-JFKxMx6udhwKh/Ldo270e17QX710vgunMkuPAvXjHSvC6oqLWAHhVhjg/I71q0u0CBSErIODV1Kjv0FQNSWjdg==} + '@vitest/spy@4.1.7': + resolution: {integrity: sha512-kbkI5LMWakyuTIvs6fUJ5qdIVb1XVKsYJAT4OJ938cHMROYMSfmoQdZy0aaAnjbbc8F61vkoTqz/Az+/HiIu5Q==} + '@vitest/ui@4.1.6': resolution: {integrity: sha512-wiu5em68DfGv/2HFvI1Njr7JI2CHcBlQvereSzVG8my53PRxjTNOCsD9VOkRKrsJBDHmyuXvosxWZw7T91a2mw==} peerDependencies: @@ -2313,6 +2353,9 @@ packages: '@vitest/utils@4.1.6': resolution: {integrity: sha512-FxIY+U81R3LGKCxaHHFRQ5+g6/iRgGLmeHWdp2Amj4ljQRrEIWHmZyDfDYBRZlpyqA7qKxtS9DD1dhk8RnRIVQ==} + '@vitest/utils@4.1.7': + resolution: {integrity: sha512-T532WBu791cBxJlCl6SO+J14l81DQx6uQHm1bQbmCDY7nqlEIgkza/UFnSBNaUtSf41unldDFjdOBYEQC4b5Hw==} + '@webcontainer/env@1.1.1': resolution: {integrity: sha512-6aN99yL695Hi9SuIk1oC88l9o0gmxL1nGWWQ/kNy81HigJ0FoaoTXpytCj6ItzgyCEwA9kF1wixsTuv5cjsgng==} @@ -3008,6 +3051,10 @@ packages: engines: {node: '>=18'} hasBin: true + pngjs@7.0.0: + resolution: {integrity: sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==} + engines: {node: '>=14.19.0'} + postcss@8.5.14: resolution: {integrity: sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==} engines: {node: ^10 || ^12 || >=14} @@ -3678,6 +3725,8 @@ snapshots: '@bcoe/v8-coverage@1.0.2': {} + '@blazediff/core@1.9.1': {} + '@bramus/specificity@2.4.2': dependencies: css-tree: 3.2.1 @@ -4981,14 +5030,16 @@ snapshots: - vite - webpack - '@storybook/addon-vitest@10.4.0(@vitest/runner@4.1.6)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(storybook@10.4.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@testing-library/dom@10.4.1)(@types/react@19.2.14)(react-dom@19.2.6(react@19.2.6))(react@19.2.6))(vitest@4.1.6)': + '@storybook/addon-vitest@10.4.0(@vitest/browser-playwright@4.1.7)(@vitest/browser@4.1.7)(@vitest/runner@4.1.6)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(storybook@10.4.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@testing-library/dom@10.4.1)(@types/react@19.2.14)(react-dom@19.2.6(react@19.2.6))(react@19.2.6))(vitest@4.1.6)': dependencies: '@storybook/global': 5.0.0 '@storybook/icons': 2.0.2(react-dom@19.2.6(react@19.2.6))(react@19.2.6) storybook: 10.4.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@testing-library/dom@10.4.1)(@types/react@19.2.14)(react-dom@19.2.6(react@19.2.6))(react@19.2.6) optionalDependencies: + '@vitest/browser': 4.1.7(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))(vitest@4.1.6) + '@vitest/browser-playwright': 4.1.7(playwright@1.60.0)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))(vitest@4.1.6) '@vitest/runner': 4.1.6 - vitest: 4.1.6(@types/node@25.8.0)(@vitest/coverage-v8@4.1.6)(@vitest/ui@4.1.6)(jsdom@29.1.1)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)) + vitest: 4.1.6(@types/node@25.8.0)(@vitest/browser-playwright@4.1.7)(@vitest/coverage-v8@4.1.6)(@vitest/ui@4.1.6)(jsdom@29.1.1)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)) transitivePeerDependencies: - react - react-dom @@ -5248,6 +5299,52 @@ snapshots: '@types/resolve@1.20.6': {} + '@vitest/browser-playwright@4.1.7(playwright@1.60.0)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))(vitest@4.1.6)': + dependencies: + '@vitest/browser': 4.1.7(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))(vitest@4.1.6) + '@vitest/mocker': 4.1.7(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)) + playwright: 1.60.0 + tinyrainbow: 3.1.0 + vitest: 4.1.6(@types/node@25.8.0)(@vitest/browser-playwright@4.1.7)(@vitest/coverage-v8@4.1.6)(@vitest/ui@4.1.6)(jsdom@29.1.1)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)) + transitivePeerDependencies: + - bufferutil + - msw + - utf-8-validate + - vite + + '@vitest/browser@4.1.7(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))(vitest@4.1.6)': + dependencies: + '@blazediff/core': 1.9.1 + '@vitest/mocker': 4.1.7(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)) + '@vitest/utils': 4.1.7 + magic-string: 0.30.21 + pngjs: 7.0.0 + sirv: 3.0.2 + tinyrainbow: 3.1.0 + vitest: 4.1.6(@types/node@25.8.0)(@vitest/browser-playwright@4.1.7)(@vitest/coverage-v8@4.1.6)(@vitest/ui@4.1.6)(jsdom@29.1.1)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)) + ws: 8.20.1 + transitivePeerDependencies: + - bufferutil + - msw + - utf-8-validate + - vite + + '@vitest/coverage-v8@4.1.6(@vitest/browser@4.1.7)(vitest@4.1.6)': + dependencies: + '@bcoe/v8-coverage': 1.0.2 + '@vitest/utils': 4.1.6 + ast-v8-to-istanbul: 1.0.0 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-report: 3.0.1 + istanbul-reports: 3.2.0 + magicast: 0.5.3 + obug: 2.1.1 + std-env: 4.1.0 + tinyrainbow: 3.1.0 + vitest: 4.1.6(@types/node@25.8.0)(@vitest/browser-playwright@4.1.7)(@vitest/coverage-v8@4.1.6)(@vitest/ui@4.1.6)(jsdom@29.1.1)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)) + optionalDependencies: + '@vitest/browser': 4.1.7(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))(vitest@4.1.6) + '@vitest/coverage-v8@4.1.6(vitest@4.1.6)': dependencies: '@bcoe/v8-coverage': 1.0.2 @@ -5261,6 +5358,7 @@ snapshots: std-env: 4.1.0 tinyrainbow: 3.1.0 vitest: 4.1.6(@types/node@25.8.0)(@vitest/coverage-v8@4.1.6)(@vitest/ui@4.1.6)(jsdom@29.1.1)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)) + optional: true '@vitest/expect@3.2.4': dependencies: @@ -5287,6 +5385,14 @@ snapshots: optionalDependencies: vite: 8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0) + '@vitest/mocker@4.1.7(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))': + dependencies: + '@vitest/spy': 4.1.7 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0) + '@vitest/pretty-format@3.2.4': dependencies: tinyrainbow: 2.0.0 @@ -5295,6 +5401,10 @@ snapshots: dependencies: tinyrainbow: 3.1.0 + '@vitest/pretty-format@4.1.7': + dependencies: + tinyrainbow: 3.1.0 + '@vitest/runner@4.1.6': dependencies: '@vitest/utils': 4.1.6 @@ -5313,6 +5423,8 @@ snapshots: '@vitest/spy@4.1.6': {} + '@vitest/spy@4.1.7': {} + '@vitest/ui@4.1.6(vitest@4.1.6)': dependencies: '@vitest/utils': 4.1.6 @@ -5336,6 +5448,12 @@ snapshots: convert-source-map: 2.0.0 tinyrainbow: 3.1.0 + '@vitest/utils@4.1.7': + dependencies: + '@vitest/pretty-format': 4.1.7 + convert-source-map: 2.0.0 + tinyrainbow: 3.1.0 + '@webcontainer/env@1.1.1': {} '@xyflow/react@12.10.2(@types/react@19.2.14)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)': @@ -6016,6 +6134,8 @@ snapshots: optionalDependencies: fsevents: 2.3.2 + pngjs@7.0.0: {} + postcss@8.5.14: dependencies: nanoid: 3.3.12 @@ -6442,6 +6562,37 @@ snapshots: jiti: 2.7.0 yaml: 2.9.0 + vitest@4.1.6(@types/node@25.8.0)(@vitest/browser-playwright@4.1.7)(@vitest/coverage-v8@4.1.6)(@vitest/ui@4.1.6)(jsdom@29.1.1)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)): + dependencies: + '@vitest/expect': 4.1.6 + '@vitest/mocker': 4.1.6(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)) + '@vitest/pretty-format': 4.1.6 + '@vitest/runner': 4.1.6 + '@vitest/snapshot': 4.1.6 + '@vitest/spy': 4.1.6 + '@vitest/utils': 4.1.6 + es-module-lexer: 2.1.0 + expect-type: 1.3.0 + magic-string: 0.30.21 + obug: 2.1.1 + pathe: 2.0.3 + picomatch: 4.0.4 + std-env: 4.1.0 + tinybench: 2.9.0 + tinyexec: 1.1.2 + tinyglobby: 0.2.16 + tinyrainbow: 3.1.0 + vite: 8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 25.8.0 + '@vitest/browser-playwright': 4.1.7(playwright@1.60.0)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))(vitest@4.1.6) + '@vitest/coverage-v8': 4.1.6(@vitest/browser@4.1.7)(vitest@4.1.6) + '@vitest/ui': 4.1.6(vitest@4.1.6) + jsdom: 29.1.1 + transitivePeerDependencies: + - msw + vitest@4.1.6(@types/node@25.8.0)(@vitest/coverage-v8@4.1.6)(@vitest/ui@4.1.6)(jsdom@29.1.1)(vite@8.0.13(@types/node@25.8.0)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)): dependencies: '@vitest/expect': 4.1.6 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 7abaf456..c06d60cc 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -17,6 +17,7 @@ catalog: "@types/node": ^25.7.0 "@types/react": ^19.2.14 "@types/react-dom": ^19.2.3 + "@vitest/browser": ^4.1.6 "@vitest/coverage-v8": ^4.1.6 "@vitest/ui": ^4.1.6 "@xyflow/react": ^12.10.2