@procore/storybook-addon 4.2.1 → 4.4.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/legacy/chunk-QGM4M3NI.js +37 -0
  3. package/dist/legacy/index.cjs +48 -0
  4. package/dist/legacy/index.d.cts +5 -0
  5. package/dist/legacy/index.d.ts +5 -0
  6. package/dist/legacy/index.js +23 -0
  7. package/dist/legacy/preset.cjs +457 -0
  8. package/dist/legacy/preset.d.cts +28 -0
  9. package/dist/legacy/preset.d.ts +28 -0
  10. package/dist/legacy/preset.js +420 -0
  11. package/dist/modern/chunk-QGM4M3NI.js +37 -0
  12. package/dist/modern/index.cjs +48 -0
  13. package/dist/modern/index.d.cts +5 -0
  14. package/dist/modern/index.d.ts +5 -0
  15. package/dist/modern/index.js +23 -0
  16. package/dist/modern/preset.cjs +457 -0
  17. package/dist/modern/preset.d.cts +28 -0
  18. package/dist/modern/preset.d.ts +28 -0
  19. package/dist/modern/preset.js +420 -0
  20. package/package.json +50 -34
  21. package/coverage/lcov-report/block-navigation.js +0 -87
  22. package/coverage/lcov-report/prettify.js +0 -2
  23. package/coverage/lcov-report/sorter.js +0 -196
  24. package/dist/asset/procoreLogo.d.ts +0 -3
  25. package/dist/asset/procoreLogo.d.ts.map +0 -1
  26. package/dist/configurations/previewHead.d.ts +0 -3
  27. package/dist/configurations/previewHead.d.ts.map +0 -1
  28. package/dist/configurations/theme.d.ts +0 -3
  29. package/dist/configurations/theme.d.ts.map +0 -1
  30. package/dist/constant/external-urls.d.ts +0 -2
  31. package/dist/constant/external-urls.d.ts.map +0 -1
  32. package/dist/index.d.ts +0 -4
  33. package/dist/index.d.ts.map +0 -1
  34. package/dist/index.js +0 -1
  35. package/dist/index.mjs +0 -11
  36. package/dist/preset.d.ts +0 -22
  37. package/dist/preset.d.ts.map +0 -1
  38. package/dist/preset.js +0 -29
  39. package/dist/preset.mjs +0 -97
  40. package/dist/utils/index.d.ts +0 -2
  41. package/dist/utils/index.d.ts.map +0 -1
  42. package/preset.js +0 -2
  43. package/src/typings/index.d.ts +0 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @procore/storybook-addon
2
2
 
3
+ ## 4.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3b4e8f7: Converts the project to use Hammer. Release should work the same as the previous version."
8
+
9
+ ## 4.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - cb4aacb: Remove peerDep on core-scripts, use the core-scripts babel config by default
14
+
3
15
  ## 4.2.1
4
16
 
5
17
  ### Patch Changes
@@ -0,0 +1,37 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
+ }) : x)(function(x) {
10
+ if (typeof require !== "undefined") return require.apply(this, arguments);
11
+ throw Error('Dynamic require of "' + x + '" is not supported');
12
+ });
13
+ var __commonJS = (cb, mod) => function __require2() {
14
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from))
19
+ if (!__hasOwnProp.call(to, key) && key !== except)
20
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
+ }
22
+ return to;
23
+ };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
+ mod
31
+ ));
32
+
33
+ export {
34
+ __require,
35
+ __commonJS,
36
+ __toESM
37
+ };
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ createProcoreTheme: () => createProcoreTheme
24
+ });
25
+ module.exports = __toCommonJS(src_exports);
26
+
27
+ // src/configurations/theme.ts
28
+ var import_theming = require("@storybook/theming");
29
+
30
+ // src/asset/procoreLogo.ts
31
+ var procoreLogo_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhQAAABFCAMAAAAl6Y+sAAAAV1BMVEUAAAAoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/UgD/UgD/UgD/UgD/UgD/UgD/UgD/UgD/UgD/UgD/UgAoKCj/UgDdS921AAAAG3RSTlMAwIBA8BAg4KDQ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rcC8LlQYOL3QaEAEbhOZ9rMqdZ0quoyW3MuxYciFExNjVBgJ8dWi5C7YelGUIAIXKd+yd+4u6ReYSjYdQGV+nQnKOoRuEndUiR3ofYix5djQFG5oGlMKOoRuEvdehz+Xq+sXC9EIAYU5RGoQaGoR+CT2K+bZrEWC9plUMVQ4LrAoFAUInChlQwgYOXIyP2BeQTF1bqAGxMKirUIPKQ+rXJeq5IzFQlBcbkuMCgU1QjcdHeQSO1F1ou9A9E6BhSgLuDHhKIegc9J7GWi3oq9zXKxEn4OhgI7YHFQKOoR+NzHhNRSzmKm7EoYCkZdYFAo6hH4ajvfH33Iqc5mlENetZK6UDsUFHN7g0JRj8DJ6RYs1OlDV9WCxE4nmqcWUzMRDwpcF3grFA/1ooWApAx5lcl/X0utWIqzLz5rj4qjTRe//bJvnaYW9aIHAe251WPOO0QfffTRR036A0Llr9K6aXreAAAAAElFTkSuQmCC";
32
+
33
+ // src/constant/external-urls.ts
34
+ var brandUrl = "https://design.procore.com";
35
+
36
+ // src/configurations/theme.ts
37
+ var createProcoreTheme = (vars) => {
38
+ return (0, import_theming.create)({
39
+ base: "light",
40
+ brandUrl,
41
+ brandImage: procoreLogo_default,
42
+ ...vars
43
+ });
44
+ };
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ createProcoreTheme
48
+ });
@@ -0,0 +1,5 @@
1
+ import { ThemeVars } from '@storybook/theming';
2
+
3
+ declare const createProcoreTheme: (vars?: Partial<ThemeVars>) => ThemeVars;
4
+
5
+ export { createProcoreTheme };
@@ -0,0 +1,5 @@
1
+ import { ThemeVars } from '@storybook/theming';
2
+
3
+ declare const createProcoreTheme: (vars?: Partial<ThemeVars>) => ThemeVars;
4
+
5
+ export { createProcoreTheme };
@@ -0,0 +1,23 @@
1
+ import "./chunk-QGM4M3NI.js";
2
+
3
+ // src/configurations/theme.ts
4
+ import { create } from "@storybook/theming";
5
+
6
+ // src/asset/procoreLogo.ts
7
+ var procoreLogo_default =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AKBmDbdSgCmhAmFBh168aEgjScXM1t0NtA2yDDQTScXtIdFD3YUOAWxkGhcBYNVTO7gk0CUDAACxworAN+DhcK3CPrx4SCZjS5mtn0P/Gg2HCuHEOBUyg68aHAG9A2KBQnixjhdAb4N42hwAN0lgdFWoDD2gnFcmJiUChQBK5ZdxI5y4UioJImhgJva1sTFPgLhUGhOIvAIRTWgXmDUGAHceHfjrcC8LlQYOL3QaEAEbhOZ9rMqdZ0quoyW3MuxYciFExNjVBgJ8dWi5C7YelGUIAIXKd+yd+4u6ReYSjYdQGV+nQnKOoRuEndUiR3ofYix5djQFG5oGlMKOoRuEvdehz+Xq+sXC9EIAYU5RGoQaGoR+CT2K+bZrEWC9plUMVQ4LrAoFAUInChlQwgYOXIyP2BeQTF1bqAGxMKirUIPKQ+rXJeq5IzFQlBcbkuMCgU1QjcdHeQSO1F1ou9A9E6BhSgLuDHhKIegc9J7GWi3oq9zXKxEn4OhgI7YHFQKOoR+NzHhNRSzmKm7EoYCkZdYFAo6hH4ajvfH33Iqc5mlENetZK6UDsUFHN7g0JRj8DJ6RYs1OlDV9WCxE4nmqcWUzMRDwpcF3grFA/1ooWApAx5lcl/X0utWIqzLz5rj4qjTRe//bJvnaYW9aIHAe251WPOO0QfffTRR036A0Llr9K6aXreAAAAAElFTkSuQmCC";
8
+
9
+ // src/constant/external-urls.ts
10
+ var brandUrl = "https://design.procore.com";
11
+
12
+ // src/configurations/theme.ts
13
+ var createProcoreTheme = (vars) => {
14
+ return create({
15
+ base: "light",
16
+ brandUrl,
17
+ brandImage: procoreLogo_default,
18
+ ...vars
19
+ });
20
+ };
21
+ export {
22
+ createProcoreTheme
23
+ };
@@ -0,0 +1,457 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJS = (cb, mod) => function __require() {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ };
11
+ var __export = (target, all) => {
12
+ for (var name in all)
13
+ __defProp(target, name, { get: all[name], enumerable: true });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
+ if (!__hasOwnProp.call(to, key) && key !== except)
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
+
33
+ // ../../node_modules/react-dev-utils/getCacheIdentifier.js
34
+ var require_getCacheIdentifier = __commonJS({
35
+ "../../node_modules/react-dev-utils/getCacheIdentifier.js"(exports2, module2) {
36
+ "use strict";
37
+ module2.exports = function getCacheIdentifier2(environment, packages) {
38
+ let cacheIdentifier = environment == null ? "" : environment.toString();
39
+ for (const packageName of packages) {
40
+ cacheIdentifier += `:${packageName}@`;
41
+ try {
42
+ cacheIdentifier += require(`${packageName}/package.json`).version;
43
+ } catch (_) {
44
+ }
45
+ }
46
+ return cacheIdentifier;
47
+ };
48
+ }
49
+ });
50
+
51
+ // src/preset.ts
52
+ var preset_exports = {};
53
+ __export(preset_exports, {
54
+ addons: () => addons,
55
+ babelDefault: () => babelDefault,
56
+ previewHead: () => previewHead_default,
57
+ typescript: () => typescript
58
+ });
59
+ module.exports = __toCommonJS(preset_exports);
60
+
61
+ // src/configurations/babel.ts
62
+ var import_package = require("@babel/runtime/package.json");
63
+ var import_package2 = require("core-js/package.json");
64
+
65
+ // ../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
66
+ var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
67
+ function normalizeWindowsPath(input = "") {
68
+ if (!input) {
69
+ return input;
70
+ }
71
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
72
+ }
73
+ var _UNC_REGEX = /^[/\\]{2}/;
74
+ var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
75
+ var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
76
+ var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
77
+ var sep = "/";
78
+ var delimiter = ":";
79
+ var normalize = function(path2) {
80
+ if (path2.length === 0) {
81
+ return ".";
82
+ }
83
+ path2 = normalizeWindowsPath(path2);
84
+ const isUNCPath = path2.match(_UNC_REGEX);
85
+ const isPathAbsolute = isAbsolute(path2);
86
+ const trailingSeparator = path2[path2.length - 1] === "/";
87
+ path2 = normalizeString(path2, !isPathAbsolute);
88
+ if (path2.length === 0) {
89
+ if (isPathAbsolute) {
90
+ return "/";
91
+ }
92
+ return trailingSeparator ? "./" : ".";
93
+ }
94
+ if (trailingSeparator) {
95
+ path2 += "/";
96
+ }
97
+ if (_DRIVE_LETTER_RE.test(path2)) {
98
+ path2 += "/";
99
+ }
100
+ if (isUNCPath) {
101
+ if (!isPathAbsolute) {
102
+ return `//./${path2}`;
103
+ }
104
+ return `//${path2}`;
105
+ }
106
+ return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
107
+ };
108
+ var join = function(...arguments_) {
109
+ if (arguments_.length === 0) {
110
+ return ".";
111
+ }
112
+ let joined;
113
+ for (const argument of arguments_) {
114
+ if (argument && argument.length > 0) {
115
+ if (joined === void 0) {
116
+ joined = argument;
117
+ } else {
118
+ joined += `/${argument}`;
119
+ }
120
+ }
121
+ }
122
+ if (joined === void 0) {
123
+ return ".";
124
+ }
125
+ return normalize(joined.replace(/\/\/+/g, "/"));
126
+ };
127
+ function cwd() {
128
+ if (typeof process !== "undefined" && typeof process.cwd === "function") {
129
+ return process.cwd().replace(/\\/g, "/");
130
+ }
131
+ return "/";
132
+ }
133
+ var resolve = function(...arguments_) {
134
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
135
+ let resolvedPath = "";
136
+ let resolvedAbsolute = false;
137
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
138
+ const path2 = index >= 0 ? arguments_[index] : cwd();
139
+ if (!path2 || path2.length === 0) {
140
+ continue;
141
+ }
142
+ resolvedPath = `${path2}/${resolvedPath}`;
143
+ resolvedAbsolute = isAbsolute(path2);
144
+ }
145
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
146
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
147
+ return `/${resolvedPath}`;
148
+ }
149
+ return resolvedPath.length > 0 ? resolvedPath : ".";
150
+ };
151
+ function normalizeString(path2, allowAboveRoot) {
152
+ let res = "";
153
+ let lastSegmentLength = 0;
154
+ let lastSlash = -1;
155
+ let dots = 0;
156
+ let char = null;
157
+ for (let index = 0; index <= path2.length; ++index) {
158
+ if (index < path2.length) {
159
+ char = path2[index];
160
+ } else if (char === "/") {
161
+ break;
162
+ } else {
163
+ char = "/";
164
+ }
165
+ if (char === "/") {
166
+ if (lastSlash === index - 1 || dots === 1) ;
167
+ else if (dots === 2) {
168
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
169
+ if (res.length > 2) {
170
+ const lastSlashIndex = res.lastIndexOf("/");
171
+ if (lastSlashIndex === -1) {
172
+ res = "";
173
+ lastSegmentLength = 0;
174
+ } else {
175
+ res = res.slice(0, lastSlashIndex);
176
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
177
+ }
178
+ lastSlash = index;
179
+ dots = 0;
180
+ continue;
181
+ } else if (res.length > 0) {
182
+ res = "";
183
+ lastSegmentLength = 0;
184
+ lastSlash = index;
185
+ dots = 0;
186
+ continue;
187
+ }
188
+ }
189
+ if (allowAboveRoot) {
190
+ res += res.length > 0 ? "/.." : "..";
191
+ lastSegmentLength = 2;
192
+ }
193
+ } else {
194
+ if (res.length > 0) {
195
+ res += `/${path2.slice(lastSlash + 1, index)}`;
196
+ } else {
197
+ res = path2.slice(lastSlash + 1, index);
198
+ }
199
+ lastSegmentLength = index - lastSlash - 1;
200
+ }
201
+ lastSlash = index;
202
+ dots = 0;
203
+ } else if (char === "." && dots !== -1) {
204
+ ++dots;
205
+ } else {
206
+ dots = -1;
207
+ }
208
+ }
209
+ return res;
210
+ }
211
+ var isAbsolute = function(p) {
212
+ return _IS_ABSOLUTE_RE.test(p);
213
+ };
214
+ var toNamespacedPath = function(p) {
215
+ return normalizeWindowsPath(p);
216
+ };
217
+ var _EXTNAME_RE = /.(\.[^./]+)$/;
218
+ var extname = function(p) {
219
+ const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
220
+ return match && match[1] || "";
221
+ };
222
+ var relative = function(from, to) {
223
+ const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
224
+ const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
225
+ if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
226
+ return _to.join("/");
227
+ }
228
+ const _fromCopy = [..._from];
229
+ for (const segment of _fromCopy) {
230
+ if (_to[0] !== segment) {
231
+ break;
232
+ }
233
+ _from.shift();
234
+ _to.shift();
235
+ }
236
+ return [..._from.map(() => ".."), ..._to].join("/");
237
+ };
238
+ var dirname = function(p) {
239
+ const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
240
+ if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
241
+ segments[0] += "/";
242
+ }
243
+ return segments.join("/") || (isAbsolute(p) ? "/" : ".");
244
+ };
245
+ var format = function(p) {
246
+ const segments = [p.root, p.dir, p.base ?? p.name + p.ext].filter(Boolean);
247
+ return normalizeWindowsPath(
248
+ p.root ? resolve(...segments) : segments.join("/")
249
+ );
250
+ };
251
+ var basename = function(p, extension) {
252
+ const lastSegment = normalizeWindowsPath(p).split("/").pop();
253
+ return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
254
+ };
255
+ var parse = function(p) {
256
+ const root = normalizeWindowsPath(p).split("/").shift() || "/";
257
+ const base = basename(p);
258
+ const extension = extname(base);
259
+ return {
260
+ root,
261
+ dir: dirname(p),
262
+ base,
263
+ ext: extension,
264
+ name: base.slice(0, base.length - extension.length)
265
+ };
266
+ };
267
+ var path = {
268
+ __proto__: null,
269
+ basename,
270
+ delimiter,
271
+ dirname,
272
+ extname,
273
+ format,
274
+ isAbsolute,
275
+ join,
276
+ normalize,
277
+ normalizeString,
278
+ parse,
279
+ relative,
280
+ resolve,
281
+ sep,
282
+ toNamespacedPath
283
+ };
284
+
285
+ // src/configurations/babel.ts
286
+ var import_getCacheIdentifier = __toESM(require_getCacheIdentifier(), 1);
287
+ var targets = "defaults";
288
+ var transformRuntimeOptions = {
289
+ // By default, babel assumes babel/runtime version 7.0.0-beta.0,
290
+ // explicitly resolving to match the provided helper functions.
291
+ // https://github.com/babel/babel/issues/10261
292
+ version: import_package.version,
293
+ // Undocumented option that lets us encapsulate our runtime, ensuring
294
+ // the correct version is used
295
+ // https://github.com/babel/babel/blob/090c364a90fe73d36a30707fc612ce037bdbbb24/packages/babel-plugin-transform-runtime/src/index.js#L35-L42
296
+ absoluteRuntime: path.dirname(require.resolve("@babel/runtime/package.json"))
297
+ };
298
+ function createConfigForReact() {
299
+ const env = process.env.NODE_ENV || "development";
300
+ const isProduction = env === "production";
301
+ return {
302
+ babelrc: false,
303
+ cacheCompression: false,
304
+ cacheDirectory: true,
305
+ cacheIdentifier: (0, import_getCacheIdentifier.default)(env, [
306
+ "babel-plugin-named-asset-import",
307
+ "react-dev-utils"
308
+ ]),
309
+ assumptions: {
310
+ privateFieldsAsProperties: true,
311
+ setPublicClassFields: true
312
+ },
313
+ compact: isProduction,
314
+ configFile: false,
315
+ sourceType: "unambiguous",
316
+ targets,
317
+ plugins: [
318
+ [
319
+ require.resolve("@babel/plugin-transform-runtime"),
320
+ transformRuntimeOptions
321
+ ],
322
+ [
323
+ require.resolve("babel-plugin-named-asset-import"),
324
+ {
325
+ loaderMap: {
326
+ svg: {
327
+ ReactComponent: "@svgr/webpack?-svgo,+titleProp,+ref![path]"
328
+ }
329
+ }
330
+ }
331
+ ],
332
+ [
333
+ require.resolve("babel-plugin-styled-components"),
334
+ {
335
+ minify: true,
336
+ ssr: false,
337
+ displayName: true,
338
+ fileName: false,
339
+ transpileTemplateLiterals: true,
340
+ pure: false
341
+ }
342
+ ]
343
+ ],
344
+ presets: [
345
+ [
346
+ require.resolve("@babel/preset-env"),
347
+ {
348
+ useBuiltIns: "usage",
349
+ corejs: import_package2.version
350
+ }
351
+ ],
352
+ [
353
+ require.resolve("@babel/preset-react"),
354
+ {
355
+ useBuiltIns: true
356
+ }
357
+ ],
358
+ require.resolve("@babel/preset-typescript")
359
+ ]
360
+ };
361
+ }
362
+
363
+ // src/configurations/previewHead.ts
364
+ var defaultValues = {
365
+ includeBoxSizing: true
366
+ };
367
+ function previewHead_default(head, _options, parameters) {
368
+ const { includeBoxSizing = true } = {
369
+ ...defaultValues,
370
+ ...parameters
371
+ };
372
+ return `
373
+ ${head}
374
+ <meta charset="UTF-8" />
375
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
376
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap">
377
+
378
+ <style>
379
+ ${includeBoxSizing ? `
380
+ *,
381
+ *:before,
382
+ *:after {
383
+ -webkit-box-sizing: inherit;
384
+ -moz-box-sizing: inherit;
385
+ box-sizing: inherit;
386
+ }
387
+ html {
388
+ -webkit-box-sizing: border-box;
389
+ -moz-box-sizing: border-box;
390
+ box-sizing: border-box;
391
+ }
392
+ ` : ""}
393
+ html {
394
+ font-family: Inter, sans-serif;
395
+ }
396
+ body {
397
+ width: 100%;
398
+ }
399
+ </style>
400
+ `;
401
+ }
402
+
403
+ // src/utils/index.ts
404
+ function requireIfExists(moduleName) {
405
+ try {
406
+ return require(moduleName);
407
+ } catch (e) {
408
+ return;
409
+ }
410
+ }
411
+
412
+ // src/preset.ts
413
+ var findBabelConfig = require("find-babel-config");
414
+ var addons = () => {
415
+ const sassImplementation = requireIfExists("sass");
416
+ return [
417
+ {
418
+ name: "@storybook/addon-styling",
419
+ options: {
420
+ ...sassImplementation ? {
421
+ sass: {
422
+ implementation: sassImplementation
423
+ }
424
+ } : {},
425
+ cssModules: { localIdentName: "[name]__[local]--[hash:base64:5]" }
426
+ }
427
+ },
428
+ "@storybook/addon-essentials",
429
+ "@storybook/addon-storysource",
430
+ "@storybook/addon-a11y"
431
+ ];
432
+ };
433
+ function babelDefault(config) {
434
+ const cwd2 = process.cwd();
435
+ const { file } = findBabelConfig.sync(cwd2, 1);
436
+ if (file) {
437
+ return config;
438
+ }
439
+ console.log(
440
+ "Could not find babel config file, using babel config from @procore/storybook-addon"
441
+ );
442
+ return createConfigForReact();
443
+ }
444
+ var typescript = {
445
+ checkOptions: {
446
+ check: true,
447
+ exclude: /node_modules/
448
+ },
449
+ reactDocgen: false
450
+ };
451
+ // Annotate the CommonJS export names for ESM import in node:
452
+ 0 && (module.exports = {
453
+ addons,
454
+ babelDefault,
455
+ previewHead,
456
+ typescript
457
+ });
@@ -0,0 +1,28 @@
1
+ interface PreviewHeadOptions {
2
+ includeBoxSizing?: boolean;
3
+ extraPreviewHeadstyle?: string;
4
+ }
5
+
6
+ declare function export_default(head: any, _options?: Record<PropertyKey, any>, parameters?: PreviewHeadOptions): string;
7
+
8
+ declare const addons: () => (string | {
9
+ name: string;
10
+ options: {
11
+ cssModules: {
12
+ localIdentName: string;
13
+ };
14
+ sass?: {
15
+ implementation: any;
16
+ } | undefined;
17
+ };
18
+ })[];
19
+ declare function babelDefault(config: any): any;
20
+ declare const typescript: {
21
+ checkOptions: {
22
+ check: boolean;
23
+ exclude: RegExp;
24
+ };
25
+ reactDocgen: boolean;
26
+ };
27
+
28
+ export { addons, babelDefault, export_default as previewHead, typescript };
@@ -0,0 +1,28 @@
1
+ interface PreviewHeadOptions {
2
+ includeBoxSizing?: boolean;
3
+ extraPreviewHeadstyle?: string;
4
+ }
5
+
6
+ declare function export_default(head: any, _options?: Record<PropertyKey, any>, parameters?: PreviewHeadOptions): string;
7
+
8
+ declare const addons: () => (string | {
9
+ name: string;
10
+ options: {
11
+ cssModules: {
12
+ localIdentName: string;
13
+ };
14
+ sass?: {
15
+ implementation: any;
16
+ } | undefined;
17
+ };
18
+ })[];
19
+ declare function babelDefault(config: any): any;
20
+ declare const typescript: {
21
+ checkOptions: {
22
+ check: boolean;
23
+ exclude: RegExp;
24
+ };
25
+ reactDocgen: boolean;
26
+ };
27
+
28
+ export { addons, babelDefault, export_default as previewHead, typescript };