@storybook/builder-vite 10.3.3 → 10.3.4

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_dtl570gwrw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_dtl570gwrw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_dtl570gwrw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_joef9p0d2cr from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_joef9p0d2cr from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_joef9p0d2cr from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_dtl570gwrw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_dtl570gwrw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_dtl570gwrw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_joef9p0d2cr.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_joef9p0d2cr.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_joef9p0d2cr.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -425,7 +425,10 @@ function generateProjectAnnotationsCodeFromPreviews(options) {
425
425
  `.trim();
426
426
  }
427
427
  function hash(value) {
428
- return value.split("").reduce((acc, char) => acc + char.charCodeAt(0), 0);
428
+ let acc = 5381;
429
+ for (let i = 0; i < value.length; i++)
430
+ acc = (acc << 5) + acc + value.charCodeAt(i) >>> 0;
431
+ return acc;
429
432
  }
430
433
 
431
434
  // src/virtual-file-names.ts
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Options, Builder } from 'storybook/internal/types';
2
- import { InlineConfig, UserConfig, PluginOption } from 'vite';
1
+ import { Builder, Options } from 'storybook/internal/types';
2
+ import { UserConfig, InlineConfig, PluginOption } from 'vite';
3
3
 
4
4
  type ViteStats = {
5
5
  toJson: () => any;
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_dtl570gwrw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_dtl570gwrw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_dtl570gwrw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_joef9p0d2cr from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_joef9p0d2cr from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_joef9p0d2cr from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_dtl570gwrw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_dtl570gwrw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_dtl570gwrw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_joef9p0d2cr.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_joef9p0d2cr.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_joef9p0d2cr.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -24,7 +24,7 @@ import {
24
24
  normalize,
25
25
  relative,
26
26
  viteCorePlugins
27
- } from "./_node-chunks/chunk-YEI2VLDL.js";
27
+ } from "./_node-chunks/chunk-2UAJDYWO.js";
28
28
 
29
29
  // ../../../node_modules/picocolors/picocolors.js
30
30
  var require_picocolors = __commonJS({
package/dist/preset.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_dtl570gwrw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_dtl570gwrw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_dtl570gwrw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_joef9p0d2cr from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_joef9p0d2cr from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_joef9p0d2cr from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_dtl570gwrw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_dtl570gwrw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_dtl570gwrw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_joef9p0d2cr.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_joef9p0d2cr.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_joef9p0d2cr.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_dtl570gwrw.createRequire(import.meta.url);
12
12
  import {
13
13
  optimizeViteDeps,
14
14
  viteCorePlugins
15
- } from "./_node-chunks/chunk-YEI2VLDL.js";
15
+ } from "./_node-chunks/chunk-2UAJDYWO.js";
16
16
  export {
17
17
  optimizeViteDeps,
18
18
  viteCorePlugins
package/input/iframe.html CHANGED
@@ -70,10 +70,10 @@
70
70
  if (hostname !== 'localhost' && globalThis.CONFIG_TYPE === 'DEVELOPMENT') {
71
71
  const message = `Failed to load the Storybook preview file 'vite-app.js':
72
72
 
73
- It looks like you're visiting the Storybook development server on another hostname than localhost: '${hostname}', but you haven't configured the necessary security features to support this.
74
- Please re-run your Storybook development server with the '--host ${hostname}' flag, or manually configure your Vite allowedHosts configuration with viteFinal.
73
+ It looks like you're visiting the Storybook development server on another hostname than localhost: '${hostname}', but you haven't configured the necessary security features to support this.
74
+ Please re-run your Storybook development server with the '--host ${hostname}' flag, or manually configure your Vite allowedHosts configuration with viteFinal.
75
75
 
76
- See:`;
76
+ See:`;
77
77
  const docs = [
78
78
  'https://storybook.js.org/docs/api/cli-options#dev',
79
79
  'https://storybook.js.org/docs/api/main-config/main-config-vite-final',
@@ -85,7 +85,7 @@ See:`;
85
85
  `<p style="color: red; max-width: 70ch">${message.replaceAll(
86
86
  '\n',
87
87
  '<br/>'
88
- )}<ul>${docs.map((doc) => `<li><a href='${doc}' target='_blank'>${doc}</a></li>`).join('')}<ul></p>`;
88
+ )}<ul>${docs.map((doc) => `<li><a href='${doc}' target='_blank'>${doc}</a></li>`).join('')}</ul></p>`;
89
89
  return;
90
90
  }
91
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/builder-vite",
3
- "version": "10.3.3",
3
+ "version": "10.3.4",
4
4
  "description": "A Storybook builder to dev and build with Vite",
5
5
  "keywords": [
6
6
  "storybook",
@@ -47,7 +47,7 @@
47
47
  "!src/**/*"
48
48
  ],
49
49
  "dependencies": {
50
- "@storybook/csf-plugin": "10.3.3",
50
+ "@storybook/csf-plugin": "10.3.4",
51
51
  "ts-dedent": "^2.0.0"
52
52
  },
53
53
  "devDependencies": {
@@ -62,7 +62,7 @@
62
62
  "vite": "^7.0.4"
63
63
  },
64
64
  "peerDependencies": {
65
- "storybook": "^10.3.3",
65
+ "storybook": "^10.3.4",
66
66
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
67
67
  },
68
68
  "publishConfig": {