@storybook/react-webpack5 7.0.0-alpha.53 → 7.0.0-alpha.55

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/dist/preset.mjs CHANGED
@@ -1 +1 @@
1
- var t=(o=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(o,{get:(s,e)=>(typeof require!="undefined"?require:s)[e]}):o)(function(o){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+o+'" is not supported')});import r from"path";var i=[r.dirname(t.resolve(r.join("@storybook/preset-react-webpack","package.json")))],a={legacyRootApi:!0},k=async(o,s)=>{let e=await s.presets.apply("framework");return typeof e=="string"?{name:e,options:a}:typeof e>"u"?{name:t.resolve("@storybook/react-webpack5"),options:a}:{name:e.name,options:{...a,...e.options}}},y=async(o,s)=>{let e=await s.presets.apply("framework");return{...o,builder:{name:r.dirname(t.resolve(r.join("@storybook/builder-webpack5","package.json"))),options:typeof e=="string"?{}:e.options.builder||{}},renderer:r.dirname(t.resolve(r.join("@storybook/react","package.json")))}},b=async o=>(o.resolve=o.resolve||{},o.resolve.alias={...o.resolve?.alias,"@storybook/react":r.dirname(t.resolve(r.join("@storybook/react","package.json")))},o);export{i as addons,y as core,k as frameworkOptions,b as webpack};
1
+ var __require=(x=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(x,{get:(a,b)=>(typeof require!="undefined"?require:a)[b]}):x)(function(x){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+x+'" is not supported')});import path from"path";var addons=[path.dirname(__require.resolve(path.join("@storybook/preset-react-webpack","package.json")))],defaultFrameworkOptions={legacyRootApi:!0},frameworkOptions=async(_,options)=>{let config=await options.presets.apply("framework");return typeof config=="string"?{name:config,options:defaultFrameworkOptions}:typeof config>"u"?{name:__require.resolve("@storybook/react-webpack5"),options:defaultFrameworkOptions}:{name:config.name,options:{...defaultFrameworkOptions,...config.options}}},core=async(config,options)=>{let framework=await options.presets.apply("framework");return{...config,builder:{name:path.dirname(__require.resolve(path.join("@storybook/builder-webpack5","package.json"))),options:typeof framework=="string"?{}:framework.options.builder||{}},renderer:path.dirname(__require.resolve(path.join("@storybook/react","package.json")))}},webpack=async config=>(config.resolve=config.resolve||{},config.resolve.alias={...config.resolve?.alias,"@storybook/react":path.dirname(__require.resolve(path.join("@storybook/react","package.json")))},config);export{addons,core,frameworkOptions,webpack};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-webpack5",
3
- "version": "7.0.0-alpha.53",
3
+ "version": "7.0.0-alpha.55",
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.53",
55
- "@storybook/preset-react-webpack": "7.0.0-alpha.53",
56
- "@storybook/react": "7.0.0-alpha.53",
54
+ "@storybook/builder-webpack5": "7.0.0-alpha.55",
55
+ "@storybook/preset-react-webpack": "7.0.0-alpha.55",
56
+ "@storybook/react": "7.0.0-alpha.55",
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": "fd1cf81615a5ddac3369e7bb567a1a43081fdc23"
89
+ "gitHead": "55cd2ab63d1f897de59e2471d2f916f7d2c13546"
90
90
  }