@storybook/web-components-vite 0.0.0-pr-23611-sha-3be4580c → 0.0.0-pr-23626-sha-e84041f2
Sign up to get free protection for your applications and to get access to all the features.
@@ -763,11 +763,16 @@ PackageJson$1.NonStandardEntryPoints &
|
|
763
763
|
PackageJson$1.TypeScriptConfiguration &
|
764
764
|
PackageJson$1.YarnConfiguration &
|
765
765
|
PackageJson$1.JSPMConfiguration;
|
766
|
+
|
767
|
+
type StoryId = string;
|
768
|
+
type ComponentTitle = string;
|
769
|
+
type StoryName = string;
|
766
770
|
type Tag = string;
|
767
771
|
interface Parameters {
|
768
772
|
[name: string]: any;
|
769
773
|
}
|
770
774
|
|
775
|
+
type ExportKey = string;
|
771
776
|
interface StoriesSpecifier {
|
772
777
|
/**
|
773
778
|
* When auto-titling, what to prefix all generated titles with (default: '')
|
@@ -801,10 +806,64 @@ interface IndexedCSFFile {
|
|
801
806
|
};
|
802
807
|
stories: IndexedStory[];
|
803
808
|
}
|
804
|
-
|
809
|
+
/**
|
810
|
+
* FIXME: This is a temporary type to allow us to deprecate the old indexer API.
|
811
|
+
* We should remove this type and the deprecated indexer API in 8.0.
|
812
|
+
*/
|
813
|
+
type BaseIndexer = {
|
814
|
+
/**
|
815
|
+
* A regular expression that should match all files to be handled by this indexer
|
816
|
+
*/
|
805
817
|
test: RegExp;
|
818
|
+
};
|
819
|
+
/**
|
820
|
+
* An indexer describes which filenames it handles, and how to index each individual file - turning it into an entry in the index.
|
821
|
+
*/
|
822
|
+
type Indexer = BaseIndexer & {
|
823
|
+
/**
|
824
|
+
* Indexes a file containing stories or docs.
|
825
|
+
* @param fileName The name of the file to index.
|
826
|
+
* @param options {@link IndexerOptions} for indexing the file.
|
827
|
+
* @returns A promise that resolves to an array of {@link IndexInput} objects.
|
828
|
+
*/
|
829
|
+
index: (fileName: string, options: IndexerOptions) => Promise<IndexInput[]>;
|
830
|
+
/**
|
831
|
+
* @deprecated Use {@link index} instead
|
832
|
+
*/
|
833
|
+
indexer?: never;
|
834
|
+
};
|
835
|
+
type DeprecatedIndexer = BaseIndexer & {
|
806
836
|
indexer: (fileName: string, options: IndexerOptions) => Promise<IndexedCSFFile>;
|
837
|
+
index?: never;
|
838
|
+
};
|
839
|
+
/**
|
840
|
+
* @deprecated Use {@link Indexer} instead
|
841
|
+
*/
|
842
|
+
type StoryIndexer = Indexer | DeprecatedIndexer;
|
843
|
+
interface BaseIndexInput {
|
844
|
+
/** the file to import from e.g. the story file */
|
845
|
+
importPath: Path;
|
846
|
+
/** the key to import from the file e.g. the story export for this entry */
|
847
|
+
key: ExportKey;
|
848
|
+
/** the location in the sidebar, auto-generated from {@link importPath} if unspecified */
|
849
|
+
title?: ComponentTitle;
|
850
|
+
/** the name of the story, auto-generated from {@link key} if unspecified */
|
851
|
+
name?: StoryName;
|
852
|
+
/** the unique story ID, auto-generated from {@link title} and {@link name} if unspecified */
|
853
|
+
id?: StoryId;
|
854
|
+
/** tags for filtering entries in Storybook and its tools */
|
855
|
+
tags?: Tag[];
|
807
856
|
}
|
857
|
+
type StoryIndexInput = BaseIndexInput & {
|
858
|
+
type: 'story';
|
859
|
+
};
|
860
|
+
type DocsIndexInput = BaseIndexInput & {
|
861
|
+
type: 'docs';
|
862
|
+
/** paths to story files that must be pre-loaded for this docs entry */
|
863
|
+
storiesImports?: Path[];
|
864
|
+
};
|
865
|
+
type IndexInput = StoryIndexInput | DocsIndexInput;
|
866
|
+
type Path = string;
|
808
867
|
|
809
868
|
interface Options$1 {
|
810
869
|
allowRegExp: boolean;
|
@@ -1079,8 +1138,13 @@ interface StorybookConfig$1 {
|
|
1079
1138
|
previewAnnotations?: PresetValue<Entry[]>;
|
1080
1139
|
/**
|
1081
1140
|
* Process CSF files for the story index.
|
1141
|
+
* @deprecated use {@link indexers} instead
|
1082
1142
|
*/
|
1083
1143
|
storyIndexers?: PresetValue<StoryIndexer[]>;
|
1144
|
+
/**
|
1145
|
+
* Process CSF files for the story index.
|
1146
|
+
*/
|
1147
|
+
indexers?: PresetValue<Indexer[]>;
|
1084
1148
|
/**
|
1085
1149
|
* Docs related features in index generation
|
1086
1150
|
*/
|
package/dist/index.d.ts
CHANGED
package/dist/preset.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/web-components-vite",
|
3
|
-
"version": "0.0.0-pr-
|
3
|
+
"version": "0.0.0-pr-23626-sha-e84041f2",
|
4
4
|
"description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.",
|
5
5
|
"keywords": [
|
6
6
|
"storybook"
|
@@ -47,10 +47,10 @@
|
|
47
47
|
"prep": "../../../scripts/prepare/bundle.ts"
|
48
48
|
},
|
49
49
|
"dependencies": {
|
50
|
-
"@storybook/builder-vite": "0.0.0-pr-
|
51
|
-
"@storybook/core-server": "0.0.0-pr-
|
52
|
-
"@storybook/node-logger": "0.0.0-pr-
|
53
|
-
"@storybook/web-components": "0.0.0-pr-
|
50
|
+
"@storybook/builder-vite": "0.0.0-pr-23626-sha-e84041f2",
|
51
|
+
"@storybook/core-server": "0.0.0-pr-23626-sha-e84041f2",
|
52
|
+
"@storybook/node-logger": "0.0.0-pr-23626-sha-e84041f2",
|
53
|
+
"@storybook/web-components": "0.0.0-pr-23626-sha-e84041f2",
|
54
54
|
"magic-string": "^0.30.0"
|
55
55
|
},
|
56
56
|
"devDependencies": {
|