@rsdoctor/components 0.0.0-next-20240620044732

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (330) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -0
  3. package/dist/assets/connection-point.3b3c78ca.svg +1 -0
  4. package/dist/assets/webpack.98604d64.svg +1 -0
  5. package/dist/components/Alert/change.d.ts +8 -0
  6. package/dist/components/Alert/change.js +93 -0
  7. package/dist/components/Alert/file-relation.d.ts +3 -0
  8. package/dist/components/Alert/file-relation.js +9 -0
  9. package/dist/components/Alert/index.css +32 -0
  10. package/dist/components/Alert/index.d.ts +4 -0
  11. package/dist/components/Alert/index.js +37 -0
  12. package/dist/components/Alert/link.d.ts +3 -0
  13. package/dist/components/Alert/link.js +27 -0
  14. package/dist/components/Alert/package-relation.d.ts +17 -0
  15. package/dist/components/Alert/package-relation.js +281 -0
  16. package/dist/components/Alert/types.d.ts +31 -0
  17. package/dist/components/Alert/types.js +0 -0
  18. package/dist/components/Alert/view.d.ts +4 -0
  19. package/dist/components/Alert/view.js +58 -0
  20. package/dist/components/Alerts/bundle.d.ts +11 -0
  21. package/dist/components/Alerts/bundle.js +61 -0
  22. package/dist/components/Alerts/common.d.ts +15 -0
  23. package/dist/components/Alerts/common.js +112 -0
  24. package/dist/components/Alerts/compile.d.ts +10 -0
  25. package/dist/components/Alerts/compile.js +46 -0
  26. package/dist/components/Alerts/index.d.ts +3 -0
  27. package/dist/components/Alerts/index.js +3 -0
  28. package/dist/components/Alerts/overlay.d.ts +26 -0
  29. package/dist/components/Alerts/overlay.js +154 -0
  30. package/dist/components/Badge/index.d.ts +21 -0
  31. package/dist/components/Badge/index.js +87 -0
  32. package/dist/components/BundleDiff/DiffContainer/assets.d.ts +7 -0
  33. package/dist/components/BundleDiff/DiffContainer/assets.js +507 -0
  34. package/dist/components/BundleDiff/DiffContainer/cards.d.ts +3 -0
  35. package/dist/components/BundleDiff/DiffContainer/cards.js +156 -0
  36. package/dist/components/BundleDiff/DiffContainer/changes.d.ts +15 -0
  37. package/dist/components/BundleDiff/DiffContainer/changes.js +69 -0
  38. package/dist/components/BundleDiff/DiffContainer/constants.d.ts +11 -0
  39. package/dist/components/BundleDiff/DiffContainer/constants.js +17 -0
  40. package/dist/components/BundleDiff/DiffContainer/diff.d.ts +23 -0
  41. package/dist/components/BundleDiff/DiffContainer/diff.js +114 -0
  42. package/dist/components/BundleDiff/DiffContainer/index.d.ts +3 -0
  43. package/dist/components/BundleDiff/DiffContainer/index.js +180 -0
  44. package/dist/components/BundleDiff/DiffContainer/modules.d.ts +8 -0
  45. package/dist/components/BundleDiff/DiffContainer/modules.js +302 -0
  46. package/dist/components/BundleDiff/DiffContainer/overview.d.ts +5 -0
  47. package/dist/components/BundleDiff/DiffContainer/overview.js +178 -0
  48. package/dist/components/BundleDiff/DiffContainer/packages.d.ts +19 -0
  49. package/dist/components/BundleDiff/DiffContainer/packages.js +330 -0
  50. package/dist/components/BundleDiff/DiffContainer/row.d.ts +9 -0
  51. package/dist/components/BundleDiff/DiffContainer/row.js +369 -0
  52. package/dist/components/BundleDiff/DiffContainer/types.d.ts +45 -0
  53. package/dist/components/BundleDiff/DiffContainer/types.js +0 -0
  54. package/dist/components/BundleDiff/DiffContainer/utils.d.ts +2 -0
  55. package/dist/components/BundleDiff/DiffContainer/utils.js +24 -0
  56. package/dist/components/BundleDiff/DiffServerAPIProvider/index.d.ts +4 -0
  57. package/dist/components/BundleDiff/DiffServerAPIProvider/index.js +37 -0
  58. package/dist/components/BundleDiff/constants.d.ts +11 -0
  59. package/dist/components/BundleDiff/constants.js +19 -0
  60. package/dist/components/BundleDiff/index.d.ts +1 -0
  61. package/dist/components/BundleDiff/index.js +1 -0
  62. package/dist/components/Card/diff.d.ts +24 -0
  63. package/dist/components/Card/diff.js +116 -0
  64. package/dist/components/Card/index.d.ts +9 -0
  65. package/dist/components/Card/index.js +50 -0
  66. package/dist/components/Card/size.d.ts +21 -0
  67. package/dist/components/Card/size.js +79 -0
  68. package/dist/components/Card/statistic.css +17 -0
  69. package/dist/components/Card/statistic.d.ts +12 -0
  70. package/dist/components/Card/statistic.js +19 -0
  71. package/dist/components/Charts/TimelineCharts/index.d.ts +8 -0
  72. package/dist/components/Charts/TimelineCharts/index.js +212 -0
  73. package/dist/components/Charts/bootstrap.d.ts +5 -0
  74. package/dist/components/Charts/bootstrap.js +44 -0
  75. package/dist/components/Charts/common.d.ts +13 -0
  76. package/dist/components/Charts/common.js +56 -0
  77. package/dist/components/Charts/constants.d.ts +2 -0
  78. package/dist/components/Charts/constants.js +46 -0
  79. package/dist/components/Charts/done.d.ts +5 -0
  80. package/dist/components/Charts/done.js +45 -0
  81. package/dist/components/Charts/index.d.ts +10 -0
  82. package/dist/components/Charts/index.js +37 -0
  83. package/dist/components/Charts/loader.css +31 -0
  84. package/dist/components/Charts/loader.d.ts +4 -0
  85. package/dist/components/Charts/loader.js +88 -0
  86. package/dist/components/Charts/minify.d.ts +5 -0
  87. package/dist/components/Charts/minify.js +37 -0
  88. package/dist/components/Charts/tooltips.css +62 -0
  89. package/dist/components/Charts/types.d.ts +61 -0
  90. package/dist/components/Charts/types.js +11 -0
  91. package/dist/components/Charts/utils.d.ts +13 -0
  92. package/dist/components/Charts/utils.js +206 -0
  93. package/dist/components/CodeViewer/config.d.ts +2 -0
  94. package/dist/components/CodeViewer/config.js +18 -0
  95. package/dist/components/CodeViewer/diff.d.ts +11 -0
  96. package/dist/components/CodeViewer/diff.js +35 -0
  97. package/dist/components/CodeViewer/hightlight.d.ts +10 -0
  98. package/dist/components/CodeViewer/hightlight.js +76 -0
  99. package/dist/components/CodeViewer/index.d.ts +4 -0
  100. package/dist/components/CodeViewer/index.js +4 -0
  101. package/dist/components/CodeViewer/viewer.d.ts +13 -0
  102. package/dist/components/CodeViewer/viewer.js +60 -0
  103. package/dist/components/Configuration/builder.d.ts +13 -0
  104. package/dist/components/Configuration/builder.js +67 -0
  105. package/dist/components/Configuration/index.d.ts +1 -0
  106. package/dist/components/Configuration/index.js +1 -0
  107. package/dist/components/FileTree/index.css +58 -0
  108. package/dist/components/FileTree/index.d.ts +4 -0
  109. package/dist/components/FileTree/index.js +42 -0
  110. package/dist/components/Form/keyword.d.ts +14 -0
  111. package/dist/components/Form/keyword.js +60 -0
  112. package/dist/components/Keyword/index.d.ts +6 -0
  113. package/dist/components/Keyword/index.js +36 -0
  114. package/dist/components/Layout/builder-select.d.ts +2 -0
  115. package/dist/components/Layout/builder-select.js +50 -0
  116. package/dist/components/Layout/constants.d.ts +1 -0
  117. package/dist/components/Layout/constants.js +4 -0
  118. package/dist/components/Layout/header.css +12 -0
  119. package/dist/components/Layout/header.d.ts +3 -0
  120. package/dist/components/Layout/header.js +86 -0
  121. package/dist/components/Layout/index.d.ts +5 -0
  122. package/dist/components/Layout/index.js +34 -0
  123. package/dist/components/Layout/menus.d.ts +8 -0
  124. package/dist/components/Layout/menus.js +167 -0
  125. package/dist/components/Layout/progress.d.ts +8 -0
  126. package/dist/components/Layout/progress.js +44 -0
  127. package/dist/components/Loader/Analysis/files.d.ts +8 -0
  128. package/dist/components/Loader/Analysis/files.js +193 -0
  129. package/dist/components/Loader/Analysis/index.d.ts +11 -0
  130. package/dist/components/Loader/Analysis/index.js +23 -0
  131. package/dist/components/Loader/executions.d.ts +9 -0
  132. package/dist/components/Loader/executions.js +199 -0
  133. package/dist/components/Manifest/api.d.ts +34 -0
  134. package/dist/components/Manifest/api.js +127 -0
  135. package/dist/components/Manifest/data.d.ts +8 -0
  136. package/dist/components/Manifest/data.js +65 -0
  137. package/dist/components/Manifest/index.d.ts +2 -0
  138. package/dist/components/Manifest/index.js +2 -0
  139. package/dist/components/Opener/code.d.ts +20 -0
  140. package/dist/components/Opener/code.js +78 -0
  141. package/dist/components/Opener/index.d.ts +2 -0
  142. package/dist/components/Opener/index.js +2 -0
  143. package/dist/components/Opener/vscode.d.ts +11 -0
  144. package/dist/components/Opener/vscode.js +42 -0
  145. package/dist/components/Overall/NumberButton.d.ts +8 -0
  146. package/dist/components/Overall/NumberButton.js +29 -0
  147. package/dist/components/Overall/NumberButton.module.js +5 -0
  148. package/dist/components/Overall/NumberButton_module.css +70 -0
  149. package/dist/components/Overall/bundle.d.ts +6 -0
  150. package/dist/components/Overall/bundle.js +167 -0
  151. package/dist/components/Overall/bundle.module.css +0 -0
  152. package/dist/components/Overall/card.module.js +5 -0
  153. package/dist/components/Overall/card_module.css +6 -0
  154. package/dist/components/Overall/compile.d.ts +5 -0
  155. package/dist/components/Overall/compile.js +67 -0
  156. package/dist/components/Overall/compile.module.js +5 -0
  157. package/dist/components/Overall/compile_module.css +4 -0
  158. package/dist/components/Overall/index.d.ts +3 -0
  159. package/dist/components/Overall/index.js +3 -0
  160. package/dist/components/Overall/list.module.js +5 -0
  161. package/dist/components/Overall/list_module.css +7 -0
  162. package/dist/components/Overall/project.d.ts +8 -0
  163. package/dist/components/Overall/project.js +73 -0
  164. package/dist/components/Plugins/webpack.d.ts +18 -0
  165. package/dist/components/Plugins/webpack.js +76 -0
  166. package/dist/components/Resolver/analysis.d.ts +15 -0
  167. package/dist/components/Resolver/analysis.js +144 -0
  168. package/dist/components/Select/index.d.ts +15 -0
  169. package/dist/components/Select/index.js +68 -0
  170. package/dist/components/Status/failed.d.ts +9 -0
  171. package/dist/components/Status/failed.js +33 -0
  172. package/dist/components/Status/index.d.ts +1 -0
  173. package/dist/components/Status/index.js +1 -0
  174. package/dist/components/TextDrawer/duplicate.d.ts +17 -0
  175. package/dist/components/TextDrawer/duplicate.js +69 -0
  176. package/dist/components/TextDrawer/index.d.ts +11 -0
  177. package/dist/components/TextDrawer/index.js +36 -0
  178. package/dist/components/Title/index.d.ts +15 -0
  179. package/dist/components/Title/index.js +10 -0
  180. package/dist/components/index.d.ts +12 -0
  181. package/dist/components/index.js +15 -0
  182. package/dist/components/worker/ecmaversion/client.d.ts +10 -0
  183. package/dist/components/worker/ecmaversion/client.js +60 -0
  184. package/dist/components/worker/ecmaversion/worker.d.ts +1 -0
  185. package/dist/components/worker/ecmaversion/worker.js +13 -0
  186. package/dist/components/worker/jsequal/client.d.ts +11 -0
  187. package/dist/components/worker/jsequal/client.js +38 -0
  188. package/dist/components/worker/jsequal/worker.d.ts +1 -0
  189. package/dist/components/worker/jsequal/worker.js +23 -0
  190. package/dist/config.d.ts +19 -0
  191. package/dist/config.js +25 -0
  192. package/dist/constants.d.ts +50 -0
  193. package/dist/constants.js +75 -0
  194. package/dist/index.d.ts +3 -0
  195. package/dist/index.js +6 -0
  196. package/dist/pages/BundleSize/components/asset.d.ts +26 -0
  197. package/dist/pages/BundleSize/components/asset.js +545 -0
  198. package/dist/pages/BundleSize/components/cards.d.ts +7 -0
  199. package/dist/pages/BundleSize/components/cards.js +143 -0
  200. package/dist/pages/BundleSize/components/editor.d.ts +5 -0
  201. package/dist/pages/BundleSize/components/editor.js +38 -0
  202. package/dist/pages/BundleSize/components/index.css +20 -0
  203. package/dist/pages/BundleSize/components/index.d.ts +16 -0
  204. package/dist/pages/BundleSize/components/index.js +366 -0
  205. package/dist/pages/BundleSize/config.d.ts +7 -0
  206. package/dist/pages/BundleSize/config.js +9 -0
  207. package/dist/pages/BundleSize/constants.d.ts +5 -0
  208. package/dist/pages/BundleSize/constants.js +9 -0
  209. package/dist/pages/BundleSize/index.d.ts +3 -0
  210. package/dist/pages/BundleSize/index.js +11 -0
  211. package/dist/pages/ModuleAnalyze/chunks.d.ts +6 -0
  212. package/dist/pages/ModuleAnalyze/chunks.js +48 -0
  213. package/dist/pages/ModuleAnalyze/components/fileTreeCom.css +97 -0
  214. package/dist/pages/ModuleAnalyze/components/fileTreeCom.d.ts +15 -0
  215. package/dist/pages/ModuleAnalyze/components/fileTreeCom.js +120 -0
  216. package/dist/pages/ModuleAnalyze/constants.d.ts +7 -0
  217. package/dist/pages/ModuleAnalyze/constants.js +14 -0
  218. package/dist/pages/ModuleAnalyze/dependncy.d.ts +9 -0
  219. package/dist/pages/ModuleAnalyze/dependncy.js +31 -0
  220. package/dist/pages/ModuleAnalyze/fileTree.d.ts +9 -0
  221. package/dist/pages/ModuleAnalyze/fileTree.js +125 -0
  222. package/dist/pages/ModuleAnalyze/index.css +10 -0
  223. package/dist/pages/ModuleAnalyze/index.d.ts +8 -0
  224. package/dist/pages/ModuleAnalyze/index.js +64 -0
  225. package/dist/pages/ModuleAnalyze/utils/hooks.d.ts +21 -0
  226. package/dist/pages/ModuleAnalyze/utils/hooks.js +62 -0
  227. package/dist/pages/ModuleAnalyze/utils/index.d.ts +3 -0
  228. package/dist/pages/ModuleAnalyze/utils/index.js +34 -0
  229. package/dist/pages/ModuleResolve/constants.d.ts +3 -0
  230. package/dist/pages/ModuleResolve/constants.js +7 -0
  231. package/dist/pages/ModuleResolve/index.d.ts +3 -0
  232. package/dist/pages/ModuleResolve/index.js +19 -0
  233. package/dist/pages/Overall/constants.d.ts +3 -0
  234. package/dist/pages/Overall/constants.js +7 -0
  235. package/dist/pages/Overall/index.d.ts +9 -0
  236. package/dist/pages/Overall/index.js +39 -0
  237. package/dist/pages/Overall/responsiveGridList.d.ts +6 -0
  238. package/dist/pages/Overall/responsiveGridList.js +28 -0
  239. package/dist/pages/Resources/RuleIndex/constants.d.ts +3 -0
  240. package/dist/pages/Resources/RuleIndex/constants.js +7 -0
  241. package/dist/pages/Resources/RuleIndex/index.d.ts +3 -0
  242. package/dist/pages/Resources/RuleIndex/index.js +53 -0
  243. package/dist/pages/TreeShaking/constants.d.ts +3 -0
  244. package/dist/pages/TreeShaking/constants.js +7 -0
  245. package/dist/pages/TreeShaking/editor.d.ts +12 -0
  246. package/dist/pages/TreeShaking/editor.js +110 -0
  247. package/dist/pages/TreeShaking/index.css +74 -0
  248. package/dist/pages/TreeShaking/index.d.ts +8 -0
  249. package/dist/pages/TreeShaking/index.js +177 -0
  250. package/dist/pages/TreeShaking/open-tag.d.ts +11 -0
  251. package/dist/pages/TreeShaking/open-tag.js +43 -0
  252. package/dist/pages/TreeShaking/space.d.ts +1 -0
  253. package/dist/pages/TreeShaking/space.js +16 -0
  254. package/dist/pages/TreeShaking/table.d.ts +13 -0
  255. package/dist/pages/TreeShaking/table.js +319 -0
  256. package/dist/pages/TreeShaking/types.d.ts +3 -0
  257. package/dist/pages/TreeShaking/types.js +0 -0
  258. package/dist/pages/TreeShaking/utils.d.ts +7 -0
  259. package/dist/pages/TreeShaking/utils.js +147 -0
  260. package/dist/pages/WebpackLoaders/Analysis/constants.d.ts +3 -0
  261. package/dist/pages/WebpackLoaders/Analysis/constants.js +7 -0
  262. package/dist/pages/WebpackLoaders/Analysis/index.d.ts +3 -0
  263. package/dist/pages/WebpackLoaders/Analysis/index.js +19 -0
  264. package/dist/pages/WebpackLoaders/Overall/constants.d.ts +3 -0
  265. package/dist/pages/WebpackLoaders/Overall/constants.js +7 -0
  266. package/dist/pages/WebpackLoaders/Overall/index.d.ts +3 -0
  267. package/dist/pages/WebpackLoaders/Overall/index.js +11 -0
  268. package/dist/pages/WebpackLoaders/constants.d.ts +2 -0
  269. package/dist/pages/WebpackLoaders/constants.js +6 -0
  270. package/dist/pages/WebpackPlugins/constants.d.ts +3 -0
  271. package/dist/pages/WebpackPlugins/constants.js +7 -0
  272. package/dist/pages/WebpackPlugins/index.d.ts +3 -0
  273. package/dist/pages/WebpackPlugins/index.js +79 -0
  274. package/dist/pages/index.d.ts +9 -0
  275. package/dist/pages/index.js +20 -0
  276. package/dist/utils/data/base.d.ts +24 -0
  277. package/dist/utils/data/base.js +48 -0
  278. package/dist/utils/data/index.d.ts +5 -0
  279. package/dist/utils/data/index.js +44 -0
  280. package/dist/utils/data/local.d.ts +14 -0
  281. package/dist/utils/data/local.js +86 -0
  282. package/dist/utils/data/remote.d.ts +10 -0
  283. package/dist/utils/data/remote.js +52 -0
  284. package/dist/utils/file.d.ts +33 -0
  285. package/dist/utils/file.js +154 -0
  286. package/dist/utils/hooks.d.ts +31 -0
  287. package/dist/utils/hooks.js +216 -0
  288. package/dist/utils/i18n/cn.d.ts +3 -0
  289. package/dist/utils/i18n/cn.js +33 -0
  290. package/dist/utils/i18n/en.d.ts +30 -0
  291. package/dist/utils/i18n/en.js +33 -0
  292. package/dist/utils/i18n/index.d.ts +2 -0
  293. package/dist/utils/i18n/index.js +34 -0
  294. package/dist/utils/index.d.ts +16 -0
  295. package/dist/utils/index.js +16 -0
  296. package/dist/utils/loader.d.ts +7 -0
  297. package/dist/utils/loader.js +34 -0
  298. package/dist/utils/locale.d.ts +2 -0
  299. package/dist/utils/locale.js +9 -0
  300. package/dist/utils/manifest.d.ts +27 -0
  301. package/dist/utils/manifest.js +54 -0
  302. package/dist/utils/monaco.d.ts +12 -0
  303. package/dist/utils/monaco.js +71 -0
  304. package/dist/utils/request.d.ts +27 -0
  305. package/dist/utils/request.js +130 -0
  306. package/dist/utils/routes.d.ts +3 -0
  307. package/dist/utils/routes.js +14 -0
  308. package/dist/utils/size.d.ts +2 -0
  309. package/dist/utils/size.js +24 -0
  310. package/dist/utils/socket.d.ts +2 -0
  311. package/dist/utils/socket.js +21 -0
  312. package/dist/utils/storage.d.ts +13 -0
  313. package/dist/utils/storage.js +70 -0
  314. package/dist/utils/string.d.ts +2 -0
  315. package/dist/utils/string.js +14 -0
  316. package/dist/utils/time.d.ts +3 -0
  317. package/dist/utils/time.js +7 -0
  318. package/dist/utils/url.d.ts +7 -0
  319. package/dist/utils/url.js +75 -0
  320. package/dist/utils/worker/index.d.ts +4 -0
  321. package/dist/utils/worker/index.js +4 -0
  322. package/dist/utils/worker/master.d.ts +8 -0
  323. package/dist/utils/worker/master.js +18 -0
  324. package/dist/utils/worker/types.d.ts +9 -0
  325. package/dist/utils/worker/types.js +0 -0
  326. package/dist/utils/worker/utils.d.ts +7 -0
  327. package/dist/utils/worker/utils.js +29 -0
  328. package/dist/utils/worker/worker.d.ts +13 -0
  329. package/dist/utils/worker/worker.js +38 -0
  330. package/package.json +92 -0
@@ -0,0 +1,545 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import {
3
+ CodepenCircleOutlined,
4
+ ColumnHeightOutlined,
5
+ DeploymentUnitOutlined,
6
+ InfoCircleOutlined
7
+ } from "@ant-design/icons";
8
+ import Editor from "@monaco-editor/react";
9
+ import { SDK } from "@rsdoctor/types";
10
+ import {
11
+ Button,
12
+ Card,
13
+ Col,
14
+ Divider,
15
+ Drawer,
16
+ Empty,
17
+ Popover,
18
+ Row,
19
+ Space,
20
+ Tag,
21
+ Tooltip,
22
+ Typography
23
+ } from "antd";
24
+ import { omitBy, sumBy } from "lodash-es";
25
+ import { dirname, relative } from "path";
26
+ import { useEffect, useMemo, useState } from "react";
27
+ import { ServerAPIProvider } from "../../../components/Manifest";
28
+ import { ModuleAnalyzeComponent } from "../../ModuleAnalyze";
29
+ import { Badge as Bdg } from "../../../components/Badge";
30
+ import { FileTree } from "../../../components/FileTree";
31
+ import { KeywordInput } from "../../../components/Form/keyword";
32
+ import { Keyword } from "../../../components/Keyword";
33
+ import { TextDrawer } from "../../../components/TextDrawer";
34
+ import { Size, drawerWidth } from "../../../constants";
35
+ import {
36
+ createFileStructures,
37
+ formatSize,
38
+ getOriginalLanguage,
39
+ isJsDataUrl,
40
+ useI18n
41
+ } from "../../../utils";
42
+ import { ModuleGraphListContext } from "../config";
43
+ let expanedModulesKeys = [];
44
+ const TAB_MAP = {
45
+ source: "source code",
46
+ transformed: "Transformed Code (After compile)",
47
+ parsedSource: "Bundled Code (After bundle and tree-shaking)"
48
+ };
49
+ const tagStyle = {
50
+ margin: "none",
51
+ marginInlineEnd: 0
52
+ };
53
+ const ModuleCodeViewer = ({
54
+ data
55
+ }) => {
56
+ const [tab, setTab] = useState("parsedSource");
57
+ const { t } = useI18n();
58
+ const TAB_LAB_MAP = {
59
+ source: "Source Code",
60
+ transformed: `Transformed Code(${t("After Compile")})`,
61
+ parsedSource: `Bundled Code(${t("After Bundled")})`
62
+ };
63
+ if (!data)
64
+ return null;
65
+ const { path } = data;
66
+ return /* @__PURE__ */ jsx(
67
+ TextDrawer,
68
+ {
69
+ text: "",
70
+ buttonProps: {
71
+ size: "small",
72
+ icon: /* @__PURE__ */ jsx(CodepenCircleOutlined, {}),
73
+ type: "default"
74
+ },
75
+ buttonStyle: { padding: `0 4px` },
76
+ drawerProps: {
77
+ destroyOnClose: true,
78
+ title: `Code of "${path}"`
79
+ },
80
+ children: /* @__PURE__ */ jsx(
81
+ ServerAPIProvider,
82
+ {
83
+ api: SDK.ServerAPI.API.GetModuleCodeByModuleId,
84
+ body: { moduleId: data.id },
85
+ children: (source) => {
86
+ return /* @__PURE__ */ jsx(Fragment, { children: !source["source"] && !source["parsedSource"] && !source["transformed"] ? /* @__PURE__ */ jsx(Empty, { description: "No Code. Rspack builder not support code yet. And if you upload the stats.json to analysis, it's also no code to show." }) : /* @__PURE__ */ jsx(
87
+ Card,
88
+ {
89
+ className: "code-size-card",
90
+ style: { width: "100%" },
91
+ tabList: Object.keys(omitBy(source, (s) => !s)).map((k) => ({ tab: k })).map((e) => ({
92
+ ...e,
93
+ tab: TAB_LAB_MAP[e.tab],
94
+ key: e.tab
95
+ })),
96
+ onTabChange: (v) => setTab(v),
97
+ tabBarExtraContent: /* @__PURE__ */ jsx(
98
+ Popover,
99
+ {
100
+ placement: "bottom",
101
+ title: /* @__PURE__ */ jsx(Typography.Title, { level: 5, children: "Explain" }),
102
+ content: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
103
+ "div",
104
+ {
105
+ style: {
106
+ display: "flex",
107
+ flexDirection: "column",
108
+ marginBottom: 30
109
+ },
110
+ children: [
111
+ /* @__PURE__ */ jsxs("div", { children: [
112
+ /* @__PURE__ */ jsx(Typography.Text, { strong: true, children: "Source: " }),
113
+ /* @__PURE__ */ jsx(Typography.Text, { children: TAB_MAP.source })
114
+ ] }),
115
+ /* @__PURE__ */ jsxs("div", { children: [
116
+ /* @__PURE__ */ jsxs(Typography.Text, { strong: true, children: [
117
+ "Transformed:",
118
+ " "
119
+ ] }),
120
+ /* @__PURE__ */ jsx(Typography.Text, { children: TAB_MAP.transformed })
121
+ ] }),
122
+ /* @__PURE__ */ jsxs("div", { children: [
123
+ /* @__PURE__ */ jsxs(Typography.Text, { strong: true, children: [
124
+ "Bundled Source:",
125
+ " "
126
+ ] }),
127
+ /* @__PURE__ */ jsx(Typography.Text, { children: TAB_MAP.parsedSource })
128
+ ] }),
129
+ /* @__PURE__ */ jsx("br", {}),
130
+ /* @__PURE__ */ jsx(Typography.Text, { strong: true, children: "More" }),
131
+ /* @__PURE__ */ jsx(Typography.Text, { children: t("CodeModeExplain") })
132
+ ]
133
+ }
134
+ ) }),
135
+ trigger: "hover",
136
+ children: /* @__PURE__ */ jsx("a", { href: "#", children: "Explain" })
137
+ }
138
+ ),
139
+ children: /* @__PURE__ */ jsx(
140
+ Editor,
141
+ {
142
+ theme: "vs-dark",
143
+ language: getOriginalLanguage(path),
144
+ height: window.innerHeight / 1.5,
145
+ value: source[tab],
146
+ options: {
147
+ readOnly: true,
148
+ domReadOnly: true,
149
+ fontSize: 14,
150
+ wordWrap: "bounded",
151
+ minimap: {
152
+ enabled: false
153
+ }
154
+ }
155
+ }
156
+ )
157
+ }
158
+ ) });
159
+ }
160
+ }
161
+ )
162
+ }
163
+ );
164
+ };
165
+ const ModuleGraphViewer = ({ id, show, setShow, cwd }) => {
166
+ if (!id)
167
+ return null;
168
+ return /* @__PURE__ */ jsx(
169
+ Drawer,
170
+ {
171
+ open: show,
172
+ maskClosable: true,
173
+ width: drawerWidth,
174
+ onClose: () => setShow(false),
175
+ children: /* @__PURE__ */ jsx(ServerAPIProvider, { api: SDK.ServerAPI.API.GetAllModuleGraph, body: {}, children: (modules) => /* @__PURE__ */ jsx(ModuleAnalyzeComponent, { cwd, moduleId: id, modules }) })
176
+ }
177
+ );
178
+ };
179
+ const inlinedResourcePathKey = "__RESOURCEPATH__";
180
+ function getChildrenModule(node) {
181
+ const mods = [];
182
+ node.children && node.children.forEach((n) => {
183
+ if (n.isLeaf) {
184
+ mods.push(n[inlinedResourcePathKey]);
185
+ } else {
186
+ getChildrenModule(n);
187
+ }
188
+ });
189
+ return mods;
190
+ }
191
+ const ModulesStatistics = ({ modules, chunks, filteredModules }) => {
192
+ const { sourceSize, parsedSize, filteredParsedSize, filteredSourceSize } = useMemo(() => {
193
+ return {
194
+ sourceSize: sumBy(modules, (e) => e.size.sourceSize),
195
+ parsedSize: sumBy(modules, (e) => e.size.parsedSize),
196
+ filteredSourceSize: sumBy(filteredModules, (e) => e.size.sourceSize),
197
+ filteredParsedSize: sumBy(filteredModules, (e) => e.size.parsedSize)
198
+ };
199
+ }, [modules, filteredModules]);
200
+ return /* @__PURE__ */ jsxs(Space, { children: [
201
+ /* @__PURE__ */ jsx(
202
+ Tooltip,
203
+ {
204
+ title: `total modules count is ${modules.length}, the filtered modules count is ${filteredModules.length}`,
205
+ children: /* @__PURE__ */ jsxs(Space, { children: [
206
+ /* @__PURE__ */ jsxs(
207
+ Typography.Text,
208
+ {
209
+ type: "secondary",
210
+ style: { fontSize: 12, fontWeight: 400 },
211
+ children: [
212
+ "Modules: ",
213
+ filteredModules.length,
214
+ " / ",
215
+ modules.length
216
+ ]
217
+ }
218
+ ),
219
+ /* @__PURE__ */ jsx(InfoCircleOutlined, {})
220
+ ] })
221
+ }
222
+ ),
223
+ /* @__PURE__ */ jsx(Divider, { type: "vertical" }),
224
+ /* @__PURE__ */ jsx(
225
+ Tooltip,
226
+ {
227
+ title: /* @__PURE__ */ jsxs(Space, { direction: "vertical", children: [
228
+ /* @__PURE__ */ jsxs(Typography.Text, { style: { color: "inherit" }, children: [
229
+ "Total modules bundled size: ",
230
+ formatSize(parsedSize)
231
+ ] }),
232
+ /* @__PURE__ */ jsxs(Typography.Text, { style: { color: "inherit" }, children: [
233
+ "Total modules source size: ",
234
+ formatSize(sourceSize)
235
+ ] }),
236
+ /* @__PURE__ */ jsxs(Typography.Text, { style: { color: "inherit" }, children: [
237
+ "Filtered modules bundled size: ",
238
+ formatSize(filteredParsedSize)
239
+ ] }),
240
+ /* @__PURE__ */ jsxs(Typography.Text, { style: { color: "inherit" }, children: [
241
+ "Filtered modules source size: ",
242
+ formatSize(filteredSourceSize)
243
+ ] })
244
+ ] }),
245
+ children: /* @__PURE__ */ jsxs(Space, { children: [
246
+ /* @__PURE__ */ jsxs(
247
+ Typography.Text,
248
+ {
249
+ type: "secondary",
250
+ style: { fontSize: 12, fontWeight: 400 },
251
+ children: [
252
+ "Modules Size:",
253
+ " ",
254
+ filteredParsedSize === parsedSize ? formatSize(parsedSize) : `${formatSize(filteredParsedSize)} / ${formatSize(parsedSize)}`
255
+ ]
256
+ }
257
+ ),
258
+ /* @__PURE__ */ jsx(InfoCircleOutlined, {})
259
+ ] })
260
+ }
261
+ ),
262
+ /* @__PURE__ */ jsx(Divider, { type: "vertical" }),
263
+ /* @__PURE__ */ jsx(
264
+ Tooltip,
265
+ {
266
+ title: /* @__PURE__ */ jsxs(Space, { direction: "vertical", children: [
267
+ /* @__PURE__ */ jsxs(Typography.Text, { style: { color: "inherit" }, children: [
268
+ "this asset includes ",
269
+ chunks.length,
270
+ " chunks:",
271
+ " "
272
+ ] }),
273
+ chunks.map((e) => /* @__PURE__ */ jsx(Bdg, { label: "chunk", value: e.name }, e.name))
274
+ ] }),
275
+ children: /* @__PURE__ */ jsxs(Space, { children: [
276
+ /* @__PURE__ */ jsxs(
277
+ Typography.Text,
278
+ {
279
+ type: "secondary",
280
+ style: { fontSize: 12, fontWeight: 400 },
281
+ children: [
282
+ "Chunks: ",
283
+ chunks.length
284
+ ]
285
+ }
286
+ ),
287
+ /* @__PURE__ */ jsx(InfoCircleOutlined, {})
288
+ ] })
289
+ }
290
+ )
291
+ ] });
292
+ };
293
+ const AssetDetail = ({
294
+ asset,
295
+ chunks: includeChunks,
296
+ modules: includeModules,
297
+ moduleSizeLimit,
298
+ height,
299
+ root
300
+ }) => {
301
+ const [moduleKeyword, setModuleKeyword] = useState("");
302
+ const [defaultExpandAll, setDefaultExpandAll] = useState(false);
303
+ const [moduleJumpList, setModuleJumpList] = useState([]);
304
+ const [show, setShow] = useState(false);
305
+ const filteredModules = useMemo(() => {
306
+ let res = includeModules.slice();
307
+ if (moduleKeyword) {
308
+ const regexp = new RegExp(moduleKeyword, "i");
309
+ res = res.filter((e) => regexp.test(e.path));
310
+ }
311
+ if (moduleSizeLimit) {
312
+ res = res.filter((e) => e.size.parsedSize >= moduleSizeLimit);
313
+ }
314
+ return res;
315
+ }, [includeModules, moduleKeyword, moduleSizeLimit]);
316
+ const fileStructures = useMemo(() => {
317
+ const res = createFileStructures({
318
+ files: filteredModules.map((e) => e.path).filter(Boolean),
319
+ inlinedResourcePathKey,
320
+ fileTitle(file, basename) {
321
+ const mod = filteredModules.find((e) => e.path === file);
322
+ if (!mod)
323
+ return basename;
324
+ const { parsedSize = 0, sourceSize = 0 } = mod.size;
325
+ const isConcatenation = mod.kind === SDK.ModuleKind.Concatenation;
326
+ const containedOtherModules = !isConcatenation && parsedSize === 0 && includeModules.filter(
327
+ (e) => e !== mod && e.modules && e.modules.indexOf(mod.id) > -1
328
+ );
329
+ return /* @__PURE__ */ jsxs(Space, { children: [
330
+ /* @__PURE__ */ jsx(
331
+ Keyword,
332
+ {
333
+ ellipsis: true,
334
+ style: { maxWidth: 500 },
335
+ text: basename,
336
+ keyword: moduleKeyword
337
+ }
338
+ ),
339
+ parsedSize !== 0 ? /* @__PURE__ */ jsx(
340
+ Tooltip,
341
+ {
342
+ title: /* @__PURE__ */ jsxs(Space, { direction: "vertical", children: [
343
+ /* @__PURE__ */ jsx(Tag, { color: "orange", children: "Bundled Size:" + formatSize(parsedSize) }),
344
+ /* @__PURE__ */ jsx(Tag, { color: "volcano", children: "Source Size:" + formatSize(sourceSize) })
345
+ ] }),
346
+ color: "white",
347
+ children: /* @__PURE__ */ jsx(Tag, { color: "purple", style: tagStyle, children: "Bundled: " + formatSize(parsedSize) })
348
+ }
349
+ ) : sourceSize !== 0 ? (
350
+ // fallback to display tag for source size
351
+ /* @__PURE__ */ jsx(Tag, { color: "geekblue", children: "Source Size:" + formatSize(sourceSize) })
352
+ ) : null,
353
+ isConcatenation ? /* @__PURE__ */ jsx(
354
+ Tooltip,
355
+ {
356
+ title: /* @__PURE__ */ jsx(Space, { children: /* @__PURE__ */ jsxs(Typography.Text, { style: { color: "inherit" }, children: [
357
+ "this is a concatenated module, it contains",
358
+ " ",
359
+ mod.modules?.length,
360
+ " modules"
361
+ ] }) }),
362
+ children: /* @__PURE__ */ jsx(Tag, { color: "green", style: tagStyle, children: "concatenated" })
363
+ }
364
+ ) : null,
365
+ containedOtherModules && containedOtherModules.length ? /* @__PURE__ */ jsx(
366
+ Tooltip,
367
+ {
368
+ title: /* @__PURE__ */ jsxs(Space, { direction: "vertical", children: [
369
+ /* @__PURE__ */ jsx(Typography.Text, { style: { color: "inherit" }, children: "this is a concatenated module, it is be contained in these modules below:" }),
370
+ containedOtherModules.map(({ id, path }) => {
371
+ if (isJsDataUrl(path)) {
372
+ return /* @__PURE__ */ jsx(
373
+ Typography.Paragraph,
374
+ {
375
+ ellipsis: { rows: 4 },
376
+ style: { color: "inherit", maxWidth: "100%" },
377
+ code: true,
378
+ children: path
379
+ },
380
+ id
381
+ );
382
+ }
383
+ const p = relative(dirname(mod.path), path);
384
+ if (p.startsWith("javascript;charset=utf-8;base64,")) {
385
+ return /* @__PURE__ */ jsx(
386
+ Typography.Text,
387
+ {
388
+ style: { color: "inherit", maxWidth: "100%" },
389
+ code: true,
390
+ children: p[0] === "." ? p : `./${p}`
391
+ },
392
+ id
393
+ );
394
+ }
395
+ return /* @__PURE__ */ jsx(
396
+ Typography.Text,
397
+ {
398
+ style: { color: "inherit" },
399
+ code: true,
400
+ children: p[0] === "." ? p : `./${p}`
401
+ },
402
+ id
403
+ );
404
+ })
405
+ ] }),
406
+ children: /* @__PURE__ */ jsx(Tag, { color: "green", children: "concatenated" })
407
+ }
408
+ ) : null,
409
+ /* @__PURE__ */ jsx(
410
+ Button,
411
+ {
412
+ size: "small",
413
+ icon: /* @__PURE__ */ jsx(DeploymentUnitOutlined, {}),
414
+ onClick: () => {
415
+ setModuleJumpList([mod.id]);
416
+ setShow(true);
417
+ }
418
+ }
419
+ ),
420
+ /* @__PURE__ */ jsx(ModuleCodeViewer, { data: mod })
421
+ ] });
422
+ },
423
+ dirTitle(dir, defaultTitle) {
424
+ const paths = getChildrenModule(dir);
425
+ if (paths.length) {
426
+ const mods = paths.map(
427
+ (e) => includeModules.find((m) => m.path === e)
428
+ );
429
+ const parsedSize = sumBy(mods, (e) => e.size?.parsedSize || 0);
430
+ return /* @__PURE__ */ jsxs(Space, { children: [
431
+ /* @__PURE__ */ jsx(Typography.Text, { children: defaultTitle }),
432
+ parsedSize > 0 ? /* @__PURE__ */ jsx(Tag, { style: tagStyle, color: "orange", children: "Bundled:" + formatSize(parsedSize) }) : null
433
+ ] });
434
+ }
435
+ return defaultTitle;
436
+ }
437
+ });
438
+ return res;
439
+ }, [filteredModules]);
440
+ const onSearch = (value) => setModuleKeyword(value);
441
+ useEffect(() => {
442
+ setModuleKeyword("");
443
+ setDefaultExpandAll(false);
444
+ }, [asset]);
445
+ useEffect(() => {
446
+ setDefaultExpandAll(false);
447
+ }, [moduleKeyword]);
448
+ return /* @__PURE__ */ jsx(
449
+ ModuleGraphListContext.Provider,
450
+ {
451
+ value: { moduleJumpList, setModuleJumpList },
452
+ children: /* @__PURE__ */ jsxs(
453
+ Card,
454
+ {
455
+ title: `Modules of "${asset.path}"`,
456
+ bodyStyle: { overflow: "scroll", height },
457
+ size: "small",
458
+ children: [
459
+ includeModules.length ? /* @__PURE__ */ jsxs(Row, { children: [
460
+ /* @__PURE__ */ jsx(Col, { span: 24, children: /* @__PURE__ */ jsx(
461
+ ModulesStatistics,
462
+ {
463
+ modules: includeModules,
464
+ chunks: includeChunks,
465
+ filteredModules
466
+ }
467
+ ) }),
468
+ /* @__PURE__ */ jsx(Col, { span: 24, children: /* @__PURE__ */ jsxs(Space, { children: [
469
+ /* @__PURE__ */ jsx(
470
+ KeywordInput,
471
+ {
472
+ placeholder: "search module by keyword",
473
+ onChange: onSearch
474
+ },
475
+ asset.path
476
+ ),
477
+ /* @__PURE__ */ jsx(
478
+ Button,
479
+ {
480
+ onClick: () => setDefaultExpandAll(true),
481
+ size: "small",
482
+ icon: /* @__PURE__ */ jsx(ColumnHeightOutlined, {}),
483
+ children: "expand all"
484
+ }
485
+ )
486
+ ] }) }),
487
+ /* @__PURE__ */ jsx(Col, { span: 24, style: { marginTop: Size.BasePadding }, children: filteredModules.length ? /* @__PURE__ */ jsx(
488
+ FileTree,
489
+ {
490
+ onExpand: (expandedKeys) => {
491
+ expanedModulesKeys = expandedKeys;
492
+ },
493
+ treeData: fileStructures,
494
+ autoExpandParent: true,
495
+ defaultExpandParent: true,
496
+ defaultExpandedKeys: expanedModulesKeys?.length ? expanedModulesKeys : fileStructures.length === 1 ? [fileStructures[0].key] : [],
497
+ defaultExpandAll: defaultExpandAll || filteredModules.length <= 20
498
+ },
499
+ `tree_${moduleKeyword}_${defaultExpandAll}_${asset.path}`
500
+ ) : /* @__PURE__ */ jsx(
501
+ Empty,
502
+ {
503
+ description: /* @__PURE__ */ jsx(
504
+ Typography.Text,
505
+ {
506
+ strong: true,
507
+ children: `"${moduleKeyword}" can't match any modules`
508
+ }
509
+ )
510
+ }
511
+ ) })
512
+ ] }) : /* @__PURE__ */ jsx(
513
+ Empty,
514
+ {
515
+ description: /* @__PURE__ */ jsx(
516
+ Typography.Text,
517
+ {
518
+ strong: true,
519
+ children: `"${asset.path}" doesn't have any modules`
520
+ }
521
+ )
522
+ }
523
+ ),
524
+ /* @__PURE__ */ jsx(
525
+ ModuleGraphViewer,
526
+ {
527
+ id: moduleJumpList?.length ? moduleJumpList[moduleJumpList.length - 1] : "",
528
+ show,
529
+ setShow,
530
+ cwd: root
531
+ }
532
+ )
533
+ ]
534
+ }
535
+ )
536
+ }
537
+ );
538
+ };
539
+ export {
540
+ AssetDetail,
541
+ ModuleCodeViewer,
542
+ ModuleGraphViewer,
543
+ ModulesStatistics,
544
+ getChildrenModule
545
+ };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { SDK } from '@rsdoctor/types';
3
+ export declare const BundleCards: React.FC<{
4
+ cwd: string;
5
+ errors: SDK.ErrorsData;
6
+ summary: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetAssetsSummary>;
7
+ }>;
@@ -0,0 +1,143 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { createElement } from "react";
3
+ import { useState } from "react";
4
+ import { Col, Row, Segmented, theme } from "antd";
5
+ import { useDuplicatePackagesByErrors, useWindowWidth } from "../../../utils";
6
+ import { Size } from "../../../constants";
7
+ import { StatisticCard } from "../../../components/Card/statistic";
8
+ import { DuplicatePackageDrawerWithServer } from "../../../components/TextDrawer";
9
+ import { SizeCard } from "../../../components/Card/size";
10
+ const { useToken } = theme;
11
+ const height = 100;
12
+ const AssetCard = ({ showProgress = false, data, total, tagBgColor }) => {
13
+ const { token } = useToken();
14
+ const _tagBgColor = tagBgColor || token.colorPrimaryBorderHover;
15
+ return /* @__PURE__ */ jsx(SizeCard, { files: data.files, total, showProgress, tagBgColor: _tagBgColor });
16
+ };
17
+ const AssetCardContainer = ({ titles, datas, bgColor }) => {
18
+ const [idx, setIdx] = useState(0);
19
+ return /* @__PURE__ */ jsx(
20
+ StatisticCard,
21
+ {
22
+ title: titles.length > 1 ? /* @__PURE__ */ jsx(
23
+ Segmented,
24
+ {
25
+ defaultValue: titles[idx],
26
+ options: titles,
27
+ onChange: (e) => {
28
+ setIdx(titles.indexOf(e));
29
+ },
30
+ size: "small",
31
+ style: { transition: "transform 0.3s ease" },
32
+ value: titles[idx] || titles[0]
33
+ }
34
+ ) : titles[idx],
35
+ value: datas.map((e, i) => /* @__PURE__ */ createElement(AssetCard, { ...e, key: i, tagBgColor: bgColor?.tagBgColor }))[idx],
36
+ boxProps: {
37
+ style: { background: bgColor?.bgColor }
38
+ }
39
+ }
40
+ );
41
+ };
42
+ const BundleCards = ({ cwd, errors, summary }) => {
43
+ const windowWith = useWindowWidth();
44
+ const duplicatePackages = useDuplicatePackagesByErrors(errors);
45
+ const arr = [
46
+ /* @__PURE__ */ jsx(
47
+ AssetCardContainer,
48
+ {
49
+ titles: ["Total Files"],
50
+ datas: [
51
+ {
52
+ data: summary.all.total,
53
+ total: summary.all.total.size,
54
+ showProgress: true
55
+ }
56
+ ]
57
+ }
58
+ ),
59
+ /* @__PURE__ */ jsx(
60
+ AssetCardContainer,
61
+ {
62
+ titles: ["Total JS", "Initial JS"],
63
+ datas: [
64
+ {
65
+ data: summary.js.total,
66
+ total: summary.all.total.size,
67
+ showProgress: true
68
+ },
69
+ {
70
+ data: summary.js.initial,
71
+ total: summary.all.total.size,
72
+ showProgress: true
73
+ }
74
+ ]
75
+ }
76
+ ),
77
+ /* @__PURE__ */ jsx(
78
+ AssetCardContainer,
79
+ {
80
+ titles: ["Total CSS", "Initial CSS"],
81
+ datas: [
82
+ {
83
+ data: summary.css.total,
84
+ total: summary.all.total.size,
85
+ showProgress: true
86
+ },
87
+ {
88
+ data: summary.css.initial,
89
+ total: summary.all.total.size,
90
+ showProgress: true
91
+ }
92
+ ]
93
+ }
94
+ ),
95
+ /* @__PURE__ */ jsx(
96
+ AssetCardContainer,
97
+ {
98
+ titles: ["Images", "Fonts", "Media"],
99
+ datas: [
100
+ {
101
+ data: summary.imgs.total,
102
+ total: summary.all.total.size,
103
+ showProgress: true
104
+ },
105
+ {
106
+ data: summary.fonts.total,
107
+ total: summary.all.total.size,
108
+ showProgress: true
109
+ },
110
+ {
111
+ data: summary.media.total,
112
+ total: summary.all.total.size,
113
+ showProgress: true
114
+ }
115
+ ]
116
+ }
117
+ ),
118
+ /* @__PURE__ */ jsx(
119
+ AssetCardContainer,
120
+ {
121
+ titles: ["HTML Files"],
122
+ datas: [
123
+ {
124
+ data: summary.html.total,
125
+ total: summary.all.total.size,
126
+ showProgress: true
127
+ }
128
+ ]
129
+ }
130
+ ),
131
+ /* @__PURE__ */ jsx(
132
+ StatisticCard,
133
+ {
134
+ title: "Duplicate Packages",
135
+ value: /* @__PURE__ */ jsx(DuplicatePackageDrawerWithServer, { buttonStyle: { height }, duplicatePackages, cwd })
136
+ }
137
+ )
138
+ ];
139
+ return /* @__PURE__ */ jsx(Row, { gutter: windowWith > 1200 && windowWith < 1400 ? [Size.BasePadding * 2, Size.BasePadding] : [Size.BasePadding, Size.BasePadding], wrap: true, style: { marginBottom: Size.BasePadding }, children: arr.map((e, i) => /* @__PURE__ */ jsx(Col, { span: windowWith > 1500 ? 4 : windowWith > 1200 ? 8 : 8, children: e }, i)) });
140
+ };
141
+ export {
142
+ BundleCards
143
+ };
@@ -0,0 +1,5 @@
1
+ export interface CodeEditorProps {
2
+ content?: string;
3
+ path: string;
4
+ }
5
+ export declare function CodeEditor(props: CodeEditorProps): import("react/jsx-runtime").JSX.Element;