@rsdoctor/components 1.0.0-alpha.0 → 1.0.0-alpha.2

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Rsdoctor Components
1
+ # Rsdoctor components
2
2
 
3
3
  This package is the Rsdoctor reporting platform’s components.
4
4
 
@@ -26,7 +26,7 @@ const ECMAVersionCheck = ({ data }) => {
26
26
  Text,
27
27
  {
28
28
  ellipsis: { tooltip: sourceMessage },
29
- className: styles.content,
29
+ className: `${styles.content} e2e-ecma-source`,
30
30
  children: sourceMessage
31
31
  }
32
32
  )
@@ -40,7 +40,7 @@ const ECMAVersionCheck = ({ data }) => {
40
40
  Text,
41
41
  {
42
42
  ellipsis: { tooltip: outputMessage },
43
- className: styles.content,
43
+ className: `${styles.content} e2e-ecma-output`,
44
44
  children: outputMessage
45
45
  }
46
46
  )
@@ -54,7 +54,7 @@ const ECMAVersionCheck = ({ data }) => {
54
54
  Text,
55
55
  {
56
56
  ellipsis: { tooltip: d.description },
57
- className: styles.content,
57
+ className: `${styles.content} e2e-ecma-error`,
58
58
  children: d.description
59
59
  }
60
60
  )
@@ -10,3 +10,10 @@
10
10
  .header-icon:active {
11
11
  color: #40a9ff;
12
12
  }
13
+ .rsdoctor-logo {
14
+ cursor: pointer;
15
+ height: 30px;
16
+ }
17
+ .rsdoctor-logo:active {
18
+ opacity: 0.8;
19
+ }
@@ -7,8 +7,11 @@ import { OverlayAlertsWithButton } from "../Alerts";
7
7
  import { BuilderSelect } from "./builder-select";
8
8
  import { Menus } from "./menus";
9
9
  import "./header.css";
10
+ import { Client } from "@rsdoctor/types";
11
+ import { useNavigate } from "react-router-dom";
10
12
  const Header = () => {
11
13
  const { i18n } = useI18n();
14
+ const navigate = useNavigate();
12
15
  const { isLight } = useTheme();
13
16
  const iconStyle = {
14
17
  display: "inline-block",
@@ -65,10 +68,12 @@ const Header = () => {
65
68
  /* @__PURE__ */ jsx(
66
69
  "img",
67
70
  {
68
- style: { height: 30 },
69
71
  src: "https://assets.rspack.dev/rsdoctor/rsdoctor-title-logo.png",
70
72
  className: "rsdoctor-logo",
71
- alt: "logo"
73
+ alt: "logo",
74
+ onClick: () => {
75
+ navigate(Client.RsdoctorClientRoutes.Home);
76
+ }
72
77
  }
73
78
  ),
74
79
  /* @__PURE__ */ jsx(BuilderSelect, {})
@@ -22,6 +22,11 @@
22
22
  margin-right: 5px;
23
23
  color: #000000;
24
24
  }
25
+ @media (max-width: 1500px) {
26
+ .description_74282 {
27
+ font-size: 16px;
28
+ }
29
+ }
25
30
 
26
31
  .unit_74282 {
27
32
  font-size: 12px;
@@ -272,15 +272,15 @@ const Modules = ({
272
272
  file: r.path,
273
273
  data: [
274
274
  {
275
- baseline: current.moduleCodeMap[r.current?.id]?.source,
276
- current: current.moduleCodeMap[r.current?.id]?.transformed,
275
+ baseline: current.moduleCodeMap[r.current.id]?.source,
276
+ current: current.moduleCodeMap[r.current.id]?.transformed,
277
277
  baselineTitle: "Current Source",
278
278
  currentTitle: "Current Transformed Source",
279
279
  group: "Transformed Source"
280
280
  },
281
281
  {
282
- baseline: current.moduleCodeMap[r.current?.id]?.source,
283
- current: current.moduleCodeMap[r.current?.id]?.parsedSource,
282
+ baseline: current.moduleCodeMap[r.current.id]?.source,
283
+ current: current.moduleCodeMap[r.current.id]?.parsedSource,
284
284
  baselineTitle: "Current Source",
285
285
  currentTitle: "Current Parsed Source",
286
286
  group: "Parsed Source"
@@ -1,10 +1,9 @@
1
- import type { Module, ModuleGraph, SourceRange } from '@rsdoctor/graph';
2
1
  import { SDK } from '@rsdoctor/types';
3
2
  import { SetEditorStatus } from './types';
4
3
  export interface CodeEditorProps {
5
- module: Module;
6
- moduleGraph: ModuleGraph;
7
- ranges: SourceRange[];
4
+ module: SDK.ModuleInstance;
5
+ moduleGraph: SDK.ModuleGraphInstance;
6
+ ranges: SDK.SourceRange[];
8
7
  setEditorData: SetEditorStatus;
9
8
  source: SDK.ModuleSource;
10
9
  toLine?: number;
@@ -1,9 +1,9 @@
1
- import type { Module, ModuleGraph } from '@rsdoctor/graph';
1
+ import { SDK } from '@rsdoctor/types';
2
2
  import React from 'react';
3
3
  import type { TableKind, SetEditorStatus } from './types';
4
4
  interface TableProps {
5
- module: Module;
6
- moduleGraph: ModuleGraph;
5
+ module: SDK.ModuleInstance;
6
+ moduleGraph: SDK.ModuleGraphInstance;
7
7
  setEditorData: SetEditorStatus;
8
8
  kind: TableKind;
9
9
  }
@@ -1,3 +1,3 @@
1
- import type { Module, SourceRange } from '@rsdoctor/graph';
1
+ import { SDK } from '@rsdoctor/types';
2
2
  export type TableKind = 'side-effect' | 'export';
3
- export type SetEditorStatus = (module: Module, ranges: SourceRange[], line?: number) => void;
3
+ export type SetEditorStatus = (module: SDK.ModuleInstance, ranges: SDK.SourceRange[], line?: number) => void;
@@ -1,8 +1,7 @@
1
- import type { ModuleGraph, Statement } from '@rsdoctor/graph';
2
- import { Module } from '@rsdoctor/graph';
3
1
  import type { editor } from 'monaco-editor';
4
- export declare function useFileStructures(modules: Module[], moduleGraph: ModuleGraph, searchInput: string, selectedModule: Module, onItemClick: (file: string) => void, cwd: string): import("../..").DataNode[];
2
+ import { SDK } from '@rsdoctor/types';
3
+ export declare function useFileStructures(modules: SDK.ModuleInstance[], moduleGraph: SDK.ModuleGraphInstance, searchInput: string, selectedModule: SDK.ModuleInstance, onItemClick: (file: string) => void, cwd: string): import("../..").DataNode[];
5
4
  export declare function getTreeFilesDefaultExpandedKeys(files: any[]): (string | number)[];
6
5
  export declare function ellipsisPath(full: string): string;
7
- export declare function getModulePositionString(statement: Statement, module: Module): string;
8
- export declare function getHoverMessageInModule(module: Module, moduleGraph: ModuleGraph): editor.IModelDecoration[];
6
+ export declare function getModulePositionString(statement: SDK.StatementInstance, module: SDK.ModuleInstance): string;
7
+ export declare function getHoverMessageInModule(module: SDK.ModuleInstance, moduleGraph: SDK.ModuleGraphInstance): editor.IModelDecoration[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdoctor/components",
3
- "version": "1.0.0-alpha.0",
3
+ "version": "1.0.0-alpha.2",
4
4
  "main": "./dist/index.js",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",
@@ -45,7 +45,7 @@
45
45
  ],
46
46
  "devDependencies": {
47
47
  "@ant-design/icons": "5.5.2",
48
- "@rsbuild/plugin-check-syntax": "1.2.0",
48
+ "@rsbuild/plugin-check-syntax": "1.2.1",
49
49
  "@monaco-editor/react": "4.6.0",
50
50
  "@types/lodash-es": "4.17.12",
51
51
  "@types/node": "^16",
@@ -70,14 +70,14 @@
70
70
  "react-hyper-tree": "0.3.12",
71
71
  "react-i18next": "12.0.0",
72
72
  "react-json-view": "1.21.3",
73
- "react-markdown": "^9.0.1",
73
+ "react-markdown": "^9.0.3",
74
74
  "react-router-dom": "6.4.3",
75
75
  "socket.io-client": "4.6.1",
76
76
  "typescript": "^5.2.2",
77
77
  "url-parse": "1.5.10",
78
- "@rsdoctor/graph": "1.0.0-alpha.0",
79
- "@rsdoctor/utils": "1.0.0-alpha.0",
80
- "@rsdoctor/types": "1.0.0-alpha.0"
78
+ "@rsdoctor/graph": "1.0.0-alpha.2",
79
+ "@rsdoctor/utils": "1.0.0-alpha.2",
80
+ "@rsdoctor/types": "1.0.0-alpha.2"
81
81
  },
82
82
  "publishConfig": {
83
83
  "access": "public",