@storybook/react 6.5.0-alpha.5 → 6.5.0-alpha.50
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/docs/config.js +29 -0
- package/dist/cjs/client/docs/extractArgTypes.js +54 -0
- package/dist/cjs/client/docs/extractProps.js +77 -0
- package/dist/cjs/client/docs/jsxDecorator.js +277 -0
- package/dist/cjs/client/docs/lib/captions.js +18 -0
- package/dist/cjs/client/docs/lib/componentTypes.js +24 -0
- package/dist/cjs/client/docs/lib/defaultValues/createDefaultValue.js +81 -0
- package/dist/cjs/client/docs/lib/defaultValues/createFromRawDefaultProp.js +225 -0
- package/dist/cjs/client/docs/lib/defaultValues/generateArray.js +29 -0
- package/dist/cjs/client/docs/lib/defaultValues/generateObject.js +29 -0
- package/dist/cjs/client/docs/lib/defaultValues/index.js +37 -0
- package/dist/cjs/client/docs/lib/defaultValues/prettyIdentifier.js +34 -0
- package/dist/cjs/client/docs/lib/generateCode.js +89 -0
- package/dist/cjs/client/docs/lib/index.js +63 -0
- package/dist/cjs/client/docs/lib/inspection/acornParser.js +254 -0
- package/dist/cjs/client/docs/lib/inspection/index.js +37 -0
- package/dist/cjs/client/docs/lib/inspection/inspectValue.js +26 -0
- package/dist/cjs/client/docs/lib/inspection/types.js +19 -0
- package/dist/cjs/client/docs/lib/isHtmlTag.js +18 -0
- package/dist/cjs/client/docs/propTypes/createType.js +469 -0
- package/dist/cjs/client/docs/propTypes/generateFuncSignature.js +78 -0
- package/dist/cjs/client/docs/propTypes/handleProp.js +54 -0
- package/dist/cjs/client/docs/propTypes/rawDefaultPropResolvers.js +47 -0
- package/dist/cjs/client/docs/propTypes/sortProps.js +37 -0
- package/dist/cjs/client/docs/react-argtypes.stories.js +129 -0
- package/dist/cjs/client/docs/typeScript/handleProp.js +38 -0
- package/dist/cjs/client/index.js +16 -14
- package/dist/cjs/client/preview/config.js +1 -1
- package/dist/cjs/client/preview/index.js +1 -1
- package/dist/cjs/client/preview/render.js +11 -11
- package/dist/cjs/client/preview/types-6-0.js +5 -1
- package/dist/cjs/client/preview/types-6-3.js +2 -0
- package/dist/cjs/client/preview/types-7-0.js +5 -1
- package/dist/cjs/client/preview/types.js +5 -1
- package/dist/cjs/demo/Welcome.js +7 -3
- package/dist/cjs/server/{framework-preset-react-docgen.js → framework-preset-react-docs.js} +21 -11
- package/dist/cjs/server/framework-preset-react.js +2 -2
- package/dist/cjs/server/preset.js +2 -2
- package/dist/esm/client/docs/config.js +16 -0
- package/dist/esm/client/docs/extractArgTypes.js +39 -0
- package/dist/esm/client/docs/extractProps.js +54 -0
- package/dist/esm/client/docs/jsxDecorator.js +218 -0
- package/dist/esm/client/docs/lib/captions.js +6 -0
- package/dist/esm/client/docs/lib/componentTypes.js +9 -0
- package/dist/esm/client/docs/lib/defaultValues/createDefaultValue.js +67 -0
- package/dist/esm/client/docs/lib/defaultValues/createFromRawDefaultProp.js +191 -0
- package/dist/esm/client/docs/lib/defaultValues/generateArray.js +19 -0
- package/dist/esm/client/docs/lib/defaultValues/generateObject.js +19 -0
- package/dist/esm/client/docs/lib/defaultValues/index.js +2 -0
- package/dist/esm/client/docs/lib/defaultValues/prettyIdentifier.js +22 -0
- package/dist/esm/client/docs/lib/generateCode.js +68 -0
- package/dist/esm/client/docs/lib/index.js +4 -0
- package/dist/esm/client/docs/lib/inspection/acornParser.js +213 -0
- package/dist/esm/client/docs/lib/inspection/index.js +2 -0
- package/dist/esm/client/docs/lib/inspection/inspectValue.js +16 -0
- package/dist/esm/client/docs/lib/inspection/types.js +12 -0
- package/dist/esm/client/docs/lib/isHtmlTag.js +6 -0
- package/dist/esm/client/docs/propTypes/createType.js +449 -0
- package/dist/esm/client/docs/propTypes/generateFuncSignature.js +62 -0
- package/dist/esm/client/docs/propTypes/handleProp.js +39 -0
- package/dist/esm/client/docs/propTypes/rawDefaultPropResolvers.js +32 -0
- package/dist/esm/client/docs/propTypes/sortProps.js +24 -0
- package/dist/esm/client/docs/react-argtypes.stories.js +97 -0
- package/dist/esm/client/docs/typeScript/handleProp.js +27 -0
- package/dist/esm/client/preview/render.js +6 -6
- package/dist/esm/client/preview/types-6-0.js +1 -0
- package/dist/esm/client/preview/types-6-3.js +3 -1
- package/dist/esm/client/preview/types-7-0.js +1 -0
- package/dist/esm/client/preview/types.js +1 -0
- package/dist/esm/demo/Welcome.js +7 -4
- package/dist/{modern/server/framework-preset-react-docgen.js → esm/server/framework-preset-react-docs.js} +15 -11
- package/dist/esm/server/framework-preset-react.js +2 -2
- package/dist/esm/server/preset.js +1 -1
- package/dist/modern/client/docs/config.js +14 -0
- package/dist/modern/client/docs/extractArgTypes.js +38 -0
- package/dist/modern/client/docs/extractProps.js +42 -0
- package/dist/modern/client/docs/jsxDecorator.js +177 -0
- package/dist/modern/client/docs/lib/captions.js +6 -0
- package/dist/modern/client/docs/lib/componentTypes.js +2 -0
- package/dist/modern/client/docs/lib/defaultValues/createDefaultValue.js +72 -0
- package/dist/modern/client/docs/lib/defaultValues/createFromRawDefaultProp.js +181 -0
- package/dist/modern/client/docs/lib/defaultValues/generateArray.js +21 -0
- package/dist/modern/client/docs/lib/defaultValues/generateObject.js +21 -0
- package/dist/modern/client/docs/lib/defaultValues/index.js +2 -0
- package/dist/modern/client/docs/lib/defaultValues/prettyIdentifier.js +24 -0
- package/dist/modern/client/docs/lib/generateCode.js +59 -0
- package/dist/modern/client/docs/lib/index.js +4 -0
- package/dist/modern/client/docs/lib/inspection/acornParser.js +211 -0
- package/dist/modern/client/docs/lib/inspection/index.js +2 -0
- package/dist/modern/client/docs/lib/inspection/inspectValue.js +15 -0
- package/dist/modern/client/docs/lib/inspection/types.js +12 -0
- package/dist/modern/client/docs/lib/isHtmlTag.js +4 -0
- package/dist/modern/client/docs/propTypes/createType.js +446 -0
- package/dist/modern/client/docs/propTypes/generateFuncSignature.js +57 -0
- package/dist/modern/client/docs/propTypes/handleProp.js +39 -0
- package/dist/modern/client/docs/propTypes/rawDefaultPropResolvers.js +31 -0
- package/dist/modern/client/docs/propTypes/sortProps.js +14 -0
- package/dist/modern/client/docs/react-argtypes.stories.js +54 -0
- package/dist/modern/client/docs/typeScript/handleProp.js +28 -0
- package/dist/modern/client/preview/types-6-0.js +1 -0
- package/dist/modern/client/preview/types-6-3.js +3 -1
- package/dist/modern/client/preview/types-7-0.js +1 -0
- package/dist/modern/client/preview/types.js +1 -0
- package/dist/modern/demo/Welcome.js +10 -6
- package/dist/{esm/server/framework-preset-react-docgen.js → modern/server/framework-preset-react-docs.js} +15 -11
- package/dist/modern/server/framework-preset-react.js +2 -2
- package/dist/modern/server/preset.js +1 -1
- package/dist/ts3.4/client/docs/config.d.ts +13 -0
- package/dist/ts3.4/client/docs/extractArgTypes.d.ts +2 -0
- package/dist/ts3.4/client/docs/extractProps.d.ts +5 -0
- package/dist/ts3.4/client/docs/jsxDecorator.d.ts +23 -0
- package/dist/ts3.4/client/docs/lib/captions.d.ts +6 -0
- package/dist/ts3.4/client/docs/lib/componentTypes.d.ts +2 -0
- package/dist/ts3.4/client/docs/lib/defaultValues/createDefaultValue.d.ts +2 -0
- package/dist/ts3.4/client/docs/lib/defaultValues/createFromRawDefaultProp.d.ts +11 -0
- package/dist/ts3.4/client/docs/lib/defaultValues/generateArray.d.ts +3 -0
- package/dist/ts3.4/client/docs/lib/defaultValues/generateObject.d.ts +3 -0
- package/dist/ts3.4/client/docs/lib/defaultValues/index.d.ts +2 -0
- package/dist/ts3.4/client/docs/lib/defaultValues/prettyIdentifier.d.ts +4 -0
- package/dist/ts3.4/client/docs/lib/generateCode.d.ts +3 -0
- package/dist/ts3.4/client/docs/lib/index.d.ts +4 -0
- package/dist/ts3.4/client/docs/lib/inspection/acornParser.d.ts +7 -0
- package/dist/ts3.4/client/docs/lib/inspection/index.d.ts +2 -0
- package/dist/ts3.4/client/docs/lib/inspection/inspectValue.d.ts +2 -0
- package/dist/ts3.4/client/docs/lib/inspection/types.d.ts +50 -0
- package/dist/ts3.4/client/docs/lib/isHtmlTag.d.ts +1 -0
- package/dist/ts3.4/client/docs/propTypes/createType.d.ts +2 -0
- package/dist/ts3.4/client/docs/propTypes/generateFuncSignature.d.ts +4 -0
- package/dist/ts3.4/client/docs/propTypes/handleProp.d.ts +5 -0
- package/dist/ts3.4/client/docs/propTypes/rawDefaultPropResolvers.d.ts +1 -0
- package/dist/ts3.4/client/docs/propTypes/sortProps.d.ts +4 -0
- package/dist/ts3.4/client/docs/react-argtypes.stories.d.ts +1 -0
- package/dist/ts3.4/client/docs/typeScript/handleProp.d.ts +3 -0
- package/dist/ts3.4/server/framework-preset-react-docs.d.ts +6 -0
- package/dist/ts3.4/server/framework-preset-react.d.ts +1 -46
- package/dist/ts3.9/client/docs/config.d.ts +13 -0
- package/dist/ts3.9/client/docs/extractArgTypes.d.ts +2 -0
- package/dist/ts3.9/client/docs/extractProps.d.ts +5 -0
- package/dist/ts3.9/client/docs/jsxDecorator.d.ts +23 -0
- package/dist/ts3.9/client/docs/lib/captions.d.ts +6 -0
- package/dist/ts3.9/client/docs/lib/componentTypes.d.ts +2 -0
- package/dist/ts3.9/client/docs/lib/defaultValues/createDefaultValue.d.ts +2 -0
- package/dist/ts3.9/client/docs/lib/defaultValues/createFromRawDefaultProp.d.ts +11 -0
- package/dist/ts3.9/client/docs/lib/defaultValues/generateArray.d.ts +3 -0
- package/dist/ts3.9/client/docs/lib/defaultValues/generateObject.d.ts +3 -0
- package/dist/ts3.9/client/docs/lib/defaultValues/index.d.ts +2 -0
- package/dist/ts3.9/client/docs/lib/defaultValues/prettyIdentifier.d.ts +4 -0
- package/dist/ts3.9/client/docs/lib/generateCode.d.ts +3 -0
- package/dist/ts3.9/client/docs/lib/index.d.ts +4 -0
- package/dist/ts3.9/client/docs/lib/inspection/acornParser.d.ts +7 -0
- package/dist/ts3.9/client/docs/lib/inspection/index.d.ts +2 -0
- package/dist/ts3.9/client/docs/lib/inspection/inspectValue.d.ts +2 -0
- package/dist/ts3.9/client/docs/lib/inspection/types.d.ts +50 -0
- package/dist/ts3.9/client/docs/lib/isHtmlTag.d.ts +1 -0
- package/dist/ts3.9/client/docs/propTypes/createType.d.ts +2 -0
- package/dist/ts3.9/client/docs/propTypes/generateFuncSignature.d.ts +4 -0
- package/dist/ts3.9/client/docs/propTypes/handleProp.d.ts +5 -0
- package/dist/ts3.9/client/docs/propTypes/rawDefaultPropResolvers.d.ts +1 -0
- package/dist/ts3.9/client/docs/propTypes/sortProps.d.ts +4 -0
- package/dist/ts3.9/client/docs/react-argtypes.stories.d.ts +1 -0
- package/dist/ts3.9/client/docs/typeScript/handleProp.d.ts +3 -0
- package/dist/ts3.9/client/preview/types-6-0.d.ts +3 -3
- package/dist/ts3.9/client/preview/types-7-0.d.ts +2 -2
- package/dist/ts3.9/server/framework-preset-cra.d.ts +1 -1
- package/dist/ts3.9/server/framework-preset-react-docs.d.ts +6 -0
- package/dist/ts3.9/server/framework-preset-react.d.ts +1 -46
- package/dist/ts3.9/server/options.d.ts +1 -1
- package/dist/ts3.9/server/preset.d.ts +1 -1
- package/package.json +36 -14
- package/types/index.ts +1 -1
- package/dist/cjs/typings.d.js +0 -1
- package/dist/esm/typings.d.js +0 -0
- package/dist/modern/typings.d.js +0 -0
- package/dist/ts3.4/server/framework-preset-react-docgen.d.ts +0 -5
- package/dist/ts3.9/server/framework-preset-react-docgen.d.ts +0 -5
|
@@ -2,50 +2,5 @@ import { TransformOptions } from '@babel/core';
|
|
|
2
2
|
import { Configuration } from 'webpack';
|
|
3
3
|
import { Options } from '@storybook/core-common';
|
|
4
4
|
export declare function babel(config: TransformOptions, options: Options): Promise<TransformOptions>;
|
|
5
|
-
export declare function babelDefault(config: TransformOptions): Promise<
|
|
6
|
-
presets: (string | object)[];
|
|
7
|
-
plugins: (string | object)[];
|
|
8
|
-
ast?: boolean;
|
|
9
|
-
auxiliaryCommentAfter?: string;
|
|
10
|
-
auxiliaryCommentBefore?: string;
|
|
11
|
-
root?: string;
|
|
12
|
-
rootMode?: "root" | "upward" | "upward-optional";
|
|
13
|
-
configFile?: string | boolean;
|
|
14
|
-
babelrc?: boolean;
|
|
15
|
-
babelrcRoots?: string | boolean | RegExp | ((filename: string, context: import("@babel/core").MatchPatternContext) => boolean) | import("@babel/core").MatchPattern[];
|
|
16
|
-
envName?: string;
|
|
17
|
-
exclude?: string | RegExp | ((filename: string, context: import("@babel/core").MatchPatternContext) => boolean) | import("@babel/core").MatchPattern[];
|
|
18
|
-
code?: boolean;
|
|
19
|
-
comments?: boolean;
|
|
20
|
-
compact?: boolean | "auto";
|
|
21
|
-
cwd?: string;
|
|
22
|
-
caller?: import("@babel/core").TransformCaller;
|
|
23
|
-
env?: {
|
|
24
|
-
[index: string]: TransformOptions;
|
|
25
|
-
};
|
|
26
|
-
extends?: string;
|
|
27
|
-
filename?: string;
|
|
28
|
-
filenameRelative?: string;
|
|
29
|
-
generatorOpts?: import("@babel/generator").GeneratorOptions;
|
|
30
|
-
getModuleId?: (moduleName: string) => string;
|
|
31
|
-
highlightCode?: boolean;
|
|
32
|
-
ignore?: import("@babel/core").MatchPattern[];
|
|
33
|
-
include?: string | RegExp | ((filename: string, context: import("@babel/core").MatchPatternContext) => boolean) | import("@babel/core").MatchPattern[];
|
|
34
|
-
inputSourceMap?: object;
|
|
35
|
-
minified?: boolean;
|
|
36
|
-
moduleId?: string;
|
|
37
|
-
moduleIds?: boolean;
|
|
38
|
-
moduleRoot?: string;
|
|
39
|
-
only?: import("@babel/core").MatchPattern[];
|
|
40
|
-
overrides?: TransformOptions[];
|
|
41
|
-
parserOpts?: import("@babel/parser").ParserOptions;
|
|
42
|
-
retainLines?: boolean;
|
|
43
|
-
shouldPrintComment?: (commentContents: string) => boolean;
|
|
44
|
-
sourceFileName?: string;
|
|
45
|
-
sourceMaps?: boolean | "inline" | "both";
|
|
46
|
-
sourceRoot?: string;
|
|
47
|
-
sourceType?: "script" | "module" | "unambiguous";
|
|
48
|
-
test?: string | RegExp | ((filename: string, context: import("@babel/core").MatchPatternContext) => boolean) | import("@babel/core").MatchPattern[];
|
|
49
|
-
wrapPluginVisitorMethod?: (pluginAlias: string, visitorType: "enter" | "exit", callback: (path: import("@babel/traverse").NodePath<import("@babel/types").Node>, state: any) => void) => (path: import("@babel/traverse").NodePath<import("@babel/types").Node>, state: any) => void;
|
|
50
|
-
}>;
|
|
5
|
+
export declare function babelDefault(config: TransformOptions): Promise<TransformOptions>;
|
|
51
6
|
export declare function webpackFinal(config: Configuration, options: Options): Promise<Configuration>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PartialStoryFn } from '@storybook/csf';
|
|
2
|
+
import { extractComponentDescription } from '@storybook/docs-tools';
|
|
3
|
+
import { ReactFramework } from '..';
|
|
4
|
+
export declare const parameters: {
|
|
5
|
+
docs: {
|
|
6
|
+
inlineStories: boolean;
|
|
7
|
+
prepareForInline: (storyFn: PartialStoryFn<ReactFramework>) => import("../preview/types").StoryFnReactReturnType;
|
|
8
|
+
extractArgTypes: import("@storybook/docs-tools").ArgTypesExtractor;
|
|
9
|
+
extractComponentDescription: typeof extractComponentDescription;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const decorators: ((storyFn: PartialStoryFn<ReactFramework, import("@storybook/csf").Args>, context: import("@storybook/csf").StoryContext<ReactFramework, import("@storybook/csf").Args>) => import("../preview/types").StoryFnReactReturnType)[];
|
|
13
|
+
export declare const argTypesEnhancers: (<TFramework extends import("@storybook/csf").AnyFramework>(context: import("@storybook/csf").StoryContextForEnhancers<TFramework, import("@storybook/csf").Args>) => import("@storybook/addons").Parameters | import("@storybook/csf").StrictArgTypes<import("@storybook/csf").Args>)[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import { Options } from 'react-element-to-jsx-string';
|
|
3
|
+
import { StoryContext, PartialStoryFn } from '@storybook/csf';
|
|
4
|
+
import { ReactFramework } from '..';
|
|
5
|
+
declare type JSXOptions = Options & {
|
|
6
|
+
/** How many wrappers to skip when rendering the jsx */
|
|
7
|
+
skip?: number;
|
|
8
|
+
/** Whether to show the function in the jsx tab */
|
|
9
|
+
showFunctions?: boolean;
|
|
10
|
+
/** Whether to format HTML or Vue markup */
|
|
11
|
+
enableBeautify?: boolean;
|
|
12
|
+
/** Override the display name used for a component */
|
|
13
|
+
displayName?: string | Options['displayName'];
|
|
14
|
+
/** Deprecated: A function ran after the story is rendered */
|
|
15
|
+
onBeforeRender?(dom: string): string;
|
|
16
|
+
/** A function ran after a story is rendered (prefer this over `onBeforeRender`) */
|
|
17
|
+
transformSource?(dom: string, context?: StoryContext<ReactFramework>): string;
|
|
18
|
+
};
|
|
19
|
+
/** Apply the users parameters and render the jsx for a story */
|
|
20
|
+
export declare const renderJsx: (code: React.ReactElement, options: JSXOptions) => string;
|
|
21
|
+
export declare const skipJsxRender: (context: StoryContext<ReactFramework>) => any;
|
|
22
|
+
export declare const jsxDecorator: (storyFn: PartialStoryFn<ReactFramework>, context: StoryContext<ReactFramework>) => import("../preview/types").StoryFnReactReturnType;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const CUSTOM_CAPTION = "custom";
|
|
2
|
+
export declare const OBJECT_CAPTION = "object";
|
|
3
|
+
export declare const ARRAY_CAPTION = "array";
|
|
4
|
+
export declare const CLASS_CAPTION = "class";
|
|
5
|
+
export declare const FUNCTION_CAPTION = "func";
|
|
6
|
+
export declare const ELEMENT_CAPTION = "element";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PropDef, PropDefaultValue } from '@storybook/docs-tools';
|
|
2
|
+
export declare type TypeResolver = (rawDefaultProp: any, propDef: PropDef) => PropDefaultValue;
|
|
3
|
+
export interface TypeResolvers {
|
|
4
|
+
string: TypeResolver;
|
|
5
|
+
object: TypeResolver;
|
|
6
|
+
function: TypeResolver;
|
|
7
|
+
default: TypeResolver;
|
|
8
|
+
}
|
|
9
|
+
export declare function extractFunctionName(func: Function, propName: string): string;
|
|
10
|
+
export declare function createTypeResolvers(customResolvers?: Partial<TypeResolvers>): TypeResolvers;
|
|
11
|
+
export declare function createDefaultValueFromRawDefaultProp(rawDefaultProp: any, propDef: PropDef, typeResolvers?: TypeResolvers): PropDefaultValue;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InspectionIdentifiableInferedType } from '../inspection';
|
|
2
|
+
export declare function getPrettyIdentifier(inferredType: InspectionIdentifiableInferedType): string;
|
|
3
|
+
export declare function getPrettyFuncIdentifier(identifier: string, hasArguments: boolean): string;
|
|
4
|
+
export declare function getPrettyElementIdentifier(identifier: string): string;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare enum InspectionType {
|
|
2
|
+
IDENTIFIER = "Identifier",
|
|
3
|
+
LITERAL = "Literal",
|
|
4
|
+
OBJECT = "Object",
|
|
5
|
+
ARRAY = "Array",
|
|
6
|
+
FUNCTION = "Function",
|
|
7
|
+
CLASS = "Class",
|
|
8
|
+
ELEMENT = "Element",
|
|
9
|
+
UNKNOWN = "Unknown"
|
|
10
|
+
}
|
|
11
|
+
export interface InspectionInferedType {
|
|
12
|
+
type: InspectionType;
|
|
13
|
+
}
|
|
14
|
+
export interface InspectionIdentifier extends InspectionInferedType {
|
|
15
|
+
type: InspectionType.IDENTIFIER;
|
|
16
|
+
identifier: string;
|
|
17
|
+
}
|
|
18
|
+
export interface InspectionLiteral extends InspectionInferedType {
|
|
19
|
+
type: InspectionType.LITERAL;
|
|
20
|
+
}
|
|
21
|
+
export interface InspectionObject extends InspectionInferedType {
|
|
22
|
+
type: InspectionType.OBJECT;
|
|
23
|
+
depth: number;
|
|
24
|
+
}
|
|
25
|
+
export interface InspectionArray extends InspectionInferedType {
|
|
26
|
+
type: InspectionType.ARRAY;
|
|
27
|
+
depth: number;
|
|
28
|
+
}
|
|
29
|
+
export interface InspectionClass extends InspectionInferedType {
|
|
30
|
+
type: InspectionType.CLASS;
|
|
31
|
+
identifier: string;
|
|
32
|
+
}
|
|
33
|
+
export interface InspectionFunction extends InspectionInferedType {
|
|
34
|
+
type: InspectionType.FUNCTION;
|
|
35
|
+
identifier?: string;
|
|
36
|
+
params: any[];
|
|
37
|
+
hasParams: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface InspectionElement extends InspectionInferedType {
|
|
40
|
+
type: InspectionType.ELEMENT;
|
|
41
|
+
identifier?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface InspectionUnknown extends InspectionInferedType {
|
|
44
|
+
type: InspectionType.UNKNOWN;
|
|
45
|
+
}
|
|
46
|
+
export declare type InspectionIdentifiableInferedType = InspectionIdentifier | InspectionClass | InspectionFunction | InspectionElement;
|
|
47
|
+
export interface InspectionResult {
|
|
48
|
+
inferredType: InspectionInferedType;
|
|
49
|
+
ast?: any;
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isHtmlTag(tagName: string): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ExtractedJsDocParam, ExtractedJsDocReturns } from '@storybook/docs-tools';
|
|
2
|
+
export declare function generateFuncSignature(params: ExtractedJsDocParam[], returns: ExtractedJsDocReturns): string;
|
|
3
|
+
export declare function generateShortFuncSignature(params: ExtractedJsDocParam[], returns: ExtractedJsDocReturns): string;
|
|
4
|
+
export declare function toMultilineSignature(signature: string): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PropDef, ExtractedProp } from '@storybook/docs-tools';
|
|
2
|
+
declare type Component = any;
|
|
3
|
+
export declare function enhancePropTypesProp(extractedProp: ExtractedProp, rawDefaultProp?: any): PropDef;
|
|
4
|
+
export declare function enhancePropTypesProps(extractedProps: ExtractedProp[], component: Component): PropDef[];
|
|
5
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const rawDefaultPropTypeResolvers: import("../lib/defaultValues").TypeResolvers;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
import { Args, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf';
|
|
3
|
-
import { StoryFnReactReturnType } from './types';
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { Args, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf';
|
|
3
|
+
import type { StoryFnReactReturnType } from './types';
|
|
4
4
|
export type { Args, ArgTypes, Parameters, StoryContext } from '@storybook/csf';
|
|
5
5
|
export declare type ReactFramework = {
|
|
6
6
|
component: ComponentType<any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JSXElementConstructor } from 'react';
|
|
2
|
-
import { Args } from '@storybook/csf';
|
|
1
|
+
import type { JSXElementConstructor } from 'react';
|
|
2
|
+
import type { Args } from '@storybook/csf';
|
|
3
3
|
import type { StoryObj } from './types-6-0';
|
|
4
4
|
import type { ComponentStoryObj } from './types-6-3';
|
|
5
5
|
export type { StoryFn, StoryObj, Meta } from './types-6-0';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { StorybookConfig, Options } from '@storybook/core-common';
|
|
2
|
+
import type { TransformOptions } from '@babel/core';
|
|
3
|
+
import type { Configuration } from 'webpack';
|
|
4
|
+
export declare function babel(config: TransformOptions, options: Options): Promise<TransformOptions>;
|
|
5
|
+
export declare function webpackFinal(config: Configuration, options: Options): Promise<Configuration>;
|
|
6
|
+
export declare const config: StorybookConfig['config'];
|
|
@@ -2,50 +2,5 @@ import { TransformOptions } from '@babel/core';
|
|
|
2
2
|
import type { Configuration } from 'webpack';
|
|
3
3
|
import type { Options } from '@storybook/core-common';
|
|
4
4
|
export declare function babel(config: TransformOptions, options: Options): Promise<TransformOptions>;
|
|
5
|
-
export declare function babelDefault(config: TransformOptions): Promise<
|
|
6
|
-
presets: (string | object)[];
|
|
7
|
-
plugins: (string | object)[];
|
|
8
|
-
ast?: boolean;
|
|
9
|
-
auxiliaryCommentAfter?: string;
|
|
10
|
-
auxiliaryCommentBefore?: string;
|
|
11
|
-
root?: string;
|
|
12
|
-
rootMode?: "root" | "upward" | "upward-optional";
|
|
13
|
-
configFile?: string | boolean;
|
|
14
|
-
babelrc?: boolean;
|
|
15
|
-
babelrcRoots?: string | boolean | RegExp | ((filename: string, context: import("@babel/core").MatchPatternContext) => boolean) | import("@babel/core").MatchPattern[];
|
|
16
|
-
envName?: string;
|
|
17
|
-
exclude?: string | RegExp | ((filename: string, context: import("@babel/core").MatchPatternContext) => boolean) | import("@babel/core").MatchPattern[];
|
|
18
|
-
code?: boolean;
|
|
19
|
-
comments?: boolean;
|
|
20
|
-
compact?: boolean | "auto";
|
|
21
|
-
cwd?: string;
|
|
22
|
-
caller?: import("@babel/core").TransformCaller;
|
|
23
|
-
env?: {
|
|
24
|
-
[index: string]: TransformOptions;
|
|
25
|
-
};
|
|
26
|
-
extends?: string;
|
|
27
|
-
filename?: string;
|
|
28
|
-
filenameRelative?: string;
|
|
29
|
-
generatorOpts?: import("@babel/generator").GeneratorOptions;
|
|
30
|
-
getModuleId?: (moduleName: string) => string;
|
|
31
|
-
highlightCode?: boolean;
|
|
32
|
-
ignore?: import("@babel/core").MatchPattern[];
|
|
33
|
-
include?: string | RegExp | ((filename: string, context: import("@babel/core").MatchPatternContext) => boolean) | import("@babel/core").MatchPattern[];
|
|
34
|
-
inputSourceMap?: object;
|
|
35
|
-
minified?: boolean;
|
|
36
|
-
moduleId?: string;
|
|
37
|
-
moduleIds?: boolean;
|
|
38
|
-
moduleRoot?: string;
|
|
39
|
-
only?: import("@babel/core").MatchPattern[];
|
|
40
|
-
overrides?: TransformOptions[];
|
|
41
|
-
parserOpts?: import("@babel/parser").ParserOptions;
|
|
42
|
-
retainLines?: boolean;
|
|
43
|
-
shouldPrintComment?: (commentContents: string) => boolean;
|
|
44
|
-
sourceFileName?: string;
|
|
45
|
-
sourceMaps?: boolean | "inline" | "both";
|
|
46
|
-
sourceRoot?: string;
|
|
47
|
-
sourceType?: "script" | "module" | "unambiguous";
|
|
48
|
-
test?: string | RegExp | ((filename: string, context: import("@babel/core").MatchPatternContext) => boolean) | import("@babel/core").MatchPattern[];
|
|
49
|
-
wrapPluginVisitorMethod?: (pluginAlias: string, visitorType: "enter" | "exit", callback: (path: import("@babel/traverse").NodePath<import("@babel/types").Node>, state: any) => void) => (path: import("@babel/traverse").NodePath<import("@babel/types").Node>, state: any) => void;
|
|
50
|
-
}>;
|
|
5
|
+
export declare function babelDefault(config: TransformOptions): Promise<TransformOptions>;
|
|
51
6
|
export declare function webpackFinal(config: Configuration, options: Options): Promise<Configuration>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react",
|
|
3
|
-
"version": "6.5.0-alpha.
|
|
3
|
+
"version": "6.5.0-alpha.50",
|
|
4
4
|
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -49,43 +49,65 @@
|
|
|
49
49
|
"@babel/preset-flow": "^7.12.1",
|
|
50
50
|
"@babel/preset-react": "^7.12.10",
|
|
51
51
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
|
52
|
-
"@storybook/addons": "6.5.0-alpha.
|
|
53
|
-
"@storybook/
|
|
54
|
-
"@storybook/core
|
|
55
|
-
"@storybook/
|
|
56
|
-
"@storybook/
|
|
52
|
+
"@storybook/addons": "6.5.0-alpha.50",
|
|
53
|
+
"@storybook/client-logger": "6.5.0-alpha.50",
|
|
54
|
+
"@storybook/core": "6.5.0-alpha.50",
|
|
55
|
+
"@storybook/core-common": "6.5.0-alpha.50",
|
|
56
|
+
"@storybook/csf": "0.0.2--canary.507502b.0",
|
|
57
|
+
"@storybook/docs-tools": "6.5.0-alpha.50",
|
|
58
|
+
"@storybook/node-logger": "6.5.0-alpha.50",
|
|
57
59
|
"@storybook/react-docgen-typescript-plugin": "1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0",
|
|
58
60
|
"@storybook/semver": "^7.3.2",
|
|
59
|
-
"@storybook/store": "6.5.0-alpha.
|
|
61
|
+
"@storybook/store": "6.5.0-alpha.50",
|
|
62
|
+
"@types/estree": "^0.0.51",
|
|
60
63
|
"@types/node": "^14.14.20 || ^16.0.0",
|
|
61
64
|
"@types/webpack-env": "^1.16.0",
|
|
65
|
+
"acorn": "^7.4.1",
|
|
66
|
+
"acorn-jsx": "^5.3.1",
|
|
67
|
+
"acorn-walk": "^7.2.0",
|
|
62
68
|
"babel-plugin-add-react-displayname": "^0.0.5",
|
|
63
|
-
"babel-plugin-named-asset-import": "^0.3.1",
|
|
64
69
|
"babel-plugin-react-docgen": "^4.2.1",
|
|
65
70
|
"core-js": "^3.8.2",
|
|
71
|
+
"escodegen": "^2.0.0",
|
|
66
72
|
"global": "^4.4.0",
|
|
73
|
+
"html-tags": "^3.1.0",
|
|
67
74
|
"lodash": "^4.17.21",
|
|
68
75
|
"prop-types": "^15.7.2",
|
|
69
|
-
"react-
|
|
76
|
+
"react-element-to-jsx-string": "^14.3.4",
|
|
70
77
|
"react-refresh": "^0.11.0",
|
|
71
78
|
"read-pkg-up": "^7.0.1",
|
|
72
79
|
"regenerator-runtime": "^0.13.7",
|
|
73
80
|
"ts-dedent": "^2.0.0",
|
|
74
|
-
"
|
|
81
|
+
"util-deprecate": "^1.0.2",
|
|
82
|
+
"webpack": ">=4.43.0 <6.0.0"
|
|
75
83
|
},
|
|
76
84
|
"devDependencies": {
|
|
77
|
-
"@
|
|
78
|
-
"
|
|
85
|
+
"@types/util-deprecate": "^1.0.0",
|
|
86
|
+
"webpack": "4"
|
|
79
87
|
},
|
|
80
88
|
"peerDependencies": {
|
|
81
89
|
"@babel/core": "^7.11.5",
|
|
90
|
+
"jest-specific-snapshot": "^4.0.0",
|
|
82
91
|
"react": "^16.8.0 || ^17.0.0",
|
|
83
|
-
"react-dom": "^16.8.0 || ^17.0.0"
|
|
92
|
+
"react-dom": "^16.8.0 || ^17.0.0",
|
|
93
|
+
"require-from-string": "^2.0.2"
|
|
84
94
|
},
|
|
85
95
|
"peerDependenciesMeta": {
|
|
86
96
|
"@babel/core": {
|
|
87
97
|
"optional": true
|
|
88
98
|
},
|
|
99
|
+
"@storybook/builder-webpack4": {
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
"@storybook/builder-webpack5": {
|
|
103
|
+
"optional": true
|
|
104
|
+
},
|
|
105
|
+
"@storybook/manager-webpack4": {
|
|
106
|
+
"optional": true
|
|
107
|
+
},
|
|
108
|
+
"@storybook/manager-webpack5": {
|
|
109
|
+
"optional": true
|
|
110
|
+
},
|
|
89
111
|
"typescript": {
|
|
90
112
|
"optional": true
|
|
91
113
|
}
|
|
@@ -96,6 +118,6 @@
|
|
|
96
118
|
"publishConfig": {
|
|
97
119
|
"access": "public"
|
|
98
120
|
},
|
|
99
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "6cf4571e5a1200613de94aa066fe93f75aec6ad1",
|
|
100
122
|
"sbmodern": "dist/modern/client/index.js"
|
|
101
123
|
}
|
package/types/index.ts
CHANGED
package/dist/cjs/typings.d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/esm/typings.d.js
DELETED
|
File without changes
|
package/dist/modern/typings.d.js
DELETED
|
File without changes
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { TransformOptions } from '@babel/core';
|
|
2
|
-
import { Configuration } from 'webpack';
|
|
3
|
-
import { Options } from '@storybook/core-common';
|
|
4
|
-
export declare function babel(config: TransformOptions, { presets }: Options): Promise<TransformOptions>;
|
|
5
|
-
export declare function webpackFinal(config: Configuration, { presets }: Options): Promise<Configuration>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { TransformOptions } from '@babel/core';
|
|
2
|
-
import type { Configuration } from 'webpack';
|
|
3
|
-
import type { Options } from '@storybook/core-common';
|
|
4
|
-
export declare function babel(config: TransformOptions, { presets }: Options): Promise<TransformOptions>;
|
|
5
|
-
export declare function webpackFinal(config: Configuration, { presets }: Options): Promise<Configuration>;
|