@storybook/svelte-vite 10.0.0-beta.0 → 10.0.0-beta.10

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.
@@ -0,0 +1,17 @@
1
+ import CJS_COMPAT_NODE_URL_dlu4ptwvts7 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_dlu4ptwvts7 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_dlu4ptwvts7 from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_dlu4ptwvts7.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_dlu4ptwvts7.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_dlu4ptwvts7.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+ var __defProp = Object.defineProperty;
13
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
14
+
15
+ export {
16
+ __name
17
+ };
package/dist/index.d.ts CHANGED
@@ -6,6 +6,14 @@ type FrameworkName = CompatibleString<'@storybook/svelte-vite'>;
6
6
  type BuilderName = CompatibleString<'@storybook/builder-vite'>;
7
7
  type FrameworkOptions = {
8
8
  builder?: BuilderOptions;
9
+ /**
10
+ * Enable or disable automatic documentation generation for component properties, events, and
11
+ * slots. When disabled, Storybook will skip the docgen processing step during build, which can
12
+ * improve build performance.
13
+ *
14
+ * @default true
15
+ */
16
+ docgen?: boolean;
9
17
  };
10
18
  type StorybookConfigFramework = {
11
19
  framework: FrameworkName | {
@@ -5,6 +5,14 @@ type FrameworkName = CompatibleString<'@storybook/svelte-vite'>;
5
5
  type BuilderName = CompatibleString<'@storybook/builder-vite'>;
6
6
  type FrameworkOptions = {
7
7
  builder?: BuilderOptions;
8
+ /**
9
+ * Enable or disable automatic documentation generation for component properties, events, and
10
+ * slots. When disabled, Storybook will skip the docgen processing step during build, which can
11
+ * improve build performance.
12
+ *
13
+ * @default true
14
+ */
15
+ docgen?: boolean;
8
16
  };
9
17
  type StorybookConfigFramework = {
10
18
  framework: FrameworkName | {
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_wxvqpsjwy8 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wxvqpsjwy8 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wxvqpsjwy8 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_dlu4ptwvts7 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_dlu4ptwvts7 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_dlu4ptwvts7 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wxvqpsjwy8.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wxvqpsjwy8.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wxvqpsjwy8.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_dlu4ptwvts7.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_dlu4ptwvts7.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_dlu4ptwvts7.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  __name
14
- } from "../_node-chunks/chunk-XAHMQWSH.js";
14
+ } from "../_node-chunks/chunk-ZE2ORFVF.js";
15
15
 
16
16
  // src/node/index.ts
17
17
  function defineMain(config) {
package/dist/preset.d.ts CHANGED
@@ -5,6 +5,14 @@ type FrameworkName = CompatibleString<'@storybook/svelte-vite'>;
5
5
  type BuilderName = CompatibleString<'@storybook/builder-vite'>;
6
6
  type FrameworkOptions = {
7
7
  builder?: BuilderOptions;
8
+ /**
9
+ * Enable or disable automatic documentation generation for component properties, events, and
10
+ * slots. When disabled, Storybook will skip the docgen processing step during build, which can
11
+ * improve build performance.
12
+ *
13
+ * @default true
14
+ */
15
+ docgen?: boolean;
8
16
  };
9
17
  type StorybookConfigFramework = {
10
18
  framework: FrameworkName | {
package/dist/preset.js CHANGED
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_wxvqpsjwy8 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wxvqpsjwy8 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wxvqpsjwy8 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_dlu4ptwvts7 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_dlu4ptwvts7 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_dlu4ptwvts7 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wxvqpsjwy8.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wxvqpsjwy8.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wxvqpsjwy8.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_dlu4ptwvts7.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_dlu4ptwvts7.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_dlu4ptwvts7.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  __name
14
- } from "./_node-chunks/chunk-XAHMQWSH.js";
14
+ } from "./_node-chunks/chunk-ZE2ORFVF.js";
15
15
 
16
16
  // src/plugins/svelte-docgen.ts
17
17
  import { basename, relative } from "node:path";
@@ -314,7 +314,7 @@ function generateDocgen(targetFileName, cache) {
314
314
  description = ((description || "") + "\n" + typeTag.comment).trim();
315
315
  }
316
316
  }
317
- if (prop.valueDeclaration?.getSourceFile().fileName.includes("node_modules/svelte/elements.d.ts")) {
317
+ if ((prop.valueDeclaration ?? prop?.links?.syntheticOrigin?.valueDeclaration)?.getSourceFile().fileName.includes("node_modules/svelte/elements.d.ts")) {
318
318
  return;
319
319
  }
320
320
  const optional = (prop.flags & ts.SymbolFlags.Optional) !== 0;
@@ -501,7 +501,11 @@ var core = {
501
501
  };
502
502
  var viteFinal = /* @__PURE__ */ __name(async (config, options) => {
503
503
  const { plugins = [] } = config;
504
- plugins.push(await svelteDocgen());
504
+ const framework = await options.presets.apply("framework");
505
+ const frameworkOptions = typeof framework === "string" ? {} : framework.options ?? {};
506
+ if (frameworkOptions.docgen !== false) {
507
+ plugins.push(await svelteDocgen());
508
+ }
505
509
  await handleSvelteKit(plugins, options);
506
510
  return {
507
511
  ...config,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/svelte-vite",
3
- "version": "10.0.0-beta.0",
3
+ "version": "10.0.0-beta.10",
4
4
  "description": "Storybook for Svelte and Vite: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -53,23 +53,23 @@
53
53
  "prep": "jiti ../../../scripts/build/build-package.ts"
54
54
  },
55
55
  "dependencies": {
56
- "@storybook/builder-vite": "10.0.0-beta.0",
57
- "@storybook/svelte": "10.0.0-beta.0",
56
+ "@storybook/builder-vite": "10.0.0-beta.10",
57
+ "@storybook/svelte": "10.0.0-beta.10",
58
58
  "magic-string": "^0.30.0",
59
- "svelte2tsx": "^0.7.35",
59
+ "svelte2tsx": "^0.7.44",
60
60
  "typescript": "^4.9.4 || ^5.0.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@sveltejs/vite-plugin-svelte": "^5.0.3",
63
+ "@sveltejs/vite-plugin-svelte": "^6.2.0",
64
64
  "@types/node": "^22.0.0",
65
- "svelte": "^5.0.5",
65
+ "svelte": "^5.39.5",
66
66
  "sveltedoc-parser": "^4.2.1",
67
67
  "typescript": "^5.8.3",
68
68
  "vite": "^7.0.4"
69
69
  },
70
70
  "peerDependencies": {
71
- "@sveltejs/vite-plugin-svelte": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0",
72
- "storybook": "^10.0.0-beta.0",
71
+ "@sveltejs/vite-plugin-svelte": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0",
72
+ "storybook": "^10.0.0-beta.10",
73
73
  "svelte": "^5.0.0",
74
74
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
75
75
  },
@@ -1,17 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_wxvqpsjwy8 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wxvqpsjwy8 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wxvqpsjwy8 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_wxvqpsjwy8.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wxvqpsjwy8.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wxvqpsjwy8.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
- var __defProp = Object.defineProperty;
13
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
14
-
15
- export {
16
- __name
17
- };