@storybook/nextjs 7.2.2-alpha.1 → 7.2.3
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.
|
@@ -850,8 +850,6 @@ type ArgsStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = (args: T
|
|
|
850
850
|
type StoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = LegacyStoryFn<TRenderer, TArgs> | ArgsStoryFn<TRenderer, TArgs>;
|
|
851
851
|
type DecoratorFunction<TRenderer extends Renderer = Renderer, TArgs = Args> = (fn: PartialStoryFn<TRenderer, TArgs>, c: StoryContext<TRenderer, TArgs>) => TRenderer['storyResult'];
|
|
852
852
|
|
|
853
|
-
type ExportName = string;
|
|
854
|
-
type MetaId = string;
|
|
855
853
|
interface StoriesSpecifier {
|
|
856
854
|
/**
|
|
857
855
|
* When auto-titling, what to prefix all generated titles with (default: '')
|
|
@@ -886,89 +884,16 @@ interface IndexedCSFFile {
|
|
|
886
884
|
};
|
|
887
885
|
stories: IndexedStory[];
|
|
888
886
|
}
|
|
889
|
-
|
|
890
|
-
* FIXME: This is a temporary type to allow us to deprecate the old indexer API.
|
|
891
|
-
* We should remove this type and the deprecated indexer API in 8.0.
|
|
892
|
-
*/
|
|
893
|
-
type BaseIndexer = {
|
|
894
|
-
/**
|
|
895
|
-
* A regular expression that should match all files to be handled by this indexer
|
|
896
|
-
*/
|
|
887
|
+
interface StoryIndexer {
|
|
897
888
|
test: RegExp;
|
|
898
|
-
};
|
|
899
|
-
/**
|
|
900
|
-
* An indexer describes which filenames it handles, and how to index each individual file - turning it into an entry in the index.
|
|
901
|
-
*/
|
|
902
|
-
type Indexer = BaseIndexer & {
|
|
903
|
-
/**
|
|
904
|
-
* Indexes a file containing stories or docs.
|
|
905
|
-
* @param fileName The name of the file to index.
|
|
906
|
-
* @param options {@link IndexerOptions} for indexing the file.
|
|
907
|
-
* @returns A promise that resolves to an array of {@link IndexInput} objects.
|
|
908
|
-
*/
|
|
909
|
-
index: (fileName: string, options: IndexerOptions) => Promise<IndexInput[]>;
|
|
910
|
-
/**
|
|
911
|
-
* @soonDeprecated Use {@link index} instead
|
|
912
|
-
*/
|
|
913
|
-
indexer?: never;
|
|
914
|
-
};
|
|
915
|
-
type DeprecatedIndexer = BaseIndexer & {
|
|
916
889
|
indexer: (fileName: string, options: IndexerOptions) => Promise<IndexedCSFFile>;
|
|
917
|
-
|
|
918
|
-
};
|
|
919
|
-
/**
|
|
920
|
-
* @soonDeprecated Use {@link Indexer} instead
|
|
921
|
-
*/
|
|
922
|
-
type StoryIndexer = Indexer | DeprecatedIndexer;
|
|
923
|
-
/**
|
|
924
|
-
* The base input for indexing a story or docs entry.
|
|
925
|
-
*/
|
|
926
|
-
type BaseIndexInput = {
|
|
927
|
-
/** The file to import from e.g. the story file. */
|
|
928
|
-
importPath: Path;
|
|
929
|
-
/** The name of the export to import. */
|
|
930
|
-
exportName: ExportName;
|
|
931
|
-
/** The name of the entry, auto-generated from {@link exportName} if unspecified. */
|
|
932
|
-
name?: StoryName;
|
|
933
|
-
/** The location in the sidebar, auto-generated from {@link importPath} if unspecified. */
|
|
934
|
-
title?: ComponentTitle;
|
|
935
|
-
/**
|
|
936
|
-
* The custom id optionally set at `meta.id` if it needs to differ from the id generated via {@link title}.
|
|
937
|
-
* If unspecified, the meta id will be auto-generated from {@link title}.
|
|
938
|
-
* If specified, the meta in the CSF file _must_ have a matching id set at `meta.id`, to be correctly matched.
|
|
939
|
-
*/
|
|
940
|
-
metaId?: MetaId;
|
|
941
|
-
/** Tags for filtering entries in Storybook and its tools. */
|
|
942
|
-
tags?: Tag[];
|
|
943
|
-
/**
|
|
944
|
-
* The id of the entry, auto-generated from {@link title}/{@link metaId} and {@link exportName} if unspecified.
|
|
945
|
-
* If specified, the story in the CSF file _must_ have a matching id set at `parameters.__id`, to be correctly matched.
|
|
946
|
-
* Only use this if you need to override the auto-generated id.
|
|
947
|
-
*/
|
|
948
|
-
__id?: StoryId;
|
|
949
|
-
};
|
|
950
|
-
/**
|
|
951
|
-
* The input for indexing a story entry.
|
|
952
|
-
*/
|
|
953
|
-
type StoryIndexInput = BaseIndexInput & {
|
|
954
|
-
type: 'story';
|
|
955
|
-
};
|
|
956
|
-
/**
|
|
957
|
-
* The input for indexing a docs entry.
|
|
958
|
-
*/
|
|
959
|
-
type DocsIndexInput = BaseIndexInput & {
|
|
960
|
-
type: 'docs';
|
|
961
|
-
/** Paths to story files that must be pre-loaded for this docs entry. */
|
|
962
|
-
storiesImports?: Path[];
|
|
963
|
-
};
|
|
964
|
-
type IndexInput = StoryIndexInput | DocsIndexInput;
|
|
890
|
+
}
|
|
965
891
|
type Addon_ReturnTypeFramework<ReturnType> = {
|
|
966
892
|
component: any;
|
|
967
893
|
storyResult: ReturnType;
|
|
968
894
|
canvasElement: any;
|
|
969
895
|
};
|
|
970
896
|
type Addon_DecoratorFunction<StoryFnReturnType = unknown> = DecoratorFunction<Addon_ReturnTypeFramework<StoryFnReturnType>>;
|
|
971
|
-
type Path = string;
|
|
972
897
|
|
|
973
898
|
interface Options$1 {
|
|
974
899
|
allowRegExp: boolean;
|
|
@@ -1244,13 +1169,8 @@ interface StorybookConfig {
|
|
|
1244
1169
|
previewAnnotations?: PresetValue<Entry[]>;
|
|
1245
1170
|
/**
|
|
1246
1171
|
* Process CSF files for the story index.
|
|
1247
|
-
* @soonDeprecated use {@link experimental_indexers} instead
|
|
1248
1172
|
*/
|
|
1249
1173
|
storyIndexers?: PresetValue<StoryIndexer[]>;
|
|
1250
|
-
/**
|
|
1251
|
-
* Process CSF files for the story index.
|
|
1252
|
-
*/
|
|
1253
|
-
experimental_indexers?: PresetValue<Indexer[]>;
|
|
1254
1174
|
/**
|
|
1255
1175
|
* Docs related features in index generation
|
|
1256
1176
|
*/
|
package/dist/preset.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PresetProperty, O as Options } from './index.d-
|
|
1
|
+
import { P as PresetProperty, O as Options } from './index.d-c2d0c557.js';
|
|
2
2
|
import { TransformOptions } from '@babel/core';
|
|
3
3
|
import { StorybookConfig } from './index.js';
|
|
4
4
|
import 'file-system-cache';
|
package/dist/preview.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/nextjs",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.3",
|
|
4
4
|
"description": "Storybook for Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
"@babel/preset-react": "^7.22.5",
|
|
72
72
|
"@babel/preset-typescript": "^7.22.5",
|
|
73
73
|
"@babel/runtime": "^7.22.6",
|
|
74
|
-
"@storybook/addon-actions": "7.2.
|
|
75
|
-
"@storybook/builder-webpack5": "7.2.
|
|
76
|
-
"@storybook/core-common": "7.2.
|
|
77
|
-
"@storybook/node-logger": "7.2.
|
|
78
|
-
"@storybook/preset-react-webpack": "7.2.
|
|
79
|
-
"@storybook/preview-api": "7.2.
|
|
80
|
-
"@storybook/react": "7.2.
|
|
74
|
+
"@storybook/addon-actions": "7.2.3",
|
|
75
|
+
"@storybook/builder-webpack5": "7.2.3",
|
|
76
|
+
"@storybook/core-common": "7.2.3",
|
|
77
|
+
"@storybook/node-logger": "7.2.3",
|
|
78
|
+
"@storybook/preset-react-webpack": "7.2.3",
|
|
79
|
+
"@storybook/preview-api": "7.2.3",
|
|
80
|
+
"@storybook/react": "7.2.3",
|
|
81
81
|
"@types/node": "^16.0.0",
|
|
82
82
|
"css-loader": "^6.7.3",
|
|
83
83
|
"find-up": "^5.0.0",
|