@storybook/sveltekit 10.5.6 → 10.5.8

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.
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_a6nn2i0x4a7 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_a6nn2i0x4a7 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_a6nn2i0x4a7 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_f83nxc4osk from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_f83nxc4osk from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_f83nxc4osk from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_a6nn2i0x4a7.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_a6nn2i0x4a7.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_a6nn2i0x4a7.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_f83nxc4osk.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_f83nxc4osk.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_f83nxc4osk.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -0,0 +1,119 @@
1
+ import { CompatibleString, StorybookConfig } from "storybook/internal/types";
2
+ import { BuilderOptions, StorybookConfigVite } from "@storybook/builder-vite";
3
+
4
+ //#region code/frameworks/sveltekit/.dts-emit/code/frameworks/sveltekit/src/mocks/app/forms.d.ts
5
+ declare function enhance(form: HTMLFormElement): {
6
+ destroy(): void;
7
+ };
8
+ //#endregion
9
+ //#region code/frameworks/sveltekit/.dts-emit/code/frameworks/sveltekit/src/mocks/app/navigation.d.ts
10
+ declare function goto(...args: any[]): Promise<void>;
11
+ declare function invalidate(...args: any[]): Promise<void>;
12
+ declare function invalidateAll(): Promise<void>;
13
+ //#endregion
14
+ //#region code/frameworks/sveltekit/.dts-emit/code/frameworks/sveltekit/src/types.d.ts
15
+ type FrameworkName = CompatibleString<'@storybook/sveltekit'>;
16
+ type BuilderName = CompatibleString<'@storybook/builder-vite'>;
17
+ type FrameworkOptions = {
18
+ builder?: BuilderOptions;
19
+ /**
20
+ * Enable or disable automatic documentation generation for component properties, events, and
21
+ * slots. When disabled, Storybook will skip the docgen processing step during build, which can
22
+ * improve build performance.
23
+ *
24
+ * @default true
25
+ */
26
+ docgen?: boolean;
27
+ };
28
+ type StorybookConfigFramework = {
29
+ framework: FrameworkName | {
30
+ name: FrameworkName;
31
+ options: FrameworkOptions;
32
+ };
33
+ core?: StorybookConfig['core'] & {
34
+ builder?: BuilderName | {
35
+ name: BuilderName;
36
+ options: BuilderOptions;
37
+ };
38
+ };
39
+ };
40
+ type StorybookConfig$1 = Omit<StorybookConfig, keyof StorybookConfigVite | keyof StorybookConfigFramework> & StorybookConfigVite & StorybookConfigFramework;
41
+ type NormalizedHrefConfig = {
42
+ callback: (to: string, event: Event) => void;
43
+ asRegex?: boolean;
44
+ };
45
+ type HrefConfig = NormalizedHrefConfig | NormalizedHrefConfig['callback'];
46
+ /**
47
+ * Copied from:
48
+ * {@link https://github.com/sveltejs/kit/blob/7bb41aa4263b057a8912f4cdd35db03755d37342/packages/kit/types/index.d.ts#L1102-L1143}
49
+ */
50
+ interface Page<Params extends Record<string, string> = Record<string, string>, RouteId extends string | null = string | null> {
51
+ url: URL;
52
+ params: Params;
53
+ route: {
54
+ id: RouteId;
55
+ };
56
+ status: number;
57
+ error: Error | null;
58
+ data: Record<string, any>;
59
+ state: Record<string, any>;
60
+ form: any;
61
+ }
62
+ /**
63
+ * Copied from:
64
+ * {@link https://github.com/sveltejs/kit/blob/7bb41aa4263b057a8912f4cdd35db03755d37342/packages/kit/types/index.d.ts#L988}
65
+ */
66
+ interface NavigationTarget {
67
+ params: Record<string, string> | null;
68
+ route: {
69
+ id: string | null;
70
+ };
71
+ url: URL;
72
+ }
73
+ /**
74
+ * Copied from:
75
+ * {@link https://github.com/sveltejs/kit/blob/7bb41aa4263b057a8912f4cdd35db03755d37342/packages/kit/types/index.d.ts#L1017C9-L1017C89}
76
+ */
77
+ type NavigationType = 'enter' | 'form' | 'leave' | 'link' | 'goto' | 'popstate';
78
+ /**
79
+ * Copied from:
80
+ * {@link https://github.com/sveltejs/kit/blob/7bb41aa4263b057a8912f4cdd35db03755d37342/packages/kit/types/index.d.ts#L1017C9-L1017C89}
81
+ */
82
+ interface Navigation {
83
+ from: NavigationTarget | null;
84
+ to: NavigationTarget | null;
85
+ type: Exclude<NavigationType, 'enter'>;
86
+ willUnload: boolean;
87
+ delta?: number;
88
+ complete: Promise<void>;
89
+ }
90
+ type SvelteKitParameters = Partial<{
91
+ hrefs: Record<string, HrefConfig>;
92
+ state: {
93
+ page: Partial<Page>;
94
+ navigating: Partial<Navigation>;
95
+ updated: {
96
+ current: boolean;
97
+ };
98
+ };
99
+ /**
100
+ * @deprecated
101
+ * @see {@link https://svelte.dev/docs/kit/$app-stores}
102
+ */
103
+ stores: {
104
+ page: Record<string, any>;
105
+ navigating: Record<string, any>;
106
+ updated: boolean;
107
+ };
108
+ navigation: {
109
+ goto: typeof goto;
110
+ invalidate: typeof invalidate;
111
+ invalidateAll: typeof invalidateAll;
112
+ afterNavigate: Record<string, any>;
113
+ };
114
+ forms: {
115
+ enhance: typeof enhance;
116
+ };
117
+ }>;
118
+ //#endregion
119
+ export { SvelteKitParameters as a, StorybookConfig$1 as i, HrefConfig as n, NormalizedHrefConfig as r, FrameworkOptions as t };
package/dist/index.d.ts CHANGED
@@ -1,120 +1,9 @@
1
- import { SvelteRenderer } from '@storybook/svelte';
2
- export * from '@storybook/svelte';
3
- import { StorybookConfig as StorybookConfig$1, CompatibleString, NamedOrDefaultProjectAnnotations, NormalizedProjectAnnotations } from 'storybook/internal/types';
4
- import { BuilderOptions, StorybookConfigVite } from '@storybook/builder-vite';
5
-
6
- declare function enhance(form: HTMLFormElement): {
7
- destroy(): void;
8
- };
9
-
10
- declare function goto(...args: any[]): Promise<void>;
11
- declare function invalidate(...args: any[]): Promise<void>;
12
- declare function invalidateAll(): Promise<void>;
13
-
14
- type FrameworkName = CompatibleString<'@storybook/sveltekit'>;
15
- type BuilderName = CompatibleString<'@storybook/builder-vite'>;
16
- type FrameworkOptions = {
17
- builder?: BuilderOptions;
18
- /**
19
- * Enable or disable automatic documentation generation for component properties, events, and
20
- * slots. When disabled, Storybook will skip the docgen processing step during build, which can
21
- * improve build performance.
22
- *
23
- * @default true
24
- */
25
- docgen?: boolean;
26
- };
27
- type StorybookConfigFramework = {
28
- framework: FrameworkName | {
29
- name: FrameworkName;
30
- options: FrameworkOptions;
31
- };
32
- core?: StorybookConfig$1['core'] & {
33
- builder?: BuilderName | {
34
- name: BuilderName;
35
- options: BuilderOptions;
36
- };
37
- };
38
- };
39
- type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigVite | keyof StorybookConfigFramework> & StorybookConfigVite & StorybookConfigFramework;
40
- type NormalizedHrefConfig = {
41
- callback: (to: string, event: Event) => void;
42
- asRegex?: boolean;
43
- };
44
- type HrefConfig = NormalizedHrefConfig | NormalizedHrefConfig['callback'];
45
- /**
46
- * Copied from:
47
- * {@link https://github.com/sveltejs/kit/blob/7bb41aa4263b057a8912f4cdd35db03755d37342/packages/kit/types/index.d.ts#L1102-L1143}
48
- */
49
- interface Page<Params extends Record<string, string> = Record<string, string>, RouteId extends string | null = string | null> {
50
- url: URL;
51
- params: Params;
52
- route: {
53
- id: RouteId;
54
- };
55
- status: number;
56
- error: Error | null;
57
- data: Record<string, any>;
58
- state: Record<string, any>;
59
- form: any;
60
- }
61
- /**
62
- * Copied from:
63
- * {@link https://github.com/sveltejs/kit/blob/7bb41aa4263b057a8912f4cdd35db03755d37342/packages/kit/types/index.d.ts#L988}
64
- */
65
- interface NavigationTarget {
66
- params: Record<string, string> | null;
67
- route: {
68
- id: string | null;
69
- };
70
- url: URL;
71
- }
72
- /**
73
- * Copied from:
74
- * {@link https://github.com/sveltejs/kit/blob/7bb41aa4263b057a8912f4cdd35db03755d37342/packages/kit/types/index.d.ts#L1017C9-L1017C89}
75
- */
76
- type NavigationType = 'enter' | 'form' | 'leave' | 'link' | 'goto' | 'popstate';
77
- /**
78
- * Copied from:
79
- * {@link https://github.com/sveltejs/kit/blob/7bb41aa4263b057a8912f4cdd35db03755d37342/packages/kit/types/index.d.ts#L1017C9-L1017C89}
80
- */
81
- interface Navigation {
82
- from: NavigationTarget | null;
83
- to: NavigationTarget | null;
84
- type: Exclude<NavigationType, 'enter'>;
85
- willUnload: boolean;
86
- delta?: number;
87
- complete: Promise<void>;
88
- }
89
- type SvelteKitParameters = Partial<{
90
- hrefs: Record<string, HrefConfig>;
91
- state: {
92
- page: Partial<Page>;
93
- navigating: Partial<Navigation>;
94
- updated: {
95
- current: boolean;
96
- };
97
- };
98
- /**
99
- * @deprecated
100
- * @see {@link https://svelte.dev/docs/kit/$app-stores}
101
- */
102
- stores: {
103
- page: Record<string, any>;
104
- navigating: Record<string, any>;
105
- updated: boolean;
106
- };
107
- navigation: {
108
- goto: typeof goto;
109
- invalidate: typeof invalidate;
110
- invalidateAll: typeof invalidateAll;
111
- afterNavigate: Record<string, any>;
112
- };
113
- forms: {
114
- enhance: typeof enhance;
115
- };
116
- }>;
1
+ import { a as SvelteKitParameters, i as StorybookConfig, n as HrefConfig, r as NormalizedHrefConfig, t as FrameworkOptions } from "./chunk-B_AQQjYm.js";
2
+ import { SvelteRenderer } from "@storybook/svelte";
3
+ import { NamedOrDefaultProjectAnnotations, NormalizedProjectAnnotations } from "storybook/internal/types";
4
+ export * from "@storybook/svelte";
117
5
 
6
+ //#region code/frameworks/sveltekit/.dts-emit/code/frameworks/sveltekit/src/portable-stories.d.ts
118
7
  /**
119
8
  * Function that sets the globalConfig of your storybook. The global config is the preview module of
120
9
  * your .storybook folder.
@@ -135,5 +24,5 @@ type SvelteKitParameters = Partial<{
135
24
  * @param projectAnnotations - E.g. (import projectAnnotations from '../.storybook/preview')
136
25
  */
137
26
  declare function setProjectAnnotations(projectAnnotations: NamedOrDefaultProjectAnnotations<any> | NamedOrDefaultProjectAnnotations<any>[]): NormalizedProjectAnnotations<SvelteRenderer>;
138
-
139
- export { type FrameworkOptions, type HrefConfig, type NormalizedHrefConfig, type StorybookConfig, type SvelteKitParameters, setProjectAnnotations };
27
+ //#endregion
28
+ export { FrameworkOptions, HrefConfig, NormalizedHrefConfig, StorybookConfig, SvelteKitParameters, setProjectAnnotations };
@@ -1,33 +1,6 @@
1
- import { StorybookConfig as StorybookConfig$1, CompatibleString } from 'storybook/internal/types';
2
- import { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite';
3
-
4
- type FrameworkName = CompatibleString<'@storybook/sveltekit'>;
5
- type BuilderName = CompatibleString<'@storybook/builder-vite'>;
6
- type FrameworkOptions = {
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;
16
- };
17
- type StorybookConfigFramework = {
18
- framework: FrameworkName | {
19
- name: FrameworkName;
20
- options: FrameworkOptions;
21
- };
22
- core?: StorybookConfig$1['core'] & {
23
- builder?: BuilderName | {
24
- name: BuilderName;
25
- options: BuilderOptions;
26
- };
27
- };
28
- };
29
- type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigVite | keyof StorybookConfigFramework> & StorybookConfigVite & StorybookConfigFramework;
1
+ import { i as StorybookConfig } from "../chunk-B_AQQjYm.js";
30
2
 
3
+ //#region code/frameworks/sveltekit/.dts-emit/code/frameworks/sveltekit/src/node/index.d.ts
31
4
  declare function defineMain(config: StorybookConfig): StorybookConfig;
32
-
33
- export { type StorybookConfig, defineMain };
5
+ //#endregion
6
+ export { type StorybookConfig, defineMain };
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_a6nn2i0x4a7 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_a6nn2i0x4a7 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_a6nn2i0x4a7 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_f83nxc4osk from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_f83nxc4osk from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_f83nxc4osk from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_a6nn2i0x4a7.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_a6nn2i0x4a7.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_a6nn2i0x4a7.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_f83nxc4osk.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_f83nxc4osk.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_f83nxc4osk.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
package/dist/preset.js CHANGED
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_a6nn2i0x4a7 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_a6nn2i0x4a7 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_a6nn2i0x4a7 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_f83nxc4osk from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_f83nxc4osk from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_f83nxc4osk from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_a6nn2i0x4a7.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_a6nn2i0x4a7.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_a6nn2i0x4a7.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_f83nxc4osk.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_f83nxc4osk.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_f83nxc4osk.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
  mockSveltekitStores
14
- } from "./_node-chunks/chunk-VBZRYXS7.js";
14
+ } from "./_node-chunks/chunk-RVC53VBG.js";
15
15
 
16
16
  // src/preset.ts
17
17
  import { fileURLToPath } from "node:url";
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_a6nn2i0x4a7 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_a6nn2i0x4a7 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_a6nn2i0x4a7 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_f83nxc4osk from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_f83nxc4osk from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_f83nxc4osk from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_a6nn2i0x4a7.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_a6nn2i0x4a7.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_a6nn2i0x4a7.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_f83nxc4osk.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_f83nxc4osk.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_f83nxc4osk.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
  mockSveltekitStores
14
- } from "./_node-chunks/chunk-VBZRYXS7.js";
14
+ } from "./_node-chunks/chunk-RVC53VBG.js";
15
15
 
16
16
  // src/vite-plugin.ts
17
17
  var storybookSveltekitPlugin = () => [mockSveltekitStores()];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/sveltekit",
3
- "version": "10.5.6",
3
+ "version": "10.5.8",
4
4
  "description": "Storybook for SvelteKit: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -57,9 +57,9 @@
57
57
  "*.d.ts"
58
58
  ],
59
59
  "dependencies": {
60
- "@storybook/builder-vite": "10.5.6",
61
- "@storybook/svelte": "10.5.6",
62
- "@storybook/svelte-vite": "10.5.6"
60
+ "@storybook/builder-vite": "10.5.8",
61
+ "@storybook/svelte": "10.5.8",
62
+ "@storybook/svelte-vite": "10.5.8"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@types/node": "^22.19.1",
@@ -67,7 +67,7 @@
67
67
  "vite": "^7.0.4"
68
68
  },
69
69
  "peerDependencies": {
70
- "storybook": "^10.5.6",
70
+ "storybook": "^10.5.8",
71
71
  "svelte": "^5.0.0",
72
72
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
73
73
  },