@storybook/nextjs-vite 10.3.0-alpha.8 → 10.3.0-beta.0

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_yqvb6c3znio from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yqvb6c3znio from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yqvb6c3znio from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vev3kflouh from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vev3kflouh from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vev3kflouh from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yqvb6c3znio.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yqvb6c3znio.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yqvb6c3znio.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vev3kflouh.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vev3kflouh.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vev3kflouh.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_yqvb6c3znio from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yqvb6c3znio from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yqvb6c3znio from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vev3kflouh from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vev3kflouh from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vev3kflouh from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yqvb6c3znio.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yqvb6c3znio.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yqvb6c3znio.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vev3kflouh.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vev3kflouh.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vev3kflouh.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_yqvb6c3znio.createRequire(import.meta.url);
12
12
  import {
13
13
  __commonJS,
14
14
  __require
15
- } from "./chunk-3DUCK4WQ.js";
15
+ } from "./chunk-HKZHWGZ2.js";
16
16
 
17
17
  // ../../../node_modules/yaml/dist/nodes/identity.js
18
18
  var require_identity = __commonJS({
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_yqvb6c3znio from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yqvb6c3znio from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yqvb6c3znio from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vev3kflouh from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vev3kflouh from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vev3kflouh from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yqvb6c3znio.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yqvb6c3znio.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yqvb6c3znio.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vev3kflouh.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vev3kflouh.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vev3kflouh.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -14,7 +14,7 @@ import {
14
14
  __esm,
15
15
  __require,
16
16
  __toESM
17
- } from "./chunk-3DUCK4WQ.js";
17
+ } from "./chunk-HKZHWGZ2.js";
18
18
 
19
19
  // ../../../node_modules/jiti/dist/jiti.cjs
20
20
  var require_jiti = __commonJS({
@@ -1,15 +1,15 @@
1
- import CJS_COMPAT_NODE_URL_yqvb6c3znio from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yqvb6c3znio from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yqvb6c3znio from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vev3kflouh from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vev3kflouh from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vev3kflouh from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yqvb6c3znio.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yqvb6c3znio.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yqvb6c3znio.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vev3kflouh.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vev3kflouh.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vev3kflouh.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
- import "../_node-chunks/chunk-3DUCK4WQ.js";
12
+ import "../_node-chunks/chunk-HKZHWGZ2.js";
13
13
 
14
14
  // src/node/index.ts
15
15
  function defineMain(config) {
package/dist/preset.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_yqvb6c3znio from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yqvb6c3znio from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yqvb6c3znio from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vev3kflouh from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vev3kflouh from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vev3kflouh from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yqvb6c3znio.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yqvb6c3znio.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yqvb6c3znio.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vev3kflouh.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vev3kflouh.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vev3kflouh.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -13,7 +13,7 @@ import {
13
13
  __commonJS,
14
14
  __require,
15
15
  __toESM
16
- } from "./_node-chunks/chunk-3DUCK4WQ.js";
16
+ } from "./_node-chunks/chunk-HKZHWGZ2.js";
17
17
 
18
18
  // ../../../node_modules/semver/internal/constants.js
19
19
  var require_constants = __commonJS({
@@ -1458,9 +1458,9 @@ var require_src = __commonJS({
1458
1458
  // ../../../node_modules/postcss-load-config/src/req.js
1459
1459
  var require_req = __commonJS({
1460
1460
  "../../../node_modules/postcss-load-config/src/req.js"(exports, module) {
1461
- var { createRequire: createRequire3 } = __require("node:module"), { pathToFileURL: pathToFileURL2 } = __require("node:url"), TS_EXT_RE = /\.[mc]?ts$/, tsx, jiti, importError = [];
1461
+ var { createRequire: createRequire4 } = __require("node:module"), { pathToFileURL: pathToFileURL2 } = __require("node:url"), TS_EXT_RE = /\.[mc]?ts$/, tsx, jiti, importError = [];
1462
1462
  async function req(name, rootFile = __filename) {
1463
- let url = createRequire3(rootFile).resolve(name);
1463
+ let url = createRequire4(rootFile).resolve(name);
1464
1464
  try {
1465
1465
  return (await import(`${pathToFileURL2(url)}?t=${Date.now()}`)).default;
1466
1466
  } catch (err) {
@@ -1479,7 +1479,7 @@ var require_req = __commonJS({
1479
1479
  }
1480
1480
  if (jiti === void 0)
1481
1481
  try {
1482
- jiti = (await import("./_node-chunks/jiti-O3E3T4FX.js")).default;
1482
+ jiti = (await import("./_node-chunks/jiti-BRPJZZBI.js")).default;
1483
1483
  } catch (error) {
1484
1484
  importError.push(error);
1485
1485
  }
@@ -1596,7 +1596,7 @@ var require_src2 = __commonJS({
1596
1596
  async function yamlLoader(_, content) {
1597
1597
  if (!yaml)
1598
1598
  try {
1599
- yaml = await import("./_node-chunks/dist-YEFR7HQ2.js");
1599
+ yaml = await import("./_node-chunks/dist-WKEFFJGE.js");
1600
1600
  } catch (e) {
1601
1601
  throw new Error(
1602
1602
  `'yaml' is required for the YAML configuration files. Make sure it is installed
@@ -1655,7 +1655,7 @@ Error: ${e.message}`
1655
1655
 
1656
1656
  // src/preset.ts
1657
1657
  var import_semver = __toESM(require_semver2(), 1);
1658
- import { createRequire as createRequire2 } from "node:module";
1658
+ import { createRequire as createRequire3 } from "node:module";
1659
1659
  import { dirname as dirname2 } from "node:path";
1660
1660
  import { fileURLToPath as fileURLToPath2 } from "node:url";
1661
1661
  import { viteFinal as reactViteFinal } from "@storybook/react-vite/preset";
@@ -1739,6 +1739,7 @@ import { readFileSync } from "node:fs";
1739
1739
  import { join as join2 } from "node:path";
1740
1740
 
1741
1741
  // ../../core/src/shared/utils/module.ts
1742
+ import { createRequire as createRequire2, register } from "node:module";
1742
1743
  import { fileURLToPath, pathToFileURL } from "node:url";
1743
1744
 
1744
1745
  // ../../../node_modules/exsolve/dist/index.mjs
@@ -1930,7 +1931,12 @@ var importMetaResolve = (...args) => typeof import.meta.resolve != "function" &&
1930
1931
  try {
1931
1932
  return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"), parent)));
1932
1933
  } catch {
1933
- return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"))));
1934
+ try {
1935
+ return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"))));
1936
+ } catch {
1937
+ let req = createRequire2(parent ?? import.meta.url);
1938
+ return dirname(req.resolve(join(pkg, "package.json")));
1939
+ }
1934
1940
  }
1935
1941
  };
1936
1942
 
@@ -1938,7 +1944,7 @@ var importMetaResolve = (...args) => typeof import.meta.resolve != "function" &&
1938
1944
  var getNextjsVersion = () => JSON.parse(readFileSync(join2(resolvePackageDir("next"), "package.json"), "utf8")).version;
1939
1945
 
1940
1946
  // src/preset.ts
1941
- var require3 = createRequire2(import.meta.url), vitePluginStorybookNextjs = require3("vite-plugin-storybook-nextjs"), core = async (config2, options) => {
1947
+ var require3 = createRequire3(import.meta.url), vitePluginStorybookNextjs = require3("vite-plugin-storybook-nextjs"), core = async (config2, options) => {
1942
1948
  let framework = await options.presets.apply("framework");
1943
1949
  return {
1944
1950
  ...config2,
@@ -1,15 +1,15 @@
1
- import CJS_COMPAT_NODE_URL_yqvb6c3znio from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yqvb6c3znio from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yqvb6c3znio from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vev3kflouh from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vev3kflouh from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vev3kflouh from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yqvb6c3znio.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yqvb6c3znio.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yqvb6c3znio.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vev3kflouh.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vev3kflouh.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vev3kflouh.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
- import "../_node-chunks/chunk-3DUCK4WQ.js";
12
+ import "../_node-chunks/chunk-HKZHWGZ2.js";
13
13
 
14
14
  // src/vite-plugin/index.ts
15
15
  import { createRequire } from "node:module";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/nextjs-vite",
3
- "version": "10.3.0-alpha.8",
3
+ "version": "10.3.0-beta.0",
4
4
  "description": "Storybook for Next.js and Vite: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -83,9 +83,9 @@
83
83
  "!src/**/*"
84
84
  ],
85
85
  "dependencies": {
86
- "@storybook/builder-vite": "10.3.0-alpha.8",
87
- "@storybook/react": "10.3.0-alpha.8",
88
- "@storybook/react-vite": "10.3.0-alpha.8",
86
+ "@storybook/builder-vite": "10.3.0-beta.0",
87
+ "@storybook/react": "10.3.0-beta.0",
88
+ "@storybook/react-vite": "10.3.0-beta.0",
89
89
  "styled-jsx": "5.1.6",
90
90
  "vite-plugin-storybook-nextjs": "^3.1.9"
91
91
  },
@@ -101,8 +101,8 @@
101
101
  "next": "^14.1.0 || ^15.0.0 || ^16.0.0",
102
102
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
103
103
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
104
- "storybook": "^10.3.0-alpha.8",
105
- "vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
104
+ "storybook": "^10.3.0-beta.0",
105
+ "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
106
106
  },
107
107
  "peerDependenciesMeta": {
108
108
  "typescript": {
@@ -52,6 +52,7 @@ export const RightArrow = () => <svg
52
52
  <h4 className="sb-section-item-heading">Add styling and CSS</h4>
53
53
  <p className="sb-section-item-paragraph">Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook.</p>
54
54
  <a
55
+ className="sb-action-link"
55
56
  href="https://storybook.js.org/docs/configure/styling-and-css/?renderer=react&ref=configure"
56
57
  target="_blank"
57
58
  >Learn more<RightArrow /></a>
@@ -67,6 +68,7 @@ export const RightArrow = () => <svg
67
68
  <h4 className="sb-section-item-heading">Provide context and mocking</h4>
68
69
  <p className="sb-section-item-paragraph">Often when a story doesn't render, it's because your component is expecting a specific environment or context (like a theme provider) to be available.</p>
69
70
  <a
71
+ className="sb-action-link"
70
72
  href="https://storybook.js.org/docs/writing-stories/decorators/?renderer=react&ref=configure#context-for-mocking"
71
73
  target="_blank"
72
74
  >Learn more<RightArrow /></a>
@@ -85,6 +87,7 @@ export const RightArrow = () => <svg
85
87
  `staticDirs` configuration option to specify folders to load when
86
88
  starting Storybook.</p>
87
89
  <a
90
+ className="sb-action-link"
88
91
  href="https://storybook.js.org/docs/configure/images-and-assets/?renderer=react&ref=configure"
89
92
  target="_blank"
90
93
  >Learn more<RightArrow /></a>
@@ -113,6 +116,7 @@ export const RightArrow = () => <svg
113
116
  <p className="sb-section-item-paragraph">Auto-generate living,
114
117
  interactive reference documentation from your components and stories.</p>
115
118
  <a
119
+ className="sb-action-link"
116
120
  href="https://storybook.js.org/docs/writing-docs/autodocs/?renderer=react&ref=configure"
117
121
  target="_blank"
118
122
  >Learn more<RightArrow /></a>
@@ -128,6 +132,7 @@ export const RightArrow = () => <svg
128
132
  <h4 className="sb-section-item-heading">Publish to Chromatic</h4>
129
133
  <p className="sb-section-item-paragraph">Publish your Storybook to review and collaborate with your entire team.</p>
130
134
  <a
135
+ className="sb-action-link"
131
136
  href="https://storybook.js.org/docs/sharing/publish-storybook/?renderer=react&ref=configure#publish-storybook-with-chromatic"
132
137
  target="_blank"
133
138
  >Learn more<RightArrow /></a>
@@ -144,6 +149,7 @@ export const RightArrow = () => <svg
144
149
  <p className="sb-section-item-paragraph">Embed your stories into Figma to cross-reference the design and live
145
150
  implementation in one place.</p>
146
151
  <a
152
+ className="sb-action-link"
147
153
  href="https://storybook.js.org/docs/sharing/design-integrations/?renderer=react&ref=configure#embed-storybook-in-figma-with-the-plugin"
148
154
  target="_blank"
149
155
  >Learn more<RightArrow /></a>
@@ -160,6 +166,7 @@ export const RightArrow = () => <svg
160
166
  <p className="sb-section-item-paragraph">Use stories to test a component in all its variations, no matter how
161
167
  complex.</p>
162
168
  <a
169
+ className="sb-action-link"
163
170
  href="https://storybook.js.org/docs/writing-tests/?renderer=react&ref=configure"
164
171
  target="_blank"
165
172
  >Learn more<RightArrow /></a>
@@ -175,6 +182,7 @@ export const RightArrow = () => <svg
175
182
  <h4 className="sb-section-item-heading">Accessibility</h4>
176
183
  <p className="sb-section-item-paragraph">Automatically test your components for a11y issues as you develop.</p>
177
184
  <a
185
+ className="sb-action-link"
178
186
  href="https://storybook.js.org/docs/writing-tests/accessibility-testing/?renderer=react&ref=configure"
179
187
  target="_blank"
180
188
  >Learn more<RightArrow /></a>
@@ -190,6 +198,7 @@ export const RightArrow = () => <svg
190
198
  <h4 className="sb-section-item-heading">Theming</h4>
191
199
  <p className="sb-section-item-paragraph">Theme Storybook's UI to personalize it to your project.</p>
192
200
  <a
201
+ className="sb-action-link"
193
202
  href="https://storybook.js.org/docs/configure/theming/?renderer=react&ref=configure"
194
203
  target="_blank"
195
204
  >Learn more<RightArrow /></a>
@@ -202,6 +211,7 @@ export const RightArrow = () => <svg
202
211
  <h4>Addons</h4>
203
212
  <p className="sb-section-item-paragraph">Integrate your tools with Storybook to connect workflows.</p>
204
213
  <a
214
+ className="sb-action-link"
205
215
  href="https://storybook.js.org/addons/?ref=configure"
206
216
  target="_blank"
207
217
  >Discover all addons<RightArrow /></a>
@@ -229,6 +239,7 @@ export const RightArrow = () => <svg
229
239
  Join our contributors building the future of UI development.
230
240
 
231
241
  <a
242
+ className="sb-action-link"
232
243
  href="https://github.com/storybookjs/storybook"
233
244
  target="_blank"
234
245
  >Star on GitHub<RightArrow /></a>
@@ -246,6 +257,7 @@ export const RightArrow = () => <svg
246
257
  Get support and chat with frontend developers.
247
258
 
248
259
  <a
260
+ className="sb-action-link"
249
261
  href="https://discord.gg/storybook"
250
262
  target="_blank"
251
263
  >Join Discord server<RightArrow /></a>
@@ -264,6 +276,7 @@ export const RightArrow = () => <svg
264
276
  Watch tutorials, feature previews and interviews.
265
277
 
266
278
  <a
279
+ className="sb-action-link"
267
280
  href="https://www.youtube.com/@chromaticui"
268
281
  target="_blank"
269
282
  >Watch on YouTube<RightArrow /></a>
@@ -281,6 +294,7 @@ export const RightArrow = () => <svg
281
294
  <p>Follow guided walkthroughs on for key workflows.</p>
282
295
 
283
296
  <a
297
+ className="sb-action-link"
284
298
  href="https://storybook.js.org/tutorials/?ref=configure"
285
299
  target="_blank"
286
300
  >Discover tutorials<RightArrow /></a>
@@ -328,6 +342,16 @@ export const RightArrow = () => <svg
328
342
  padding-bottom: 10px;
329
343
  }
330
344
 
345
+ .sb-action-link {
346
+ text-decoration: none;
347
+ }
348
+
349
+ .sb-action-link:hover, .sb-action-link:focus {
350
+ text-decoration: underline;
351
+ text-decoration-thickness: 0.03125rem;
352
+ text-underline-offset: 0.11em;
353
+ }
354
+
331
355
  .sb-chevron {
332
356
  margin-left: 5px;
333
357
  }