@storybook/html-vite 8.0.0-alpha.9 → 8.0.0-beta.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.
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FileSystemCache } from 'file-system-cache';
|
|
2
2
|
import { Server } from 'http';
|
|
3
|
-
import { BuilderOptions as BuilderOptions$1, StorybookConfigVite } from '@storybook/builder-vite';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
|
|
@@ -721,7 +720,7 @@ PackageJson$1.JSPMConfiguration;
|
|
|
721
720
|
type StoryId = string;
|
|
722
721
|
type ComponentTitle = string;
|
|
723
722
|
type StoryName = string;
|
|
724
|
-
type Tag = string;
|
|
723
|
+
type Tag$1 = string;
|
|
725
724
|
|
|
726
725
|
interface Options$1 {
|
|
727
726
|
allowRegExp: boolean;
|
|
@@ -799,7 +798,9 @@ type BaseIndexInput = {
|
|
|
799
798
|
*/
|
|
800
799
|
metaId?: MetaId;
|
|
801
800
|
/** Tags for filtering entries in Storybook and its tools. */
|
|
802
|
-
tags?: Tag[];
|
|
801
|
+
tags?: Tag$1[];
|
|
802
|
+
/** Tags from the meta for filtering entries in Storybook and its tools. */
|
|
803
|
+
metaTags?: Tag$1[];
|
|
803
804
|
/**
|
|
804
805
|
* The id of the entry, auto-generated from {@link title}/{@link metaId} and {@link exportName} if unspecified.
|
|
805
806
|
* If specified, the story in the CSF file _must_ have a matching id set at `parameters.__id`, to be correctly matched.
|
|
@@ -826,11 +827,11 @@ type IndexInput = StoryIndexInput | DocsIndexInput;
|
|
|
826
827
|
/**
|
|
827
828
|
* ⚠️ This file contains internal WIP types they MUST NOT be exported outside this package for now!
|
|
828
829
|
*/
|
|
829
|
-
type BuilderName
|
|
830
|
+
type BuilderName = 'webpack5' | '@storybook/builder-webpack5' | string;
|
|
830
831
|
type RendererName = string;
|
|
831
832
|
interface CoreConfig {
|
|
832
|
-
builder?: BuilderName
|
|
833
|
-
name: BuilderName
|
|
833
|
+
builder?: BuilderName | {
|
|
834
|
+
name: BuilderName;
|
|
834
835
|
options?: Record<string, any>;
|
|
835
836
|
};
|
|
836
837
|
renderer?: RendererName;
|
|
@@ -1037,6 +1038,12 @@ interface TestBuildFlags {
|
|
|
1037
1038
|
interface TestBuildConfig {
|
|
1038
1039
|
test?: TestBuildFlags;
|
|
1039
1040
|
}
|
|
1041
|
+
type Tag = string;
|
|
1042
|
+
interface TagOptions {
|
|
1043
|
+
excludeFromSidebar: boolean;
|
|
1044
|
+
excludeFromDocsStories: boolean;
|
|
1045
|
+
}
|
|
1046
|
+
type TagsOptions = Record<Tag, Partial<TagOptions>>;
|
|
1040
1047
|
/**
|
|
1041
1048
|
* The interface for Storybook configuration used internally in presets
|
|
1042
1049
|
* The difference is that these values are the raw values, AKA, not wrapped with `PresetValue<>`
|
|
@@ -1071,9 +1078,9 @@ interface StorybookConfigRaw {
|
|
|
1071
1078
|
*/
|
|
1072
1079
|
disallowImplicitActionsInRenderV8?: boolean;
|
|
1073
1080
|
/**
|
|
1074
|
-
* Enable asynchronous component rendering in
|
|
1081
|
+
* Enable asynchronous component rendering in React renderer
|
|
1075
1082
|
*/
|
|
1076
|
-
|
|
1083
|
+
experimentalRSC?: boolean;
|
|
1077
1084
|
};
|
|
1078
1085
|
build?: TestBuildConfig;
|
|
1079
1086
|
stories: StoriesEntry[];
|
|
@@ -1084,7 +1091,6 @@ interface StorybookConfigRaw {
|
|
|
1084
1091
|
swc?: any;
|
|
1085
1092
|
env?: Record<string, string>;
|
|
1086
1093
|
babelDefault?: any;
|
|
1087
|
-
config?: Entry[];
|
|
1088
1094
|
previewAnnotations?: Entry[];
|
|
1089
1095
|
experimental_indexers?: Indexer[];
|
|
1090
1096
|
docs?: DocsOptions;
|
|
@@ -1092,13 +1098,14 @@ interface StorybookConfigRaw {
|
|
|
1092
1098
|
previewBody?: string;
|
|
1093
1099
|
previewMainTemplate?: string;
|
|
1094
1100
|
managerHead?: string;
|
|
1101
|
+
tags?: TagsOptions;
|
|
1095
1102
|
}
|
|
1096
1103
|
/**
|
|
1097
1104
|
* The interface for Storybook configuration in `main.ts` files.
|
|
1098
1105
|
* This interface is public
|
|
1099
1106
|
* All values should be wrapped with `PresetValue<>`, though there are a few exceptions: `addons`, `framework`
|
|
1100
1107
|
*/
|
|
1101
|
-
interface StorybookConfig
|
|
1108
|
+
interface StorybookConfig {
|
|
1102
1109
|
/**
|
|
1103
1110
|
* Sets the addons you want to use with Storybook.
|
|
1104
1111
|
*
|
|
@@ -1149,12 +1156,6 @@ interface StorybookConfig$1 {
|
|
|
1149
1156
|
* Modify or return babel config.
|
|
1150
1157
|
*/
|
|
1151
1158
|
babelDefault?: PresetValue<StorybookConfigRaw['babelDefault']>;
|
|
1152
|
-
/**
|
|
1153
|
-
* Add additional scripts to run in the preview a la `.storybook/preview.js`
|
|
1154
|
-
*
|
|
1155
|
-
* @deprecated use `previewAnnotations` or `/preview.js` file instead
|
|
1156
|
-
*/
|
|
1157
|
-
config?: PresetValue<StorybookConfigRaw['config']>;
|
|
1158
1159
|
/**
|
|
1159
1160
|
* Add additional scripts to run in the preview a la `.storybook/preview.js`
|
|
1160
1161
|
*/
|
|
@@ -1188,32 +1189,14 @@ interface StorybookConfig$1 {
|
|
|
1188
1189
|
* which is the existing head content, and return a modified string.
|
|
1189
1190
|
*/
|
|
1190
1191
|
managerHead?: PresetValue<StorybookConfigRaw['managerHead']>;
|
|
1192
|
+
/**
|
|
1193
|
+
* Configure non-standard tag behaviors
|
|
1194
|
+
*/
|
|
1195
|
+
tags?: PresetValue<StorybookConfigRaw['tags']>;
|
|
1191
1196
|
}
|
|
1192
1197
|
type PresetValue<T> = T | ((config: T, options: Options) => T | Promise<T>);
|
|
1193
1198
|
type PresetProperty<K, TStorybookConfig = StorybookConfigRaw> = TStorybookConfig[K extends keyof TStorybookConfig ? K : never] | PresetPropertyFn<K, TStorybookConfig>;
|
|
1194
1199
|
type PresetPropertyFn<K, TStorybookConfig = StorybookConfigRaw, TOptions = {}> = (config: TStorybookConfig[K extends keyof TStorybookConfig ? K : never], options: Options & TOptions) => TStorybookConfig[K extends keyof TStorybookConfig ? K : never] | Promise<TStorybookConfig[K extends keyof TStorybookConfig ? K : never]>;
|
|
1195
1200
|
type Path = string;
|
|
1196
1201
|
|
|
1197
|
-
|
|
1198
|
-
type BuilderName = '@storybook/builder-vite';
|
|
1199
|
-
type FrameworkOptions = {
|
|
1200
|
-
builder?: BuilderOptions$1;
|
|
1201
|
-
};
|
|
1202
|
-
type StorybookConfigFramework = {
|
|
1203
|
-
framework: FrameworkName | {
|
|
1204
|
-
name: FrameworkName;
|
|
1205
|
-
options: FrameworkOptions;
|
|
1206
|
-
};
|
|
1207
|
-
core?: StorybookConfig$1['core'] & {
|
|
1208
|
-
builder?: BuilderName | {
|
|
1209
|
-
name: BuilderName;
|
|
1210
|
-
options: BuilderOptions$1;
|
|
1211
|
-
};
|
|
1212
|
-
};
|
|
1213
|
-
};
|
|
1214
|
-
/**
|
|
1215
|
-
* The interface for Storybook configuration in `main.ts` files.
|
|
1216
|
-
*/
|
|
1217
|
-
type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigVite | keyof StorybookConfigFramework> & StorybookConfigVite & StorybookConfigFramework;
|
|
1218
|
-
|
|
1219
|
-
export { FrameworkOptions as F, PresetProperty as P, StorybookConfig as S };
|
|
1202
|
+
export { PresetProperty as P, StorybookConfig as S };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
import { S as StorybookConfig$1 } from './index.d-c7bdf65c.js';
|
|
2
|
+
import { BuilderOptions, StorybookConfigVite } from '@storybook/builder-vite';
|
|
2
3
|
import 'file-system-cache';
|
|
3
4
|
import 'http';
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
type FrameworkName = '@storybook/html-vite';
|
|
7
|
+
type BuilderName = '@storybook/builder-vite';
|
|
8
|
+
type FrameworkOptions = {
|
|
9
|
+
builder?: BuilderOptions;
|
|
10
|
+
};
|
|
11
|
+
type StorybookConfigFramework = {
|
|
12
|
+
framework: FrameworkName | {
|
|
13
|
+
name: FrameworkName;
|
|
14
|
+
options: FrameworkOptions;
|
|
15
|
+
};
|
|
16
|
+
core?: StorybookConfig$1['core'] & {
|
|
17
|
+
builder?: BuilderName | {
|
|
18
|
+
name: BuilderName;
|
|
19
|
+
options: BuilderOptions;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* The interface for Storybook configuration in `main.ts` files.
|
|
25
|
+
*/
|
|
26
|
+
type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigVite | keyof StorybookConfigFramework> & StorybookConfigVite & StorybookConfigFramework;
|
|
27
|
+
|
|
28
|
+
export { FrameworkOptions, StorybookConfig };
|
package/dist/preset.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { P as PresetProperty
|
|
1
|
+
import { P as PresetProperty } from './index.d-c7bdf65c.js';
|
|
2
2
|
import 'file-system-cache';
|
|
3
3
|
import 'http';
|
|
4
|
-
import '@storybook/builder-vite';
|
|
5
4
|
|
|
6
|
-
declare const core: PresetProperty<'core'
|
|
5
|
+
declare const core: PresetProperty<'core'>;
|
|
7
6
|
|
|
8
7
|
export { core };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/html-vite",
|
|
3
|
-
"version": "8.0.0-
|
|
3
|
+
"version": "8.0.0-beta.0",
|
|
4
4
|
"description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@storybook/builder-vite": "8.0.0-
|
|
51
|
-
"@storybook/core-server": "8.0.0-
|
|
52
|
-
"@storybook/html": "8.0.0-
|
|
53
|
-
"@storybook/node-logger": "8.0.0-
|
|
50
|
+
"@storybook/builder-vite": "8.0.0-beta.0",
|
|
51
|
+
"@storybook/core-server": "8.0.0-beta.0",
|
|
52
|
+
"@storybook/html": "8.0.0-beta.0",
|
|
53
|
+
"@storybook/node-logger": "8.0.0-beta.0",
|
|
54
54
|
"magic-string": "^0.30.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|