@storybook/nextjs 10.1.0-alpha.10 → 10.1.0-alpha.11
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-KX5HHFXV.js → chunk-2SBZPHE7.js} +50 -100
- package/dist/_browser-chunks/chunk-RDMFII4N.js +22 -0
- package/dist/_browser-chunks/{chunk-L5NVL7MD.js → chunk-SL3VIQZ3.js} +7 -13
- package/dist/_browser-chunks/react-18-PYSEDAWB.js +43 -0
- package/dist/_node-chunks/chunk-KG2CEDQ6.js +76 -0
- package/dist/_node-chunks/chunk-NVSKNSJK.js +205 -0
- package/dist/_node-chunks/chunk-XVBKFOBF.js +57 -0
- package/dist/_node-chunks/configureNextFont-QR356EAI.js +28 -0
- package/dist/_node-chunks/{loader-WPDBQYKQ.js → loader-GUPXITUF.js} +11 -16
- package/dist/_node-chunks/{loader-UJGK53PP.js → loader-VIIL5HSY.js} +15 -25
- package/dist/_node-chunks/{utils-G77XBOCW.js → utils-GFLYVHHC.js} +8 -9
- package/dist/_node-chunks/webpack-A6CKSXQU.js +24 -0
- package/dist/_node-chunks/webpack-HDYOTQDH.js +23 -0
- package/dist/_node-chunks/{webpack-AIYB3HRJ.js → webpack-K7FNPCWL.js} +13 -19
- package/dist/_node-chunks/webpack-KEI74OHK.js +30 -0
- package/dist/_node-chunks/{webpack-QCUACIS6.js → webpack-O4VJM34G.js} +9 -12
- package/dist/_node-chunks/webpack-S3SWBOVU.js +97 -0
- package/dist/_node-chunks/webpack-YFKESEJQ.js +60 -0
- package/dist/_node-chunks/webpack-YOXZVRLP.js +23 -0
- package/dist/compatibility/draft-mode.compat.js +1 -1
- package/dist/export-mocks/cache/index.js +3 -6
- package/dist/export-mocks/headers/index.js +6 -29
- package/dist/export-mocks/index.js +9 -10
- package/dist/export-mocks/navigation/index.js +17 -41
- package/dist/export-mocks/router/index.js +20 -54
- package/dist/font/webpack/loader/storybook-nextjs-font-loader.js +38 -80
- package/dist/image-context.js +1 -1
- package/dist/images/next-image.js +5 -11
- package/dist/images/next-legacy-image.js +3 -6
- package/dist/index.js +2865 -8413
- package/dist/next-image-loader-stub.js +9 -16
- package/dist/node/index.js +6 -10
- package/dist/preset.js +183 -462
- package/dist/preview.js +2 -2
- package/dist/rsc/server-only.js +1 -1
- package/dist/swc/next-swc-loader-patch.js +46 -84
- package/package.json +6 -6
- package/dist/_browser-chunks/chunk-I5RFHXDS.js +0 -40
- package/dist/_browser-chunks/react-18-G7Q4PNHD.js +0 -71
- package/dist/_node-chunks/chunk-2ADK3PCH.js +0 -74
- package/dist/_node-chunks/chunk-EVMWO5FG.js +0 -102
- package/dist/_node-chunks/chunk-RSBRC6AY.js +0 -475
- package/dist/_node-chunks/chunk-Z2RESD5M.js +0 -17
- package/dist/_node-chunks/configureNextFont-ZETH4V45.js +0 -36
- package/dist/_node-chunks/webpack-4ZO2PLAG.js +0 -107
- package/dist/_node-chunks/webpack-6QTUYRFB.js +0 -30
- package/dist/_node-chunks/webpack-KRJ4EWQZ.js +0 -27
- package/dist/_node-chunks/webpack-L5YFG573.js +0 -38
- package/dist/_node-chunks/webpack-QPCUFYIY.js +0 -77
- package/dist/_node-chunks/webpack-R5RMXZWI.js +0 -26
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_1wy8hqz8e24 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_1wy8hqz8e24 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_1wy8hqz8e24 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_1wy8hqz8e24.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_1wy8hqz8e24.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_1wy8hqz8e24.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "./chunk-Z2RESD5M.js";
|
|
15
|
-
|
|
16
|
-
// src/imports/webpack.ts
|
|
17
|
-
import { loadConfig } from "tsconfig-paths";
|
|
18
|
-
import TsconfigPathsPlugin from "tsconfig-paths-webpack-plugin";
|
|
19
|
-
var configureImports = /* @__PURE__ */ __name(({
|
|
20
|
-
baseConfig,
|
|
21
|
-
configDir
|
|
22
|
-
}) => {
|
|
23
|
-
const configLoadResult = loadConfig(configDir);
|
|
24
|
-
if (configLoadResult.resultType === "failed") {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
baseConfig.resolve ??= {};
|
|
28
|
-
baseConfig.resolve.plugins ??= [];
|
|
29
|
-
baseConfig.resolve.plugins.push(
|
|
30
|
-
new TsconfigPathsPlugin({
|
|
31
|
-
configFile: configLoadResult.configFileAbsolutePath,
|
|
32
|
-
extensions: [".js", ".jsx", ".ts", ".tsx"]
|
|
33
|
-
})
|
|
34
|
-
);
|
|
35
|
-
}, "configureImports");
|
|
36
|
-
export {
|
|
37
|
-
configureImports
|
|
38
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_1wy8hqz8e24 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_1wy8hqz8e24 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_1wy8hqz8e24 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_1wy8hqz8e24.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_1wy8hqz8e24.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_1wy8hqz8e24.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
getNextjsVersion
|
|
14
|
-
} from "./chunk-EVMWO5FG.js";
|
|
15
|
-
import "./chunk-RSBRC6AY.js";
|
|
16
|
-
import {
|
|
17
|
-
__name
|
|
18
|
-
} from "./chunk-Z2RESD5M.js";
|
|
19
|
-
|
|
20
|
-
// src/images/webpack.ts
|
|
21
|
-
import { fileURLToPath } from "node:url";
|
|
22
|
-
import semver from "semver";
|
|
23
|
-
var configureImages = /* @__PURE__ */ __name((baseConfig, nextConfig) => {
|
|
24
|
-
configureStaticImageImport(baseConfig, nextConfig);
|
|
25
|
-
configureImageDefaults(baseConfig);
|
|
26
|
-
}, "configureImages");
|
|
27
|
-
var fallbackFilename = "static/media/[path][name][ext]";
|
|
28
|
-
var configureImageDefaults = /* @__PURE__ */ __name((baseConfig) => {
|
|
29
|
-
const version = getNextjsVersion();
|
|
30
|
-
const resolve = baseConfig.resolve ?? {};
|
|
31
|
-
resolve.alias = {
|
|
32
|
-
...resolve.alias,
|
|
33
|
-
"sb-original/next/image": fileURLToPath(import.meta.resolve("next/image")),
|
|
34
|
-
"next/image": "@storybook/nextjs/images/next-image"
|
|
35
|
-
};
|
|
36
|
-
if (semver.satisfies(version, ">=13.0.0")) {
|
|
37
|
-
resolve.alias = {
|
|
38
|
-
...resolve.alias,
|
|
39
|
-
"sb-original/next/legacy/image": fileURLToPath(import.meta.resolve("next/legacy/image")),
|
|
40
|
-
"next/legacy/image": "@storybook/nextjs/images/next-legacy-image"
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
}, "configureImageDefaults");
|
|
44
|
-
var configureStaticImageImport = /* @__PURE__ */ __name((baseConfig, nextConfig) => {
|
|
45
|
-
const rules = baseConfig.module?.rules;
|
|
46
|
-
const assetRule = rules?.find(
|
|
47
|
-
(rule) => rule && typeof rule !== "string" && rule.test instanceof RegExp && rule.test.test("test.jpg")
|
|
48
|
-
);
|
|
49
|
-
if (!assetRule) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
assetRule.test = /\.(apng|eot|otf|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/;
|
|
53
|
-
rules?.push({
|
|
54
|
-
test: /\.(png|jpg|jpeg|gif|webp|avif|ico|bmp|svg)$/i,
|
|
55
|
-
issuer: { not: /\.(css|scss|sass)$/ },
|
|
56
|
-
use: [
|
|
57
|
-
{
|
|
58
|
-
loader: fileURLToPath(import.meta.resolve("@storybook/nextjs/next-image-loader-stub")),
|
|
59
|
-
options: {
|
|
60
|
-
filename: assetRule.generator?.filename ?? fallbackFilename,
|
|
61
|
-
nextConfig
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
});
|
|
66
|
-
rules?.push({
|
|
67
|
-
test: /\.(png|jpg|jpeg|gif|webp|avif|ico|bmp|svg)$/i,
|
|
68
|
-
issuer: /\.(css|scss|sass)$/,
|
|
69
|
-
type: "asset/resource",
|
|
70
|
-
generator: {
|
|
71
|
-
filename: assetRule.generator?.filename ?? fallbackFilename
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}, "configureStaticImageImport");
|
|
75
|
-
export {
|
|
76
|
-
configureImages
|
|
77
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_1wy8hqz8e24 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_1wy8hqz8e24 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_1wy8hqz8e24 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_1wy8hqz8e24.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_1wy8hqz8e24.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_1wy8hqz8e24.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
addScopedAlias
|
|
14
|
-
} from "./chunk-EVMWO5FG.js";
|
|
15
|
-
import "./chunk-RSBRC6AY.js";
|
|
16
|
-
import {
|
|
17
|
-
__name
|
|
18
|
-
} from "./chunk-Z2RESD5M.js";
|
|
19
|
-
|
|
20
|
-
// src/styledJsx/webpack.ts
|
|
21
|
-
var configureStyledJsx = /* @__PURE__ */ __name((baseConfig) => {
|
|
22
|
-
addScopedAlias(baseConfig, "styled-jsx");
|
|
23
|
-
}, "configureStyledJsx");
|
|
24
|
-
export {
|
|
25
|
-
configureStyledJsx
|
|
26
|
-
};
|