From aaa4a210e08687cd81a9b29a84ee3d932bd69d55 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 3 Nov 2022 16:11:59 -0400 Subject: [PATCH] Re-export all addons from addon-essentials --- code/addons/essentials/package.json | 108 +++++++++++++----- code/addons/essentials/src/actions/manager.ts | 5 + .../actions.ts => actions/preview.ts} | 0 .../essentials/src/backgrounds/manager.ts | 5 + .../backgrounds.ts => backgrounds/preview.ts} | 0 .../addons/essentials/src/controls/manager.ts | 5 + code/addons/essentials/src/docs/preset.ts | 1 + .../src/{preview/docs.ts => docs/preview.ts} | 0 .../highlight.ts => highlight/preview.ts} | 0 code/addons/essentials/src/measure/manager.ts | 5 + .../measure.ts => measure/preview.ts} | 0 code/addons/essentials/src/outline/manager.ts | 5 + .../outline.ts => outline/preview.ts} | 0 .../addons/essentials/src/toolbars/manager.ts | 5 + code/addons/essentials/src/typings.d.ts | 1 + .../addons/essentials/src/viewport/manager.ts | 5 + 16 files changed, 115 insertions(+), 30 deletions(-) create mode 100644 code/addons/essentials/src/actions/manager.ts rename code/addons/essentials/src/{preview/actions.ts => actions/preview.ts} (100%) create mode 100644 code/addons/essentials/src/backgrounds/manager.ts rename code/addons/essentials/src/{preview/backgrounds.ts => backgrounds/preview.ts} (100%) create mode 100644 code/addons/essentials/src/controls/manager.ts create mode 100644 code/addons/essentials/src/docs/preset.ts rename code/addons/essentials/src/{preview/docs.ts => docs/preview.ts} (100%) rename code/addons/essentials/src/{preview/highlight.ts => highlight/preview.ts} (100%) create mode 100644 code/addons/essentials/src/measure/manager.ts rename code/addons/essentials/src/{preview/measure.ts => measure/preview.ts} (100%) create mode 100644 code/addons/essentials/src/outline/manager.ts rename code/addons/essentials/src/{preview/outline.ts => outline/preview.ts} (100%) create mode 100644 code/addons/essentials/src/toolbars/manager.ts create mode 100644 code/addons/essentials/src/viewport/manager.ts diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index 9c55001b244..72b59087e90 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -27,35 +27,75 @@ "import": "./dist/index.mjs", "types": "./dist/index.d.ts" }, - "./preview/actions": { - "require": "./dist/preview/actions.js", - "import": "./dist/preview/actions.mjs", - "types": "./dist/preview/actions.d.ts" + "./actions/preview": { + "require": "./dist/actions/preview.js", + "import": "./dist/actions/preview.mjs", + "types": "./dist/actions/preview.d.ts" }, - "./preview/backgrounds": { - "require": "./dist/preview/backgrounds.js", - "import": "./dist/preview/backgrounds.mjs", - "types": "./dist/preview/backgrounds.d.ts" + "./actions/manager": { + "require": "./dist/actions/manager.js", + "import": "./dist/actions/manager.mjs", + "types": "./dist/actions/manager.d.ts" }, - "./preview/docs": { - "require": "./dist/preview/docs.js", - "import": "./dist/preview/docs.mjs", - "types": "./dist/preview/docs.d.ts" + "./backgrounds/preview": { + "require": "./dist/backgrounds/preview.js", + "import": "./dist/backgrounds/preview.mjs", + "types": "./dist/backgrounds/preview.d.ts" }, - "./preview/highlight": { - "require": "./dist/preview/highlight.js", - "import": "./dist/preview/highlight.mjs", - "types": "./dist/preview/highlight.d.ts" + "./backgrounds/manager": { + "require": "./dist/backgrounds/manager.js", + "import": "./dist/backgrounds/manager.mjs", + "types": "./dist/backgrounds/manager.d.ts" }, - "./preview/measure": { - "require": "./dist/preview/measure.js", - "import": "./dist/preview/measure.mjs", - "types": "./dist/preview/measure.d.ts" + "./controls/manager": { + "require": "./dist/controls/manager.js", + "import": "./dist/controls/manager.mjs", + "types": "./dist/controls/manager.d.ts" }, - "./preview/outline": { - "require": "./dist/preview/outline.js", - "import": "./dist/preview/outline.mjs", - "types": "./dist/preview/outline.d.ts" + "./docs/preview": { + "require": "./dist/docs/preview.js", + "import": "./dist/docs/preview.mjs", + "types": "./dist/docs/preview.d.ts" + }, + "./docs/preset": { + "require": "./dist/docs/preset.js", + "import": "./dist/docs/preset.mjs", + "types": "./dist/docs/preset.d.ts" + }, + "./highlight/preview": { + "require": "./dist/highlight/preview.js", + "import": "./dist/highlight/preview.mjs", + "types": "./dist/highlight/preview.d.ts" + }, + "./measure/preview": { + "require": "./dist/measure/preview.js", + "import": "./dist/measure/preview.mjs", + "types": "./dist/measure/preview.d.ts" + }, + "./measure/manager": { + "require": "./dist/measure/manager.js", + "import": "./dist/measure/manager.mjs", + "types": "./dist/measure/manager.d.ts" + }, + "./outline/preview": { + "require": "./dist/outline/preview.js", + "import": "./dist/outline/preview.mjs", + "types": "./dist/outline/preview.d.ts" + }, + "./outline/manager": { + "require": "./dist/outline/manager.js", + "import": "./dist/outline/manager.mjs", + "types": "./dist/outline/manager.d.ts" + }, + "./toolbars/manager": { + "require": "./dist/toolbars/manager.js", + "import": "./dist/toolbars/manager.mjs", + "types": "./dist/toolbars/manager.d.ts" + }, + "./viewport/manager": { + "require": "./dist/viewport/manager.js", + "import": "./dist/viewport/manager.mjs", + "types": "./dist/viewport/manager.d.ts" }, "./package.json": "./package.json" }, @@ -139,12 +179,20 @@ "bundler": { "entries": [ "./src/index.ts", - "./src/preview/actions.ts", - "./src/preview/backgrounds.ts", - "./src/preview/docs.ts", - "./src/preview/highlight.ts", - "./src/preview/measure.ts", - "./src/preview/outline.ts" + "./src/actions/preview.ts", + "./src/actions/manager.ts", + "./src/backgrounds/preview.ts", + "./src/backgrounds/manager.ts", + "./src/controls/manager.ts", + "./src/docs/preview.ts", + "./src/docs/preset.ts", + "./src/highlight/preview.ts", + "./src/measure/preview.ts", + "./src/measure/manager.ts", + "./src/outline/preview.ts", + "./src/outline/manager.ts", + "./src/toolbars/manager.ts", + "./src/viewport/manager.ts" ], "platform": "node" }, diff --git a/code/addons/essentials/src/actions/manager.ts b/code/addons/essentials/src/actions/manager.ts new file mode 100644 index 00000000000..14c3a48dbc1 --- /dev/null +++ b/code/addons/essentials/src/actions/manager.ts @@ -0,0 +1,5 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-actions/manager'; diff --git a/code/addons/essentials/src/preview/actions.ts b/code/addons/essentials/src/actions/preview.ts similarity index 100% rename from code/addons/essentials/src/preview/actions.ts rename to code/addons/essentials/src/actions/preview.ts diff --git a/code/addons/essentials/src/backgrounds/manager.ts b/code/addons/essentials/src/backgrounds/manager.ts new file mode 100644 index 00000000000..4fad52e6b1a --- /dev/null +++ b/code/addons/essentials/src/backgrounds/manager.ts @@ -0,0 +1,5 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-backgrounds/manager'; diff --git a/code/addons/essentials/src/preview/backgrounds.ts b/code/addons/essentials/src/backgrounds/preview.ts similarity index 100% rename from code/addons/essentials/src/preview/backgrounds.ts rename to code/addons/essentials/src/backgrounds/preview.ts diff --git a/code/addons/essentials/src/controls/manager.ts b/code/addons/essentials/src/controls/manager.ts new file mode 100644 index 00000000000..3adb5f13f6c --- /dev/null +++ b/code/addons/essentials/src/controls/manager.ts @@ -0,0 +1,5 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-controls/manager'; diff --git a/code/addons/essentials/src/docs/preset.ts b/code/addons/essentials/src/docs/preset.ts new file mode 100644 index 00000000000..f97114783e1 --- /dev/null +++ b/code/addons/essentials/src/docs/preset.ts @@ -0,0 +1 @@ +export * from '@storybook/addon-docs/preset'; diff --git a/code/addons/essentials/src/preview/docs.ts b/code/addons/essentials/src/docs/preview.ts similarity index 100% rename from code/addons/essentials/src/preview/docs.ts rename to code/addons/essentials/src/docs/preview.ts diff --git a/code/addons/essentials/src/preview/highlight.ts b/code/addons/essentials/src/highlight/preview.ts similarity index 100% rename from code/addons/essentials/src/preview/highlight.ts rename to code/addons/essentials/src/highlight/preview.ts diff --git a/code/addons/essentials/src/measure/manager.ts b/code/addons/essentials/src/measure/manager.ts new file mode 100644 index 00000000000..096a85e7ecb --- /dev/null +++ b/code/addons/essentials/src/measure/manager.ts @@ -0,0 +1,5 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-measure/manager'; diff --git a/code/addons/essentials/src/preview/measure.ts b/code/addons/essentials/src/measure/preview.ts similarity index 100% rename from code/addons/essentials/src/preview/measure.ts rename to code/addons/essentials/src/measure/preview.ts diff --git a/code/addons/essentials/src/outline/manager.ts b/code/addons/essentials/src/outline/manager.ts new file mode 100644 index 00000000000..4048af2a78e --- /dev/null +++ b/code/addons/essentials/src/outline/manager.ts @@ -0,0 +1,5 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-outline/manager'; diff --git a/code/addons/essentials/src/preview/outline.ts b/code/addons/essentials/src/outline/preview.ts similarity index 100% rename from code/addons/essentials/src/preview/outline.ts rename to code/addons/essentials/src/outline/preview.ts diff --git a/code/addons/essentials/src/toolbars/manager.ts b/code/addons/essentials/src/toolbars/manager.ts new file mode 100644 index 00000000000..4b3a25c62a3 --- /dev/null +++ b/code/addons/essentials/src/toolbars/manager.ts @@ -0,0 +1,5 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-toolbars/manager'; diff --git a/code/addons/essentials/src/typings.d.ts b/code/addons/essentials/src/typings.d.ts index 419fc10cd26..818a79e77c4 100644 --- a/code/addons/essentials/src/typings.d.ts +++ b/code/addons/essentials/src/typings.d.ts @@ -2,3 +2,4 @@ declare module 'fs'; // TODO: Remove this once addon-docs is generated with tsup declare module '@storybook/addon-docs/preview'; +declare module '@storybook/addon-docs/preset'; diff --git a/code/addons/essentials/src/viewport/manager.ts b/code/addons/essentials/src/viewport/manager.ts new file mode 100644 index 00000000000..5446adf98a8 --- /dev/null +++ b/code/addons/essentials/src/viewport/manager.ts @@ -0,0 +1,5 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-viewport/manager';