React renderer

This commit is contained in:
Michael Shilman 2022-04-16 15:35:56 +08:00
parent fe8c942f40
commit 41ae963589
182 changed files with 164 additions and 37 deletions

View File

@ -43,35 +43,21 @@
"@babel/preset-flow": "^7.12.1",
"@babel/preset-react": "^7.12.10",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
"@storybook/addons": "6.5.0-alpha.63",
"@storybook/client-logger": "6.5.0-alpha.63",
"@storybook/core-client": "6.5.0-alpha.63",
"@storybook/core-common": "6.5.0-alpha.63",
"@storybook/core-server": "6.5.0-alpha.63",
"@storybook/csf": "0.0.2--canary.7c6c115.0",
"@storybook/docs-tools": "6.5.0-alpha.63",
"@storybook/node-logger": "6.5.0-alpha.63",
"@storybook/react-docgen-typescript-plugin": "1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0",
"@storybook/renderer-react": "6.5.0-alpha.63",
"@storybook/semver": "^7.3.2",
"@storybook/store": "6.5.0-alpha.63",
"@types/estree": "^0.0.51",
"@types/node": "^14.14.20 || ^16.0.0",
"@types/webpack-env": "^1.16.0",
"acorn": "^7.4.1",
"acorn-jsx": "^5.3.1",
"acorn-walk": "^7.2.0",
"babel-plugin-add-react-displayname": "^0.0.5",
"babel-plugin-react-docgen": "^4.2.1",
"core-js": "^3.8.2",
"escodegen": "^2.0.0",
"fs-extra": "^9.0.1",
"global": "^4.4.0",
"html-tags": "^3.1.0",
"lodash": "^4.17.21",
"prop-types": "^15.7.2",
"react-element-to-jsx-string": "^14.3.4",
"react-refresh": "^0.11.0",
"read-pkg-up": "^7.0.1",
"regenerator-runtime": "^0.13.7",
"ts-dedent": "^2.0.0",
"util-deprecate": "^1.0.2",

View File

@ -1,18 +1 @@
export type { DecoratorFn } from './preview';
export {
storiesOf,
setAddon,
addDecorator,
addParameters,
configure,
getStorybook,
raw,
forceReRender,
} from './preview';
export * from './testing';
export * from './preview/types-6-3';
if (module && module.hot && module.hot.decline) {
module.hot.decline();
}
export * from '@storybook/renderer-react';

View File

@ -1,5 +1,4 @@
import type { StorybookConfig, Options, TypescriptConfig } from '@storybook/core-common';
import { findDistEsm } from '@storybook/core-common';
import type { TransformOptions } from '@babel/core';
import type { Configuration } from 'webpack';
import ReactDocgenTypescriptPlugin from '@storybook/react-docgen-typescript-plugin';
@ -60,5 +59,5 @@ export async function webpackFinal(config: Configuration, options: Options) {
export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = [], options) => {
if (!hasDocsOrControls(options)) return entry;
return [...entry, findDistEsm(__dirname, 'client/docs/config')];
return [...entry, require.resolve('@storybook/renderer-react/dist/esm/docs/config')];
};

View File

@ -1,9 +1,8 @@
import { findDistEsm } from '@storybook/core-common';
import type { StorybookConfig } from '@storybook/core-common';
export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entries = []) => [
...entries,
findDistEsm(__dirname, 'client/preview/config'),
require.resolve('@storybook/renderer-react/dist/esm/preview/config'),
];
export const addons: StorybookConfig['addons'] = [

View File

@ -0,0 +1 @@
# Storybook React renderer

View File

@ -0,0 +1,88 @@
{
"name": "@storybook/renderer-react",
"version": "6.5.0-alpha.63",
"description": "Storybook React renderer",
"keywords": [
"storybook"
],
"homepage": "https://github.com/storybookjs/storybook/tree/main/renderers/react",
"bugs": {
"url": "https://github.com/storybookjs/storybook/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/storybookjs/storybook.git",
"directory": "renderers/react"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/storybook"
},
"license": "MIT",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/ts3.9/index.d.ts",
"typesVersions": {
"<3.8": {
"dist/ts3.9/*": [
"dist/ts3.4/*"
]
}
},
"files": [
"dist/**/*",
"types/**/*",
"README.md",
"*.js",
"*.d.ts"
],
"scripts": {
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.5.0-alpha.63",
"@storybook/client-logger": "6.5.0-alpha.63",
"@storybook/core-client": "6.5.0-alpha.63",
"@storybook/csf": "0.0.2--canary.7c6c115.0",
"@storybook/docs-tools": "6.5.0-alpha.63",
"@storybook/store": "6.5.0-alpha.63",
"@types/estree": "^0.0.51",
"@types/node": "^14.14.20 || ^16.0.0",
"acorn": "^7.4.1",
"acorn-jsx": "^5.3.1",
"acorn-walk": "^7.2.0",
"core-js": "^3.8.2",
"escodegen": "^2.0.0",
"global": "^4.4.0",
"html-tags": "^3.1.0",
"lodash": "^4.17.21",
"prop-types": "^15.7.2",
"react-element-to-jsx-string": "^14.3.4",
"regenerator-runtime": "^0.13.7",
"ts-dedent": "^2.0.0",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"@babel/core": "^7.11.5",
"@types/util-deprecate": "^1.0.0"
},
"peerDependencies": {
"jest-specific-snapshot": "^4.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
"require-from-string": "^2.0.2"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
},
"engines": {
"node": ">=10.13.0"
},
"publishConfig": {
"access": "public"
},
"gitHead": "416f87dc715cae299c7b4f37f1c9db7f686d4d21",
"sbmodern": "dist/modern/index.js"
}

Some files were not shown because too many files have changed in this diff Show More