Merge pull request #18775 from storybookjs/feat/addons-actions-tsup

Build addons-actions with ts-up
This commit is contained in:
Norbert de Langen 2022-09-27 17:54:14 +03:00 committed by GitHub
commit b42f0edea7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 41 additions and 16 deletions

View File

@ -1 +1 @@
import './dist/esm/manager';
import './dist/manager';

View File

@ -21,9 +21,32 @@
"url": "https://opencollective.com/storybook"
},
"license": "MIT",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"./manager": {
"require": "./dist/manager.js",
"import": "./dist/manager.mjs",
"types": "./dist/manager.d.ts"
},
"./preview": {
"require": "./dist/preview.js",
"import": "./dist/preview.mjs",
"types": "./dist/preview.d.ts"
},
"./register.js": {
"require": "./dist/manager.js",
"import": "./dist/manager.mjs",
"types": "./dist/manager.d.ts"
},
"./package.json": "./package.json"
},
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist/**/*",
"README.md",
@ -32,7 +55,7 @@
],
"scripts": {
"check": "../../../scripts/node_modules/.bin/tsc --noEmit",
"prep": "node ../../../scripts/prepare.js"
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/addons": "7.0.0-alpha.34",
@ -72,6 +95,13 @@
"publishConfig": {
"access": "public"
},
"bundler": {
"entries": [
"./src/index.ts",
"./src/manager.tsx",
"./src/preview.ts"
]
},
"gitHead": "fc90fc875462421c1faa35862ac4bc436de8e75f",
"storybook": {
"displayName": "Actions",

View File

@ -1 +1 @@
export * from './dist/esm/preset/preview';
export * from './dist/preview';

View File

@ -1,5 +1,5 @@
import type { Args, AnyFramework, ArgsEnhancer } from '@storybook/csf';
import { action } from '../index';
import { action } from './runtime/action';
// interface ActionsParameter {
// disable?: boolean;

View File

@ -0,0 +1,3 @@
import { withActions } from './runtime/withActions';
export const decorators = [withActions];

View File

@ -2,7 +2,7 @@
export * from './constants';
export * from './models';
export * from './preview';
export * from './runtime';
if (module && module.hot && module.hot.decline) {
module.hot.decline();

View File

@ -1,3 +0,0 @@
import { withActions } from '../index';
export const decorators = [withActions];

View File

@ -98,11 +98,6 @@ export class PostmsgTransport {
...eventOptions,
};
// backwards compat: convert depth to maxDepth
if (options && Number.isInteger(options.depth)) {
stringifyOptions.maxDepth = options.depth;
}
const frames = this.getFrames(target);
const query = qs.parse(location.search, { ignoreQueryPrefix: true });