storybook 9.0.0-beta.10 → 9.0.0-beta.11

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 (54) hide show
  1. package/dist/actions/preview.cjs +1 -1
  2. package/dist/actions/preview.d.ts +501 -0
  3. package/dist/actions/preview.js +1 -1
  4. package/dist/backgrounds/index.d.ts +501 -0
  5. package/dist/backgrounds/preview.d.ts +501 -0
  6. package/dist/bin/index.cjs +44 -44
  7. package/dist/bin/index.js +44 -44
  8. package/dist/cli/bin/index.cjs +1032 -1032
  9. package/dist/cli/bin/index.js +1032 -1032
  10. package/dist/cli/index.cjs +33709 -28783
  11. package/dist/cli/index.js +33641 -28711
  12. package/dist/common/index.cjs +482 -482
  13. package/dist/common/index.js +466 -466
  14. package/dist/controls/preview.d.ts +501 -0
  15. package/dist/core-server/index.cjs +12 -12
  16. package/dist/core-server/index.d.ts +512 -11
  17. package/dist/core-server/index.js +12 -12
  18. package/dist/core-server/presets/common-manager.js +2 -2
  19. package/dist/core-server/presets/common-override-preset.cjs +10 -12
  20. package/dist/core-server/presets/common-override-preset.js +3 -5
  21. package/dist/core-server/presets/common-preset.cjs +112 -116
  22. package/dist/core-server/presets/common-preset.js +10 -14
  23. package/dist/highlight/preview.d.ts +501 -0
  24. package/dist/manager/globals-module-info.cjs +1 -0
  25. package/dist/manager/globals-module-info.js +1 -0
  26. package/dist/manager/globals-runtime.js +21131 -21017
  27. package/dist/manager/runtime.js +1808 -1801
  28. package/dist/manager-api/index.cjs +1 -1
  29. package/dist/manager-api/index.d.ts +501 -0
  30. package/dist/manager-api/index.js +1 -1
  31. package/dist/measure/index.d.ts +501 -0
  32. package/dist/measure/preview.d.ts +501 -0
  33. package/dist/outline/index.d.ts +501 -0
  34. package/dist/outline/preview.d.ts +501 -0
  35. package/dist/preview/runtime.js +37838 -37834
  36. package/dist/preview-api/index.cjs +247 -245
  37. package/dist/preview-api/index.d.ts +1 -1
  38. package/dist/preview-api/index.js +296 -294
  39. package/dist/router/index.cjs +5700 -2327
  40. package/dist/router/index.d.ts +622 -243
  41. package/dist/router/index.js +1297 -870
  42. package/dist/test/index.cjs +1810 -1811
  43. package/dist/test/index.d.ts +53 -5
  44. package/dist/test/index.js +1907 -1908
  45. package/dist/test/preview.cjs +49 -15862
  46. package/dist/test/preview.d.ts +520 -13
  47. package/dist/test/preview.js +42 -14433
  48. package/dist/types/index.d.ts +516 -82
  49. package/dist/viewport/index.d.ts +502 -3
  50. package/dist/viewport/preview.d.ts +501 -0
  51. package/package.json +2 -18
  52. package/dist/test/spy.cjs +0 -258
  53. package/dist/test/spy.d.ts +0 -62
  54. package/dist/test/spy.js +0 -240
@@ -1,4 +1,4 @@
1
- import { StoryId as StoryId$1, StoryName, ComponentTitle, Tag as Tag$1, Parameters, Args, ArgTypes, ComponentId, StoryKind, Globals as Globals$1, GlobalTypes as GlobalTypes$1, InputType, StoryContext, PartialStoryFn, LegacyStoryFn, ArgsStoryFn, StoryFn, DecoratorFunction, LoaderFunction, Renderer as Renderer$1, ViewMode as ViewMode$1, StoryIdentifier, ProjectAnnotations as ProjectAnnotations$1, StrictArgTypes, StrictGlobalTypes, StepRunner, BeforeAll, ComponentAnnotations, StoryAnnotations, StoryContextForEnhancers, CleanupCallback, Canvas, StoryAnnotationsOrFn, AnnotatedStoryFn } from 'storybook/internal/csf';
1
+ import { StoryId as StoryId$1, StoryName, ComponentTitle, Tag as Tag$1, Parameters, Args, ArgTypes, ComponentId, StoryKind, Globals as Globals$1, GlobalTypes as GlobalTypes$1, InputType, StoryContext, PartialStoryFn, LegacyStoryFn, ArgsStoryFn, StoryFn, DecoratorFunction, LoaderFunction as LoaderFunction$1, Renderer as Renderer$1, ViewMode as ViewMode$1, StoryIdentifier, ProjectAnnotations as ProjectAnnotations$1, StrictArgTypes, StrictGlobalTypes, StepRunner, BeforeAll, ComponentAnnotations, StoryAnnotations, StoryContextForEnhancers, CleanupCallback, Canvas, StoryAnnotationsOrFn, AnnotatedStoryFn } from 'storybook/internal/csf';
2
2
  export { AfterEach, AnnotatedStoryFn, ArgTypes, ArgTypesEnhancer, Args, ArgsEnhancer, ArgsFromMeta, ArgsStoryFn, BaseAnnotations, ProjectAnnotations as BaseProjectAnnotations, BeforeAll, BeforeEach, Canvas, CleanupCallback, ComponentAnnotations, ComponentId, ComponentTitle, Conditional, DecoratorApplicator, DecoratorFunction, GlobalTypes, Globals, IncludeExcludeOptions, InputType, LegacyAnnotatedStoryFn, LegacyStoryAnnotationsOrFn, LegacyStoryFn, LoaderFunction, Parameters, PartialStoryFn, PlayFunction, PlayFunctionContext, SBArrayType, SBEnumType, SBIntersectionType, SBObjectType, SBOtherType, SBScalarType, SBType, SBUnionType, SeparatorOptions, StepFunction, StepLabel, StepRunner, StoryAnnotations, StoryAnnotationsOrFn, StoryContext, StoryContextForEnhancers, StoryContextForLoaders, StoryContextUpdate, StoryFn, StoryId, StoryIdentifier, StoryKind, StoryName, StrictArgTypes, StrictArgs, StrictGlobalTypes, StrictInputType, Tag } from 'storybook/internal/csf';
3
3
  import { ReactElement, FC, ReactNode, PropsWithChildren } from 'react';
4
4
  import { RouterData as RouterData$1 } from 'storybook/internal/router';
@@ -10,87 +10,519 @@ import { Server, IncomingMessage, ServerResponse } from 'http';
10
10
  import { Server as Server$1 } from 'net';
11
11
  import { Channel as Channel$1 } from 'storybook/internal/channels';
12
12
 
13
- /**
14
- * A URL pathname, beginning with a /.
15
- *
16
- * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#location.pathname
17
- */
18
- declare type Pathname = string;
19
- /**
20
- * A URL search string, beginning with a ?.
21
- *
22
- * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#location.search
23
- */
24
- declare type Search = string;
25
- /**
26
- * A URL fragment identifier, beginning with a #.
27
- *
28
- * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#location.hash
29
- */
30
- declare type Hash = string;
31
- /**
32
- * A unique string associated with a location. May be used to safely store
33
- * and retrieve data in some other storage API, like `localStorage`.
34
- *
35
- * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#location.key
36
- */
37
- declare type Key = string;
38
- /**
39
- * The pathname, search, and hash values of a URL.
40
- */
41
- interface Path$1 {
42
- /**
43
- * A URL pathname, beginning with a /.
44
- *
45
- * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#location.pathname
46
- */
47
- pathname: Pathname;
48
- /**
49
- * A URL search string, beginning with a ?.
50
- *
51
- * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#location.search
52
- */
53
- search: Search;
54
- /**
55
- * A URL fragment identifier, beginning with a #.
56
- *
57
- * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#location.hash
58
- */
59
- hash: Hash;
60
- }
61
- /**
62
- * An entry in a history stack. A location contains information about the
63
- * URL path, as well as possibly some arbitrary state and a key.
64
- *
65
- * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#location
66
- */
67
- interface Location extends Path$1 {
68
- /**
69
- * A value of arbitrary data associated with this location.
70
- *
71
- * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#location.state
72
- */
73
- state: unknown;
74
- /**
75
- * A unique string associated with this location. May be used to safely store
76
- * and retrieve data in some other storage API, like `localStorage`.
77
- *
78
- * Note: This value is always "default" on the initial location.
79
- *
80
- * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#location.key
81
- */
82
- key: Key;
83
- }
84
- /**
85
- * Describes a location that is the destination of some navigation, either via
86
- * `history.push` or `history.replace`. May be either a URL or the pieces of a
87
- * URL path.
88
- */
89
- declare type To = string | Partial<Path$1>;
13
+ /**
14
+ * Actions represent the type of change to a location value.
15
+ */
16
+ declare enum Action {
17
+ /**
18
+ * A POP indicates a change to an arbitrary index in the history stack, such
19
+ * as a back or forward navigation. It does not describe the direction of the
20
+ * navigation, only that the current index changed.
21
+ *
22
+ * Note: This is the default action for newly created history objects.
23
+ */
24
+ Pop = "POP",
25
+ /**
26
+ * A PUSH indicates a new entry being added to the history stack, such as when
27
+ * a link is clicked and a new page loads. When this happens, all subsequent
28
+ * entries in the stack are lost.
29
+ */
30
+ Push = "PUSH",
31
+ /**
32
+ * A REPLACE indicates the entry at the current index in the history stack
33
+ * being replaced by a new one.
34
+ */
35
+ Replace = "REPLACE"
36
+ }
37
+ /**
38
+ * The pathname, search, and hash values of a URL.
39
+ */
40
+ interface Path$1 {
41
+ /**
42
+ * A URL pathname, beginning with a /.
43
+ */
44
+ pathname: string;
45
+ /**
46
+ * A URL search string, beginning with a ?.
47
+ */
48
+ search: string;
49
+ /**
50
+ * A URL fragment identifier, beginning with a #.
51
+ */
52
+ hash: string;
53
+ }
54
+ /**
55
+ * An entry in a history stack. A location contains information about the
56
+ * URL path, as well as possibly some arbitrary state and a key.
57
+ */
58
+ interface Location extends Path$1 {
59
+ /**
60
+ * A value of arbitrary data associated with this location.
61
+ */
62
+ state: any;
63
+ /**
64
+ * A unique string associated with this location. May be used to safely store
65
+ * and retrieve data in some other storage API, like `localStorage`.
66
+ *
67
+ * Note: This value is always "default" on the initial location.
68
+ */
69
+ key: string;
70
+ }
71
+ /**
72
+ * Describes a location that is the destination of some navigation, either via
73
+ * `history.push` or `history.replace`. May be either a URL or the pieces of a
74
+ * URL path.
75
+ */
76
+ type To = string | Partial<Path$1>;
77
+
78
+ /**
79
+ * Map of routeId -> data returned from a loader/action/error
80
+ */
81
+ interface RouteData {
82
+ [routeId: string]: any;
83
+ }
84
+ declare enum ResultType {
85
+ data = "data",
86
+ deferred = "deferred",
87
+ redirect = "redirect",
88
+ error = "error"
89
+ }
90
+ /**
91
+ * Successful result from a loader or action
92
+ */
93
+ interface SuccessResult {
94
+ type: ResultType.data;
95
+ data: any;
96
+ statusCode?: number;
97
+ headers?: Headers;
98
+ }
99
+ /**
100
+ * Successful defer() result from a loader or action
101
+ */
102
+ interface DeferredResult {
103
+ type: ResultType.deferred;
104
+ deferredData: DeferredData;
105
+ statusCode?: number;
106
+ headers?: Headers;
107
+ }
108
+ /**
109
+ * Redirect result from a loader or action
110
+ */
111
+ interface RedirectResult {
112
+ type: ResultType.redirect;
113
+ status: number;
114
+ location: string;
115
+ revalidate: boolean;
116
+ reloadDocument?: boolean;
117
+ }
118
+ /**
119
+ * Unsuccessful result from a loader or action
120
+ */
121
+ interface ErrorResult {
122
+ type: ResultType.error;
123
+ error: any;
124
+ headers?: Headers;
125
+ }
126
+ /**
127
+ * Result from a loader or action - potentially successful or unsuccessful
128
+ */
129
+ type DataResult = SuccessResult | DeferredResult | RedirectResult | ErrorResult;
130
+ type LowerCaseFormMethod = "get" | "post" | "put" | "patch" | "delete";
131
+ type UpperCaseFormMethod = Uppercase<LowerCaseFormMethod>;
132
+ /**
133
+ * Active navigation/fetcher form methods are exposed in lowercase on the
134
+ * RouterState
135
+ */
136
+ type FormMethod = LowerCaseFormMethod;
137
+ /**
138
+ * In v7, active navigation/fetcher form methods are exposed in uppercase on the
139
+ * RouterState. This is to align with the normalization done via fetch().
140
+ */
141
+ type V7_FormMethod = UpperCaseFormMethod;
142
+ type FormEncType = "application/x-www-form-urlencoded" | "multipart/form-data" | "application/json" | "text/plain";
143
+ type JsonObject = {
144
+ [Key in string]: JsonValue;
145
+ } & {
146
+ [Key in string]?: JsonValue | undefined;
147
+ };
148
+ type JsonArray = JsonValue[] | readonly JsonValue[];
149
+ type JsonPrimitive = string | number | boolean | null;
150
+ type JsonValue = JsonPrimitive | JsonObject | JsonArray;
151
+ /**
152
+ * @private
153
+ * Internal interface to pass around for action submissions, not intended for
154
+ * external consumption
155
+ */
156
+ type Submission = {
157
+ formMethod: FormMethod | V7_FormMethod;
158
+ formAction: string;
159
+ formEncType: FormEncType;
160
+ formData: FormData;
161
+ json: undefined;
162
+ text: undefined;
163
+ } | {
164
+ formMethod: FormMethod | V7_FormMethod;
165
+ formAction: string;
166
+ formEncType: FormEncType;
167
+ formData: undefined;
168
+ json: JsonValue;
169
+ text: undefined;
170
+ } | {
171
+ formMethod: FormMethod | V7_FormMethod;
172
+ formAction: string;
173
+ formEncType: FormEncType;
174
+ formData: undefined;
175
+ json: undefined;
176
+ text: string;
177
+ };
178
+ /**
179
+ * @private
180
+ * Arguments passed to route loader/action functions. Same for now but we keep
181
+ * this as a private implementation detail in case they diverge in the future.
182
+ */
183
+ interface DataFunctionArgs {
184
+ request: Request;
185
+ params: Params;
186
+ context?: any;
187
+ }
188
+ /**
189
+ * Arguments passed to loader functions
190
+ */
191
+ interface LoaderFunctionArgs extends DataFunctionArgs {
192
+ }
193
+ /**
194
+ * Arguments passed to action functions
195
+ */
196
+ interface ActionFunctionArgs extends DataFunctionArgs {
197
+ }
198
+ /**
199
+ * Loaders and actions can return anything except `undefined` (`null` is a
200
+ * valid return value if there is no data to return). Responses are preferred
201
+ * and will ease any future migration to Remix
202
+ */
203
+ type DataFunctionValue = Response | NonNullable<unknown> | null;
204
+ /**
205
+ * Route loader function signature
206
+ */
207
+ interface LoaderFunction {
208
+ (args: LoaderFunctionArgs): Promise<DataFunctionValue> | DataFunctionValue;
209
+ }
210
+ /**
211
+ * Route action function signature
212
+ */
213
+ interface ActionFunction {
214
+ (args: ActionFunctionArgs): Promise<DataFunctionValue> | DataFunctionValue;
215
+ }
216
+ /**
217
+ * Route shouldRevalidate function signature. This runs after any submission
218
+ * (navigation or fetcher), so we flatten the navigation/fetcher submission
219
+ * onto the arguments. It shouldn't matter whether it came from a navigation
220
+ * or a fetcher, what really matters is the URLs and the formData since loaders
221
+ * have to re-run based on the data models that were potentially mutated.
222
+ */
223
+ interface ShouldRevalidateFunction {
224
+ (args: {
225
+ currentUrl: URL;
226
+ currentParams: AgnosticDataRouteMatch["params"];
227
+ nextUrl: URL;
228
+ nextParams: AgnosticDataRouteMatch["params"];
229
+ formMethod?: Submission["formMethod"];
230
+ formAction?: Submission["formAction"];
231
+ formEncType?: Submission["formEncType"];
232
+ text?: Submission["text"];
233
+ formData?: Submission["formData"];
234
+ json?: Submission["json"];
235
+ actionResult?: DataResult;
236
+ defaultShouldRevalidate: boolean;
237
+ }): boolean;
238
+ }
239
+ /**
240
+ * Keys we cannot change from within a lazy() function. We spread all other keys
241
+ * onto the route. Either they're meaningful to the router, or they'll get
242
+ * ignored.
243
+ */
244
+ type ImmutableRouteKey = "lazy" | "caseSensitive" | "path" | "id" | "index" | "children";
245
+ type RequireOne<T, Key = keyof T> = Exclude<{
246
+ [K in keyof T]: K extends Key ? Omit<T, K> & Required<Pick<T, K>> : never;
247
+ }[keyof T], undefined>;
248
+ /**
249
+ * lazy() function to load a route definition, which can add non-matching
250
+ * related properties to a route
251
+ */
252
+ interface LazyRouteFunction<R extends AgnosticRouteObject> {
253
+ (): Promise<RequireOne<Omit<R, ImmutableRouteKey>>>;
254
+ }
255
+ /**
256
+ * Base RouteObject with common props shared by all types of routes
257
+ */
258
+ type AgnosticBaseRouteObject = {
259
+ caseSensitive?: boolean;
260
+ path?: string;
261
+ id?: string;
262
+ loader?: LoaderFunction;
263
+ action?: ActionFunction;
264
+ hasErrorBoundary?: boolean;
265
+ shouldRevalidate?: ShouldRevalidateFunction;
266
+ handle?: any;
267
+ lazy?: LazyRouteFunction<AgnosticBaseRouteObject>;
268
+ };
269
+ /**
270
+ * Index routes must not have children
271
+ */
272
+ type AgnosticIndexRouteObject = AgnosticBaseRouteObject & {
273
+ children?: undefined;
274
+ index: true;
275
+ };
276
+ /**
277
+ * Non-index routes may have children, but cannot have index
278
+ */
279
+ type AgnosticNonIndexRouteObject = AgnosticBaseRouteObject & {
280
+ children?: AgnosticRouteObject[];
281
+ index?: false;
282
+ };
283
+ /**
284
+ * A route object represents a logical route, with (optionally) its child
285
+ * routes organized in a tree-like structure.
286
+ */
287
+ type AgnosticRouteObject = AgnosticIndexRouteObject | AgnosticNonIndexRouteObject;
288
+ type AgnosticDataIndexRouteObject = AgnosticIndexRouteObject & {
289
+ id: string;
290
+ };
291
+ type AgnosticDataNonIndexRouteObject = AgnosticNonIndexRouteObject & {
292
+ children?: AgnosticDataRouteObject[];
293
+ id: string;
294
+ };
295
+ /**
296
+ * A data route object, which is just a RouteObject with a required unique ID
297
+ */
298
+ type AgnosticDataRouteObject = AgnosticDataIndexRouteObject | AgnosticDataNonIndexRouteObject;
299
+ /**
300
+ * The parameters that were parsed from the URL path.
301
+ */
302
+ type Params<Key extends string = string> = {
303
+ readonly [key in Key]: string | undefined;
304
+ };
305
+ /**
306
+ * A RouteMatch contains info about how a route matched a URL.
307
+ */
308
+ interface AgnosticRouteMatch<ParamKey extends string = string, RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject> {
309
+ /**
310
+ * The names and values of dynamic parameters in the URL.
311
+ */
312
+ params: Params<ParamKey>;
313
+ /**
314
+ * The portion of the URL pathname that was matched.
315
+ */
316
+ pathname: string;
317
+ /**
318
+ * The portion of the URL pathname that was matched before child routes.
319
+ */
320
+ pathnameBase: string;
321
+ /**
322
+ * The route object that was used to match.
323
+ */
324
+ route: RouteObjectType;
325
+ }
326
+ interface AgnosticDataRouteMatch extends AgnosticRouteMatch<string, AgnosticDataRouteObject> {
327
+ }
328
+ declare class DeferredData {
329
+ private pendingKeysSet;
330
+ private controller;
331
+ private abortPromise;
332
+ private unlistenAbortSignal;
333
+ private subscribers;
334
+ data: Record<string, unknown>;
335
+ init?: ResponseInit;
336
+ deferredKeys: string[];
337
+ constructor(data: Record<string, unknown>, responseInit?: ResponseInit);
338
+ private trackPromise;
339
+ private onSettle;
340
+ private emit;
341
+ subscribe(fn: (aborted: boolean, settledKey?: string) => void): () => boolean;
342
+ cancel(): void;
343
+ resolveData(signal: AbortSignal): Promise<boolean>;
344
+ get done(): boolean;
345
+ get unwrappedData(): {};
346
+ get pendingKeys(): string[];
347
+ }
348
+
349
+ /**
350
+ * State maintained internally by the router. During a navigation, all states
351
+ * reflect the the "old" location unless otherwise noted.
352
+ */
353
+ interface RouterState {
354
+ /**
355
+ * The action of the most recent navigation
356
+ */
357
+ historyAction: Action;
358
+ /**
359
+ * The current location reflected by the router
360
+ */
361
+ location: Location;
362
+ /**
363
+ * The current set of route matches
364
+ */
365
+ matches: AgnosticDataRouteMatch[];
366
+ /**
367
+ * Tracks whether we've completed our initial data load
368
+ */
369
+ initialized: boolean;
370
+ /**
371
+ * Current scroll position we should start at for a new view
372
+ * - number -> scroll position to restore to
373
+ * - false -> do not restore scroll at all (used during submissions)
374
+ * - null -> don't have a saved position, scroll to hash or top of page
375
+ */
376
+ restoreScrollPosition: number | false | null;
377
+ /**
378
+ * Indicate whether this navigation should skip resetting the scroll position
379
+ * if we are unable to restore the scroll position
380
+ */
381
+ preventScrollReset: boolean;
382
+ /**
383
+ * Tracks the state of the current navigation
384
+ */
385
+ navigation: Navigation;
386
+ /**
387
+ * Tracks any in-progress revalidations
388
+ */
389
+ revalidation: RevalidationState;
390
+ /**
391
+ * Data from the loaders for the current matches
392
+ */
393
+ loaderData: RouteData;
394
+ /**
395
+ * Data from the action for the current matches
396
+ */
397
+ actionData: RouteData | null;
398
+ /**
399
+ * Errors caught from loaders for the current matches
400
+ */
401
+ errors: RouteData | null;
402
+ /**
403
+ * Map of current fetchers
404
+ */
405
+ fetchers: Map<string, Fetcher>;
406
+ /**
407
+ * Map of current blockers
408
+ */
409
+ blockers: Map<string, Blocker>;
410
+ }
411
+ /**
412
+ * Data that can be passed into hydrate a Router from SSR
413
+ */
414
+ type HydrationState = Partial<Pick<RouterState, "loaderData" | "actionData" | "errors">>;
415
+ type RelativeRoutingType = "route" | "path";
416
+ /**
417
+ * Potential states for state.navigation
418
+ */
419
+ type NavigationStates = {
420
+ Idle: {
421
+ state: "idle";
422
+ location: undefined;
423
+ formMethod: undefined;
424
+ formAction: undefined;
425
+ formEncType: undefined;
426
+ formData: undefined;
427
+ json: undefined;
428
+ text: undefined;
429
+ };
430
+ Loading: {
431
+ state: "loading";
432
+ location: Location;
433
+ formMethod: Submission["formMethod"] | undefined;
434
+ formAction: Submission["formAction"] | undefined;
435
+ formEncType: Submission["formEncType"] | undefined;
436
+ formData: Submission["formData"] | undefined;
437
+ json: Submission["json"] | undefined;
438
+ text: Submission["text"] | undefined;
439
+ };
440
+ Submitting: {
441
+ state: "submitting";
442
+ location: Location;
443
+ formMethod: Submission["formMethod"];
444
+ formAction: Submission["formAction"];
445
+ formEncType: Submission["formEncType"];
446
+ formData: Submission["formData"];
447
+ json: Submission["json"];
448
+ text: Submission["text"];
449
+ };
450
+ };
451
+ type Navigation = NavigationStates[keyof NavigationStates];
452
+ type RevalidationState = "idle" | "loading";
453
+ /**
454
+ * Potential states for fetchers
455
+ */
456
+ type FetcherStates<TData = any> = {
457
+ Idle: {
458
+ state: "idle";
459
+ formMethod: undefined;
460
+ formAction: undefined;
461
+ formEncType: undefined;
462
+ text: undefined;
463
+ formData: undefined;
464
+ json: undefined;
465
+ data: TData | undefined;
466
+ " _hasFetcherDoneAnything "?: boolean;
467
+ };
468
+ Loading: {
469
+ state: "loading";
470
+ formMethod: Submission["formMethod"] | undefined;
471
+ formAction: Submission["formAction"] | undefined;
472
+ formEncType: Submission["formEncType"] | undefined;
473
+ text: Submission["text"] | undefined;
474
+ formData: Submission["formData"] | undefined;
475
+ json: Submission["json"] | undefined;
476
+ data: TData | undefined;
477
+ " _hasFetcherDoneAnything "?: boolean;
478
+ };
479
+ Submitting: {
480
+ state: "submitting";
481
+ formMethod: Submission["formMethod"];
482
+ formAction: Submission["formAction"];
483
+ formEncType: Submission["formEncType"];
484
+ text: Submission["text"];
485
+ formData: Submission["formData"];
486
+ json: Submission["json"];
487
+ data: TData | undefined;
488
+ " _hasFetcherDoneAnything "?: boolean;
489
+ };
490
+ };
491
+ type Fetcher<TData = any> = FetcherStates<TData>[keyof FetcherStates<TData>];
492
+ interface BlockerBlocked {
493
+ state: "blocked";
494
+ reset(): void;
495
+ proceed(): void;
496
+ location: Location;
497
+ }
498
+ interface BlockerUnblocked {
499
+ state: "unblocked";
500
+ reset: undefined;
501
+ proceed: undefined;
502
+ location: undefined;
503
+ }
504
+ interface BlockerProceeding {
505
+ state: "proceeding";
506
+ reset: undefined;
507
+ proceed: undefined;
508
+ location: Location;
509
+ }
510
+ type Blocker = BlockerUnblocked | BlockerBlocked | BlockerProceeding;
90
511
 
91
512
  interface NavigateOptions$1 {
92
513
  replace?: boolean;
93
514
  state?: any;
515
+ preventScrollReset?: boolean;
516
+ relative?: RelativeRoutingType;
517
+ }
518
+
519
+ /**
520
+ * NOTE: If you refactor this to split up the modules into separate files,
521
+ * you'll need to update the rollup config for react-router-dom-v5-compat.
522
+ */
523
+
524
+ declare global {
525
+ var __staticRouterHydrationData: HydrationState | undefined;
94
526
  }
95
527
 
96
528
  interface StoryData {
@@ -2063,6 +2495,8 @@ interface StorybookConfigRaw {
2063
2495
  * Set NODE_ENV to development in built Storybooks for better testability and debuggability
2064
2496
  */
2065
2497
  developmentModeForBuild?: boolean;
2498
+ /** Only show input controls in Angular */
2499
+ angularFilterNonInputControls?: boolean;
2066
2500
  };
2067
2501
  build?: TestBuildConfig;
2068
2502
  stories: StoriesEntry[];
@@ -2560,7 +2994,7 @@ type Addon_LegacyStoryFn<ReturnType = unknown> = LegacyStoryFn<Addon_ReturnTypeF
2560
2994
  type Addon_ArgsStoryFn<ReturnType = unknown> = ArgsStoryFn<Addon_ReturnTypeFramework<ReturnType>>;
2561
2995
  type Addon_StoryFn<ReturnType = unknown> = StoryFn<Addon_ReturnTypeFramework<ReturnType>>;
2562
2996
  type Addon_DecoratorFunction<StoryFnReturnType = unknown> = DecoratorFunction<Addon_ReturnTypeFramework<StoryFnReturnType>>;
2563
- type Addon_LoaderFunction = LoaderFunction<Addon_ReturnTypeFramework<unknown>>;
2997
+ type Addon_LoaderFunction = LoaderFunction$1<Addon_ReturnTypeFramework<unknown>>;
2564
2998
  interface Addon_WrapperSettings {
2565
2999
  options: object;
2566
3000
  parameters: {
@@ -2944,7 +3378,7 @@ type NormalizedProjectAnnotations<TRenderer extends Renderer = Renderer> = Omit<
2944
3378
  argTypes?: StrictArgTypes;
2945
3379
  globalTypes?: StrictGlobalTypes;
2946
3380
  decorators?: DecoratorFunction<TRenderer>[];
2947
- loaders?: LoaderFunction<TRenderer>[];
3381
+ loaders?: LoaderFunction$1<TRenderer>[];
2948
3382
  runStep: StepRunner<TRenderer>;
2949
3383
  beforeAll: BeforeAll;
2950
3384
  };
@@ -2953,7 +3387,7 @@ type NormalizedComponentAnnotations<TRenderer extends Renderer = Renderer> = Omi
2953
3387
  title: ComponentTitle;
2954
3388
  argTypes?: StrictArgTypes;
2955
3389
  decorators?: DecoratorFunction<TRenderer>[];
2956
- loaders?: LoaderFunction<TRenderer>[];
3390
+ loaders?: LoaderFunction$1<TRenderer>[];
2957
3391
  };
2958
3392
  type NormalizedStoryAnnotations<TRenderer extends Renderer = Renderer> = Omit<StoryAnnotations<TRenderer>, 'storyName' | 'story' | 'decorators' | 'loaders'> & {
2959
3393
  moduleExport: ModuleExport;
@@ -2962,7 +3396,7 @@ type NormalizedStoryAnnotations<TRenderer extends Renderer = Renderer> = Omit<St
2962
3396
  name: StoryName;
2963
3397
  userStoryFn?: ArgsStoryFn<TRenderer>;
2964
3398
  decorators?: DecoratorFunction<TRenderer>[];
2965
- loaders?: LoaderFunction<TRenderer>[];
3399
+ loaders?: LoaderFunction$1<TRenderer>[];
2966
3400
  };
2967
3401
  type CSFFile<TRenderer extends Renderer = Renderer> = {
2968
3402
  meta: NormalizedComponentAnnotations<TRenderer>;