@storybook/addon-essentials 6.4.0-beta.23 → 6.4.0-beta.24

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-essentials",
3
- "version": "6.4.0-beta.23",
3
+ "version": "6.4.0-beta.24",
4
4
  "description": "Curated addons to bring out the best of Storybook",
5
5
  "keywords": [
6
6
  "addon",
@@ -39,31 +39,31 @@
39
39
  "prepare": "node ../../scripts/prepare.js"
40
40
  },
41
41
  "dependencies": {
42
- "@storybook/addon-actions": "6.4.0-beta.23",
43
- "@storybook/addon-backgrounds": "6.4.0-beta.23",
44
- "@storybook/addon-controls": "6.4.0-beta.23",
45
- "@storybook/addon-docs": "6.4.0-beta.23",
46
- "@storybook/addon-measure": "6.4.0-beta.23",
47
- "@storybook/addon-outline": "6.4.0-beta.23",
48
- "@storybook/addon-toolbars": "6.4.0-beta.23",
49
- "@storybook/addon-viewport": "6.4.0-beta.23",
50
- "@storybook/addons": "6.4.0-beta.23",
51
- "@storybook/api": "6.4.0-beta.23",
52
- "@storybook/node-logger": "6.4.0-beta.23",
42
+ "@storybook/addon-actions": "6.4.0-beta.24",
43
+ "@storybook/addon-backgrounds": "6.4.0-beta.24",
44
+ "@storybook/addon-controls": "6.4.0-beta.24",
45
+ "@storybook/addon-docs": "6.4.0-beta.24",
46
+ "@storybook/addon-measure": "6.4.0-beta.24",
47
+ "@storybook/addon-outline": "6.4.0-beta.24",
48
+ "@storybook/addon-toolbars": "6.4.0-beta.24",
49
+ "@storybook/addon-viewport": "6.4.0-beta.24",
50
+ "@storybook/addons": "6.4.0-beta.24",
51
+ "@storybook/api": "6.4.0-beta.24",
52
+ "@storybook/node-logger": "6.4.0-beta.24",
53
53
  "core-js": "^3.8.2",
54
54
  "regenerator-runtime": "^0.13.7",
55
55
  "ts-dedent": "^2.0.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@babel/core": "^7.12.10",
59
- "@storybook/vue": "6.4.0-beta.23",
59
+ "@storybook/vue": "6.4.0-beta.24",
60
60
  "@types/jest": "^26.0.16",
61
61
  "@types/webpack-env": "^1.16.0"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@babel/core": "^7.9.6",
65
- "@storybook/vue": "6.4.0-beta.23",
66
- "@storybook/web-components": "6.4.0-beta.23",
65
+ "@storybook/vue": "6.4.0-beta.24",
66
+ "@storybook/web-components": "6.4.0-beta.24",
67
67
  "babel-loader": "^8.0.0",
68
68
  "lit-html": "^1.4.1 || ^2.0.0-rc.3",
69
69
  "react": "^16.8.0 || ^17.0.0",
@@ -93,6 +93,6 @@
93
93
  "publishConfig": {
94
94
  "access": "public"
95
95
  },
96
- "gitHead": "34dd760d275faabff6855b84bb64bb69adc1ec1a",
96
+ "gitHead": "f53ba4d7210b5c4809d57c74d7a42314172aa63e",
97
97
  "sbmodern": "dist/modern/index.js"
98
98
  }
package/dist/cjs/index.js DELETED
@@ -1,107 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- require("core-js/modules/es.weak-map.js");
6
-
7
- require("core-js/modules/es.object.to-string.js");
8
-
9
- require("core-js/modules/es.string.iterator.js");
10
-
11
- require("core-js/modules/es.array.iterator.js");
12
-
13
- require("core-js/modules/web.dom-collections.iterator.js");
14
-
15
- require("core-js/modules/es.object.get-own-property-descriptor.js");
16
-
17
- require("core-js/modules/es.symbol.js");
18
-
19
- require("core-js/modules/es.symbol.description.js");
20
-
21
- require("core-js/modules/es.symbol.iterator.js");
22
-
23
- Object.defineProperty(exports, "__esModule", {
24
- value: true
25
- });
26
- exports.addons = addons;
27
-
28
- require("core-js/modules/es.array.join.js");
29
-
30
- require("core-js/modules/es.array.find.js");
31
-
32
- require("core-js/modules/es.function.name.js");
33
-
34
- require("core-js/modules/es.string.starts-with.js");
35
-
36
- require("core-js/modules/es.array.map.js");
37
-
38
- require("core-js/modules/es.array.filter.js");
39
-
40
- var _path = _interopRequireWildcard(require("path"));
41
-
42
- var _nodeLogger = require("@storybook/node-logger");
43
-
44
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
45
-
46
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
47
-
48
- var requireMain = function requireMain(configDir) {
49
- var main = {};
50
- var absoluteConfigDir = _path.default.isAbsolute(configDir) ? configDir : _path.default.join(process.cwd(), configDir);
51
-
52
- var mainFile = _path.default.join(absoluteConfigDir, 'main');
53
-
54
- try {
55
- // eslint-disable-next-line global-require,import/no-dynamic-require
56
- main = require(mainFile);
57
- } catch (err) {
58
- _nodeLogger.logger.warn("Unable to find main.js: ".concat(mainFile));
59
- }
60
-
61
- return main;
62
- };
63
-
64
- function addons() {
65
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
66
-
67
- var checkInstalled = function checkInstalled(addon, main) {
68
- var _main$addons;
69
-
70
- var existingAddon = (_main$addons = main.addons) === null || _main$addons === void 0 ? void 0 : _main$addons.find(function (entry) {
71
- var name = typeof entry === 'string' ? entry : entry.name;
72
- return name === null || name === void 0 ? void 0 : name.startsWith(addon);
73
- });
74
-
75
- if (existingAddon) {
76
- _nodeLogger.logger.info("Found existing addon ".concat(JSON.stringify(existingAddon), ", skipping."));
77
- }
78
-
79
- return !!existingAddon;
80
- };
81
-
82
- var main = requireMain(options.configDir);
83
- return ['docs', 'controls', 'actions', 'backgrounds', 'viewport', 'toolbars', 'measure', 'outline'].filter(function (key) {
84
- return options[key] !== false;
85
- }).map(function (key) {
86
- return "@storybook/addon-".concat(key);
87
- }).filter(function (addon) {
88
- return !checkInstalled(addon, main);
89
- }) // Use `require.resolve` to ensure Yarn PnP compatibility
90
- // Files of various addons should be resolved in the context of `addon-essentials` as they are listed as deps here
91
- // and not in `@storybook/core` nor in SB user projects. If `@storybook/core` make the require itself Yarn 2 will
92
- // throw an error saying that the package to require must be added as a dependency. Doing `require.resolve` will
93
- // allow `@storybook/core` to work with absolute path directly, no more require of dep no more issue.
94
- // File to load can be `preset.js`, `register.js`, or the package entry point, so we need to check all these cases
95
- // as it's done in `lib/core/src/server/presets.js`.
96
- .map(function (addon) {
97
- try {
98
- return require.resolve((0, _path.join)(addon, 'preset')); // eslint-disable-next-line no-empty
99
- } catch (err) {}
100
-
101
- try {
102
- return require.resolve((0, _path.join)(addon, 'register')); // eslint-disable-next-line no-empty
103
- } catch (err) {}
104
-
105
- return require.resolve(addon);
106
- });
107
- }
@@ -1 +0,0 @@
1
- "use strict";
package/dist/esm/index.js DELETED
@@ -1,68 +0,0 @@
1
- import "core-js/modules/es.array.join.js";
2
- import "core-js/modules/es.array.find.js";
3
- import "core-js/modules/es.function.name.js";
4
- import "core-js/modules/es.string.starts-with.js";
5
- import "core-js/modules/es.array.map.js";
6
- import "core-js/modules/es.array.filter.js";
7
- import path, { join } from 'path';
8
- import { logger } from '@storybook/node-logger';
9
-
10
- var requireMain = function requireMain(configDir) {
11
- var main = {};
12
- var absoluteConfigDir = path.isAbsolute(configDir) ? configDir : path.join(process.cwd(), configDir);
13
- var mainFile = path.join(absoluteConfigDir, 'main');
14
-
15
- try {
16
- // eslint-disable-next-line global-require,import/no-dynamic-require
17
- main = require(mainFile);
18
- } catch (err) {
19
- logger.warn("Unable to find main.js: ".concat(mainFile));
20
- }
21
-
22
- return main;
23
- };
24
-
25
- export function addons() {
26
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
27
-
28
- var checkInstalled = function checkInstalled(addon, main) {
29
- var _main$addons;
30
-
31
- var existingAddon = (_main$addons = main.addons) === null || _main$addons === void 0 ? void 0 : _main$addons.find(function (entry) {
32
- var name = typeof entry === 'string' ? entry : entry.name;
33
- return name === null || name === void 0 ? void 0 : name.startsWith(addon);
34
- });
35
-
36
- if (existingAddon) {
37
- logger.info("Found existing addon ".concat(JSON.stringify(existingAddon), ", skipping."));
38
- }
39
-
40
- return !!existingAddon;
41
- };
42
-
43
- var main = requireMain(options.configDir);
44
- return ['docs', 'controls', 'actions', 'backgrounds', 'viewport', 'toolbars', 'measure', 'outline'].filter(function (key) {
45
- return options[key] !== false;
46
- }).map(function (key) {
47
- return "@storybook/addon-".concat(key);
48
- }).filter(function (addon) {
49
- return !checkInstalled(addon, main);
50
- }) // Use `require.resolve` to ensure Yarn PnP compatibility
51
- // Files of various addons should be resolved in the context of `addon-essentials` as they are listed as deps here
52
- // and not in `@storybook/core` nor in SB user projects. If `@storybook/core` make the require itself Yarn 2 will
53
- // throw an error saying that the package to require must be added as a dependency. Doing `require.resolve` will
54
- // allow `@storybook/core` to work with absolute path directly, no more require of dep no more issue.
55
- // File to load can be `preset.js`, `register.js`, or the package entry point, so we need to check all these cases
56
- // as it's done in `lib/core/src/server/presets.js`.
57
- .map(function (addon) {
58
- try {
59
- return require.resolve(join(addon, 'preset')); // eslint-disable-next-line no-empty
60
- } catch (err) {}
61
-
62
- try {
63
- return require.resolve(join(addon, 'register')); // eslint-disable-next-line no-empty
64
- } catch (err) {}
65
-
66
- return require.resolve(addon);
67
- });
68
- }
File without changes
@@ -1,54 +0,0 @@
1
- import path, { join } from 'path';
2
- import { logger } from '@storybook/node-logger';
3
-
4
- const requireMain = configDir => {
5
- let main = {};
6
- const absoluteConfigDir = path.isAbsolute(configDir) ? configDir : path.join(process.cwd(), configDir);
7
- const mainFile = path.join(absoluteConfigDir, 'main');
8
-
9
- try {
10
- // eslint-disable-next-line global-require,import/no-dynamic-require
11
- main = require(mainFile);
12
- } catch (err) {
13
- logger.warn(`Unable to find main.js: ${mainFile}`);
14
- }
15
-
16
- return main;
17
- };
18
-
19
- export function addons(options = {}) {
20
- const checkInstalled = (addon, main) => {
21
- var _main$addons;
22
-
23
- const existingAddon = (_main$addons = main.addons) === null || _main$addons === void 0 ? void 0 : _main$addons.find(entry => {
24
- const name = typeof entry === 'string' ? entry : entry.name;
25
- return name === null || name === void 0 ? void 0 : name.startsWith(addon);
26
- });
27
-
28
- if (existingAddon) {
29
- logger.info(`Found existing addon ${JSON.stringify(existingAddon)}, skipping.`);
30
- }
31
-
32
- return !!existingAddon;
33
- };
34
-
35
- const main = requireMain(options.configDir);
36
- return ['docs', 'controls', 'actions', 'backgrounds', 'viewport', 'toolbars', 'measure', 'outline'].filter(key => options[key] !== false).map(key => `@storybook/addon-${key}`).filter(addon => !checkInstalled(addon, main)) // Use `require.resolve` to ensure Yarn PnP compatibility
37
- // Files of various addons should be resolved in the context of `addon-essentials` as they are listed as deps here
38
- // and not in `@storybook/core` nor in SB user projects. If `@storybook/core` make the require itself Yarn 2 will
39
- // throw an error saying that the package to require must be added as a dependency. Doing `require.resolve` will
40
- // allow `@storybook/core` to work with absolute path directly, no more require of dep no more issue.
41
- // File to load can be `preset.js`, `register.js`, or the package entry point, so we need to check all these cases
42
- // as it's done in `lib/core/src/server/presets.js`.
43
- .map(addon => {
44
- try {
45
- return require.resolve(join(addon, 'preset')); // eslint-disable-next-line no-empty
46
- } catch (err) {}
47
-
48
- try {
49
- return require.resolve(join(addon, 'register')); // eslint-disable-next-line no-empty
50
- } catch (err) {}
51
-
52
- return require.resolve(addon);
53
- });
54
- }
File without changes
@@ -1,8 +0,0 @@
1
- interface PresetOptions {
2
- configDir?: string;
3
- backgrounds?: any;
4
- viewport?: any;
5
- docs?: any;
6
- }
7
- export declare function addons(options?: PresetOptions): string[];
8
- export {};
@@ -1,8 +0,0 @@
1
- interface PresetOptions {
2
- configDir?: string;
3
- backgrounds?: any;
4
- viewport?: any;
5
- docs?: any;
6
- }
7
- export declare function addons(options?: PresetOptions): string[];
8
- export {};