@storybook/server 6.4.0-beta.24 → 6.4.0-beta.28
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/cjs/client/index.js +59 -0
- package/dist/cjs/client/preview/config.js +25 -0
- package/dist/cjs/client/preview/globals.js +8 -0
- package/dist/cjs/client/preview/index.js +52 -0
- package/dist/cjs/client/preview/render.js +190 -0
- package/dist/cjs/client/preview/types.js +1 -0
- package/dist/cjs/lib/compiler/index.js +21 -0
- package/dist/cjs/lib/compiler/stringifier.js +168 -0
- package/dist/cjs/lib/compiler/types.js +1 -0
- package/dist/cjs/server/build.js +9 -0
- package/dist/cjs/server/framework-preset-server.js +34 -0
- package/dist/cjs/server/index.js +9 -0
- package/dist/cjs/server/loader.js +14 -0
- package/dist/cjs/server/options.js +17 -0
- package/dist/cjs/typings.d.js +1 -0
- package/dist/esm/client/index.js +5 -0
- package/dist/esm/client/preview/config.js +4 -0
- package/dist/esm/client/preview/globals.js +3 -0
- package/dist/esm/client/preview/index.js +30 -0
- package/dist/esm/client/preview/render.js +160 -0
- package/dist/esm/client/preview/types.js +0 -0
- package/dist/esm/lib/compiler/index.js +13 -0
- package/dist/esm/lib/compiler/stringifier.js +132 -0
- package/dist/esm/lib/compiler/types.js +0 -0
- package/dist/esm/server/build.js +3 -0
- package/dist/esm/server/framework-preset-server.js +19 -0
- package/dist/esm/server/index.js +3 -0
- package/dist/esm/server/loader.js +4 -0
- package/dist/esm/server/options.js +8 -0
- package/dist/esm/typings.d.js +0 -0
- package/dist/modern/client/index.js +5 -0
- package/dist/modern/client/preview/config.js +4 -0
- package/dist/modern/client/preview/globals.js +5 -0
- package/dist/modern/client/preview/index.js +24 -0
- package/dist/modern/client/preview/render.js +97 -0
- package/dist/modern/client/preview/types.js +0 -0
- package/dist/modern/lib/compiler/index.js +12 -0
- package/dist/modern/lib/compiler/stringifier.js +80 -0
- package/dist/modern/lib/compiler/types.js +0 -0
- package/dist/modern/server/build.js +3 -0
- package/dist/modern/server/framework-preset-server.js +19 -0
- package/dist/modern/server/index.js +3 -0
- package/dist/modern/server/loader.js +4 -0
- package/dist/modern/server/options.js +8 -0
- package/dist/modern/typings.d.js +0 -0
- package/dist/ts3.4/client/index.d.ts +1 -0
- package/dist/ts3.4/client/preview/config.d.ts +4 -0
- package/dist/ts3.4/client/preview/globals.d.ts +1 -0
- package/dist/ts3.4/client/preview/index.d.ts +21 -0
- package/dist/ts3.4/client/preview/render.d.ts +5 -0
- package/dist/ts3.4/client/preview/types.d.ts +20 -0
- package/dist/ts3.4/lib/compiler/index.d.ts +2 -0
- package/dist/ts3.4/lib/compiler/stringifier.d.ts +7 -0
- package/dist/ts3.4/lib/compiler/types.d.ts +24 -0
- package/dist/ts3.4/server/build.d.ts +1 -0
- package/dist/ts3.4/server/framework-preset-server.d.ts +4 -0
- package/dist/ts3.4/server/index.d.ts +1 -0
- package/dist/ts3.4/server/loader.d.ts +2 -0
- package/dist/ts3.4/server/options.d.ts +3 -0
- package/dist/ts3.9/client/index.d.ts +1 -0
- package/dist/ts3.9/client/preview/config.d.ts +4 -0
- package/dist/ts3.9/client/preview/globals.d.ts +1 -0
- package/dist/ts3.9/client/preview/index.d.ts +21 -0
- package/dist/ts3.9/client/preview/render.d.ts +5 -0
- package/dist/ts3.9/client/preview/types.d.ts +20 -0
- package/dist/ts3.9/lib/compiler/index.d.ts +2 -0
- package/dist/ts3.9/lib/compiler/stringifier.d.ts +7 -0
- package/dist/ts3.9/lib/compiler/types.d.ts +24 -0
- package/dist/ts3.9/server/build.d.ts +1 -0
- package/dist/ts3.9/server/framework-preset-server.d.ts +4 -0
- package/dist/ts3.9/server/index.d.ts +1 -0
- package/dist/ts3.9/server/loader.d.ts +2 -0
- package/dist/ts3.9/server/options.d.ts +3 -0
- package/package.json +10 -10
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="webpack-env" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { ClientStoryApi, Loadable } from '@storybook/addons';
|
|
4
|
+
import './globals';
|
|
5
|
+
import { IStorybookSection, ServerFramework } from './types';
|
|
6
|
+
interface ClientApi extends ClientStoryApi<ServerFramework['storyResult']> {
|
|
7
|
+
setAddon(addon: any): void;
|
|
8
|
+
configure(loader: Loadable, module: NodeModule): void;
|
|
9
|
+
getStorybook(): IStorybookSection[];
|
|
10
|
+
clearDecorators(): void;
|
|
11
|
+
forceReRender(): void;
|
|
12
|
+
raw: () => any;
|
|
13
|
+
}
|
|
14
|
+
export declare const storiesOf: ClientApi['storiesOf'];
|
|
15
|
+
export declare const configure: ClientApi['configure'];
|
|
16
|
+
export declare const addDecorator: (() => never) | ((decorator: import("@storybook/csf").DecoratorFunction<ServerFramework, import("@storybook/addons").Args>) => void), addParameters: (() => never) | (({ globals, globalTypes, ...parameters }: import("@storybook/csf").Parameters & {
|
|
17
|
+
globals?: import("@storybook/csf").Globals;
|
|
18
|
+
globalTypes?: import("@storybook/csf").GlobalTypes;
|
|
19
|
+
}) => void), clearDecorators: (() => never) | (() => void), setAddon: (() => never) | ((addon: any) => void), getStorybook: (() => never) | (() => import("@storybook/client-api/dist/ts3.9/ClientApi").GetStorybookKind<ServerFramework>[]), raw: (() => never) | (() => import("@storybook/store").BoundStory<ServerFramework>[]);
|
|
20
|
+
export declare const forceReRender: (() => never) | (() => void);
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RenderContext } from '@storybook/store';
|
|
2
|
+
import { StoryFn } from '@storybook/csf';
|
|
3
|
+
import { ServerFramework } from './types';
|
|
4
|
+
export declare const render: StoryFn<ServerFramework>;
|
|
5
|
+
export declare function renderToDOM({ id, title, name, showMain, showError, forceRemount, storyFn, storyContext, storyContext: { parameters, args, argTypes }, }: RenderContext<ServerFramework>, domElement: HTMLElement): Promise<void>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StoryContext } from '@storybook/csf';
|
|
2
|
+
export { RenderContext } from '@storybook/core';
|
|
3
|
+
export declare type StoryFnServerReturnType = any;
|
|
4
|
+
export declare type ServerFramework = {
|
|
5
|
+
component: string;
|
|
6
|
+
storyResult: StoryFnServerReturnType;
|
|
7
|
+
};
|
|
8
|
+
export declare type FetchStoryHtmlType = (url: string, id: string, params: any, context: StoryContext<ServerFramework>) => Promise<string | Node>;
|
|
9
|
+
export interface IStorybookStory {
|
|
10
|
+
name: string;
|
|
11
|
+
render: (context: any) => any;
|
|
12
|
+
}
|
|
13
|
+
export interface IStorybookSection {
|
|
14
|
+
kind: string;
|
|
15
|
+
stories: IStorybookStory[];
|
|
16
|
+
}
|
|
17
|
+
export interface ShowErrorArgs {
|
|
18
|
+
title: string;
|
|
19
|
+
description: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StorybookStory, StorybookSection } from './types';
|
|
2
|
+
export declare function stringifyObject(object: any, level?: number, excludeOuterParams?: boolean): string;
|
|
3
|
+
export declare function stringifyImports(imports: Record<string, string[]>): string;
|
|
4
|
+
export declare function stringifyDecorators(decorators: string[]): string;
|
|
5
|
+
export declare function stringifyDefault(section: StorybookSection): string;
|
|
6
|
+
export declare function stringifyStory(story: StorybookStory): string;
|
|
7
|
+
export declare function stringifySection(section: StorybookSection): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface CompileStorybookStoryArgs {
|
|
2
|
+
name: string;
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
}
|
|
5
|
+
export interface CompileStorybookSectionArgs {
|
|
6
|
+
title: string;
|
|
7
|
+
stories: CompileStorybookStoryArgs[];
|
|
8
|
+
[x: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface CompileCsfModuleArgs extends CompileStorybookSectionArgs {
|
|
11
|
+
addons?: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface StorybookStory {
|
|
14
|
+
name: string;
|
|
15
|
+
decorators?: string[];
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
}
|
|
18
|
+
export interface StorybookSection {
|
|
19
|
+
imports: Record<string, string[]>;
|
|
20
|
+
decorators?: string[];
|
|
21
|
+
title: string;
|
|
22
|
+
stories: StorybookStory[];
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { storiesOf, setAddon, addDecorator, addParameters, configure, getStorybook, forceReRender, raw, } from './preview';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="webpack-env" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { ClientStoryApi, Loadable } from '@storybook/addons';
|
|
4
|
+
import './globals';
|
|
5
|
+
import { IStorybookSection, ServerFramework } from './types';
|
|
6
|
+
interface ClientApi extends ClientStoryApi<ServerFramework['storyResult']> {
|
|
7
|
+
setAddon(addon: any): void;
|
|
8
|
+
configure(loader: Loadable, module: NodeModule): void;
|
|
9
|
+
getStorybook(): IStorybookSection[];
|
|
10
|
+
clearDecorators(): void;
|
|
11
|
+
forceReRender(): void;
|
|
12
|
+
raw: () => any;
|
|
13
|
+
}
|
|
14
|
+
export declare const storiesOf: ClientApi['storiesOf'];
|
|
15
|
+
export declare const configure: ClientApi['configure'];
|
|
16
|
+
export declare const addDecorator: (() => never) | ((decorator: import("@storybook/csf").DecoratorFunction<ServerFramework, import("@storybook/addons").Args>) => void), addParameters: (() => never) | (({ globals, globalTypes, ...parameters }: import("@storybook/csf").Parameters & {
|
|
17
|
+
globals?: import("@storybook/csf").Globals;
|
|
18
|
+
globalTypes?: import("@storybook/csf").GlobalTypes;
|
|
19
|
+
}) => void), clearDecorators: (() => never) | (() => void), setAddon: (() => never) | ((addon: any) => void), getStorybook: (() => never) | (() => import("@storybook/client-api/dist/ts3.9/ClientApi").GetStorybookKind<ServerFramework>[]), raw: (() => never) | (() => import("@storybook/store").BoundStory<ServerFramework>[]);
|
|
20
|
+
export declare const forceReRender: (() => never) | (() => void);
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RenderContext } from '@storybook/store';
|
|
2
|
+
import { StoryFn } from '@storybook/csf';
|
|
3
|
+
import { ServerFramework } from './types';
|
|
4
|
+
export declare const render: StoryFn<ServerFramework>;
|
|
5
|
+
export declare function renderToDOM({ id, title, name, showMain, showError, forceRemount, storyFn, storyContext, storyContext: { parameters, args, argTypes }, }: RenderContext<ServerFramework>, domElement: HTMLElement): Promise<void>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StoryContext } from '@storybook/csf';
|
|
2
|
+
export type { RenderContext } from '@storybook/core';
|
|
3
|
+
export declare type StoryFnServerReturnType = any;
|
|
4
|
+
export declare type ServerFramework = {
|
|
5
|
+
component: string;
|
|
6
|
+
storyResult: StoryFnServerReturnType;
|
|
7
|
+
};
|
|
8
|
+
export declare type FetchStoryHtmlType = (url: string, id: string, params: any, context: StoryContext<ServerFramework>) => Promise<string | Node>;
|
|
9
|
+
export interface IStorybookStory {
|
|
10
|
+
name: string;
|
|
11
|
+
render: (context: any) => any;
|
|
12
|
+
}
|
|
13
|
+
export interface IStorybookSection {
|
|
14
|
+
kind: string;
|
|
15
|
+
stories: IStorybookStory[];
|
|
16
|
+
}
|
|
17
|
+
export interface ShowErrorArgs {
|
|
18
|
+
title: string;
|
|
19
|
+
description: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StorybookStory, StorybookSection } from './types';
|
|
2
|
+
export declare function stringifyObject(object: any, level?: number, excludeOuterParams?: boolean): string;
|
|
3
|
+
export declare function stringifyImports(imports: Record<string, string[]>): string;
|
|
4
|
+
export declare function stringifyDecorators(decorators: string[]): string;
|
|
5
|
+
export declare function stringifyDefault(section: StorybookSection): string;
|
|
6
|
+
export declare function stringifyStory(story: StorybookStory): string;
|
|
7
|
+
export declare function stringifySection(section: StorybookSection): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface CompileStorybookStoryArgs {
|
|
2
|
+
name: string;
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
}
|
|
5
|
+
export interface CompileStorybookSectionArgs {
|
|
6
|
+
title: string;
|
|
7
|
+
stories: CompileStorybookStoryArgs[];
|
|
8
|
+
[x: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface CompileCsfModuleArgs extends CompileStorybookSectionArgs {
|
|
11
|
+
addons?: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface StorybookStory {
|
|
14
|
+
name: string;
|
|
15
|
+
decorators?: string[];
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
}
|
|
18
|
+
export interface StorybookSection {
|
|
19
|
+
imports: Record<string, string[]>;
|
|
20
|
+
decorators?: string[];
|
|
21
|
+
title: string;
|
|
22
|
+
stories: StorybookStory[];
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/server",
|
|
3
|
-
"version": "6.4.0-beta.
|
|
3
|
+
"version": "6.4.0-beta.28",
|
|
4
4
|
"description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
"prepare": "node ../../scripts/prepare.js"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@storybook/addons": "6.4.0-beta.
|
|
49
|
-
"@storybook/api": "6.4.0-beta.
|
|
50
|
-
"@storybook/client-api": "6.4.0-beta.
|
|
51
|
-
"@storybook/core": "6.4.0-beta.
|
|
52
|
-
"@storybook/core-common": "6.4.0-beta.
|
|
48
|
+
"@storybook/addons": "6.4.0-beta.28",
|
|
49
|
+
"@storybook/api": "6.4.0-beta.28",
|
|
50
|
+
"@storybook/client-api": "6.4.0-beta.28",
|
|
51
|
+
"@storybook/core": "6.4.0-beta.28",
|
|
52
|
+
"@storybook/core-common": "6.4.0-beta.28",
|
|
53
53
|
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
|
54
|
-
"@storybook/node-logger": "6.4.0-beta.
|
|
55
|
-
"@storybook/preview-web": "6.4.0-beta.
|
|
56
|
-
"@storybook/store": "6.4.0-beta.
|
|
54
|
+
"@storybook/node-logger": "6.4.0-beta.28",
|
|
55
|
+
"@storybook/preview-web": "6.4.0-beta.28",
|
|
56
|
+
"@storybook/store": "6.4.0-beta.28",
|
|
57
57
|
"@types/webpack-env": "^1.16.0",
|
|
58
58
|
"core-js": "^3.8.2",
|
|
59
59
|
"global": "^4.4.0",
|
|
@@ -75,6 +75,6 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "72316abb8354d1f84d2bf8f645b18aeb315768c3",
|
|
79
79
|
"sbmodern": "dist/modern/client/index.js"
|
|
80
80
|
}
|