@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,120 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { InfoCircleOutlined, MinusCircleOutlined, PlusCircleOutlined, RightSquareTwoTone } from "@ant-design/icons";
3
+ import { SDK } from "@rsdoctor/types";
4
+ import { Popover, Space, Tag, Typography } from "antd";
5
+ import { useCallback } from "react";
6
+ import Tree, { useTreeState } from "react-hyper-tree";
7
+ import { ServerAPIProvider } from "../../../components/Manifest";
8
+ import { TAG_PALLETE } from "../../../constants";
9
+ import { ModuleGraphListContext } from "../../BundleSize/config";
10
+ import "./fileTreeCom.css";
11
+ const prefix = "file-tree-com";
12
+ const FileTree = (props) => {
13
+ const { treeData, needJumpto = false, defaultOpened = false, defaultOpenFather = 0 } = props;
14
+ const { required, handlers } = useTreeState({
15
+ id: `${prefix}-tree`,
16
+ data: treeData || [],
17
+ defaultOpened,
18
+ multipleSelect: false,
19
+ refreshAsyncNodes: true
20
+ });
21
+ const renderNode = useCallback(({ node, onToggle }) => {
22
+ defaultOpenFather && node.data.level < defaultOpenFather && node.setOpened(true);
23
+ return /* @__PURE__ */ jsx("div", { className: `${prefix}-titles-box`, children: /* @__PURE__ */ jsx("div", { className: `${prefix}-titles`, children: /* @__PURE__ */ jsx(Space, { direction: "vertical", children: /* @__PURE__ */ jsx("div", { className: `${prefix}-node-title`, children: /* @__PURE__ */ jsxs(Space, { children: [
24
+ /* @__PURE__ */ jsxs("div", { onClick: onToggle, children: [
25
+ !node.options.opened && node.data.children?.length ? /* @__PURE__ */ jsx(PlusCircleOutlined, { style: { color: "lightblue" } }) : /* @__PURE__ */ jsx(MinusCircleOutlined, { style: { color: "lightblue" } }),
26
+ /* @__PURE__ */ jsxs(Typography.Text, { code: true, children: [
27
+ node.data.name,
28
+ /* @__PURE__ */ jsx(
29
+ Popover,
30
+ {
31
+ content: /* @__PURE__ */ jsx(Fragment, { children: node.data.__RESOURCEPATH__ ? /* @__PURE__ */ jsx(Typography.Text, { code: true, children: node.data.__RESOURCEPATH__ }, `${node.data.name}-popover-path`) : /* @__PURE__ */ jsx(Fragment, {}) }),
32
+ title: "INFO",
33
+ trigger: "hover",
34
+ children: /* @__PURE__ */ jsx(InfoCircleOutlined, { style: { marginLeft: 4 } })
35
+ },
36
+ `${node.data.name}popover`
37
+ )
38
+ ] })
39
+ ] }),
40
+ /* @__PURE__ */ jsxs(Space, { children: [
41
+ node.data.concatModules?.length ? /* @__PURE__ */ jsx(
42
+ Popover,
43
+ {
44
+ content: /* @__PURE__ */ jsx(
45
+ ServerAPIProvider,
46
+ {
47
+ api: SDK.ServerAPI.API.GetModulesByModuleIds,
48
+ body: { moduleIds: node.data.concatModules || [] },
49
+ children: (res) => {
50
+ return /* @__PURE__ */ jsx("div", { children: res.map(({ path }, index) => /* @__PURE__ */ jsx("p", { children: path }, `${path}-${index}`)) });
51
+ }
52
+ }
53
+ ),
54
+ title: "Concatenated Module Name",
55
+ trigger: "hover",
56
+ children: /* @__PURE__ */ jsx(
57
+ Tag,
58
+ {
59
+ className: `${prefix}-node-title-tag`,
60
+ color: TAG_PALLETE.DARK_BLUE,
61
+ children: "Concatenated"
62
+ },
63
+ `${node.data.name}-size-tag`
64
+ )
65
+ }
66
+ ) : node.data.size && node.data.size !== "0 bytes" ? /* @__PURE__ */ jsx(
67
+ Tag,
68
+ {
69
+ className: `${prefix}-node-title-tag`,
70
+ color: TAG_PALLETE.COLOR_B,
71
+ children: `Bundled: ${node.data.size}`
72
+ },
73
+ `${node.data.name}-size-tag`
74
+ ) : /* @__PURE__ */ jsx(Fragment, {}),
75
+ needJumpto && /* @__PURE__ */ jsx(ModuleGraphListContext.Consumer, { children: ({ moduleJumpList, setModuleJumpList }) => {
76
+ return /* @__PURE__ */ jsx(
77
+ RightSquareTwoTone,
78
+ {
79
+ onClick: () => {
80
+ const _list = [...moduleJumpList];
81
+ _list.push(+node.id);
82
+ setModuleJumpList(_list);
83
+ }
84
+ }
85
+ );
86
+ } })
87
+ ] })
88
+ ] }) }) }) }) }, node.data.name);
89
+ }, []);
90
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
91
+ Tree,
92
+ {
93
+ ...required,
94
+ ...handlers,
95
+ horizontalLineStyles: {
96
+ stroke: "#c4c4c4",
97
+ strokeWidth: 2,
98
+ strokeDasharray: "1 1"
99
+ },
100
+ verticalLineStyles: {
101
+ stroke: "#c4c4c4",
102
+ strokeWidth: 2,
103
+ strokeDasharray: "1 1"
104
+ },
105
+ draggable: false,
106
+ depthGap: 14,
107
+ gapMode: "padding",
108
+ disableLines: false,
109
+ disableTransitions: true,
110
+ disableHorizontalLines: false,
111
+ disableVerticalLines: false,
112
+ verticalLineTopOffset: 0,
113
+ verticalLineOffset: 5,
114
+ renderNode
115
+ }
116
+ ) });
117
+ };
118
+ export {
119
+ FileTree
120
+ };
@@ -0,0 +1,7 @@
1
+ import { Client } from '@rsdoctor/types';
2
+ export declare const name = "Module Analyze";
3
+ export declare const route = Client.RsdoctorClientRoutes.ModuleAnalyze;
4
+ export declare enum DevtoolsRuleClientConstant {
5
+ UrlQueryForModuleAnalyze = "curModuleId"
6
+ }
7
+ export declare const clsNamePrefix = "module-analyze";
@@ -0,0 +1,14 @@
1
+ import { Client } from "@rsdoctor/types";
2
+ const name = "Module Analyze";
3
+ const route = Client.RsdoctorClientRoutes.ModuleAnalyze;
4
+ var DevtoolsRuleClientConstant = /* @__PURE__ */ ((DevtoolsRuleClientConstant2) => {
5
+ DevtoolsRuleClientConstant2["UrlQueryForModuleAnalyze"] = "curModuleId";
6
+ return DevtoolsRuleClientConstant2;
7
+ })(DevtoolsRuleClientConstant || {});
8
+ const clsNamePrefix = "module-analyze";
9
+ export {
10
+ DevtoolsRuleClientConstant,
11
+ clsNamePrefix,
12
+ name,
13
+ route
14
+ };
@@ -0,0 +1,9 @@
1
+ import { SDK } from '@rsdoctor/types';
2
+ import React from 'react';
3
+ import './index.sass';
4
+ declare const _default: React.NamedExoticComponent<{
5
+ module: SDK.ModuleData;
6
+ dependencies: SDK.DependencyData[];
7
+ cwd: string;
8
+ }>;
9
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Col, Empty, Row } from "antd";
3
+ import { compact, find } from "lodash-es";
4
+ import { memo, useMemo } from "react";
5
+ import { getShortPath } from "../../utils";
6
+ import { FileTree } from "./components/fileTreeCom";
7
+ import "./index.css";
8
+ const DependencyTree = ({ dependencies, cwd, module }) => {
9
+ const treedata = useMemo(() => {
10
+ const dpTreeData = module.dependencies.map((dpId) => {
11
+ const dp = find(dependencies, (_dp) => _dp.id === dpId);
12
+ if (!dp)
13
+ return;
14
+ return {
15
+ __RESOURCEPATH__: dp.resolvedRequest || "",
16
+ id: dp.dependency,
17
+ key: dp.resolvedRequest,
18
+ name: getShortPath(dp.resolvedRequest) || "",
19
+ level: 1,
20
+ kind: dp.kind,
21
+ concatModules: void 0
22
+ };
23
+ });
24
+ return compact(dpTreeData);
25
+ }, [module]);
26
+ return /* @__PURE__ */ jsx(Row, { justify: "start", align: "middle", children: /* @__PURE__ */ jsx(Col, { span: 24, children: treedata.length ? /* @__PURE__ */ jsx(FileTree, { treeData: treedata, needJumpto: true, cwd }) : /* @__PURE__ */ jsx(Empty, {}) }) });
27
+ };
28
+ var dependncy_default = memo(DependencyTree);
29
+ export {
30
+ dependncy_default as default
31
+ };
@@ -0,0 +1,9 @@
1
+ import { SDK } from '@rsdoctor/types';
2
+ import React from 'react';
3
+ export declare const ModuleFilesTree: React.FC<{
4
+ modules: SDK.ModuleData[];
5
+ dependencies: SDK.DependencyData[];
6
+ curModule: SDK.ModuleData;
7
+ cwd: string;
8
+ selectedChunk: string;
9
+ }>;
@@ -0,0 +1,125 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import {
3
+ ExpandOutlined,
4
+ InfoCircleOutlined,
5
+ MenuFoldOutlined,
6
+ MenuUnfoldOutlined,
7
+ RightSquareTwoTone
8
+ } from "@ant-design/icons";
9
+ import { SDK } from "@rsdoctor/types";
10
+ import { Badge, Button, Col, Empty, Popover, Radio, Row, Tag, Typography } from "antd";
11
+ import { useEffect, useState } from "react";
12
+ import { ServerAPIProvider } from "../../components/Manifest";
13
+ import { Title } from "../../components/Title";
14
+ import { Size, TAG_PALLETE } from "../../constants";
15
+ import { useI18n } from "../../utils/hooks";
16
+ import { ChunksTable } from "./chunks";
17
+ import { FileTree } from "./components/fileTreeCom";
18
+ import { clsNamePrefix } from "./constants";
19
+ import DependencyTree from "./dependncy";
20
+ import { getImporteds, getModuleReasonsTree } from "./utils";
21
+ import { useCreatFileTreeData } from "./utils/hooks";
22
+ var ChartDimension = /* @__PURE__ */ ((ChartDimension2) => {
23
+ ChartDimension2[ChartDimension2["Dependencies"] = 0] = "Dependencies";
24
+ ChartDimension2[ChartDimension2["Chunks"] = 1] = "Chunks";
25
+ return ChartDimension2;
26
+ })(ChartDimension || {});
27
+ const ModuleFilesTree = (props) => {
28
+ const { curModule, modules, dependencies, cwd, selectedChunk = "" } = props;
29
+ const { t } = useI18n();
30
+ const [importedModules, setImportedModules] = useState([]);
31
+ const [dimension, setDimension] = useState(0 /* Dependencies */);
32
+ const [fold, setFold] = useState(true);
33
+ const { data: fileStructures } = useCreatFileTreeData(modules, importedModules, curModule);
34
+ const [reasonsTree, setReasonsTree] = useState({});
35
+ useEffect(() => {
36
+ const importeds = getImporteds(curModule, modules);
37
+ setImportedModules(importeds);
38
+ }, [curModule, modules]);
39
+ useEffect(() => {
40
+ const _reasonsTree = {};
41
+ importedModules.forEach((_curModule) => {
42
+ const treeList = [];
43
+ const visited = /* @__PURE__ */ new Map();
44
+ getModuleReasonsTree(_curModule, modules, treeList, visited);
45
+ _reasonsTree[_curModule.id] = treeList;
46
+ });
47
+ setReasonsTree(_reasonsTree);
48
+ }, [importedModules]);
49
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
50
+ /* @__PURE__ */ jsx(Row, { children: /* @__PURE__ */ jsx(
51
+ Popover,
52
+ {
53
+ content: /* @__PURE__ */ jsxs("div", { children: [
54
+ /* @__PURE__ */ jsxs("div", { children: [
55
+ /* @__PURE__ */ jsx(Badge, { status: "success", text: " " }),
56
+ /* @__PURE__ */ jsxs(Typography.Text, { code: true, children: [
57
+ /* @__PURE__ */ jsx(ExpandOutlined, {}),
58
+ " Expand the node_modules's modules that was omitted... "
59
+ ] }),
60
+ " ",
61
+ /* @__PURE__ */ jsx(Typography.Text, { children: `: ${t("Expand Omitted")}` })
62
+ ] }),
63
+ /* @__PURE__ */ jsxs("div", { children: [
64
+ /* @__PURE__ */ jsx(Badge, { status: "success", text: " " }),
65
+ /* @__PURE__ */ jsx(Popover, { content: "xxxx", title: "Concatenated Module Name", trigger: "hover", children: /* @__PURE__ */ jsx(Tag, { color: TAG_PALLETE.DARK_BLUE, children: "Concatenated" }) }),
66
+ /* @__PURE__ */ jsx(Typography.Text, { children: `: ${t("Concatenated Tag")}` })
67
+ ] }),
68
+ /* @__PURE__ */ jsxs("div", { children: [
69
+ /* @__PURE__ */ jsx(Badge, { status: "success", text: " " }),
70
+ /* @__PURE__ */ jsx(RightSquareTwoTone, {}),
71
+ /* @__PURE__ */ jsx(Typography.Text, { children: ": Jump button, click to jump to the Module dependency analysis page of this module." })
72
+ ] })
73
+ ] }),
74
+ title: "Usage",
75
+ children: /* @__PURE__ */ jsx(Button, { type: "primary", icon: /* @__PURE__ */ jsx(InfoCircleOutlined, {}), children: "Usage" })
76
+ }
77
+ ) }),
78
+ /* @__PURE__ */ jsxs(Row, { gutter: 4, style: { marginTop: Size.BasePadding }, children: [
79
+ /* @__PURE__ */ jsx(Col, { span: fold ? 18 : 12, children: /* @__PURE__ */ jsx(Row, { className: `${clsNamePrefix}-file-tree`, justify: "center", children: /* @__PURE__ */ jsxs(Col, { span: 24, style: { padding: Size.BasePadding / 2 }, children: [
80
+ /* @__PURE__ */ jsx(Title, { text: "Current Module Imported Reasons Tree:" }),
81
+ importedModules ? /* @__PURE__ */ jsx(
82
+ FileTree,
83
+ {
84
+ cwd,
85
+ treeData: selectedChunk ? fileStructures.filter((_parent) => reasonsTree[_parent.id].indexOf(selectedChunk) >= 0) : fileStructures,
86
+ needCode: true,
87
+ needShowAllTree: true,
88
+ needJumpto: true,
89
+ selectedChunk
90
+ }
91
+ ) : /* @__PURE__ */ jsx(Empty, { className: `${clsNamePrefix}-empty` })
92
+ ] }) }) }),
93
+ /* @__PURE__ */ jsx(Col, { span: fold ? 6 : 12, children: /* @__PURE__ */ jsxs("div", { className: `${clsNamePrefix}-file-tree`, style: { padding: Size.BasePadding / 2 }, children: [
94
+ fold ? /* @__PURE__ */ jsx(Popover, { content: "Unfold [Dependencies & Chunks] Box.", children: /* @__PURE__ */ jsx(MenuFoldOutlined, { onClick: () => setFold(!fold), style: { marginRight: 8 } }) }) : /* @__PURE__ */ jsx(Popover, { content: "Fold [Dependencies & Chunks] Box.", children: /* @__PURE__ */ jsx(MenuUnfoldOutlined, { onClick: () => setFold(!fold), style: { marginRight: 8 } }) }),
95
+ /* @__PURE__ */ jsx(
96
+ Radio.Group,
97
+ {
98
+ options: [
99
+ {
100
+ label: "Dependencies",
101
+ value: 0 /* Dependencies */
102
+ },
103
+ {
104
+ label: "Chunks",
105
+ value: 1 /* Chunks */
106
+ }
107
+ ],
108
+ onChange: (e) => setDimension(e.target.value),
109
+ value: dimension,
110
+ optionType: "button",
111
+ buttonStyle: "solid",
112
+ size: "middle"
113
+ }
114
+ ),
115
+ !fold ? /* @__PURE__ */ jsxs(Fragment, { children: [
116
+ dimension === 0 /* Dependencies */ && /* @__PURE__ */ jsx(Col, { span: 24, style: { marginTop: Size.BasePadding / 2 }, children: curModule ? /* @__PURE__ */ jsx(DependencyTree, { module: curModule, dependencies, cwd }) : /* @__PURE__ */ jsx(Empty, { className: `${clsNamePrefix}-empty` }) }),
117
+ dimension === 1 /* Chunks */ && /* @__PURE__ */ jsx(Col, { span: 18, style: { marginTop: Size.BasePadding / 2 }, children: curModule ? /* @__PURE__ */ jsx(ServerAPIProvider, { api: SDK.ServerAPI.API.GetChunksByModuleId, body: { moduleId: curModule.id }, children: (res) => /* @__PURE__ */ jsx(ChunksTable, { chunks: res }) }) : /* @__PURE__ */ jsx(Empty, { className: `${clsNamePrefix}-empty` }) })
118
+ ] }) : /* @__PURE__ */ jsx(Fragment, {})
119
+ ] }) })
120
+ ] })
121
+ ] });
122
+ };
123
+ export {
124
+ ModuleFilesTree
125
+ };
@@ -0,0 +1,10 @@
1
+ .module-analyze-file-tree {
2
+ width: "100%";
3
+ border: 1px solid #eee;
4
+ min-height: 50em;
5
+ margin: 4;
6
+ padding: 4;
7
+ }
8
+ .module-analyze-file-tree .module-analyze-empty {
9
+ margin-top: 20%;
10
+ }
@@ -0,0 +1,8 @@
1
+ import { SDK } from '@rsdoctor/types';
2
+ import React from 'react';
3
+ import './index.sass';
4
+ export declare const ModuleAnalyzeComponent: React.FC<{
5
+ modules: SDK.ModuleData[];
6
+ cwd: string;
7
+ moduleId: string | number;
8
+ }>;
@@ -0,0 +1,64 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { LeftSquareOutlined } from "@ant-design/icons";
3
+ import { SDK } from "@rsdoctor/types";
4
+ import { Card, Col, Row, Select, Space, Typography } from "antd";
5
+ import { useState } from "react";
6
+ import { ServerAPIProvider } from "../../components/Manifest";
7
+ import { getShortPath } from "../../utils";
8
+ import { values } from "lodash-es";
9
+ import { ModuleGraphListContext } from "../BundleSize/config";
10
+ import { ModuleFilesTree } from "./fileTree";
11
+ import "./index.css";
12
+ const ModuleAnalyzeComponent = ({ modules, cwd, moduleId }) => {
13
+ const [selectedChunk, setSelectedChunk] = useState("");
14
+ return /* @__PURE__ */ jsx(ServerAPIProvider, { api: SDK.ServerAPI.API.GetModuleDetails, body: { moduleId: +moduleId }, children: ({ module, dependencies }) => {
15
+ return /* @__PURE__ */ jsx(ServerAPIProvider, { api: SDK.ServerAPI.API.GetAllChunkGraph, body: {}, children: (chunks) => {
16
+ return /* @__PURE__ */ jsx(ModuleGraphListContext.Consumer, { children: ({ moduleJumpList, setModuleJumpList }) => {
17
+ return /* @__PURE__ */ jsxs(
18
+ Card,
19
+ {
20
+ title: /* @__PURE__ */ jsxs(Space, { children: [
21
+ /* @__PURE__ */ jsx(
22
+ LeftSquareOutlined,
23
+ {
24
+ onClick: () => {
25
+ const _list = [...moduleJumpList.slice(0, -1)];
26
+ setModuleJumpList(_list);
27
+ }
28
+ }
29
+ ),
30
+ /* @__PURE__ */ jsx(Typography.Title, { code: true, level: 5, style: { marginBottom: "revert" }, children: `Current Module: ${getShortPath(module.path)}` })
31
+ ] }),
32
+ style: { height: "100%" },
33
+ children: [
34
+ /* @__PURE__ */ jsx(Row, { justify: "start", style: { marginBottom: 20 }, children: /* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsx(
35
+ Select,
36
+ {
37
+ allowClear: true,
38
+ placeholder: "Select Chunk To Filter Modules Links",
39
+ showSearch: true,
40
+ style: { width: 300 },
41
+ options: values(chunks).map((e) => ({ label: e.name, value: e.id })),
42
+ onChange: (e) => setSelectedChunk(e)
43
+ }
44
+ ) }) }),
45
+ /* @__PURE__ */ jsx(Row, { justify: "start", align: "middle", children: /* @__PURE__ */ jsx(Col, { span: 24, children: /* @__PURE__ */ jsx(
46
+ ModuleFilesTree,
47
+ {
48
+ curModule: module,
49
+ modules,
50
+ dependencies,
51
+ cwd,
52
+ selectedChunk
53
+ }
54
+ ) }) })
55
+ ]
56
+ }
57
+ );
58
+ } });
59
+ } });
60
+ } });
61
+ };
62
+ export {
63
+ ModuleAnalyzeComponent
64
+ };
@@ -0,0 +1,21 @@
1
+ import { SDK } from '@rsdoctor/types';
2
+ export type NewTreeNodeType = {
3
+ __RESOURCEPATH__: string;
4
+ id: number;
5
+ key: string;
6
+ name: string;
7
+ level: number;
8
+ kind: number;
9
+ size?: string;
10
+ concatModules: number[] | undefined;
11
+ chunks?: string[];
12
+ getChildren?: () => NewTreeNodeType[];
13
+ dependencies?: number[];
14
+ fatherPath?: string;
15
+ children?: number[];
16
+ needExpand?: boolean | string;
17
+ };
18
+ export declare function useCreatFileTreeData(modules: SDK.ModuleData[], importedModules: SDK.ModuleData[], curModule: SDK.ModuleData): {
19
+ data: NewTreeNodeType[];
20
+ };
21
+ export declare function getContactMainModulePath(concatModules: number[], modules: SDK.ModuleData[]): string[];
@@ -0,0 +1,62 @@
1
+ import { compact } from "lodash-es";
2
+ import { useMemo } from "react";
3
+ import { formatSize, getShortPath } from "../../../utils";
4
+ import { getImporteds } from ".";
5
+ function useCreatFileTreeData(modules, importedModules, curModule) {
6
+ return useMemo(() => {
7
+ if (!importedModules || !importedModules?.length) {
8
+ return { filterData: [], data: [] };
9
+ }
10
+ const root = compact(
11
+ importedModules?.map((imported, index) => {
12
+ return {
13
+ key: `0-${index}`,
14
+ name: getShortPath(imported.path),
15
+ __RESOURCEPATH__: imported.path,
16
+ id: imported.id,
17
+ level: 1,
18
+ chunks: imported.chunks,
19
+ size: formatSize(imported.size.parsedSize),
20
+ kind: imported.kind,
21
+ concatModules: imported.concatenationModules,
22
+ fatherPath: getShortPath(curModule.path),
23
+ dependencies: imported.dependencies,
24
+ getChildren: () => getLeafs(imported, modules, curModule),
25
+ children: imported.imported
26
+ };
27
+ })
28
+ );
29
+ return {
30
+ data: root
31
+ };
32
+ }, [importedModules, curModule]);
33
+ }
34
+ function getLeafs(imported, modules, fatherModule) {
35
+ const leafModules = getImporteds(imported, modules);
36
+ const leafs = leafModules?.map((_imported, index) => {
37
+ return {
38
+ key: `0-${index}`,
39
+ name: getShortPath(_imported.path),
40
+ __RESOURCEPATH__: _imported.path,
41
+ id: _imported.id,
42
+ level: 1,
43
+ size: formatSize(_imported.size.parsedSize),
44
+ kind: _imported.kind,
45
+ chunks: _imported.chunks,
46
+ concatModules: _imported.concatenationModules,
47
+ fatherPath: getShortPath(fatherModule.path),
48
+ dependencies: _imported.dependencies,
49
+ getChildren: () => getLeafs(_imported, modules, imported),
50
+ children: _imported.imported
51
+ };
52
+ });
53
+ return leafs;
54
+ }
55
+ function getContactMainModulePath(concatModules, modules) {
56
+ const concatModulesPath = concatModules?.map((cm) => modules.filter((m) => m.id === cm)?.[0]);
57
+ return concatModulesPath?.map((m) => m.path);
58
+ }
59
+ export {
60
+ getContactMainModulePath,
61
+ useCreatFileTreeData
62
+ };
@@ -0,0 +1,3 @@
1
+ import { SDK } from '@rsdoctor/types';
2
+ export declare const getImporteds: (curModule: SDK.ModuleData, modules: SDK.ModuleData[]) => SDK.ModuleData[];
3
+ export declare const getModuleReasonsTree: (curModule: SDK.ModuleData, modules: SDK.ModuleData[], reasonsTree: string[], visited: Map<number, boolean>) => void;
@@ -0,0 +1,34 @@
1
+ import { compact, find } from "lodash-es";
2
+ const getImporteds = (curModule, modules) => {
3
+ if (curModule?.imported?.length) {
4
+ const _importeds = curModule.imported.map(
5
+ (_importedModule) => find(modules, (m) => m.id === Number(_importedModule))
6
+ );
7
+ const importeds = compact(_importeds);
8
+ return importeds;
9
+ }
10
+ return [];
11
+ };
12
+ const getModuleReasonsTree = (curModule, modules, reasonsTree, visited) => {
13
+ if (!visited.has(curModule.id)) {
14
+ visited.set(curModule.id, true);
15
+ } else if (visited.get(curModule.id)) {
16
+ return;
17
+ }
18
+ const importeds = getImporteds(curModule, modules);
19
+ if (!importeds.length) {
20
+ return;
21
+ }
22
+ importeds.forEach((_curModule) => {
23
+ _curModule?.chunks?.forEach((_chunk) => {
24
+ if (reasonsTree.indexOf(_chunk) < 0) {
25
+ reasonsTree.push(_chunk);
26
+ }
27
+ });
28
+ getModuleReasonsTree(_curModule, modules, reasonsTree, visited);
29
+ });
30
+ };
31
+ export {
32
+ getImporteds,
33
+ getModuleReasonsTree
34
+ };
@@ -0,0 +1,3 @@
1
+ import { Client } from '@rsdoctor/types';
2
+ export declare const name = "ModuleResolve";
3
+ export declare const route = Client.RsdoctorClientRoutes.ModuleResolve;
@@ -0,0 +1,7 @@
1
+ import { Client } from "@rsdoctor/types";
2
+ const name = "ModuleResolve";
3
+ const route = Client.RsdoctorClientRoutes.ModuleResolve;
4
+ export {
5
+ name,
6
+ route
7
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const Page: React.FC;
3
+ export * from './constants';
@@ -0,0 +1,19 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Card } from "antd";
3
+ import { ResolverAnalysis } from "../../components/Resolver/analysis";
4
+ import { WebpackConfigurationViewer } from "../../components/Configuration";
5
+ const Page = () => {
6
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
7
+ Card,
8
+ {
9
+ title: "Webpack Resolver Analysis",
10
+ extra: /* @__PURE__ */ jsx(WebpackConfigurationViewer, { defaultKeys: ["resolve", "resolveLoader"] }),
11
+ bodyStyle: { paddingTop: 0 },
12
+ children: /* @__PURE__ */ jsx(ResolverAnalysis, {})
13
+ }
14
+ ) });
15
+ };
16
+ export * from "./constants";
17
+ export {
18
+ Page
19
+ };
@@ -0,0 +1,3 @@
1
+ import { Client } from '@rsdoctor/types';
2
+ export declare const name = "Overall";
3
+ export declare const route = Client.RsdoctorClientRoutes.Overall;
@@ -0,0 +1,7 @@
1
+ import { Client } from "@rsdoctor/types";
2
+ const name = "Overall";
3
+ const route = Client.RsdoctorClientRoutes.Overall;
4
+ export {
5
+ name,
6
+ route
7
+ };
@@ -0,0 +1,9 @@
1
+ import { SDK } from '@rsdoctor/types';
2
+ import React from 'react';
3
+ interface Props {
4
+ project: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetProjectInfo>;
5
+ }
6
+ export declare const Page: React.FC<Omit<Props, "project"> & Partial<{
7
+ body?: any;
8
+ }>>;
9
+ export * from './constants';
@@ -0,0 +1,39 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { SDK } from "@rsdoctor/types";
3
+ import { BundleAlerts, CompileAlerts } from "../../components/Alerts";
4
+ import { withServerAPI } from "../../components/Manifest";
5
+ import {
6
+ BundleOverall,
7
+ CompileOverall,
8
+ ProjectOverall
9
+ } from "../../components/Overall";
10
+ import { ResponsiveGridLayout } from "./responsiveGridList";
11
+ const Component = ({ project }) => {
12
+ const { summary, configs, root: cwd, envinfo, errors } = project;
13
+ return /* @__PURE__ */ jsxs("div", { children: [
14
+ /* @__PURE__ */ jsxs(ResponsiveGridLayout, { children: [
15
+ /* @__PURE__ */ jsx(
16
+ ProjectOverall,
17
+ {
18
+ configs,
19
+ cwd,
20
+ envinfo,
21
+ alerts: errors
22
+ }
23
+ ),
24
+ /* @__PURE__ */ jsx(BundleOverall, { errors, cwd }),
25
+ /* @__PURE__ */ jsx(CompileOverall, { summary })
26
+ ] }),
27
+ /* @__PURE__ */ jsx(CompileAlerts, {}),
28
+ /* @__PURE__ */ jsx(BundleAlerts, {})
29
+ ] });
30
+ };
31
+ const Page = withServerAPI({
32
+ api: SDK.ServerAPI.API.GetProjectInfo,
33
+ responsePropName: "project",
34
+ Component
35
+ });
36
+ export * from "./constants";
37
+ export {
38
+ Page
39
+ };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ children: React.ReactNode[];
4
+ }
5
+ export declare const ResponsiveGridLayout: ({ children }: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};