@storybook/csf 0.0.2--canary.fed52be.0 → 0.0.2--canary.58.7052fb8.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +11 -5
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
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;
@@ -54,6 +54,9 @@ interface StoryIdentifier {
54
54
  interface Parameters {
55
55
  [name: string]: any;
56
56
  }
57
+ interface StrictParameters {
58
+ [name: string]: unknown;
59
+ }
57
60
  declare type ConditionalTest = {
58
61
  truthy?: boolean;
59
62
  } | {
@@ -81,9 +84,12 @@ interface StrictInputType extends InputType {
81
84
  name: string;
82
85
  type?: SBType;
83
86
  }
84
- declare type Args = {
87
+ interface Args {
85
88
  [name: string]: any;
86
- };
89
+ }
90
+ interface StrictArgs {
91
+ [name: string]: unknown;
92
+ }
87
93
  declare type ArgTypes<TArgs = Args> = {
88
94
  [name in keyof TArgs]: InputType;
89
95
  };
@@ -307,7 +313,7 @@ declare type ArgsFromMeta<TRenderer extends Renderer, Meta> = Meta extends {
307
313
  render?: ArgsStoryFn<TRenderer, infer RArgs>;
308
314
  loaders?: (infer Loaders)[];
309
315
  decorators?: (infer Decorators)[];
310
- } ? Simplify<RArgs & DecoratorsArgs<TRenderer, Decorators> & LoaderArgs<TRenderer, Loaders>> : unknown;
316
+ } ? Simplify<RemoveIndexSignature<RArgs & DecoratorsArgs<TRenderer, Decorators> & LoaderArgs<TRenderer, Loaders>>> : unknown;
311
317
  declare type DecoratorsArgs<TRenderer extends Renderer, Decorators> = UnionToIntersection<Decorators extends DecoratorFunction<TRenderer, infer TArgs> ? TArgs : unknown>;
312
318
  declare type LoaderArgs<TRenderer extends Renderer, Loaders> = UnionToIntersection<Loaders extends LoaderFunction<TRenderer, infer TArgs> ? TArgs : unknown>;
313
319
 
@@ -352,4 +358,4 @@ declare const parseKind: (kind: string, { rootSeparator, groupSeparator }: Separ
352
358
  groups: string[];
353
359
  };
354
360
 
355
- 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, StrictGlobalTypes, StrictInputType, Tag, 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/csf",
3
- "version": "0.0.2--canary.fed52be.0",
3
+ "version": "0.0.2--canary.58.7052fb8.0",
4
4
  "description": "Component Story Format (CSF) utilities",
5
5
  "keywords": [
6
6
  "storybook",