@histoire/shared 0.8.3 → 0.9.1
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.d.ts +14 -1
- package/package.json +1 -1
- package/src/types.ts +18 -1
- package/tsconfig.json +0 -4
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface StoryFile {
|
|
2
2
|
id: string;
|
|
3
|
-
|
|
3
|
+
supportPluginId: string;
|
|
4
4
|
component: any;
|
|
5
5
|
story: Story;
|
|
6
6
|
path: string[];
|
|
@@ -60,6 +60,10 @@ export interface ServerStoryFile {
|
|
|
60
60
|
* File name without extension
|
|
61
61
|
*/
|
|
62
62
|
fileName: string;
|
|
63
|
+
/**
|
|
64
|
+
* Support plugin (Vue, Svelte, etc.)
|
|
65
|
+
*/
|
|
66
|
+
supportPluginId: string;
|
|
63
67
|
/**
|
|
64
68
|
* Generated path for tree UI
|
|
65
69
|
*/
|
|
@@ -123,3 +127,12 @@ export interface ServerRunPayload {
|
|
|
123
127
|
storyData: ServerStory[];
|
|
124
128
|
el: HTMLElement;
|
|
125
129
|
}
|
|
130
|
+
export interface SupportPlugin {
|
|
131
|
+
id: string;
|
|
132
|
+
moduleName: string;
|
|
133
|
+
setupFn: string;
|
|
134
|
+
importStoriesPrepend?: string;
|
|
135
|
+
importStoryComponent: (file: ServerStoryFile, index: number) => string;
|
|
136
|
+
}
|
|
137
|
+
export interface FinalSupportPlugin extends SupportPlugin {
|
|
138
|
+
}
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface StoryFile {
|
|
2
2
|
id: string
|
|
3
|
-
|
|
3
|
+
supportPluginId: string
|
|
4
4
|
component: any
|
|
5
5
|
story: Story
|
|
6
6
|
path: string[]
|
|
@@ -68,6 +68,10 @@ export interface ServerStoryFile {
|
|
|
68
68
|
* File name without extension
|
|
69
69
|
*/
|
|
70
70
|
fileName: string
|
|
71
|
+
/**
|
|
72
|
+
* Support plugin (Vue, Svelte, etc.)
|
|
73
|
+
*/
|
|
74
|
+
supportPluginId: string
|
|
71
75
|
/**
|
|
72
76
|
* Generated path for tree UI
|
|
73
77
|
*/
|
|
@@ -139,3 +143,16 @@ export interface ServerRunPayload {
|
|
|
139
143
|
storyData: ServerStory[]
|
|
140
144
|
el: HTMLElement
|
|
141
145
|
}
|
|
146
|
+
|
|
147
|
+
export interface SupportPlugin {
|
|
148
|
+
id: string
|
|
149
|
+
moduleName: string
|
|
150
|
+
setupFn: string
|
|
151
|
+
importStoriesPrepend?: string
|
|
152
|
+
importStoryComponent: (file: ServerStoryFile, index: number) => string
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
156
|
+
export interface FinalSupportPlugin extends SupportPlugin {
|
|
157
|
+
// For now, no additional properties
|
|
158
|
+
}
|