@storybook/react 7.0.0-alpha.1 → 7.0.0-alpha.4
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/config.js +4 -12
- package/dist/cjs/docs/config.js +3 -7
- package/dist/cjs/docs/extractArgTypes.js +20 -27
- package/dist/cjs/docs/extractProps.js +9 -29
- package/dist/cjs/docs/jsxDecorator.js +50 -117
- package/dist/cjs/docs/lib/captions.js +6 -6
- package/dist/cjs/docs/lib/componentTypes.js +2 -12
- package/dist/cjs/docs/lib/defaultValues/createDefaultValue.js +16 -11
- package/dist/cjs/docs/lib/defaultValues/createFromRawDefaultProp.js +40 -59
- package/dist/cjs/docs/lib/defaultValues/generateArray.js +8 -6
- package/dist/cjs/docs/lib/defaultValues/generateObject.js +8 -6
- package/dist/cjs/docs/lib/defaultValues/index.js +2 -8
- package/dist/cjs/docs/lib/defaultValues/prettyIdentifier.js +8 -4
- package/dist/cjs/docs/lib/generateCode.js +10 -25
- package/dist/cjs/docs/lib/index.js +4 -10
- package/dist/cjs/docs/lib/inspection/acornParser.js +34 -58
- package/dist/cjs/docs/lib/inspection/index.js +2 -8
- package/dist/cjs/docs/lib/inspection/inspectValue.js +1 -3
- package/dist/cjs/docs/lib/inspection/types.js +1 -1
- package/dist/cjs/docs/lib/isHtmlTag.js +0 -4
- package/dist/cjs/docs/propTypes/createType.js +108 -119
- package/dist/cjs/docs/propTypes/generateFuncSignature.js +13 -23
- package/dist/cjs/docs/propTypes/handleProp.js +13 -15
- package/dist/cjs/docs/propTypes/rawDefaultPropResolvers.js +10 -14
- package/dist/cjs/docs/propTypes/sortProps.js +4 -20
- package/dist/cjs/docs/react-argtypes.stories.js +30 -92
- package/dist/cjs/docs/typeScript/handleProp.js +11 -11
- package/dist/cjs/index.js +10 -16
- package/dist/cjs/preview/config.js +2 -2
- package/dist/cjs/preview/globals.js +3 -1
- package/dist/cjs/preview/index.js +12 -20
- package/dist/cjs/preview/render.js +113 -258
- package/dist/cjs/preview/types-6-3.js +1 -7
- package/dist/cjs/testing/index.js +4 -3
- package/dist/esm/docs/config.js +0 -2
- package/dist/esm/docs/jsxDecorator.js +1 -1
- package/dist/esm/docs/lib/defaultValues/createFromRawDefaultProp.js +2 -1
- package/dist/esm/docs/lib/defaultValues/prettyIdentifier.js +2 -0
- package/dist/esm/docs/propTypes/createType.js +7 -5
- package/dist/esm/docs/propTypes/sortProps.js +1 -1
- package/dist/esm/testing/index.js +1 -0
- package/dist/types/config.d.ts +0 -1
- package/dist/types/docs/config.d.ts +1 -4
- package/dist/types/docs/extractProps.d.ts +6 -2
- package/dist/types/docs/jsxDecorator.d.ts +1 -1
- package/dist/types/docs/lib/defaultValues/createDefaultValue.d.ts +1 -1
- package/dist/types/docs/lib/defaultValues/createFromRawDefaultProp.d.ts +2 -2
- package/dist/types/docs/propTypes/createType.d.ts +1 -1
- package/dist/types/preview/render.d.ts +1 -1
- package/package.json +7 -8
|
@@ -17,7 +17,7 @@ declare type JSXOptions = Options & {
|
|
|
17
17
|
transformSource?(dom: string, context?: StoryContext<ReactFramework>): string;
|
|
18
18
|
};
|
|
19
19
|
/** Apply the users parameters and render the jsx for a story */
|
|
20
|
-
export declare const renderJsx: (code: React.ReactElement, options: JSXOptions) => string;
|
|
20
|
+
export declare const renderJsx: (code: React.ReactElement, options: JSXOptions) => string | null;
|
|
21
21
|
export declare const skipJsxRender: (context: StoryContext<ReactFramework>) => any;
|
|
22
22
|
export declare const jsxDecorator: (storyFn: PartialStoryFn<ReactFramework>, context: StoryContext<ReactFramework>) => import("../preview/types").StoryFnReactReturnType;
|
|
23
23
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PropDefaultValue } from '@storybook/docs-tools';
|
|
2
|
-
export declare function createDefaultValue(defaultValue: string): PropDefaultValue;
|
|
2
|
+
export declare function createDefaultValue(defaultValue: string): PropDefaultValue | null;
|
|
@@ -6,6 +6,6 @@ export interface TypeResolvers {
|
|
|
6
6
|
function: TypeResolver;
|
|
7
7
|
default: TypeResolver;
|
|
8
8
|
}
|
|
9
|
-
export declare function extractFunctionName(func: Function, propName: string): string;
|
|
9
|
+
export declare function extractFunctionName(func: Function, propName: string): string | null;
|
|
10
10
|
export declare function createTypeResolvers(customResolvers?: Partial<TypeResolvers>): TypeResolvers;
|
|
11
|
-
export declare function createDefaultValueFromRawDefaultProp(rawDefaultProp: any, propDef: PropDef, typeResolvers?: TypeResolvers): PropDefaultValue;
|
|
11
|
+
export declare function createDefaultValueFromRawDefaultProp(rawDefaultProp: any, propDef: PropDef, typeResolvers?: TypeResolvers): PropDefaultValue | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ExtractedProp, PropType } from '@storybook/docs-tools';
|
|
2
|
-
export declare function createType(extractedProp: ExtractedProp): PropType;
|
|
2
|
+
export declare function createType(extractedProp: ExtractedProp): PropType | null;
|
|
@@ -2,4 +2,4 @@ import type { RenderContext } from '@storybook/store';
|
|
|
2
2
|
import { ArgsStoryFn } from '@storybook/csf';
|
|
3
3
|
import { ReactFramework } from './types-6-0';
|
|
4
4
|
export declare const render: ArgsStoryFn<ReactFramework>;
|
|
5
|
-
export declare function renderToDOM({ storyContext, unboundStoryFn, showMain, showException, forceRemount, }: RenderContext<ReactFramework>, domElement:
|
|
5
|
+
export declare function renderToDOM({ storyContext, unboundStoryFn, showMain, showException, forceRemount, }: RenderContext<ReactFramework>, domElement: Element): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.4",
|
|
4
4
|
"description": "Storybook React renderer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"prepare": "node ../../scripts/prepare.js"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@storybook/addons": "7.0.0-alpha.
|
|
37
|
-
"@storybook/client-logger": "7.0.0-alpha.
|
|
38
|
-
"@storybook/core-client": "7.0.0-alpha.
|
|
36
|
+
"@storybook/addons": "7.0.0-alpha.4",
|
|
37
|
+
"@storybook/client-logger": "7.0.0-alpha.4",
|
|
38
|
+
"@storybook/core-client": "7.0.0-alpha.4",
|
|
39
39
|
"@storybook/csf": "0.0.2--canary.4566f4d.1",
|
|
40
|
-
"@storybook/docs-tools": "7.0.0-alpha.
|
|
41
|
-
"@storybook/store": "7.0.0-alpha.
|
|
40
|
+
"@storybook/docs-tools": "7.0.0-alpha.4",
|
|
41
|
+
"@storybook/store": "7.0.0-alpha.4",
|
|
42
42
|
"@types/estree": "^0.0.51",
|
|
43
43
|
"@types/node": "^14.14.20 || ^16.0.0",
|
|
44
44
|
"acorn": "^7.4.1",
|
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
"lodash": "^4.17.21",
|
|
52
52
|
"prop-types": "^15.7.2",
|
|
53
53
|
"react-element-to-jsx-string": "^14.3.4",
|
|
54
|
-
"regenerator-runtime": "^0.13.7",
|
|
55
54
|
"ts-dedent": "^2.0.0",
|
|
56
55
|
"util-deprecate": "^1.0.2"
|
|
57
56
|
},
|
|
@@ -76,5 +75,5 @@
|
|
|
76
75
|
"publishConfig": {
|
|
77
76
|
"access": "public"
|
|
78
77
|
},
|
|
79
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "006ed54452dd7c37a8cbe91a84f5312182f7ca00"
|
|
80
79
|
}
|