@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.
- package/LICENSE +21 -0
- package/README.md +22 -0
- package/dist/assets/connection-point.3b3c78ca.svg +1 -0
- package/dist/assets/webpack.98604d64.svg +1 -0
- package/dist/components/Alert/change.d.ts +8 -0
- package/dist/components/Alert/change.js +93 -0
- package/dist/components/Alert/file-relation.d.ts +3 -0
- package/dist/components/Alert/file-relation.js +9 -0
- package/dist/components/Alert/index.css +32 -0
- package/dist/components/Alert/index.d.ts +4 -0
- package/dist/components/Alert/index.js +37 -0
- package/dist/components/Alert/link.d.ts +3 -0
- package/dist/components/Alert/link.js +27 -0
- package/dist/components/Alert/package-relation.d.ts +17 -0
- package/dist/components/Alert/package-relation.js +281 -0
- package/dist/components/Alert/types.d.ts +31 -0
- package/dist/components/Alert/types.js +0 -0
- package/dist/components/Alert/view.d.ts +4 -0
- package/dist/components/Alert/view.js +58 -0
- package/dist/components/Alerts/bundle.d.ts +11 -0
- package/dist/components/Alerts/bundle.js +61 -0
- package/dist/components/Alerts/common.d.ts +15 -0
- package/dist/components/Alerts/common.js +112 -0
- package/dist/components/Alerts/compile.d.ts +10 -0
- package/dist/components/Alerts/compile.js +46 -0
- package/dist/components/Alerts/index.d.ts +3 -0
- package/dist/components/Alerts/index.js +3 -0
- package/dist/components/Alerts/overlay.d.ts +26 -0
- package/dist/components/Alerts/overlay.js +154 -0
- package/dist/components/Badge/index.d.ts +21 -0
- package/dist/components/Badge/index.js +87 -0
- package/dist/components/BundleDiff/DiffContainer/assets.d.ts +7 -0
- package/dist/components/BundleDiff/DiffContainer/assets.js +507 -0
- package/dist/components/BundleDiff/DiffContainer/cards.d.ts +3 -0
- package/dist/components/BundleDiff/DiffContainer/cards.js +156 -0
- package/dist/components/BundleDiff/DiffContainer/changes.d.ts +15 -0
- package/dist/components/BundleDiff/DiffContainer/changes.js +69 -0
- package/dist/components/BundleDiff/DiffContainer/constants.d.ts +11 -0
- package/dist/components/BundleDiff/DiffContainer/constants.js +17 -0
- package/dist/components/BundleDiff/DiffContainer/diff.d.ts +23 -0
- package/dist/components/BundleDiff/DiffContainer/diff.js +114 -0
- package/dist/components/BundleDiff/DiffContainer/index.d.ts +3 -0
- package/dist/components/BundleDiff/DiffContainer/index.js +180 -0
- package/dist/components/BundleDiff/DiffContainer/modules.d.ts +8 -0
- package/dist/components/BundleDiff/DiffContainer/modules.js +302 -0
- package/dist/components/BundleDiff/DiffContainer/overview.d.ts +5 -0
- package/dist/components/BundleDiff/DiffContainer/overview.js +178 -0
- package/dist/components/BundleDiff/DiffContainer/packages.d.ts +19 -0
- package/dist/components/BundleDiff/DiffContainer/packages.js +330 -0
- package/dist/components/BundleDiff/DiffContainer/row.d.ts +9 -0
- package/dist/components/BundleDiff/DiffContainer/row.js +369 -0
- package/dist/components/BundleDiff/DiffContainer/types.d.ts +45 -0
- package/dist/components/BundleDiff/DiffContainer/types.js +0 -0
- package/dist/components/BundleDiff/DiffContainer/utils.d.ts +2 -0
- package/dist/components/BundleDiff/DiffContainer/utils.js +24 -0
- package/dist/components/BundleDiff/DiffServerAPIProvider/index.d.ts +4 -0
- package/dist/components/BundleDiff/DiffServerAPIProvider/index.js +37 -0
- package/dist/components/BundleDiff/constants.d.ts +11 -0
- package/dist/components/BundleDiff/constants.js +19 -0
- package/dist/components/BundleDiff/index.d.ts +1 -0
- package/dist/components/BundleDiff/index.js +1 -0
- package/dist/components/Card/diff.d.ts +24 -0
- package/dist/components/Card/diff.js +116 -0
- package/dist/components/Card/index.d.ts +9 -0
- package/dist/components/Card/index.js +50 -0
- package/dist/components/Card/size.d.ts +21 -0
- package/dist/components/Card/size.js +79 -0
- package/dist/components/Card/statistic.css +17 -0
- package/dist/components/Card/statistic.d.ts +12 -0
- package/dist/components/Card/statistic.js +19 -0
- package/dist/components/Charts/TimelineCharts/index.d.ts +8 -0
- package/dist/components/Charts/TimelineCharts/index.js +212 -0
- package/dist/components/Charts/bootstrap.d.ts +5 -0
- package/dist/components/Charts/bootstrap.js +44 -0
- package/dist/components/Charts/common.d.ts +13 -0
- package/dist/components/Charts/common.js +56 -0
- package/dist/components/Charts/constants.d.ts +2 -0
- package/dist/components/Charts/constants.js +46 -0
- package/dist/components/Charts/done.d.ts +5 -0
- package/dist/components/Charts/done.js +45 -0
- package/dist/components/Charts/index.d.ts +10 -0
- package/dist/components/Charts/index.js +37 -0
- package/dist/components/Charts/loader.css +31 -0
- package/dist/components/Charts/loader.d.ts +4 -0
- package/dist/components/Charts/loader.js +88 -0
- package/dist/components/Charts/minify.d.ts +5 -0
- package/dist/components/Charts/minify.js +37 -0
- package/dist/components/Charts/tooltips.css +62 -0
- package/dist/components/Charts/types.d.ts +61 -0
- package/dist/components/Charts/types.js +11 -0
- package/dist/components/Charts/utils.d.ts +13 -0
- package/dist/components/Charts/utils.js +206 -0
- package/dist/components/CodeViewer/config.d.ts +2 -0
- package/dist/components/CodeViewer/config.js +18 -0
- package/dist/components/CodeViewer/diff.d.ts +11 -0
- package/dist/components/CodeViewer/diff.js +35 -0
- package/dist/components/CodeViewer/hightlight.d.ts +10 -0
- package/dist/components/CodeViewer/hightlight.js +76 -0
- package/dist/components/CodeViewer/index.d.ts +4 -0
- package/dist/components/CodeViewer/index.js +4 -0
- package/dist/components/CodeViewer/viewer.d.ts +13 -0
- package/dist/components/CodeViewer/viewer.js +60 -0
- package/dist/components/Configuration/builder.d.ts +13 -0
- package/dist/components/Configuration/builder.js +67 -0
- package/dist/components/Configuration/index.d.ts +1 -0
- package/dist/components/Configuration/index.js +1 -0
- package/dist/components/FileTree/index.css +58 -0
- package/dist/components/FileTree/index.d.ts +4 -0
- package/dist/components/FileTree/index.js +42 -0
- package/dist/components/Form/keyword.d.ts +14 -0
- package/dist/components/Form/keyword.js +60 -0
- package/dist/components/Keyword/index.d.ts +6 -0
- package/dist/components/Keyword/index.js +36 -0
- package/dist/components/Layout/builder-select.d.ts +2 -0
- package/dist/components/Layout/builder-select.js +50 -0
- package/dist/components/Layout/constants.d.ts +1 -0
- package/dist/components/Layout/constants.js +4 -0
- package/dist/components/Layout/header.css +12 -0
- package/dist/components/Layout/header.d.ts +3 -0
- package/dist/components/Layout/header.js +86 -0
- package/dist/components/Layout/index.d.ts +5 -0
- package/dist/components/Layout/index.js +34 -0
- package/dist/components/Layout/menus.d.ts +8 -0
- package/dist/components/Layout/menus.js +167 -0
- package/dist/components/Layout/progress.d.ts +8 -0
- package/dist/components/Layout/progress.js +44 -0
- package/dist/components/Loader/Analysis/files.d.ts +8 -0
- package/dist/components/Loader/Analysis/files.js +193 -0
- package/dist/components/Loader/Analysis/index.d.ts +11 -0
- package/dist/components/Loader/Analysis/index.js +23 -0
- package/dist/components/Loader/executions.d.ts +9 -0
- package/dist/components/Loader/executions.js +199 -0
- package/dist/components/Manifest/api.d.ts +34 -0
- package/dist/components/Manifest/api.js +127 -0
- package/dist/components/Manifest/data.d.ts +8 -0
- package/dist/components/Manifest/data.js +65 -0
- package/dist/components/Manifest/index.d.ts +2 -0
- package/dist/components/Manifest/index.js +2 -0
- package/dist/components/Opener/code.d.ts +20 -0
- package/dist/components/Opener/code.js +78 -0
- package/dist/components/Opener/index.d.ts +2 -0
- package/dist/components/Opener/index.js +2 -0
- package/dist/components/Opener/vscode.d.ts +11 -0
- package/dist/components/Opener/vscode.js +42 -0
- package/dist/components/Overall/NumberButton.d.ts +8 -0
- package/dist/components/Overall/NumberButton.js +29 -0
- package/dist/components/Overall/NumberButton.module.js +5 -0
- package/dist/components/Overall/NumberButton_module.css +70 -0
- package/dist/components/Overall/bundle.d.ts +6 -0
- package/dist/components/Overall/bundle.js +167 -0
- package/dist/components/Overall/bundle.module.css +0 -0
- package/dist/components/Overall/card.module.js +5 -0
- package/dist/components/Overall/card_module.css +6 -0
- package/dist/components/Overall/compile.d.ts +5 -0
- package/dist/components/Overall/compile.js +67 -0
- package/dist/components/Overall/compile.module.js +5 -0
- package/dist/components/Overall/compile_module.css +4 -0
- package/dist/components/Overall/index.d.ts +3 -0
- package/dist/components/Overall/index.js +3 -0
- package/dist/components/Overall/list.module.js +5 -0
- package/dist/components/Overall/list_module.css +7 -0
- package/dist/components/Overall/project.d.ts +8 -0
- package/dist/components/Overall/project.js +73 -0
- package/dist/components/Plugins/webpack.d.ts +18 -0
- package/dist/components/Plugins/webpack.js +76 -0
- package/dist/components/Resolver/analysis.d.ts +15 -0
- package/dist/components/Resolver/analysis.js +144 -0
- package/dist/components/Select/index.d.ts +15 -0
- package/dist/components/Select/index.js +68 -0
- package/dist/components/Status/failed.d.ts +9 -0
- package/dist/components/Status/failed.js +33 -0
- package/dist/components/Status/index.d.ts +1 -0
- package/dist/components/Status/index.js +1 -0
- package/dist/components/TextDrawer/duplicate.d.ts +17 -0
- package/dist/components/TextDrawer/duplicate.js +69 -0
- package/dist/components/TextDrawer/index.d.ts +11 -0
- package/dist/components/TextDrawer/index.js +36 -0
- package/dist/components/Title/index.d.ts +15 -0
- package/dist/components/Title/index.js +10 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/components/index.js +15 -0
- package/dist/components/worker/ecmaversion/client.d.ts +10 -0
- package/dist/components/worker/ecmaversion/client.js +60 -0
- package/dist/components/worker/ecmaversion/worker.d.ts +1 -0
- package/dist/components/worker/ecmaversion/worker.js +13 -0
- package/dist/components/worker/jsequal/client.d.ts +11 -0
- package/dist/components/worker/jsequal/client.js +38 -0
- package/dist/components/worker/jsequal/worker.d.ts +1 -0
- package/dist/components/worker/jsequal/worker.js +23 -0
- package/dist/config.d.ts +19 -0
- package/dist/config.js +25 -0
- package/dist/constants.d.ts +50 -0
- package/dist/constants.js +75 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +6 -0
- package/dist/pages/BundleSize/components/asset.d.ts +26 -0
- package/dist/pages/BundleSize/components/asset.js +545 -0
- package/dist/pages/BundleSize/components/cards.d.ts +7 -0
- package/dist/pages/BundleSize/components/cards.js +143 -0
- package/dist/pages/BundleSize/components/editor.d.ts +5 -0
- package/dist/pages/BundleSize/components/editor.js +38 -0
- package/dist/pages/BundleSize/components/index.css +20 -0
- package/dist/pages/BundleSize/components/index.d.ts +16 -0
- package/dist/pages/BundleSize/components/index.js +366 -0
- package/dist/pages/BundleSize/config.d.ts +7 -0
- package/dist/pages/BundleSize/config.js +9 -0
- package/dist/pages/BundleSize/constants.d.ts +5 -0
- package/dist/pages/BundleSize/constants.js +9 -0
- package/dist/pages/BundleSize/index.d.ts +3 -0
- package/dist/pages/BundleSize/index.js +11 -0
- package/dist/pages/ModuleAnalyze/chunks.d.ts +6 -0
- package/dist/pages/ModuleAnalyze/chunks.js +48 -0
- package/dist/pages/ModuleAnalyze/components/fileTreeCom.css +97 -0
- package/dist/pages/ModuleAnalyze/components/fileTreeCom.d.ts +15 -0
- package/dist/pages/ModuleAnalyze/components/fileTreeCom.js +120 -0
- package/dist/pages/ModuleAnalyze/constants.d.ts +7 -0
- package/dist/pages/ModuleAnalyze/constants.js +14 -0
- package/dist/pages/ModuleAnalyze/dependncy.d.ts +9 -0
- package/dist/pages/ModuleAnalyze/dependncy.js +31 -0
- package/dist/pages/ModuleAnalyze/fileTree.d.ts +9 -0
- package/dist/pages/ModuleAnalyze/fileTree.js +125 -0
- package/dist/pages/ModuleAnalyze/index.css +10 -0
- package/dist/pages/ModuleAnalyze/index.d.ts +8 -0
- package/dist/pages/ModuleAnalyze/index.js +64 -0
- package/dist/pages/ModuleAnalyze/utils/hooks.d.ts +21 -0
- package/dist/pages/ModuleAnalyze/utils/hooks.js +62 -0
- package/dist/pages/ModuleAnalyze/utils/index.d.ts +3 -0
- package/dist/pages/ModuleAnalyze/utils/index.js +34 -0
- package/dist/pages/ModuleResolve/constants.d.ts +3 -0
- package/dist/pages/ModuleResolve/constants.js +7 -0
- package/dist/pages/ModuleResolve/index.d.ts +3 -0
- package/dist/pages/ModuleResolve/index.js +19 -0
- package/dist/pages/Overall/constants.d.ts +3 -0
- package/dist/pages/Overall/constants.js +7 -0
- package/dist/pages/Overall/index.d.ts +9 -0
- package/dist/pages/Overall/index.js +39 -0
- package/dist/pages/Overall/responsiveGridList.d.ts +6 -0
- package/dist/pages/Overall/responsiveGridList.js +28 -0
- package/dist/pages/Resources/RuleIndex/constants.d.ts +3 -0
- package/dist/pages/Resources/RuleIndex/constants.js +7 -0
- package/dist/pages/Resources/RuleIndex/index.d.ts +3 -0
- package/dist/pages/Resources/RuleIndex/index.js +53 -0
- package/dist/pages/TreeShaking/constants.d.ts +3 -0
- package/dist/pages/TreeShaking/constants.js +7 -0
- package/dist/pages/TreeShaking/editor.d.ts +12 -0
- package/dist/pages/TreeShaking/editor.js +110 -0
- package/dist/pages/TreeShaking/index.css +74 -0
- package/dist/pages/TreeShaking/index.d.ts +8 -0
- package/dist/pages/TreeShaking/index.js +177 -0
- package/dist/pages/TreeShaking/open-tag.d.ts +11 -0
- package/dist/pages/TreeShaking/open-tag.js +43 -0
- package/dist/pages/TreeShaking/space.d.ts +1 -0
- package/dist/pages/TreeShaking/space.js +16 -0
- package/dist/pages/TreeShaking/table.d.ts +13 -0
- package/dist/pages/TreeShaking/table.js +319 -0
- package/dist/pages/TreeShaking/types.d.ts +3 -0
- package/dist/pages/TreeShaking/types.js +0 -0
- package/dist/pages/TreeShaking/utils.d.ts +7 -0
- package/dist/pages/TreeShaking/utils.js +147 -0
- package/dist/pages/WebpackLoaders/Analysis/constants.d.ts +3 -0
- package/dist/pages/WebpackLoaders/Analysis/constants.js +7 -0
- package/dist/pages/WebpackLoaders/Analysis/index.d.ts +3 -0
- package/dist/pages/WebpackLoaders/Analysis/index.js +19 -0
- package/dist/pages/WebpackLoaders/Overall/constants.d.ts +3 -0
- package/dist/pages/WebpackLoaders/Overall/constants.js +7 -0
- package/dist/pages/WebpackLoaders/Overall/index.d.ts +3 -0
- package/dist/pages/WebpackLoaders/Overall/index.js +11 -0
- package/dist/pages/WebpackLoaders/constants.d.ts +2 -0
- package/dist/pages/WebpackLoaders/constants.js +6 -0
- package/dist/pages/WebpackPlugins/constants.d.ts +3 -0
- package/dist/pages/WebpackPlugins/constants.js +7 -0
- package/dist/pages/WebpackPlugins/index.d.ts +3 -0
- package/dist/pages/WebpackPlugins/index.js +79 -0
- package/dist/pages/index.d.ts +9 -0
- package/dist/pages/index.js +20 -0
- package/dist/utils/data/base.d.ts +24 -0
- package/dist/utils/data/base.js +48 -0
- package/dist/utils/data/index.d.ts +5 -0
- package/dist/utils/data/index.js +44 -0
- package/dist/utils/data/local.d.ts +14 -0
- package/dist/utils/data/local.js +86 -0
- package/dist/utils/data/remote.d.ts +10 -0
- package/dist/utils/data/remote.js +52 -0
- package/dist/utils/file.d.ts +33 -0
- package/dist/utils/file.js +154 -0
- package/dist/utils/hooks.d.ts +31 -0
- package/dist/utils/hooks.js +216 -0
- package/dist/utils/i18n/cn.d.ts +3 -0
- package/dist/utils/i18n/cn.js +33 -0
- package/dist/utils/i18n/en.d.ts +30 -0
- package/dist/utils/i18n/en.js +33 -0
- package/dist/utils/i18n/index.d.ts +2 -0
- package/dist/utils/i18n/index.js +34 -0
- package/dist/utils/index.d.ts +16 -0
- package/dist/utils/index.js +16 -0
- package/dist/utils/loader.d.ts +7 -0
- package/dist/utils/loader.js +34 -0
- package/dist/utils/locale.d.ts +2 -0
- package/dist/utils/locale.js +9 -0
- package/dist/utils/manifest.d.ts +27 -0
- package/dist/utils/manifest.js +54 -0
- package/dist/utils/monaco.d.ts +12 -0
- package/dist/utils/monaco.js +71 -0
- package/dist/utils/request.d.ts +27 -0
- package/dist/utils/request.js +130 -0
- package/dist/utils/routes.d.ts +3 -0
- package/dist/utils/routes.js +14 -0
- package/dist/utils/size.d.ts +2 -0
- package/dist/utils/size.js +24 -0
- package/dist/utils/socket.d.ts +2 -0
- package/dist/utils/socket.js +21 -0
- package/dist/utils/storage.d.ts +13 -0
- package/dist/utils/storage.js +70 -0
- package/dist/utils/string.d.ts +2 -0
- package/dist/utils/string.js +14 -0
- package/dist/utils/time.d.ts +3 -0
- package/dist/utils/time.js +7 -0
- package/dist/utils/url.d.ts +7 -0
- package/dist/utils/url.js +75 -0
- package/dist/utils/worker/index.d.ts +4 -0
- package/dist/utils/worker/index.js +4 -0
- package/dist/utils/worker/master.d.ts +8 -0
- package/dist/utils/worker/master.js +18 -0
- package/dist/utils/worker/types.d.ts +9 -0
- package/dist/utils/worker/types.js +0 -0
- package/dist/utils/worker/utils.d.ts +7 -0
- package/dist/utils/worker/utils.js +29 -0
- package/dist/utils/worker/worker.d.ts +13 -0
- package/dist/utils/worker/worker.js +38 -0
- package/package.json +92 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Col, Grid, Row } from "antd";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { Size } from "../../constants";
|
|
5
|
+
const ResponsiveGridLayout = ({ children }) => {
|
|
6
|
+
const { sm, xxl } = Grid.useBreakpoint();
|
|
7
|
+
const gutters = useMemo(() => {
|
|
8
|
+
if (xxl) {
|
|
9
|
+
return [Size.BasePadding * 2, Size.BasePadding];
|
|
10
|
+
} else {
|
|
11
|
+
return [Size.BasePadding, Size.BasePadding];
|
|
12
|
+
}
|
|
13
|
+
}, [sm, xxl]);
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
Row,
|
|
16
|
+
{
|
|
17
|
+
gutter: gutters,
|
|
18
|
+
wrap: true,
|
|
19
|
+
style: {
|
|
20
|
+
marginBottom: Size.BasePadding
|
|
21
|
+
},
|
|
22
|
+
children: children.map((e, i) => /* @__PURE__ */ jsx(Col, { xs: 24, sm: 24, md: 12, lg: 8, children: e }, i))
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
ResponsiveGridLayout
|
|
28
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { Rule } from "@rsdoctor/types";
|
|
4
|
+
import { Badge, Card, Space, Typography, Col, Row, Tag } from "antd";
|
|
5
|
+
import ReactMarkdown from "react-markdown";
|
|
6
|
+
import { values } from "lodash-es";
|
|
7
|
+
import { Title } from "../../../components/Title";
|
|
8
|
+
import { Size } from "../../../constants";
|
|
9
|
+
import { useUrlQuery } from "../../../utils";
|
|
10
|
+
const Page = () => {
|
|
11
|
+
const query = useUrlQuery();
|
|
12
|
+
const defaultErrorCode = query[Rule.RsdoctorRuleClientConstant.UrlQueryForErrorCode] || "";
|
|
13
|
+
const [ruleMessage, setRuleMessage] = useState(Rule.RuleErrorMap[defaultErrorCode]);
|
|
14
|
+
const dataSource = values(Rule.RuleErrorMap);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
window.scrollTo({ top: 0 });
|
|
17
|
+
}, []);
|
|
18
|
+
return /* @__PURE__ */ jsxs(Row, { gutter: Size.BasePadding / 2, children: [
|
|
19
|
+
/* @__PURE__ */ jsx(Col, { span: 8, children: /* @__PURE__ */ jsx(Card, { title: /* @__PURE__ */ jsx(Title, { text: "list of the error codes." }), bordered: true, children: /* @__PURE__ */ jsx(Space, { direction: "vertical", children: dataSource.map((e, i) => /* @__PURE__ */ jsxs(
|
|
20
|
+
Space,
|
|
21
|
+
{
|
|
22
|
+
style: { marginTop: i === 0 ? 0 : Size.BasePadding / 2, cursor: "pointer" },
|
|
23
|
+
onClick: () => setRuleMessage(e),
|
|
24
|
+
align: "center",
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx(Badge, { status: "default" }),
|
|
27
|
+
/* @__PURE__ */ jsx(Typography.Text, { code: true, children: /* @__PURE__ */ jsx("a", { children: e.code }) }),
|
|
28
|
+
/* @__PURE__ */ jsx(Typography.Text, { style: { color: ruleMessage && ruleMessage.code === e.code ? "#1890ff" : void 0 }, children: e.title })
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
e.code
|
|
32
|
+
)) }) }) }),
|
|
33
|
+
/* @__PURE__ */ jsx(Col, { span: 16, children: ruleMessage ? /* @__PURE__ */ jsx(
|
|
34
|
+
Card,
|
|
35
|
+
{
|
|
36
|
+
title: /* @__PURE__ */ jsxs(Row, { justify: "space-between", children: [
|
|
37
|
+
/* @__PURE__ */ jsxs(Space, { children: [
|
|
38
|
+
/* @__PURE__ */ jsx(Typography.Text, { code: true, children: ruleMessage.code }),
|
|
39
|
+
/* @__PURE__ */ jsx(Typography.Text, { children: ruleMessage.title })
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Tag, { children: ruleMessage.category }) })
|
|
42
|
+
] }),
|
|
43
|
+
bodyStyle: { paddingTop: 0 },
|
|
44
|
+
bordered: true,
|
|
45
|
+
children: /* @__PURE__ */ jsx(Typography.Paragraph, { children: ruleMessage.type === "markdown" ? /* @__PURE__ */ jsx(ReactMarkdown, { children: ruleMessage.description }) : /* @__PURE__ */ jsx(Typography.Text, { children: ruleMessage.description }) })
|
|
46
|
+
}
|
|
47
|
+
) : /* @__PURE__ */ jsx(Card, { title: "This page lists all the error codes emitted by the Rsdoctor.", bordered: true, children: /* @__PURE__ */ jsx(Typography.Text, { children: "click the error code in left bar to show more details." }) }) })
|
|
48
|
+
] });
|
|
49
|
+
};
|
|
50
|
+
export * from "./constants";
|
|
51
|
+
export {
|
|
52
|
+
Page
|
|
53
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Module, ModuleGraph, SourceRange } from '@rsdoctor/graph';
|
|
2
|
+
import { SDK } from '@rsdoctor/types';
|
|
3
|
+
import { SetEditorStatus } from './types';
|
|
4
|
+
export interface CodeEditorProps {
|
|
5
|
+
module: Module;
|
|
6
|
+
moduleGraph: ModuleGraph;
|
|
7
|
+
ranges: SourceRange[];
|
|
8
|
+
setEditorData: SetEditorStatus;
|
|
9
|
+
source: SDK.ModuleSource;
|
|
10
|
+
toLine?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function CodeEditor(props: CodeEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState, useRef } from "react";
|
|
3
|
+
import path from "path-browserify";
|
|
4
|
+
import { Card, Space, Tooltip, Typography } from "antd";
|
|
5
|
+
import { InfoCircleOutlined, LoadingOutlined } from "@ant-design/icons";
|
|
6
|
+
import Editor from "@monaco-editor/react";
|
|
7
|
+
import { Range, editor } from "monaco-editor";
|
|
8
|
+
import { parseOpenTag } from "./open-tag";
|
|
9
|
+
import { getHoverMessageInModule } from "./utils";
|
|
10
|
+
import { getOriginalLanguage, getSelectionRange } from "../../utils";
|
|
11
|
+
import { DefaultEditorConfig } from "../../components/CodeViewer";
|
|
12
|
+
function CodeEditor(props) {
|
|
13
|
+
const { module, moduleGraph, ranges, toLine, setEditorData, source } = props;
|
|
14
|
+
const editorRef = useRef();
|
|
15
|
+
const oldRanges = useRef([]);
|
|
16
|
+
const oldHovers = useRef([]);
|
|
17
|
+
const oldToLine = useRef();
|
|
18
|
+
const changeModule = useRef(false);
|
|
19
|
+
const [content, setContent] = useState("");
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const { isPreferSource } = module;
|
|
22
|
+
changeModule.current = true;
|
|
23
|
+
setContent(
|
|
24
|
+
source.source || isPreferSource ? source.source : source.transformed
|
|
25
|
+
);
|
|
26
|
+
setTimeout(() => {
|
|
27
|
+
oldHovers.current = editorRef.current?.getModel()?.deltaDecorations(
|
|
28
|
+
oldHovers.current,
|
|
29
|
+
getHoverMessageInModule(module, moduleGraph)
|
|
30
|
+
) ?? [];
|
|
31
|
+
}, 200);
|
|
32
|
+
}, [module, source]);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
function setRangeAndLine() {
|
|
35
|
+
const model = editorRef.current?.getModel();
|
|
36
|
+
if (!model) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
oldRanges.current = model.deltaDecorations(
|
|
40
|
+
oldRanges.current,
|
|
41
|
+
ranges.map((arr) => {
|
|
42
|
+
return {
|
|
43
|
+
range: getSelectionRange(arr, Range),
|
|
44
|
+
options: {
|
|
45
|
+
stickiness: 1,
|
|
46
|
+
inlineClassName: "tree-shaking-statement-side-effect",
|
|
47
|
+
isWholeLine: false,
|
|
48
|
+
showIfCollapsed: true
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
})
|
|
52
|
+
);
|
|
53
|
+
if (editorRef.current && typeof toLine === "number" && oldToLine.current !== toLine) {
|
|
54
|
+
oldToLine.current = toLine;
|
|
55
|
+
editorRef.current.revealLine(toLine, editor.ScrollType.Smooth);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (changeModule) {
|
|
59
|
+
setTimeout(setRangeAndLine, 300);
|
|
60
|
+
} else {
|
|
61
|
+
setRangeAndLine();
|
|
62
|
+
}
|
|
63
|
+
changeModule.current = false;
|
|
64
|
+
}, [ranges, toLine]);
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
const openEditor = (event) => {
|
|
67
|
+
const query = parseOpenTag(event.target);
|
|
68
|
+
if (query) {
|
|
69
|
+
const module2 = moduleGraph.getModuleById(query.module);
|
|
70
|
+
if (module2) {
|
|
71
|
+
setEditorData(module2, [query.range], query.range.start.line);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
document.body.addEventListener("click", openEditor);
|
|
76
|
+
return () => {
|
|
77
|
+
document.body.removeEventListener("click", openEditor);
|
|
78
|
+
};
|
|
79
|
+
}, []);
|
|
80
|
+
if (!module) {
|
|
81
|
+
return /* @__PURE__ */ jsx("div", { children: "请选择要查看的模块" });
|
|
82
|
+
}
|
|
83
|
+
const handleEditorDidMount = (editor2) => {
|
|
84
|
+
editorRef.current = editor2;
|
|
85
|
+
};
|
|
86
|
+
return /* @__PURE__ */ jsx(
|
|
87
|
+
Card,
|
|
88
|
+
{
|
|
89
|
+
title: /* @__PURE__ */ jsx(Tooltip, { title: module.path, children: /* @__PURE__ */ jsxs(Space, { children: [
|
|
90
|
+
/* @__PURE__ */ jsx(Typography.Text, { children: path.basename(module.path) }),
|
|
91
|
+
/* @__PURE__ */ jsx(InfoCircleOutlined, {})
|
|
92
|
+
] }) }),
|
|
93
|
+
className: "tree-shaking-editor",
|
|
94
|
+
children: /* @__PURE__ */ jsx(
|
|
95
|
+
Editor,
|
|
96
|
+
{
|
|
97
|
+
theme: "vs-dark",
|
|
98
|
+
language: getOriginalLanguage(module.path),
|
|
99
|
+
value: content,
|
|
100
|
+
loading: /* @__PURE__ */ jsx(LoadingOutlined, { style: { fontSize: 30 } }),
|
|
101
|
+
options: DefaultEditorConfig,
|
|
102
|
+
onMount: handleEditorDidMount
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
export {
|
|
109
|
+
CodeEditor
|
|
110
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.tree-shaking-page {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
}
|
|
5
|
+
.tree-shaking-page .ant-card {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
}
|
|
9
|
+
.tree-shaking-page .tree-shaking-statement-side-effect {
|
|
10
|
+
text-decoration: underline;
|
|
11
|
+
background: #711f1c;
|
|
12
|
+
}
|
|
13
|
+
.tree-shaking-page .tree-shaking-statement-declaration-identifier {
|
|
14
|
+
text-decoration: underline;
|
|
15
|
+
background: rgb(44, 135, 236);
|
|
16
|
+
}
|
|
17
|
+
.tree-shaking-page .tree-shaking-files-box {
|
|
18
|
+
height: 700px;
|
|
19
|
+
}
|
|
20
|
+
.tree-shaking-page .tree-shaking-files {
|
|
21
|
+
overflow: auto;
|
|
22
|
+
height: 100%;
|
|
23
|
+
}
|
|
24
|
+
.tree-shaking-page .tree-shaking-editor {
|
|
25
|
+
flex-grow: 1;
|
|
26
|
+
height: 700px;
|
|
27
|
+
}
|
|
28
|
+
.tree-shaking-page .tree-shaking-editor .ant-card-body {
|
|
29
|
+
padding: 0;
|
|
30
|
+
}
|
|
31
|
+
.tree-shaking-page .tree-shaking-files-box,
|
|
32
|
+
.tree-shaking-page .tree-shaking-editor .ant-card-body {
|
|
33
|
+
width: auto;
|
|
34
|
+
height: calc(100% - 48px);
|
|
35
|
+
}
|
|
36
|
+
.tree-shaking-page .tree-shaking-export-table .ant-card-body {
|
|
37
|
+
padding: 0;
|
|
38
|
+
}
|
|
39
|
+
.tree-shaking-page .tree-shaking-export-table .ant-card-body .ant-divider {
|
|
40
|
+
margin: 24px;
|
|
41
|
+
}
|
|
42
|
+
.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td {
|
|
43
|
+
border-bottom: none;
|
|
44
|
+
}
|
|
45
|
+
.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td .ant-table-container table > thead > tr:first-child th {
|
|
46
|
+
border-top: 1px solid rgba(5, 5, 5, 0.06);
|
|
47
|
+
}
|
|
48
|
+
.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td .ant-table-container table > thead > tr:first-child th th:first-child {
|
|
49
|
+
border-start-start-radius: 0;
|
|
50
|
+
}
|
|
51
|
+
.tree-shaking-page .tree-shaking-export-table .ant-table-wrapper .ant-table-tbody > tr:last-child > td .ant-table-container table > thead > tr:first-child th th:last-child {
|
|
52
|
+
border-start-end-radius: 0;
|
|
53
|
+
}
|
|
54
|
+
.tree-shaking-page .tree-shaking-side-effect-list {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
align-items: flex-start;
|
|
58
|
+
}
|
|
59
|
+
.tree-shaking-page .tree-shaking-side-effect-list .tree-shaking-side-effect-list-item {
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
text-overflow: ellipsis;
|
|
62
|
+
white-space: nowrap;
|
|
63
|
+
}
|
|
64
|
+
.monaco-hover .markdown-hover.hover-row hr {
|
|
65
|
+
margin: 2px;
|
|
66
|
+
background-color: gray;
|
|
67
|
+
}
|
|
68
|
+
.monaco-hover .markdown-hover.hover-row div[data-code=tree-shaking-hover] ol {
|
|
69
|
+
margin: 4px 0 10px 0;
|
|
70
|
+
padding-left: 4px;
|
|
71
|
+
}
|
|
72
|
+
.monaco-hover .markdown-hover.hover-row div[data-code=tree-shaking-hover] ol pre {
|
|
73
|
+
margin: 2px 0;
|
|
74
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState } from "react";
|
|
3
|
+
import { Card, Col, Row, Radio } from "antd";
|
|
4
|
+
import { isNumber } from "lodash-es";
|
|
5
|
+
import { FileSearchOutlined } from "@ant-design/icons";
|
|
6
|
+
import { SDK } from "@rsdoctor/types";
|
|
7
|
+
import path from "path-browserify";
|
|
8
|
+
import {
|
|
9
|
+
ConnectManifestData,
|
|
10
|
+
ServerAPIProvider
|
|
11
|
+
} from "../../components/Manifest";
|
|
12
|
+
import { Size } from "../../constants";
|
|
13
|
+
import { FileTree } from "../../components/FileTree";
|
|
14
|
+
import { KeywordInput } from "../../components/Form/keyword";
|
|
15
|
+
import { getTreeFilesDefaultExpandedKeys, useFileStructures } from "./utils";
|
|
16
|
+
import {
|
|
17
|
+
fetchManifest,
|
|
18
|
+
useModuleGraphInstanceByModuleGraph
|
|
19
|
+
} from "../../utils";
|
|
20
|
+
import { CodeEditor } from "./editor";
|
|
21
|
+
import { Space } from "./space";
|
|
22
|
+
import { TreeShakingTable } from "./table";
|
|
23
|
+
import "./index.css";
|
|
24
|
+
export * from "./constants";
|
|
25
|
+
const Component = ({
|
|
26
|
+
data,
|
|
27
|
+
cwd
|
|
28
|
+
}) => {
|
|
29
|
+
const moduleGraph = useModuleGraphInstanceByModuleGraph(data);
|
|
30
|
+
if (moduleGraph.size() === 0) {
|
|
31
|
+
return /* @__PURE__ */ jsx(Space, {});
|
|
32
|
+
}
|
|
33
|
+
const [searchInput, setSearchInput] = useState("");
|
|
34
|
+
const [toLine, setToLine] = useState(1);
|
|
35
|
+
const [ranges, setRanges] = useState([]);
|
|
36
|
+
const [tableKind, setTableKind] = useState("side-effect");
|
|
37
|
+
const filteredModules = useMemo(
|
|
38
|
+
() => moduleGraph.getModules().filter(
|
|
39
|
+
(item) => item.kind === SDK.ModuleKind.Normal && path.basename(item.path).includes(searchInput)
|
|
40
|
+
),
|
|
41
|
+
[searchInput]
|
|
42
|
+
);
|
|
43
|
+
const entry = useMemo(
|
|
44
|
+
() => filteredModules.find((item) => item.isEntry),
|
|
45
|
+
[]
|
|
46
|
+
);
|
|
47
|
+
const [selectedModule, setSelectedModule] = useState(
|
|
48
|
+
entry || filteredModules?.length && filteredModules?.[0]
|
|
49
|
+
);
|
|
50
|
+
const files = useFileStructures(
|
|
51
|
+
filteredModules,
|
|
52
|
+
moduleGraph,
|
|
53
|
+
searchInput,
|
|
54
|
+
selectedModule,
|
|
55
|
+
(file) => {
|
|
56
|
+
setEditorData(filteredModules.find((item) => item.path === file), []);
|
|
57
|
+
},
|
|
58
|
+
cwd
|
|
59
|
+
);
|
|
60
|
+
const setEditorData = (module, ranges2, line) => {
|
|
61
|
+
setSelectedModule(module);
|
|
62
|
+
setRanges(ranges2.slice());
|
|
63
|
+
if (isNumber(line)) {
|
|
64
|
+
setToLine(line);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return /* @__PURE__ */ jsxs(
|
|
68
|
+
Card,
|
|
69
|
+
{
|
|
70
|
+
title: "Tree Shaking Analysis",
|
|
71
|
+
bodyStyle: { paddingTop: 0 },
|
|
72
|
+
className: "tree-shaking-page",
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ jsxs(
|
|
75
|
+
Row,
|
|
76
|
+
{
|
|
77
|
+
justify: "space-between",
|
|
78
|
+
align: "middle",
|
|
79
|
+
style: { marginBottom: Size.BasePadding, marginTop: Size.BasePadding },
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ jsx(
|
|
82
|
+
KeywordInput,
|
|
83
|
+
{
|
|
84
|
+
icon: /* @__PURE__ */ jsx(FileSearchOutlined, {}),
|
|
85
|
+
width: 400,
|
|
86
|
+
label: "FileName",
|
|
87
|
+
placeholder: "search filename by keyword",
|
|
88
|
+
style: { width: "auto" },
|
|
89
|
+
onChange: (e) => setSearchInput(e)
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
/* @__PURE__ */ jsxs(
|
|
93
|
+
Radio.Group,
|
|
94
|
+
{
|
|
95
|
+
value: tableKind,
|
|
96
|
+
onChange: ({ target }) => setTableKind(target.value),
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ jsx(Radio.Button, { value: "side-effect", children: "SideEffects" }),
|
|
99
|
+
/* @__PURE__ */ jsx(Radio.Button, { value: "export", children: "Export Variables" })
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
),
|
|
106
|
+
/* @__PURE__ */ jsxs(
|
|
107
|
+
Row,
|
|
108
|
+
{
|
|
109
|
+
justify: "space-between",
|
|
110
|
+
align: "top",
|
|
111
|
+
wrap: false,
|
|
112
|
+
gutter: [Size.BasePadding, Size.BasePadding],
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ jsx(Col, { span: 7, children: /* @__PURE__ */ jsx(
|
|
115
|
+
Card,
|
|
116
|
+
{
|
|
117
|
+
title: `Total Files: ${filteredModules.length}`,
|
|
118
|
+
className: "tree-shaking-files-box",
|
|
119
|
+
children: /* @__PURE__ */ jsx(
|
|
120
|
+
FileTree,
|
|
121
|
+
{
|
|
122
|
+
className: "tree-shaking-files",
|
|
123
|
+
selectedKeys: selectedModule ? [selectedModule.path] : [],
|
|
124
|
+
defaultExpandedKeys: getTreeFilesDefaultExpandedKeys(files),
|
|
125
|
+
treeData: files,
|
|
126
|
+
expandAction: "click"
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
) }),
|
|
131
|
+
/* @__PURE__ */ jsx(Col, { span: 9, children: /* @__PURE__ */ jsx(
|
|
132
|
+
ServerAPIProvider,
|
|
133
|
+
{
|
|
134
|
+
api: SDK.ServerAPI.API.GetModuleCodeByModuleId,
|
|
135
|
+
body: { moduleId: selectedModule.id },
|
|
136
|
+
children: (source) => {
|
|
137
|
+
return /* @__PURE__ */ jsx(
|
|
138
|
+
CodeEditor,
|
|
139
|
+
{
|
|
140
|
+
module: selectedModule,
|
|
141
|
+
moduleGraph,
|
|
142
|
+
ranges,
|
|
143
|
+
toLine,
|
|
144
|
+
setEditorData,
|
|
145
|
+
source
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
) }),
|
|
151
|
+
/* @__PURE__ */ jsx(Col, { flex: 1, children: /* @__PURE__ */ jsx(
|
|
152
|
+
TreeShakingTable,
|
|
153
|
+
{
|
|
154
|
+
kind: tableKind,
|
|
155
|
+
setEditorData,
|
|
156
|
+
module: selectedModule,
|
|
157
|
+
moduleGraph
|
|
158
|
+
}
|
|
159
|
+
) })
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
};
|
|
167
|
+
const TreeShakingPage = ConnectManifestData(
|
|
168
|
+
fetchManifest,
|
|
169
|
+
[
|
|
170
|
+
["moduleGraph", "data"],
|
|
171
|
+
["root", "cwd"]
|
|
172
|
+
],
|
|
173
|
+
Component
|
|
174
|
+
);
|
|
175
|
+
export {
|
|
176
|
+
TreeShakingPage
|
|
177
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SDK } from '@rsdoctor/types';
|
|
2
|
+
export declare enum AttributeKey {
|
|
3
|
+
Module = "data-module",
|
|
4
|
+
Range = "data-range"
|
|
5
|
+
}
|
|
6
|
+
export interface OpenTagData {
|
|
7
|
+
module: number;
|
|
8
|
+
range: SDK.SourceRange;
|
|
9
|
+
}
|
|
10
|
+
export declare function getOpenTagText(module: number, range: SDK.SourceRange, text: string): string;
|
|
11
|
+
export declare function parseOpenTag(dom: HTMLElement): OpenTagData | undefined;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var AttributeKey = /* @__PURE__ */ ((AttributeKey2) => {
|
|
2
|
+
AttributeKey2["Module"] = "data-module";
|
|
3
|
+
AttributeKey2["Range"] = "data-range";
|
|
4
|
+
return AttributeKey2;
|
|
5
|
+
})(AttributeKey || {});
|
|
6
|
+
function getOpenTagText(module, range, text) {
|
|
7
|
+
return `<a data-href="${"data-module" /* Module */}=${module}&${"data-range" /* Range */}=${encodeURIComponent(JSON.stringify(range))}">${text}</a>`;
|
|
8
|
+
}
|
|
9
|
+
function parseOpenTag(dom) {
|
|
10
|
+
if (dom.tagName.toLocaleLowerCase() !== "a") {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const hrefString = dom.getAttribute("data-href") ?? "";
|
|
14
|
+
const result = {
|
|
15
|
+
module: -1,
|
|
16
|
+
range: {
|
|
17
|
+
start: {
|
|
18
|
+
line: 1,
|
|
19
|
+
column: 0
|
|
20
|
+
},
|
|
21
|
+
end: {
|
|
22
|
+
line: 1,
|
|
23
|
+
column: 0
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
for (const item of hrefString.split("&")) {
|
|
28
|
+
const [key, value] = item.split("=");
|
|
29
|
+
if (key === "data-module" /* Module */) {
|
|
30
|
+
result.module = Number.parseInt(value, 10);
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (key === "data-range" /* Range */) {
|
|
34
|
+
result.range = JSON.parse(decodeURIComponent(value));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
AttributeKey,
|
|
41
|
+
getOpenTagText,
|
|
42
|
+
parseOpenTag
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Space(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Card, Empty } from "antd";
|
|
3
|
+
function Space() {
|
|
4
|
+
return /* @__PURE__ */ jsx(
|
|
5
|
+
Card,
|
|
6
|
+
{
|
|
7
|
+
title: "Tree Shaking Analysis",
|
|
8
|
+
bodyStyle: { paddingTop: 0 },
|
|
9
|
+
className: "tree-shaking-page",
|
|
10
|
+
children: /* @__PURE__ */ jsx(Empty, { style: { marginTop: 30 } })
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
Space
|
|
16
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Module, ModuleGraph } from '@rsdoctor/graph';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { TableKind, SetEditorStatus } from './types';
|
|
4
|
+
interface TableProps {
|
|
5
|
+
module: Module;
|
|
6
|
+
moduleGraph: ModuleGraph;
|
|
7
|
+
setEditorData: SetEditorStatus;
|
|
8
|
+
kind: TableKind;
|
|
9
|
+
}
|
|
10
|
+
export declare const SideEffectTable: React.FC<TableProps>;
|
|
11
|
+
export declare const ExportTable: React.FC<TableProps>;
|
|
12
|
+
export declare const TreeShakingTable: React.FC<TableProps>;
|
|
13
|
+
export {};
|