Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Releases: storybookjs/addon-svelte-csf

v5.0.7

14 Jul 07:40
Compare
Choose a tag to compare
Loading

🐛 Bug Fix

Authors: 1

Assets2
Loading

v5.0.6

04 Jul 06:09
Compare
Choose a tag to compare
Loading

🐛 Bug Fix

Authors: 1

Loading

v5.0.5

03 Jul 12:57
Compare
Choose a tag to compare
Loading

🐛 Bug Fix

Authors: 1

Loading

v5.0.4

24 Jun 13:39
Compare
Choose a tag to compare
Loading

🐛 Bug Fix

Authors: 1

Loading

v5.0.3

28 May 13:39
Compare
Choose a tag to compare
Loading

🐛 Bug Fix

  • Drop support for 9.0.0 prereleases, add support for 9.1.0 prereleases#312 (@JReinhold)

Authors: 1

Loading

v5.0.2

28 May 13:26
Compare
Choose a tag to compare
Loading

🐛 Bug Fix

Authors: 2

Loading

v5.0.1

18 May 11:15
Compare
Choose a tag to compare
Loading

🐛 Bug Fix

  • fix: Allow user-defined local variablemeta in stories#309 (@xeho91)

Authors: 1

Loading

v5.0.0

06 May 19:48
Compare
Choose a tag to compare
Loading

5.0.0

Svelte CSF 5.0 is here

It brings support for Svelte 5, and major improvements to the Svelte CSF syntax, including

  • ✂️ Snippet-based API for stories
  • 🔬 Smaller bundle size
  • 🛟 Type-safe stories and meta definitions
  • 📚 Improveddocumentation andexamples

Please checkout ourMigration Guide to upgrade from earlier versions of the Svelte CSF addon. You can usethe Legacy API flag to gradually migrate your stories to the new syntax. The biggest breaking change is that it now requires Svelte 5.

💥 Breaking Change

🚀 Enhancement

🐛 Bug Fix

🏠 Internal

📝 Documentation

🧪 Tests

Authors: 12

Read more
Loading
xeho91, NeroBlackstone, JReinhold, maddesigns, and jan-bartunek-myriad reacted with hooray emoji
5 people reacted

v5.0.0-next.30

06 May 19:17
0e01dcf
This commit was created on GitHub.com and signed with GitHub’sverified signature.
GPG key ID:B5690EEEBB952194
Verified
Learn about vigilant mode.
Compare
Choose a tag to compare
Loading
v5.0.0-next.30Pre-release
Pre-release

🐛 Bug Fix

🏠 Internal

  • chore(deps): Remove unusedsvelte-preprocess#300 (@xeho91)

📝 Documentation

Authors: 2

Loading

v5.0.0-next.29

29 Apr 13:49
03f4f29
This commit was created on GitHub.com and signed with GitHub’sverified signature.
GPG key ID:B5690EEEBB952194
Verified
Learn about vigilant mode.
Compare
Choose a tag to compare
Loading
v5.0.0-next.29Pre-release
Pre-release

Release Notes

Breaking: Add support forrender indefineMeta, replacingsetTemplate-function (#295)

setTemplate-function removed in favor ofrender indefineMeta

ThesetTemplate-function has been removed. Instead reference your default snippet with therender-property indefineMeta:

<script module>- import { defineMeta, setTemplate } from '@storybook/addon-svelte-csf';+ import { defineMeta } from '@storybook/addon-svelte-csf';  import MyComponent from './MyComponent.svelte';  const { Story } = defineMeta({    /* ... */+   render: template  });</script>-<script>-  setTemplate(template);-</script>{#snippet template(args)}  <MyComponent {...args}>    ...  </MyComponent>{/snippet}<Story name="With Default Template" />

This new API achieves the same thing, but in a less verbose way, and is closer aligned with Storybook's regular CSF. 🎉

Important

There is currently a bug in the Svelte language tools, which causes TypeScript to error withTS(2448): Block-scoped variable 'SNIPPET_NAMAE' used before its declaration.. Until that is fixed, you have to silent it with//@ts-ignore or//@ts-expect-error. Seesveltejs/language-tools#2653

Breaking: Renamechildren prop totemplate, requireasChild for static stories (#228)

This release contains breaking changes related to thechildren-API. The legacy API stays as-is to maintain backwards compatibility.

children renamed totemplate

Thechildren-prop andchildren-snippet onStory has been renamed totemplate, to align better with Svelte's API and not be confused with Svelte's defaultchildren-snippet. If you have any stories using thechildren prop or snippet, you need to migrate them:

{#snippet template()}  ...{/snippet}-<Story name="MyStory" children={template} />+<Story name="MyStory" template={template} /><Story name="MyStory">-  {#snippet children(args)}+  {#snippet template(args)}    <MyComponent />  {/snippet}</Story>

Story children are now forwarded to components

Previously, to define static stories, you would just add children to aStory, and they would be the full story. To make it easier to passchildren to your components in stories, the children are now instead forwarded to the component instead of replacing it completely.

Previously:

<scriptmodule>import {defineMeta }from'@storybook/addon-svelte-csf';importMyComponentfrom'./MyComponent.svelte';const {Story }=defineMeta({    component: MyComponent,  });</script><!--This story renders:This would be the full story, ignoring the MyComponent in the meta--><Storyname="Static Story">  This would be the full story, ignoring the MyComponent in the meta</Story>

Now:

<scriptmodule>import {defineMeta }from'@storybook/addon-svelte-csf';importMyComponentfrom'./MyComponent.svelte';const {Story }=defineMeta({    component: MyComponent,  });</script><!--This story renders:<MyComponent>  This is now forwarded to the component</MyComponent>--><Storyname="MyComponent children">  This is now forwarded to the component</Story>

To get the same behavior as previously, a newasChild boolean prop has been introduced on theStory component.asChild is a common prop in UI libraries, where you want thechildren tobe the output, instead of just being children of the Component. By adding that you can get the old behavior back, when you need more control over what the story renders:

<scriptmodule>import {defineMeta }from'@storybook/addon-svelte-csf';importMyComponentfrom'./MyComponent.svelte';const {Story }=defineMeta({    component: MyComponent,  });</script><!--This story renders:This is the full story, ignoring the MyComponent in the meta--><Storyname="Static Story"asChild>  This is the full story, ignoring the MyComponent in the meta</Story>

💥 Breaking Change

  • Breaking: Add support forrender indefineMeta, replacingsetTemplate-function#295 (@JReinhold)
  • Breaking: Renamechildren prop totemplate, requireasChild for static stories#228 (@xeho91@JReinhold)

🚀 Enhancement

🐛 Bug Fix

🏠 Internal

📝 Documentation

Authors: 3

Loading
Previous1345910
Previous

[8]ページ先頭

©2009-2025 Movatter.jp