@storybook/react-dom-shim 7.2.2-alpha.0 → 7.2.2

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.
Files changed (2) hide show
  1. package/dist/preset.d.ts +2 -86
  2. package/package.json +2 -2
package/dist/preset.d.ts CHANGED
@@ -717,17 +717,11 @@ PackageJson$1.NonStandardEntryPoints &
717
717
  PackageJson$1.TypeScriptConfiguration &
718
718
  PackageJson$1.YarnConfiguration &
719
719
  PackageJson$1.JSPMConfiguration;
720
-
721
- type StoryId = string;
722
- type ComponentTitle = string;
723
- type StoryName = string;
724
720
  type Tag = string;
725
721
  interface Parameters {
726
722
  [name: string]: any;
727
723
  }
728
724
 
729
- type ExportName = string;
730
- type MetaId = string;
731
725
  interface StoriesSpecifier {
732
726
  /**
733
727
  * When auto-titling, what to prefix all generated titles with (default: '')
@@ -762,83 +756,10 @@ interface IndexedCSFFile {
762
756
  };
763
757
  stories: IndexedStory[];
764
758
  }
765
- /**
766
- * FIXME: This is a temporary type to allow us to deprecate the old indexer API.
767
- * We should remove this type and the deprecated indexer API in 8.0.
768
- */
769
- type BaseIndexer = {
770
- /**
771
- * A regular expression that should match all files to be handled by this indexer
772
- */
759
+ interface StoryIndexer {
773
760
  test: RegExp;
774
- };
775
- /**
776
- * An indexer describes which filenames it handles, and how to index each individual file - turning it into an entry in the index.
777
- */
778
- type Indexer = BaseIndexer & {
779
- /**
780
- * Indexes a file containing stories or docs.
781
- * @param fileName The name of the file to index.
782
- * @param options {@link IndexerOptions} for indexing the file.
783
- * @returns A promise that resolves to an array of {@link IndexInput} objects.
784
- */
785
- index: (fileName: string, options: IndexerOptions) => Promise<IndexInput[]>;
786
- /**
787
- * @soonDeprecated Use {@link index} instead
788
- */
789
- indexer?: never;
790
- };
791
- type DeprecatedIndexer = BaseIndexer & {
792
761
  indexer: (fileName: string, options: IndexerOptions) => Promise<IndexedCSFFile>;
793
- index?: never;
794
- };
795
- /**
796
- * @soonDeprecated Use {@link Indexer} instead
797
- */
798
- type StoryIndexer = Indexer | DeprecatedIndexer;
799
- /**
800
- * The base input for indexing a story or docs entry.
801
- */
802
- type BaseIndexInput = {
803
- /** The file to import from e.g. the story file. */
804
- importPath: Path;
805
- /** The name of the export to import. */
806
- exportName: ExportName;
807
- /** The name of the entry, auto-generated from {@link exportName} if unspecified. */
808
- name?: StoryName;
809
- /** The location in the sidebar, auto-generated from {@link importPath} if unspecified. */
810
- title?: ComponentTitle;
811
- /**
812
- * The custom id optionally set at `meta.id` if it needs to differ from the id generated via {@link title}.
813
- * If unspecified, the meta id will be auto-generated from {@link title}.
814
- * If specified, the meta in the CSF file _must_ have a matching id set at `meta.id`, to be correctly matched.
815
- */
816
- metaId?: MetaId;
817
- /** Tags for filtering entries in Storybook and its tools. */
818
- tags?: Tag[];
819
- /**
820
- * The id of the entry, auto-generated from {@link title}/{@link metaId} and {@link exportName} if unspecified.
821
- * If specified, the story in the CSF file _must_ have a matching id set at `parameters.__id`, to be correctly matched.
822
- * Only use this if you need to override the auto-generated id.
823
- */
824
- __id?: StoryId;
825
- };
826
- /**
827
- * The input for indexing a story entry.
828
- */
829
- type StoryIndexInput = BaseIndexInput & {
830
- type: 'story';
831
- };
832
- /**
833
- * The input for indexing a docs entry.
834
- */
835
- type DocsIndexInput = BaseIndexInput & {
836
- type: 'docs';
837
- /** Paths to story files that must be pre-loaded for this docs entry. */
838
- storiesImports?: Path[];
839
- };
840
- type IndexInput = StoryIndexInput | DocsIndexInput;
841
- type Path = string;
762
+ }
842
763
 
843
764
  interface Options$1 {
844
765
  allowRegExp: boolean;
@@ -1114,13 +1035,8 @@ interface StorybookConfig {
1114
1035
  previewAnnotations?: PresetValue<Entry[]>;
1115
1036
  /**
1116
1037
  * Process CSF files for the story index.
1117
- * @soonDeprecated use {@link experimental_indexers} instead
1118
1038
  */
1119
1039
  storyIndexers?: PresetValue<StoryIndexer[]>;
1120
- /**
1121
- * Process CSF files for the story index.
1122
- */
1123
- experimental_indexers?: PresetValue<Indexer[]>;
1124
1040
  /**
1125
1041
  * Docs related features in index generation
1126
1042
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-dom-shim",
3
- "version": "7.2.2-alpha.0",
3
+ "version": "7.2.2",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "storybook"
@@ -53,7 +53,7 @@
53
53
  "prep": "../../../scripts/prepare/bundle.ts"
54
54
  },
55
55
  "devDependencies": {
56
- "@storybook/types": "7.2.2-alpha.0",
56
+ "@storybook/types": "7.2.2",
57
57
  "typescript": "~4.9.3"
58
58
  },
59
59
  "peerDependencies": {