Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: Prerelease 8.6.0-alpha.4 #30439

Merged
merged 45 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
d88c49b
Docs: Add Preact-vite framework docs
shilman Jan 16, 2025
d2257ae
upgrade typescript
ndelangen Jan 23, 2025
5c2ac4a
reset the public use of typescript to broader version range
ndelangen Jan 23, 2025
1c4015a
fixes
ndelangen Jan 23, 2025
eb293ac
attempt fixes
ndelangen Jan 23, 2025
1fdd771
related upgrades
ndelangen Jan 23, 2025
c60a752
fix mismatching peerDep on vite in svelte
ndelangen Jan 23, 2025
0afec40
bump versions in lockfile
ndelangen Jan 23, 2025
5137a26
docs: Update Next.js Tailwind example link
yatishgoel Jan 29, 2025
6ffe9b1
Merge branch 'next' into fix/nextjs-tailwind-link
yatishgoel Jan 30, 2025
c5674a8
Merge branch 'next' into norbert/typescript-upgrade
ndelangen Jan 30, 2025
c4c3c91
fix lockfiles
ndelangen Jan 30, 2025
a5ef270
make types checks less strict
ndelangen Jan 30, 2025
2543eb1
use verbatimModuleSyntax in svelte renderer
JReinhold Jan 30, 2025
e12c1d4
Merge branch 'norbert/typescript-upgrade' of github.com:storybookjs/s…
JReinhold Jan 30, 2025
84fe244
fix
ndelangen Jan 30, 2025
08832a8
fix svelte type test
JReinhold Jan 30, 2025
86f6f30
Merge branch 'norbert/typescript-upgrade' of github.com:storybookjs/s…
JReinhold Jan 30, 2025
581e837
improve
ndelangen Jan 30, 2025
c605c85
fix svelte type imports
JReinhold Jan 30, 2025
3f0a7c5
Merge pull request #30354 from storybookjs/norbert/typescript-upgrade
ndelangen Jan 30, 2025
08c24d2
Merge branch 'next' into fix/nextjs-tailwind-link
jonniebigodes Jan 30, 2025
4c298be
Merge pull request #30412 from yatishgoel/fix/nextjs-tailwind-link
jonniebigodes Jan 31, 2025
4aec7ef
Build: Add flag to skip nx cache
yannbf Jan 31, 2025
0217bf9
Minor adjustments
jonniebigodes Jan 31, 2025
1131282
Merge branch 'next' into shilman/preact-framework-page
shilman Feb 1, 2025
4751127
Merge pull request #30271 from storybookjs/shilman/preact-framework-page
shilman Feb 1, 2025
d79d0cb
RNW-Vite: Fix typos
shilman Feb 1, 2025
dca5ced
Merge pull request #30437 from storybookjs/shilman/fix-rnw-vite-docs
shilman Feb 1, 2025
cc7d0f5
Vite: Fix add component UI invalidation
shilman Feb 1, 2025
1c7bb67
Merge pull request #30438 from storybookjs/shilman/30431-fix-vite-add…
shilman Feb 1, 2025
ba47d3e
Update CHANGELOG.md for v8.5.3 [skip ci]
storybook-bot Feb 1, 2025
6e0c6f1
Addon A11y: Make Vitest Axe optional
valentinpalkovic Feb 3, 2025
8569d2c
Remove peer-dependency requirement
valentinpalkovic Feb 4, 2025
b2d8a3c
Merge pull request #30442 from storybookjs/valentin/make-vitest-axe-o…
valentinpalkovic Feb 4, 2025
131285c
Build: Update NX
valentinpalkovic Feb 4, 2025
0474454
Build: Set TypeScript resolution for sandbox generation
valentinpalkovic Feb 4, 2025
c95dc3c
Merge pull request #30433 from storybookjs/yann/add-nx-cache-skip
yannbf Feb 4, 2025
af66c82
Merge pull request #30460 from storybookjs/valentin/update-nx
valentinpalkovic Feb 4, 2025
9c05f2b
Merge pull request #30461 from storybookjs/valentin/fix-local-sandbox…
valentinpalkovic Feb 4, 2025
2e7da03
Builder-Vite: Add logic to set allowedHosts
JSMike Jan 31, 2025
594ae92
UI: Fix default selected addon panel
shilman Feb 5, 2025
e80ab8d
Merge pull request #30464 from storybookjs/shilman/restore-default-se…
shilman Feb 5, 2025
cfedafb
Merge pull request #30432 from JSMike/issue-30338-vite-allowedHosts
shilman Feb 5, 2025
2c62084
Write changelog for 8.6.0-alpha.4 [skip ci]
storybook-bot Feb 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 3 additions & 46 deletions code/frameworks/preact-vite/README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,4 @@
# Storybook for Preact <!-- omit in toc -->
# Storybook for Preact & Vite

## Requirements

- [Preact](https://preactjs.com/) >= 10.x
- [Storybook](https://storybook.js.org/) >= 7.x

## Getting Started

### In a project without Storybook

Follow the prompts after running this command in your Preact project's root directory:

```bash
npx storybook@latest init
```

[More on getting started with Storybook](https://storybook.js.org/docs/get-started/install?renderer=preact)

### In a project with Storybook

This framework is designed to work with Storybook 7. If you’re not already using v7, upgrade with this command:

```bash
npx storybook@latest upgrade
```

#### Manual migration

Install the framework:

```bash
yarn add --dev @storybook/preact-vite
```

Update your `main.js` to change the framework property:

```js
// .storybook/main.js
export default {
// ...
framework: {
name: '@storybook/preact-vite', // <- Change this
options: {},
},
};
```
See [documentation](https://storybook.js.org/docs/get-started/frameworks/preact-vite?renderer=preact) for installation instructions, usage examples, APIs, and more.
`;
19 changes: 19 additions & 0 deletions docs/_snippets/preact-vite-add-framework.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
```js filename=".storybook/main.js" renderer="preact" language="js"
export default {
// ...
// framework: '@storybook/preact-webpack5', 👈 Remove this
framework: '@storybook/preact-vite', // 👈 Add this
};
```

```ts filename=".storybook/main.ts" renderer="preact" language="ts"
import { StorybookConfig } from '@storybook/preact-vite';

const config: StorybookConfig = {
// ...
// framework: '@storybook/preact-webpack5', 👈 Remove this
framework: '@storybook/preact-vite', // 👈 Add this
};

export default config;
```
25 changes: 25 additions & 0 deletions docs/_snippets/preact-vite-framework-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
```js filename=".storybook/main.js" renderer="preact" language="js"
export default {
framework: {
name: '@storybook/preact-vite',
options: {
// ...
},
},
};
```

```ts filename=".storybook/main.ts" renderer="preact" language="ts"
import type { StorybookConfig } from '@storybook/preact-vite';

const config: StorybookConfig = {
framework: {
name: '@storybook/preact-vite',
options: {
// ...
},
},
};

export default config;
```
11 changes: 11 additions & 0 deletions docs/_snippets/preact-vite-install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
```shell renderer="preact" language="js" packageManager="npm"
npm install --save-dev @storybook/preact-vite
```

```shell renderer="preact" language="js" packageManager="pnpm"
pnpm add --save-dev @storybook/preact-vite
```

```shell renderer="preact" language="js" packageManager="yarn"
yarn add --dev @storybook/preact-vite
```
94 changes: 94 additions & 0 deletions docs/get-started/frameworks/preact-vite.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: Storybook for Preact & Vite
sidebar:
order: 3
title: Preact & Vite
---

Storybook for Preact & Vite is a [framework](../../contribute/framework.mdx) that makes it easy to develop and test UI components in isolation for [Preact](https://preactjs.com/) applications built with [Vite](https://vitejs.dev/). It includes:

* 🏎️ Pre-bundled for performance
* 🪄 Zero config
* 💫 and more!

<If notRenderer="preact">
<Callout variant="info">
Storybook for Preact & Vite is only supported in [Preact](?renderer=preact) projects.
</Callout>

{/* End non-supported renderers */}
</If>

<If renderer="preact">
## Requirements

* Preact 8.x || 10.x
* Vite ≥ 4.0
* Storybook ≥ 8.0

## Getting started

### In a project without Storybook

Follow the prompts after running this command in your Preact project's root directory:

{/* prettier-ignore-start */}

<CodeSnippets path="init-command.md" />

{/* prettier-ignore-end */}

[More on getting started with Storybook.](../install.mdx)

### In a project with Storybook

This framework is designed to work with Storybook 7+. If you’re not already using v7, upgrade with this command:

{/* prettier-ignore-start */}

<CodeSnippets path="storybook-upgrade.md" />

{/* prettier-ignore-end */}

#### Automatic migration

When running the `upgrade` command above, you should get a prompt asking you to migrate to `@storybook/preact-vite`, which should handle everything for you. In case that auto-migration does not work for your project, refer to the manual migration below.

#### Manual migration

First, install the framework:

{/* prettier-ignore-start */}

<CodeSnippets path="preact-vite-install.md" />

{/* prettier-ignore-end */}

Then, update your `.storybook/main.js|ts` to change the framework property:

{/* prettier-ignore-start */}

<CodeSnippets path="preact-vite-add-framework.md" />

{/* prettier-ignore-end */}

## API

### Options

You can pass an options object for additional configuration if needed:

{/* prettier-ignore-start */}

<CodeSnippets path="preact-vite-framework-options.md" />

{/* prettier-ignore-end */}

#### `builder`

Type: `Record<string, any>`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider adding more specific type information beyond Record<string, any>


Configure options for the [framework's builder](../../api/main-config/main-config-framework.mdx#optionsbuilder). For this framework, available options can be found in the [Vite builder docs](../../builders/vite.mdx).

{/* End supported renderers */}
</If>
2 changes: 1 addition & 1 deletion docs/get-started/frameworks/react-native-web-vite.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Storybook for React Native Web
sidebar:
order: 5
order: 6
title: React Native Web
---

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/frameworks/react-vite.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Storybook for React & Vite
sidebar:
order: 3
order: 4
title: React & Vite
---

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/frameworks/react-webpack5.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Storybook for React & Webpack
sidebar:
order: 4
order: 5
title: React & Webpack
---

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/frameworks/svelte-vite.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Storybook for Svelte & Vite
sidebar:
order: 7
order: 8
title: Svelte & Vite
---

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/frameworks/svelte-webpack5.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Storybook for Svelte & Webpack
sidebar:
order: 8
order: 9
title: Svelte & Webpack
---

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/frameworks/sveltekit.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Storybook for SvelteKit
sidebar:
order: 6
order: 7
title: SvelteKit
---

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/frameworks/vue3-vite.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Storybook for Vue & Vite
sidebar:
order: 9
order: 10
title: Vue & Vite
---

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/frameworks/vue3-webpack5.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Storybook for Vue & Webpack
sidebar:
order: 10
order: 11
title: Vue & Webpack
---

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/frameworks/web-components-vite.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Storybook for Web components & Vite
sidebar:
order: 11
order: 12
title: Web components & Vite
---

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/frameworks/web-components-webpack5.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Storybook for Web components & Webpack
sidebar:
order: 12
order: 13
title: Web components & Webpack
---

Expand Down
Loading