storybook 9.0.0-alpha.2 → 9.0.0-alpha.21
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/README.md +1 -1
- package/assets/docs/addon-backgrounds.gif +0 -0
- package/assets/docs/addon-controls-args-annotated.png +0 -0
- package/assets/docs/addon-controls-args-background-color.png +0 -0
- package/assets/docs/addon-controls-args-background-string.png +0 -0
- package/assets/docs/addon-controls-args-docs.png +0 -0
- package/assets/docs/addon-controls-args-logging.png +0 -0
- package/assets/docs/addon-controls-args-no-annotation.png +0 -0
- package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
- package/assets/docs/addon-controls-args-reflow.png +0 -0
- package/assets/docs/addon-controls-args-template.png +0 -0
- package/assets/docs/addon-controls-expanded.png +0 -0
- package/assets/docs/addon-controls-hero.gif +0 -0
- package/assets/docs/addon-controls-install.png +0 -0
- package/assets/docs/hero.gif +0 -0
- package/assets/docs/highlight.png +0 -0
- package/assets/docs/viewport.png +0 -0
- package/assets/server/base-preview-head.html +1 -3
- package/bin/index.cjs +2 -2
- package/dist/actions/decorator.d.ts +6 -0
- package/dist/actions/decorator.js +134 -0
- package/dist/actions/index.cjs +123 -0
- package/dist/actions/index.d.ts +102 -0
- package/dist/actions/index.js +108 -0
- package/dist/actions/preview.cjs +161 -0
- package/dist/actions/preview.d.ts +54 -0
- package/dist/actions/preview.js +152 -0
- package/dist/babel/index.cjs +822 -816
- package/dist/babel/index.js +822 -816
- package/dist/backgrounds/index.cjs +148 -0
- package/dist/backgrounds/index.d.ts +91 -0
- package/dist/backgrounds/index.js +130 -0
- package/dist/backgrounds/preview.cjs +143 -0
- package/dist/backgrounds/preview.d.ts +54 -0
- package/dist/backgrounds/preview.js +127 -0
- package/dist/bin/index.cjs +49 -70
- package/dist/bin/index.js +49 -70
- package/dist/builder-manager/index.cjs +319 -326
- package/dist/builder-manager/index.js +576 -583
- package/dist/channels/index.cjs +1026 -981
- package/dist/channels/index.js +1258 -1207
- package/dist/cli/bin/index.cjs +483 -483
- package/dist/cli/bin/index.js +495 -495
- package/dist/cli/index.cjs +61735 -7590
- package/dist/cli/index.d.ts +25 -21
- package/dist/cli/index.js +61776 -7631
- package/dist/client-logger/index.cjs +56 -88
- package/dist/client-logger/index.js +41 -47
- package/dist/common/index.cjs +16137 -9085
- package/dist/common/index.d.ts +35 -30
- package/dist/common/index.js +16230 -9172
- package/dist/component-testing/index.cjs +23 -0
- package/dist/component-testing/index.d.ts +3 -0
- package/dist/component-testing/index.js +5 -0
- package/dist/component-testing/preview.cjs +40 -0
- package/dist/component-testing/preview.d.ts +5 -0
- package/dist/component-testing/preview.js +25 -0
- package/dist/components/index.cjs +16268 -24926
- package/dist/components/index.d.ts +98 -347
- package/dist/components/index.js +5905 -19177
- package/dist/controls/decorator.d.ts +5 -0
- package/dist/controls/decorator.js +8 -0
- package/dist/controls/index.cjs +26 -0
- package/dist/controls/index.d.ts +39 -0
- package/dist/controls/index.js +6 -0
- package/dist/controls/preview.cjs +26 -0
- package/dist/controls/preview.d.ts +54 -0
- package/dist/controls/preview.js +9 -0
- package/dist/core-events/index.cjs +91 -106
- package/dist/core-events/index.d.ts +139 -104
- package/dist/core-events/index.js +79 -94
- package/dist/core-server/index.cjs +13898 -13409
- package/dist/core-server/index.d.ts +270 -3
- package/dist/core-server/index.js +13981 -13497
- package/dist/core-server/presets/common-manager.css +170 -0
- package/dist/core-server/presets/common-manager.js +12149 -17
- package/dist/core-server/presets/common-preset.cjs +3009 -3155
- package/dist/core-server/presets/common-preset.js +2862 -3009
- package/dist/csf/index.cjs +76 -120
- package/dist/csf/index.d.ts +2 -6
- package/dist/csf/index.js +69 -113
- package/dist/csf-tools/index.cjs +412 -403
- package/dist/csf-tools/index.d.ts +0 -4
- package/dist/csf-tools/index.js +410 -401
- package/dist/docs-tools/index.cjs +2569 -575
- package/dist/docs-tools/index.d.ts +2 -2
- package/dist/docs-tools/index.js +2565 -564
- package/dist/highlight/index.cjs +27 -0
- package/dist/highlight/index.d.ts +61 -0
- package/dist/highlight/index.js +7 -0
- package/dist/highlight/preview.cjs +535 -0
- package/dist/highlight/preview.d.ts +54 -0
- package/dist/highlight/preview.js +519 -0
- package/dist/instrumenter/index.cjs +2207 -2342
- package/dist/instrumenter/index.d.ts +8 -7
- package/dist/instrumenter/index.js +2430 -2603
- package/dist/manager/globals-module-info.cjs +291 -151
- package/dist/manager/globals-module-info.d.ts +1 -1
- package/dist/manager/globals-module-info.js +275 -135
- package/dist/manager/globals-runtime.js +60263 -28383
- package/dist/manager/globals.cjs +23 -19
- package/dist/manager/globals.d.ts +8 -5
- package/dist/manager/globals.js +10 -6
- package/dist/manager/runtime.js +4625 -3921
- package/dist/manager-api/index.cjs +4228 -3833
- package/dist/manager-api/index.d.ts +398 -102
- package/dist/manager-api/index.js +3500 -3084
- package/dist/manager-errors.d.ts +25 -1
- package/dist/manager-errors.js +50 -30
- package/dist/measure/index.cjs +476 -0
- package/dist/measure/index.d.ts +66 -0
- package/dist/measure/index.js +464 -0
- package/dist/measure/preview.cjs +466 -0
- package/dist/measure/preview.d.ts +59 -0
- package/dist/measure/preview.js +450 -0
- package/dist/outline/index.cjs +528 -0
- package/dist/outline/index.d.ts +66 -0
- package/dist/outline/index.js +500 -0
- package/dist/outline/preview.cjs +518 -0
- package/dist/outline/preview.d.ts +59 -0
- package/dist/outline/preview.js +486 -0
- package/dist/preview/globals.cjs +21 -17
- package/dist/preview/globals.d.ts +4 -1
- package/dist/preview/globals.js +6 -2
- package/dist/preview/runtime.js +46311 -6614
- package/dist/preview-api/index.cjs +1363 -1899
- package/dist/preview-api/index.d.ts +81 -395
- package/dist/preview-api/index.js +1711 -2169
- package/dist/preview-errors.cjs +119 -88
- package/dist/preview-errors.d.ts +30 -2
- package/dist/preview-errors.js +192 -142
- package/dist/router/index.cjs +847 -871
- package/dist/router/index.js +193 -199
- package/dist/server-errors.cjs +188 -124
- package/dist/server-errors.d.ts +36 -2
- package/dist/server-errors.js +188 -124
- package/dist/telemetry/index.cjs +1056 -1979
- package/dist/telemetry/index.d.ts +26 -5
- package/dist/telemetry/index.js +1091 -2010
- package/dist/test/index.cjs +35686 -0
- package/dist/test/index.d.ts +186 -0
- package/dist/test/index.js +33840 -0
- package/dist/test/preview.cjs +15870 -0
- package/dist/test/preview.d.ts +48 -0
- package/dist/test/preview.js +14501 -0
- package/dist/test/spy.cjs +258 -0
- package/dist/test/spy.d.ts +66 -0
- package/dist/test/spy.js +240 -0
- package/dist/theming/create.cjs +79 -2269
- package/dist/theming/create.js +67 -841
- package/dist/theming/index.cjs +1065 -3232
- package/dist/theming/index.js +951 -1719
- package/dist/types/index.cjs +11 -12
- package/dist/types/index.d.ts +684 -163
- package/dist/types/index.js +1 -2
- package/dist/viewport/index.cjs +310 -0
- package/dist/viewport/index.d.ts +320 -0
- package/dist/viewport/index.js +290 -0
- package/dist/viewport/preview.cjs +35 -0
- package/dist/viewport/preview.d.ts +68 -0
- package/dist/viewport/preview.js +19 -0
- package/package.json +359 -12
package/dist/preview-errors.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var M = Object.defineProperty;
|
|
2
|
+
var o = (t, n) => M(t, "name", { value: n, configurable: !0 });
|
|
3
3
|
|
|
4
4
|
// ../node_modules/ts-dedent/esm/index.js
|
|
5
|
-
function
|
|
5
|
+
function a(t) {
|
|
6
6
|
for (var n = [], e = 1; e < arguments.length; e++)
|
|
7
7
|
n[e - 1] = arguments[e];
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
var y =
|
|
12
|
-
return y ?
|
|
13
|
-
var
|
|
14
|
-
return (
|
|
15
|
-
})) :
|
|
8
|
+
var i = Array.from(typeof t == "string" ? [t] : t);
|
|
9
|
+
i[i.length - 1] = i[i.length - 1].replace(/\r?\n([\t ]*)$/, "");
|
|
10
|
+
var p = i.reduce(function(c, h) {
|
|
11
|
+
var y = h.match(/\n([\t ]+|(?!\s).)/g);
|
|
12
|
+
return y ? c.concat(y.map(function(m) {
|
|
13
|
+
var d, l;
|
|
14
|
+
return (l = (d = m.match(/[\t ]/g)) === null || d === void 0 ? void 0 : d.length) !== null && l !== void 0 ? l : 0;
|
|
15
|
+
})) : c;
|
|
16
16
|
}, []);
|
|
17
|
-
if (
|
|
18
|
-
var
|
|
19
|
-
[ ]{` + Math.min.apply(Math,
|
|
20
|
-
|
|
21
|
-
return
|
|
17
|
+
if (p.length) {
|
|
18
|
+
var g = new RegExp(`
|
|
19
|
+
[ ]{` + Math.min.apply(Math, p) + "}", "g");
|
|
20
|
+
i = i.map(function(c) {
|
|
21
|
+
return c.replace(g, `
|
|
22
22
|
`);
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
var
|
|
27
|
-
return n.forEach(function(
|
|
28
|
-
var y =
|
|
29
|
-
typeof
|
|
30
|
-
`) && (
|
|
31
|
-
`).map(function(
|
|
32
|
-
return
|
|
25
|
+
i[0] = i[0].replace(/^\r?\n/, "");
|
|
26
|
+
var u = i[0];
|
|
27
|
+
return n.forEach(function(c, h) {
|
|
28
|
+
var y = u.match(/(?:^|\n)( *)$/), m = y ? y[1] : "", d = c;
|
|
29
|
+
typeof c == "string" && c.includes(`
|
|
30
|
+
`) && (d = String(c).split(`
|
|
31
|
+
`).map(function(l, j) {
|
|
32
|
+
return j === 0 ? l : "" + m + l;
|
|
33
33
|
}).join(`
|
|
34
|
-
`)),
|
|
35
|
-
}),
|
|
34
|
+
`)), u += d + i[h + 1];
|
|
35
|
+
}), u;
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
o(a, "dedent");
|
|
38
38
|
|
|
39
39
|
// src/storybook-error.ts
|
|
40
|
-
function
|
|
41
|
-
code:
|
|
40
|
+
function E({
|
|
41
|
+
code: t,
|
|
42
42
|
category: n
|
|
43
43
|
}) {
|
|
44
|
-
let e = String(
|
|
44
|
+
let e = String(t).padStart(4, "0");
|
|
45
45
|
return `SB_${n}_${e}`;
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
var
|
|
47
|
+
o(E, "parseErrorCode");
|
|
48
|
+
var s = class t extends Error {
|
|
49
49
|
constructor(e) {
|
|
50
|
-
super(
|
|
50
|
+
super(t.getFullMessage(e));
|
|
51
51
|
/**
|
|
52
52
|
* Data associated with the error. Used to provide additional information in the error message or
|
|
53
53
|
* to be passed to telemetry.
|
|
@@ -57,8 +57,11 @@ var p = class p extends Error {
|
|
|
57
57
|
this.fromStorybook = !0;
|
|
58
58
|
this.category = e.category, this.documentation = e.documentation ?? !1, this.code = e.code;
|
|
59
59
|
}
|
|
60
|
+
static {
|
|
61
|
+
o(this, "StorybookError");
|
|
62
|
+
}
|
|
60
63
|
get fullErrorCode() {
|
|
61
|
-
return
|
|
64
|
+
return E({ code: this.code, category: this.category });
|
|
62
65
|
}
|
|
63
66
|
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
|
|
64
67
|
get name() {
|
|
@@ -68,35 +71,33 @@ var p = class p extends Error {
|
|
|
68
71
|
/** Generates the error message along with additional documentation link (if applicable). */
|
|
69
72
|
static getFullMessage({
|
|
70
73
|
documentation: e,
|
|
71
|
-
code:
|
|
72
|
-
category:
|
|
73
|
-
message:
|
|
74
|
+
code: i,
|
|
75
|
+
category: p,
|
|
76
|
+
message: g
|
|
74
77
|
}) {
|
|
75
|
-
let
|
|
76
|
-
return e === !0 ?
|
|
77
|
-
(
|
|
78
|
-
${e.map((
|
|
79
|
-
`)}`), `${
|
|
78
|
+
let u;
|
|
79
|
+
return e === !0 ? u = `https://storybook.js.org/error/${E({ code: i, category: p })}` : typeof e == "string" ? u = e : Array.isArray(e) &&
|
|
80
|
+
(u = `
|
|
81
|
+
${e.map((c) => ` - ${c}`).join(`
|
|
82
|
+
`)}`), `${g}${u != null ? `
|
|
80
83
|
|
|
81
|
-
More info: ${
|
|
84
|
+
More info: ${u}
|
|
82
85
|
` : ""}`;
|
|
83
86
|
}
|
|
84
87
|
};
|
|
85
|
-
t(p, "StorybookError");
|
|
86
|
-
var o = p;
|
|
87
88
|
|
|
88
89
|
// src/preview-errors.ts
|
|
89
|
-
var
|
|
90
|
-
"PREVIEW_CHANNELS",
|
|
91
|
-
_API",
|
|
92
|
-
"RENDERER_HTML",
|
|
93
|
-
"RENDERER_SVELTE",
|
|
94
|
-
|
|
90
|
+
var L = /* @__PURE__ */ ((r) => (r.BLOCKS = "BLOCKS", r.DOCS_TOOLS = "DOCS-TOOLS", r.PREVIEW_CLIENT_LOGGER = "PREVIEW_CLIENT-LOGGER", r.PREVIEW_CHANNELS =
|
|
91
|
+
"PREVIEW_CHANNELS", r.PREVIEW_CORE_EVENTS = "PREVIEW_CORE-EVENTS", r.PREVIEW_INSTRUMENTER = "PREVIEW_INSTRUMENTER", r.PREVIEW_API = "PREVIEW\
|
|
92
|
+
_API", r.PREVIEW_REACT_DOM_SHIM = "PREVIEW_REACT-DOM-SHIM", r.PREVIEW_ROUTER = "PREVIEW_ROUTER", r.PREVIEW_THEMING = "PREVIEW_THEMING", r.RENDERER_HTML =
|
|
93
|
+
"RENDERER_HTML", r.RENDERER_PREACT = "RENDERER_PREACT", r.RENDERER_REACT = "RENDERER_REACT", r.RENDERER_SERVER = "RENDERER_SERVER", r.RENDERER_SVELTE =
|
|
94
|
+
"RENDERER_SVELTE", r.RENDERER_VUE = "RENDERER_VUE", r.RENDERER_VUE3 = "RENDERER_VUE3", r.RENDERER_WEB_COMPONENTS = "RENDERER_WEB-COMPONENTS",
|
|
95
|
+
r.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", r.ADDON_VITEST = "ADDON_VITEST", r.ADDON_A11Y = "ADDON_A11Y", r))(L || {}), f = class extends s {
|
|
95
96
|
constructor(e) {
|
|
96
97
|
super({
|
|
97
98
|
category: "PREVIEW_API",
|
|
98
99
|
code: 1,
|
|
99
|
-
message:
|
|
100
|
+
message: a`
|
|
100
101
|
Couldn't find story matching id '${e.storyId}' after HMR.
|
|
101
102
|
- Did you just rename a story?
|
|
102
103
|
- Did you remove it from your CSF file?
|
|
@@ -106,22 +107,23 @@ s.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", s.ADDON_VITEST = "ADDON_VITEST", s))(se
|
|
|
106
107
|
});
|
|
107
108
|
this.data = e;
|
|
108
109
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
static {
|
|
111
|
+
o(this, "MissingStoryAfterHmrError");
|
|
112
|
+
}
|
|
113
|
+
}, R = class extends s {
|
|
112
114
|
constructor(e) {
|
|
113
115
|
super({
|
|
114
116
|
category: "PREVIEW_API",
|
|
115
117
|
code: 2,
|
|
116
118
|
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#using-implicit-actions-during-rendering-is-deprecated-\
|
|
117
119
|
for-example-in-the-play-function",
|
|
118
|
-
message:
|
|
120
|
+
message: a`
|
|
119
121
|
We detected that you use an implicit action arg while ${e.phase} of your story.
|
|
120
122
|
${e.deprecated ? `
|
|
121
123
|
This is deprecated and won't work in Storybook 8 anymore.
|
|
122
124
|
` : ""}
|
|
123
125
|
Please provide an explicit spy to your args like this:
|
|
124
|
-
import { fn } from '
|
|
126
|
+
import { fn } from 'storybook/test';
|
|
125
127
|
...
|
|
126
128
|
args: {
|
|
127
129
|
${e.name}: fn()
|
|
@@ -129,41 +131,44 @@ This is deprecated and won't work in Storybook 8 anymore.
|
|
|
129
131
|
});
|
|
130
132
|
this.data = e;
|
|
131
133
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
static {
|
|
135
|
+
o(this, "ImplicitActionsDuringRendering");
|
|
136
|
+
}
|
|
137
|
+
}, b = class extends s {
|
|
138
|
+
static {
|
|
139
|
+
o(this, "CalledExtractOnStoreError");
|
|
140
|
+
}
|
|
135
141
|
constructor() {
|
|
136
142
|
super({
|
|
137
143
|
category: "PREVIEW_API",
|
|
138
144
|
code: 3,
|
|
139
|
-
message:
|
|
145
|
+
message: a`
|
|
140
146
|
Cannot call \`storyStore.extract()\` without calling \`storyStore.cacheAllCsfFiles()\` first.
|
|
141
147
|
|
|
142
148
|
You probably meant to call \`await preview.extract()\` which does the above for you.`
|
|
143
149
|
});
|
|
144
150
|
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
151
|
+
}, I = class extends s {
|
|
152
|
+
static {
|
|
153
|
+
o(this, "MissingRenderToCanvasError");
|
|
154
|
+
}
|
|
148
155
|
constructor() {
|
|
149
156
|
super({
|
|
150
157
|
category: "PREVIEW_API",
|
|
151
158
|
code: 4,
|
|
152
|
-
message:
|
|
159
|
+
message: a`
|
|
153
160
|
Expected your framework's preset to export a \`renderToCanvas\` field.
|
|
154
161
|
|
|
155
162
|
Perhaps it needs to be upgraded for Storybook 7.0?`,
|
|
156
163
|
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field"
|
|
157
164
|
});
|
|
158
165
|
}
|
|
159
|
-
}
|
|
160
|
-
t(I, "MissingRenderToCanvasError");
|
|
161
|
-
var G = I, P = class P extends o {
|
|
166
|
+
}, x = class extends s {
|
|
162
167
|
constructor(e) {
|
|
163
168
|
super({
|
|
164
169
|
category: "PREVIEW_API",
|
|
165
170
|
code: 5,
|
|
166
|
-
message:
|
|
171
|
+
message: a`
|
|
167
172
|
Called \`Preview.${e.methodName}()\` before initialization.
|
|
168
173
|
|
|
169
174
|
The preview needs to load the story index before most methods can be called. If you want
|
|
@@ -174,14 +179,15 @@ var G = I, P = class P extends o {
|
|
|
174
179
|
});
|
|
175
180
|
this.data = e;
|
|
176
181
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
182
|
+
static {
|
|
183
|
+
o(this, "CalledPreviewMethodBeforeInitializationError");
|
|
184
|
+
}
|
|
185
|
+
}, _ = class extends s {
|
|
180
186
|
constructor(e) {
|
|
181
187
|
super({
|
|
182
188
|
category: "PREVIEW_API",
|
|
183
189
|
code: 6,
|
|
184
|
-
message:
|
|
190
|
+
message: a`
|
|
185
191
|
Error fetching \`/index.json\`:
|
|
186
192
|
|
|
187
193
|
${e.text}
|
|
@@ -194,14 +200,15 @@ var Y = P, x = class x extends o {
|
|
|
194
200
|
});
|
|
195
201
|
this.data = e;
|
|
196
202
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
203
|
+
static {
|
|
204
|
+
o(this, "StoryIndexFetchError");
|
|
205
|
+
}
|
|
206
|
+
}, S = class extends s {
|
|
200
207
|
constructor(e) {
|
|
201
208
|
super({
|
|
202
209
|
category: "PREVIEW_API",
|
|
203
210
|
code: 7,
|
|
204
|
-
message:
|
|
211
|
+
message: a`
|
|
205
212
|
Tried to render docs entry ${e.storyId} but it is a MDX file that has no CSF
|
|
206
213
|
references, or autodocs for a CSF file that some doesn't refer to itself.
|
|
207
214
|
|
|
@@ -210,28 +217,30 @@ var M = x, T = class T extends o {
|
|
|
210
217
|
});
|
|
211
218
|
this.data = e;
|
|
212
219
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
220
|
+
static {
|
|
221
|
+
o(this, "MdxFileWithNoCsfReferencesError");
|
|
222
|
+
}
|
|
223
|
+
}, P = class extends s {
|
|
224
|
+
static {
|
|
225
|
+
o(this, "EmptyIndexError");
|
|
226
|
+
}
|
|
216
227
|
constructor() {
|
|
217
228
|
super({
|
|
218
229
|
category: "PREVIEW_API",
|
|
219
230
|
code: 8,
|
|
220
|
-
message:
|
|
231
|
+
message: a`
|
|
221
232
|
Couldn't find any stories in your Storybook.
|
|
222
233
|
|
|
223
234
|
- Please check your stories field of your main.js config: does it match correctly?
|
|
224
235
|
- Also check the browser console and terminal for error messages.`
|
|
225
236
|
});
|
|
226
237
|
}
|
|
227
|
-
}
|
|
228
|
-
t(w, "EmptyIndexError");
|
|
229
|
-
var F = w, k = class k extends o {
|
|
238
|
+
}, w = class extends s {
|
|
230
239
|
constructor(e) {
|
|
231
240
|
super({
|
|
232
241
|
category: "PREVIEW_API",
|
|
233
242
|
code: 9,
|
|
234
|
-
message:
|
|
243
|
+
message: a`
|
|
235
244
|
Couldn't find story matching '${e.storySpecifier}'.
|
|
236
245
|
|
|
237
246
|
- Are you sure a story with that id exists?
|
|
@@ -240,14 +249,15 @@ var F = w, k = class k extends o {
|
|
|
240
249
|
});
|
|
241
250
|
this.data = e;
|
|
242
251
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
252
|
+
static {
|
|
253
|
+
o(this, "NoStoryMatchError");
|
|
254
|
+
}
|
|
255
|
+
}, T = class extends s {
|
|
246
256
|
constructor(e) {
|
|
247
257
|
super({
|
|
248
258
|
category: "PREVIEW_API",
|
|
249
259
|
code: 10,
|
|
250
|
-
message:
|
|
260
|
+
message: a`
|
|
251
261
|
Couldn't find story matching id '${e.storyId}' after importing a CSF file.
|
|
252
262
|
|
|
253
263
|
The file was indexed as if the story was there, but then after importing the file in the browser
|
|
@@ -259,28 +269,30 @@ var K = k, S = class S extends o {
|
|
|
259
269
|
});
|
|
260
270
|
this.data = e;
|
|
261
271
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
272
|
+
static {
|
|
273
|
+
o(this, "MissingStoryFromCsfFileError");
|
|
274
|
+
}
|
|
275
|
+
}, k = class extends s {
|
|
276
|
+
static {
|
|
277
|
+
o(this, "StoryStoreAccessedBeforeInitializationError");
|
|
278
|
+
}
|
|
265
279
|
constructor() {
|
|
266
280
|
super({
|
|
267
281
|
category: "PREVIEW_API",
|
|
268
282
|
code: 11,
|
|
269
|
-
message:
|
|
283
|
+
message: a`
|
|
270
284
|
Cannot access the Story Store until the index is ready.
|
|
271
285
|
|
|
272
286
|
It is not recommended to use methods directly on the Story Store anyway, in Storybook 9 we will
|
|
273
287
|
remove access to the store entirely`
|
|
274
288
|
});
|
|
275
289
|
}
|
|
276
|
-
}
|
|
277
|
-
t(v, "StoryStoreAccessedBeforeInitializationError");
|
|
278
|
-
var U = v, _ = class _ extends o {
|
|
290
|
+
}, N = class extends s {
|
|
279
291
|
constructor(e) {
|
|
280
292
|
super({
|
|
281
293
|
category: "PREVIEW_API",
|
|
282
294
|
code: 12,
|
|
283
|
-
message:
|
|
295
|
+
message: a`
|
|
284
296
|
Incorrect use of mount in the play function.
|
|
285
297
|
|
|
286
298
|
To use mount in the play function, you must satisfy the following two requirements:
|
|
@@ -301,27 +313,32 @@ var U = v, _ = class _ extends o {
|
|
|
301
313
|
});
|
|
302
314
|
this.data = e;
|
|
303
315
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
316
|
+
static {
|
|
317
|
+
o(this, "MountMustBeDestructuredError");
|
|
318
|
+
}
|
|
319
|
+
}, v = class extends s {
|
|
307
320
|
constructor(e) {
|
|
308
321
|
super({
|
|
309
322
|
category: "PREVIEW_API",
|
|
310
323
|
code: 14,
|
|
311
|
-
message:
|
|
324
|
+
message: a`
|
|
312
325
|
No render function available for storyId '${e.id}'
|
|
313
326
|
`
|
|
314
327
|
});
|
|
315
328
|
this.data = e;
|
|
316
329
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
330
|
+
static {
|
|
331
|
+
o(this, "NoRenderFunctionError");
|
|
332
|
+
}
|
|
333
|
+
}, A = class extends s {
|
|
334
|
+
static {
|
|
335
|
+
o(this, "NoStoryMountedError");
|
|
336
|
+
}
|
|
320
337
|
constructor() {
|
|
321
338
|
super({
|
|
322
339
|
category: "PREVIEW_API",
|
|
323
340
|
code: 15,
|
|
324
|
-
message:
|
|
341
|
+
message: a`
|
|
325
342
|
No component is mounted in your story.
|
|
326
343
|
|
|
327
344
|
This usually occurs when you destructure mount in the play function, but forget to call it.
|
|
@@ -339,43 +356,59 @@ var q = V, N = class N extends o {
|
|
|
339
356
|
`
|
|
340
357
|
});
|
|
341
358
|
}
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
|
|
359
|
+
}, V = class extends s {
|
|
360
|
+
constructor(e) {
|
|
361
|
+
super({
|
|
362
|
+
category: "PREVIEW_API",
|
|
363
|
+
code: 16,
|
|
364
|
+
message: `Status has typeId "${e.status.typeId}" but was added to store with typeId "${e.typeId}". Full status: ${JSON.stringify(
|
|
365
|
+
e.status,
|
|
366
|
+
null,
|
|
367
|
+
2
|
|
368
|
+
)}`
|
|
369
|
+
});
|
|
370
|
+
this.data = e;
|
|
371
|
+
}
|
|
372
|
+
static {
|
|
373
|
+
o(this, "StatusTypeIdMismatchError");
|
|
374
|
+
}
|
|
375
|
+
}, O = class extends s {
|
|
376
|
+
static {
|
|
377
|
+
o(this, "NextJsSharpError");
|
|
378
|
+
}
|
|
345
379
|
constructor() {
|
|
346
380
|
super({
|
|
347
381
|
category: "FRAMEWORK_NEXTJS",
|
|
348
382
|
code: 1,
|
|
349
383
|
documentation: "https://storybook.js.org/docs/get-started/nextjs#faq",
|
|
350
|
-
message:
|
|
384
|
+
message: a`
|
|
351
385
|
You are importing avif images, but you don't have sharp installed.
|
|
352
386
|
|
|
353
387
|
You have to install sharp in order to use image optimization features in Next.js.
|
|
354
388
|
`
|
|
355
389
|
});
|
|
356
390
|
}
|
|
357
|
-
}
|
|
358
|
-
t(A, "NextJsSharpError");
|
|
359
|
-
var B = A, W = class W extends o {
|
|
391
|
+
}, W = class extends s {
|
|
360
392
|
constructor(e) {
|
|
361
393
|
super({
|
|
362
394
|
category: "FRAMEWORK_NEXTJS",
|
|
363
395
|
code: 2,
|
|
364
|
-
message:
|
|
396
|
+
message: a`
|
|
365
397
|
Tried to access router mocks from "${e.importType}" but they were not created yet. You might be running code in an unsupported environment.
|
|
366
398
|
`
|
|
367
399
|
});
|
|
368
400
|
this.data = e;
|
|
369
401
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
402
|
+
static {
|
|
403
|
+
o(this, "NextjsRouterMocksNotAvailable");
|
|
404
|
+
}
|
|
405
|
+
}, $ = class extends s {
|
|
373
406
|
constructor(e) {
|
|
374
407
|
super({
|
|
375
408
|
category: "DOCS-TOOLS",
|
|
376
409
|
code: 1,
|
|
377
410
|
documentation: "https://github.com/storybookjs/storybook/issues/26606",
|
|
378
|
-
message:
|
|
411
|
+
message: a`
|
|
379
412
|
There was a failure when generating detailed ArgTypes in ${e.language} for:
|
|
380
413
|
${JSON.stringify(e.type, null, 2)}
|
|
381
414
|
|
|
@@ -387,16 +420,17 @@ var Q = W, $ = class $ extends o {
|
|
|
387
420
|
});
|
|
388
421
|
this.data = e;
|
|
389
422
|
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
423
|
+
static {
|
|
424
|
+
o(this, "UnknownArgTypesError");
|
|
425
|
+
}
|
|
426
|
+
}, D = class extends s {
|
|
393
427
|
constructor(e) {
|
|
394
428
|
super({
|
|
395
429
|
category: "ADDON_VITEST",
|
|
396
430
|
code: 1,
|
|
397
431
|
// TODO: Add documentation about viewports support
|
|
398
432
|
// documentation: '',
|
|
399
|
-
message:
|
|
433
|
+
message: a`
|
|
400
434
|
Encountered an unsupported value "${e.value}" when setting the viewport ${e.dimension} dimension.
|
|
401
435
|
|
|
402
436
|
The Storybook plugin only supports values in the following units:
|
|
@@ -407,27 +441,43 @@ var Z = $, O = class O extends o {
|
|
|
407
441
|
});
|
|
408
442
|
this.data = e;
|
|
409
443
|
}
|
|
444
|
+
static {
|
|
445
|
+
o(this, "UnsupportedViewportDimensionError");
|
|
446
|
+
}
|
|
447
|
+
}, C = class extends s {
|
|
448
|
+
static {
|
|
449
|
+
o(this, "ElementA11yParameterError");
|
|
450
|
+
}
|
|
451
|
+
constructor() {
|
|
452
|
+
super({
|
|
453
|
+
category: "ADDON_A11Y",
|
|
454
|
+
code: 1,
|
|
455
|
+
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#a11y-addon-replace-element-parameter-with-context-para\
|
|
456
|
+
meter",
|
|
457
|
+
message: 'The "element" parameter in parameters.a11y has been removed. Use "context" instead.'
|
|
458
|
+
});
|
|
459
|
+
}
|
|
410
460
|
};
|
|
411
|
-
t(O, "UnsupportedViewportDimensionError");
|
|
412
|
-
var ee = O;
|
|
413
461
|
export {
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
462
|
+
b as CalledExtractOnStoreError,
|
|
463
|
+
x as CalledPreviewMethodBeforeInitializationError,
|
|
464
|
+
L as Category,
|
|
465
|
+
C as ElementA11yParameterError,
|
|
466
|
+
P as EmptyIndexError,
|
|
467
|
+
R as ImplicitActionsDuringRendering,
|
|
468
|
+
S as MdxFileWithNoCsfReferencesError,
|
|
469
|
+
I as MissingRenderToCanvasError,
|
|
470
|
+
f as MissingStoryAfterHmrError,
|
|
471
|
+
T as MissingStoryFromCsfFileError,
|
|
472
|
+
N as MountMustBeDestructuredError,
|
|
473
|
+
O as NextJsSharpError,
|
|
474
|
+
W as NextjsRouterMocksNotAvailable,
|
|
475
|
+
v as NoRenderFunctionError,
|
|
476
|
+
w as NoStoryMatchError,
|
|
477
|
+
A as NoStoryMountedError,
|
|
478
|
+
V as StatusTypeIdMismatchError,
|
|
479
|
+
_ as StoryIndexFetchError,
|
|
480
|
+
k as StoryStoreAccessedBeforeInitializationError,
|
|
481
|
+
$ as UnknownArgTypesError,
|
|
482
|
+
D as UnsupportedViewportDimensionError
|
|
433
483
|
};
|