@xcpcio/types 0.3.1 → 0.4.0
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.cjs +1 -1
- package/dist/index.d.ts +17 -4
- package/dist/index.mjs +1 -1
- package/package.json +13 -14
- package/src/basic-types.ts +5 -5
- package/src/contest-index.ts +14 -0
- package/src/contest.ts +2 -2
- package/src/index.ts +1 -0
- package/src/problem.ts +1 -1
- package/src/submission.ts +1 -1
- package/src/team.ts +4 -0
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
|
|
6
|
-
const VERSION = "0.3.
|
|
6
|
+
const VERSION = "0.3.3";
|
|
7
7
|
|
|
8
8
|
var ContestState = /* @__PURE__ */ ((ContestState2) => {
|
|
9
9
|
ContestState2["PENDING"] = "PENDING";
|
package/dist/index.d.ts
CHANGED
|
@@ -51,12 +51,12 @@ interface BalloonColor {
|
|
|
51
51
|
* @example
|
|
52
52
|
* { "en-US": 'English', "zh-CN": '中文', fallback: 'English' }
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
interface I18NStringSet {
|
|
55
55
|
/** The fallback string if renderer cannot determine the language to use. */
|
|
56
56
|
fallback: string;
|
|
57
57
|
/** The key is the IETF BCP 47 language tag, and the value is the string for this language tag. */
|
|
58
58
|
[key: string]: string;
|
|
59
|
-
}
|
|
59
|
+
}
|
|
60
60
|
/**
|
|
61
61
|
* Text (i18n supported).
|
|
62
62
|
*/
|
|
@@ -86,7 +86,19 @@ interface StatusTimeDisplay {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
declare const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
|
|
89
|
-
declare const VERSION = "0.3.
|
|
89
|
+
declare const VERSION = "0.3.3";
|
|
90
|
+
|
|
91
|
+
interface ContestIndexConfig {
|
|
92
|
+
contest_name: string;
|
|
93
|
+
start_time: number;
|
|
94
|
+
end_time: number;
|
|
95
|
+
frozen_time: number;
|
|
96
|
+
logo: Image;
|
|
97
|
+
}
|
|
98
|
+
interface ContestIndex {
|
|
99
|
+
config: ContestIndexConfig;
|
|
100
|
+
board_link: string;
|
|
101
|
+
}
|
|
90
102
|
|
|
91
103
|
interface Problem {
|
|
92
104
|
id: string;
|
|
@@ -179,7 +191,8 @@ interface Team {
|
|
|
179
191
|
official?: boolean;
|
|
180
192
|
unofficial?: boolean;
|
|
181
193
|
girl?: boolean;
|
|
194
|
+
badge?: Image;
|
|
182
195
|
}
|
|
183
196
|
type Teams = Array<Team> | Record<string, Team>;
|
|
184
197
|
|
|
185
|
-
export { BalloonColor, Base64, Color, ColorHEX, ColorRGB, ColorRGBA, Contest, ContestState, Contributor, DateTimeISO8601String, GITHUB_URL, I18NStringSet, Image, Link, LinkString, Problem, Problems, StatusTimeDisplay, Style, Submission, SubmissionStatus, Submissions, Team, Teams, Text, ThemeColor, VERSION };
|
|
198
|
+
export { BalloonColor, Base64, Color, ColorHEX, ColorRGB, ColorRGBA, Contest, ContestIndex, ContestIndexConfig, ContestState, Contributor, DateTimeISO8601String, GITHUB_URL, I18NStringSet, Image, Link, LinkString, Problem, Problems, StatusTimeDisplay, Style, Submission, SubmissionStatus, Submissions, Team, Teams, Text, ThemeColor, VERSION };
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcpcio/types",
|
|
3
|
+
"version": "0.4.0",
|
|
3
4
|
"description": "XCPCIO Types",
|
|
4
|
-
"version": "0.3.1",
|
|
5
|
-
"license": "MIT",
|
|
6
5
|
"author": "Dup4 <lyuzhi.pan@gmail.com>",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
"CCPC"
|
|
10
|
-
],
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://github.com/xcpcio/xcpcio",
|
|
11
8
|
"repository": {
|
|
12
9
|
"type": "git",
|
|
13
10
|
"url": "git+https://github.com/xcpcio/xcpcio.git"
|
|
14
11
|
},
|
|
15
|
-
"homepage": "https://github.com/xcpcio/xcpcio",
|
|
16
12
|
"bugs": {
|
|
17
13
|
"url": "https://github.com/xcpcio/xcpcio/issues"
|
|
18
14
|
},
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
"keywords": [
|
|
16
|
+
"ICPC",
|
|
17
|
+
"CCPC"
|
|
18
|
+
],
|
|
19
|
+
"sideEffects": false,
|
|
22
20
|
"exports": {
|
|
23
21
|
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
24
23
|
"require": "./dist/index.cjs",
|
|
25
|
-
"import": "./dist/index.mjs"
|
|
26
|
-
"types": "./dist/index.d.ts"
|
|
24
|
+
"import": "./dist/index.mjs"
|
|
27
25
|
}
|
|
28
26
|
},
|
|
27
|
+
"main": "./dist/index.mjs",
|
|
28
|
+
"module": "./dist/index.mjs",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
29
30
|
"typesVersions": {
|
|
30
31
|
"*": {
|
|
31
32
|
"*": [
|
|
@@ -38,7 +39,6 @@
|
|
|
38
39
|
"src",
|
|
39
40
|
"dist"
|
|
40
41
|
],
|
|
41
|
-
"sideEffects": false,
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/types": "^7.22.4",
|
|
44
44
|
"@types/node": "^17.0.45",
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"esmo": "^0.14.1",
|
|
50
50
|
"npm-run-all": "^4.1.5",
|
|
51
51
|
"pnpm": "^7.33.0",
|
|
52
|
-
"prettier": "^2.8.8",
|
|
53
52
|
"taze": "^0.10.2",
|
|
54
53
|
"typescript": "^4.9.5",
|
|
55
54
|
"unbuild": "^0.7.6",
|
package/src/basic-types.ts
CHANGED
|
@@ -34,9 +34,9 @@ export type Color = ColorHEX | ColorRGB | ColorRGBA;
|
|
|
34
34
|
export type ThemeColor =
|
|
35
35
|
| Color
|
|
36
36
|
| {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
light: Color;
|
|
38
|
+
dark: Color;
|
|
39
|
+
};
|
|
40
40
|
|
|
41
41
|
export interface Style {
|
|
42
42
|
/**
|
|
@@ -62,12 +62,12 @@ export interface BalloonColor {
|
|
|
62
62
|
* @example
|
|
63
63
|
* { "en-US": 'English', "zh-CN": '中文', fallback: 'English' }
|
|
64
64
|
*/
|
|
65
|
-
export
|
|
65
|
+
export interface I18NStringSet {
|
|
66
66
|
/** The fallback string if renderer cannot determine the language to use. */
|
|
67
67
|
fallback: string;
|
|
68
68
|
/** The key is the IETF BCP 47 language tag, and the value is the string for this language tag. */
|
|
69
69
|
[key: string]: string;
|
|
70
|
-
}
|
|
70
|
+
}
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* Text (i18n supported).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Image } from "./basic-types";
|
|
2
|
+
|
|
3
|
+
export interface ContestIndexConfig {
|
|
4
|
+
contest_name: string;
|
|
5
|
+
start_time: number;
|
|
6
|
+
end_time: number;
|
|
7
|
+
frozen_time: number;
|
|
8
|
+
logo: Image;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface ContestIndex {
|
|
12
|
+
config: ContestIndexConfig;
|
|
13
|
+
board_link: string;
|
|
14
|
+
}
|
package/src/contest.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BalloonColor,
|
|
2
|
-
import { Problem } from "./problem";
|
|
1
|
+
import type { BalloonColor, DateTimeISO8601String, Image } from "./basic-types";
|
|
2
|
+
import type { Problem } from "./problem";
|
|
3
3
|
|
|
4
4
|
export enum ContestState {
|
|
5
5
|
PENDING = "PENDING",
|
package/src/index.ts
CHANGED
package/src/problem.ts
CHANGED
package/src/submission.ts
CHANGED
package/src/team.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Image } from "./basic-types";
|
|
2
|
+
|
|
1
3
|
export interface Team {
|
|
2
4
|
id?: string;
|
|
3
5
|
team_id?: string;
|
|
@@ -15,6 +17,8 @@ export interface Team {
|
|
|
15
17
|
official?: boolean;
|
|
16
18
|
unofficial?: boolean;
|
|
17
19
|
girl?: boolean;
|
|
20
|
+
|
|
21
|
+
badge?: Image;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
export type Teams = Array<Team> | Record<string, Team>;
|