@procore/storybook-addon 4.2.1 → 4.3.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/CHANGELOG.md +6 -0
- package/dist/configurations/babel.d.ts +38 -0
- package/dist/configurations/babel.d.ts.map +1 -0
- package/dist/preset.d.ts.map +1 -1
- package/dist/preset.js +2 -2
- package/dist/preset.mjs +224 -31
- package/package.json +15 -9
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare function createConfigForReact(): {
|
|
2
|
+
babelrc: boolean;
|
|
3
|
+
cacheCompression: boolean;
|
|
4
|
+
cacheDirectory: boolean;
|
|
5
|
+
cacheIdentifier: string;
|
|
6
|
+
assumptions: {
|
|
7
|
+
privateFieldsAsProperties: boolean;
|
|
8
|
+
setPublicClassFields: boolean;
|
|
9
|
+
};
|
|
10
|
+
compact: boolean;
|
|
11
|
+
configFile: boolean;
|
|
12
|
+
sourceType: string;
|
|
13
|
+
targets: string;
|
|
14
|
+
plugins: ((string | {
|
|
15
|
+
version: string;
|
|
16
|
+
absoluteRuntime: string;
|
|
17
|
+
})[] | (string | {
|
|
18
|
+
loaderMap: {
|
|
19
|
+
svg: {
|
|
20
|
+
ReactComponent: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
})[] | (string | {
|
|
24
|
+
minify: boolean;
|
|
25
|
+
ssr: boolean;
|
|
26
|
+
displayName: boolean;
|
|
27
|
+
fileName: boolean;
|
|
28
|
+
transpileTemplateLiterals: boolean;
|
|
29
|
+
pure: boolean;
|
|
30
|
+
})[])[];
|
|
31
|
+
presets: (string | (string | {
|
|
32
|
+
useBuiltIns: string;
|
|
33
|
+
corejs: string;
|
|
34
|
+
})[] | (string | {
|
|
35
|
+
useBuiltIns: boolean;
|
|
36
|
+
})[])[];
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=babel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"babel.d.ts","sourceRoot":"","sources":["../../src/configurations/babel.ts"],"names":[],"mappings":"AAwBA,wBAAgB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgEnC"}
|
package/dist/preset.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../src/preset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../src/preset.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,8BAA8B,CAAC;AAIvD,eAAO,MAAM,MAAM;;;;;;;;;;IAqBlB,CAAC;AAEF,wBAAgB,YAAY,CAAC,MAAM,EAAE,GAAG,OAcvC;AAED,eAAO,MAAM,UAAU;;;;;;CAMtB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/preset.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var E=Object.create;var m=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var z=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of R(n))!x.call(e,r)&&r!==t&&m(e,r,{get:()=>n[r],enumerable:!(o=w(n,r))||o.enumerable});return e};var c=(e,n,t)=>(t=e!=null?E($(e)):{},z(n||!e||!e.__esModule?m(t,"default",{value:e,enumerable:!0}):t,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I="7.23.9",k="3.35.1",q=/^[A-Za-z]:\//;function l(e=""){return e&&e.replace(/\\/g,"/").replace(q,n=>n.toUpperCase())}const C=/^[/\\]{2}/,S=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,b=/^[A-Za-z]:$/,p=/^\/([A-Za-z]:)?$/,j="/",T=":",h=function(e){if(e.length===0)return".";e=l(e);const n=e.match(C),t=a(e),o=e[e.length-1]==="/";return e=d(e,!t),e.length===0?t?"/":o?"./":".":(o&&(e+="/"),b.test(e)&&(e+="/"),n?t?`//${e}`:`//./${e}`:t&&!a(e)?`/${e}`:e)},P=function(...e){if(e.length===0)return".";let n;for(const t of e)t&&t.length>0&&(n===void 0?n=t:n+=`/${t}`);return n===void 0?".":h(n.replace(/\/\/+/g,"/"))};function A(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}const f=function(...e){e=e.map(o=>l(o));let n="",t=!1;for(let o=e.length-1;o>=-1&&!t;o--){const r=o>=0?e[o]:A();!r||r.length===0||(n=`${r}/${n}`,t=a(r))}return n=d(n,!t),t&&!a(n)?`/${n}`:n.length>0?n:"."};function d(e,n){let t="",o=0,r=-1,s=0,u=null;for(let i=0;i<=e.length;++i){if(i<e.length)u=e[i];else{if(u==="/")break;u="/"}if(u==="/"){if(!(r===i-1||s===1))if(s===2){if(t.length<2||o!==2||t[t.length-1]!=="."||t[t.length-2]!=="."){if(t.length>2){const g=t.lastIndexOf("/");g===-1?(t="",o=0):(t=t.slice(0,g),o=t.length-1-t.lastIndexOf("/")),r=i,s=0;continue}else if(t.length>0){t="",o=0,r=i,s=0;continue}}n&&(t+=t.length>0?"/..":"..",o=2)}else t.length>0?t+=`/${e.slice(r+1,i)}`:t=e.slice(r+1,i),o=i-r-1;r=i,s=0}else u==="."&&s!==-1?++s:s=-1}return t}const a=function(e){return S.test(e)},O=function(e){return l(e)},N=/.(\.[^./]+)$/,y=function(e){const n=N.exec(l(e));return n&&n[1]||""},D=function(e,n){const t=f(e).replace(p,"$1").split("/"),o=f(n).replace(p,"$1").split("/");if(o[0][1]===":"&&t[0][1]===":"&&t[0]!==o[0])return o.join("/");const r=[...t];for(const s of r){if(o[0]!==s)break;t.shift(),o.shift()}return[...t.map(()=>".."),...o].join("/")},v=function(e){const n=l(e).replace(/\/$/,"").split("/").slice(0,-1);return n.length===1&&b.test(n[0])&&(n[0]+="/"),n.join("/")||(a(e)?"/":".")},B=function(e){const n=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return l(e.root?f(...n):n.join("/"))},_=function(e,n){const t=l(e).split("/").pop();return n&&t.endsWith(n)?t.slice(0,-n.length):t},F=function(e){const n=l(e).split("/").shift()||"/",t=_(e),o=y(t);return{root:n,dir:v(e),base:t,ext:o,name:t.slice(0,t.length-o.length)}},L={__proto__:null,basename:_,delimiter:T,dirname:v,extname:y,format:B,isAbsolute:a,join:P,normalize:h,normalizeString:d,parse:F,relative:D,resolve:f,sep:j,toNamespacedPath:O};function M(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function U(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var V=function(n,t){let o=n==null?"":n.toString();for(const r of t){o+=`:${r}@`;try{o+=U(`${r}/package.json`).version}catch{}}return o};const Z=M(V),H="defaults",W={version:I,absoluteRuntime:L.dirname(require.resolve("@babel/runtime/package.json"))};function X(){const e=process.env.NODE_ENV||"development",n=e==="production";return{babelrc:!1,cacheCompression:!1,cacheDirectory:!0,cacheIdentifier:Z(e,["babel-plugin-named-asset-import","react-dev-utils"]),assumptions:{privateFieldsAsProperties:!0,setPublicClassFields:!0},compact:n,configFile:!1,sourceType:"unambiguous",targets:H,plugins:[[require.resolve("@babel/plugin-transform-runtime"),W],[require.resolve("babel-plugin-named-asset-import"),{loaderMap:{svg:{ReactComponent:"@svgr/webpack?-svgo,+titleProp,+ref![path]"}}}],[require.resolve("babel-plugin-styled-components"),{minify:!0,ssr:!1,displayName:!0,fileName:!1,transpileTemplateLiterals:!0,pure:!1}]],presets:[[require.resolve("@babel/preset-env"),{useBuiltIns:"usage",corejs:k}],[require.resolve("@babel/preset-react"),{useBuiltIns:!0}],require.resolve("@babel/preset-typescript")]}}const G={includeBoxSizing:!0};function J(e,n,t){const{includeBoxSizing:o=!0}={...G,...t};return`
|
|
2
2
|
${e}
|
|
3
3
|
<meta charset="UTF-8" />
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
width: 100%;
|
|
27
27
|
}
|
|
28
28
|
</style>
|
|
29
|
-
`}function
|
|
29
|
+
`}function K(e){try{return require(e)}catch{return}}const Q=require("find-babel-config"),Y=()=>{const e=K("sass");return[{name:"@storybook/addon-styling",options:{...e?{sass:{implementation:e}}:{},cssModules:{localIdentName:"[name]__[local]--[hash:base64:5]"}}},"@storybook/addon-essentials","@storybook/addon-storysource","@storybook/addon-a11y"]};function ee(e){const n=process.cwd(),{file:t}=Q.sync(n,1);return t?e:(console.log("Could not find babel config file, using babel config from @procore/storybook-addon"),X())}const te={checkOptions:{check:!0,exclude:/node_modules/},reactDocgen:!1};exports.addons=Y;exports.babelDefault=ee;exports.previewHead=J;exports.typescript=te;
|
package/dist/preset.mjs
CHANGED
|
@@ -1,10 +1,217 @@
|
|
|
1
|
-
const
|
|
1
|
+
const v = "7.23.9", _ = "3.35.1", E = /^[A-Za-z]:\//;
|
|
2
|
+
function l(e = "") {
|
|
3
|
+
return e && e.replace(/\\/g, "/").replace(E, (n) => n.toUpperCase());
|
|
4
|
+
}
|
|
5
|
+
const w = /^[/\\]{2}/, x = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, m = /^[A-Za-z]:$/, g = /^\/([A-Za-z]:)?$/, R = "/", $ = ":", p = function(e) {
|
|
6
|
+
if (e.length === 0)
|
|
7
|
+
return ".";
|
|
8
|
+
e = l(e);
|
|
9
|
+
const n = e.match(w), t = c(e), o = e[e.length - 1] === "/";
|
|
10
|
+
return e = f(e, !t), e.length === 0 ? t ? "/" : o ? "./" : "." : (o && (e += "/"), m.test(e) && (e += "/"), n ? t ? `//${e}` : `//./${e}` : t && !c(e) ? `/${e}` : e);
|
|
11
|
+
}, z = function(...e) {
|
|
12
|
+
if (e.length === 0)
|
|
13
|
+
return ".";
|
|
14
|
+
let n;
|
|
15
|
+
for (const t of e)
|
|
16
|
+
t && t.length > 0 && (n === void 0 ? n = t : n += `/${t}`);
|
|
17
|
+
return n === void 0 ? "." : p(n.replace(/\/\/+/g, "/"));
|
|
18
|
+
};
|
|
19
|
+
function I() {
|
|
20
|
+
return typeof process < "u" && typeof process.cwd == "function" ? process.cwd().replace(/\\/g, "/") : "/";
|
|
21
|
+
}
|
|
22
|
+
const u = function(...e) {
|
|
23
|
+
e = e.map((o) => l(o));
|
|
24
|
+
let n = "", t = !1;
|
|
25
|
+
for (let o = e.length - 1; o >= -1 && !t; o--) {
|
|
26
|
+
const r = o >= 0 ? e[o] : I();
|
|
27
|
+
!r || r.length === 0 || (n = `${r}/${n}`, t = c(r));
|
|
28
|
+
}
|
|
29
|
+
return n = f(n, !t), t && !c(n) ? `/${n}` : n.length > 0 ? n : ".";
|
|
30
|
+
};
|
|
31
|
+
function f(e, n) {
|
|
32
|
+
let t = "", o = 0, r = -1, s = 0, a = null;
|
|
33
|
+
for (let i = 0; i <= e.length; ++i) {
|
|
34
|
+
if (i < e.length)
|
|
35
|
+
a = e[i];
|
|
36
|
+
else {
|
|
37
|
+
if (a === "/")
|
|
38
|
+
break;
|
|
39
|
+
a = "/";
|
|
40
|
+
}
|
|
41
|
+
if (a === "/") {
|
|
42
|
+
if (!(r === i - 1 || s === 1))
|
|
43
|
+
if (s === 2) {
|
|
44
|
+
if (t.length < 2 || o !== 2 || t[t.length - 1] !== "." || t[t.length - 2] !== ".") {
|
|
45
|
+
if (t.length > 2) {
|
|
46
|
+
const d = t.lastIndexOf("/");
|
|
47
|
+
d === -1 ? (t = "", o = 0) : (t = t.slice(0, d), o = t.length - 1 - t.lastIndexOf("/")), r = i, s = 0;
|
|
48
|
+
continue;
|
|
49
|
+
} else if (t.length > 0) {
|
|
50
|
+
t = "", o = 0, r = i, s = 0;
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
n && (t += t.length > 0 ? "/.." : "..", o = 2);
|
|
55
|
+
} else
|
|
56
|
+
t.length > 0 ? t += `/${e.slice(r + 1, i)}` : t = e.slice(r + 1, i), o = i - r - 1;
|
|
57
|
+
r = i, s = 0;
|
|
58
|
+
} else
|
|
59
|
+
a === "." && s !== -1 ? ++s : s = -1;
|
|
60
|
+
}
|
|
61
|
+
return t;
|
|
62
|
+
}
|
|
63
|
+
const c = function(e) {
|
|
64
|
+
return x.test(e);
|
|
65
|
+
}, k = function(e) {
|
|
66
|
+
return l(e);
|
|
67
|
+
}, q = /.(\.[^./]+)$/, h = function(e) {
|
|
68
|
+
const n = q.exec(l(e));
|
|
69
|
+
return n && n[1] || "";
|
|
70
|
+
}, C = function(e, n) {
|
|
71
|
+
const t = u(e).replace(g, "$1").split("/"), o = u(n).replace(g, "$1").split("/");
|
|
72
|
+
if (o[0][1] === ":" && t[0][1] === ":" && t[0] !== o[0])
|
|
73
|
+
return o.join("/");
|
|
74
|
+
const r = [...t];
|
|
75
|
+
for (const s of r) {
|
|
76
|
+
if (o[0] !== s)
|
|
77
|
+
break;
|
|
78
|
+
t.shift(), o.shift();
|
|
79
|
+
}
|
|
80
|
+
return [...t.map(() => ".."), ...o].join("/");
|
|
81
|
+
}, b = function(e) {
|
|
82
|
+
const n = l(e).replace(/\/$/, "").split("/").slice(0, -1);
|
|
83
|
+
return n.length === 1 && m.test(n[0]) && (n[0] += "/"), n.join("/") || (c(e) ? "/" : ".");
|
|
84
|
+
}, j = function(e) {
|
|
85
|
+
const n = [e.root, e.dir, e.base ?? e.name + e.ext].filter(Boolean);
|
|
86
|
+
return l(
|
|
87
|
+
e.root ? u(...n) : n.join("/")
|
|
88
|
+
);
|
|
89
|
+
}, y = function(e, n) {
|
|
90
|
+
const t = l(e).split("/").pop();
|
|
91
|
+
return n && t.endsWith(n) ? t.slice(0, -n.length) : t;
|
|
92
|
+
}, S = function(e) {
|
|
93
|
+
const n = l(e).split("/").shift() || "/", t = y(e), o = h(t);
|
|
94
|
+
return {
|
|
95
|
+
root: n,
|
|
96
|
+
dir: b(e),
|
|
97
|
+
base: t,
|
|
98
|
+
ext: o,
|
|
99
|
+
name: t.slice(0, t.length - o.length)
|
|
100
|
+
};
|
|
101
|
+
}, T = {
|
|
102
|
+
__proto__: null,
|
|
103
|
+
basename: y,
|
|
104
|
+
delimiter: $,
|
|
105
|
+
dirname: b,
|
|
106
|
+
extname: h,
|
|
107
|
+
format: j,
|
|
108
|
+
isAbsolute: c,
|
|
109
|
+
join: z,
|
|
110
|
+
normalize: p,
|
|
111
|
+
normalizeString: f,
|
|
112
|
+
parse: S,
|
|
113
|
+
relative: C,
|
|
114
|
+
resolve: u,
|
|
115
|
+
sep: R,
|
|
116
|
+
toNamespacedPath: k
|
|
117
|
+
};
|
|
118
|
+
function A(e) {
|
|
119
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
120
|
+
}
|
|
121
|
+
function P(e) {
|
|
122
|
+
throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
123
|
+
}
|
|
124
|
+
var N = function(n, t) {
|
|
125
|
+
let o = n == null ? "" : n.toString();
|
|
126
|
+
for (const r of t) {
|
|
127
|
+
o += `:${r}@`;
|
|
128
|
+
try {
|
|
129
|
+
o += P(`${r}/package.json`).version;
|
|
130
|
+
} catch {
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return o;
|
|
134
|
+
};
|
|
135
|
+
const O = /* @__PURE__ */ A(N), D = "defaults", B = {
|
|
136
|
+
// By default, babel assumes babel/runtime version 7.0.0-beta.0,
|
|
137
|
+
// explicitly resolving to match the provided helper functions.
|
|
138
|
+
// https://github.com/babel/babel/issues/10261
|
|
139
|
+
version: v,
|
|
140
|
+
// Undocumented option that lets us encapsulate our runtime, ensuring
|
|
141
|
+
// the correct version is used
|
|
142
|
+
// https://github.com/babel/babel/blob/090c364a90fe73d36a30707fc612ce037bdbbb24/packages/babel-plugin-transform-runtime/src/index.js#L35-L42
|
|
143
|
+
absoluteRuntime: T.dirname(require.resolve("@babel/runtime/package.json"))
|
|
144
|
+
};
|
|
145
|
+
function F() {
|
|
146
|
+
const e = process.env.NODE_ENV || "development", n = e === "production";
|
|
147
|
+
return {
|
|
148
|
+
babelrc: !1,
|
|
149
|
+
cacheCompression: !1,
|
|
150
|
+
cacheDirectory: !0,
|
|
151
|
+
cacheIdentifier: O(e, [
|
|
152
|
+
"babel-plugin-named-asset-import",
|
|
153
|
+
"react-dev-utils"
|
|
154
|
+
]),
|
|
155
|
+
assumptions: {
|
|
156
|
+
privateFieldsAsProperties: !0,
|
|
157
|
+
setPublicClassFields: !0
|
|
158
|
+
},
|
|
159
|
+
compact: n,
|
|
160
|
+
configFile: !1,
|
|
161
|
+
sourceType: "unambiguous",
|
|
162
|
+
targets: D,
|
|
163
|
+
plugins: [
|
|
164
|
+
[
|
|
165
|
+
require.resolve("@babel/plugin-transform-runtime"),
|
|
166
|
+
B
|
|
167
|
+
],
|
|
168
|
+
[
|
|
169
|
+
require.resolve("babel-plugin-named-asset-import"),
|
|
170
|
+
{
|
|
171
|
+
loaderMap: {
|
|
172
|
+
svg: {
|
|
173
|
+
ReactComponent: "@svgr/webpack?-svgo,+titleProp,+ref![path]"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
[
|
|
179
|
+
require.resolve("babel-plugin-styled-components"),
|
|
180
|
+
{
|
|
181
|
+
minify: !0,
|
|
182
|
+
ssr: !1,
|
|
183
|
+
displayName: !0,
|
|
184
|
+
fileName: !1,
|
|
185
|
+
transpileTemplateLiterals: !0,
|
|
186
|
+
pure: !1
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
],
|
|
190
|
+
presets: [
|
|
191
|
+
[
|
|
192
|
+
require.resolve("@babel/preset-env"),
|
|
193
|
+
{
|
|
194
|
+
useBuiltIns: "usage",
|
|
195
|
+
corejs: _
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
[
|
|
199
|
+
require.resolve("@babel/preset-react"),
|
|
200
|
+
{
|
|
201
|
+
useBuiltIns: !0
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
require.resolve("@babel/preset-typescript")
|
|
205
|
+
]
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
const L = {
|
|
2
209
|
includeBoxSizing: !0
|
|
3
210
|
};
|
|
4
|
-
function
|
|
211
|
+
function V(e, n, t) {
|
|
5
212
|
const { includeBoxSizing: o = !0 } = {
|
|
6
|
-
...
|
|
7
|
-
...
|
|
213
|
+
...L,
|
|
214
|
+
...t
|
|
8
215
|
};
|
|
9
216
|
return `
|
|
10
217
|
${e}
|
|
@@ -36,15 +243,15 @@ function c(e, t, s) {
|
|
|
36
243
|
</style>
|
|
37
244
|
`;
|
|
38
245
|
}
|
|
39
|
-
function
|
|
246
|
+
function U(e) {
|
|
40
247
|
try {
|
|
41
248
|
return require(e);
|
|
42
249
|
} catch {
|
|
43
250
|
return;
|
|
44
251
|
}
|
|
45
252
|
}
|
|
46
|
-
const
|
|
47
|
-
const e =
|
|
253
|
+
const M = require("find-babel-config"), Z = () => {
|
|
254
|
+
const e = U("sass");
|
|
48
255
|
return [
|
|
49
256
|
{
|
|
50
257
|
name: "@storybook/addon-styling",
|
|
@@ -62,27 +269,13 @@ const r = require("find-babel-config"), a = () => {
|
|
|
62
269
|
"@storybook/addon-a11y"
|
|
63
270
|
];
|
|
64
271
|
};
|
|
65
|
-
function
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const o = n(
|
|
71
|
-
"@procore/core-scripts/dist/babel/config"
|
|
72
|
-
);
|
|
73
|
-
if (o != null && o.createConfigForReact)
|
|
74
|
-
return console.log(
|
|
75
|
-
"\x1B[32minfo\x1B[0m @procore/storybook-addon => Using @procore/core-scripts babel config"
|
|
76
|
-
), {
|
|
77
|
-
...o.createConfigForReact({
|
|
78
|
-
env: process.env.NODE_ENV
|
|
79
|
-
}),
|
|
80
|
-
sourceType: "unambiguous"
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
return e;
|
|
272
|
+
function W(e) {
|
|
273
|
+
const n = process.cwd(), { file: t } = M.sync(n, 1);
|
|
274
|
+
return t ? e : (console.log(
|
|
275
|
+
"Could not find babel config file, using babel config from @procore/storybook-addon"
|
|
276
|
+
), F());
|
|
84
277
|
}
|
|
85
|
-
const
|
|
278
|
+
const X = {
|
|
86
279
|
checkOptions: {
|
|
87
280
|
check: !0,
|
|
88
281
|
exclude: /node_modules/
|
|
@@ -90,8 +283,8 @@ const d = {
|
|
|
90
283
|
reactDocgen: !1
|
|
91
284
|
};
|
|
92
285
|
export {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
286
|
+
Z as addons,
|
|
287
|
+
W as babelDefault,
|
|
288
|
+
V as previewHead,
|
|
289
|
+
X as typescript
|
|
97
290
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@procore/storybook-addon",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Procore Storybook Configuration",
|
|
5
5
|
"author": "Procore Technologies",
|
|
6
6
|
"homepage": "https://github.com/procore/frontend-tooling#readme",
|
|
@@ -45,40 +45,46 @@
|
|
|
45
45
|
"format": "prettier --ignore-unknown --write .",
|
|
46
46
|
"format:check": "prettier --cache --ignore-unknown --check .",
|
|
47
47
|
"prepack": "yarn build",
|
|
48
|
-
"test": "vitest run --
|
|
48
|
+
"test": "vitest run --coverage"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@procore/core-scripts": "^11",
|
|
52
51
|
"sass": "^1.3.0"
|
|
53
52
|
},
|
|
54
53
|
"peerDependenciesMeta": {
|
|
55
|
-
"@procore/core-scripts": {
|
|
56
|
-
"optional": true
|
|
57
|
-
},
|
|
58
54
|
"sass": {
|
|
59
55
|
"optional": true
|
|
60
56
|
}
|
|
61
57
|
},
|
|
62
58
|
"dependencies": {
|
|
59
|
+
"@babel/plugin-transform-runtime": "^7.23.9",
|
|
60
|
+
"@babel/preset-env": "^7.23.3",
|
|
61
|
+
"@babel/preset-react": "^7.23.3",
|
|
62
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
63
|
+
"@babel/runtime": "^7.23.9",
|
|
63
64
|
"@storybook/addon-a11y": "^7.5.3",
|
|
64
65
|
"@storybook/addon-essentials": "^7.5.3",
|
|
65
66
|
"@storybook/addon-storysource": "^7.5.3",
|
|
66
67
|
"@storybook/addon-styling": "^1.3.7",
|
|
67
68
|
"@storybook/theming": "^7.5.3",
|
|
69
|
+
"@svgr/webpack": "^6.5.1",
|
|
70
|
+
"babel-plugin-named-asset-import": "^0.3.8",
|
|
71
|
+
"babel-plugin-styled-components": "^2.1.4",
|
|
72
|
+
"core-js": "^3.35.1",
|
|
68
73
|
"find-babel-config": "^2.0.0"
|
|
69
74
|
},
|
|
70
75
|
"devDependencies": {
|
|
71
76
|
"@babel/core": "^7.23.3",
|
|
72
|
-
"@procore/prettier-config": "^1.
|
|
77
|
+
"@procore/prettier-config": "^1.1.0",
|
|
73
78
|
"@procore/typescript-config": "^1.0.0",
|
|
74
79
|
"@procore/vite": "^1.2.0",
|
|
75
|
-
"@storybook/react": "^7.5.3",
|
|
76
|
-
"@storybook/react-webpack5": "^7.5.3",
|
|
77
80
|
"@types/react": "^18.2.37",
|
|
81
|
+
"@types/react-dev-utils": "^9.0.14",
|
|
78
82
|
"@vitest/coverage-v8": "^0.34.6",
|
|
79
83
|
"eslint": "^8.54.0",
|
|
84
|
+
"pathe": "^1.1.2",
|
|
80
85
|
"prettier": "^2.8.8",
|
|
81
86
|
"react": "^18.2.0",
|
|
87
|
+
"react-dev-utils": "^12.0.1",
|
|
82
88
|
"react-dom": "^18.2.0",
|
|
83
89
|
"rimraf": "^3.0.2",
|
|
84
90
|
"typescript": "^4.9.5",
|