storybook 9.0.0-alpha.12 → 9.0.0-alpha.14
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.
- package/assets/docs/addon-backgrounds.gif +0 -0
- package/assets/docs/highlight.png +0 -0
- package/dist/actions/decorator.js +46 -47
- package/dist/actions/index.cjs +28 -29
- package/dist/actions/index.d.ts +0 -3
- package/dist/actions/index.js +27 -28
- package/dist/actions/preview.cjs +22 -23
- package/dist/actions/preview.js +18 -19
- package/dist/backgrounds/index.cjs +148 -0
- package/dist/backgrounds/index.d.ts +91 -0
- package/dist/backgrounds/index.js +130 -0
- package/dist/backgrounds/preview.cjs +143 -0
- package/dist/backgrounds/preview.d.ts +54 -0
- package/dist/backgrounds/preview.js +127 -0
- package/dist/bin/index.cjs +62 -73
- package/dist/bin/index.js +57 -68
- package/dist/builder-manager/index.cjs +390 -380
- package/dist/builder-manager/index.js +489 -479
- package/dist/channels/index.cjs +1018 -948
- package/dist/channels/index.js +1194 -1161
- package/dist/cli/bin/index.cjs +225 -225
- package/dist/cli/bin/index.js +234 -234
- package/dist/cli/index.cjs +1860 -1873
- package/dist/cli/index.js +308 -321
- package/dist/common/index.cjs +2396 -2380
- package/dist/common/index.d.ts +0 -11
- package/dist/common/index.js +2604 -2588
- package/dist/components/index.cjs +6393 -12704
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.js +4665 -10778
- package/dist/core-events/index.cjs +72 -84
- package/dist/core-events/index.d.ts +2 -77
- package/dist/core-events/index.js +61 -73
- package/dist/core-server/index.cjs +13484 -13318
- package/dist/core-server/index.js +13652 -13486
- package/dist/core-server/presets/common-manager.js +9815 -12
- package/dist/core-server/presets/common-preset.cjs +2809 -3005
- package/dist/core-server/presets/common-preset.js +2891 -3087
- package/dist/docs-tools/index.cjs +626 -600
- package/dist/docs-tools/index.js +613 -587
- package/dist/highlight/index.cjs +27 -0
- package/dist/highlight/index.d.ts +17 -0
- package/dist/highlight/index.js +7 -0
- package/dist/highlight/preview.cjs +81 -0
- package/dist/highlight/preview.d.ts +54 -0
- package/dist/highlight/preview.js +67 -0
- package/dist/instrumenter/index.cjs +70 -60
- package/dist/instrumenter/index.d.ts +8 -7
- package/dist/instrumenter/index.js +98 -88
- package/dist/manager/globals-module-info.cjs +12 -22
- package/dist/manager/globals-module-info.js +2 -12
- package/dist/manager/globals-runtime.js +31295 -33999
- package/dist/manager/runtime.js +3419 -3522
- package/dist/manager-api/index.cjs +2521 -2445
- package/dist/manager-api/index.d.ts +7 -21
- package/dist/manager-api/index.js +2431 -2349
- package/dist/measure/index.cjs +474 -0
- package/dist/measure/index.d.ts +66 -0
- package/dist/measure/index.js +462 -0
- package/dist/measure/preview.cjs +464 -0
- package/dist/measure/preview.d.ts +59 -0
- package/dist/measure/preview.js +448 -0
- package/dist/outline/index.cjs +528 -0
- package/dist/outline/index.d.ts +66 -0
- package/dist/outline/index.js +500 -0
- package/dist/outline/preview.cjs +518 -0
- package/dist/outline/preview.d.ts +59 -0
- package/dist/outline/preview.js +486 -0
- package/dist/preview/runtime.js +20735 -17220
- package/dist/preview-api/index.cjs +1069 -1057
- package/dist/preview-api/index.d.ts +384 -157
- package/dist/preview-api/index.js +1123 -1109
- package/dist/server-errors.cjs +66 -67
- package/dist/server-errors.d.ts +0 -1
- package/dist/server-errors.js +68 -69
- package/dist/test/index.cjs +1547 -1546
- package/dist/test/index.js +2308 -2307
- package/dist/test/preview.cjs +1906 -1905
- package/dist/test/preview.js +1439 -1438
- package/dist/test/spy.cjs +65 -64
- package/dist/test/spy.js +59 -58
- package/dist/types/index.cjs +10 -10
- package/dist/types/index.d.ts +203 -243
- package/package.json +122 -17
- package/dist/actions/manager.js +0 -1195
- package/dist/component-testing/manager.js +0 -3126
- package/dist/controls/manager.js +0 -5593
- package/dist/viewport/manager.js +0 -400
- /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,
|
|
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$
|
|
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$
|
|
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: () => "
|
|
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$
|
|
840
|
-
type API = SubAPI$
|
|
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
|
}
|