@storybook/web-components-vite 0.0.0-pr-22285-sha-d07bfc52 → 0.0.0-pr-23626-sha-0d5a537f
Sign up to get free protection for your applications and to get access to all the features.
@@ -718,11 +718,16 @@ PackageJson$1.NonStandardEntryPoints &
|
|
718
718
|
PackageJson$1.TypeScriptConfiguration &
|
719
719
|
PackageJson$1.YarnConfiguration &
|
720
720
|
PackageJson$1.JSPMConfiguration;
|
721
|
+
|
722
|
+
type StoryId = string;
|
723
|
+
type ComponentTitle = string;
|
724
|
+
type StoryName = string;
|
721
725
|
type Tag = string;
|
722
726
|
interface Parameters {
|
723
727
|
[name: string]: any;
|
724
728
|
}
|
725
729
|
|
730
|
+
type ExportKey = string;
|
726
731
|
interface StoriesSpecifier {
|
727
732
|
/**
|
728
733
|
* When auto-titling, what to prefix all generated titles with (default: '')
|
@@ -756,10 +761,64 @@ interface IndexedCSFFile {
|
|
756
761
|
};
|
757
762
|
stories: IndexedStory[];
|
758
763
|
}
|
759
|
-
|
764
|
+
/**
|
765
|
+
* FIXME: This is a temporary type to allow us to deprecate the old indexer API.
|
766
|
+
* We should remove this type and the deprecated indexer API in 8.0.
|
767
|
+
*/
|
768
|
+
type BaseIndexer = {
|
769
|
+
/**
|
770
|
+
* A regular expression that should match all files to be handled by this indexer
|
771
|
+
*/
|
760
772
|
test: RegExp;
|
773
|
+
};
|
774
|
+
/**
|
775
|
+
* An indexer describes which filenames it handles, and how to index each individual file - turning it into an entry in the index.
|
776
|
+
*/
|
777
|
+
type Indexer = BaseIndexer & {
|
778
|
+
/**
|
779
|
+
* Indexes a file containing stories or docs.
|
780
|
+
* @param fileName The name of the file to index.
|
781
|
+
* @param options {@link IndexerOptions} for indexing the file.
|
782
|
+
* @returns A promise that resolves to an array of {@link IndexInput} objects.
|
783
|
+
*/
|
784
|
+
index: (fileName: string, options: IndexerOptions) => Promise<IndexInput[]>;
|
785
|
+
/**
|
786
|
+
* @deprecated Use {@link index} instead
|
787
|
+
*/
|
788
|
+
indexer?: never;
|
789
|
+
};
|
790
|
+
type DeprecatedIndexer = BaseIndexer & {
|
761
791
|
indexer: (fileName: string, options: IndexerOptions) => Promise<IndexedCSFFile>;
|
792
|
+
index?: never;
|
793
|
+
};
|
794
|
+
/**
|
795
|
+
* @deprecated Use {@link Indexer} instead
|
796
|
+
*/
|
797
|
+
type StoryIndexer = Indexer | DeprecatedIndexer;
|
798
|
+
interface BaseIndexInput {
|
799
|
+
/** the file to import from e.g. the story file */
|
800
|
+
importPath: Path;
|
801
|
+
/** the key to import from the file e.g. the story export for this entry */
|
802
|
+
key: ExportKey;
|
803
|
+
/** the location in the sidebar, auto-generated from {@link importPath} if unspecified */
|
804
|
+
title?: ComponentTitle;
|
805
|
+
/** the name of the story, auto-generated from {@link key} if unspecified */
|
806
|
+
name?: StoryName;
|
807
|
+
/** the unique story ID, auto-generated from {@link title} and {@link name} if unspecified */
|
808
|
+
id?: StoryId;
|
809
|
+
/** tags for filtering entries in Storybook and its tools */
|
810
|
+
tags?: Tag[];
|
762
811
|
}
|
812
|
+
type StoryIndexInput = BaseIndexInput & {
|
813
|
+
type: 'story';
|
814
|
+
};
|
815
|
+
type DocsIndexInput = BaseIndexInput & {
|
816
|
+
type: 'docs';
|
817
|
+
/** paths to story files that must be pre-loaded for this docs entry */
|
818
|
+
storiesImports?: Path[];
|
819
|
+
};
|
820
|
+
type IndexInput = StoryIndexInput | DocsIndexInput;
|
821
|
+
type Path = string;
|
763
822
|
|
764
823
|
interface Options$1 {
|
765
824
|
allowRegExp: boolean;
|
@@ -1035,8 +1094,13 @@ interface StorybookConfig$1 {
|
|
1035
1094
|
previewAnnotations?: PresetValue<Entry[]>;
|
1036
1095
|
/**
|
1037
1096
|
* Process CSF files for the story index.
|
1097
|
+
* @deprecated use {@link indexers} instead
|
1038
1098
|
*/
|
1039
1099
|
storyIndexers?: PresetValue<StoryIndexer[]>;
|
1100
|
+
/**
|
1101
|
+
* Process CSF files for the story index.
|
1102
|
+
*/
|
1103
|
+
indexers?: PresetValue<Indexer[]>;
|
1040
1104
|
/**
|
1041
1105
|
* Docs related features in index generation
|
1042
1106
|
*/
|
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-0d5a537f",
|
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-0d5a537f",
|
51
|
+
"@storybook/core-server": "0.0.0-pr-23626-sha-0d5a537f",
|
52
|
+
"@storybook/node-logger": "0.0.0-pr-23626-sha-0d5a537f",
|
53
|
+
"@storybook/web-components": "0.0.0-pr-23626-sha-0d5a537f",
|
54
54
|
"magic-string": "^0.30.0"
|
55
55
|
},
|
56
56
|
"devDependencies": {
|