@storybook/addon-essentials 7.0.0-alpha.4 → 7.0.0-alpha.7

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/dist/cjs/index.js CHANGED
@@ -25,11 +25,9 @@ const requireMain = configDir => {
25
25
 
26
26
  function addons(options) {
27
27
  const checkInstalled = (addon, main) => {
28
- var _main$addons;
29
-
30
- const existingAddon = (_main$addons = main.addons) === null || _main$addons === void 0 ? void 0 : _main$addons.find(entry => {
28
+ const existingAddon = main.addons?.find(entry => {
31
29
  const name = typeof entry === 'string' ? entry : entry.name;
32
- return name === null || name === void 0 ? void 0 : name.startsWith(addon);
30
+ return name?.startsWith(addon);
33
31
  });
34
32
 
35
33
  if (existingAddon) {
@@ -40,7 +38,7 @@ function addons(options) {
40
38
  };
41
39
 
42
40
  const main = requireMain(options.configDir);
43
- 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
41
+ return ['docs', 'controls', 'actions', 'backgrounds', 'viewport', 'toolbars', 'measure', 'outline', 'highlight'].filter(key => options[key] !== false).map(key => `@storybook/addon-${key}`).filter(addon => !checkInstalled(addon, main)) // Use `require.resolve` to ensure Yarn PnP compatibility
44
42
  // Files of various addons should be resolved in the context of `addon-essentials` as they are listed as deps here
45
43
  // and not in `@storybook/core` nor in SB user projects. If `@storybook/core` make the require itself Yarn 2 will
46
44
  // throw an error saying that the package to require must be added as a dependency. Doing `require.resolve` will
package/dist/esm/index.js CHANGED
@@ -23,7 +23,7 @@ export function addons(options) {
23
23
  };
24
24
 
25
25
  const main = requireMain(options.configDir);
26
- 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
26
+ return ['docs', 'controls', 'actions', 'backgrounds', 'viewport', 'toolbars', 'measure', 'outline', 'highlight'].filter(key => options[key] !== false).map(key => `@storybook/addon-${key}`).filter(addon => !checkInstalled(addon, main)) // Use `require.resolve` to ensure Yarn PnP compatibility
27
27
  // Files of various addons should be resolved in the context of `addon-essentials` as they are listed as deps here
28
28
  // and not in `@storybook/core` nor in SB user projects. If `@storybook/core` make the require itself Yarn 2 will
29
29
  // throw an error saying that the package to require must be added as a dependency. Doing `require.resolve` will
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-essentials",
3
- "version": "7.0.0-alpha.4",
3
+ "version": "7.0.0-alpha.7",
4
4
  "description": "Curated addons to bring out the best of Storybook",
5
5
  "keywords": [
6
6
  "addon",
@@ -32,24 +32,25 @@
32
32
  "prepare": "node ../../scripts/prepare.js"
33
33
  },
34
34
  "dependencies": {
35
- "@storybook/addon-actions": "7.0.0-alpha.4",
36
- "@storybook/addon-backgrounds": "7.0.0-alpha.4",
37
- "@storybook/addon-controls": "7.0.0-alpha.4",
38
- "@storybook/addon-docs": "7.0.0-alpha.4",
39
- "@storybook/addon-measure": "7.0.0-alpha.4",
40
- "@storybook/addon-outline": "7.0.0-alpha.4",
41
- "@storybook/addon-toolbars": "7.0.0-alpha.4",
42
- "@storybook/addon-viewport": "7.0.0-alpha.4",
43
- "@storybook/addons": "7.0.0-alpha.4",
44
- "@storybook/api": "7.0.0-alpha.4",
45
- "@storybook/core-common": "7.0.0-alpha.4",
46
- "@storybook/node-logger": "7.0.0-alpha.4",
35
+ "@storybook/addon-actions": "7.0.0-alpha.7",
36
+ "@storybook/addon-backgrounds": "7.0.0-alpha.7",
37
+ "@storybook/addon-controls": "7.0.0-alpha.7",
38
+ "@storybook/addon-docs": "7.0.0-alpha.7",
39
+ "@storybook/addon-highlight": "7.0.0-alpha.7",
40
+ "@storybook/addon-measure": "7.0.0-alpha.7",
41
+ "@storybook/addon-outline": "7.0.0-alpha.7",
42
+ "@storybook/addon-toolbars": "7.0.0-alpha.7",
43
+ "@storybook/addon-viewport": "7.0.0-alpha.7",
44
+ "@storybook/addons": "7.0.0-alpha.7",
45
+ "@storybook/api": "7.0.0-alpha.7",
46
+ "@storybook/core-common": "7.0.0-alpha.7",
47
+ "@storybook/node-logger": "7.0.0-alpha.7",
47
48
  "core-js": "^3.8.2",
48
49
  "ts-dedent": "^2.0.0"
49
50
  },
50
51
  "devDependencies": {
51
52
  "@babel/core": "^7.12.10",
52
- "@storybook/vue": "7.0.0-alpha.4",
53
+ "@storybook/vue": "7.0.0-alpha.7",
53
54
  "@types/jest": "^26.0.16"
54
55
  },
55
56
  "peerDependencies": {
@@ -96,5 +97,5 @@
96
97
  "publishConfig": {
97
98
  "access": "public"
98
99
  },
99
- "gitHead": "006ed54452dd7c37a8cbe91a84f5312182f7ca00"
100
+ "gitHead": "d334cabd251cd0ed8b845a87707dc84f007d4074"
100
101
  }