@rsdoctor/components 1.5.12 → 1.5.13
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/components/Alerts/collapse-cjs-require.d.ts +1 -1
- package/dist/components/Alerts/collapse-cross-chunks.d.ts +1 -1
- package/dist/components/Alerts/collapse-esm-cjs.d.ts +1 -1
- package/dist/components/Alerts/collapse-module-mixed-chunks.d.ts +1 -1
- package/dist/components/Alerts/collapse-shared.d.ts +2 -2
- package/dist/components/Alerts/collapse-side-effects-only-imports.d.ts +1 -1
- package/dist/components/Alerts/collapse.d.ts +1 -1
- package/dist/components/Alerts/list.d.ts +1 -1
- package/dist/components/FileTree/index.d.ts +1 -1
- package/dist/components/Overall/DataSummary.d.ts +1 -1
- package/dist/components/Overall/help-center.d.ts +1 -1
- package/dist/components/Overall/overview.d.ts +1 -1
- package/dist/components/base/CodeViewer/index.d.ts +1 -1
- package/dist/components/base/CodeViewer/useCodeDrawer.d.ts +1 -1
- package/dist/components/base/DiffViewer/index.d.ts +1 -1
- package/dist/components/base/DiffViewer/useDiffDrawer.d.ts +1 -1
- package/dist/pages/BundleSize/components/asset.mjs +390 -323
- package/dist/pages/BundleSize/components/asset.mjs.map +1 -1
- package/dist/pages/BundleSize/components/asset.module.mjs +16 -0
- package/dist/pages/BundleSize/components/asset.module.mjs.map +1 -0
- package/dist/pages/BundleSize/components/asset_module.css +103 -0
- package/dist/pages/BundleSize/components/asset_module.css.map +1 -0
- package/dist/pages/BundleSize/components/index.mjs +3 -0
- package/dist/pages/BundleSize/components/index.mjs.map +1 -1
- package/dist/pages/BundleSize/components/index.module.mjs +0 -7
- package/dist/pages/BundleSize/components/index.module.mjs.map +1 -1
- package/dist/pages/BundleSize/components/index_module.css +0 -61
- package/dist/pages/BundleSize/components/index_module.css.map +1 -1
- package/dist/pages/Overall/responsiveLayout.d.ts +1 -1
- package/dist/pages/Resources/BundleDiff/DiffContainer/utils.d.ts +1 -1
- package/dist/pages/TreeShaking/editor.d.ts +1 -1
- package/dist/pages/TreeShaking/space.d.ts +1 -1
- package/dist/utils/file.d.ts +1 -1
- package/dist/utils/hooks.d.ts +4 -0
- package/dist/utils/hooks.mjs +42 -3
- package/dist/utils/hooks.mjs.map +1 -1
- package/package.json +13 -12
|
@@ -1,31 +1,51 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { CodepenCircleOutlined, ColumnHeightOutlined, InfoCircleOutlined } from "@ant-design/icons";
|
|
3
3
|
import { SDK } from "@rsdoctor/types";
|
|
4
|
-
import { Button, Card,
|
|
5
|
-
import { omitBy, sumBy } from "es-toolkit/compat";
|
|
4
|
+
import { Button, Card, Divider, Empty, Popover, Space, Tag, Tooltip, Tree, Typography } from "antd";
|
|
5
|
+
import { debounce, omitBy, sumBy } from "es-toolkit/compat";
|
|
6
6
|
import { dirname, relative } from "path";
|
|
7
|
-
import { useEffect, useMemo, useState } from "react";
|
|
7
|
+
import { createContext, memo, use, useCallback, useEffect, useMemo, useState } from "react";
|
|
8
8
|
import { CodeViewer } from "../../../components/base/index.mjs";
|
|
9
9
|
import { Badge } from "../../../components/Badge/index.mjs";
|
|
10
10
|
import { KeywordInput } from "../../../components/Form/keyword.mjs";
|
|
11
|
-
import { Keyword } from "../../../components/Keyword/index.mjs";
|
|
12
11
|
import { ServerAPIProvider } from "../../../components/Manifest/index.mjs";
|
|
13
12
|
import { TextDrawer } from "../../../components/TextDrawer/index.mjs";
|
|
14
13
|
import { Size } from "../../../constants.mjs";
|
|
15
|
-
import { createFileStructures, formatSize, isJsDataUrl, useI18n } from "../../../utils/index.mjs";
|
|
14
|
+
import { createFileStructures, formatSize, isJsDataUrl, useElementSize, useI18n } from "../../../utils/index.mjs";
|
|
16
15
|
import { ModuleAnalyzeComponent } from "../../ModuleAnalyze/index.mjs";
|
|
17
16
|
import { ModuleGraphListContext } from "../config.mjs";
|
|
18
|
-
import
|
|
17
|
+
import asset_module from "./asset.module.mjs";
|
|
18
|
+
import { ErrorBoundary } from "react-error-boundary";
|
|
19
19
|
const { DirectoryTree: DirectoryTree } = Tree;
|
|
20
|
-
let expandedModulesKeys = [];
|
|
21
20
|
const TAB_MAP = {
|
|
22
21
|
source: 'source code',
|
|
23
22
|
transformed: 'Transformed Code (After compile)',
|
|
24
23
|
parsedSource: 'Bundled Code (After bundle and tree-shaking)'
|
|
25
24
|
};
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
const POPUPS_ENABLED_BY_DEFAULT = true;
|
|
26
|
+
const PopupContext = /*#__PURE__*/ createContext({
|
|
27
|
+
enabled: POPUPS_ENABLED_BY_DEFAULT
|
|
28
|
+
});
|
|
29
|
+
const DisablePopups = ({ children })=>/*#__PURE__*/ jsx(PopupContext.Provider, {
|
|
30
|
+
value: {
|
|
31
|
+
enabled: false
|
|
32
|
+
},
|
|
33
|
+
children: children
|
|
34
|
+
});
|
|
35
|
+
const usePopupsEnabled = ()=>use(PopupContext)?.enabled ?? true;
|
|
36
|
+
const asset_Tooltip = (props)=>{
|
|
37
|
+
const enabled = usePopupsEnabled();
|
|
38
|
+
if (enabled) return /*#__PURE__*/ jsx(Tooltip, {
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
return props.children ?? null;
|
|
42
|
+
};
|
|
43
|
+
const asset_Popover = (props)=>{
|
|
44
|
+
const enabled = usePopupsEnabled();
|
|
45
|
+
if (enabled) return /*#__PURE__*/ jsx(Popover, {
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
return props.children ?? null;
|
|
29
49
|
};
|
|
30
50
|
const EmptyCodeItem = ()=>/*#__PURE__*/ jsx(Empty, {
|
|
31
51
|
description: `Do not have the module code.
|
|
@@ -46,7 +66,7 @@ const ModuleCodeViewer = ({ data })=>{
|
|
|
46
66
|
text: "",
|
|
47
67
|
buttonProps: {
|
|
48
68
|
size: 'small',
|
|
49
|
-
icon: /*#__PURE__*/ jsx(
|
|
69
|
+
icon: /*#__PURE__*/ jsx(asset_Popover, {
|
|
50
70
|
content: "Open the Codes Box",
|
|
51
71
|
children: /*#__PURE__*/ jsx(CodepenCircleOutlined, {})
|
|
52
72
|
}),
|
|
@@ -79,7 +99,7 @@ const ModuleCodeViewer = ({ data })=>{
|
|
|
79
99
|
})),
|
|
80
100
|
defaultActiveTabKey: source['parsedSource'] ? 'parsedSource' : 'source',
|
|
81
101
|
onTabChange: (v)=>setTab(v),
|
|
82
|
-
tabBarExtraContent: /*#__PURE__*/ jsx(
|
|
102
|
+
tabBarExtraContent: /*#__PURE__*/ jsx(asset_Popover, {
|
|
83
103
|
placement: "bottom",
|
|
84
104
|
title: /*#__PURE__*/ jsx(Typography.Title, {
|
|
85
105
|
level: 5,
|
|
@@ -181,7 +201,7 @@ function getChildrenModule(node, mods) {
|
|
|
181
201
|
});
|
|
182
202
|
return mods;
|
|
183
203
|
}
|
|
184
|
-
const ModulesStatistics = ({ modules, chunks, filteredModules })=>{
|
|
204
|
+
const ModulesStatistics = /*#__PURE__*/ memo(({ modules, chunks, filteredModules })=>{
|
|
185
205
|
const { sourceSize, parsedSize, filteredParsedSize, filteredSourceSize } = useMemo(()=>({
|
|
186
206
|
sourceSize: sumBy(modules, (e)=>e.size.sourceSize),
|
|
187
207
|
parsedSize: sumBy(modules, (e)=>e.size.parsedSize),
|
|
@@ -193,7 +213,7 @@ const ModulesStatistics = ({ modules, chunks, filteredModules })=>{
|
|
|
193
213
|
]);
|
|
194
214
|
return /*#__PURE__*/ jsxs(Space, {
|
|
195
215
|
children: [
|
|
196
|
-
/*#__PURE__*/ jsx(
|
|
216
|
+
/*#__PURE__*/ jsx(asset_Tooltip, {
|
|
197
217
|
title: `total modules count is ${modules.length}, the filtered modules count is ${filteredModules.length}`,
|
|
198
218
|
children: /*#__PURE__*/ jsxs(Space, {
|
|
199
219
|
children: [
|
|
@@ -217,7 +237,7 @@ const ModulesStatistics = ({ modules, chunks, filteredModules })=>{
|
|
|
217
237
|
/*#__PURE__*/ jsx(Divider, {
|
|
218
238
|
type: "vertical"
|
|
219
239
|
}),
|
|
220
|
-
/*#__PURE__*/ jsx(
|
|
240
|
+
/*#__PURE__*/ jsx(asset_Tooltip, {
|
|
221
241
|
title: /*#__PURE__*/ jsxs(Space, {
|
|
222
242
|
direction: "vertical",
|
|
223
243
|
children: [
|
|
@@ -279,7 +299,7 @@ const ModulesStatistics = ({ modules, chunks, filteredModules })=>{
|
|
|
279
299
|
/*#__PURE__*/ jsx(Divider, {
|
|
280
300
|
type: "vertical"
|
|
281
301
|
}),
|
|
282
|
-
/*#__PURE__*/ jsx(
|
|
302
|
+
/*#__PURE__*/ jsx(asset_Tooltip, {
|
|
283
303
|
title: /*#__PURE__*/ jsxs(Space, {
|
|
284
304
|
direction: "vertical",
|
|
285
305
|
children: [
|
|
@@ -318,104 +338,64 @@ const ModulesStatistics = ({ modules, chunks, filteredModules })=>{
|
|
|
318
338
|
})
|
|
319
339
|
]
|
|
320
340
|
});
|
|
341
|
+
});
|
|
342
|
+
const defaultTagStyle = {
|
|
343
|
+
margin: 'none',
|
|
344
|
+
marginInlineEnd: 0
|
|
321
345
|
};
|
|
322
|
-
const
|
|
323
|
-
title: /*#__PURE__*/ jsx(Space, {
|
|
324
|
-
children: /*#__PURE__*/ jsxs(Typography.Text, {
|
|
325
|
-
style: {
|
|
326
|
-
color: 'inherit'
|
|
327
|
-
},
|
|
328
|
-
children: [
|
|
329
|
-
"This is a concatenated container module that includes ",
|
|
330
|
-
moduleCount,
|
|
331
|
-
' ',
|
|
332
|
-
"modules"
|
|
333
|
-
]
|
|
334
|
-
})
|
|
335
|
-
}),
|
|
336
|
-
children: /*#__PURE__*/ jsx(Tag, {
|
|
337
|
-
color: "blue",
|
|
338
|
-
style: tagStyle,
|
|
339
|
-
children: "concatenated container"
|
|
340
|
-
})
|
|
341
|
-
});
|
|
342
|
-
const TotalBundledSizeTag = ({ size })=>/*#__PURE__*/ jsx(Tooltip, {
|
|
346
|
+
const AbstractTag = ({ color, tooltipTitle, style = defaultTagStyle, children })=>/*#__PURE__*/ jsx(asset_Tooltip, {
|
|
343
347
|
title: /*#__PURE__*/ jsx(Space, {
|
|
344
348
|
children: /*#__PURE__*/ jsx(Typography.Text, {
|
|
345
349
|
style: {
|
|
346
350
|
color: 'inherit'
|
|
347
351
|
},
|
|
348
|
-
children:
|
|
352
|
+
children: tooltipTitle
|
|
349
353
|
})
|
|
350
354
|
}),
|
|
351
355
|
children: /*#__PURE__*/ jsx(Tag, {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
children:
|
|
356
|
+
color: color,
|
|
357
|
+
style: style || void 0,
|
|
358
|
+
children: children
|
|
355
359
|
})
|
|
356
360
|
});
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
color: 'inherit'
|
|
362
|
-
},
|
|
363
|
-
children: "The final output size of this file. If you enabled minification, this value shows the minified size."
|
|
364
|
-
})
|
|
365
|
-
}),
|
|
366
|
-
children: /*#__PURE__*/ jsx(Tag, {
|
|
367
|
-
color: 'geekblue',
|
|
368
|
-
children: `bundled size: ${formatSize(size)}`
|
|
369
|
-
})
|
|
361
|
+
const ConcatenatedTag = ({ moduleCount })=>/*#__PURE__*/ jsx(AbstractTag, {
|
|
362
|
+
color: "blue",
|
|
363
|
+
tooltipTitle: `This is a concatenated container module that includes ${moduleCount} modules`,
|
|
364
|
+
children: "concatenated container"
|
|
370
365
|
});
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
color: 'inherit'
|
|
376
|
-
},
|
|
377
|
-
children: "The compressed file size that users actually download, as most web servers use gzip compression."
|
|
378
|
-
})
|
|
379
|
-
}),
|
|
380
|
-
children: /*#__PURE__*/ jsx(Tag, {
|
|
381
|
-
color: 'orange',
|
|
382
|
-
children: `gzipped: ${formatSize(size)}`
|
|
383
|
-
})
|
|
366
|
+
const TotalBundledSizeTag = ({ size })=>/*#__PURE__*/ jsx(AbstractTag, {
|
|
367
|
+
color: "geekblue",
|
|
368
|
+
tooltipTitle: "The total output size of all the files in this folder. If you enabled minification, this value shows the minified size.",
|
|
369
|
+
children: `bundled size: ${formatSize(size)}`
|
|
384
370
|
});
|
|
385
|
-
const
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
},
|
|
391
|
-
children: "The total original size of all the files in this folder, before any transformations and minification."
|
|
392
|
-
})
|
|
393
|
-
}),
|
|
394
|
-
children: /*#__PURE__*/ jsx(Tag, {
|
|
395
|
-
style: tagStyle,
|
|
396
|
-
color: 'cyan',
|
|
397
|
-
children: `source size: ${formatSize(size)}`
|
|
398
|
-
})
|
|
371
|
+
const BundledSizeTag = ({ size })=>/*#__PURE__*/ jsx(AbstractTag, {
|
|
372
|
+
color: "geekblue",
|
|
373
|
+
style: null,
|
|
374
|
+
tooltipTitle: "The final output size of this file. If you enabled minification, this value shows the minified size.",
|
|
375
|
+
children: `bundled size: ${formatSize(size)}`
|
|
399
376
|
});
|
|
400
|
-
const
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
children:
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
377
|
+
const GzippedSizeTag = ({ size })=>/*#__PURE__*/ jsx(AbstractTag, {
|
|
378
|
+
color: "orange",
|
|
379
|
+
style: null,
|
|
380
|
+
tooltipTitle: "The compressed file size that users actually download, as most web servers use gzip compression.",
|
|
381
|
+
children: `gzipped: ${formatSize(size)}`
|
|
382
|
+
});
|
|
383
|
+
const TotalSourceSizeTag = ({ size })=>/*#__PURE__*/ jsx(AbstractTag, {
|
|
384
|
+
tooltipTitle: "The total original size of all the files in this folder, before any transformations and minification.",
|
|
385
|
+
color: "cyan",
|
|
386
|
+
children: `source size: ${formatSize(size)}`
|
|
387
|
+
});
|
|
388
|
+
const SourceSizeTag = ({ size })=>/*#__PURE__*/ jsx(AbstractTag, {
|
|
389
|
+
color: "cyan",
|
|
390
|
+
style: null,
|
|
391
|
+
tooltipTitle: "The original size of this file, before any transformations and minification.",
|
|
392
|
+
children: `source size: ${formatSize(size)}`
|
|
413
393
|
});
|
|
414
394
|
const AssetDetail = ({ asset, chunks: includeChunks, modules: includeModules, moduleSizeLimit, height, root })=>{
|
|
415
395
|
const [moduleKeyword, setModuleKeyword] = useState('');
|
|
416
396
|
const [defaultExpandAll, setDefaultExpandAll] = useState(false);
|
|
417
397
|
const [moduleJumpList, setModuleJumpList] = useState([]);
|
|
418
|
-
const [
|
|
398
|
+
const [showModuleGraphViewer, setShowModuleGraphViewer] = useState(false);
|
|
419
399
|
const filteredModules = useMemo(()=>{
|
|
420
400
|
let res = includeModules.slice();
|
|
421
401
|
if (moduleKeyword) {
|
|
@@ -429,197 +409,11 @@ const AssetDetail = ({ asset, chunks: includeChunks, modules: includeModules, mo
|
|
|
429
409
|
moduleKeyword,
|
|
430
410
|
moduleSizeLimit
|
|
431
411
|
]);
|
|
432
|
-
const fileStructures = useMemo(()=>{
|
|
433
|
-
const normalizePath = (path)=>path.replace(/\\/g, '/');
|
|
434
|
-
const res = createFileStructures({
|
|
435
|
-
files: filteredModules.map((e)=>e.path).filter(Boolean),
|
|
436
|
-
inlinedResourcePathKey: inlinedResourcePathKey,
|
|
437
|
-
fileTitle (file, basename) {
|
|
438
|
-
const mod = filteredModules.find((e)=>normalizePath(e.path) === normalizePath(file));
|
|
439
|
-
if (!mod) return basename;
|
|
440
|
-
const { parsedSize = 0, sourceSize = 0, gzipSize = 0 } = mod.size;
|
|
441
|
-
const isConcatenation = mod.kind === SDK.ModuleKind.Concatenation;
|
|
442
|
-
const containedOtherModules = !isConcatenation && 0 === parsedSize && includeModules.filter((e)=>e !== mod && e.modules && e.modules.indexOf(mod.id) > -1);
|
|
443
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
444
|
-
className: index_module["bundle-tree"],
|
|
445
|
-
children: [
|
|
446
|
-
/*#__PURE__*/ jsx(Popover, {
|
|
447
|
-
content: `Open the ${basename}’s module reasons tree.`,
|
|
448
|
-
placement: "bottom",
|
|
449
|
-
children: /*#__PURE__*/ jsxs("div", {
|
|
450
|
-
className: index_module.box,
|
|
451
|
-
onClick: ()=>{
|
|
452
|
-
setModuleJumpList([
|
|
453
|
-
mod.id
|
|
454
|
-
]);
|
|
455
|
-
setShow(true);
|
|
456
|
-
},
|
|
457
|
-
children: [
|
|
458
|
-
/*#__PURE__*/ jsx("div", {
|
|
459
|
-
className: index_module.keywords,
|
|
460
|
-
children: /*#__PURE__*/ jsx(Keyword, {
|
|
461
|
-
ellipsis: true,
|
|
462
|
-
text: basename,
|
|
463
|
-
keyword: ''
|
|
464
|
-
})
|
|
465
|
-
}),
|
|
466
|
-
/*#__PURE__*/ jsx("div", {
|
|
467
|
-
className: index_module.dividerDiv,
|
|
468
|
-
children: /*#__PURE__*/ jsx(Divider, {
|
|
469
|
-
className: index_module.divider,
|
|
470
|
-
dashed: true
|
|
471
|
-
})
|
|
472
|
-
})
|
|
473
|
-
]
|
|
474
|
-
})
|
|
475
|
-
}),
|
|
476
|
-
/*#__PURE__*/ jsxs(Space, {
|
|
477
|
-
children: [
|
|
478
|
-
0 !== parsedSize ? /*#__PURE__*/ jsx(Fragment, {
|
|
479
|
-
children: 'number' == typeof gzipSize ? /*#__PURE__*/ jsx(Popover, {
|
|
480
|
-
placement: "bottom",
|
|
481
|
-
content: /*#__PURE__*/ jsx(SourceSizeTag, {
|
|
482
|
-
size: sourceSize
|
|
483
|
-
}),
|
|
484
|
-
children: /*#__PURE__*/ jsxs(Space, {
|
|
485
|
-
direction: "horizontal",
|
|
486
|
-
children: [
|
|
487
|
-
/*#__PURE__*/ jsx(BundledSizeTag, {
|
|
488
|
-
size: parsedSize
|
|
489
|
-
}),
|
|
490
|
-
/*#__PURE__*/ jsx(GzippedSizeTag, {
|
|
491
|
-
size: gzipSize
|
|
492
|
-
})
|
|
493
|
-
]
|
|
494
|
-
})
|
|
495
|
-
}) : /*#__PURE__*/ jsxs(Space, {
|
|
496
|
-
direction: "horizontal",
|
|
497
|
-
children: [
|
|
498
|
-
/*#__PURE__*/ jsx(BundledSizeTag, {
|
|
499
|
-
size: parsedSize
|
|
500
|
-
}),
|
|
501
|
-
/*#__PURE__*/ jsx(SourceSizeTag, {
|
|
502
|
-
size: sourceSize
|
|
503
|
-
})
|
|
504
|
-
]
|
|
505
|
-
})
|
|
506
|
-
}) : 0 !== sourceSize ? /*#__PURE__*/ jsx(SourceSizeTag, {
|
|
507
|
-
size: sourceSize
|
|
508
|
-
}) : null,
|
|
509
|
-
isConcatenation ? /*#__PURE__*/ jsx(ConcatenatedTag, {
|
|
510
|
-
moduleCount: mod.modules?.length || 0
|
|
511
|
-
}) : null,
|
|
512
|
-
containedOtherModules && containedOtherModules.length ? /*#__PURE__*/ jsx(Tooltip, {
|
|
513
|
-
title: /*#__PURE__*/ jsxs(Space, {
|
|
514
|
-
direction: "vertical",
|
|
515
|
-
children: [
|
|
516
|
-
/*#__PURE__*/ jsx(Typography.Text, {
|
|
517
|
-
style: {
|
|
518
|
-
color: 'inherit'
|
|
519
|
-
},
|
|
520
|
-
children: "This module is concatenated into another container module:"
|
|
521
|
-
}),
|
|
522
|
-
containedOtherModules.map(({ id, path })=>{
|
|
523
|
-
if (isJsDataUrl(path)) return /*#__PURE__*/ jsx(Typography.Paragraph, {
|
|
524
|
-
ellipsis: {
|
|
525
|
-
rows: 4
|
|
526
|
-
},
|
|
527
|
-
style: {
|
|
528
|
-
color: 'inherit',
|
|
529
|
-
maxWidth: '100%'
|
|
530
|
-
},
|
|
531
|
-
code: true,
|
|
532
|
-
children: path
|
|
533
|
-
}, id);
|
|
534
|
-
const p = relative(dirname(mod.path), path);
|
|
535
|
-
if (p.startsWith("javascript;charset=utf-8;base64,")) return /*#__PURE__*/ jsx(Typography.Text, {
|
|
536
|
-
style: {
|
|
537
|
-
color: 'inherit',
|
|
538
|
-
maxWidth: '100%'
|
|
539
|
-
},
|
|
540
|
-
code: true,
|
|
541
|
-
children: '.' === p[0] ? p : `./${p}`
|
|
542
|
-
}, id);
|
|
543
|
-
return /*#__PURE__*/ jsx(Typography.Text, {
|
|
544
|
-
style: {
|
|
545
|
-
color: 'inherit'
|
|
546
|
-
},
|
|
547
|
-
code: true,
|
|
548
|
-
children: '.' === p[0] ? p : `./${p}`
|
|
549
|
-
}, id);
|
|
550
|
-
})
|
|
551
|
-
]
|
|
552
|
-
}),
|
|
553
|
-
children: /*#__PURE__*/ jsx(Tag, {
|
|
554
|
-
color: "green",
|
|
555
|
-
children: "concatenated"
|
|
556
|
-
})
|
|
557
|
-
}) : null,
|
|
558
|
-
/*#__PURE__*/ jsx(ModuleCodeViewer, {
|
|
559
|
-
data: mod
|
|
560
|
-
})
|
|
561
|
-
]
|
|
562
|
-
})
|
|
563
|
-
]
|
|
564
|
-
});
|
|
565
|
-
},
|
|
566
|
-
dirTitle (dir, defaultTitle) {
|
|
567
|
-
const mods = [];
|
|
568
|
-
const paths = getChildrenModule(dir, mods);
|
|
569
|
-
if (paths.length) {
|
|
570
|
-
const normalizePath = (path)=>path.replace(/\\/g, '/');
|
|
571
|
-
const mods = paths.map((e)=>includeModules.find((m)=>normalizePath(m.path) === normalizePath(e)));
|
|
572
|
-
const parsedSize = sumBy(mods, (e)=>e?.size?.parsedSize || 0);
|
|
573
|
-
const sourceSize = sumBy(mods, (e)=>e?.size?.sourceSize || 0);
|
|
574
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
575
|
-
className: index_module["bundle-tree"],
|
|
576
|
-
children: [
|
|
577
|
-
/*#__PURE__*/ jsxs("div", {
|
|
578
|
-
className: index_module.box,
|
|
579
|
-
children: [
|
|
580
|
-
/*#__PURE__*/ jsx("div", {
|
|
581
|
-
className: index_module.keywords,
|
|
582
|
-
children: /*#__PURE__*/ jsx(Keyword, {
|
|
583
|
-
ellipsis: true,
|
|
584
|
-
text: defaultTitle,
|
|
585
|
-
keyword: ''
|
|
586
|
-
})
|
|
587
|
-
}),
|
|
588
|
-
/*#__PURE__*/ jsx("div", {
|
|
589
|
-
className: index_module.dividerDiv,
|
|
590
|
-
children: /*#__PURE__*/ jsx(Divider, {
|
|
591
|
-
className: index_module.divider,
|
|
592
|
-
dashed: true
|
|
593
|
-
})
|
|
594
|
-
})
|
|
595
|
-
]
|
|
596
|
-
}),
|
|
597
|
-
/*#__PURE__*/ jsx(Space, {
|
|
598
|
-
children: parsedSize > 0 ? /*#__PURE__*/ jsxs(Fragment, {
|
|
599
|
-
children: [
|
|
600
|
-
/*#__PURE__*/ jsx(TotalBundledSizeTag, {
|
|
601
|
-
size: parsedSize
|
|
602
|
-
}),
|
|
603
|
-
/*#__PURE__*/ jsx(TotalSourceSizeTag, {
|
|
604
|
-
size: sourceSize
|
|
605
|
-
})
|
|
606
|
-
]
|
|
607
|
-
}) : /*#__PURE__*/ jsx(TotalSourceSizeTag, {
|
|
608
|
-
size: sourceSize
|
|
609
|
-
})
|
|
610
|
-
})
|
|
611
|
-
]
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
return defaultTitle;
|
|
615
|
-
},
|
|
616
|
-
page: 'bundle'
|
|
617
|
-
});
|
|
618
|
-
return res;
|
|
619
|
-
}, [
|
|
620
|
-
filteredModules
|
|
621
|
-
]);
|
|
622
412
|
const onSearch = (value)=>setModuleKeyword(value);
|
|
413
|
+
const openModuleGraphViewer = useCallback((modId)=>{
|
|
414
|
+
setShowModuleGraphViewer(true);
|
|
415
|
+
setModuleJumpList(modId);
|
|
416
|
+
}, []);
|
|
623
417
|
useEffect(()=>{
|
|
624
418
|
setModuleKeyword('');
|
|
625
419
|
setDefaultExpandAll(false);
|
|
@@ -637,25 +431,26 @@ const AssetDetail = ({ asset, chunks: includeChunks, modules: includeModules, mo
|
|
|
637
431
|
setModuleJumpList
|
|
638
432
|
},
|
|
639
433
|
children: /*#__PURE__*/ jsxs(Card, {
|
|
640
|
-
className:
|
|
434
|
+
className: asset_module.bundle,
|
|
641
435
|
title: `Modules of "${asset.path}"`,
|
|
642
|
-
|
|
643
|
-
|
|
436
|
+
style: {
|
|
437
|
+
'--body-min-height': height + 'px'
|
|
438
|
+
},
|
|
439
|
+
classNames: {
|
|
440
|
+
body: asset_module.bundleBody
|
|
644
441
|
},
|
|
645
442
|
size: "small",
|
|
646
443
|
children: [
|
|
647
|
-
includeModules.length ? /*#__PURE__*/ jsxs(
|
|
444
|
+
includeModules.length ? /*#__PURE__*/ jsxs(Fragment, {
|
|
648
445
|
children: [
|
|
649
|
-
/*#__PURE__*/ jsx(
|
|
650
|
-
span: 24,
|
|
446
|
+
/*#__PURE__*/ jsx("div", {
|
|
651
447
|
children: /*#__PURE__*/ jsx(ModulesStatistics, {
|
|
652
448
|
modules: includeModules,
|
|
653
449
|
chunks: includeChunks,
|
|
654
450
|
filteredModules: filteredModules
|
|
655
451
|
})
|
|
656
452
|
}),
|
|
657
|
-
/*#__PURE__*/ jsx(
|
|
658
|
-
span: 24,
|
|
453
|
+
/*#__PURE__*/ jsx("div", {
|
|
659
454
|
children: /*#__PURE__*/ jsxs(Space, {
|
|
660
455
|
children: [
|
|
661
456
|
/*#__PURE__*/ jsx(KeywordInput, {
|
|
@@ -670,34 +465,13 @@ const AssetDetail = ({ asset, chunks: includeChunks, modules: includeModules, mo
|
|
|
670
465
|
]
|
|
671
466
|
})
|
|
672
467
|
}),
|
|
673
|
-
/*#__PURE__*/ jsx(
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
defaultExpandAll: defaultExpandAll || filteredModules.length <= 20,
|
|
681
|
-
onExpand: (expandedKeys)=>{
|
|
682
|
-
expandedModulesKeys = expandedKeys;
|
|
683
|
-
},
|
|
684
|
-
defaultExpandParent: true,
|
|
685
|
-
defaultExpandedKeys: expandedModulesKeys?.length ? expandedModulesKeys : 1 === fileStructures.length ? [
|
|
686
|
-
fileStructures[0].key
|
|
687
|
-
] : [],
|
|
688
|
-
treeData: fileStructures,
|
|
689
|
-
rootStyle: {
|
|
690
|
-
maxHeight: '500px',
|
|
691
|
-
overflow: 'auto',
|
|
692
|
-
border: '1px solid rgba(235, 237, 241)',
|
|
693
|
-
padding: '14px 20px'
|
|
694
|
-
}
|
|
695
|
-
}, `tree_${moduleKeyword}_${defaultExpandAll}_${asset.path}`) : /*#__PURE__*/ jsx(Empty, {
|
|
696
|
-
description: /*#__PURE__*/ jsx(Typography.Text, {
|
|
697
|
-
strong: true,
|
|
698
|
-
children: `"${moduleKeyword}" can't match any modules`
|
|
699
|
-
})
|
|
700
|
-
})
|
|
468
|
+
/*#__PURE__*/ jsx(AssetDetailTree, {
|
|
469
|
+
assetPath: asset.path,
|
|
470
|
+
includeModules: includeModules,
|
|
471
|
+
filteredModules: filteredModules,
|
|
472
|
+
defaultExpandAll: defaultExpandAll,
|
|
473
|
+
moduleKeyword: moduleKeyword,
|
|
474
|
+
openModuleGraphViewer: openModuleGraphViewer
|
|
701
475
|
})
|
|
702
476
|
]
|
|
703
477
|
}) : /*#__PURE__*/ jsx(Empty, {
|
|
@@ -708,14 +482,307 @@ const AssetDetail = ({ asset, chunks: includeChunks, modules: includeModules, mo
|
|
|
708
482
|
}),
|
|
709
483
|
/*#__PURE__*/ jsx(ModuleGraphViewer, {
|
|
710
484
|
id: moduleJumpList?.length ? moduleJumpList[moduleJumpList.length - 1] : '',
|
|
711
|
-
show:
|
|
712
|
-
setShow:
|
|
485
|
+
show: showModuleGraphViewer,
|
|
486
|
+
setShow: setShowModuleGraphViewer,
|
|
713
487
|
cwd: root
|
|
714
488
|
})
|
|
715
489
|
]
|
|
716
490
|
})
|
|
717
491
|
});
|
|
718
492
|
};
|
|
493
|
+
let defaultExpandedModulesKeys = [];
|
|
494
|
+
const AssetDetailTree = /*#__PURE__*/ memo(({ filteredModules, includeModules, defaultExpandAll, moduleKeyword, openModuleGraphViewer, assetPath })=>{
|
|
495
|
+
const ITEM_HEIGHT = 30;
|
|
496
|
+
const PERMANENT_PERF_MODE = false;
|
|
497
|
+
const DISABLE_PERF_MODE_SCROLL_DELAY = 150;
|
|
498
|
+
const [performanceMode, setPerformanceMode] = useState(PERMANENT_PERF_MODE);
|
|
499
|
+
const [bundleTreeRef, { height: bundleTreeHeight, width: bundleTreeWidth }] = useElementSize();
|
|
500
|
+
const onScroll = useMemo(()=>{
|
|
501
|
+
if (PERMANENT_PERF_MODE) return;
|
|
502
|
+
const disablePerformanceMode = debounce(()=>{
|
|
503
|
+
setPerformanceMode(false);
|
|
504
|
+
}, DISABLE_PERF_MODE_SCROLL_DELAY);
|
|
505
|
+
const onScroll = ()=>{
|
|
506
|
+
setPerformanceMode(true);
|
|
507
|
+
disablePerformanceMode();
|
|
508
|
+
};
|
|
509
|
+
return onScroll;
|
|
510
|
+
}, []);
|
|
511
|
+
const treeData = useMemo(()=>{
|
|
512
|
+
const normalizePath = (path)=>path.replace(/\\/g, '/');
|
|
513
|
+
const filteredModulesMap = new Map();
|
|
514
|
+
const files = [];
|
|
515
|
+
for (const mod of filteredModules)if (mod.path) {
|
|
516
|
+
filteredModulesMap.set(normalizePath(mod.path), mod);
|
|
517
|
+
files.push(mod.path);
|
|
518
|
+
}
|
|
519
|
+
const includeModulesMap = new Map();
|
|
520
|
+
for (const mod of includeModules)if (mod.path) includeModulesMap.set(normalizePath(mod.path), mod);
|
|
521
|
+
const onFileEntryClick = (modId)=>openModuleGraphViewer([
|
|
522
|
+
modId
|
|
523
|
+
]);
|
|
524
|
+
const treeData = createFileStructures({
|
|
525
|
+
files,
|
|
526
|
+
inlinedResourcePathKey: inlinedResourcePathKey,
|
|
527
|
+
fileTitle (file, basename) {
|
|
528
|
+
const mod = filteredModulesMap.get(normalizePath(file));
|
|
529
|
+
if (!mod) return basename;
|
|
530
|
+
return /*#__PURE__*/ jsx(AssetDetailTreeFileEntry, {
|
|
531
|
+
mod: mod,
|
|
532
|
+
basename: basename,
|
|
533
|
+
includeModules: includeModules,
|
|
534
|
+
onClick: onFileEntryClick
|
|
535
|
+
});
|
|
536
|
+
},
|
|
537
|
+
dirTitle (dir, defaultTitle) {
|
|
538
|
+
const paths = getChildrenModule(dir, []);
|
|
539
|
+
if (!paths.length) return defaultTitle;
|
|
540
|
+
const { parsedSize, sourceSize } = paths.reduce((acc, path)=>{
|
|
541
|
+
const mod = includeModulesMap.get(normalizePath(path));
|
|
542
|
+
if (mod) {
|
|
543
|
+
acc.sourceSize += mod.size?.sourceSize || 0;
|
|
544
|
+
acc.parsedSize += mod.size?.parsedSize || 0;
|
|
545
|
+
}
|
|
546
|
+
return acc;
|
|
547
|
+
}, {
|
|
548
|
+
sourceSize: 0,
|
|
549
|
+
parsedSize: 0
|
|
550
|
+
});
|
|
551
|
+
return /*#__PURE__*/ jsx(AssetDetailTreeDirEntry, {
|
|
552
|
+
title: defaultTitle,
|
|
553
|
+
parsedSize: parsedSize,
|
|
554
|
+
sourceSize: sourceSize
|
|
555
|
+
});
|
|
556
|
+
},
|
|
557
|
+
page: 'bundle'
|
|
558
|
+
});
|
|
559
|
+
return treeData;
|
|
560
|
+
}, [
|
|
561
|
+
filteredModules,
|
|
562
|
+
openModuleGraphViewer
|
|
563
|
+
]);
|
|
564
|
+
return /*#__PURE__*/ jsx(PopupContext.Provider, {
|
|
565
|
+
value: {
|
|
566
|
+
enabled: !performanceMode
|
|
567
|
+
},
|
|
568
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
569
|
+
className: asset_module.bundleTree,
|
|
570
|
+
style: {
|
|
571
|
+
marginTop: Size.BasePadding,
|
|
572
|
+
'--item-height': ITEM_HEIGHT + 'px'
|
|
573
|
+
},
|
|
574
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
575
|
+
className: asset_module.bundleTreeViewport,
|
|
576
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
577
|
+
className: asset_module.bundleTreeInnerViewport,
|
|
578
|
+
ref: bundleTreeRef,
|
|
579
|
+
children: bundleTreeHeight > 0 && /*#__PURE__*/ jsx(Fragment, {
|
|
580
|
+
children: filteredModules.length ? /*#__PURE__*/ jsx(DirectoryTree, {
|
|
581
|
+
onScroll: onScroll,
|
|
582
|
+
selectable: false,
|
|
583
|
+
virtual: true,
|
|
584
|
+
itemHeight: ITEM_HEIGHT,
|
|
585
|
+
height: bundleTreeHeight,
|
|
586
|
+
style: bundleTreeWidth ? {
|
|
587
|
+
width: bundleTreeWidth + 'px'
|
|
588
|
+
} : void 0,
|
|
589
|
+
defaultExpandAll: defaultExpandAll || filteredModules.length <= 20,
|
|
590
|
+
onExpand: (expandedKeys)=>{
|
|
591
|
+
defaultExpandedModulesKeys = expandedKeys;
|
|
592
|
+
},
|
|
593
|
+
defaultExpandParent: true,
|
|
594
|
+
defaultExpandedKeys: defaultExpandedModulesKeys?.length ? defaultExpandedModulesKeys : 1 === treeData.length ? [
|
|
595
|
+
treeData[0].key
|
|
596
|
+
] : [],
|
|
597
|
+
treeData: treeData
|
|
598
|
+
}, `tree_${moduleKeyword}_${defaultExpandAll}_${assetPath}`) : /*#__PURE__*/ jsx(Empty, {
|
|
599
|
+
description: /*#__PURE__*/ jsx(Typography.Text, {
|
|
600
|
+
strong: true,
|
|
601
|
+
children: `"${moduleKeyword}" can't match any modules`
|
|
602
|
+
})
|
|
603
|
+
})
|
|
604
|
+
})
|
|
605
|
+
})
|
|
606
|
+
})
|
|
607
|
+
})
|
|
608
|
+
});
|
|
609
|
+
});
|
|
610
|
+
const AssetDetailTreeDirEntry = /*#__PURE__*/ memo(({ title, parsedSize, sourceSize })=>{
|
|
611
|
+
const render = ()=>/*#__PURE__*/ jsxs("div", {
|
|
612
|
+
className: asset_module.bundleTreeEntryContent,
|
|
613
|
+
children: [
|
|
614
|
+
/*#__PURE__*/ jsx(asset_Popover, {
|
|
615
|
+
content: title,
|
|
616
|
+
children: /*#__PURE__*/ jsx(Typography.Text, {
|
|
617
|
+
className: asset_module.bundleTreeEntryTitle,
|
|
618
|
+
children: title
|
|
619
|
+
})
|
|
620
|
+
}),
|
|
621
|
+
/*#__PURE__*/ jsx("div", {
|
|
622
|
+
className: asset_module.divider
|
|
623
|
+
}),
|
|
624
|
+
/*#__PURE__*/ jsx(Space, {
|
|
625
|
+
children: parsedSize > 0 ? /*#__PURE__*/ jsxs(Fragment, {
|
|
626
|
+
children: [
|
|
627
|
+
/*#__PURE__*/ jsx(TotalBundledSizeTag, {
|
|
628
|
+
size: parsedSize
|
|
629
|
+
}),
|
|
630
|
+
/*#__PURE__*/ jsx(TotalSourceSizeTag, {
|
|
631
|
+
size: sourceSize
|
|
632
|
+
})
|
|
633
|
+
]
|
|
634
|
+
}) : /*#__PURE__*/ jsx(TotalSourceSizeTag, {
|
|
635
|
+
size: sourceSize
|
|
636
|
+
})
|
|
637
|
+
})
|
|
638
|
+
]
|
|
639
|
+
});
|
|
640
|
+
const renderWithoutPopups = ()=>/*#__PURE__*/ jsx(DisablePopups, {
|
|
641
|
+
children: render()
|
|
642
|
+
});
|
|
643
|
+
return /*#__PURE__*/ jsx("div", {
|
|
644
|
+
className: asset_module.bundleTreeEntry,
|
|
645
|
+
children: /*#__PURE__*/ jsx(ErrorBoundary, {
|
|
646
|
+
fallbackRender: renderWithoutPopups,
|
|
647
|
+
children: render()
|
|
648
|
+
})
|
|
649
|
+
});
|
|
650
|
+
});
|
|
651
|
+
const AssetDetailTreeFileEntry = /*#__PURE__*/ memo(({ mod, basename, includeModules, onClick })=>{
|
|
652
|
+
const isConcatenation = mod.kind === SDK.ModuleKind.Concatenation;
|
|
653
|
+
const { parsedSize = 0, sourceSize = 0, gzipSize = 0 } = mod.size;
|
|
654
|
+
const renderSize = ()=>{
|
|
655
|
+
if (0 !== parsedSize) {
|
|
656
|
+
const sourceSizeTag = /*#__PURE__*/ jsx(SourceSizeTag, {
|
|
657
|
+
size: sourceSize
|
|
658
|
+
});
|
|
659
|
+
const bundledSizeTag = /*#__PURE__*/ jsx(BundledSizeTag, {
|
|
660
|
+
size: parsedSize
|
|
661
|
+
});
|
|
662
|
+
if ('number' == typeof gzipSize) return /*#__PURE__*/ jsx(asset_Popover, {
|
|
663
|
+
placement: "bottom",
|
|
664
|
+
content: sourceSizeTag,
|
|
665
|
+
children: /*#__PURE__*/ jsxs(Space, {
|
|
666
|
+
direction: "horizontal",
|
|
667
|
+
children: [
|
|
668
|
+
bundledSizeTag,
|
|
669
|
+
/*#__PURE__*/ jsx(GzippedSizeTag, {
|
|
670
|
+
size: gzipSize
|
|
671
|
+
})
|
|
672
|
+
]
|
|
673
|
+
})
|
|
674
|
+
});
|
|
675
|
+
return /*#__PURE__*/ jsxs(Space, {
|
|
676
|
+
direction: "horizontal",
|
|
677
|
+
children: [
|
|
678
|
+
bundledSizeTag,
|
|
679
|
+
sourceSizeTag
|
|
680
|
+
]
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
if (0 !== sourceSize) return /*#__PURE__*/ jsx(SourceSizeTag, {
|
|
684
|
+
size: sourceSize
|
|
685
|
+
});
|
|
686
|
+
return null;
|
|
687
|
+
};
|
|
688
|
+
const renderContainedOtherModules = ()=>{
|
|
689
|
+
const containedOtherModules = !isConcatenation && 0 === parsedSize && includeModules.filter((e)=>e !== mod && e.modules && e.modules.indexOf(mod.id) > -1);
|
|
690
|
+
if (containedOtherModules && containedOtherModules.length) return /*#__PURE__*/ jsx(asset_Tooltip, {
|
|
691
|
+
title: /*#__PURE__*/ jsxs(Space, {
|
|
692
|
+
direction: "vertical",
|
|
693
|
+
children: [
|
|
694
|
+
/*#__PURE__*/ jsx(Typography.Text, {
|
|
695
|
+
style: {
|
|
696
|
+
color: 'inherit'
|
|
697
|
+
},
|
|
698
|
+
children: "This module is concatenated into another container module:"
|
|
699
|
+
}),
|
|
700
|
+
containedOtherModules.map(({ id, path })=>{
|
|
701
|
+
if (isJsDataUrl(path)) return /*#__PURE__*/ jsx(Typography.Paragraph, {
|
|
702
|
+
ellipsis: {
|
|
703
|
+
rows: 4
|
|
704
|
+
},
|
|
705
|
+
style: {
|
|
706
|
+
color: 'inherit',
|
|
707
|
+
maxWidth: '100%'
|
|
708
|
+
},
|
|
709
|
+
code: true,
|
|
710
|
+
children: path
|
|
711
|
+
}, id);
|
|
712
|
+
const p = relative(dirname(mod.path), path);
|
|
713
|
+
if (p.startsWith("javascript;charset=utf-8;base64,")) return /*#__PURE__*/ jsx(Typography.Text, {
|
|
714
|
+
style: {
|
|
715
|
+
color: 'inherit',
|
|
716
|
+
maxWidth: '100%'
|
|
717
|
+
},
|
|
718
|
+
code: true,
|
|
719
|
+
children: '.' === p[0] ? p : `./${p}`
|
|
720
|
+
}, id);
|
|
721
|
+
return /*#__PURE__*/ jsx(Typography.Text, {
|
|
722
|
+
style: {
|
|
723
|
+
color: 'inherit'
|
|
724
|
+
},
|
|
725
|
+
code: true,
|
|
726
|
+
children: '.' === p[0] ? p : `./${p}`
|
|
727
|
+
}, id);
|
|
728
|
+
})
|
|
729
|
+
]
|
|
730
|
+
}),
|
|
731
|
+
children: /*#__PURE__*/ jsx(Tag, {
|
|
732
|
+
color: "green",
|
|
733
|
+
children: "concatenated"
|
|
734
|
+
})
|
|
735
|
+
});
|
|
736
|
+
return null;
|
|
737
|
+
};
|
|
738
|
+
const render = ()=>/*#__PURE__*/ jsxs("div", {
|
|
739
|
+
className: asset_module.bundleTreeEntryContent,
|
|
740
|
+
children: [
|
|
741
|
+
/*#__PURE__*/ jsx(asset_Popover, {
|
|
742
|
+
content: `Open the ${basename}’s module reasons tree.`,
|
|
743
|
+
placement: "bottom",
|
|
744
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
745
|
+
className: asset_module.bundleTreeEntryTitleWrap,
|
|
746
|
+
onClick: ()=>onClick(mod.id),
|
|
747
|
+
children: [
|
|
748
|
+
/*#__PURE__*/ jsx(asset_Popover, {
|
|
749
|
+
content: basename,
|
|
750
|
+
children: /*#__PURE__*/ jsx(Typography.Text, {
|
|
751
|
+
className: asset_module.bundleTreeEntryTitle,
|
|
752
|
+
children: basename
|
|
753
|
+
})
|
|
754
|
+
}),
|
|
755
|
+
/*#__PURE__*/ jsx("div", {
|
|
756
|
+
className: asset_module.divider
|
|
757
|
+
})
|
|
758
|
+
]
|
|
759
|
+
})
|
|
760
|
+
}),
|
|
761
|
+
/*#__PURE__*/ jsxs(Space, {
|
|
762
|
+
children: [
|
|
763
|
+
renderSize(),
|
|
764
|
+
isConcatenation && /*#__PURE__*/ jsx(ConcatenatedTag, {
|
|
765
|
+
moduleCount: mod.modules?.length || 0
|
|
766
|
+
}),
|
|
767
|
+
renderContainedOtherModules(),
|
|
768
|
+
/*#__PURE__*/ jsx(ModuleCodeViewer, {
|
|
769
|
+
data: mod
|
|
770
|
+
})
|
|
771
|
+
]
|
|
772
|
+
})
|
|
773
|
+
]
|
|
774
|
+
});
|
|
775
|
+
const renderWithoutPopups = ()=>/*#__PURE__*/ jsx(DisablePopups, {
|
|
776
|
+
children: render()
|
|
777
|
+
});
|
|
778
|
+
return /*#__PURE__*/ jsx("div", {
|
|
779
|
+
className: asset_module.bundleTreeEntry,
|
|
780
|
+
children: /*#__PURE__*/ jsx(ErrorBoundary, {
|
|
781
|
+
fallbackRender: renderWithoutPopups,
|
|
782
|
+
children: render()
|
|
783
|
+
})
|
|
784
|
+
});
|
|
785
|
+
});
|
|
719
786
|
export { AssetDetail, ModuleCodeViewer, ModuleGraphViewer, ModulesStatistics, getChildrenModule };
|
|
720
787
|
|
|
721
788
|
//# sourceMappingURL=asset.mjs.map
|