@storybook/csf 0.1.12-next.0 β 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +234 -0
- package/dist/index.d.ts +23 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -2
package/CHANGELOG.md
ADDED
@@ -0,0 +1,234 @@
|
|
1
|
+
# v0.1.12 (Fri Nov 29 2024)
|
2
|
+
|
3
|
+
#### π Bug Fix
|
4
|
+
|
5
|
+
- Add ReportingAPI interface and reporting property to StoryContext [#110](https://github.com/ComponentDriven/csf/pull/110) ([@valentinpalkovic](https://github.com/valentinpalkovic) [@kasperpeulen](https://github.com/kasperpeulen))
|
6
|
+
- Update links to Storybook documentation [#77](https://github.com/ComponentDriven/csf/pull/77) ([@nkabrown](https://github.com/nkabrown))
|
7
|
+
|
8
|
+
#### Authors: 4
|
9
|
+
|
10
|
+
- Kasper Peulen ([@kasperpeulen](https://github.com/kasperpeulen))
|
11
|
+
- Nathan Brown ([@nkabrown](https://github.com/nkabrown))
|
12
|
+
- Norbert de Langen ([@ndelangen](https://github.com/ndelangen))
|
13
|
+
- Valentin Palkovic ([@valentinpalkovic](https://github.com/valentinpalkovic))
|
14
|
+
|
15
|
+
---
|
16
|
+
|
17
|
+
# v0.1.11 (Tue Jul 02 2024)
|
18
|
+
|
19
|
+
#### π Bug Fix
|
20
|
+
|
21
|
+
- Add mount to CSF [#100](https://github.com/ComponentDriven/csf/pull/100) ([@kasperpeulen](https://github.com/kasperpeulen))
|
22
|
+
|
23
|
+
#### Authors: 1
|
24
|
+
|
25
|
+
- Kasper Peulen ([@kasperpeulen](https://github.com/kasperpeulen))
|
26
|
+
|
27
|
+
---
|
28
|
+
|
29
|
+
# v0.1.10 (Tue Jul 02 2024)
|
30
|
+
|
31
|
+
#### π Bug Fix
|
32
|
+
|
33
|
+
- Consolidate loader, play and render context and add a self referencing context property [#98](https://github.com/ComponentDriven/csf/pull/98) ([@kasperpeulen](https://github.com/kasperpeulen))
|
34
|
+
- Add canvas prop to the context [#99](https://github.com/ComponentDriven/csf/pull/99) ([@kasperpeulen](https://github.com/kasperpeulen))
|
35
|
+
|
36
|
+
#### Authors: 1
|
37
|
+
|
38
|
+
- Kasper Peulen ([@kasperpeulen](https://github.com/kasperpeulen))
|
39
|
+
|
40
|
+
---
|
41
|
+
|
42
|
+
# v0.1.9 (Mon Jun 24 2024)
|
43
|
+
|
44
|
+
#### π Bug Fix
|
45
|
+
|
46
|
+
- Add `beforeAll` hook to CSF types [#96](https://github.com/ComponentDriven/csf/pull/96) ([@ghengeveld](https://github.com/ghengeveld))
|
47
|
+
|
48
|
+
#### Authors: 2
|
49
|
+
|
50
|
+
- Gert Hengeveld ([@ghengeveld](https://github.com/ghengeveld))
|
51
|
+
- Michael Shilman ([@shilman](https://github.com/shilman))
|
52
|
+
|
53
|
+
---
|
54
|
+
|
55
|
+
# v0.1.8 (Mon Jun 03 2024)
|
56
|
+
|
57
|
+
#### π Bug Fix
|
58
|
+
|
59
|
+
- Add project initialGlobals & component/story globals, deprecate project globals [#92](https://github.com/ComponentDriven/csf/pull/92) ([@shilman](https://github.com/shilman))
|
60
|
+
|
61
|
+
#### Authors: 1
|
62
|
+
|
63
|
+
- Michael Shilman ([@shilman](https://github.com/shilman))
|
64
|
+
|
65
|
+
---
|
66
|
+
|
67
|
+
# v0.1.7 (Mon May 06 2024)
|
68
|
+
|
69
|
+
#### π Bug Fix
|
70
|
+
|
71
|
+
- Fix the package name in the readme [#81](https://github.com/ComponentDriven/csf/pull/81) ([@stof](https://github.com/stof))
|
72
|
+
- Add utility for tag combination & negation [#80](https://github.com/ComponentDriven/csf/pull/80) ([@shilman](https://github.com/shilman))
|
73
|
+
|
74
|
+
#### Authors: 2
|
75
|
+
|
76
|
+
- Christophe Coevoet ([@stof](https://github.com/stof))
|
77
|
+
- Michael Shilman ([@shilman](https://github.com/shilman))
|
78
|
+
|
79
|
+
---
|
80
|
+
|
81
|
+
# v0.1.6 (Tue Apr 30 2024)
|
82
|
+
|
83
|
+
#### π Bug Fix
|
84
|
+
|
85
|
+
- Add the beforeEach hook [#82](https://github.com/ComponentDriven/csf/pull/82) ([@kasperpeulen](https://github.com/kasperpeulen))
|
86
|
+
|
87
|
+
#### Authors: 1
|
88
|
+
|
89
|
+
- Kasper Peulen ([@kasperpeulen](https://github.com/kasperpeulen))
|
90
|
+
|
91
|
+
---
|
92
|
+
|
93
|
+
# v0.1.5 (Thu Apr 25 2024)
|
94
|
+
|
95
|
+
#### π Bug Fix
|
96
|
+
|
97
|
+
- chore: resolve eslint issues [#87](https://github.com/ComponentDriven/csf/pull/87) ([@Cherry](https://github.com/Cherry))
|
98
|
+
- fix: better handle readonly InputType options [#85](https://github.com/ComponentDriven/csf/pull/85) ([@Cherry](https://github.com/Cherry))
|
99
|
+
|
100
|
+
#### Authors: 2
|
101
|
+
|
102
|
+
- James Ross ([@Cherry](https://github.com/Cherry))
|
103
|
+
- Kasper Peulen ([@kasperpeulen](https://github.com/kasperpeulen))
|
104
|
+
|
105
|
+
---
|
106
|
+
|
107
|
+
# v0.1.4 (Fri Apr 12 2024)
|
108
|
+
|
109
|
+
#### π Bug Fix
|
110
|
+
|
111
|
+
- Loosen control type and some fixes [#83](https://github.com/ComponentDriven/csf/pull/83) ([@kasperpeulen](https://github.com/kasperpeulen))
|
112
|
+
|
113
|
+
#### Authors: 1
|
114
|
+
|
115
|
+
- Kasper Peulen ([@kasperpeulen](https://github.com/kasperpeulen))
|
116
|
+
|
117
|
+
---
|
118
|
+
|
119
|
+
# v0.1.3 (Mon Mar 18 2024)
|
120
|
+
|
121
|
+
#### π Bug Fix
|
122
|
+
|
123
|
+
- Fix bad publish [#78](https://github.com/ComponentDriven/csf/pull/78) ([@shilman](https://github.com/shilman))
|
124
|
+
- Improve InputType for controls [#75](https://github.com/ComponentDriven/csf/pull/75) ([@Shinigami92](https://github.com/Shinigami92) [@shilman](https://github.com/shilman))
|
125
|
+
- Update README [#74](https://github.com/ComponentDriven/csf/pull/74) ([@nkabrown](https://github.com/nkabrown))
|
126
|
+
|
127
|
+
#### Authors: 4
|
128
|
+
|
129
|
+
- Kasper Peulen ([@kasperpeulen](https://github.com/kasperpeulen))
|
130
|
+
- Michael Shilman ([@shilman](https://github.com/shilman))
|
131
|
+
- Nathan Brown ([@nkabrown](https://github.com/nkabrown))
|
132
|
+
- Shinigami ([@Shinigami92](https://github.com/Shinigami92))
|
133
|
+
|
134
|
+
---
|
135
|
+
|
136
|
+
# v0.1.2 (Wed Nov 22 2023)
|
137
|
+
|
138
|
+
#### π Bug Fix
|
139
|
+
|
140
|
+
- Allow loaders to be synchronous or void [#71](https://github.com/ComponentDriven/csf/pull/71) ([@kasperpeulen](https://github.com/kasperpeulen))
|
141
|
+
- Move `types` condition to the front [#69](https://github.com/ComponentDriven/csf/pull/69) ([@Andarist](https://github.com/Andarist))
|
142
|
+
|
143
|
+
#### Authors: 2
|
144
|
+
|
145
|
+
- Kasper Peulen ([@kasperpeulen](https://github.com/kasperpeulen))
|
146
|
+
- Mateusz BurzyΕski ([@Andarist](https://github.com/Andarist))
|
147
|
+
|
148
|
+
---
|
149
|
+
|
150
|
+
# v0.1.1 (Fri Jun 02 2023)
|
151
|
+
|
152
|
+
#### π Bug Fix
|
153
|
+
|
154
|
+
- Move `types` condition to the front [#70](https://github.com/ComponentDriven/csf/pull/70) ([@Andarist](https://github.com/Andarist))
|
155
|
+
|
156
|
+
#### Authors: 1
|
157
|
+
|
158
|
+
- Mateusz BurzyΕski ([@Andarist](https://github.com/Andarist))
|
159
|
+
|
160
|
+
---
|
161
|
+
|
162
|
+
# v0.1.0 (Mon Apr 03 2023)
|
163
|
+
|
164
|
+
#### π Enhancement
|
165
|
+
|
166
|
+
|
167
|
+
#### π Bug Fix
|
168
|
+
|
169
|
+
- Turn Args interfaces into types when passed to decorators [#65](https://github.com/ComponentDriven/csf/pull/65) ([@kasperpeulen](https://github.com/kasperpeulen))
|
170
|
+
- Improve the startcase implementation to mimick lodash's version more closely [#64](https://github.com/ComponentDriven/csf/pull/64) ([@ndelangen](https://github.com/ndelangen))
|
171
|
+
- replace lodash [#62](https://github.com/ComponentDriven/csf/pull/62) ([@ndelangen](https://github.com/ndelangen))
|
172
|
+
- Fix bug with meta not working well as generic parameter for StoryObj [#60](https://github.com/ComponentDriven/csf/pull/60) ([@kasperpeulen](https://github.com/kasperpeulen))
|
173
|
+
- Make sure that index signatures (used in decorators) don't cause unexpected types [#58](https://github.com/ComponentDriven/csf/pull/58) ([@kasperpeulen](https://github.com/kasperpeulen))
|
174
|
+
- Add strict variants for Args and Paramters to CSF [#57](https://github.com/ComponentDriven/csf/pull/57) ([@kasperpeulen](https://github.com/kasperpeulen))
|
175
|
+
- Revert stricter parameters [#56](https://github.com/ComponentDriven/csf/pull/56) ([@kasperpeulen](https://github.com/kasperpeulen))
|
176
|
+
- Use builtin installation of actions/setup-node [#55](https://github.com/ComponentDriven/csf/pull/55) ([@kasperpeulen](https://github.com/kasperpeulen))
|
177
|
+
- Rename Framework to Renderer [#54](https://github.com/ComponentDriven/csf/pull/54) ([@kasperpeulen](https://github.com/kasperpeulen))
|
178
|
+
- Rework Framework type to contain `canvasElement` [#53](https://github.com/ComponentDriven/csf/pull/53) ([@tmeasday](https://github.com/tmeasday))
|
179
|
+
- Add tags annotation at all levels [#52](https://github.com/ComponentDriven/csf/pull/52) ([@tmeasday](https://github.com/tmeasday))
|
180
|
+
- First attempt at bringing new types over [#29](https://github.com/ComponentDriven/csf/pull/29) ([@tmeasday](https://github.com/tmeasday) [@shilman](https://github.com/shilman) [@ghengeveld](https://github.com/ghengeveld) [@wKich](https://github.com/wKich) [@kasperpeulen](https://github.com/kasperpeulen))
|
181
|
+
- Revert "Play function can only be set at the story level" [#40](https://github.com/ComponentDriven/csf/pull/40) ([@wKich](https://github.com/wKich) [@shilman](https://github.com/shilman))
|
182
|
+
- Add conditional arg types and metadata [#36](https://github.com/ComponentDriven/csf/pull/36) ([@shilman](https://github.com/shilman) [@tmeasday](https://github.com/tmeasday) [@kasperpeulen](https://github.com/kasperpeulen))
|
183
|
+
- Re-apply `TArgs` to CSF `render` type [#43](https://github.com/ComponentDriven/csf/pull/43) ([@tmeasday](https://github.com/tmeasday) [@shilman](https://github.com/shilman) [@kasperpeulen](https://github.com/kasperpeulen))
|
184
|
+
- Add step to play context and `runStep` to project annotations [#48](https://github.com/ComponentDriven/csf/pull/48) ([@tmeasday](https://github.com/tmeasday) [@shilman](https://github.com/shilman) [@kasperpeulen](https://github.com/kasperpeulen))
|
185
|
+
- Sound arg types for CSF3 [#49](https://github.com/ComponentDriven/csf/pull/49) ([@kasperpeulen](https://github.com/kasperpeulen) [@shilman](https://github.com/shilman))
|
186
|
+
- ArgsFromMeta utility and generic ArgsStoryFn RT [#51](https://github.com/ComponentDriven/csf/pull/51) ([@kasperpeulen](https://github.com/kasperpeulen))
|
187
|
+
- Configure Auto [#50](https://github.com/ComponentDriven/csf/pull/50) ([@shilman](https://github.com/shilman))
|
188
|
+
- Only make `TArgs` parameterize `args` and `argTypes` in our default annotations [#33](https://github.com/ComponentDriven/csf/pull/33) ([@tmeasday](https://github.com/tmeasday))
|
189
|
+
- Adding Components.studio as a tool using CSF [#13](https://github.com/ComponentDriven/csf/pull/13) ([@georges-gomes](https://github.com/georges-gomes) [@ghengeveld](https://github.com/ghengeveld))
|
190
|
+
- Makes name argument for 'toId' optional [#17](https://github.com/ComponentDriven/csf/pull/17) ([@unematiii](https://github.com/unematiii) [@ghengeveld](https://github.com/ghengeveld))
|
191
|
+
- use permanent url for the header image [#12](https://github.com/ComponentDriven/csf/pull/12) ([@winkerVSbecks](https://github.com/winkerVSbecks))
|
192
|
+
- fix link to image [#10](https://github.com/ComponentDriven/csf/pull/10) ([@winkerVSbecks](https://github.com/winkerVSbecks))
|
193
|
+
- Publish under @componentdriven and update README [#8](https://github.com/ComponentDriven/csf/pull/8) ([@winkerVSbecks](https://github.com/winkerVSbecks))
|
194
|
+
- Add meta types for CSF [#5](https://github.com/ComponentDriven/csf/pull/5) ([@wKich](https://github.com/wKich))
|
195
|
+
- types of csf properties [#3](https://github.com/ComponentDriven/csf/pull/3) ([@atanasster](https://github.com/atanasster) [@ndelangen](https://github.com/ndelangen))
|
196
|
+
- Extract @storybook/csf from monorepo [#1](https://github.com/ComponentDriven/csf/pull/1) ([@shilman](https://github.com/shilman))
|
197
|
+
|
198
|
+
#### β οΈ Pushed to `master`
|
199
|
+
|
200
|
+
- First commit ([@shilman](https://github.com/shilman))
|
201
|
+
|
202
|
+
#### π Documentation
|
203
|
+
|
204
|
+
- added storyNameFromExport(key) in README.md [#2](https://github.com/ComponentDriven/csf/pull/2) ([@georges-gomes](https://github.com/georges-gomes) [@shilman](https://github.com/shilman))
|
205
|
+
|
206
|
+
#### π© Dependency Updates
|
207
|
+
|
208
|
+
- Bump handlebars from 4.5.3 to 4.7.7 [#20](https://github.com/ComponentDriven/csf/pull/20) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
209
|
+
- Bump y18n from 4.0.0 to 4.0.3 [#32](https://github.com/ComponentDriven/csf/pull/32) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
210
|
+
- Bump ini from 1.3.5 to 1.3.8 [#18](https://github.com/ComponentDriven/csf/pull/18) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
211
|
+
- Bump yargs-parser from 13.1.1 to 13.1.2 [#15](https://github.com/ComponentDriven/csf/pull/15) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
212
|
+
- Bump lodash from 4.17.15 to 4.17.21 [#21](https://github.com/ComponentDriven/csf/pull/21) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
213
|
+
- Bump hosted-git-info from 2.8.5 to 2.8.9 [#22](https://github.com/ComponentDriven/csf/pull/22) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
214
|
+
- Bump path-parse from 1.0.6 to 1.0.7 [#25](https://github.com/ComponentDriven/csf/pull/25) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
215
|
+
- Bump browserslist from 4.11.1 to 4.16.6 [#23](https://github.com/ComponentDriven/csf/pull/23) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
216
|
+
- Bump acorn from 5.7.3 to 5.7.4 [#27](https://github.com/ComponentDriven/csf/pull/27) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
217
|
+
- Bump ws from 5.2.2 to 5.2.3 [#28](https://github.com/ComponentDriven/csf/pull/28) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
218
|
+
- Bump tar from 4.4.13 to 4.4.19 [#30](https://github.com/ComponentDriven/csf/pull/30) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
219
|
+
- Bump tmpl from 1.0.4 to 1.0.5 [#31](https://github.com/ComponentDriven/csf/pull/31) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
220
|
+
|
221
|
+
#### Authors: 12
|
222
|
+
|
223
|
+
- [@dependabot[bot]](https://github.com/dependabot[bot])
|
224
|
+
- Atanas Stoyanov ([@atanasster](https://github.com/atanasster))
|
225
|
+
- Dmitriy Lazarev ([@wKich](https://github.com/wKich))
|
226
|
+
- Dominic Nguyen ([@domyen](https://github.com/domyen))
|
227
|
+
- Georges Gomes ([@georges-gomes](https://github.com/georges-gomes))
|
228
|
+
- Gert Hengeveld ([@ghengeveld](https://github.com/ghengeveld))
|
229
|
+
- Kasper Peulen ([@kasperpeulen](https://github.com/kasperpeulen))
|
230
|
+
- Mati KΓ€rner ([@unematiii](https://github.com/unematiii))
|
231
|
+
- Michael Shilman ([@shilman](https://github.com/shilman))
|
232
|
+
- Norbert de Langen ([@ndelangen](https://github.com/ndelangen))
|
233
|
+
- Tom Coleman ([@tmeasday](https://github.com/tmeasday))
|
234
|
+
- Varun Vachhar ([@winkerVSbecks](https://github.com/winkerVSbecks))
|
package/dist/index.d.ts
CHANGED
@@ -81,6 +81,16 @@ interface ControlBase {
|
|
81
81
|
type?: ControlType;
|
82
82
|
disable?: boolean;
|
83
83
|
}
|
84
|
+
interface Report {
|
85
|
+
type: string;
|
86
|
+
version?: number;
|
87
|
+
result: unknown;
|
88
|
+
status: 'failed' | 'passed' | 'warning';
|
89
|
+
}
|
90
|
+
interface ReportingAPI {
|
91
|
+
reports: Report[];
|
92
|
+
addReport: (report: Report) => void;
|
93
|
+
}
|
84
94
|
type Control = ControlType | false | (ControlBase & (ControlBase | {
|
85
95
|
type: 'color';
|
86
96
|
/**
|
@@ -253,6 +263,7 @@ type Awaitable<T> = T | PromiseLike<T>;
|
|
253
263
|
type CleanupCallback = () => Awaitable<unknown>;
|
254
264
|
type BeforeAll = () => Awaitable<CleanupCallback | void>;
|
255
265
|
type BeforeEach<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: StoryContext<TRenderer, TArgs>) => Awaitable<CleanupCallback | void>;
|
266
|
+
type AfterEach<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: StoryContext<TRenderer, TArgs>) => Awaitable<void>;
|
256
267
|
interface Canvas {
|
257
268
|
}
|
258
269
|
interface StoryContext<TRenderer extends Renderer = Renderer, TArgs = Args> extends StoryContextForEnhancers<TRenderer, TArgs>, Required<StoryContextUpdate<TArgs>> {
|
@@ -266,6 +277,7 @@ interface StoryContext<TRenderer extends Renderer = Renderer, TArgs = Args> exte
|
|
266
277
|
context: this;
|
267
278
|
canvas: Canvas;
|
268
279
|
mount: TRenderer['mount'];
|
280
|
+
reporting: ReportingAPI;
|
269
281
|
}
|
270
282
|
/** @deprecated Use {@link StoryContext} instead. */
|
271
283
|
interface StoryContextForLoaders<TRenderer extends Renderer = Renderer, TArgs = Args> extends StoryContext<TRenderer, TArgs> {
|
@@ -322,6 +334,16 @@ interface BaseAnnotations<TRenderer extends Renderer = Renderer, TArgs = Args> {
|
|
322
334
|
* A cleanup function can be returned.
|
323
335
|
*/
|
324
336
|
beforeEach?: BeforeEach<TRenderer, TArgs>[] | BeforeEach<TRenderer, TArgs>;
|
337
|
+
/**
|
338
|
+
* Function to be called after each play function for post-test assertions.
|
339
|
+
* Don't use this function for cleaning up state.
|
340
|
+
* You can use the return callback of `beforeEach` for that, which is run when switching stories.
|
341
|
+
* When the function is async, it will be awaited.
|
342
|
+
*
|
343
|
+
* `afterEach` can be added to preview, the default export and to a specific story.
|
344
|
+
* They are run (and awaited) reverse order: preview, default export, story
|
345
|
+
*/
|
346
|
+
experimental_afterEach?: AfterEach<TRenderer, TArgs>[] | AfterEach<TRenderer, TArgs>;
|
325
347
|
/**
|
326
348
|
* Define a custom render function for the story(ies). If not passed, a default render function by the renderer will be used.
|
327
349
|
*/
|
@@ -514,4 +536,4 @@ declare const parseKind: (kind: string, { rootSeparator, groupSeparator }: Separ
|
|
514
536
|
*/
|
515
537
|
declare const combineTags: (...tags: string[]) => string[];
|
516
538
|
|
517
|
-
export { AnnotatedStoryFn, AnyFramework, ArgTypes, ArgTypesEnhancer, Args, ArgsEnhancer, ArgsFromMeta, ArgsStoryFn, BaseAnnotations, BeforeAll, BeforeEach, Canvas, CleanupCallback, ComponentAnnotations, ComponentId, ComponentTitle, Conditional, DecoratorApplicator, DecoratorFunction, GlobalTypes, Globals, IncludeExcludeOptions, InputType, LegacyAnnotatedStoryFn, LegacyStoryAnnotationsOrFn, LegacyStoryFn, LoaderFunction, Parameters, PartialStoryFn, PlayFunction, PlayFunctionContext, ProjectAnnotations, Renderer, SBArrayType, SBEnumType, SBIntersectionType, SBObjectType, SBOtherType, SBScalarType, SBType, SBUnionType, SeparatorOptions, StepFunction, StepLabel, StepRunner, StoryAnnotations, StoryAnnotationsOrFn, StoryContext, StoryContextForEnhancers, StoryContextForLoaders, StoryContextUpdate, StoryFn, StoryId, StoryIdentifier, StoryKind, StoryName, StrictArgTypes, StrictArgs, StrictGlobalTypes, StrictInputType, StrictParameters, Tag, ViewMode, combineTags, includeConditionalArg, isExportStory, parseKind, sanitize, storyNameFromExport, toId };
|
539
|
+
export { AfterEach, AnnotatedStoryFn, AnyFramework, ArgTypes, ArgTypesEnhancer, Args, ArgsEnhancer, ArgsFromMeta, ArgsStoryFn, BaseAnnotations, BeforeAll, BeforeEach, Canvas, CleanupCallback, ComponentAnnotations, ComponentId, ComponentTitle, Conditional, DecoratorApplicator, DecoratorFunction, GlobalTypes, Globals, IncludeExcludeOptions, InputType, LegacyAnnotatedStoryFn, LegacyStoryAnnotationsOrFn, LegacyStoryFn, LoaderFunction, Parameters, PartialStoryFn, PlayFunction, PlayFunctionContext, ProjectAnnotations, Renderer, SBArrayType, SBEnumType, SBIntersectionType, SBObjectType, SBOtherType, SBScalarType, SBType, SBUnionType, SeparatorOptions, StepFunction, StepLabel, StepRunner, StoryAnnotations, StoryAnnotationsOrFn, StoryContext, StoryContextForEnhancers, StoryContextForLoaders, StoryContextUpdate, StoryFn, StoryId, StoryIdentifier, StoryKind, StoryName, StrictArgTypes, StrictArgs, StrictGlobalTypes, StrictInputType, StrictParameters, Tag, ViewMode, combineTags, includeConditionalArg, isExportStory, parseKind, sanitize, storyNameFromExport, toId };
|
package/dist/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var C=Object.create;var u=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var
|
3
|
+
var C=Object.create;var u=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var E=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var v=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of F(e))!w.call(r,a)&&a!==n&&u(r,a,{get:()=>e[a],enumerable:!(t=B(e,a))||t.enumerable});return r};var I=(r,e,n)=>(n=r!=null?C(h(r)):{},v(e||!r||!r.__esModule?u(n,"default",{value:r,enumerable:!0}):n,r));var x=E(T=>{Object.defineProperty(T,"__esModule",{value:!0}),T.isEqual=function(){var r=Object.prototype.toString,e=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}:Object.keys;return function(t,a){return function i(o,s,p){var g,y,d,c=r.call(o),b=r.call(s);if(o===s)return !0;if(o==null||s==null)return !1;if(p.indexOf(o)>-1&&p.indexOf(s)>-1)return !0;if(p.push(o,s),c!=b||(g=n(o),y=n(s),g.length!=y.length||g.some(function(A){return !i(o[A],s[A],p)})))return !1;switch(c.slice(8,-1)){case"Symbol":return o.valueOf()==s.valueOf();case"Date":case"Number":return +o==+s||+o!=+o&&+s!=+s;case"RegExp":case"Function":case"String":case"Boolean":return ""+o==""+s;case"Set":case"Map":g=o.entries(),y=s.entries();do if(!i((d=g.next()).value,y.next().value,p))return !1;while(!d.done);return !0;case"ArrayBuffer":o=new Uint8Array(o),s=new Uint8Array(s);case"DataView":o=new Uint8Array(o.buffer),s=new Uint8Array(s.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(o.length!=s.length)return !1;for(d=0;d<o.length;d++)if((d in o||d in s)&&(d in o!=d in s||!i(o[d],s[d],p)))return !1;return !0;case"Object":return i(e(o),e(s),p);default:return !1}}(t,a,[])}}();});function R(r){return r.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(e,n,t,a)=>`${n} ${t}${a}`).replace(/([a-z])([A-Z])/g,(e,n,t)=>`${n} ${t}`).replace(/([a-z])([0-9])/gi,(e,n,t)=>`${n} ${t}`).replace(/([0-9])([a-z])/gi,(e,n,t)=>`${n} ${t}`).replace(/(\s|^)(\w)/g,(e,n,t)=>`${n}${t.toUpperCase()}`).replace(/ +/g," ").trim()}var l=I(x()),S=r=>r.map(e=>typeof e<"u").filter(Boolean).length,k=(r,e)=>{let{exists:n,eq:t,neq:a,truthy:i}=r;if(S([n,t,a,i])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:t,neq:a})}`);if(typeof t<"u")return (0, l.isEqual)(e,t);if(typeof a<"u")return !(0, l.isEqual)(e,a);if(typeof n<"u"){let s=typeof e<"u";return n?s:!s}return (typeof i>"u"?!0:i)?!!e:!e},P=(r,e,n)=>{if(!r.if)return !0;let{arg:t,global:a}=r.if;if(S([t,a])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:t,global:a})}`);let i=t?e[t]:n[a];return k(r.if,i)};var O=r=>r.toLowerCase().replace(/[ βββββ²ΒΏ'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),f=(r,e)=>{let n=O(r);if(n==="")throw new Error(`Invalid ${e} '${r}', must include alphanumeric characters`);return n},G=(r,e)=>`${f(r,"kind")}${e?`--${f(e,"name")}`:""}`,N=r=>R(r);function m(r,e){return Array.isArray(e)?e.includes(r):r.match(e)}function M(r,{includeStories:e,excludeStories:n}){return r!=="__esModule"&&(!e||m(r,e))&&(!n||!m(r,n))}var V=(r,{rootSeparator:e,groupSeparator:n})=>{let[t,a]=r.split(e,2),i=(a||r).split(n).filter(o=>!!o);return {root:a?t:null,groups:i}},z=(...r)=>{let e=r.reduce((n,t)=>(t.startsWith("!")?n.delete(t.slice(1)):n.add(t),n),new Set);return Array.from(e)};
|
4
4
|
|
5
5
|
exports.combineTags = z;
|
6
6
|
exports.includeConditionalArg = P;
|
package/dist/index.mjs
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
var C=Object.create;var u=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var
|
1
|
+
var C=Object.create;var u=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var E=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var v=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of F(e))!w.call(r,a)&&a!==n&&u(r,a,{get:()=>e[a],enumerable:!(t=B(e,a))||t.enumerable});return r};var I=(r,e,n)=>(n=r!=null?C(h(r)):{},v(e||!r||!r.__esModule?u(n,"default",{value:r,enumerable:!0}):n,r));var x=E(T=>{Object.defineProperty(T,"__esModule",{value:!0}),T.isEqual=function(){var r=Object.prototype.toString,e=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}:Object.keys;return function(t,a){return function i(o,s,p){var g,y,d,c=r.call(o),b=r.call(s);if(o===s)return !0;if(o==null||s==null)return !1;if(p.indexOf(o)>-1&&p.indexOf(s)>-1)return !0;if(p.push(o,s),c!=b||(g=n(o),y=n(s),g.length!=y.length||g.some(function(A){return !i(o[A],s[A],p)})))return !1;switch(c.slice(8,-1)){case"Symbol":return o.valueOf()==s.valueOf();case"Date":case"Number":return +o==+s||+o!=+o&&+s!=+s;case"RegExp":case"Function":case"String":case"Boolean":return ""+o==""+s;case"Set":case"Map":g=o.entries(),y=s.entries();do if(!i((d=g.next()).value,y.next().value,p))return !1;while(!d.done);return !0;case"ArrayBuffer":o=new Uint8Array(o),s=new Uint8Array(s);case"DataView":o=new Uint8Array(o.buffer),s=new Uint8Array(s.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(o.length!=s.length)return !1;for(d=0;d<o.length;d++)if((d in o||d in s)&&(d in o!=d in s||!i(o[d],s[d],p)))return !1;return !0;case"Object":return i(e(o),e(s),p);default:return !1}}(t,a,[])}}();});function R(r){return r.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(e,n,t,a)=>`${n} ${t}${a}`).replace(/([a-z])([A-Z])/g,(e,n,t)=>`${n} ${t}`).replace(/([a-z])([0-9])/gi,(e,n,t)=>`${n} ${t}`).replace(/([0-9])([a-z])/gi,(e,n,t)=>`${n} ${t}`).replace(/(\s|^)(\w)/g,(e,n,t)=>`${n}${t.toUpperCase()}`).replace(/ +/g," ").trim()}var l=I(x()),S=r=>r.map(e=>typeof e<"u").filter(Boolean).length,k=(r,e)=>{let{exists:n,eq:t,neq:a,truthy:i}=r;if(S([n,t,a,i])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:t,neq:a})}`);if(typeof t<"u")return (0, l.isEqual)(e,t);if(typeof a<"u")return !(0, l.isEqual)(e,a);if(typeof n<"u"){let s=typeof e<"u";return n?s:!s}return (typeof i>"u"?!0:i)?!!e:!e},P=(r,e,n)=>{if(!r.if)return !0;let{arg:t,global:a}=r.if;if(S([t,a])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:t,global:a})}`);let i=t?e[t]:n[a];return k(r.if,i)};var O=r=>r.toLowerCase().replace(/[ βββββ²ΒΏ'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),f=(r,e)=>{let n=O(r);if(n==="")throw new Error(`Invalid ${e} '${r}', must include alphanumeric characters`);return n},G=(r,e)=>`${f(r,"kind")}${e?`--${f(e,"name")}`:""}`,N=r=>R(r);function m(r,e){return Array.isArray(e)?e.includes(r):r.match(e)}function M(r,{includeStories:e,excludeStories:n}){return r!=="__esModule"&&(!e||m(r,e))&&(!n||!m(r,n))}var V=(r,{rootSeparator:e,groupSeparator:n})=>{let[t,a]=r.split(e,2),i=(a||r).split(n).filter(o=>!!o);return {root:a?t:null,groups:i}},z=(...r)=>{let e=r.reduce((n,t)=>(t.startsWith("!")?n.delete(t.slice(1)):n.add(t),n),new Set);return Array.from(e)};
|
2
2
|
|
3
3
|
export { z as combineTags, P as includeConditionalArg, M as isExportStory, V as parseKind, O as sanitize, N as storyNameFromExport, G as toId };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/csf",
|
3
|
-
"version": "0.1.12
|
3
|
+
"version": "0.1.12",
|
4
4
|
"description": "Component Story Format (CSF) utilities",
|
5
5
|
"keywords": [
|
6
6
|
"storybook",
|
@@ -16,6 +16,7 @@
|
|
16
16
|
"type": "git",
|
17
17
|
"url": "https://github.com/ComponentDriven/csf.git"
|
18
18
|
},
|
19
|
+
"author": "Storybook Bot <storybookbot@gmail.com>",
|
19
20
|
"license": "MIT",
|
20
21
|
"exports": {
|
21
22
|
".": {
|
@@ -130,5 +131,6 @@
|
|
130
131
|
"npm",
|
131
132
|
"released"
|
132
133
|
]
|
133
|
-
}
|
134
|
+
},
|
135
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
134
136
|
}
|