storybook 10.1.0-alpha.9 → 10.1.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/dist/_browser-chunks/Color-FTG7SQDA.js +1097 -0
- package/dist/_browser-chunks/WithTooltip-LMROHDUP.js +1651 -0
- package/dist/_browser-chunks/chunk-2FRVAXCZ.js +7 -0
- package/dist/_browser-chunks/{chunk-FDWKXLBI.js → chunk-2XZMBGTA.js} +44 -109
- package/dist/_browser-chunks/chunk-3IAH5M2U.js +171 -0
- package/dist/_browser-chunks/chunk-3OXGAGBE.js +779 -0
- package/dist/_browser-chunks/{chunk-TMDZCWME.js → chunk-3PJE6VLG.js} +1 -3
- package/dist/_browser-chunks/{chunk-VAMFPZY3.js → chunk-45UGUKRX.js} +2 -7
- package/dist/_browser-chunks/chunk-6XWLIJQL.js +11 -0
- package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
- package/dist/_browser-chunks/chunk-AIOS4NGK.js +252 -0
- package/dist/_browser-chunks/chunk-AS2HQEYC.js +14 -0
- package/dist/_browser-chunks/chunk-AXG2BOBL.js +836 -0
- package/dist/_browser-chunks/{chunk-MH6AXFXB.js → chunk-CHUV5WSW.js} +0 -5
- package/dist/_browser-chunks/chunk-EUVGDK4H.js +93 -0
- package/dist/_browser-chunks/chunk-EZSQOHRI.js +18 -0
- package/dist/_browser-chunks/{chunk-CADGRH3P.js → chunk-FNXWN6IK.js} +3 -8
- package/dist/_browser-chunks/chunk-FQ7SLVLR.js +66 -0
- package/dist/_browser-chunks/chunk-GFLS4VP3.js +64 -0
- package/dist/_browser-chunks/chunk-GFY5R5EY.js +47 -0
- package/dist/_browser-chunks/{chunk-L2D73C6Z.js → chunk-H6XK3RSC.js} +13 -21
- package/dist/_browser-chunks/chunk-IPA5A322.js +71 -0
- package/dist/_browser-chunks/chunk-JP7NCOJX.js +37 -0
- package/dist/_browser-chunks/chunk-KJHJLCBK.js +11 -0
- package/dist/_browser-chunks/{chunk-OWPZQM2D.js → chunk-L4RMQ7D7.js} +60 -110
- package/dist/_browser-chunks/chunk-P4F4UVXX.js +951 -0
- package/dist/_browser-chunks/{chunk-AB7OOPUX.js → chunk-QKODTO7K.js} +0 -5
- package/dist/_browser-chunks/chunk-RP5RXKFU.js +2491 -0
- package/dist/_browser-chunks/chunk-SL75JR6Y.js +9 -0
- package/dist/_browser-chunks/chunk-SS2NHR7W.js +2969 -0
- package/dist/_browser-chunks/chunk-UD6FQLAF.js +1481 -0
- package/dist/_browser-chunks/chunk-VYJQ7RU5.js +2853 -0
- package/dist/_browser-chunks/chunk-WJYERY3R.js +136 -0
- package/dist/_browser-chunks/chunk-XJNX76GA.js +85 -0
- package/dist/_browser-chunks/{chunk-F4Q6SGTB.js → chunk-YKE5S47A.js} +177 -399
- package/dist/_browser-chunks/{chunk-SN4J4IQ3.js → chunk-ZUWEVLDX.js} +1 -7
- package/dist/_browser-chunks/{formatter-OMEEQ6HG.js → formatter-QJ4M4OGQ.js} +4 -9
- package/dist/_browser-chunks/{syntaxhighlighter-CAVLW7PM.js → syntaxhighlighter-IQDEPFLK.js} +704 -1848
- package/dist/_node-chunks/{builder-manager-SM3UWERX.js → builder-manager-BDAQHXFI.js} +510 -1019
- package/dist/_node-chunks/camelcase-3C7DZZPX.js +37 -0
- package/dist/_node-chunks/chunk-2IIQTGNE.js +6024 -0
- package/dist/_node-chunks/chunk-56U5LEMP.js +3043 -0
- package/dist/_node-chunks/chunk-7LIRCAQE.js +20 -0
- package/dist/_node-chunks/chunk-7RN6TXKP.js +603 -0
- package/dist/_node-chunks/chunk-7SJ7PZNL.js +4523 -0
- package/dist/_node-chunks/{chunk-HHSTA6QS.js → chunk-BG4RDXG7.js} +8 -10
- package/dist/_node-chunks/chunk-CBQKMXLQ.js +18 -0
- package/dist/_node-chunks/chunk-CN2IW2KQ.js +1564 -0
- package/dist/_node-chunks/chunk-CQMAU6UQ.js +943 -0
- package/dist/_node-chunks/{chunk-EBUEXRH5.js → chunk-D6ND3TVY.js} +116 -276
- package/dist/_node-chunks/chunk-DC355CYB.js +61 -0
- package/dist/_node-chunks/{chunk-SGM3ZCCT.js → chunk-EVK2SBW5.js} +292 -688
- package/dist/_node-chunks/chunk-IXWEUXJ2.js +119 -0
- package/dist/_node-chunks/{chunk-F6EFOEC7.js → chunk-KVRF22SH.js} +469 -983
- package/dist/_node-chunks/chunk-LEDP4QQW.js +919 -0
- package/dist/_node-chunks/{chunk-GHIBZRKD.js → chunk-MMVV6DGG.js} +8133 -8887
- package/dist/_node-chunks/chunk-O5CGEVRI.js +29 -0
- package/dist/_node-chunks/chunk-OZZO56XN.js +299 -0
- package/dist/_node-chunks/chunk-POT2EVGD.js +78 -0
- package/dist/_node-chunks/chunk-R5YGFSTV.js +3781 -0
- package/dist/_node-chunks/chunk-SQCTM2OS.js +23 -0
- package/dist/_node-chunks/chunk-UFOFO5H7.js +54 -0
- package/dist/_node-chunks/chunk-VBF7ALJF.js +72 -0
- package/dist/_node-chunks/chunk-W6MAMTUF.js +70 -0
- package/dist/_node-chunks/chunk-WURL4XOT.js +46662 -0
- package/dist/_node-chunks/chunk-XGK6MVKR.js +61 -0
- package/dist/_node-chunks/chunk-YV3GDSDT.js +765 -0
- package/dist/_node-chunks/{chunk-ATDHMMIZ.js → chunk-YWV55YW3.js} +15 -24
- package/dist/_node-chunks/dist-KEP4IFRN.js +121 -0
- package/dist/_node-chunks/globby-4WUBTDCN.js +3452 -0
- package/dist/_node-chunks/lib-JVOEKTYM.js +366 -0
- package/dist/_node-chunks/mdx-N42X6CFJ-C5WFYYXR.js +14329 -0
- package/dist/_node-chunks/p-limit-LDY632RS.js +116 -0
- package/dist/actions/decorator.js +21 -42
- package/dist/actions/index.js +3 -3
- package/dist/babel/index.d.ts +671 -335
- package/dist/babel/index.js +10 -11
- package/dist/bin/core.js +601 -1548
- package/dist/bin/dispatcher.js +36 -36
- package/dist/bin/loader.js +24 -38
- package/dist/channels/index.js +98 -234
- package/dist/cli/index.d.ts +1479 -133
- package/dist/cli/index.js +30 -8540
- package/dist/client-logger/index.js +31 -61
- package/dist/common/index.d.ts +139 -62
- package/dist/common/index.js +66 -51
- package/dist/components/index.d.ts +575 -273
- package/dist/components/index.js +14863 -4313
- package/dist/core-events/index.js +2 -66
- package/dist/core-server/index.d.ts +3 -2
- package/dist/core-server/index.js +2908 -8518
- package/dist/core-server/presets/common-manager.css +2 -2
- package/dist/core-server/presets/common-manager.js +2521 -5233
- package/dist/core-server/presets/common-override-preset.js +31 -60
- package/dist/core-server/presets/common-preset.js +663 -962
- package/dist/csf/index.js +534 -1179
- package/dist/csf-tools/index.js +9 -9
- package/dist/docs-tools/index.js +6 -6
- package/dist/highlight/index.js +2 -2
- package/dist/instrumenter/index.js +199 -415
- package/dist/manager/globals-runtime.js +59044 -67141
- package/dist/manager/globals.js +2 -3
- package/dist/manager/manager-stores.d.ts +1 -0
- package/dist/manager/manager-stores.js +23 -0
- package/dist/manager/runtime.js +11511 -10953
- package/dist/manager-api/index.d.ts +1811 -2
- package/dist/manager-api/index.js +1348 -2401
- package/dist/manager-errors.d.ts +9 -0
- package/dist/manager-errors.js +3 -3
- package/dist/mocking-utils/index.d.ts +1126 -0
- package/dist/mocking-utils/index.js +1181 -0
- package/dist/node-logger/index.d.ts +192 -24
- package/dist/node-logger/index.js +23 -4471
- package/dist/preview/globals.js +2 -3
- package/dist/preview/runtime.js +10799 -22393
- package/dist/preview-api/index.d.ts +68 -69
- package/dist/preview-api/index.js +13 -13
- package/dist/preview-errors.d.ts +9 -0
- package/dist/preview-errors.js +4 -4
- package/dist/router/index.js +347 -899
- package/dist/server-errors.d.ts +34 -1
- package/dist/server-errors.js +17 -10
- package/dist/telemetry/index.d.ts +24 -3
- package/dist/telemetry/index.js +25 -24
- package/dist/test/index.js +6131 -11916
- package/dist/theming/create.d.ts +1 -0
- package/dist/theming/create.js +4 -4
- package/dist/theming/index.d.ts +3366 -2599
- package/dist/theming/index.js +501 -1091
- package/dist/types/index.d.ts +72 -8
- package/dist/types/index.js +27 -12
- package/dist/viewport/index.js +3 -3
- package/package.json +26 -17
- package/dist/_browser-chunks/Color-7ZNS6F6B.js +0 -1676
- package/dist/_browser-chunks/WithTooltip-SK46ZJ2J.js +0 -13
- package/dist/_browser-chunks/chunk-6A7OIVEL.js +0 -66
- package/dist/_browser-chunks/chunk-B4A3ADP3.js +0 -3816
- package/dist/_browser-chunks/chunk-BOOOPFZF.js +0 -2335
- package/dist/_browser-chunks/chunk-FSBVR7H5.js +0 -106
- package/dist/_browser-chunks/chunk-FUOHXXZT.js +0 -23
- package/dist/_browser-chunks/chunk-GTKOCWCT.js +0 -17
- package/dist/_browser-chunks/chunk-HHW4FUMO.js +0 -12
- package/dist/_browser-chunks/chunk-JVSKG4YS.js +0 -4052
- package/dist/_browser-chunks/chunk-LASUB7TL.js +0 -76
- package/dist/_browser-chunks/chunk-LYCSRYYR.js +0 -101
- package/dist/_browser-chunks/chunk-NVV6MIOE.js +0 -243
- package/dist/_browser-chunks/chunk-OBXWFEPB.js +0 -852
- package/dist/_browser-chunks/chunk-OPCDBBL3.js +0 -48
- package/dist/_browser-chunks/chunk-PB6FZ3WE.js +0 -130
- package/dist/_browser-chunks/chunk-RNE2IUTB.js +0 -1300
- package/dist/_browser-chunks/chunk-RW5PKMWM.js +0 -4182
- package/dist/_browser-chunks/chunk-SYS437NN.js +0 -122
- package/dist/_browser-chunks/chunk-U46RQHA4.js +0 -12
- package/dist/_browser-chunks/chunk-UTNZYD2N.js +0 -311
- package/dist/_browser-chunks/chunk-VUAFL5XK.js +0 -20
- package/dist/_browser-chunks/chunk-XDGMHOV7.js +0 -2197
- package/dist/_browser-chunks/chunk-XW6KSYKF.js +0 -16
- package/dist/_browser-chunks/chunk-Y3M7TW6K.js +0 -1041
- package/dist/_browser-chunks/chunk-ZNRFDIVA.js +0 -233
- package/dist/_node-chunks/camelcase-H5QSGQLK.js +0 -18
- package/dist/_node-chunks/chunk-3THWHQOC.js +0 -61
- package/dist/_node-chunks/chunk-45YUOLTU.js +0 -69
- package/dist/_node-chunks/chunk-4QSNCPAU.js +0 -64656
- package/dist/_node-chunks/chunk-744PQSOU.js +0 -79
- package/dist/_node-chunks/chunk-74Z2U7QG.js +0 -1544
- package/dist/_node-chunks/chunk-7MB7TFPO.js +0 -1198
- package/dist/_node-chunks/chunk-A7GS4RFT.js +0 -697
- package/dist/_node-chunks/chunk-BIA3A5UM.js +0 -61
- package/dist/_node-chunks/chunk-C5G7CLWX.js +0 -1657
- package/dist/_node-chunks/chunk-DLFUKMYJ.js +0 -1531
- package/dist/_node-chunks/chunk-EMRGRXKT.js +0 -111
- package/dist/_node-chunks/chunk-EX46EHHY.js +0 -420
- package/dist/_node-chunks/chunk-F76QKNOJ.js +0 -304
- package/dist/_node-chunks/chunk-HDCRUTEF.js +0 -220
- package/dist/_node-chunks/chunk-HUYAOIPH.js +0 -90
- package/dist/_node-chunks/chunk-IBJZQZJC.js +0 -101
- package/dist/_node-chunks/chunk-KZN2RDDT.js +0 -6712
- package/dist/_node-chunks/chunk-LYUNFU3F.js +0 -4741
- package/dist/_node-chunks/chunk-N44SIS6K.js +0 -28
- package/dist/_node-chunks/chunk-NILZM6KR.js +0 -18
- package/dist/_node-chunks/chunk-PC4ZRP6W.js +0 -34
- package/dist/_node-chunks/chunk-TJNGOQUH.js +0 -4272
- package/dist/_node-chunks/chunk-UBSYLHIL.js +0 -1250
- package/dist/_node-chunks/chunk-UTCLXPOC.js +0 -1518
- package/dist/_node-chunks/chunk-WOXXODXP.js +0 -5029
- package/dist/_node-chunks/chunk-XC4MEUA6.js +0 -1586
- package/dist/_node-chunks/chunk-YRXXMKRR.js +0 -2256
- package/dist/_node-chunks/dist-SL73W244.js +0 -175
- package/dist/_node-chunks/globby-ZSHAUQZ5.js +0 -5222
- package/dist/_node-chunks/lib-U2VIPUTI.js +0 -518
- package/dist/_node-chunks/mdx-N42X6CFJ-ZLHD33JK.js +0 -22017
- package/dist/_node-chunks/p-limit-K5BS5MSV.js +0 -168
- package/dist/_node-chunks/plugin-5PD4YIUH.js +0 -129
- package/dist/_node-chunks/plugin-MONDT2WL.js +0 -159
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-EUZJRG3W.js +0 -69102
- package/dist/_node-chunks/webpack-mock-plugin-T4LDXEHE.js +0 -124
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +0 -36
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +0 -33
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./chunk-MM7DTO55.js";
|
|
4
|
-
|
|
5
|
-
// src/storybook-error.ts
|
|
6
|
-
function parseErrorCode({
|
|
7
|
-
code,
|
|
8
|
-
category
|
|
9
|
-
}) {
|
|
10
|
-
const paddedCode = String(code).padStart(4, "0");
|
|
11
|
-
return `SB_${category}_${paddedCode}`;
|
|
12
|
-
}
|
|
13
|
-
__name(parseErrorCode, "parseErrorCode");
|
|
14
|
-
function appendErrorRef(url) {
|
|
15
|
-
if (/^(?!.*storybook\.js\.org)|[?&]ref=error\b/.test(url)) {
|
|
16
|
-
return url;
|
|
17
|
-
}
|
|
18
|
-
try {
|
|
19
|
-
const urlObj = new URL(url);
|
|
20
|
-
urlObj.searchParams.set("ref", "error");
|
|
21
|
-
return urlObj.toString();
|
|
22
|
-
} catch {
|
|
23
|
-
return url;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
__name(appendErrorRef, "appendErrorRef");
|
|
27
|
-
var _StorybookError = class _StorybookError extends Error {
|
|
28
|
-
constructor(props) {
|
|
29
|
-
super(_StorybookError.getFullMessage(props));
|
|
30
|
-
/**
|
|
31
|
-
* Data associated with the error. Used to provide additional information in the error message or
|
|
32
|
-
* to be passed to telemetry.
|
|
33
|
-
*/
|
|
34
|
-
this.data = {};
|
|
35
|
-
/** Flag used to easily determine if the error originates from Storybook. */
|
|
36
|
-
this.fromStorybook = true;
|
|
37
|
-
this.category = props.category;
|
|
38
|
-
this.documentation = props.documentation ?? false;
|
|
39
|
-
this.code = props.code;
|
|
40
|
-
}
|
|
41
|
-
get fullErrorCode() {
|
|
42
|
-
return parseErrorCode({ code: this.code, category: this.category });
|
|
43
|
-
}
|
|
44
|
-
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
|
|
45
|
-
get name() {
|
|
46
|
-
const errorName = this.constructor.name;
|
|
47
|
-
return `${this.fullErrorCode} (${errorName})`;
|
|
48
|
-
}
|
|
49
|
-
/** Generates the error message along with additional documentation link (if applicable). */
|
|
50
|
-
static getFullMessage({
|
|
51
|
-
documentation,
|
|
52
|
-
code,
|
|
53
|
-
category,
|
|
54
|
-
message
|
|
55
|
-
}) {
|
|
56
|
-
let page;
|
|
57
|
-
if (documentation === true) {
|
|
58
|
-
page = `https://storybook.js.org/error/${parseErrorCode({ code, category })}?ref=error`;
|
|
59
|
-
} else if (typeof documentation === "string") {
|
|
60
|
-
page = appendErrorRef(documentation);
|
|
61
|
-
} else if (Array.isArray(documentation)) {
|
|
62
|
-
page = `
|
|
63
|
-
${documentation.map((doc) => ` - ${appendErrorRef(doc)}`).join("\n")}`;
|
|
64
|
-
}
|
|
65
|
-
return `${message}${page != null ? `
|
|
66
|
-
|
|
67
|
-
More info: ${page}
|
|
68
|
-
` : ""}`;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
__name(_StorybookError, "StorybookError");
|
|
72
|
-
var StorybookError = _StorybookError;
|
|
73
|
-
|
|
74
|
-
export {
|
|
75
|
-
StorybookError
|
|
76
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./chunk-MM7DTO55.js";
|
|
4
|
-
|
|
5
|
-
// src/preview-api/modules/preview-web/render/animation-utils.ts
|
|
6
|
-
var ANIMATION_TIMEOUT = 5e3;
|
|
7
|
-
function isTestEnvironment() {
|
|
8
|
-
try {
|
|
9
|
-
return (
|
|
10
|
-
// @ts-expect-error This property exists in Vitest browser mode
|
|
11
|
-
!!globalThis.__vitest_browser__ || !!globalThis.window?.navigator?.userAgent?.match(/StorybookTestRunner/)
|
|
12
|
-
);
|
|
13
|
-
} catch {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
__name(isTestEnvironment, "isTestEnvironment");
|
|
18
|
-
function pauseAnimations(atEnd = true) {
|
|
19
|
-
if (!("document" in globalThis && "createElement" in globalThis.document)) {
|
|
20
|
-
return () => {
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
const disableStyle = document.createElement("style");
|
|
24
|
-
disableStyle.textContent = `*, *:before, *:after {
|
|
25
|
-
animation: none !important;
|
|
26
|
-
}`;
|
|
27
|
-
document.head.appendChild(disableStyle);
|
|
28
|
-
const pauseStyle = document.createElement("style");
|
|
29
|
-
pauseStyle.textContent = `*, *:before, *:after {
|
|
30
|
-
animation-delay: 0s !important;
|
|
31
|
-
animation-direction: ${atEnd ? "reverse" : "normal"} !important;
|
|
32
|
-
animation-play-state: paused !important;
|
|
33
|
-
transition: none !important;
|
|
34
|
-
}`;
|
|
35
|
-
document.head.appendChild(pauseStyle);
|
|
36
|
-
document.body.clientHeight;
|
|
37
|
-
document.head.removeChild(disableStyle);
|
|
38
|
-
return () => {
|
|
39
|
-
pauseStyle.parentNode?.removeChild(pauseStyle);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
__name(pauseAnimations, "pauseAnimations");
|
|
43
|
-
async function waitForAnimations(signal) {
|
|
44
|
-
if (!("document" in globalThis && "getAnimations" in globalThis.document && "querySelectorAll" in globalThis.document)) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
let timedOut = false;
|
|
48
|
-
await Promise.race([
|
|
49
|
-
// After 50ms, retrieve any running animations and wait for them to finish
|
|
50
|
-
// If new animations are created while waiting, we'll wait for them too
|
|
51
|
-
new Promise((resolve) => {
|
|
52
|
-
setTimeout(() => {
|
|
53
|
-
const animationRoots = [globalThis.document, ...getShadowRoots(globalThis.document)];
|
|
54
|
-
const checkAnimationsFinished = /* @__PURE__ */ __name(async () => {
|
|
55
|
-
if (timedOut || signal?.aborted) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
const runningAnimations = animationRoots.flatMap((el) => el?.getAnimations?.() || []).filter((a) => a.playState === "running" && !isInfiniteAnimation(a));
|
|
59
|
-
if (runningAnimations.length > 0) {
|
|
60
|
-
await Promise.all(runningAnimations.map((a) => a.finished));
|
|
61
|
-
await checkAnimationsFinished();
|
|
62
|
-
}
|
|
63
|
-
}, "checkAnimationsFinished");
|
|
64
|
-
checkAnimationsFinished().then(resolve);
|
|
65
|
-
}, 100);
|
|
66
|
-
}),
|
|
67
|
-
// If animations don't finish within the timeout, continue without waiting
|
|
68
|
-
new Promise(
|
|
69
|
-
(resolve) => setTimeout(() => {
|
|
70
|
-
timedOut = true;
|
|
71
|
-
resolve(void 0);
|
|
72
|
-
}, ANIMATION_TIMEOUT)
|
|
73
|
-
)
|
|
74
|
-
]);
|
|
75
|
-
}
|
|
76
|
-
__name(waitForAnimations, "waitForAnimations");
|
|
77
|
-
function getShadowRoots(doc) {
|
|
78
|
-
return [doc, ...doc.querySelectorAll("*")].reduce((acc, el) => {
|
|
79
|
-
if ("shadowRoot" in el && el.shadowRoot) {
|
|
80
|
-
acc.push(el.shadowRoot, ...getShadowRoots(el.shadowRoot));
|
|
81
|
-
}
|
|
82
|
-
return acc;
|
|
83
|
-
}, []);
|
|
84
|
-
}
|
|
85
|
-
__name(getShadowRoots, "getShadowRoots");
|
|
86
|
-
function isInfiniteAnimation(anim) {
|
|
87
|
-
if (anim instanceof CSSAnimation && anim.effect instanceof KeyframeEffect && anim.effect.target) {
|
|
88
|
-
const style = getComputedStyle(anim.effect.target, anim.effect.pseudoElement);
|
|
89
|
-
const index = style.animationName?.split(", ").indexOf(anim.animationName);
|
|
90
|
-
const iterations = style.animationIterationCount.split(", ")[index];
|
|
91
|
-
return iterations === "infinite";
|
|
92
|
-
}
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
__name(isInfiniteAnimation, "isInfiniteAnimation");
|
|
96
|
-
|
|
97
|
-
export {
|
|
98
|
-
isTestEnvironment,
|
|
99
|
-
pauseAnimations,
|
|
100
|
-
waitForAnimations
|
|
101
|
-
};
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__commonJS,
|
|
3
|
-
__name,
|
|
4
|
-
__require
|
|
5
|
-
} from "./chunk-MM7DTO55.js";
|
|
6
|
-
|
|
7
|
-
// ../node_modules/memoizerific/memoizerific.js
|
|
8
|
-
var require_memoizerific = __commonJS({
|
|
9
|
-
"../node_modules/memoizerific/memoizerific.js"(exports, module) {
|
|
10
|
-
(function(f) {
|
|
11
|
-
if (typeof exports === "object" && typeof module !== "undefined") {
|
|
12
|
-
module.exports = f();
|
|
13
|
-
} else if (typeof define === "function" && define.amd) {
|
|
14
|
-
define([], f);
|
|
15
|
-
} else {
|
|
16
|
-
var g;
|
|
17
|
-
if (typeof window !== "undefined") {
|
|
18
|
-
g = window;
|
|
19
|
-
} else if (typeof global !== "undefined") {
|
|
20
|
-
g = global;
|
|
21
|
-
} else if (typeof self !== "undefined") {
|
|
22
|
-
g = self;
|
|
23
|
-
} else {
|
|
24
|
-
g = this;
|
|
25
|
-
}
|
|
26
|
-
g.memoizerific = f();
|
|
27
|
-
}
|
|
28
|
-
})(function() {
|
|
29
|
-
var define2, module2, exports2;
|
|
30
|
-
return (/* @__PURE__ */ __name(function e(t, n, r) {
|
|
31
|
-
function s(o2, u) {
|
|
32
|
-
if (!n[o2]) {
|
|
33
|
-
if (!t[o2]) {
|
|
34
|
-
var a = typeof __require == "function" && __require;
|
|
35
|
-
if (!u && a) return a(o2, true);
|
|
36
|
-
if (i) return i(o2, true);
|
|
37
|
-
var f = new Error("Cannot find module '" + o2 + "'");
|
|
38
|
-
throw f.code = "MODULE_NOT_FOUND", f;
|
|
39
|
-
}
|
|
40
|
-
var l = n[o2] = { exports: {} };
|
|
41
|
-
t[o2][0].call(l.exports, function(e2) {
|
|
42
|
-
var n2 = t[o2][1][e2];
|
|
43
|
-
return s(n2 ? n2 : e2);
|
|
44
|
-
}, l, l.exports, e, t, n, r);
|
|
45
|
-
}
|
|
46
|
-
return n[o2].exports;
|
|
47
|
-
}
|
|
48
|
-
__name(s, "s");
|
|
49
|
-
var i = typeof __require == "function" && __require;
|
|
50
|
-
for (var o = 0; o < r.length; o++) s(r[o]);
|
|
51
|
-
return s;
|
|
52
|
-
}, "e"))({ 1: [function(_dereq_, module3, exports3) {
|
|
53
|
-
module3.exports = function(forceSimilar) {
|
|
54
|
-
if (typeof Map !== "function" || forceSimilar) {
|
|
55
|
-
var Similar = _dereq_("./similar");
|
|
56
|
-
return new Similar();
|
|
57
|
-
} else {
|
|
58
|
-
return /* @__PURE__ */ new Map();
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
}, { "./similar": 2 }], 2: [function(_dereq_, module3, exports3) {
|
|
62
|
-
function Similar() {
|
|
63
|
-
this.list = [];
|
|
64
|
-
this.lastItem = void 0;
|
|
65
|
-
this.size = 0;
|
|
66
|
-
return this;
|
|
67
|
-
}
|
|
68
|
-
__name(Similar, "Similar");
|
|
69
|
-
Similar.prototype.get = function(key) {
|
|
70
|
-
var index;
|
|
71
|
-
if (this.lastItem && this.isEqual(this.lastItem.key, key)) {
|
|
72
|
-
return this.lastItem.val;
|
|
73
|
-
}
|
|
74
|
-
index = this.indexOf(key);
|
|
75
|
-
if (index >= 0) {
|
|
76
|
-
this.lastItem = this.list[index];
|
|
77
|
-
return this.list[index].val;
|
|
78
|
-
}
|
|
79
|
-
return void 0;
|
|
80
|
-
};
|
|
81
|
-
Similar.prototype.set = function(key, val) {
|
|
82
|
-
var index;
|
|
83
|
-
if (this.lastItem && this.isEqual(this.lastItem.key, key)) {
|
|
84
|
-
this.lastItem.val = val;
|
|
85
|
-
return this;
|
|
86
|
-
}
|
|
87
|
-
index = this.indexOf(key);
|
|
88
|
-
if (index >= 0) {
|
|
89
|
-
this.lastItem = this.list[index];
|
|
90
|
-
this.list[index].val = val;
|
|
91
|
-
return this;
|
|
92
|
-
}
|
|
93
|
-
this.lastItem = { key, val };
|
|
94
|
-
this.list.push(this.lastItem);
|
|
95
|
-
this.size++;
|
|
96
|
-
return this;
|
|
97
|
-
};
|
|
98
|
-
Similar.prototype.delete = function(key) {
|
|
99
|
-
var index;
|
|
100
|
-
if (this.lastItem && this.isEqual(this.lastItem.key, key)) {
|
|
101
|
-
this.lastItem = void 0;
|
|
102
|
-
}
|
|
103
|
-
index = this.indexOf(key);
|
|
104
|
-
if (index >= 0) {
|
|
105
|
-
this.size--;
|
|
106
|
-
return this.list.splice(index, 1)[0];
|
|
107
|
-
}
|
|
108
|
-
return void 0;
|
|
109
|
-
};
|
|
110
|
-
Similar.prototype.has = function(key) {
|
|
111
|
-
var index;
|
|
112
|
-
if (this.lastItem && this.isEqual(this.lastItem.key, key)) {
|
|
113
|
-
return true;
|
|
114
|
-
}
|
|
115
|
-
index = this.indexOf(key);
|
|
116
|
-
if (index >= 0) {
|
|
117
|
-
this.lastItem = this.list[index];
|
|
118
|
-
return true;
|
|
119
|
-
}
|
|
120
|
-
return false;
|
|
121
|
-
};
|
|
122
|
-
Similar.prototype.forEach = function(callback, thisArg) {
|
|
123
|
-
var i;
|
|
124
|
-
for (i = 0; i < this.size; i++) {
|
|
125
|
-
callback.call(thisArg || this, this.list[i].val, this.list[i].key, this);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
Similar.prototype.indexOf = function(key) {
|
|
129
|
-
var i;
|
|
130
|
-
for (i = 0; i < this.size; i++) {
|
|
131
|
-
if (this.isEqual(this.list[i].key, key)) {
|
|
132
|
-
return i;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return -1;
|
|
136
|
-
};
|
|
137
|
-
Similar.prototype.isEqual = function(val1, val2) {
|
|
138
|
-
return val1 === val2 || val1 !== val1 && val2 !== val2;
|
|
139
|
-
};
|
|
140
|
-
module3.exports = Similar;
|
|
141
|
-
}, {}], 3: [function(_dereq_, module3, exports3) {
|
|
142
|
-
var MapOrSimilar = _dereq_("map-or-similar");
|
|
143
|
-
module3.exports = function(limit) {
|
|
144
|
-
var cache = new MapOrSimilar(false), lru = [];
|
|
145
|
-
return function(fn) {
|
|
146
|
-
var memoizerific = /* @__PURE__ */ __name(function() {
|
|
147
|
-
var currentCache = cache, newMap, fnResult, argsLengthMinusOne = arguments.length - 1, lruPath = Array(argsLengthMinusOne + 1), isMemoized = true, i;
|
|
148
|
-
if ((memoizerific.numArgs || memoizerific.numArgs === 0) && memoizerific.numArgs !== argsLengthMinusOne + 1) {
|
|
149
|
-
throw new Error("Memoizerific functions should always be called with the same number of arguments");
|
|
150
|
-
}
|
|
151
|
-
for (i = 0; i < argsLengthMinusOne; i++) {
|
|
152
|
-
lruPath[i] = {
|
|
153
|
-
cacheItem: currentCache,
|
|
154
|
-
arg: arguments[i]
|
|
155
|
-
};
|
|
156
|
-
if (currentCache.has(arguments[i])) {
|
|
157
|
-
currentCache = currentCache.get(arguments[i]);
|
|
158
|
-
continue;
|
|
159
|
-
}
|
|
160
|
-
isMemoized = false;
|
|
161
|
-
newMap = new MapOrSimilar(false);
|
|
162
|
-
currentCache.set(arguments[i], newMap);
|
|
163
|
-
currentCache = newMap;
|
|
164
|
-
}
|
|
165
|
-
if (isMemoized) {
|
|
166
|
-
if (currentCache.has(arguments[argsLengthMinusOne])) {
|
|
167
|
-
fnResult = currentCache.get(arguments[argsLengthMinusOne]);
|
|
168
|
-
} else {
|
|
169
|
-
isMemoized = false;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
if (!isMemoized) {
|
|
173
|
-
fnResult = fn.apply(null, arguments);
|
|
174
|
-
currentCache.set(arguments[argsLengthMinusOne], fnResult);
|
|
175
|
-
}
|
|
176
|
-
if (limit > 0) {
|
|
177
|
-
lruPath[argsLengthMinusOne] = {
|
|
178
|
-
cacheItem: currentCache,
|
|
179
|
-
arg: arguments[argsLengthMinusOne]
|
|
180
|
-
};
|
|
181
|
-
if (isMemoized) {
|
|
182
|
-
moveToMostRecentLru(lru, lruPath);
|
|
183
|
-
} else {
|
|
184
|
-
lru.push(lruPath);
|
|
185
|
-
}
|
|
186
|
-
if (lru.length > limit) {
|
|
187
|
-
removeCachedResult(lru.shift());
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
memoizerific.wasMemoized = isMemoized;
|
|
191
|
-
memoizerific.numArgs = argsLengthMinusOne + 1;
|
|
192
|
-
return fnResult;
|
|
193
|
-
}, "memoizerific");
|
|
194
|
-
memoizerific.limit = limit;
|
|
195
|
-
memoizerific.wasMemoized = false;
|
|
196
|
-
memoizerific.cache = cache;
|
|
197
|
-
memoizerific.lru = lru;
|
|
198
|
-
return memoizerific;
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
function moveToMostRecentLru(lru, lruPath) {
|
|
202
|
-
var lruLen = lru.length, lruPathLen = lruPath.length, isMatch, i, ii;
|
|
203
|
-
for (i = 0; i < lruLen; i++) {
|
|
204
|
-
isMatch = true;
|
|
205
|
-
for (ii = 0; ii < lruPathLen; ii++) {
|
|
206
|
-
if (!isEqual(lru[i][ii].arg, lruPath[ii].arg)) {
|
|
207
|
-
isMatch = false;
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
if (isMatch) {
|
|
212
|
-
break;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
lru.push(lru.splice(i, 1)[0]);
|
|
216
|
-
}
|
|
217
|
-
__name(moveToMostRecentLru, "moveToMostRecentLru");
|
|
218
|
-
function removeCachedResult(removedLru) {
|
|
219
|
-
var removedLruLen = removedLru.length, currentLru = removedLru[removedLruLen - 1], tmp, i;
|
|
220
|
-
currentLru.cacheItem.delete(currentLru.arg);
|
|
221
|
-
for (i = removedLruLen - 2; i >= 0; i--) {
|
|
222
|
-
currentLru = removedLru[i];
|
|
223
|
-
tmp = currentLru.cacheItem.get(currentLru.arg);
|
|
224
|
-
if (!tmp || !tmp.size) {
|
|
225
|
-
currentLru.cacheItem.delete(currentLru.arg);
|
|
226
|
-
} else {
|
|
227
|
-
break;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
__name(removeCachedResult, "removeCachedResult");
|
|
232
|
-
function isEqual(val1, val2) {
|
|
233
|
-
return val1 === val2 || val1 !== val1 && val2 !== val2;
|
|
234
|
-
}
|
|
235
|
-
__name(isEqual, "isEqual");
|
|
236
|
-
}, { "map-or-similar": 1 }] }, {}, [3])(3);
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
export {
|
|
242
|
-
require_memoizerific
|
|
243
|
-
};
|