storybook 9.1.0-alpha.9 → 9.1.0-beta.0

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.
@@ -1,4 +1,25 @@
1
- import { StoryId } from 'storybook/internal/types';
1
+ import { NormalizedProjectAnnotations, ProjectAnnotations, ComposedStoryFn, StoryId } from 'storybook/internal/types';
2
+
3
+ declare global {
4
+ var globalProjectAnnotations: NormalizedProjectAnnotations<any>;
5
+ var defaultProjectAnnotations: ProjectAnnotations<any>;
6
+ }
7
+ type WrappedStoryRef = {
8
+ __pw_type: 'jsx';
9
+ props: Record<string, any>;
10
+ } | {
11
+ __pw_type: 'importRef';
12
+ };
13
+ type UnwrappedJSXStoryRef = {
14
+ __pw_type: 'jsx';
15
+ type: UnwrappedImportStoryRef;
16
+ };
17
+ type UnwrappedImportStoryRef = ComposedStoryFn;
18
+ declare global {
19
+ function __pwUnwrapObject(storyRef: WrappedStoryRef): Promise<UnwrappedJSXStoryRef | UnwrappedImportStoryRef>;
20
+ }
21
+
22
+ type RenderPhase = 'preparing' | 'loading' | 'beforeEach' | 'rendering' | 'playing' | 'played' | 'completing' | 'completed' | 'afterEach' | 'finished' | 'aborted' | 'errored';
2
23
 
3
24
  interface Call {
4
25
  id: string;
@@ -59,7 +80,7 @@ interface SyncPayload {
59
80
  pausedAt?: Call['id'];
60
81
  }
61
82
  interface State {
62
- renderPhase?: 'loading' | 'rendering' | 'playing' | 'played' | 'completed' | 'aborted' | 'errored';
83
+ renderPhase: RenderPhase;
63
84
  isDebugging: boolean;
64
85
  isPlaying: boolean;
65
86
  isLocked: boolean;
@@ -103,4 +124,4 @@ declare const EVENTS: {
103
124
  END: string;
104
125
  };
105
126
 
106
- export { type Call, type CallRef, CallStates, type ControlStates, EVENTS, type ElementRef, type LogItem, type Options, type State, type SyncPayload, instrument };
127
+ export { type Call, type CallRef, CallStates, type ControlStates, EVENTS, type ElementRef, type LogItem, type Options, type RenderPhase, type State, type SyncPayload, instrument };