@storybook/react-vite 7.0.0-beta.60 → 7.0.0-beta.62

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,5 +1,6 @@
1
- export { F as FrameworkOptions, S as StorybookConfig } from './types-49eb1e7e.js';
1
+ export { F as FrameworkOptions, S as StorybookConfig } from './types-ad17db6c.js';
2
2
  import 'file-system-cache';
3
3
  import '@babel/core';
4
4
  import 'http';
5
5
  import '@storybook/builder-vite';
6
+ import '@joshwooding/vite-plugin-react-docgen-typescript';
package/dist/preset.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- import { P as PresetProperty, S as StorybookConfig } from './types-49eb1e7e.js';
1
+ import { P as PresetProperty, S as StorybookConfig } from './types-ad17db6c.js';
2
2
  import 'file-system-cache';
3
3
  import '@babel/core';
4
4
  import 'http';
5
5
  import '@storybook/builder-vite';
6
+ import '@joshwooding/vite-plugin-react-docgen-typescript';
6
7
 
7
8
  declare const core: PresetProperty<'core', StorybookConfig>;
8
9
  declare const viteFinal: StorybookConfig['viteFinal'];
@@ -2,6 +2,7 @@ import { FileSystemCache } from 'file-system-cache';
2
2
  import { TransformOptions } from '@babel/core';
3
3
  import { Server } from 'http';
4
4
  import { BuilderOptions as BuilderOptions$1, StorybookConfigVite } from '@storybook/builder-vite';
5
+ import docgenTypescript from '@joshwooding/vite-plugin-react-docgen-typescript';
5
6
 
6
7
  /**
7
8
  Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
@@ -719,7 +720,7 @@ PackageJson$1.TypeScriptConfiguration &
719
720
  PackageJson$1.YarnConfiguration &
720
721
  PackageJson$1.JSPMConfiguration;
721
722
  type Tag = string;
722
- interface Parameters {
723
+ interface Parameters$1 {
723
724
  [name: string]: any;
724
725
  }
725
726
 
@@ -747,7 +748,7 @@ interface IndexedStory {
747
748
  id: string;
748
749
  name: string;
749
750
  tags?: Tag[];
750
- parameters?: Parameters;
751
+ parameters?: Parameters$1;
751
752
  }
752
753
  interface IndexedCSFFile {
753
754
  meta: {
@@ -814,7 +815,7 @@ interface DirectoryMapping {
814
815
  to: string;
815
816
  }
816
817
  interface Presets {
817
- apply(extension: 'typescript', config: TypescriptOptions, args?: Options): Promise<TypescriptOptions>;
818
+ apply(extension: 'typescript', config: TypescriptOptions$1, args?: Options): Promise<TypescriptOptions$1>;
818
819
  apply(extension: 'framework', config?: {}, args?: any): Promise<Preset>;
819
820
  apply(extension: 'babel', config?: {}, args?: any): Promise<TransformOptions>;
820
821
  apply(extension: 'entries', config?: [], args?: any): Promise<unknown>;
@@ -900,7 +901,7 @@ type Options = LoadOptions & StorybookConfigOptions & CLIOptions & BuilderOption
900
901
  /**
901
902
  * Options for TypeScript usage within Storybook.
902
903
  */
903
- interface TypescriptOptions {
904
+ interface TypescriptOptions$1 {
904
905
  /**
905
906
  * Enables type checking within Storybook.
906
907
  *
@@ -1013,7 +1014,7 @@ interface StorybookConfig$1 {
1013
1014
  /**
1014
1015
  * Controls how Storybook handles TypeScript files.
1015
1016
  */
1016
- typescript?: Partial<TypescriptOptions>;
1017
+ typescript?: Partial<TypescriptOptions$1>;
1017
1018
  /**
1018
1019
  * References external Storybooks
1019
1020
  */
@@ -1073,9 +1074,23 @@ type StorybookConfigFramework = {
1073
1074
  };
1074
1075
  };
1075
1076
  };
1077
+ type TypescriptOptions = TypescriptOptions$1 & {
1078
+ /**
1079
+ * Sets the type of Docgen when working with React and TypeScript
1080
+ *
1081
+ * @default `'react-docgen-typescript'`
1082
+ */
1083
+ reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false;
1084
+ /**
1085
+ * Configures `@joshwooding/vite-plugin-react-docgen-typescript`
1086
+ */
1087
+ reactDocgenTypescriptOptions: Parameters<typeof docgenTypescript>[0];
1088
+ };
1076
1089
  /**
1077
1090
  * The interface for Storybook configuration in `main.ts` files.
1078
1091
  */
1079
- type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigVite | keyof StorybookConfigFramework> & StorybookConfigVite & StorybookConfigFramework;
1092
+ type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigVite | keyof StorybookConfigFramework> & StorybookConfigVite & StorybookConfigFramework & {
1093
+ typescript?: Partial<TypescriptOptions>;
1094
+ };
1080
1095
 
1081
1096
  export { FrameworkOptions as F, PresetProperty as P, StorybookConfig as S };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-vite",
3
- "version": "7.0.0-beta.60",
3
+ "version": "7.0.0-beta.62",
4
4
  "description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.",
5
5
  "keywords": [
6
6
  "storybook"
@@ -50,8 +50,8 @@
50
50
  "dependencies": {
51
51
  "@joshwooding/vite-plugin-react-docgen-typescript": "^0.2.1",
52
52
  "@rollup/pluginutils": "^4.2.0",
53
- "@storybook/builder-vite": "7.0.0-beta.60",
54
- "@storybook/react": "7.0.0-beta.60",
53
+ "@storybook/builder-vite": "7.0.0-beta.62",
54
+ "@storybook/react": "7.0.0-beta.62",
55
55
  "@vitejs/plugin-react": "^3.0.1",
56
56
  "ast-types": "^0.14.2",
57
57
  "magic-string": "^0.27.0",
@@ -80,5 +80,5 @@
80
80
  ],
81
81
  "platform": "node"
82
82
  },
83
- "gitHead": "325e0406b449b740d94d481a32a62304a8b2fd11"
83
+ "gitHead": "f70dcdb599363bfd6e6d2b63f8fadd02e9cbe00a"
84
84
  }