storybook 9.0.0-beta.1 → 9.0.0-beta.11

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 (94) hide show
  1. package/assets/server/base-preview-head.html +2 -1
  2. package/dist/actions/decorator.js +49 -52
  3. package/dist/actions/index.cjs +42 -44
  4. package/dist/actions/index.js +37 -40
  5. package/dist/actions/preview.cjs +44 -46
  6. package/dist/actions/preview.d.ts +501 -0
  7. package/dist/actions/preview.js +24 -27
  8. package/dist/babel/index.cjs +15060 -14974
  9. package/dist/babel/index.d.ts +37 -18
  10. package/dist/babel/index.js +15097 -15011
  11. package/dist/backgrounds/index.d.ts +501 -0
  12. package/dist/backgrounds/preview.d.ts +501 -0
  13. package/dist/bin/index.cjs +44 -44
  14. package/dist/bin/index.js +44 -44
  15. package/dist/builder-manager/index.cjs +303 -283
  16. package/dist/builder-manager/index.js +545 -524
  17. package/dist/channels/index.js +919 -941
  18. package/dist/cli/bin/index.cjs +4184 -736
  19. package/dist/cli/bin/index.js +4198 -748
  20. package/dist/cli/index.cjs +36838 -28392
  21. package/dist/cli/index.d.ts +974 -1
  22. package/dist/cli/index.js +41620 -33168
  23. package/dist/client-logger/index.d.ts +2 -1
  24. package/dist/common/index.cjs +4783 -4691
  25. package/dist/common/index.d.ts +8 -2
  26. package/dist/common/index.js +5165 -5069
  27. package/dist/components/index.cjs +7905 -5600
  28. package/dist/components/index.d.ts +12 -12
  29. package/dist/components/index.js +4713 -3786
  30. package/dist/controls/preview.d.ts +501 -0
  31. package/dist/core-server/index.cjs +6799 -6708
  32. package/dist/core-server/index.d.ts +526 -25
  33. package/dist/core-server/index.js +6948 -6851
  34. package/dist/core-server/presets/common-manager.js +4528 -3377
  35. package/dist/core-server/presets/common-override-preset.cjs +10 -12
  36. package/dist/core-server/presets/common-override-preset.js +3 -5
  37. package/dist/core-server/presets/common-preset.cjs +2301 -2238
  38. package/dist/core-server/presets/common-preset.js +2389 -2322
  39. package/dist/docs-tools/index.cjs +484 -464
  40. package/dist/docs-tools/index.js +781 -768
  41. package/dist/highlight/index.cjs +19 -18
  42. package/dist/highlight/index.d.ts +4 -5
  43. package/dist/highlight/index.js +3 -2
  44. package/dist/highlight/preview.cjs +314 -310
  45. package/dist/highlight/preview.d.ts +501 -0
  46. package/dist/highlight/preview.js +296 -292
  47. package/dist/instrumenter/index.cjs +561 -559
  48. package/dist/instrumenter/index.js +1564 -1516
  49. package/dist/manager/globals-module-info.cjs +2 -0
  50. package/dist/manager/globals-module-info.js +2 -0
  51. package/dist/manager/globals-runtime.js +23602 -23339
  52. package/dist/manager/runtime.js +4891 -4650
  53. package/dist/manager-api/index.cjs +2400 -2321
  54. package/dist/manager-api/index.d.ts +513 -1
  55. package/dist/manager-api/index.js +1951 -1903
  56. package/dist/manager-errors.js +37 -41
  57. package/dist/measure/index.d.ts +501 -0
  58. package/dist/measure/preview.d.ts +501 -0
  59. package/dist/node-logger/index.cjs +25 -25
  60. package/dist/node-logger/index.js +25 -25
  61. package/dist/outline/index.d.ts +501 -0
  62. package/dist/outline/preview.d.ts +501 -0
  63. package/dist/preview/runtime.js +35803 -35785
  64. package/dist/preview-api/index.cjs +1287 -1265
  65. package/dist/preview-api/index.d.ts +1 -1
  66. package/dist/preview-api/index.js +1367 -1361
  67. package/dist/preview-errors.js +152 -173
  68. package/dist/router/index.cjs +5674 -2282
  69. package/dist/router/index.d.ts +622 -243
  70. package/dist/router/index.js +1318 -872
  71. package/dist/server-errors.cjs +192 -177
  72. package/dist/server-errors.d.ts +11 -1
  73. package/dist/server-errors.js +173 -158
  74. package/dist/telemetry/index.cjs +4934 -1445
  75. package/dist/telemetry/index.d.ts +2 -1
  76. package/dist/telemetry/index.js +4966 -1475
  77. package/dist/test/index.cjs +1876 -1878
  78. package/dist/test/index.d.ts +1269 -83
  79. package/dist/test/index.js +9157 -9248
  80. package/dist/test/preview.cjs +49 -15862
  81. package/dist/test/preview.d.ts +520 -13
  82. package/dist/test/preview.js +42 -14493
  83. package/dist/theming/create.cjs +2244 -79
  84. package/dist/theming/create.js +951 -67
  85. package/dist/theming/index.cjs +3209 -1067
  86. package/dist/theming/index.js +1816 -947
  87. package/dist/types/index.cjs +4 -4
  88. package/dist/types/index.d.ts +3124 -2596
  89. package/dist/viewport/index.d.ts +502 -3
  90. package/dist/viewport/preview.d.ts +501 -0
  91. package/package.json +14 -38
  92. package/dist/test/spy.cjs +0 -258
  93. package/dist/test/spy.d.ts +0 -66
  94. package/dist/test/spy.js +0 -240
@@ -1,27 +1,28 @@
1
1
  "use strict";
2
- var I = Object.defineProperty;
3
- var G = Object.getOwnPropertyDescriptor;
4
- var _ = Object.getOwnPropertyNames;
5
- var n = Object.prototype.hasOwnProperty;
6
- var L = (o, t) => {
7
- for (var H in t)
8
- I(o, H, { get: t[H], enumerable: !0 });
9
- }, T = (o, t, H, s) => {
2
+ var r = Object.defineProperty;
3
+ var _ = Object.getOwnPropertyDescriptor;
4
+ var L = Object.getOwnPropertyNames;
5
+ var T = Object.prototype.hasOwnProperty;
6
+ var n = (o, t) => {
7
+ for (var e in t)
8
+ r(o, e, { get: t[e], enumerable: !0 });
9
+ }, c = (o, t, e, s) => {
10
10
  if (t && typeof t == "object" || typeof t == "function")
11
- for (let e of _(t))
12
- !n.call(o, e) && e !== H && I(o, e, { get: () => t[e], enumerable: !(s = G(t, e)) || s.enumerable });
11
+ for (let H of L(t))
12
+ !T.call(o, H) && H !== e && r(o, H, { get: () => t[H], enumerable: !(s = _(t, H)) || s.enumerable });
13
13
  return o;
14
14
  };
15
- var c = (o) => T(I({}, "__esModule", { value: !0 }), o);
15
+ var x = (o) => c(r({}, "__esModule", { value: !0 }), o);
16
16
 
17
17
  // src/highlight/index.ts
18
- var x = {};
19
- L(x, {
20
- HIGHLIGHT: () => i,
21
- RESET_HIGHLIGHT: () => p,
22
- SCROLL_INTO_VIEW: () => E
18
+ var O = {};
19
+ n(O, {
20
+ HIGHLIGHT: () => E,
21
+ REMOVE_HIGHLIGHT: () => G,
22
+ RESET_HIGHLIGHT: () => i,
23
+ SCROLL_INTO_VIEW: () => p
23
24
  });
24
- module.exports = c(x);
25
+ module.exports = x(O);
25
26
 
26
27
  // src/highlight/constants.ts
27
- var r = "storybook/highlight", i = `${r}/add`, l = `${r}/remove`, p = `${r}/reset`, E = `${r}/scroll-into-view`;
28
+ var I = "storybook/highlight", E = `${I}/add`, G = `${I}/remove`, i = `${I}/reset`, p = `${I}/scroll-into-view`;
@@ -1,4 +1,5 @@
1
1
  declare const HIGHLIGHT = "storybook/highlight/add";
2
+ declare const REMOVE_HIGHLIGHT = "storybook/highlight/remove";
2
3
  declare const RESET_HIGHLIGHT = "storybook/highlight/reset";
3
4
  declare const SCROLL_INTO_VIEW = "storybook/highlight/scroll-into-view";
4
5
 
@@ -20,17 +21,15 @@ interface HighlightOptions {
20
21
  selectors: string[];
21
22
  /** Priority of the highlight, higher takes precedence, defaults to 0 */
22
23
  priority?: number;
23
- /** Whether the highlight is selectable (reveals the element's HTML) */
24
- selectable?: boolean;
25
24
  /** CSS styles to apply to the highlight */
26
- styles: Record<string, string>;
25
+ styles?: Record<string, string>;
27
26
  /** CSS styles to apply to the highlight when it is hovered */
28
27
  hoverStyles?: Record<string, string>;
29
28
  /** CSS styles to apply to the highlight when it is focused or selected */
30
29
  focusStyles?: Record<string, string>;
31
30
  /** Keyframes required for animations */
32
31
  keyframes?: string;
33
- /** Menu items to show when the highlight is selected (implies selectable: true) */
32
+ /** Menu items to show when the highlight is selected */
34
33
  menu?: {
35
34
  /** Unique identifier for the menu item */
36
35
  id: string;
@@ -58,4 +57,4 @@ interface ClickEventDetails {
58
57
  };
59
58
  }
60
59
 
61
- export { type ClickEventDetails, HIGHLIGHT, type HighlightOptions, type HighlightParameters, RESET_HIGHLIGHT, SCROLL_INTO_VIEW };
60
+ export { type ClickEventDetails, HIGHLIGHT, type HighlightOptions, type HighlightParameters, REMOVE_HIGHLIGHT, RESET_HIGHLIGHT, SCROLL_INTO_VIEW };
@@ -1,7 +1,8 @@
1
1
  // src/highlight/constants.ts
2
- var t = "storybook/highlight", o = `${t}/add`, r = `${t}/remove`, e = `${t}/reset`, H = `${t}/scroll-into-view`;
2
+ var t = "storybook/highlight", o = `${t}/add`, H = `${t}/remove`, e = `${t}/reset`, I = `${t}/scroll-into-view`;
3
3
  export {
4
4
  o as HIGHLIGHT,
5
+ H as REMOVE_HIGHLIGHT,
5
6
  e as RESET_HIGHLIGHT,
6
- H as SCROLL_INTO_VIEW
7
+ I as SCROLL_INTO_VIEW
7
8
  };