@storybook/react-webpack5 7.0.0-alpha.54 → 7.0.0-alpha.56

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { F as FrameworkOptions, S as StorybookConfig } from './types-8ecfde1d.js';
1
+ export { F as FrameworkOptions, S as StorybookConfig } from './types-6a41b796.js';
2
2
  import '@storybook/preset-react-webpack';
3
3
  import '@storybook/builder-webpack5';
package/dist/preset.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { FileSystemCache } from 'file-system-cache';
2
2
  import { TransformOptions } from '@babel/core';
3
3
  import { Server } from 'http';
4
- import { S as StorybookConfig$1 } from './types-8ecfde1d.js';
4
+ import { S as StorybookConfig$1 } from './types-6a41b796.js';
5
5
  import '@storybook/preset-react-webpack';
6
6
  import '@storybook/builder-webpack5';
7
7
 
@@ -725,6 +725,44 @@ interface Parameters {
725
725
  [name: string]: any;
726
726
  }
727
727
 
728
+ interface StoriesSpecifier {
729
+ /**
730
+ * When auto-titling, what to prefix all generated titles with (default: '')
731
+ */
732
+ titlePrefix?: string;
733
+ /**
734
+ * Where to start looking for story files
735
+ */
736
+ directory: string;
737
+ /**
738
+ * What does the filename of a story file look like?
739
+ * (a glob, relative to directory, no leading `./`)
740
+ * If unset, we use `** / *.@(mdx|stories.@(mdx|tsx|ts|jsx|js))` (no spaces)
741
+ */
742
+ files?: string;
743
+ }
744
+ type StoriesEntry = string | StoriesSpecifier;
745
+ interface IndexerOptions {
746
+ makeTitle: (userTitle?: string) => string;
747
+ }
748
+ interface IndexedStory {
749
+ id: string;
750
+ name: string;
751
+ tags?: Tag[];
752
+ parameters?: Parameters;
753
+ }
754
+ interface IndexedCSFFile {
755
+ meta: {
756
+ title?: string;
757
+ tags?: Tag[];
758
+ };
759
+ stories: IndexedStory[];
760
+ }
761
+ interface StoryIndexer {
762
+ test: RegExp;
763
+ indexer: (fileName: string, options: IndexerOptions) => Promise<IndexedCSFFile>;
764
+ }
765
+
728
766
  interface Options$1 {
729
767
  allowRegExp: boolean;
730
768
  allowFunction: boolean;
@@ -782,7 +820,7 @@ interface Presets {
782
820
  apply(extension: 'framework', config?: {}, args?: any): Promise<Preset>;
783
821
  apply(extension: 'babel', config?: {}, args?: any): Promise<TransformOptions>;
784
822
  apply(extension: 'entries', config?: [], args?: any): Promise<unknown>;
785
- apply(extension: 'stories', config?: [], args?: any): Promise<CoreCommon_StoriesEntry[]>;
823
+ apply(extension: 'stories', config?: [], args?: any): Promise<StoriesEntry[]>;
786
824
  apply(extension: 'managerEntries', config: [], args?: any): Promise<string[]>;
787
825
  apply(extension: 'refs', config?: [], args?: any): Promise<unknown>;
788
826
  apply(extension: 'core', config?: {}, args?: any): Promise<CoreConfig>;
@@ -863,26 +901,6 @@ interface StorybookConfigOptions {
863
901
  presetsList?: LoadedPreset[];
864
902
  }
865
903
  type Options = LoadOptions & StorybookConfigOptions & CLIOptions & BuilderOptions;
866
- interface CoreCommon_IndexerOptions {
867
- makeTitle: (userTitle?: string) => string;
868
- }
869
- interface CoreCommon_IndexedStory {
870
- id: string;
871
- name: string;
872
- tags?: Tag[];
873
- parameters?: Parameters;
874
- }
875
- interface CoreCommon_StoryIndex {
876
- meta: {
877
- title?: string;
878
- tags?: Tag[];
879
- };
880
- stories: CoreCommon_IndexedStory[];
881
- }
882
- interface CoreCommon_StoryIndexer {
883
- test: RegExp;
884
- indexer: (fileName: string, options: CoreCommon_IndexerOptions) => Promise<CoreCommon_StoryIndex>;
885
- }
886
904
  /**
887
905
  * Options for TypeScript usage within Storybook.
888
906
  */
@@ -900,23 +918,6 @@ interface TypescriptOptions {
900
918
  */
901
919
  skipBabel: boolean;
902
920
  }
903
- interface CoreCommon_StoriesSpecifier {
904
- /**
905
- * When auto-titling, what to prefix all generated titles with (default: '')
906
- */
907
- titlePrefix?: string;
908
- /**
909
- * Where to start looking for story files
910
- */
911
- directory: string;
912
- /**
913
- * What does the filename of a story file look like?
914
- * (a glob, relative to directory, no leading `./`)
915
- * If unset, we use `** / *.stories.@(mdx|tsx|ts|jsx|js)` (no spaces)
916
- */
917
- files?: string;
918
- }
919
- type CoreCommon_StoriesEntry = string | CoreCommon_StoriesSpecifier;
920
921
  type Preset = string | {
921
922
  name: string;
922
923
  options?: any;
@@ -1015,7 +1016,7 @@ interface StorybookConfig {
1015
1016
  *
1016
1017
  * @example `['./src/*.stories.@(j|t)sx?']`
1017
1018
  */
1018
- stories: CoreCommon_StoriesEntry[];
1019
+ stories: StoriesEntry[];
1019
1020
  /**
1020
1021
  * Framework, e.g. '@storybook/react', required in v7
1021
1022
  */
@@ -1049,7 +1050,7 @@ interface StorybookConfig {
1049
1050
  /**
1050
1051
  * Process CSF files for the story index.
1051
1052
  */
1052
- storyIndexers?: (indexers: CoreCommon_StoryIndexer[], options: Options) => CoreCommon_StoryIndexer[];
1053
+ storyIndexers?: (indexers: StoryIndexer[], options: Options) => StoryIndexer[];
1053
1054
  /**
1054
1055
  * Docs related features in index generation
1055
1056
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-webpack5",
3
- "version": "7.0.0-alpha.54",
3
+ "version": "7.0.0-alpha.56",
4
4
  "description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
5
5
  "keywords": [
6
6
  "storybook"
@@ -51,13 +51,13 @@
51
51
  "prep": "../../../scripts/prepare/bundle.ts"
52
52
  },
53
53
  "dependencies": {
54
- "@storybook/builder-webpack5": "7.0.0-alpha.54",
55
- "@storybook/preset-react-webpack": "7.0.0-alpha.54",
56
- "@storybook/react": "7.0.0-alpha.54",
54
+ "@storybook/builder-webpack5": "7.0.0-alpha.56",
55
+ "@storybook/preset-react-webpack": "7.0.0-alpha.56",
56
+ "@storybook/react": "7.0.0-alpha.56",
57
57
  "@types/node": "^16.0.0"
58
58
  },
59
59
  "devDependencies": {
60
- "jest-specific-snapshot": "^6.0.0",
60
+ "jest-specific-snapshot": "^7.0.0",
61
61
  "typescript": "^4.9.3"
62
62
  },
63
63
  "peerDependencies": {
@@ -86,5 +86,5 @@
86
86
  ],
87
87
  "platform": "node"
88
88
  },
89
- "gitHead": "91177d4e27daec556a24ae6223c3cbe17a998d9b"
89
+ "gitHead": "c8e9a862bb83c4a0d6b5975e795b4ca7f7ff7bc2"
90
90
  }