@storybook/nextjs-vite 10.0.0-beta.6 → 10.0.0-beta.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.
- package/dist/_browser-chunks/{chunk-2RWWBM6A.js → chunk-I34DATQB.js} +0 -4
- package/dist/_node-chunks/{chunk-ZULHTNIU.js → chunk-BLUKXR72.js} +6 -6
- package/dist/_node-chunks/{dist-23UPWBL4.js → dist-6XTC5ARL.js} +7 -7
- package/dist/_node-chunks/{jiti-YMWCBPIT.js → jiti-ZAZL5OWE.js} +7 -7
- package/dist/config/preview.js +3 -0
- package/dist/index.js +29 -21
- package/dist/node/index.js +7 -7
- package/dist/preset.js +2432 -37
- package/dist/preview.d.ts +19 -3
- package/dist/preview.js +1 -1
- package/dist/vite-plugin/index.js +7 -7
- package/package.json +7 -5
- package/dist/preview.d.tsx +0 -19
|
@@ -14,10 +14,6 @@ import { createNavigation } from "@storybook/nextjs-vite/navigation.mock";
|
|
|
14
14
|
import { createRouter } from "@storybook/nextjs-vite/router.mock";
|
|
15
15
|
import { isNextRouterError } from "next/dist/client/components/is-next-router-error";
|
|
16
16
|
|
|
17
|
-
// src/config/preview.ts
|
|
18
|
-
import { setConfig } from "next/config";
|
|
19
|
-
setConfig(process.env.__NEXT_RUNTIME_CONFIG);
|
|
20
|
-
|
|
21
17
|
// src/head-manager/decorator.tsx
|
|
22
18
|
import * as React2 from "react";
|
|
23
19
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_o0r80imq63 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_o0r80imq63 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_o0r80imq63 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_o0r80imq63.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_o0r80imq63.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_o0r80imq63.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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_o0r80imq63 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_o0r80imq63 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_o0r80imq63 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_o0r80imq63.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_o0r80imq63.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_o0r80imq63.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
|
__name,
|
|
15
15
|
__require
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BLUKXR72.js";
|
|
17
17
|
|
|
18
18
|
// ../../node_modules/yaml/dist/nodes/identity.js
|
|
19
19
|
var require_identity = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_o0r80imq63 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_o0r80imq63 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_o0r80imq63 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_o0r80imq63.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_o0r80imq63.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_o0r80imq63.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
__name,
|
|
16
16
|
__require,
|
|
17
17
|
__toESM
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-BLUKXR72.js";
|
|
19
19
|
|
|
20
20
|
// ../../node_modules/jiti/dist/jiti.cjs
|
|
21
21
|
var require_jiti = __commonJS({
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
preview_exports
|
|
3
|
-
} from "./_browser-chunks/chunk-
|
|
3
|
+
} from "./_browser-chunks/chunk-I34DATQB.js";
|
|
4
4
|
import {
|
|
5
5
|
__commonJS,
|
|
6
6
|
__export,
|
|
@@ -12995,8 +12995,27 @@ __export(entry_preview_exports, {
|
|
|
12995
12995
|
render: () => render,
|
|
12996
12996
|
renderToCanvas: () => renderToCanvas
|
|
12997
12997
|
});
|
|
12998
|
-
var import_semver = __toESM(require_semver2(), 1);
|
|
12999
12998
|
import * as React5 from "react";
|
|
12999
|
+
|
|
13000
|
+
// ../../node_modules/@storybook/global/dist/index.mjs
|
|
13001
|
+
var scope = (() => {
|
|
13002
|
+
let win;
|
|
13003
|
+
if (typeof window !== "undefined") {
|
|
13004
|
+
win = window;
|
|
13005
|
+
} else if (typeof globalThis !== "undefined") {
|
|
13006
|
+
win = globalThis;
|
|
13007
|
+
} else if (typeof global !== "undefined") {
|
|
13008
|
+
win = global;
|
|
13009
|
+
} else if (typeof self !== "undefined") {
|
|
13010
|
+
win = self;
|
|
13011
|
+
} else {
|
|
13012
|
+
win = {};
|
|
13013
|
+
}
|
|
13014
|
+
return win;
|
|
13015
|
+
})();
|
|
13016
|
+
|
|
13017
|
+
// ../../renderers/react/src/entry-preview.tsx
|
|
13018
|
+
var import_semver = __toESM(require_semver2(), 1);
|
|
13000
13019
|
import { configure } from "storybook/test";
|
|
13001
13020
|
|
|
13002
13021
|
// ../../renderers/react/src/act-compat.ts
|
|
@@ -13078,25 +13097,6 @@ var render = /* @__PURE__ */ __name((args, context) => {
|
|
|
13078
13097
|
|
|
13079
13098
|
// ../../renderers/react/src/renderToCanvas.tsx
|
|
13080
13099
|
import React3, { Fragment, Component as ReactComponent, StrictMode } from "react";
|
|
13081
|
-
|
|
13082
|
-
// ../../node_modules/@storybook/global/dist/index.mjs
|
|
13083
|
-
var scope = (() => {
|
|
13084
|
-
let win;
|
|
13085
|
-
if (typeof window !== "undefined") {
|
|
13086
|
-
win = window;
|
|
13087
|
-
} else if (typeof globalThis !== "undefined") {
|
|
13088
|
-
win = globalThis;
|
|
13089
|
-
} else if (typeof global !== "undefined") {
|
|
13090
|
-
win = global;
|
|
13091
|
-
} else if (typeof self !== "undefined") {
|
|
13092
|
-
win = self;
|
|
13093
|
-
} else {
|
|
13094
|
-
win = {};
|
|
13095
|
-
}
|
|
13096
|
-
return win;
|
|
13097
|
-
})();
|
|
13098
|
-
|
|
13099
|
-
// ../../renderers/react/src/renderToCanvas.tsx
|
|
13100
13100
|
var { FRAMEWORK_OPTIONS } = scope;
|
|
13101
13101
|
var _ErrorBoundary = class _ErrorBoundary extends ReactComponent {
|
|
13102
13102
|
constructor() {
|
|
@@ -13205,6 +13205,14 @@ var decorators = [
|
|
|
13205
13205
|
throw new Error("React Server Components require React >= 18.3");
|
|
13206
13206
|
}
|
|
13207
13207
|
return React5.createElement(React5.Suspense, null, story());
|
|
13208
|
+
},
|
|
13209
|
+
(story, context) => {
|
|
13210
|
+
if (context.tags?.includes("test-fn") && !scope.FEATURES?.experimentalTestSyntax) {
|
|
13211
|
+
throw new Error(
|
|
13212
|
+
"To use the experimental test function, you must enable the experimentalTestSyntax feature flag. See https://storybook.js.org/docs/10/api/main-config/main-config-features#experimentalTestSyntax"
|
|
13213
|
+
);
|
|
13214
|
+
}
|
|
13215
|
+
return story();
|
|
13208
13216
|
}
|
|
13209
13217
|
];
|
|
13210
13218
|
var parameters = {
|
package/dist/node/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_o0r80imq63 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_o0r80imq63 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_o0r80imq63 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_o0r80imq63.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_o0r80imq63.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_o0r80imq63.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-
|
|
14
|
+
} from "../_node-chunks/chunk-BLUKXR72.js";
|
|
15
15
|
|
|
16
16
|
// src/node/index.ts
|
|
17
17
|
function defineMain(config) {
|