@xcpcio/core 0.44.4 → 0.45.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 CHANGED
@@ -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
@@ -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.0",
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.0"
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;