@storybook/addon-docs 6.5.0-alpha.51 → 6.5.0-alpha.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
@@ -16,6 +16,8 @@ require("core-js/modules/es.array.from.js");
16
16
 
17
17
  require("core-js/modules/es.array.slice.js");
18
18
 
19
+ require("core-js/modules/es.function.name.js");
20
+
19
21
  require("core-js/modules/es.promise.js");
20
22
 
21
23
  Object.defineProperty(exports, "__esModule", {
@@ -29,16 +31,12 @@ require("core-js/modules/es.array.concat.js");
29
31
 
30
32
  require("core-js/modules/es.object.assign.js");
31
33
 
32
- require("core-js/modules/es.function.name.js");
33
-
34
- require("core-js/modules/es.regexp.exec.js");
35
-
36
- require("core-js/modules/es.string.match.js");
37
-
38
34
  require("core-js/modules/es.array.filter.js");
39
35
 
40
36
  require("core-js/modules/es.object.to-string.js");
41
37
 
38
+ require("core-js/modules/es.regexp.exec.js");
39
+
42
40
  require("core-js/modules/es.regexp.to-string.js");
43
41
 
44
42
  require("core-js/modules/es.regexp.constructor.js");
@@ -100,10 +98,6 @@ function _webpack() {
100
98
 
101
99
  var webpackConfig,
102
100
  options,
103
- _yield$options$preset,
104
- _yield$options$preset2,
105
- builder,
106
- builderName,
107
101
  resolvedBabelLoader,
108
102
  _webpackConfig$module,
109
103
  module,
@@ -129,17 +123,7 @@ function _webpack() {
129
123
  case 0:
130
124
  webpackConfig = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
131
125
  options = _args.length > 1 ? _args[1] : undefined;
132
- _context.next = 4;
133
- return options.presets.apply('core', {});
134
-
135
- case 4:
136
- _yield$options$preset = _context.sent;
137
- _yield$options$preset2 = _yield$options$preset.builder;
138
- builder = _yield$options$preset2 === void 0 ? 'webpack4' : _yield$options$preset2;
139
- builderName = typeof builder === 'string' ? builder : builder.name;
140
- resolvedBabelLoader = require.resolve('babel-loader', {
141
- paths: builderName.match(/^webpack(4|5)$/) ? [require.resolve("@storybook/builder-".concat(builderName))] : [builderName]
142
- });
126
+ resolvedBabelLoader = require.resolve('babel-loader');
143
127
  _webpackConfig$module = webpackConfig.module, module = _webpackConfig$module === void 0 ? {} : _webpackConfig$module; // it will reuse babel options that are already in use in storybook
144
128
  // also, these babel options are chained with other presets.
145
129
 
@@ -231,7 +215,7 @@ function _webpack() {
231
215
  });
232
216
  return _context.abrupt("return", result);
233
217
 
234
- case 20:
218
+ case 14:
235
219
  case "end":
236
220
  return _context.stop();
237
221
  }
@@ -39,7 +39,6 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
39
39
 
40
40
  var parameters = {
41
41
  docs: {
42
- inlineStories: false,
43
42
  getContainer: function () {
44
43
  var _getContainer = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
45
44
  return regeneratorRuntime.wrap(function _callee$(_context) {
@@ -48,7 +47,7 @@ var parameters = {
48
47
  case 0:
49
48
  _context.next = 2;
50
49
  return Promise.resolve().then(function () {
51
- return _interopRequireWildcard(require('../../blocks'));
50
+ return _interopRequireWildcard(require('./blocks'));
52
51
  });
53
52
 
54
53
  case 2:
@@ -76,7 +75,7 @@ var parameters = {
76
75
  case 0:
77
76
  _context2.next = 2;
78
77
  return Promise.resolve().then(function () {
79
- return _interopRequireWildcard(require('../../blocks'));
78
+ return _interopRequireWildcard(require('./blocks'));
80
79
  });
81
80
 
82
81
  case 2:
@@ -95,8 +94,7 @@ var parameters = {
95
94
  }
96
95
 
97
96
  return getPage;
98
- }(),
99
- iframeHeight: 100
97
+ }()
100
98
  }
101
99
  };
102
100
  exports.parameters = parameters;
File without changes
@@ -6,11 +6,9 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
6
6
 
7
7
  import "core-js/modules/es.array.concat.js";
8
8
  import "core-js/modules/es.object.assign.js";
9
- import "core-js/modules/es.function.name.js";
10
- import "core-js/modules/es.regexp.exec.js";
11
- import "core-js/modules/es.string.match.js";
12
9
  import "core-js/modules/es.array.filter.js";
13
10
  import "core-js/modules/es.object.to-string.js";
11
+ import "core-js/modules/es.regexp.exec.js";
14
12
  import "core-js/modules/es.regexp.to-string.js";
15
13
  import "core-js/modules/es.regexp.constructor.js";
16
14
  import "core-js/modules/es.symbol.js";
@@ -21,6 +19,7 @@ import "core-js/modules/es.string.iterator.js";
21
19
  import "core-js/modules/web.dom-collections.iterator.js";
22
20
  import "core-js/modules/es.array.from.js";
23
21
  import "core-js/modules/es.array.slice.js";
22
+ import "core-js/modules/es.function.name.js";
24
23
  import "core-js/modules/es.promise.js";
25
24
 
26
25
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
@@ -72,10 +71,6 @@ function _webpack() {
72
71
 
73
72
  var webpackConfig,
74
73
  options,
75
- _yield$options$preset,
76
- _yield$options$preset2,
77
- builder,
78
- builderName,
79
74
  resolvedBabelLoader,
80
75
  _webpackConfig$module,
81
76
  module,
@@ -101,17 +96,7 @@ function _webpack() {
101
96
  case 0:
102
97
  webpackConfig = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
103
98
  options = _args.length > 1 ? _args[1] : undefined;
104
- _context.next = 4;
105
- return options.presets.apply('core', {});
106
-
107
- case 4:
108
- _yield$options$preset = _context.sent;
109
- _yield$options$preset2 = _yield$options$preset.builder;
110
- builder = _yield$options$preset2 === void 0 ? 'webpack4' : _yield$options$preset2;
111
- builderName = typeof builder === 'string' ? builder : builder.name;
112
- resolvedBabelLoader = require.resolve('babel-loader', {
113
- paths: builderName.match(/^webpack(4|5)$/) ? [require.resolve("@storybook/builder-".concat(builderName))] : [builderName]
114
- });
99
+ resolvedBabelLoader = require.resolve('babel-loader');
115
100
  _webpackConfig$module = webpackConfig.module, module = _webpackConfig$module === void 0 ? {} : _webpackConfig$module; // it will reuse babel options that are already in use in storybook
116
101
  // also, these babel options are chained with other presets.
117
102
 
@@ -201,7 +186,7 @@ function _webpack() {
201
186
  });
202
187
  return _context.abrupt("return", result);
203
188
 
204
- case 20:
189
+ case 14:
205
190
  case "end":
206
191
  return _context.stop();
207
192
  }
@@ -8,7 +8,6 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
8
8
 
9
9
  export var parameters = {
10
10
  docs: {
11
- inlineStories: false,
12
11
  getContainer: function () {
13
12
  var _getContainer = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
14
13
  return regeneratorRuntime.wrap(function _callee$(_context) {
@@ -16,7 +15,7 @@ export var parameters = {
16
15
  switch (_context.prev = _context.next) {
17
16
  case 0:
18
17
  _context.next = 2;
19
- return import('../../blocks');
18
+ return import('./blocks');
20
19
 
21
20
  case 2:
22
21
  return _context.abrupt("return", _context.sent.DocsContainer);
@@ -42,7 +41,7 @@ export var parameters = {
42
41
  switch (_context2.prev = _context2.next) {
43
42
  case 0:
44
43
  _context2.next = 2;
45
- return import('../../blocks');
44
+ return import('./blocks');
46
45
 
47
46
  case 2:
48
47
  return _context2.abrupt("return", _context2.sent.DocsPage);
@@ -60,7 +59,6 @@ export var parameters = {
60
59
  }
61
60
 
62
61
  return getPage;
63
- }(),
64
- iframeHeight: 100
62
+ }()
65
63
  }
66
64
  };
File without changes
@@ -29,14 +29,7 @@ function createBabelOptions({
29
29
  export async function webpack(webpackConfig = {}, options) {
30
30
  var _global$FEATURES, _global$FEATURES2;
31
31
 
32
- const {
33
- builder = 'webpack4'
34
- } = await options.presets.apply('core', {});
35
- const builderName = typeof builder === 'string' ? builder : builder.name;
36
-
37
- const resolvedBabelLoader = require.resolve('babel-loader', {
38
- paths: builderName.match(/^webpack(4|5)$/) ? [require.resolve(`@storybook/builder-${builderName}`)] : [builderName]
39
- });
32
+ const resolvedBabelLoader = require.resolve('babel-loader');
40
33
 
41
34
  const {
42
35
  module = {}
@@ -0,0 +1,6 @@
1
+ export const parameters = {
2
+ docs: {
3
+ getContainer: async () => (await import('./blocks')).DocsContainer,
4
+ getPage: async () => (await import('./blocks')).DocsPage
5
+ }
6
+ };
File without changes
@@ -1,8 +1,6 @@
1
- export declare const parameters: {
2
- docs: {
3
- inlineStories: boolean;
4
- getContainer: () => Promise<import("react").FunctionComponent<import("../../blocks").DocsContainerProps<import("@storybook/csf").AnyFramework>>>;
5
- getPage: () => Promise<import("react").FC<{}>>;
6
- iframeHeight: number;
7
- };
8
- };
1
+ export declare const parameters: {
2
+ docs: {
3
+ getContainer: () => Promise<import("react").FunctionComponent<import("./blocks").DocsContainerProps<import("@storybook/csf").AnyFramework>>>;
4
+ getPage: () => Promise<import("react").FC<{}>>;
5
+ };
6
+ };
File without changes
@@ -1,8 +1,6 @@
1
- export declare const parameters: {
2
- docs: {
3
- inlineStories: boolean;
4
- getContainer: () => Promise<import("react").FunctionComponent<import("../../blocks").DocsContainerProps<import("@storybook/csf").AnyFramework>>>;
5
- getPage: () => Promise<import("react").FC<{}>>;
6
- iframeHeight: number;
7
- };
8
- };
1
+ export declare const parameters: {
2
+ docs: {
3
+ getContainer: () => Promise<import("react").FunctionComponent<import("./blocks").DocsContainerProps<import("@storybook/csf").AnyFramework>>>;
4
+ getPage: () => Promise<import("react").FC<{}>>;
5
+ };
6
+ };
package/manager.js ADDED
@@ -0,0 +1 @@
1
+ import './dist/esm/manager';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-docs",
3
- "version": "6.5.0-alpha.51",
3
+ "version": "6.5.0-alpha.54",
4
4
  "description": "Document component usage and properties in Markdown",
5
5
  "keywords": [
6
6
  "addon",
@@ -59,24 +59,26 @@
59
59
  "@babel/preset-env": "^7.12.11",
60
60
  "@jest/transform": "^26.6.2",
61
61
  "@mdx-js/react": "^1.6.22",
62
- "@storybook/addons": "6.5.0-alpha.51",
63
- "@storybook/api": "6.5.0-alpha.51",
64
- "@storybook/components": "6.5.0-alpha.51",
65
- "@storybook/core-common": "6.5.0-alpha.51",
66
- "@storybook/core-events": "6.5.0-alpha.51",
62
+ "@storybook/addons": "6.5.0-alpha.54",
63
+ "@storybook/api": "6.5.0-alpha.54",
64
+ "@storybook/components": "6.5.0-alpha.54",
65
+ "@storybook/core-common": "6.5.0-alpha.54",
66
+ "@storybook/core-events": "6.5.0-alpha.54",
67
67
  "@storybook/csf": "0.0.2--canary.507502b.0",
68
- "@storybook/docs-tools": "6.5.0-alpha.51",
68
+ "@storybook/docs-tools": "6.5.0-alpha.54",
69
69
  "@storybook/mdx1-csf": "canary",
70
- "@storybook/node-logger": "6.5.0-alpha.51",
71
- "@storybook/postinstall": "6.5.0-alpha.51",
72
- "@storybook/preview-web": "6.5.0-alpha.51",
73
- "@storybook/source-loader": "6.5.0-alpha.51",
74
- "@storybook/store": "6.5.0-alpha.51",
75
- "@storybook/theming": "6.5.0-alpha.51",
70
+ "@storybook/node-logger": "6.5.0-alpha.54",
71
+ "@storybook/postinstall": "6.5.0-alpha.54",
72
+ "@storybook/preview-web": "6.5.0-alpha.54",
73
+ "@storybook/source-loader": "6.5.0-alpha.54",
74
+ "@storybook/store": "6.5.0-alpha.54",
75
+ "@storybook/theming": "6.5.0-alpha.54",
76
+ "babel-loader": "^8.0.0",
76
77
  "core-js": "^3.8.2",
77
78
  "fast-deep-equal": "^3.1.3",
78
79
  "global": "^4.4.0",
79
80
  "lodash": "^4.17.21",
81
+ "regenerator-runtime": "^0.13.7",
80
82
  "remark-external-links": "^8.0.0",
81
83
  "remark-slug": "^6.0.0",
82
84
  "ts-dedent": "^2.0.0",
@@ -85,23 +87,14 @@
85
87
  "devDependencies": {
86
88
  "@babel/core": "^7.12.10",
87
89
  "@storybook/mdx2-csf": "canary",
88
- "@types/util-deprecate": "^1.0.0",
89
- "babel-loader": "^8.0.0",
90
- "webpack": "4"
90
+ "@types/util-deprecate": "^1.0.0"
91
91
  },
92
92
  "peerDependencies": {
93
93
  "@storybook/mdx2-csf": "*",
94
- "react": "^16.8.0 || ^17.0.0",
95
- "react-dom": "^16.8.0 || ^17.0.0",
96
- "webpack": "*"
94
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
95
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
97
96
  },
98
97
  "peerDependenciesMeta": {
99
- "@storybook/builder-webpack4": {
100
- "optional": true
101
- },
102
- "@storybook/builder-webpack5": {
103
- "optional": true
104
- },
105
98
  "@storybook/mdx2-csf": {
106
99
  "optional": true
107
100
  },
@@ -110,15 +103,12 @@
110
103
  },
111
104
  "react-dom": {
112
105
  "optional": true
113
- },
114
- "webpack": {
115
- "optional": true
116
106
  }
117
107
  },
118
108
  "publishConfig": {
119
109
  "access": "public"
120
110
  },
121
- "gitHead": "cfcdc7fb74d3cf60eae8dd0b5a626d67ed180d42",
111
+ "gitHead": "2048f366e90e668c3f462d81f5b372a19902b67f",
122
112
  "sbmodern": "dist/modern/index.js",
123
113
  "storybook": {
124
114
  "displayName": "Docs",
package/preset.js CHANGED
@@ -1,16 +1 @@
1
- const { findDistEsm } = require('@storybook/core-common');
2
- const { webpack } = require('./dist/cjs/frameworks/common/preset');
3
-
4
- function managerEntries(entry = [], options) {
5
- return [...entry, findDistEsm(__dirname, 'register')];
6
- }
7
-
8
- function config(entry = [], options = {}) {
9
- return [findDistEsm(__dirname, 'frameworks/common/config'), ...entry];
10
- }
11
-
12
- module.exports = {
13
- webpack,
14
- managerEntries,
15
- config,
16
- };
1
+ module.exports = require('./dist/cjs/preset');
package/preview.js ADDED
@@ -0,0 +1 @@
1
+ export * from './dist/esm/preview';
package/register.js CHANGED
@@ -1,2 +1,6 @@
1
- /* eslint-disable import/extensions */
2
- require('./dist/esm/register.js');
1
+ import { once } from '@storybook/client-logger';
2
+ import './manager';
3
+
4
+ once.warn(
5
+ 'register.js is deprecated see https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-registerjs'
6
+ );
@@ -1,8 +0,0 @@
1
- export const parameters = {
2
- docs: {
3
- inlineStories: false,
4
- getContainer: async () => (await import('../../blocks')).DocsContainer,
5
- getPage: async () => (await import('../../blocks')).DocsPage,
6
- iframeHeight: 100
7
- }
8
- };