@storybook/csf 0.0.2-next.0 → 0.0.2-next.10

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/index.d.ts CHANGED
@@ -1,44 +1,45 @@
1
- import { Simplify, UnionToIntersection } from 'type-fest';
1
+ import { Simplify, RemoveIndexSignature, UnionToIntersection } from 'type-fest';
2
2
 
3
3
  interface SBBaseType {
4
4
  required?: boolean;
5
5
  raw?: string;
6
6
  }
7
- declare type SBScalarType = SBBaseType & {
7
+ type SBScalarType = SBBaseType & {
8
8
  name: 'boolean' | 'string' | 'number' | 'function' | 'symbol';
9
9
  };
10
- declare type SBArrayType = SBBaseType & {
10
+ type SBArrayType = SBBaseType & {
11
11
  name: 'array';
12
12
  value: SBType;
13
13
  };
14
- declare type SBObjectType = SBBaseType & {
14
+ type SBObjectType = SBBaseType & {
15
15
  name: 'object';
16
16
  value: Record<string, SBType>;
17
17
  };
18
- declare type SBEnumType = SBBaseType & {
18
+ type SBEnumType = SBBaseType & {
19
19
  name: 'enum';
20
20
  value: (string | number)[];
21
21
  };
22
- declare type SBIntersectionType = SBBaseType & {
22
+ type SBIntersectionType = SBBaseType & {
23
23
  name: 'intersection';
24
24
  value: SBType[];
25
25
  };
26
- declare type SBUnionType = SBBaseType & {
26
+ type SBUnionType = SBBaseType & {
27
27
  name: 'union';
28
28
  value: SBType[];
29
29
  };
30
- declare type SBOtherType = SBBaseType & {
30
+ type SBOtherType = SBBaseType & {
31
31
  name: 'other';
32
32
  value: string;
33
33
  };
34
- declare type SBType = SBScalarType | SBEnumType | SBArrayType | SBObjectType | SBIntersectionType | SBUnionType | SBOtherType;
34
+ type SBType = SBScalarType | SBEnumType | SBArrayType | SBObjectType | SBIntersectionType | SBUnionType | SBOtherType;
35
35
 
36
- declare type StoryId = string;
37
- declare type ComponentId = string;
38
- declare type ComponentTitle = string;
39
- declare type StoryName = string;
36
+ type StoryId = string;
37
+ type ComponentId = string;
38
+ type ComponentTitle = string;
39
+ type StoryName = string;
40
40
  /** @deprecated */
41
- declare type StoryKind = ComponentTitle;
41
+ type StoryKind = ComponentTitle;
42
+ type Tag = string;
42
43
  interface StoryIdentifier {
43
44
  componentId: ComponentId;
44
45
  title: ComponentTitle;
@@ -48,11 +49,15 @@ interface StoryIdentifier {
48
49
  name: StoryName;
49
50
  /** @deprecated */
50
51
  story: StoryName;
52
+ tags: Tag[];
51
53
  }
52
- declare type Parameters = {
54
+ interface Parameters {
53
55
  [name: string]: any;
54
- };
55
- declare type ConditionalTest = {
56
+ }
57
+ interface StrictParameters {
58
+ [name: string]: unknown;
59
+ }
60
+ type ConditionalTest = {
56
61
  truthy?: boolean;
57
62
  } | {
58
63
  exists: boolean;
@@ -61,12 +66,12 @@ declare type ConditionalTest = {
61
66
  } | {
62
67
  neq: any;
63
68
  };
64
- declare type ConditionalValue = {
69
+ type ConditionalValue = {
65
70
  arg: string;
66
71
  } | {
67
72
  global: string;
68
73
  };
69
- declare type Conditional = ConditionalValue & ConditionalTest;
74
+ type Conditional = ConditionalValue & ConditionalTest;
70
75
  interface InputType {
71
76
  name?: string;
72
77
  description?: string;
@@ -79,84 +84,93 @@ interface StrictInputType extends InputType {
79
84
  name: string;
80
85
  type?: SBType;
81
86
  }
82
- declare type Args = {
87
+ interface Args {
83
88
  [name: string]: any;
84
- };
85
- declare type ArgTypes<TArgs = Args> = {
89
+ }
90
+ interface StrictArgs {
91
+ [name: string]: unknown;
92
+ }
93
+ type ArgTypes<TArgs = Args> = {
86
94
  [name in keyof TArgs]: InputType;
87
95
  };
88
- declare type StrictArgTypes<TArgs = Args> = {
96
+ type StrictArgTypes<TArgs = Args> = {
89
97
  [name in keyof TArgs]: StrictInputType;
90
98
  };
91
- declare type Globals = {
99
+ type Globals = {
92
100
  [name: string]: any;
93
101
  };
94
- declare type GlobalTypes = {
102
+ type GlobalTypes = {
95
103
  [name: string]: InputType;
96
104
  };
97
- declare type StrictGlobalTypes = {
105
+ type StrictGlobalTypes = {
98
106
  [name: string]: StrictInputType;
99
107
  };
100
- declare type AnyFramework = {
108
+ type Renderer = {
109
+ /** What is the type of the `component` annotation in this renderer? */
101
110
  component: unknown;
111
+ /** What does the story function return in this renderer? */
102
112
  storyResult: unknown;
113
+ /** What type of element does this renderer render to? */
114
+ canvasElement: unknown;
103
115
  T?: unknown;
104
116
  };
105
- declare type StoryContextForEnhancers<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = StoryIdentifier & {
106
- component?: (TFramework & {
117
+ /** @deprecated - use `Renderer` */
118
+ type AnyFramework = Renderer;
119
+ type StoryContextForEnhancers<TRenderer extends Renderer = Renderer, TArgs = Args> = StoryIdentifier & {
120
+ component?: (TRenderer & {
107
121
  T: any;
108
122
  })['component'];
109
- subcomponents?: Record<string, (TFramework & {
123
+ subcomponents?: Record<string, (TRenderer & {
110
124
  T: any;
111
125
  })['component']>;
112
126
  parameters: Parameters;
113
127
  initialArgs: TArgs;
114
128
  argTypes: StrictArgTypes<TArgs>;
115
129
  };
116
- declare type ArgsEnhancer<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = (context: StoryContextForEnhancers<TFramework, TArgs>) => TArgs;
117
- declare type ArgTypesEnhancer<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = ((context: StoryContextForEnhancers<TFramework, TArgs>) => StrictArgTypes<TArgs>) & {
130
+ type ArgsEnhancer<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: StoryContextForEnhancers<TRenderer, TArgs>) => TArgs;
131
+ type ArgTypesEnhancer<TRenderer extends Renderer = Renderer, TArgs = Args> = ((context: StoryContextForEnhancers<TRenderer, TArgs>) => StrictArgTypes<TArgs>) & {
118
132
  secondPass?: boolean;
119
133
  };
120
- declare type StoryContextUpdate<TArgs = Args> = {
134
+ type StoryContextUpdate<TArgs = Args> = {
121
135
  args?: TArgs;
122
136
  globals?: Globals;
123
137
  [key: string]: any;
124
138
  };
125
- declare type ViewMode = 'story' | 'docs';
126
- declare type StoryContextForLoaders<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = StoryContextForEnhancers<TFramework, TArgs> & Required<StoryContextUpdate<TArgs>> & {
139
+ type ViewMode = 'story' | 'docs';
140
+ type StoryContextForLoaders<TRenderer extends Renderer = Renderer, TArgs = Args> = StoryContextForEnhancers<TRenderer, TArgs> & Required<StoryContextUpdate<TArgs>> & {
127
141
  hooks: unknown;
128
142
  viewMode: ViewMode;
129
- originalStoryFn: StoryFn<TFramework>;
143
+ originalStoryFn: StoryFn<TRenderer>;
130
144
  };
131
- declare type LoaderFunction<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = (context: StoryContextForLoaders<TFramework, TArgs>) => Promise<Record<string, any>>;
132
- declare type StoryContext<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = StoryContextForLoaders<TFramework, TArgs> & {
145
+ type LoaderFunction<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: StoryContextForLoaders<TRenderer, TArgs>) => Promise<Record<string, any>>;
146
+ type StoryContext<TRenderer extends Renderer = Renderer, TArgs = Args> = StoryContextForLoaders<TRenderer, TArgs> & {
133
147
  loaded: Record<string, any>;
134
148
  abortSignal: AbortSignal;
135
- canvasElement: HTMLElement;
149
+ canvasElement: TRenderer['canvasElement'];
136
150
  };
137
- declare type StepLabel = string;
138
- declare type StepFunction<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = (label: StepLabel, play: PlayFunction<TFramework, TArgs>) => Promise<void> | void;
139
- declare type PlayFunctionContext<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = StoryContext<TFramework, TArgs> & {
140
- step: StepFunction<TFramework, TArgs>;
151
+ type StepLabel = string;
152
+ type StepFunction<TRenderer extends Renderer = Renderer, TArgs = Args> = (label: StepLabel, play: PlayFunction<TRenderer, TArgs>) => Promise<void> | void;
153
+ type PlayFunctionContext<TRenderer extends Renderer = Renderer, TArgs = Args> = StoryContext<TRenderer, TArgs> & {
154
+ step: StepFunction<TRenderer, TArgs>;
141
155
  };
142
- declare type PlayFunction<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = (context: PlayFunctionContext<TFramework, TArgs>) => Promise<void> | void;
143
- declare type PartialStoryFn<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = (update?: StoryContextUpdate<Partial<TArgs>>) => TFramework['storyResult'];
144
- declare type LegacyStoryFn<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = (context: StoryContext<TFramework, TArgs>) => TFramework['storyResult'];
145
- declare type ArgsStoryFn<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = (args: TArgs, context: StoryContext<TFramework, TArgs>) => (TFramework & {
156
+ type PlayFunction<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: PlayFunctionContext<TRenderer, TArgs>) => Promise<void> | void;
157
+ type PartialStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = (update?: StoryContextUpdate<Partial<TArgs>>) => TRenderer['storyResult'];
158
+ type LegacyStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: StoryContext<TRenderer, TArgs>) => TRenderer['storyResult'];
159
+ type ArgsStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = (args: TArgs, context: StoryContext<TRenderer, TArgs>) => (TRenderer & {
146
160
  T: TArgs;
147
161
  })['storyResult'];
148
- declare type StoryFn<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = LegacyStoryFn<TFramework, TArgs> | ArgsStoryFn<TFramework, TArgs>;
149
- declare type DecoratorFunction<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = (fn: PartialStoryFn<TFramework, TArgs>, c: StoryContext<TFramework, TArgs>) => TFramework['storyResult'];
150
- declare type DecoratorApplicator<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = (storyFn: LegacyStoryFn<TFramework, TArgs>, decorators: DecoratorFunction<TFramework, TArgs>[]) => LegacyStoryFn<TFramework, TArgs>;
151
- declare type StepRunner<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = (label: StepLabel, play: PlayFunction<TFramework, TArgs>, context: PlayFunctionContext<TFramework, TArgs>) => Promise<void>;
152
- declare type BaseAnnotations<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = {
162
+ type StoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = LegacyStoryFn<TRenderer, TArgs> | ArgsStoryFn<TRenderer, TArgs>;
163
+ type DecoratorFunction<TRenderer extends Renderer = Renderer, TArgs = Args> = (fn: PartialStoryFn<TRenderer, TArgs>, c: StoryContext<TRenderer, TArgs>) => TRenderer['storyResult'];
164
+ type DecoratorApplicator<TRenderer extends Renderer = Renderer, TArgs = Args> = (storyFn: LegacyStoryFn<TRenderer, TArgs>, decorators: DecoratorFunction<TRenderer, TArgs>[]) => LegacyStoryFn<TRenderer, TArgs>;
165
+ type StepRunner<TRenderer extends Renderer = Renderer, TArgs = Args> = (label: StepLabel, play: PlayFunction<TRenderer, TArgs>, context: PlayFunctionContext<TRenderer, TArgs>) => Promise<void>;
166
+ type BaseAnnotations<TRenderer extends Renderer = Renderer, TArgs = Args> = {
153
167
  /**
154
168
  * Wrapper components or Storybook decorators that wrap a story.
155
169
  *
156
170
  * Decorators defined in Meta will be applied to every story variation.
157
171
  * @see [Decorators](https://storybook.js.org/docs/addons/introduction/#1-decorators)
158
172
  */
159
- decorators?: DecoratorFunction<TFramework, TArgs>[];
173
+ decorators?: DecoratorFunction<TRenderer, TArgs>[];
160
174
  /**
161
175
  * Custom metadata for a story.
162
176
  * @see [Parameters](https://storybook.js.org/docs/basics/writing-stories/#parameters)
@@ -176,22 +190,22 @@ declare type BaseAnnotations<TFramework extends AnyFramework = AnyFramework, TAr
176
190
  * Asynchronous functions which provide data for a story.
177
191
  * @see [Loaders](https://storybook.js.org/docs/react/writing-stories/loaders)
178
192
  */
179
- loaders?: LoaderFunction<TFramework, TArgs>[];
193
+ loaders?: LoaderFunction<TRenderer, TArgs>[];
180
194
  /**
181
- * Define a custom render function for the story(ies). If not passed, a default render function by the framework will be used.
195
+ * Define a custom render function for the story(ies). If not passed, a default render function by the renderer will be used.
182
196
  */
183
- render?: ArgsStoryFn<TFramework, TArgs>;
197
+ render?: ArgsStoryFn<TRenderer, TArgs>;
184
198
  };
185
- declare type ProjectAnnotations<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = BaseAnnotations<TFramework, TArgs> & {
186
- argsEnhancers?: ArgsEnhancer<TFramework, Args>[];
187
- argTypesEnhancers?: ArgTypesEnhancer<TFramework, Args>[];
199
+ type ProjectAnnotations<TRenderer extends Renderer = Renderer, TArgs = Args> = BaseAnnotations<TRenderer, TArgs> & {
200
+ argsEnhancers?: ArgsEnhancer<TRenderer, Args>[];
201
+ argTypesEnhancers?: ArgTypesEnhancer<TRenderer, Args>[];
188
202
  globals?: Globals;
189
203
  globalTypes?: GlobalTypes;
190
- applyDecorators?: DecoratorApplicator<TFramework, Args>;
191
- runStep?: StepRunner<TFramework, TArgs>;
204
+ applyDecorators?: DecoratorApplicator<TRenderer, Args>;
205
+ runStep?: StepRunner<TRenderer, TArgs>;
192
206
  };
193
- declare type StoryDescriptor$1 = string[] | RegExp;
194
- interface ComponentAnnotations<TFramework extends AnyFramework = AnyFramework, TArgs = Args> extends BaseAnnotations<TFramework, TArgs> {
207
+ type StoryDescriptor$1 = string[] | RegExp;
208
+ interface ComponentAnnotations<TRenderer extends Renderer = Renderer, TArgs = Args> extends BaseAnnotations<TRenderer, TArgs> {
195
209
  /**
196
210
  * Title of the component which will be presented in the navigation. **Should be unique.**
197
211
  *
@@ -239,8 +253,8 @@ interface ComponentAnnotations<TFramework extends AnyFramework = AnyFramework, T
239
253
  *
240
254
  * Used by addons for automatic prop table generation and display of other component metadata.
241
255
  */
242
- component?: (TFramework & {
243
- T: Args extends TArgs ? any : TArgs;
256
+ component?: (TRenderer & {
257
+ T: Record<string, unknown> extends Required<TArgs> ? any : TArgs;
244
258
  })['component'];
245
259
  /**
246
260
  * Auxiliary subcomponents that are part of the stories.
@@ -257,13 +271,17 @@ interface ComponentAnnotations<TFramework extends AnyFramework = AnyFramework, T
257
271
  *
258
272
  * By defining them each component will have its tab in the args table.
259
273
  */
260
- subcomponents?: Record<string, TFramework['component']>;
274
+ subcomponents?: Record<string, TRenderer['component']>;
261
275
  /**
262
276
  * Function that is executed after the story is rendered.
263
277
  */
264
- play?: PlayFunction<TFramework, TArgs>;
278
+ play?: PlayFunction<TRenderer, TArgs>;
279
+ /**
280
+ * Named tags for a story, used to filter stories in different contexts.
281
+ */
282
+ tags?: Tag[];
265
283
  }
266
- declare type StoryAnnotations<TFramework extends AnyFramework = AnyFramework, TArgs = Args, TRequiredArgs = Partial<TArgs>> = BaseAnnotations<TFramework, TArgs> & {
284
+ type StoryAnnotations<TRenderer extends Renderer = Renderer, TArgs = Args, TRequiredArgs = Partial<TArgs>> = BaseAnnotations<TRenderer, TArgs> & {
267
285
  /**
268
286
  * Override the display name in the UI (CSF v3)
269
287
  */
@@ -275,31 +293,35 @@ declare type StoryAnnotations<TFramework extends AnyFramework = AnyFramework, TA
275
293
  /**
276
294
  * Function that is executed after the story is rendered.
277
295
  */
278
- play?: PlayFunction<TFramework, TArgs>;
296
+ play?: PlayFunction<TRenderer, TArgs>;
297
+ /**
298
+ * Named tags for a story, used to filter stories in different contexts.
299
+ */
300
+ tags?: Tag[];
279
301
  /** @deprecated */
280
- story?: Omit<StoryAnnotations<TFramework, TArgs>, 'story'>;
302
+ story?: Omit<StoryAnnotations<TRenderer, TArgs>, 'story'>;
281
303
  } & ({} extends TRequiredArgs ? {
282
304
  args?: TRequiredArgs;
283
305
  } : {
284
306
  args: TRequiredArgs;
285
307
  });
286
- declare type LegacyAnnotatedStoryFn<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = StoryFn<TFramework, TArgs> & StoryAnnotations<TFramework, TArgs>;
287
- declare type LegacyStoryAnnotationsOrFn<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = LegacyAnnotatedStoryFn<TFramework, TArgs> | StoryAnnotations<TFramework, TArgs>;
288
- declare type AnnotatedStoryFn<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = ArgsStoryFn<TFramework, TArgs> & StoryAnnotations<TFramework, TArgs>;
289
- declare type StoryAnnotationsOrFn<TFramework extends AnyFramework = AnyFramework, TArgs = Args> = AnnotatedStoryFn<TFramework, TArgs> | StoryAnnotations<TFramework, TArgs>;
290
- declare type ArgsFromMeta<TFramework extends AnyFramework, Meta> = Meta extends {
291
- render?: ArgsStoryFn<TFramework, infer RArgs>;
308
+ type LegacyAnnotatedStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = StoryFn<TRenderer, TArgs> & StoryAnnotations<TRenderer, TArgs>;
309
+ type LegacyStoryAnnotationsOrFn<TRenderer extends Renderer = Renderer, TArgs = Args> = LegacyAnnotatedStoryFn<TRenderer, TArgs> | StoryAnnotations<TRenderer, TArgs>;
310
+ type AnnotatedStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = ArgsStoryFn<TRenderer, TArgs> & StoryAnnotations<TRenderer, TArgs>;
311
+ type StoryAnnotationsOrFn<TRenderer extends Renderer = Renderer, TArgs = Args> = AnnotatedStoryFn<TRenderer, TArgs> | StoryAnnotations<TRenderer, TArgs>;
312
+ type ArgsFromMeta<TRenderer extends Renderer, Meta> = Meta extends {
313
+ render?: ArgsStoryFn<TRenderer, infer RArgs>;
292
314
  loaders?: (infer Loaders)[];
293
315
  decorators?: (infer Decorators)[];
294
- } ? Simplify<RArgs & DecoratorsArgs<TFramework, Decorators> & LoaderArgs<TFramework, Loaders>> : unknown;
295
- declare type DecoratorsArgs<TFramework extends AnyFramework, Decorators> = UnionToIntersection<Decorators extends DecoratorFunction<TFramework, infer TArgs> ? TArgs : unknown>;
296
- declare type LoaderArgs<TFramework extends AnyFramework, Loaders> = UnionToIntersection<Loaders extends LoaderFunction<TFramework, infer TArgs> ? TArgs : unknown>;
316
+ } ? Simplify<RemoveIndexSignature<RArgs & DecoratorsArgs<TRenderer, Decorators> & LoaderArgs<TRenderer, Loaders>>> : unknown;
317
+ type DecoratorsArgs<TRenderer extends Renderer, Decorators> = UnionToIntersection<Decorators extends DecoratorFunction<TRenderer, infer TArgs> ? TArgs : unknown>;
318
+ type LoaderArgs<TRenderer extends Renderer, Loaders> = UnionToIntersection<Loaders extends LoaderFunction<TRenderer, infer TArgs> ? TArgs : unknown>;
297
319
 
298
320
  /**
299
321
  * Helper function to include/exclude an arg based on the value of other other args
300
322
  * aka "conditional args"
301
323
  */
302
- declare const includeConditionalArg: (argType: InputType, args: Args, globals: Globals) => boolean;
324
+ declare const includeConditionalArg: (argType: InputType, args: Args, globals: Globals) => any;
303
325
 
304
326
  /**
305
327
  * Remove punctuation and illegal characters from a story ID.
@@ -315,7 +337,7 @@ declare const toId: (kind: string, name?: string) => string;
315
337
  * Transform a CSF named export into a readable story name
316
338
  */
317
339
  declare const storyNameFromExport: (key: string) => string;
318
- declare type StoryDescriptor = string[] | RegExp;
340
+ type StoryDescriptor = string[] | RegExp;
319
341
  interface IncludeExcludeOptions {
320
342
  includeStories?: StoryDescriptor;
321
343
  excludeStories?: StoryDescriptor;
@@ -336,4 +358,4 @@ declare const parseKind: (kind: string, { rootSeparator, groupSeparator }: Separ
336
358
  groups: string[];
337
359
  };
338
360
 
339
- export { AnnotatedStoryFn, AnyFramework, ArgTypes, ArgTypesEnhancer, Args, ArgsEnhancer, ArgsFromMeta, ArgsStoryFn, BaseAnnotations, ComponentAnnotations, ComponentId, ComponentTitle, Conditional, DecoratorApplicator, DecoratorFunction, GlobalTypes, Globals, IncludeExcludeOptions, InputType, LegacyAnnotatedStoryFn, LegacyStoryAnnotationsOrFn, LegacyStoryFn, LoaderFunction, Parameters, PartialStoryFn, PlayFunction, PlayFunctionContext, ProjectAnnotations, SBArrayType, SBEnumType, SBIntersectionType, SBObjectType, SBOtherType, SBScalarType, SBType, SBUnionType, SeparatorOptions, StepFunction, StepLabel, StepRunner, StoryAnnotations, StoryAnnotationsOrFn, StoryContext, StoryContextForEnhancers, StoryContextForLoaders, StoryContextUpdate, StoryFn, StoryId, StoryIdentifier, StoryKind, StoryName, StrictArgTypes, StrictGlobalTypes, StrictInputType, ViewMode, includeConditionalArg, isExportStory, parseKind, sanitize, storyNameFromExport, toId };
361
+ export { AnnotatedStoryFn, AnyFramework, ArgTypes, ArgTypesEnhancer, Args, ArgsEnhancer, ArgsFromMeta, ArgsStoryFn, BaseAnnotations, 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, includeConditionalArg, isExportStory, parseKind, sanitize, storyNameFromExport, toId };
package/dist/index.js CHANGED
@@ -1,109 +1,10 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
- mod
23
- ));
24
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ 'use strict';
25
2
 
26
- // src/index.ts
27
- var src_exports = {};
28
- __export(src_exports, {
29
- includeConditionalArg: () => includeConditionalArg,
30
- isExportStory: () => isExportStory,
31
- parseKind: () => parseKind,
32
- sanitize: () => sanitize,
33
- storyNameFromExport: () => storyNameFromExport,
34
- toId: () => toId
35
- });
36
- module.exports = __toCommonJS(src_exports);
37
- var import_startCase = __toESM(require("lodash/startCase"));
3
+ var B=Object.create;var R=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var I=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var E=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of C(e))!w.call(r,a)&&a!==t&&R(r,a,{get:()=>e[a],enumerable:!(n=b(e,a))||n.enumerable});return r};var P=(r,e,t)=>(t=r!=null?B(h(r)):{},E(e||!r||!r.__esModule?R(t,"default",{value:r,enumerable:!0}):t,r));var x=I(T=>{Object.defineProperty(T,"__esModule",{value:!0}),T.isEqual=function(){var r=Object.prototype.toString,e=Object.getPrototypeOf,t=Object.getOwnPropertySymbols?function(n){return Object.keys(n).concat(Object.getOwnPropertySymbols(n))}:Object.keys;return function(n,a){return function i(o,s,d){var y,g,p,A=r.call(o),F=r.call(s);if(o===s)return !0;if(o==null||s==null)return !1;if(d.indexOf(o)>-1&&d.indexOf(s)>-1)return !0;if(d.push(o,s),A!=F||(y=t(o),g=t(s),y.length!=g.length||y.some(function(l){return !i(o[l],s[l],d)})))return !1;switch(A.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":y=o.entries(),g=s.entries();do if(!i((p=y.next()).value,g.next().value,d))return !1;while(!p.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(p=0;p<o.length;p++)if((p in o||p in s)&&(p in o!=p in s||!i(o[p],s[p],d)))return !1;return !0;case"Object":return i(e(o),e(s),d);default:return !1}}(n,a,[])}}();});function u(r){return r.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(e,t,n,a)=>`${t} ${n}${a}`).replace(/([a-z])([A-Z])/g,(e,t,n)=>`${t} ${n}`).replace(/([a-z])([0-9])/gi,(e,t,n)=>`${t} ${n}`).replace(/([0-9])([a-z])/gi,(e,t,n)=>`${t} ${n}`).replace(/(\s|^)(\w)/g,(e,t,n)=>`${t}${n.toUpperCase()}`).replace(/ +/g," ").trim()}var c=P(x()),S=r=>r.map(e=>typeof e<"u").filter(Boolean).length,O=(r,e)=>{let{exists:t,eq:n,neq:a,truthy:i}=r;if(S([t,n,a,i])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:t,eq:n,neq:a})}`);if(typeof n<"u")return (0, c.isEqual)(e,n);if(typeof a<"u")return !(0, c.isEqual)(e,a);if(typeof t<"u"){let s=typeof e<"u";return t?s:!s}return (typeof i>"u"?!0:i)?!!e:!e},v=(r,e,t)=>{if(!r.if)return !0;let{arg:n,global:a}=r.if;if(S([n,a])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:n,global:a})}`);let i=n?e[n]:t[a];return O(r.if,i)};var L=r=>r.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),m=(r,e)=>{let t=L(r);if(t==="")throw new Error(`Invalid ${e} '${r}', must include alphanumeric characters`);return t},N=(r,e)=>`${m(r,"kind")}${e?`--${m(e,"name")}`:""}`,M=r=>u(r);function f(r,e){return Array.isArray(e)?e.includes(r):r.match(e)}function G(r,{includeStories:e,excludeStories:t}){return r!=="__esModule"&&(!e||f(r,e))&&(!t||!f(r,t))}var z=(r,{rootSeparator:e,groupSeparator:t})=>{let[n,a]=r.split(e,2),i=(a||r).split(t).filter(o=>!!o);return {root:a?n:null,groups:i}};
38
4
 
39
- // src/includeConditionalArg.ts
40
- var import_isEqual = __toESM(require("lodash/isEqual"));
41
- var count = (vals) => vals.map((v) => typeof v !== "undefined").filter(Boolean).length;
42
- var testValue = (cond, value) => {
43
- const { exists, eq, neq, truthy } = cond;
44
- if (count([exists, eq, neq, truthy]) > 1) {
45
- throw new Error(`Invalid conditional test ${JSON.stringify({ exists, eq, neq })}`);
46
- }
47
- if (typeof eq !== "undefined") {
48
- return (0, import_isEqual.default)(value, eq);
49
- }
50
- if (typeof neq !== "undefined") {
51
- return !(0, import_isEqual.default)(value, neq);
52
- }
53
- if (typeof exists !== "undefined") {
54
- const valueExists = typeof value !== "undefined";
55
- return exists ? valueExists : !valueExists;
56
- }
57
- const shouldBeTruthy = typeof truthy === "undefined" ? true : truthy;
58
- return shouldBeTruthy ? !!value : !value;
59
- };
60
- var includeConditionalArg = (argType, args, globals) => {
61
- if (!argType.if)
62
- return true;
63
- const { arg, global } = argType.if;
64
- if (count([arg, global]) !== 1) {
65
- throw new Error(`Invalid conditional value ${JSON.stringify({ arg, global })}`);
66
- }
67
- const value = arg ? args[arg] : globals[global];
68
- return testValue(argType.if, value);
69
- };
70
-
71
- // src/index.ts
72
- var sanitize = (string) => {
73
- return string.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, "-").replace(/-+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
74
- };
75
- var sanitizeSafe = (string, part) => {
76
- const sanitized = sanitize(string);
77
- if (sanitized === "") {
78
- throw new Error(`Invalid ${part} '${string}', must include alphanumeric characters`);
79
- }
80
- return sanitized;
81
- };
82
- var toId = (kind, name) => `${sanitizeSafe(kind, "kind")}${name ? `--${sanitizeSafe(name, "name")}` : ""}`;
83
- var storyNameFromExport = (key) => (0, import_startCase.default)(key);
84
- function matches(storyKey, arrayOrRegex) {
85
- if (Array.isArray(arrayOrRegex)) {
86
- return arrayOrRegex.includes(storyKey);
87
- }
88
- return storyKey.match(arrayOrRegex);
89
- }
90
- function isExportStory(key, { includeStories, excludeStories }) {
91
- return key !== "__esModule" && (!includeStories || matches(key, includeStories)) && (!excludeStories || !matches(key, excludeStories));
92
- }
93
- var parseKind = (kind, { rootSeparator, groupSeparator }) => {
94
- const [root, remainder] = kind.split(rootSeparator, 2);
95
- const groups = (remainder || kind).split(groupSeparator).filter((i) => !!i);
96
- return {
97
- root: remainder ? root : null,
98
- groups
99
- };
100
- };
101
- // Annotate the CommonJS export names for ESM import in node:
102
- 0 && (module.exports = {
103
- includeConditionalArg,
104
- isExportStory,
105
- parseKind,
106
- sanitize,
107
- storyNameFromExport,
108
- toId
109
- });
5
+ exports.includeConditionalArg = v;
6
+ exports.isExportStory = G;
7
+ exports.parseKind = z;
8
+ exports.sanitize = L;
9
+ exports.storyNameFromExport = M;
10
+ exports.toId = N;
package/dist/index.mjs CHANGED
@@ -1,73 +1,3 @@
1
- // src/index.ts
2
- import startCase from "lodash/startCase";
1
+ var B=Object.create;var R=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var I=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var E=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of C(e))!w.call(r,a)&&a!==t&&R(r,a,{get:()=>e[a],enumerable:!(n=b(e,a))||n.enumerable});return r};var P=(r,e,t)=>(t=r!=null?B(h(r)):{},E(e||!r||!r.__esModule?R(t,"default",{value:r,enumerable:!0}):t,r));var x=I(T=>{Object.defineProperty(T,"__esModule",{value:!0}),T.isEqual=function(){var r=Object.prototype.toString,e=Object.getPrototypeOf,t=Object.getOwnPropertySymbols?function(n){return Object.keys(n).concat(Object.getOwnPropertySymbols(n))}:Object.keys;return function(n,a){return function i(o,s,d){var y,g,p,A=r.call(o),F=r.call(s);if(o===s)return !0;if(o==null||s==null)return !1;if(d.indexOf(o)>-1&&d.indexOf(s)>-1)return !0;if(d.push(o,s),A!=F||(y=t(o),g=t(s),y.length!=g.length||y.some(function(l){return !i(o[l],s[l],d)})))return !1;switch(A.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":y=o.entries(),g=s.entries();do if(!i((p=y.next()).value,g.next().value,d))return !1;while(!p.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(p=0;p<o.length;p++)if((p in o||p in s)&&(p in o!=p in s||!i(o[p],s[p],d)))return !1;return !0;case"Object":return i(e(o),e(s),d);default:return !1}}(n,a,[])}}();});function u(r){return r.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(e,t,n,a)=>`${t} ${n}${a}`).replace(/([a-z])([A-Z])/g,(e,t,n)=>`${t} ${n}`).replace(/([a-z])([0-9])/gi,(e,t,n)=>`${t} ${n}`).replace(/([0-9])([a-z])/gi,(e,t,n)=>`${t} ${n}`).replace(/(\s|^)(\w)/g,(e,t,n)=>`${t}${n.toUpperCase()}`).replace(/ +/g," ").trim()}var c=P(x()),S=r=>r.map(e=>typeof e<"u").filter(Boolean).length,O=(r,e)=>{let{exists:t,eq:n,neq:a,truthy:i}=r;if(S([t,n,a,i])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:t,eq:n,neq:a})}`);if(typeof n<"u")return (0, c.isEqual)(e,n);if(typeof a<"u")return !(0, c.isEqual)(e,a);if(typeof t<"u"){let s=typeof e<"u";return t?s:!s}return (typeof i>"u"?!0:i)?!!e:!e},v=(r,e,t)=>{if(!r.if)return !0;let{arg:n,global:a}=r.if;if(S([n,a])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:n,global:a})}`);let i=n?e[n]:t[a];return O(r.if,i)};var L=r=>r.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),m=(r,e)=>{let t=L(r);if(t==="")throw new Error(`Invalid ${e} '${r}', must include alphanumeric characters`);return t},N=(r,e)=>`${m(r,"kind")}${e?`--${m(e,"name")}`:""}`,M=r=>u(r);function f(r,e){return Array.isArray(e)?e.includes(r):r.match(e)}function G(r,{includeStories:e,excludeStories:t}){return r!=="__esModule"&&(!e||f(r,e))&&(!t||!f(r,t))}var z=(r,{rootSeparator:e,groupSeparator:t})=>{let[n,a]=r.split(e,2),i=(a||r).split(t).filter(o=>!!o);return {root:a?n:null,groups:i}};
3
2
 
4
- // src/includeConditionalArg.ts
5
- import isEqual from "lodash/isEqual";
6
- var count = (vals) => vals.map((v) => typeof v !== "undefined").filter(Boolean).length;
7
- var testValue = (cond, value) => {
8
- const { exists, eq, neq, truthy } = cond;
9
- if (count([exists, eq, neq, truthy]) > 1) {
10
- throw new Error(`Invalid conditional test ${JSON.stringify({ exists, eq, neq })}`);
11
- }
12
- if (typeof eq !== "undefined") {
13
- return isEqual(value, eq);
14
- }
15
- if (typeof neq !== "undefined") {
16
- return !isEqual(value, neq);
17
- }
18
- if (typeof exists !== "undefined") {
19
- const valueExists = typeof value !== "undefined";
20
- return exists ? valueExists : !valueExists;
21
- }
22
- const shouldBeTruthy = typeof truthy === "undefined" ? true : truthy;
23
- return shouldBeTruthy ? !!value : !value;
24
- };
25
- var includeConditionalArg = (argType, args, globals) => {
26
- if (!argType.if)
27
- return true;
28
- const { arg, global } = argType.if;
29
- if (count([arg, global]) !== 1) {
30
- throw new Error(`Invalid conditional value ${JSON.stringify({ arg, global })}`);
31
- }
32
- const value = arg ? args[arg] : globals[global];
33
- return testValue(argType.if, value);
34
- };
35
-
36
- // src/index.ts
37
- var sanitize = (string) => {
38
- return string.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, "-").replace(/-+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
39
- };
40
- var sanitizeSafe = (string, part) => {
41
- const sanitized = sanitize(string);
42
- if (sanitized === "") {
43
- throw new Error(`Invalid ${part} '${string}', must include alphanumeric characters`);
44
- }
45
- return sanitized;
46
- };
47
- var toId = (kind, name) => `${sanitizeSafe(kind, "kind")}${name ? `--${sanitizeSafe(name, "name")}` : ""}`;
48
- var storyNameFromExport = (key) => startCase(key);
49
- function matches(storyKey, arrayOrRegex) {
50
- if (Array.isArray(arrayOrRegex)) {
51
- return arrayOrRegex.includes(storyKey);
52
- }
53
- return storyKey.match(arrayOrRegex);
54
- }
55
- function isExportStory(key, { includeStories, excludeStories }) {
56
- return key !== "__esModule" && (!includeStories || matches(key, includeStories)) && (!excludeStories || !matches(key, excludeStories));
57
- }
58
- var parseKind = (kind, { rootSeparator, groupSeparator }) => {
59
- const [root, remainder] = kind.split(rootSeparator, 2);
60
- const groups = (remainder || kind).split(groupSeparator).filter((i) => !!i);
61
- return {
62
- root: remainder ? root : null,
63
- groups
64
- };
65
- };
66
- export {
67
- includeConditionalArg,
68
- isExportStory,
69
- parseKind,
70
- sanitize,
71
- storyNameFromExport,
72
- toId
73
- };
3
+ export { v as includeConditionalArg, G as isExportStory, z as parseKind, L as sanitize, M as storyNameFromExport, N as toId };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/csf",
3
- "version": "0.0.2-next.0",
3
+ "version": "0.0.2-next.10",
4
4
  "description": "Component Story Format (CSF) utilities",
5
5
  "keywords": [
6
6
  "storybook",
@@ -17,27 +17,52 @@
17
17
  "url": "https://github.com/ComponentDriven/csf.git"
18
18
  },
19
19
  "license": "MIT",
20
+ "exports": {
21
+ ".": {
22
+ "import": "./dist/index.mjs",
23
+ "require": "./dist/index.js",
24
+ "browser": "./dist/index.mjs",
25
+ "node": "./dist/index.js",
26
+ "types": "./dist/index.d.ts"
27
+ }
28
+ },
29
+ "main": "dist/index.js",
30
+ "module": "dist/index.mjs",
31
+ "types": "dist/index.d.ts",
20
32
  "files": [
21
33
  "dist/**/*",
22
34
  "README.md",
23
35
  "*.js",
24
36
  "*.d.ts"
25
37
  ],
26
- "main": "dist/index.js",
27
- "module": "dist/index.mjs",
28
- "types": "dist/index.d.ts",
29
38
  "scripts": {
30
- "build": "tsup ./src/index.ts --format esm,cjs --dts",
39
+ "build": "tsup ./src/index.ts --format esm,cjs --dts --treeshake --minify",
31
40
  "check": "tsc",
32
41
  "lint": "eslint src --ext .ts",
33
- "test": "jest",
34
- "release": "yarn build && auto shipit"
42
+ "release": "yarn build && auto shipit",
43
+ "test": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-vm-modules jest"
35
44
  },
45
+ "prettier": "@storybook/linter-config/prettier.config",
36
46
  "eslintConfig": {
47
+ "parserOptions": {
48
+ "project": [
49
+ "./tsconfig.json"
50
+ ]
51
+ },
52
+ "settings": {
53
+ "import/resolver": {
54
+ "typescript": {
55
+ "project": [
56
+ "./tsconfig.json"
57
+ ]
58
+ }
59
+ }
60
+ },
37
61
  "extends": [
38
62
  "@storybook/eslint-config-storybook"
39
63
  ],
40
64
  "rules": {
65
+ "import/no-unresolved": "error",
41
66
  "jest/expect-expect": [
42
67
  "warn",
43
68
  {
@@ -49,42 +74,60 @@
49
74
  ]
50
75
  }
51
76
  },
52
- "prettier": "@storybook/linter-config/prettier.config",
53
77
  "jest": {
54
- "preset": "ts-jest",
55
- "testEnvironment": "node",
78
+ "extensionsToTreatAsEsm": [
79
+ ".ts"
80
+ ],
81
+ "moduleNameMapper": {
82
+ "^(\\.{1,2}/.*)\\.js$": "$1"
83
+ },
84
+ "preset": "ts-jest/presets/default-esm",
56
85
  "roots": [
57
86
  "<rootDir>/src"
58
- ]
87
+ ],
88
+ "testEnvironment": "node",
89
+ "transform": {
90
+ "^.+\\.tsx?$": [
91
+ "ts-jest",
92
+ {
93
+ "useESM": true
94
+ }
95
+ ]
96
+ }
59
97
  },
60
98
  "dependencies": {
61
- "expect-type": "^0.14.2",
62
- "lodash": "^4.17.15",
63
99
  "type-fest": "^2.19.0"
64
100
  },
65
101
  "devDependencies": {
66
- "@auto-it/released": "^10.37.1",
67
- "@storybook/eslint-config-storybook": "^2.1.0",
102
+ "@auto-it/released": "^10.37.6",
103
+ "@ngard/tiny-isequal": "^1.1.0",
104
+ "@storybook/eslint-config-storybook": "^3.1.2",
68
105
  "@types/jest": "^29.2.0",
69
- "@types/lodash": "^4.14.149",
70
106
  "@types/node": "^18.11.0",
71
- "@typescript-eslint/parser": "^4.33.0",
72
- "auto": "^10.31.0",
107
+ "@typescript-eslint/eslint-plugin": "^5.42.1",
108
+ "@typescript-eslint/parser": "^5.42.1",
109
+ "auto": "^10.37.6",
73
110
  "common-tags": "^1.8.0",
74
- "eslint": "^6.7.1",
75
- "jest": "^29.2.0",
111
+ "eslint": "^8.27.0",
112
+ "eslint-import-resolver-typescript": "^3.5.2",
113
+ "eslint-plugin-import": "^2.26.0",
114
+ "eslint-plugin-jest": "^27.1.4",
115
+ "expect-type": "^0.14.2",
116
+ "jest": "^29.3.1",
117
+ "lodash": "^4.17.21",
118
+ "@types/lodash": "^4.14.191",
76
119
  "prettier": "^2.7.1",
77
120
  "ts-jest": "^29.0.3",
78
- "tsup": "^6.3.0",
121
+ "tsup": "^6.4.0",
79
122
  "typescript": "^4.8.4"
80
123
  },
124
+ "publishConfig": {
125
+ "access": "public"
126
+ },
81
127
  "auto": {
82
128
  "plugins": [
83
129
  "npm",
84
130
  "released"
85
131
  ]
86
- },
87
- "publishConfig": {
88
- "access": "public"
89
132
  }
90
133
  }