Mark the link addon as essential

This commit is contained in:
Tobias Diez 2024-09-21 23:37:39 +08:00
parent 221f6a7833
commit 3a8a5f5e2e
17 changed files with 23 additions and 42 deletions

View File

@ -85,7 +85,6 @@ const config: StorybookConfig = {
// },
],
addons: [
'@storybook/addon-links',
'@storybook/addon-themes',
'@storybook/addon-essentials',
'@storybook/addon-interactions',

View File

@ -52,6 +52,12 @@
"import": "./dist/highlight/preview.mjs",
"require": "./dist/highlight/preview.js"
},
"./link/preview": {
"types": "./dist/link/preview.d.ts",
"import": "./dist/link/preview.mjs",
"require": "./dist/link/preview.js"
},
"./link/manager": "./dist/link/manager.js",
"./measure/preview": {
"types": "./dist/measure/preview.d.ts",
"import": "./dist/measure/preview.mjs",
@ -93,6 +99,7 @@
"@storybook/addon-controls": "workspace:*",
"@storybook/addon-docs": "workspace:*",
"@storybook/addon-highlight": "workspace:*",
"@storybook/addon-links": "workspace:*",
"@storybook/addon-measure": "workspace:*",
"@storybook/addon-outline": "workspace:*",
"@storybook/addon-toolbars": "workspace:*",
@ -118,6 +125,7 @@
"./src/actions/manager.ts",
"./src/backgrounds/manager.ts",
"./src/controls/manager.ts",
"./src/links/manager.ts",
"./src/measure/manager.ts",
"./src/outline/manager.ts",
"./src/toolbars/manager.ts",
@ -128,6 +136,7 @@
"./src/backgrounds/preview.ts",
"./src/docs/preview.ts",
"./src/highlight/preview.ts",
"./src/links/preview.ts",
"./src/measure/preview.ts",
"./src/outline/preview.ts",
"./src/viewport/preview.ts"

View File

@ -0,0 +1,2 @@
// @ts-expect-error (no types needed for this)
export * from '@storybook/addon-link/manager';

View File

@ -0,0 +1,2 @@
// @ts-expect-error (no types needed for this)
export * from '@storybook/addon-link/preview';

View File

@ -3,8 +3,8 @@
"version": "8.4.0-alpha.0",
"description": "Link stories together to build demos and prototypes with your UI components",
"keywords": [
"addon",
"storybook",
"storybook-addons",
"essentials",
"organize"
],
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/addons/links",

View File

@ -20,7 +20,6 @@ const config: StorybookConfig = {
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-storysource',
'@storybook/addon-links',
'@storybook/addon-jest',
'@storybook/addon-a11y',
],

View File

@ -1,10 +1,6 @@
const config = {
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions'],
framework: {
name: '@storybook/angular',
options: {},

View File

@ -228,11 +228,7 @@ export async function baseGenerator(
})
: extraAddonPackages;
extraAddonsToInstall.push(
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook@^1'
);
extraAddonsToInstall.push('@storybook/addon-essentials', '@chromatic-com/storybook@^1');
// added to main.js
const addons = [

View File

@ -81,7 +81,6 @@ describe('configureMain', () => {
language: SupportedLanguage.JAVASCRIPT,
prefixes: [],
addons: [
"%%path.dirname(require.resolve(path.join('@storybook/addon-links', 'package.json')))%%",
"%%path.dirname(require.resolve(path.join('@storybook/addon-essentials', 'package.json')))%%",
"%%path.dirname(require.resolve(path.join('@storybook/preset-create-react-app', 'package.json')))%%",
"%%path.dirname(require.resolve(path.join('@storybook/addon-interactions', 'package.json')))%%",
@ -103,7 +102,6 @@ describe('configureMain', () => {
const config = {
stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
path.dirname(require.resolve(path.join('@storybook/addon-links', 'package.json'))),
path.dirname(require.resolve(path.join('@storybook/addon-essentials', 'package.json'))),
path.dirname(require.resolve(path.join('@storybook/preset-create-react-app', 'package.json'))),
path.dirname(require.resolve(path.join('@storybook/addon-interactions', 'package.json'))),

View File

@ -5458,6 +5458,7 @@ __metadata:
"@storybook/addon-controls": "workspace:*"
"@storybook/addon-docs": "workspace:*"
"@storybook/addon-highlight": "workspace:*"
"@storybook/addon-links": "workspace:*"
"@storybook/addon-measure": "workspace:*"
"@storybook/addon-outline": "workspace:*"
"@storybook/addon-toolbars": "workspace:*"

View File

@ -3,12 +3,7 @@ export default {
// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-a11y',
],
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions', '@storybook/addon-a11y'],
build: {
test: {
disabledAddons: ['@storybook/addon-a11y'],
@ -24,12 +19,7 @@ import type { StorybookConfig } from '@storybook/your-framework';
const config: StorybookConfig = {
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-a11y',
],
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions', '@storybook/addon-a11y'],
build: {
test: {
disabledAddons: ['@storybook/addon-a11y'],
@ -39,4 +29,3 @@ const config: StorybookConfig = {
export default config;
```

View File

@ -4,7 +4,6 @@ export default {
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-coverage',
@ -25,7 +24,6 @@ const config: StorybookConfig = {
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-coverage',
@ -39,4 +37,3 @@ const config: StorybookConfig = {
export default config;
```

View File

@ -1,7 +1,7 @@
```js filename=".storybook/main.js|ts" renderer="common" language="js"
export default {
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
addons: ['@storybook/addon-essentials'],
core: {
builder: '@storybook/builder-vite',
},
@ -18,4 +18,3 @@ export default {
},
};
```

View File

@ -1,7 +1,7 @@
```js filename=".storybook/main.js|ts" renderer="common" language="js"
export default {
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
addons: ['@storybook/addon-essentials'],
core: {
builder: '@storybook/builder-vite',
},
@ -12,4 +12,3 @@ export default {
},
};
```

View File

@ -1,10 +1,9 @@
```js filename=".storybook/main.js|ts" renderer="common" language="js"
export default {
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
addons: ['@storybook/addon-essentials'],
core: {
builder: '@storybook/builder-vite', // 👈 The builder enabled here.
},
};
```

View File

@ -274,7 +274,6 @@ Storybook Environment Info:
npmPackages:
@storybook/addon-essentials: ^7.6.6 => 7.6.6
@storybook/addon-interactions: ^7.6.6 => 7.6.6
@storybook/addon-links: ^7.6.6 => 7.6.6
@storybook/addon-onboarding: ^1.0.10 => 1.0.10
@storybook/blocks: ^7.6.6 => 7.6.6
@storybook/preset-create-react-app: ^7.6.6 => 7.6.6

View File

@ -127,9 +127,6 @@ Will generate the following output:
}
},
"addons": {
"@storybook/addon-links": {
"version": "7.1.0"
},
"@storybook/addon-essentials": {
"version": "7.1.0"
},