@histoire/shared 0.16.4 → 0.17.0
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/dist/types/plugin.d.ts +1 -1
- package/dist/types/story.d.ts +10 -2
- package/package.json +3 -3
- package/src/types/plugin.ts +1 -1
- package/src/types/story.ts +10 -2
package/dist/types/plugin.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import type { Awaitable } from '../type-utils.js';
|
|
|
10
10
|
export interface SupportPlugin {
|
|
11
11
|
id: string;
|
|
12
12
|
moduleName: string;
|
|
13
|
-
setupFn: string;
|
|
13
|
+
setupFn: string | string[];
|
|
14
14
|
importStoriesPrepend?: string;
|
|
15
15
|
importStoryComponent: (file: ServerStoryFile, index: number) => string;
|
|
16
16
|
}
|
package/dist/types/story.d.ts
CHANGED
|
@@ -36,6 +36,10 @@ export interface StoryProps extends CommonProps, InheritedProps {
|
|
|
36
36
|
layout?: StoryLayout;
|
|
37
37
|
docsOnly?: boolean;
|
|
38
38
|
}
|
|
39
|
+
export interface CommonMeta {
|
|
40
|
+
}
|
|
41
|
+
export interface StoryMeta extends CommonMeta {
|
|
42
|
+
}
|
|
39
43
|
export interface Story {
|
|
40
44
|
id: string;
|
|
41
45
|
title: string;
|
|
@@ -48,7 +52,9 @@ export interface Story {
|
|
|
48
52
|
file?: StoryFile;
|
|
49
53
|
lastSelectedVariant?: Variant;
|
|
50
54
|
slots?: () => any;
|
|
51
|
-
meta?:
|
|
55
|
+
meta?: StoryMeta;
|
|
56
|
+
}
|
|
57
|
+
export interface VariantMeta extends CommonMeta {
|
|
52
58
|
}
|
|
53
59
|
export interface Variant {
|
|
54
60
|
id: string;
|
|
@@ -67,7 +73,7 @@ export interface Variant {
|
|
|
67
73
|
autoPropsDisabled?: boolean;
|
|
68
74
|
configReady?: boolean;
|
|
69
75
|
previewReady?: boolean;
|
|
70
|
-
meta?:
|
|
76
|
+
meta?: VariantMeta;
|
|
71
77
|
}
|
|
72
78
|
export interface PropDefinition {
|
|
73
79
|
name: string;
|
|
@@ -146,12 +152,14 @@ export interface ServerStory {
|
|
|
146
152
|
iconColor?: string;
|
|
147
153
|
docsOnly?: boolean;
|
|
148
154
|
docsText?: string;
|
|
155
|
+
meta?: StoryMeta;
|
|
149
156
|
}
|
|
150
157
|
export interface ServerVariant {
|
|
151
158
|
id: string;
|
|
152
159
|
title: string;
|
|
153
160
|
icon?: string;
|
|
154
161
|
iconColor?: string;
|
|
162
|
+
meta?: VariantMeta;
|
|
155
163
|
}
|
|
156
164
|
export interface ServerTreeFile {
|
|
157
165
|
title: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@histoire/shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Shared utilities for Histoire",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"chokidar": "^3.5.3",
|
|
31
31
|
"pathe": "^0.2.0",
|
|
32
32
|
"picocolors": "^1.0.0",
|
|
33
|
-
"@histoire/vendors": "^0.
|
|
33
|
+
"@histoire/vendors": "^0.17.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"vite": "^2.9.0 || ^3.0.0 || ^4.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"typescript": "^4.9.5",
|
|
40
|
-
"vite": "^4.4.
|
|
40
|
+
"vite": "^4.4.9"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "rimraf dist && tsc -d",
|
package/src/types/plugin.ts
CHANGED
|
@@ -20,7 +20,7 @@ import type { Awaitable } from '../type-utils.js'
|
|
|
20
20
|
export interface SupportPlugin {
|
|
21
21
|
id: string
|
|
22
22
|
moduleName: string
|
|
23
|
-
setupFn: string
|
|
23
|
+
setupFn: string | string[]
|
|
24
24
|
importStoriesPrepend?: string
|
|
25
25
|
importStoryComponent: (file: ServerStoryFile, index: number) => string
|
|
26
26
|
}
|
package/src/types/story.ts
CHANGED
|
@@ -41,6 +41,10 @@ export interface StoryProps extends CommonProps, InheritedProps {
|
|
|
41
41
|
docsOnly?: boolean
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
export interface CommonMeta {}
|
|
45
|
+
|
|
46
|
+
export interface StoryMeta extends CommonMeta {}
|
|
47
|
+
|
|
44
48
|
export interface Story {
|
|
45
49
|
id: string
|
|
46
50
|
title: string
|
|
@@ -53,9 +57,11 @@ export interface Story {
|
|
|
53
57
|
file?: StoryFile
|
|
54
58
|
lastSelectedVariant?: Variant
|
|
55
59
|
slots?: () => any
|
|
56
|
-
meta?:
|
|
60
|
+
meta?: StoryMeta
|
|
57
61
|
}
|
|
58
62
|
|
|
63
|
+
export interface VariantMeta extends CommonMeta {}
|
|
64
|
+
|
|
59
65
|
export interface Variant {
|
|
60
66
|
id: string
|
|
61
67
|
title: string
|
|
@@ -69,7 +75,7 @@ export interface Variant {
|
|
|
69
75
|
autoPropsDisabled?: boolean
|
|
70
76
|
configReady?: boolean
|
|
71
77
|
previewReady?: boolean
|
|
72
|
-
meta?:
|
|
78
|
+
meta?: VariantMeta
|
|
73
79
|
}
|
|
74
80
|
|
|
75
81
|
export interface PropDefinition {
|
|
@@ -155,6 +161,7 @@ export interface ServerStory {
|
|
|
155
161
|
iconColor?: string
|
|
156
162
|
docsOnly?: boolean
|
|
157
163
|
docsText?: string
|
|
164
|
+
meta?: StoryMeta
|
|
158
165
|
}
|
|
159
166
|
|
|
160
167
|
export interface ServerVariant {
|
|
@@ -162,6 +169,7 @@ export interface ServerVariant {
|
|
|
162
169
|
title: string
|
|
163
170
|
icon?: string
|
|
164
171
|
iconColor?: string
|
|
172
|
+
meta?: VariantMeta
|
|
165
173
|
}
|
|
166
174
|
|
|
167
175
|
export interface ServerTreeFile {
|