@storybook/react-webpack5 7.0.0-alpha.1 → 7.0.0-alpha.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ export * from '@storybook/react';
2
+ export { F as FrameworkOptions, S as StorybookConfig } from './types-e3f39788.js';
3
+ import '@storybook/preset-react-webpack';
4
+ import '@storybook/builder-webpack5';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var f=(r,o,x,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of c(o))!d.call(r,p)&&p!==x&&a(r,p,{get:()=>o[p],enumerable:!(m=b(o,p))||m.enumerable});return r},t=(r,o,x)=>(f(r,o,"default"),x&&f(x,o,"default"));var g=r=>f(a({},"__esModule",{value:!0}),r);var e={};module.exports=g(e);t(e,require("@storybook/react"),module.exports);
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ export*from"@storybook/react";
@@ -0,0 +1,337 @@
1
+ import { TransformOptions } from '@babel/core';
2
+ import { Server } from 'http';
3
+ import Cache__default from 'file-system-cache';
4
+ import { S as StorybookConfig$1 } from './types-e3f39788.js';
5
+ import '@storybook/preset-react-webpack';
6
+ import '@storybook/builder-webpack5';
7
+
8
+ interface Options {
9
+ allowRegExp: boolean;
10
+ allowFunction: boolean;
11
+ allowSymbol: boolean;
12
+ allowDate: boolean;
13
+ allowUndefined: boolean;
14
+ allowClass: boolean;
15
+ maxDepth: number;
16
+ space: number | undefined;
17
+ lazyEval: boolean;
18
+ }
19
+
20
+ declare type Parameters = {
21
+ [name: string]: any;
22
+ };
23
+
24
+ declare type FileSystemCache = ReturnType<typeof Cache__default>;
25
+
26
+ /**
27
+ * ⚠️ This file contains internal WIP types they MUST NOT be exported outside this package for now!
28
+ */
29
+ declare type BuilderName = 'webpack5' | '@storybook/builder-webpack5' | string;
30
+ interface CoreConfig {
31
+ builder?: BuilderName | {
32
+ name: BuilderName;
33
+ options?: Record<string, any>;
34
+ };
35
+ disableWebpackDefaults?: boolean;
36
+ channelOptions?: Partial<Options>;
37
+ /**
38
+ * Disables the generation of project.json, a file containing Storybook metadata
39
+ */
40
+ disableProjectJson?: boolean;
41
+ /**
42
+ * Disables Storybook telemetry
43
+ * @see https://storybook.js.org/telemetry
44
+ */
45
+ disableTelemetry?: boolean;
46
+ /**
47
+ * Enable crash reports to be sent to Storybook telemetry
48
+ * @see https://storybook.js.org/telemetry
49
+ */
50
+ enableCrashReports?: boolean;
51
+ /**
52
+ * enable CORS headings to run document in a "secure context"
53
+ * see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer#security_requirements
54
+ * This enables these headers in development-mode:
55
+ * Cross-Origin-Opener-Policy: same-origin
56
+ * Cross-Origin-Embedder-Policy: require-corp
57
+ */
58
+ crossOriginIsolated?: boolean;
59
+ }
60
+ interface DirectoryMapping {
61
+ from: string;
62
+ to: string;
63
+ }
64
+ interface Presets {
65
+ apply(extension: 'typescript', config: TypescriptOptions, args?: Options$1): Promise<TypescriptOptions>;
66
+ apply(extension: 'framework', config: {}, args: any): Promise<Preset>;
67
+ apply(extension: 'babel', config: {}, args: any): Promise<TransformOptions>;
68
+ apply(extension: 'entries', config: [], args: any): Promise<unknown>;
69
+ apply(extension: 'stories', config: [], args: any): Promise<StoriesEntry[]>;
70
+ apply(extension: 'managerEntries', config: [], args: any): Promise<string[]>;
71
+ apply(extension: 'refs', config: [], args: any): Promise<unknown>;
72
+ apply(extension: 'core', config: {}, args: any): Promise<CoreConfig>;
73
+ apply<T>(extension: string, config?: T, args?: unknown): Promise<T>;
74
+ }
75
+ interface LoadedPreset {
76
+ name: string;
77
+ preset: any;
78
+ options: any;
79
+ }
80
+ interface VersionCheck {
81
+ success: boolean;
82
+ data?: any;
83
+ error?: any;
84
+ time: number;
85
+ }
86
+ interface ReleaseNotesData {
87
+ success: boolean;
88
+ currentVersion: string;
89
+ showOnFirstLaunch: boolean;
90
+ }
91
+ interface PackageJson {
92
+ name: string;
93
+ version: string;
94
+ dependencies?: Record<string, string>;
95
+ devDependencies?: Record<string, string>;
96
+ peerDependencies?: Record<string, string>;
97
+ scripts?: Record<string, string>;
98
+ eslintConfig?: Record<string, any>;
99
+ type?: 'module';
100
+ [key: string]: any;
101
+ }
102
+ interface LoadOptions {
103
+ packageJson: PackageJson;
104
+ outputDir?: string;
105
+ configDir?: string;
106
+ ignorePreview?: boolean;
107
+ extendServer?: (server: Server) => void;
108
+ }
109
+ interface CLIOptions {
110
+ port?: number;
111
+ ignorePreview?: boolean;
112
+ previewUrl?: string;
113
+ forceBuildPreview?: boolean;
114
+ disableTelemetry?: boolean;
115
+ enableCrashReports?: boolean;
116
+ host?: string;
117
+ /**
118
+ * @deprecated Use 'staticDirs' Storybook Configuration option instead
119
+ */
120
+ staticDir?: string[];
121
+ configDir?: string;
122
+ https?: boolean;
123
+ sslCa?: string[];
124
+ sslCert?: string;
125
+ sslKey?: string;
126
+ smokeTest?: boolean;
127
+ managerCache?: boolean;
128
+ open?: boolean;
129
+ ci?: boolean;
130
+ loglevel?: string;
131
+ quiet?: boolean;
132
+ versionUpdates?: boolean;
133
+ releaseNotes?: boolean;
134
+ dll?: boolean;
135
+ docs?: boolean;
136
+ docsDll?: boolean;
137
+ uiDll?: boolean;
138
+ debugWebpack?: boolean;
139
+ webpackStatsJson?: string | boolean;
140
+ outputDir?: string;
141
+ }
142
+ interface BuilderOptions {
143
+ configType?: 'DEVELOPMENT' | 'PRODUCTION';
144
+ ignorePreview: boolean;
145
+ cache: FileSystemCache;
146
+ configDir: string;
147
+ docsMode: boolean;
148
+ features?: StorybookConfig['features'];
149
+ versionCheck?: VersionCheck;
150
+ releaseNotesData?: ReleaseNotesData;
151
+ disableWebpackDefaults?: boolean;
152
+ serverChannelUrl?: string;
153
+ }
154
+ interface StorybookConfigOptions {
155
+ presets: Presets;
156
+ presetsList?: LoadedPreset[];
157
+ }
158
+ declare type Options$1 = LoadOptions & StorybookConfigOptions & CLIOptions & BuilderOptions;
159
+ interface IndexerOptions {
160
+ makeTitle: (userTitle?: string) => string;
161
+ }
162
+ interface IndexedStory {
163
+ id: string;
164
+ name: string;
165
+ parameters?: Parameters;
166
+ }
167
+ interface StoryIndex {
168
+ meta: {
169
+ title?: string;
170
+ };
171
+ stories: IndexedStory[];
172
+ }
173
+ interface StoryIndexer {
174
+ test: RegExp;
175
+ indexer: (fileName: string, options: IndexerOptions) => Promise<StoryIndex>;
176
+ }
177
+ /**
178
+ * Options for TypeScript usage within Storybook.
179
+ */
180
+ interface TypescriptOptions {
181
+ /**
182
+ * Enables type checking within Storybook.
183
+ *
184
+ * @default `false`
185
+ */
186
+ check: boolean;
187
+ /**
188
+ * Disable parsing typescript files through babel.
189
+ *
190
+ * @default `false`
191
+ */
192
+ skipBabel: boolean;
193
+ }
194
+ interface StoriesSpecifier {
195
+ /**
196
+ * When auto-titling, what to prefix all generated titles with (default: '')
197
+ */
198
+ titlePrefix?: string;
199
+ /**
200
+ * Where to start looking for story files
201
+ */
202
+ directory: string;
203
+ /**
204
+ * What does the filename of a story file look like?
205
+ * (a glob, relative to directory, no leading `./`)
206
+ * If unset, we use `** / *.stories.@(mdx|tsx|ts|jsx|js)` (no spaces)
207
+ */
208
+ files?: string;
209
+ }
210
+ declare type StoriesEntry = string | StoriesSpecifier;
211
+ declare type Preset = string | {
212
+ name: string;
213
+ options?: any;
214
+ };
215
+ /**
216
+ * An additional script that gets injected into the
217
+ * preview or the manager,
218
+ */
219
+ declare type Entry = string;
220
+ declare type StorybookRefs = Record<string, {
221
+ title: string;
222
+ url: string;
223
+ } | {
224
+ disable: boolean;
225
+ }>;
226
+ /**
227
+ * The interface for Storybook configuration in `main.ts` files.
228
+ */
229
+ interface StorybookConfig {
230
+ /**
231
+ * Sets the addons you want to use with Storybook.
232
+ *
233
+ * @example `['@storybook/addon-essentials']` or `[{ name: '@storybook/addon-essentials', options: { backgrounds: false } }]`
234
+ */
235
+ addons?: Preset[];
236
+ core?: CoreConfig;
237
+ /**
238
+ * Sets a list of directories of static files to be loaded by Storybook server
239
+ *
240
+ * @example `['./public']` or `[{from: './public', 'to': '/assets'}]`
241
+ */
242
+ staticDirs?: (DirectoryMapping | string)[];
243
+ logLevel?: string;
244
+ features?: {
245
+ /**
246
+ * Allows to disable deprecated implicit PostCSS loader. (will be removed in 7.0)
247
+ */
248
+ postcss?: boolean;
249
+ /**
250
+ * Build stories.json automatically on start/build
251
+ */
252
+ buildStoriesJson?: boolean;
253
+ /**
254
+ * Activate preview of CSF v3.0
255
+ *
256
+ * @deprecated This is always on now from 6.4 regardless of the setting
257
+ */
258
+ previewCsfV3?: boolean;
259
+ /**
260
+ * Activate on demand story store
261
+ */
262
+ storyStoreV7?: boolean;
263
+ /**
264
+ * Enable a set of planned breaking changes for SB7.0
265
+ */
266
+ breakingChangesV7?: boolean;
267
+ /**
268
+ * Enable the step debugger functionality in Addon-interactions.
269
+ */
270
+ interactionsDebugger?: boolean;
271
+ /**
272
+ * Use Storybook 7.0 babel config scheme
273
+ */
274
+ babelModeV7?: boolean;
275
+ /**
276
+ * Filter args with a "target" on the type from the render function (EXPERIMENTAL)
277
+ */
278
+ argTypeTargetsV7?: boolean;
279
+ /**
280
+ * Warn when there is a pre-6.0 hierarchy separator ('.' / '|') in the story title.
281
+ * Will be removed in 7.0.
282
+ */
283
+ warnOnLegacyHierarchySeparator?: boolean;
284
+ /**
285
+ * Preview MDX2 support, will become default in 7.0
286
+ */
287
+ previewMdx2?: boolean;
288
+ };
289
+ /**
290
+ * Tells Storybook where to find stories.
291
+ *
292
+ * @example `['./src/*.stories.@(j|t)sx?']`
293
+ */
294
+ stories: StoriesEntry[];
295
+ /**
296
+ * Framework, e.g. '@storybook/react', required in v7
297
+ */
298
+ framework?: Preset;
299
+ /**
300
+ * Controls how Storybook handles TypeScript files.
301
+ */
302
+ typescript?: Partial<TypescriptOptions>;
303
+ /**
304
+ * References external Storybooks
305
+ */
306
+ refs?: StorybookRefs | ((config: any, options: Options$1) => StorybookRefs);
307
+ /**
308
+ * Modify or return babel config.
309
+ */
310
+ babel?: (config: TransformOptions, options: Options$1) => TransformOptions | Promise<TransformOptions>;
311
+ /**
312
+ * Modify or return babel config.
313
+ */
314
+ babelDefault?: (config: TransformOptions, options: Options$1) => TransformOptions | Promise<TransformOptions>;
315
+ /**
316
+ * Add additional scripts to run in the preview a la `.storybook/preview.js`
317
+ *
318
+ * @deprecated use `previewAnnotations` or `/preview.js` file instead
319
+ */
320
+ config?: (entries: Entry[], options: Options$1) => Entry[];
321
+ /**
322
+ * Add additional scripts to run in the preview a la `.storybook/preview.js`
323
+ */
324
+ previewAnnotations?: (entries: Entry[], options: Options$1) => Entry[];
325
+ /**
326
+ * Process CSF files for the story index.
327
+ */
328
+ storyIndexers?: (indexers: StoryIndexer[], options: Options$1) => StoryIndexer[];
329
+ }
330
+ declare type PresetProperty<K, TStorybookConfig = StorybookConfig> = TStorybookConfig[K extends keyof TStorybookConfig ? K : never] | PresetPropertyFn<K, TStorybookConfig>;
331
+ declare type PresetPropertyFn<K, TStorybookConfig = StorybookConfig, TOptions = {}> = (config: TStorybookConfig[K extends keyof TStorybookConfig ? K : never], options: Options$1 & TOptions) => TStorybookConfig[K extends keyof TStorybookConfig ? K : never] | Promise<TStorybookConfig[K extends keyof TStorybookConfig ? K : never]>;
332
+
333
+ declare const addons: PresetProperty<'addons', StorybookConfig$1>;
334
+ declare const core: PresetProperty<'core', StorybookConfig$1>;
335
+ declare const webpack: StorybookConfig$1['webpack'];
336
+
337
+ export { addons, core, webpack };
package/dist/preset.js ADDED
@@ -0,0 +1 @@
1
+ var m=Object.create;var s=Object.defineProperty,u=Object.defineProperties,y=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertyNames,k=Object.getOwnPropertySymbols,w=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var l=(e,r,o)=>r in e?s(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,n=(e,r)=>{for(var o in r||(r={}))b.call(r,o)&&l(e,o,r[o]);if(k)for(var o of k(r))q.call(r,o)&&l(e,o,r[o]);return e},p=(e,r)=>u(e,j(r)),i=(e,r)=>s(e,"name",{value:r,configurable:!0});var x=(e,r)=>{for(var o in r)s(e,o,{get:r[o],enumerable:!0})},d=(e,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of v(r))!b.call(e,t)&&t!==o&&s(e,t,{get:()=>r[t],enumerable:!(c=y(r,t))||c.enumerable});return e};var g=(e,r,o)=>(o=e!=null?m(w(e)):{},d(r||!e||!e.__esModule?s(o,"default",{value:e,enumerable:!0}):o,e)),h=e=>d(s({},"__esModule",{value:!0}),e);var B={};x(B,{addons:()=>f,core:()=>z,webpack:()=>A});module.exports=h(B);var a=g(require("path")),f=[a.default.dirname(require.resolve(a.default.join("@storybook/preset-react-webpack","package.json"))),a.default.dirname(require.resolve(a.default.join("@storybook/react","package.json")))],z=i(async(e,r)=>{let o=await r.presets.apply("framework");return p(n({},e),{builder:{name:a.default.dirname(require.resolve(a.default.join("@storybook/builder-webpack5","package.json"))),options:typeof o=="string"?{}:o.options.builder||{}}})},"core"),A=i(async e=>{var r;return e.resolve=e.resolve||{},e.resolve.alias=p(n({},(r=e.resolve)==null?void 0:r.alias),{"@storybook/react":a.default.dirname(require.resolve(a.default.join("@storybook/react","package.json")))}),e},"webpack");0&&(module.exports={addons,core,webpack});
@@ -0,0 +1 @@
1
+ var k=Object.defineProperty,l=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var i=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var c=(e,r,o)=>r in e?k(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,t=(e,r)=>{for(var o in r||(r={}))d.call(r,o)&&c(e,o,r[o]);if(i)for(var o of i(r))m.call(r,o)&&c(e,o,r[o]);return e},n=(e,r)=>l(e,b(r)),p=(e,r)=>k(e,"name",{value:r,configurable:!0}),s=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(r,o)=>(typeof require!="undefined"?require:r)[o]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});import a from"path";var w=[a.dirname(s.resolve(a.join("@storybook/preset-react-webpack","package.json"))),a.dirname(s.resolve(a.join("@storybook/react","package.json")))],q=p(async(e,r)=>{let o=await r.presets.apply("framework");return n(t({},e),{builder:{name:a.dirname(s.resolve(a.join("@storybook/builder-webpack5","package.json"))),options:typeof o=="string"?{}:o.options.builder||{}}})},"core"),x=p(async e=>{var r;return e.resolve=e.resolve||{},e.resolve.alias=n(t({},(r=e.resolve)==null?void 0:r.alias),{"@storybook/react":a.dirname(s.resolve(a.join("@storybook/react","package.json")))}),e},"webpack");export{w as addons,q as core,x as webpack};
@@ -0,0 +1,27 @@
1
+ import { ReactOptions, StorybookConfig as StorybookConfig$1, TypescriptOptions as TypescriptOptions$1 } from '@storybook/preset-react-webpack';
2
+ import { BuilderOptions, StorybookConfigWebpack, TypescriptOptions } from '@storybook/builder-webpack5';
3
+
4
+ declare type FrameworkName = '@storybook/react-webpack5';
5
+ declare type BuilderName = '@storybook/builder-webpack5';
6
+ declare type FrameworkOptions = ReactOptions & {
7
+ builder?: BuilderOptions;
8
+ };
9
+ declare type StorybookConfigFramework = {
10
+ framework: FrameworkName | {
11
+ name: FrameworkName;
12
+ options: FrameworkOptions;
13
+ };
14
+ core?: StorybookConfig$1['core'] & {
15
+ builder?: BuilderName | {
16
+ name: BuilderName;
17
+ options: BuilderOptions;
18
+ };
19
+ };
20
+ typescript?: Partial<TypescriptOptions & TypescriptOptions$1> & StorybookConfig$1['typescript'];
21
+ };
22
+ /**
23
+ * The interface for Storybook configuration in `main.ts` files.
24
+ */
25
+ declare type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigWebpack | keyof StorybookConfigFramework> & StorybookConfigWebpack & StorybookConfigFramework;
26
+
27
+ export { FrameworkOptions as F, StorybookConfig as S };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-webpack5",
3
- "version": "7.0.0-alpha.1",
3
+ "version": "7.0.0-alpha.10",
4
4
  "description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
5
5
  "keywords": [
6
6
  "storybook"
@@ -19,9 +19,26 @@
19
19
  "url": "https://opencollective.com/storybook"
20
20
  },
21
21
  "license": "MIT",
22
- "main": "dist/cjs/index.js",
23
- "module": "dist/esm/index.js",
24
- "types": "dist/types/index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "require": "./dist/index.js",
25
+ "import": "./dist/index.mjs",
26
+ "types": "./dist/index.d.ts"
27
+ },
28
+ "./preset": {
29
+ "require": "./dist/preset.js",
30
+ "import": "./dist/preset.mjs",
31
+ "types": "./dist/preset.d.ts"
32
+ },
33
+ "./package.json": {
34
+ "require": "./package.json",
35
+ "import": "./package.json",
36
+ "types": "./package.json"
37
+ }
38
+ },
39
+ "main": "dist/index.js",
40
+ "module": "dist/index.mjs",
41
+ "types": "dist/index.d.ts",
25
42
  "files": [
26
43
  "dist/**/*",
27
44
  "types/**/*",
@@ -30,18 +47,17 @@
30
47
  "*.d.ts"
31
48
  ],
32
49
  "scripts": {
33
- "prepare": "node ../../scripts/prepare.js"
50
+ "prepare": "esrun ../../scripts/prepare/bundle.ts"
34
51
  },
35
52
  "dependencies": {
36
- "@storybook/builder-webpack5": "7.0.0-alpha.1",
37
- "@storybook/core-server": "7.0.0-alpha.1",
38
- "@storybook/preset-react-webpack": "7.0.0-alpha.1",
39
- "@storybook/react": "7.0.0-alpha.1",
53
+ "@storybook/builder-webpack5": "7.0.0-alpha.10",
54
+ "@storybook/preset-react-webpack": "7.0.0-alpha.10",
55
+ "@storybook/react": "7.0.0-alpha.10",
40
56
  "@types/node": "^14.14.20 || ^16.0.0",
41
- "core-js": "^3.8.2",
42
- "regenerator-runtime": "^0.13.7"
57
+ "core-js": "^3.8.2"
43
58
  },
44
59
  "devDependencies": {
60
+ "@digitak/esrun": "^3.2.2",
45
61
  "jest-specific-snapshot": "^4.0.0"
46
62
  },
47
63
  "peerDependencies": {
@@ -63,5 +79,9 @@
63
79
  "publishConfig": {
64
80
  "access": "public"
65
81
  },
66
- "gitHead": "b90b85210f66da59656c2ef58b0910b156256bea"
82
+ "bundlerEntrypoint": [
83
+ "./src/index.ts",
84
+ "./src/preset.ts"
85
+ ],
86
+ "gitHead": "b13dd8fb52819d73d4983148af8ffc5d683e8b75"
67
87
  }
package/preset.js CHANGED
@@ -1 +1 @@
1
- module.exports = require('./dist/cjs/preset');
1
+ module.exports = require('./dist/preset');
package/dist/cjs/index.js DELETED
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.object.to-string.js");
4
-
5
- require("core-js/modules/web.dom-collections.for-each.js");
6
-
7
- require("core-js/modules/es.object.keys.js");
8
-
9
- Object.defineProperty(exports, "__esModule", {
10
- value: true
11
- });
12
-
13
- var _react = require("@storybook/react");
14
-
15
- Object.keys(_react).forEach(function (key) {
16
- if (key === "default" || key === "__esModule") return;
17
- if (key in exports && exports[key] === _react[key]) return;
18
- Object.defineProperty(exports, key, {
19
- enumerable: true,
20
- get: function get() {
21
- return _react[key];
22
- }
23
- });
24
- });
25
-
26
- var _types = require("./types");
27
-
28
- Object.keys(_types).forEach(function (key) {
29
- if (key === "default" || key === "__esModule") return;
30
- if (key in exports && exports[key] === _types[key]) return;
31
- Object.defineProperty(exports, key, {
32
- enumerable: true,
33
- get: function get() {
34
- return _types[key];
35
- }
36
- });
37
- });
@@ -1,76 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
- require("core-js/modules/es.symbol.js");
6
-
7
- require("core-js/modules/es.symbol.description.js");
8
-
9
- require("core-js/modules/es.symbol.iterator.js");
10
-
11
- require("core-js/modules/es.array.iterator.js");
12
-
13
- require("core-js/modules/es.string.iterator.js");
14
-
15
- require("core-js/modules/web.dom-collections.iterator.js");
16
-
17
- require("core-js/modules/es.symbol.async-iterator.js");
18
-
19
- require("core-js/modules/es.symbol.to-string-tag.js");
20
-
21
- require("core-js/modules/es.json.to-string-tag.js");
22
-
23
- require("core-js/modules/es.math.to-string-tag.js");
24
-
25
- require("core-js/modules/es.object.get-prototype-of.js");
26
-
27
- require("core-js/modules/web.dom-collections.for-each.js");
28
-
29
- require("core-js/modules/es.function.name.js");
30
-
31
- require("core-js/modules/es.array.slice.js");
32
-
33
- Object.defineProperty(exports, "__esModule", {
34
- value: true
35
- });
36
- exports.core = exports.addons = void 0;
37
-
38
- require("core-js/modules/es.object.assign.js");
39
-
40
- require("core-js/modules/es.object.to-string.js");
41
-
42
- require("core-js/modules/es.promise.js");
43
-
44
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
45
-
46
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
47
-
48
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
49
-
50
- var addons = ['@storybook/preset-react-webpack', '@storybook/react'];
51
- exports.addons = addons;
52
-
53
- var core = /*#__PURE__*/function () {
54
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(config) {
55
- return _regeneratorRuntime().wrap(function _callee$(_context) {
56
- while (1) {
57
- switch (_context.prev = _context.next) {
58
- case 0:
59
- return _context.abrupt("return", Object.assign({}, config, {
60
- builder: require.resolve('@storybook/builder-webpack5')
61
- }));
62
-
63
- case 1:
64
- case "end":
65
- return _context.stop();
66
- }
67
- }
68
- }, _callee);
69
- }));
70
-
71
- return function core(_x) {
72
- return _ref.apply(this, arguments);
73
- };
74
- }();
75
-
76
- exports.core = core;
package/dist/cjs/types.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
package/dist/esm/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from '@storybook/react';
2
- export * from './types';
@@ -1,6 +0,0 @@
1
- export const addons = ['@storybook/preset-react-webpack', '@storybook/react'];
2
- export const core = async config => {
3
- return Object.assign({}, config, {
4
- builder: require.resolve('@storybook/builder-webpack5')
5
- });
6
- };
package/dist/esm/types.js DELETED
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export * from '@storybook/react';
2
- export * from './types';
@@ -1,11 +0,0 @@
1
- import type { StorybookConfig } from '@storybook/preset-react-webpack';
2
- export declare const addons: StorybookConfig['addons'];
3
- export declare const core: (config: StorybookConfig['core']) => Promise<{
4
- builder: string;
5
- disableWebpackDefaults?: boolean;
6
- channelOptions?: Partial<import("telejson").Options>;
7
- disableProjectJson?: boolean;
8
- disableTelemetry?: boolean;
9
- enableCrashReports?: boolean;
10
- crossOriginIsolated?: boolean;
11
- }>;
@@ -1,38 +0,0 @@
1
- import type ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
2
- import type { Configuration } from 'webpack';
3
- import type { StorybookConfig as BaseStorybookConfig } from '@storybook/preset-react-webpack';
4
- export type { BuilderResult } from '@storybook/preset-react-webpack';
5
- /**
6
- * Options for TypeScript usage within Storybook.
7
- */
8
- export declare type TypescriptOptions = BaseStorybookConfig['typescript'] & {
9
- /**
10
- * Configures `fork-ts-checker-webpack-plugin`
11
- */
12
- checkOptions: ForkTsCheckerWebpackPlugin['options'];
13
- };
14
- export interface StorybookTypescriptConfig {
15
- typescript?: Partial<TypescriptOptions>;
16
- }
17
- export interface ReactOptions {
18
- fastRefresh?: boolean;
19
- strictMode?: boolean;
20
- /**
21
- * Use React's legacy root API to mount components
22
- * @description
23
- * React has introduced a new root API with React 18.x to enable a whole set of new features (e.g. concurrent features)
24
- * If this flag is true, the legacy Root API is used to mount components to make it easier to migrate step by step to React 18.
25
- * @default false
26
- */
27
- legacyRootApi?: boolean;
28
- }
29
- export interface StorybookReactConfig {
30
- framework: string | {
31
- name: '@storybook/react-webpack5';
32
- options: ReactOptions;
33
- };
34
- }
35
- /**
36
- * The interface for Storybook configuration in `main.ts` files.
37
- */
38
- export declare type StorybookConfig = BaseStorybookConfig<Configuration> & StorybookReactConfig & StorybookTypescriptConfig;
package/standalone.js DELETED
@@ -1,7 +0,0 @@
1
- const build = require('@storybook/core-server/standalone');
2
-
3
- async function buildStandalone(options) {
4
- return build(options);
5
- }
6
-
7
- module.exports = buildStandalone;
package/types-6-0.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './dist/types/client/preview/types-6-0.d';
package/types-7-0.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './dist/types/client/preview/types-7-0.d';
package/types.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './dist/types/index.d';