diff --git a/app/svelte3/.eslintrc.js b/app/svelte3/.eslintrc.js
new file mode 100644
index 000000000000..cd50415d1647
--- /dev/null
+++ b/app/svelte3/.eslintrc.js
@@ -0,0 +1,12 @@
+module.exports = {
+ extends: '../../.eslintrc.js',
+ overrides: [
+ {
+ files: ['*.svelte'],
+ plugins: ['svelte3'],
+ rules: {
+ 'import/no-mutable-exports': 'off',
+ },
+ },
+ ],
+};
diff --git a/app/svelte3/.npmignore b/app/svelte3/.npmignore
new file mode 100644
index 000000000000..6d236e2ff68d
--- /dev/null
+++ b/app/svelte3/.npmignore
@@ -0,0 +1,2 @@
+docs
+.babelrc
diff --git a/app/svelte3/README.md b/app/svelte3/README.md
new file mode 100644
index 000000000000..630698b39911
--- /dev/null
+++ b/app/svelte3/README.md
@@ -0,0 +1,32 @@
+# Storybook for Svelte
+
+Storybook for Svelte is a UI development environment for your Svelte components.
+With it, you can visualize different states of your UI components and develop them interactively.
+
+
+
+Storybook runs outside of your app.
+So you can develop UI components in isolation without worrying about app specific dependencies and requirements.
+
+## Getting Started
+
+```sh
+cd my-svelte-app
+npx -p @storybook/cli sb init
+```
+
+For more information visit: [storybook.js.org](https://storybook.js.org)
+
+---
+
+Storybook also comes with a lot of [addons](https://storybook.js.org/addons/introduction) and a great API to customize as you wish.
+You can also build a [static version](https://storybook.js.org/basics/exporting-storybook) of your storybook and deploy it anywhere you want.
+
+## TODOs
+
+- [ ] Support `addon-info`
+- [ ] Support Svelte markup directly in stories
+- [ ] Add Svelte storybook generator
+- [ ] Provide stories that show advanced Svelte use cases
+- [ ] Hydratable
+- [ ] Advanced mount options
diff --git a/app/svelte3/bin/build.js b/app/svelte3/bin/build.js
new file mode 100755
index 000000000000..410ac35d845e
--- /dev/null
+++ b/app/svelte3/bin/build.js
@@ -0,0 +1,5 @@
+#!/usr/bin/env node
+
+process.env.NODE_ENV = process.env.NODE_ENV || 'production';
+
+require('../dist/server/build');
diff --git a/app/svelte3/bin/index.js b/app/svelte3/bin/index.js
new file mode 100755
index 000000000000..2e96258ce63d
--- /dev/null
+++ b/app/svelte3/bin/index.js
@@ -0,0 +1,3 @@
+#!/usr/bin/env node
+
+require('../dist/server');
diff --git a/app/svelte3/package.json b/app/svelte3/package.json
new file mode 100644
index 000000000000..31ce95f561cc
--- /dev/null
+++ b/app/svelte3/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "@storybook/svelte3",
+ "version": "5.1.1",
+ "description": "Storybook for Svelte3: Develop Svelte Component in isolation with Hot Reloading.",
+ "keywords": [
+ "storybook"
+ ],
+ "homepage": "https://github.com/storybookjs/storybook/tree/master/app/svelte3",
+ "bugs": {
+ "url": "https://github.com/storybookjs/storybook/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/storybookjs/storybook.git",
+ "directory": "app/svelte3"
+ },
+ "license": "MIT",
+ "main": "dist/client/index.js",
+ "jsnext:main": "src/client/index.js",
+ "bin": {
+ "build-storybook": "./bin/build.js",
+ "start-storybook": "./bin/index.js",
+ "storybook-server": "./bin/index.js"
+ },
+ "scripts": {
+ "prepare": "node ../../scripts/prepare.js",
+ "watch": "node ../../scripts/watch-babel.js"
+ },
+ "dependencies": {
+ "@storybook/core": "5.1.1",
+ "@storybook/addon-centered": "5.1.1",
+ "common-tags": "^1.8.0",
+ "core-js": "^3.0.1",
+ "eslint-plugin-svelte3": "^1.2.3",
+ "global": "^4.3.2",
+ "lodash": "^4.17.11",
+ "regenerator-runtime": "^0.12.1"
+ },
+ "devDependencies": {
+ "svelte": "^3.4.1",
+ "svelte-loader": "^2.13.4"
+ },
+ "peerDependencies": {
+ "babel-loader": "^7.0.0 || ^8.0.0",
+ "svelte": "^3.2",
+ "svelte-loader": "^2.13"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ }
+}
diff --git a/app/svelte3/src/addons/centered/Centered.svelte b/app/svelte3/src/addons/centered/Centered.svelte
new file mode 100644
index 000000000000..1b351b0d0df6
--- /dev/null
+++ b/app/svelte3/src/addons/centered/Centered.svelte
@@ -0,0 +1,17 @@
+
+
+
/svelte-transform',
+ },
+ moduleFileExtensions: [...config.moduleFileExtensions, 'svelte'],
+};
diff --git a/examples/svelte3-kitchen-sink/package.json b/examples/svelte3-kitchen-sink/package.json
new file mode 100644
index 000000000000..e7890d23059c
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "svelte3-example",
+ "version": "5.1.1",
+ "private": true,
+ "scripts": {
+ "build-storybook": "build-storybook -s public",
+ "now-build": "node ../../scripts/bootstrap --core && yarn run build-storybook --quiet",
+ "storybook": "start-storybook -p 9009 -s public"
+ },
+ "dependencies": {
+ "global": "^4.3.2",
+ "svelte": "^3.4.1"
+ },
+ "devDependencies": {
+ "@storybook/addon-a11y": "5.1.1",
+ "@storybook/addon-actions": "5.1.1",
+ "@storybook/addon-backgrounds": "5.1.1",
+ "@storybook/addon-centered": "5.1.1",
+ "@storybook/addon-knobs": "5.1.1",
+ "@storybook/addon-links": "5.1.1",
+ "@storybook/addon-notes": "5.1.1",
+ "@storybook/addon-options": "5.1.1",
+ "@storybook/addon-storyshots": "5.1.1",
+ "@storybook/addon-storysource": "5.1.1",
+ "@storybook/addon-viewport": "5.1.1",
+ "@storybook/addons": "5.1.1",
+ "@storybook/svelte3": "5.1.1"
+ }
+}
diff --git a/examples/svelte3-kitchen-sink/public/favicon.ico b/examples/svelte3-kitchen-sink/public/favicon.ico
new file mode 100644
index 000000000000..9e9c880c25b3
Binary files /dev/null and b/examples/svelte3-kitchen-sink/public/favicon.ico differ
diff --git a/examples/svelte3-kitchen-sink/public/svelte-logo-horizontal.svg b/examples/svelte3-kitchen-sink/public/svelte-logo-horizontal.svg
new file mode 100644
index 000000000000..1d602a905142
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/public/svelte-logo-horizontal.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/examples/svelte3-kitchen-sink/src/components/Button.stories.svelte b/examples/svelte3-kitchen-sink/src/components/Button.stories.svelte
new file mode 100644
index 000000000000..3846240ba158
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/components/Button.stories.svelte
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/examples/svelte3-kitchen-sink/src/components/Button.svelte b/examples/svelte3-kitchen-sink/src/components/Button.svelte
new file mode 100644
index 000000000000..c4113b707405
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/components/Button.svelte
@@ -0,0 +1,38 @@
+
+
+
+
+
+ {rounded ? 'Round' : 'Square'} corners
+ {text}
+
+
diff --git a/examples/svelte3-kitchen-sink/src/components/Button.test.js b/examples/svelte3-kitchen-sink/src/components/Button.test.js
new file mode 100644
index 000000000000..e0721ceaaf74
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/components/Button.test.js
@@ -0,0 +1,24 @@
+import { document } from 'global';
+import Button from './Button.svelte';
+
+let target;
+let component;
+
+describe('Button Component', () => {
+ beforeEach(() => {
+ target = document.createElement('div');
+
+ component = new Button({ target });
+ });
+
+ it('should render `text` property', () => {
+ const text = 'Hello world';
+ const expected = `Round corners\n ${text}`;
+
+ component.$set({ text });
+
+ const componentText = target.firstChild.textContent.trim();
+
+ expect(componentText).toEqual(expected);
+ });
+});
diff --git a/examples/svelte3-kitchen-sink/src/logo.png b/examples/svelte3-kitchen-sink/src/logo.png
new file mode 100644
index 000000000000..92b1560c6de1
Binary files /dev/null and b/examples/svelte3-kitchen-sink/src/logo.png differ
diff --git a/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot b/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot
new file mode 100644
index 000000000000..c3dc6821fc20
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot
@@ -0,0 +1,62 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Storyshots Addon|Actions Action on component method 1`] = `
+
+
+
+ Round
+ corners
+
+
+
+ Custom text
+
+
+
+`;
+
+exports[`Storyshots Addon|Actions Action on view method 1`] = `
+
+
+ Button view
+
+
+
+
+ Square
+ corners
+
+
+
+
+
+ You clicked
+ :
+ 0
+
+
+
+ A little text to show this is a view.
+
+
+
+ If we need to test components in a Svelte environment, for instance to test slot behaviour,
+
+
+
+ then wrapping the component up in a view
+
+
+
+ made just for the story is the simplest way to achieve this.
+
+
+`;
diff --git a/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-backgrounds.stories.storyshot b/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-backgrounds.stories.storyshot
new file mode 100644
index 000000000000..3f40c77cc6d2
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-backgrounds.stories.storyshot
@@ -0,0 +1,43 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Storyshots Addon|Backgrounds story 1 1`] = `
+
+
+ Button view
+
+
+
+
+ Square
+ corners
+
+
+
+
+
+ You clicked
+ :
+ 0
+
+
+
+ A little text to show this is a view.
+
+
+
+ If we need to test components in a Svelte environment, for instance to test slot behaviour,
+
+
+
+ then wrapping the component up in a view
+
+
+
+ made just for the story is the simplest way to achieve this.
+
+
+`;
diff --git a/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-centered.stories.storyshot b/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-centered.stories.storyshot
new file mode 100644
index 000000000000..1232bcea2ae0
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-centered.stories.storyshot
@@ -0,0 +1,39 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Storyshots Addon|Centered rounded 1`] = `
+
+
+
+ Round
+ corners
+
+
+
+ Look, I'm centered!
+
+
+
+`;
+
+exports[`Storyshots Addon|Centered with action 1`] = `
+
+
+
+ Round
+ corners
+
+
+
+
+
+
+
+`;
diff --git a/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-knobs.stories.storyshot b/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-knobs.stories.storyshot
new file mode 100644
index 000000000000..9ad2c1cc73db
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-knobs.stories.storyshot
@@ -0,0 +1,15 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Storyshots Addon|Knobs Simple 1`] = `
+
+`;
diff --git a/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-links.stories.storyshot b/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-links.stories.storyshot
new file mode 100644
index 000000000000..8e8009d5083f
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-links.stories.storyshot
@@ -0,0 +1,29 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Storyshots Addon|Links Go to welcome view 1`] = `
+
+
+
+ Link Action
+
+
+
+
+ Return to the
+
+ Welcome
+
+ view story.
+
+
+
+
+`;
diff --git a/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-notes.stories.storyshot b/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-notes.stories.storyshot
new file mode 100644
index 000000000000..4f71436ef5dd
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/__snapshots__/addon-notes.stories.storyshot
@@ -0,0 +1,85 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Storyshots Addon|Notes Note with HTML 1`] = `
+
+
+ Button view
+
+
+
+
+ Square
+ corners
+
+
+
+
+
+ 🤔😳😯😮😄😩😓😱🤓😑😶😊
+ :
+ 0
+
+
+
+ A little text to show this is a view.
+
+
+
+ If we need to test components in a Svelte environment, for instance to test slot behaviour,
+
+
+
+ then wrapping the component up in a view
+
+
+
+ made just for the story is the simplest way to achieve this.
+
+
+`;
+
+exports[`Storyshots Addon|Notes Simple note 1`] = `
+
+
+ Button view
+
+
+
+
+ Square
+ corners
+
+
+
+
+
+ You clicked
+ :
+ 0
+
+
+
+ A little text to show this is a view.
+
+
+
+ If we need to test components in a Svelte environment, for instance to test slot behaviour,
+
+
+
+ then wrapping the component up in a view
+
+
+
+ made just for the story is the simplest way to achieve this.
+
+
+`;
diff --git a/examples/svelte3-kitchen-sink/src/stories/__snapshots__/index.storyshot b/examples/svelte3-kitchen-sink/src/stories/__snapshots__/index.storyshot
new file mode 100644
index 000000000000..3d58a6b41277
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/__snapshots__/index.storyshot
@@ -0,0 +1,204 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Storyshots Button rounded 1`] = `
+
+
+ Button view
+
+
+
+
+ Round
+ corners
+
+
+
+
+
+ You clicked
+ :
+ 0
+
+
+
+ A little text to show this is a view.
+
+
+
+ If we need to test components in a Svelte environment, for instance to test slot behaviour,
+
+
+
+ then wrapping the component up in a view
+
+
+
+ made just for the story is the simplest way to achieve this.
+
+
+`;
+
+exports[`Storyshots Button square 1`] = `
+
+
+ Button view
+
+
+
+
+ Square
+ corners
+
+
+
+
+
+ You clicked
+ :
+ 0
+
+
+
+ A little text to show this is a view.
+
+
+
+ If we need to test components in a Svelte environment, for instance to test slot behaviour,
+
+
+
+ then wrapping the component up in a view
+
+
+
+ made just for the story is the simplest way to achieve this.
+
+
+`;
+
+exports[`Storyshots Welcome Welcome 1`] = `
+
+
+
+ Welcome to Storybook for Svelte
+
+
+
+
+
+ This is a UI component dev environment for your svelte app.
+
+
+
+
+
+
+ We've added some basic stories inside the
+
+ src/stories
+
+ directory.
+
+
+ A story is like a visual test case
+
+
+ and represents a single state of one or more UI components.
+ You can have as many stories as you want.
+
+
+
+
+
+
+ Svelte
+
+
+
+
+
+
+ Just like that, you can add your own components as stories.
+ You can also edit those components and see changes right away.
+
+
+
+ (Try editing the
+
+ Button
+
+ component
+ located at
+
+ src/stories/views/Welcome.svelte
+
+ .)
+
+
+
+
+
+
+ Usually we create stories with smaller UI components in the app.
+
+
+ Have a look at the
+
+
+ Writing Stories
+
+
+ section in our documentation.
+
+
+
+
+
+
+ NOTE:
+
+
+
+
+
+ Have a look at the
+
+
+ .storybook/webpack.config.js
+
+
+ to add webpack
+ loaders and plugins you are using in this project.
+
+
+
+
+`;
diff --git a/examples/svelte3-kitchen-sink/src/stories/addon-actions.stories.svelte b/examples/svelte3-kitchen-sink/src/stories/addon-actions.stories.svelte
new file mode 100644
index 000000000000..73c80a80f2cf
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/addon-actions.stories.svelte
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
diff --git a/examples/svelte3-kitchen-sink/src/stories/addon-backgrounds.stories.svelte b/examples/svelte3-kitchen-sink/src/stories/addon-backgrounds.stories.svelte
new file mode 100644
index 000000000000..40bb99d2ddf9
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/addon-backgrounds.stories.svelte
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/examples/svelte3-kitchen-sink/src/stories/addon-centered.stories.svelte b/examples/svelte3-kitchen-sink/src/stories/addon-centered.stories.svelte
new file mode 100644
index 000000000000..e6f42aaa6674
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/addon-centered.stories.svelte
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/examples/svelte3-kitchen-sink/src/stories/addon-knobs-storiesof.stories.svelte b/examples/svelte3-kitchen-sink/src/stories/addon-knobs-storiesof.stories.svelte
new file mode 100644
index 000000000000..b1d404c39577
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/addon-knobs-storiesof.stories.svelte
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
diff --git a/examples/svelte3-kitchen-sink/src/stories/addon-knobs.stories.svelte b/examples/svelte3-kitchen-sink/src/stories/addon-knobs.stories.svelte
new file mode 100644
index 000000000000..076520b4efd8
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/addon-knobs.stories.svelte
@@ -0,0 +1,16 @@
+
+
+
+
+
diff --git a/examples/svelte3-kitchen-sink/src/stories/addon-links.stories.svelte b/examples/svelte3-kitchen-sink/src/stories/addon-links.stories.svelte
new file mode 100644
index 000000000000..3504270b23b3
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/addon-links.stories.svelte
@@ -0,0 +1,15 @@
+
+
+
+
+
Link Action
+
+ Return to the Welcome view story.
+
+
+
diff --git a/examples/svelte3-kitchen-sink/src/stories/addon-notes.stories.svelte b/examples/svelte3-kitchen-sink/src/stories/addon-notes.stories.svelte
new file mode 100644
index 000000000000..d9c38476f6eb
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/addon-notes.stories.svelte
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+My notes on emojies
+
+ It's not all that important to be honest, but..
+
+ Emojis are great, I love emojis, in fact I like using them in my Component notes too! 😇
+ `
+}}>
+
+
diff --git a/examples/svelte3-kitchen-sink/src/stories/index.stories.svelte b/examples/svelte3-kitchen-sink/src/stories/index.stories.svelte
new file mode 100644
index 000000000000..676ce793caec
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/index.stories.svelte
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
Welcome to Storybook for Svelte 3
+
+ This is a UI component dev environment for your svelte app.
+
+
+ We've added some basic stories inside the
+ src/stories directory.
+ A story is like a visual test case
+ and represents a single state of one or more UI components.
+ You can have as many stories as you want.
+
+
+
+
+
+
+
+ Just like that, you can add your own components as stories.
+ You can also edit those components and see changes right away.
+
+ (Try editing the Button component
+ located at src/stories/views/Welcome.svelte.)
+
+
+ Usually we create stories with smaller UI components in the app.
+ Have a look at the
+ Writing Stories
+ section in our documentation.
+
+
+ NOTE:
+
+ Have a look at the
+ .storybook/webpack.config.js
+ to add webpack
+ loaders and plugins you are using in this project.
+
+
+
diff --git a/examples/svelte3-kitchen-sink/src/stories/syntax-context-storiesof.stories.svelte b/examples/svelte3-kitchen-sink/src/stories/syntax-context-storiesof.stories.svelte
new file mode 100644
index 000000000000..07761a545ae7
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/syntax-context-storiesof.stories.svelte
@@ -0,0 +1,59 @@
+
+
+
+ In Storybook for Svelte 3, storiesOf allows to prebind the
+ StoriesOf component.
+
+
+{`
+
+
+
+
+ First story of first context StoriesOf
+
+
+
+
+
+ First story of first context StoriesOf
+
+
+`}
+
+
+ It also allows to prebind the
+
+ kind of stories ,
+ making it possible to completely spare the StoriesOf component
+ in most cases.
+
+
+
+
+
+
+ First story of the first StoriesOf
+
+
+ Second story of the first StoriesOf
+
+
+
+
+
+ First story of the other StoriesOf
+
+
+ Second story of the other StoriesOf
+
+
diff --git a/examples/svelte3-kitchen-sink/src/stories/syntax-context-story.stories.svelte b/examples/svelte3-kitchen-sink/src/stories/syntax-context-story.stories.svelte
new file mode 100644
index 000000000000..cece841058b2
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/syntax-context-story.stories.svelte
@@ -0,0 +1,50 @@
+
+
+
+ In Storybook for Svelte 3, storiesOf allows to prebind the
+ module argument, but also the stories kind. In most cases,
+ you can skip using the StoriesOf component altogether.
+
+
+{`
+
+
+
+ First Story
+
+
+
+ Another Story
+
+`}
+
+
+ In cases where you need more control, like adding multiple kinds of stories
+ in the same stories file (is this a good idea?), you can still bind only the
+
+ StoriesOf's module
+ argument.
+
+
+
+
+
+ First Story
+
+
+
+ Another Story
+
diff --git a/examples/svelte3-kitchen-sink/src/stories/syntax-fully-declarative.stories.svelte b/examples/svelte3-kitchen-sink/src/stories/syntax-fully-declarative.stories.svelte
new file mode 100644
index 000000000000..d71ae32c765e
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/syntax-fully-declarative.stories.svelte
@@ -0,0 +1,94 @@
+
+
+
+
+
+ Fully declarative syntax uses only StoriesOf and
+ Story components.
+
+
+
+
+
+
+ This is the most direct form of fully declarative syntax, unfortunately it
+ triggers a warning in svelte's compiler about undefined `module` variable.
+
+ {`
+
+
+
+
+
+ Add some svelte here!
+
+
+
+ Story 2
+
+
+
+ `}
+
+ Use
+ this trick to avoid the warning.
+
+
+
+
+ First story of the first StoriesOf
+
+
+
+ Second story of the first StoriesOf
+
+
+
+
+
+ Aliasing `module` to another variable in script allows to work around
+ svelte compiler's warning.
+
+ {`
+
+
+
+
+
+ Add some svelte here!
+
+
+
+ Story 2
+
+
+
+ `}
+
+ However, you'll probably want to use the
+
+ storiesOf
+
+ function, for a lighter template code.
+
+
+
+
+ First story of the second StoriesOf
+
+
+
+ Second story of the second StoriesOf
+
+
diff --git a/examples/svelte3-kitchen-sink/src/stories/views/ActionKnobView.svelte b/examples/svelte3-kitchen-sink/src/stories/views/ActionKnobView.svelte
new file mode 100644
index 000000000000..7593383ff725
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/views/ActionKnobView.svelte
@@ -0,0 +1,17 @@
+
+
+
diff --git a/examples/svelte3-kitchen-sink/src/stories/views/ButtonView.svelte b/examples/svelte3-kitchen-sink/src/stories/views/ButtonView.svelte
new file mode 100644
index 000000000000..9af4bcdf88be
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/src/stories/views/ButtonView.svelte
@@ -0,0 +1,24 @@
+Button view
+
+{text}: {count}
+
+A little text to show this is a view.
+
+
diff --git a/examples/svelte3-kitchen-sink/svelteshots.test.js b/examples/svelte3-kitchen-sink/svelteshots.test.js
new file mode 100644
index 000000000000..fd14ec12becb
--- /dev/null
+++ b/examples/svelte3-kitchen-sink/svelteshots.test.js
@@ -0,0 +1,9 @@
+import path from 'path';
+import initStoryshots, { multiSnapshotWithOptions } from '@storybook/addon-storyshots';
+
+initStoryshots({
+ framework: 'svelte',
+ configPath: path.join(__dirname, '.storybook'),
+ integrityOptions: { cwd: path.join(__dirname, 'src', 'stories') },
+ test: multiSnapshotWithOptions(),
+});