@canyonjs/report-component 1.0.20 → 1.0.21

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/index.css CHANGED
@@ -1,9 +1,7 @@
1
1
  .canyonjs-report-html .canyon-coverage-detail-spin-wrapper {
2
2
  height: 100%;
3
3
  }
4
- .canyonjs-report-html
5
- .canyon-coverage-detail-spin-wrapper
6
- > .ant-spin-container {
4
+ .canyonjs-report-html .canyon-coverage-detail-spin-wrapper > .ant-spin-container {
7
5
  height: 100%;
8
6
  }
9
7
  .canyonjs-report-html {
@@ -118,8 +116,7 @@
118
116
  border-bottom: 1px solid #e0e0e0;
119
117
  color: #333333;
120
118
  font-size: 13px;
121
- font-family:
122
- -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
119
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
123
120
  cursor: pointer;
124
121
  text-align: left;
125
122
  display: flex;
@@ -158,36 +155,29 @@
158
155
  opacity: 0;
159
156
  }
160
157
 
161
- .canyonjs-report-html
162
- .canyon-changed-code-coverage-content[style*="max-height: auto"] {
158
+ .canyonjs-report-html .canyon-changed-code-coverage-content[style*="max-height: auto"] {
163
159
  opacity: 1;
164
160
  }
165
161
 
166
162
  .canyonjs-report-html .canyon-changed-code-coverage-select-wrapper {
167
163
  padding: 12px 16px;
168
164
  background: #ffffff;
169
- font-family:
170
- -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
165
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
171
166
  display: flex;
172
167
  justify-content: flex-start;
173
168
  }
174
169
 
175
170
  /* 下拉选项样式优化 */
176
- .canyonjs-report-html .canyon-changed-code-coverage-select-wrapper
177
- .ant-select-item {
171
+ .canyonjs-report-html .canyon-changed-code-coverage-select-wrapper .ant-select-item {
178
172
  padding: 6px 12px !important;
179
173
  line-height: 20px !important;
180
174
  }
181
175
 
182
- .canyonjs-report-html
183
- .canyon-changed-code-coverage-select-wrapper
184
- .ant-select-item-option-active {
176
+ .canyonjs-report-html .canyon-changed-code-coverage-select-wrapper .ant-select-item-option-active {
185
177
  background-color: #f5f5f5;
186
178
  }
187
179
 
188
- .canyonjs-report-html
189
- .canyon-changed-code-coverage-select-wrapper
190
- .ant-select-item-option-content {
180
+ .canyonjs-report-html .canyon-changed-code-coverage-select-wrapper .ant-select-item-option-content {
191
181
  display: flex;
192
182
  align-items: center;
193
183
  }
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ConfigProvider, Divider, Input, Progress, Segmented, Select, Space, Spin, Switch, Table, Tag, Typography, theme } from "antd";
1
+ import { ConfigProvider, Divider, Input, Progress, Segmented, Select, Space, Spin, Switch, Table, Tag, Typography } from "antd";
2
2
  import { Suspense, useEffect, useMemo, useRef, useState } from "react";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  import { genSummaryTreeItem } from "canyon-data";
@@ -395,8 +395,7 @@ const ChangedCodeCoverageTable = ({ coverage, addLines, onJumpToRange }) => {
395
395
  coverageStats.coveredCount,
396
396
  "/",
397
397
  coverageStats.totalCount,
398
- ") -",
399
- " ",
398
+ ") - ",
400
399
  coverageStats.notCoveredCount,
401
400
  " Not Covered"
402
401
  ] }),
@@ -761,9 +760,14 @@ const getColor = (pct) => {
761
760
  //#endregion
762
761
  //#region src/widgets/SummaryHeader.tsx
763
762
  const { Text } = Typography;
764
- const { useToken } = theme;
763
+ const SUMMARY_LABELS = {
764
+ statements: "Statements",
765
+ branches: "Branches",
766
+ functions: "Functions",
767
+ lines: "Lines",
768
+ changestatements: "Change Statements"
769
+ };
765
770
  const SummaryNav = ({ value, onClick, reportName }) => {
766
- const { token } = useToken();
767
771
  return /* @__PURE__ */ jsx("div", {
768
772
  style: {
769
773
  display: "flex",
@@ -833,7 +837,7 @@ const SummaryMetric = ({ data, onlyChange }) => {
833
837
  /* @__PURE__ */ jsxs(Text, {
834
838
  style: { fontSize: "14px" },
835
839
  type: "secondary",
836
- children: [t$1(`${key}`), ":"]
840
+ children: [t$1(SUMMARY_LABELS[key] || key), ":"]
837
841
  }),
838
842
  /* @__PURE__ */ jsxs(Tag, {
839
843
  bordered: false,
package/package.json CHANGED
@@ -1,50 +1,50 @@
1
1
  {
2
2
  "name": "@canyonjs/report-component",
3
- "type": "module",
4
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
+ "homepage": "https://github.com/canyon-project/canyon#readme",
5
+ "bugs": {
6
+ "url": "https://github.com/canyon-project/canyon/issues"
7
+ },
8
+ "license": "MIT",
5
9
  "author": "Travis Zhang<https://github.com/travzhang>",
6
10
  "repository": {
7
11
  "type": "git",
8
12
  "url": "https://github.com/canyon-project/canyon"
9
13
  },
10
- "bugs": {
11
- "url": "https://github.com/canyon-project/canyon/issues"
12
- },
13
- "homepage": "https://github.com/canyon-project/canyon#readme",
14
- "license": "MIT",
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "type": "module",
18
+ "main": "./dist/index.js",
19
+ "module": "./dist/index.js",
20
+ "types": "./dist/index.d.ts",
15
21
  "exports": {
16
22
  ".": "./dist/index.js",
17
23
  "./package.json": "./package.json",
18
24
  "./index.css": "./dist/index.css"
19
25
  },
20
- "main": "./dist/index.js",
21
- "module": "./dist/index.js",
22
- "types": "./dist/index.d.ts",
23
- "files": [
24
- "dist"
25
- ],
26
+ "dependencies": {
27
+ "@ant-design/icons": "6.1.0",
28
+ "@ibm/plex-mono": "1.1.0",
29
+ "antd": "6.1.0",
30
+ "canyon-data": "2.0.0-beta.36",
31
+ "monaco-editor": "0.55.1",
32
+ "react": "19.2.3",
33
+ "react-dom": "19.2.3",
34
+ "react-highlight-words": "0.21.0"
35
+ },
26
36
  "devDependencies": {
37
+ "@monaco-editor/react": "4.7.0",
27
38
  "@tsconfig/strictest": "^2.0.8",
28
39
  "@types/istanbul-lib-coverage": "^2.0.6",
29
40
  "@types/node": "^24.10.1",
30
41
  "@types/react": "19.2.3",
31
42
  "@types/react-dom": "19.2.3",
43
+ "@typescript/native-preview": "7.0.0-dev.20260223.1",
32
44
  "@vitejs/plugin-react": "^5.1.1",
33
45
  "istanbul-lib-coverage": "^3.2.2",
34
46
  "tsdown": "^0.17.0",
35
- "@typescript/native-preview": "7.0.0-dev.20260204.1",
36
- "vite": "8.0.0-beta.13",
37
- "@monaco-editor/react": "4.7.0"
38
- },
39
- "dependencies": {
40
- "react": "19.2.3",
41
- "react-dom": "19.2.3",
42
- "@ant-design/icons": "6.1.0",
43
- "@ibm/plex-mono": "1.1.0",
44
- "antd": "6.1.0",
45
- "canyon-data": "2.0.0-beta.36",
46
- "monaco-editor": "0.55.1",
47
- "react-highlight-words": "0.21.0"
47
+ "vite": "8.0.0"
48
48
  },
49
49
  "scripts": {
50
50
  "build": "tsdown",