@xcpcio/core 0.44.4 → 0.45.1

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 CHANGED
@@ -235,7 +235,7 @@ class CodeforcesGymGhostDATConverter {
235
235
  if (team.members) {
236
236
  name = `${name} - ${team.membersToString}`;
237
237
  }
238
- res += `@t ${teamIndex},0,1,${name}
238
+ res += `@t ${teamIndex},0,1,"${name}"
239
239
  `;
240
240
  teamIdMap.set(team.id, teamIndex);
241
241
  teamIndex++;
@@ -248,7 +248,7 @@ class CodeforcesGymGhostDATConverter {
248
248
  }
249
249
  });
250
250
  for (let i = 0; i < 100; i++) {
251
- res += `@t ${teamIndex},0,1,\u041F\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443
251
+ res += `@t ${teamIndex},0,1,"\u041F\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443"
252
252
  `;
253
253
  teamIndex++;
254
254
  }
@@ -1396,6 +1396,9 @@ function createContest(contestJSON) {
1396
1396
  c.group.set(key, g);
1397
1397
  }
1398
1398
  c.banner = contestJSON.banner;
1399
+ if (c.banner) {
1400
+ c.bannerMode = contestJSON.banner_mode ?? "ALL";
1401
+ }
1399
1402
  c.logo = contestJSON.logo;
1400
1403
  c.boardLink = contestJSON.board_link;
1401
1404
  if (contestJSON.options) {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { TimeUnit, SubmissionStatus, Submission as Submission$1, Submissions as Submissions$1, BalloonColor, Problem as Problem$1, Problems as Problems$1, Lang, CalculationOfPenalty, StatusTimeDisplay, MedalPreset, Image, ContestState, Contest as Contest$1, Team as Team$1, Teams as Teams$1, ContestIndex as ContestIndex$1 } from '@xcpcio/types';
1
+ import { TimeUnit, SubmissionStatus, Submission as Submission$1, Submissions as Submissions$1, BalloonColor, Problem as Problem$1, Problems as Problems$1, Lang, CalculationOfPenalty, StatusTimeDisplay, MedalPreset, Image, BannerMode, ContestState, Contest as Contest$1, Team as Team$1, Teams as Teams$1, ContestIndex as ContestIndex$1 } from '@xcpcio/types';
2
2
  import dayjs from 'dayjs';
3
3
  export { default as dayjs } from 'dayjs';
4
4
  import * as XLSX from 'xlsx-js-style';
@@ -150,6 +150,7 @@ declare class Contest {
150
150
  tag: Map<string, string>;
151
151
  logo?: Image;
152
152
  banner?: Image;
153
+ bannerMode?: BannerMode;
153
154
  boardLink?: string;
154
155
  options: ContestOptions;
155
156
  constructor();
package/dist/index.mjs CHANGED
@@ -202,7 +202,7 @@ class CodeforcesGymGhostDATConverter {
202
202
  if (team.members) {
203
203
  name = `${name} - ${team.membersToString}`;
204
204
  }
205
- res += `@t ${teamIndex},0,1,${name}
205
+ res += `@t ${teamIndex},0,1,"${name}"
206
206
  `;
207
207
  teamIdMap.set(team.id, teamIndex);
208
208
  teamIndex++;
@@ -215,7 +215,7 @@ class CodeforcesGymGhostDATConverter {
215
215
  }
216
216
  });
217
217
  for (let i = 0; i < 100; i++) {
218
- res += `@t ${teamIndex},0,1,\u041F\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443
218
+ res += `@t ${teamIndex},0,1,"\u041F\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443"
219
219
  `;
220
220
  teamIndex++;
221
221
  }
@@ -1363,6 +1363,9 @@ function createContest(contestJSON) {
1363
1363
  c.group.set(key, g);
1364
1364
  }
1365
1365
  c.banner = contestJSON.banner;
1366
+ if (c.banner) {
1367
+ c.bannerMode = contestJSON.banner_mode ?? "ALL";
1368
+ }
1366
1369
  c.logo = contestJSON.logo;
1367
1370
  c.boardLink = contestJSON.board_link;
1368
1371
  if (contestJSON.options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xcpcio/core",
3
- "version": "0.44.4",
3
+ "version": "0.45.1",
4
4
  "description": "XCPCIO Core",
5
5
  "author": "Dup4 <lyuzhi.pan@gmail.com>",
6
6
  "license": "MIT",
@@ -49,7 +49,7 @@
49
49
  "papaparse": "^5.4.1",
50
50
  "string-width": "^6.1.0",
51
51
  "xlsx-js-style": "^1.2.0",
52
- "@xcpcio/types": "0.44.4"
52
+ "@xcpcio/types": "0.45.1"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@babel/types": "^7.22.4",
package/src/contest.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Contest as IContest, Image, MedalPreset, StatusTimeDisplay } from "@xcpcio/types";
1
+ import type { BannerMode, Contest as IContest, Image, MedalPreset, StatusTimeDisplay } from "@xcpcio/types";
2
2
  import { ContestState } from "@xcpcio/types";
3
3
 
4
4
  import type { Problem, Problems } from "./problem";
@@ -43,6 +43,7 @@ export class Contest {
43
43
 
44
44
  logo?: Image;
45
45
  banner?: Image;
46
+ bannerMode?: BannerMode;
46
47
  boardLink?: string;
47
48
 
48
49
  options: ContestOptions;
@@ -333,6 +334,9 @@ export function createContest(contestJSON: IContest): Contest {
333
334
  }
334
335
 
335
336
  c.banner = contestJSON.banner;
337
+ if (c.banner) {
338
+ c.bannerMode = contestJSON.banner_mode ?? "ALL";
339
+ }
336
340
 
337
341
  c.logo = contestJSON.logo;
338
342
  c.boardLink = contestJSON.board_link;
package/src/export/cf.ts CHANGED
@@ -42,7 +42,7 @@ export class CodeforcesGymGhostDATConverter {
42
42
  name = `${name} - ${team.membersToString}`;
43
43
  }
44
44
 
45
- res += `@t ${teamIndex},0,1,${name}\n`;
45
+ res += `@t ${teamIndex},0,1,"${name}"\n`;
46
46
  teamIdMap.set(team.id, teamIndex);
47
47
  teamIndex++;
48
48
 
@@ -56,7 +56,7 @@ export class CodeforcesGymGhostDATConverter {
56
56
  });
57
57
 
58
58
  for (let i = 0; i < 100; i++) {
59
- res += `@t ${teamIndex},0,1,Пополнить команду\n`;
59
+ res += `@t ${teamIndex},0,1,"Пополнить команду"\n`;
60
60
  teamIndex++;
61
61
  }
62
62