storybook 9.0.0-alpha.20 → 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/assets/server/base-preview-head.html +1 -3
- package/dist/actions/decorator.js +34 -38
- package/dist/actions/index.cjs +1 -4
- package/dist/actions/index.js +1 -4
- package/dist/actions/preview.cjs +1 -4
- package/dist/actions/preview.js +1 -4
- package/dist/babel/index.cjs +822 -816
- package/dist/babel/index.js +822 -816
- package/dist/backgrounds/index.cjs +16 -16
- package/dist/backgrounds/index.js +14 -14
- package/dist/backgrounds/preview.cjs +34 -34
- package/dist/backgrounds/preview.js +29 -29
- package/dist/bin/index.cjs +67 -65
- package/dist/bin/index.js +61 -59
- package/dist/builder-manager/index.cjs +482 -472
- package/dist/builder-manager/index.js +283 -273
- package/dist/channels/index.js +941 -919
- package/dist/cli/bin/index.cjs +1 -1
- package/dist/cli/bin/index.js +1 -1
- package/dist/cli/index.cjs +61752 -7591
- package/dist/cli/index.d.ts +22 -14
- package/dist/cli/index.js +61775 -7614
- package/dist/common/index.cjs +16015 -8979
- package/dist/common/index.d.ts +30 -1
- package/dist/common/index.js +16105 -9063
- package/dist/components/index.cjs +3694 -3643
- package/dist/components/index.d.ts +5 -2
- package/dist/components/index.js +2352 -2294
- package/dist/core-server/index.cjs +3540 -3540
- package/dist/core-server/index.js +730 -730
- package/dist/core-server/presets/common-manager.js +2642 -2592
- package/dist/core-server/presets/common-preset.cjs +723 -715
- package/dist/core-server/presets/common-preset.js +10 -2
- package/dist/docs-tools/index.js +640 -632
- package/dist/highlight/index.cjs +16 -16
- package/dist/highlight/index.d.ts +45 -1
- package/dist/highlight/index.js +2 -2
- package/dist/highlight/preview.cjs +522 -68
- package/dist/highlight/preview.js +508 -56
- package/dist/instrumenter/index.js +1179 -1170
- package/dist/manager/globals-module-info.cjs +1 -0
- package/dist/manager/globals-module-info.js +1 -0
- package/dist/manager/globals-runtime.js +19385 -19190
- package/dist/manager/runtime.js +2084 -2079
- package/dist/manager-api/index.cjs +352 -352
- package/dist/manager-api/index.js +1694 -1663
- package/dist/manager-errors.js +41 -37
- package/dist/measure/index.cjs +99 -97
- package/dist/measure/index.js +95 -93
- package/dist/measure/preview.cjs +127 -125
- package/dist/measure/preview.js +125 -123
- package/dist/outline/index.cjs +41 -41
- package/dist/outline/index.js +12 -12
- package/dist/outline/preview.cjs +23 -23
- package/dist/outline/preview.js +7 -7
- package/dist/preview/runtime.js +13577 -12959
- package/dist/preview-api/index.cjs +0 -1
- package/dist/preview-api/index.d.ts +120 -385
- package/dist/preview-api/index.js +827 -812
- package/dist/preview-errors.cjs +65 -51
- package/dist/preview-errors.d.ts +6 -2
- package/dist/preview-errors.js +176 -142
- package/dist/server-errors.cjs +105 -72
- package/dist/server-errors.d.ts +9 -1
- package/dist/server-errors.js +87 -54
- package/dist/telemetry/index.cjs +374 -370
- package/dist/telemetry/index.js +460 -456
- package/dist/test/index.js +9831 -9743
- package/dist/test/preview.d.ts +0 -6
- package/dist/test/preview.js +3628 -3568
- package/dist/types/index.d.ts +72 -6
- package/package.json +1 -1
package/dist/highlight/index.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
2
|
+
var I = Object.defineProperty;
|
|
3
|
+
var G = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var _ = Object.getOwnPropertyNames;
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
for (var
|
|
8
|
-
|
|
9
|
-
},
|
|
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) => {
|
|
10
10
|
if (t && typeof t == "object" || typeof t == "function")
|
|
11
11
|
for (let e of _(t))
|
|
12
|
-
!
|
|
12
|
+
!n.call(o, e) && e !== H && I(o, e, { get: () => t[e], enumerable: !(s = G(t, e)) || s.enumerable });
|
|
13
13
|
return o;
|
|
14
14
|
};
|
|
15
|
-
var c = (o) =>
|
|
15
|
+
var c = (o) => T(I({}, "__esModule", { value: !0 }), o);
|
|
16
16
|
|
|
17
17
|
// src/highlight/index.ts
|
|
18
|
-
var
|
|
19
|
-
x
|
|
20
|
-
HIGHLIGHT: () =>
|
|
21
|
-
RESET_HIGHLIGHT: () =>
|
|
22
|
-
SCROLL_INTO_VIEW: () =>
|
|
18
|
+
var x = {};
|
|
19
|
+
L(x, {
|
|
20
|
+
HIGHLIGHT: () => i,
|
|
21
|
+
RESET_HIGHLIGHT: () => p,
|
|
22
|
+
SCROLL_INTO_VIEW: () => E
|
|
23
23
|
});
|
|
24
|
-
module.exports = c(
|
|
24
|
+
module.exports = c(x);
|
|
25
25
|
|
|
26
26
|
// src/highlight/constants.ts
|
|
27
|
-
var
|
|
27
|
+
var r = "storybook/highlight", i = `${r}/add`, l = `${r}/remove`, p = `${r}/reset`, E = `${r}/scroll-into-view`;
|
|
@@ -13,5 +13,49 @@ interface HighlightParameters {
|
|
|
13
13
|
disable?: boolean;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
+
interface HighlightOptions {
|
|
17
|
+
/** Unique identifier for the highlight, required if you want to remove the highlight later */
|
|
18
|
+
id?: string;
|
|
19
|
+
/** HTML selectors of the elements */
|
|
20
|
+
selectors: string[];
|
|
21
|
+
/** Priority of the highlight, higher takes precedence, defaults to 0 */
|
|
22
|
+
priority?: number;
|
|
23
|
+
/** Whether the highlight is selectable (reveals the element's HTML) */
|
|
24
|
+
selectable?: boolean;
|
|
25
|
+
/** CSS styles to apply to the highlight */
|
|
26
|
+
styles: Record<string, string>;
|
|
27
|
+
/** CSS styles to apply to the highlight when it is hovered */
|
|
28
|
+
hoverStyles?: Record<string, string>;
|
|
29
|
+
/** CSS styles to apply to the highlight when it is focused or selected */
|
|
30
|
+
focusStyles?: Record<string, string>;
|
|
31
|
+
/** Keyframes required for animations */
|
|
32
|
+
keyframes?: string;
|
|
33
|
+
/** Menu items to show when the highlight is selected (implies selectable: true) */
|
|
34
|
+
menu?: {
|
|
35
|
+
/** Unique identifier for the menu item */
|
|
36
|
+
id: string;
|
|
37
|
+
/** Title of the menu item */
|
|
38
|
+
title: string;
|
|
39
|
+
/** Description of the menu item */
|
|
40
|
+
description?: string;
|
|
41
|
+
/** Name for a channel event to trigger when the menu item is clicked */
|
|
42
|
+
clickEvent?: string;
|
|
43
|
+
/** HTML selectors for which this menu item should show (subset of `selectors`) */
|
|
44
|
+
selectors?: string[];
|
|
45
|
+
}[];
|
|
46
|
+
}
|
|
47
|
+
interface ClickEventDetails {
|
|
48
|
+
top: number;
|
|
49
|
+
left: number;
|
|
50
|
+
width: number;
|
|
51
|
+
height: number;
|
|
52
|
+
selectors: string[];
|
|
53
|
+
element: {
|
|
54
|
+
attributes: Record<string, string>;
|
|
55
|
+
localName: string;
|
|
56
|
+
tagName: string;
|
|
57
|
+
outerHTML: string;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
16
60
|
|
|
17
|
-
export { HIGHLIGHT, type HighlightParameters, RESET_HIGHLIGHT, SCROLL_INTO_VIEW };
|
|
61
|
+
export { type ClickEventDetails, HIGHLIGHT, type HighlightOptions, type HighlightParameters, RESET_HIGHLIGHT, SCROLL_INTO_VIEW };
|
package/dist/highlight/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/highlight/constants.ts
|
|
2
|
-
var t = "storybook/highlight", o = `${t}/add`, e = `${t}/reset`,
|
|
2
|
+
var t = "storybook/highlight", o = `${t}/add`, r = `${t}/remove`, e = `${t}/reset`, H = `${t}/scroll-into-view`;
|
|
3
3
|
export {
|
|
4
4
|
o as HIGHLIGHT,
|
|
5
5
|
e as RESET_HIGHLIGHT,
|
|
6
|
-
|
|
6
|
+
H as SCROLL_INTO_VIEW
|
|
7
7
|
};
|