storybook 9.1.0-alpha.3 → 9.1.0-alpha.5

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.
Files changed (70) hide show
  1. package/dist/actions/index.cjs +16 -16
  2. package/dist/actions/index.d.ts +1 -38
  3. package/dist/actions/index.js +12 -12
  4. package/dist/actions/preview.cjs +25 -25
  5. package/dist/actions/preview.d.ts +37 -547
  6. package/dist/actions/preview.js +18 -18
  7. package/dist/backgrounds/index.cjs +12 -144
  8. package/dist/backgrounds/index.d.ts +1 -591
  9. package/dist/backgrounds/index.js +0 -130
  10. package/dist/backgrounds/preview.cjs +63 -63
  11. package/dist/backgrounds/preview.d.ts +40 -542
  12. package/dist/backgrounds/preview.js +47 -47
  13. package/dist/bin/index.cjs +50 -50
  14. package/dist/bin/index.js +50 -50
  15. package/dist/cli/bin/index.cjs +1 -1
  16. package/dist/cli/bin/index.js +1 -1
  17. package/dist/common/index.cjs +755 -756
  18. package/dist/common/index.d.ts +9 -5
  19. package/dist/common/index.js +700 -700
  20. package/dist/component-testing/preview.cjs +12 -12
  21. package/dist/component-testing/preview.d.ts +2 -2
  22. package/dist/component-testing/preview.js +7 -7
  23. package/dist/controls/index.cjs +16 -16
  24. package/dist/controls/index.d.ts +1 -36
  25. package/dist/controls/preview.cjs +17 -17
  26. package/dist/controls/preview.d.ts +34 -546
  27. package/dist/controls/preview.js +3 -3
  28. package/dist/csf/index.cjs +1210 -95
  29. package/dist/csf/index.d.ts +59 -18
  30. package/dist/csf/index.js +1214 -90
  31. package/dist/csf-tools/index.cjs +2 -1
  32. package/dist/csf-tools/index.js +2 -2
  33. package/dist/highlight/index.cjs +15 -15
  34. package/dist/highlight/index.d.ts +1 -12
  35. package/dist/highlight/index.js +4 -4
  36. package/dist/highlight/preview.cjs +63 -63
  37. package/dist/highlight/preview.d.ts +11 -546
  38. package/dist/highlight/preview.js +11 -10
  39. package/dist/manager/globals-runtime.js +29776 -29777
  40. package/dist/manager-api/index.cjs +1 -1
  41. package/dist/manager-api/index.js +1 -1
  42. package/dist/measure/index.cjs +12 -472
  43. package/dist/measure/index.d.ts +1 -566
  44. package/dist/measure/index.js +0 -464
  45. package/dist/measure/preview.cjs +104 -104
  46. package/dist/measure/preview.d.ts +11 -546
  47. package/dist/measure/preview.js +105 -105
  48. package/dist/outline/index.cjs +12 -524
  49. package/dist/outline/index.d.ts +1 -566
  50. package/dist/outline/index.js +0 -500
  51. package/dist/outline/preview.cjs +32 -32
  52. package/dist/outline/preview.d.ts +11 -546
  53. package/dist/outline/preview.js +27 -27
  54. package/dist/preview/runtime.js +8259 -8266
  55. package/dist/preview-api/index.cjs +1228 -1261
  56. package/dist/preview-api/index.d.ts +6 -8
  57. package/dist/preview-api/index.js +927 -963
  58. package/dist/telemetry/index.cjs +1 -1
  59. package/dist/telemetry/index.js +1 -1
  60. package/dist/test/preview.cjs +42 -42
  61. package/dist/test/preview.d.ts +12 -550
  62. package/dist/test/preview.js +36 -36
  63. package/dist/types/index.d.ts +5 -3
  64. package/dist/viewport/index.cjs +17 -24
  65. package/dist/viewport/index.d.ts +9 -532
  66. package/dist/viewport/index.js +9 -16
  67. package/dist/viewport/preview.cjs +22 -22
  68. package/dist/viewport/preview.d.ts +45 -552
  69. package/dist/viewport/preview.js +8 -8
  70. package/package.json +1 -1
@@ -4253,7 +4253,7 @@ i(Oa, "isMetadataYarnClassic");
4253
4253
  var Rl = require("node:fs/promises"), Nl = require("node:path"), Zl = require("node:process");
4254
4254
 
4255
4255
  // package.json
4256
- var yt = "9.1.0-alpha.3";
4256
+ var yt = "9.1.0-alpha.5";
4257
4257
 
4258
4258
  // src/cli/globalSettings.ts
4259
4259
  var Et = T(require("node:fs/promises"), 1), xs = require("node:os"), Pt = require("node:path"), Ae = T(fs(), 1);
@@ -4262,7 +4262,7 @@ import "node:path";
4262
4262
  import "node:process";
4263
4263
 
4264
4264
  // package.json
4265
- var ot = "9.1.0-alpha.3";
4265
+ var ot = "9.1.0-alpha.5";
4266
4266
 
4267
4267
  // src/cli/globalSettings.ts
4268
4268
  var Ce = G(Gn(), 1);
@@ -1,73 +1,73 @@
1
1
  "use strict";
2
2
  var c = Object.defineProperty;
3
- var b = Object.getOwnPropertyDescriptor;
4
- var u = Object.getOwnPropertyNames;
5
- var a = Object.prototype.hasOwnProperty;
6
- var i = (t, r) => c(t, "name", { value: r, configurable: !0 });
7
- var k = (t, r) => {
8
- for (var o in r)
9
- c(t, o, { get: r[o], enumerable: !0 });
10
- }, d = (t, r, o, n) => {
11
- if (r && typeof r == "object" || typeof r == "function")
12
- for (let s of u(r))
13
- !a.call(t, s) && s !== o && c(t, s, { get: () => r[s], enumerable: !(n = b(r, s)) || n.enumerable });
3
+ var l = Object.getOwnPropertyDescriptor;
4
+ var d = Object.getOwnPropertyNames;
5
+ var b = Object.prototype.hasOwnProperty;
6
+ var s = (t, e) => c(t, "name", { value: e, configurable: !0 });
7
+ var u = (t, e) => {
8
+ for (var o in e)
9
+ c(t, o, { get: e[o], enumerable: !0 });
10
+ }, g = (t, e, o, r) => {
11
+ if (e && typeof e == "object" || typeof e == "function")
12
+ for (let i of d(e))
13
+ !b.call(t, i) && i !== o && c(t, i, { get: () => e[i], enumerable: !(r = l(e, i)) || r.enumerable });
14
14
  return t;
15
15
  };
16
- var g = (t) => d(c({}, "__esModule", { value: !0 }), t);
16
+ var k = (t) => g(c({}, "__esModule", { value: !0 }), t);
17
17
 
18
18
  // src/test/preview.ts
19
- var y = {};
20
- k(y, {
21
- default: () => E,
19
+ var E = {};
20
+ u(E, {
21
+ default: () => A,
22
22
  traverseArgs: () => f
23
23
  });
24
- module.exports = g(y);
25
- var p = require("storybook/internal/instrumenter"), l = require("storybook/preview-api"), e = require("storybook/test");
26
- var w = /* @__PURE__ */ i(({ parameters: t }) => {
27
- t?.test?.mockReset === !0 ? (0, e.resetAllMocks)() : t?.test?.clearMocks === !0 ? (0, e.clearAllMocks)() : t?.test?.restoreMocks !== !1 &&
28
- (0, e.restoreAllMocks)();
29
- }, "resetAllMocksLoader"), f = /* @__PURE__ */ i((t, r = 0, o) => {
30
- if (r > 5 || t == null)
24
+ module.exports = k(E);
25
+ var m = require("storybook/internal/csf"), p = require("storybook/internal/instrumenter"), n = require("storybook/test");
26
+ var y = /* @__PURE__ */ s(({ parameters: t }) => {
27
+ t?.test?.mockReset === !0 ? (0, n.resetAllMocks)() : t?.test?.clearMocks === !0 ? (0, n.clearAllMocks)() : t?.test?.restoreMocks !== !1 &&
28
+ (0, n.restoreAllMocks)();
29
+ }, "resetAllMocksLoader"), f = /* @__PURE__ */ s((t, e = 0, o) => {
30
+ if (e > 5 || t == null)
31
31
  return t;
32
- if ((0, e.isMockFunction)(t))
32
+ if ((0, n.isMockFunction)(t))
33
33
  return o && t.mockName(o), t;
34
34
  if (typeof t == "function" && "isAction" in t && t.isAction && !("implicit" in t && t.implicit)) {
35
- let n = (0, e.fn)(t);
36
- return o && n.mockName(o), n;
35
+ let r = (0, n.fn)(t);
36
+ return o && r.mockName(o), r;
37
37
  }
38
38
  if (Array.isArray(t)) {
39
- r++;
40
- for (let n = 0; n < t.length; n++)
41
- Object.getOwnPropertyDescriptor(t, n)?.writable && (t[n] = f(t[n], r));
39
+ e++;
40
+ for (let r = 0; r < t.length; r++)
41
+ Object.getOwnPropertyDescriptor(t, r)?.writable && (t[r] = f(t[r], e));
42
42
  return t;
43
43
  }
44
44
  if (typeof t == "object" && t.constructor === Object) {
45
- r++;
46
- for (let [n, s] of Object.entries(t))
47
- Object.getOwnPropertyDescriptor(t, n)?.writable && (t[n] = f(s, r, n));
45
+ e++;
46
+ for (let [r, i] of Object.entries(t))
47
+ Object.getOwnPropertyDescriptor(t, r)?.writable && (t[r] = f(i, e, r));
48
48
  return t;
49
49
  }
50
50
  return t;
51
- }, "traverseArgs"), A = /* @__PURE__ */ i(({ initialArgs: t }) => {
51
+ }, "traverseArgs"), T = /* @__PURE__ */ s(({ initialArgs: t }) => {
52
52
  f(t);
53
- }, "nameSpiesAndWrapActionsInSpies"), m = !1, M = /* @__PURE__ */ i(async (t) => {
54
- if (globalThis.HTMLElement && t.canvasElement instanceof globalThis.HTMLElement && (t.canvas = (0, e.within)(t.canvasElement)), globalThis.
53
+ }, "nameSpiesAndWrapActionsInSpies"), a = !1, w = /* @__PURE__ */ s(async (t) => {
54
+ if (globalThis.HTMLElement && t.canvasElement instanceof globalThis.HTMLElement && (t.canvas = (0, n.within)(t.canvasElement)), globalThis.
55
55
  window?.navigator?.clipboard) {
56
56
  t.userEvent = (0, p.instrument)(
57
- { userEvent: e.uninstrumentedUserEvent.setup() },
57
+ { userEvent: n.uninstrumentedUserEvent.setup() },
58
58
  { intercept: !0 }
59
59
  ).userEvent;
60
- let r = HTMLElement.prototype.focus;
61
- m || Object.defineProperties(HTMLElement.prototype, {
60
+ let e = HTMLElement.prototype.focus;
61
+ a || Object.defineProperties(HTMLElement.prototype, {
62
62
  focus: {
63
63
  configurable: !0,
64
- set: /* @__PURE__ */ i((o) => {
65
- r = o, m = !0;
64
+ set: /* @__PURE__ */ s((o) => {
65
+ e = o, a = !0;
66
66
  }, "set"),
67
- get: /* @__PURE__ */ i(() => r, "get")
67
+ get: /* @__PURE__ */ s(() => e, "get")
68
68
  }
69
69
  });
70
70
  }
71
- }, "enhanceContext"), E = /* @__PURE__ */ i(() => (0, l.definePreview)({
72
- loaders: [w, A, M]
71
+ }, "enhanceContext"), A = /* @__PURE__ */ s(() => (0, m.definePreviewAddon)({
72
+ loaders: [y, T, w]
73
73
  }), "default");