@storybook/preset-react-webpack 7.0.0-alpha.16 → 7.0.0-alpha.19
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/chunk-JVA5Y325.mjs +1 -0
- package/dist/framework-preset-cra.js +1 -1
- package/dist/framework-preset-cra.mjs +1 -1
- package/dist/framework-preset-react-docs.js +1 -1
- package/dist/framework-preset-react-docs.mjs +1 -1
- package/dist/framework-preset-react-dom-hack.js +1 -1
- package/dist/framework-preset-react-dom-hack.mjs +1 -1
- package/dist/framework-preset-react.js +1 -1
- package/dist/framework-preset-react.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +7 -8
- package/LICENSE +0 -21
- package/dist/chunk-FT25OQ4I.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(b,c)=>(typeof require!="undefined"?require:b)[c]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+a+'" is not supported')});var h={};export{e as a,h as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var y=Object.create;var i=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var j=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},m=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of k(e))!w.call(t,s)&&s!==r&&i(t,s,{get:()=>e[s],enumerable:!(o=g(e,s))||o.enumerable});return t};var f=(t,e,r)=>(r=t!=null?y(S(t)):{},m(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),P=t=>m(i({},"__esModule",{value:!0}),t);var x={};j(x,{webpackFinal:()=>R});module.exports=P(x);var p=require("@storybook/node-logger");var c=f(require("fs")),n=f(require("path")),h=f(require("@storybook/semver")),u=require("@storybook/node-logger"),d=c.default.realpathSync(process.cwd()),a;function v({noCache:t}={}){if(a&&!t)return a;let e=c.default.realpathSync(n.default.join(d,"/node_modules/.bin/react-scripts"));try{if(/node_modules[\\/]\.bin[\\/]react-scripts/i.test(e)){let l=c.default.readFileSync(e,"utf8").match(/"\$basedir[\\/]([^\s]+?[\\/]bin[\\/]react-scripts\.js")/i);l&&l.length>1&&(e=n.default.join(d,"/node_modules/.bin/",l[1]))}}catch(o){u.logger.warn(`Error occurred during react-scripts package path resolving: ${o}`)}a=n.default.join(e,"../..");let r=n.default.join(a,"package.json");return c.default.existsSync(r)||(a="react-scripts"),a}function b(t="2.0.0"){try{let e=require(n.default.join(v(),"package.json"));return!h.default.gtr(t,e.version)}catch{return!1}}var N=t=>{t.some(r=>{let o=typeof r=="string"?r:r.name;return/@storybook(\/|\\)preset-create-react-app/.test(o)})||(p.logger.warn("Storybook support for Create React App is now a separate preset."),p.logger.warn("To use the new preset, install `@storybook/preset-create-react-app` and add it to the list of `addons` in your `.storybook/main.js` config file."),p.logger.warn("The built-in preset has been disabled in Storybook 6.0."))},R=(t,{presetsList:e})=>{var r,o;return b()&&e&&N(e),(o=(r=t.module)==null?void 0:r.rules)==null||o.push({test:/\.m?js$/,type:"javascript/auto"},{test:/\.m?js$/,resolve:{fullySpecified:!1}}),t};0&&(module.exports={webpackFinal});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as p}from"./chunk-JVA5Y325.mjs";import{logger as i}from"@storybook/node-logger";import n from"fs";import s from"path";import d from"@storybook/semver";import{logger as h}from"@storybook/node-logger";var l=n.realpathSync(process.cwd()),r;function u({noCache:e}={}){if(r&&!e)return r;let t=n.realpathSync(s.join(l,"/node_modules/.bin/react-scripts"));try{if(/node_modules[\\/]\.bin[\\/]react-scripts/i.test(t)){let c=n.readFileSync(t,"utf8").match(/"\$basedir[\\/]([^\s]+?[\\/]bin[\\/]react-scripts\.js")/i);c&&c.length>1&&(t=s.join(l,"/node_modules/.bin/",c[1]))}}catch(a){h.warn(`Error occurred during react-scripts package path resolving: ${a}`)}r=s.join(t,"../..");let o=s.join(r,"package.json");return n.existsSync(o)||(r="react-scripts"),r}function f(e="2.0.0"){try{let t=p(s.join(u(),"package.json"));return!d.gtr(e,t.version)}catch{return!1}}var b=e=>{e.some(o=>{let a=typeof o=="string"?o:o.name;return/@storybook(\/|\\)preset-create-react-app/.test(a)})||(i.warn("Storybook support for Create React App is now a separate preset."),i.warn("To use the new preset, install `@storybook/preset-create-react-app` and add it to the list of `addons` in your `.storybook/main.js` config file."),i.warn("The built-in preset has been disabled in Storybook 6.0."))},N=(e,{presetsList:t})=>(f()&&t&&b(t),e.module?.rules?.push({test:/\.m?js$/,type:"javascript/auto"},{test:/\.m?js$/,resolve:{fullySpecified:!1}}),e);export{N as webpackFinal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var y=Object.create;var
|
|
1
|
+
"use strict";var y=Object.create;var o=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var O=(t,r)=>{for(var e in r)o(t,e,{get:r[e],enumerable:!0})},a=(t,r,e,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let p of u(r))!C.call(t,p)&&p!==e&&o(t,p,{get:()=>r[p],enumerable:!(s=l(r,p))||s.enumerable});return t};var i=(t,r,e)=>(e=t!=null?y(b(t)):{},a(r||!t||!t.__esModule?o(e,"default",{value:t,enumerable:!0}):e,t)),S=t=>a(o({},"__esModule",{value:!0}),t);var k={};O(k,{babel:()=>m,webpackFinal:()=>g});module.exports=S(k);var c=i(require("@storybook/react-docgen-typescript-plugin")),n=require("@storybook/docs-tools"),m=async(t,r)=>{if(!(0,n.hasDocsOrControls)(r))return t;let e=await r.presets.apply("typescript",{}),{reactDocgen:s}=e||{};return typeof s!="string"?t:{...t,overrides:[...(t==null?void 0:t.overrides)||[],{test:s==="react-docgen"?/\.(cjs|mjs|tsx?|jsx?)$/:/\.(cjs|mjs|jsx?)$/,plugins:[[require.resolve("babel-plugin-react-docgen"),{DOC_GEN_COLLECTION_NAME:"STORYBOOK_REACT_CLASSES"}]]}]}},g=async(t,r)=>{if(!(0,n.hasDocsOrControls)(r))return t;let e=await r.presets.apply("typescript",{}),{reactDocgen:s,reactDocgenTypescriptOptions:p}=e||{};return s!=="react-docgen-typescript"?t:{...t,plugins:[...t.plugins||[],new c.default({...p,savePropValueAsString:!0})]}};0&&(module.exports={babel,webpackFinal});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as o}from"./chunk-JVA5Y325.mjs";import c from"@storybook/react-docgen-typescript-plugin";import{hasDocsOrControls as p}from"@storybook/docs-tools";var l=async(t,e)=>{if(!p(e))return t;let s=await e.presets.apply("typescript",{}),{reactDocgen:r}=s||{};return typeof r!="string"?t:{...t,overrides:[...t?.overrides||[],{test:r==="react-docgen"?/\.(cjs|mjs|tsx?|jsx?)$/:/\.(cjs|mjs|jsx?)$/,plugins:[[o.resolve("babel-plugin-react-docgen"),{DOC_GEN_COLLECTION_NAME:"STORYBOOK_REACT_CLASSES"}]]}]}},u=async(t,e)=>{if(!p(e))return t;let s=await e.presets.apply("typescript",{}),{reactDocgen:r,reactDocgenTypescriptOptions:n}=s||{};return r!=="react-docgen-typescript"?t:{...t,plugins:[...t.plugins||[],new c({...n,savePropValueAsString:!0})]}};export{l as babel,u as webpackFinal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var c=Object.create;var s=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var f=(e,r)=>{for(var o in r)s(e,o,{get:r[o],enumerable:!0})},i=(e,r,o,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of b(r))!y.call(e,n)&&n!==o&&s(e,n,{get:()=>r[n],enumerable:!(t=l(r,n))||t.enumerable});return e};var k=(e,r,o)=>(o=e!=null?c(u(e)):{},i(r||!e||!e.__esModule?s(o,"default",{value:e,enumerable:!0}):o,e)),w=e=>i(s({},"__esModule",{value:!0}),e);var g={};f(g,{webpackFinal:()=>d});module.exports=w(g);var a=require("fs-extra"),p=require("webpack"),d=async e=>{var o,t;let r=await(0,a.readJSON)(require.resolve("react-dom/package.json"));return{...e,plugins:[...e.plugins||[],((o=r==null?void 0:r.version)==null?void 0:o.startsWith("18"))||((t=r==null?void 0:r.version)==null?void 0:t.startsWith("0.0.0"))?null:new p.IgnorePlugin({resourceRegExp:/react-dom\/client$/,contextRegExp:/(renderers\/react|renderers\\react|@storybook\/react|@storybook\\react)/})].filter(Boolean)}};0&&(module.exports={webpackFinal});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as o}from"./chunk-JVA5Y325.mjs";import{readJSON as t}from"fs-extra";import{IgnorePlugin as a}from"webpack";var i=async r=>{let e=await t(o.resolve("react-dom/package.json"));return{...r,plugins:[...r.plugins||[],e?.version?.startsWith("18")||e?.version?.startsWith("0.0.0")?null:new a({resourceRegExp:/react-dom\/client$/,contextRegExp:/(renderers\/react|renderers\\react|@storybook\/react|@storybook\\react)/})].filter(Boolean)}};export{i as webpackFinal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var b=Object.create;var n=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var k=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},l=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of R(t))!f.call(e,o)&&o!==r&&n(e,o,{get:()=>t[o],enumerable:!(s=y(t,o))||s.enumerable});return e};var a=(e,t,r)=>(r=e!=null?b(h(e)):{},l(t||!e||!e.__esModule?n(r,"default",{value:e,enumerable:!0}):r,e)),w=e=>l(n({},"__esModule",{value:!0}),e);var q={};k(q,{babel:()=>d,babelDefault:()=>x,webpackFinal:()=>S});module.exports=w(q);var p=a(require("path")),c=a(require("@pmmmwh/react-refresh-webpack-plugin")),u=require("@storybook/node-logger"),m=async e=>{let t=e.configType==="DEVELOPMENT",r=await e.presets.apply("framework"),s=typeof r=="object"?r.options:{};return t&&(s.fastRefresh||process.env.FAST_REFRESH==="true")},d=async(e,t)=>await m(t)?{...e,plugins:[[require.resolve("react-refresh/babel"),{},"storybook-react-refresh"],...e.plugins||[]]}:e,i=p.default.dirname(require.resolve("@storybook/preset-react-webpack/package.json")),v=i.includes("node_modules")?p.default.join(i,"../../"):p.default.join(i,"../../node_modules"),O=()=>{try{return require.resolve("react/jsx-runtime",{paths:[v]}),!0}catch{return!1}},x=async e=>{let t=O()?{runtime:"automatic"}:{};return{...e,presets:[...(e==null?void 0:e.presets)||[],[require.resolve("@babel/preset-react"),t]],plugins:[...(e==null?void 0:e.plugins)||[],require.resolve("babel-plugin-add-react-displayname")]}},S=async(e,t)=>{var s;return await m(t)?(s=e.plugins)!=null&&s.find(o=>o.constructor.name==="ReactRefreshPlugin")?(u.logger.warn("=> React refresh is already set. You don't need to set the option"),e):(u.logger.info("=> Using React fast refresh"),{...e,plugins:[...e.plugins||[],new c.default({overlay:{sockIntegration:"whm"}})]}):e};0&&(module.exports={babel,babelDefault,webpackFinal});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as r,b as i}from"./chunk-JVA5Y325.mjs";import n from"path";import u from"@pmmmwh/react-refresh-webpack-plugin";import{logger as p}from"@storybook/node-logger";var c=async e=>{let t=e.configType==="DEVELOPMENT",s=await e.presets.apply("framework"),o=typeof s=="object"?s.options:{};return t&&(o.fastRefresh||i.FAST_REFRESH==="true")},R=async(e,t)=>await c(t)?{...e,plugins:[[r.resolve("react-refresh/babel"),{},"storybook-react-refresh"],...e.plugins||[]]}:e,a=n.dirname(r.resolve("@storybook/preset-react-webpack/package.json")),l=a.includes("node_modules")?n.join(a,"../../"):n.join(a,"../../node_modules"),b=()=>{try{return r.resolve("react/jsx-runtime",{paths:[l]}),!0}catch{return!1}},h=async e=>{let t=b()?{runtime:"automatic"}:{};return{...e,presets:[...e?.presets||[],[r.resolve("@babel/preset-react"),t]],plugins:[...e?.plugins||[],r.resolve("babel-plugin-add-react-displayname")]}},k=async(e,t)=>await c(t)?e.plugins?.find(o=>o.constructor.name==="ReactRefreshPlugin")?(p.warn("=> React refresh is already set. You don't need to set the option"),e):(p.info("=> Using React fast refresh"),{...e,plugins:[...e.plugins||[],new u({overlay:{sockIntegration:"whm"}})]}):e;export{R as babel,h as babelDefault,k as webpackFinal};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var d=Object.create;var t=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var v=(e,o)=>{for(var r in o)t(e,r,{get:o[r],enumerable:!0})},p=(e,o,r,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of l(o))!u.call(e,s)&&s!==r&&t(e,s,{get:()=>o[s],enumerable:!(n=f(o,s))||n.enumerable});return e};var i=(e,o,r)=>(r=e!=null?d(q(e)):{},p(o||!e||!e.__esModule?t(r,"default",{value:e,enumerable:!0}):r,e)),y=e=>p(t({},"__esModule",{value:!0}),e);var a={};v(a,{addons:()=>m});module.exports=y(a);var m=[require.resolve("@storybook/preset-react-webpack/dist/framework-preset-react"),require.resolve("@storybook/preset-react-webpack/dist/framework-preset-react-dom-hack"),require.resolve("@storybook/preset-react-webpack/dist/framework-preset-cra"),require.resolve("@storybook/preset-react-webpack/dist/framework-preset-react-docs")];0&&(module.exports={addons});
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as e}from"./chunk-JVA5Y325.mjs";var t=[e.resolve("@storybook/preset-react-webpack/dist/framework-preset-react"),e.resolve("@storybook/preset-react-webpack/dist/framework-preset-react-dom-hack"),e.resolve("@storybook/preset-react-webpack/dist/framework-preset-cra"),e.resolve("@storybook/preset-react-webpack/dist/framework-preset-react-docs")];export{t as addons};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/preset-react-webpack",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.19",
|
|
4
4
|
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -68,16 +68,16 @@
|
|
|
68
68
|
],
|
|
69
69
|
"scripts": {
|
|
70
70
|
"check": "tsc --noEmit",
|
|
71
|
-
"prepare": "
|
|
71
|
+
"prepare": "../../../scripts/prepare/bundle.ts"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@babel/preset-flow": "^7.12.1",
|
|
75
75
|
"@babel/preset-react": "^7.12.10",
|
|
76
76
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
|
|
77
|
-
"@storybook/core-webpack": "7.0.0-alpha.
|
|
78
|
-
"@storybook/docs-tools": "7.0.0-alpha.
|
|
79
|
-
"@storybook/node-logger": "7.0.0-alpha.
|
|
80
|
-
"@storybook/react": "7.0.0-alpha.
|
|
77
|
+
"@storybook/core-webpack": "7.0.0-alpha.19",
|
|
78
|
+
"@storybook/docs-tools": "7.0.0-alpha.19",
|
|
79
|
+
"@storybook/node-logger": "7.0.0-alpha.19",
|
|
80
|
+
"@storybook/react": "7.0.0-alpha.19",
|
|
81
81
|
"@storybook/react-docgen-typescript-plugin": "1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0",
|
|
82
82
|
"@storybook/semver": "^7.3.2",
|
|
83
83
|
"@types/node": "^14.14.20 || ^16.0.0",
|
|
@@ -88,7 +88,6 @@
|
|
|
88
88
|
"react-refresh": "^0.11.0"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
|
-
"@digitak/esrun": "^3.2.2",
|
|
92
91
|
"@types/util-deprecate": "^1.0.0",
|
|
93
92
|
"typescript": "~4.6.3"
|
|
94
93
|
},
|
|
@@ -124,5 +123,5 @@
|
|
|
124
123
|
],
|
|
125
124
|
"platform": "node"
|
|
126
125
|
},
|
|
127
|
-
"gitHead": "
|
|
126
|
+
"gitHead": "74bdb53f67dd59bae2661c668d2d5d4296113281"
|
|
128
127
|
}
|
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/chunk-FT25OQ4I.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var d=Object.defineProperty;var f=(a,b)=>d(a,"name",{value:b,configurable:!0}),g=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(b,c)=>(typeof require!="undefined"?require:b)[c]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+a+'" is not supported')});var j={};export{f as a,g as b,j as c};
|