@rsdoctor/components 1.5.3-alpha.0 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/imgs/connection-point.mjs +1 -1
- package/dist/common/imgs/rsdoctor-navbar.mjs +1 -1
- package/dist/common/imgs/webpack.mjs +1 -1
- package/dist/common/svg/bundle-size.mjs +1 -1
- package/dist/common/svg/cursor.mjs +22 -0
- package/dist/common/svg/cursor.mjs.map +1 -0
- package/dist/common/svg/error.mjs +1 -1
- package/dist/common/svg/file-css.mjs +1 -1
- package/dist/common/svg/file-html.mjs +1 -1
- package/dist/common/svg/file-image.mjs +1 -1
- package/dist/common/svg/file-js.mjs +1 -1
- package/dist/common/svg/file-unknown.mjs +1 -1
- package/dist/common/svg/file.mjs +1 -1
- package/dist/common/svg/files/css.mjs +1 -1
- package/dist/common/svg/files/html.mjs +1 -1
- package/dist/common/svg/files/image.mjs +1 -1
- package/dist/common/svg/files/js.mjs +1 -1
- package/dist/common/svg/files/unkown-file.mjs +1 -1
- package/dist/common/svg/loader/input.mjs +1 -1
- package/dist/common/svg/loader/output.mjs +1 -1
- package/dist/common/svg/loader/step.mjs +1 -1
- package/dist/common/svg/navbar/bundle-size-active.mjs +1 -1
- package/dist/common/svg/navbar/bundle-size-inactive.mjs +1 -1
- package/dist/common/svg/navbar/compile-analysis-active.mjs +1 -1
- package/dist/common/svg/navbar/compile-analysis-inactive.mjs +1 -1
- package/dist/common/svg/navbar/overall-active.mjs +1 -1
- package/dist/common/svg/navbar/overall-inactive.mjs +1 -1
- package/dist/common/svg/output.mjs +1 -1
- package/dist/common/svg/source-size.mjs +1 -1
- package/dist/common/svg/source.mjs +1 -1
- package/dist/common/svg/total-size.mjs +1 -1
- package/dist/common/svg/trae.mjs +21 -0
- package/dist/common/svg/trae.mjs.map +1 -0
- package/dist/common/svg/version.mjs +1 -1
- package/dist/common/svg/vscode.mjs +158 -0
- package/dist/common/svg/vscode.mjs.map +1 -0
- package/dist/components/Alert/change.mjs.map +1 -1
- package/dist/components/Alert/ecma-version-check.mjs +1 -1
- package/dist/components/Alert/ecma-version-check.mjs.map +1 -1
- package/dist/components/Alert/ecma-version-check.module.mjs +1 -1
- package/dist/components/Alert/package-relation.module.mjs +1 -1
- package/dist/components/Alert/view.mjs.map +1 -1
- package/dist/components/Alerts/bundle-alert.mjs +37 -2
- package/dist/components/Alerts/bundle-alert.mjs.map +1 -1
- package/dist/components/Alerts/bundle-alert.module.mjs +1 -1
- package/dist/components/Alerts/collapse-cjs-require.d.ts +6 -0
- package/dist/components/Alerts/collapse-cjs-require.mjs +142 -0
- package/dist/components/Alerts/collapse-cjs-require.mjs.map +1 -0
- package/dist/components/Alerts/collapse-cross-chunks.mjs +2 -23
- package/dist/components/Alerts/collapse-cross-chunks.mjs.map +1 -1
- package/dist/components/Alerts/collapse-module-mixed-chunks.mjs +2 -23
- package/dist/components/Alerts/collapse-module-mixed-chunks.mjs.map +1 -1
- package/dist/components/Alerts/collapse-shared.d.ts +9 -0
- package/dist/components/Alerts/collapse-shared.mjs +90 -0
- package/dist/components/Alerts/collapse-shared.mjs.map +1 -0
- package/dist/components/Alerts/collapse-side-effects-only-imports.d.ts +6 -0
- package/dist/components/Alerts/collapse-side-effects-only-imports.mjs +131 -0
- package/dist/components/Alerts/collapse-side-effects-only-imports.mjs.map +1 -0
- package/dist/components/Alerts/collapse.mjs +2 -23
- package/dist/components/Alerts/collapse.mjs.map +1 -1
- package/dist/components/Alerts/collapse.module.mjs +1 -1
- package/dist/components/Alerts/list.module.mjs +1 -1
- package/dist/components/Alerts/overlay.mjs.map +1 -1
- package/dist/components/Alerts/overlay.module.mjs +1 -1
- package/dist/components/Card/diff.mjs.map +1 -1
- package/dist/components/Card/index.mjs +1 -1
- package/dist/components/Card/size.mjs +2 -2
- package/dist/components/Card/size.mjs.map +1 -1
- package/dist/components/Card/size.module.mjs +1 -1
- package/dist/components/Charts/TimelineCharts/index.mjs +1 -1
- package/dist/components/Charts/TimelineCharts/index.mjs.map +1 -1
- package/dist/components/Charts/TreeMap.mjs +1 -1
- package/dist/components/Charts/TreeMap.mjs.map +1 -1
- package/dist/components/Charts/constants.mjs +1 -1
- package/dist/components/Charts/loader.mjs +2 -2
- package/dist/components/Charts/loader.mjs.map +1 -1
- package/dist/components/Charts/treemap.module.mjs +1 -1
- package/dist/components/Configuration/builder.d.ts +1 -1
- package/dist/components/Configuration/builder.module.mjs +1 -1
- package/dist/components/FileTree/css.mjs +1 -1
- package/dist/components/FileTree/html.mjs +1 -1
- package/dist/components/FileTree/image.mjs +1 -1
- package/dist/components/FileTree/index.mjs +1 -1
- package/dist/components/FileTree/index.mjs.map +1 -1
- package/dist/components/FileTree/js.mjs +1 -1
- package/dist/components/FileTree/unkown-file.mjs +1 -1
- package/dist/components/Keyword/style.module.mjs +1 -1
- package/dist/components/Layout/bundle-size-icon.mjs +1 -1
- package/dist/components/Layout/compile-icon.mjs +1 -1
- package/dist/components/Layout/index.mjs.map +1 -1
- package/dist/components/Layout/overall-icon.mjs +1 -1
- package/dist/components/Layout/project-info-context.mjs.map +1 -1
- package/dist/components/Loader/Analysis/index.d.ts +1 -1
- package/dist/components/Loader/Analysis/input.mjs +1 -1
- package/dist/components/Loader/Analysis/output.mjs +1 -1
- package/dist/components/Loader/Analysis/style.module.mjs +1 -1
- package/dist/components/Loader/executions.mjs.map +1 -1
- package/dist/components/Loader/step.mjs +1 -1
- package/dist/components/Manifest/api.mjs.map +1 -1
- package/dist/components/Opener/code.mjs +1 -1
- package/dist/components/Opener/code.mjs.map +1 -1
- package/dist/components/Opener/{vscode.d.ts → ide.d.ts} +2 -0
- package/dist/components/Opener/ide.mjs +62 -0
- package/dist/components/Opener/ide.mjs.map +1 -0
- package/dist/components/Opener/index.d.ts +1 -1
- package/dist/components/Opener/index.mjs +1 -1
- package/dist/components/Overall/DataSummary.module.mjs +1 -1
- package/dist/components/Overall/bundle.mjs +1 -1
- package/dist/components/Overall/bundle.mjs.map +1 -1
- package/dist/components/Overall/bundle.module.mjs +1 -1
- package/dist/components/Overall/card.module.mjs +1 -1
- package/dist/components/Overall/compile.mjs.map +1 -1
- package/dist/components/Overall/compile.module.mjs +1 -1
- package/dist/components/Overall/help-center.module.mjs +1 -1
- package/dist/components/Overall/list.module.mjs +1 -1
- package/dist/components/Overall/overview.mjs +2 -1
- package/dist/components/Overall/overview.module.mjs +1 -1
- package/dist/components/Overall/project.module.mjs +1 -1
- package/dist/components/Resolver/analysis.mjs +2 -2
- package/dist/components/Resolver/analysis.mjs.map +1 -1
- package/dist/components/Select/index.mjs.map +1 -1
- package/dist/components/Status/failed.mjs.map +1 -1
- package/dist/components/TextDrawer/duplicate.mjs.map +1 -1
- package/dist/components/TextDrawer/index.mjs +1 -1
- package/dist/components/base/CodeViewer/index.d.ts +1 -1
- package/dist/components/base/CodeViewer/index.mjs +11 -4
- package/dist/components/base/CodeViewer/index.mjs.map +1 -1
- package/dist/components/base/CodeViewer/index.module.mjs +1 -1
- package/dist/components/base/CodeViewer/interface.d.ts +5 -0
- package/dist/components/base/DiffViewer/index.mjs +2 -2
- package/dist/components/base/DiffViewer/index.mjs.map +1 -1
- package/dist/components/base/DiffViewer/index.module.mjs +1 -1
- package/dist/components/index.mjs +1 -2
- package/dist/config.mjs.map +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/pages/BundleSize/components/asset.mjs +2 -2
- package/dist/pages/BundleSize/components/asset.mjs.map +1 -1
- package/dist/pages/BundleSize/components/card.module.mjs +1 -1
- package/dist/pages/BundleSize/components/cards.mjs +2 -2
- package/dist/pages/BundleSize/components/cards.mjs.map +1 -1
- package/dist/pages/BundleSize/components/index.mjs +1 -1
- package/dist/pages/BundleSize/components/index.mjs.map +1 -1
- package/dist/pages/BundleSize/components/index.module.mjs +1 -1
- package/dist/pages/BundleSize/components/search-modal.mjs +1 -1
- package/dist/pages/BundleSize/components/search-modal.mjs.map +1 -1
- package/dist/pages/BundleSize/config.mjs.map +1 -1
- package/dist/pages/BundleSize/constants.mjs +1 -1
- package/dist/pages/BundleSize/index.mjs +1 -1
- package/dist/pages/ModuleAnalyze/constants.mjs +1 -1
- package/dist/pages/ModuleAnalyze/dependency.mjs +1 -1
- package/dist/pages/ModuleAnalyze/fileTree.d.ts +2 -0
- package/dist/pages/ModuleAnalyze/fileTree.mjs +168 -33
- package/dist/pages/ModuleAnalyze/fileTree.mjs.map +1 -1
- package/dist/pages/ModuleAnalyze/index.mjs +87 -76
- package/dist/pages/ModuleAnalyze/index.mjs.map +1 -1
- package/dist/pages/ModuleResolve/index.mjs +1 -1
- package/dist/pages/Overall/index.mjs +1 -1
- package/dist/pages/Overall/index.module.mjs +1 -1
- package/dist/pages/Resources/BundleDiff/DiffContainer/assets.mjs.map +1 -1
- package/dist/pages/Resources/BundleDiff/DiffContainer/changes.mjs.map +1 -1
- package/dist/pages/Resources/BundleDiff/DiffContainer/modules.mjs.map +1 -1
- package/dist/pages/Resources/BundleDiff/DiffContainer/packages.mjs.map +1 -1
- package/dist/pages/Resources/BundleDiff/constants.mjs.map +1 -1
- package/dist/pages/Resources/BundleDiff/index.mjs +2 -2
- package/dist/pages/Resources/RuleIndex/index.mjs +1 -1
- package/dist/pages/TreeShaking/index.mjs +1 -1
- package/dist/pages/TreeShaking/open-tag.mjs +1 -1
- package/dist/pages/TreeShaking/table.mjs.map +1 -1
- package/dist/pages/Uploader/index.mjs +1 -1
- package/dist/pages/WebpackLoaders/Analysis/index.mjs +2 -2
- package/dist/pages/WebpackLoaders/Analysis/index.mjs.map +1 -1
- package/dist/pages/WebpackLoaders/Overall/index.mjs +1 -1
- package/dist/pages/WebpackPlugins/index.mjs +1 -1
- package/dist/pages/index.mjs +1 -1
- package/dist/utils/i18n/cn.mjs +1 -1
- package/dist/utils/i18n/en.mjs +1 -1
- package/dist/utils/i18n/index.mjs +1 -1
- package/dist/utils/loader.mjs +1 -1
- package/dist/utils/loader.mjs.map +1 -1
- package/dist/utils/time.mjs +1 -1
- package/dist/utils/time.mjs.map +1 -1
- package/package.json +10 -10
- package/dist/components/Opener/vscode.mjs +0 -33
- package/dist/components/Opener/vscode.mjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import rsdoctor_navbar_namespaceObject from "../../static/image/rsdoctor-navbar.png";
|
|
2
|
-
export
|
|
2
|
+
export default rsdoctor_navbar_namespaceObject;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
const SvgCursor = (props)=>/*#__PURE__*/ jsx("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: "1em",
|
|
6
|
+
height: "1em",
|
|
7
|
+
fill: "currentColor",
|
|
8
|
+
fillRule: "evenodd",
|
|
9
|
+
style: {
|
|
10
|
+
flex: "none",
|
|
11
|
+
lineHeight: 1
|
|
12
|
+
},
|
|
13
|
+
viewBox: "0 0 24 24",
|
|
14
|
+
...props,
|
|
15
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
16
|
+
d: "M22.106 5.68 12.5.135a1 1 0 0 0-.998 0L1.893 5.68a.84.84 0 0 0-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a1 1 0 0 0 .998 0l9.608-5.547a.84.84 0 0 0 .42-.727V6.407a.84.84 0 0 0-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 0 0-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514"
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
const cursor = SvgCursor;
|
|
20
|
+
export default cursor;
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=cursor.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common/svg/cursor.mjs","sources":["../../../src/common/svg/cursor.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgCursor = props => <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" fill=\"currentColor\" fillRule=\"evenodd\" style={{\n flex: \"none\",\n lineHeight: 1\n}} viewBox=\"0 0 24 24\" {...props}><path d=\"M22.106 5.68 12.5.135a1 1 0 0 0-.998 0L1.893 5.68a.84.84 0 0 0-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a1 1 0 0 0 .998 0l9.608-5.547a.84.84 0 0 0 .42-.727V6.407a.84.84 0 0 0-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 0 0-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514\" /></svg>;\nexport default SvgCursor;"],"names":["SvgCursor","props"],"mappings":";;AACA,MAAMA,YAAYC,CAAAA,QAAAA,WAAAA,GAAS,IAAC;QAAI,OAAM;QAA6B,OAAM;QAAM,QAAO;QAAM,MAAK;QAAe,UAAS;QAAU,OAAO;YACxI,MAAM;YACN,YAAY;QACd;QAAG,SAAQ;QAAa,GAAGA,KAAK;kBAAE,kBAAC;YAAK,GAAE;;;AAC1C,eAAeD"}
|
package/dist/common/svg/file.mjs
CHANGED
|
@@ -24,6 +24,6 @@ const SvgBundleSizeActive = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
|
24
24
|
]
|
|
25
25
|
});
|
|
26
26
|
const bundle_size_active = SvgBundleSizeActive;
|
|
27
|
-
export
|
|
27
|
+
export default bundle_size_active;
|
|
28
28
|
|
|
29
29
|
//# sourceMappingURL=bundle-size-active.mjs.map
|
|
@@ -24,6 +24,6 @@ const SvgBundleSizeInactive = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
|
24
24
|
]
|
|
25
25
|
});
|
|
26
26
|
const bundle_size_inactive = SvgBundleSizeInactive;
|
|
27
|
-
export
|
|
27
|
+
export default bundle_size_inactive;
|
|
28
28
|
|
|
29
29
|
//# sourceMappingURL=bundle-size-inactive.mjs.map
|
|
@@ -34,6 +34,6 @@ const SvgCompileAnalysisActive = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
|
34
34
|
]
|
|
35
35
|
});
|
|
36
36
|
const compile_analysis_active = SvgCompileAnalysisActive;
|
|
37
|
-
export
|
|
37
|
+
export default compile_analysis_active;
|
|
38
38
|
|
|
39
39
|
//# sourceMappingURL=compile-analysis-active.mjs.map
|
|
@@ -34,6 +34,6 @@ const SvgCompileAnalysisInactive = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
|
34
34
|
]
|
|
35
35
|
});
|
|
36
36
|
const compile_analysis_inactive = SvgCompileAnalysisInactive;
|
|
37
|
-
export
|
|
37
|
+
export default compile_analysis_inactive;
|
|
38
38
|
|
|
39
39
|
//# sourceMappingURL=compile-analysis-inactive.mjs.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
const SvgTrae = (props)=>/*#__PURE__*/ jsx("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: "1em",
|
|
6
|
+
height: "1em",
|
|
7
|
+
style: {
|
|
8
|
+
flex: "none",
|
|
9
|
+
lineHeight: 1
|
|
10
|
+
},
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
...props,
|
|
13
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
14
|
+
fill: "#32F08C",
|
|
15
|
+
d: "M24 20.541H3.428v-3.426H0V3.4h24v17.14zM3.428 17.115h17.144V6.827H3.428zm8.573-5.196-2.425 2.424-2.424-2.424 2.424-2.424zm6.857-.001-2.424 2.423-2.425-2.423 2.425-2.425z"
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
const trae = SvgTrae;
|
|
19
|
+
export default trae;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=trae.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common/svg/trae.mjs","sources":["../../../src/common/svg/trae.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgTrae = props => <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" style={{\n flex: \"none\",\n lineHeight: 1\n}} viewBox=\"0 0 24 24\" {...props}><path fill=\"#32F08C\" d=\"M24 20.541H3.428v-3.426H0V3.4h24v17.14zM3.428 17.115h17.144V6.827H3.428zm8.573-5.196-2.425 2.424-2.424-2.424 2.424-2.424zm6.857-.001-2.424 2.423-2.425-2.423 2.425-2.425z\" /></svg>;\nexport default SvgTrae;"],"names":["SvgTrae","props"],"mappings":";;AACA,MAAMA,UAAUC,CAAAA,QAAAA,WAAAA,GAAS,IAAC;QAAI,OAAM;QAA6B,OAAM;QAAM,QAAO;QAAM,OAAO;YAC/F,MAAM;YACN,YAAY;QACd;QAAG,SAAQ;QAAa,GAAGA,KAAK;kBAAE,kBAAC;YAAK,MAAK;YAAU,GAAE;;;AACzD,aAAeD"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
const SvgVscode = (props)=>/*#__PURE__*/ jsxs("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: 100,
|
|
6
|
+
height: 100,
|
|
7
|
+
fill: "none",
|
|
8
|
+
viewBox: "0 0 100 100",
|
|
9
|
+
...props,
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ jsx("mask", {
|
|
12
|
+
id: "vscode_svg__a",
|
|
13
|
+
width: 100,
|
|
14
|
+
height: 100,
|
|
15
|
+
x: 0,
|
|
16
|
+
y: 0,
|
|
17
|
+
"mask-type": "alpha",
|
|
18
|
+
maskUnits: "userSpaceOnUse",
|
|
19
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
20
|
+
fill: "#fff",
|
|
21
|
+
fillRule: "evenodd",
|
|
22
|
+
d: "M70.912 99.317a6.22 6.22 0 0 0 4.96-.19l20.589-9.907A6.25 6.25 0 0 0 100 83.587V16.413a6.25 6.25 0 0 0-3.54-5.632L75.874.874a6.23 6.23 0 0 0-7.104 1.21L29.355 38.04 12.187 25.01a4.16 4.16 0 0 0-5.318.236l-5.506 5.009a4.17 4.17 0 0 0-.004 6.162L16.247 50 1.36 63.583a4.17 4.17 0 0 0 .004 6.162l5.506 5.01a4.16 4.16 0 0 0 5.318.236l17.168-13.032L68.77 97.917a6.2 6.2 0 0 0 2.143 1.4M75.015 27.3 45.11 50l29.906 22.701z",
|
|
23
|
+
clipRule: "evenodd"
|
|
24
|
+
})
|
|
25
|
+
}),
|
|
26
|
+
/*#__PURE__*/ jsxs("g", {
|
|
27
|
+
mask: "url(#vscode_svg__a)",
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ jsx("path", {
|
|
30
|
+
fill: "#0065A9",
|
|
31
|
+
d: "M96.461 10.796 75.857.876a6.23 6.23 0 0 0-7.107 1.207l-67.451 61.5a4.167 4.167 0 0 0 .004 6.162l5.51 5.009a4.17 4.17 0 0 0 5.32.236l81.228-61.62c2.725-2.067 6.639-.124 6.639 3.297v-.24a6.25 6.25 0 0 0-3.539-5.63"
|
|
32
|
+
}),
|
|
33
|
+
/*#__PURE__*/ jsx("g", {
|
|
34
|
+
filter: "url(#vscode_svg__b)",
|
|
35
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
36
|
+
fill: "#007ACC",
|
|
37
|
+
d: "m96.461 89.204-20.604 9.92a6.23 6.23 0 0 1-7.107-1.207l-67.451-61.5a4.167 4.167 0 0 1 .004-6.162l5.51-5.009a4.17 4.17 0 0 1 5.32-.236l81.228 61.62c2.725 2.067 6.639.124 6.639-3.297v.24a6.25 6.25 0 0 1-3.539 5.63"
|
|
38
|
+
})
|
|
39
|
+
}),
|
|
40
|
+
/*#__PURE__*/ jsx("g", {
|
|
41
|
+
filter: "url(#vscode_svg__c)",
|
|
42
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
43
|
+
fill: "#1F9CF0",
|
|
44
|
+
d: "M75.858 99.126a6.23 6.23 0 0 1-7.108-1.21c2.306 2.307 6.25.674 6.25-2.588V4.672c0-3.262-3.944-4.895-6.25-2.589a6.23 6.23 0 0 1 7.108-1.21l20.6 9.908A6.25 6.25 0 0 1 100 16.413v67.174a6.25 6.25 0 0 1-3.541 5.633z"
|
|
45
|
+
})
|
|
46
|
+
}),
|
|
47
|
+
/*#__PURE__*/ jsx("path", {
|
|
48
|
+
fill: "url(#vscode_svg__d)",
|
|
49
|
+
fillRule: "evenodd",
|
|
50
|
+
d: "M70.851 99.317a6.22 6.22 0 0 0 4.96-.19L96.4 89.22a6.25 6.25 0 0 0 3.54-5.633V16.413a6.25 6.25 0 0 0-3.54-5.632L75.812.874a6.23 6.23 0 0 0-7.104 1.21L29.294 38.04 12.126 25.01a4.16 4.16 0 0 0-5.317.236l-5.507 5.009a4.17 4.17 0 0 0-.004 6.162L16.186 50 1.298 63.583a4.17 4.17 0 0 0 .004 6.162l5.507 5.009a4.16 4.16 0 0 0 5.317.236L29.294 61.96l39.414 35.958a6.2 6.2 0 0 0 2.143 1.4M74.954 27.3 45.048 50l29.906 22.701z",
|
|
51
|
+
clipRule: "evenodd",
|
|
52
|
+
opacity: 0.25,
|
|
53
|
+
style: {
|
|
54
|
+
mixBlendMode: "overlay"
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
}),
|
|
59
|
+
/*#__PURE__*/ jsxs("defs", {
|
|
60
|
+
children: [
|
|
61
|
+
/*#__PURE__*/ jsxs("filter", {
|
|
62
|
+
id: "vscode_svg__b",
|
|
63
|
+
width: 116.727,
|
|
64
|
+
height: 92.246,
|
|
65
|
+
x: -8.394,
|
|
66
|
+
y: 15.829,
|
|
67
|
+
colorInterpolationFilters: "sRGB",
|
|
68
|
+
filterUnits: "userSpaceOnUse",
|
|
69
|
+
children: [
|
|
70
|
+
/*#__PURE__*/ jsx("feFlood", {
|
|
71
|
+
floodOpacity: 0,
|
|
72
|
+
result: "BackgroundImageFix"
|
|
73
|
+
}),
|
|
74
|
+
/*#__PURE__*/ jsx("feColorMatrix", {
|
|
75
|
+
in: "SourceAlpha",
|
|
76
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ jsx("feOffset", {}),
|
|
79
|
+
/*#__PURE__*/ jsx("feGaussianBlur", {
|
|
80
|
+
stdDeviation: 4.167
|
|
81
|
+
}),
|
|
82
|
+
/*#__PURE__*/ jsx("feColorMatrix", {
|
|
83
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
|
84
|
+
}),
|
|
85
|
+
/*#__PURE__*/ jsx("feBlend", {
|
|
86
|
+
in2: "BackgroundImageFix",
|
|
87
|
+
mode: "overlay",
|
|
88
|
+
result: "effect1_dropShadow"
|
|
89
|
+
}),
|
|
90
|
+
/*#__PURE__*/ jsx("feBlend", {
|
|
91
|
+
in: "SourceGraphic",
|
|
92
|
+
in2: "effect1_dropShadow",
|
|
93
|
+
result: "shape"
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
}),
|
|
97
|
+
/*#__PURE__*/ jsxs("filter", {
|
|
98
|
+
id: "vscode_svg__c",
|
|
99
|
+
width: 47.917,
|
|
100
|
+
height: 116.151,
|
|
101
|
+
x: 60.417,
|
|
102
|
+
y: -8.076,
|
|
103
|
+
colorInterpolationFilters: "sRGB",
|
|
104
|
+
filterUnits: "userSpaceOnUse",
|
|
105
|
+
children: [
|
|
106
|
+
/*#__PURE__*/ jsx("feFlood", {
|
|
107
|
+
floodOpacity: 0,
|
|
108
|
+
result: "BackgroundImageFix"
|
|
109
|
+
}),
|
|
110
|
+
/*#__PURE__*/ jsx("feColorMatrix", {
|
|
111
|
+
in: "SourceAlpha",
|
|
112
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
|
113
|
+
}),
|
|
114
|
+
/*#__PURE__*/ jsx("feOffset", {}),
|
|
115
|
+
/*#__PURE__*/ jsx("feGaussianBlur", {
|
|
116
|
+
stdDeviation: 4.167
|
|
117
|
+
}),
|
|
118
|
+
/*#__PURE__*/ jsx("feColorMatrix", {
|
|
119
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
|
120
|
+
}),
|
|
121
|
+
/*#__PURE__*/ jsx("feBlend", {
|
|
122
|
+
in2: "BackgroundImageFix",
|
|
123
|
+
mode: "overlay",
|
|
124
|
+
result: "effect1_dropShadow"
|
|
125
|
+
}),
|
|
126
|
+
/*#__PURE__*/ jsx("feBlend", {
|
|
127
|
+
in: "SourceGraphic",
|
|
128
|
+
in2: "effect1_dropShadow",
|
|
129
|
+
result: "shape"
|
|
130
|
+
})
|
|
131
|
+
]
|
|
132
|
+
}),
|
|
133
|
+
/*#__PURE__*/ jsxs("linearGradient", {
|
|
134
|
+
id: "vscode_svg__d",
|
|
135
|
+
x1: 49.939,
|
|
136
|
+
x2: 49.939,
|
|
137
|
+
y1: 0.258,
|
|
138
|
+
y2: 99.742,
|
|
139
|
+
gradientUnits: "userSpaceOnUse",
|
|
140
|
+
children: [
|
|
141
|
+
/*#__PURE__*/ jsx("stop", {
|
|
142
|
+
stopColor: "#fff"
|
|
143
|
+
}),
|
|
144
|
+
/*#__PURE__*/ jsx("stop", {
|
|
145
|
+
offset: 1,
|
|
146
|
+
stopColor: "#fff",
|
|
147
|
+
stopOpacity: 0
|
|
148
|
+
})
|
|
149
|
+
]
|
|
150
|
+
})
|
|
151
|
+
]
|
|
152
|
+
})
|
|
153
|
+
]
|
|
154
|
+
});
|
|
155
|
+
const vscode = SvgVscode;
|
|
156
|
+
export default vscode;
|
|
157
|
+
|
|
158
|
+
//# sourceMappingURL=vscode.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common/svg/vscode.mjs","sources":["../../../src/common/svg/vscode.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgVscode = props => <svg xmlns=\"http://www.w3.org/2000/svg\" width={100} height={100} fill=\"none\" viewBox=\"0 0 100 100\" {...props}><mask id=\"vscode_svg__a\" width={100} height={100} x={0} y={0} mask-type=\"alpha\" maskUnits=\"userSpaceOnUse\"><path fill=\"#fff\" fillRule=\"evenodd\" d=\"M70.912 99.317a6.22 6.22 0 0 0 4.96-.19l20.589-9.907A6.25 6.25 0 0 0 100 83.587V16.413a6.25 6.25 0 0 0-3.54-5.632L75.874.874a6.23 6.23 0 0 0-7.104 1.21L29.355 38.04 12.187 25.01a4.16 4.16 0 0 0-5.318.236l-5.506 5.009a4.17 4.17 0 0 0-.004 6.162L16.247 50 1.36 63.583a4.17 4.17 0 0 0 .004 6.162l5.506 5.01a4.16 4.16 0 0 0 5.318.236l17.168-13.032L68.77 97.917a6.2 6.2 0 0 0 2.143 1.4M75.015 27.3 45.11 50l29.906 22.701z\" clipRule=\"evenodd\" /></mask><g mask=\"url(#vscode_svg__a)\"><path fill=\"#0065A9\" d=\"M96.461 10.796 75.857.876a6.23 6.23 0 0 0-7.107 1.207l-67.451 61.5a4.167 4.167 0 0 0 .004 6.162l5.51 5.009a4.17 4.17 0 0 0 5.32.236l81.228-61.62c2.725-2.067 6.639-.124 6.639 3.297v-.24a6.25 6.25 0 0 0-3.539-5.63\" /><g filter=\"url(#vscode_svg__b)\"><path fill=\"#007ACC\" d=\"m96.461 89.204-20.604 9.92a6.23 6.23 0 0 1-7.107-1.207l-67.451-61.5a4.167 4.167 0 0 1 .004-6.162l5.51-5.009a4.17 4.17 0 0 1 5.32-.236l81.228 61.62c2.725 2.067 6.639.124 6.639-3.297v.24a6.25 6.25 0 0 1-3.539 5.63\" /></g><g filter=\"url(#vscode_svg__c)\"><path fill=\"#1F9CF0\" d=\"M75.858 99.126a6.23 6.23 0 0 1-7.108-1.21c2.306 2.307 6.25.674 6.25-2.588V4.672c0-3.262-3.944-4.895-6.25-2.589a6.23 6.23 0 0 1 7.108-1.21l20.6 9.908A6.25 6.25 0 0 1 100 16.413v67.174a6.25 6.25 0 0 1-3.541 5.633z\" /></g><path fill=\"url(#vscode_svg__d)\" fillRule=\"evenodd\" d=\"M70.851 99.317a6.22 6.22 0 0 0 4.96-.19L96.4 89.22a6.25 6.25 0 0 0 3.54-5.633V16.413a6.25 6.25 0 0 0-3.54-5.632L75.812.874a6.23 6.23 0 0 0-7.104 1.21L29.294 38.04 12.126 25.01a4.16 4.16 0 0 0-5.317.236l-5.507 5.009a4.17 4.17 0 0 0-.004 6.162L16.186 50 1.298 63.583a4.17 4.17 0 0 0 .004 6.162l5.507 5.009a4.16 4.16 0 0 0 5.317.236L29.294 61.96l39.414 35.958a6.2 6.2 0 0 0 2.143 1.4M74.954 27.3 45.048 50l29.906 22.701z\" clipRule=\"evenodd\" opacity={0.25} style={{\n mixBlendMode: \"overlay\"\n }} /></g><defs><filter id=\"vscode_svg__b\" width={116.727} height={92.246} x={-8.394} y={15.829} colorInterpolationFilters=\"sRGB\" filterUnits=\"userSpaceOnUse\"><feFlood floodOpacity={0} result=\"BackgroundImageFix\" /><feColorMatrix in=\"SourceAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" /><feOffset /><feGaussianBlur stdDeviation={4.167} /><feColorMatrix values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\" /><feBlend in2=\"BackgroundImageFix\" mode=\"overlay\" result=\"effect1_dropShadow\" /><feBlend in=\"SourceGraphic\" in2=\"effect1_dropShadow\" result=\"shape\" /></filter><filter id=\"vscode_svg__c\" width={47.917} height={116.151} x={60.417} y={-8.076} colorInterpolationFilters=\"sRGB\" filterUnits=\"userSpaceOnUse\"><feFlood floodOpacity={0} result=\"BackgroundImageFix\" /><feColorMatrix in=\"SourceAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" /><feOffset /><feGaussianBlur stdDeviation={4.167} /><feColorMatrix values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\" /><feBlend in2=\"BackgroundImageFix\" mode=\"overlay\" result=\"effect1_dropShadow\" /><feBlend in=\"SourceGraphic\" in2=\"effect1_dropShadow\" result=\"shape\" /></filter><linearGradient id=\"vscode_svg__d\" x1={49.939} x2={49.939} y1={0.258} y2={99.742} gradientUnits=\"userSpaceOnUse\"><stop stopColor=\"#fff\" /><stop offset={1} stopColor=\"#fff\" stopOpacity={0} /></linearGradient></defs></svg>;\nexport default SvgVscode;"],"names":["SvgVscode","props"],"mappings":";;AACA,MAAMA,YAAYC,CAAAA,QAAAA,WAAAA,GAAS,KAAC;QAAI,OAAM;QAA6B,OAAO;QAAK,QAAQ;QAAK,MAAK;QAAO,SAAQ;QAAe,GAAGA,KAAK;;0BAAE,IAAC;gBAAK,IAAG;gBAAgB,OAAO;gBAAK,QAAQ;gBAAK,GAAG;gBAAG,GAAG;gBAAG,aAAU;gBAAQ,WAAU;0BAAiB,kBAAC;oBAAK,MAAK;oBAAO,UAAS;oBAAU,GAAE;oBAAma,UAAS;;;0BAAmB,KAAC;gBAAE,MAAK;;kCAAsB,IAAC;wBAAK,MAAK;wBAAU,GAAE;;kCAAwN,IAAC;wBAAE,QAAO;kCAAsB,kBAAC;4BAAK,MAAK;4BAAU,GAAE;;;kCAA4N,IAAC;wBAAE,QAAO;kCAAsB,kBAAC;4BAAK,MAAK;4BAAU,GAAE;;;kCAA4N,IAAC;wBAAK,MAAK;wBAAsB,UAAS;wBAAU,GAAE;wBAAoa,UAAS;wBAAU,SAAS;wBAAM,OAAO;4BAC1gE,cAAc;wBAChB;;;;0BAAS,KAAC;;kCAAK,KAAC;wBAAO,IAAG;wBAAgB,OAAO;wBAAS,QAAQ;wBAAQ,GAAG;wBAAQ,GAAG;wBAAQ,2BAA0B;wBAAO,aAAY;;0CAAiB,IAAC;gCAAQ,cAAc;gCAAG,QAAO;;0CAAuB,IAAC;gCAAc,IAAG;gCAAc,QAAO;;0CAA8C,IAAC;0CAAW,IAAC;gCAAe,cAAc;;0CAAS,IAAC;gCAAc,QAAO;;0CAA+C,IAAC;gCAAQ,KAAI;gCAAqB,MAAK;gCAAU,QAAO;;0CAAuB,IAAC;gCAAQ,IAAG;gCAAgB,KAAI;gCAAqB,QAAO;;;;kCAAmB,KAAC;wBAAO,IAAG;wBAAgB,OAAO;wBAAQ,QAAQ;wBAAS,GAAG;wBAAQ,GAAG;wBAAQ,2BAA0B;wBAAO,aAAY;;0CAAiB,IAAC;gCAAQ,cAAc;gCAAG,QAAO;;0CAAuB,IAAC;gCAAc,IAAG;gCAAc,QAAO;;0CAA8C,IAAC;0CAAW,IAAC;gCAAe,cAAc;;0CAAS,IAAC;gCAAc,QAAO;;0CAA+C,IAAC;gCAAQ,KAAI;gCAAqB,MAAK;gCAAU,QAAO;;0CAAuB,IAAC;gCAAQ,IAAG;gCAAgB,KAAI;gCAAqB,QAAO;;;;kCAAmB,KAAC;wBAAe,IAAG;wBAAgB,IAAI;wBAAQ,IAAI;wBAAQ,IAAI;wBAAO,IAAI;wBAAQ,eAAc;;0CAAiB,IAAC;gCAAK,WAAU;;0CAAS,IAAC;gCAAK,QAAQ;gCAAG,WAAU;gCAAO,aAAa;;;;;;;;AAChzC,eAAeD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/Alert/change.mjs","sources":["../../../src/components/Alert/change.tsx"],"sourcesContent":["import { CheckOutlined, InfoCircleOutlined } from '@ant-design/icons';\nimport { SDK } from '@rsdoctor/types';\nimport {\n Alert,\n Button,\n Col,\n Divider,\n Popconfirm,\n Row,\n Space,\n Typography,\n} from 'antd';\nimport axios from 'axios';\nimport React, { useState } from 'react';\nimport { useRuleIndexNavigate } from '../../utils';\nimport { DiffViewer } from '../base';\nimport { CodeOpener } from '../Opener';\nimport { TextDrawer } from '../TextDrawer';\nimport { Title } from '../Title';\nimport { CodeChangeAlertProps } from './types';\n\ninterface FixedProps {\n setIsFixed(val: boolean): void;\n}\n\nconst CodeChangeDrawerContent: React.FC<CodeChangeAlertProps & FixedProps> = ({\n data,\n setIsFixed,\n cwd,\n}) => {\n const { file, id } = data;\n const { path, line, isFixed, actual, expected } = file;\n // const [isFixed, setIsFixed] = useState(file.isFixed ?? false);\n const applyFix = () => {\n axios.post(SDK.ServerAPI.API.ApplyErrorFix, { id }).then(() => {\n setIsFixed(true);\n });\n };\n\n const FixButton = () => {\n return (\n <Popconfirm\n title={`Did you confirm to apply the change i the area below ?`}\n onConfirm={applyFix}\n okText=\"Yes\"\n cancelText=\"Cancel\"\n zIndex={99999}\n disabled={isFixed}\n placement=\"bottom\"\n >\n <Button\n type=\"primary\"\n size=\"small\"\n icon={isFixed ? <CheckOutlined /> : undefined}\n disabled={isFixed}\n >\n {isFixed ? 'Fix Applied' : 'Apply Fix'}\n </Button>\n </Popconfirm>\n );\n };\n\n return (\n <Space direction=\"vertical\" className=\"alert-space\">\n <div>\n <Title text={isFixed ? 'Fix History' : 'Suggest Fix'} />\n <span className=\"code-change-tag-list\">\n <FixButton />\n </span>\n </div>\n <CodeOpener cwd={cwd} url={path} loc={String(line)} code disabled />\n <Row>\n <Col span={12}>\n <Typography.Text strong>Before</Typography.Text>\n </Col>\n <Col span={12}>\n <Typography.Text strong>After</Typography.Text>\n </Col>\n </Row>\n <DiffViewer\n className=\"full-space\"\n originalFilePath={path}\n modifiedFilePath={path}\n original={actual}\n modified={expected}\n />\n </Space>\n );\n};\n\n///REVIEW - It's still useful? can't find usage\nexport const CodeChangeAlert: React.FC<CodeChangeAlertProps> = ({\n data,\n cwd,\n}) => {\n const { title, description = '', level, code, file } = data;\n const [isFixed, setIsFixed] = useState(file.isFixed ?? false);\n const navigate = useRuleIndexNavigate(code, data.link);\n const fixFile = (val: boolean) => {\n setIsFixed(val);\n file.isFixed = val;\n };\n const Description = (\n <Space direction=\"vertical\">\n <Typography.Text>{description}</Typography.Text>\n <Space>\n <Typography.Text>File:</Typography.Text>\n <Typography.Text strong code>\n {file.path}\n </Typography.Text>\n <Typography.Text>in line</Typography.Text>\n <Typography.Text strong code>\n {file.line}\n </Typography.Text>\n </Space>\n </Space>\n );\n\n return (\n <Alert\n showIcon\n message={\n <Space>\n <Typography.Text\n code\n strong\n onClick={navigate}\n style={{ cursor: 'pointer' }}\n >\n <a>{code}</a>\n </Typography.Text>\n <Typography.Text strong>{title}</Typography.Text>\n </Space>\n }\n description={Description}\n type={isFixed ? 'success' : level === 'warn' ? 'info' : level}\n action={\n <Space>\n <TextDrawer\n text={isFixed ? 'Fixed | Show Fix History' : 'Show Fix Suggestion'}\n buttonProps={{ size: 'small' }}\n >\n <CodeChangeDrawerContent\n data={data}\n setIsFixed={fixFile}\n cwd={cwd}\n />\n </TextDrawer>\n <Divider type=\"vertical\" />\n <Button type=\"link\" onClick={navigate} size=\"small\">\n <InfoCircleOutlined />\n </Button>\n </Space>\n }\n />\n );\n};\n"],"names":["CodeChangeDrawerContent","data","setIsFixed","cwd","file","id","path","line","isFixed","actual","expected","applyFix","axios","SDK","FixButton","Popconfirm","Button","CheckOutlined","undefined","Space","Title","CodeOpener","String","Row","Col","Typography","DiffViewer","CodeChangeAlert","title","description","level","code","useState","navigate","useRuleIndexNavigate","fixFile","val","Description","Alert","TextDrawer","Divider","InfoCircleOutlined"],"mappings":"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
|
|
1
|
+
{"version":3,"file":"components/Alert/change.mjs","sources":["../../../src/components/Alert/change.tsx"],"sourcesContent":["import { CheckOutlined, InfoCircleOutlined } from '@ant-design/icons';\nimport { SDK } from '@rsdoctor/types';\nimport {\n Alert,\n Button,\n Col,\n Divider,\n Popconfirm,\n Row,\n Space,\n Typography,\n} from 'antd';\nimport axios from 'axios';\nimport React, { useState } from 'react';\nimport { useRuleIndexNavigate } from '../../utils';\nimport { DiffViewer } from '../base';\nimport { CodeOpener } from '../Opener';\nimport { TextDrawer } from '../TextDrawer';\nimport { Title } from '../Title';\nimport { CodeChangeAlertProps } from './types';\n\ninterface FixedProps {\n setIsFixed(val: boolean): void;\n}\n\nconst CodeChangeDrawerContent: React.FC<CodeChangeAlertProps & FixedProps> = ({\n data,\n setIsFixed,\n cwd,\n}) => {\n const { file, id } = data;\n const { path, line, isFixed, actual, expected } = file;\n // const [isFixed, setIsFixed] = useState(file.isFixed ?? false);\n const applyFix = () => {\n axios.post(SDK.ServerAPI.API.ApplyErrorFix, { id }).then(() => {\n setIsFixed(true);\n });\n };\n\n const FixButton = () => {\n return (\n <Popconfirm\n title={`Did you confirm to apply the change i the area below ?`}\n onConfirm={applyFix}\n okText=\"Yes\"\n cancelText=\"Cancel\"\n zIndex={99999}\n disabled={isFixed}\n placement=\"bottom\"\n >\n <Button\n type=\"primary\"\n size=\"small\"\n icon={isFixed ? <CheckOutlined /> : undefined}\n disabled={isFixed}\n >\n {isFixed ? 'Fix Applied' : 'Apply Fix'}\n </Button>\n </Popconfirm>\n );\n };\n\n return (\n <Space direction=\"vertical\" className=\"alert-space\">\n <div>\n <Title text={isFixed ? 'Fix History' : 'Suggest Fix'} />\n <span className=\"code-change-tag-list\">\n <FixButton />\n </span>\n </div>\n <CodeOpener cwd={cwd} url={path} loc={String(line)} code disabled />\n <Row>\n <Col span={12}>\n <Typography.Text strong>Before</Typography.Text>\n </Col>\n <Col span={12}>\n <Typography.Text strong>After</Typography.Text>\n </Col>\n </Row>\n <DiffViewer\n className=\"full-space\"\n originalFilePath={path}\n modifiedFilePath={path}\n original={actual}\n modified={expected}\n />\n </Space>\n );\n};\n\n///REVIEW - It's still useful? can't find usage\nexport const CodeChangeAlert: React.FC<CodeChangeAlertProps> = ({\n data,\n cwd,\n}) => {\n const { title, description = '', level, code, file } = data;\n const [isFixed, setIsFixed] = useState(file.isFixed ?? false);\n const navigate = useRuleIndexNavigate(code, data.link);\n const fixFile = (val: boolean) => {\n setIsFixed(val);\n file.isFixed = val;\n };\n const Description = (\n <Space direction=\"vertical\">\n <Typography.Text>{description}</Typography.Text>\n <Space>\n <Typography.Text>File:</Typography.Text>\n <Typography.Text strong code>\n {file.path}\n </Typography.Text>\n <Typography.Text>in line</Typography.Text>\n <Typography.Text strong code>\n {file.line}\n </Typography.Text>\n </Space>\n </Space>\n );\n\n return (\n <Alert\n showIcon\n message={\n <Space>\n <Typography.Text\n code\n strong\n onClick={navigate}\n style={{ cursor: 'pointer' }}\n >\n <a>{code}</a>\n </Typography.Text>\n <Typography.Text strong>{title}</Typography.Text>\n </Space>\n }\n description={Description}\n type={isFixed ? 'success' : level === 'warn' ? 'info' : level}\n action={\n <Space>\n <TextDrawer\n text={isFixed ? 'Fixed | Show Fix History' : 'Show Fix Suggestion'}\n buttonProps={{ size: 'small' }}\n >\n <CodeChangeDrawerContent\n data={data}\n setIsFixed={fixFile}\n cwd={cwd}\n />\n </TextDrawer>\n <Divider type=\"vertical\" />\n <Button type=\"link\" onClick={navigate} size=\"small\">\n <InfoCircleOutlined />\n </Button>\n </Space>\n }\n />\n );\n};\n"],"names":["CodeChangeDrawerContent","data","setIsFixed","cwd","file","id","path","line","isFixed","actual","expected","applyFix","axios","SDK","FixButton","Popconfirm","Button","CheckOutlined","undefined","Space","Title","CodeOpener","String","Row","Col","Typography","DiffViewer","CodeChangeAlert","title","description","level","code","useState","navigate","useRuleIndexNavigate","fixFile","val","Description","Alert","TextDrawer","Divider","InfoCircleOutlined"],"mappings":"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"}
|
|
@@ -6,7 +6,7 @@ import svg_output from "../../common/svg/output.mjs";
|
|
|
6
6
|
import svg_error from "../../common/svg/error.mjs";
|
|
7
7
|
import { useRuleIndexNavigate } from "../../utils/index.mjs";
|
|
8
8
|
import ecma_version_check_module from "./ecma-version-check.module.mjs";
|
|
9
|
-
const { Text } = Typography;
|
|
9
|
+
const { Text: Text } = Typography;
|
|
10
10
|
const ECMAVersionCheck = ({ data })=>data.map((d)=>{
|
|
11
11
|
const { code, link, error } = d;
|
|
12
12
|
const { source, output } = error || {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/Alert/ecma-version-check.mjs","sources":["../../../src/components/Alert/ecma-version-check.tsx"],"sourcesContent":["import { Button, Typography } from 'antd';\nimport Icon from '@ant-design/icons';\n\nimport SourceSvg from '../../common/svg/source.svg';\nimport OutputSvg from '../../common/svg/output.svg';\nimport ErrorSvg from '../../common/svg/error.svg';\nimport { useRuleIndexNavigate } from '../../utils';\n\nimport { LinkAlertProps } from './types';\n\nimport styles from './ecma-version-check.module.scss';\n\nconst { Text } = Typography;\n\nexport const ECMAVersionCheck: React.FC<LinkAlertProps> = ({ data }) => {\n return data.map((d) => {\n const { code, link, error } = d;\n const { source, output } = error || {};\n const sourceMessage = source?.path\n ? `${source?.path}:${source?.line}:${source?.column}`\n : null;\n const outputMessage = output?.path\n ? `${output?.path}:${output?.line}:${output?.column}`\n : `There's no source map for this error. Possible reasons are as follows:\n 1. It might come from a third-party library without source map.\n 2. If this is your business source code, source map should be enabled in your build config.\n `;\n\n const navigate = useRuleIndexNavigate(code, link);\n return (\n <div className={styles.container}>\n <div>\n <div className={styles.title}>Source</div>\n <div className={styles.box}>\n <Icon component={SourceSvg} />\n <Text\n ellipsis={{ tooltip: sourceMessage }}\n className={`${styles.content} e2e-ecma-source`}\n >\n {sourceMessage}\n </Text>\n </div>\n </div>\n <div>\n <div className={styles.title}>Output</div>\n <div className={styles.box}>\n <Icon component={OutputSvg} />\n <Text\n ellipsis={{ tooltip: outputMessage }}\n className={`${styles.content} e2e-ecma-output`}\n >\n {outputMessage}\n </Text>\n </div>\n </div>\n <div>\n <div className={styles.title}>Error</div>\n <div className={styles.box}>\n <Icon component={ErrorSvg} />\n <Text\n ellipsis={{ tooltip: d.description }}\n className={`${styles.content} e2e-ecma-error`}\n >\n {d.description}\n </Text>\n </div>\n </div>\n <Button onClick={navigate} type=\"link\">\n more\n </Button>\n </div>\n );\n });\n};\n"],"names":["Text","Typography","ECMAVersionCheck","data","d","code","link","error","source","output","sourceMessage","outputMessage","navigate","useRuleIndexNavigate","styles","Icon","SourceSvg","OutputSvg","ErrorSvg","Button"],"mappings":";;;;;;;;AAYA,MAAM,EAAEA,IAAI,EAAE,GAAGC;AAEV,MAAMC,mBAA6C,CAAC,EAAEC,IAAI,EAAE,GAC1DA,KAAK,GAAG,CAAC,CAACC;QACf,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGH;QAC9B,MAAM,EAAEI,MAAM,EAAEC,MAAM,EAAE,GAAGF,SAAS,CAAC;QACrC,MAAMG,gBAAgBF,QAAQ,OAC1B,GAAGA,QAAQ,KAAK,CAAC,EAAEA,QAAQ,KAAK,CAAC,EAAEA,QAAQ,QAAQ,GACnD;QACJ,MAAMG,gBAAgBF,QAAQ,OAC1B,GAAGA,QAAQ,KAAK,CAAC,EAAEA,QAAQ,KAAK,CAAC,EAAEA,QAAQ,QAAQ,GACnD,CAAC;;;MAGH,CAAC;QAEH,MAAMG,WAAWC,qBAAqBR,MAAMC;QAC5C,OAAO,WAAP,GACE,KAAC;YAAI,WAAWQ,0BAAAA,SAAgB;;8BAC9B,KAAC;;sCACC,IAAC;4BAAI,WAAWA,0BAAAA,KAAY;sCAAE;;sCAC9B,KAAC;4BAAI,WAAWA,0BAAAA,GAAU;;8CACxB,IAACC,OAAIA;oCAAC,WAAWC;;8CACjB,IAAChB,
|
|
1
|
+
{"version":3,"file":"components/Alert/ecma-version-check.mjs","sources":["../../../src/components/Alert/ecma-version-check.tsx"],"sourcesContent":["import { Button, Typography } from 'antd';\nimport Icon from '@ant-design/icons';\n\nimport SourceSvg from '../../common/svg/source.svg';\nimport OutputSvg from '../../common/svg/output.svg';\nimport ErrorSvg from '../../common/svg/error.svg';\nimport { useRuleIndexNavigate } from '../../utils';\n\nimport { LinkAlertProps } from './types';\n\nimport styles from './ecma-version-check.module.scss';\n\nconst { Text } = Typography;\n\nexport const ECMAVersionCheck: React.FC<LinkAlertProps> = ({ data }) => {\n return data.map((d) => {\n const { code, link, error } = d;\n const { source, output } = error || {};\n const sourceMessage = source?.path\n ? `${source?.path}:${source?.line}:${source?.column}`\n : null;\n const outputMessage = output?.path\n ? `${output?.path}:${output?.line}:${output?.column}`\n : `There's no source map for this error. Possible reasons are as follows:\n 1. It might come from a third-party library without source map.\n 2. If this is your business source code, source map should be enabled in your build config.\n `;\n\n const navigate = useRuleIndexNavigate(code, link);\n return (\n <div className={styles.container}>\n <div>\n <div className={styles.title}>Source</div>\n <div className={styles.box}>\n <Icon component={SourceSvg} />\n <Text\n ellipsis={{ tooltip: sourceMessage }}\n className={`${styles.content} e2e-ecma-source`}\n >\n {sourceMessage}\n </Text>\n </div>\n </div>\n <div>\n <div className={styles.title}>Output</div>\n <div className={styles.box}>\n <Icon component={OutputSvg} />\n <Text\n ellipsis={{ tooltip: outputMessage }}\n className={`${styles.content} e2e-ecma-output`}\n >\n {outputMessage}\n </Text>\n </div>\n </div>\n <div>\n <div className={styles.title}>Error</div>\n <div className={styles.box}>\n <Icon component={ErrorSvg} />\n <Text\n ellipsis={{ tooltip: d.description }}\n className={`${styles.content} e2e-ecma-error`}\n >\n {d.description}\n </Text>\n </div>\n </div>\n <Button onClick={navigate} type=\"link\">\n more\n </Button>\n </div>\n );\n });\n};\n"],"names":["Text","Typography","ECMAVersionCheck","data","d","code","link","error","source","output","sourceMessage","outputMessage","navigate","useRuleIndexNavigate","styles","Icon","SourceSvg","OutputSvg","ErrorSvg","Button"],"mappings":";;;;;;;;AAYA,MAAM,EAAEA,MAAAA,IAAI,EAAE,GAAGC;AAEV,MAAMC,mBAA6C,CAAC,EAAEC,IAAI,EAAE,GAC1DA,KAAK,GAAG,CAAC,CAACC;QACf,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGH;QAC9B,MAAM,EAAEI,MAAM,EAAEC,MAAM,EAAE,GAAGF,SAAS,CAAC;QACrC,MAAMG,gBAAgBF,QAAQ,OAC1B,GAAGA,QAAQ,KAAK,CAAC,EAAEA,QAAQ,KAAK,CAAC,EAAEA,QAAQ,QAAQ,GACnD;QACJ,MAAMG,gBAAgBF,QAAQ,OAC1B,GAAGA,QAAQ,KAAK,CAAC,EAAEA,QAAQ,KAAK,CAAC,EAAEA,QAAQ,QAAQ,GACnD,CAAC;;;MAGH,CAAC;QAEH,MAAMG,WAAWC,qBAAqBR,MAAMC;QAC5C,OAAO,WAAP,GACE,KAAC;YAAI,WAAWQ,0BAAAA,SAAgB;;8BAC9B,KAAC;;sCACC,IAAC;4BAAI,WAAWA,0BAAAA,KAAY;sCAAE;;sCAC9B,KAAC;4BAAI,WAAWA,0BAAAA,GAAU;;8CACxB,IAACC,OAAIA;oCAAC,WAAWC;;8CACjB,IAAChB,MAAIA;oCACH,UAAU;wCAAE,SAASU;oCAAc;oCACnC,WAAW,GAAGI,0BAAAA,OAAc,CAAC,gBAAgB,CAAC;8CAE7CJ;;;;;;8BAIP,KAAC;;sCACC,IAAC;4BAAI,WAAWI,0BAAAA,KAAY;sCAAE;;sCAC9B,KAAC;4BAAI,WAAWA,0BAAAA,GAAU;;8CACxB,IAACC,OAAIA;oCAAC,WAAWE;;8CACjB,IAACjB,MAAIA;oCACH,UAAU;wCAAE,SAASW;oCAAc;oCACnC,WAAW,GAAGG,0BAAAA,OAAc,CAAC,gBAAgB,CAAC;8CAE7CH;;;;;;8BAIP,KAAC;;sCACC,IAAC;4BAAI,WAAWG,0BAAAA,KAAY;sCAAE;;sCAC9B,KAAC;4BAAI,WAAWA,0BAAAA,GAAU;;8CACxB,IAACC,OAAIA;oCAAC,WAAWG;;8CACjB,IAAClB,MAAIA;oCACH,UAAU;wCAAE,SAASI,EAAE,WAAW;oCAAC;oCACnC,WAAW,GAAGU,0BAAAA,OAAc,CAAC,eAAe,CAAC;8CAE5CV,EAAE,WAAW;;;;;;8BAIpB,IAACe,QAAMA;oBAAC,SAASP;oBAAU,MAAK;8BAAO;;;;IAK7C"}
|