storybook 9.0.0-alpha.8 → 9.0.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.
Files changed (140) hide show
  1. package/assets/docs/addon-backgrounds.gif +0 -0
  2. package/assets/docs/addon-controls-args-annotated.png +0 -0
  3. package/assets/docs/addon-controls-args-background-color.png +0 -0
  4. package/assets/docs/addon-controls-args-background-string.png +0 -0
  5. package/assets/docs/addon-controls-args-docs.png +0 -0
  6. package/assets/docs/addon-controls-args-logging.png +0 -0
  7. package/assets/docs/addon-controls-args-no-annotation.png +0 -0
  8. package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
  9. package/assets/docs/addon-controls-args-reflow.png +0 -0
  10. package/assets/docs/addon-controls-args-template.png +0 -0
  11. package/assets/docs/addon-controls-expanded.png +0 -0
  12. package/assets/docs/addon-controls-hero.gif +0 -0
  13. package/assets/docs/addon-controls-install.png +0 -0
  14. package/assets/docs/hero.gif +0 -0
  15. package/assets/docs/highlight.png +0 -0
  16. package/assets/docs/viewport.png +0 -0
  17. package/assets/server/base-preview-head.html +1 -3
  18. package/bin/index.cjs +2 -2
  19. package/dist/actions/decorator.js +67 -72
  20. package/dist/actions/index.cjs +27 -31
  21. package/dist/actions/index.d.ts +0 -3
  22. package/dist/actions/index.js +27 -31
  23. package/dist/actions/preview.cjs +23 -27
  24. package/dist/actions/preview.d.ts +0 -1
  25. package/dist/actions/preview.js +19 -23
  26. package/dist/babel/index.cjs +822 -816
  27. package/dist/babel/index.js +822 -816
  28. package/dist/backgrounds/index.cjs +148 -0
  29. package/dist/backgrounds/index.d.ts +91 -0
  30. package/dist/backgrounds/index.js +130 -0
  31. package/dist/backgrounds/preview.cjs +143 -0
  32. package/dist/backgrounds/preview.d.ts +54 -0
  33. package/dist/backgrounds/preview.js +127 -0
  34. package/dist/bin/index.cjs +73 -92
  35. package/dist/bin/index.js +66 -85
  36. package/dist/builder-manager/index.cjs +316 -296
  37. package/dist/builder-manager/index.js +567 -547
  38. package/dist/channels/index.cjs +1020 -950
  39. package/dist/channels/index.js +1256 -1201
  40. package/dist/cli/bin/index.cjs +198 -198
  41. package/dist/cli/bin/index.js +204 -204
  42. package/dist/cli/index.cjs +61734 -7589
  43. package/dist/cli/index.d.ts +24 -20
  44. package/dist/cli/index.js +61775 -7630
  45. package/dist/common/index.cjs +16175 -9123
  46. package/dist/common/index.d.ts +34 -25
  47. package/dist/common/index.js +16270 -9212
  48. package/dist/component-testing/index.cjs +23 -0
  49. package/dist/component-testing/index.d.ts +3 -0
  50. package/dist/component-testing/index.js +5 -0
  51. package/dist/component-testing/preview.cjs +40 -0
  52. package/dist/component-testing/preview.d.ts +5 -0
  53. package/dist/component-testing/preview.js +25 -0
  54. package/dist/components/index.cjs +6479 -13005
  55. package/dist/components/index.d.ts +8 -257
  56. package/dist/components/index.js +6160 -18689
  57. package/dist/controls/decorator.d.ts +5 -0
  58. package/dist/controls/decorator.js +8 -0
  59. package/dist/controls/index.cjs +26 -0
  60. package/dist/controls/index.d.ts +39 -0
  61. package/dist/controls/index.js +6 -0
  62. package/dist/controls/preview.cjs +26 -0
  63. package/dist/controls/preview.d.ts +54 -0
  64. package/dist/controls/preview.js +9 -0
  65. package/dist/core-events/index.cjs +91 -106
  66. package/dist/core-events/index.d.ts +2 -80
  67. package/dist/core-events/index.js +79 -94
  68. package/dist/core-server/index.cjs +12314 -12114
  69. package/dist/core-server/index.d.ts +32 -23
  70. package/dist/core-server/index.js +12495 -12296
  71. package/dist/core-server/presets/common-manager.css +170 -0
  72. package/dist/core-server/presets/common-manager.js +12153 -12
  73. package/dist/core-server/presets/common-preset.cjs +3004 -3151
  74. package/dist/core-server/presets/common-preset.js +2833 -2981
  75. package/dist/csf/index.d.ts +1 -3
  76. package/dist/csf-tools/index.cjs +412 -403
  77. package/dist/csf-tools/index.d.ts +0 -4
  78. package/dist/csf-tools/index.js +410 -401
  79. package/dist/docs-tools/index.cjs +2569 -575
  80. package/dist/docs-tools/index.js +2565 -564
  81. package/dist/highlight/index.cjs +27 -0
  82. package/dist/highlight/index.d.ts +61 -0
  83. package/dist/highlight/index.js +7 -0
  84. package/dist/highlight/preview.cjs +535 -0
  85. package/dist/highlight/preview.d.ts +54 -0
  86. package/dist/highlight/preview.js +519 -0
  87. package/dist/instrumenter/index.cjs +1417 -1761
  88. package/dist/instrumenter/index.d.ts +8 -7
  89. package/dist/instrumenter/index.js +1332 -1667
  90. package/dist/manager/globals-module-info.cjs +22 -33
  91. package/dist/manager/globals-module-info.js +7 -18
  92. package/dist/manager/globals-runtime.js +45449 -49535
  93. package/dist/manager/runtime.js +4392 -3774
  94. package/dist/manager-api/index.cjs +2622 -2529
  95. package/dist/manager-api/index.d.ts +109 -114
  96. package/dist/manager-api/index.js +2603 -2475
  97. package/dist/manager-errors.js +41 -37
  98. package/dist/measure/index.cjs +476 -0
  99. package/dist/measure/index.d.ts +66 -0
  100. package/dist/measure/index.js +464 -0
  101. package/dist/measure/preview.cjs +466 -0
  102. package/dist/measure/preview.d.ts +59 -0
  103. package/dist/measure/preview.js +450 -0
  104. package/dist/outline/index.cjs +528 -0
  105. package/dist/outline/index.d.ts +66 -0
  106. package/dist/outline/index.js +500 -0
  107. package/dist/outline/preview.cjs +518 -0
  108. package/dist/outline/preview.d.ts +59 -0
  109. package/dist/outline/preview.js +486 -0
  110. package/dist/preview/runtime.js +42328 -38511
  111. package/dist/preview-api/index.cjs +1204 -1293
  112. package/dist/preview-api/index.d.ts +126 -178
  113. package/dist/preview-api/index.js +1614 -1685
  114. package/dist/preview-errors.cjs +65 -51
  115. package/dist/preview-errors.d.ts +6 -2
  116. package/dist/preview-errors.js +176 -142
  117. package/dist/server-errors.cjs +160 -113
  118. package/dist/server-errors.d.ts +12 -2
  119. package/dist/server-errors.js +157 -110
  120. package/dist/telemetry/index.cjs +407 -403
  121. package/dist/telemetry/index.d.ts +1 -1
  122. package/dist/telemetry/index.js +493 -489
  123. package/dist/test/index.cjs +1553 -1552
  124. package/dist/test/index.js +9603 -9514
  125. package/dist/test/preview.cjs +1906 -1905
  126. package/dist/test/preview.d.ts +0 -6
  127. package/dist/test/preview.js +3664 -3603
  128. package/dist/test/spy.cjs +65 -64
  129. package/dist/test/spy.js +59 -58
  130. package/dist/types/index.cjs +11 -12
  131. package/dist/types/index.d.ts +601 -338
  132. package/dist/types/index.js +1 -2
  133. package/dist/viewport/index.cjs +310 -0
  134. package/dist/viewport/index.d.ts +320 -0
  135. package/dist/viewport/index.js +290 -0
  136. package/dist/viewport/preview.cjs +35 -0
  137. package/dist/viewport/preview.d.ts +68 -0
  138. package/dist/viewport/preview.js +19 -0
  139. package/package.json +207 -12
  140. package/dist/actions/manager.js +0 -1196
@@ -2,11 +2,11 @@ import React, { FC, ReactNode, ReactElement, Component } from 'react';
2
2
  import { Channel, Listener as Listener$1 } from 'storybook/internal/channels';
3
3
  export { Listener as ChannelListener } from 'storybook/internal/channels';
4
4
  import { RouterData, NavigateOptions } from 'storybook/internal/router';
5
- import { Addon_Types, Addon_TypesEnum, Addon_Collection, Addon_TypesMapping, Addon_BaseType, Addon_SidebarTopType, Addon_SidebarBottomType, Addon_TestProviderType, Addon_PageType, Addon_WrapperType, Addon_Config, API_ProviderData, API_StateMerger, API_Provider, StoryId, Globals, GlobalTypes, API_PanelPositions, API_Layout, API_UI, API_Notification, API_IframeRenderer, API_ComposedRef, API_SetRefData, API_ComposedRefUpdate, API_Refs, API_Settings, API_HashEntry, API_ViewMode, API_LeafEntry, API_PreparedStoryIndex, API_StoryEntry, Args, API_IndexHash, API_DocsEntry, API_FilterFunction, API_LoadedRefData, API_Version, API_Versions, API_UnknownEntries, NormalizedProjectAnnotations, ProjectAnnotations, ComposedStoryFn, API_OptionsData, Parameters, ArgTypes } from 'storybook/internal/types';
5
+ import { Addon_Types, Addon_TypesEnum, Addon_Collection, Addon_TypesMapping, Addon_BaseType, Addon_TestProviderType, Addon_PageType, Addon_WrapperType, Addon_Config, API_ProviderData, API_StateMerger, API_Provider, Globals, GlobalTypes, API_PanelPositions, API_Layout, API_UI, API_Notification, API_IframeRenderer, API_ComposedRef, API_SetRefData, API_ComposedRefUpdate, API_Refs, StoryId, API_Settings, API_HashEntry, API_ViewMode, API_LeafEntry, API_PreparedStoryIndex, API_StoryEntry, Args, API_IndexHash, API_DocsEntry, API_FilterFunction, API_LoadedRefData, API_Version, API_Versions, API_UnknownEntries, API_OptionsData, Parameters, ArgTypes, NormalizedProjectAnnotations, ProjectAnnotations, ComposedStoryFn } from 'storybook/internal/types';
6
6
  export { Addon_Type as Addon, API_ComponentEntry as ComponentEntry, API_ComposedRef as ComposedRef, API_DocsEntry as DocsEntry, API_GroupEntry as GroupEntry, API_HashEntry as HashEntry, API_IndexHash as IndexHash, API_LeafEntry as LeafEntry, API_Refs as Refs, API_RootEntry as RootEntry, API_IndexHash as StoriesHash, API_StoryEntry as StoryEntry } from 'storybook/internal/types';
7
- import { TestProviderState as TestProviderState$1, TestProviderId as TestProviderId$1, TestProviders, WhatsNewData } from 'storybook/internal/core-events';
8
7
  import { ThemeVars } from 'storybook/theming';
9
8
  import { toId, StoryId as StoryId$1 } from 'storybook/internal/csf';
9
+ import { WhatsNewData } from 'storybook/internal/core-events';
10
10
 
11
11
  declare function mockChannel(): Channel;
12
12
 
@@ -22,7 +22,7 @@ declare class AddonStore {
22
22
  ready: () => Promise<Channel>;
23
23
  hasChannel: () => boolean;
24
24
  setChannel: (channel: Channel) => void;
25
- getElements<T extends Addon_Types | Addon_TypesEnum.experimental_PAGE | Addon_TypesEnum.experimental_SIDEBAR_BOTTOM | Addon_TypesEnum.experimental_SIDEBAR_TOP | Addon_TypesEnum.experimental_TEST_PROVIDER>(type: T): Addon_Collection<Addon_TypesMapping[T]> | any;
25
+ getElements<T extends Addon_Types | Addon_TypesEnum.experimental_PAGE | Addon_TypesEnum.experimental_TEST_PROVIDER>(type: T): Addon_Collection<Addon_TypesMapping[T]> | any;
26
26
  /**
27
27
  * Adds an addon to the addon store.
28
28
  *
@@ -30,7 +30,7 @@ declare class AddonStore {
30
30
  * @param {Addon_Type} addon - The addon to add.
31
31
  * @returns {void}
32
32
  */
33
- add(id: string, addon: Addon_BaseType | Omit<Addon_SidebarTopType, 'id'> | Omit<Addon_SidebarBottomType, 'id'> | Omit<Addon_TestProviderType, 'id'> | Omit<Addon_PageType, 'id'> | Omit<Addon_WrapperType, 'id'>): void;
33
+ add(id: string, addon: Addon_BaseType | Omit<Addon_TestProviderType, 'id'> | Omit<Addon_PageType, 'id'> | Omit<Addon_WrapperType, 'id'>): void;
34
34
  setConfig: (value: Addon_Config) => void;
35
35
  getConfig: () => Addon_Config;
36
36
  /**
@@ -81,7 +81,7 @@ type ModuleArgs = RouterData & API_ProviderData<API> & {
81
81
  store: Store;
82
82
  };
83
83
 
84
- interface SubAPI$d {
84
+ interface SubAPI$c {
85
85
  /**
86
86
  * Returns a collection of elements of a specific type.
87
87
  *
@@ -91,7 +91,7 @@ interface SubAPI$d {
91
91
  * @returns {Addon_Collection<T>} - A collection of elements of the specified type.
92
92
  * @protected This is used internally in storybook's manager.
93
93
  */
94
- getElements: <T extends Addon_Types | Addon_TypesEnum.experimental_PAGE | Addon_TypesEnum.experimental_SIDEBAR_BOTTOM | Addon_TypesEnum.experimental_TEST_PROVIDER | Addon_TypesEnum.experimental_SIDEBAR_TOP = Addon_Types>(type: T) => Addon_Collection<Addon_TypesMapping[T]>;
94
+ getElements: <T extends Addon_Types | Addon_TypesEnum.experimental_PAGE | Addon_TypesEnum.experimental_TEST_PROVIDER>(type: T) => Addon_Collection<Addon_TypesMapping[T]>;
95
95
  /**
96
96
  * Returns the id of the currently selected panel.
97
97
  *
@@ -128,7 +128,7 @@ interface SubAPI$d {
128
128
  getAddonState<S>(addonId: string): S;
129
129
  }
130
130
 
131
- interface SubAPI$c {
131
+ interface SubAPI$b {
132
132
  /**
133
133
  * Returns the channel object.
134
134
  *
@@ -171,20 +171,6 @@ interface SubAPI$c {
171
171
  once: (type: string, handler: Listener$1) => void;
172
172
  }
173
173
 
174
- type SubState$a = {
175
- testProviders: TestProviders;
176
- };
177
- interface RunOptions {
178
- entryId?: StoryId;
179
- }
180
- type SubAPI$b = {
181
- getTestProviderState(id: string): TestProviderState$1 | undefined;
182
- updateTestProviderState(id: TestProviderId$1, update: Partial<TestProviderState$1>): void;
183
- clearTestProviderState(id: TestProviderId$1): void;
184
- runTestProvider(id: TestProviderId$1, options?: RunOptions): () => void;
185
- cancelTestProvider(id: TestProviderId$1): void;
186
- };
187
-
188
174
  interface SubState$9 {
189
175
  globals?: Globals;
190
176
  userGlobals?: Globals;
@@ -391,7 +377,7 @@ interface SubState$5 {
391
377
 
392
378
  declare const isMacLike: () => boolean;
393
379
  declare const controlOrMetaSymbol: () => "⌘" | "ctrl";
394
- declare const controlOrMetaKey: () => "control" | "meta";
380
+ declare const controlOrMetaKey: () => "meta" | "control";
395
381
  declare const optionOrAltSymbol: () => "⌥" | "alt";
396
382
  declare const isShortcutTaken: (arr1: string[], arr2: string[]) => boolean;
397
383
  type KeyboardEventLike = Pick<KeyboardEvent, 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey' | 'key' | 'code' | 'keyCode' | 'preventDefault'>;
@@ -651,6 +637,14 @@ interface SubAPI$3 {
651
637
  * @returns {StoryId} The ID of the leaf story, or null if no leaf story was found.
652
638
  */
653
639
  findLeafStoryId(index: API_IndexHash, storyId: StoryId): StoryId;
640
+ /**
641
+ * Finds all the leaf story IDs for the given entry ID in the given index.
642
+ *
643
+ * @param {StoryId} entryId - The ID of the entry to find the leaf story IDs for.
644
+ * @returns {StoryId[]} The IDs of all the leaf stories, or an empty array if no leaf stories were
645
+ * found.
646
+ */
647
+ findAllLeafStoryIds(entryId: string): StoryId[];
654
648
  /**
655
649
  * Finds the ID of the sibling story in the given direction for the given story ID in the given
656
650
  * story index.
@@ -818,6 +812,67 @@ declare const experimental_requestResponse: <RequestPayload, ResponsePayload = v
818
812
 
819
813
  declare const _default: <TObj = any>(a: TObj, ...b: Partial<TObj>[]) => TObj;
820
814
 
815
+ declare const ActiveTabs: {
816
+ SIDEBAR: "sidebar";
817
+ CANVAS: "canvas";
818
+ ADDONS: "addons";
819
+ };
820
+
821
+ declare const ManagerContext: React.Context<{
822
+ api: API;
823
+ state: State;
824
+ }>;
825
+ type State = SubState$8 & SubState$3 & SubState$6 & SubState$7 & SubState$1 & SubState$2 & SubState$4 & SubState$5 & SubState$9 & SubState & RouterData & API_OptionsData & Other;
826
+ type API = SubAPI$c & SubAPI$b & SubAPI$7 & SubAPI$3 & SubAPI$6 & SubAPI$a & SubAPI$9 & SubAPI$8 & SubAPI$4 & SubAPI$5 & SubAPI$1 & SubAPI$2 & SubAPI & Other;
827
+ interface Other {
828
+ [key: string]: any;
829
+ }
830
+ interface Combo {
831
+ api: API;
832
+ state: State;
833
+ }
834
+ type ManagerProviderProps = RouterData & API_ProviderData<API> & {
835
+ children: ReactNode | FC<Combo>;
836
+ };
837
+ declare const combineParameters: (...parameterSets: Parameters[]) => {};
838
+ declare class ManagerProvider extends Component<ManagerProviderProps, State> {
839
+ api: API;
840
+ modules: ReturnType<ModuleFn>[];
841
+ static displayName: string;
842
+ constructor(props: ManagerProviderProps);
843
+ static getDerivedStateFromProps(props: ManagerProviderProps, state: State): State;
844
+ shouldComponentUpdate(nextProps: ManagerProviderProps, nextState: State): boolean;
845
+ initModules: () => void;
846
+ render(): React.JSX.Element;
847
+ }
848
+ interface ManagerConsumerProps<P = unknown> {
849
+ filter?: (combo: Combo) => P;
850
+ children: FC<P> | ReactNode;
851
+ }
852
+ declare function ManagerConsumer<P = Combo>({ filter, children, }: ManagerConsumerProps<P>): ReactElement;
853
+ declare function useStorybookState(): State;
854
+ declare function useStorybookApi(): API;
855
+
856
+ interface API_EventMap {
857
+ [eventId: string]: Listener$1;
858
+ }
859
+ declare const useChannel: (eventMap: API_EventMap, deps?: any[]) => (type: string, ...args: any[]) => void;
860
+ declare function useStoryPrepared(storyId?: StoryId): boolean;
861
+ declare function useParameter<S>(parameterKey: string, defaultValue?: S): S;
862
+ declare function useSharedState<S>(stateId: string, defaultState?: S): [S, (newStateOrMerger: S | API_StateMerger<S>, options?: Options) => void];
863
+ declare function useAddonState<S>(addonId: string, defaultState?: S): [S, (newStateOrMerger: S | API_StateMerger<S>, options?: Options) => void];
864
+ declare function useArgs(): [Args, (newArgs: Args) => void, (argNames?: string[]) => void, Args];
865
+ declare function useGlobals(): [
866
+ globals: Globals,
867
+ updateGlobals: (newGlobals: Globals) => void,
868
+ storyGlobals: Globals,
869
+ userGlobals: Globals
870
+ ];
871
+ declare function useGlobalTypes(): ArgTypes;
872
+ declare function useArgTypes(): ArgTypes;
873
+
874
+ declare const typesX: typeof Addon_TypesEnum;
875
+
821
876
  type EnvironmentType = (typeof UniversalStore.Environment)[keyof typeof UniversalStore.Environment];
822
877
  type StatusType = (typeof UniversalStore.Status)[keyof typeof UniversalStore.Status];
823
878
  type StateUpdater<TState> = (prevState: TState) => TState;
@@ -1124,28 +1179,6 @@ declare class MockUniversalStore<State, CustomEvent extends {
1124
1179
  unsubscribeAll(): void;
1125
1180
  }
1126
1181
 
1127
- declare global {
1128
- interface SymbolConstructor {
1129
- readonly observable: symbol;
1130
- }
1131
- }
1132
-
1133
- declare global {
1134
- var globalProjectAnnotations: NormalizedProjectAnnotations<any>;
1135
- var defaultProjectAnnotations: ProjectAnnotations<any>;
1136
- }
1137
- type WrappedStoryRef = {
1138
- __pw_type: 'jsx' | 'importRef';
1139
- };
1140
- type UnwrappedJSXStoryRef = {
1141
- __pw_type: 'jsx';
1142
- type: UnwrappedImportStoryRef;
1143
- };
1144
- type UnwrappedImportStoryRef = ComposedStoryFn;
1145
- declare global {
1146
- function __pwUnwrapObject(storyRef: WrappedStoryRef): Promise<UnwrappedJSXStoryRef | UnwrappedImportStoryRef>;
1147
- }
1148
-
1149
1182
  type StatusValue = 'status-value:pending' | 'status-value:success' | 'status-value:error' | 'status-value:warning' | 'status-value:unknown';
1150
1183
  type StatusTypeId = string;
1151
1184
  type StatusByTypeId = Record<StatusTypeId, Status>;
@@ -1159,6 +1192,13 @@ interface Status {
1159
1192
  data?: any;
1160
1193
  sidebarContextMenu?: boolean;
1161
1194
  }
1195
+ declare const StatusStoreEventType: {
1196
+ readonly SELECT: "select";
1197
+ };
1198
+ type StatusStoreEvent = {
1199
+ type: typeof StatusStoreEventType.SELECT;
1200
+ payload: Status[];
1201
+ };
1162
1202
  type StatusStore = {
1163
1203
  getAll: () => StatusesByStoryIdAndTypeId;
1164
1204
  set: (statuses: Status[]) => void;
@@ -1171,6 +1211,28 @@ type StatusStoreByTypeId = StatusStore & {
1171
1211
  };
1172
1212
  type UseStatusStore = <T = StatusesByStoryIdAndTypeId>(selector?: (statuses: StatusesByStoryIdAndTypeId) => T) => T;
1173
1213
 
1214
+ declare global {
1215
+ interface SymbolConstructor {
1216
+ readonly observable: symbol;
1217
+ }
1218
+ }
1219
+
1220
+ declare global {
1221
+ var globalProjectAnnotations: NormalizedProjectAnnotations<any>;
1222
+ var defaultProjectAnnotations: ProjectAnnotations<any>;
1223
+ }
1224
+ type WrappedStoryRef = {
1225
+ __pw_type: 'jsx' | 'importRef';
1226
+ };
1227
+ type UnwrappedJSXStoryRef = {
1228
+ __pw_type: 'jsx';
1229
+ type: UnwrappedImportStoryRef;
1230
+ };
1231
+ type UnwrappedImportStoryRef = ComposedStoryFn;
1232
+ declare global {
1233
+ function __pwUnwrapObject(storyRef: WrappedStoryRef): Promise<UnwrappedJSXStoryRef | UnwrappedImportStoryRef>;
1234
+ }
1235
+
1174
1236
  type TestProviderState = 'test-provider-state:pending' | 'test-provider-state:running' | 'test-provider-state:succeeded' | 'test-provider-state:crashed';
1175
1237
  type TestProviderId = string;
1176
1238
  type TestProviderStateByProviderId = Record<TestProviderId, TestProviderState>;
@@ -1425,6 +1487,7 @@ declare const fullStatusStore: StatusStore & {
1425
1487
  };
1426
1488
  declare const getStatusStoreByTypeId: (typeId: StatusTypeId) => StatusStoreByTypeId;
1427
1489
  declare const useStatusStore: UseStatusStore;
1490
+ declare const universalStatusStore: UniversalStore<StatusesByStoryIdAndTypeId, StatusStoreEvent>;
1428
1491
 
1429
1492
  declare const fullTestProviderStore: {
1430
1493
  settingsChanged: () => void;
@@ -1439,74 +1502,6 @@ declare const fullTestProviderStore: {
1439
1502
  };
1440
1503
  declare const getTestProviderStoreById: (testProviderId: TestProviderId) => TestProviderStoreById;
1441
1504
  declare const useTestProviderStore: UseTestProviderStore;
1505
+ declare const universalTestProviderStore: UniversalStore<TestProviderStateByProviderId, TestProviderStoreEvent>;
1442
1506
 
1443
- declare const ActiveTabs: {
1444
- SIDEBAR: "sidebar";
1445
- CANVAS: "canvas";
1446
- ADDONS: "addons";
1447
- };
1448
-
1449
- declare const ManagerContext: React.Context<{
1450
- api: API;
1451
- state: State;
1452
- }>;
1453
- type State = SubState$8 & SubState$3 & SubState$6 & SubState$7 & SubState$a & SubState$1 & SubState$2 & SubState$4 & SubState$5 & SubState$9 & SubState & RouterData & API_OptionsData & DeprecatedState & Other;
1454
- type API = SubAPI$d & SubAPI$c & SubAPI$7 & SubAPI$3 & SubAPI$6 & SubAPI$a & SubAPI$9 & SubAPI$8 & SubAPI$b & SubAPI$4 & SubAPI$5 & SubAPI$1 & SubAPI$2 & SubAPI & Other;
1455
- interface DeprecatedState {
1456
- /** @deprecated Use index */
1457
- storiesHash: API_IndexHash;
1458
- /** @deprecated Use previewInitialized */
1459
- storiesConfigured: boolean;
1460
- /** @deprecated Use indexError */
1461
- storiesFailed?: Error;
1462
- }
1463
- interface Other {
1464
- [key: string]: any;
1465
- }
1466
- interface Combo {
1467
- api: API;
1468
- state: State;
1469
- }
1470
- type ManagerProviderProps = RouterData & API_ProviderData<API> & {
1471
- children: ReactNode | FC<Combo>;
1472
- };
1473
- declare const combineParameters: (...parameterSets: Parameters[]) => {};
1474
- declare class ManagerProvider extends Component<ManagerProviderProps, State> {
1475
- api: API;
1476
- modules: ReturnType<ModuleFn>[];
1477
- static displayName: string;
1478
- constructor(props: ManagerProviderProps);
1479
- static getDerivedStateFromProps(props: ManagerProviderProps, state: State): State;
1480
- shouldComponentUpdate(nextProps: ManagerProviderProps, nextState: State): boolean;
1481
- initModules: () => void;
1482
- render(): React.JSX.Element;
1483
- }
1484
- interface ManagerConsumerProps<P = unknown> {
1485
- filter?: (combo: Combo) => P;
1486
- children: FC<P> | ReactNode;
1487
- }
1488
- declare function ManagerConsumer<P = Combo>({ filter, children, }: ManagerConsumerProps<P>): ReactElement;
1489
- declare function useStorybookState(): State;
1490
- declare function useStorybookApi(): API;
1491
-
1492
- interface API_EventMap {
1493
- [eventId: string]: Listener$1;
1494
- }
1495
- declare const useChannel: (eventMap: API_EventMap, deps?: any[]) => (type: string, ...args: any[]) => void;
1496
- declare function useStoryPrepared(storyId?: StoryId): boolean;
1497
- declare function useParameter<S>(parameterKey: string, defaultValue?: S): S;
1498
- declare function useSharedState<S>(stateId: string, defaultState?: S): [S, (newStateOrMerger: S | API_StateMerger<S>, options?: Options) => void];
1499
- declare function useAddonState<S>(addonId: string, defaultState?: S): [S, (newStateOrMerger: S | API_StateMerger<S>, options?: Options) => void];
1500
- declare function useArgs(): [Args, (newArgs: Args) => void, (argNames?: string[]) => void, Args];
1501
- declare function useGlobals(): [
1502
- globals: Globals,
1503
- updateGlobals: (newGlobals: Globals) => void,
1504
- storyGlobals: Globals,
1505
- userGlobals: Globals
1506
- ];
1507
- declare function useGlobalTypes(): ArgTypes;
1508
- declare function useArgTypes(): ArgTypes;
1509
-
1510
- declare const typesX: typeof Addon_TypesEnum;
1511
-
1512
- export { type API, type API_EventMap, ActiveTabs, AddonStore, type Combo, ManagerConsumer as Consumer, type KeyboardEventLike, ManagerContext, type ManagerProviderProps, ManagerProvider as Provider, RequestResponseError, type State, type Options as StoreOptions, addons, combineParameters, controlOrMetaKey, controlOrMetaSymbol, eventMatchesShortcut, eventToShortcut, MockUniversalStore as experimental_MockUniversalStore, UniversalStore as experimental_UniversalStore, getStatusStoreByTypeId as experimental_getStatusStore, getTestProviderStoreById as experimental_getTestProviderStore, experimental_requestResponse, useStatusStore as experimental_useStatusStore, useTestProviderStore as experimental_useTestProviderStore, useUniversalStore as experimental_useUniversalStore, fullStatusStore as internal_fullStatusStore, fullTestProviderStore as internal_fullTestProviderStore, isMacLike, isShortcutTaken, keyToSymbol, _default as merge, mockChannel, optionOrAltSymbol, shortcutMatchesShortcut, shortcutToHumanString, typesX as types, useAddonState, useArgTypes, useArgs, useChannel, useGlobalTypes, useGlobals, useParameter, useSharedState, useStoryPrepared, useStorybookApi, useStorybookState };
1507
+ export { type API, type API_EventMap, ActiveTabs, AddonStore, type Combo, ManagerConsumer as Consumer, type KeyboardEventLike, ManagerContext, type ManagerProviderProps, ManagerProvider as Provider, RequestResponseError, type State, type Options as StoreOptions, addons, combineParameters, controlOrMetaKey, controlOrMetaSymbol, eventMatchesShortcut, eventToShortcut, MockUniversalStore as experimental_MockUniversalStore, UniversalStore as experimental_UniversalStore, getStatusStoreByTypeId as experimental_getStatusStore, getTestProviderStoreById as experimental_getTestProviderStore, experimental_requestResponse, useStatusStore as experimental_useStatusStore, useTestProviderStore as experimental_useTestProviderStore, useUniversalStore as experimental_useUniversalStore, fullStatusStore as internal_fullStatusStore, fullTestProviderStore as internal_fullTestProviderStore, universalStatusStore as internal_universalStatusStore, universalTestProviderStore as internal_universalTestProviderStore, isMacLike, isShortcutTaken, keyToSymbol, _default as merge, mockChannel, optionOrAltSymbol, shortcutMatchesShortcut, shortcutToHumanString, typesX as types, useAddonState, useArgTypes, useArgs, useChannel, useGlobalTypes, useGlobals, useParameter, useSharedState, useStoryPrepared, useStorybookApi, useStorybookState };