@storybook/nextjs 10.0.0-beta.7 → 10.0.0-beta.9
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-JOMP7DUK.js → chunk-KX5HHFXV.js} +0 -4
- package/dist/_node-chunks/chunk-2AIU567S.js +475 -0
- package/dist/_node-chunks/{chunk-R5YVZ544.js → chunk-C2JBPJNF.js} +8 -8
- package/dist/_node-chunks/{chunk-P5ANMHV5.js → chunk-LOXZKSL5.js} +8 -8
- package/dist/_node-chunks/{chunk-TOC5P2JS.js → chunk-QT76SDL6.js} +6 -6
- package/dist/_node-chunks/{configureNextFont-5A5MQY5F.js → configureNextFont-75U4EED2.js} +7 -7
- package/dist/_node-chunks/{loader-55SG2SCO.js → loader-6TU7D2X3.js} +9 -9
- package/dist/_node-chunks/{loader-STRQQK44.js → loader-TZNYRIKN.js} +9 -9
- package/dist/_node-chunks/{utils-QJMJG66O.js → utils-53WNHYBB.js} +9 -9
- package/dist/_node-chunks/{webpack-7WEWRSDT.js → webpack-6SBL2B6C.js} +10 -10
- package/dist/_node-chunks/{webpack-KZYCS2TY.js → webpack-7MBP7UUJ.js} +8 -8
- package/dist/_node-chunks/{webpack-J7BYSE2X.js → webpack-A2EJXX3J.js} +9 -9
- package/dist/_node-chunks/{webpack-4OYO4ZCO.js → webpack-BI2FNR2F.js} +7 -7
- package/dist/_node-chunks/{webpack-OZ4TCVTN.js → webpack-JYC4FM4N.js} +9 -9
- package/dist/_node-chunks/{webpack-27TRAWQ5.js → webpack-VXLTOMVP.js} +7 -7
- package/dist/_node-chunks/{webpack-RYEZF6GW.js → webpack-W42T353Z.js} +7 -7
- package/dist/_node-chunks/{webpack-YE7JOPCL.js → webpack-WK5J5HXP.js} +7 -7
- package/dist/config/preview.js +3 -0
- package/dist/export-mocks/index.js +10 -10
- package/dist/font/webpack/loader/storybook-nextjs-font-loader.js +7 -7
- package/dist/index.js +1 -1
- package/dist/node/index.js +7 -7
- package/dist/preset.js +43 -33
- package/dist/preview.js +1 -1
- package/dist/swc/next-swc-loader-patch.js +7 -7
- package/package.json +6 -5
- package/dist/_node-chunks/chunk-UHVMIXLX.js +0 -167
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_1q1d17aubaz from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_1q1d17aubaz from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_1q1d17aubaz from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_1q1d17aubaz.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_1q1d17aubaz.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_1q1d17aubaz.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-TOC5P2JS.js";
|
|
15
|
-
|
|
16
|
-
// ../../core/src/shared/utils/module.ts
|
|
17
|
-
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
18
|
-
|
|
19
|
-
// ../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
20
|
-
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
21
|
-
function normalizeWindowsPath(input = "") {
|
|
22
|
-
if (!input) {
|
|
23
|
-
return input;
|
|
24
|
-
}
|
|
25
|
-
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
26
|
-
}
|
|
27
|
-
__name(normalizeWindowsPath, "normalizeWindowsPath");
|
|
28
|
-
var _UNC_REGEX = /^[/\\]{2}/;
|
|
29
|
-
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
30
|
-
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
31
|
-
var normalize = /* @__PURE__ */ __name(function(path2) {
|
|
32
|
-
if (path2.length === 0) {
|
|
33
|
-
return ".";
|
|
34
|
-
}
|
|
35
|
-
path2 = normalizeWindowsPath(path2);
|
|
36
|
-
const isUNCPath = path2.match(_UNC_REGEX);
|
|
37
|
-
const isPathAbsolute = isAbsolute(path2);
|
|
38
|
-
const trailingSeparator = path2[path2.length - 1] === "/";
|
|
39
|
-
path2 = normalizeString(path2, !isPathAbsolute);
|
|
40
|
-
if (path2.length === 0) {
|
|
41
|
-
if (isPathAbsolute) {
|
|
42
|
-
return "/";
|
|
43
|
-
}
|
|
44
|
-
return trailingSeparator ? "./" : ".";
|
|
45
|
-
}
|
|
46
|
-
if (trailingSeparator) {
|
|
47
|
-
path2 += "/";
|
|
48
|
-
}
|
|
49
|
-
if (_DRIVE_LETTER_RE.test(path2)) {
|
|
50
|
-
path2 += "/";
|
|
51
|
-
}
|
|
52
|
-
if (isUNCPath) {
|
|
53
|
-
if (!isPathAbsolute) {
|
|
54
|
-
return `//./${path2}`;
|
|
55
|
-
}
|
|
56
|
-
return `//${path2}`;
|
|
57
|
-
}
|
|
58
|
-
return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
|
|
59
|
-
}, "normalize");
|
|
60
|
-
var join = /* @__PURE__ */ __name(function(...arguments_) {
|
|
61
|
-
if (arguments_.length === 0) {
|
|
62
|
-
return ".";
|
|
63
|
-
}
|
|
64
|
-
let joined;
|
|
65
|
-
for (const argument of arguments_) {
|
|
66
|
-
if (argument && argument.length > 0) {
|
|
67
|
-
if (joined === void 0) {
|
|
68
|
-
joined = argument;
|
|
69
|
-
} else {
|
|
70
|
-
joined += `/${argument}`;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
if (joined === void 0) {
|
|
75
|
-
return ".";
|
|
76
|
-
}
|
|
77
|
-
return normalize(joined.replace(/\/\/+/g, "/"));
|
|
78
|
-
}, "join");
|
|
79
|
-
function normalizeString(path2, allowAboveRoot) {
|
|
80
|
-
let res = "";
|
|
81
|
-
let lastSegmentLength = 0;
|
|
82
|
-
let lastSlash = -1;
|
|
83
|
-
let dots = 0;
|
|
84
|
-
let char = null;
|
|
85
|
-
for (let index = 0; index <= path2.length; ++index) {
|
|
86
|
-
if (index < path2.length) {
|
|
87
|
-
char = path2[index];
|
|
88
|
-
} else if (char === "/") {
|
|
89
|
-
break;
|
|
90
|
-
} else {
|
|
91
|
-
char = "/";
|
|
92
|
-
}
|
|
93
|
-
if (char === "/") {
|
|
94
|
-
if (lastSlash === index - 1 || dots === 1) ;
|
|
95
|
-
else if (dots === 2) {
|
|
96
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
97
|
-
if (res.length > 2) {
|
|
98
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
99
|
-
if (lastSlashIndex === -1) {
|
|
100
|
-
res = "";
|
|
101
|
-
lastSegmentLength = 0;
|
|
102
|
-
} else {
|
|
103
|
-
res = res.slice(0, lastSlashIndex);
|
|
104
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
105
|
-
}
|
|
106
|
-
lastSlash = index;
|
|
107
|
-
dots = 0;
|
|
108
|
-
continue;
|
|
109
|
-
} else if (res.length > 0) {
|
|
110
|
-
res = "";
|
|
111
|
-
lastSegmentLength = 0;
|
|
112
|
-
lastSlash = index;
|
|
113
|
-
dots = 0;
|
|
114
|
-
continue;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
if (allowAboveRoot) {
|
|
118
|
-
res += res.length > 0 ? "/.." : "..";
|
|
119
|
-
lastSegmentLength = 2;
|
|
120
|
-
}
|
|
121
|
-
} else {
|
|
122
|
-
if (res.length > 0) {
|
|
123
|
-
res += `/${path2.slice(lastSlash + 1, index)}`;
|
|
124
|
-
} else {
|
|
125
|
-
res = path2.slice(lastSlash + 1, index);
|
|
126
|
-
}
|
|
127
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
128
|
-
}
|
|
129
|
-
lastSlash = index;
|
|
130
|
-
dots = 0;
|
|
131
|
-
} else if (char === "." && dots !== -1) {
|
|
132
|
-
++dots;
|
|
133
|
-
} else {
|
|
134
|
-
dots = -1;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return res;
|
|
138
|
-
}
|
|
139
|
-
__name(normalizeString, "normalizeString");
|
|
140
|
-
var isAbsolute = /* @__PURE__ */ __name(function(p) {
|
|
141
|
-
return _IS_ABSOLUTE_RE.test(p);
|
|
142
|
-
}, "isAbsolute");
|
|
143
|
-
var dirname = /* @__PURE__ */ __name(function(p) {
|
|
144
|
-
const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
145
|
-
if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
|
|
146
|
-
segments[0] += "/";
|
|
147
|
-
}
|
|
148
|
-
return segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
149
|
-
}, "dirname");
|
|
150
|
-
|
|
151
|
-
// ../../core/src/shared/utils/module.ts
|
|
152
|
-
var importMetaResolve = /* @__PURE__ */ __name((...args) => {
|
|
153
|
-
if (typeof import.meta.resolve !== "function" && process.env.VITEST === "true") {
|
|
154
|
-
console.warn(
|
|
155
|
-
"importMetaResolve from within Storybook is being used in a Vitest test, but it shouldn't be. Please report this at https://github.com/storybookjs/storybook/issues/new?template=bug_report.yml"
|
|
156
|
-
);
|
|
157
|
-
return pathToFileURL(args[0]).href;
|
|
158
|
-
}
|
|
159
|
-
return import.meta.resolve(...args);
|
|
160
|
-
}, "importMetaResolve");
|
|
161
|
-
var resolvePackageDir = /* @__PURE__ */ __name((pkg, parent) => {
|
|
162
|
-
return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"), parent)));
|
|
163
|
-
}, "resolvePackageDir");
|
|
164
|
-
|
|
165
|
-
export {
|
|
166
|
-
resolvePackageDir
|
|
167
|
-
};
|