@storybook/addon-vitest 10.1.0-alpha.10 → 10.1.0-alpha.12
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/_browser-chunks/chunk-ULSHVN74.js +60 -0
- package/dist/_node-chunks/chunk-2CDZI4WP.js +339 -0
- package/dist/_node-chunks/chunk-3HJX4AQ5.js +1697 -0
- package/dist/_node-chunks/{chunk-7SKPZV4T.js → chunk-4R6Y7BGX.js} +11 -13
- package/dist/_node-chunks/chunk-5ZI5GUBS.js +83 -0
- package/dist/_node-chunks/chunk-AB3B3FVZ.js +69 -0
- package/dist/_node-chunks/chunk-IC274GVS.js +138 -0
- package/dist/_node-chunks/{chunk-7J6TCEGO.js → chunk-PCFYAAN7.js} +14 -19
- package/dist/_node-chunks/{chunk-U3WHYFEY.js → chunk-STKK7R3Q.js} +15 -24
- package/dist/index.js +1 -5
- package/dist/manager.js +163 -354
- package/dist/node/coverage-reporter.js +319 -864
- package/dist/node/vitest.js +189 -454
- package/dist/postinstall.js +476 -1343
- package/dist/preset.js +150 -338
- package/dist/vitest-plugin/global-setup.js +50 -105
- package/dist/vitest-plugin/index.js +1160 -2377
- package/dist/vitest-plugin/setup-file.js +6 -12
- package/dist/vitest-plugin/test-utils.js +31 -71
- package/package.json +3 -3
- package/dist/_browser-chunks/chunk-CAYLRBRX.js +0 -77
- package/dist/_browser-chunks/chunk-JK72E6FR.js +0 -6
- package/dist/_node-chunks/chunk-2GFDFSMJ.js +0 -98
- package/dist/_node-chunks/chunk-2VMVOZSQ.js +0 -247
- package/dist/_node-chunks/chunk-3G477K5F.js +0 -481
- package/dist/_node-chunks/chunk-ESR57AJV.js +0 -105
- package/dist/_node-chunks/chunk-VQBCAO3Q.js +0 -2574
|
@@ -1,35 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_xvxi8m6bww from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_xvxi8m6bww from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_xvxi8m6bww from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_xvxi8m6bww.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_xvxi8m6bww.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_xvxi8m6bww.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
ADDON_ID
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5ZI5GUBS.js";
|
|
15
15
|
import {
|
|
16
16
|
require_picocolors
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-STKK7R3Q.js";
|
|
18
18
|
import {
|
|
19
|
-
__name,
|
|
20
19
|
__toESM
|
|
21
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-PCFYAAN7.js";
|
|
22
21
|
|
|
23
22
|
// src/logger.ts
|
|
24
23
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
25
|
-
var log =
|
|
24
|
+
var log = (message) => {
|
|
26
25
|
console.log(`${import_picocolors.default.magenta(ADDON_ID)}: ${message.toString().trim()}`);
|
|
27
|
-
}
|
|
26
|
+
};
|
|
28
27
|
|
|
29
28
|
// ../../node_modules/es-toolkit/dist/function/noop.mjs
|
|
30
29
|
function noop() {
|
|
31
30
|
}
|
|
32
|
-
__name(noop, "noop");
|
|
33
31
|
|
|
34
32
|
export {
|
|
35
33
|
noop,
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_xvxi8m6bww from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_xvxi8m6bww from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_xvxi8m6bww from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_xvxi8m6bww.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_xvxi8m6bww.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_xvxi8m6bww.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// ../../core/src/component-testing/constants.ts
|
|
14
|
+
var ADDON_ID = "storybook/interactions", PANEL_ID = `${ADDON_ID}/panel`, DOCUMENTATION_LINK = "writing-tests/integrations/vitest-addon", DOCUMENTATION_DISCREPANCY_LINK = `${DOCUMENTATION_LINK}#what-happens-when-there-are-different-test-results-in-multiple-environments`;
|
|
15
|
+
|
|
16
|
+
// ../a11y/src/constants.ts
|
|
17
|
+
var ADDON_ID2 = "storybook/a11y", PANEL_ID2 = `${ADDON_ID2}/panel`;
|
|
18
|
+
var UI_STATE_ID = `${ADDON_ID2}/ui`, RESULT = `${ADDON_ID2}/result`, REQUEST = `${ADDON_ID2}/request`, RUNNING = `${ADDON_ID2}/running`, ERROR = `${ADDON_ID2}/error`, MANUAL = `${ADDON_ID2}/manual`, SELECT = `${ADDON_ID2}/select`, DOCUMENTATION_LINK2 = "writing-tests/accessibility-testing", DOCUMENTATION_DISCREPANCY_LINK2 = `${DOCUMENTATION_LINK2}#why-are-my-tests-failing-in-different-environments`;
|
|
19
|
+
|
|
20
|
+
// src/constants.ts
|
|
21
|
+
var ADDON_ID3 = "storybook/test", TEST_PROVIDER_ID = `${ADDON_ID3}/test-provider`, STORYBOOK_ADDON_TEST_CHANNEL = "STORYBOOK_ADDON_TEST_CHANNEL";
|
|
22
|
+
var DOCUMENTATION_LINK3 = "writing-tests/integrations/vitest-addon", DOCUMENTATION_FATAL_ERROR_LINK = `${DOCUMENTATION_LINK3}#what-happens-if-vitest-itself-has-an-error`, COVERAGE_DIRECTORY = "coverage", SUPPORTED_FRAMEWORKS = [
|
|
23
|
+
"@storybook/nextjs",
|
|
24
|
+
"@storybook/nextjs-vite",
|
|
25
|
+
"@storybook/react-vite",
|
|
26
|
+
"@storybook/preact-vite",
|
|
27
|
+
"@storybook/svelte-vite",
|
|
28
|
+
"@storybook/vue3-vite",
|
|
29
|
+
"@storybook/html-vite",
|
|
30
|
+
"@storybook/web-components-vite",
|
|
31
|
+
"@storybook/sveltekit",
|
|
32
|
+
"@storybook/react-native-web-vite"
|
|
33
|
+
], storeOptions = {
|
|
34
|
+
id: ADDON_ID3,
|
|
35
|
+
initialState: {
|
|
36
|
+
config: {
|
|
37
|
+
coverage: !1,
|
|
38
|
+
a11y: !1
|
|
39
|
+
},
|
|
40
|
+
watching: !1,
|
|
41
|
+
cancelling: !1,
|
|
42
|
+
fatalError: void 0,
|
|
43
|
+
indexUrl: void 0,
|
|
44
|
+
previewAnnotations: [],
|
|
45
|
+
currentRun: {
|
|
46
|
+
triggeredBy: void 0,
|
|
47
|
+
config: {
|
|
48
|
+
coverage: !1,
|
|
49
|
+
a11y: !1
|
|
50
|
+
},
|
|
51
|
+
componentTestCount: {
|
|
52
|
+
success: 0,
|
|
53
|
+
error: 0
|
|
54
|
+
},
|
|
55
|
+
a11yCount: {
|
|
56
|
+
success: 0,
|
|
57
|
+
warning: 0,
|
|
58
|
+
error: 0
|
|
59
|
+
},
|
|
60
|
+
storyIds: void 0,
|
|
61
|
+
totalTestCount: void 0,
|
|
62
|
+
startedAt: void 0,
|
|
63
|
+
finishedAt: void 0,
|
|
64
|
+
unhandledErrors: [],
|
|
65
|
+
coverageSummary: void 0
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
var STORE_CHANNEL_EVENT_NAME = `UNIVERSAL_STORE:${storeOptions.id}`, STATUS_STORE_CHANNEL_EVENT_NAME = "UNIVERSAL_STORE:storybook/status", TEST_PROVIDER_STORE_CHANNEL_EVENT_NAME = "UNIVERSAL_STORE:storybook/test-provider", STATUS_TYPE_ID_COMPONENT_TEST = "storybook/component-test", STATUS_TYPE_ID_A11Y = "storybook/a11y";
|
|
70
|
+
|
|
71
|
+
export {
|
|
72
|
+
ADDON_ID3 as ADDON_ID,
|
|
73
|
+
STORYBOOK_ADDON_TEST_CHANNEL,
|
|
74
|
+
DOCUMENTATION_LINK3 as DOCUMENTATION_LINK,
|
|
75
|
+
COVERAGE_DIRECTORY,
|
|
76
|
+
SUPPORTED_FRAMEWORKS,
|
|
77
|
+
storeOptions,
|
|
78
|
+
STORE_CHANNEL_EVENT_NAME,
|
|
79
|
+
STATUS_STORE_CHANNEL_EVENT_NAME,
|
|
80
|
+
TEST_PROVIDER_STORE_CHANNEL_EVENT_NAME,
|
|
81
|
+
STATUS_TYPE_ID_COMPONENT_TEST,
|
|
82
|
+
STATUS_TYPE_ID_A11Y
|
|
83
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_xvxi8m6bww from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_xvxi8m6bww from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_xvxi8m6bww from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_xvxi8m6bww.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_xvxi8m6bww.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_xvxi8m6bww.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// src/utils.ts
|
|
14
|
+
function getAddonNames(mainConfig) {
|
|
15
|
+
return (mainConfig.addons || []).map((addon) => {
|
|
16
|
+
let name = "";
|
|
17
|
+
return typeof addon == "string" ? name = addon : typeof addon == "object" && (name = addon.name), name;
|
|
18
|
+
}).filter((item) => item != null);
|
|
19
|
+
}
|
|
20
|
+
function errorToErrorLike(error) {
|
|
21
|
+
return {
|
|
22
|
+
message: error.message,
|
|
23
|
+
name: error.name,
|
|
24
|
+
// avoid duplicating the error message in the stack trace
|
|
25
|
+
stack: error.stack?.replace(error.message, ""),
|
|
26
|
+
cause: error.cause && error.cause instanceof Error ? errorToErrorLike(error.cause) : void 0
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// ../../node_modules/empathic/find.mjs
|
|
31
|
+
import { join as join2 } from "node:path";
|
|
32
|
+
import { existsSync, statSync } from "node:fs";
|
|
33
|
+
|
|
34
|
+
// ../../node_modules/empathic/walk.mjs
|
|
35
|
+
import { dirname } from "node:path";
|
|
36
|
+
|
|
37
|
+
// ../../node_modules/empathic/resolve.mjs
|
|
38
|
+
import { isAbsolute, join, resolve } from "node:path";
|
|
39
|
+
function absolute(input, root) {
|
|
40
|
+
return isAbsolute(input) ? input : resolve(root || ".", input);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// ../../node_modules/empathic/walk.mjs
|
|
44
|
+
function up(base, options) {
|
|
45
|
+
let { last, cwd } = options || {}, tmp = absolute(base, cwd), root = absolute(last || "/", cwd), prev, arr = [];
|
|
46
|
+
for (; prev !== root && (arr.push(tmp), tmp = dirname(prev = tmp), tmp !== prev); )
|
|
47
|
+
;
|
|
48
|
+
return arr;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// ../../node_modules/empathic/find.mjs
|
|
52
|
+
function up2(name, options) {
|
|
53
|
+
let dir, tmp, start = options && options.cwd || "";
|
|
54
|
+
for (dir of up(start, options))
|
|
55
|
+
if (tmp = join2(dir, name), existsSync(tmp)) return tmp;
|
|
56
|
+
}
|
|
57
|
+
function any(names, options) {
|
|
58
|
+
let dir, start = options && options.cwd || "", j = 0, len = names.length, tmp;
|
|
59
|
+
for (dir of up(start, options))
|
|
60
|
+
for (j = 0; j < len; j++)
|
|
61
|
+
if (tmp = join2(dir, names[j]), existsSync(tmp)) return tmp;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export {
|
|
65
|
+
getAddonNames,
|
|
66
|
+
errorToErrorLike,
|
|
67
|
+
up2 as up,
|
|
68
|
+
any
|
|
69
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_xvxi8m6bww from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_xvxi8m6bww from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_xvxi8m6bww from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_xvxi8m6bww.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_xvxi8m6bww.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_xvxi8m6bww.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// ../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
14
|
+
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
15
|
+
function normalizeWindowsPath(input = "") {
|
|
16
|
+
return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
17
|
+
}
|
|
18
|
+
var _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/, _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/, sep = "/", delimiter = ":", normalize = function(path2) {
|
|
19
|
+
if (path2.length === 0)
|
|
20
|
+
return ".";
|
|
21
|
+
path2 = normalizeWindowsPath(path2);
|
|
22
|
+
let isUNCPath = path2.match(_UNC_REGEX), isPathAbsolute = isAbsolute(path2), trailingSeparator = path2[path2.length - 1] === "/";
|
|
23
|
+
return path2 = normalizeString(path2, !isPathAbsolute), path2.length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path2 += "/"), _DRIVE_LETTER_RE.test(path2) && (path2 += "/"), isUNCPath ? isPathAbsolute ? `//${path2}` : `//./${path2}` : isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2);
|
|
24
|
+
}, join = function(...arguments_) {
|
|
25
|
+
if (arguments_.length === 0)
|
|
26
|
+
return ".";
|
|
27
|
+
let joined;
|
|
28
|
+
for (let argument of arguments_)
|
|
29
|
+
argument && argument.length > 0 && (joined === void 0 ? joined = argument : joined += `/${argument}`);
|
|
30
|
+
return joined === void 0 ? "." : normalize(joined.replace(/\/\/+/g, "/"));
|
|
31
|
+
};
|
|
32
|
+
function cwd() {
|
|
33
|
+
return typeof process < "u" && typeof process.cwd == "function" ? process.cwd().replace(/\\/g, "/") : "/";
|
|
34
|
+
}
|
|
35
|
+
var resolve = function(...arguments_) {
|
|
36
|
+
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
37
|
+
let resolvedPath = "", resolvedAbsolute = !1;
|
|
38
|
+
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
39
|
+
let path2 = index >= 0 ? arguments_[index] : cwd();
|
|
40
|
+
!path2 || path2.length === 0 || (resolvedPath = `${path2}/${resolvedPath}`, resolvedAbsolute = isAbsolute(path2));
|
|
41
|
+
}
|
|
42
|
+
return resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : ".";
|
|
43
|
+
};
|
|
44
|
+
function normalizeString(path2, allowAboveRoot) {
|
|
45
|
+
let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
|
|
46
|
+
for (let index = 0; index <= path2.length; ++index) {
|
|
47
|
+
if (index < path2.length)
|
|
48
|
+
char = path2[index];
|
|
49
|
+
else {
|
|
50
|
+
if (char === "/")
|
|
51
|
+
break;
|
|
52
|
+
char = "/";
|
|
53
|
+
}
|
|
54
|
+
if (char === "/") {
|
|
55
|
+
if (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {
|
|
56
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
57
|
+
if (res.length > 2) {
|
|
58
|
+
let lastSlashIndex = res.lastIndexOf("/");
|
|
59
|
+
lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
|
|
60
|
+
continue;
|
|
61
|
+
} else if (res.length > 0) {
|
|
62
|
+
res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
|
|
67
|
+
} else
|
|
68
|
+
res.length > 0 ? res += `/${path2.slice(lastSlash + 1, index)}` : res = path2.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
|
|
69
|
+
lastSlash = index, dots = 0;
|
|
70
|
+
} else char === "." && dots !== -1 ? ++dots : dots = -1;
|
|
71
|
+
}
|
|
72
|
+
return res;
|
|
73
|
+
}
|
|
74
|
+
var isAbsolute = function(p) {
|
|
75
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
76
|
+
}, toNamespacedPath = function(p) {
|
|
77
|
+
return normalizeWindowsPath(p);
|
|
78
|
+
}, _EXTNAME_RE = /.(\.[^./]+)$/, extname = function(p) {
|
|
79
|
+
let match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
|
|
80
|
+
return match && match[1] || "";
|
|
81
|
+
}, relative = function(from, to) {
|
|
82
|
+
let _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/"), _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
83
|
+
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0])
|
|
84
|
+
return _to.join("/");
|
|
85
|
+
let _fromCopy = [..._from];
|
|
86
|
+
for (let segment of _fromCopy) {
|
|
87
|
+
if (_to[0] !== segment)
|
|
88
|
+
break;
|
|
89
|
+
_from.shift(), _to.shift();
|
|
90
|
+
}
|
|
91
|
+
return [..._from.map(() => ".."), ..._to].join("/");
|
|
92
|
+
}, dirname = function(p) {
|
|
93
|
+
let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
94
|
+
return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
95
|
+
}, format = function(p) {
|
|
96
|
+
let segments = [p.root, p.dir, p.base ?? p.name + p.ext].filter(Boolean);
|
|
97
|
+
return normalizeWindowsPath(
|
|
98
|
+
p.root ? resolve(...segments) : segments.join("/")
|
|
99
|
+
);
|
|
100
|
+
}, basename = function(p, extension) {
|
|
101
|
+
let lastSegment = normalizeWindowsPath(p).split("/").pop();
|
|
102
|
+
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
103
|
+
}, parse = function(p) {
|
|
104
|
+
let root = normalizeWindowsPath(p).split("/").shift() || "/", base = basename(p), extension = extname(base);
|
|
105
|
+
return {
|
|
106
|
+
root,
|
|
107
|
+
dir: dirname(p),
|
|
108
|
+
base,
|
|
109
|
+
ext: extension,
|
|
110
|
+
name: base.slice(0, base.length - extension.length)
|
|
111
|
+
};
|
|
112
|
+
}, path = {
|
|
113
|
+
__proto__: null,
|
|
114
|
+
basename,
|
|
115
|
+
delimiter,
|
|
116
|
+
dirname,
|
|
117
|
+
extname,
|
|
118
|
+
format,
|
|
119
|
+
isAbsolute,
|
|
120
|
+
join,
|
|
121
|
+
normalize,
|
|
122
|
+
normalizeString,
|
|
123
|
+
parse,
|
|
124
|
+
relative,
|
|
125
|
+
resolve,
|
|
126
|
+
sep,
|
|
127
|
+
toNamespacedPath
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export {
|
|
131
|
+
sep,
|
|
132
|
+
normalize,
|
|
133
|
+
join,
|
|
134
|
+
resolve,
|
|
135
|
+
relative,
|
|
136
|
+
dirname,
|
|
137
|
+
path
|
|
138
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_xvxi8m6bww from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_xvxi8m6bww from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_xvxi8m6bww from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_xvxi8m6bww.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_xvxi8m6bww.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_xvxi8m6bww.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,24 +13,20 @@ var __create = Object.create;
|
|
|
13
13
|
var __defProp = Object.defineProperty;
|
|
14
14
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15
15
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
16
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
20
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
16
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17
|
+
var __require = /* @__PURE__ */ ((x) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(x, {
|
|
18
|
+
get: (a, b) => (typeof require < "u" ? require : a)[b]
|
|
21
19
|
}) : x)(function(x) {
|
|
22
|
-
if (typeof require
|
|
20
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
23
21
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
24
22
|
});
|
|
25
|
-
var __commonJS = (cb, mod) => function
|
|
23
|
+
var __commonJS = (cb, mod) => function() {
|
|
26
24
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
27
25
|
};
|
|
28
26
|
var __copyProps = (to, from, except, desc) => {
|
|
29
|
-
if (from && typeof from
|
|
27
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
30
28
|
for (let key of __getOwnPropNames(from))
|
|
31
|
-
|
|
32
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
33
|
-
}
|
|
29
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
30
|
return to;
|
|
35
31
|
};
|
|
36
32
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
@@ -38,12 +34,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
38
34
|
// file that has been converted to a CommonJS file using a Babel-
|
|
39
35
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
40
36
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
41
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable:
|
|
37
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
42
38
|
mod
|
|
43
39
|
));
|
|
44
40
|
|
|
45
41
|
export {
|
|
46
|
-
__name,
|
|
47
42
|
__require,
|
|
48
43
|
__commonJS,
|
|
49
44
|
__toESM
|
|
@@ -1,40 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_xvxi8m6bww from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_xvxi8m6bww from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_xvxi8m6bww from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_xvxi8m6bww.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_xvxi8m6bww.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_xvxi8m6bww.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
|
-
__commonJS
|
|
14
|
-
|
|
15
|
-
} from "./chunk-7J6TCEGO.js";
|
|
13
|
+
__commonJS
|
|
14
|
+
} from "./chunk-PCFYAAN7.js";
|
|
16
15
|
|
|
17
16
|
// ../../node_modules/picocolors/picocolors.js
|
|
18
17
|
var require_picocolors = __commonJS({
|
|
19
18
|
"../../node_modules/picocolors/picocolors.js"(exports, module) {
|
|
20
|
-
var p = process || {}
|
|
21
|
-
var argv = p.argv || [];
|
|
22
|
-
var env = p.env || {};
|
|
23
|
-
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
24
|
-
var formatter = /* @__PURE__ */ __name((open, close, replace = open) => (input) => {
|
|
19
|
+
var p = process || {}, argv = p.argv || [], env = p.env || {}, isColorSupported = !(env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI), formatter = (open, close, replace = open) => (input) => {
|
|
25
20
|
let string = "" + input, index = string.indexOf(close, open.length);
|
|
26
21
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
27
|
-
},
|
|
28
|
-
var replaceClose = /* @__PURE__ */ __name((string, close, replace, index) => {
|
|
22
|
+
}, replaceClose = (string, close, replace, index) => {
|
|
29
23
|
let result = "", cursor = 0;
|
|
30
|
-
do
|
|
31
|
-
result += string.substring(cursor, index) + replace;
|
|
32
|
-
|
|
33
|
-
index = string.indexOf(close, cursor);
|
|
34
|
-
} while (~index);
|
|
24
|
+
do
|
|
25
|
+
result += string.substring(cursor, index) + replace, cursor = index + close.length, index = string.indexOf(close, cursor);
|
|
26
|
+
while (~index);
|
|
35
27
|
return result + string.substring(cursor);
|
|
36
|
-
},
|
|
37
|
-
var createColors = /* @__PURE__ */ __name((enabled = isColorSupported) => {
|
|
28
|
+
}, createColors = (enabled = isColorSupported) => {
|
|
38
29
|
let f = enabled ? formatter : () => String;
|
|
39
30
|
return {
|
|
40
31
|
isColorSupported: enabled,
|
|
@@ -80,7 +71,7 @@ var require_picocolors = __commonJS({
|
|
|
80
71
|
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
81
72
|
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
82
73
|
};
|
|
83
|
-
}
|
|
74
|
+
};
|
|
84
75
|
module.exports = createColors();
|
|
85
76
|
module.exports.createColors = createColors;
|
|
86
77
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./_browser-chunks/chunk-JK72E6FR.js";
|
|
4
|
-
|
|
5
1
|
// src/index.ts
|
|
6
2
|
import { definePreviewAddon } from "storybook/internal/csf";
|
|
7
|
-
var index_default =
|
|
3
|
+
var index_default = () => definePreviewAddon({});
|
|
8
4
|
export {
|
|
9
5
|
index_default as default
|
|
10
6
|
};
|