storybook 9.0.0-alpha.4 → 9.0.0-alpha.6
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/bin/index.cjs +63 -63
- package/dist/bin/index.js +63 -63
- package/dist/builder-manager/index.cjs +253 -280
- package/dist/builder-manager/index.js +305 -332
- package/dist/cli/bin/index.cjs +1 -1
- package/dist/cli/bin/index.js +1 -1
- package/dist/common/index.cjs +63 -63
- package/dist/common/index.js +63 -63
- package/dist/components/index.cjs +2102 -2069
- package/dist/components/index.js +2311 -2278
- package/dist/core-server/index.cjs +10687 -10447
- package/dist/core-server/index.d.ts +55 -2
- package/dist/core-server/index.js +10824 -10590
- package/dist/core-server/presets/common-preset.cjs +59 -59
- package/dist/core-server/presets/common-preset.js +57 -57
- package/dist/instrumenter/index.cjs +2 -2
- package/dist/instrumenter/index.js +2 -2
- package/dist/manager/globals-module-info.cjs +12 -4
- package/dist/manager/globals-module-info.js +10 -2
- package/dist/manager/globals-runtime.js +19573 -19104
- package/dist/manager/runtime.js +3254 -3190
- package/dist/manager-api/index.cjs +3627 -3368
- package/dist/manager-api/index.d.ts +57 -18
- package/dist/manager-api/index.js +3182 -2962
- package/dist/manager-errors.d.ts +25 -1
- package/dist/manager-errors.js +42 -26
- package/dist/preview/runtime.js +8055 -7823
- package/dist/preview-api/index.cjs +1234 -1683
- package/dist/preview-api/index.d.ts +69 -376
- package/dist/preview-api/index.js +1360 -1785
- package/dist/preview-errors.cjs +98 -81
- package/dist/preview-errors.d.ts +25 -1
- package/dist/preview-errors.js +109 -93
- package/dist/server-errors.cjs +92 -75
- package/dist/server-errors.d.ts +25 -1
- package/dist/server-errors.js +83 -66
- package/dist/test/index.cjs +6697 -6432
- package/dist/test/index.js +6069 -5804
- package/dist/types/index.d.ts +27 -13
- package/package.json +6 -6
package/dist/preview-errors.cjs
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var B = (t, o) => () => (o || t((o = { exports: {} }).exports, o), o.exports),
|
|
2
|
+
var H = Object.create;
|
|
3
|
+
var g = Object.defineProperty;
|
|
4
|
+
var K = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var U = Object.getOwnPropertyNames;
|
|
6
|
+
var X = Object.getPrototypeOf, J = Object.prototype.hasOwnProperty;
|
|
7
|
+
var s = (t, o) => g(t, "name", { value: o, configurable: !0 });
|
|
8
|
+
var B = (t, o) => () => (o || t((o = { exports: {} }).exports, o), o.exports), z = (t, o) => {
|
|
9
9
|
for (var e in o)
|
|
10
|
-
|
|
11
|
-
},
|
|
10
|
+
g(t, e, { get: o[e], enumerable: !0 });
|
|
11
|
+
}, j = (t, o, e, i) => {
|
|
12
12
|
if (o && typeof o == "object" || typeof o == "function")
|
|
13
|
-
for (let u of
|
|
14
|
-
!
|
|
13
|
+
for (let u of U(o))
|
|
14
|
+
!J.call(t, u) && u !== e && g(t, u, { get: () => o[u], enumerable: !(i = K(o, u)) || i.enumerable });
|
|
15
15
|
return t;
|
|
16
16
|
};
|
|
17
|
-
var
|
|
17
|
+
var q = (t, o, e) => (e = t != null ? H(X(t)) : {}, j(
|
|
18
18
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
19
|
// file that has been converted to a CommonJS file using a Babel-
|
|
20
20
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
21
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
22
|
-
o || !t || !t.__esModule ?
|
|
22
|
+
o || !t || !t.__esModule ? g(e, "default", { value: t, enumerable: !0 }) : e,
|
|
23
23
|
t
|
|
24
|
-
)),
|
|
24
|
+
)), Q = (t) => j(g({}, "__esModule", { value: !0 }), t);
|
|
25
25
|
|
|
26
26
|
// ../node_modules/ts-dedent/dist/index.js
|
|
27
|
-
var
|
|
27
|
+
var L = B((h) => {
|
|
28
28
|
"use strict";
|
|
29
|
-
Object.defineProperty(
|
|
30
|
-
|
|
31
|
-
function
|
|
29
|
+
Object.defineProperty(h, "__esModule", { value: !0 });
|
|
30
|
+
h.dedent = void 0;
|
|
31
|
+
function M(t) {
|
|
32
32
|
for (var o = [], e = 1; e < arguments.length; e++)
|
|
33
33
|
o[e - 1] = arguments[e];
|
|
34
34
|
var i = Array.from(typeof t == "string" ? [t] : t);
|
|
35
35
|
i[i.length - 1] = i[i.length - 1].replace(/\r?\n([\t ]*)$/, "");
|
|
36
36
|
var u = i.reduce(function(c, m) {
|
|
37
|
-
var
|
|
38
|
-
return
|
|
37
|
+
var p = m.match(/\n([\t ]+|(?!\s).)/g);
|
|
38
|
+
return p ? c.concat(p.map(function(f) {
|
|
39
39
|
var l, y;
|
|
40
40
|
return (y = (l = f.match(/[\t ]/g)) === null || l === void 0 ? void 0 : l.length) !== null && y !== void 0 ? y : 0;
|
|
41
41
|
})) : c;
|
|
42
42
|
}, []);
|
|
43
43
|
if (u.length) {
|
|
44
|
-
var
|
|
44
|
+
var E = new RegExp(`
|
|
45
45
|
[ ]{` + Math.min.apply(Math, u) + "}", "g");
|
|
46
46
|
i = i.map(function(c) {
|
|
47
|
-
return c.replace(
|
|
47
|
+
return c.replace(E, `
|
|
48
48
|
`);
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
i[0] = i[0].replace(/^\r?\n/, "");
|
|
52
52
|
var d = i[0];
|
|
53
53
|
return o.forEach(function(c, m) {
|
|
54
|
-
var
|
|
54
|
+
var p = d.match(/(?:^|\n)( *)$/), f = p ? p[1] : "", l = c;
|
|
55
55
|
typeof c == "string" && c.includes(`
|
|
56
56
|
`) && (l = String(c).split(`
|
|
57
|
-
`).map(function(y,
|
|
58
|
-
return
|
|
57
|
+
`).map(function(y, Y) {
|
|
58
|
+
return Y === 0 ? y : "" + f + y;
|
|
59
59
|
}).join(`
|
|
60
60
|
`)), d += l + i[m + 1];
|
|
61
61
|
}), d;
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
s(M, "dedent");
|
|
64
|
+
h.dedent = M;
|
|
65
|
+
h.default = M;
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
// src/preview-errors.ts
|
|
69
|
-
var
|
|
70
|
-
|
|
69
|
+
var Z = {};
|
|
70
|
+
z(Z, {
|
|
71
71
|
CalledExtractOnStoreError: () => I,
|
|
72
72
|
CalledPreviewMethodBeforeInitializationError: () => P,
|
|
73
|
-
Category: () =>
|
|
73
|
+
Category: () => G,
|
|
74
74
|
EmptyIndexError: () => w,
|
|
75
75
|
ImplicitActionsDuringRendering: () => b,
|
|
76
76
|
MdxFileWithNoCsfReferencesError: () => S,
|
|
@@ -78,29 +78,30 @@ J(Q, {
|
|
|
78
78
|
MissingStoryAfterHmrError: () => R,
|
|
79
79
|
MissingStoryFromCsfFileError: () => k,
|
|
80
80
|
MountMustBeDestructuredError: () => N,
|
|
81
|
-
NextJsSharpError: () =>
|
|
81
|
+
NextJsSharpError: () => $,
|
|
82
82
|
NextjsRouterMocksNotAvailable: () => O,
|
|
83
83
|
NoRenderFunctionError: () => V,
|
|
84
84
|
NoStoryMatchError: () => T,
|
|
85
85
|
NoStoryMountedError: () => A,
|
|
86
|
+
StatusTypeIdMismatchError: () => W,
|
|
86
87
|
StoryIndexFetchError: () => x,
|
|
87
88
|
StoryStoreAccessedBeforeInitializationError: () => v,
|
|
88
|
-
UnknownArgTypesError: () =>
|
|
89
|
-
UnsupportedViewportDimensionError: () =>
|
|
89
|
+
UnknownArgTypesError: () => C,
|
|
90
|
+
UnsupportedViewportDimensionError: () => D
|
|
90
91
|
});
|
|
91
|
-
module.exports =
|
|
92
|
-
var a =
|
|
92
|
+
module.exports = Q(Z);
|
|
93
|
+
var a = q(L(), 1);
|
|
93
94
|
|
|
94
95
|
// src/storybook-error.ts
|
|
95
|
-
function
|
|
96
|
+
function F({
|
|
96
97
|
code: t,
|
|
97
98
|
category: o
|
|
98
99
|
}) {
|
|
99
100
|
let e = String(t).padStart(4, "0");
|
|
100
101
|
return `SB_${o}_${e}`;
|
|
101
102
|
}
|
|
102
|
-
|
|
103
|
-
var
|
|
103
|
+
s(F, "parseErrorCode");
|
|
104
|
+
var r = class t extends Error {
|
|
104
105
|
constructor(e) {
|
|
105
106
|
super(t.getFullMessage(e));
|
|
106
107
|
/**
|
|
@@ -113,10 +114,10 @@ var s = class t extends Error {
|
|
|
113
114
|
this.category = e.category, this.documentation = e.documentation ?? !1, this.code = e.code;
|
|
114
115
|
}
|
|
115
116
|
static {
|
|
116
|
-
|
|
117
|
+
s(this, "StorybookError");
|
|
117
118
|
}
|
|
118
119
|
get fullErrorCode() {
|
|
119
|
-
return
|
|
120
|
+
return F({ code: this.code, category: this.category });
|
|
120
121
|
}
|
|
121
122
|
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
|
|
122
123
|
get name() {
|
|
@@ -128,13 +129,13 @@ var s = class t extends Error {
|
|
|
128
129
|
documentation: e,
|
|
129
130
|
code: i,
|
|
130
131
|
category: u,
|
|
131
|
-
message:
|
|
132
|
+
message: E
|
|
132
133
|
}) {
|
|
133
134
|
let d;
|
|
134
|
-
return e === !0 ? d = `https://storybook.js.org/error/${
|
|
135
|
+
return e === !0 ? d = `https://storybook.js.org/error/${F({ code: i, category: u })}` : typeof e == "string" ? d = e : Array.isArray(e) &&
|
|
135
136
|
(d = `
|
|
136
137
|
${e.map((c) => ` - ${c}`).join(`
|
|
137
|
-
`)}`), `${
|
|
138
|
+
`)}`), `${E}${d != null ? `
|
|
138
139
|
|
|
139
140
|
More info: ${d}
|
|
140
141
|
` : ""}`;
|
|
@@ -142,12 +143,12 @@ More info: ${d}
|
|
|
142
143
|
};
|
|
143
144
|
|
|
144
145
|
// src/preview-errors.ts
|
|
145
|
-
var
|
|
146
|
+
var G = /* @__PURE__ */ ((n) => (n.BLOCKS = "BLOCKS", n.DOCS_TOOLS = "DOCS-TOOLS", n.PREVIEW_CLIENT_LOGGER = "PREVIEW_CLIENT-LOGGER", n.PREVIEW_CHANNELS =
|
|
146
147
|
"PREVIEW_CHANNELS", n.PREVIEW_CORE_EVENTS = "PREVIEW_CORE-EVENTS", n.PREVIEW_INSTRUMENTER = "PREVIEW_INSTRUMENTER", n.PREVIEW_API = "PREVIEW\
|
|
147
148
|
_API", n.PREVIEW_REACT_DOM_SHIM = "PREVIEW_REACT-DOM-SHIM", n.PREVIEW_ROUTER = "PREVIEW_ROUTER", n.PREVIEW_THEMING = "PREVIEW_THEMING", n.RENDERER_HTML =
|
|
148
149
|
"RENDERER_HTML", n.RENDERER_PREACT = "RENDERER_PREACT", n.RENDERER_REACT = "RENDERER_REACT", n.RENDERER_SERVER = "RENDERER_SERVER", n.RENDERER_SVELTE =
|
|
149
150
|
"RENDERER_SVELTE", n.RENDERER_VUE = "RENDERER_VUE", n.RENDERER_VUE3 = "RENDERER_VUE3", n.RENDERER_WEB_COMPONENTS = "RENDERER_WEB-COMPONENTS",
|
|
150
|
-
n.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", n.ADDON_VITEST = "ADDON_VITEST", n))(
|
|
151
|
+
n.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", n.ADDON_VITEST = "ADDON_VITEST", n))(G || {}), R = class extends r {
|
|
151
152
|
constructor(e) {
|
|
152
153
|
super({
|
|
153
154
|
category: "PREVIEW_API",
|
|
@@ -163,9 +164,9 @@ n.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", n.ADDON_VITEST = "ADDON_VITEST", n))(F
|
|
|
163
164
|
this.data = e;
|
|
164
165
|
}
|
|
165
166
|
static {
|
|
166
|
-
|
|
167
|
+
s(this, "MissingStoryAfterHmrError");
|
|
167
168
|
}
|
|
168
|
-
}, b = class extends
|
|
169
|
+
}, b = class extends r {
|
|
169
170
|
constructor(e) {
|
|
170
171
|
super({
|
|
171
172
|
category: "PREVIEW_API",
|
|
@@ -187,11 +188,11 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
187
188
|
this.data = e;
|
|
188
189
|
}
|
|
189
190
|
static {
|
|
190
|
-
|
|
191
|
+
s(this, "ImplicitActionsDuringRendering");
|
|
191
192
|
}
|
|
192
|
-
}, I = class extends
|
|
193
|
+
}, I = class extends r {
|
|
193
194
|
static {
|
|
194
|
-
|
|
195
|
+
s(this, "CalledExtractOnStoreError");
|
|
195
196
|
}
|
|
196
197
|
constructor() {
|
|
197
198
|
super({
|
|
@@ -203,9 +204,9 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
203
204
|
You probably meant to call \`await preview.extract()\` which does the above for you.`
|
|
204
205
|
});
|
|
205
206
|
}
|
|
206
|
-
}, _ = class extends
|
|
207
|
+
}, _ = class extends r {
|
|
207
208
|
static {
|
|
208
|
-
|
|
209
|
+
s(this, "MissingRenderToCanvasError");
|
|
209
210
|
}
|
|
210
211
|
constructor() {
|
|
211
212
|
super({
|
|
@@ -218,7 +219,7 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
218
219
|
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field"
|
|
219
220
|
});
|
|
220
221
|
}
|
|
221
|
-
}, P = class extends
|
|
222
|
+
}, P = class extends r {
|
|
222
223
|
constructor(e) {
|
|
223
224
|
super({
|
|
224
225
|
category: "PREVIEW_API",
|
|
@@ -235,9 +236,9 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
235
236
|
this.data = e;
|
|
236
237
|
}
|
|
237
238
|
static {
|
|
238
|
-
|
|
239
|
+
s(this, "CalledPreviewMethodBeforeInitializationError");
|
|
239
240
|
}
|
|
240
|
-
}, x = class extends
|
|
241
|
+
}, x = class extends r {
|
|
241
242
|
constructor(e) {
|
|
242
243
|
super({
|
|
243
244
|
category: "PREVIEW_API",
|
|
@@ -256,9 +257,9 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
256
257
|
this.data = e;
|
|
257
258
|
}
|
|
258
259
|
static {
|
|
259
|
-
|
|
260
|
+
s(this, "StoryIndexFetchError");
|
|
260
261
|
}
|
|
261
|
-
}, S = class extends
|
|
262
|
+
}, S = class extends r {
|
|
262
263
|
constructor(e) {
|
|
263
264
|
super({
|
|
264
265
|
category: "PREVIEW_API",
|
|
@@ -273,11 +274,11 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
273
274
|
this.data = e;
|
|
274
275
|
}
|
|
275
276
|
static {
|
|
276
|
-
|
|
277
|
+
s(this, "MdxFileWithNoCsfReferencesError");
|
|
277
278
|
}
|
|
278
|
-
}, w = class extends
|
|
279
|
+
}, w = class extends r {
|
|
279
280
|
static {
|
|
280
|
-
|
|
281
|
+
s(this, "EmptyIndexError");
|
|
281
282
|
}
|
|
282
283
|
constructor() {
|
|
283
284
|
super({
|
|
@@ -290,7 +291,7 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
290
291
|
- Also check the browser console and terminal for error messages.`
|
|
291
292
|
});
|
|
292
293
|
}
|
|
293
|
-
}, T = class extends
|
|
294
|
+
}, T = class extends r {
|
|
294
295
|
constructor(e) {
|
|
295
296
|
super({
|
|
296
297
|
category: "PREVIEW_API",
|
|
@@ -305,9 +306,9 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
305
306
|
this.data = e;
|
|
306
307
|
}
|
|
307
308
|
static {
|
|
308
|
-
|
|
309
|
+
s(this, "NoStoryMatchError");
|
|
309
310
|
}
|
|
310
|
-
}, k = class extends
|
|
311
|
+
}, k = class extends r {
|
|
311
312
|
constructor(e) {
|
|
312
313
|
super({
|
|
313
314
|
category: "PREVIEW_API",
|
|
@@ -325,11 +326,11 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
325
326
|
this.data = e;
|
|
326
327
|
}
|
|
327
328
|
static {
|
|
328
|
-
|
|
329
|
+
s(this, "MissingStoryFromCsfFileError");
|
|
329
330
|
}
|
|
330
|
-
}, v = class extends
|
|
331
|
+
}, v = class extends r {
|
|
331
332
|
static {
|
|
332
|
-
|
|
333
|
+
s(this, "StoryStoreAccessedBeforeInitializationError");
|
|
333
334
|
}
|
|
334
335
|
constructor() {
|
|
335
336
|
super({
|
|
@@ -342,7 +343,7 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
342
343
|
remove access to the store entirely`
|
|
343
344
|
});
|
|
344
345
|
}
|
|
345
|
-
}, N = class extends
|
|
346
|
+
}, N = class extends r {
|
|
346
347
|
constructor(e) {
|
|
347
348
|
super({
|
|
348
349
|
category: "PREVIEW_API",
|
|
@@ -369,9 +370,9 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
369
370
|
this.data = e;
|
|
370
371
|
}
|
|
371
372
|
static {
|
|
372
|
-
|
|
373
|
+
s(this, "MountMustBeDestructuredError");
|
|
373
374
|
}
|
|
374
|
-
}, V = class extends
|
|
375
|
+
}, V = class extends r {
|
|
375
376
|
constructor(e) {
|
|
376
377
|
super({
|
|
377
378
|
category: "PREVIEW_API",
|
|
@@ -383,11 +384,11 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
383
384
|
this.data = e;
|
|
384
385
|
}
|
|
385
386
|
static {
|
|
386
|
-
|
|
387
|
+
s(this, "NoRenderFunctionError");
|
|
387
388
|
}
|
|
388
|
-
}, A = class extends
|
|
389
|
+
}, A = class extends r {
|
|
389
390
|
static {
|
|
390
|
-
|
|
391
|
+
s(this, "NoStoryMountedError");
|
|
391
392
|
}
|
|
392
393
|
constructor() {
|
|
393
394
|
super({
|
|
@@ -411,9 +412,25 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
411
412
|
`
|
|
412
413
|
});
|
|
413
414
|
}
|
|
414
|
-
}, W = class extends
|
|
415
|
+
}, W = class extends r {
|
|
416
|
+
constructor(e) {
|
|
417
|
+
super({
|
|
418
|
+
category: "PREVIEW_API",
|
|
419
|
+
code: 16,
|
|
420
|
+
message: `Status has typeId "${e.status.typeId}" but was added to store with typeId "${e.typeId}". Full status: ${JSON.stringify(
|
|
421
|
+
e.status,
|
|
422
|
+
null,
|
|
423
|
+
2
|
|
424
|
+
)}`
|
|
425
|
+
});
|
|
426
|
+
this.data = e;
|
|
427
|
+
}
|
|
428
|
+
static {
|
|
429
|
+
s(this, "StatusTypeIdMismatchError");
|
|
430
|
+
}
|
|
431
|
+
}, $ = class extends r {
|
|
415
432
|
static {
|
|
416
|
-
|
|
433
|
+
s(this, "NextJsSharpError");
|
|
417
434
|
}
|
|
418
435
|
constructor() {
|
|
419
436
|
super({
|
|
@@ -427,7 +444,7 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
427
444
|
`
|
|
428
445
|
});
|
|
429
446
|
}
|
|
430
|
-
}, O = class extends
|
|
447
|
+
}, O = class extends r {
|
|
431
448
|
constructor(e) {
|
|
432
449
|
super({
|
|
433
450
|
category: "FRAMEWORK_NEXTJS",
|
|
@@ -439,9 +456,9 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
439
456
|
this.data = e;
|
|
440
457
|
}
|
|
441
458
|
static {
|
|
442
|
-
|
|
459
|
+
s(this, "NextjsRouterMocksNotAvailable");
|
|
443
460
|
}
|
|
444
|
-
},
|
|
461
|
+
}, C = class extends r {
|
|
445
462
|
constructor(e) {
|
|
446
463
|
super({
|
|
447
464
|
category: "DOCS-TOOLS",
|
|
@@ -460,9 +477,9 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
460
477
|
this.data = e;
|
|
461
478
|
}
|
|
462
479
|
static {
|
|
463
|
-
|
|
480
|
+
s(this, "UnknownArgTypesError");
|
|
464
481
|
}
|
|
465
|
-
},
|
|
482
|
+
}, D = class extends r {
|
|
466
483
|
constructor(e) {
|
|
467
484
|
super({
|
|
468
485
|
category: "ADDON_VITEST",
|
|
@@ -481,6 +498,6 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
481
498
|
this.data = e;
|
|
482
499
|
}
|
|
483
500
|
static {
|
|
484
|
-
|
|
501
|
+
s(this, "UnsupportedViewportDimensionError");
|
|
485
502
|
}
|
|
486
503
|
};
|
package/dist/preview-errors.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
import { StoryId } from 'storybook/internal/csf';
|
|
2
|
+
|
|
3
|
+
type StatusValue = 'status-value:pending' | 'status-value:success' | 'status-value:error' | 'status-value:warning' | 'status-value:unknown';
|
|
4
|
+
type StatusTypeId = string;
|
|
5
|
+
interface Status {
|
|
6
|
+
value: StatusValue;
|
|
7
|
+
typeId: StatusTypeId;
|
|
8
|
+
storyId: StoryId;
|
|
9
|
+
title: string;
|
|
10
|
+
description: string;
|
|
11
|
+
data?: any;
|
|
12
|
+
sidebarContextMenu?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
1
15
|
declare abstract class StorybookError extends Error {
|
|
2
16
|
/** Category of the error. Used to classify the type of error, e.g., 'PREVIEW_API'. */
|
|
3
17
|
readonly category: string;
|
|
@@ -153,6 +167,16 @@ declare class NoRenderFunctionError extends StorybookError {
|
|
|
153
167
|
declare class NoStoryMountedError extends StorybookError {
|
|
154
168
|
constructor();
|
|
155
169
|
}
|
|
170
|
+
declare class StatusTypeIdMismatchError extends StorybookError {
|
|
171
|
+
data: {
|
|
172
|
+
status: Status;
|
|
173
|
+
typeId: StatusTypeId;
|
|
174
|
+
};
|
|
175
|
+
constructor(data: {
|
|
176
|
+
status: Status;
|
|
177
|
+
typeId: StatusTypeId;
|
|
178
|
+
});
|
|
179
|
+
}
|
|
156
180
|
declare class NextJsSharpError extends StorybookError {
|
|
157
181
|
constructor();
|
|
158
182
|
}
|
|
@@ -185,4 +209,4 @@ declare class UnsupportedViewportDimensionError extends StorybookError {
|
|
|
185
209
|
});
|
|
186
210
|
}
|
|
187
211
|
|
|
188
|
-
export { CalledExtractOnStoreError, CalledPreviewMethodBeforeInitializationError, Category, EmptyIndexError, ImplicitActionsDuringRendering, MdxFileWithNoCsfReferencesError, MissingRenderToCanvasError, MissingStoryAfterHmrError, MissingStoryFromCsfFileError, MountMustBeDestructuredError, NextJsSharpError, NextjsRouterMocksNotAvailable, NoRenderFunctionError, NoStoryMatchError, NoStoryMountedError, StoryIndexFetchError, StoryStoreAccessedBeforeInitializationError, UnknownArgTypesError, UnsupportedViewportDimensionError };
|
|
212
|
+
export { CalledExtractOnStoreError, CalledPreviewMethodBeforeInitializationError, Category, EmptyIndexError, ImplicitActionsDuringRendering, MdxFileWithNoCsfReferencesError, MissingRenderToCanvasError, MissingStoryAfterHmrError, MissingStoryFromCsfFileError, MountMustBeDestructuredError, NextJsSharpError, NextjsRouterMocksNotAvailable, NoRenderFunctionError, NoStoryMatchError, NoStoryMountedError, StatusTypeIdMismatchError, StoryIndexFetchError, StoryStoreAccessedBeforeInitializationError, UnknownArgTypesError, UnsupportedViewportDimensionError };
|