diff --git a/index.d.ts b/index.d.ts index fbecf45..dee1e19 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,13 +1,13 @@ import type { SvelteComponentTyped, SvelteComponent } from 'svelte'; -import type { Addon_BaseMeta as BaseMeta, Addon_BaseAnnotations as BaseAnnotations, StoryContext } from '@storybook/types'; +import type { Addon_BaseMeta as BaseMeta, Addon_BaseAnnotations as BaseAnnotations, StoryContext, WebRenderer } from '@storybook/types'; -type DecoratorReturnType = void|SvelteComponent|{ +type DecoratorReturnType = void | SvelteComponent | { Component: any, props?: any } -interface StoryProps extends BaseAnnotations { +interface StoryProps extends BaseAnnotations { /** * Id of the story. * @@ -32,7 +32,7 @@ interface StoryProps extends BaseAnnotations { * If source is true, then the source of the story will be used instead. * If source is a string, it replaces the source of the story. */ - source?: boolean|string + source?: boolean | string } interface TemplateProps extends BaseAnnotations { @@ -54,7 +54,7 @@ interface Slots { /** * Meta. */ -export class Meta extends SvelteComponentTyped & BaseAnnotations> {} +export class Meta extends SvelteComponentTyped & BaseAnnotations> { } /** * Story. */ diff --git a/package.json b/package.json index c13c838..4dd449f 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "@storybook/svelte": "^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0", "@storybook/svelte-webpack5": "^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0", "@storybook/testing-library": "^0.0.13", + "@storybook/types": "^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0", "auto": "^10.43.0", "babel-jest": "^29.5.0", "babel-loader": "^8.1.0", diff --git a/yarn.lock b/yarn.lock index 0ab651c..bd46476 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3263,6 +3263,11 @@ resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-7.0.0-rc.11.tgz#9f8d43f5a78e3d286b0399e0188beac32e9a10a5" integrity sha512-MyY8tZPwCW9JjOvpFCDWZDqqnh0DnDt/iwOyFr9W4b5K/oGkTtZaVOMp0pq6nhjhDEOIp4p4MnSu/Sh1qZroKw== +"@storybook/channels@7.0.20": + version "7.0.20" + resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-7.0.20.tgz#a681c3d463b4099b001dae9edeb3a607a8f4854a" + integrity sha512-AL5GGSQ8WTDUoh3gitKEzo3fu7Vq5okXq2pAknAZlQA2Oio+HHO5nMeXvOfGdvo/tzbpNE3n5utmCJz006xrCA== + "@storybook/cli@7.0.0-rc.11": version "7.0.0-rc.11" resolved "https://registry.yarnpkg.com/@storybook/cli/-/cli-7.0.0-rc.11.tgz#1ee39807173ffe5d6586b0bf8d487553b954b4d5" @@ -3821,6 +3826,16 @@ "@types/express" "^4.7.0" file-system-cache "^2.0.0" +"@storybook/types@^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0": + version "7.0.20" + resolved "https://registry.yarnpkg.com/@storybook/types/-/types-7.0.20.tgz#6aadc565f5894512b7f8da2aea9cac9448160519" + integrity sha512-Z7RhHRnhrPd2jXPZtjbOILj1QgylqlsD3cFIYMcSz3yvUvxLRx3BKCftXyFbIuxr0QoCJE38adRp7YGO9uJnQQ== + dependencies: + "@storybook/channels" "7.0.20" + "@types/babel__core" "^7.0.0" + "@types/express" "^4.7.0" + file-system-cache "^2.0.0" + "@szmarczak/http-timer@^4.0.5": version "4.0.6" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807"