@storybook/svelte 10.0.0-beta.6 → 10.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -131,7 +131,7 @@ addons.getChannel().on(RESET_STORY_ARGS, ({ storyId }) => {
131
131
  storyIdsToRemountFromResetArgsEvent.add(storyId);
132
132
  });
133
133
  var componentsByDomElement = /* @__PURE__ */ new Map();
134
- function renderToCanvas({
134
+ async function renderToCanvas({
135
135
  storyFn,
136
136
  title,
137
137
  name,
@@ -171,6 +171,7 @@ function renderToCanvas({
171
171
  props
172
172
  });
173
173
  componentsByDomElement.set(canvasElement, { mountedComponent, props });
174
+ await svelte.tick();
174
175
  } else {
175
176
  Object.assign(existingComponent.props, {
176
177
  storyFn,
@@ -179,6 +180,7 @@ function renderToCanvas({
179
180
  title,
180
181
  showError
181
182
  });
183
+ await svelte.tick();
182
184
  }
183
185
  showMain();
184
186
  return () => {
@@ -5,7 +5,7 @@ import {
5
5
  parameters,
6
6
  render,
7
7
  renderToCanvas
8
- } from "./_browser-chunks/chunk-6F5NZ26N.js";
8
+ } from "./_browser-chunks/chunk-4ZGG6PUN.js";
9
9
  import "./_browser-chunks/chunk-JFJ5UJ7Q.js";
10
10
  export {
11
11
  decorateStory as applyDecorators,
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  entry_preview_exports,
3
3
  renderToCanvas
4
- } from "./_browser-chunks/chunk-6F5NZ26N.js";
4
+ } from "./_browser-chunks/chunk-4ZGG6PUN.js";
5
5
  import {
6
6
  __name
7
7
  } from "./_browser-chunks/chunk-JFJ5UJ7Q.js";
package/dist/preset.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_r9ursbg89q from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_r9ursbg89q from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_r9ursbg89q from "node:module";
1
+ import CJS_COMPAT_NODE_URL_rauelpbxqq from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_rauelpbxqq from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_rauelpbxqq from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_r9ursbg89q.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_r9ursbg89q.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_r9ursbg89q.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_rauelpbxqq.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_rauelpbxqq.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_rauelpbxqq.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/svelte",
3
- "version": "10.0.0-beta.6",
3
+ "version": "10.0.0-beta.7",
4
4
  "description": "Storybook Svelte renderer: Develop, document, and test UI components in isolation.",
5
5
  "keywords": [
6
6
  "storybook",
@@ -59,17 +59,17 @@
59
59
  "type-fest": "~2.19"
60
60
  },
61
61
  "devDependencies": {
62
- "@sveltejs/vite-plugin-svelte": "^5.0.3",
62
+ "@sveltejs/vite-plugin-svelte": "^6.2.0",
63
63
  "@testing-library/svelte": "^5.2.4",
64
64
  "expect-type": "^1.1.0",
65
- "svelte": "^5.20.5",
66
- "svelte-check": "^4.1.4",
65
+ "svelte": "^5.39.5",
66
+ "svelte-check": "^4.3.2",
67
67
  "sveltedoc-parser": "^4.2.1",
68
68
  "typescript": "^5.8.3",
69
69
  "vite": "^7.0.4"
70
70
  },
71
71
  "peerDependencies": {
72
- "storybook": "^10.0.0-beta.6",
72
+ "storybook": "^10.0.0-beta.7",
73
73
  "svelte": "^5.0.0"
74
74
  },
75
75
  "publishConfig": {
@@ -26,4 +26,9 @@
26
26
  });
27
27
  </script>
28
28
 
29
- <DecoratorHandler {Component} {props} />
29
+ <svelte:boundary>
30
+ {#snippet pending()}
31
+ <div id="sb-pending-async-component-notice">Pending async component...</div>
32
+ {/snippet}
33
+ <DecoratorHandler {Component} {props} />
34
+ </svelte:boundary>
@@ -0,0 +1,16 @@
1
+ //! this config isn't actually used, it's just here to tell svelte-check that we have async enabled
2
+
3
+ const config = {
4
+ kit: {
5
+ experimental: {
6
+ remoteFunctions: true,
7
+ },
8
+ },
9
+ compilerOptions: {
10
+ experimental: {
11
+ async: true,
12
+ },
13
+ },
14
+ };
15
+
16
+ export default config;