storybook 9.0.0-alpha.12 → 9.0.0-alpha.13

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 (78) hide show
  1. package/assets/docs/addon-backgrounds.gif +0 -0
  2. package/assets/docs/highlight.png +0 -0
  3. package/dist/backgrounds/index.cjs +148 -0
  4. package/dist/backgrounds/index.d.ts +91 -0
  5. package/dist/backgrounds/index.js +130 -0
  6. package/dist/backgrounds/preview.cjs +143 -0
  7. package/dist/backgrounds/preview.d.ts +54 -0
  8. package/dist/backgrounds/preview.js +127 -0
  9. package/dist/bin/index.cjs +63 -71
  10. package/dist/bin/index.js +53 -61
  11. package/dist/builder-manager/index.cjs +390 -380
  12. package/dist/builder-manager/index.js +489 -479
  13. package/dist/cli/bin/index.cjs +225 -225
  14. package/dist/cli/bin/index.js +234 -234
  15. package/dist/cli/index.cjs +0 -2
  16. package/dist/cli/index.js +0 -2
  17. package/dist/common/index.cjs +2399 -2378
  18. package/dist/common/index.d.ts +0 -8
  19. package/dist/common/index.js +2607 -2586
  20. package/dist/components/index.cjs +3394 -3372
  21. package/dist/components/index.js +3922 -3900
  22. package/dist/core-events/index.cjs +72 -84
  23. package/dist/core-events/index.d.ts +2 -77
  24. package/dist/core-events/index.js +61 -73
  25. package/dist/core-server/index.cjs +5258 -5168
  26. package/dist/core-server/index.js +6539 -6449
  27. package/dist/core-server/presets/common-manager.js +9815 -12
  28. package/dist/core-server/presets/common-preset.cjs +2809 -3005
  29. package/dist/core-server/presets/common-preset.js +2891 -3087
  30. package/dist/docs-tools/index.cjs +626 -600
  31. package/dist/docs-tools/index.js +613 -587
  32. package/dist/highlight/index.cjs +27 -0
  33. package/dist/highlight/index.d.ts +17 -0
  34. package/dist/highlight/index.js +7 -0
  35. package/dist/highlight/preview.cjs +81 -0
  36. package/dist/highlight/preview.d.ts +54 -0
  37. package/dist/highlight/preview.js +67 -0
  38. package/dist/instrumenter/index.cjs +70 -60
  39. package/dist/instrumenter/index.d.ts +8 -7
  40. package/dist/instrumenter/index.js +98 -88
  41. package/dist/manager/globals-module-info.cjs +12 -22
  42. package/dist/manager/globals-module-info.js +2 -12
  43. package/dist/manager/globals-runtime.js +24173 -23140
  44. package/dist/manager/runtime.js +3419 -3522
  45. package/dist/manager-api/index.cjs +1055 -1167
  46. package/dist/manager-api/index.d.ts +7 -21
  47. package/dist/manager-api/index.js +761 -877
  48. package/dist/measure/index.cjs +474 -0
  49. package/dist/measure/index.d.ts +66 -0
  50. package/dist/measure/index.js +462 -0
  51. package/dist/measure/preview.cjs +464 -0
  52. package/dist/measure/preview.d.ts +59 -0
  53. package/dist/measure/preview.js +448 -0
  54. package/dist/outline/index.cjs +528 -0
  55. package/dist/outline/index.d.ts +66 -0
  56. package/dist/outline/index.js +500 -0
  57. package/dist/outline/preview.cjs +518 -0
  58. package/dist/outline/preview.d.ts +59 -0
  59. package/dist/outline/preview.js +486 -0
  60. package/dist/preview/runtime.js +14441 -13330
  61. package/dist/preview-api/index.cjs +1067 -1071
  62. package/dist/preview-api/index.d.ts +61 -102
  63. package/dist/preview-api/index.js +1090 -1092
  64. package/dist/test/index.cjs +1547 -1546
  65. package/dist/test/index.js +2308 -2307
  66. package/dist/test/preview.cjs +1906 -1905
  67. package/dist/test/preview.d.ts +0 -6
  68. package/dist/test/preview.js +1439 -1438
  69. package/dist/test/spy.cjs +65 -64
  70. package/dist/test/spy.js +59 -58
  71. package/dist/types/index.cjs +10 -10
  72. package/dist/types/index.d.ts +206 -243
  73. package/package.json +121 -16
  74. package/dist/actions/manager.js +0 -1195
  75. package/dist/component-testing/manager.js +0 -3126
  76. package/dist/controls/manager.js +0 -5593
  77. package/dist/viewport/manager.js +0 -400
  78. /package/dist/{component-testing/manager.css → core-server/presets/common-manager.css} +0 -0
@@ -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_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, API_OptionsData, Parameters, ArgTypes, NormalizedProjectAnnotations, ProjectAnnotations, ComposedStoryFn } 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
 
@@ -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
  *
@@ -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'>;
@@ -836,8 +822,8 @@ declare const ManagerContext: React.Context<{
836
822
  api: API;
837
823
  state: State;
838
824
  }>;
839
- 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 & Other;
840
- 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;
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;
841
827
  interface Other {
842
828
  [key: string]: any;
843
829
  }