@storybook/preview-api 7.0.0-beta.25 → 7.0.0-beta.26
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/dist/{ClientApi-c264b450.d.ts → ClientApi-a81ae60c.d.ts} +1 -1
- package/dist/{StoryStore-e35dc2c4.d.ts → StoryStore-b7887bc4.d.ts} +1 -1
- package/dist/addons.d.ts +1 -1
- package/dist/client-api.d.ts +3 -3
- package/dist/core-client.d.ts +4 -4
- package/dist/{hooks-dd6bc7a8.d.ts → hooks-55c56a89.d.ts} +8 -8
- package/dist/index.d.ts +5 -5
- package/dist/preview-web.d.ts +3 -3
- package/dist/{simulate-pageload-bd2625b0.d.ts → simulate-pageload-0fe50f1c.d.ts} +1 -1
- package/dist/{start-e15b4487.d.ts → start-b5a1cb00.d.ts} +1 -1
- package/dist/store.d.ts +2 -2
- package/package.json +8 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _storybook_types from '@storybook/types';
|
|
2
2
|
import { Renderer, NormalizedProjectAnnotations, StoryId, IndexEntry, ComponentId, Path, ModuleExports, DecoratorFunction, Parameters, LoaderFunction, Args, ArgTypes, ArgsEnhancer, ArgTypesEnhancer, StepRunner, ModuleImportFn, Globals, GlobalTypes, Addon_StoryApi } from '@storybook/types';
|
|
3
|
-
import { S as StoryStore } from './StoryStore-
|
|
3
|
+
import { S as StoryStore } from './StoryStore-b7887bc4.js';
|
|
4
4
|
|
|
5
5
|
declare class StoryStoreFacade<TRenderer extends Renderer> {
|
|
6
6
|
projectAnnotations: NormalizedProjectAnnotations<TRenderer>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _storybook_types from '@storybook/types';
|
|
2
2
|
import { StoryId, StoryName, ComponentTitle, StoryIndex, IndexEntry, Path, Args, PreparedStory, Globals, GlobalTypes, Renderer, ModuleExports, CSFFile, NormalizedStoryAnnotations, NormalizedComponentAnnotations, NormalizedProjectAnnotations, ModuleImportFn, ProjectAnnotations, StoryContextForLoaders, StoryContextForEnhancers, Parameters, StoryIndexV3, API_PreparedStoryIndex, BoundStory } from '@storybook/types';
|
|
3
3
|
import { SynchronousPromise } from 'synchronous-promise';
|
|
4
|
-
import { H as HooksContext } from './hooks-
|
|
4
|
+
import { H as HooksContext } from './hooks-55c56a89.js';
|
|
5
5
|
|
|
6
6
|
type StorySpecifier = StoryId | {
|
|
7
7
|
name: StoryName;
|
package/dist/addons.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { A as AddonStore, c as MakeDecoratorOptions, M as MakeDecoratorResult, a as addons, m as makeDecorator, b as mockChannel } from './storybook-channel-mock-a19cd233.js';
|
|
2
|
-
export { E as EventMap, H as HooksContext, L as Listener, k as applyHooks, u as useArgs, a as useCallback, b as useChannel, c as useEffect, d as useGlobals, e as useMemo, f as useParameter, g as useReducer, h as useRef, i as useState, j as useStoryContext } from './hooks-
|
|
2
|
+
export { E as EventMap, H as HooksContext, L as Listener, k as applyHooks, u as useArgs, a as useCallback, b as useChannel, c as useEffect, d as useGlobals, e as useMemo, f as useParameter, g as useReducer, h as useRef, i as useState, j as useStoryContext } from './hooks-55c56a89.js';
|
|
3
3
|
import '@storybook/channels';
|
|
4
4
|
import '@storybook/types';
|
package/dist/client-api.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { C as ClientApi, a as addArgTypes, b as addArgTypesEnhancer, c as addArgs, d as addArgsEnhancer, e as addDecorator, f as addLoader, g as addParameters, h as addStepRunner, s as setGlobalRender } from './ClientApi-
|
|
2
|
-
export { S as StoryStore, p as prepareStory, b as processCSFFile } from './StoryStore-
|
|
1
|
+
export { C as ClientApi, a as addArgTypes, b as addArgTypesEnhancer, c as addArgs, d as addArgsEnhancer, e as addDecorator, f as addLoader, g as addParameters, h as addStepRunner, s as setGlobalRender } from './ClientApi-a81ae60c.js';
|
|
2
|
+
export { S as StoryStore, p as prepareStory, b as processCSFFile } from './StoryStore-b7887bc4.js';
|
|
3
3
|
export { D as DEEPLY_EQUAL, N as NO_TARGET_NAME, P as PropDescriptor, c as combineArgs, a as combineParameters, b as composeStepRunners, d as composeStories, e as composeStory, f as decorateStory, o as deepDiff, g as defaultDecorateStory, h as filterArgTypes, p as groupArgsByTarget, j as inferControls, m as mapArgsToTypes, q as noTargetArgs, n as normalizeStory, s as sanitizeStoryContextUpdate, i as setProjectAnnotations, r as sortStoriesV6, l as sortStoriesV7, k as userOrAutoTitle, u as userOrAutoTitleFromSpecifier, v as validateOptions } from './sortStories-569e0e66.js';
|
|
4
4
|
export { g as getValuesFromArgTypes, b as normalizeComponentAnnotations, n as normalizeInputType, a as normalizeInputTypes, c as normalizeProjectAnnotations, d as useAddonState, u as useSharedState } from './hooks-0a0ec0e3.js';
|
|
5
5
|
export { c as composeConfigs, a as getArrayField, g as getField, b as getObjectField, d as getSingletonField } from './composeConfigs-7f62ebf7.js';
|
|
6
6
|
export { g as getQueryParam, a as getQueryParams } from './queryparams-d12445b8.js';
|
|
7
|
-
export { H as HooksContext, k as applyHooks, u as useArgs, a as useCallback, b as useChannel, c as useEffect, d as useGlobals, e as useMemo, f as useParameter, g as useReducer, h as useRef, i as useState, j as useStoryContext } from './hooks-
|
|
7
|
+
export { H as HooksContext, k as applyHooks, u as useArgs, a as useCallback, b as useChannel, c as useEffect, d as useGlobals, e as useMemo, f as useParameter, g as useReducer, h as useRef, i as useState, j as useStoryContext } from './hooks-55c56a89.js';
|
|
8
8
|
import '@storybook/types';
|
|
9
9
|
import 'synchronous-promise';
|
|
10
10
|
import 'qs';
|
package/dist/core-client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as ClientApi } from './ClientApi-
|
|
2
|
-
export { S as StoryStore } from './StoryStore-
|
|
3
|
-
export { s as start } from './start-
|
|
1
|
+
export { C as ClientApi } from './ClientApi-a81ae60c.js';
|
|
2
|
+
export { S as StoryStore } from './StoryStore-b7887bc4.js';
|
|
3
|
+
export { s as start } from './start-b5a1cb00.js';
|
|
4
4
|
import '@storybook/types';
|
|
5
5
|
import 'synchronous-promise';
|
|
6
|
-
import './hooks-
|
|
6
|
+
import './hooks-55c56a89.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Renderer, StoryContext, StoryId, DecoratorApplicator
|
|
1
|
+
import { Renderer, Args, StoryContext, StoryId, DecoratorApplicator } from '@storybook/types';
|
|
2
2
|
|
|
3
3
|
interface Hook {
|
|
4
4
|
name: string;
|
|
@@ -10,7 +10,7 @@ interface Effect {
|
|
|
10
10
|
destroy?: (() => void) | void;
|
|
11
11
|
}
|
|
12
12
|
type AbstractFunction = (...args: any[]) => any;
|
|
13
|
-
declare class HooksContext<TRenderer extends Renderer> {
|
|
13
|
+
declare class HooksContext<TRenderer extends Renderer, TArgs extends Args = Args> {
|
|
14
14
|
hookListsMap: WeakMap<AbstractFunction, Hook[]>;
|
|
15
15
|
mountedDecorators: Set<AbstractFunction>;
|
|
16
16
|
prevMountedDecorators: Set<AbstractFunction>;
|
|
@@ -21,7 +21,7 @@ declare class HooksContext<TRenderer extends Renderer> {
|
|
|
21
21
|
prevEffects: Effect[];
|
|
22
22
|
currentDecoratorName: string | null;
|
|
23
23
|
hasUpdates: boolean;
|
|
24
|
-
currentContext: StoryContext<TRenderer> | null;
|
|
24
|
+
currentContext: StoryContext<TRenderer, TArgs> | null;
|
|
25
25
|
renderListener: (storyId: StoryId) => void;
|
|
26
26
|
constructor();
|
|
27
27
|
init(): void;
|
|
@@ -48,12 +48,12 @@ interface EventMap {
|
|
|
48
48
|
[eventId: string]: Listener;
|
|
49
49
|
}
|
|
50
50
|
declare function useChannel(eventMap: EventMap, deps?: any[]): (eventName: string, ...args: any) => void;
|
|
51
|
-
declare function useStoryContext<TRenderer extends Renderer>(): StoryContext<TRenderer>;
|
|
51
|
+
declare function useStoryContext<TRenderer extends Renderer, TArgs extends Args = Args>(): StoryContext<TRenderer>;
|
|
52
52
|
declare function useParameter<S>(parameterKey: string, defaultValue?: S): S | undefined;
|
|
53
|
-
declare function useArgs<
|
|
54
|
-
|
|
55
|
-
(newArgs: Partial<
|
|
56
|
-
(argNames?: (keyof
|
|
53
|
+
declare function useArgs<TArgs extends Args = Args>(): [
|
|
54
|
+
TArgs,
|
|
55
|
+
(newArgs: Partial<TArgs>) => void,
|
|
56
|
+
(argNames?: (keyof TArgs)[]) => void
|
|
57
57
|
];
|
|
58
58
|
declare function useGlobals(): [Args, (newGlobals: Args) => void];
|
|
59
59
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { a as addons, m as makeDecorator, b as mockChannel } from './storybook-channel-mock-a19cd233.js';
|
|
2
|
-
export { H as HooksContext, k as applyHooks, u as useArgs, a as useCallback, b as useChannel, c as useEffect, d as useGlobals, e as useMemo, f as useParameter, g as useReducer, h as useRef, i as useState, j as useStoryContext } from './hooks-
|
|
3
|
-
export { S as StoryStore, p as prepareStory } from './StoryStore-
|
|
2
|
+
export { H as HooksContext, k as applyHooks, u as useArgs, a as useCallback, b as useChannel, c as useEffect, d as useGlobals, e as useMemo, f as useParameter, g as useReducer, h as useRef, i as useState, j as useStoryContext } from './hooks-55c56a89.js';
|
|
3
|
+
export { S as StoryStore, p as prepareStory } from './StoryStore-b7887bc4.js';
|
|
4
4
|
export { P as PropDescriptor, c as combineArgs, a as combineParameters, b as composeStepRunners, d as composeStories, e as composeStory, f as decorateStory, g as defaultDecorateStory, h as filterArgTypes, j as inferControls, n as normalizeStory, s as sanitizeStoryContextUpdate, i as setProjectAnnotations, l as sortStoriesV7, k as userOrAutoTitle, u as userOrAutoTitleFromSpecifier } from './sortStories-569e0e66.js';
|
|
5
5
|
export { c as composeConfigs } from './composeConfigs-7f62ebf7.js';
|
|
6
|
-
export { D as DocsContext, P as Preview, b as PreviewWeb, a as simulateDOMContentLoaded, s as simulatePageLoad } from './simulate-pageload-
|
|
7
|
-
export { C as ClientApi, a as addArgTypes, b as addArgTypesEnhancer, c as addArgs, d as addArgsEnhancer, e as addDecorator, f as addLoader, g as addParameters, h as addStepRunner, s as setGlobalRender } from './ClientApi-
|
|
6
|
+
export { D as DocsContext, P as Preview, b as PreviewWeb, a as simulateDOMContentLoaded, s as simulatePageLoad } from './simulate-pageload-0fe50f1c.js';
|
|
7
|
+
export { C as ClientApi, a as addArgTypes, b as addArgTypesEnhancer, c as addArgs, d as addArgsEnhancer, e as addDecorator, f as addLoader, g as addParameters, h as addStepRunner, s as setGlobalRender } from './ClientApi-a81ae60c.js';
|
|
8
8
|
export { g as getQueryParam, a as getQueryParams } from './queryparams-d12445b8.js';
|
|
9
|
-
export { s as start } from './start-
|
|
9
|
+
export { s as start } from './start-b5a1cb00.js';
|
|
10
10
|
import '@storybook/channels';
|
|
11
11
|
import '@storybook/types';
|
|
12
12
|
import 'synchronous-promise';
|
package/dist/preview-web.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { DocsContextProps, DocsRenderFunction, ProjectAnnotations as WebProjectAnnotations } from '@storybook/types';
|
|
2
2
|
export { c as composeConfigs } from './composeConfigs-7f62ebf7.js';
|
|
3
|
-
export { D as DocsContext, P as Preview, b as PreviewWeb, c as PreviewWithSelection, a as simulateDOMContentLoaded, s as simulatePageLoad } from './simulate-pageload-
|
|
3
|
+
export { D as DocsContext, P as Preview, b as PreviewWeb, c as PreviewWithSelection, a as simulateDOMContentLoaded, s as simulatePageLoad } from './simulate-pageload-0fe50f1c.js';
|
|
4
4
|
import '@storybook/channels';
|
|
5
|
-
import './StoryStore-
|
|
5
|
+
import './StoryStore-b7887bc4.js';
|
|
6
6
|
import 'synchronous-promise';
|
|
7
|
-
import './hooks-
|
|
7
|
+
import './hooks-55c56a89.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _storybook_types from '@storybook/types';
|
|
2
2
|
import { Renderer, StoryId, StoryRenderOptions, ViewMode, PreparedStory, RenderToCanvas, RenderContext, DocsContextProps, CSFFile, ModuleExports, ModuleExport, ResolvedModuleExport, StoryName, StoryContextForLoaders, IndexEntry, StoryIndex, ModuleImportFn, ProjectAnnotations, Globals, Args } from '@storybook/types';
|
|
3
3
|
import { Channel } from '@storybook/channels';
|
|
4
|
-
import { S as StoryStore, a as StorySpecifier } from './StoryStore-
|
|
4
|
+
import { S as StoryStore, a as StorySpecifier } from './StoryStore-b7887bc4.js';
|
|
5
5
|
|
|
6
6
|
type RenderType = 'story' | 'docs';
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Renderer, ProjectAnnotations, ArgsStoryFn } from '@storybook/types';
|
|
2
|
-
import { C as ClientApi } from './ClientApi-
|
|
2
|
+
import { C as ClientApi } from './ClientApi-a81ae60c.js';
|
|
3
3
|
|
|
4
4
|
interface CoreClient_RendererImplementation<TRenderer extends Renderer> {
|
|
5
5
|
decorateStory?: ProjectAnnotations<TRenderer>['applyDecorators'];
|
package/dist/store.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { S as StoryStore, p as prepareStory, b as processCSFFile } from './StoryStore-
|
|
1
|
+
export { S as StoryStore, p as prepareStory, b as processCSFFile } from './StoryStore-b7887bc4.js';
|
|
2
2
|
export { D as DEEPLY_EQUAL, N as NO_TARGET_NAME, P as PropDescriptor, c as combineArgs, a as combineParameters, b as composeStepRunners, d as composeStories, e as composeStory, f as decorateStory, o as deepDiff, g as defaultDecorateStory, h as filterArgTypes, p as groupArgsByTarget, j as inferControls, m as mapArgsToTypes, q as noTargetArgs, n as normalizeStory, s as sanitizeStoryContextUpdate, i as setProjectAnnotations, r as sortStoriesV6, l as sortStoriesV7, k as userOrAutoTitle, u as userOrAutoTitleFromSpecifier, v as validateOptions } from './sortStories-569e0e66.js';
|
|
3
3
|
export { g as getValuesFromArgTypes, b as normalizeComponentAnnotations, n as normalizeInputType, a as normalizeInputTypes, c as normalizeProjectAnnotations, d as useAddonState, u as useSharedState } from './hooks-0a0ec0e3.js';
|
|
4
4
|
export { c as composeConfigs, a as getArrayField, g as getField, b as getObjectField, d as getSingletonField } from './composeConfigs-7f62ebf7.js';
|
|
5
|
-
export { H as HooksContext, k as applyHooks, u as useArgs, a as useCallback, b as useChannel, c as useEffect, d as useGlobals, e as useMemo, f as useParameter, g as useReducer, h as useRef, i as useState, j as useStoryContext } from './hooks-
|
|
5
|
+
export { H as HooksContext, k as applyHooks, u as useArgs, a as useCallback, b as useChannel, c as useEffect, d as useGlobals, e as useMemo, f as useParameter, g as useReducer, h as useRef, i as useState, j as useStoryContext } from './hooks-55c56a89.js';
|
|
6
6
|
import '@storybook/types';
|
|
7
7
|
import 'synchronous-promise';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/preview-api",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.26",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -67,13 +67,13 @@
|
|
|
67
67
|
"prep": "../../../scripts/prepare/bundle.ts"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@storybook/channel-postmessage": "7.0.0-beta.
|
|
71
|
-
"@storybook/channels": "7.0.0-beta.
|
|
72
|
-
"@storybook/client-logger": "7.0.0-beta.
|
|
73
|
-
"@storybook/core-events": "7.0.0-beta.
|
|
70
|
+
"@storybook/channel-postmessage": "7.0.0-beta.26",
|
|
71
|
+
"@storybook/channels": "7.0.0-beta.26",
|
|
72
|
+
"@storybook/client-logger": "7.0.0-beta.26",
|
|
73
|
+
"@storybook/core-events": "7.0.0-beta.26",
|
|
74
74
|
"@storybook/csf": "next",
|
|
75
75
|
"@storybook/global": "^5.0.0",
|
|
76
|
-
"@storybook/types": "7.0.0-beta.
|
|
76
|
+
"@storybook/types": "7.0.0-beta.26",
|
|
77
77
|
"@types/qs": "^6.9.5",
|
|
78
78
|
"dequal": "^2.0.2",
|
|
79
79
|
"lodash": "^4.17.21",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@jest/globals": "^26.6.2",
|
|
89
|
-
"@storybook/core-common": "7.0.0-beta.
|
|
89
|
+
"@storybook/core-common": "7.0.0-beta.26",
|
|
90
90
|
"ansi-to-html": "^0.6.11",
|
|
91
91
|
"react": "^16.14.0"
|
|
92
92
|
},
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"./src/store.ts"
|
|
104
104
|
]
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "4d3ed5ec2eb8db3e688955e2820001def09621c1"
|
|
107
107
|
}
|