@storybook/server 6.5.9 → 7.0.0-alpha.10
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/README.md +1 -317
- package/dist/chunk-43Y6KZXY.mjs +4 -0
- package/dist/config.d.ts +12 -0
- package/dist/config.js +4 -0
- package/dist/config.mjs +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +4 -0
- package/dist/index.mjs +1 -0
- package/dist/public-types-07d4abb5.d.ts +42 -0
- package/package.json +34 -38
- package/preview.js +1 -0
- package/bin/build.js +0 -4
- package/bin/index.js +0 -3
- package/dist/cjs/client/index.js +0 -59
- package/dist/cjs/client/preview/config.js +0 -25
- package/dist/cjs/client/preview/globals.js +0 -8
- package/dist/cjs/client/preview/index.js +0 -52
- package/dist/cjs/client/preview/render.js +0 -192
- package/dist/cjs/client/preview/types.js +0 -5
- package/dist/cjs/lib/compiler/index.js +0 -21
- package/dist/cjs/lib/compiler/stringifier.js +0 -175
- package/dist/cjs/lib/compiler/types.js +0 -1
- package/dist/cjs/server/build.js +0 -9
- package/dist/cjs/server/framework-preset-server.js +0 -33
- package/dist/cjs/server/index.js +0 -9
- package/dist/cjs/server/loader.js +0 -14
- package/dist/cjs/server/options.js +0 -17
- package/dist/esm/client/index.js +0 -5
- package/dist/esm/client/preview/config.js +0 -4
- package/dist/esm/client/preview/globals.js +0 -3
- package/dist/esm/client/preview/index.js +0 -30
- package/dist/esm/client/preview/render.js +0 -161
- package/dist/esm/client/preview/types.js +0 -1
- package/dist/esm/lib/compiler/index.js +0 -13
- package/dist/esm/lib/compiler/stringifier.js +0 -137
- package/dist/esm/lib/compiler/types.js +0 -0
- package/dist/esm/server/build.js +0 -3
- package/dist/esm/server/framework-preset-server.js +0 -18
- package/dist/esm/server/index.js +0 -3
- package/dist/esm/server/loader.js +0 -4
- package/dist/esm/server/options.js +0 -8
- package/dist/modern/client/index.js +0 -5
- package/dist/modern/client/preview/config.js +0 -4
- package/dist/modern/client/preview/globals.js +0 -5
- package/dist/modern/client/preview/index.js +0 -24
- package/dist/modern/client/preview/render.js +0 -97
- package/dist/modern/client/preview/types.js +0 -1
- package/dist/modern/lib/compiler/index.js +0 -12
- package/dist/modern/lib/compiler/stringifier.js +0 -83
- package/dist/modern/lib/compiler/types.js +0 -0
- package/dist/modern/server/build.js +0 -3
- package/dist/modern/server/framework-preset-server.js +0 -18
- package/dist/modern/server/index.js +0 -3
- package/dist/modern/server/loader.js +0 -4
- package/dist/modern/server/options.js +0 -8
- package/dist/ts3.4/client/index.d.ts +0 -1
- package/dist/ts3.4/client/preview/config.d.ts +0 -4
- package/dist/ts3.4/client/preview/globals.d.ts +0 -1
- package/dist/ts3.4/client/preview/index.d.ts +0 -21
- package/dist/ts3.4/client/preview/render.d.ts +0 -5
- package/dist/ts3.4/client/preview/types.d.ts +0 -20
- package/dist/ts3.4/lib/compiler/index.d.ts +0 -2
- package/dist/ts3.4/lib/compiler/stringifier.d.ts +0 -7
- package/dist/ts3.4/lib/compiler/types.d.ts +0 -24
- package/dist/ts3.4/server/build.d.ts +0 -1
- package/dist/ts3.4/server/framework-preset-server.d.ts +0 -4
- package/dist/ts3.4/server/index.d.ts +0 -1
- package/dist/ts3.4/server/loader.d.ts +0 -2
- package/dist/ts3.4/server/options.d.ts +0 -3
- package/dist/ts3.9/client/index.d.ts +0 -1
- package/dist/ts3.9/client/preview/config.d.ts +0 -4
- package/dist/ts3.9/client/preview/globals.d.ts +0 -1
- package/dist/ts3.9/client/preview/index.d.ts +0 -21
- package/dist/ts3.9/client/preview/render.d.ts +0 -5
- package/dist/ts3.9/client/preview/types.d.ts +0 -20
- package/dist/ts3.9/lib/compiler/index.d.ts +0 -2
- package/dist/ts3.9/lib/compiler/stringifier.d.ts +0 -7
- package/dist/ts3.9/lib/compiler/types.d.ts +0 -24
- package/dist/ts3.9/server/build.d.ts +0 -1
- package/dist/ts3.9/server/framework-preset-server.d.ts +0 -4
- package/dist/ts3.9/server/index.d.ts +0 -1
- package/dist/ts3.9/server/loader.d.ts +0 -2
- package/dist/ts3.9/server/options.d.ts +0 -3
- package/preset.js +0 -1
- package/standalone.js +0 -8
|
@@ -1,21 +0,0 @@
|
|
|
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: (({ globals, globalTypes, ...parameters }: import("@storybook/csf").Parameters & {
|
|
17
|
-
globals?: import("@storybook/csf").Globals;
|
|
18
|
-
globalTypes?: import("@storybook/csf").GlobalTypes;
|
|
19
|
-
}) => void) | (() => never), clearDecorators: (() => void) | (() => never), setAddon: ((addon: any) => void) | (() => never), 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 {};
|
|
@@ -1,5 +0,0 @@
|
|
|
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>;
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { storiesOf, setAddon, addDecorator, addParameters, configure, getStorybook, forceReRender, raw, } from './preview';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="webpack-env" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import type { ClientStoryApi, Loadable } from '@storybook/addons';
|
|
4
|
-
import './globals';
|
|
5
|
-
import type { 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: (({ globals, globalTypes, ...parameters }: import("@storybook/csf").Parameters & {
|
|
17
|
-
globals?: import("@storybook/csf").Globals;
|
|
18
|
-
globalTypes?: import("@storybook/csf").GlobalTypes;
|
|
19
|
-
}) => void) | (() => never), clearDecorators: (() => void) | (() => never), setAddon: ((addon: any) => void) | (() => never), 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 {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { RenderContext } from '@storybook/store';
|
|
2
|
-
import type { StoryFn } from '@storybook/csf';
|
|
3
|
-
import type { 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>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { 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
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/preset.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./dist/cjs/server/framework-preset-server');
|
package/standalone.js
DELETED