Deprecated migration package that directs users away from obsolete toolbar addon to Storybook 9's integrated functionality
npx @tessl/cli install tessl/npm-storybook--addon-toolbars@9.0.00
# @storybook/addon-toolbars
1
2
@storybook/addon-toolbars is a deprecated migration package that exists solely to provide error messages directing users away from this obsolete addon. The functionality was consolidated into Storybook's core package in version 9.0 and above.
3
4
## Package Information
5
6
- **Package Name**: @storybook/addon-toolbars
7
- **Package Type**: npm
8
- **Language**: TypeScript
9
- **Installation**: `npm install @storybook/addon-toolbars` (not recommended)
10
- **Status**: Deprecated - Migration package only
11
12
## Core Imports
13
14
Any import will result in an error being thrown:
15
16
```typescript
17
import '@storybook/addon-toolbars';
18
```
19
20
CommonJS:
21
22
```javascript
23
require('@storybook/addon-toolbars');
24
```
25
26
All import patterns will throw the same migration error.
27
28
## Basic Usage
29
30
**This package should not be used.** Any attempt to import or use this package will result in an error:
31
32
```typescript
33
// This will throw an error
34
import '@storybook/addon-toolbars';
35
36
// Error message:
37
// "Your Storybook project is referring to package @storybook/addon-toolbars,
38
// which no longer exists in Storybook 9.0 and above. Please refer to the
39
// Storybook 9 migration guide for instructions on how to fix this issue:
40
// https://storybook.js.org/docs/9/migration-guide#package-structure-changes"
41
```
42
43
## Migration Information
44
45
For users who encounter this package:
46
47
1. **Remove the dependency**: Remove `@storybook/addon-toolbars` from your `package.json`
48
2. **Follow migration guide**: Visit https://storybook.js.org/docs/9/migration-guide#package-structure-changes
49
3. **Use core functionality**: Toolbar functionality is now built into Storybook core
50
51
## Capabilities
52
53
### Error Throwing Mechanism
54
55
The package's sole functionality is to throw informative migration errors when imported.
56
57
```typescript { .api }
58
/**
59
* Error thrown by all entry points to direct users to migration guide
60
* @throws Error with migration instructions
61
*/
62
declare function throwMigrationError(): never;
63
```
64
65
All entry points (main, preview, manager, register) execute this error mechanism.
66
67
## Entry Points
68
69
The package defines multiple entry points, all of which throw the same migration error:
70
71
```typescript { .api }
72
// Main entry point - throws migration error
73
import '@storybook/addon-toolbars';
74
75
// Preview entry point - throws migration error
76
import '@storybook/addon-toolbars/preview';
77
78
// Manager entry point - throws migration error
79
import '@storybook/addon-toolbars/manager';
80
81
// Register entry point (alias for manager) - throws migration error
82
import '@storybook/addon-toolbars/register';
83
```
84
85
## Types
86
87
```typescript { .api }
88
/**
89
* Standard Error thrown by all entry points with migration message
90
* Note: This is a standard JavaScript Error, not a custom exported type
91
*/
92
type ThrownError = Error & {
93
message: "Your Storybook project is referring to package @storybook/addon-toolbars, which no longer exists in Storybook 9.0 and above. Please refer to the Storybook 9 migration guide for instructions on how to fix this issue: https://storybook.js.org/docs/9/migration-guide#package-structure-changes";
94
}
95
```
96
97
## Package Structure
98
99
The package exports are defined in package.json with the following entry points:
100
- **Main export** (`.`): Points to `dist/index.js` (main), `dist/index.mjs` (import), `dist/index.d.ts` (types)
101
- **Preview export** (`./preview`): Points to `dist/preview.js` (require), `dist/preview.mjs` (import), `dist/preview.d.ts` (types)
102
- **Manager export** (`./manager`): Points to `dist/manager.js`
103
- **Register export** (`./register`): Alias for `./manager` pointing to `dist/manager.js`
104
105
All source files (`src/index.ts`, `src/preview.tsx`, `src/manager.tsx`) import `src/error.ts` which throws the migration error.
106
107
## Important Notes
108
109
- **No functional API**: This package provides no working functionality
110
- **Migration tool only**: Exists purely to help users transition away from the deprecated addon
111
- **Storybook 9+ compatibility**: Toolbar functionality is now part of Storybook core
112
- **Error on all imports**: Every possible import path results in the same helpful error message
113
- **Build system intact**: Package maintains proper TypeScript build configuration despite having no functional code