storybook 9.0.0-alpha.11 → 9.0.0-alpha.13
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/assets/docs/addon-backgrounds.gif +0 -0
- package/assets/docs/highlight.png +0 -0
- package/bin/index.cjs +2 -2
- package/dist/actions/preview.d.ts +0 -1
- 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 -61
- package/dist/bin/index.js +49 -61
- package/dist/builder-manager/index.cjs +390 -380
- package/dist/builder-manager/index.js +489 -479
- package/dist/channels/index.cjs +17 -17
- package/dist/channels/index.js +3 -3
- package/dist/cli/bin/index.cjs +225 -225
- package/dist/cli/bin/index.js +234 -234
- package/dist/cli/index.cjs +1904 -1909
- package/dist/cli/index.d.ts +3 -7
- package/dist/cli/index.js +734 -739
- package/dist/common/index.cjs +2401 -2388
- package/dist/common/index.d.ts +1 -13
- package/dist/common/index.js +2609 -2596
- package/dist/components/index.cjs +5701 -5946
- package/dist/components/index.d.ts +3 -254
- package/dist/components/index.js +7271 -13724
- package/dist/controls/preview.d.ts +0 -1
- package/dist/core-events/index.cjs +91 -106
- package/dist/core-events/index.d.ts +2 -80
- package/dist/core-events/index.js +79 -94
- package/dist/core-server/index.cjs +5221 -5122
- package/dist/core-server/index.d.ts +32 -23
- package/dist/core-server/index.js +6511 -6412
- package/dist/core-server/presets/common-manager.js +9815 -12
- package/dist/core-server/presets/common-preset.cjs +2817 -2989
- package/dist/core-server/presets/common-preset.js +2896 -3068
- package/dist/csf/index.d.ts +0 -2
- package/dist/csf-tools/index.cjs +0 -8
- package/dist/csf-tools/index.d.ts +0 -4
- package/dist/csf-tools/index.js +0 -8
- package/dist/docs-tools/index.cjs +626 -600
- package/dist/docs-tools/index.js +613 -587
- package/dist/highlight/index.cjs +27 -0
- package/dist/highlight/index.d.ts +17 -0
- package/dist/highlight/index.js +7 -0
- package/dist/highlight/preview.cjs +81 -0
- package/dist/highlight/preview.d.ts +54 -0
- package/dist/highlight/preview.js +67 -0
- package/dist/instrumenter/index.cjs +70 -60
- package/dist/instrumenter/index.d.ts +8 -7
- package/dist/instrumenter/index.js +98 -88
- package/dist/manager/globals-module-info.cjs +21 -33
- package/dist/manager/globals-module-info.js +6 -18
- package/dist/manager/globals-runtime.js +22671 -22006
- package/dist/manager/runtime.js +4996 -4581
- package/dist/manager-api/index.cjs +1289 -1384
- package/dist/manager-api/index.d.ts +109 -114
- package/dist/manager-api/index.js +920 -1021
- package/dist/measure/index.cjs +474 -0
- package/dist/measure/index.d.ts +66 -0
- package/dist/measure/index.js +462 -0
- package/dist/measure/preview.cjs +464 -0
- package/dist/measure/preview.d.ts +59 -0
- package/dist/measure/preview.js +448 -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/runtime.js +14340 -13357
- package/dist/preview-api/index.cjs +1201 -1321
- package/dist/preview-api/index.d.ts +66 -120
- package/dist/preview-api/index.js +1546 -1665
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/test/index.cjs +1547 -1546
- package/dist/test/index.js +2308 -2307
- package/dist/test/preview.cjs +1906 -1905
- package/dist/test/preview.d.ts +0 -6
- package/dist/test/preview.js +1439 -1438
- package/dist/test/spy.cjs +65 -64
- package/dist/test/spy.js +59 -58
- package/dist/types/index.cjs +11 -12
- package/dist/types/index.d.ts +502 -298
- package/dist/types/index.js +1 -2
- package/dist/viewport/preview.d.ts +0 -1
- package/package.json +124 -19
- package/dist/actions/manager.js +0 -1196
- package/dist/component-testing/manager.js +0 -3099
- package/dist/controls/manager.js +0 -5545
- package/dist/viewport/manager.js +0 -400
- /package/dist/{component-testing/manager.css → core-server/presets/common-manager.css} +0 -0
package/dist/channels/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@ var Ne = Object.create;
|
|
|
3
3
|
var q = Object.defineProperty;
|
|
4
4
|
var Re = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var je = Object.getOwnPropertyNames;
|
|
6
|
-
var
|
|
6
|
+
var Le = Object.getPrototypeOf, De = Object.prototype.hasOwnProperty;
|
|
7
7
|
var o = (t, e) => q(t, "name", { value: e, configurable: !0 });
|
|
8
8
|
var J = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), Me = (t, e) => {
|
|
9
9
|
for (var r in e)
|
|
@@ -11,10 +11,10 @@ var J = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), M
|
|
|
11
11
|
}, pe = (t, e, r, n) => {
|
|
12
12
|
if (e && typeof e == "object" || typeof e == "function")
|
|
13
13
|
for (let a of je(e))
|
|
14
|
-
!
|
|
14
|
+
!De.call(t, a) && a !== r && q(t, a, { get: () => e[a], enumerable: !(n = Re(e, a)) || n.enumerable });
|
|
15
15
|
return t;
|
|
16
16
|
};
|
|
17
|
-
var z = (t, e, r) => (r = t != null ? Ne(
|
|
17
|
+
var z = (t, e, r) => (r = t != null ? Ne(Le(t)) : {}, pe(
|
|
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
|
|
@@ -440,7 +440,7 @@ tion]";
|
|
|
440
440
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
441
441
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
442
442
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
443
|
-
}, x = require_function_bind(), R = require_src(), j = x.call(Function.call, Array.prototype.concat),
|
|
443
|
+
}, x = require_function_bind(), R = require_src(), j = x.call(Function.call, Array.prototype.concat), L = x.call(Function.apply, Array.
|
|
444
444
|
prototype.splice), ue = x.call(Function.call, String.prototype.replace), K = x.call(Function.call, String.prototype.slice), Oe = x.call(
|
|
445
445
|
Function.call, RegExp.prototype.exec), we = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,
|
|
446
446
|
Pe = /\\(\\)?/g, Ie = /* @__PURE__ */ o(function(g) {
|
|
@@ -450,8 +450,8 @@ tion]";
|
|
|
450
450
|
if (m === "%" && E !== "%")
|
|
451
451
|
throw new n("invalid intrinsic syntax, expected opening `%`");
|
|
452
452
|
var b = [];
|
|
453
|
-
return ue(g, we, function(O,
|
|
454
|
-
b[b.length] = S ? ue(Y, Pe, "$1") :
|
|
453
|
+
return ue(g, we, function(O, D, S, Y) {
|
|
454
|
+
b[b.length] = S ? ue(Y, Pe, "$1") : D || O;
|
|
455
455
|
}), b;
|
|
456
456
|
}, "stringToPath3"), xe = /* @__PURE__ */ o(function(g, E) {
|
|
457
457
|
var m = g, b;
|
|
@@ -474,14 +474,14 @@ tion]";
|
|
|
474
474
|
throw new s('"allowMissing" argument must be a boolean');
|
|
475
475
|
if (Oe(/^%?[^%]*%?$/, g) === null)
|
|
476
476
|
throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
477
|
-
var m = Ie(g), b = m.length > 0 ? m[0] : "", O = xe("%" + b + "%", E),
|
|
478
|
-
te && (b = te[0],
|
|
477
|
+
var m = Ie(g), b = m.length > 0 ? m[0] : "", O = xe("%" + b + "%", E), D = O.name, S = O.value, Y = !1, te = O.alias;
|
|
478
|
+
te && (b = te[0], L(m, j([0, 1], te)));
|
|
479
479
|
for (var X = 1, W = !0; X < m.length; X += 1) {
|
|
480
480
|
var P = m[X], Z = K(P, 0, 1), Q = K(P, -1);
|
|
481
481
|
if ((Z === '"' || Z === "'" || Z === "`" || Q === '"' || Q === "'" || Q === "`") && Z !== Q)
|
|
482
482
|
throw new n("property names with quotes must have matching quotes");
|
|
483
|
-
if ((P === "constructor" || !W) && (Y = !0), b += "." + P,
|
|
484
|
-
S = v[
|
|
483
|
+
if ((P === "constructor" || !W) && (Y = !0), b += "." + P, D = "%" + b + "%", R(v, D))
|
|
484
|
+
S = v[D];
|
|
485
485
|
else if (S != null) {
|
|
486
486
|
if (!(P in S)) {
|
|
487
487
|
if (!E)
|
|
@@ -493,7 +493,7 @@ tion]";
|
|
|
493
493
|
W = !!ee, W && "get" in ee && !("originalValue" in ee.get) ? S = ee.get : S = S[P];
|
|
494
494
|
} else
|
|
495
495
|
W = R(S, P), S = S[P];
|
|
496
|
-
W && !Y && (v[
|
|
496
|
+
W && !Y && (v[D] = S);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
return S;
|
|
@@ -1277,8 +1277,8 @@ var Ue = "UNIVERSAL_STORE:", C = {
|
|
|
1277
1277
|
this.onStateChange.bind(this), this.send = this.send.bind(this), this.emitToChannel = this.emitToChannel.bind(this), this.prepareThis = this.
|
|
1278
1278
|
prepareThis.bind(this), this.emitToListeners = this.emitToListeners.bind(this), this.handleChannelEvents = this.handleChannelEvents.bind(
|
|
1279
1279
|
this), this.debug = this.debug.bind(this), this.channel = r?.channel ?? t.preparation.channel, this.environment = r?.environment ?? t.preparation.
|
|
1280
|
-
environment, this.channel && this.environment ?
|
|
1281
|
-
promise.then(this.prepareThis);
|
|
1280
|
+
environment, this.channel && this.environment ? (t.preparation.resolve({ channel: this.channel, environment: this.environment }), this.prepareThis(
|
|
1281
|
+
{ channel: this.channel, environment: this.environment })) : t.preparation.promise.then(this.prepareThis);
|
|
1282
1282
|
}
|
|
1283
1283
|
static {
|
|
1284
1284
|
o(this, "UniversalStore");
|
|
@@ -1520,7 +1520,7 @@ var Ue = "UNIVERSAL_STORE:", C = {
|
|
|
1520
1520
|
};
|
|
1521
1521
|
this.debug("handleChannelEvents: responding to existing state request", {
|
|
1522
1522
|
responseEvent: s
|
|
1523
|
-
}), this.emitToChannel(s, { actor: this.actor });
|
|
1523
|
+
}), this.emitToChannel(s, { actor: this.actor }), this.emitToListeners(s, { actor: this.actor });
|
|
1524
1524
|
break;
|
|
1525
1525
|
case t.InternalEventType.LEADER_CREATED:
|
|
1526
1526
|
a = !1, this.syncing.state = C.REJECTED, this.debug("handleChannelEvents: erroring due to second leader being created", {
|
|
@@ -1759,7 +1759,7 @@ var { document: oe, location: ie } = _.global, Te = "storybook-channel", ze = {
|
|
|
1759
1759
|
maxDepth: u,
|
|
1760
1760
|
space: y,
|
|
1761
1761
|
lazyEval: d
|
|
1762
|
-
}).filter(([j,
|
|
1762
|
+
}).filter(([j, L]) => typeof L < "u")
|
|
1763
1763
|
), w = {
|
|
1764
1764
|
...ze,
|
|
1765
1765
|
..._.global.CHANNEL_OPTIONS || {},
|
|
@@ -1778,8 +1778,8 @@ var { document: oe, location: ie } = _.global, Te = "storybook-channel", ze = {
|
|
|
1778
1778
|
} catch {
|
|
1779
1779
|
U.logger.error("sending over postmessage fail");
|
|
1780
1780
|
}
|
|
1781
|
-
}), Promise.resolve(null)) : new Promise((j,
|
|
1782
|
-
this.buffer.push({ event: e, resolve: j, reject:
|
|
1781
|
+
}), Promise.resolve(null)) : new Promise((j, L) => {
|
|
1782
|
+
this.buffer.push({ event: e, resolve: j, reject: L });
|
|
1783
1783
|
});
|
|
1784
1784
|
}
|
|
1785
1785
|
flush() {
|
package/dist/channels/index.js
CHANGED
|
@@ -282,8 +282,8 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
282
282
|
this.onStateChange.bind(this), this.send = this.send.bind(this), this.emitToChannel = this.emitToChannel.bind(this), this.prepareThis = this.
|
|
283
283
|
prepareThis.bind(this), this.emitToListeners = this.emitToListeners.bind(this), this.handleChannelEvents = this.handleChannelEvents.bind(
|
|
284
284
|
this), this.debug = this.debug.bind(this), this.channel = e?.channel ?? h.preparation.channel, this.environment = e?.environment ?? h.preparation.
|
|
285
|
-
environment, this.channel && this.environment ?
|
|
286
|
-
promise.then(this.prepareThis);
|
|
285
|
+
environment, this.channel && this.environment ? (h.preparation.resolve({ channel: this.channel, environment: this.environment }), this.prepareThis(
|
|
286
|
+
{ channel: this.channel, environment: this.environment })) : h.preparation.promise.then(this.prepareThis);
|
|
287
287
|
}
|
|
288
288
|
static setupPreparationPromise() {
|
|
289
289
|
let t, e, n = new Promise(
|
|
@@ -468,7 +468,7 @@ var de = "UNIVERSAL_STORE:", x = {
|
|
|
468
468
|
};
|
|
469
469
|
this.debug("handleChannelEvents: responding to existing state request", {
|
|
470
470
|
responseEvent: s
|
|
471
|
-
}), this.emitToChannel(s, { actor: this.actor });
|
|
471
|
+
}), this.emitToChannel(s, { actor: this.actor }), this.emitToListeners(s, { actor: this.actor });
|
|
472
472
|
break;
|
|
473
473
|
case h.InternalEventType.LEADER_CREATED:
|
|
474
474
|
o = !1, this.syncing.state = x.REJECTED, this.debug("handleChannelEvents: erroring due to second leader being created", {
|