@storybook/react-vite 7.0.0-beta.61 → 7.0.0-beta.63
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-
|
|
1
|
+
export { F as FrameworkOptions, S as StorybookConfig } from './types-e9ac69bc.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-
|
|
1
|
+
import { P as PresetProperty, S as StorybookConfig } from './types-e9ac69bc.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
|
*/
|
|
@@ -1060,6 +1061,15 @@ type FrameworkName = '@storybook/react-vite';
|
|
|
1060
1061
|
type BuilderName = '@storybook/builder-vite';
|
|
1061
1062
|
type FrameworkOptions = {
|
|
1062
1063
|
builder?: BuilderOptions$1;
|
|
1064
|
+
strictMode?: boolean;
|
|
1065
|
+
/**
|
|
1066
|
+
* Use React's legacy root API to mount components
|
|
1067
|
+
* @description
|
|
1068
|
+
* React has introduced a new root API with React 18.x to enable a whole set of new features (e.g. concurrent features)
|
|
1069
|
+
* If this flag is true, the legacy Root API is used to mount components to make it easier to migrate step by step to React 18.
|
|
1070
|
+
* @default false
|
|
1071
|
+
*/
|
|
1072
|
+
legacyRootApi?: boolean;
|
|
1063
1073
|
};
|
|
1064
1074
|
type StorybookConfigFramework = {
|
|
1065
1075
|
framework: FrameworkName | {
|
|
@@ -1073,9 +1083,23 @@ type StorybookConfigFramework = {
|
|
|
1073
1083
|
};
|
|
1074
1084
|
};
|
|
1075
1085
|
};
|
|
1086
|
+
type TypescriptOptions = TypescriptOptions$1 & {
|
|
1087
|
+
/**
|
|
1088
|
+
* Sets the type of Docgen when working with React and TypeScript
|
|
1089
|
+
*
|
|
1090
|
+
* @default `'react-docgen-typescript'`
|
|
1091
|
+
*/
|
|
1092
|
+
reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false;
|
|
1093
|
+
/**
|
|
1094
|
+
* Configures `@joshwooding/vite-plugin-react-docgen-typescript`
|
|
1095
|
+
*/
|
|
1096
|
+
reactDocgenTypescriptOptions: Parameters<typeof docgenTypescript>[0];
|
|
1097
|
+
};
|
|
1076
1098
|
/**
|
|
1077
1099
|
* The interface for Storybook configuration in `main.ts` files.
|
|
1078
1100
|
*/
|
|
1079
|
-
type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigVite | keyof StorybookConfigFramework> & StorybookConfigVite & StorybookConfigFramework
|
|
1101
|
+
type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigVite | keyof StorybookConfigFramework> & StorybookConfigVite & StorybookConfigFramework & {
|
|
1102
|
+
typescript?: Partial<TypescriptOptions>;
|
|
1103
|
+
};
|
|
1080
1104
|
|
|
1081
1105
|
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.
|
|
3
|
+
"version": "7.0.0-beta.63",
|
|
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.
|
|
54
|
-
"@storybook/react": "7.0.0-beta.
|
|
53
|
+
"@storybook/builder-vite": "7.0.0-beta.63",
|
|
54
|
+
"@storybook/react": "7.0.0-beta.63",
|
|
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": "
|
|
83
|
+
"gitHead": "5a1c2753f9c30f3b12eb158dfa5e93706ad0e9a8"
|
|
84
84
|
}
|