@storybook/addon-essentials 7.0.0-alpha.8 → 7.0.0-beta.0
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/README.md +8 -6
- package/dist/actions/manager.d.ts +1 -0
- package/dist/actions/manager.js +1 -0
- package/dist/actions/manager.mjs +1 -0
- package/dist/actions/preview.d.ts +1 -0
- package/dist/actions/preview.js +1 -0
- package/dist/actions/preview.mjs +1 -0
- package/dist/backgrounds/manager.d.ts +1 -0
- package/dist/backgrounds/manager.js +1 -0
- package/dist/backgrounds/manager.mjs +1 -0
- package/dist/backgrounds/preview.d.ts +1 -0
- package/dist/backgrounds/preview.js +1 -0
- package/dist/backgrounds/preview.mjs +1 -0
- package/dist/controls/manager.d.ts +1 -0
- package/dist/controls/manager.js +1 -0
- package/dist/controls/manager.mjs +1 -0
- package/dist/docs/mdx-react-shim.d.ts +1 -0
- package/dist/docs/mdx-react-shim.js +1 -0
- package/dist/docs/mdx-react-shim.mjs +1 -0
- package/dist/docs/preset.d.ts +5 -0
- package/dist/docs/preset.js +1 -0
- package/dist/docs/preset.mjs +1 -0
- package/dist/docs/preview.d.ts +1 -0
- package/dist/docs/preview.js +1 -0
- package/dist/docs/preview.mjs +1 -0
- package/dist/highlight/preview.d.ts +1 -0
- package/dist/highlight/preview.js +1 -0
- package/dist/highlight/preview.mjs +1 -0
- package/dist/{types/index.d.ts → index.d.ts} +3 -2
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/dist/measure/manager.d.ts +1 -0
- package/dist/measure/manager.js +1 -0
- package/dist/measure/manager.mjs +1 -0
- package/dist/measure/preview.d.ts +1 -0
- package/dist/measure/preview.js +1 -0
- package/dist/measure/preview.mjs +1 -0
- package/dist/outline/manager.d.ts +1 -0
- package/dist/outline/manager.js +1 -0
- package/dist/outline/manager.mjs +1 -0
- package/dist/outline/preview.d.ts +1 -0
- package/dist/outline/preview.js +1 -0
- package/dist/outline/preview.mjs +1 -0
- package/dist/toolbars/manager.d.ts +1 -0
- package/dist/toolbars/manager.js +1 -0
- package/dist/toolbars/manager.mjs +1 -0
- package/dist/viewport/manager.d.ts +1 -0
- package/dist/viewport/manager.js +1 -0
- package/dist/viewport/manager.mjs +1 -0
- package/package.json +128 -62
- package/LICENSE +0 -21
- package/dist/cjs/index.js +0 -55
- package/dist/esm/index.js +0 -40
package/README.md
CHANGED
|
@@ -8,12 +8,14 @@ Each addon is documented and maintained by the core team and will be upgraded al
|
|
|
8
8
|
|
|
9
9
|
Storybook essentials includes the following addons. Addons can be disabled and re-configured as [described below](#configuration):
|
|
10
10
|
|
|
11
|
-
- [Actions](https://github.com/storybookjs/storybook/tree/next/addons/actions)
|
|
12
|
-
- [Backgrounds](https://github.com/storybookjs/storybook/tree/next/addons/backgrounds)
|
|
13
|
-
- [Controls](https://github.com/storybookjs/storybook/tree/next/addons/controls)
|
|
14
|
-
- [Docs](https://github.com/storybookjs/storybook/tree/next/addons/docs)
|
|
15
|
-
- [Viewport](https://github.com/storybookjs/storybook/tree/next/addons/viewport)
|
|
16
|
-
- [Toolbars](https://github.com/storybookjs/storybook/tree/next/addons/toolbars)
|
|
11
|
+
- [Actions](https://github.com/storybookjs/storybook/tree/next/code/addons/actions)
|
|
12
|
+
- [Backgrounds](https://github.com/storybookjs/storybook/tree/next/code/addons/backgrounds)
|
|
13
|
+
- [Controls](https://github.com/storybookjs/storybook/tree/next/code/addons/controls)
|
|
14
|
+
- [Docs](https://github.com/storybookjs/storybook/tree/next/code/addons/docs)
|
|
15
|
+
- [Viewport](https://github.com/storybookjs/storybook/tree/next/code/addons/viewport)
|
|
16
|
+
- [Toolbars](https://github.com/storybookjs/storybook/tree/next/code/addons/toolbars)
|
|
17
|
+
- [Measure](https://github.com/storybookjs/storybook/tree/next/code/addons/measure)
|
|
18
|
+
- [Outline](https://github.com/storybookjs/storybook/tree/next/code/addons/outline)
|
|
17
19
|
|
|
18
20
|
## Installation
|
|
19
21
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@storybook/addon-actions/manager';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@storybook/addon-actions/manager"),module.exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-actions/manager";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@storybook/addon-actions/preview';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@storybook/addon-actions/preview"),module.exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-actions/preview";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@storybook/addon-backgrounds/manager';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@storybook/addon-backgrounds/manager"),module.exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-backgrounds/manager";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@storybook/addon-backgrounds/preview';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@storybook/addon-backgrounds/preview"),module.exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-backgrounds/preview";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@storybook/addon-controls/manager';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@storybook/addon-controls/manager"),module.exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-controls/manager";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@storybook/addon-docs/dist/shims/mdx-react-shim';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@storybook/addon-docs/dist/shims/mdx-react-shim"),module.exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-docs/dist/shims/mdx-react-shim";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var c=(o,r)=>{for(var e in r)n(o,e,{get:r[e],enumerable:!0})},m=(o,r,e,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of i(r))!x.call(o,s)&&s!==e&&n(o,s,{get:()=>r[s],enumerable:!(p=a(r,s))||p.enumerable});return o},d=(o,r,e)=>(m(o,r,"default"),e&&m(e,r,"default"));var y=o=>m(n({},"__esModule",{value:!0}),o);var t={};c(t,{mdxLoaderOptions:()=>l});module.exports=y(t);d(t,require("@storybook/addon-docs/dist/preset"),module.exports);var l=async o=>(o.mdxCompileOptions.providerImportSource="@storybook/addon-essentials/docs/mdx-react-shim",o);0&&(module.exports={mdxLoaderOptions});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-docs/dist/preset";var mdxLoaderOptions=async config=>(config.mdxCompileOptions.providerImportSource="@storybook/addon-essentials/docs/mdx-react-shim",config);export{mdxLoaderOptions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@storybook/addon-docs/dist/preview';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@storybook/addon-docs/dist/preview"),module.exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-docs/dist/preview";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@storybook/addon-highlight/preview';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@storybook/addon-highlight/preview"),module.exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-highlight/preview";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var m=Object.create;var r=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var v=(o,n)=>{for(var t in n)r(o,t,{get:n[t],enumerable:!0})},g=(o,n,t,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let e of h(n))!y.call(o,e)&&e!==t&&r(o,e,{get:()=>n[e],enumerable:!(s=p(n,e))||s.enumerable});return o};var w=(o,n,t)=>(t=o!=null?m(k(o)):{},g(n||!o||!o.__esModule?r(t,"default",{value:o,enumerable:!0}):t,o)),x=o=>g(r({},"__esModule",{value:!0}),o);var j={};v(j,{addons:()=>$});module.exports=x(j);var i=w(require("path")),u=require("@storybook/node-logger"),b=require("@storybook/core-common"),O=o=>{let n=i.default.isAbsolute(o)?o:i.default.join(process.cwd(),o),t=i.default.join(n,"main");return(0,b.serverRequire)(t)??{}};function $(o){let n=(s,e)=>{var d;let f=`@storybook/addon-${s}`,a=(d=e.addons)==null?void 0:d.find(l=>{let c=typeof l=="string"?l:l.name;return c==null?void 0:c.startsWith(f)});return a&&u.logger.info(`Found existing addon ${JSON.stringify(a)}, skipping.`),!!a},t=O(o.configDir);return["docs","controls","actions","backgrounds","viewport","toolbars","measure","outline","highlight"].filter(s=>o[s]!==!1).filter(s=>!n(s,t)).map(s=>`@storybook/addon-essentials/${s}`)}0&&(module.exports={addons});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import path from"path";import{logger}from"@storybook/node-logger";import{serverRequire}from"@storybook/core-common";var requireMain=configDir=>{let absoluteConfigDir=path.isAbsolute(configDir)?configDir:path.join(process.cwd(),configDir),mainFile=path.join(absoluteConfigDir,"main");return serverRequire(mainFile)??{}};function addons(options){let checkInstalled=(addonName,main2)=>{let addon=`@storybook/addon-${addonName}`,existingAddon=main2.addons?.find(entry=>(typeof entry=="string"?entry:entry.name)?.startsWith(addon));return existingAddon&&logger.info(`Found existing addon ${JSON.stringify(existingAddon)}, skipping.`),!!existingAddon},main=requireMain(options.configDir);return["docs","controls","actions","backgrounds","viewport","toolbars","measure","outline","highlight"].filter(key=>options[key]!==!1).filter(addon=>!checkInstalled(addon,main)).map(addon=>`@storybook/addon-essentials/${addon}`)}export{addons};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@storybook/addon-measure/manager';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@storybook/addon-measure/manager"),module.exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-measure/manager";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@storybook/addon-measure/preview';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@storybook/addon-measure/preview"),module.exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-measure/preview";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@storybook/addon-outline/manager';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@storybook/addon-outline/manager"),module.exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-outline/manager";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@storybook/addon-outline/preview';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@storybook/addon-outline/preview"),module.exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-outline/preview";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@storybook/addon-toolbars/manager';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@storybook/addon-toolbars/manager"),module.exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-toolbars/manager";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@storybook/addon-viewport/manager';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@storybook/addon-viewport/manager"),module.exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@storybook/addon-viewport/manager";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-essentials",
|
|
3
|
-
"version": "7.0.0-
|
|
3
|
+
"version": "7.0.0-beta.0",
|
|
4
4
|
"description": "Curated addons to bring out the best of Storybook",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"addon",
|
|
@@ -21,81 +21,147 @@
|
|
|
21
21
|
"url": "https://opencollective.com/storybook"
|
|
22
22
|
},
|
|
23
23
|
"license": "MIT",
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"require": "./dist/index.js",
|
|
27
|
+
"import": "./dist/index.mjs",
|
|
28
|
+
"types": "./dist/index.d.ts"
|
|
29
|
+
},
|
|
30
|
+
"./actions/preview": {
|
|
31
|
+
"require": "./dist/actions/preview.js",
|
|
32
|
+
"import": "./dist/actions/preview.mjs",
|
|
33
|
+
"types": "./dist/actions/preview.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./actions/manager": {
|
|
36
|
+
"require": "./dist/actions/manager.js",
|
|
37
|
+
"import": "./dist/actions/manager.mjs",
|
|
38
|
+
"types": "./dist/actions/manager.d.ts"
|
|
39
|
+
},
|
|
40
|
+
"./backgrounds/preview": {
|
|
41
|
+
"require": "./dist/backgrounds/preview.js",
|
|
42
|
+
"import": "./dist/backgrounds/preview.mjs",
|
|
43
|
+
"types": "./dist/backgrounds/preview.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"./backgrounds/manager": {
|
|
46
|
+
"require": "./dist/backgrounds/manager.js",
|
|
47
|
+
"import": "./dist/backgrounds/manager.mjs",
|
|
48
|
+
"types": "./dist/backgrounds/manager.d.ts"
|
|
49
|
+
},
|
|
50
|
+
"./controls/manager": {
|
|
51
|
+
"require": "./dist/controls/manager.js",
|
|
52
|
+
"import": "./dist/controls/manager.mjs",
|
|
53
|
+
"types": "./dist/controls/manager.d.ts"
|
|
54
|
+
},
|
|
55
|
+
"./docs/preview": {
|
|
56
|
+
"require": "./dist/docs/preview.js",
|
|
57
|
+
"import": "./dist/docs/preview.mjs",
|
|
58
|
+
"types": "./dist/docs/preview.d.ts"
|
|
59
|
+
},
|
|
60
|
+
"./docs/preset": {
|
|
61
|
+
"require": "./dist/docs/preset.js",
|
|
62
|
+
"import": "./dist/docs/preset.mjs",
|
|
63
|
+
"types": "./dist/docs/preset.d.ts"
|
|
64
|
+
},
|
|
65
|
+
"./docs/mdx-react-shim": {
|
|
66
|
+
"require": "./dist/docs/mdx-react-shim.js",
|
|
67
|
+
"import": "./dist/docs/mdx-react-shim.mjs",
|
|
68
|
+
"types": "./dist/docs/mdx-react-shim.d.ts"
|
|
69
|
+
},
|
|
70
|
+
"./highlight/preview": {
|
|
71
|
+
"require": "./dist/highlight/preview.js",
|
|
72
|
+
"import": "./dist/highlight/preview.mjs",
|
|
73
|
+
"types": "./dist/highlight/preview.d.ts"
|
|
74
|
+
},
|
|
75
|
+
"./measure/preview": {
|
|
76
|
+
"require": "./dist/measure/preview.js",
|
|
77
|
+
"import": "./dist/measure/preview.mjs",
|
|
78
|
+
"types": "./dist/measure/preview.d.ts"
|
|
79
|
+
},
|
|
80
|
+
"./measure/manager": {
|
|
81
|
+
"require": "./dist/measure/manager.js",
|
|
82
|
+
"import": "./dist/measure/manager.mjs",
|
|
83
|
+
"types": "./dist/measure/manager.d.ts"
|
|
84
|
+
},
|
|
85
|
+
"./outline/preview": {
|
|
86
|
+
"require": "./dist/outline/preview.js",
|
|
87
|
+
"import": "./dist/outline/preview.mjs",
|
|
88
|
+
"types": "./dist/outline/preview.d.ts"
|
|
89
|
+
},
|
|
90
|
+
"./outline/manager": {
|
|
91
|
+
"require": "./dist/outline/manager.js",
|
|
92
|
+
"import": "./dist/outline/manager.mjs",
|
|
93
|
+
"types": "./dist/outline/manager.d.ts"
|
|
94
|
+
},
|
|
95
|
+
"./toolbars/manager": {
|
|
96
|
+
"require": "./dist/toolbars/manager.js",
|
|
97
|
+
"import": "./dist/toolbars/manager.mjs",
|
|
98
|
+
"types": "./dist/toolbars/manager.d.ts"
|
|
99
|
+
},
|
|
100
|
+
"./viewport/manager": {
|
|
101
|
+
"require": "./dist/viewport/manager.js",
|
|
102
|
+
"import": "./dist/viewport/manager.mjs",
|
|
103
|
+
"types": "./dist/viewport/manager.d.ts"
|
|
104
|
+
},
|
|
105
|
+
"./package.json": "./package.json"
|
|
106
|
+
},
|
|
107
|
+
"main": "dist/index.js",
|
|
108
|
+
"module": "dist/index.mjs",
|
|
109
|
+
"types": "dist/index.d.ts",
|
|
27
110
|
"files": [
|
|
28
111
|
"dist/**/*",
|
|
29
112
|
"README.md"
|
|
30
113
|
],
|
|
31
114
|
"scripts": {
|
|
32
|
-
"
|
|
115
|
+
"check": "../../../scripts/node_modules/.bin/tsc --noEmit",
|
|
116
|
+
"prep": "../../../scripts/prepare/bundle.ts"
|
|
33
117
|
},
|
|
34
118
|
"dependencies": {
|
|
35
|
-
"@storybook/addon-actions": "7.0.0-
|
|
36
|
-
"@storybook/addon-backgrounds": "7.0.0-
|
|
37
|
-
"@storybook/addon-controls": "7.0.0-
|
|
38
|
-
"@storybook/addon-docs": "7.0.0-
|
|
39
|
-
"@storybook/addon-highlight": "7.0.0-
|
|
40
|
-
"@storybook/addon-measure": "7.0.0-
|
|
41
|
-
"@storybook/addon-outline": "7.0.0-
|
|
42
|
-
"@storybook/addon-toolbars": "7.0.0-
|
|
43
|
-
"@storybook/addon-viewport": "7.0.0-
|
|
44
|
-
"@storybook/
|
|
45
|
-
"@storybook/api": "7.0.0-
|
|
46
|
-
"@storybook/
|
|
47
|
-
"@storybook/
|
|
48
|
-
"core-js": "^3.8.2",
|
|
119
|
+
"@storybook/addon-actions": "7.0.0-beta.0",
|
|
120
|
+
"@storybook/addon-backgrounds": "7.0.0-beta.0",
|
|
121
|
+
"@storybook/addon-controls": "7.0.0-beta.0",
|
|
122
|
+
"@storybook/addon-docs": "7.0.0-beta.0",
|
|
123
|
+
"@storybook/addon-highlight": "7.0.0-beta.0",
|
|
124
|
+
"@storybook/addon-measure": "7.0.0-beta.0",
|
|
125
|
+
"@storybook/addon-outline": "7.0.0-beta.0",
|
|
126
|
+
"@storybook/addon-toolbars": "7.0.0-beta.0",
|
|
127
|
+
"@storybook/addon-viewport": "7.0.0-beta.0",
|
|
128
|
+
"@storybook/core-common": "7.0.0-beta.0",
|
|
129
|
+
"@storybook/manager-api": "7.0.0-beta.0",
|
|
130
|
+
"@storybook/node-logger": "7.0.0-beta.0",
|
|
131
|
+
"@storybook/preview-api": "7.0.0-beta.0",
|
|
49
132
|
"ts-dedent": "^2.0.0"
|
|
50
133
|
},
|
|
51
134
|
"devDependencies": {
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
54
|
-
"@types/jest": "^26.0.16"
|
|
135
|
+
"@storybook/vue": "7.0.0-beta.0",
|
|
136
|
+
"typescript": "^4.9.3"
|
|
55
137
|
},
|
|
56
138
|
"peerDependencies": {
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
"peerDependenciesMeta": {
|
|
60
|
-
"@storybook/angular": {
|
|
61
|
-
"optional": true
|
|
62
|
-
},
|
|
63
|
-
"@storybook/html": {
|
|
64
|
-
"optional": true
|
|
65
|
-
},
|
|
66
|
-
"@storybook/vue": {
|
|
67
|
-
"optional": true
|
|
68
|
-
},
|
|
69
|
-
"@storybook/vue3": {
|
|
70
|
-
"optional": true
|
|
71
|
-
},
|
|
72
|
-
"@storybook/web-components": {
|
|
73
|
-
"optional": true
|
|
74
|
-
},
|
|
75
|
-
"lit": {
|
|
76
|
-
"optional": true
|
|
77
|
-
},
|
|
78
|
-
"lit-html": {
|
|
79
|
-
"optional": true
|
|
80
|
-
},
|
|
81
|
-
"react": {
|
|
82
|
-
"optional": true
|
|
83
|
-
},
|
|
84
|
-
"react-dom": {
|
|
85
|
-
"optional": true
|
|
86
|
-
},
|
|
87
|
-
"svelte": {
|
|
88
|
-
"optional": true
|
|
89
|
-
},
|
|
90
|
-
"sveltedoc-parser": {
|
|
91
|
-
"optional": true
|
|
92
|
-
},
|
|
93
|
-
"vue": {
|
|
94
|
-
"optional": true
|
|
95
|
-
}
|
|
139
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
140
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
96
141
|
},
|
|
97
142
|
"publishConfig": {
|
|
98
143
|
"access": "public"
|
|
99
144
|
},
|
|
100
|
-
"
|
|
145
|
+
"bundler": {
|
|
146
|
+
"entries": [
|
|
147
|
+
"./src/index.ts",
|
|
148
|
+
"./src/actions/preview.ts",
|
|
149
|
+
"./src/actions/manager.ts",
|
|
150
|
+
"./src/backgrounds/preview.ts",
|
|
151
|
+
"./src/backgrounds/manager.ts",
|
|
152
|
+
"./src/controls/manager.ts",
|
|
153
|
+
"./src/docs/preview.ts",
|
|
154
|
+
"./src/docs/preset.ts",
|
|
155
|
+
"./src/docs/mdx-react-shim.ts",
|
|
156
|
+
"./src/highlight/preview.ts",
|
|
157
|
+
"./src/measure/preview.ts",
|
|
158
|
+
"./src/measure/manager.ts",
|
|
159
|
+
"./src/outline/preview.ts",
|
|
160
|
+
"./src/outline/manager.ts",
|
|
161
|
+
"./src/toolbars/manager.ts",
|
|
162
|
+
"./src/viewport/manager.ts"
|
|
163
|
+
],
|
|
164
|
+
"platform": "node"
|
|
165
|
+
},
|
|
166
|
+
"gitHead": "2e4ddde6a0a291266d91fe6a5ecda767bf119e70"
|
|
101
167
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017 Kadira Inc. <hello@kadira.io>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
package/dist/cjs/index.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.addons = addons;
|
|
7
|
-
|
|
8
|
-
var _path = _interopRequireWildcard(require("path"));
|
|
9
|
-
|
|
10
|
-
var _nodeLogger = require("@storybook/node-logger");
|
|
11
|
-
|
|
12
|
-
var _coreCommon = require("@storybook/core-common");
|
|
13
|
-
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
|
|
16
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
17
|
-
|
|
18
|
-
const requireMain = configDir => {
|
|
19
|
-
const absoluteConfigDir = _path.default.isAbsolute(configDir) ? configDir : _path.default.join(process.cwd(), configDir);
|
|
20
|
-
|
|
21
|
-
const mainFile = _path.default.join(absoluteConfigDir, 'main');
|
|
22
|
-
|
|
23
|
-
return (0, _coreCommon.serverRequire)(mainFile) ?? {};
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
function addons(options) {
|
|
27
|
-
const checkInstalled = (addon, main) => {
|
|
28
|
-
const existingAddon = main.addons?.find(entry => {
|
|
29
|
-
const name = typeof entry === 'string' ? entry : entry.name;
|
|
30
|
-
return name?.startsWith(addon);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
if (existingAddon) {
|
|
34
|
-
_nodeLogger.logger.info(`Found existing addon ${JSON.stringify(existingAddon)}, skipping.`);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return !!existingAddon;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const main = requireMain(options.configDir);
|
|
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
|
|
42
|
-
// Files of various addons should be resolved in the context of `addon-essentials` as they are listed as deps here
|
|
43
|
-
// and not in `@storybook/core` nor in SB user projects. If `@storybook/core` make the require itself Yarn 2 will
|
|
44
|
-
// throw an error saying that the package to require must be added as a dependency. Doing `require.resolve` will
|
|
45
|
-
// allow `@storybook/core` to work with absolute path directly, no more require of dep no more issue.
|
|
46
|
-
// File to load can be `preset.js`, `register.js`, or the package entry point, so we need to check all these cases
|
|
47
|
-
// as it's done in `lib/core/src/server/presets.js`.
|
|
48
|
-
.map(addon => {
|
|
49
|
-
try {
|
|
50
|
-
return (0, _path.dirname)(require.resolve((0, _path.join)(addon, 'package.json'))); // eslint-disable-next-line no-empty
|
|
51
|
-
} catch (err) {}
|
|
52
|
-
|
|
53
|
-
return require.resolve(addon);
|
|
54
|
-
});
|
|
55
|
-
}
|
package/dist/esm/index.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import path, { dirname, join } from 'path';
|
|
2
|
-
import { logger } from '@storybook/node-logger';
|
|
3
|
-
import { serverRequire } from '@storybook/core-common';
|
|
4
|
-
|
|
5
|
-
const requireMain = configDir => {
|
|
6
|
-
const absoluteConfigDir = path.isAbsolute(configDir) ? configDir : path.join(process.cwd(), configDir);
|
|
7
|
-
const mainFile = path.join(absoluteConfigDir, 'main');
|
|
8
|
-
return serverRequire(mainFile) ?? {};
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export function addons(options) {
|
|
12
|
-
const checkInstalled = (addon, main) => {
|
|
13
|
-
const existingAddon = main.addons?.find(entry => {
|
|
14
|
-
const name = typeof entry === 'string' ? entry : entry.name;
|
|
15
|
-
return name?.startsWith(addon);
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
if (existingAddon) {
|
|
19
|
-
logger.info(`Found existing addon ${JSON.stringify(existingAddon)}, skipping.`);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return !!existingAddon;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const main = requireMain(options.configDir);
|
|
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
|
-
// Files of various addons should be resolved in the context of `addon-essentials` as they are listed as deps here
|
|
28
|
-
// and not in `@storybook/core` nor in SB user projects. If `@storybook/core` make the require itself Yarn 2 will
|
|
29
|
-
// throw an error saying that the package to require must be added as a dependency. Doing `require.resolve` will
|
|
30
|
-
// allow `@storybook/core` to work with absolute path directly, no more require of dep no more issue.
|
|
31
|
-
// File to load can be `preset.js`, `register.js`, or the package entry point, so we need to check all these cases
|
|
32
|
-
// as it's done in `lib/core/src/server/presets.js`.
|
|
33
|
-
.map(addon => {
|
|
34
|
-
try {
|
|
35
|
-
return dirname(require.resolve(join(addon, 'package.json'))); // eslint-disable-next-line no-empty
|
|
36
|
-
} catch (err) {}
|
|
37
|
-
|
|
38
|
-
return require.resolve(addon);
|
|
39
|
-
});
|
|
40
|
-
}
|