storybook 10.0.0-beta.1 → 10.0.0-beta.10
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/assets/server/openBrowser.applescript +94 -0
- package/dist/_browser-chunks/Color-KPLIACXP.js +1569 -0
- package/dist/_browser-chunks/{WithTooltip-ERFLZL6W.js → WithTooltip-SK46ZJ2J.js} +1 -1
- package/dist/_browser-chunks/{chunk-YY5GICNT.js → chunk-6E2SHJSL.js} +175 -32
- package/dist/_browser-chunks/{chunk-EOILZP2R.js → chunk-BOOOPFZF.js} +7 -2
- package/dist/_browser-chunks/{chunk-YWDKX534.js → chunk-FA42P6MO.js} +49 -4
- package/dist/_browser-chunks/chunk-G33S6YM3.js +521 -0
- package/dist/_browser-chunks/{chunk-MZNYTCNT.js → chunk-HMIIJ6UD.js} +6 -6
- package/dist/_browser-chunks/{chunk-4QPX7WIQ.js → chunk-JJZMHC3A.js} +57 -166
- package/dist/_browser-chunks/{chunk-MD2FTHCZ.js → chunk-JVSKG4YS.js} +3 -16
- package/dist/_browser-chunks/{chunk-E7VLET3C.js → chunk-KSCAWCCE.js} +3947 -4291
- package/dist/_browser-chunks/{chunk-PYK5ZTFK.js → chunk-PS3AOQI4.js} +48 -25
- package/dist/_browser-chunks/chunk-QK3L5AXO.js +372 -0
- package/dist/_browser-chunks/chunk-SHR3NNR3.js +5810 -0
- package/dist/_browser-chunks/{chunk-O5R5CGFA.js → chunk-TMDZCWME.js} +1 -2
- package/dist/_browser-chunks/chunk-VUAFL5XK.js +20 -0
- package/dist/_browser-chunks/{chunk-T7RCAJIX.js → chunk-Y3M7TW6K.js} +43 -47
- package/dist/_browser-chunks/{syntaxhighlighter-YYAA4CS4.js → syntaxhighlighter-R46XOLMC.js} +1 -1
- package/dist/_node-chunks/{builder-manager-EXW4ETLN.js → builder-manager-SJGIDEN6.js} +45 -155
- package/dist/_node-chunks/camelcase-VZHWABQV.js +18 -0
- package/dist/_node-chunks/{chunk-F5J33SXQ.js → chunk-6CZW7AGN.js} +7 -7
- package/dist/_node-chunks/{chunk-2G5THETV.js → chunk-6XT5OLNL.js} +12 -12
- package/dist/_node-chunks/{chunk-U45F2NP6.js → chunk-AHRH5RPR.js} +7 -7
- package/dist/_node-chunks/{chunk-ICPKUV5G.js → chunk-AOH6ABSV.js} +7 -7
- package/dist/_node-chunks/chunk-C5V22GP7.js +79 -0
- package/dist/_node-chunks/{chunk-5V6QH7WC.js → chunk-FIROF4DV.js} +7 -7
- package/dist/_node-chunks/{chunk-WDKWVNL2.js → chunk-GUJVZUYI.js} +7 -7
- package/dist/_node-chunks/chunk-IHPLRRAR.js +4741 -0
- package/dist/_node-chunks/{chunk-PMEEE3UE.js → chunk-JMXKCRWR.js} +30 -21
- package/dist/_node-chunks/{chunk-5ZX5SJOP.js → chunk-JUMUXWEV.js} +162 -103
- package/dist/_node-chunks/{chunk-CM3UGTR5.js → chunk-KGX33KXX.js} +7 -7
- package/dist/_node-chunks/{chunk-6CCUFDHU.js → chunk-KLVABNEU.js} +7 -7
- package/dist/_node-chunks/{chunk-EO4S3VXL.js → chunk-OL6DY6BT.js} +653 -775
- package/dist/_node-chunks/{chunk-GVCXNIAA.js → chunk-ONJV3K2L.js} +399 -116
- package/dist/_node-chunks/{chunk-3ZKQWDCG.js → chunk-PTHTD4RO.js} +223 -243
- package/dist/_node-chunks/{chunk-VNLBDN2Z.js → chunk-QQ3Z5KGJ.js} +6 -6
- package/dist/_node-chunks/{chunk-2QZOLZDJ.js → chunk-QRTDDTZJ.js} +9 -9
- package/dist/_node-chunks/chunk-R54K4KSM.js +1540 -0
- package/dist/_node-chunks/{chunk-24TGL6EX.js → chunk-S2LZC6JK.js} +8 -8
- package/dist/_node-chunks/chunk-SFJFSPRT.js +62 -0
- package/dist/_node-chunks/{chunk-SUMFFLGF.js → chunk-SSN5PKIY.js} +6 -6
- package/dist/_node-chunks/{chunk-QC5FE2D7.js → chunk-SXR2DITB.js} +7 -7
- package/dist/_node-chunks/{chunk-FZP2YGG3.js → chunk-TH5QVQRL.js} +7 -7
- package/dist/_node-chunks/chunk-U34NWAU2.js +18 -0
- package/dist/_node-chunks/{chunk-XTSBFCVE.js → chunk-UV3CZ3KS.js} +7 -7
- package/dist/_node-chunks/{chunk-PL2PKDRO.js → chunk-UVUGJDAI.js} +60 -102
- package/dist/_node-chunks/{chunk-EDBXIJN5.js → chunk-VOUNSD2E.js} +7 -7
- package/dist/_node-chunks/{chunk-WP7DV5JT.js → chunk-WFCPBKQJ.js} +583 -180
- package/dist/_node-chunks/{chunk-4WNZYNQY.js → chunk-XHF3WWNP.js} +623 -750
- package/dist/_node-chunks/{chunk-3SGKBLOL.js → chunk-XU45KXNQ.js} +8 -8
- package/dist/_node-chunks/{camelcase-VZZFWA2L.js → chunk-YHO6XR7U.js} +9 -8
- package/dist/_node-chunks/{dist-VZL6D6Y3.js → dist-IIC5PBL7.js} +9 -9
- package/dist/_node-chunks/{globby-GZXJJ4W6.js → globby-CJACC3HJ.js} +17 -13
- package/dist/_node-chunks/{lib-PHT5GCV2.js → lib-ZY4TKSOR.js} +40 -16
- package/dist/_node-chunks/{mdx-N42X6CFJ-EPDIV4A2.js → mdx-N42X6CFJ-3XNW3DFO.js} +8 -8
- package/dist/_node-chunks/{p-limit-AJIFSZTI.js → p-limit-R2OFT5HE.js} +76 -10
- package/dist/_node-chunks/{plugin-3VI56CEF.js → plugin-5XD5R2KD.js} +10 -10
- package/dist/_node-chunks/{plugin-AV4OEKYM.js → plugin-WAWVQMVR.js} +10 -10
- package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-E7J5FKLA.js → webpack-inject-mocker-runtime-plugin-SCRGJLIS.js} +1307 -847
- package/dist/_node-chunks/{webpack-mock-plugin-VTYGW7HO.js → webpack-mock-plugin-3VAXEGG2.js} +9 -9
- package/dist/babel/index.d.ts +1 -1
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +638 -187
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +8 -8
- package/dist/cli/index.d.ts +62 -75
- package/dist/cli/index.js +66 -55
- package/dist/common/index.d.ts +3 -1
- package/dist/common/index.js +22 -22
- package/dist/components/index.d.ts +228 -1
- package/dist/components/index.js +74 -5738
- package/dist/core-events/index.d.ts +18 -2
- package/dist/core-events/index.js +7 -1
- package/dist/core-server/index.d.ts +515 -14
- package/dist/core-server/index.js +4647 -4182
- package/dist/core-server/presets/common-manager.js +1570 -1272
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +691 -38
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
- package/dist/csf/index.d.ts +9 -4
- package/dist/csf/index.js +50 -15
- package/dist/csf-tools/index.d.ts +47 -6
- package/dist/csf-tools/index.js +9 -9
- package/dist/docs-tools/index.js +4 -4
- package/dist/instrumenter/index.js +1 -1
- package/dist/manager/globals-runtime.js +9230 -18109
- package/dist/manager/globals.d.ts +0 -4
- package/dist/manager/globals.js +1 -6
- package/dist/manager/runtime.js +13398 -11573
- package/dist/manager-api/index.d.ts +513 -5
- package/dist/manager-api/index.js +364 -90
- package/dist/manager-errors.d.ts +501 -0
- package/dist/node-logger/index.d.ts +1 -1
- package/dist/node-logger/index.js +1136 -662
- package/dist/preview/globals.js +1 -1
- package/dist/preview/runtime.js +12103 -21579
- package/dist/preview-api/index.d.ts +3 -3
- package/dist/preview-api/index.js +10 -10
- package/dist/preview-errors.d.ts +501 -0
- package/dist/router/index.d.ts +668 -10
- package/dist/router/index.js +2 -2
- package/dist/server-errors.d.ts +501 -0
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +23 -25
- package/dist/test/index.js +1874 -4024
- package/dist/theming/index.d.ts +2 -2
- package/dist/theming/index.js +6 -6
- package/dist/types/index.d.ts +553 -16
- package/dist/viewport/index.d.ts +36 -4
- package/dist/viewport/index.js +1 -1
- package/package.json +9 -46
- package/dist/_browser-chunks/Color-SFYJJKWL.js +0 -605
- package/dist/_browser-chunks/chunk-DHO2SA6L.js +0 -12
- package/dist/_browser-chunks/chunk-WPHPDNUA.js +0 -974
- package/dist/_node-chunks/chunk-32JYCD74.js +0 -80
- package/dist/_node-chunks/chunk-GE6I3YYG.js +0 -62
- package/dist/_node-chunks/chunk-KXCNXWXI.js +0 -18
- package/dist/_node-chunks/chunk-LAUOYAOX.js +0 -87
- package/dist/_node-chunks/chunk-QJTT4OC2.js +0 -266
- package/dist/_node-chunks/chunk-V2ZF4DUD.js +0 -2377
- package/dist/_node-chunks/chunk-ZMV3WY6R.js +0 -9845
- package/dist/_node-chunks/default-browser-id-JNATP42X.js +0 -1719
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name
|
|
3
|
+
} from "./chunk-MM7DTO55.js";
|
|
4
|
+
|
|
5
|
+
// ../node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
|
|
6
|
+
function isSymbol(value) {
|
|
7
|
+
return typeof value === "symbol" || value instanceof Symbol;
|
|
8
|
+
}
|
|
9
|
+
__name(isSymbol, "isSymbol");
|
|
10
|
+
|
|
11
|
+
// ../node_modules/es-toolkit/dist/compat/util/toNumber.mjs
|
|
12
|
+
function toNumber(value) {
|
|
13
|
+
if (isSymbol(value)) {
|
|
14
|
+
return NaN;
|
|
15
|
+
}
|
|
16
|
+
return Number(value);
|
|
17
|
+
}
|
|
18
|
+
__name(toNumber, "toNumber");
|
|
19
|
+
|
|
20
|
+
// ../node_modules/es-toolkit/dist/compat/util/toFinite.mjs
|
|
21
|
+
function toFinite(value) {
|
|
22
|
+
if (!value) {
|
|
23
|
+
return value === 0 ? value : 0;
|
|
24
|
+
}
|
|
25
|
+
value = toNumber(value);
|
|
26
|
+
if (value === Infinity || value === -Infinity) {
|
|
27
|
+
const sign = value < 0 ? -1 : 1;
|
|
28
|
+
return sign * Number.MAX_VALUE;
|
|
29
|
+
}
|
|
30
|
+
return value === value ? value : 0;
|
|
31
|
+
}
|
|
32
|
+
__name(toFinite, "toFinite");
|
|
33
|
+
|
|
34
|
+
// ../node_modules/es-toolkit/dist/compat/util/toInteger.mjs
|
|
35
|
+
function toInteger(value) {
|
|
36
|
+
const finite = toFinite(value);
|
|
37
|
+
const remainder = finite % 1;
|
|
38
|
+
return remainder ? finite - remainder : finite;
|
|
39
|
+
}
|
|
40
|
+
__name(toInteger, "toInteger");
|
|
41
|
+
|
|
42
|
+
// ../node_modules/es-toolkit/dist/array/chunk.mjs
|
|
43
|
+
function chunk(arr, size) {
|
|
44
|
+
if (!Number.isInteger(size) || size <= 0) {
|
|
45
|
+
throw new Error("Size must be an integer greater than zero.");
|
|
46
|
+
}
|
|
47
|
+
const chunkLength = Math.ceil(arr.length / size);
|
|
48
|
+
const result = Array(chunkLength);
|
|
49
|
+
for (let index = 0; index < chunkLength; index++) {
|
|
50
|
+
const start = index * size;
|
|
51
|
+
const end = start + size;
|
|
52
|
+
result[index] = arr.slice(start, end);
|
|
53
|
+
}
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
__name(chunk, "chunk");
|
|
57
|
+
|
|
58
|
+
// ../node_modules/es-toolkit/dist/array/compact.mjs
|
|
59
|
+
function compact(arr) {
|
|
60
|
+
const result = [];
|
|
61
|
+
for (let i = 0; i < arr.length; i++) {
|
|
62
|
+
const item = arr[i];
|
|
63
|
+
if (item) {
|
|
64
|
+
result.push(item);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
__name(compact, "compact");
|
|
70
|
+
|
|
71
|
+
// ../node_modules/es-toolkit/dist/array/flatten.mjs
|
|
72
|
+
function flatten(arr, depth = 1) {
|
|
73
|
+
const result = [];
|
|
74
|
+
const flooredDepth = Math.floor(depth);
|
|
75
|
+
const recursive = /* @__PURE__ */ __name((arr2, currentDepth) => {
|
|
76
|
+
for (let i = 0; i < arr2.length; i++) {
|
|
77
|
+
const item = arr2[i];
|
|
78
|
+
if (Array.isArray(item) && currentDepth < flooredDepth) {
|
|
79
|
+
recursive(item, currentDepth + 1);
|
|
80
|
+
} else {
|
|
81
|
+
result.push(item);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}, "recursive");
|
|
85
|
+
recursive(arr, 0);
|
|
86
|
+
return result;
|
|
87
|
+
}
|
|
88
|
+
__name(flatten, "flatten");
|
|
89
|
+
|
|
90
|
+
// ../node_modules/es-toolkit/dist/array/difference.mjs
|
|
91
|
+
function difference(firstArr, secondArr) {
|
|
92
|
+
const secondSet = new Set(secondArr);
|
|
93
|
+
return firstArr.filter((item) => !secondSet.has(item));
|
|
94
|
+
}
|
|
95
|
+
__name(difference, "difference");
|
|
96
|
+
|
|
97
|
+
// ../node_modules/es-toolkit/dist/array/last.mjs
|
|
98
|
+
function last(arr) {
|
|
99
|
+
return arr[arr.length - 1];
|
|
100
|
+
}
|
|
101
|
+
__name(last, "last");
|
|
102
|
+
|
|
103
|
+
// ../node_modules/es-toolkit/dist/array/differenceBy.mjs
|
|
104
|
+
function differenceBy(firstArr, secondArr, mapper) {
|
|
105
|
+
const mappedSecondSet = new Set(secondArr.map((item) => mapper(item)));
|
|
106
|
+
return firstArr.filter((item) => {
|
|
107
|
+
return !mappedSecondSet.has(mapper(item));
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
__name(differenceBy, "differenceBy");
|
|
111
|
+
|
|
112
|
+
// ../node_modules/es-toolkit/dist/array/differenceWith.mjs
|
|
113
|
+
function differenceWith(firstArr, secondArr, areItemsEqual) {
|
|
114
|
+
return firstArr.filter((firstItem) => {
|
|
115
|
+
return secondArr.every((secondItem) => {
|
|
116
|
+
return !areItemsEqual(firstItem, secondItem);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
__name(differenceWith, "differenceWith");
|
|
121
|
+
|
|
122
|
+
// ../node_modules/es-toolkit/dist/array/drop.mjs
|
|
123
|
+
function drop(arr, itemsCount) {
|
|
124
|
+
itemsCount = Math.max(itemsCount, 0);
|
|
125
|
+
return arr.slice(itemsCount);
|
|
126
|
+
}
|
|
127
|
+
__name(drop, "drop");
|
|
128
|
+
|
|
129
|
+
// ../node_modules/es-toolkit/dist/array/dropRight.mjs
|
|
130
|
+
function dropRight(arr, itemsCount) {
|
|
131
|
+
itemsCount = Math.min(-itemsCount, 0);
|
|
132
|
+
if (itemsCount === 0) {
|
|
133
|
+
return arr.slice();
|
|
134
|
+
}
|
|
135
|
+
return arr.slice(0, itemsCount);
|
|
136
|
+
}
|
|
137
|
+
__name(dropRight, "dropRight");
|
|
138
|
+
|
|
139
|
+
// ../node_modules/es-toolkit/dist/array/dropRightWhile.mjs
|
|
140
|
+
function dropRightWhile(arr, canContinueDropping) {
|
|
141
|
+
for (let i = arr.length - 1; i >= 0; i--) {
|
|
142
|
+
if (!canContinueDropping(arr[i], i, arr)) {
|
|
143
|
+
return arr.slice(0, i + 1);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return [];
|
|
147
|
+
}
|
|
148
|
+
__name(dropRightWhile, "dropRightWhile");
|
|
149
|
+
|
|
150
|
+
// ../node_modules/es-toolkit/dist/array/dropWhile.mjs
|
|
151
|
+
function dropWhile(arr, canContinueDropping) {
|
|
152
|
+
const dropEndIndex = arr.findIndex((item, index, arr2) => !canContinueDropping(item, index, arr2));
|
|
153
|
+
if (dropEndIndex === -1) {
|
|
154
|
+
return [];
|
|
155
|
+
}
|
|
156
|
+
return arr.slice(dropEndIndex);
|
|
157
|
+
}
|
|
158
|
+
__name(dropWhile, "dropWhile");
|
|
159
|
+
|
|
160
|
+
// ../node_modules/es-toolkit/dist/array/fill.mjs
|
|
161
|
+
function fill(array, value, start = 0, end = array.length) {
|
|
162
|
+
const length = array.length;
|
|
163
|
+
const finalStart = Math.max(start >= 0 ? start : length + start, 0);
|
|
164
|
+
const finalEnd = Math.min(end >= 0 ? end : length + end, length);
|
|
165
|
+
for (let i = finalStart; i < finalEnd; i++) {
|
|
166
|
+
array[i] = value;
|
|
167
|
+
}
|
|
168
|
+
return array;
|
|
169
|
+
}
|
|
170
|
+
__name(fill, "fill");
|
|
171
|
+
|
|
172
|
+
// ../node_modules/es-toolkit/dist/array/head.mjs
|
|
173
|
+
function head(arr) {
|
|
174
|
+
return arr[0];
|
|
175
|
+
}
|
|
176
|
+
__name(head, "head");
|
|
177
|
+
|
|
178
|
+
// ../node_modules/es-toolkit/dist/array/groupBy.mjs
|
|
179
|
+
function groupBy(arr, getKeyFromItem) {
|
|
180
|
+
const result = {};
|
|
181
|
+
for (let i = 0; i < arr.length; i++) {
|
|
182
|
+
const item = arr[i];
|
|
183
|
+
const key = getKeyFromItem(item);
|
|
184
|
+
if (!Object.hasOwn(result, key)) {
|
|
185
|
+
result[key] = [];
|
|
186
|
+
}
|
|
187
|
+
result[key].push(item);
|
|
188
|
+
}
|
|
189
|
+
return result;
|
|
190
|
+
}
|
|
191
|
+
__name(groupBy, "groupBy");
|
|
192
|
+
|
|
193
|
+
// ../node_modules/es-toolkit/dist/array/initial.mjs
|
|
194
|
+
function initial(arr) {
|
|
195
|
+
return arr.slice(0, -1);
|
|
196
|
+
}
|
|
197
|
+
__name(initial, "initial");
|
|
198
|
+
|
|
199
|
+
// ../node_modules/es-toolkit/dist/array/intersection.mjs
|
|
200
|
+
function intersection(firstArr, secondArr) {
|
|
201
|
+
const secondSet = new Set(secondArr);
|
|
202
|
+
return firstArr.filter((item) => {
|
|
203
|
+
return secondSet.has(item);
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
__name(intersection, "intersection");
|
|
207
|
+
|
|
208
|
+
// ../node_modules/es-toolkit/dist/array/uniq.mjs
|
|
209
|
+
function uniq(arr) {
|
|
210
|
+
return Array.from(new Set(arr));
|
|
211
|
+
}
|
|
212
|
+
__name(uniq, "uniq");
|
|
213
|
+
|
|
214
|
+
// ../node_modules/es-toolkit/dist/array/intersectionBy.mjs
|
|
215
|
+
function intersectionBy(firstArr, secondArr, mapper) {
|
|
216
|
+
const mappedSecondSet = new Set(secondArr.map(mapper));
|
|
217
|
+
return firstArr.filter((item) => mappedSecondSet.has(mapper(item)));
|
|
218
|
+
}
|
|
219
|
+
__name(intersectionBy, "intersectionBy");
|
|
220
|
+
|
|
221
|
+
// ../node_modules/es-toolkit/dist/array/intersectionWith.mjs
|
|
222
|
+
function intersectionWith(firstArr, secondArr, areItemsEqual) {
|
|
223
|
+
return firstArr.filter((firstItem) => {
|
|
224
|
+
return secondArr.some((secondItem) => {
|
|
225
|
+
return areItemsEqual(firstItem, secondItem);
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
__name(intersectionWith, "intersectionWith");
|
|
230
|
+
|
|
231
|
+
// ../node_modules/es-toolkit/dist/array/pull.mjs
|
|
232
|
+
function pull(arr, valuesToRemove) {
|
|
233
|
+
const valuesSet = new Set(valuesToRemove);
|
|
234
|
+
let resultIndex = 0;
|
|
235
|
+
for (let i = 0; i < arr.length; i++) {
|
|
236
|
+
if (valuesSet.has(arr[i])) {
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
if (!Object.hasOwn(arr, i)) {
|
|
240
|
+
delete arr[resultIndex++];
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
arr[resultIndex++] = arr[i];
|
|
244
|
+
}
|
|
245
|
+
arr.length = resultIndex;
|
|
246
|
+
return arr;
|
|
247
|
+
}
|
|
248
|
+
__name(pull, "pull");
|
|
249
|
+
|
|
250
|
+
// ../node_modules/es-toolkit/dist/array/remove.mjs
|
|
251
|
+
function remove(arr, shouldRemoveElement) {
|
|
252
|
+
const originalArr = arr.slice();
|
|
253
|
+
const removed = [];
|
|
254
|
+
let resultIndex = 0;
|
|
255
|
+
for (let i = 0; i < arr.length; i++) {
|
|
256
|
+
if (shouldRemoveElement(arr[i], i, originalArr)) {
|
|
257
|
+
removed.push(arr[i]);
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
if (!Object.hasOwn(arr, i)) {
|
|
261
|
+
delete arr[resultIndex++];
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
arr[resultIndex++] = arr[i];
|
|
265
|
+
}
|
|
266
|
+
arr.length = resultIndex;
|
|
267
|
+
return removed;
|
|
268
|
+
}
|
|
269
|
+
__name(remove, "remove");
|
|
270
|
+
|
|
271
|
+
// ../node_modules/es-toolkit/dist/array/sample.mjs
|
|
272
|
+
function sample(arr) {
|
|
273
|
+
const randomIndex = Math.floor(Math.random() * arr.length);
|
|
274
|
+
return arr[randomIndex];
|
|
275
|
+
}
|
|
276
|
+
__name(sample, "sample");
|
|
277
|
+
|
|
278
|
+
// ../node_modules/es-toolkit/dist/math/random.mjs
|
|
279
|
+
function random(minimum, maximum) {
|
|
280
|
+
if (maximum == null) {
|
|
281
|
+
maximum = minimum;
|
|
282
|
+
minimum = 0;
|
|
283
|
+
}
|
|
284
|
+
if (minimum >= maximum) {
|
|
285
|
+
throw new Error("Invalid input: The maximum value must be greater than the minimum value.");
|
|
286
|
+
}
|
|
287
|
+
return Math.random() * (maximum - minimum) + minimum;
|
|
288
|
+
}
|
|
289
|
+
__name(random, "random");
|
|
290
|
+
|
|
291
|
+
// ../node_modules/es-toolkit/dist/math/randomInt.mjs
|
|
292
|
+
function randomInt(minimum, maximum) {
|
|
293
|
+
return Math.floor(random(minimum, maximum));
|
|
294
|
+
}
|
|
295
|
+
__name(randomInt, "randomInt");
|
|
296
|
+
|
|
297
|
+
// ../node_modules/es-toolkit/dist/array/sampleSize.mjs
|
|
298
|
+
function sampleSize(array, size) {
|
|
299
|
+
if (size > array.length) {
|
|
300
|
+
throw new Error("Size must be less than or equal to the length of array.");
|
|
301
|
+
}
|
|
302
|
+
const result = new Array(size);
|
|
303
|
+
const selected = /* @__PURE__ */ new Set();
|
|
304
|
+
for (let step = array.length - size, resultIndex = 0; step < array.length; step++, resultIndex++) {
|
|
305
|
+
let index = randomInt(0, step + 1);
|
|
306
|
+
if (selected.has(index)) {
|
|
307
|
+
index = step;
|
|
308
|
+
}
|
|
309
|
+
selected.add(index);
|
|
310
|
+
result[resultIndex] = array[index];
|
|
311
|
+
}
|
|
312
|
+
return result;
|
|
313
|
+
}
|
|
314
|
+
__name(sampleSize, "sampleSize");
|
|
315
|
+
|
|
316
|
+
// ../node_modules/es-toolkit/dist/array/shuffle.mjs
|
|
317
|
+
function shuffle(arr) {
|
|
318
|
+
const result = arr.slice();
|
|
319
|
+
for (let i = result.length - 1; i >= 1; i--) {
|
|
320
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
321
|
+
[result[i], result[j]] = [result[j], result[i]];
|
|
322
|
+
}
|
|
323
|
+
return result;
|
|
324
|
+
}
|
|
325
|
+
__name(shuffle, "shuffle");
|
|
326
|
+
|
|
327
|
+
// ../node_modules/es-toolkit/dist/array/tail.mjs
|
|
328
|
+
function tail(arr) {
|
|
329
|
+
return arr.slice(1);
|
|
330
|
+
}
|
|
331
|
+
__name(tail, "tail");
|
|
332
|
+
|
|
333
|
+
// ../node_modules/es-toolkit/dist/array/take.mjs
|
|
334
|
+
function take(arr, count, guard) {
|
|
335
|
+
count = guard || count === void 0 ? 1 : toInteger(count);
|
|
336
|
+
return arr.slice(0, count);
|
|
337
|
+
}
|
|
338
|
+
__name(take, "take");
|
|
339
|
+
|
|
340
|
+
// ../node_modules/es-toolkit/dist/array/takeRight.mjs
|
|
341
|
+
function takeRight(arr, count = 1, guard) {
|
|
342
|
+
count = guard || count === void 0 ? 1 : toInteger(count);
|
|
343
|
+
if (count <= 0 || arr == null || arr.length === 0) {
|
|
344
|
+
return [];
|
|
345
|
+
}
|
|
346
|
+
return arr.slice(-count);
|
|
347
|
+
}
|
|
348
|
+
__name(takeRight, "takeRight");
|
|
349
|
+
|
|
350
|
+
// ../node_modules/es-toolkit/dist/array/uniqBy.mjs
|
|
351
|
+
function uniqBy(arr, mapper) {
|
|
352
|
+
const map = /* @__PURE__ */ new Map();
|
|
353
|
+
for (let i = 0; i < arr.length; i++) {
|
|
354
|
+
const item = arr[i];
|
|
355
|
+
const key = mapper(item);
|
|
356
|
+
if (!map.has(key)) {
|
|
357
|
+
map.set(key, item);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
return Array.from(map.values());
|
|
361
|
+
}
|
|
362
|
+
__name(uniqBy, "uniqBy");
|
|
363
|
+
|
|
364
|
+
// ../node_modules/es-toolkit/dist/array/uniqWith.mjs
|
|
365
|
+
function uniqWith(arr, areItemsEqual) {
|
|
366
|
+
const result = [];
|
|
367
|
+
for (let i = 0; i < arr.length; i++) {
|
|
368
|
+
const item = arr[i];
|
|
369
|
+
const isUniq = result.every((v) => !areItemsEqual(v, item));
|
|
370
|
+
if (isUniq) {
|
|
371
|
+
result.push(item);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
return result;
|
|
375
|
+
}
|
|
376
|
+
__name(uniqWith, "uniqWith");
|
|
377
|
+
|
|
378
|
+
// ../node_modules/es-toolkit/dist/array/unzip.mjs
|
|
379
|
+
function unzip(zipped) {
|
|
380
|
+
let maxLen = 0;
|
|
381
|
+
for (let i = 0; i < zipped.length; i++) {
|
|
382
|
+
if (zipped[i].length > maxLen) {
|
|
383
|
+
maxLen = zipped[i].length;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
const result = new Array(maxLen);
|
|
387
|
+
for (let i = 0; i < maxLen; i++) {
|
|
388
|
+
result[i] = new Array(zipped.length);
|
|
389
|
+
for (let j = 0; j < zipped.length; j++) {
|
|
390
|
+
result[i][j] = zipped[j][i];
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
return result;
|
|
394
|
+
}
|
|
395
|
+
__name(unzip, "unzip");
|
|
396
|
+
|
|
397
|
+
// ../node_modules/es-toolkit/dist/array/without.mjs
|
|
398
|
+
function without(array, ...values) {
|
|
399
|
+
return difference(array, values);
|
|
400
|
+
}
|
|
401
|
+
__name(without, "without");
|
|
402
|
+
|
|
403
|
+
// ../node_modules/es-toolkit/dist/array/windowed.mjs
|
|
404
|
+
function windowed(arr, size, step = 1, { partialWindows = false } = {}) {
|
|
405
|
+
if (size <= 0 || !Number.isInteger(size)) {
|
|
406
|
+
throw new Error("Size must be a positive integer.");
|
|
407
|
+
}
|
|
408
|
+
if (step <= 0 || !Number.isInteger(step)) {
|
|
409
|
+
throw new Error("Step must be a positive integer.");
|
|
410
|
+
}
|
|
411
|
+
const result = [];
|
|
412
|
+
const end = partialWindows ? arr.length : arr.length - size + 1;
|
|
413
|
+
for (let i = 0; i < end; i += step) {
|
|
414
|
+
result.push(arr.slice(i, i + size));
|
|
415
|
+
}
|
|
416
|
+
return result;
|
|
417
|
+
}
|
|
418
|
+
__name(windowed, "windowed");
|
|
419
|
+
|
|
420
|
+
// ../node_modules/es-toolkit/dist/array/zip.mjs
|
|
421
|
+
function zip(...arrs) {
|
|
422
|
+
let rowCount = 0;
|
|
423
|
+
for (let i = 0; i < arrs.length; i++) {
|
|
424
|
+
if (arrs[i].length > rowCount) {
|
|
425
|
+
rowCount = arrs[i].length;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
const columnCount = arrs.length;
|
|
429
|
+
const result = Array(rowCount);
|
|
430
|
+
for (let i = 0; i < rowCount; ++i) {
|
|
431
|
+
const row = Array(columnCount);
|
|
432
|
+
for (let j = 0; j < columnCount; ++j) {
|
|
433
|
+
row[j] = arrs[j][i];
|
|
434
|
+
}
|
|
435
|
+
result[i] = row;
|
|
436
|
+
}
|
|
437
|
+
return result;
|
|
438
|
+
}
|
|
439
|
+
__name(zip, "zip");
|
|
440
|
+
|
|
441
|
+
// ../node_modules/es-toolkit/dist/array/maxBy.mjs
|
|
442
|
+
function maxBy(items, getValue) {
|
|
443
|
+
if (items.length === 0) {
|
|
444
|
+
return void 0;
|
|
445
|
+
}
|
|
446
|
+
let maxElement = items[0];
|
|
447
|
+
let max = getValue(maxElement);
|
|
448
|
+
for (let i = 1; i < items.length; i++) {
|
|
449
|
+
const element = items[i];
|
|
450
|
+
const value = getValue(element);
|
|
451
|
+
if (value > max) {
|
|
452
|
+
max = value;
|
|
453
|
+
maxElement = element;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
return maxElement;
|
|
457
|
+
}
|
|
458
|
+
__name(maxBy, "maxBy");
|
|
459
|
+
|
|
460
|
+
// ../node_modules/es-toolkit/dist/array/minBy.mjs
|
|
461
|
+
function minBy(items, getValue) {
|
|
462
|
+
if (items.length === 0) {
|
|
463
|
+
return void 0;
|
|
464
|
+
}
|
|
465
|
+
let minElement = items[0];
|
|
466
|
+
let min = getValue(minElement);
|
|
467
|
+
for (let i = 1; i < items.length; i++) {
|
|
468
|
+
const element = items[i];
|
|
469
|
+
const value = getValue(element);
|
|
470
|
+
if (value < min) {
|
|
471
|
+
min = value;
|
|
472
|
+
minElement = element;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
return minElement;
|
|
476
|
+
}
|
|
477
|
+
__name(minBy, "minBy");
|
|
478
|
+
|
|
479
|
+
export {
|
|
480
|
+
chunk,
|
|
481
|
+
compact,
|
|
482
|
+
flatten,
|
|
483
|
+
difference,
|
|
484
|
+
last,
|
|
485
|
+
differenceBy,
|
|
486
|
+
differenceWith,
|
|
487
|
+
drop,
|
|
488
|
+
isSymbol,
|
|
489
|
+
toNumber,
|
|
490
|
+
toFinite,
|
|
491
|
+
toInteger,
|
|
492
|
+
dropRight,
|
|
493
|
+
dropRightWhile,
|
|
494
|
+
dropWhile,
|
|
495
|
+
fill,
|
|
496
|
+
head,
|
|
497
|
+
groupBy,
|
|
498
|
+
initial,
|
|
499
|
+
intersection,
|
|
500
|
+
uniq,
|
|
501
|
+
intersectionBy,
|
|
502
|
+
intersectionWith,
|
|
503
|
+
pull,
|
|
504
|
+
remove,
|
|
505
|
+
sample,
|
|
506
|
+
random,
|
|
507
|
+
randomInt,
|
|
508
|
+
sampleSize,
|
|
509
|
+
shuffle,
|
|
510
|
+
tail,
|
|
511
|
+
take,
|
|
512
|
+
takeRight,
|
|
513
|
+
uniqBy,
|
|
514
|
+
uniqWith,
|
|
515
|
+
unzip,
|
|
516
|
+
without,
|
|
517
|
+
windowed,
|
|
518
|
+
zip,
|
|
519
|
+
maxBy,
|
|
520
|
+
minBy
|
|
521
|
+
};
|
|
@@ -1394,7 +1394,7 @@ function defaultRenderer(_ref5) {
|
|
|
1394
1394
|
node,
|
|
1395
1395
|
stylesheet,
|
|
1396
1396
|
useInlineStyles,
|
|
1397
|
-
key: "code-
|
|
1397
|
+
key: "code-segment-".concat(i)
|
|
1398
1398
|
});
|
|
1399
1399
|
});
|
|
1400
1400
|
}
|
|
@@ -1433,6 +1433,7 @@ function getCodeTree(_ref6) {
|
|
|
1433
1433
|
__name(getCodeTree, "getCodeTree");
|
|
1434
1434
|
function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
1435
1435
|
return /* @__PURE__ */ __name(function SyntaxHighlighter4(_ref7) {
|
|
1436
|
+
var _code$match$length, _code$match;
|
|
1436
1437
|
var language = _ref7.language, children = _ref7.children, _ref7$style = _ref7.style, style = _ref7$style === void 0 ? defaultStyle : _ref7$style, _ref7$customStyle = _ref7.customStyle, customStyle = _ref7$customStyle === void 0 ? {} : _ref7$customStyle, _ref7$codeTagProps = _ref7.codeTagProps, codeTagProps = _ref7$codeTagProps === void 0 ? {
|
|
1437
1438
|
className: language ? "language-".concat(language) : void 0,
|
|
1438
1439
|
style: _objectSpread2(_objectSpread2({}, style['code[class*="language-"]']), style['code[class*="language-'.concat(language, '"]')])
|
|
@@ -1482,11 +1483,8 @@ function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
|
1482
1483
|
if (codeTree.language === null) {
|
|
1483
1484
|
codeTree.value = defaultCodeValue;
|
|
1484
1485
|
}
|
|
1485
|
-
var
|
|
1486
|
-
|
|
1487
|
-
lineCount = codeTree.value[0].value.split("\n").length;
|
|
1488
|
-
}
|
|
1489
|
-
var largestLineNumber = lineCount + startingLineNumber;
|
|
1486
|
+
var lineBreakCount = (_code$match$length = (_code$match = code.match(/\n/g)) === null || _code$match === void 0 ? void 0 : _code$match.length) !== null && _code$match$length !== void 0 ? _code$match$length : 0;
|
|
1487
|
+
var largestLineNumber = startingLineNumber + lineBreakCount;
|
|
1490
1488
|
var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);
|
|
1491
1489
|
return React2.createElement(PreTag, preProps, React2.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
|
|
1492
1490
|
rows,
|
|
@@ -6976,6 +6974,8 @@ SyntaxHighlighter3.registerLanguage = (...args) => prism_light_default.registerL
|
|
|
6976
6974
|
var syntaxhighlighter_default = SyntaxHighlighter3;
|
|
6977
6975
|
|
|
6978
6976
|
export {
|
|
6977
|
+
_objectWithoutProperties,
|
|
6978
|
+
_defineProperty,
|
|
6979
6979
|
ActionBar,
|
|
6980
6980
|
ScrollArea2 as ScrollArea,
|
|
6981
6981
|
supportedLanguages,
|