@storybook/nextjs 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.
- package/dist/_node-chunks/{chunk-VLHSCTHA.js → chunk-4JVQWDV4.js} +7 -7
- package/dist/_node-chunks/{chunk-NR3A2WJ6.js → chunk-HPADKVL4.js} +13 -7
- package/dist/_node-chunks/{chunk-VEJ4UG6D.js → chunk-OOBG4GLF.js} +7 -7
- package/dist/_node-chunks/{configureNextFont-YIQE7ZGB.js → configureNextFont-A6QEZWG6.js} +6 -6
- package/dist/_node-chunks/{loader-QWKNND6Y.js → loader-7BI67TRF.js} +22 -10
- package/dist/_node-chunks/{loader-MODZ6XJD.js → loader-QHSOO5UD.js} +8 -8
- package/dist/_node-chunks/{utils-TUSAVS7I.js → utils-UJD4GO3Q.js} +8 -8
- package/dist/_node-chunks/{webpack-L2PJ3TZD.js → webpack-5ZVBTJ4D.js} +7 -7
- package/dist/_node-chunks/{webpack-FWO5EL65.js → webpack-7Q7XWVNE.js} +6 -6
- package/dist/_node-chunks/{webpack-W3ON67CS.js → webpack-D56XLQLH.js} +8 -8
- package/dist/_node-chunks/{webpack-WYO75DEW.js → webpack-D5O55JWP.js} +6 -6
- package/dist/_node-chunks/{webpack-VWL354AC.js → webpack-KRFFRY6V.js} +9 -9
- package/dist/_node-chunks/{webpack-6UWWQTFX.js → webpack-P4IW2BFG.js} +8 -8
- package/dist/_node-chunks/{webpack-X7YH7MGH.js → webpack-SQA7UP2C.js} +6 -6
- package/dist/_node-chunks/{webpack-Y5T3HNJE.js → webpack-X32ODOHU.js} +6 -6
- package/dist/export-mocks/index.js +9 -9
- package/dist/font/webpack/loader/storybook-nextjs-font-loader.js +6 -6
- package/dist/index.d.ts +2 -1
- package/dist/node/index.d.ts +0 -2
- package/dist/node/index.js +6 -6
- package/dist/preset.js +9 -9
- package/dist/swc/next-swc-loader-patch.js +6 -6
- package/package.json +5 -5
- package/template/cli/js/Configure.mdx +24 -0
- package/template/cli/ts/Configure.mdx +24 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.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
|
resolvePackageDir
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HPADKVL4.js";
|
|
15
15
|
|
|
16
16
|
// src/utils.ts
|
|
17
17
|
import { readFileSync } from "node:fs";
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.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
|
|
|
13
13
|
// ../../core/src/shared/utils/module.ts
|
|
14
|
+
import { createRequire, register } from "node:module";
|
|
14
15
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
15
16
|
|
|
16
17
|
// ../../../node_modules/exsolve/dist/index.mjs
|
|
@@ -202,7 +203,12 @@ var importMetaResolve = (...args) => typeof import.meta.resolve != "function" &&
|
|
|
202
203
|
try {
|
|
203
204
|
return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"), parent)));
|
|
204
205
|
} catch {
|
|
205
|
-
|
|
206
|
+
try {
|
|
207
|
+
return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"))));
|
|
208
|
+
} catch {
|
|
209
|
+
let req = createRequire(parent ?? import.meta.url);
|
|
210
|
+
return dirname(req.resolve(join(pkg, "package.json")));
|
|
211
|
+
}
|
|
206
212
|
}
|
|
207
213
|
};
|
|
208
214
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.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
|
addScopedAlias,
|
|
14
14
|
getNextjsVersion,
|
|
15
15
|
setAlias
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4JVQWDV4.js";
|
|
17
17
|
|
|
18
18
|
// src/compatibility/compatibility-map.ts
|
|
19
19
|
import semver from "semver";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.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
|
getNodeModulesExcludeRegex
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-4JVQWDV4.js";
|
|
15
|
+
import "./chunk-HPADKVL4.js";
|
|
16
16
|
|
|
17
17
|
// src/swc/loader.ts
|
|
18
18
|
import { join } from "node:path";
|
|
19
19
|
import { getProjectRoot } from "storybook/internal/common";
|
|
20
20
|
import { getVirtualModules } from "@storybook/builder-webpack5";
|
|
21
21
|
import nextJSLoadConfigModule from "next/dist/build/load-jsconfig.js";
|
|
22
|
-
import { getSupportedBrowsers } from "next/dist/build/utils.js";
|
|
23
22
|
var configureSWCLoader = async (baseConfig, options, nextConfig) => {
|
|
24
23
|
let isDevelopment = options.configType !== "PRODUCTION", { virtualModules } = await getVirtualModules(options), projectRoot = getProjectRoot(), loadJsConfig = nextJSLoadConfigModule.default ?? nextJSLoadConfigModule, { jsConfig } = await loadJsConfig(projectRoot, nextConfig), rawRule = baseConfig.module?.rules?.find(
|
|
25
24
|
(rule) => typeof rule == "object" && rule?.resourceQuery?.toString() === "/raw/"
|
|
@@ -42,13 +41,26 @@ var configureSWCLoader = async (baseConfig, options, nextConfig) => {
|
|
|
42
41
|
hasReactRefresh: isDevelopment,
|
|
43
42
|
jsConfig,
|
|
44
43
|
nextConfig,
|
|
45
|
-
supportedBrowsers: getSupportedBrowsers(projectRoot, isDevelopment),
|
|
44
|
+
supportedBrowsers: await getSupportedBrowsers(projectRoot, isDevelopment),
|
|
46
45
|
swcCacheDir: join(projectRoot, nextConfig?.distDir ?? ".next", "cache", "swc"),
|
|
47
46
|
bundleTarget: "default"
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
});
|
|
51
50
|
};
|
|
51
|
+
async function getSupportedBrowsers(projectRoot, isDevelopment) {
|
|
52
|
+
try {
|
|
53
|
+
return (await import("next/dist/build/get-supported-browsers.js")).getSupportedBrowsers(
|
|
54
|
+
projectRoot,
|
|
55
|
+
isDevelopment
|
|
56
|
+
);
|
|
57
|
+
} catch {
|
|
58
|
+
return (await import("next/dist/build/utils.js")).getSupportedBrowsers(
|
|
59
|
+
projectRoot,
|
|
60
|
+
isDevelopment
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
52
64
|
export {
|
|
53
65
|
configureSWCLoader
|
|
54
66
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.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
|
getNodeModulesExcludeRegex
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-4JVQWDV4.js";
|
|
15
|
+
import "./chunk-HPADKVL4.js";
|
|
16
16
|
|
|
17
17
|
// src/babel/loader.ts
|
|
18
18
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -18,8 +18,8 @@ import {
|
|
|
18
18
|
resolveNextConfig,
|
|
19
19
|
scopedResolve,
|
|
20
20
|
setAlias
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-4JVQWDV4.js";
|
|
22
|
+
import "./chunk-HPADKVL4.js";
|
|
23
23
|
export {
|
|
24
24
|
addScopedAlias,
|
|
25
25
|
configureRuntimeNextjsVersionResolution,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.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
|
resolvePackageDir
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HPADKVL4.js";
|
|
15
15
|
|
|
16
16
|
// src/css/webpack.ts
|
|
17
17
|
import { readFileSync } from "node:fs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.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
|
getNextjsVersion
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-4JVQWDV4.js";
|
|
15
|
+
import "./chunk-HPADKVL4.js";
|
|
16
16
|
|
|
17
17
|
// src/images/webpack.ts
|
|
18
18
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.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_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,11 +12,11 @@ var require = CJS_COMPAT_NODE_MODULE_hxnrhgqge58.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
configureCompatibilityAliases,
|
|
14
14
|
configureNextExportMocks
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-OOBG4GLF.js";
|
|
16
|
+
import "./chunk-4JVQWDV4.js";
|
|
17
17
|
import {
|
|
18
18
|
resolvePackageDir
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-HPADKVL4.js";
|
|
20
20
|
|
|
21
21
|
// src/aliases/webpack.ts
|
|
22
22
|
var configureAliases = (baseConfig) => {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.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
|
addScopedAlias
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-4JVQWDV4.js";
|
|
15
|
+
import "./chunk-HPADKVL4.js";
|
|
16
16
|
|
|
17
17
|
// src/styledJsx/webpack.ts
|
|
18
18
|
var configureStyledJsx = (baseConfig) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.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_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.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
|
getPackageAliases
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
15
|
-
import "../_node-chunks/chunk-
|
|
16
|
-
import "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-OOBG4GLF.js";
|
|
15
|
+
import "../_node-chunks/chunk-4JVQWDV4.js";
|
|
16
|
+
import "../_node-chunks/chunk-HPADKVL4.js";
|
|
17
17
|
export {
|
|
18
18
|
getPackageAliases
|
|
19
19
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ type FrameworkName = CompatibleString<'@storybook/nextjs'>;
|
|
|
11
11
|
type BuilderName = CompatibleString<'@storybook/builder-webpack5'>;
|
|
12
12
|
type FrameworkOptions = ReactOptions & {
|
|
13
13
|
nextConfigPath?: string;
|
|
14
|
-
image?: Partial<NextImage.ImageProps>;
|
|
15
14
|
builder?: BuilderOptions;
|
|
16
15
|
};
|
|
17
16
|
type StorybookConfigFramework = {
|
|
@@ -48,6 +47,8 @@ interface NextJsParameters {
|
|
|
48
47
|
navigation?: Partial<NextRouter>;
|
|
49
48
|
/** Next.js router configuration */
|
|
50
49
|
router?: Partial<NextRouter>;
|
|
50
|
+
/** Next.js image props */
|
|
51
|
+
image?: Partial<NextImage.ImageProps>;
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
54
|
interface NextJsTypes {
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { CompatibleString } from 'storybook/internal/types';
|
|
2
2
|
import { StorybookConfigWebpack, BuilderOptions, TypescriptOptions } from '@storybook/builder-webpack5';
|
|
3
3
|
import { StorybookConfig as StorybookConfig$1, ReactOptions, TypescriptOptions as TypescriptOptions$1 } from '@storybook/preset-react-webpack';
|
|
4
|
-
import * as NextImage from 'next/image';
|
|
5
4
|
|
|
6
5
|
type FrameworkName = CompatibleString<'@storybook/nextjs'>;
|
|
7
6
|
type BuilderName = CompatibleString<'@storybook/builder-webpack5'>;
|
|
8
7
|
type FrameworkOptions = ReactOptions & {
|
|
9
8
|
nextConfigPath?: string;
|
|
10
|
-
image?: Partial<NextImage.ImageProps>;
|
|
11
9
|
builder?: BuilderOptions;
|
|
12
10
|
};
|
|
13
11
|
type StorybookConfigFramework = {
|
package/dist/node/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.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,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
addScopedAlias,
|
|
14
14
|
isNextVersionGte,
|
|
15
15
|
resolveNextConfig
|
|
16
|
-
} from "./_node-chunks/chunk-
|
|
17
|
-
import "./_node-chunks/chunk-
|
|
16
|
+
} from "./_node-chunks/chunk-4JVQWDV4.js";
|
|
17
|
+
import "./_node-chunks/chunk-HPADKVL4.js";
|
|
18
18
|
|
|
19
19
|
// src/preset.ts
|
|
20
20
|
import { existsSync } from "node:fs";
|
|
@@ -546,7 +546,7 @@ var addons = [
|
|
|
546
546
|
let { nextConfigPath } = await options.presets.apply("frameworkOptions"), nextConfig = await configureConfig({
|
|
547
547
|
baseConfig,
|
|
548
548
|
nextConfigPath
|
|
549
|
-
}), { configureNextFont } = await import("./_node-chunks/configureNextFont-
|
|
549
|
+
}), { configureNextFont } = await import("./_node-chunks/configureNextFont-A6QEZWG6.js"), { configureRuntimeNextjsVersionResolution, getNextjsVersion } = await import("./_node-chunks/utils-UJD4GO3Q.js"), { configureImports } = await import("./_node-chunks/webpack-7Q7XWVNE.js"), { configureCss } = await import("./_node-chunks/webpack-5ZVBTJ4D.js"), { configureImages } = await import("./_node-chunks/webpack-D56XLQLH.js"), { configureStyledJsx } = await import("./_node-chunks/webpack-P4IW2BFG.js"), { configureNodePolyfills } = await import("./_node-chunks/webpack-X32ODOHU.js"), { configureAliases } = await import("./_node-chunks/webpack-KRFFRY6V.js"), { configureFastRefresh } = await import("./_node-chunks/webpack-SQA7UP2C.js"), { configureRSC } = await import("./_node-chunks/webpack-D5O55JWP.js"), { configureSWCLoader } = await import("./_node-chunks/loader-7BI67TRF.js"), { configureBabelLoader } = await import("./_node-chunks/loader-QHSOO5UD.js"), babelRCPath = join(getProjectRoot(), ".babelrc"), babelConfigPath = join(getProjectRoot(), "babel.config.js"), hasBabelConfig = existsSync(babelRCPath) || existsSync(babelConfigPath), nextjsVersion = getNextjsVersion(), isDevelopment = options.configType !== "PRODUCTION", useSWC = semver.gte(nextjsVersion, "14.0.0") && (nextConfig.experimental?.forceSwcTransforms || !hasBabelConfig);
|
|
550
550
|
return configureNextFont(baseConfig, useSWC), configureRuntimeNextjsVersionResolution(baseConfig), configureImports({ baseConfig, configDir: options.configDir }), configureCss(baseConfig, nextConfig), configureImages(baseConfig, nextConfig), configureStyledJsx(baseConfig), configureNodePolyfills(baseConfig), configureAliases(baseConfig), isDevelopment && configureFastRefresh(baseConfig), options.features?.experimentalRSC && configureRSC(baseConfig), useSWC ? (logger.info("Using SWC as compiler"), await configureSWCLoader(baseConfig, options, nextConfig)) : (logger.info("Using Babel as compiler"), await configureBabelLoader(baseConfig, options, nextConfig)), baseConfig;
|
|
551
551
|
};
|
|
552
552
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gd6ccessd9r from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gd6ccessd9r from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gd6ccessd9r from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gd6ccessd9r.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gd6ccessd9r.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gd6ccessd9r.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/nextjs",
|
|
3
|
-
"version": "10.3.0-
|
|
3
|
+
"version": "10.3.0-beta.0",
|
|
4
4
|
"description": "Storybook for Next.js: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -102,9 +102,9 @@
|
|
|
102
102
|
"@babel/preset-typescript": "^7.28.5",
|
|
103
103
|
"@babel/runtime": "^7.28.4",
|
|
104
104
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
|
105
|
-
"@storybook/builder-webpack5": "10.3.0-
|
|
106
|
-
"@storybook/preset-react-webpack": "10.3.0-
|
|
107
|
-
"@storybook/react": "10.3.0-
|
|
105
|
+
"@storybook/builder-webpack5": "10.3.0-beta.0",
|
|
106
|
+
"@storybook/preset-react-webpack": "10.3.0-beta.0",
|
|
107
|
+
"@storybook/react": "10.3.0-beta.0",
|
|
108
108
|
"@types/semver": "^7.7.1",
|
|
109
109
|
"babel-loader": "^9.1.3",
|
|
110
110
|
"css-loader": "^6.7.3",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"next": "^14.1.0 || ^15.0.0 || ^16.0.0",
|
|
139
139
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
140
140
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
141
|
-
"storybook": "^10.3.0-
|
|
141
|
+
"storybook": "^10.3.0-beta.0",
|
|
142
142
|
"webpack": "^5.0.0"
|
|
143
143
|
},
|
|
144
144
|
"peerDependenciesMeta": {
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|